@pksep/yui 0.1.270 → 0.1.271

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.
@@ -80979,7 +80979,7 @@ const Rqg = ["id", "data-testid"], fqg = ["data-testid"], Xqg = ["data-testid"],
80979
80979
  _: 3
80980
80980
  }, 8, ["is-show-vertical-scroll", "is-show-horizontal-scroll", "data-testid"]));
80981
80981
  }
80982
- }), EL = /* @__PURE__ */ qg(dgI, [["__scopeId", "data-v-26ee537e"]]), cgI = ["rowspan", "colspan", "data-testid"], nY = /* @__PURE__ */ mg({
80982
+ }), EL = /* @__PURE__ */ qg(dgI, [["__scopeId", "data-v-adadb414"]]), cgI = ["rowspan", "colspan", "data-testid"], nY = /* @__PURE__ */ mg({
80983
80983
  name: "TableTd",
80984
80984
  __name: "TableTd",
80985
80985
  props: {
@@ -81605,7 +81605,7 @@ const Rqg = ["id", "data-testid"], fqg = ["data-testid"], Xqg = ["data-testid"],
81605
81605
  _: 3
81606
81606
  }, 8, ["is-show-vertical-scroll", "is-show-horizontal-scroll", "data-testid"]));
81607
81607
  }
81608
- }), qL = /* @__PURE__ */ qg(KgI, [["__scopeId", "data-v-30a389ed"]]), kgI = ["data-testid"], FgI = /* @__PURE__ */ mg({
81608
+ }), qL = /* @__PURE__ */ qg(KgI, [["__scopeId", "data-v-6d0e7f55"]]), kgI = ["data-testid"], FgI = /* @__PURE__ */ mg({
81609
81609
  name: "TableRow",
81610
81610
  __name: "TableRowNew",
81611
81611
  props: {
@@ -1462,7 +1462,7 @@ function print() { __p += __j.call(arguments, '') }
1462
1462
  * Copyright 2021 Hyunje Jun, MDBootstrap and Contributors
1463
1463
  * Licensed under MIT
1464
1464
  */function Il(e){return getComputedStyle(e)}function si(e,g){for(var I in g){var C=g[I];typeof C=="number"&&(C=C+"px"),e.style[I]=C}return e}function mp(e){var g=document.createElement("div");return g.className=e,g}var CK=typeof Element<"u"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function fs(e,g){if(!CK)throw new Error("No element matching method supported");return CK.call(e,g)}function rm(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function tK(e,g){return Array.prototype.filter.call(e.children,function(I){return fs(I,g)})}var aC={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}}},iK={x:null,y:null};function AK(e,g){var I=e.element.classList,C=aC.state.scrolling(g);I.contains(C)?clearTimeout(iK[g]):I.add(C)}function nK(e,g){iK[g]=setTimeout(function(){return e.isAlive&&e.element.classList.remove(aC.state.scrolling(g))},e.settings.scrollingThreshold)}function sQg(e,g){AK(e,g),nK(e,g)}var U0=function(g){this.element=g,this.handlers={}},lK={isEmpty:{configurable:!0}};U0.prototype.bind=function(g,I){typeof this.handlers[g]>"u"&&(this.handlers[g]=[]),this.handlers[g].push(I),this.element.addEventListener(g,I,!1)},U0.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)})},U0.prototype.unbindAll=function(){for(var g in this.handlers)this.unbind(g)},lK.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every(function(g){return e.handlers[g].length===0})},Object.defineProperties(U0.prototype,lK);var mm=function(){this.eventElements=[]};mm.prototype.eventElement=function(g){var I=this.eventElements.filter(function(C){return C.element===g})[0];return I||(I=new U0(g),this.eventElements.push(I)),I},mm.prototype.bind=function(g,I,C){this.eventElement(g).bind(I,C)},mm.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)},mm.prototype.unbindAll=function(){this.eventElements.forEach(function(g){return g.unbindAll()}),this.eventElements=[]},mm.prototype.once=function(g,I,C){var t=this.eventElement(g),i=function(A){t.unbind(I,i),C(A)};t.bind(I,i)};function up(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 hp(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");aQg(e,I,i,C,t)}function aQg(e,g,I,C,t){var i=I[0],A=I[1],n=I[2],l=I[3],s=I[4],a=I[5];C===void 0&&(C=!0),t===void 0&&(t=!1);var d=e.element;e.reach[l]=null,d[n]<1&&(e.reach[l]="start"),d[n]>e[i]-e[A]-1&&(e.reach[l]="end"),g&&(d.dispatchEvent(up("ps-scroll-"+l)),g<0?d.dispatchEvent(up("ps-scroll-"+s)):g>0&&d.dispatchEvent(up("ps-scroll-"+a)),C&&sQg(e,l)),e.reach[l]&&(g||t)&&d.dispatchEvent(up("ps-"+l+"-reach-"+e.reach[l]))}function Ke(e){return parseInt(e,10)||0}function dQg(e){return fs(e,"input,[contenteditable]")||fs(e,"select,[contenteditable]")||fs(e,"textarea,[contenteditable]")||fs(e,"button,[contenteditable]")}function cQg(e){var g=Il(e);return Ke(g.width)+Ke(g.paddingLeft)+Ke(g.paddingRight)+Ke(g.borderLeftWidth)+Ke(g.borderRightWidth)}var um={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 Ul(e){var g=e.element,I=Math.floor(g.scrollTop),C=g.getBoundingClientRect();e.containerWidth=Math.round(C.width),e.containerHeight=Math.round(C.height),e.contentWidth=g.scrollWidth,e.contentHeight=g.scrollHeight,g.contains(e.scrollbarXRail)||(tK(g,aC.element.rail("x")).forEach(function(t){return rm(t)}),g.appendChild(e.scrollbarXRail)),g.contains(e.scrollbarYRail)||(tK(g,aC.element.rail("y")).forEach(function(t){return rm(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=oK(e,Ke(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=Ke((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=oK(e,Ke(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=Ke(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),rQg(g,e),e.scrollbarXActive?g.classList.add(aC.state.active("x")):(g.classList.remove(aC.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,g.scrollLeft=e.isRtl===!0?e.contentWidth:0),e.scrollbarYActive?g.classList.add(aC.state.active("y")):(g.classList.remove(aC.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,g.scrollTop=0)}function oK(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 rQg(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,si(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,si(g.scrollbarYRail,t),si(g.scrollbarX,{left:g.scrollbarXLeft,width:g.scrollbarXWidth-g.railBorderXWidth}),si(g.scrollbarY,{top:g.scrollbarYTop,height:g.scrollbarYHeight-g.railBorderYWidth})}function mQg(e){e.element,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,Ul(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,Ul(e),g.stopPropagation()})}function uQg(e){sK(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),sK(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])}function sK(e,g){var I=g[0],C=g[1],t=g[2],i=g[3],A=g[4],n=g[5],l=g[6],s=g[7],a=g[8],d=e.element,m=null,u=null,h=null;function Z(p){p.touches&&p.touches[0]&&(p[t]=p.touches[0].pageY),d[l]=m+h*(p[t]-u),AK(e,s),Ul(e),p.stopPropagation(),p.type.startsWith("touch")&&p.changedTouches.length>1&&p.preventDefault()}function G(){nK(e,s),e[a].classList.remove(aC.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",Z)}function w(p,B){m=d[l],B&&p.touches&&(p[t]=p.touches[0].pageY),u=p[t],h=(e[C]-e[I])/(e[i]-e[n]),B?e.event.bind(e.ownerDocument,"touchmove",Z):(e.event.bind(e.ownerDocument,"mousemove",Z),e.event.once(e.ownerDocument,"mouseup",G),p.preventDefault()),e[a].classList.add(aC.state.clicking),p.stopPropagation()}e.event.bind(e[A],"mousedown",function(p){w(p)}),e.event.bind(e[A],"touchstart",function(p){w(p,!0)})}function hQg(e){var g=e.element,I=function(){return fs(g,":hover")},C=function(){return fs(e.scrollbarX,":focus")||fs(e.scrollbarY,":focus")};function t(i,A){var n=Math.floor(g.scrollTop);if(i===0){if(!e.scrollbarYActive)return!1;if(n===0&&A>0||n>=e.contentHeight-e.containerHeight&&A<0)return!e.settings.wheelPropagation}var l=g.scrollLeft;if(A===0){if(!e.scrollbarXActive)return!1;if(l===0&&i<0||l>=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 A=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(A){if(A.tagName==="IFRAME")A=A.contentDocument.activeElement;else for(;A.shadowRoot;)A=A.shadowRoot.activeElement;if(dQg(A))return}var n=0,l=0;switch(i.which){case 37:i.metaKey?n=-e.contentWidth:i.altKey?n=-e.containerWidth:n=-30;break;case 38:i.metaKey?l=e.contentHeight:i.altKey?l=e.containerHeight:l=30;break;case 39:i.metaKey?n=e.contentWidth:i.altKey?n=e.containerWidth:n=30;break;case 40:i.metaKey?l=-e.contentHeight:i.altKey?l=-e.containerHeight:l=-30;break;case 32:i.shiftKey?l=e.containerHeight:l=-e.containerHeight;break;case 33:l=e.containerHeight;break;case 34:l=-e.containerHeight;break;case 36:l=e.contentHeight;break;case 35:l=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&n!==0||e.settings.suppressScrollY&&l!==0||(g.scrollTop-=l,g.scrollLeft+=n,Ul(e),t(n,l)&&i.preventDefault())}})}function bQg(e){var g=e.element;function I(A,n){var l=Math.floor(g.scrollTop),s=g.scrollTop===0,a=l+g.offsetHeight===g.scrollHeight,d=g.scrollLeft===0,m=g.scrollLeft+g.offsetWidth===g.scrollWidth,u;return Math.abs(n)>Math.abs(A)?u=s||a:u=d||m,u?!e.settings.wheelPropagation:!0}function C(A){var n=A.deltaX,l=-1*A.deltaY;return(typeof n>"u"||typeof l>"u")&&(n=-1*A.wheelDeltaX/6,l=A.wheelDeltaY/6),A.deltaMode&&A.deltaMode===1&&(n*=10,l*=10),n!==n&&l!==l&&(n=0,l=A.wheelDelta),A.shiftKey?[-l,-n]:[n,l]}function t(A,n,l){if(!um.isWebKit&&g.querySelector("select:focus"))return!0;if(!g.contains(A))return!1;for(var s=A;s&&s!==g;){if(s.classList.contains(aC.element.consuming))return!0;var a=Il(s);if(l&&a.overflowY.match(/(scroll|auto)/)){var d=s.scrollHeight-s.clientHeight;if(d>0&&(s.scrollTop>0&&l<0||s.scrollTop<d&&l>0))return!0}if(n&&a.overflowX.match(/(scroll|auto)/)){var m=s.scrollWidth-s.clientWidth;if(m>0&&(s.scrollLeft>0&&n<0||s.scrollLeft<m&&n>0))return!0}s=s.parentNode}return!1}function i(A){var n=C(A),l=n[0],s=n[1];if(!t(A.target,l,s)){var a=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(s?g.scrollTop-=s*e.settings.wheelSpeed:g.scrollTop+=l*e.settings.wheelSpeed,a=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(l?g.scrollLeft+=l*e.settings.wheelSpeed:g.scrollLeft-=s*e.settings.wheelSpeed,a=!0):(g.scrollTop-=s*e.settings.wheelSpeed,g.scrollLeft+=l*e.settings.wheelSpeed),Ul(e),a=a||I(l,s),a&&!A.ctrlKey&&(A.stopPropagation(),A.preventDefault())}}typeof window.onwheel<"u"?e.event.bind(g,"wheel",i):typeof window.onmousewheel<"u"&&e.event.bind(g,"mousewheel",i)}function ZQg(e){if(!um.supportsTouch&&!um.supportsIePointer)return;var g=e.element;function I(h,Z){var G=Math.floor(g.scrollTop),w=g.scrollLeft,p=Math.abs(h),B=Math.abs(Z);if(B>p){if(Z<0&&G===e.contentHeight-e.containerHeight||Z>0&&G===0)return window.scrollY===0&&Z>0&&um.isChrome}else if(p>B&&(h<0&&w===e.contentWidth-e.containerWidth||h>0&&w===0))return!0;return!0}function C(h,Z){g.scrollTop-=Z,g.scrollLeft-=h,Ul(e)}var t={},i=0,A={},n=null;function l(h){return h.targetTouches?h.targetTouches[0]:h}function s(h){return h.pointerType&&h.pointerType==="pen"&&h.buttons===0?!1:!!(h.targetTouches&&h.targetTouches.length===1||h.pointerType&&h.pointerType!=="mouse"&&h.pointerType!==h.MSPOINTER_TYPE_MOUSE)}function a(h){if(s(h)){var Z=l(h);t.pageX=Z.pageX,t.pageY=Z.pageY,i=new Date().getTime(),n!==null&&clearInterval(n)}}function d(h,Z,G){if(!g.contains(h))return!1;for(var w=h;w&&w!==g;){if(w.classList.contains(aC.element.consuming))return!0;var p=Il(w);if(G&&p.overflowY.match(/(scroll|auto)/)){var B=w.scrollHeight-w.clientHeight;if(B>0&&(w.scrollTop>0&&G<0||w.scrollTop<B&&G>0))return!0}if(Z&&p.overflowX.match(/(scroll|auto)/)){var y=w.scrollWidth-w.clientWidth;if(y>0&&(w.scrollLeft>0&&Z<0||w.scrollLeft<y&&Z>0))return!0}w=w.parentNode}return!1}function m(h){if(s(h)){var Z=l(h),G={pageX:Z.pageX,pageY:Z.pageY},w=G.pageX-t.pageX,p=G.pageY-t.pageY;if(d(h.target,w,p))return;C(w,p),t=G;var B=new Date().getTime(),y=B-i;y>0&&(A.x=w/y,A.y=p/y,i=B),I(w,p)&&h.preventDefault()}}function u(){e.settings.swipeEasing&&(clearInterval(n),n=setInterval(function(){if(e.isInitialized){clearInterval(n);return}if(!A.x&&!A.y){clearInterval(n);return}if(Math.abs(A.x)<.01&&Math.abs(A.y)<.01){clearInterval(n);return}if(!e.element){clearInterval(n);return}C(A.x*30,A.y*30),A.x*=.8,A.y*=.8},10))}um.supportsTouch?(e.event.bind(g,"touchstart",a),e.event.bind(g,"touchmove",m),e.event.bind(g,"touchend",u)):um.supportsIePointer&&(window.PointerEvent?(e.event.bind(g,"pointerdown",a),e.event.bind(g,"pointermove",m),e.event.bind(g,"pointerup",u)):window.MSPointerEvent&&(e.event.bind(g,"MSPointerDown",a),e.event.bind(g,"MSPointerMove",m),e.event.bind(g,"MSPointerUp",u)))}var GQg=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}},wQg={"click-rail":mQg,"drag-thumb":uQg,keyboard:hQg,wheel:bQg,touch:ZQg},E0=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(aC.main),this.settings=GQg();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(aC.state.focus)},A=function(){return g.classList.remove(aC.state.focus)};this.isRtl=Il(g).direction==="rtl",this.isRtl===!0&&g.classList.add(aC.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 mm,this.ownerDocument=g.ownerDocument||document,this.scrollbarXRail=mp(aC.element.rail("x")),g.appendChild(this.scrollbarXRail),this.scrollbarX=mp(aC.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",A),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var n=Il(this.scrollbarXRail);this.scrollbarXBottom=parseInt(n.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=Ke(n.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=Ke(n.borderLeftWidth)+Ke(n.borderRightWidth),si(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=Ke(n.marginLeft)+Ke(n.marginRight),si(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=mp(aC.element.rail("y")),g.appendChild(this.scrollbarYRail),this.scrollbarY=mp(aC.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",A),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var l=Il(this.scrollbarYRail);this.scrollbarYRight=parseInt(l.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=Ke(l.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?cQg(this.scrollbarY):null,this.railBorderYWidth=Ke(l.borderTopWidth)+Ke(l.borderBottomWidth),si(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=Ke(l.marginTop)+Ke(l.marginBottom),si(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 wQg[s](C)}),this.lastScrollTop=Math.floor(g.scrollTop),this.lastScrollLeft=g.scrollLeft,this.event.bind(this.element,"scroll",function(s){return C.onScroll(s)}),Ul(this)};E0.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,si(this.scrollbarXRail,{display:"block"}),si(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=Ke(Il(this.scrollbarXRail).marginLeft)+Ke(Il(this.scrollbarXRail).marginRight),this.railYMarginHeight=Ke(Il(this.scrollbarYRail).marginTop)+Ke(Il(this.scrollbarYRail).marginBottom),si(this.scrollbarXRail,{display:"none"}),si(this.scrollbarYRail,{display:"none"}),Ul(this),hp(this,"top",0,!1,!0),hp(this,"left",0,!1,!0),si(this.scrollbarXRail,{display:""}),si(this.scrollbarYRail,{display:""}))},E0.prototype.onScroll=function(g){this.isAlive&&(Ul(this),hp(this,"top",this.element.scrollTop-this.lastScrollTop),hp(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},E0.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),rm(this.scrollbarX),rm(this.scrollbarY),rm(this.scrollbarXRail),rm(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},E0.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(g){return!g.match(/^ps([-_].+|)$/)}).join(" ")};const WQg=o.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=o.ref(null),A=o.ref(null);o.watch(()=>C.options,()=>{l(),n()},{deep:!0}),o.onMounted(()=>{i.value&&n()}),o.onBeforeUnmount(()=>{l()});function n(){i.value&&(A.value=new E0(i.value,C.options),d())}function l(){A.value&&(d(!1),A.value.destroy(),A.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(m){return function(u){t(m,u)}}function d(m=!0){var u;(u=A.value)!=null&&u.element&&Object.entries(s).forEach(([h,Z])=>{var G,w;m?(G=A.value)==null||G.element.addEventListener(h,Z):(w=A.value)==null||w.element.removeEventListener(h,Z)})}return g({ps:A}),(m,u)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(m.tag),{ref_key:"scrollbar",ref:i,class:"ps"},{default:o.withCtx(()=>[o.renderSlot(m.$slots,"default")]),_:3},512))}}),pQg=["data-testid"],iN=o.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=o.ref(null),i=I,A=d=>{i("scroll",d)},n={attributes:!0,attributeFilter:["style"]},l=(d,m)=>u=>{for(const h of u)h.type==="attributes"&&h.attributeName==="style"&&d.style.right!==m&&(d.style.right=m)},s=()=>{var w,p,B,y,Y,f,M,k,F,X,z,L,Q,Ig,ig,U,$,mg,og,Gg,Rg,Vg,hg,Ng;if(!t.value)return;const d=t.value.querySelector(".ps__thumb-y"),m=t.value.querySelector(".ps__thumb-x"),u=t.value.querySelector(".ps__rail-y"),h=t.value.querySelector(".ps__rail-x");d.style.background=((p=(w=C.thrumbStyle)==null?void 0:w.y)==null?void 0:p.background)||"var(--primary-color)",d.style.width=((y=(B=C.thrumbStyle)==null?void 0:B.y)==null?void 0:y.width)||"6px",d.style.right="0px",m.style.background=((f=(Y=C.thrumbStyle)==null?void 0:Y.x)==null?void 0:f.background)||"var(--primary-color)",m.style.width=((k=(M=C.thrumbStyle)==null?void 0:M.x)==null?void 0:k.width)||"6px",m.style.right="0px",u.style.background=((X=(F=C.railStyle)==null?void 0:F.y)==null?void 0:X.background)||"var(--button-neutral-color)",u.style.width=((L=(z=C.thrumbStyle)==null?void 0:z.y)==null?void 0:L.width)||"6px",u.style.right=((Ig=(Q=C.railStyle)==null?void 0:Q.y)==null?void 0:Ig.right)||"0px",h.style.background=((U=(ig=C.railStyle)==null?void 0:ig.x)==null?void 0:U.background)||"var(--button-neutral-color)",h.style.width=((mg=($=C.thrumbStyle)==null?void 0:$.x)==null?void 0:mg.width)||"6px",h.style.right=((Gg=(og=C.railStyle)==null?void 0:og.x)==null?void 0:Gg.right)||"0px";const Z=new MutationObserver(l(u,((Vg=(Rg=C.railStyle)==null?void 0:Rg.y)==null?void 0:Vg.right)||"0px")),G=new MutationObserver(l(h,((Ng=(hg=C.railStyle)==null?void 0:hg.x)==null?void 0:Ng.right)||"0px"));Z.observe(u,n),G.observe(h,n)};return o.watch(()=>C,()=>{s()},{immediate:!0}),g({scrollToTop:()=>{t.value&&(t.value.children[0].scrollTop=0)}}),o.onMounted(()=>{s()}),(d,m)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"scrollbar",ref:t,"data-testid":C.dataTestid},[o.createVNode(o.unref(WQg),{onScroll:A,options:C.options,tag:C.tag,class:o.normalizeClass(C.class),style:o.normalizeStyle(C.style),"data-testid":`${C.dataTestid}-Scroll`,ref_key:"scrollbar",ref:t},{default:o.withCtx(()=>[o.renderSlot(d.$slots,"default")]),_:3},8,["options","tag","class","style","data-testid"])],8,pQg))}});var bp=(e=>(e.small="small",e.medium="medium",e.big="big",e))(bp||{}),Zp=(e=>(e.circled="circled",e.rounded="rounded",e))(Zp||{}),aK=(e=>(e.blue="blue",e.red="red",e))(aK||{});const BQg=["data-testid","checked","disabled"],yQg=o.defineComponent({__name:"Checkbox",props:{size:{default:bp.medium},circular:{default:Zp.rounded},color:{default:aK.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=o.reactive({isChecked:I.modelValue});o.watchEffect(()=>{t.isChecked=I.modelValue});const i=()=>{t.isChecked=!t.isChecked,C("change",t.isChecked),C("update:modelValue",t.isChecked)};return(A,n)=>(o.openBlock(),o.createElementBlock("input",{type:"checkbox",class:o.normalizeClass(`checkbox-yui-kit checkbox-yui-kit_${I.size} checkbox-yui-kit_${I.circular} checkbox-yui-kit_${I.color}`),"data-testid":`${I.dataTestid}`,tabindex:"0",onChange:i,checked:t.isChecked,disabled:I.disabled,onKeyup:o.withKeys(i,["enter"])},null,42,BQg))}}),AN=Jg(yQg,[["__scopeId","data-v-7ec339ee"]]),YQg=["data-testid"],VQg=["src","alt"],NQg={key:1,class:"avatar-yui-kit__fallback"},MQg=["src"],fQg={key:1,class:"avatar-yui-kit__text"},nN=new Set,lN=new Set,P0=Jg(o.defineComponent({__name:"Avatar",props:{initials:{},url:{},isIcon:{type:Boolean},alt:{},defaultImage:{},isOnline:{type:Boolean},dataTestid:{}},setup(e){const g=e,I=o.ref(null),C=o.ref(!1),t=o.ref(!1),i=o.computed(()=>g.initials?g.initials.charAt(0).toUpperCase():""),A=["var(--error-color)","var(--orange4)","var(--green2)","var(--blue24)","var(--blue22)","var(--blue4)","var(--violet2)","var(--pink-color)"],n=o.computed(()=>{if(!i.value)return A[0];const d=i.value.charCodeAt(0);return A[d%A.length]}),l=o.computed(()=>!g.url||!C.value||t.value),s=()=>{g.url&&(nN.add(g.url),lN.delete(g.url)),C.value=!0,t.value=!1},a=()=>{g.url&&(lN.add(g.url),nN.delete(g.url)),t.value=!0,C.value=!1};return o.watch(()=>g.url,async d=>{var m;if(C.value=!1,t.value=!1,!!d){if(nN.has(d)){C.value=!0;return}if(lN.has(d)){t.value=!0;return}await o.nextTick(),(m=I.value)!=null&&m.complete&&I.value.naturalWidth>0&&(C.value=!0)}},{immediate:!0}),(d,m)=>(o.openBlock(),o.createElementBlock("div",{"data-testid":g.dataTestid,class:o.normalizeClass(["avatar-yui-kit",{"is-online":g.isOnline}]),style:o.normalizeStyle({backgroundColor:n.value})},[g.url?(o.openBlock(),o.createElementBlock("img",{key:0,ref_key:"imageRef",ref:I,src:g.url,alt:g.alt,class:o.normalizeClass(["avatar-yui-kit__image",{"is-visible":C.value}]),onLoad:s,onError:a},null,42,VQg)):o.createCommentVNode("",!0),l.value?(o.openBlock(),o.createElementBlock("div",NQg,[g.defaultImage?(o.openBlock(),o.createElementBlock("img",{key:0,src:g.defaultImage,class:"avatar-yui-kit__image is-visible"},null,8,MQg)):(o.openBlock(),o.createElementBlock("div",fQg,o.toDisplayString(i.value),1))])):o.createCommentVNode("",!0)],14,YQg))}}),[["__scopeId","data-v-f0864d68"]]),RQg=["data-testid","aria-label"],XQg=["data-testid"],Hd=Jg(o.defineComponent({name:"Tooltip",__name:"Tooltip",props:{hint:{},isShow:{type:Boolean,default:!1},isCanShow:{type:Boolean,default:!0},position:{default:"bottom-center"},size:{default:"small"},type:{default:"black"},hintGap:{},hintClass:{default:""},dataTestid:{default:"Tooltip"}},setup(e){const g=e,I=CSS.supports("top","anchor(bottom)"),C=o.useId(),t=o.computed(()=>`--anchor-tooltip-${C}`),i=o.ref(null),A=o.ref(null),n=o.computed(()=>[{"tooltip-yui-kit__hint_show":g.isShow||s.isShow,"tooltip-yui-kit__hint_bottom-center":g.position==="bottom-center","tooltip-yui-kit__hint_bottom-left":g.position==="bottom-left","tooltip-yui-kit__hint_bottom-right":g.position==="bottom-right","tooltip-yui-kit__hint_top-center":g.position==="top-center","tooltip-yui-kit__hint_top-left":g.position==="top-left","tooltip-yui-kit__hint_top-right":g.position==="top-right","tooltip-yui-kit__hint_left-top":g.position==="left-top","tooltip-yui-kit__hint_left-center":g.position==="left-center","tooltip-yui-kit__hint_left-bottom":g.position==="left-bottom","tooltip-yui-kit__hint_right-top":g.position==="right-top","tooltip-yui-kit__hint_right-center":g.position==="right-center","tooltip-yui-kit__hint_right-bottom":g.position==="right-bottom","tooltip-yui-kit__hint_small":g.size==="small","tooltip-yui-kit__hint_medium":g.size==="medium","tooltip-yui-kit__hint_large":g.size==="large","tooltip-yui-kit__hint_black":g.type==="black","tooltip-yui-kit__hint_blue":g.type==="blue","tooltip-yui-kit__hint_white":g.type==="white",[g.hintClass]:!0}]),l=o.computed(()=>{var f;const Y=(f=i.value)==null?void 0:f.closest("dialog");return Y||"body"}),s=o.reactive({isShow:!1}),a=()=>{G()},d=()=>{w()},m=()=>{u()},u=()=>{requestAnimationFrame(()=>{if(!i.value||!A.value||!s.isShow&&!g.isShow)return;const Y={"--hint-top":"anchor(top)","--hint-left":"anchor(left)","--hint-measured-width":"0","--hint-height":"0","--tooltip-width":"0","--tooltip-height":"0","--hint-visibility":"visible"};I||(Y["--hint-top"]="0",Y["--hint-left"]="0");const f=i.value.getBoundingClientRect(),M=A.value.getBoundingClientRect();let k=f.top,F=f.left;const X=i.value.closest("dialog");if(X){const ig=X.getBoundingClientRect();k=f.top-ig.top,F=f.left-ig.left;const U=X.scrollTop,$=X.scrollLeft;k+=U,F+=$}const z=f.width,L=f.height,Q=M.width,Ig=M.height;I||(Y["--hint-top"]=`${k}px`,Y["--hint-left"]=`${F}px`),Y["--tooltip-width"]=`${z}px`,Y["--tooltip-height"]=`${L}px`,Y["--hint-measured-width"]=`${Q}px`,Y["--hint-height"]=`${Ig}px`,A.value&&kI(Y,A.value)})},h=()=>{requestAnimationFrame(()=>{!A.value||g.hintGap===void 0||kI({"--tooltip-hint-gap":g.hintGap},A.value)})},Z=()=>{A.value&&(kI({"position-anchor":`${t.value}`},A.value),u())};o.watch(()=>g.hintGap,h,{immediate:!0}),o.watch(()=>g.isCanShow,()=>{o.nextTick(()=>{Z()})});const G=()=>{s.isShow=!0},w=()=>{s.isShow=!1},p=new MutationObserver(()=>{u()}),B=new ResizeObserver(()=>{var Y;(s.isShow||g.isShow)&&!((Y=i.value)!=null&&Y.matches(":hover"))?w():u()}),y=Y=>{p.observe(Y,{childList:!0,attributes:!0,characterData:!0}),B.observe(Y)};return o.onMounted(()=>{i.value&&kI({"anchor-name":`${t.value}`},i.value),Z(),A.value&&y(A.value),i.value&&y(i.value),I||(window.addEventListener("scroll",u,!0),window.addEventListener("resize",u))}),o.onUnmounted(()=>{B.disconnect(),p.disconnect(),window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u)}),(Y,f)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"tooltipRef",ref:i,class:"tooltip-yui-kit","data-testid":g.dataTestid,"aria-label":e.hint,onMouseenter:a,onMouseleave:d},[o.renderSlot(Y.$slots,"default",{},void 0,!0),e.isCanShow?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:l.value},[o.createVNode(o.Transition,{name:"hint-animate",onEnter:m},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{ref_key:"hintRef",ref:A,class:o.normalizeClass(["tooltip-yui-kit__hint",n.value]),"data-testid":g.dataTestid},o.toDisplayString(e.hint),11,XQg),[[o.vShow,e.isShow||s.isShow]])]),_:1})],8,["to"])):o.createCommentVNode("",!0)],40,RQg))}}),[["__scopeId","data-v-4cf4d114"]]),HQg=["data-testid"],DQg=["data-testid"],SQg=["data-testid"],kQg=["onClick","data-testid"],KQg=o.defineComponent({__name:"Popover",props:{isShow:{type:Boolean},iconName:{default:ug.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=o.reactive({isShow:!1}),i=o.computed(()=>{var k;const M=(k=s.value)==null?void 0:k.closest("dialog");return M||"body"}),A=CSS.supports("top","anchor(bottom)"),n=o.useId(),l=o.computed(()=>`--anchor-popover-${n}`),s=o.ref(null),a=o.ref(null),d=o.ref(null),m=o.computed(()=>({"popover-yui-kit__wrapper":!0,"active-yui-kit":t.isShow,"empty-yui-kit":I.options.length===0})),u=()=>t.isShow=!t.isShow,h=()=>{t.isShow=!1,C("close")},Z=M=>{M.function(),h()},G=()=>{requestAnimationFrame(()=>{if(!s.value||!a.value||!t.isShow)return;const M={},k=s.value.getBoundingClientRect(),F=window.pageYOffset||document.documentElement.scrollTop,X=window.pageXOffset||document.documentElement.scrollLeft;let z=k.bottom+F,L=k.left+X;const Q=s.value.closest("dialog");if(Q){const ig=Q.getBoundingClientRect();z=k.top-ig.top,L=k.left-ig.left;const U=Q.scrollTop,$=Q.scrollLeft;z+=U,L+=$,z+=10}z+=10,M["--popover-top"]=`${z}px`,A||(M["--popover-left"]=`${L}px`),kI(M,a.value),(()=>{if(!a.value)return;const ig=a.value.getBoundingClientRect();ig.right>window.innerWidth&&(A?M["--popover-right"]="anchor(right) ":M["--popover-right"]=`${k.right-ig.width}px`)})(),M["--popover-right"]&&(M.left="auto",kI(M,a.value))})},w=M=>{const k=M.getBoundingClientRect(),F=document.elementFromPoint(k.left,k.top),X=document.elementFromPoint(k.right,k.bottom);!(F&&M.contains(F))&&!(X&&M.contains(X))&&h()},p=new IntersectionObserver(M=>{M.forEach(k=>{k.isIntersecting||h()})}),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)},f=()=>{s.value&&window.removeEventListener("scroll",w.bind(null,s.value),!0)};return o.watch(()=>I.isShow,()=>t.isShow=I.isShow),o.watch(()=>t.isShow,()=>{t.isShow?(G(),Y()):f(),!A&&(t.isShow?B():y())}),o.onMounted(()=>{s.value&&kI({"anchor-name":`${l.value}`},s.value),a.value&&kI({"position-anchor":`${l.value}`},a.value),d.value&&p.observe(d.value),A||G()}),o.onUnmounted(()=>{p.disconnect(),f(),A||y()}),(M,k)=>(o.openBlock(),o.createBlock(Hd,{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:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"popover-yui-kit",ref_key:"popover",ref:d,"data-testid":`${I.dataTestid}-Popover`},[o.createElementVNode("div",{ref_key:"reference",ref:s,class:o.normalizeClass(m.value),"data-testid":`${I.dataTestid}-PopoverShow`,onClick:u},[o.renderSlot(M.$slots,"trigger",{},()=>[o.createVNode(Mg,{class:"popover-yui-kit__icon",name:I.iconName,"data-testid":`${I.dataTestid}-PopoverShow-Icon`},null,8,["name","data-testid"])],!0)],10,DQg),(o.openBlock(),o.createBlock(o.Teleport,{to:i.value,disabled:I.isWCUse},[o.createVNode(o.Transition,{name:"popover-animate"},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{class:"popover-yui-kit__content",style:o.normalizeStyle({transform:`translateY(${I.translateY})`}),ref_key:"floating",ref:a},[o.renderSlot(M.$slots,"default",{},()=>{var F;return[(F=I.options)!=null&&F.length?(o.openBlock(),o.createElementBlock("div",{key:0,class:"popover-yui-kit__options","data-testid":`${I.dataTestid}-PopoverShow-Options`},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(I.options,(X,z)=>(o.openBlock(),o.createElementBlock("div",{class:"popover-yui-kit__options__item",key:z,style:o.normalizeStyle(X.style),onClick:o.withModifiers(L=>Z(X),["stop"]),"data-testid":`${I.dataTestid}-Item${z}`},[X.iconName?(o.openBlock(),o.createBlock(Mg,{key:0,name:X.iconName,"data-testid":`${I.dataTestid}-Item${z}-Icon`},null,8,["name","data-testid"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(X.value),1)],12,kQg))),128))],8,SQg)):o.createCommentVNode("",!0)]},!0)],4),[[o.vShow,t.isShow]])]),_:3})],8,["to","disabled"]))],8,HQg)),[[o.unref(Cd),h,void 0,{bubble:!0}]])]),_:3},8,["hint","position","data-testid","is-can-show"]))}}),Dd=Jg(KQg,[["__scopeId","data-v-4a781cc2"]]),FQg=["data-testid"],zQg={class:"list-yui-kit__item-text"},JQg=Jg(o.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)=>(o.openBlock(),o.createElementBlock("li",{class:o.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},[o.createVNode(Mg,{name:e.iconName},null,8,["name"]),o.createElementVNode("span",zQg,o.toDisplayString(e.text),1),o.renderSlot(t.$slots,"default",{},void 0,!0)],10,FQg))}}),[["__scopeId","data-v-6b345661"]]);var le=(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))(le||{});const LQg={class:"menu-yui-kit__list"},TQg={class:"list-yui-kit"},vQg=Jg(o.defineComponent({__name:"UserMenuList",props:{closeAfterClick:{type:Boolean},menuOpen:{type:Boolean},categories:{},texts:{},user:{},languages:{},isBlackTheme:{type:Boolean},dataTestid:{default:"UserMenuList"}},emits:["click","unmount-qr-auth","themeChange","languageSwitch"],setup(e,{emit:g}){const I=e,C=g,t=o.ref(null);o.watch(()=>I.menuOpen,m=>{m||(t.value=null)});const i=m=>{if(t.value=m,m===le.qrAuth){C("unmount-qr-auth");return}C("click",m)},A=m=>{C("languageSwitch",m)},n=()=>!1,l=m=>({[le.profile]:"Profile",[le.qrAuth]:"Auth with QR",[le.downloadChat]:"Auth with QR",[le.theme]:"Theme",[le.options]:"Settings",[le.exit]:"Log Out",[le.help]:"Help"})[m]??"",s=m=>({[le.profile]:ug.profile,[le.qrAuth]:ug.qrCode,[le.downloadChat]:ug.download,[le.theme]:ug.darkThemeSwitcher,[le.options]:ug.settings,[le.exit]:ug.logout,[le.help]:ug.help})[m]??ug.profile,a=m=>({[le.profile]:"Profile",[le.qrAuth]:"QR",[le.downloadChat]:"Chat",[le.theme]:"Theme",[le.options]:"Settings",[le.exit]:"Exit",[le.help]:"Help"})[m]??m,d=m=>m===le.theme;return(m,u)=>{var h,Z,G;return o.openBlock(),o.createElementBlock("div",LQg,[o.createElementVNode("ul",TQg,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(I.categories,w=>{var p;return o.openBlock(),o.createBlock(JQg,{key:w,"data-testid":`${I.dataTestid}-${a(w)}-Item`,iconName:s(w),text:((p=I.texts)==null?void 0:p[w])??l(w),menuType:w,disabled:d(w),active:t.value===w,onClick:()=>i(w)},{default:o.withCtx(()=>[w===o.unref(le).theme?(o.openBlock(),o.createBlock(rp,{key:0,disabled:"",onChange:n})):o.createCommentVNode("",!0)]),_:2},1032,["data-testid","iconName","text","menuType","disabled","active","onClick"])}),128))]),(h=I.languages)!=null&&h.items?(o.openBlock(),o.createBlock(Ww,{key:0,items:(Z=I.languages)==null?void 0:Z.items,"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"])):o.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-a4fe74e9"]]),jQg=["data-testid"],xQg={class:"menu-yui-kit__wrapper"},OQg={class:"menu-yui-kit__names"},QQg={class:"menu-yui-kit__name"},UQg={class:"menu-yui-kit__role"},oN=Jg(o.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","themeChange","languageSwitch"],setup(e,{emit:g}){const I=e,C=o.reactive({isShow:!1,isBlackTheme:I.isBlackTheme??!1}),t=g,i=o.computed(()=>({"menu-yui-kit__heading":!0,"active-yui-kit":C.isShow}));function A(m){t("click",m),I.closeAfterClick&&(C.isShow=!1)}const n=o.computed(()=>C.isShow?ug.chevronUp:ug.chevronDown),l=()=>{C.isShow=!C.isShow};function s(m){I.closeAfterClick&&(C.isShow=!1),t("themeChange",m),C.isBlackTheme=m}const a=m=>{I.closeAfterClick&&(C.isShow=!1),t("languageSwitch",m)},d=()=>{I.closeAfterClick&&(C.isShow=!1),t("unmount-qr-auth")};return(m,u)=>(o.openBlock(),o.createElementBlock("div",{class:"menu-yui-kit","data-testid":I.dataTestid},[o.createElementVNode("div",xQg,[o.createVNode(Dd,{open:C.isShow,onClose:u[0]||(u[0]=h=>C.isShow=!1),placement:"bottom-start","data-testid":`${I.dataTestid}-Popover`},{trigger:o.withCtx(()=>{var h,Z,G;return[o.createElementVNode("div",{class:o.normalizeClass(i.value),onClick:l},[o.createVNode(P0,{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"]),o.createElementVNode("div",OQg,[o.createElementVNode("p",QQg,o.toDisplayString((Z=I.user)==null?void 0:Z.name),1),o.createElementVNode("p",UQg,o.toDisplayString((G=I.user)==null?void 0:G.role),1)]),o.createVNode(zI,{type:o.unref(VI).ghost,class:"menu-yui-kit__button","data-testid":`${I.dataTestid}-Toggle`},{default:o.withCtx(()=>[o.createVNode(Mg,{class:"menu-yui-kit__button-icon",name:n.value},null,8,["name"])]),_:1},8,["type","data-testid"])],2)]}),default:o.withCtx(()=>[o.createVNode(vQg,{"data-testid":`${I.dataTestid}-List`,"is-black-theme":C.isBlackTheme,"menu-open":C.isShow,languages:I.languages,categories:I.categories,texts:I.texts,onClick:A,onThemeChange:s,onLanguageSwitch:a,onUnmountQrAuth:d},null,8,["data-testid","is-black-theme","menu-open","languages","categories","texts"])]),_:1},8,["open","data-testid"])])],8,jQg))}}),[["__scopeId","data-v-976c86fb"]]);var Gp=(e=>(e.default="default",e.minor="minor",e))(Gp||{});const EQg=["data-testid"],PQg=["data-testid"],_Qg=["data-testid"],$Qg=["data-testid","placeholder","required","maxlength","readonly"],qQg=o.defineComponent({__name:"Textarea",props:{placeholder:{},inputMessage:{},required:{type:Boolean,default:!1},maxlength:{},modelValue:{default:""},readonly:{type:Boolean,default:!1},type:{default:Gp.default},modelModifiers:{default:()=>({})},dataTestid:{default:"Textarea"}},emits:["update:modelValue"],setup(e,{emit:g}){const I=e,C=g,t=o.reactive({isPressed:!1,inputElement:I.modelValue}),i=o.computed(()=>[{pressed:t.isPressed,readonly:I.readonly,[I.type]:!0}]),A=()=>{C("update:modelValue",t.inputElement)},n=()=>{I.readonly||(t.isPressed=!0)},l=()=>{t.isPressed=!1};return o.watch(()=>I.modelValue,s=>{t.inputElement=s}),(s,a)=>(o.openBlock(),o.createElementBlock("fieldset",{class:o.normalizeClass(["input-yui-kit",i.value]),onFocusout:l,"data-testid":I.dataTestid},[I.inputMessage?(o.openBlock(),o.createElementBlock("legend",{key:0,class:"input-yui-kit__legend","data-testid":`${I.dataTestid}-Legend`},[o.createTextVNode(o.toDisplayString(I.inputMessage)+" ",1),I.required?(o.openBlock(),o.createElementBlock("sup",{key:0,class:"input-yui-kit__star","data-testid":`${I.dataTestid}-Legend-Star`},"*",8,_Qg)):o.createCommentVNode("",!0)],8,PQg)):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("textarea",{"onUpdate:modelValue":a[0]||(a[0]=d=>t.inputElement=d),onFocus:n,onInput:A,"data-testid":`${I.dataTestid}-Textarea`,class:"input-yui-kit__input",placeholder:I.placeholder,required:I.required,maxlength:I.maxlength,readonly:I.readonly},null,40,$Qg),[[o.vModelText,t.inputElement]])],42,EQg))}}),sN=Jg(qQg,[["__scopeId","data-v-ac7acfbd"]]);var aN=(e=>(e.img="img",e.pdf="pdf",e.docx="docx",e))(aN||{});const gUg=["data-testid"],IUg=["data-testid"],eUg=["src","alt","data-testid"],CUg=["src","data-testid"],tUg=["data-testid"],iUg=["data-testid"],AUg=["data-testid"],dN=Jg(o.defineComponent({__name:"Picture",props:{type:{},alt:{},url:{},caption:{},dataTestid:{default:"Picture"}},setup(e){const g=e,I=o.reactive({isLoad:!1,isError:!1}),C=o.computed(()=>I.isError?!1:!g.url||!g.type||g.type==aN.img?!0:lm(g.url)),t=()=>{I.isLoad=!0},i=()=>{I.isError=!0},A=()=>{I.isLoad=!1,I.isError=!1};return o.watch(()=>g.url,()=>{A()}),(n,l)=>(o.openBlock(),o.createElementBlock("figure",{class:"picture-yui-kit","data-testid":g.dataTestid},[g.type==o.unref(aN).img?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("picture",{class:"picture-yui-kit__picture","data-testid":`${g.dataTestid}-Picture`},[!I.isError&&g.url?(o.openBlock(),o.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,eUg)):(o.openBlock(),o.createElementBlock("img",{key:1,src:o.unref(Pn),alt:"not found",class:"picture-yui-kit__picture_image","data-testid":`${g.dataTestid}-Picture-Img`},null,8,CUg))],8,IUg),o.createElementVNode("figcaption",{class:"picture-yui-kit__picture__caption","data-testid":`${g.dataTestid}-Caption`},o.toDisplayString(g.caption),9,tUg)],64)):o.unref(lm)(g.url)?(o.openBlock(),o.createBlock(Ol,{key:1,class:"picture-yui-kit__picture_image",src:g.url,page:1,dataTestid:`${g.dataTestid}-PdfPreview`,onLoad:t},null,8,["src","dataTestid"])):(o.openBlock(),o.createElementBlock("div",{key:2,class:"picture-yui-kit__caption","data-testid":`${g.dataTestid}-Caption-Box`},[o.createElementVNode("h4",{class:"picture-yui-kit__caption__title","data-testid":`${g.dataTestid}-Caption-Title`},o.toDisplayString(g.caption),9,AUg)],8,iUg)),!I.isLoad&&C.value?(o.openBlock(),o.createBlock(O0,{key:3,class:"picture-yui-kit__loader"})):o.createCommentVNode("",!0)],8,gUg))}}),[["__scopeId","data-v-a93165dc"]]);var wp=(e=>(e.success="success",e.warning="warning",e.error="error",e.info="info",e))(wp||{}),dK=(e=>(e.success="Успешно",e.warning="Предупреждение",e.error="Ошибка",e.info="Уведомление",e))(dK||{}),cK=(e=>(e[e.success=ug.checkbox]="success",e[e.warning=ug.alertTriangle]="warning",e[e.error=ug.exitCircle]="error",e[e.info=ug.info]="info",e))(cK||{});const nUg=["id","data-testid"],lUg=["data-testid"],oUg=["data-testid"],sUg=["data-testid"],aUg=["data-testid"],dUg=o.defineComponent({__name:"Notification",props:{type:{default:wp.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=o.ref(null);ag(i,"toggle",()=>{C.timeout>0&&setTimeout(()=>{var s;return(s=i.value)==null?void 0:s.hidePopover()},C.timeout*1e3)});const A=()=>(t("close"),"hide"),n=()=>{var s;(s=i.value)==null||s.showPopover()},l=o.reactive({message:{icon:cK[C.type],title:C.title||dK[C.type],description:C.description}});return o.onMounted(()=>{var s;C.showPopover&&((s=i.value)==null||s.showPopover())}),g({showPopover:n}),(s,a)=>(o.openBlock(),o.createElementBlock("div",{popover:"manual",id:C.pushKey.toString(),class:o.normalizeClass(`push-notification-yui-kit push-notification-yui-kit_${C.type}`),"data-testid":C.dataTestid,ref_key:"popover",ref:i},[o.createElementVNode("div",{class:"notification-yui-kit","data-testid":`${C.dataTestid}-Notification`},[o.createElementVNode("div",{class:"notification-yui-kit__block","data-testid":`${C.dataTestid}-Notification-Block`},[o.createVNode(Mg,{name:l.message.icon,class:"notification-yui-kit__block-icon","data-testid":`${C.dataTestid}-Notification-Icon`},null,8,["name","data-testid"]),o.createElementVNode("h4",{class:"notification-yui-kit__block-title","data-testid":`${C.dataTestid}-Notification-Title`},o.toDisplayString(l.message.title),9,sUg),o.createElementVNode("span",{class:"notification-yui-kit__block-text","data-testid":`${C.dataTestid}-Notification-Description`},o.toDisplayString(l.message.description),9,aUg)],8,oUg),o.createVNode(zI,{class:"notification-yui-kit__exit",type:o.unref(VI).ghost,popovertarget:C.pushKey.toString(),popovertargetaction:A,"data-testid":`${C.dataTestid}-Notification-Button`},{default:o.withCtx(()=>[o.createVNode(Mg,{name:o.unref(ug).crossSmall,"data-testid":`${C.dataTestid}-Notification-Icon`},null,8,["name","data-testid"])]),_:1},8,["type","popovertarget","data-testid"])],8,lUg)],10,nUg))}}),cN=Jg(dUg,[["__scopeId","data-v-934d2cab"]]),rN=o.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]"),A=i.length?i[i.length-1]:null;A?A.append(t):document.body.append(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),t.remove()};return(C,t)=>(o.openBlock(),o.createBlock(Mg,{class:"copy-icon-yui-kit",name:o.unref(ug).copy,"data-testid":g.dataTestid,onClick:I},null,8,["name","data-testid"]))}}),cUg=["data-testid"],rUg=["data-testid"],mUg=["data-testid"],uUg=["data-testid"],hUg=["data-testid"],bUg=["data-testid"],ZUg=["data-testid"],GUg=["data-testid"],wUg=["data-testid"],WUg=["data-testid"],pUg=["data-testid"],BUg=["data-testid"],yUg=["data-testid"],YUg=["data-testid"],VUg=o.defineComponent({__name:"FilterTag",props:{title:{},iconName:{default:ug.filter},options:{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=o.reactive({isShow:!1,options:[]}),t=g,i=o.computed(()=>({"filter-yui-kit__wrapper":!0,"active-yui-kit":C.isShow})),A=()=>C.isShow=!C.isShow,n=()=>{C.isShow=!1},l=o.computed(()=>C.options.filter(u=>u.chose)),s=o.computed(()=>C.options.filter(u=>!u.chose)),a=u=>{I.disallowNull&&u.chose||(u.chose=!u.chose,I.multiply||(C.options=C.options.map(h=>({...h,chose:u.value===h.value&&u.chose}))),C.options.every(h=>h.chose)&&(C.options=C.options.map(h=>({...h,chose:!1}))),t("change",l.value.map(h=>h.value)),C.isShow=!1)},d=()=>{C.options=C.options.map(u=>({...u,chose:!1})),C.isShow=!1,t("change",[])},m=()=>{C.options=I.options.map(u=>({...u,chose:I.selectedValues.includes(u.value)})),C.options.every(u=>u.chose)&&(C.options=C.options.map(u=>({...u,chose:!1})))};return o.watch(()=>[I.options,I.selectedValues],m),o.watch(()=>I.selectedValues,m),o.onMounted(m),(u,h)=>o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"filter-yui-kit","data-testid":I.dataTestid},[o.createElementVNode("div",{class:o.normalizeClass(i.value),onClick:A,"data-testid":`${I.dataTestid}-Wrapper`},[I.iconName?(o.openBlock(),o.createBlock(Mg,{key:0,name:I.iconName,"data-testid":`${I.dataTestid}-Icon`},null,8,["name","data-testid"])):o.createCommentVNode("",!0),I.title?(o.openBlock(),o.createElementBlock("span",{key:1,"data-testid":`${I.dataTestid}-Title`},o.toDisplayString(I.title),9,mUg)):o.createCommentVNode("",!0),!l.value.length&&!I.disallowNull?(o.openBlock(),o.createBlock(st,{key:2,disabled:"",text:"Все","data-testid":`${I.dataTestid}-Badges-All`},null,8,["data-testid"])):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:3},o.renderList(l.value.filter((Z,G)=>G<I.maxShowCount),(Z,G)=>(o.openBlock(),o.createBlock(st,{key:Z.value,type:Z.type,disabled:"","data-testid":`${I.dataTestid}-Badges${G}`,text:Z.label},null,8,["type","data-testid","text"]))),128)),I.maxShowCount<l.value.length?(o.openBlock(),o.createElementBlock("div",{key:4,class:"filter-yui-kit__counter","data-testid":`${I.dataTestid}-MaxShowCount-Counter`},[o.createTextVNode(" +"+o.toDisplayString(l.value.length-I.maxShowCount)+" ",1),o.createElementVNode("div",{class:"filter-yui-kit__counter-content","data-testid":`${I.dataTestid}-MaxShowCount-Content`},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value.filter((Z,G)=>G>=I.maxShowCount),(Z,G)=>(o.openBlock(),o.createBlock(st,{key:Z.value,type:Z.type,disabled:"",text:Z.label,"data-testid":`${I.dataTestid}-MaxShow-Badges${G}`},null,8,["type","text","data-testid"]))),128))],8,hUg)],8,uUg)):o.createCommentVNode("",!0),I.showClearButton&&l.value.length>0?(o.openBlock(),o.createElementBlock("button",{key:5,type:"button",class:"filter-yui-kit__close",onClick:o.withModifiers(d,["stop"]),"data-testid":`${I.dataTestid}-Filter-CloseButton`},[o.createVNode(Mg,{name:o.unref(ug).crossSmall,"data-testid":`${I.dataTestid}-CloseButton-Icon`},null,8,["name","data-testid"])],8,bUg)):o.createCommentVNode("",!0)],10,rUg),C.isShow?(o.openBlock(),o.createElementBlock("div",{key:0,class:"filter-yui-kit__select-wrapper","data-testid":`${I.dataTestid}-Select-Wrapper`},[o.createElementVNode("ul",{class:"filter-yui-kit__select-list selected-yui-kit","data-testid":`${I.dataTestid}-Select-List`},[l.value.length?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${I.dataTestid}-Select-Item`},[o.createVNode(st,{disabled:"",text:"Все","data-testid":`${I.dataTestid}-Select-Badges`},null,8,["data-testid"])],8,wUg)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,(Z,G)=>(o.openBlock(),o.createElementBlock("li",{class:"filter-yui-kit__select-item",key:Z.value,"data-testid":`${I.dataTestid}-Select-Item${G}`},[o.createVNode(st,{disabled:!0,choosed:!I.disallowNull&&Z.chose,type:Z.type,onClick:w=>a(Z),text:Z.label,"data-testid":`${I.dataTestid}-Select-Badges${G}`},null,8,["choosed","type","onClick","text","data-testid"])],8,WUg))),128))],8,GUg),o.createElementVNode("div",{class:"filter-yui-kit__select__divider","data-testid":`${I.dataTestid}-Select-Divider`},null,8,pUg),C.isShow?(o.openBlock(),o.createElementBlock("ul",{key:0,class:"filter-yui-kit__select-list","data-testid":`${I.dataTestid}-Select-List`},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(Z,G)=>(o.openBlock(),o.createElementBlock("li",{class:"filter-yui-kit__select-item",key:Z.value,"data-testid":`${I.dataTestid}-Select-List${G}`},[o.createVNode(st,{disabled:!0,choosed:!1,type:Z.type,text:Z.label,"data-testid":`${I.dataTestid}-Select-Badges${G}`,onClick:w=>a(Z)},null,8,["type","text","data-testid","onClick"])],8,yUg))),128)),e.disallowNull?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("li",{key:0,class:"filter-yui-kit__select-item","data-testid":`${I.dataTestid}-Select-Item`},[l.value.length?(o.openBlock(),o.createBlock(st,{key:0,disabled:"","data-testid":`${I.dataTestid}-Select-Badges`,text:"Все",onClick:d},null,8,["data-testid"])):o.createCommentVNode("",!0)],8,YUg))],8,BUg)):o.createCommentVNode("",!0)],8,ZUg)):o.createCommentVNode("",!0)],8,cUg)),[[o.unref(Cd),n,void 0,{bubble:!0}]])}}),mN=Jg(VUg,[["__scopeId","data-v-c0eed368"]]),NUg=["data-testid"],MUg=["data-testid"],fUg=["data-testid"],RUg=["data-testid"],uN=Jg(o.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%,
1465
- 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?(o.openBlock(),o.createElementBlock("div",{key:0,class:"pie-chart","data-testid":`${g.dataTestid}-PieChart`},[o.createElementVNode("div",{class:"pie-chart-border",style:o.normalizeStyle({"border-color":g.percent<50?"var(--error-light-color)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Border`},[o.createElementVNode("div",{class:"sector",style:o.normalizeStyle({clipPath:I(),"background-color":g.percent<50?"var(--error-light-color)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Sector`},null,12,fUg)],12,MUg)],8,NUg)):(o.openBlock(),o.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]=[o.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),o.createElementVNode("circle",{cx:"8",cy:"8",r:"4",transform:"rotate(-180 8 8)",fill:"#3BC648"},null,-1),o.createElementVNode("path",{d:"M10 6L7.5 9.83935L6 8.5",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])],8,RUg))}}),[["__scopeId","data-v-393c7314"]]),XUg=["colspan","rowspan","data-testid"],hm=Jg(o.defineComponent({name:"TableTh",__name:"TableTh",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataHeader"}},setup(e){const g=e;return(I,C)=>(o.openBlock(),o.createElementBlock("th",{colspan:e.colspan,rowspan:e.rowspan,"data-testid":g.dataTestid,class:"table-th"},[o.renderSlot(I.$slots,"default",{},void 0,!0)],8,XUg))}}),[["__scopeId","data-v-0411515d"]]),HUg=["data-testid"],_0=Jg(o.defineComponent({name:"HeadTableRow",__name:"HeadTableRow",props:{dataTestid:{default:"TableRow"}},setup(e){const g=e;return(I,C)=>(o.openBlock(),o.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[o.renderSlot(I.$slots,"default",{},void 0,!0)],8,HUg))}}),[["__scopeId","data-v-1c6483fb"]]),rK=(e,g,I,C)=>{const t=o.ref(!1),i=o.ref(100);let A=0,n=0;const l=o.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),s=o.computed(()=>i.value<100),a=()=>{if(e.value){const w=e.value.clientWidth,p=e.value.scrollWidth;return w>=p?100:w/p*100}return 100},d=()=>{if(!e.value||!g.value||!I.value||!C.value)return;const{scrollLeft:w,scrollWidth:p,clientWidth:B}=e.value,y=p-B;if(y<=0)return;const Y=w/y,f=C.value.clientWidth,M=I.value.clientWidth,k=f-M,F=Y*k;requestAnimationFrame(()=>{g.value&&kI({"--scroll-bar-left-position":`${F}px`},g.value)})},m=w=>{!e.value||!g.value||(t.value=!0,A=w.clientX,n=e.value.scrollLeft,document.addEventListener("pointermove",u),document.addEventListener("pointerup",h,!0))},u=w=>{if(t.value&&e.value&&I.value){const p=w.clientX-A,B=(e.value.scrollWidth-e.value.clientWidth)/(e.value.clientWidth-I.value.clientWidth);e.value.scrollLeft=n+p*B,d()}},h=()=>{t.value=!1,document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",h,!0)};return{onDrag:u,onTrackClick:w=>{if(e.value&&I.value){const p=w.currentTarget.getBoundingClientRect(),B=w.clientX-p.left,y=I.value.clientWidth,Y=p.width;let f=(B-y/2)*((e.value.scrollWidth-e.value.clientWidth)/(Y-y));f=Math.max(0,Math.min(f,e.value.scrollWidth-e.value.clientWidth)),e.value.scrollLeft=f,d()}},startDrag:m,getPercentHorizontalView:a,changeBarPosition:d,isDragging:t,scrollHorizontalWidthPercent:i,setHorizontalBarWidth:()=>{if(!e.value||!g.value)return;const w=a();i.value=w,kI({"--scroll-horizontal-bar-width":`${w}%`},g.value)},horizontalTrackClass:l,isExistHorizontalTrack:s}},mK=(e,g,I,C)=>{const t=o.ref(!1),i=o.ref(100);let A=0,n=0;const l=o.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),s=o.computed(()=>i.value<100),a=()=>{if(e.value){const w=e.value.clientHeight,p=e.value.scrollHeight;if(w>=p)return 100;if(w<p)return w/p*100}return 100},d=()=>{if(!e.value||!g.value||!I.value||!C.value)return;const{scrollTop:w,scrollHeight:p,clientHeight:B}=e.value,y=p-B;if(y<=0)return;const Y=w/y,f=C.value.clientHeight,M=I.value.clientHeight,k=f-M,F=Y*k;requestAnimationFrame(()=>{g.value&&kI({"--scroll-bar-top-postion":`${F}px`},g.value)})},m=w=>{!e.value||!g.value||(t.value=!0,A=w.clientY,n=e.value.scrollTop,document.addEventListener("pointermove",u),document.addEventListener("pointerup",h))},u=w=>{if(t.value&&e.value&&I.value){const p=w.clientY-A,B=(e.value.scrollHeight-e.value.clientHeight)/(e.value.clientHeight-I.value.clientHeight);e.value.scrollTop=n+p*B,d()}},h=()=>{t.value=!1,document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",h)};return{onDrag:u,onTrackClick:w=>{if(e.value&&I.value){const p=w.currentTarget.getBoundingClientRect(),B=w.clientY-p.top,y=I.value.clientHeight,Y=p.height;let f=(B-y/2)*((e.value.scrollHeight-e.value.clientHeight)/(Y-y));f=Math.max(0,Math.min(f,e.value.scrollHeight-e.value.clientHeight)),e.value.scrollTop=f,d()}},startDrag:m,getProcentVerticalView:a,changeBarPosition:d,isDragging:t,scrollVerticalHeightProcent:i,setVerticalBarHeight:()=>{if(!e.value||!g.value)return;const w=a();i.value=w,kI({"--scroll-vertical-bar-height":`${w}%`},g.value)},verticalTrackClass:l,isExistVerticalTrack:s}},DUg={class:"scroll-wrapper__vertical-wrapper"},SUg={class:"scroll-wrapper__horizont-wrapper"},$0=Jg(o.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=o.ref(null),i=o.ref(null),A=o.ref(null),n=o.ref(null),l=o.ref(null),s=o.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:u,verticalTrackClass:h,isExistVerticalTrack:Z}=mK(t,i,n,A),{changeBarPosition:G,startDrag:w,onTrackClick:p,setHorizontalBarWidth:B,horizontalTrackClass:y,isExistHorizontalTrack:Y}=rK(t,i,s,l),f=U=>{m(),G(),C("unmount-scroll",U)},M=()=>{requestAnimationFrame(()=>{k(),F()})},k=()=>{if(!t.value||!i.value)return;const U=getComputedStyle(i.value),$=i.value.style.minHeight||U.minHeight,mg=i.value.style.maxHeight||U.maxHeight,og=i.value.style.height;kI({"--scroll-wrapper-height":`${og}`,"--scroll-wrapper-max-height":`${mg}`,"--scroll-wrapper-min-height":`${$}`},i.value)},F=()=>{u(),B(),m(),G()},X=()=>{t.value&&t.value.addEventListener("scroll",f)},z=()=>{t.value&&(t.value.scrollTop=0)},L=()=>{t.value&&(t.value.scrollHeight<=t.value.clientHeight?C("unmount-paginate",!0):C("unmount-paginate",!1))},Q=new MutationObserver(()=>{M(),L()}),Ig=new ResizeObserver(()=>{M(),L()}),ig=U=>{Q.observe(U,{childList:!0,subtree:!0,attributes:!0}),Ig.observe(U)};return g({scrollToTop:z,setHeightSlot:k,slotRef:t}),o.onMounted(()=>{M(),X(),i.value&&ig(i.value),A.value&&ig(A.value),window.addEventListener("resize",M),C("on-mounted")}),o.onUnmounted(()=>{window.removeEventListener("resize",M)}),(U,$)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[o.createElementVNode("div",DUg,[o.createElementVNode("div",SUg,[o.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[o.renderSlot(U.$slots,"default",{},void 0,!0)],512),o.unref(Y)||e.isShowHorizontalScroll?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:l,class:o.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",o.unref(y)]),onClick:$[1]||($[1]=o.withModifiers((...mg)=>o.unref(p)&&o.unref(p)(...mg),["self","prevent","left"]))},[o.createElementVNode("div",{ref_key:"horizontBarRef",ref:s,class:"scroll-wrapper__bar",onPointerdown:$[0]||($[0]=o.withModifiers((...mg)=>o.unref(w)&&o.unref(w)(...mg),["prevent","left"]))},null,544)],2)):o.createCommentVNode("",!0)]),o.unref(Z)||e.isShowVerticalScroll?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:o.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",o.unref(h)]),onClick:$[3]||($[3]=o.withModifiers((...mg)=>o.unref(a)&&o.unref(a)(...mg),["self","prevent","left"]))},[o.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onPointerdown:$[2]||($[2]=o.withModifiers((...mg)=>o.unref(d)&&o.unref(d)(...mg),["prevent","left"]))},null,544)],2)):o.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-854984d6"]]),kUg=["id","data-testid"],KUg=["id","data-testid"],FUg=["id","data-testid"],hN=Jg(o.defineComponent({name:"TableNew",__name:"Table",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},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=o.reactive({headHeight:0,maxColumnCount:0}),A=o.ref(null),n=o.ref(null),l=o.ref(null),s=o.ref(null),a=o.ref(null),d=y=>{t("unmount-scroll",y)},m=y=>t("unmount-paginate",y),u=()=>{if(!A.value||!a.value)return;const y=A.value.querySelector("thead");if(!y)return;const Y=y.getBoundingClientRect().height;i.headHeight=Y,kI({"--scroll-track-margin-top":`${Y}px`},a.value.$el)},h=()=>{a.value&&a.value.scrollToTop()},Z=()=>{if(a.value&&s.value){const y=getComputedStyle(a.value.$el),Y=Number(y.minHeight.replace(/\D/g,""));if(Y&&Y>0)return;kI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},G=()=>{let y=1;if(n.value){for(let Y=0;Y<n.value.children.length;Y++)y=Math.max(n.value.children[Y].children.length,y);i.maxColumnCount=y}},w=new MutationObserver(()=>{G()}),p=new ResizeObserver(()=>{u()});return g({scrollToTop:h,setHeightSlot:(B=a.value)==null?void 0:B.setHeightSlot,scrollWrapperRef:a,tbodyRef:l,tableRef:A,theadRef:n}),o.onMounted(()=>{u(),G(),window.addEventListener("resize",u),A.value&&p.observe(A.value),n.value&&w.observe(n.value,{childList:!0,subtree:!0}),Z()}),(y,Y)=>(o.openBlock(),o.createBlock($0,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,onUnmountPaginate:m,"is-show-vertical-scroll":C.isShowVerticalScroll,"is-show-horizontal-scroll":C.isShowHorizontalScroll,"data-testid":`${C.dataTestid}-ScrollWrapper`},{default:o.withCtx(()=>[o.createElementVNode("table",{ref_key:"tableRef",ref:A,id:C.tableId,class:"table__table","data-testid":`${C.dataTestid}`},[o.renderSlot(y.$slots,"default",{},()=>{var f;return[o.createElementVNode("colgroup",null,[o.renderSlot(y.$slots,"colspan",{},void 0,!0)]),y.$slots.head?(o.openBlock(),o.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,id:C.theadId,class:"table__head","data-testid":`${C.dataTestid}-Thead`},[o.renderSlot(y.$slots,"head",{},void 0,!0),y.$slots.search?(o.openBlock(),o.createBlock(_0,{key:0,class:"table__search-tr",id:(f=C.search)==null?void 0:f.rowId,ref_key:"searchRowRef",ref:s,"data-testid":`${C.dataTestid}-Search-Row`},{default:o.withCtx(()=>{var M;return[o.createVNode(hm,{colspan:C.columnCount||i.maxColumnCount,class:"table__search-th",id:(M=C.search)==null?void 0:M.headId,"data-testid":`${C.dataTestid}-SearchRow-Search`},{default:o.withCtx(()=>[o.renderSlot(y.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","id","data-testid"])]}),_:3},8,["id","data-testid"])):o.createCommentVNode("",!0)],8,KUg)):o.createCommentVNode("",!0),o.renderSlot(y.$slots,"body-group",{},()=>[y.$slots.body?(o.openBlock(),o.createElementBlock("tbody",{key:0,id:C.tbodyId,ref_key:"tbodyRef",ref:l,class:"table__body","data-testid":`${C.dataTestid}-Tbody`},[o.renderSlot(y.$slots,"body",{},void 0,!0)],8,FUg)):o.createCommentVNode("",!0)],!0)]},!0)],8,kUg)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-26ee537e"]]),zUg=["rowspan","colspan","data-testid"],q0=o.defineComponent({name:"TableTd",__name:"TableTd",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataCell"}},setup(e){const g=e;return(I,C)=>(o.openBlock(),o.createElementBlock("td",{rowspan:e.rowspan,colspan:e.colspan,class:"table-td","data-testid":g.dataTestid},[o.renderSlot(I.$slots,"default")],8,zUg))}}),JUg={class:"skeleton"},Wp=Jg(o.defineComponent({name:"Skeleton",__name:"Skeleton",setup(e){return(g,I)=>(o.openBlock(),o.createElementBlock("div",JUg))}}),[["__scopeId","data-v-6eb37767"]]),LUg=["data-testid"],pp=Jg(o.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=o.reactive({isShow:!g.isObserved,observer:null}),C=o.ref(null),t=o.computed(()=>[{"table-row_active":g.type==="selected","table-row_is-stub":g.isObserved}]),i=()=>{const n=new IntersectionObserver(l=>{l.forEach(s=>{s.isIntersecting&&(I.isShow=!0,n.unobserve(s.target))})},{root:g.scrolledElement,rootMargin:"600px"});return n},A=()=>{g.isObserved&&C.value&&(I.observer=i(),I.observer.observe(C.value))};return o.watch(()=>g.scrolledElement,()=>{var n;(n=I.observer)==null||n.disconnect(),A()}),o.onMounted(()=>{A()}),o.onUnmounted(()=>{var n;(n=I.observer)==null||n.disconnect()}),(n,l)=>(o.openBlock(),o.createElementBlock("tr",{ref_key:"row",ref:C,class:o.normalizeClass(["table-row",t.value]),"data-testid":g.dataTestid},[I.isShow?o.renderSlot(n.$slots,"default",{key:0},void 0,!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[n.$slots.skeleton?o.renderSlot(n.$slots,"skeleton",{key:0},void 0,!0):(o.openBlock(),o.createBlock(q0,{key:1,class:"table-row__td table-row__td_stub",colspan:g.colspan,rowspan:g.rowspan},{default:o.withCtx(()=>[o.createVNode(Wp,{class:"table-row__skeleton"})]),_:1},8,["colspan","rowspan"]))],64))],10,LUg))}}),[["__scopeId","data-v-703d9e37"]]),bN=Jg(o.defineComponent({name:"SectionTableRow",__name:"SectionTableRow",props:{colspan:{},dataTestid:{default:"SectionTableRow"}},setup(e){const g=e;return(I,C)=>(o.openBlock(),o.createBlock(pp,{class:"section-table-row","data-testid":g.dataTestid},{default:o.withCtx(()=>[o.createVNode(q0,{colspan:e.colspan,class:"section-table-row__td","data-testid":`${g.dataTestid}-DataCell`},{default:o.withCtx(()=>[o.renderSlot(I.$slots,"default",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"]))}}),[["__scopeId","data-v-35b23188"]]),TUg=["disabled","name","value","data-testid"],ZN=Jg(o.defineComponent({name:"Radio",__name:"Radio",props:o.mergeModels({name:{},value:{},disabled:{type:Boolean,default:!1},dataTestid:{default:"Radio"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const g=e,I=o.useModel(e,"modelValue");return(C,t)=>o.withDirectives((o.openBlock(),o.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,TUg)),[[o.vModelRadio,I.value]])}}),[["__scopeId","data-v-3db64c64"]]),vUg=["data-testid"],jUg=["data-testid"],uK=Jg(o.defineComponent({name:"ChoosenMiniOptions",__name:"ChoosenMiniOptions",props:{options:{},dataTestid:{default:"ChoosenMiniOptions"}},emits:["remove"],setup(e,{emit:g}){const I=e,C=g,t=i=>{C("remove",i)};return(i,A)=>(o.openBlock(),o.createElementBlock("div",{class:"choosen-mini-options","data-testid":I.dataTestid},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.options,(n,l)=>(o.openBlock(),o.createElementBlock("div",{key:n.key,class:"choosen-mini-options__option","data-testid":`${I.dataTestid}-Option-Item${l}`},[o.createVNode(st,{"data-testid":`${I.dataTestid}-Badge${l}`,type:o.unref(FI).blue,text:o.unref(oY)(n)?n.hint:n.value,class:"choosen-mini-options__badges",disabled:""},null,8,["data-testid","type","text"]),o.createVNode(Mg,{"data-testid":`${I.dataTestid}-Icon${l}`,name:o.unref(ug).crossLarge,width:10,height:10,class:"choosen-mini-options__cross",onClick:s=>t(n.key)},null,8,["data-testid","name","onClick"])],8,jUg))),128))],8,vUg))}}),[["__scopeId","data-v-03762d05"]]),xUg=["data-testid"],OUg=["data-testid"],QUg=["data-testid"],UUg=["data-testid"],EUg=["data-testid"],PUg=["data-testid"],GN=Jg(o.defineComponent({name:"BaseFilter",__name:"BaseFilter",props:o.mergeModels({options:{},title:{},isSearch:{type:Boolean,default:!1},isPosibleToClear:{type:Boolean,default:!1},isShowMiniOptions:{type:Boolean,default:!1},isUseAnchor:{type:Boolean,default:!0},isOpened:{type:Boolean,default:!1},tooltipPosition:{default:"top-center"},disabled:{type:Boolean,default:!1},onUnmountPagination:{},defaultOption:{default:"Выберите значение"},class:{},dataTestid:{default:"BaseFilter"}},{modelValue:{},modelModifiers:{}}),emits:o.mergeModels(["change","disabled-click","unmount-open","unmount-search","unmount-search-enter","unmount-pagination"],["update:modelValue"]),setup(e,{emit:g}){const I=e,C=o.reactive({isHovered:!1}),t=g,i=o.ref(null),A=o.ref(null),n=o.useModel(e,"modelValue"),l=o.ref(I.isOpened),s=o.computed(()=>[{filter_disabled:I.disabled},I.class]);o.watch(l,()=>{t("unmount-open",l.value),a.value=""}),o.watch(()=>I.isOpened,()=>{if(I.disabled){l.value=!1;return}l.value=I.isOpened}),o.watch(()=>I.onUnmountPagination,()=>{z()});const a=o.ref(""),d=o.computed(()=>{let L=[];return a.value?(Th(I.options)?L=I.options.filter(Q=>{var Ig;return Q.value.toLowerCase().includes(a.value.toLowerCase())||((Ig=Q==null?void 0:Q.hint)==null?void 0:Ig.toLowerCase().includes(a.value.toLowerCase()))}):L=I.options.filter(Q=>Q.value.toLowerCase().includes(a.value.toLowerCase())),L):(Th(I.options),L=I.options,L)}),m=o.computed(()=>{var Q;return((Q=I.options.find(Ig=>En.isArray(n.value)?n.value.includes(Ig.key):Ig.key===String(n.value)))==null?void 0:Q.value)||I.defaultOption}),u=o.computed(()=>I.options.filter(L=>En.isArray(n.value)?n.value.includes(L.key)&&L.value!==m.value:L.key===String(n.value))),h=o.computed(()=>I.options.filter(L=>En.isArray(n.value)?n.value.includes(L.key)&&L.value===m.value:L.key===String(n.value))),Z=o.computed(()=>{var Ig,ig,U;const L=I.options;let Q;return En.isArray(n.value)?Th(L)?Q=(Ig=L.find($=>$.value===m.value))==null?void 0:Ig.hint:Q=(ig=L.find($=>$.value===m.value))==null?void 0:ig.value:Q=(U=L.find($=>$.key===String(n.value)))==null?void 0:U.value,Q||""}),G=()=>{C.isHovered=!0},w=()=>{C.isHovered=!1},p=o.computed(()=>{var L;return Th(I.options)?C.isHovered&&!!Z.value:((L=i.value)==null?void 0:L.isSpanOverflow)||!1}),B=o.computed(()=>En.isArray(n.value)?I.isPosibleToClear&&n.value.length>0:I.isPosibleToClear&&n.value),y=o.computed(()=>En.isArray(n.value)&&n.value.length>1),Y=o.computed(()=>En.isArray(n.value)?n.value.length:null),f=L=>{t("disabled-click",L)},M=async L=>{if(I.disabled){l.value=!1;return}if(En.isArray(n.value))n.value.includes(L)?n.value=n.value.filter(Q=>Q!==L):n.value=[...n.value,L];else{let Q=I.options.find(Ig=>Ig.key===L);!Q&&Th(I.options)&&(Q=I.options.find(Ig=>Ig.hint===L)),n.value=(Q==null?void 0:Q.key)||"",l.value=!1}await o.nextTick(),t("change",String(n.value))},k=L=>{if(I.disabled){l.value=!1;return}l.value=L},F=async()=>{I.disabled||(En.isArray(n.value)?n.value=[]:n.value="",await o.nextTick(),t("change",n.value))},X=new IntersectionObserver(L=>{L.forEach(Q=>{Q.isIntersecting&&t("unmount-pagination")})}),z=()=>{A.value&&I.onUnmountPagination&&(X.unobserve(A.value),X.observe(A.value))};return o.onMounted(()=>{z()}),o.onUnmounted(()=>{X.disconnect()}),(L,Q)=>(o.openBlock(),o.createBlock(Sr,{"header-classes":"filter__header","options-classes":"filter__options","is-opened":l.value,class:o.normalizeClass(["filter",s.value]),"is-use-anchor":e.isUseAnchor,"data-testid":I.dataTestid,disabled:e.disabled,onChange:k},o.createSlots({header:o.withCtx(()=>[o.renderSlot(L.$slots,"header",{},()=>[o.createElementVNode("span",{class:o.normalizeClass(["filter__header-title",{"filter__header-title__active":l.value}]),"data-testid":`${I.dataTestid}-Title`},o.toDisplayString(e.title),11,xUg),o.createVNode(Hd,{position:e.tooltipPosition,type:"blue","is-can-show":p.value&&!(y.value&&e.isShowMiniOptions),hint:Z.value,"hint-gap":28,class:"filter__header-tooltip","data-testid":`${I.dataTestid}-Tooltip`},{default:o.withCtx(()=>[o.createVNode(st,{ref_key:"badgesRef",ref:i,type:e.disabled?o.unref(FI).disabled:m.value===I.defaultOption?o.unref(FI).default:o.unref(FI).blue,class:"filter__options-badge","data-testid":`${I.dataTestid}-Badge`,text:m.value,onMouseenter:G,onMouseleave:w,disabled:""},null,8,["type","data-testid","text"]),y.value&&e.isShowMiniOptions?(o.openBlock(),o.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Value`},[o.createVNode(uK,{"data-testid":`${I.dataTestid}-Filter-Value-MiniOptions`,onClick:Q[0]||(Q[0]=o.withModifiers(()=>{},["stop"])),options:h.value,onRemove:M},null,8,["data-testid","options"])],8,OUg)):o.createCommentVNode("",!0)]),_:1},8,["position","is-can-show","hint","data-testid"]),Y.value&&Y.value>1?(o.openBlock(),o.createElementBlock("span",{key:0,class:"filter__count","data-testid":`${I.dataTestid}-Filter-Count`},[o.createTextVNode(" +"+o.toDisplayString(Y.value-1)+" ",1),y.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Values`},[o.createVNode(uK,{onClick:Q[1]||(Q[1]=o.withModifiers(()=>{},["stop"])),options:u.value,onRemove:M,"data-testid":`${I.dataTestid}-MiniOptions`},null,8,["options","data-testid"])],8,UUg)):o.createCommentVNode("",!0)],8,QUg)):o.createCommentVNode("",!0),B.value?(o.openBlock(),o.createElementBlock("span",{key:1,class:"filter__cross",onClick:o.withModifiers(F,["stop"]),"data-testid":`${I.dataTestid}-Filter-Cross`},[o.createVNode(Mg,{name:o.unref(ug).crossLarge,width:16,height:16},null,8,["name"])],8,EUg)):o.createCommentVNode("",!0)],!0)]),options:o.withCtx(()=>[e.isSearch?(o.openBlock(),o.createBlock(G0,{key:0,modelValue:a.value,"onUpdate:modelValue":Q[2]||(Q[2]=Ig=>a.value=Ig),"show-history":!1,"data-testid":`${I.dataTestid}-Search`,onInput:Q[3]||(Q[3]=Ig=>L.$emit("unmount-search",Ig)),onEnter:Q[4]||(Q[4]=Ig=>L.$emit("unmount-search-enter",Ig))},null,8,["modelValue","data-testid"])):o.createCommentVNode("",!0),o.createVNode(sY,{"data-testid":`${I.dataTestid}-Options`,class:"filter__options-option",options:d.value,"default-option":m.value,onChange:M,onDisabledClick:f},{default:o.withCtx(()=>[o.createElementVNode("li",{class:"filter__options-underline","data-testid":`${I.dataTestid}-Underline`},[...Q[5]||(Q[5]=[o.createElementVNode("hr",{class:"filter__options-underline-hr"},null,-1)])],8,PUg)]),_:1},8,["data-testid","options","default-option"]),o.withDirectives(o.createElementVNode("div",{ref_key:"lastOptionRef",ref:A,class:"filter__last-option"},null,512),[[o.vShow,e.onUnmountPagination]])]),_:2},[L.$slots.body?{name:"body",fn:o.withCtx(Ig=>[o.renderSlot(L.$slots,"body",{closeOpenList:Ig.closeOpenList},void 0,!0)]),key:"0"}:void 0]),1032,["is-opened","class","is-use-anchor","data-testid","disabled"]))}}),[["__scopeId","data-v-45631066"]]),_Ug=["data-testid"],Bp=Jg(o.defineComponent({name:"Range",__name:"Range",props:o.mergeModels({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Range"}},{modelValue:{default:0},modelModifiers:{}}),emits:o.mergeModels(["unmount-change","unmount-input"],["update:modelValue"]),setup(e,{emit:g}){const I=e,C=g,t=o.useModel(e,"modelValue"),i=o.ref(null);o.watch(t,()=>{n()});const A=()=>(t.value-I.min)/(I.max-I.min)*100,n=()=>{requestAnimationFrame(()=>{i.value&&kI({"--progress":A()+"%"},i.value)})},l=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 o.onMounted(()=>{n()}),(a,d)=>o.withDirectives((o.openBlock(),o.createElementBlock("input",o.mergeProps({ref_key:"input",ref:i,type:"range"},I,{class:"range","onUpdate:modelValue":d[0]||(d[0]=m=>t.value=m),onChange:l,onInput:s,"data-testid":I.dataTestid}),null,16,_Ug)),[[o.vModelText,t.value]])}}),[["__scopeId","data-v-50ada1b8"]]),$Ug=["id","data-testid"],qUg=["data-testid"],g7g=["data-testid"],wN=Jg(o.defineComponent({name:"TableNew",__name:"TableNew",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},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 p;const C=e,t=I,i=o.reactive({headHeight:0,maxColumnCount:0}),A=o.ref(null),n=o.ref(null),l=o.ref(null),s=o.ref(null),a=o.ref(null),d=B=>{t("unmount-scroll",B)},m=()=>{if(!A.value||!a.value)return;const B=A.value.querySelector("thead");if(!B)return;const y=B.getBoundingClientRect().height;i.headHeight=y,kI({"--scroll-track-margin-top":`${y}px`},a.value.$el)},u=()=>{a.value&&a.value.scrollToTop()},h=()=>{if(a.value&&s.value){const B=getComputedStyle(a.value.$el),y=Number(B.minHeight.replace(/\D/g,""));if(y&&y>0)return;kI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},Z=()=>{let B=1;if(n.value){for(let y=0;y<n.value.children.length;y++)B=Math.max(n.value.children[y].children.length,B);i.maxColumnCount=B}},G=new MutationObserver(()=>{Z()}),w=new ResizeObserver(()=>{m()});return g({scrollToTop:u,setHeightSlot:(p=a.value)==null?void 0:p.setHeightSlot,tbodyRef:l,tableRef:A,theadRef:n}),o.onMounted(()=>{m(),Z(),window.addEventListener("resize",m),A.value&&w.observe(A.value),n.value&&G.observe(n.value,{childList:!0,subtree:!0}),h()}),(B,y)=>(o.openBlock(),o.createBlock($0,{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:o.withCtx(()=>[o.createElementVNode("table",{ref_key:"tableRef",ref:A,id:C.tableId,class:"table__table","data-testid":`${C.dataTestid}`},[o.renderSlot(B.$slots,"default",{},()=>[o.createElementVNode("colgroup",null,[o.renderSlot(B.$slots,"colspan",{},void 0,!0)]),B.$slots.head?(o.openBlock(),o.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,class:"table__head","data-testid":`${C.dataTestid}-Thead`},[o.renderSlot(B.$slots,"head",{},void 0,!0),B.$slots.search?(o.openBlock(),o.createBlock(_0,{key:0,class:"table__search-tr",ref_key:"searchRowRef",ref:s,"data-testid":`${C.dataTestid}-Search-Row`},{default:o.withCtx(()=>[o.createVNode(hm,{colspan:i.maxColumnCount,class:"table__search-th","data-testid":`${C.dataTestid}-SearchRow-Search`},{default:o.withCtx(()=>[o.renderSlot(B.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):o.createCommentVNode("",!0)],8,qUg)):o.createCommentVNode("",!0),o.renderSlot(B.$slots,"body-group",{},()=>[B.$slots.body?(o.openBlock(),o.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:l,class:"table__body","data-testid":`${C.dataTestid}-Tbody`},[o.renderSlot(B.$slots,"body",{},void 0,!0)],8,g7g)):o.createCommentVNode("",!0)],!0)],!0)],8,$Ug)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-30a389ed"]]),I7g=["data-testid"],WN=Jg(o.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=o.computed(()=>[{"table-row_active":g.type==="selected"}]);return(C,t)=>(o.openBlock(),o.createElementBlock("tr",{class:o.normalizeClass(["table-row",I.value]),"data-testid":g.dataTestid},[o.renderSlot(C.$slots,"default",{},void 0,!0)],10,I7g))}}),[["__scopeId","data-v-c22d3f55"]]),e7g=["data-testid"],yp=Jg(o.defineComponent({name:"HeadTableRow",__name:"HeadTableRowNew",props:{dataTestid:{default:"TableRow"}},setup(e){const g=e;return(I,C)=>(o.openBlock(),o.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[o.renderSlot(I.$slots,"default",{},void 0,!0)],8,e7g))}}),[["__scopeId","data-v-45b56a2a"]]),C7g={class:"scroll-wrapper__vertical-wrapper"},t7g={class:"scroll-wrapper__horizont-wrapper"},i7g=Jg(o.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=o.ref(null),i=o.ref(null),A=o.ref(null),n=o.ref(null),l=o.ref(null),s=o.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:u,verticalTrackClass:h,isExistVerticalTrack:Z}=mK(t,i,n,A),{changeBarPosition:G,startDrag:w,onTrackClick:p,setHorizontalBarWidth:B,horizontalTrackClass:y,isExistHorizontalTrack:Y}=rK(t,i,s,l),f=ig=>{m(),G(),C("unmount-scroll",ig)},M=()=>{requestAnimationFrame(()=>{k(),F()})},k=()=>{if(!t.value||!i.value)return;const ig=getComputedStyle(i.value),U=i.value.style.minHeight||ig.minHeight,$=i.value.style.maxHeight||ig.maxHeight,mg=i.value.style.height;kI({"--scroll-wrapper-height":`${mg}`,"--scroll-wrapper-max-height":`${$}`,"--scroll-wrapper-min-height":`${U}`},i.value)},F=()=>{u(),B(),m(),G()},X=()=>{t.value&&t.value.addEventListener("scroll",f)},z=()=>{t.value&&(t.value.scrollTop=0)},L=new MutationObserver(()=>{M()}),Q=new ResizeObserver(()=>{M()}),Ig=ig=>{L.observe(ig,{childList:!0,subtree:!0,attributes:!0}),Q.observe(ig)};return g({scrollToTop:z,setHeightSlot:k}),o.onMounted(()=>{M(),X(),i.value&&Ig(i.value),A.value&&Ig(A.value),window.addEventListener("resize",M),C("on-mounted")}),o.onUnmounted(()=>{window.removeEventListener("resize",M)}),(ig,U)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[o.createElementVNode("div",C7g,[o.createElementVNode("div",t7g,[o.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[o.renderSlot(ig.$slots,"default",{},void 0,!0)],512),o.unref(Y)||e.isShowHorizontalScroll?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:l,class:o.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",o.unref(y)]),onClick:U[1]||(U[1]=o.withModifiers((...$)=>o.unref(p)&&o.unref(p)(...$),["prevent","left"]))},[o.createElementVNode("div",{ref_key:"horizontBarRef",ref:s,class:"scroll-wrapper__bar",onMousedown:U[0]||(U[0]=o.withModifiers((...$)=>o.unref(w)&&o.unref(w)(...$),["prevent","left"]))},null,544)],2)):o.createCommentVNode("",!0)]),o.unref(Z)||e.isShowVerticalScroll?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:o.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",o.unref(h)]),onClick:U[3]||(U[3]=o.withModifiers((...$)=>o.unref(a)&&o.unref(a)(...$),["prevent","left"]))},[o.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onMousedown:U[2]||(U[2]=o.withModifiers((...$)=>o.unref(d)&&o.unref(d)(...$),["prevent","left"]))},null,544)],2)):o.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-411a6b7a"]]),A7g=["data-testid"],n7g=["data-testid"],l7g=["data-testid"],pN=Jg(o.defineComponent({name:"TableSimple",__name:"TableSimple",props:{dataTestid:{default:"TableSimple"}},setup(e,{expose:g}){const I=e,C=o.ref(null),t=o.ref(null),i=o.ref(null),A=o.ref(null),n=o.computed(()=>{let l=1;if(t.value)for(let s=0;s<t.value.children.length;s++)l=Math.max(t.value.children[s].children.length,l);return l});return g({tbodyRef:i,tableRef:C,theadRef:t}),(l,s)=>(o.openBlock(),o.createElementBlock("table",{ref_key:"tableRef",ref:C,class:"simple-table-yui-kit","data-testid":`${I.dataTestid}`},[o.renderSlot(l.$slots,"default",{},()=>[o.renderSlot(l.$slots,"colspan",{},void 0,!0),l.$slots.head?(o.openBlock(),o.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:t,class:"simple-table-yui-kit__head","data-testid":`${I.dataTestid}-Thead`},[o.renderSlot(l.$slots,"head",{},void 0,!0),l.$slots.search?(o.openBlock(),o.createBlock(yp,{key:0,class:"table-new-yui-kit__search",ref_key:"searchRowRef",ref:A,"data-testid":`${I.dataTestid}-Search-Row`},{default:o.withCtx(()=>[o.createVNode(hm,{colspan:n.value,class:"table-new-yui-kit__th","data-testid":`${I.dataTestid}-SearchRow-Search`},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):o.createCommentVNode("",!0)],8,n7g)):o.createCommentVNode("",!0),o.renderSlot(l.$slots,"body-group",{},()=>[l.$slots.body?(o.openBlock(),o.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:i,class:"simple-table-yui-kit__body","data-testid":`${I.dataTestid}-Tbody`},[o.renderSlot(l.$slots,"body",{},void 0,!0)],8,l7g)):o.createCommentVNode("",!0)],!0)],!0)],8,A7g))}}),[["__scopeId","data-v-eaeafe5b"]]),o7g=["data-testid"],s7g=["data-testid"],a7g=["onClick","data-testid"],d7g=["data-testid"],BN=Jg(o.defineComponent({name:"Tabs",__name:"Tabs",props:{defaultActiveTabId:{},tabCount:{},dataTestid:{default:"Tabs"}},emits:["unmount-tab"],setup(e,{emit:g}){const I=e,C=g,t=o.reactive({activeTab:1}),i=n=>Array.from({length:n},(l,s)=>s+1);o.watch(()=>I.defaultActiveTabId,()=>{I.defaultActiveTabId&&(t.activeTab=I.defaultActiveTabId)},{immediate:!0});const A=n=>{t.activeTab=n,C("unmount-tab",n)};return(n,l)=>(o.openBlock(),o.createElementBlock("div",{"data-testid":I.dataTestid,class:"tabs"},[o.createElementVNode("nav",{class:"tabs__navigation","data-testid":`${I.dataTestid}-Navigation`},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i(I.tabCount),s=>(o.openBlock(),o.createElementBlock("button",{key:s,onClick:a=>A(s),class:o.normalizeClass(["tabs__navigation-button",{active:t.activeTab===s}]),"data-testid":`${I.dataTestid}-Navigation-Button`},[o.renderSlot(n.$slots,`header${s}`,{},void 0,!0)],10,a7g))),128))],8,s7g),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i(I.tabCount),s=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:s},[t.activeTab===s?(o.openBlock(),o.createElementBlock("article",{key:0,"data-testid":`${I.dataTestid}-Content`,class:"tabs__navigation-content"},[o.renderSlot(n.$slots,`tab${s}`,{},void 0,!0)],8,d7g)):o.createCommentVNode("",!0)],64))),128))],8,o7g))}}),[["__scopeId","data-v-9a94dd67"]]);function EC(e){this.content=e}EC.prototype={constructor:EC,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 EC(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 EC(I)},addToStart:function(e,g){return new EC([e,g].concat(this.remove(e).content))},addToEnd:function(e,g){var I=this.remove(e).content.slice();return I.push(e,g),new EC(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 EC(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=EC.from(e),e.size?new EC(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=EC.from(e),e.size?new EC(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var g=this;e=EC.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}},EC.from=function(e){if(e instanceof EC)return e;var g=[];if(e)for(var I in e)g.push(I,e[I]);return new EC(g)};function hK(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){for(let A=0;t.text[A]==i.text[A];A++)I++;return I}if(t.content.size||i.content.size){let A=hK(t.content,i.content,I+1);if(A!=null)return A}I+=t.nodeSize}}function bK(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 A=e.child(--t),n=g.child(--i),l=A.nodeSize;if(A==n){I-=l,C-=l;continue}if(!A.sameMarkup(n))return{a:I,b:C};if(A.isText&&A.text!=n.text){let s=0,a=Math.min(A.text.length,n.text.length);for(;s<a&&A.text[A.text.length-s-1]==n.text[n.text.length-s-1];)s++,I--,C--;return{a:I,b:C}}if(A.content.size||n.content.size){let s=bK(A.content,n.content,I-1,C-1);if(s)return s}I-=l,C-=l}}let Bg=class Ci{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 A=0,n=0;n<I;A++){let l=this.content[A],s=n+l.nodeSize;if(s>g&&C(l,t+n,i||null,A)!==!1&&l.content.size){let a=n+1;l.nodesBetween(Math.max(0,g-a),Math.min(l.content.size,I-a),C,t+a)}n=s}}descendants(g){this.nodesBetween(0,this.size,g)}textBetween(g,I,C,t){let i="",A=!0;return this.nodesBetween(g,I,(n,l)=>{let s=n.isText?n.text.slice(Math.max(g,l)-l,I-l):n.isLeaf?t?typeof t=="function"?t(n):t:n.type.spec.leafText?n.type.spec.leafText(n):"":"";n.isBlock&&(n.isLeaf&&s||n.isTextblock)&&C&&(A?A=!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 Ci(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,A=0;A<I;i++){let n=this.content[i],l=A+n.nodeSize;l>g&&((A<g||l>I)&&(n.isText?n=n.cut(Math.max(0,g-A),Math.min(n.text.length,I-A)):n=n.cut(Math.max(0,g-A-1),Math.min(n.content.size,I-A-1))),C.push(n),t+=n.nodeSize),A=l}return new Ci(C,t)}cutByIndex(g,I){return g==I?Ci.empty:g==0&&I==this.content.length?this:new Ci(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 Ci(t,i)}addToStart(g){return new Ci([g].concat(this.content),this.size+g.nodeSize)}addToEnd(g){return new Ci(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 hK(this,g,I)}findDiffEnd(g,I=this.size,C=g.size){return bK(this,g,I,C)}findIndex(g){if(g==0)return Yp(0,g);if(g==this.size)return Yp(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?Yp(I+1,i):Yp(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 Ci.empty;if(!Array.isArray(I))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ci(I.map(g.nodeFromJSON))}static fromArray(g){if(!g.length)return Ci.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 Ci(I||g,C)}static from(g){if(!g)return Ci.empty;if(g instanceof Ci)return g;if(Array.isArray(g))return this.fromArray(g);if(g.attrs)return new Ci([g],g.nodeSize);throw new RangeError("Can not convert "+g+" to a Fragment"+(g.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};Bg.empty=new Bg([],0);const yN={index:0,offset:0};function Yp(e,g){return yN.index=e,yN.offset=g,yN}function Vp(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(!Vp(e[C],g[C]))return!1}else{for(let C in e)if(!(C in g)||!Vp(e[C],g[C]))return!1;for(let C in g)if(!(C in e))return!1}return!0}let oe=class _R{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&&Vp(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 _R.none;if(g instanceof _R)return[g];let I=g.slice();return I.sort((C,t)=>C.type.rank-t.type.rank),I}};oe.none=[];let Np=class extends Error{},zg=class Kh{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=GK(this.content,g+this.openStart,I);return C&&new Kh(C,this.openStart,this.openEnd)}removeBetween(g,I){return new Kh(ZK(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 Kh.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 Kh(Bg.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 Kh(g,C,t)}};zg.empty=new zg(Bg.empty,0,0);function ZK(e,g,I){let{index:C,offset:t}=e.findIndex(g),i=e.maybeChild(C),{index:A,offset:n}=e.findIndex(I);if(t==g||i.isText){if(n!=I&&!e.child(A).isText)throw new RangeError("Removing non-flat range");return e.cut(0,g).append(e.cut(I))}if(C!=A)throw new RangeError("Removing non-flat range");return e.replaceChild(C,i.copy(ZK(i.content,g-t-1,I-t-1)))}function GK(e,g,I,C){let{index:t,offset:i}=e.findIndex(g),A=e.maybeChild(t);if(i==g||A.isText)return C&&!C.canReplace(t,t,I)?null:e.cut(0,g).append(I).append(e.cut(g));let n=GK(A.content,g-i-1,I,A);return n&&e.replaceChild(t,A.copy(n))}function c7g(e,g,I){if(I.openStart>e.depth)throw new Np("Inserted content deeper than insertion position");if(e.depth-I.openStart!=g.depth-I.openEnd)throw new Np("Inconsistent open depths");return wK(e,g,I,0)}function wK(e,g,I,C){let t=e.index(C),i=e.node(C);if(t==g.index(C)&&C<e.depth-I.openStart){let A=wK(e,g,I,C+1);return i.copy(i.content.replaceChild(t,A))}else if(I.content.size)if(!I.openStart&&!I.openEnd&&e.depth==C&&g.depth==C){let A=e.parent,n=A.content;return kd(A,n.cut(0,e.parentOffset).append(I.content).append(n.cut(g.parentOffset)))}else{let{start:A,end:n}=r7g(I,e);return kd(i,pK(e,A,n,g,C))}else return kd(i,Mp(e,g,C))}function WK(e,g){if(!g.type.compatibleContent(e.type))throw new Np("Cannot join "+g.type.name+" onto "+e.type.name)}function YN(e,g,I){let C=e.node(I);return WK(C,g.node(I)),C}function Sd(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 gb(e,g,I,C){let t=(g||e).node(I),i=0,A=g?g.index(I):t.childCount;e&&(i=e.index(I),e.depth>I?i++:e.textOffset&&(Sd(e.nodeAfter,C),i++));for(let n=i;n<A;n++)Sd(t.child(n),C);g&&g.depth==I&&g.textOffset&&Sd(g.nodeBefore,C)}function kd(e,g){return e.type.checkContent(g),e.copy(g)}function pK(e,g,I,C,t){let i=e.depth>t&&YN(e,g,t+1),A=C.depth>t&&YN(I,C,t+1),n=[];return gb(null,e,t,n),i&&A&&g.index(t)==I.index(t)?(WK(i,A),Sd(kd(i,pK(e,g,I,C,t+1)),n)):(i&&Sd(kd(i,Mp(e,g,t+1)),n),gb(g,I,t,n),A&&Sd(kd(A,Mp(I,C,t+1)),n)),gb(C,null,t,n),new Bg(n)}function Mp(e,g,I){let C=[];if(gb(null,e,I,C),e.depth>I){let t=YN(e,g,I+1);Sd(kd(t,Mp(e,g,I+1)),C)}return gb(g,null,I,C),new Bg(C)}function r7g(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(Bg.from(t));return{start:t.resolveNoCache(e.openStart+I),end:t.resolveNoCache(t.content.size-e.openEnd-I)}}class Ib{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 oe.none;if(this.textOffset)return g.child(I).marks;let C=g.maybeChild(I-1),t=g.maybeChild(I);if(!C){let n=C;C=t,t=n}let i=C.marks;for(var A=0;A<i.length;A++)i[A].type.spec.inclusive===!1&&(!t||!i[A].isInSet(t.marks))&&(i=i[A--].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 fp(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 A=g;;){let{index:n,offset:l}=A.content.findIndex(i),s=i-l;if(C.push(A,n,t+l),!s||(A=A.child(n),A.isText))break;i=s-1,t+=l+1}return new Ib(I,C,i)}static resolveCached(g,I){let C=BK.get(g);if(C)for(let i=0;i<C.elts.length;i++){let A=C.elts[i];if(A.pos==I)return A}else BK.set(g,C=new m7g);let t=C.elts[C.i]=Ib.resolve(g,I);return C.i=(C.i+1)%u7g,t}}class m7g{constructor(){this.elts=[],this.i=0}}const u7g=12,BK=new WeakMap;class fp{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 h7g=Object.create(null);let Rs=class $R{constructor(g,I,C,t=oe.none){this.type=g,this.attrs=I,this.marks=t,this.content=C||Bg.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&&Vp(this.attrs,I||g.defaultAttrs||h7g)&&oe.sameSet(this.marks,C||oe.none)}copy(g=null){return g==this.content?this:new $R(this.type,this.attrs,g,this.marks)}mark(g){return g==this.marks?this:new $R(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 zg.empty;let t=this.resolve(g),i=this.resolve(I),A=C?0:t.sharedDepth(I),n=t.start(A),s=t.node(A).content.cut(t.pos-n,i.pos-n);return new zg(s,t.depth-A,i.depth-A)}replace(g,I,C){return c7g(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 Ib.resolveCached(this,g)}resolveNoCache(g){return Ib.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()+")"),yK(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=Bg.empty,t=0,i=C.childCount){let A=this.contentMatchAt(g).matchFragment(C,t,i),n=A&&A.matchFragment(this.content,I);if(!n||!n.validEnd)return!1;for(let l=t;l<i;l++)if(!this.type.allowsMarks(C.child(l).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),A=i&&i.matchFragment(this.content,I);return A?A.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=oe.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(!oe.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=Bg.fromJSON(g,I.content),i=g.nodeType(I.type).create(I.attrs,t,C);return i.type.checkAttrs(i.attrs),i}};Rs.prototype.text=void 0;class Rp extends Rs{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):yK(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(g,I){return this.text.slice(g,I)}get nodeSize(){return this.text.length}mark(g){return g==this.marks?this:new Rp(this.type,this.attrs,this.text,g)}withText(g){return g==this.text?this:new Rp(this.type,this.attrs,g,this.marks)}cut(g=0,I=this.text.length){return g==0&&I==this.text.length?this:this.withText(this.text.slice(g,I))}eq(g){return this.sameMarkup(g)&&this.text==g.text}toJSON(){let g=super.toJSON();return g.text=this.text,g}}function yK(e,g){for(let I=e.length-1;I>=0;I--)g=e[I].type.name+"("+g+")";return g}class Kd{constructor(g){this.validEnd=g,this.next=[],this.wrapCache=[]}static parse(g,I){let C=new b7g(g,I);if(C.next==null)return Kd.empty;let t=YK(C);C.next&&C.err("Unexpected trailing text");let i=y7g(B7g(t));return Y7g(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(A,n){let l=A.matchFragment(g,C);if(l&&(!I||l.validEnd))return Bg.from(n.map(s=>s.createAndFill()));for(let s=0;s<A.next.length;s++){let{type:a,next:d}=A.next[s];if(!(a.isText||a.hasRequiredAttrs())&&t.indexOf(d)==-1){t.push(d);let m=i(d,n.concat(a));if(m)return m}}return null}return i(this,[])}findWrapping(g){for(let C=0;C<this.wrapCache.length;C+=2)if(this.wrapCache[C]==g)return this.wrapCache[C+1];let I=this.computeWrapping(g);return this.wrapCache.push(g,I),I}computeWrapping(g){let I=Object.create(null),C=[{match:this,type:null,via:null}];for(;C.length;){let t=C.shift(),i=t.match;if(i.matchType(g)){let A=[];for(let n=t;n.type;n=n.via)A.push(n.type);return A.reverse()}for(let A=0;A<i.next.length;A++){let{type:n,next:l}=i.next[A];!n.isLeaf&&!n.hasRequiredAttrs()&&!(n.name in I)&&(!t.type||l.validEnd)&&(C.push({match:n.contentMatch,type:n,via:t}),I[n.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 A=0;A<C.next.length;A++)i+=(A?", ":"")+C.next[A].type.name+"->"+g.indexOf(C.next[A].next);return i}).join(`
1465
+ 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?(o.openBlock(),o.createElementBlock("div",{key:0,class:"pie-chart","data-testid":`${g.dataTestid}-PieChart`},[o.createElementVNode("div",{class:"pie-chart-border",style:o.normalizeStyle({"border-color":g.percent<50?"var(--error-light-color)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Border`},[o.createElementVNode("div",{class:"sector",style:o.normalizeStyle({clipPath:I(),"background-color":g.percent<50?"var(--error-light-color)":"var(--orange-color)"}),"data-testid":`${g.dataTestid}-PieChart-Sector`},null,12,fUg)],12,MUg)],8,NUg)):(o.openBlock(),o.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]=[o.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),o.createElementVNode("circle",{cx:"8",cy:"8",r:"4",transform:"rotate(-180 8 8)",fill:"#3BC648"},null,-1),o.createElementVNode("path",{d:"M10 6L7.5 9.83935L6 8.5",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])],8,RUg))}}),[["__scopeId","data-v-393c7314"]]),XUg=["colspan","rowspan","data-testid"],hm=Jg(o.defineComponent({name:"TableTh",__name:"TableTh",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataHeader"}},setup(e){const g=e;return(I,C)=>(o.openBlock(),o.createElementBlock("th",{colspan:e.colspan,rowspan:e.rowspan,"data-testid":g.dataTestid,class:"table-th"},[o.renderSlot(I.$slots,"default",{},void 0,!0)],8,XUg))}}),[["__scopeId","data-v-0411515d"]]),HUg=["data-testid"],_0=Jg(o.defineComponent({name:"HeadTableRow",__name:"HeadTableRow",props:{dataTestid:{default:"TableRow"}},setup(e){const g=e;return(I,C)=>(o.openBlock(),o.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[o.renderSlot(I.$slots,"default",{},void 0,!0)],8,HUg))}}),[["__scopeId","data-v-1c6483fb"]]),rK=(e,g,I,C)=>{const t=o.ref(!1),i=o.ref(100);let A=0,n=0;const l=o.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),s=o.computed(()=>i.value<100),a=()=>{if(e.value){const w=e.value.clientWidth,p=e.value.scrollWidth;return w>=p?100:w/p*100}return 100},d=()=>{if(!e.value||!g.value||!I.value||!C.value)return;const{scrollLeft:w,scrollWidth:p,clientWidth:B}=e.value,y=p-B;if(y<=0)return;const Y=w/y,f=C.value.clientWidth,M=I.value.clientWidth,k=f-M,F=Y*k;requestAnimationFrame(()=>{g.value&&kI({"--scroll-bar-left-position":`${F}px`},g.value)})},m=w=>{!e.value||!g.value||(t.value=!0,A=w.clientX,n=e.value.scrollLeft,document.addEventListener("pointermove",u),document.addEventListener("pointerup",h,!0))},u=w=>{if(t.value&&e.value&&I.value){const p=w.clientX-A,B=(e.value.scrollWidth-e.value.clientWidth)/(e.value.clientWidth-I.value.clientWidth);e.value.scrollLeft=n+p*B,d()}},h=()=>{t.value=!1,document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",h,!0)};return{onDrag:u,onTrackClick:w=>{if(e.value&&I.value){const p=w.currentTarget.getBoundingClientRect(),B=w.clientX-p.left,y=I.value.clientWidth,Y=p.width;let f=(B-y/2)*((e.value.scrollWidth-e.value.clientWidth)/(Y-y));f=Math.max(0,Math.min(f,e.value.scrollWidth-e.value.clientWidth)),e.value.scrollLeft=f,d()}},startDrag:m,getPercentHorizontalView:a,changeBarPosition:d,isDragging:t,scrollHorizontalWidthPercent:i,setHorizontalBarWidth:()=>{if(!e.value||!g.value)return;const w=a();i.value=w,kI({"--scroll-horizontal-bar-width":`${w}%`},g.value)},horizontalTrackClass:l,isExistHorizontalTrack:s}},mK=(e,g,I,C)=>{const t=o.ref(!1),i=o.ref(100);let A=0,n=0;const l=o.computed(()=>[{"scroll-wrapper__track_hide":i.value===100,"scroll-wrapper__track_drag":t.value}]),s=o.computed(()=>i.value<100),a=()=>{if(e.value){const w=e.value.clientHeight,p=e.value.scrollHeight;if(w>=p)return 100;if(w<p)return w/p*100}return 100},d=()=>{if(!e.value||!g.value||!I.value||!C.value)return;const{scrollTop:w,scrollHeight:p,clientHeight:B}=e.value,y=p-B;if(y<=0)return;const Y=w/y,f=C.value.clientHeight,M=I.value.clientHeight,k=f-M,F=Y*k;requestAnimationFrame(()=>{g.value&&kI({"--scroll-bar-top-postion":`${F}px`},g.value)})},m=w=>{!e.value||!g.value||(t.value=!0,A=w.clientY,n=e.value.scrollTop,document.addEventListener("pointermove",u),document.addEventListener("pointerup",h))},u=w=>{if(t.value&&e.value&&I.value){const p=w.clientY-A,B=(e.value.scrollHeight-e.value.clientHeight)/(e.value.clientHeight-I.value.clientHeight);e.value.scrollTop=n+p*B,d()}},h=()=>{t.value=!1,document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",h)};return{onDrag:u,onTrackClick:w=>{if(e.value&&I.value){const p=w.currentTarget.getBoundingClientRect(),B=w.clientY-p.top,y=I.value.clientHeight,Y=p.height;let f=(B-y/2)*((e.value.scrollHeight-e.value.clientHeight)/(Y-y));f=Math.max(0,Math.min(f,e.value.scrollHeight-e.value.clientHeight)),e.value.scrollTop=f,d()}},startDrag:m,getProcentVerticalView:a,changeBarPosition:d,isDragging:t,scrollVerticalHeightProcent:i,setVerticalBarHeight:()=>{if(!e.value||!g.value)return;const w=a();i.value=w,kI({"--scroll-vertical-bar-height":`${w}%`},g.value)},verticalTrackClass:l,isExistVerticalTrack:s}},DUg={class:"scroll-wrapper__vertical-wrapper"},SUg={class:"scroll-wrapper__horizont-wrapper"},$0=Jg(o.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=o.ref(null),i=o.ref(null),A=o.ref(null),n=o.ref(null),l=o.ref(null),s=o.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:u,verticalTrackClass:h,isExistVerticalTrack:Z}=mK(t,i,n,A),{changeBarPosition:G,startDrag:w,onTrackClick:p,setHorizontalBarWidth:B,horizontalTrackClass:y,isExistHorizontalTrack:Y}=rK(t,i,s,l),f=U=>{m(),G(),C("unmount-scroll",U)},M=()=>{requestAnimationFrame(()=>{k(),F()})},k=()=>{if(!t.value||!i.value)return;const U=getComputedStyle(i.value),$=i.value.style.minHeight||U.minHeight,mg=i.value.style.maxHeight||U.maxHeight,og=i.value.style.height;kI({"--scroll-wrapper-height":`${og}`,"--scroll-wrapper-max-height":`${mg}`,"--scroll-wrapper-min-height":`${$}`},i.value)},F=()=>{u(),B(),m(),G()},X=()=>{t.value&&t.value.addEventListener("scroll",f)},z=()=>{t.value&&(t.value.scrollTop=0)},L=()=>{t.value&&(t.value.scrollHeight<=t.value.clientHeight?C("unmount-paginate",!0):C("unmount-paginate",!1))},Q=new MutationObserver(()=>{M(),L()}),Ig=new ResizeObserver(()=>{M(),L()}),ig=U=>{Q.observe(U,{childList:!0,subtree:!0,attributes:!0}),Ig.observe(U)};return g({scrollToTop:z,setHeightSlot:k,slotRef:t}),o.onMounted(()=>{M(),X(),i.value&&ig(i.value),A.value&&ig(A.value),window.addEventListener("resize",M),C("on-mounted")}),o.onUnmounted(()=>{window.removeEventListener("resize",M)}),(U,$)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[o.createElementVNode("div",DUg,[o.createElementVNode("div",SUg,[o.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[o.renderSlot(U.$slots,"default",{},void 0,!0)],512),o.unref(Y)||e.isShowHorizontalScroll?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:l,class:o.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",o.unref(y)]),onClick:$[1]||($[1]=o.withModifiers((...mg)=>o.unref(p)&&o.unref(p)(...mg),["self","prevent","left"]))},[o.createElementVNode("div",{ref_key:"horizontBarRef",ref:s,class:"scroll-wrapper__bar",onPointerdown:$[0]||($[0]=o.withModifiers((...mg)=>o.unref(w)&&o.unref(w)(...mg),["prevent","left"]))},null,544)],2)):o.createCommentVNode("",!0)]),o.unref(Z)||e.isShowVerticalScroll?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:o.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",o.unref(h)]),onClick:$[3]||($[3]=o.withModifiers((...mg)=>o.unref(a)&&o.unref(a)(...mg),["self","prevent","left"]))},[o.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onPointerdown:$[2]||($[2]=o.withModifiers((...mg)=>o.unref(d)&&o.unref(d)(...mg),["prevent","left"]))},null,544)],2)):o.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-854984d6"]]),kUg=["id","data-testid"],KUg=["id","data-testid"],FUg=["id","data-testid"],hN=Jg(o.defineComponent({name:"TableNew",__name:"Table",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},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=o.reactive({headHeight:0,maxColumnCount:0}),A=o.ref(null),n=o.ref(null),l=o.ref(null),s=o.ref(null),a=o.ref(null),d=y=>{t("unmount-scroll",y)},m=y=>t("unmount-paginate",y),u=()=>{if(!A.value||!a.value)return;const y=A.value.querySelector("thead");if(!y)return;const Y=y.getBoundingClientRect().height;i.headHeight=Y,kI({"--scroll-track-margin-top":`${Y}px`},a.value.$el)},h=()=>{a.value&&a.value.scrollToTop()},Z=()=>{if(a.value&&s.value){const y=getComputedStyle(a.value.$el),Y=Number(y.minHeight.replace(/\D/g,""));if(Y&&Y>0)return;kI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},G=()=>{let y=1;if(n.value){for(let Y=0;Y<n.value.children.length;Y++)y=Math.max(n.value.children[Y].children.length,y);i.maxColumnCount=y}},w=new MutationObserver(()=>{G()}),p=new ResizeObserver(()=>{u()});return g({scrollToTop:h,setHeightSlot:(B=a.value)==null?void 0:B.setHeightSlot,scrollWrapperRef:a,tbodyRef:l,tableRef:A,theadRef:n}),o.onMounted(()=>{u(),G(),window.addEventListener("resize",u),A.value&&p.observe(A.value),n.value&&w.observe(n.value,{childList:!0,subtree:!0}),Z()}),(y,Y)=>(o.openBlock(),o.createBlock($0,{ref_key:"scrollWrapperRef",ref:a,class:"table",onUnmountScroll:d,onUnmountPaginate:m,"is-show-vertical-scroll":C.isShowVerticalScroll,"is-show-horizontal-scroll":C.isShowHorizontalScroll,"data-testid":`${C.dataTestid}-ScrollWrapper`},{default:o.withCtx(()=>[o.createElementVNode("table",{ref_key:"tableRef",ref:A,id:C.tableId,class:"table__table","data-testid":`${C.dataTestid}`},[o.renderSlot(y.$slots,"default",{},()=>{var f;return[o.createElementVNode("colgroup",null,[o.renderSlot(y.$slots,"colspan",{},void 0,!0)]),y.$slots.head?(o.openBlock(),o.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,id:C.theadId,class:"table__head","data-testid":`${C.dataTestid}-Thead`},[o.renderSlot(y.$slots,"head",{},void 0,!0),y.$slots.search?(o.openBlock(),o.createBlock(_0,{key:0,class:"table__search-tr",id:(f=C.search)==null?void 0:f.rowId,ref_key:"searchRowRef",ref:s,"data-testid":`${C.dataTestid}-Search-Row`},{default:o.withCtx(()=>{var M;return[o.createVNode(hm,{colspan:C.columnCount||i.maxColumnCount,class:"table__search-th",id:(M=C.search)==null?void 0:M.headId,"data-testid":`${C.dataTestid}-SearchRow-Search`},{default:o.withCtx(()=>[o.renderSlot(y.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","id","data-testid"])]}),_:3},8,["id","data-testid"])):o.createCommentVNode("",!0)],8,KUg)):o.createCommentVNode("",!0),o.renderSlot(y.$slots,"body-group",{},()=>[y.$slots.body?(o.openBlock(),o.createElementBlock("tbody",{key:0,id:C.tbodyId,ref_key:"tbodyRef",ref:l,class:"table__body","data-testid":`${C.dataTestid}-Tbody`},[o.renderSlot(y.$slots,"body",{},void 0,!0)],8,FUg)):o.createCommentVNode("",!0)],!0)]},!0)],8,kUg)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-adadb414"]]),zUg=["rowspan","colspan","data-testid"],q0=o.defineComponent({name:"TableTd",__name:"TableTd",props:{colspan:{default:1},rowspan:{default:1},dataTestid:{default:"DataCell"}},setup(e){const g=e;return(I,C)=>(o.openBlock(),o.createElementBlock("td",{rowspan:e.rowspan,colspan:e.colspan,class:"table-td","data-testid":g.dataTestid},[o.renderSlot(I.$slots,"default")],8,zUg))}}),JUg={class:"skeleton"},Wp=Jg(o.defineComponent({name:"Skeleton",__name:"Skeleton",setup(e){return(g,I)=>(o.openBlock(),o.createElementBlock("div",JUg))}}),[["__scopeId","data-v-6eb37767"]]),LUg=["data-testid"],pp=Jg(o.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=o.reactive({isShow:!g.isObserved,observer:null}),C=o.ref(null),t=o.computed(()=>[{"table-row_active":g.type==="selected","table-row_is-stub":g.isObserved}]),i=()=>{const n=new IntersectionObserver(l=>{l.forEach(s=>{s.isIntersecting&&(I.isShow=!0,n.unobserve(s.target))})},{root:g.scrolledElement,rootMargin:"600px"});return n},A=()=>{g.isObserved&&C.value&&(I.observer=i(),I.observer.observe(C.value))};return o.watch(()=>g.scrolledElement,()=>{var n;(n=I.observer)==null||n.disconnect(),A()}),o.onMounted(()=>{A()}),o.onUnmounted(()=>{var n;(n=I.observer)==null||n.disconnect()}),(n,l)=>(o.openBlock(),o.createElementBlock("tr",{ref_key:"row",ref:C,class:o.normalizeClass(["table-row",t.value]),"data-testid":g.dataTestid},[I.isShow?o.renderSlot(n.$slots,"default",{key:0},void 0,!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[n.$slots.skeleton?o.renderSlot(n.$slots,"skeleton",{key:0},void 0,!0):(o.openBlock(),o.createBlock(q0,{key:1,class:"table-row__td table-row__td_stub",colspan:g.colspan,rowspan:g.rowspan},{default:o.withCtx(()=>[o.createVNode(Wp,{class:"table-row__skeleton"})]),_:1},8,["colspan","rowspan"]))],64))],10,LUg))}}),[["__scopeId","data-v-703d9e37"]]),bN=Jg(o.defineComponent({name:"SectionTableRow",__name:"SectionTableRow",props:{colspan:{},dataTestid:{default:"SectionTableRow"}},setup(e){const g=e;return(I,C)=>(o.openBlock(),o.createBlock(pp,{class:"section-table-row","data-testid":g.dataTestid},{default:o.withCtx(()=>[o.createVNode(q0,{colspan:e.colspan,class:"section-table-row__td","data-testid":`${g.dataTestid}-DataCell`},{default:o.withCtx(()=>[o.renderSlot(I.$slots,"default",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"]))}}),[["__scopeId","data-v-35b23188"]]),TUg=["disabled","name","value","data-testid"],ZN=Jg(o.defineComponent({name:"Radio",__name:"Radio",props:o.mergeModels({name:{},value:{},disabled:{type:Boolean,default:!1},dataTestid:{default:"Radio"}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const g=e,I=o.useModel(e,"modelValue");return(C,t)=>o.withDirectives((o.openBlock(),o.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,TUg)),[[o.vModelRadio,I.value]])}}),[["__scopeId","data-v-3db64c64"]]),vUg=["data-testid"],jUg=["data-testid"],uK=Jg(o.defineComponent({name:"ChoosenMiniOptions",__name:"ChoosenMiniOptions",props:{options:{},dataTestid:{default:"ChoosenMiniOptions"}},emits:["remove"],setup(e,{emit:g}){const I=e,C=g,t=i=>{C("remove",i)};return(i,A)=>(o.openBlock(),o.createElementBlock("div",{class:"choosen-mini-options","data-testid":I.dataTestid},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.options,(n,l)=>(o.openBlock(),o.createElementBlock("div",{key:n.key,class:"choosen-mini-options__option","data-testid":`${I.dataTestid}-Option-Item${l}`},[o.createVNode(st,{"data-testid":`${I.dataTestid}-Badge${l}`,type:o.unref(FI).blue,text:o.unref(oY)(n)?n.hint:n.value,class:"choosen-mini-options__badges",disabled:""},null,8,["data-testid","type","text"]),o.createVNode(Mg,{"data-testid":`${I.dataTestid}-Icon${l}`,name:o.unref(ug).crossLarge,width:10,height:10,class:"choosen-mini-options__cross",onClick:s=>t(n.key)},null,8,["data-testid","name","onClick"])],8,jUg))),128))],8,vUg))}}),[["__scopeId","data-v-03762d05"]]),xUg=["data-testid"],OUg=["data-testid"],QUg=["data-testid"],UUg=["data-testid"],EUg=["data-testid"],PUg=["data-testid"],GN=Jg(o.defineComponent({name:"BaseFilter",__name:"BaseFilter",props:o.mergeModels({options:{},title:{},isSearch:{type:Boolean,default:!1},isPosibleToClear:{type:Boolean,default:!1},isShowMiniOptions:{type:Boolean,default:!1},isUseAnchor:{type:Boolean,default:!0},isOpened:{type:Boolean,default:!1},tooltipPosition:{default:"top-center"},disabled:{type:Boolean,default:!1},onUnmountPagination:{},defaultOption:{default:"Выберите значение"},class:{},dataTestid:{default:"BaseFilter"}},{modelValue:{},modelModifiers:{}}),emits:o.mergeModels(["change","disabled-click","unmount-open","unmount-search","unmount-search-enter","unmount-pagination"],["update:modelValue"]),setup(e,{emit:g}){const I=e,C=o.reactive({isHovered:!1}),t=g,i=o.ref(null),A=o.ref(null),n=o.useModel(e,"modelValue"),l=o.ref(I.isOpened),s=o.computed(()=>[{filter_disabled:I.disabled},I.class]);o.watch(l,()=>{t("unmount-open",l.value),a.value=""}),o.watch(()=>I.isOpened,()=>{if(I.disabled){l.value=!1;return}l.value=I.isOpened}),o.watch(()=>I.onUnmountPagination,()=>{z()});const a=o.ref(""),d=o.computed(()=>{let L=[];return a.value?(Th(I.options)?L=I.options.filter(Q=>{var Ig;return Q.value.toLowerCase().includes(a.value.toLowerCase())||((Ig=Q==null?void 0:Q.hint)==null?void 0:Ig.toLowerCase().includes(a.value.toLowerCase()))}):L=I.options.filter(Q=>Q.value.toLowerCase().includes(a.value.toLowerCase())),L):(Th(I.options),L=I.options,L)}),m=o.computed(()=>{var Q;return((Q=I.options.find(Ig=>En.isArray(n.value)?n.value.includes(Ig.key):Ig.key===String(n.value)))==null?void 0:Q.value)||I.defaultOption}),u=o.computed(()=>I.options.filter(L=>En.isArray(n.value)?n.value.includes(L.key)&&L.value!==m.value:L.key===String(n.value))),h=o.computed(()=>I.options.filter(L=>En.isArray(n.value)?n.value.includes(L.key)&&L.value===m.value:L.key===String(n.value))),Z=o.computed(()=>{var Ig,ig,U;const L=I.options;let Q;return En.isArray(n.value)?Th(L)?Q=(Ig=L.find($=>$.value===m.value))==null?void 0:Ig.hint:Q=(ig=L.find($=>$.value===m.value))==null?void 0:ig.value:Q=(U=L.find($=>$.key===String(n.value)))==null?void 0:U.value,Q||""}),G=()=>{C.isHovered=!0},w=()=>{C.isHovered=!1},p=o.computed(()=>{var L;return Th(I.options)?C.isHovered&&!!Z.value:((L=i.value)==null?void 0:L.isSpanOverflow)||!1}),B=o.computed(()=>En.isArray(n.value)?I.isPosibleToClear&&n.value.length>0:I.isPosibleToClear&&n.value),y=o.computed(()=>En.isArray(n.value)&&n.value.length>1),Y=o.computed(()=>En.isArray(n.value)?n.value.length:null),f=L=>{t("disabled-click",L)},M=async L=>{if(I.disabled){l.value=!1;return}if(En.isArray(n.value))n.value.includes(L)?n.value=n.value.filter(Q=>Q!==L):n.value=[...n.value,L];else{let Q=I.options.find(Ig=>Ig.key===L);!Q&&Th(I.options)&&(Q=I.options.find(Ig=>Ig.hint===L)),n.value=(Q==null?void 0:Q.key)||"",l.value=!1}await o.nextTick(),t("change",String(n.value))},k=L=>{if(I.disabled){l.value=!1;return}l.value=L},F=async()=>{I.disabled||(En.isArray(n.value)?n.value=[]:n.value="",await o.nextTick(),t("change",n.value))},X=new IntersectionObserver(L=>{L.forEach(Q=>{Q.isIntersecting&&t("unmount-pagination")})}),z=()=>{A.value&&I.onUnmountPagination&&(X.unobserve(A.value),X.observe(A.value))};return o.onMounted(()=>{z()}),o.onUnmounted(()=>{X.disconnect()}),(L,Q)=>(o.openBlock(),o.createBlock(Sr,{"header-classes":"filter__header","options-classes":"filter__options","is-opened":l.value,class:o.normalizeClass(["filter",s.value]),"is-use-anchor":e.isUseAnchor,"data-testid":I.dataTestid,disabled:e.disabled,onChange:k},o.createSlots({header:o.withCtx(()=>[o.renderSlot(L.$slots,"header",{},()=>[o.createElementVNode("span",{class:o.normalizeClass(["filter__header-title",{"filter__header-title__active":l.value}]),"data-testid":`${I.dataTestid}-Title`},o.toDisplayString(e.title),11,xUg),o.createVNode(Hd,{position:e.tooltipPosition,type:"blue","is-can-show":p.value&&!(y.value&&e.isShowMiniOptions),hint:Z.value,"hint-gap":28,class:"filter__header-tooltip","data-testid":`${I.dataTestid}-Tooltip`},{default:o.withCtx(()=>[o.createVNode(st,{ref_key:"badgesRef",ref:i,type:e.disabled?o.unref(FI).disabled:m.value===I.defaultOption?o.unref(FI).default:o.unref(FI).blue,class:"filter__options-badge","data-testid":`${I.dataTestid}-Badge`,text:m.value,onMouseenter:G,onMouseleave:w,disabled:""},null,8,["type","data-testid","text"]),y.value&&e.isShowMiniOptions?(o.openBlock(),o.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Value`},[o.createVNode(uK,{"data-testid":`${I.dataTestid}-Filter-Value-MiniOptions`,onClick:Q[0]||(Q[0]=o.withModifiers(()=>{},["stop"])),options:h.value,onRemove:M},null,8,["data-testid","options"])],8,OUg)):o.createCommentVNode("",!0)]),_:1},8,["position","is-can-show","hint","data-testid"]),Y.value&&Y.value>1?(o.openBlock(),o.createElementBlock("span",{key:0,class:"filter__count","data-testid":`${I.dataTestid}-Filter-Count`},[o.createTextVNode(" +"+o.toDisplayString(Y.value-1)+" ",1),y.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"filter__values","data-testid":`${I.dataTestid}-Filter-Values`},[o.createVNode(uK,{onClick:Q[1]||(Q[1]=o.withModifiers(()=>{},["stop"])),options:u.value,onRemove:M,"data-testid":`${I.dataTestid}-MiniOptions`},null,8,["options","data-testid"])],8,UUg)):o.createCommentVNode("",!0)],8,QUg)):o.createCommentVNode("",!0),B.value?(o.openBlock(),o.createElementBlock("span",{key:1,class:"filter__cross",onClick:o.withModifiers(F,["stop"]),"data-testid":`${I.dataTestid}-Filter-Cross`},[o.createVNode(Mg,{name:o.unref(ug).crossLarge,width:16,height:16},null,8,["name"])],8,EUg)):o.createCommentVNode("",!0)],!0)]),options:o.withCtx(()=>[e.isSearch?(o.openBlock(),o.createBlock(G0,{key:0,modelValue:a.value,"onUpdate:modelValue":Q[2]||(Q[2]=Ig=>a.value=Ig),"show-history":!1,"data-testid":`${I.dataTestid}-Search`,onInput:Q[3]||(Q[3]=Ig=>L.$emit("unmount-search",Ig)),onEnter:Q[4]||(Q[4]=Ig=>L.$emit("unmount-search-enter",Ig))},null,8,["modelValue","data-testid"])):o.createCommentVNode("",!0),o.createVNode(sY,{"data-testid":`${I.dataTestid}-Options`,class:"filter__options-option",options:d.value,"default-option":m.value,onChange:M,onDisabledClick:f},{default:o.withCtx(()=>[o.createElementVNode("li",{class:"filter__options-underline","data-testid":`${I.dataTestid}-Underline`},[...Q[5]||(Q[5]=[o.createElementVNode("hr",{class:"filter__options-underline-hr"},null,-1)])],8,PUg)]),_:1},8,["data-testid","options","default-option"]),o.withDirectives(o.createElementVNode("div",{ref_key:"lastOptionRef",ref:A,class:"filter__last-option"},null,512),[[o.vShow,e.onUnmountPagination]])]),_:2},[L.$slots.body?{name:"body",fn:o.withCtx(Ig=>[o.renderSlot(L.$slots,"body",{closeOpenList:Ig.closeOpenList},void 0,!0)]),key:"0"}:void 0]),1032,["is-opened","class","is-use-anchor","data-testid","disabled"]))}}),[["__scopeId","data-v-45631066"]]),_Ug=["data-testid"],Bp=Jg(o.defineComponent({name:"Range",__name:"Range",props:o.mergeModels({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},dataTestid:{default:"Range"}},{modelValue:{default:0},modelModifiers:{}}),emits:o.mergeModels(["unmount-change","unmount-input"],["update:modelValue"]),setup(e,{emit:g}){const I=e,C=g,t=o.useModel(e,"modelValue"),i=o.ref(null);o.watch(t,()=>{n()});const A=()=>(t.value-I.min)/(I.max-I.min)*100,n=()=>{requestAnimationFrame(()=>{i.value&&kI({"--progress":A()+"%"},i.value)})},l=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 o.onMounted(()=>{n()}),(a,d)=>o.withDirectives((o.openBlock(),o.createElementBlock("input",o.mergeProps({ref_key:"input",ref:i,type:"range"},I,{class:"range","onUpdate:modelValue":d[0]||(d[0]=m=>t.value=m),onChange:l,onInput:s,"data-testid":I.dataTestid}),null,16,_Ug)),[[o.vModelText,t.value]])}}),[["__scopeId","data-v-50ada1b8"]]),$Ug=["id","data-testid"],qUg=["data-testid"],g7g=["data-testid"],wN=Jg(o.defineComponent({name:"TableNew",__name:"TableNew",props:{tableId:{},search:{},tbodyId:{},theadId:{},columnCount:{},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 p;const C=e,t=I,i=o.reactive({headHeight:0,maxColumnCount:0}),A=o.ref(null),n=o.ref(null),l=o.ref(null),s=o.ref(null),a=o.ref(null),d=B=>{t("unmount-scroll",B)},m=()=>{if(!A.value||!a.value)return;const B=A.value.querySelector("thead");if(!B)return;const y=B.getBoundingClientRect().height;i.headHeight=y,kI({"--scroll-track-margin-top":`${y}px`},a.value.$el)},u=()=>{a.value&&a.value.scrollToTop()},h=()=>{if(a.value&&s.value){const B=getComputedStyle(a.value.$el),y=Number(B.minHeight.replace(/\D/g,""));if(y&&y>0)return;kI({"min-height":`${i.headHeight+108}px`},a.value.$el)}},Z=()=>{let B=1;if(n.value){for(let y=0;y<n.value.children.length;y++)B=Math.max(n.value.children[y].children.length,B);i.maxColumnCount=B}},G=new MutationObserver(()=>{Z()}),w=new ResizeObserver(()=>{m()});return g({scrollToTop:u,setHeightSlot:(p=a.value)==null?void 0:p.setHeightSlot,tbodyRef:l,tableRef:A,theadRef:n}),o.onMounted(()=>{m(),Z(),window.addEventListener("resize",m),A.value&&w.observe(A.value),n.value&&G.observe(n.value,{childList:!0,subtree:!0}),h()}),(B,y)=>(o.openBlock(),o.createBlock($0,{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:o.withCtx(()=>[o.createElementVNode("table",{ref_key:"tableRef",ref:A,id:C.tableId,class:"table__table","data-testid":`${C.dataTestid}`},[o.renderSlot(B.$slots,"default",{},()=>[o.createElementVNode("colgroup",null,[o.renderSlot(B.$slots,"colspan",{},void 0,!0)]),B.$slots.head?(o.openBlock(),o.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:n,class:"table__head","data-testid":`${C.dataTestid}-Thead`},[o.renderSlot(B.$slots,"head",{},void 0,!0),B.$slots.search?(o.openBlock(),o.createBlock(_0,{key:0,class:"table__search-tr",ref_key:"searchRowRef",ref:s,"data-testid":`${C.dataTestid}-Search-Row`},{default:o.withCtx(()=>[o.createVNode(hm,{colspan:i.maxColumnCount,class:"table__search-th","data-testid":`${C.dataTestid}-SearchRow-Search`},{default:o.withCtx(()=>[o.renderSlot(B.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):o.createCommentVNode("",!0)],8,qUg)):o.createCommentVNode("",!0),o.renderSlot(B.$slots,"body-group",{},()=>[B.$slots.body?(o.openBlock(),o.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:l,class:"table__body","data-testid":`${C.dataTestid}-Tbody`},[o.renderSlot(B.$slots,"body",{},void 0,!0)],8,g7g)):o.createCommentVNode("",!0)],!0)],!0)],8,$Ug)]),_:3},8,["is-show-vertical-scroll","is-show-horizontal-scroll","data-testid"]))}}),[["__scopeId","data-v-6d0e7f55"]]),I7g=["data-testid"],WN=Jg(o.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=o.computed(()=>[{"table-row_active":g.type==="selected"}]);return(C,t)=>(o.openBlock(),o.createElementBlock("tr",{class:o.normalizeClass(["table-row",I.value]),"data-testid":g.dataTestid},[o.renderSlot(C.$slots,"default",{},void 0,!0)],10,I7g))}}),[["__scopeId","data-v-c22d3f55"]]),e7g=["data-testid"],yp=Jg(o.defineComponent({name:"HeadTableRow",__name:"HeadTableRowNew",props:{dataTestid:{default:"TableRow"}},setup(e){const g=e;return(I,C)=>(o.openBlock(),o.createElementBlock("tr",{class:"head-table-row","data-testid":g.dataTestid},[o.renderSlot(I.$slots,"default",{},void 0,!0)],8,e7g))}}),[["__scopeId","data-v-45b56a2a"]]),C7g={class:"scroll-wrapper__vertical-wrapper"},t7g={class:"scroll-wrapper__horizont-wrapper"},i7g=Jg(o.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=o.ref(null),i=o.ref(null),A=o.ref(null),n=o.ref(null),l=o.ref(null),s=o.ref(null),{onTrackClick:a,startDrag:d,changeBarPosition:m,setVerticalBarHeight:u,verticalTrackClass:h,isExistVerticalTrack:Z}=mK(t,i,n,A),{changeBarPosition:G,startDrag:w,onTrackClick:p,setHorizontalBarWidth:B,horizontalTrackClass:y,isExistHorizontalTrack:Y}=rK(t,i,s,l),f=ig=>{m(),G(),C("unmount-scroll",ig)},M=()=>{requestAnimationFrame(()=>{k(),F()})},k=()=>{if(!t.value||!i.value)return;const ig=getComputedStyle(i.value),U=i.value.style.minHeight||ig.minHeight,$=i.value.style.maxHeight||ig.maxHeight,mg=i.value.style.height;kI({"--scroll-wrapper-height":`${mg}`,"--scroll-wrapper-max-height":`${$}`,"--scroll-wrapper-min-height":`${U}`},i.value)},F=()=>{u(),B(),m(),G()},X=()=>{t.value&&t.value.addEventListener("scroll",f)},z=()=>{t.value&&(t.value.scrollTop=0)},L=new MutationObserver(()=>{M()}),Q=new ResizeObserver(()=>{M()}),Ig=ig=>{L.observe(ig,{childList:!0,subtree:!0,attributes:!0}),Q.observe(ig)};return g({scrollToTop:z,setHeightSlot:k}),o.onMounted(()=>{M(),X(),i.value&&Ig(i.value),A.value&&Ig(A.value),window.addEventListener("resize",M),C("on-mounted")}),o.onUnmounted(()=>{window.removeEventListener("resize",M)}),(ig,U)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"scrollWrapperRef",ref:i,class:"scroll-wrapper"},[o.createElementVNode("div",C7g,[o.createElementVNode("div",t7g,[o.createElementVNode("div",{ref_key:"slotRef",ref:t,class:"scroll-wrapper__slot"},[o.renderSlot(ig.$slots,"default",{},void 0,!0)],512),o.unref(Y)||e.isShowHorizontalScroll?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"horizontTrackRef",ref:l,class:o.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_horizont",o.unref(y)]),onClick:U[1]||(U[1]=o.withModifiers((...$)=>o.unref(p)&&o.unref(p)(...$),["prevent","left"]))},[o.createElementVNode("div",{ref_key:"horizontBarRef",ref:s,class:"scroll-wrapper__bar",onMousedown:U[0]||(U[0]=o.withModifiers((...$)=>o.unref(w)&&o.unref(w)(...$),["prevent","left"]))},null,544)],2)):o.createCommentVNode("",!0)]),o.unref(Z)||e.isShowVerticalScroll?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"verticalTrackRef",ref:A,class:o.normalizeClass(["scroll-wrapper__track scroll-wrapper__track_vertical",o.unref(h)]),onClick:U[3]||(U[3]=o.withModifiers((...$)=>o.unref(a)&&o.unref(a)(...$),["prevent","left"]))},[o.createElementVNode("div",{ref_key:"verticalBarRef",ref:n,class:"scroll-wrapper__bar",onMousedown:U[2]||(U[2]=o.withModifiers((...$)=>o.unref(d)&&o.unref(d)(...$),["prevent","left"]))},null,544)],2)):o.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-411a6b7a"]]),A7g=["data-testid"],n7g=["data-testid"],l7g=["data-testid"],pN=Jg(o.defineComponent({name:"TableSimple",__name:"TableSimple",props:{dataTestid:{default:"TableSimple"}},setup(e,{expose:g}){const I=e,C=o.ref(null),t=o.ref(null),i=o.ref(null),A=o.ref(null),n=o.computed(()=>{let l=1;if(t.value)for(let s=0;s<t.value.children.length;s++)l=Math.max(t.value.children[s].children.length,l);return l});return g({tbodyRef:i,tableRef:C,theadRef:t}),(l,s)=>(o.openBlock(),o.createElementBlock("table",{ref_key:"tableRef",ref:C,class:"simple-table-yui-kit","data-testid":`${I.dataTestid}`},[o.renderSlot(l.$slots,"default",{},()=>[o.renderSlot(l.$slots,"colspan",{},void 0,!0),l.$slots.head?(o.openBlock(),o.createElementBlock("thead",{key:0,ref_key:"theadRef",ref:t,class:"simple-table-yui-kit__head","data-testid":`${I.dataTestid}-Thead`},[o.renderSlot(l.$slots,"head",{},void 0,!0),l.$slots.search?(o.openBlock(),o.createBlock(yp,{key:0,class:"table-new-yui-kit__search",ref_key:"searchRowRef",ref:A,"data-testid":`${I.dataTestid}-Search-Row`},{default:o.withCtx(()=>[o.createVNode(hm,{colspan:n.value,class:"table-new-yui-kit__th","data-testid":`${I.dataTestid}-SearchRow-Search`},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"search",{},void 0,!0)]),_:3},8,["colspan","data-testid"])]),_:3},8,["data-testid"])):o.createCommentVNode("",!0)],8,n7g)):o.createCommentVNode("",!0),o.renderSlot(l.$slots,"body-group",{},()=>[l.$slots.body?(o.openBlock(),o.createElementBlock("tbody",{key:0,ref_key:"tbodyRef",ref:i,class:"simple-table-yui-kit__body","data-testid":`${I.dataTestid}-Tbody`},[o.renderSlot(l.$slots,"body",{},void 0,!0)],8,l7g)):o.createCommentVNode("",!0)],!0)],!0)],8,A7g))}}),[["__scopeId","data-v-eaeafe5b"]]),o7g=["data-testid"],s7g=["data-testid"],a7g=["onClick","data-testid"],d7g=["data-testid"],BN=Jg(o.defineComponent({name:"Tabs",__name:"Tabs",props:{defaultActiveTabId:{},tabCount:{},dataTestid:{default:"Tabs"}},emits:["unmount-tab"],setup(e,{emit:g}){const I=e,C=g,t=o.reactive({activeTab:1}),i=n=>Array.from({length:n},(l,s)=>s+1);o.watch(()=>I.defaultActiveTabId,()=>{I.defaultActiveTabId&&(t.activeTab=I.defaultActiveTabId)},{immediate:!0});const A=n=>{t.activeTab=n,C("unmount-tab",n)};return(n,l)=>(o.openBlock(),o.createElementBlock("div",{"data-testid":I.dataTestid,class:"tabs"},[o.createElementVNode("nav",{class:"tabs__navigation","data-testid":`${I.dataTestid}-Navigation`},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i(I.tabCount),s=>(o.openBlock(),o.createElementBlock("button",{key:s,onClick:a=>A(s),class:o.normalizeClass(["tabs__navigation-button",{active:t.activeTab===s}]),"data-testid":`${I.dataTestid}-Navigation-Button`},[o.renderSlot(n.$slots,`header${s}`,{},void 0,!0)],10,a7g))),128))],8,s7g),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i(I.tabCount),s=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:s},[t.activeTab===s?(o.openBlock(),o.createElementBlock("article",{key:0,"data-testid":`${I.dataTestid}-Content`,class:"tabs__navigation-content"},[o.renderSlot(n.$slots,`tab${s}`,{},void 0,!0)],8,d7g)):o.createCommentVNode("",!0)],64))),128))],8,o7g))}}),[["__scopeId","data-v-9a94dd67"]]);function EC(e){this.content=e}EC.prototype={constructor:EC,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 EC(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 EC(I)},addToStart:function(e,g){return new EC([e,g].concat(this.remove(e).content))},addToEnd:function(e,g){var I=this.remove(e).content.slice();return I.push(e,g),new EC(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 EC(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=EC.from(e),e.size?new EC(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=EC.from(e),e.size?new EC(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var g=this;e=EC.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}},EC.from=function(e){if(e instanceof EC)return e;var g=[];if(e)for(var I in e)g.push(I,e[I]);return new EC(g)};function hK(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){for(let A=0;t.text[A]==i.text[A];A++)I++;return I}if(t.content.size||i.content.size){let A=hK(t.content,i.content,I+1);if(A!=null)return A}I+=t.nodeSize}}function bK(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 A=e.child(--t),n=g.child(--i),l=A.nodeSize;if(A==n){I-=l,C-=l;continue}if(!A.sameMarkup(n))return{a:I,b:C};if(A.isText&&A.text!=n.text){let s=0,a=Math.min(A.text.length,n.text.length);for(;s<a&&A.text[A.text.length-s-1]==n.text[n.text.length-s-1];)s++,I--,C--;return{a:I,b:C}}if(A.content.size||n.content.size){let s=bK(A.content,n.content,I-1,C-1);if(s)return s}I-=l,C-=l}}let Bg=class Ci{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 A=0,n=0;n<I;A++){let l=this.content[A],s=n+l.nodeSize;if(s>g&&C(l,t+n,i||null,A)!==!1&&l.content.size){let a=n+1;l.nodesBetween(Math.max(0,g-a),Math.min(l.content.size,I-a),C,t+a)}n=s}}descendants(g){this.nodesBetween(0,this.size,g)}textBetween(g,I,C,t){let i="",A=!0;return this.nodesBetween(g,I,(n,l)=>{let s=n.isText?n.text.slice(Math.max(g,l)-l,I-l):n.isLeaf?t?typeof t=="function"?t(n):t:n.type.spec.leafText?n.type.spec.leafText(n):"":"";n.isBlock&&(n.isLeaf&&s||n.isTextblock)&&C&&(A?A=!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 Ci(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,A=0;A<I;i++){let n=this.content[i],l=A+n.nodeSize;l>g&&((A<g||l>I)&&(n.isText?n=n.cut(Math.max(0,g-A),Math.min(n.text.length,I-A)):n=n.cut(Math.max(0,g-A-1),Math.min(n.content.size,I-A-1))),C.push(n),t+=n.nodeSize),A=l}return new Ci(C,t)}cutByIndex(g,I){return g==I?Ci.empty:g==0&&I==this.content.length?this:new Ci(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 Ci(t,i)}addToStart(g){return new Ci([g].concat(this.content),this.size+g.nodeSize)}addToEnd(g){return new Ci(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 hK(this,g,I)}findDiffEnd(g,I=this.size,C=g.size){return bK(this,g,I,C)}findIndex(g){if(g==0)return Yp(0,g);if(g==this.size)return Yp(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?Yp(I+1,i):Yp(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 Ci.empty;if(!Array.isArray(I))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ci(I.map(g.nodeFromJSON))}static fromArray(g){if(!g.length)return Ci.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 Ci(I||g,C)}static from(g){if(!g)return Ci.empty;if(g instanceof Ci)return g;if(Array.isArray(g))return this.fromArray(g);if(g.attrs)return new Ci([g],g.nodeSize);throw new RangeError("Can not convert "+g+" to a Fragment"+(g.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};Bg.empty=new Bg([],0);const yN={index:0,offset:0};function Yp(e,g){return yN.index=e,yN.offset=g,yN}function Vp(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(!Vp(e[C],g[C]))return!1}else{for(let C in e)if(!(C in g)||!Vp(e[C],g[C]))return!1;for(let C in g)if(!(C in e))return!1}return!0}let oe=class _R{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&&Vp(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 _R.none;if(g instanceof _R)return[g];let I=g.slice();return I.sort((C,t)=>C.type.rank-t.type.rank),I}};oe.none=[];let Np=class extends Error{},zg=class Kh{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=GK(this.content,g+this.openStart,I);return C&&new Kh(C,this.openStart,this.openEnd)}removeBetween(g,I){return new Kh(ZK(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 Kh.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 Kh(Bg.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 Kh(g,C,t)}};zg.empty=new zg(Bg.empty,0,0);function ZK(e,g,I){let{index:C,offset:t}=e.findIndex(g),i=e.maybeChild(C),{index:A,offset:n}=e.findIndex(I);if(t==g||i.isText){if(n!=I&&!e.child(A).isText)throw new RangeError("Removing non-flat range");return e.cut(0,g).append(e.cut(I))}if(C!=A)throw new RangeError("Removing non-flat range");return e.replaceChild(C,i.copy(ZK(i.content,g-t-1,I-t-1)))}function GK(e,g,I,C){let{index:t,offset:i}=e.findIndex(g),A=e.maybeChild(t);if(i==g||A.isText)return C&&!C.canReplace(t,t,I)?null:e.cut(0,g).append(I).append(e.cut(g));let n=GK(A.content,g-i-1,I,A);return n&&e.replaceChild(t,A.copy(n))}function c7g(e,g,I){if(I.openStart>e.depth)throw new Np("Inserted content deeper than insertion position");if(e.depth-I.openStart!=g.depth-I.openEnd)throw new Np("Inconsistent open depths");return wK(e,g,I,0)}function wK(e,g,I,C){let t=e.index(C),i=e.node(C);if(t==g.index(C)&&C<e.depth-I.openStart){let A=wK(e,g,I,C+1);return i.copy(i.content.replaceChild(t,A))}else if(I.content.size)if(!I.openStart&&!I.openEnd&&e.depth==C&&g.depth==C){let A=e.parent,n=A.content;return kd(A,n.cut(0,e.parentOffset).append(I.content).append(n.cut(g.parentOffset)))}else{let{start:A,end:n}=r7g(I,e);return kd(i,pK(e,A,n,g,C))}else return kd(i,Mp(e,g,C))}function WK(e,g){if(!g.type.compatibleContent(e.type))throw new Np("Cannot join "+g.type.name+" onto "+e.type.name)}function YN(e,g,I){let C=e.node(I);return WK(C,g.node(I)),C}function Sd(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 gb(e,g,I,C){let t=(g||e).node(I),i=0,A=g?g.index(I):t.childCount;e&&(i=e.index(I),e.depth>I?i++:e.textOffset&&(Sd(e.nodeAfter,C),i++));for(let n=i;n<A;n++)Sd(t.child(n),C);g&&g.depth==I&&g.textOffset&&Sd(g.nodeBefore,C)}function kd(e,g){return e.type.checkContent(g),e.copy(g)}function pK(e,g,I,C,t){let i=e.depth>t&&YN(e,g,t+1),A=C.depth>t&&YN(I,C,t+1),n=[];return gb(null,e,t,n),i&&A&&g.index(t)==I.index(t)?(WK(i,A),Sd(kd(i,pK(e,g,I,C,t+1)),n)):(i&&Sd(kd(i,Mp(e,g,t+1)),n),gb(g,I,t,n),A&&Sd(kd(A,Mp(I,C,t+1)),n)),gb(C,null,t,n),new Bg(n)}function Mp(e,g,I){let C=[];if(gb(null,e,I,C),e.depth>I){let t=YN(e,g,I+1);Sd(kd(t,Mp(e,g,I+1)),C)}return gb(g,null,I,C),new Bg(C)}function r7g(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(Bg.from(t));return{start:t.resolveNoCache(e.openStart+I),end:t.resolveNoCache(t.content.size-e.openEnd-I)}}class Ib{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 oe.none;if(this.textOffset)return g.child(I).marks;let C=g.maybeChild(I-1),t=g.maybeChild(I);if(!C){let n=C;C=t,t=n}let i=C.marks;for(var A=0;A<i.length;A++)i[A].type.spec.inclusive===!1&&(!t||!i[A].isInSet(t.marks))&&(i=i[A--].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 fp(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 A=g;;){let{index:n,offset:l}=A.content.findIndex(i),s=i-l;if(C.push(A,n,t+l),!s||(A=A.child(n),A.isText))break;i=s-1,t+=l+1}return new Ib(I,C,i)}static resolveCached(g,I){let C=BK.get(g);if(C)for(let i=0;i<C.elts.length;i++){let A=C.elts[i];if(A.pos==I)return A}else BK.set(g,C=new m7g);let t=C.elts[C.i]=Ib.resolve(g,I);return C.i=(C.i+1)%u7g,t}}class m7g{constructor(){this.elts=[],this.i=0}}const u7g=12,BK=new WeakMap;class fp{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 h7g=Object.create(null);let Rs=class $R{constructor(g,I,C,t=oe.none){this.type=g,this.attrs=I,this.marks=t,this.content=C||Bg.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&&Vp(this.attrs,I||g.defaultAttrs||h7g)&&oe.sameSet(this.marks,C||oe.none)}copy(g=null){return g==this.content?this:new $R(this.type,this.attrs,g,this.marks)}mark(g){return g==this.marks?this:new $R(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 zg.empty;let t=this.resolve(g),i=this.resolve(I),A=C?0:t.sharedDepth(I),n=t.start(A),s=t.node(A).content.cut(t.pos-n,i.pos-n);return new zg(s,t.depth-A,i.depth-A)}replace(g,I,C){return c7g(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 Ib.resolveCached(this,g)}resolveNoCache(g){return Ib.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()+")"),yK(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=Bg.empty,t=0,i=C.childCount){let A=this.contentMatchAt(g).matchFragment(C,t,i),n=A&&A.matchFragment(this.content,I);if(!n||!n.validEnd)return!1;for(let l=t;l<i;l++)if(!this.type.allowsMarks(C.child(l).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),A=i&&i.matchFragment(this.content,I);return A?A.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=oe.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(!oe.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=Bg.fromJSON(g,I.content),i=g.nodeType(I.type).create(I.attrs,t,C);return i.type.checkAttrs(i.attrs),i}};Rs.prototype.text=void 0;class Rp extends Rs{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):yK(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(g,I){return this.text.slice(g,I)}get nodeSize(){return this.text.length}mark(g){return g==this.marks?this:new Rp(this.type,this.attrs,this.text,g)}withText(g){return g==this.text?this:new Rp(this.type,this.attrs,g,this.marks)}cut(g=0,I=this.text.length){return g==0&&I==this.text.length?this:this.withText(this.text.slice(g,I))}eq(g){return this.sameMarkup(g)&&this.text==g.text}toJSON(){let g=super.toJSON();return g.text=this.text,g}}function yK(e,g){for(let I=e.length-1;I>=0;I--)g=e[I].type.name+"("+g+")";return g}class Kd{constructor(g){this.validEnd=g,this.next=[],this.wrapCache=[]}static parse(g,I){let C=new b7g(g,I);if(C.next==null)return Kd.empty;let t=YK(C);C.next&&C.err("Unexpected trailing text");let i=y7g(B7g(t));return Y7g(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(A,n){let l=A.matchFragment(g,C);if(l&&(!I||l.validEnd))return Bg.from(n.map(s=>s.createAndFill()));for(let s=0;s<A.next.length;s++){let{type:a,next:d}=A.next[s];if(!(a.isText||a.hasRequiredAttrs())&&t.indexOf(d)==-1){t.push(d);let m=i(d,n.concat(a));if(m)return m}}return null}return i(this,[])}findWrapping(g){for(let C=0;C<this.wrapCache.length;C+=2)if(this.wrapCache[C]==g)return this.wrapCache[C+1];let I=this.computeWrapping(g);return this.wrapCache.push(g,I),I}computeWrapping(g){let I=Object.create(null),C=[{match:this,type:null,via:null}];for(;C.length;){let t=C.shift(),i=t.match;if(i.matchType(g)){let A=[];for(let n=t;n.type;n=n.via)A.push(n.type);return A.reverse()}for(let A=0;A<i.next.length;A++){let{type:n,next:l}=i.next[A];!n.isLeaf&&!n.hasRequiredAttrs()&&!(n.name in I)&&(!t.type||l.validEnd)&&(C.push({match:n.contentMatch,type:n,via:t}),I[n.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 A=0;A<C.next.length;A++)i+=(A?", ":"")+C.next[A].type.name+"->"+g.indexOf(C.next[A].next);return i}).join(`
1466
1466
  `)}}Kd.empty=new Kd(!0);class b7g{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 YK(e){let g=[];do g.push(Z7g(e));while(e.eat("|"));return g.length==1?g[0]:{type:"choice",exprs:g}}function Z7g(e){let g=[];do g.push(G7g(e));while(e.next&&e.next!=")"&&e.next!="|");return g.length==1?g[0]:{type:"seq",exprs:g}}function G7g(e){let g=p7g(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=w7g(e,g);else break;return g}function VK(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let g=Number(e.next);return e.pos++,g}function w7g(e,g){let I=VK(e),C=I;return e.eat(",")&&(e.next!="}"?C=VK(e):C=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:I,max:C,expr:g}}function W7g(e,g){let I=e.nodeTypes,C=I[g];if(C)return[C];let t=[];for(let i in I){let A=I[i];A.isInGroup(g)&&t.push(A)}return t.length==0&&e.err("No node type or group '"+g+"' found"),t}function p7g(e){if(e.eat("(")){let g=YK(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=W7g(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 B7g(e){let g=[[]];return t(i(e,0),I()),g;function I(){return g.push([])-1}function C(A,n,l){let s={term:l,to:n};return g[A].push(s),s}function t(A,n){A.forEach(l=>l.to=n)}function i(A,n){if(A.type=="choice")return A.exprs.reduce((l,s)=>l.concat(i(s,n)),[]);if(A.type=="seq")for(let l=0;;l++){let s=i(A.exprs[l],n);if(l==A.exprs.length-1)return s;t(s,n=I())}else if(A.type=="star"){let l=I();return C(n,l),t(i(A.expr,l),l),[C(l)]}else if(A.type=="plus"){let l=I();return t(i(A.expr,n),l),t(i(A.expr,l),l),[C(l)]}else{if(A.type=="opt")return[C(n)].concat(i(A.expr,n));if(A.type=="range"){let l=n;for(let s=0;s<A.min;s++){let a=I();t(i(A.expr,l),a),l=a}if(A.max==-1)t(i(A.expr,l),l);else for(let s=A.min;s<A.max;s++){let a=I();C(l,a),t(i(A.expr,l),a),l=a}return[C(l)]}else{if(A.type=="name")return[C(n,void 0,A.value)];throw new Error("Unknown expr type")}}}}function NK(e,g){return g-e}function MK(e,g){let I=[];return C(g),I.sort(NK);function C(t){let i=e[t];if(i.length==1&&!i[0].term)return C(i[0].to);I.push(t);for(let A=0;A<i.length;A++){let{term:n,to:l}=i[A];!n&&I.indexOf(l)==-1&&C(l)}}}function y7g(e){let g=Object.create(null);return I(MK(e,0));function I(C){let t=[];C.forEach(A=>{e[A].forEach(({term:n,to:l})=>{if(!n)return;let s;for(let a=0;a<t.length;a++)t[a][0]==n&&(s=t[a][1]);MK(e,l).forEach(a=>{s||t.push([n,s=[]]),s.indexOf(a)==-1&&s.push(a)})})});let i=g[C.join(",")]=new Kd(C.indexOf(e.length-1)>-1);for(let A=0;A<t.length;A++){let n=t[A][1].sort(NK);i.next.push({type:t[A][0],next:g[n.join(",")]||I(n)})}return i}}function Y7g(e,g){for(let I=0,C=[e];I<C.length;I++){let t=C[I],i=!t.validEnd,A=[];for(let n=0;n<t.next.length;n++){let{type:l,next:s}=t.next[n];A.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),C.indexOf(s)==-1&&C.push(s)}i&&g.err("Only non-generatable nodes ("+A.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function fK(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 RK(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 XK(e,g,I,C){for(let t in g)if(!(t in e))throw new RangeError(`Unsupported attribute ${t} for ${I} of type ${t}`);for(let t in e){let i=e[t];i.validate&&i.validate(g[t])}}function HK(e,g){let I=Object.create(null);if(g)for(let C in g)I[C]=new N7g(e,C,g[C]);return I}let DK=class n4{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=HK(g,C.attrs),this.defaultAttrs=fK(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==Kd.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:RK(this.attrs,g)}create(g=null,I,C){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Rs(this,this.computeAttrs(g),Bg.from(I),oe.setFrom(C))}createChecked(g=null,I,C){return I=Bg.from(I),this.checkContent(I),new Rs(this,this.computeAttrs(g),I,oe.setFrom(C))}createAndFill(g=null,I,C){if(g=this.computeAttrs(g),I=Bg.from(I),I.size){let A=this.contentMatch.fillBefore(I);if(!A)return null;I=A.append(I)}let t=this.contentMatch.matchFragment(I),i=t&&t.fillBefore(Bg.empty,!0);return i?new Rs(this,g,I.append(i),oe.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){XK(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:oe.none:g}static compile(g,I){let C=Object.create(null);g.forEach((i,A)=>C[i]=new n4(i,I,A));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 V7g(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 N7g{constructor(g,I,C){this.hasDefault=Object.prototype.hasOwnProperty.call(C,"default"),this.default=C.default,this.validate=typeof C.validate=="string"?V7g(g,I,C.validate):C.validate}get isRequired(){return!this.hasDefault}}class Xp{constructor(g,I,C,t){this.name=g,this.rank=I,this.schema=C,this.spec=t,this.attrs=HK(g,t.attrs),this.excluded=null;let i=fK(this.attrs);this.instance=i?new oe(this,i):null}create(g=null){return!g&&this.instance?this.instance:new oe(this,RK(this.attrs,g))}static compile(g,I){let C=Object.create(null),t=0;return g.forEach((i,A)=>C[i]=new Xp(i,t++,I,A)),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){XK(this.attrs,g,"mark",this.name)}excludes(g){return this.excluded.indexOf(g)>-1}}class SK{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=EC.from(g.nodes),I.marks=EC.from(g.marks||{}),this.nodes=DK.compile(this.spec.nodes,this),this.marks=Xp.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],A=i.spec.content||"",n=i.spec.marks;if(i.contentMatch=C[A]||(C[A]=Kd.parse(A,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=n=="_"?null:n?kK(this,n.split(" ")):n==""||!i.inlineContent?[]:null}for(let t in this.marks){let i=this.marks[t],A=i.spec.excludes;i.excluded=A==null?[i]:A==""?[]:kK(this,A.split(" "))}this.nodeFromJSON=t=>Rs.fromJSON(this,t),this.markFromJSON=t=>oe.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 DK){if(g.schema!=this)throw new RangeError("Node type from different schema used ("+g.name+")")}else throw new RangeError("Invalid node type: "+g);return g.createChecked(I,C,t)}text(g,I){let C=this.nodes.text;return new Rp(C,C.defaultAttrs,g,oe.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 kK(e,g){let I=[];for(let C=0;C<g.length;C++){let t=g[C],i=e.marks[t],A=i;if(i)I.push(i);else for(let n in e.marks){let l=e.marks[n];(t=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(t)>-1)&&I.push(A=l)}if(!A)throw new SyntaxError("Unknown mark type: '"+g[C]+"'")}return I}function M7g(e){return e.tag!=null}function f7g(e){return e.style!=null}class Xs{constructor(g,I){this.schema=g,this.rules=I,this.tags=[],this.styles=[];let C=this.matchedStyles=[];I.forEach(t=>{if(M7g(t))this.tags.push(t);else if(f7g(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 JK(this,I,!1);return C.addAll(g,oe.none,I.from,I.to),C.finish()}parseSlice(g,I={}){let C=new JK(this,I,!0);return C.addAll(g,oe.none,I.from,I.to),zg.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(H7g(g,i.tag)&&(i.namespace===void 0||g.namespaceURI==i.namespace)&&(!i.context||I.matchesContext(i.context))){if(i.getAttrs){let A=i.getAttrs(g);if(A===!1)continue;i.attrs=A||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 A=this.styles[i],n=A.style;if(!(n.indexOf(g)!=0||A.context&&!C.matchesContext(A.context)||n.length>g.length&&(n.charCodeAt(g.length)!=61||n.slice(g.length+1)!=I))){if(A.getAttrs){let l=A.getAttrs(I);if(l===!1)continue;A.attrs=l||void 0}return A}}}static schemaRules(g){let I=[];function C(t){let i=t.priority==null?50:t.priority,A=0;for(;A<I.length;A++){let n=I[A];if((n.priority==null?50:n.priority)<i)break}I.splice(A,0,t)}for(let t in g.marks){let i=g.marks[t].spec.parseDOM;i&&i.forEach(A=>{C(A=LK(A)),A.mark||A.ignore||A.clearMark||(A.mark=t)})}for(let t in g.nodes){let i=g.nodes[t].spec.parseDOM;i&&i.forEach(A=>{C(A=LK(A)),A.node||A.ignore||A.mark||(A.node=t)})}return I}static fromSchema(g){return g.cached.domParser||(g.cached.domParser=new Xs(g,Xs.schemaRules(g)))}}const KK={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},R7g={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},FK={ol:!0,ul:!0},eb=1,VN=2,Cb=4;function zK(e,g,I){return g!=null?(g?eb:0)|(g==="full"?VN:0):e&&e.whitespace=="pre"?eb|VN:I&~Cb}class Hp{constructor(g,I,C,t,i,A){this.type=g,this.attrs=I,this.marks=C,this.solid=t,this.options=A,this.content=[],this.activeMarks=oe.none,this.match=i||(A&Cb?null:g.contentMatch)}findWrapping(g){if(!this.match){if(!this.type)return[];let I=this.type.contentMatch.fillBefore(Bg.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&eb)){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=Bg.from(this.content);return!g&&this.match&&(I=I.append(this.match.fillBefore(Bg.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&&!KK.hasOwnProperty(g.parentNode.nodeName.toLowerCase())}}class JK{constructor(g,I,C){this.parser=g,this.options=I,this.isOpen=C,this.open=0,this.localPreserveWS=!1;let t=I.topNode,i,A=zK(null,I.preserveWhitespace,0)|(C?Cb:0);t?i=new Hp(t.type,t.attrs,oe.none,!0,I.topMatch||t.type.contentMatch,A):C?i=new Hp(null,null,oe.none,!0,null,A):i=new Hp(g.schema.topNodeType,null,oe.none,!0,null,A),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&VN?"full":this.localPreserveWS||(t.options&eb)>0;if(i==="full"||t.inlineContext(g)||/[^ \t\r\n\u000c]/.test(C)){if(i)i!=="full"?C=C.replace(/\r?\n|\r/g," "):C=C.replace(/\r\n?/g,`
1467
1467
  `);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],n=g.previousSibling;(!A||n&&n.nodeName=="BR"||A.isText&&/[ \t\r\n\u000c]$/.test(A.text))&&(C=C.slice(1))}C&&this.insertNode(this.parser.schema.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 A=g.nodeName.toLowerCase(),n;FK.hasOwnProperty(A)&&this.parser.normalizeLists&&X7g(g);let l=this.options.ruleFromNode&&this.options.ruleFromNode(g)||(n=this.parser.matchTag(g,this,C));g:if(l?l.ignore:R7g.hasOwnProperty(A))this.findInside(g),this.ignoreFallback(g,I);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(g=l.skip);let s,a=this.needsBlock;if(KK.hasOwnProperty(A))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=l&&l.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,l,s,l.consuming===!1?n:void 0)}this.localPreserveWS=t}leafFallback(g,I){g.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(g.ownerDocument.createTextNode(`
1468
1468
  `),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],A=C.getPropertyValue(i);if(A)for(let n=void 0;;){let l=this.parser.matchStyle(i,A,this,n);if(!l)break;if(l.ignore)return null;if(l.clearMark?I=I.filter(s=>!l.clearMark(s)):I=I.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)n=l;else break}}return I}addElementByRule(g,I,C,t){let i,A;if(I.node)if(A=this.parser.schema.nodes[I.node],A.isLeaf)this.insertNode(A.create(I.attrs),C,g.nodeName=="BR")||this.leafFallback(g,C);else{let l=this.enter(A,I.attrs||null,C,I.preserveWhitespace);l&&(i=!0,C=l)}else{let l=this.parser.schema.marks[I.mark];C=C.concat(l.create(I.attrs))}let n=this.top;if(A&&A.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(l=>this.insertNode(l,C,!1));else{let l=g;typeof I.contentElement=="string"?l=g.querySelector(I.contentElement):typeof I.contentElement=="function"?l=I.contentElement(g):I.contentElement&&(l=I.contentElement),this.findAround(g,l,!0),this.addAll(l,C),this.findAround(g,l,!1)}i&&this.sync(n)&&this.open--}addAll(g,I,C,t){let i=C||0;for(let A=C?g.childNodes[C]:g.firstChild,n=t==null?null:g.childNodes[t];A!=n;A=A.nextSibling,++i)this.findAtPoint(g,i),this.addDOM(A,I);this.findAtPoint(g,i)}findPlace(g,I,C){let t,i;for(let A=this.open,n=0;A>=0;A--){let l=this.nodes[A],s=l.findWrapping(g);if(s&&(!t||t.length>s.length+n)&&(t=s,i=l,!s.length))break;if(l.solid){if(C)break;n+=2}}if(!t)return null;this.sync(i);for(let A=0;A<t.length;A++)I=this.enterInner(t[A],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 A=oe.none;for(let n of t.concat(g.marks))(i.type?i.type.allowsMarkType(n.type):TK(n.type,g.type))&&(A=n.addToSet(A));return i.content.push(g.mark(A)),!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 A=this.top;A.match=A.match&&A.match.matchType(g);let n=zK(g,i,A.options);A.options&Cb&&A.content.length==0&&(n|=Cb);let l=oe.none;return C=C.filter(s=>(A.type?A.type.allowsMarkType(s.type):TK(s.type,g))?(l=s.addToSet(l),!1):!0),this.nodes.push(new Hp(g,I,l,t,null,n)),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|=eb)}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),A=(n,l)=>{for(;n>=0;n--){let s=I[n];if(s==""){if(n==I.length-1||n==0)continue;for(;l>=i;l--)if(A(n-1,l))return!0;return!1}else{let a=l>0||l==0&&t?this.nodes[l].type:C&&l>=i?C.node(l-i).type:null;if(!a||a.name!=s&&!a.isInGroup(s))return!1;l--}}return!0};return A(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 X7g(e){for(let g=e.firstChild,I=null;g;g=g.nextSibling){let C=g.nodeType==1?g.nodeName.toLowerCase():null;C&&FK.hasOwnProperty(C)&&I?(I.appendChild(g),g=I):C=="li"?I=g:C&&(I=null)}}function H7g(e,g){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,g)}function LK(e){let g={};for(let I in e)g[I]=e[I];return g}function TK(e,g){let I=g.schema.nodes;for(let C in I){let t=I[C];if(!t.allowsMarkType(e))continue;let i=[],A=n=>{i.push(n);for(let l=0;l<n.edgeCount;l++){let{type:s,next:a}=n.edge(l);if(s==g||i.indexOf(a)<0&&A(a))return!0}};if(A(t.contentMatch))return!0}}class Fd{constructor(g,I){this.nodes=g,this.marks=I}serializeFragment(g,I={},C){C||(C=NN(I).createDocumentFragment());let t=C,i=[];return g.forEach(A=>{if(i.length||A.marks.length){let n=0,l=0;for(;n<i.length&&l<A.marks.length;){let s=A.marks[l];if(!this.marks[s.type.name]){l++;continue}if(!s.eq(i[n][0])||s.type.spec.spanning===!1)break;n++,l++}for(;n<i.length;)t=i.pop()[1];for(;l<A.marks.length;){let s=A.marks[l++],a=this.serializeMark(s,A.isInline,I);a&&(i.push([s,t]),t.appendChild(a.dom),t=a.contentDOM||a.dom)}}t.appendChild(this.serializeNodeInner(A,I))}),C}serializeNodeInner(g,I){let{dom:C,contentDOM:t}=Dp(NN(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&&Dp(NN(C),t(g,I),null,g.attrs)}static renderSpec(g,I,C=null,t){return Dp(g,I,C,t)}static fromSchema(g){return g.cached.domSerializer||(g.cached.domSerializer=new Fd(this.nodesFromSchema(g),this.marksFromSchema(g)))}static nodesFromSchema(g){let I=vK(g.nodes);return I.text||(I.text=C=>C.text),I}static marksFromSchema(g){return vK(g.marks)}}function vK(e){let g={};for(let I in e){let C=e[I].spec.toDOM;C&&(g[I]=C)}return g}function NN(e){return e.document||window.document}const jK=new WeakMap;function D7g(e){let g=jK.get(e);return g===void 0&&jK.set(e,g=S7g(e)),g}function S7g(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 Dp(e,g,I,C){if(typeof g=="string")return{dom:e.createTextNode(g)};if(g.nodeType!=null)return{dom:g};if(g.dom&&g.dom.nodeType!=null)return g;let t=g[0],i;if(typeof t!="string")throw new RangeError("Invalid array passed to renderSpec");if(C&&(i=D7g(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 A=t.indexOf(" ");A>0&&(I=t.slice(0,A),t=t.slice(A+1));let n,l=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 m=d.indexOf(" ");m>0?l.setAttributeNS(d.slice(0,m),d.slice(m+1),s[d]):d=="style"&&l.style?l.style.cssText=s[d]:l.setAttribute(d,s[d])}}for(let d=a;d<g.length;d++){let m=g[d];if(m===0){if(d<g.length-1||d>a)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:u,contentDOM:h}=Dp(e,m,I,C);if(l.appendChild(u),h){if(n)throw new RangeError("Multiple content holes");n=h}}}return{dom:l,contentDOM:n}}const xK=65535,OK=Math.pow(2,16);function k7g(e,g){return e+g*OK}function QK(e){return e&xK}function K7g(e){return(e-(e&xK))/OK}const UK=1,EK=2,Sp=4,PK=8;let MN=class{constructor(g,I,C){this.pos=g,this.delInfo=I,this.recover=C}get deleted(){return(this.delInfo&PK)>0}get deletedBefore(){return(this.delInfo&(UK|Sp))>0}get deletedAfter(){return(this.delInfo&(EK|Sp))>0}get deletedAcross(){return(this.delInfo&Sp)>0}},zd=class Fh{constructor(g,I=!1){if(this.ranges=g,this.inverted=I,!g.length&&Fh.empty)return Fh.empty}recover(g){let I=0,C=QK(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+K7g(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,A=this.inverted?1:2;for(let n=0;n<this.ranges.length;n+=3){let l=this.ranges[n]-(this.inverted?t:0);if(l>g)break;let s=this.ranges[n+i],a=this.ranges[n+A],d=l+s;if(g<=d){let m=s?g==l?-1:g==d?1:I:I,u=l+t+(m<0?0:a);if(C)return u;let h=g==(I<0?l:d)?null:k7g(n/3,g-l),Z=g==l?EK:g==d?UK:Sp;return(I<0?g!=l:g!=d)&&(Z|=PK),new MN(u,Z,h)}t+=a-s}return C?g+t:new MN(g+t,0,null)}touches(g,I){let C=0,t=QK(I),i=this.inverted?2:1,A=this.inverted?1:2;for(let n=0;n<this.ranges.length;n+=3){let l=this.ranges[n]-(this.inverted?C:0);if(l>g)break;let s=this.ranges[n+i],a=l+s;if(g<=a&&n==t*3)return!0;C+=this.ranges[n+A]-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 A=this.ranges[t],n=A-(this.inverted?i:0),l=A+(this.inverted?0:i),s=this.ranges[t+I],a=this.ranges[t+C];g(n,n+s,l,l+a),i+=a-s}}invert(){return new Fh(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(g){return g==0?Fh.empty:new Fh(g<0?[0,-g,0]:[0,0,g])}};zd.empty=new zd([]);class tb{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 tb(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 tb;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 A=this._maps[i],n=A.mapResult(g,I);if(n.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,g=this._maps[l].recover(n.recover);continue}}t|=n.delInfo,g=n.pos}return C?g:new MN(g,t,null)}}const fN=Object.create(null);let mt=class{getMap(){return zd.empty}merge(g){return null}static fromJSON(g,I){if(!I||!I.stepType)throw new RangeError("Invalid input for Step.fromJSON");let C=fN[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 fN)throw new RangeError("Duplicate use of step JSON ID "+g);return fN[g]=I,I.prototype.jsonID=g,I}},Jt=class uw{constructor(g,I){this.doc=g,this.failed=I}static ok(g){return new uw(g,null)}static fail(g){return new uw(null,g)}static fromReplace(g,I,C,t){try{return uw.ok(g.replace(I,C,t))}catch(i){if(i instanceof Np)return uw.fail(i.message);throw i}}};function RN(e,g,I){let C=[];for(let t=0;t<e.childCount;t++){let i=e.child(t);i.content.size&&(i=i.copy(RN(i.content,g,i))),i.isInline&&(i=g(i,I,t)),C.push(i)}return Bg.fromArray(C)}let XN=class hw extends mt{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 zg(RN(I.content,(A,n)=>!A.isAtom||!n.type.allowsMarkType(this.mark.type)?A:A.mark(this.mark.addToSet(A.marks)),t),I.openStart,I.openEnd);return Jt.fromReplace(g,this.from,this.to,i)}invert(){return new bm(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 hw(I.pos,C.pos,this.mark)}merge(g){return g instanceof hw&&g.mark.eq(this.mark)&&this.from<=g.to&&this.to>=g.from?new hw(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 hw(I.from,I.to,g.markFromJSON(I.mark))}};mt.jsonID("addMark",XN);let bm=class bw extends mt{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 zg(RN(I.content,t=>t.mark(this.mark.removeFromSet(t.marks)),g),I.openStart,I.openEnd);return Jt.fromReplace(g,this.from,this.to,C)}invert(){return new XN(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 bw(I.pos,C.pos,this.mark)}merge(g){return g instanceof bw&&g.mark.eq(this.mark)&&this.from<=g.to&&this.to>=g.from?new bw(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 bw(I.from,I.to,g.markFromJSON(I.mark))}};mt.jsonID("removeMark",bm);let HN=class Zw extends mt{constructor(g,I){super(),this.pos=g,this.mark=I}apply(g){let I=g.nodeAt(this.pos);if(!I)return Jt.fail("No node at mark step's position");let C=I.type.create(I.attrs,null,this.mark.addToSet(I.marks));return Jt.fromReplace(g,this.pos,this.pos+1,new zg(Bg.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 Zw(this.pos,I.marks[t]);return new Zw(this.pos,this.mark)}}return new kp(this.pos,this.mark)}map(g){let I=g.mapResult(this.pos,1);return I.deletedAfter?null:new Zw(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 Zw(I.pos,g.markFromJSON(I.mark))}};mt.jsonID("addNodeMark",HN);let kp=class qR extends mt{constructor(g,I){super(),this.pos=g,this.mark=I}apply(g){let I=g.nodeAt(this.pos);if(!I)return Jt.fail("No node at mark step's position");let C=I.type.create(I.attrs,null,this.mark.removeFromSet(I.marks));return Jt.fromReplace(g,this.pos,this.pos+1,new zg(Bg.from(C),0,I.isLeaf?0:1))}invert(g){let I=g.nodeAt(this.pos);return!I||!this.mark.isInSet(I.marks)?this:new HN(this.pos,this.mark)}map(g){let I=g.mapResult(this.pos,1);return I.deletedAfter?null:new qR(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 qR(I.pos,g.markFromJSON(I.mark))}};mt.jsonID("removeNodeMark",kp);let cn=class Dr extends mt{constructor(g,I,C,t=!1){super(),this.from=g,this.to=I,this.slice=C,this.structure=t}apply(g){return this.structure&&DN(g,this.from,this.to)?Jt.fail("Structure replace would overwrite content"):Jt.fromReplace(g,this.from,this.to,this.slice)}getMap(){return new zd([this.from,this.to-this.from,this.slice.size])}invert(g){return new Dr(this.from,this.from+this.slice.size,g.slice(this.from,this.to))}map(g){let I=g.mapResult(this.from,1),C=g.mapResult(this.to,-1);return I.deletedAcross&&C.deletedAcross?null:new Dr(I.pos,Math.max(I.pos,C.pos),this.slice,this.structure)}merge(g){if(!(g instanceof Dr)||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?zg.empty:new zg(this.slice.content.append(g.slice.content),this.slice.openStart,g.slice.openEnd);return new Dr(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?zg.empty:new zg(g.slice.content.append(this.slice.content),g.slice.openStart,this.slice.openEnd);return new Dr(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 Dr(I.from,I.to,zg.fromJSON(g,I.slice),!!I.structure)}};mt.jsonID("replace",cn);let ai=class vy extends mt{constructor(g,I,C,t,i,A,n=!1){super(),this.from=g,this.to=I,this.gapFrom=C,this.gapTo=t,this.slice=i,this.insert=A,this.structure=n}apply(g){if(this.structure&&(DN(g,this.from,this.gapFrom)||DN(g,this.gapTo,this.to)))return Jt.fail("Structure gap-replace would overwrite content");let I=g.slice(this.gapFrom,this.gapTo);if(I.openStart||I.openEnd)return Jt.fail("Gap is not a flat range");let C=this.slice.insertAt(this.insert,I.content);return C?Jt.fromReplace(g,this.from,this.to,C):Jt.fail("Content does not fit in gap")}getMap(){return new zd([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 vy(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 vy(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 vy(I.from,I.to,I.gapFrom,I.gapTo,zg.fromJSON(g,I.slice),I.insert,!!I.structure)}};mt.jsonID("replaceAround",ai);function DN(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 A=C.node(i).maybeChild(C.indexAfter(i));for(;t>0;){if(!A||A.isLeaf)return!0;A=A.firstChild,t--}}return!1}function F7g(e,g,I,C){let t=[],i=[],A,n;e.doc.nodesBetween(g,I,(l,s,a)=>{if(!l.isInline)return;let d=l.marks;if(!C.isInSet(d)&&a.type.allowsMarkType(C.type)){let m=Math.max(s,g),u=Math.min(s+l.nodeSize,I),h=C.addToSet(d);for(let Z=0;Z<d.length;Z++)d[Z].isInSet(h)||(A&&A.to==m&&A.mark.eq(d[Z])?A.to=u:t.push(A=new bm(m,u,d[Z])));n&&n.to==m?n.to=u:i.push(n=new XN(m,u,C))}}),t.forEach(l=>e.step(l)),i.forEach(l=>e.step(l))}function z7g(e,g,I,C){let t=[],i=0;e.doc.nodesBetween(g,I,(A,n)=>{if(!A.isInline)return;i++;let l=null;if(C instanceof Xp){let s=A.marks,a;for(;a=C.isInSet(s);)(l||(l=[])).push(a),s=a.removeFromSet(s)}else C?C.isInSet(A.marks)&&(l=[C]):l=A.marks;if(l&&l.length){let s=Math.min(n+A.nodeSize,I);for(let a=0;a<l.length;a++){let d=l[a],m;for(let u=0;u<t.length;u++){let h=t[u];h.step==i-1&&d.eq(t[u].style)&&(m=h)}m?(m.to=s,m.step=i):t.push({style:d,from:Math.max(n,g),to:s,step:i})}}}),t.forEach(A=>e.step(new bm(A.from,A.to,A.style)))}function SN(e,g,I,C=I.contentMatch,t=!0){let i=e.doc.nodeAt(g),A=[],n=g+1;for(let l=0;l<i.childCount;l++){let s=i.child(l),a=n+s.nodeSize,d=C.matchType(s.type);if(!d)A.push(new cn(n,a,zg.empty));else{C=d;for(let m=0;m<s.marks.length;m++)I.allowsMarkType(s.marks[m].type)||e.step(new bm(n,a,s.marks[m]));if(t&&s.isText&&I.whitespace!="pre"){let m,u=/\r?\n|\r/g,h;for(;m=u.exec(s.text);)h||(h=new zg(Bg.from(I.schema.text(" ",I.allowedMarks(s.marks))),0,0)),A.push(new cn(n+m.index,n+m.index+m[0].length,h))}}n=a}if(!C.validEnd){let l=C.fillBefore(Bg.empty,!0);e.replace(n,n,new zg(l,0,0))}for(let l=A.length-1;l>=0;l--)e.step(A[l])}function J7g(e,g,I){return(g==0||e.canReplace(g,e.childCount))&&(I==e.childCount||e.canReplace(0,I))}function Zm(e){let I=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let C=e.depth;;--C){let t=e.$from.node(C),i=e.$from.index(C),A=e.$to.indexAfter(C);if(C<e.depth&&t.canReplace(i,A,I))return C;if(C==0||t.type.spec.isolating||!J7g(t,i,A))break}return null}function L7g(e,g,I){let{$from:C,$to:t,depth:i}=g,A=C.before(i+1),n=t.after(i+1),l=A,s=n,a=Bg.empty,d=0;for(let h=i,Z=!1;h>I;h--)Z||C.index(h)>0?(Z=!0,a=Bg.from(C.node(h).copy(a)),d++):l--;let m=Bg.empty,u=0;for(let h=i,Z=!1;h>I;h--)Z||t.after(h+1)<t.end(h)?(Z=!0,m=Bg.from(t.node(h).copy(m)),u++):s++;e.step(new ai(l,s,A,n,new zg(a.append(m),d,u),a.size-d,!0))}function kN(e,g,I=null,C=e){let t=T7g(e,g),i=t&&v7g(C,g);return i?t.map(_K).concat({type:g,attrs:I}).concat(i.map(_K)):null}function _K(e){return{type:e,attrs:null}}function T7g(e,g){let{parent:I,startIndex:C,endIndex:t}=e,i=I.contentMatchAt(C).findWrapping(g);if(!i)return null;let A=i.length?i[0]:g;return I.canReplaceWith(C,t,A)?i:null}function v7g(e,g){let{parent:I,startIndex:C,endIndex:t}=e,i=I.child(C),A=g.contentMatch.findWrapping(i.type);if(!A)return null;let l=(A.length?A[A.length-1]:g).contentMatch;for(let s=C;l&&s<t;s++)l=l.matchType(I.child(s).type);return!l||!l.validEnd?null:A}function j7g(e,g,I){let C=Bg.empty;for(let A=I.length-1;A>=0;A--){if(C.size){let n=I[A].type.contentMatch.matchFragment(C);if(!n||!n.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}C=Bg.from(I[A].type.create(I[A].attrs,C))}let t=g.start,i=g.end;e.step(new ai(t,i,t,i,new zg(C,0,0),I.length,!0))}function x7g(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,(A,n)=>{let l=typeof t=="function"?t(A):t;if(A.isTextblock&&!A.hasMarkup(C,l)&&O7g(e.doc,e.mapping.slice(i).map(n),C)){let s=null;if(C.schema.linebreakReplacement){let u=C.whitespace=="pre",h=!!C.contentMatch.matchType(C.schema.linebreakReplacement);u&&!h?s=!1:!u&&h&&(s=!0)}s===!1&&qK(e,A,n,i),SN(e,e.mapping.slice(i).map(n,1),C,void 0,s===null);let a=e.mapping.slice(i),d=a.map(n,1),m=a.map(n+A.nodeSize,1);return e.step(new ai(d,m,d+1,m-1,new zg(Bg.from(C.create(l,null,A.marks)),0,0),1,!0)),s===!0&&$K(e,A,n,i),!1}})}function $K(e,g,I,C){g.forEach((t,i)=>{if(t.isText){let A,n=/\r?\n|\r/g;for(;A=n.exec(t.text);){let l=e.mapping.slice(C).map(I+1+i+A.index);e.replaceWith(l,l+1,g.type.schema.linebreakReplacement.create())}}})}function qK(e,g,I,C){g.forEach((t,i)=>{if(t.type==t.type.schema.linebreakReplacement){let A=e.mapping.slice(C).map(I+1+i);e.replaceWith(A,A+1,g.type.schema.text(`