@namba_one/ui-kit-2 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2923,7 +2923,7 @@ export declare type CheckboxGroupFilterType = {
2923
2923
  export declare type CheckboxGroupFilterValue = FilterValueBase<string[]>;
2924
2924
 
2925
2925
  export declare type CheckboxProps = {
2926
- value: boolean;
2926
+ value: Maybe<boolean>;
2927
2927
  size: (typeof sizes_9)[number];
2928
2928
  isIndeterminate?: boolean;
2929
2929
  isDisabled?: boolean;
@@ -4948,7 +4948,7 @@ declare const sizes_7: readonly ["large", "base", "small"];
4948
4948
 
4949
4949
  declare const sizes_8: readonly ["title1", "title2", "title3", "headline", "body", "subhead", "caption"];
4950
4950
 
4951
- declare const sizes_9: readonly ["16", "20"];
4951
+ declare const sizes_9: readonly ["16", "20", 16, 20];
4952
4952
 
4953
4953
  export declare const SkeletonWrapper: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
4954
4954
 
package/dist/index.es.js CHANGED
@@ -3283,7 +3283,7 @@ const G0 = {
3283
3283
  }), J0 = ["value"], e1 = /* @__PURE__ */ te({
3284
3284
  __name: "Checkbox",
3285
3285
  props: {
3286
- value: { type: Boolean },
3286
+ value: {},
3287
3287
  size: {},
3288
3288
  isIndeterminate: { type: Boolean, default: !1 },
3289
3289
  isDisabled: { type: Boolean }
@@ -3294,8 +3294,10 @@ const G0 = {
3294
3294
  return (o, r) => (v(), _("div", {
3295
3295
  class: m([
3296
3296
  o.$style.root,
3297
- o.$style[`size-${o.size}`],
3298
- (o.value || o.value === null) && o.$style.checked
3297
+ o.$style[`size-${o.size.toString()}`],
3298
+ {
3299
+ [o.$style.checked]: o.value || o.value === null
3300
+ }
3299
3301
  ]),
3300
3302
  onClick: r[1] || (r[1] = (s) => t("click", s))
3301
3303
  }, [
@@ -3311,7 +3313,7 @@ const G0 = {
3311
3313
  !o.isIndeterminate && o.value ? (v(), W(h(Le), {
3312
3314
  key: 0,
3313
3315
  name: "outline-check",
3314
- size: +o.size - 4,
3316
+ size: Number(o.size) - 4,
3315
3317
  color: "foreground-interactive-button-base-primary",
3316
3318
  class: m(o.$style.icon)
3317
3319
  }, null, 8, ["size", "class"])) : o.value ? (v(), _("div", {
package/dist/index.umd.js CHANGED
@@ -7,7 +7,7 @@
7
7
  * @author RubaXa <trash@rubaxa.org>
8
8
  * @author owenm <owen23355@gmail.com>
9
9
  * @license MIT
10
- */function Lu(o,e){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),n.push.apply(n,r)}return n}function _n(o){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lu(Object(n),!0).forEach(function(r){_y(o,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):Lu(Object(n)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(n,r))})}return o}function Da(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Da=function(e){return typeof e}:Da=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Da(o)}function _y(o,e,n){return e in o?Object.defineProperty(o,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[e]=n,o}function zn(){return zn=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[r]=n[r])}return o},zn.apply(this,arguments)}function vy(o,e){if(o==null)return{};var n={},r=Object.keys(o),a,s;for(s=0;s<r.length;s++)a=r[s],!(e.indexOf(a)>=0)&&(n[a]=o[a]);return n}function Cy(o,e){if(o==null)return{};var n=vy(o,e),r,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(o);for(a=0;a<s.length;a++)r=s[a],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(o,r)&&(n[r]=o[r])}return n}var $y="1.14.0";function Pn(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var Vn=Pn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Mr=Pn(/Edge/i),zu=Pn(/firefox/i),Nr=Pn(/safari/i)&&!Pn(/chrome/i)&&!Pn(/android/i),Pu=Pn(/iP(ad|od|hone)/i),Ey=Pn(/chrome/i)&&Pn(/android/i),Vu={capture:!1,passive:!1};function He(o,e,n){o.addEventListener(e,n,!Vn&&Vu)}function Fe(o,e,n){o.removeEventListener(e,n,!Vn&&Vu)}function Aa(o,e){if(e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function Sy(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function vn(o,e,n,r){if(o){n=n||document;do{if(e!=null&&(e[0]===">"?o.parentNode===n&&Aa(o,e):Aa(o,e))||r&&o===n)return o;if(o===n)break}while(o=Sy(o))}return null}var Fu=/\s+/g;function Yt(o,e,n){if(o&&e)if(o.classList)o.classList[n?"add":"remove"](e);else{var r=(" "+o.className+" ").replace(Fu," ").replace(" "+e+" "," ");o.className=(r+(n?" "+e:"")).replace(Fu," ")}}function $e(o,e,n){var r=o&&o.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(n=o.currentStyle),e===void 0?n:n[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=n+(typeof n=="string"?"":"px")}}function Zo(o,e){var n="";if(typeof o=="string")n=o;else do{var r=$e(o,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!e&&(o=o.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function Ru(o,e,n){if(o){var r=o.getElementsByTagName(e),a=0,s=r.length;if(n)for(;a<s;a++)n(r[a],a);return r}return[]}function Cn(){var o=document.scrollingElement;return o||document.documentElement}function kt(o,e,n,r,a){if(!(!o.getBoundingClientRect&&o!==window)){var s,i,l,c,d,h,u;if(o!==window&&o.parentNode&&o!==Cn()?(s=o.getBoundingClientRect(),i=s.top,l=s.left,c=s.bottom,d=s.right,h=s.height,u=s.width):(i=0,l=0,c=window.innerHeight,d=window.innerWidth,h=window.innerHeight,u=window.innerWidth),(e||n)&&o!==window&&(a=a||o.parentNode,!Vn))do if(a&&a.getBoundingClientRect&&($e(a,"transform")!=="none"||n&&$e(a,"position")!=="static")){var p=a.getBoundingClientRect();i-=p.top+parseInt($e(a,"border-top-width")),l-=p.left+parseInt($e(a,"border-left-width")),c=i+s.height,d=l+s.width;break}while(a=a.parentNode);if(r&&o!==window){var m=Zo(a||o),f=m&&m.a,g=m&&m.d;m&&(i/=g,l/=f,u/=f,h/=g,c=i+h,d=l+u)}return{top:i,left:l,bottom:c,right:d,width:u,height:h}}}function Hu(o,e,n){for(var r=Jn(o,!0),a=kt(o)[e];r;){var s=kt(r)[n],i=void 0;if(i=a>=s,!i)return r;if(r===Cn())break;r=Jn(r,!1)}return!1}function Jo(o,e,n,r){for(var a=0,s=0,i=o.children;s<i.length;){if(i[s].style.display!=="none"&&i[s]!==Ee.ghost&&(r||i[s]!==Ee.dragged)&&vn(i[s],n.draggable,o,!1)){if(a===e)return i[s];a++}s++}return null}function Ni(o,e){for(var n=o.lastElementChild;n&&(n===Ee.ghost||$e(n,"display")==="none"||e&&!Aa(n,e));)n=n.previousElementSibling;return n||null}function Jt(o,e){var n=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==Ee.clone&&(!e||Aa(o,e))&&n++;return n}function ju(o){var e=0,n=0,r=Cn();if(o)do{var a=Zo(o),s=a.a,i=a.d;e+=o.scrollLeft*s,n+=o.scrollTop*i}while(o!==r&&(o=o.parentNode));return[e,n]}function By(o,e){for(var n in o)if(o.hasOwnProperty(n)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===o[n][r])return Number(n)}return-1}function Jn(o,e){if(!o||!o.getBoundingClientRect)return Cn();var n=o,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=$e(n);if(n.clientWidth<n.scrollWidth&&(a.overflowX=="auto"||a.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(a.overflowY=="auto"||a.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Cn();if(r||e)return n;r=!0}}while(n=n.parentNode);return Cn()}function Ty(o,e){if(o&&e)for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);return o}function Di(o,e){return Math.round(o.top)===Math.round(e.top)&&Math.round(o.left)===Math.round(e.left)&&Math.round(o.height)===Math.round(e.height)&&Math.round(o.width)===Math.round(e.width)}var Dr;function Yu(o,e){return function(){if(!Dr){var n=arguments,r=this;n.length===1?o.call(r,n[0]):o.apply(r,n),Dr=setTimeout(function(){Dr=void 0},e)}}}function xy(){clearTimeout(Dr),Dr=void 0}function Uu(o,e,n){o.scrollLeft+=e,o.scrollTop+=n}function Wu(o){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(o).cloneNode(!0):n?n(o).clone(!0)[0]:o.cloneNode(!0)}var Ut="Sortable"+new Date().getTime();function My(){var o=[],e;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(a){if(!($e(a,"display")==="none"||a===Ee.ghost)){o.push({target:a,rect:kt(a)});var s=_n({},o[o.length-1].rect);if(a.thisAnimationDuration){var i=Zo(a,!0);i&&(s.top-=i.f,s.left-=i.e)}a.fromRect=s}})}},addAnimationState:function(r){o.push(r)},removeAnimationState:function(r){o.splice(By(o,{target:r}),1)},animateAll:function(r){var a=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var s=!1,i=0;o.forEach(function(l){var c=0,d=l.target,h=d.fromRect,u=kt(d),p=d.prevFromRect,m=d.prevToRect,f=l.rect,g=Zo(d,!0);g&&(u.top-=g.f,u.left-=g.e),d.toRect=u,d.thisAnimationDuration&&Di(p,u)&&!Di(h,u)&&(f.top-u.top)/(f.left-u.left)===(h.top-u.top)/(h.left-u.left)&&(c=Dy(f,p,m,a.options)),Di(u,h)||(d.prevFromRect=h,d.prevToRect=u,c||(c=a.options.animation),a.animate(d,f,u,c)),c&&(s=!0,i=Math.max(i,c),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},c),d.thisAnimationDuration=c)}),clearTimeout(e),s?e=setTimeout(function(){typeof r=="function"&&r()},i):typeof r=="function"&&r(),o=[]},animate:function(r,a,s,i){if(i){$e(r,"transition",""),$e(r,"transform","");var l=Zo(this.el),c=l&&l.a,d=l&&l.d,h=(a.left-s.left)/(c||1),u=(a.top-s.top)/(d||1);r.animatingX=!!h,r.animatingY=!!u,$e(r,"transform","translate3d("+h+"px,"+u+"px,0)"),this.forRepaintDummy=Ny(r),$e(r,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),$e(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){$e(r,"transition",""),$e(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},i)}}}}function Ny(o){return o.offsetWidth}function Dy(o,e,n,r){return Math.sqrt(Math.pow(e.top-o.top,2)+Math.pow(e.left-o.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var er=[],Ai={initializeByDefault:!0},Ar={mount:function(e){for(var n in Ai)Ai.hasOwnProperty(n)&&!(n in e)&&(e[n]=Ai[n]);er.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),er.push(e)},pluginEvent:function(e,n,r){var a=this;this.eventCanceled=!1,r.cancel=function(){a.eventCanceled=!0};var s=e+"Global";er.forEach(function(i){n[i.pluginName]&&(n[i.pluginName][s]&&n[i.pluginName][s](_n({sortable:n},r)),n.options[i.pluginName]&&n[i.pluginName][e]&&n[i.pluginName][e](_n({sortable:n},r)))})},initializePlugins:function(e,n,r,a){er.forEach(function(l){var c=l.pluginName;if(!(!e.options[c]&&!l.initializeByDefault)){var d=new l(e,n,e.options);d.sortable=e,d.options=e.options,e[c]=d,zn(r,d.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var i=this.modifyOption(e,s,e.options[s]);typeof i<"u"&&(e.options[s]=i)}},getEventProperties:function(e,n){var r={};return er.forEach(function(a){typeof a.eventProperties=="function"&&zn(r,a.eventProperties.call(n[a.pluginName],e))}),r},modifyOption:function(e,n,r){var a;return er.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[n]=="function"&&(a=s.optionListeners[n].call(e[s.pluginName],r))}),a}};function Ay(o){var e=o.sortable,n=o.rootEl,r=o.name,a=o.targetEl,s=o.cloneEl,i=o.toEl,l=o.fromEl,c=o.oldIndex,d=o.newIndex,h=o.oldDraggableIndex,u=o.newDraggableIndex,p=o.originalEvent,m=o.putSortable,f=o.extraEventProperties;if(e=e||n&&n[Ut],!!e){var g,k=e.options,$="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Vn&&!Mr?g=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(r,!0,!0)),g.to=i||n,g.from=l||n,g.item=a||n,g.clone=s,g.oldIndex=c,g.newIndex=d,g.oldDraggableIndex=h,g.newDraggableIndex=u,g.originalEvent=p,g.pullMode=m?m.lastPutMode:void 0;var C=_n(_n({},f),Ar.getEventProperties(r,e));for(var B in C)g[B]=C[B];n&&n.dispatchEvent(g),k[$]&&k[$].call(e,g)}}var Iy=["evt"],Rt=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.evt,s=Cy(r,Iy);Ar.pluginEvent.bind(Ee)(e,n,_n({dragEl:he,parentEl:st,ghostEl:De,rootEl:Je,nextEl:Bo,lastDownEl:Ia,cloneEl:it,cloneHidden:eo,dragStarted:Or,putSortable:$t,activeSortable:Ee.active,originalEvent:a,oldIndex:tr,oldDraggableIndex:Ir,newIndex:Wt,newDraggableIndex:to,hideGhostForTarget:Ju,unhideGhostForTarget:eh,cloneNowHidden:function(){eo=!0},cloneNowShown:function(){eo=!1},dispatchSortableEvent:function(l){It({sortable:n,name:l,originalEvent:a})}},s))};function It(o){Ay(_n({putSortable:$t,cloneEl:it,targetEl:he,rootEl:Je,oldIndex:tr,oldDraggableIndex:Ir,newIndex:Wt,newDraggableIndex:to},o))}var he,st,De,Je,Bo,Ia,it,eo,tr,Wt,Ir,to,Oa,$t,nr=!1,La=!1,za=[],To,ln,Ii,Oi,Gu,qu,Or,or,Lr,zr=!1,Pa=!1,Va,Bt,Li=[],zi=!1,Fa=[],Ra=typeof document<"u",Ha=Pu,Ku=Mr||Vn?"cssFloat":"float",Oy=Ra&&!Ey&&!Pu&&"draggable"in document.createElement("div"),Xu=function(){if(Ra){if(Vn)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Qu=function(e,n){var r=$e(e),a=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),s=Jo(e,0,n),i=Jo(e,1,n),l=s&&$e(s),c=i&&$e(i),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+kt(s).width,h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+kt(i).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return i&&(c.clear==="both"||c.clear===u)?"vertical":"horizontal"}return s&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=a&&r[Ku]==="none"||i&&r[Ku]==="none"&&d+h>a)?"vertical":"horizontal"},Ly=function(e,n,r){var a=r?e.left:e.top,s=r?e.right:e.bottom,i=r?e.width:e.height,l=r?n.left:n.top,c=r?n.right:n.bottom,d=r?n.width:n.height;return a===l||s===c||a+i/2===l+d/2},zy=function(e,n){var r;return za.some(function(a){var s=a[Ut].options.emptyInsertThreshold;if(!(!s||Ni(a))){var i=kt(a),l=e>=i.left-s&&e<=i.right+s,c=n>=i.top-s&&n<=i.bottom+s;if(l&&c)return r=a}}),r},Zu=function(e){function n(s,i){return function(l,c,d,h){var u=l.options.group.name&&c.options.group.name&&l.options.group.name===c.options.group.name;if(s==null&&(i||u))return!0;if(s==null||s===!1)return!1;if(i&&s==="clone")return s;if(typeof s=="function")return n(s(l,c,d,h),i)(l,c,d,h);var p=(i?l:c).options.group.name;return s===!0||typeof s=="string"&&s===p||s.join&&s.indexOf(p)>-1}}var r={},a=e.group;(!a||Da(a)!="object")&&(a={name:a}),r.name=a.name,r.checkPull=n(a.pull,!0),r.checkPut=n(a.put),r.revertClone=a.revertClone,e.group=r},Ju=function(){!Xu&&De&&$e(De,"display","none")},eh=function(){!Xu&&De&&$e(De,"display","")};Ra&&document.addEventListener("click",function(o){if(La)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),La=!1,!1},!0);var xo=function(e){if(he){e=e.touches?e.touches[0]:e;var n=zy(e.clientX,e.clientY);if(n){var r={};for(var a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[Ut]._onDragOver(r)}}},Py=function(e){he&&he.parentNode[Ut]._isOutsideThisEl(e.target)};function Ee(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=zn({},e),o[Ut]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Qu(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,l){i.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ee.supportPointer!==!1&&"PointerEvent"in window&&!Nr,emptyInsertThreshold:5};Ar.initializePlugins(this,o,n);for(var r in n)!(r in e)&&(e[r]=n[r]);Zu(e);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=e.forceFallback?!1:Oy,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?He(o,"pointerdown",this._onTapStart):(He(o,"mousedown",this._onTapStart),He(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(He(o,"dragover",this),He(o,"dragenter",this)),za.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),zn(this,My())}Ee.prototype={constructor:Ee,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(or=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,he):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,r=this.el,a=this.options,s=a.preventOnFilter,i=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,c=(l||e).target,d=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||c,h=a.filter;if(Wy(r),!he&&!(/mousedown|pointerdown/.test(i)&&e.button!==0||a.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Nr&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=vn(c,a.draggable,r,!1),!(c&&c.animated)&&Ia!==c)){if(tr=Jt(c),Ir=Jt(c,a.draggable),typeof h=="function"){if(h.call(this,e,c,this)){It({sortable:n,rootEl:d,name:"filter",targetEl:c,toEl:r,fromEl:r}),Rt("filter",n,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(h&&(h=h.split(",").some(function(u){if(u=vn(d,u.trim(),r,!1),u)return It({sortable:n,rootEl:u,name:"filter",targetEl:c,fromEl:r,toEl:r}),Rt("filter",n,{evt:e}),!0}),h)){s&&e.cancelable&&e.preventDefault();return}a.handle&&!vn(d,a.handle,r,!1)||this._prepareDragStart(e,l,c)}}},_prepareDragStart:function(e,n,r){var a=this,s=a.el,i=a.options,l=s.ownerDocument,c;if(r&&!he&&r.parentNode===s){var d=kt(r);if(Je=s,he=r,st=he.parentNode,Bo=he.nextSibling,Ia=r,Oa=i.group,Ee.dragged=he,To={target:he,clientX:(n||e).clientX,clientY:(n||e).clientY},Gu=To.clientX-d.left,qu=To.clientY-d.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,he.style["will-change"]="all",c=function(){if(Rt("delayEnded",a,{evt:e}),Ee.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!zu&&a.nativeDraggable&&(he.draggable=!0),a._triggerDragStart(e,n),It({sortable:a,name:"choose",originalEvent:e}),Yt(he,i.chosenClass,!0)},i.ignore.split(",").forEach(function(h){Ru(he,h.trim(),Pi)}),He(l,"dragover",xo),He(l,"mousemove",xo),He(l,"touchmove",xo),He(l,"mouseup",a._onDrop),He(l,"touchend",a._onDrop),He(l,"touchcancel",a._onDrop),zu&&this.nativeDraggable&&(this.options.touchStartThreshold=4,he.draggable=!0),Rt("delayStart",this,{evt:e}),i.delay&&(!i.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Mr||Vn))){if(Ee.eventCanceled){this._onDrop();return}He(l,"mouseup",a._disableDelayedDrag),He(l,"touchend",a._disableDelayedDrag),He(l,"touchcancel",a._disableDelayedDrag),He(l,"mousemove",a._delayedDragTouchMoveHandler),He(l,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&He(l,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(c,i.delay)}else c()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){he&&Pi(he),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Fe(e,"mouseup",this._disableDelayedDrag),Fe(e,"touchend",this._disableDelayedDrag),Fe(e,"touchcancel",this._disableDelayedDrag),Fe(e,"mousemove",this._delayedDragTouchMoveHandler),Fe(e,"touchmove",this._delayedDragTouchMoveHandler),Fe(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?He(document,"pointermove",this._onTouchMove):n?He(document,"touchmove",this._onTouchMove):He(document,"mousemove",this._onTouchMove):(He(he,"dragend",this),He(Je,"dragstart",this._onDragStart));try{document.selection?Ya(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(nr=!1,Je&&he){Rt("dragStarted",this,{evt:n}),this.nativeDraggable&&He(document,"dragover",Py);var r=this.options;!e&&Yt(he,r.dragClass,!1),Yt(he,r.ghostClass,!0),Ee.active=this,e&&this._appendGhost(),It({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ln){this._lastX=ln.clientX,this._lastY=ln.clientY,Ju();for(var e=document.elementFromPoint(ln.clientX,ln.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ln.clientX,ln.clientY),e!==n);)n=e;if(he.parentNode[Ut]._isOutsideThisEl(e),n)do{if(n[Ut]){var r=void 0;if(r=n[Ut]._onDragOver({clientX:ln.clientX,clientY:ln.clientY,target:e,rootEl:n}),r&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);eh()}},_onTouchMove:function(e){if(To){var n=this.options,r=n.fallbackTolerance,a=n.fallbackOffset,s=e.touches?e.touches[0]:e,i=De&&Zo(De,!0),l=De&&i&&i.a,c=De&&i&&i.d,d=Ha&&Bt&&ju(Bt),h=(s.clientX-To.clientX+a.x)/(l||1)+(d?d[0]-Li[0]:0)/(l||1),u=(s.clientY-To.clientY+a.y)/(c||1)+(d?d[1]-Li[1]:0)/(c||1);if(!Ee.active&&!nr){if(r&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(De){i?(i.e+=h-(Ii||0),i.f+=u-(Oi||0)):i={a:1,b:0,c:0,d:1,e:h,f:u};var p="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");$e(De,"webkitTransform",p),$e(De,"mozTransform",p),$e(De,"msTransform",p),$e(De,"transform",p),Ii=h,Oi=u,ln=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!De){var e=this.options.fallbackOnBody?document.body:Je,n=kt(he,!0,Ha,!0,e),r=this.options;if(Ha){for(Bt=e;$e(Bt,"position")==="static"&&$e(Bt,"transform")==="none"&&Bt!==document;)Bt=Bt.parentNode;Bt!==document.body&&Bt!==document.documentElement?(Bt===document&&(Bt=Cn()),n.top+=Bt.scrollTop,n.left+=Bt.scrollLeft):Bt=Cn(),Li=ju(Bt)}De=he.cloneNode(!0),Yt(De,r.ghostClass,!1),Yt(De,r.fallbackClass,!0),Yt(De,r.dragClass,!0),$e(De,"transition",""),$e(De,"transform",""),$e(De,"box-sizing","border-box"),$e(De,"margin",0),$e(De,"top",n.top),$e(De,"left",n.left),$e(De,"width",n.width),$e(De,"height",n.height),$e(De,"opacity","0.8"),$e(De,"position",Ha?"absolute":"fixed"),$e(De,"zIndex","100000"),$e(De,"pointerEvents","none"),Ee.ghost=De,e.appendChild(De),$e(De,"transform-origin",Gu/parseInt(De.style.width)*100+"% "+qu/parseInt(De.style.height)*100+"%")}},_onDragStart:function(e,n){var r=this,a=e.dataTransfer,s=r.options;if(Rt("dragStart",this,{evt:e}),Ee.eventCanceled){this._onDrop();return}Rt("setupClone",this),Ee.eventCanceled||(it=Wu(he),it.draggable=!1,it.style["will-change"]="",this._hideClone(),Yt(it,this.options.chosenClass,!1),Ee.clone=it),r.cloneId=Ya(function(){Rt("clone",r),!Ee.eventCanceled&&(r.options.removeCloneOnHide||Je.insertBefore(it,he),r._hideClone(),It({sortable:r,name:"clone"}))}),!n&&Yt(he,s.dragClass,!0),n?(La=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Fe(document,"mouseup",r._onDrop),Fe(document,"touchend",r._onDrop),Fe(document,"touchcancel",r._onDrop),a&&(a.effectAllowed="move",s.setData&&s.setData.call(r,a,he)),He(document,"drop",r),$e(he,"transform","translateZ(0)")),nr=!0,r._dragStartId=Ya(r._dragStarted.bind(r,n,e)),He(document,"selectstart",r),Or=!0,Nr&&$e(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,r=e.target,a,s,i,l=this.options,c=l.group,d=Ee.active,h=Oa===c,u=l.sort,p=$t||d,m,f=this,g=!1;if(zi)return;function k(z,V){Rt(z,f,_n({evt:e,isOwner:h,axis:m?"vertical":"horizontal",revert:i,dragRect:a,targetRect:s,canSort:u,fromSortable:p,target:r,completed:C,onMove:function(F,ae){return ja(Je,n,he,a,F,kt(F),e,ae)},changed:B},V))}function $(){k("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function C(z){return k("dragOverCompleted",{insertion:z}),z&&(h?d._hideClone():d._showClone(f),f!==p&&(Yt(he,$t?$t.options.ghostClass:d.options.ghostClass,!1),Yt(he,l.ghostClass,!0)),$t!==f&&f!==Ee.active?$t=f:f===Ee.active&&$t&&($t=null),p===f&&(f._ignoreWhileAnimating=r),f.animateAll(function(){k("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===he&&!he.animated||r===n&&!r.animated)&&(or=null),!l.dragoverBubble&&!e.rootEl&&r!==document&&(he.parentNode[Ut]._isOutsideThisEl(e.target),!z&&xo(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),g=!0}function B(){Wt=Jt(he),to=Jt(he,l.draggable),It({sortable:f,name:"change",toEl:n,newIndex:Wt,newDraggableIndex:to,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=vn(r,l.draggable,n,!0),k("dragOver"),Ee.eventCanceled)return g;if(he.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||f._ignoreWhileAnimating===r)return C(!1);if(La=!1,d&&!l.disabled&&(h?u||(i=st!==Je):$t===this||(this.lastPutMode=Oa.checkPull(this,d,he,e))&&c.checkPut(this,d,he,e))){if(m=this._getDirection(e,r)==="vertical",a=kt(he),k("dragOverValid"),Ee.eventCanceled)return g;if(i)return st=Je,$(),this._hideClone(),k("revert"),Ee.eventCanceled||(Bo?Je.insertBefore(he,Bo):Je.appendChild(he)),C(!0);var T=Ni(n,l.draggable);if(!T||Hy(e,m,this)&&!T.animated){if(T===he)return C(!1);if(T&&n===e.target&&(r=T),r&&(s=kt(r)),ja(Je,n,he,a,r,s,e,!!r)!==!1)return $(),n.appendChild(he),st=n,B(),C(!0)}else if(T&&Ry(e,m,this)){var M=Jo(n,0,l,!0);if(M===he)return C(!1);if(r=M,s=kt(r),ja(Je,n,he,a,r,s,e,!1)!==!1)return $(),n.insertBefore(he,M),st=n,B(),C(!0)}else if(r.parentNode===n){s=kt(r);var I=0,L,D=he.parentNode!==n,w=!Ly(he.animated&&he.toRect||a,r.animated&&r.toRect||s,m),b=m?"top":"left",N=Hu(r,"top","top")||Hu(he,"top","top"),H=N?N.scrollTop:void 0;or!==r&&(L=s[b],zr=!1,Pa=!w&&l.invertSwap||D),I=jy(e,r,s,m,w?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Pa,or===r);var K;if(I!==0){var v=Jt(he);do v-=I,K=st.children[v];while(K&&($e(K,"display")==="none"||K===De))}if(I===0||K===r)return C(!1);or=r,Lr=I;var _=r.nextElementSibling,E=!1;E=I===1;var O=ja(Je,n,he,a,r,s,e,E);if(O!==!1)return(O===1||O===-1)&&(E=O===1),zi=!0,setTimeout(Fy,30),$(),E&&!_?n.appendChild(he):r.parentNode.insertBefore(he,E?_:r),N&&Uu(N,0,H-N.scrollTop),st=he.parentNode,L!==void 0&&!Pa&&(Va=Math.abs(L-kt(r)[b])),B(),C(!0)}if(n.contains(he))return C(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Fe(document,"mousemove",this._onTouchMove),Fe(document,"touchmove",this._onTouchMove),Fe(document,"pointermove",this._onTouchMove),Fe(document,"dragover",xo),Fe(document,"mousemove",xo),Fe(document,"touchmove",xo)},_offUpEvents:function(){var e=this.el.ownerDocument;Fe(e,"mouseup",this._onDrop),Fe(e,"touchend",this._onDrop),Fe(e,"pointerup",this._onDrop),Fe(e,"touchcancel",this._onDrop),Fe(document,"selectstart",this)},_onDrop:function(e){var n=this.el,r=this.options;if(Wt=Jt(he),to=Jt(he,r.draggable),Rt("drop",this,{evt:e}),st=he&&he.parentNode,Wt=Jt(he),to=Jt(he,r.draggable),Ee.eventCanceled){this._nulling();return}nr=!1,Pa=!1,zr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vi(this.cloneId),Vi(this._dragStartId),this.nativeDraggable&&(Fe(document,"drop",this),Fe(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Nr&&$e(document.body,"user-select",""),$e(he,"transform",""),e&&(Or&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),De&&De.parentNode&&De.parentNode.removeChild(De),(Je===st||$t&&$t.lastPutMode!=="clone")&&it&&it.parentNode&&it.parentNode.removeChild(it),he&&(this.nativeDraggable&&Fe(he,"dragend",this),Pi(he),he.style["will-change"]="",Or&&!nr&&Yt(he,$t?$t.options.ghostClass:this.options.ghostClass,!1),Yt(he,this.options.chosenClass,!1),It({sortable:this,name:"unchoose",toEl:st,newIndex:null,newDraggableIndex:null,originalEvent:e}),Je!==st?(Wt>=0&&(It({rootEl:st,name:"add",toEl:st,fromEl:Je,originalEvent:e}),It({sortable:this,name:"remove",toEl:st,originalEvent:e}),It({rootEl:st,name:"sort",toEl:st,fromEl:Je,originalEvent:e}),It({sortable:this,name:"sort",toEl:st,originalEvent:e})),$t&&$t.save()):Wt!==tr&&Wt>=0&&(It({sortable:this,name:"update",toEl:st,originalEvent:e}),It({sortable:this,name:"sort",toEl:st,originalEvent:e})),Ee.active&&((Wt==null||Wt===-1)&&(Wt=tr,to=Ir),It({sortable:this,name:"end",toEl:st,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Rt("nulling",this),Je=he=st=De=Bo=it=Ia=eo=To=ln=Or=Wt=to=tr=Ir=or=Lr=$t=Oa=Ee.dragged=Ee.ghost=Ee.clone=Ee.active=null,Fa.forEach(function(e){e.checked=!0}),Fa.length=Ii=Oi=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":he&&(this._onDragOver(e),Vy(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,r=this.el.children,a=0,s=r.length,i=this.options;a<s;a++)n=r[a],vn(n,i.draggable,this.el,!1)&&e.push(n.getAttribute(i.dataIdAttr)||Uy(n));return e},sort:function(e,n){var r={},a=this.el;this.toArray().forEach(function(s,i){var l=a.children[i];vn(l,this.options.draggable,a,!1)&&(r[s]=l)},this),n&&this.captureAnimationState(),e.forEach(function(s){r[s]&&(a.removeChild(r[s]),a.appendChild(r[s]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return vn(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var r=this.options;if(n===void 0)return r[e];var a=Ar.modifyOption(this,e,n);typeof a<"u"?r[e]=a:r[e]=n,e==="group"&&Zu(r)},destroy:function(){Rt("destroy",this);var e=this.el;e[Ut]=null,Fe(e,"mousedown",this._onTapStart),Fe(e,"touchstart",this._onTapStart),Fe(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Fe(e,"dragover",this),Fe(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),za.splice(za.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!eo){if(Rt("hideClone",this),Ee.eventCanceled)return;$e(it,"display","none"),this.options.removeCloneOnHide&&it.parentNode&&it.parentNode.removeChild(it),eo=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(eo){if(Rt("showClone",this),Ee.eventCanceled)return;he.parentNode==Je&&!this.options.group.revertClone?Je.insertBefore(it,he):Bo?Je.insertBefore(it,Bo):Je.appendChild(it),this.options.group.revertClone&&this.animate(he,it),$e(it,"display",""),eo=!1}}};function Vy(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function ja(o,e,n,r,a,s,i,l){var c,d=o[Ut],h=d.options.onMove,u;return window.CustomEvent&&!Vn&&!Mr?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=e,c.from=o,c.dragged=n,c.draggedRect=r,c.related=a||e,c.relatedRect=s||kt(e),c.willInsertAfter=l,c.originalEvent=i,o.dispatchEvent(c),h&&(u=h.call(d,c,i)),u}function Pi(o){o.draggable=!1}function Fy(){zi=!1}function Ry(o,e,n){var r=kt(Jo(n.el,0,n.options,!0)),a=10;return e?o.clientX<r.left-a||o.clientY<r.top&&o.clientX<r.right:o.clientY<r.top-a||o.clientY<r.bottom&&o.clientX<r.left}function Hy(o,e,n){var r=kt(Ni(n.el,n.options.draggable)),a=10;return e?o.clientX>r.right+a||o.clientX<=r.right&&o.clientY>r.bottom&&o.clientX>=r.left:o.clientX>r.right&&o.clientY>r.top||o.clientX<=r.right&&o.clientY>r.bottom+a}function jy(o,e,n,r,a,s,i,l){var c=r?o.clientY:o.clientX,d=r?n.height:n.width,h=r?n.top:n.left,u=r?n.bottom:n.right,p=!1;if(!i){if(l&&Va<d*a){if(!zr&&(Lr===1?c>h+d*s/2:c<u-d*s/2)&&(zr=!0),zr)p=!0;else if(Lr===1?c<h+Va:c>u-Va)return-Lr}else if(c>h+d*(1-a)/2&&c<u-d*(1-a)/2)return Yy(e)}return p=p||i,p&&(c<h+d*s/2||c>u-d*s/2)?c>h+d/2?1:-1:0}function Yy(o){return Jt(he)<Jt(o)?1:-1}function Uy(o){for(var e=o.tagName+o.className+o.src+o.href+o.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Wy(o){Fa.length=0;for(var e=o.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&Fa.push(r)}}function Ya(o){return setTimeout(o,0)}function Vi(o){return clearTimeout(o)}Ra&&He(document,"touchmove",function(o){(Ee.active||nr)&&o.cancelable&&o.preventDefault()}),Ee.utils={on:He,off:Fe,css:$e,find:Ru,is:function(e,n){return!!vn(e,n,e,!1)},extend:Ty,throttle:Yu,closest:vn,toggleClass:Yt,clone:Wu,index:Jt,nextTick:Ya,cancelNextTick:Vi,detectDirection:Qu,getChild:Jo},Ee.get=function(o){return o[Ut]},Ee.mount=function(){for(var o=arguments.length,e=new Array(o),n=0;n<o;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(Ee.utils=_n(_n({},Ee.utils),r.utils)),Ar.mount(r)})},Ee.create=function(o,e){return new Ee(o,e)},Ee.version=$y;var yt=[],Pr,Fi,Ri=!1,Hi,ji,Ua,Vr;function Gy(){function o(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return o.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?He(document,"dragover",this._handleAutoScroll):this.options.supportPointer?He(document,"pointermove",this._handleFallbackAutoScroll):r.touches?He(document,"touchmove",this._handleFallbackAutoScroll):He(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Fe(document,"dragover",this._handleAutoScroll):(Fe(document,"pointermove",this._handleFallbackAutoScroll),Fe(document,"touchmove",this._handleFallbackAutoScroll),Fe(document,"mousemove",this._handleFallbackAutoScroll)),th(),Wa(),xy()},nulling:function(){Ua=Fi=Pr=Ri=Vr=Hi=ji=null,yt.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var a=this,s=(n.touches?n.touches[0]:n).clientX,i=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(s,i);if(Ua=n,r||this.options.forceAutoScrollFallback||Mr||Vn||Nr){Yi(n,this.options,l,r);var c=Jn(l,!0);Ri&&(!Vr||s!==Hi||i!==ji)&&(Vr&&th(),Vr=setInterval(function(){var d=Jn(document.elementFromPoint(s,i),!0);d!==c&&(c=d,Wa()),Yi(n,a.options,d,r)},10),Hi=s,ji=i)}else{if(!this.options.bubbleScroll||Jn(l,!0)===Cn()){Wa();return}Yi(n,this.options,Jn(l,!1),!1)}}},zn(o,{pluginName:"scroll",initializeByDefault:!0})}function Wa(){yt.forEach(function(o){clearInterval(o.pid)}),yt=[]}function th(){clearInterval(Vr)}var Yi=Yu(function(o,e,n,r){if(e.scroll){var a=(o.touches?o.touches[0]:o).clientX,s=(o.touches?o.touches[0]:o).clientY,i=e.scrollSensitivity,l=e.scrollSpeed,c=Cn(),d=!1,h;Fi!==n&&(Fi=n,Wa(),Pr=e.scroll,h=e.scrollFn,Pr===!0&&(Pr=Jn(n,!0)));var u=0,p=Pr;do{var m=p,f=kt(m),g=f.top,k=f.bottom,$=f.left,C=f.right,B=f.width,T=f.height,M=void 0,I=void 0,L=m.scrollWidth,D=m.scrollHeight,w=$e(m),b=m.scrollLeft,N=m.scrollTop;m===c?(M=B<L&&(w.overflowX==="auto"||w.overflowX==="scroll"||w.overflowX==="visible"),I=T<D&&(w.overflowY==="auto"||w.overflowY==="scroll"||w.overflowY==="visible")):(M=B<L&&(w.overflowX==="auto"||w.overflowX==="scroll"),I=T<D&&(w.overflowY==="auto"||w.overflowY==="scroll"));var H=M&&(Math.abs(C-a)<=i&&b+B<L)-(Math.abs($-a)<=i&&!!b),K=I&&(Math.abs(k-s)<=i&&N+T<D)-(Math.abs(g-s)<=i&&!!N);if(!yt[u])for(var v=0;v<=u;v++)yt[v]||(yt[v]={});(yt[u].vx!=H||yt[u].vy!=K||yt[u].el!==m)&&(yt[u].el=m,yt[u].vx=H,yt[u].vy=K,clearInterval(yt[u].pid),(H!=0||K!=0)&&(d=!0,yt[u].pid=setInterval((function(){r&&this.layer===0&&Ee.active._onTouchMove(Ua);var _=yt[this.layer].vy?yt[this.layer].vy*l:0,E=yt[this.layer].vx?yt[this.layer].vx*l:0;typeof h=="function"&&h.call(Ee.dragged.parentNode[Ut],E,_,o,Ua,yt[this.layer].el)!=="continue"||Uu(yt[this.layer].el,E,_)}).bind({layer:u}),24))),u++}while(e.bubbleScroll&&p!==c&&(p=Jn(p,!1)));Ri=d}},30),nh=function(e){var n=e.originalEvent,r=e.putSortable,a=e.dragEl,s=e.activeSortable,i=e.dispatchSortableEvent,l=e.hideGhostForTarget,c=e.unhideGhostForTarget;if(n){var d=r||s;l();var h=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,u=document.elementFromPoint(h.clientX,h.clientY);c(),d&&!d.el.contains(u)&&(i("spill"),this.onSpill({dragEl:a,putSortable:r}))}};function Ui(){}Ui.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var a=Jo(this.sortable.el,this.startIndex,this.options);a?this.sortable.el.insertBefore(n,a):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:nh},zn(Ui,{pluginName:"revertOnSpill"});function Wi(){}Wi.prototype={onSpill:function(e){var n=e.dragEl,r=e.putSortable,a=r||this.sortable;a.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),a.animateAll()},drop:nh},zn(Wi,{pluginName:"removeOnSpill"}),Ee.mount(new Gy),Ee.mount(Wi,Ui);function qy(){return typeof window<"u"?window.console:global.console}const Ky=qy();function Xy(o){const e=Object.create(null);return function(r){return e[r]||(e[r]=o(r))}}const Qy=/-(\w)/g,oh=Xy(o=>o.replace(Qy,(e,n)=>n?n.toUpperCase():""));function Gi(o){o.parentElement!==null&&o.parentElement.removeChild(o)}function rh(o,e,n){const r=n===0?o.children[0]:o.children[n-1].nextSibling;o.insertBefore(e,r)}function Zy(o,e){return Object.values(o).indexOf(e)}function Jy(o,e,n,r){if(!o)return[];const a=Object.values(o),s=e.length-r;return[...e].map((l,c)=>c>=s?a.length:a.indexOf(l))}function ah(o,e){this.$nextTick(()=>this.$emit(o.toLowerCase(),e))}function eb(o){return e=>{this.realList!==null&&this["onDrag"+o](e),ah.call(this,o,e)}}function tb(o){return["transition-group","TransitionGroup"].includes(o)}function nb(o){if(!o||o.length!==1)return!1;const[{type:e}]=o;return e?tb(e.name):!1}function ob(o,e){return e?{...e.props,...e.attrs}:o}const qi=["Start","Add","Remove","Update","End"],Ki=["Choose","Unchoose","Sort","Filter","Clone"],rb=["Move",...qi,...Ki].map(o=>"on"+o);let Xi=null;const ab={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:o=>o},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},sh=t.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...qi.map(o=>o.toLowerCase()),...Ki.map(o=>o.toLowerCase())],props:ab,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const o=this.$slots.default?this.$slots.default():null,e=ob(this.$attrs,this.componentData);return o?(this.transitionMode=nb(o),t.h(this.getTag(),e,o)):t.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&Ky.error("list props are mutually exclusive! Please set one.")},mounted(){const o={};qi.forEach(a=>{o["on"+a]=eb.call(this,a)}),Ki.forEach(a=>{o["on"+a]=ah.bind(this,a)});const e=Object.keys(this.$attrs).reduce((a,s)=>(a[oh(s)]=this.$attrs[s],a),{}),n=Object.assign({},e,o,{onMove:(a,s)=>this.onDragMove(a,s)});!("draggable"in n)&&(n.draggable=">*");const r=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new Ee(r,n),r.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(o){this.updateOptions(o)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?t.resolveComponent(this.component):this.tag},updateOptions(o){for(var e in o){const n=oh(e);rb.indexOf(n)===-1&&this._sortable.option(n,o[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=Jy(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(o){const e=Zy(this.getChildrenNodes()||[],o);if(e===-1)return null;const n=this.realList[e];return{index:e,element:n}},emitChanges(o){this.$nextTick(()=>{this.$emit("change",o)})},alterList(o){if(this.list){o(this.list);return}const e=[...this.modelValue];o(e),this.$emit("update:modelValue",e)},spliceList(){const o=e=>e.splice(...arguments);this.alterList(o)},updatePosition(o,e){const n=r=>r.splice(e,0,r.splice(o,1)[0]);this.alterList(n)},getVmIndex(o){const e=this.visibleIndexes,n=e.length;return o>n-1?n:e[o]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(o){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[o].data=null;const n=this.getComponent();n.children=[],n.kept=void 0},onDragStart(o){this.computeIndexes(),this.context=this.getUnderlyingVm(o.item),this.context&&(o.item._underlying_vm_=this.clone(this.context.element),Xi=o.item)},onDragAdd(o){const e=o.item._underlying_vm_;if(e===void 0)return;Gi(o.item);const n=this.getVmIndex(o.newIndex);this.spliceList(n,0,e),this.computeIndexes();const r={element:e,newIndex:n};this.emitChanges({added:r})},onDragRemove(o){if(rh(this.$el,o.item,o.oldIndex),o.pullMode==="clone"){Gi(o.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})},onDragUpdate(o){Gi(o.item),rh(o.from,o.item,o.oldIndex);const e=this.context.index,n=this.getVmIndex(o.newIndex);this.updatePosition(e,n);const r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},updateProperty(o,e){o.hasOwnProperty(e)&&(o[e]+=this.headerOffset)},onDragMove(o,e){const n=this.move;if(!n||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(o),a=this.context,s=this.computeFutureIndex(r,o);Object.assign(a,{futureIndex:s});const i=Object.assign({},o,{relatedContext:r,draggedContext:a});return n(i,e)},onDragEnd(){this.computeIndexes(),Xi=null},getTrargetedComponent(o){return o.__draggable_component__},getRelatedContextFromMoveEvent({to:o,related:e}){const n=this.getTrargetedComponent(o);if(!n)return{component:n};const r=n.realList,a={list:r,component:n};if(o!==e&&r&&n.getUnderlyingVm){const s=n.getUnderlyingVm(e);if(s)return Object.assign(s,a)}return a},computeFutureIndex(o,e){const n=[...e.to.children].filter(i=>i.style.display!=="none");if(n.length===0)return 0;const r=n.indexOf(e.related),a=o.component.getVmIndex(r);return n.indexOf(Xi)!==-1||!e.willInsertAfter?a:a+1}}}),sb=t.defineComponent({__name:"CardContentList",props:t.mergeModels({list:{},isSortable:{type:Boolean}},{list:{required:!0},listModifiers:{}}),emits:["update:list"],setup(o){const e=t.useModel(o,"list"),n=t.ref(),r=t.ref(!0);function a(d,h){const u=[...e.value],p={...u[d]};p.value=h,u[d]=p,e.value=u}function s(d,h){const u=h==="up"?d-1:d+1;if(u<0||u>=e.value.length)return;const p=[...e.value],m={...p[d]};p[d]=p[u],p[u]=m,e.value=p}function i(d){n.value=d.oldIndex}function l(){return o.isSortable}function c(){r.value=!1}return(d,h)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(d.$style.root)},[t.createVNode(t.unref(sh),{modelValue:e.value,"onUpdate:modelValue":h[0]||(h[0]=u=>e.value=u),filter:`.${d.$style["is-disabled"]}`,move:l,class:t.normalizeClass(d.$style.list),transitionMode:"",noTransitionOnDrag:!1,onStart:c,onEnd:h[1]||(h[1]=u=>r.value=!0),onChoose:i,onUnchoose:h[2]||(h[2]=u=>n.value=null)},{default:t.withCtx(()=>[t.createVNode(t.TransitionGroup,{type:"transition",name:r.value?"flip-list":void 0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(u,p)=>(t.openBlock(),t.createBlock(t.unref(Iu),{key:u.title+u.description+u.image,isSortable:d.isSortable,isChosen:p===n.value,title:u.title,description:u.description,image:u.image,value:u.value,class:t.normalizeClass({[d.$style["is-disabled"]]:!d.isSortable}),"onUpdate:value":m=>a(p,m),onClickMoveUp:m=>s(p,"up"),onClickMoveDown:m=>s(p,"down")},null,8,["isSortable","isChosen","title","description","image","value","class","onUpdate:value","onClickMoveUp","onClickMoveDown"]))),128))]),_:1},8,["name"])]),_:1},8,["modelValue","filter","class"])],2))}}),ih={"is-disabled":"CardContentList__is-disabled_f57bc",list:"CardContentList__list_df4a5"},ib=X(sb,[["__cssModules",{$style:ih}]]),lb=X(t.defineComponent({__name:"CardContentListSkeleton",setup(o){return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.$style.root)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.list)},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(4,r=>t.createVNode(t.unref(Ou),{key:r})),64))],2)],2))}}),[["__cssModules",{$style:ih}]]),Ga={"fade-enter-active":"TransitionFade__fade-enter-active_b9e5e","fade-leave-active":"TransitionFade__fade-leave-active_95a44","fade-enter-from":"TransitionFade__fade-enter-from_edaa1","fade-leave-to":"TransitionFade__fade-leave-to_013a6"},Mo=t.defineComponent({name:"TransitionFade",props:{appear:{type:Boolean,default:!1},mode:{type:String,default:"out-in"},duration:{type:Number,default:450}},setup(o,{slots:e}){return()=>t.h(t.Transition,{name:"fade",appear:o.appear,mode:o.mode,duration:o.duration,enterFromClass:Ga["fade-enter-from"],enterActiveClass:Ga["fade-enter-active"],leaveActiveClass:Ga["fade-leave-active"],leaveToClass:Ga["fade-leave-to"]},()=>e.default?e.default():[])}}),cb=["value"],qa=X(t.defineComponent({__name:"Checkbox",props:{value:{type:Boolean},size:{},isIndeterminate:{type:Boolean,default:!1},isDisabled:{type:Boolean}},emits:["update:value","click"],setup(o,{emit:e}){const n=e;return(r,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([r.$style.root,r.$style[`size-${r.size}`],(r.value||r.value===null)&&r.$style.checked]),onClick:a[1]||(a[1]=s=>n("click",s))},[t.createElementVNode("input",{class:t.normalizeClass(r.$style.input),hidden:"",type:"checkbox",value:r.value,onChange:a[0]||(a[0]=s=>n("update:value",!r.value))},null,42,cb),t.createVNode(t.unref(Mo),null,{default:t.withCtx(()=>[!r.isIndeterminate&&r.value?(t.openBlock(),t.createBlock(t.unref(ye),{key:0,name:"outline-check",size:+r.size-4,color:"foreground-interactive-button-base-primary",class:t.normalizeClass(r.$style.icon)},null,8,["size","class"])):r.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.indeterminate)},null,2)):t.createCommentVNode("",!0)]),_:1})],2))}}),[["__cssModules",{$style:{root:"Checkbox__root_f45d5",input:"Checkbox__input_620bc",checked:"Checkbox__checked_3839a","size-16":"Checkbox__size-16_94879",indeterminate:"Checkbox__indeterminate_1896f","size-20":"Checkbox__size-20_51064",icon:"Checkbox__icon_c8204"}}]]),Qi=X(t.defineComponent({__name:"CheckboxCell",props:{value:{type:Boolean},title:{},description:{},isIndeterminate:{type:Boolean,default:!1},size:{default:"16"}},emits:["update:value"],setup(o,{emit:e}){const n=e;return(r,a)=>(t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(r.$style.root)},[t.createVNode(t.unref(qa),{size:r.size,"is-indeterminate":r.isIndeterminate,value:r.value,"onUpdate:value":a[0]||(a[0]=s=>n("update:value",s))},null,8,["size","is-indeterminate","value"]),t.renderSlot(r.$slots,"leftItem"),t.createElementVNode("div",{class:t.normalizeClass(r.$style.content)},[t.createVNode(t.unref(oe),{size:r.size==="16"?"caption":"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.title),1)]),_:1},8,["size"]),r.description?(t.openBlock(),t.createBlock(t.unref(oe),{key:0,size:"caption",weight:"regular",color:"foreground-layout-layout-1-secondary"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.description),1)]),_:1})):t.createCommentVNode("",!0)],2)],2))}}),[["__cssModules",{$style:{root:"CheckboxCell__root_9478c",content:"CheckboxCell__content_7fd78"}}]]),no=X(t.defineComponent({__name:"Chip",props:{count:{},view:{default:"base-primary"}},emits:["click","delete"],setup(o,{emit:e}){const n=e,r=t.computed(()=>o.view==="base-secondary"?"foreground-interactive-button-base-secondary":"foreground-interactive-button-base-primary");return(a,s)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass([a.$style.root,a.$style[`view_${a.view}`]]),onClick:s[1]||(s[1]=i=>n("click"))},[t.createVNode(t.unref(oe),{class:t.normalizeClass(a.$style.text),size:"caption",color:r.value},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},8,["class","color"]),a.count?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(a.$style.counter)},[t.createVNode(t.unref(oe),{class:t.normalizeClass(a.$style.value),size:"caption",color:r.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.count),1)]),_:1},8,["class","color"])],2)):t.createCommentVNode("",!0),t.createVNode(t.unref(ye),{class:t.normalizeClass(a.$style.delete),color:r.value,size:"18",name:"outline-cross",onClick:s[0]||(s[0]=t.withModifiers(i=>n("delete"),["stop"]))},null,8,["class","color"])],2))}}),[["__cssModules",{$style:{root:"Chip__root_f8f48","view_base-primary":"Chip__view_base-primary_e9bb2","view_base-secondary":"Chip__view_base-secondary_63f45",counter:"Chip__counter_0bf18",delete:"Chip__delete_7a4b5",text:"Chip__text_78294"}}]]),en=X(t.defineComponent({__name:"Divider",props:{size:{},opacity:{default:1}},setup(o){return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([e.$style.root,e.$style[`size_${e.size}`]]),style:t.normalizeStyle({...Number(e.opacity)!==1&&{opacity:Number(e.opacity)}})},null,6))}}),[["__cssModules",{$style:{root:"Divider__root_08288",size_s:"Divider__size_s_0e343",size_m:"Divider__size_m_73f73"}}]]),lh=()=>{function o(i){i.style.height="0px",i.style.opacity="0",i.style.overflow="hidden"}function e(i,l){i.style.transition="height 0.3s ease",i.style.height=i.scrollHeight+"px",i.addEventListener("transitionend",()=>{i.style.transition="opacity 0.2s ease",i.style.opacity="1",i.addEventListener("transitionend",l,{once:!0})},{once:!0})}function n(i){i.style.height="",i.style.overflow=""}function r(i){i.style.height=i.scrollHeight+"px",i.style.opacity="1",i.style.overflow="hidden"}function a(i,l){i.style.transition="opacity 0.3s ease",i.style.opacity="0",i.addEventListener("transitionend",()=>{i.style.transition="all 0.3s ease",i.style.height="0px",i.style.paddingTop="0px",i.addEventListener("transitionend",l,{once:!0})},{once:!0})}function s(i){i.style.height="0px"}return{beforeEnter:o,enter:e,afterEnter:n,beforeLeave:r,leave:a,afterLeave:s}},db=X(t.defineComponent({__name:"Dropdown",props:{title:{},isActive:{type:Boolean}},emits:["click"],setup(o,{emit:e}){const n=e,r=t.useCssModule(),a=lh(),s=t.ref(o.isActive??!1),i=t.computed(()=>[s.value&&r["is-open"]]);function l(){s.value=!s.value,n("click",s.value)}return t.watch(()=>o.isActive,c=>{s.value=c}),(c,d)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(i.value)},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(r).header),"data-test":"DropdownTextHeader",onClick:l},[t.createVNode(t.unref(oe),{size:"subhead",color:"text-common-base-secondary-default"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.title),1)]),_:1}),t.createVNode(t.unref(ye),{class:t.normalizeClass(t.unref(r).icon),name:"outline-chevron-down",size:"18",color:"icon-common-base-secondary-default"},null,8,["class"])],2),t.createVNode(t.Transition,t.toHandlers(t.unref(a)),{default:t.withCtx(()=>[s.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(r).content)},[t.renderSlot(c.$slots,"default")],2)):t.createCommentVNode("",!0)]),_:3},16)],2))}}),[["__cssModules",{$style:{header:"Dropdown__header_4b67e",icon:"Dropdown__icon_d8b38",content:"Dropdown__content_1f45b","is-open":"Dropdown__is-open_47cb6"}}]]);function ub(o,e){if((!o||o.length===0)&&!e)return"";const n=(o==null?void 0:o.map(i=>{if(i.includes("/")){const l=i.split("/"),c=l[1];return c==="*"?l[0].toUpperCase():c.includes("+")?c.split("+")[0].toUpperCase():c.toUpperCase()}else return i.toUpperCase()}))||[],a=Array.from(new Set(n)).join(", ");let s="";if(e){const i=e.match(/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i);if(i){const l=i[1],c=i[2].toUpperCase();s=`до ${l} ${{B:"б",KB:"Кб",MB:"Мб",GB:"Гб"}[c]||c}.`}}return a&&s?`${a} ${s}`:a||s}function hb(o){if(!o)return 0;const e={B:1,KB:1024,MB:1024**2,GB:1024**3},n=/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i,r=o.replace(/\s+/g,"").match(n);if(r){const a=parseFloat(r[1]),s=r[2].toUpperCase(),i=e[s];if(!i)throw new Error(`Неизвестная единица измерения: "${s}"`);return Math.round(a*i)}return 0}function pb({format:o,size:e,fileSize:n,fileExtension:r,fileType:a}){const s=hb(e);let i=!1,l=!1;if(n>s&&(i=!0),o&&o.length>0){const c=o.map(u=>u.toLowerCase()),d=r&&c.includes(r),h=c.includes(a.toLowerCase());!d&&!h&&(l=!0)}return{size:i,format:l}}function fb({errors:o,format:e,size:n}){if(o.format&&(e!=null&&e.length)){const r=e.map(i=>{if(i.includes("/")){const l=i.split("/")[1];return l==="*"?i.split("/")[0].toUpperCase():l.includes("+")?l.split("+")[0].toUpperCase():l.toUpperCase()}else return i.toUpperCase()}),a=Array.from(new Set(r));let s="";if(a.length===1)s=a[0];else if(a.length===2)s=`${a[0]} или ${a[1]}`;else{const i=a.pop();s=`${a.join(", ")} или ${i}`}return`Файл должен иметь расширение ${s}`}if(o.size&&n){const r=n.match(/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i);if(r){const a=r[1],s=r[2].toUpperCase();return`Размер файла не должен превышать ${a} ${{B:"Б",KB:"Кб",MB:"Мб",GB:"Гб"}[s]||s}.`}}return""}function ch(o){const e=t.ref(o);function n(r){e.value=r}return[e,n]}function mb(o){const[e,n]=ch(!1);function r(){o.value||n(!0)}function a(){o.value||n(!1)}function s(){o.value||n(!1)}return{isDropping:e,onDragEnter:r,onDragLeave:a,onDrop:s}}function gb(o,e){const n=t.computed(()=>o?"text-disable-default":"text-common-base-primary-default"),r=t.computed(()=>o?"text-disable-default":"text-common-base-primary-default"),a=t.computed(()=>o?"icon-disable-primary":e.value?"icon-common-critical-primary-default":"icon-common-success-primary-default"),s=t.computed(()=>e.value?o?"outline-warning":"filled-warning":o?"outline-success":"filled-success"),i=t.computed(()=>e.value?"text-common-critical-primary-default":o?"text-disable-default":"text-common-base-secondary-default");return{labelColor:n,fileNameColor:r,fileIconColor:a,fileIconName:s,descriptionColor:i}}const yb=["accept","disabled"],bb=X(t.defineComponent({__name:"Dropzone",props:t.mergeModels({value:{},label:{},placeholder:{},isLoading:{type:Boolean},description:{},errorText:{},isError:{type:Boolean},isDisabled:{type:Boolean},format:{},size:{}},{value:{required:!0},valueModifiers:{},isError:{type:Boolean},isErrorModifiers:{}}),emits:t.mergeModels(["update:value"],["update:value","update:isError"]),setup(o,{emit:e}){const n=e,r=t.useModel(o,"value"),a=t.useModel(o,"isError"),s=t.useCssModule(),i=t.ref(),l=t.ref(""),c=t.ref(""),d=t.ref({format:!1,size:!1}),h=t.computed(()=>l.value?"file":"empty"),{labelColor:u,fileNameColor:p,fileIconColor:m,fileIconName:f,descriptionColor:g}=gb(o.isDisabled,a),{isDropping:k,onDragEnter:$,onDragLeave:C,onDrop:B}=mb(r);async function T(v){const{files:_}=v.target;if(a.value=!1,n("update:value",!1),d.value={format:!1,size:!1},i.value&&(_!=null&&_.length)){const E=_[0],{name:O,extension:z}=D(E);l.value=O,c.value=z,d.value=pb({size:o.size,format:o.format,fileSize:E.size,fileExtension:c.value,fileType:E.type}),a.value=d.value.size||d.value.format,!d.value.size&&!d.value.format&&(r.value=await I(E)),i.value.value=""}}function M(){r.value=null,a.value=!1,i.value.value="",l.value=""}function I(v){return new Promise((_,E)=>{const O=new FileReader;O.readAsDataURL(v),O.onload=()=>{const z=O.result,[V,q]=z.split(","),F=V.match(/data:(.*);base64/),ae=F?F[1]:"";_({mime:ae,content:q})},O.onerror=z=>E(z)})}function L(v){return{"image/png":"png","image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","application/pdf":"pdf","text/plain":"txt"}[v]||"bin"}function D(v){const _=v.name.lastIndexOf(".");return{name:_!==-1?v.name.slice(0,_):v.name,extension:_!==-1?v.name.slice(_+1).toLowerCase():""}}const w=t.computed(()=>a.value&&o.errorText?o.errorText:a.value||d.value.size||d.value.format?fb({errors:d.value,format:o.format,size:o.size}):o.description?o.description:ub(o.format,o.size)),b=t.computed(()=>o.format?o.format.map(v=>v.indexOf("/")!==-1?`${v}`:`.${v}`).join(","):""),N=t.computed(()=>[s.root,{[s["is-disabled"]]:o.isDisabled}]),H=t.computed(()=>[s.input,{[s["input-hidden"]]:h.value==="file"}]),K=t.computed(()=>[s.area,{[s["is-empty"]]:h.value==="empty",[s["is-file"]]:h.value==="file",[s["is-dropping"]]:k.value,[s["is-disabled"]]:o.isDisabled,[s["is-error"]]:a.value}]);return t.onMounted(()=>{r.value&&(l.value="file",c.value=L(r.value.mime))}),(v,_)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(N.value)},[t.createVNode(t.unref(oe),{size:"subhead",color:t.unref(u)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.label),1)]),_:1},8,["color"]),t.createElementVNode("div",{class:t.normalizeClass(K.value)},[t.createVNode(t.unref(nt),null,{default:t.withCtx(()=>[h.value==="empty"?(t.openBlock(),t.createElementBlock("div",{key:"empty",class:t.normalizeClass(t.unref(s).empty)},[t.createVNode(t.unref(nt),null,{default:t.withCtx(()=>[t.unref(k)?(t.openBlock(),t.createElementBlock("div",{key:"empty-drop",class:t.normalizeClass(t.unref(s)["drop-text"])},[t.createVNode(t.unref(oe),{class:t.normalizeClass(t.unref(s).placeholder),align:"center",size:"subhead",color:"text-input-base-secondary"},{default:t.withCtx(()=>_[3]||(_[3]=[t.createTextVNode(" Отпустите файл для загрузки ")])),_:1,__:[3]},8,["class"])],2)):(t.openBlock(),t.createElementBlock("div",{key:"empty-start",class:t.normalizeClass(t.unref(s).row)},[t.createVNode(t.unref(ye),{class:t.normalizeClass(t.unref(s)["icon-upload"]),color:"icon-input-base-primary",name:"outline-upload",size:"18"},null,8,["class"]),t.createVNode(t.unref(oe),{class:t.normalizeClass(t.unref(s).placeholder),size:"subhead",color:"text-input-base-secondary"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.placeholder),1)]),_:1},8,["class"])],2))]),_:1})],2)):(t.openBlock(),t.createElementBlock("div",{key:"file",class:t.normalizeClass(t.unref(s)["file-data"])},[t.createVNode(t.unref(Mo),null,{default:t.withCtx(()=>[v.isLoading?(t.openBlock(),t.createBlock(t.unref(Sr),{key:0,color:"icon-button-base-primary",size:"18"})):(t.openBlock(),t.createBlock(t.unref(ye),{key:1,class:t.normalizeClass(t.unref(s).icon),color:t.unref(m),name:t.unref(f),size:"18"},null,8,["class","color","name"]))]),_:1}),t.createVNode(t.unref(oe),{class:t.normalizeClass(t.unref(s)["file-name"]),size:"subhead",numberOfLines:"1",color:t.unref(p)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.value),1)]),_:1},8,["class","color"]),t.createVNode(t.unref(oe),{class:t.normalizeClass(t.unref(s)["file-extension"]),size:"subhead",color:t.unref(p)},{default:t.withCtx(()=>[t.createTextVNode(" ."+t.toDisplayString(c.value),1)]),_:1},8,["class","color"]),t.createElementVNode("button",{class:t.normalizeClass(t.unref(s)["button-clear"]),onClick:M},[t.createVNode(t.unref(ye),{color:"icon-input-base-primary",name:"outline-trash",size:"18"})],2)],2))]),_:1})],2),t.createVNode(t.unref(nt),null,{default:t.withCtx(()=>[w.value?(t.openBlock(),t.createBlock(t.unref(oe),{key:w.value,color:t.unref(g)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(w.value),1)]),_:1},8,["color"])):t.createCommentVNode("",!0)]),_:1}),t.createElementVNode("input",{ref_key:"refInput",ref:i,title:"Добавить файл",type:"file",class:t.normalizeClass(H.value),accept:b.value,disabled:v.isLoading||v.isDisabled,onDragenter:_[0]||(_[0]=(...E)=>t.unref($)&&t.unref($)(...E)),onDragleave:_[1]||(_[1]=(...E)=>t.unref(C)&&t.unref(C)(...E)),onDrop:_[2]||(_[2]=(...E)=>t.unref(B)&&t.unref(B)(...E)),onInput:T},null,42,yb)],2))}}),[["__cssModules",{$style:{root:"Dropzone__root_8c6b8","is-disabled":"Dropzone__is-disabled_a174c",input:"Dropzone__input_47a31","input-hidden":"Dropzone__input-hidden_d4ad8",area:"Dropzone__area_668a4","is-file":"Dropzone__is-file_d3781","is-dropping":"Dropzone__is-dropping_01108","is-error":"Dropzone__is-error_d3922",empty:"Dropzone__empty_7ee21",row:"Dropzone__row_19908","file-data":"Dropzone__file-data_29711","file-name":"Dropzone__file-name_84c4b","file-extension":"Dropzone__file-extension_f001e","button-clear":"Dropzone__button-clear_6a354"}}]]),Zi=Symbol();function kb(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Ka={exports:{}},wb=Ka.exports,dh;function _b(){return dh||(dh=1,function(o,e){(function(r,a){o.exports=a()})(wb,function(){return function(n){var r={};function a(s){if(r[s])return r[s].exports;var i=r[s]={i:s,l:!1,exports:{}};return n[s].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=n,a.c=r,a.d=function(s,i,l){a.o(s,i)||Object.defineProperty(s,i,{enumerable:!0,get:l})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,i){if(i&1&&(s=a(s)),i&8||i&4&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),i&2&&typeof s!="string")for(var c in s)a.d(l,c,(function(d){return s[d]}).bind(null,c));return l},a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,"a",i),i},a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},a.p="",a(a.s=0)}([function(n,r,a){a.r(r);var s=function(x){return Array.isArray(x)?x:[x]},i=function(x){return x instanceof Node},l=function(x){return x instanceof NodeList},c=function(x,se){if(x&&se){x=l(x)?x:[x];for(var ge=0;ge<x.length&&se(x[ge],ge,x.length)!==!0;ge++);}},d=function(x){return console.error("[scroll-lock] ".concat(x))},h=function(x){if(Array.isArray(x)){var se=x.join(", ");return se}},u=function(x){var se=[];return c(x,function(ge){return se.push(ge)}),se},p=function(x,se){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:document;if(ge&&u(be.querySelectorAll(se)).indexOf(x)!==-1)return x;for(;(x=x.parentElement)&&u(be.querySelectorAll(se)).indexOf(x)===-1;);return x},m=function(x,se){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document,be=u(ge.querySelectorAll(se)).indexOf(x)!==-1;return be},f=function(x){if(x){var se=getComputedStyle(x),ge=se.overflow==="hidden";return ge}},g=function(x){if(x){if(f(x))return!0;var se=x.scrollTop;return se<=0}},k=function(x){if(x){if(f(x))return!0;var se=x.scrollTop,ge=x.scrollHeight,be=se+x.offsetHeight;return be>=ge}},$=function(x){if(x){if(f(x))return!0;var se=x.scrollLeft;return se<=0}},C=function(x){if(x){if(f(x))return!0;var se=x.scrollLeft,ge=x.scrollWidth,be=se+x.offsetWidth;return be>=ge}},B=function(x){var se='textarea, [contenteditable="true"]';return m(x,se)},T=function(x){var se='input[type="range"]';return m(x,se)};a.d(r,"disablePageScroll",function(){return b}),a.d(r,"enablePageScroll",function(){return N}),a.d(r,"getScrollState",function(){return H}),a.d(r,"clearQueueScrollLocks",function(){return K}),a.d(r,"getTargetScrollBarWidth",function(){return v}),a.d(r,"getCurrentTargetScrollBarWidth",function(){return _}),a.d(r,"getPageScrollBarWidth",function(){return E}),a.d(r,"getCurrentPageScrollBarWidth",function(){return O}),a.d(r,"addScrollableTarget",function(){return z}),a.d(r,"removeScrollableTarget",function(){return V}),a.d(r,"addScrollableSelector",function(){return q}),a.d(r,"removeScrollableSelector",function(){return F}),a.d(r,"addLockableTarget",function(){return ae}),a.d(r,"addLockableSelector",function(){return A}),a.d(r,"setFillGapMethod",function(){return R}),a.d(r,"addFillGapTarget",function(){return G}),a.d(r,"removeFillGapTarget",function(){return ee}),a.d(r,"addFillGapSelector",function(){return y}),a.d(r,"removeFillGapSelector",function(){return U}),a.d(r,"refillGaps",function(){return ie});function M(Q){for(var x=1;x<arguments.length;x++){var se=arguments[x]!=null?arguments[x]:{},ge=Object.keys(se);typeof Object.getOwnPropertySymbols=="function"&&(ge=ge.concat(Object.getOwnPropertySymbols(se).filter(function(be){return Object.getOwnPropertyDescriptor(se,be).enumerable}))),ge.forEach(function(be){I(Q,be,se[be])})}return Q}function I(Q,x,se){return x in Q?Object.defineProperty(Q,x,{value:se,enumerable:!0,configurable:!0,writable:!0}):Q[x]=se,Q}var L=["padding","margin","width","max-width","none"],D=3,w={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:L[0],startTouchY:0,startTouchX:0},b=function(x){w.queue<=0&&(w.scroll=!1,Ce(),le()),z(x),w.queue++},N=function(x){w.queue>0&&w.queue--,w.queue<=0&&(w.scroll=!0,W(),de()),V(x)},H=function(){return w.scroll},K=function(){w.queue=0},v=function(x){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i(x)){var ge=x.style.overflowY;se?H()||(x.style.overflowY=x.getAttribute("data-scroll-lock-saved-overflow-y-property")):x.style.overflowY="scroll";var be=_(x);return x.style.overflowY=ge,be}else return 0},_=function(x){if(i(x))if(x===document.body){var se=document.documentElement.clientWidth,ge=window.innerWidth,be=ge-se;return be}else{var Zt=x.style.borderLeftWidth,kn=x.style.borderRightWidth;x.style.borderLeftWidth="0px",x.style.borderRightWidth="0px";var sn=x.offsetWidth-x.clientWidth;return x.style.borderLeftWidth=Zt,x.style.borderRightWidth=kn,sn}else return 0},E=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return v(document.body,x)},O=function(){return _(document.body)},z=function(x){if(x){var se=s(x);se.map(function(ge){c(ge,function(be){i(be)?be.setAttribute("data-scroll-lock-scrollable",""):d('"'.concat(be,'" is not a Element.'))})})}},V=function(x){if(x){var se=s(x);se.map(function(ge){c(ge,function(be){i(be)?be.removeAttribute("data-scroll-lock-scrollable"):d('"'.concat(be,'" is not a Element.'))})})}},q=function(x){if(x){var se=s(x);se.map(function(ge){w.scrollableSelectors.push(ge)})}},F=function(x){if(x){var se=s(x);se.map(function(ge){w.scrollableSelectors=w.scrollableSelectors.filter(function(be){return be!==ge})})}},ae=function(x){if(x){var se=s(x);se.map(function(ge){c(ge,function(be){i(be)?be.setAttribute("data-scroll-lock-lockable",""):d('"'.concat(be,'" is not a Element.'))})}),H()||Ce()}},A=function(x){if(x){var se=s(x);se.map(function(ge){w.lockableSelectors.push(ge)}),H()||Ce(),y(x)}},R=function(x){if(x)if(L.indexOf(x)!==-1)w.fillGapMethod=x,ie();else{var se=L.join(", ");d('"'.concat(x,`" method is not available!
10
+ */function Lu(o,e){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),n.push.apply(n,r)}return n}function _n(o){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lu(Object(n),!0).forEach(function(r){_y(o,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):Lu(Object(n)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(n,r))})}return o}function Da(o){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Da=function(e){return typeof e}:Da=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Da(o)}function _y(o,e,n){return e in o?Object.defineProperty(o,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[e]=n,o}function zn(){return zn=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[r]=n[r])}return o},zn.apply(this,arguments)}function vy(o,e){if(o==null)return{};var n={},r=Object.keys(o),a,s;for(s=0;s<r.length;s++)a=r[s],!(e.indexOf(a)>=0)&&(n[a]=o[a]);return n}function Cy(o,e){if(o==null)return{};var n=vy(o,e),r,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(o);for(a=0;a<s.length;a++)r=s[a],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(o,r)&&(n[r]=o[r])}return n}var $y="1.14.0";function Pn(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var Vn=Pn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Mr=Pn(/Edge/i),zu=Pn(/firefox/i),Nr=Pn(/safari/i)&&!Pn(/chrome/i)&&!Pn(/android/i),Pu=Pn(/iP(ad|od|hone)/i),Ey=Pn(/chrome/i)&&Pn(/android/i),Vu={capture:!1,passive:!1};function He(o,e,n){o.addEventListener(e,n,!Vn&&Vu)}function Fe(o,e,n){o.removeEventListener(e,n,!Vn&&Vu)}function Aa(o,e){if(e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function Sy(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function vn(o,e,n,r){if(o){n=n||document;do{if(e!=null&&(e[0]===">"?o.parentNode===n&&Aa(o,e):Aa(o,e))||r&&o===n)return o;if(o===n)break}while(o=Sy(o))}return null}var Fu=/\s+/g;function Yt(o,e,n){if(o&&e)if(o.classList)o.classList[n?"add":"remove"](e);else{var r=(" "+o.className+" ").replace(Fu," ").replace(" "+e+" "," ");o.className=(r+(n?" "+e:"")).replace(Fu," ")}}function $e(o,e,n){var r=o&&o.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(n=o.currentStyle),e===void 0?n:n[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=n+(typeof n=="string"?"":"px")}}function Zo(o,e){var n="";if(typeof o=="string")n=o;else do{var r=$e(o,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!e&&(o=o.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function Ru(o,e,n){if(o){var r=o.getElementsByTagName(e),a=0,s=r.length;if(n)for(;a<s;a++)n(r[a],a);return r}return[]}function Cn(){var o=document.scrollingElement;return o||document.documentElement}function kt(o,e,n,r,a){if(!(!o.getBoundingClientRect&&o!==window)){var s,i,l,c,d,h,u;if(o!==window&&o.parentNode&&o!==Cn()?(s=o.getBoundingClientRect(),i=s.top,l=s.left,c=s.bottom,d=s.right,h=s.height,u=s.width):(i=0,l=0,c=window.innerHeight,d=window.innerWidth,h=window.innerHeight,u=window.innerWidth),(e||n)&&o!==window&&(a=a||o.parentNode,!Vn))do if(a&&a.getBoundingClientRect&&($e(a,"transform")!=="none"||n&&$e(a,"position")!=="static")){var p=a.getBoundingClientRect();i-=p.top+parseInt($e(a,"border-top-width")),l-=p.left+parseInt($e(a,"border-left-width")),c=i+s.height,d=l+s.width;break}while(a=a.parentNode);if(r&&o!==window){var m=Zo(a||o),f=m&&m.a,g=m&&m.d;m&&(i/=g,l/=f,u/=f,h/=g,c=i+h,d=l+u)}return{top:i,left:l,bottom:c,right:d,width:u,height:h}}}function Hu(o,e,n){for(var r=Jn(o,!0),a=kt(o)[e];r;){var s=kt(r)[n],i=void 0;if(i=a>=s,!i)return r;if(r===Cn())break;r=Jn(r,!1)}return!1}function Jo(o,e,n,r){for(var a=0,s=0,i=o.children;s<i.length;){if(i[s].style.display!=="none"&&i[s]!==Ee.ghost&&(r||i[s]!==Ee.dragged)&&vn(i[s],n.draggable,o,!1)){if(a===e)return i[s];a++}s++}return null}function Ni(o,e){for(var n=o.lastElementChild;n&&(n===Ee.ghost||$e(n,"display")==="none"||e&&!Aa(n,e));)n=n.previousElementSibling;return n||null}function Jt(o,e){var n=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==Ee.clone&&(!e||Aa(o,e))&&n++;return n}function ju(o){var e=0,n=0,r=Cn();if(o)do{var a=Zo(o),s=a.a,i=a.d;e+=o.scrollLeft*s,n+=o.scrollTop*i}while(o!==r&&(o=o.parentNode));return[e,n]}function By(o,e){for(var n in o)if(o.hasOwnProperty(n)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===o[n][r])return Number(n)}return-1}function Jn(o,e){if(!o||!o.getBoundingClientRect)return Cn();var n=o,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=$e(n);if(n.clientWidth<n.scrollWidth&&(a.overflowX=="auto"||a.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(a.overflowY=="auto"||a.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Cn();if(r||e)return n;r=!0}}while(n=n.parentNode);return Cn()}function Ty(o,e){if(o&&e)for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);return o}function Di(o,e){return Math.round(o.top)===Math.round(e.top)&&Math.round(o.left)===Math.round(e.left)&&Math.round(o.height)===Math.round(e.height)&&Math.round(o.width)===Math.round(e.width)}var Dr;function Yu(o,e){return function(){if(!Dr){var n=arguments,r=this;n.length===1?o.call(r,n[0]):o.apply(r,n),Dr=setTimeout(function(){Dr=void 0},e)}}}function xy(){clearTimeout(Dr),Dr=void 0}function Uu(o,e,n){o.scrollLeft+=e,o.scrollTop+=n}function Wu(o){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(o).cloneNode(!0):n?n(o).clone(!0)[0]:o.cloneNode(!0)}var Ut="Sortable"+new Date().getTime();function My(){var o=[],e;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(a){if(!($e(a,"display")==="none"||a===Ee.ghost)){o.push({target:a,rect:kt(a)});var s=_n({},o[o.length-1].rect);if(a.thisAnimationDuration){var i=Zo(a,!0);i&&(s.top-=i.f,s.left-=i.e)}a.fromRect=s}})}},addAnimationState:function(r){o.push(r)},removeAnimationState:function(r){o.splice(By(o,{target:r}),1)},animateAll:function(r){var a=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var s=!1,i=0;o.forEach(function(l){var c=0,d=l.target,h=d.fromRect,u=kt(d),p=d.prevFromRect,m=d.prevToRect,f=l.rect,g=Zo(d,!0);g&&(u.top-=g.f,u.left-=g.e),d.toRect=u,d.thisAnimationDuration&&Di(p,u)&&!Di(h,u)&&(f.top-u.top)/(f.left-u.left)===(h.top-u.top)/(h.left-u.left)&&(c=Dy(f,p,m,a.options)),Di(u,h)||(d.prevFromRect=h,d.prevToRect=u,c||(c=a.options.animation),a.animate(d,f,u,c)),c&&(s=!0,i=Math.max(i,c),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},c),d.thisAnimationDuration=c)}),clearTimeout(e),s?e=setTimeout(function(){typeof r=="function"&&r()},i):typeof r=="function"&&r(),o=[]},animate:function(r,a,s,i){if(i){$e(r,"transition",""),$e(r,"transform","");var l=Zo(this.el),c=l&&l.a,d=l&&l.d,h=(a.left-s.left)/(c||1),u=(a.top-s.top)/(d||1);r.animatingX=!!h,r.animatingY=!!u,$e(r,"transform","translate3d("+h+"px,"+u+"px,0)"),this.forRepaintDummy=Ny(r),$e(r,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),$e(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){$e(r,"transition",""),$e(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},i)}}}}function Ny(o){return o.offsetWidth}function Dy(o,e,n,r){return Math.sqrt(Math.pow(e.top-o.top,2)+Math.pow(e.left-o.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var er=[],Ai={initializeByDefault:!0},Ar={mount:function(e){for(var n in Ai)Ai.hasOwnProperty(n)&&!(n in e)&&(e[n]=Ai[n]);er.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),er.push(e)},pluginEvent:function(e,n,r){var a=this;this.eventCanceled=!1,r.cancel=function(){a.eventCanceled=!0};var s=e+"Global";er.forEach(function(i){n[i.pluginName]&&(n[i.pluginName][s]&&n[i.pluginName][s](_n({sortable:n},r)),n.options[i.pluginName]&&n[i.pluginName][e]&&n[i.pluginName][e](_n({sortable:n},r)))})},initializePlugins:function(e,n,r,a){er.forEach(function(l){var c=l.pluginName;if(!(!e.options[c]&&!l.initializeByDefault)){var d=new l(e,n,e.options);d.sortable=e,d.options=e.options,e[c]=d,zn(r,d.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var i=this.modifyOption(e,s,e.options[s]);typeof i<"u"&&(e.options[s]=i)}},getEventProperties:function(e,n){var r={};return er.forEach(function(a){typeof a.eventProperties=="function"&&zn(r,a.eventProperties.call(n[a.pluginName],e))}),r},modifyOption:function(e,n,r){var a;return er.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[n]=="function"&&(a=s.optionListeners[n].call(e[s.pluginName],r))}),a}};function Ay(o){var e=o.sortable,n=o.rootEl,r=o.name,a=o.targetEl,s=o.cloneEl,i=o.toEl,l=o.fromEl,c=o.oldIndex,d=o.newIndex,h=o.oldDraggableIndex,u=o.newDraggableIndex,p=o.originalEvent,m=o.putSortable,f=o.extraEventProperties;if(e=e||n&&n[Ut],!!e){var g,k=e.options,$="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Vn&&!Mr?g=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(r,!0,!0)),g.to=i||n,g.from=l||n,g.item=a||n,g.clone=s,g.oldIndex=c,g.newIndex=d,g.oldDraggableIndex=h,g.newDraggableIndex=u,g.originalEvent=p,g.pullMode=m?m.lastPutMode:void 0;var C=_n(_n({},f),Ar.getEventProperties(r,e));for(var B in C)g[B]=C[B];n&&n.dispatchEvent(g),k[$]&&k[$].call(e,g)}}var Iy=["evt"],Rt=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.evt,s=Cy(r,Iy);Ar.pluginEvent.bind(Ee)(e,n,_n({dragEl:he,parentEl:st,ghostEl:De,rootEl:Je,nextEl:Bo,lastDownEl:Ia,cloneEl:it,cloneHidden:eo,dragStarted:Or,putSortable:$t,activeSortable:Ee.active,originalEvent:a,oldIndex:tr,oldDraggableIndex:Ir,newIndex:Wt,newDraggableIndex:to,hideGhostForTarget:Ju,unhideGhostForTarget:eh,cloneNowHidden:function(){eo=!0},cloneNowShown:function(){eo=!1},dispatchSortableEvent:function(l){It({sortable:n,name:l,originalEvent:a})}},s))};function It(o){Ay(_n({putSortable:$t,cloneEl:it,targetEl:he,rootEl:Je,oldIndex:tr,oldDraggableIndex:Ir,newIndex:Wt,newDraggableIndex:to},o))}var he,st,De,Je,Bo,Ia,it,eo,tr,Wt,Ir,to,Oa,$t,nr=!1,La=!1,za=[],To,ln,Ii,Oi,Gu,qu,Or,or,Lr,zr=!1,Pa=!1,Va,Bt,Li=[],zi=!1,Fa=[],Ra=typeof document<"u",Ha=Pu,Ku=Mr||Vn?"cssFloat":"float",Oy=Ra&&!Ey&&!Pu&&"draggable"in document.createElement("div"),Xu=function(){if(Ra){if(Vn)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Qu=function(e,n){var r=$e(e),a=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),s=Jo(e,0,n),i=Jo(e,1,n),l=s&&$e(s),c=i&&$e(i),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+kt(s).width,h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+kt(i).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return i&&(c.clear==="both"||c.clear===u)?"vertical":"horizontal"}return s&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=a&&r[Ku]==="none"||i&&r[Ku]==="none"&&d+h>a)?"vertical":"horizontal"},Ly=function(e,n,r){var a=r?e.left:e.top,s=r?e.right:e.bottom,i=r?e.width:e.height,l=r?n.left:n.top,c=r?n.right:n.bottom,d=r?n.width:n.height;return a===l||s===c||a+i/2===l+d/2},zy=function(e,n){var r;return za.some(function(a){var s=a[Ut].options.emptyInsertThreshold;if(!(!s||Ni(a))){var i=kt(a),l=e>=i.left-s&&e<=i.right+s,c=n>=i.top-s&&n<=i.bottom+s;if(l&&c)return r=a}}),r},Zu=function(e){function n(s,i){return function(l,c,d,h){var u=l.options.group.name&&c.options.group.name&&l.options.group.name===c.options.group.name;if(s==null&&(i||u))return!0;if(s==null||s===!1)return!1;if(i&&s==="clone")return s;if(typeof s=="function")return n(s(l,c,d,h),i)(l,c,d,h);var p=(i?l:c).options.group.name;return s===!0||typeof s=="string"&&s===p||s.join&&s.indexOf(p)>-1}}var r={},a=e.group;(!a||Da(a)!="object")&&(a={name:a}),r.name=a.name,r.checkPull=n(a.pull,!0),r.checkPut=n(a.put),r.revertClone=a.revertClone,e.group=r},Ju=function(){!Xu&&De&&$e(De,"display","none")},eh=function(){!Xu&&De&&$e(De,"display","")};Ra&&document.addEventListener("click",function(o){if(La)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),La=!1,!1},!0);var xo=function(e){if(he){e=e.touches?e.touches[0]:e;var n=zy(e.clientX,e.clientY);if(n){var r={};for(var a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[Ut]._onDragOver(r)}}},Py=function(e){he&&he.parentNode[Ut]._isOutsideThisEl(e.target)};function Ee(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=zn({},e),o[Ut]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Qu(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,l){i.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ee.supportPointer!==!1&&"PointerEvent"in window&&!Nr,emptyInsertThreshold:5};Ar.initializePlugins(this,o,n);for(var r in n)!(r in e)&&(e[r]=n[r]);Zu(e);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=e.forceFallback?!1:Oy,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?He(o,"pointerdown",this._onTapStart):(He(o,"mousedown",this._onTapStart),He(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(He(o,"dragover",this),He(o,"dragenter",this)),za.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),zn(this,My())}Ee.prototype={constructor:Ee,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(or=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,he):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,r=this.el,a=this.options,s=a.preventOnFilter,i=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,c=(l||e).target,d=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||c,h=a.filter;if(Wy(r),!he&&!(/mousedown|pointerdown/.test(i)&&e.button!==0||a.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Nr&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=vn(c,a.draggable,r,!1),!(c&&c.animated)&&Ia!==c)){if(tr=Jt(c),Ir=Jt(c,a.draggable),typeof h=="function"){if(h.call(this,e,c,this)){It({sortable:n,rootEl:d,name:"filter",targetEl:c,toEl:r,fromEl:r}),Rt("filter",n,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(h&&(h=h.split(",").some(function(u){if(u=vn(d,u.trim(),r,!1),u)return It({sortable:n,rootEl:u,name:"filter",targetEl:c,fromEl:r,toEl:r}),Rt("filter",n,{evt:e}),!0}),h)){s&&e.cancelable&&e.preventDefault();return}a.handle&&!vn(d,a.handle,r,!1)||this._prepareDragStart(e,l,c)}}},_prepareDragStart:function(e,n,r){var a=this,s=a.el,i=a.options,l=s.ownerDocument,c;if(r&&!he&&r.parentNode===s){var d=kt(r);if(Je=s,he=r,st=he.parentNode,Bo=he.nextSibling,Ia=r,Oa=i.group,Ee.dragged=he,To={target:he,clientX:(n||e).clientX,clientY:(n||e).clientY},Gu=To.clientX-d.left,qu=To.clientY-d.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,he.style["will-change"]="all",c=function(){if(Rt("delayEnded",a,{evt:e}),Ee.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!zu&&a.nativeDraggable&&(he.draggable=!0),a._triggerDragStart(e,n),It({sortable:a,name:"choose",originalEvent:e}),Yt(he,i.chosenClass,!0)},i.ignore.split(",").forEach(function(h){Ru(he,h.trim(),Pi)}),He(l,"dragover",xo),He(l,"mousemove",xo),He(l,"touchmove",xo),He(l,"mouseup",a._onDrop),He(l,"touchend",a._onDrop),He(l,"touchcancel",a._onDrop),zu&&this.nativeDraggable&&(this.options.touchStartThreshold=4,he.draggable=!0),Rt("delayStart",this,{evt:e}),i.delay&&(!i.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Mr||Vn))){if(Ee.eventCanceled){this._onDrop();return}He(l,"mouseup",a._disableDelayedDrag),He(l,"touchend",a._disableDelayedDrag),He(l,"touchcancel",a._disableDelayedDrag),He(l,"mousemove",a._delayedDragTouchMoveHandler),He(l,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&He(l,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(c,i.delay)}else c()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){he&&Pi(he),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Fe(e,"mouseup",this._disableDelayedDrag),Fe(e,"touchend",this._disableDelayedDrag),Fe(e,"touchcancel",this._disableDelayedDrag),Fe(e,"mousemove",this._delayedDragTouchMoveHandler),Fe(e,"touchmove",this._delayedDragTouchMoveHandler),Fe(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?He(document,"pointermove",this._onTouchMove):n?He(document,"touchmove",this._onTouchMove):He(document,"mousemove",this._onTouchMove):(He(he,"dragend",this),He(Je,"dragstart",this._onDragStart));try{document.selection?Ya(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(nr=!1,Je&&he){Rt("dragStarted",this,{evt:n}),this.nativeDraggable&&He(document,"dragover",Py);var r=this.options;!e&&Yt(he,r.dragClass,!1),Yt(he,r.ghostClass,!0),Ee.active=this,e&&this._appendGhost(),It({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ln){this._lastX=ln.clientX,this._lastY=ln.clientY,Ju();for(var e=document.elementFromPoint(ln.clientX,ln.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ln.clientX,ln.clientY),e!==n);)n=e;if(he.parentNode[Ut]._isOutsideThisEl(e),n)do{if(n[Ut]){var r=void 0;if(r=n[Ut]._onDragOver({clientX:ln.clientX,clientY:ln.clientY,target:e,rootEl:n}),r&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);eh()}},_onTouchMove:function(e){if(To){var n=this.options,r=n.fallbackTolerance,a=n.fallbackOffset,s=e.touches?e.touches[0]:e,i=De&&Zo(De,!0),l=De&&i&&i.a,c=De&&i&&i.d,d=Ha&&Bt&&ju(Bt),h=(s.clientX-To.clientX+a.x)/(l||1)+(d?d[0]-Li[0]:0)/(l||1),u=(s.clientY-To.clientY+a.y)/(c||1)+(d?d[1]-Li[1]:0)/(c||1);if(!Ee.active&&!nr){if(r&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(De){i?(i.e+=h-(Ii||0),i.f+=u-(Oi||0)):i={a:1,b:0,c:0,d:1,e:h,f:u};var p="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");$e(De,"webkitTransform",p),$e(De,"mozTransform",p),$e(De,"msTransform",p),$e(De,"transform",p),Ii=h,Oi=u,ln=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!De){var e=this.options.fallbackOnBody?document.body:Je,n=kt(he,!0,Ha,!0,e),r=this.options;if(Ha){for(Bt=e;$e(Bt,"position")==="static"&&$e(Bt,"transform")==="none"&&Bt!==document;)Bt=Bt.parentNode;Bt!==document.body&&Bt!==document.documentElement?(Bt===document&&(Bt=Cn()),n.top+=Bt.scrollTop,n.left+=Bt.scrollLeft):Bt=Cn(),Li=ju(Bt)}De=he.cloneNode(!0),Yt(De,r.ghostClass,!1),Yt(De,r.fallbackClass,!0),Yt(De,r.dragClass,!0),$e(De,"transition",""),$e(De,"transform",""),$e(De,"box-sizing","border-box"),$e(De,"margin",0),$e(De,"top",n.top),$e(De,"left",n.left),$e(De,"width",n.width),$e(De,"height",n.height),$e(De,"opacity","0.8"),$e(De,"position",Ha?"absolute":"fixed"),$e(De,"zIndex","100000"),$e(De,"pointerEvents","none"),Ee.ghost=De,e.appendChild(De),$e(De,"transform-origin",Gu/parseInt(De.style.width)*100+"% "+qu/parseInt(De.style.height)*100+"%")}},_onDragStart:function(e,n){var r=this,a=e.dataTransfer,s=r.options;if(Rt("dragStart",this,{evt:e}),Ee.eventCanceled){this._onDrop();return}Rt("setupClone",this),Ee.eventCanceled||(it=Wu(he),it.draggable=!1,it.style["will-change"]="",this._hideClone(),Yt(it,this.options.chosenClass,!1),Ee.clone=it),r.cloneId=Ya(function(){Rt("clone",r),!Ee.eventCanceled&&(r.options.removeCloneOnHide||Je.insertBefore(it,he),r._hideClone(),It({sortable:r,name:"clone"}))}),!n&&Yt(he,s.dragClass,!0),n?(La=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Fe(document,"mouseup",r._onDrop),Fe(document,"touchend",r._onDrop),Fe(document,"touchcancel",r._onDrop),a&&(a.effectAllowed="move",s.setData&&s.setData.call(r,a,he)),He(document,"drop",r),$e(he,"transform","translateZ(0)")),nr=!0,r._dragStartId=Ya(r._dragStarted.bind(r,n,e)),He(document,"selectstart",r),Or=!0,Nr&&$e(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,r=e.target,a,s,i,l=this.options,c=l.group,d=Ee.active,h=Oa===c,u=l.sort,p=$t||d,m,f=this,g=!1;if(zi)return;function k(z,V){Rt(z,f,_n({evt:e,isOwner:h,axis:m?"vertical":"horizontal",revert:i,dragRect:a,targetRect:s,canSort:u,fromSortable:p,target:r,completed:C,onMove:function(F,ae){return ja(Je,n,he,a,F,kt(F),e,ae)},changed:B},V))}function $(){k("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function C(z){return k("dragOverCompleted",{insertion:z}),z&&(h?d._hideClone():d._showClone(f),f!==p&&(Yt(he,$t?$t.options.ghostClass:d.options.ghostClass,!1),Yt(he,l.ghostClass,!0)),$t!==f&&f!==Ee.active?$t=f:f===Ee.active&&$t&&($t=null),p===f&&(f._ignoreWhileAnimating=r),f.animateAll(function(){k("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===he&&!he.animated||r===n&&!r.animated)&&(or=null),!l.dragoverBubble&&!e.rootEl&&r!==document&&(he.parentNode[Ut]._isOutsideThisEl(e.target),!z&&xo(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),g=!0}function B(){Wt=Jt(he),to=Jt(he,l.draggable),It({sortable:f,name:"change",toEl:n,newIndex:Wt,newDraggableIndex:to,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=vn(r,l.draggable,n,!0),k("dragOver"),Ee.eventCanceled)return g;if(he.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||f._ignoreWhileAnimating===r)return C(!1);if(La=!1,d&&!l.disabled&&(h?u||(i=st!==Je):$t===this||(this.lastPutMode=Oa.checkPull(this,d,he,e))&&c.checkPut(this,d,he,e))){if(m=this._getDirection(e,r)==="vertical",a=kt(he),k("dragOverValid"),Ee.eventCanceled)return g;if(i)return st=Je,$(),this._hideClone(),k("revert"),Ee.eventCanceled||(Bo?Je.insertBefore(he,Bo):Je.appendChild(he)),C(!0);var T=Ni(n,l.draggable);if(!T||Hy(e,m,this)&&!T.animated){if(T===he)return C(!1);if(T&&n===e.target&&(r=T),r&&(s=kt(r)),ja(Je,n,he,a,r,s,e,!!r)!==!1)return $(),n.appendChild(he),st=n,B(),C(!0)}else if(T&&Ry(e,m,this)){var M=Jo(n,0,l,!0);if(M===he)return C(!1);if(r=M,s=kt(r),ja(Je,n,he,a,r,s,e,!1)!==!1)return $(),n.insertBefore(he,M),st=n,B(),C(!0)}else if(r.parentNode===n){s=kt(r);var I=0,L,D=he.parentNode!==n,w=!Ly(he.animated&&he.toRect||a,r.animated&&r.toRect||s,m),b=m?"top":"left",N=Hu(r,"top","top")||Hu(he,"top","top"),H=N?N.scrollTop:void 0;or!==r&&(L=s[b],zr=!1,Pa=!w&&l.invertSwap||D),I=jy(e,r,s,m,w?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Pa,or===r);var K;if(I!==0){var v=Jt(he);do v-=I,K=st.children[v];while(K&&($e(K,"display")==="none"||K===De))}if(I===0||K===r)return C(!1);or=r,Lr=I;var _=r.nextElementSibling,E=!1;E=I===1;var O=ja(Je,n,he,a,r,s,e,E);if(O!==!1)return(O===1||O===-1)&&(E=O===1),zi=!0,setTimeout(Fy,30),$(),E&&!_?n.appendChild(he):r.parentNode.insertBefore(he,E?_:r),N&&Uu(N,0,H-N.scrollTop),st=he.parentNode,L!==void 0&&!Pa&&(Va=Math.abs(L-kt(r)[b])),B(),C(!0)}if(n.contains(he))return C(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Fe(document,"mousemove",this._onTouchMove),Fe(document,"touchmove",this._onTouchMove),Fe(document,"pointermove",this._onTouchMove),Fe(document,"dragover",xo),Fe(document,"mousemove",xo),Fe(document,"touchmove",xo)},_offUpEvents:function(){var e=this.el.ownerDocument;Fe(e,"mouseup",this._onDrop),Fe(e,"touchend",this._onDrop),Fe(e,"pointerup",this._onDrop),Fe(e,"touchcancel",this._onDrop),Fe(document,"selectstart",this)},_onDrop:function(e){var n=this.el,r=this.options;if(Wt=Jt(he),to=Jt(he,r.draggable),Rt("drop",this,{evt:e}),st=he&&he.parentNode,Wt=Jt(he),to=Jt(he,r.draggable),Ee.eventCanceled){this._nulling();return}nr=!1,Pa=!1,zr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vi(this.cloneId),Vi(this._dragStartId),this.nativeDraggable&&(Fe(document,"drop",this),Fe(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Nr&&$e(document.body,"user-select",""),$e(he,"transform",""),e&&(Or&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),De&&De.parentNode&&De.parentNode.removeChild(De),(Je===st||$t&&$t.lastPutMode!=="clone")&&it&&it.parentNode&&it.parentNode.removeChild(it),he&&(this.nativeDraggable&&Fe(he,"dragend",this),Pi(he),he.style["will-change"]="",Or&&!nr&&Yt(he,$t?$t.options.ghostClass:this.options.ghostClass,!1),Yt(he,this.options.chosenClass,!1),It({sortable:this,name:"unchoose",toEl:st,newIndex:null,newDraggableIndex:null,originalEvent:e}),Je!==st?(Wt>=0&&(It({rootEl:st,name:"add",toEl:st,fromEl:Je,originalEvent:e}),It({sortable:this,name:"remove",toEl:st,originalEvent:e}),It({rootEl:st,name:"sort",toEl:st,fromEl:Je,originalEvent:e}),It({sortable:this,name:"sort",toEl:st,originalEvent:e})),$t&&$t.save()):Wt!==tr&&Wt>=0&&(It({sortable:this,name:"update",toEl:st,originalEvent:e}),It({sortable:this,name:"sort",toEl:st,originalEvent:e})),Ee.active&&((Wt==null||Wt===-1)&&(Wt=tr,to=Ir),It({sortable:this,name:"end",toEl:st,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Rt("nulling",this),Je=he=st=De=Bo=it=Ia=eo=To=ln=Or=Wt=to=tr=Ir=or=Lr=$t=Oa=Ee.dragged=Ee.ghost=Ee.clone=Ee.active=null,Fa.forEach(function(e){e.checked=!0}),Fa.length=Ii=Oi=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":he&&(this._onDragOver(e),Vy(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,r=this.el.children,a=0,s=r.length,i=this.options;a<s;a++)n=r[a],vn(n,i.draggable,this.el,!1)&&e.push(n.getAttribute(i.dataIdAttr)||Uy(n));return e},sort:function(e,n){var r={},a=this.el;this.toArray().forEach(function(s,i){var l=a.children[i];vn(l,this.options.draggable,a,!1)&&(r[s]=l)},this),n&&this.captureAnimationState(),e.forEach(function(s){r[s]&&(a.removeChild(r[s]),a.appendChild(r[s]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return vn(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var r=this.options;if(n===void 0)return r[e];var a=Ar.modifyOption(this,e,n);typeof a<"u"?r[e]=a:r[e]=n,e==="group"&&Zu(r)},destroy:function(){Rt("destroy",this);var e=this.el;e[Ut]=null,Fe(e,"mousedown",this._onTapStart),Fe(e,"touchstart",this._onTapStart),Fe(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Fe(e,"dragover",this),Fe(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),za.splice(za.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!eo){if(Rt("hideClone",this),Ee.eventCanceled)return;$e(it,"display","none"),this.options.removeCloneOnHide&&it.parentNode&&it.parentNode.removeChild(it),eo=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(eo){if(Rt("showClone",this),Ee.eventCanceled)return;he.parentNode==Je&&!this.options.group.revertClone?Je.insertBefore(it,he):Bo?Je.insertBefore(it,Bo):Je.appendChild(it),this.options.group.revertClone&&this.animate(he,it),$e(it,"display",""),eo=!1}}};function Vy(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function ja(o,e,n,r,a,s,i,l){var c,d=o[Ut],h=d.options.onMove,u;return window.CustomEvent&&!Vn&&!Mr?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=e,c.from=o,c.dragged=n,c.draggedRect=r,c.related=a||e,c.relatedRect=s||kt(e),c.willInsertAfter=l,c.originalEvent=i,o.dispatchEvent(c),h&&(u=h.call(d,c,i)),u}function Pi(o){o.draggable=!1}function Fy(){zi=!1}function Ry(o,e,n){var r=kt(Jo(n.el,0,n.options,!0)),a=10;return e?o.clientX<r.left-a||o.clientY<r.top&&o.clientX<r.right:o.clientY<r.top-a||o.clientY<r.bottom&&o.clientX<r.left}function Hy(o,e,n){var r=kt(Ni(n.el,n.options.draggable)),a=10;return e?o.clientX>r.right+a||o.clientX<=r.right&&o.clientY>r.bottom&&o.clientX>=r.left:o.clientX>r.right&&o.clientY>r.top||o.clientX<=r.right&&o.clientY>r.bottom+a}function jy(o,e,n,r,a,s,i,l){var c=r?o.clientY:o.clientX,d=r?n.height:n.width,h=r?n.top:n.left,u=r?n.bottom:n.right,p=!1;if(!i){if(l&&Va<d*a){if(!zr&&(Lr===1?c>h+d*s/2:c<u-d*s/2)&&(zr=!0),zr)p=!0;else if(Lr===1?c<h+Va:c>u-Va)return-Lr}else if(c>h+d*(1-a)/2&&c<u-d*(1-a)/2)return Yy(e)}return p=p||i,p&&(c<h+d*s/2||c>u-d*s/2)?c>h+d/2?1:-1:0}function Yy(o){return Jt(he)<Jt(o)?1:-1}function Uy(o){for(var e=o.tagName+o.className+o.src+o.href+o.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Wy(o){Fa.length=0;for(var e=o.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&Fa.push(r)}}function Ya(o){return setTimeout(o,0)}function Vi(o){return clearTimeout(o)}Ra&&He(document,"touchmove",function(o){(Ee.active||nr)&&o.cancelable&&o.preventDefault()}),Ee.utils={on:He,off:Fe,css:$e,find:Ru,is:function(e,n){return!!vn(e,n,e,!1)},extend:Ty,throttle:Yu,closest:vn,toggleClass:Yt,clone:Wu,index:Jt,nextTick:Ya,cancelNextTick:Vi,detectDirection:Qu,getChild:Jo},Ee.get=function(o){return o[Ut]},Ee.mount=function(){for(var o=arguments.length,e=new Array(o),n=0;n<o;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(Ee.utils=_n(_n({},Ee.utils),r.utils)),Ar.mount(r)})},Ee.create=function(o,e){return new Ee(o,e)},Ee.version=$y;var yt=[],Pr,Fi,Ri=!1,Hi,ji,Ua,Vr;function Gy(){function o(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return o.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?He(document,"dragover",this._handleAutoScroll):this.options.supportPointer?He(document,"pointermove",this._handleFallbackAutoScroll):r.touches?He(document,"touchmove",this._handleFallbackAutoScroll):He(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Fe(document,"dragover",this._handleAutoScroll):(Fe(document,"pointermove",this._handleFallbackAutoScroll),Fe(document,"touchmove",this._handleFallbackAutoScroll),Fe(document,"mousemove",this._handleFallbackAutoScroll)),th(),Wa(),xy()},nulling:function(){Ua=Fi=Pr=Ri=Vr=Hi=ji=null,yt.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var a=this,s=(n.touches?n.touches[0]:n).clientX,i=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(s,i);if(Ua=n,r||this.options.forceAutoScrollFallback||Mr||Vn||Nr){Yi(n,this.options,l,r);var c=Jn(l,!0);Ri&&(!Vr||s!==Hi||i!==ji)&&(Vr&&th(),Vr=setInterval(function(){var d=Jn(document.elementFromPoint(s,i),!0);d!==c&&(c=d,Wa()),Yi(n,a.options,d,r)},10),Hi=s,ji=i)}else{if(!this.options.bubbleScroll||Jn(l,!0)===Cn()){Wa();return}Yi(n,this.options,Jn(l,!1),!1)}}},zn(o,{pluginName:"scroll",initializeByDefault:!0})}function Wa(){yt.forEach(function(o){clearInterval(o.pid)}),yt=[]}function th(){clearInterval(Vr)}var Yi=Yu(function(o,e,n,r){if(e.scroll){var a=(o.touches?o.touches[0]:o).clientX,s=(o.touches?o.touches[0]:o).clientY,i=e.scrollSensitivity,l=e.scrollSpeed,c=Cn(),d=!1,h;Fi!==n&&(Fi=n,Wa(),Pr=e.scroll,h=e.scrollFn,Pr===!0&&(Pr=Jn(n,!0)));var u=0,p=Pr;do{var m=p,f=kt(m),g=f.top,k=f.bottom,$=f.left,C=f.right,B=f.width,T=f.height,M=void 0,I=void 0,L=m.scrollWidth,D=m.scrollHeight,w=$e(m),b=m.scrollLeft,N=m.scrollTop;m===c?(M=B<L&&(w.overflowX==="auto"||w.overflowX==="scroll"||w.overflowX==="visible"),I=T<D&&(w.overflowY==="auto"||w.overflowY==="scroll"||w.overflowY==="visible")):(M=B<L&&(w.overflowX==="auto"||w.overflowX==="scroll"),I=T<D&&(w.overflowY==="auto"||w.overflowY==="scroll"));var H=M&&(Math.abs(C-a)<=i&&b+B<L)-(Math.abs($-a)<=i&&!!b),K=I&&(Math.abs(k-s)<=i&&N+T<D)-(Math.abs(g-s)<=i&&!!N);if(!yt[u])for(var v=0;v<=u;v++)yt[v]||(yt[v]={});(yt[u].vx!=H||yt[u].vy!=K||yt[u].el!==m)&&(yt[u].el=m,yt[u].vx=H,yt[u].vy=K,clearInterval(yt[u].pid),(H!=0||K!=0)&&(d=!0,yt[u].pid=setInterval((function(){r&&this.layer===0&&Ee.active._onTouchMove(Ua);var _=yt[this.layer].vy?yt[this.layer].vy*l:0,E=yt[this.layer].vx?yt[this.layer].vx*l:0;typeof h=="function"&&h.call(Ee.dragged.parentNode[Ut],E,_,o,Ua,yt[this.layer].el)!=="continue"||Uu(yt[this.layer].el,E,_)}).bind({layer:u}),24))),u++}while(e.bubbleScroll&&p!==c&&(p=Jn(p,!1)));Ri=d}},30),nh=function(e){var n=e.originalEvent,r=e.putSortable,a=e.dragEl,s=e.activeSortable,i=e.dispatchSortableEvent,l=e.hideGhostForTarget,c=e.unhideGhostForTarget;if(n){var d=r||s;l();var h=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,u=document.elementFromPoint(h.clientX,h.clientY);c(),d&&!d.el.contains(u)&&(i("spill"),this.onSpill({dragEl:a,putSortable:r}))}};function Ui(){}Ui.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var a=Jo(this.sortable.el,this.startIndex,this.options);a?this.sortable.el.insertBefore(n,a):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:nh},zn(Ui,{pluginName:"revertOnSpill"});function Wi(){}Wi.prototype={onSpill:function(e){var n=e.dragEl,r=e.putSortable,a=r||this.sortable;a.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),a.animateAll()},drop:nh},zn(Wi,{pluginName:"removeOnSpill"}),Ee.mount(new Gy),Ee.mount(Wi,Ui);function qy(){return typeof window<"u"?window.console:global.console}const Ky=qy();function Xy(o){const e=Object.create(null);return function(r){return e[r]||(e[r]=o(r))}}const Qy=/-(\w)/g,oh=Xy(o=>o.replace(Qy,(e,n)=>n?n.toUpperCase():""));function Gi(o){o.parentElement!==null&&o.parentElement.removeChild(o)}function rh(o,e,n){const r=n===0?o.children[0]:o.children[n-1].nextSibling;o.insertBefore(e,r)}function Zy(o,e){return Object.values(o).indexOf(e)}function Jy(o,e,n,r){if(!o)return[];const a=Object.values(o),s=e.length-r;return[...e].map((l,c)=>c>=s?a.length:a.indexOf(l))}function ah(o,e){this.$nextTick(()=>this.$emit(o.toLowerCase(),e))}function eb(o){return e=>{this.realList!==null&&this["onDrag"+o](e),ah.call(this,o,e)}}function tb(o){return["transition-group","TransitionGroup"].includes(o)}function nb(o){if(!o||o.length!==1)return!1;const[{type:e}]=o;return e?tb(e.name):!1}function ob(o,e){return e?{...e.props,...e.attrs}:o}const qi=["Start","Add","Remove","Update","End"],Ki=["Choose","Unchoose","Sort","Filter","Clone"],rb=["Move",...qi,...Ki].map(o=>"on"+o);let Xi=null;const ab={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:o=>o},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},sh=t.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...qi.map(o=>o.toLowerCase()),...Ki.map(o=>o.toLowerCase())],props:ab,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const o=this.$slots.default?this.$slots.default():null,e=ob(this.$attrs,this.componentData);return o?(this.transitionMode=nb(o),t.h(this.getTag(),e,o)):t.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&Ky.error("list props are mutually exclusive! Please set one.")},mounted(){const o={};qi.forEach(a=>{o["on"+a]=eb.call(this,a)}),Ki.forEach(a=>{o["on"+a]=ah.bind(this,a)});const e=Object.keys(this.$attrs).reduce((a,s)=>(a[oh(s)]=this.$attrs[s],a),{}),n=Object.assign({},e,o,{onMove:(a,s)=>this.onDragMove(a,s)});!("draggable"in n)&&(n.draggable=">*");const r=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new Ee(r,n),r.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(o){this.updateOptions(o)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?t.resolveComponent(this.component):this.tag},updateOptions(o){for(var e in o){const n=oh(e);rb.indexOf(n)===-1&&this._sortable.option(n,o[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=Jy(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(o){const e=Zy(this.getChildrenNodes()||[],o);if(e===-1)return null;const n=this.realList[e];return{index:e,element:n}},emitChanges(o){this.$nextTick(()=>{this.$emit("change",o)})},alterList(o){if(this.list){o(this.list);return}const e=[...this.modelValue];o(e),this.$emit("update:modelValue",e)},spliceList(){const o=e=>e.splice(...arguments);this.alterList(o)},updatePosition(o,e){const n=r=>r.splice(e,0,r.splice(o,1)[0]);this.alterList(n)},getVmIndex(o){const e=this.visibleIndexes,n=e.length;return o>n-1?n:e[o]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(o){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[o].data=null;const n=this.getComponent();n.children=[],n.kept=void 0},onDragStart(o){this.computeIndexes(),this.context=this.getUnderlyingVm(o.item),this.context&&(o.item._underlying_vm_=this.clone(this.context.element),Xi=o.item)},onDragAdd(o){const e=o.item._underlying_vm_;if(e===void 0)return;Gi(o.item);const n=this.getVmIndex(o.newIndex);this.spliceList(n,0,e),this.computeIndexes();const r={element:e,newIndex:n};this.emitChanges({added:r})},onDragRemove(o){if(rh(this.$el,o.item,o.oldIndex),o.pullMode==="clone"){Gi(o.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})},onDragUpdate(o){Gi(o.item),rh(o.from,o.item,o.oldIndex);const e=this.context.index,n=this.getVmIndex(o.newIndex);this.updatePosition(e,n);const r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},updateProperty(o,e){o.hasOwnProperty(e)&&(o[e]+=this.headerOffset)},onDragMove(o,e){const n=this.move;if(!n||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(o),a=this.context,s=this.computeFutureIndex(r,o);Object.assign(a,{futureIndex:s});const i=Object.assign({},o,{relatedContext:r,draggedContext:a});return n(i,e)},onDragEnd(){this.computeIndexes(),Xi=null},getTrargetedComponent(o){return o.__draggable_component__},getRelatedContextFromMoveEvent({to:o,related:e}){const n=this.getTrargetedComponent(o);if(!n)return{component:n};const r=n.realList,a={list:r,component:n};if(o!==e&&r&&n.getUnderlyingVm){const s=n.getUnderlyingVm(e);if(s)return Object.assign(s,a)}return a},computeFutureIndex(o,e){const n=[...e.to.children].filter(i=>i.style.display!=="none");if(n.length===0)return 0;const r=n.indexOf(e.related),a=o.component.getVmIndex(r);return n.indexOf(Xi)!==-1||!e.willInsertAfter?a:a+1}}}),sb=t.defineComponent({__name:"CardContentList",props:t.mergeModels({list:{},isSortable:{type:Boolean}},{list:{required:!0},listModifiers:{}}),emits:["update:list"],setup(o){const e=t.useModel(o,"list"),n=t.ref(),r=t.ref(!0);function a(d,h){const u=[...e.value],p={...u[d]};p.value=h,u[d]=p,e.value=u}function s(d,h){const u=h==="up"?d-1:d+1;if(u<0||u>=e.value.length)return;const p=[...e.value],m={...p[d]};p[d]=p[u],p[u]=m,e.value=p}function i(d){n.value=d.oldIndex}function l(){return o.isSortable}function c(){r.value=!1}return(d,h)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(d.$style.root)},[t.createVNode(t.unref(sh),{modelValue:e.value,"onUpdate:modelValue":h[0]||(h[0]=u=>e.value=u),filter:`.${d.$style["is-disabled"]}`,move:l,class:t.normalizeClass(d.$style.list),transitionMode:"",noTransitionOnDrag:!1,onStart:c,onEnd:h[1]||(h[1]=u=>r.value=!0),onChoose:i,onUnchoose:h[2]||(h[2]=u=>n.value=null)},{default:t.withCtx(()=>[t.createVNode(t.TransitionGroup,{type:"transition",name:r.value?"flip-list":void 0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(u,p)=>(t.openBlock(),t.createBlock(t.unref(Iu),{key:u.title+u.description+u.image,isSortable:d.isSortable,isChosen:p===n.value,title:u.title,description:u.description,image:u.image,value:u.value,class:t.normalizeClass({[d.$style["is-disabled"]]:!d.isSortable}),"onUpdate:value":m=>a(p,m),onClickMoveUp:m=>s(p,"up"),onClickMoveDown:m=>s(p,"down")},null,8,["isSortable","isChosen","title","description","image","value","class","onUpdate:value","onClickMoveUp","onClickMoveDown"]))),128))]),_:1},8,["name"])]),_:1},8,["modelValue","filter","class"])],2))}}),ih={"is-disabled":"CardContentList__is-disabled_f57bc",list:"CardContentList__list_df4a5"},ib=X(sb,[["__cssModules",{$style:ih}]]),lb=X(t.defineComponent({__name:"CardContentListSkeleton",setup(o){return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.$style.root)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.list)},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(4,r=>t.createVNode(t.unref(Ou),{key:r})),64))],2)],2))}}),[["__cssModules",{$style:ih}]]),Ga={"fade-enter-active":"TransitionFade__fade-enter-active_b9e5e","fade-leave-active":"TransitionFade__fade-leave-active_95a44","fade-enter-from":"TransitionFade__fade-enter-from_edaa1","fade-leave-to":"TransitionFade__fade-leave-to_013a6"},Mo=t.defineComponent({name:"TransitionFade",props:{appear:{type:Boolean,default:!1},mode:{type:String,default:"out-in"},duration:{type:Number,default:450}},setup(o,{slots:e}){return()=>t.h(t.Transition,{name:"fade",appear:o.appear,mode:o.mode,duration:o.duration,enterFromClass:Ga["fade-enter-from"],enterActiveClass:Ga["fade-enter-active"],leaveActiveClass:Ga["fade-leave-active"],leaveToClass:Ga["fade-leave-to"]},()=>e.default?e.default():[])}}),cb=["value"],qa=X(t.defineComponent({__name:"Checkbox",props:{value:{},size:{},isIndeterminate:{type:Boolean,default:!1},isDisabled:{type:Boolean}},emits:["update:value","click"],setup(o,{emit:e}){const n=e;return(r,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([r.$style.root,r.$style[`size-${r.size.toString()}`],{[r.$style.checked]:r.value||r.value===null}]),onClick:a[1]||(a[1]=s=>n("click",s))},[t.createElementVNode("input",{class:t.normalizeClass(r.$style.input),hidden:"",type:"checkbox",value:r.value,onChange:a[0]||(a[0]=s=>n("update:value",!r.value))},null,42,cb),t.createVNode(t.unref(Mo),null,{default:t.withCtx(()=>[!r.isIndeterminate&&r.value?(t.openBlock(),t.createBlock(t.unref(ye),{key:0,name:"outline-check",size:Number(r.size)-4,color:"foreground-interactive-button-base-primary",class:t.normalizeClass(r.$style.icon)},null,8,["size","class"])):r.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.indeterminate)},null,2)):t.createCommentVNode("",!0)]),_:1})],2))}}),[["__cssModules",{$style:{root:"Checkbox__root_f45d5",input:"Checkbox__input_620bc",checked:"Checkbox__checked_3839a","size-16":"Checkbox__size-16_94879",indeterminate:"Checkbox__indeterminate_1896f","size-20":"Checkbox__size-20_51064",icon:"Checkbox__icon_c8204"}}]]),Qi=X(t.defineComponent({__name:"CheckboxCell",props:{value:{type:Boolean},title:{},description:{},isIndeterminate:{type:Boolean,default:!1},size:{default:"16"}},emits:["update:value"],setup(o,{emit:e}){const n=e;return(r,a)=>(t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(r.$style.root)},[t.createVNode(t.unref(qa),{size:r.size,"is-indeterminate":r.isIndeterminate,value:r.value,"onUpdate:value":a[0]||(a[0]=s=>n("update:value",s))},null,8,["size","is-indeterminate","value"]),t.renderSlot(r.$slots,"leftItem"),t.createElementVNode("div",{class:t.normalizeClass(r.$style.content)},[t.createVNode(t.unref(oe),{size:r.size==="16"?"caption":"subhead",weight:"regular",color:"foreground-layout-layout-1-primary"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.title),1)]),_:1},8,["size"]),r.description?(t.openBlock(),t.createBlock(t.unref(oe),{key:0,size:"caption",weight:"regular",color:"foreground-layout-layout-1-secondary"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.description),1)]),_:1})):t.createCommentVNode("",!0)],2)],2))}}),[["__cssModules",{$style:{root:"CheckboxCell__root_9478c",content:"CheckboxCell__content_7fd78"}}]]),no=X(t.defineComponent({__name:"Chip",props:{count:{},view:{default:"base-primary"}},emits:["click","delete"],setup(o,{emit:e}){const n=e,r=t.computed(()=>o.view==="base-secondary"?"foreground-interactive-button-base-secondary":"foreground-interactive-button-base-primary");return(a,s)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass([a.$style.root,a.$style[`view_${a.view}`]]),onClick:s[1]||(s[1]=i=>n("click"))},[t.createVNode(t.unref(oe),{class:t.normalizeClass(a.$style.text),size:"caption",color:r.value},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},8,["class","color"]),a.count?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(a.$style.counter)},[t.createVNode(t.unref(oe),{class:t.normalizeClass(a.$style.value),size:"caption",color:r.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.count),1)]),_:1},8,["class","color"])],2)):t.createCommentVNode("",!0),t.createVNode(t.unref(ye),{class:t.normalizeClass(a.$style.delete),color:r.value,size:"18",name:"outline-cross",onClick:s[0]||(s[0]=t.withModifiers(i=>n("delete"),["stop"]))},null,8,["class","color"])],2))}}),[["__cssModules",{$style:{root:"Chip__root_f8f48","view_base-primary":"Chip__view_base-primary_e9bb2","view_base-secondary":"Chip__view_base-secondary_63f45",counter:"Chip__counter_0bf18",delete:"Chip__delete_7a4b5",text:"Chip__text_78294"}}]]),en=X(t.defineComponent({__name:"Divider",props:{size:{},opacity:{default:1}},setup(o){return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([e.$style.root,e.$style[`size_${e.size}`]]),style:t.normalizeStyle({...Number(e.opacity)!==1&&{opacity:Number(e.opacity)}})},null,6))}}),[["__cssModules",{$style:{root:"Divider__root_08288",size_s:"Divider__size_s_0e343",size_m:"Divider__size_m_73f73"}}]]),lh=()=>{function o(i){i.style.height="0px",i.style.opacity="0",i.style.overflow="hidden"}function e(i,l){i.style.transition="height 0.3s ease",i.style.height=i.scrollHeight+"px",i.addEventListener("transitionend",()=>{i.style.transition="opacity 0.2s ease",i.style.opacity="1",i.addEventListener("transitionend",l,{once:!0})},{once:!0})}function n(i){i.style.height="",i.style.overflow=""}function r(i){i.style.height=i.scrollHeight+"px",i.style.opacity="1",i.style.overflow="hidden"}function a(i,l){i.style.transition="opacity 0.3s ease",i.style.opacity="0",i.addEventListener("transitionend",()=>{i.style.transition="all 0.3s ease",i.style.height="0px",i.style.paddingTop="0px",i.addEventListener("transitionend",l,{once:!0})},{once:!0})}function s(i){i.style.height="0px"}return{beforeEnter:o,enter:e,afterEnter:n,beforeLeave:r,leave:a,afterLeave:s}},db=X(t.defineComponent({__name:"Dropdown",props:{title:{},isActive:{type:Boolean}},emits:["click"],setup(o,{emit:e}){const n=e,r=t.useCssModule(),a=lh(),s=t.ref(o.isActive??!1),i=t.computed(()=>[s.value&&r["is-open"]]);function l(){s.value=!s.value,n("click",s.value)}return t.watch(()=>o.isActive,c=>{s.value=c}),(c,d)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(i.value)},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(r).header),"data-test":"DropdownTextHeader",onClick:l},[t.createVNode(t.unref(oe),{size:"subhead",color:"text-common-base-secondary-default"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.title),1)]),_:1}),t.createVNode(t.unref(ye),{class:t.normalizeClass(t.unref(r).icon),name:"outline-chevron-down",size:"18",color:"icon-common-base-secondary-default"},null,8,["class"])],2),t.createVNode(t.Transition,t.toHandlers(t.unref(a)),{default:t.withCtx(()=>[s.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(r).content)},[t.renderSlot(c.$slots,"default")],2)):t.createCommentVNode("",!0)]),_:3},16)],2))}}),[["__cssModules",{$style:{header:"Dropdown__header_4b67e",icon:"Dropdown__icon_d8b38",content:"Dropdown__content_1f45b","is-open":"Dropdown__is-open_47cb6"}}]]);function ub(o,e){if((!o||o.length===0)&&!e)return"";const n=(o==null?void 0:o.map(i=>{if(i.includes("/")){const l=i.split("/"),c=l[1];return c==="*"?l[0].toUpperCase():c.includes("+")?c.split("+")[0].toUpperCase():c.toUpperCase()}else return i.toUpperCase()}))||[],a=Array.from(new Set(n)).join(", ");let s="";if(e){const i=e.match(/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i);if(i){const l=i[1],c=i[2].toUpperCase();s=`до ${l} ${{B:"б",KB:"Кб",MB:"Мб",GB:"Гб"}[c]||c}.`}}return a&&s?`${a} ${s}`:a||s}function hb(o){if(!o)return 0;const e={B:1,KB:1024,MB:1024**2,GB:1024**3},n=/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i,r=o.replace(/\s+/g,"").match(n);if(r){const a=parseFloat(r[1]),s=r[2].toUpperCase(),i=e[s];if(!i)throw new Error(`Неизвестная единица измерения: "${s}"`);return Math.round(a*i)}return 0}function pb({format:o,size:e,fileSize:n,fileExtension:r,fileType:a}){const s=hb(e);let i=!1,l=!1;if(n>s&&(i=!0),o&&o.length>0){const c=o.map(u=>u.toLowerCase()),d=r&&c.includes(r),h=c.includes(a.toLowerCase());!d&&!h&&(l=!0)}return{size:i,format:l}}function fb({errors:o,format:e,size:n}){if(o.format&&(e!=null&&e.length)){const r=e.map(i=>{if(i.includes("/")){const l=i.split("/")[1];return l==="*"?i.split("/")[0].toUpperCase():l.includes("+")?l.split("+")[0].toUpperCase():l.toUpperCase()}else return i.toUpperCase()}),a=Array.from(new Set(r));let s="";if(a.length===1)s=a[0];else if(a.length===2)s=`${a[0]} или ${a[1]}`;else{const i=a.pop();s=`${a.join(", ")} или ${i}`}return`Файл должен иметь расширение ${s}`}if(o.size&&n){const r=n.match(/^(\d+(?:\.\d+)?)(B|KB|MB|GB)$/i);if(r){const a=r[1],s=r[2].toUpperCase();return`Размер файла не должен превышать ${a} ${{B:"Б",KB:"Кб",MB:"Мб",GB:"Гб"}[s]||s}.`}}return""}function ch(o){const e=t.ref(o);function n(r){e.value=r}return[e,n]}function mb(o){const[e,n]=ch(!1);function r(){o.value||n(!0)}function a(){o.value||n(!1)}function s(){o.value||n(!1)}return{isDropping:e,onDragEnter:r,onDragLeave:a,onDrop:s}}function gb(o,e){const n=t.computed(()=>o?"text-disable-default":"text-common-base-primary-default"),r=t.computed(()=>o?"text-disable-default":"text-common-base-primary-default"),a=t.computed(()=>o?"icon-disable-primary":e.value?"icon-common-critical-primary-default":"icon-common-success-primary-default"),s=t.computed(()=>e.value?o?"outline-warning":"filled-warning":o?"outline-success":"filled-success"),i=t.computed(()=>e.value?"text-common-critical-primary-default":o?"text-disable-default":"text-common-base-secondary-default");return{labelColor:n,fileNameColor:r,fileIconColor:a,fileIconName:s,descriptionColor:i}}const yb=["accept","disabled"],bb=X(t.defineComponent({__name:"Dropzone",props:t.mergeModels({value:{},label:{},placeholder:{},isLoading:{type:Boolean},description:{},errorText:{},isError:{type:Boolean},isDisabled:{type:Boolean},format:{},size:{}},{value:{required:!0},valueModifiers:{},isError:{type:Boolean},isErrorModifiers:{}}),emits:t.mergeModels(["update:value"],["update:value","update:isError"]),setup(o,{emit:e}){const n=e,r=t.useModel(o,"value"),a=t.useModel(o,"isError"),s=t.useCssModule(),i=t.ref(),l=t.ref(""),c=t.ref(""),d=t.ref({format:!1,size:!1}),h=t.computed(()=>l.value?"file":"empty"),{labelColor:u,fileNameColor:p,fileIconColor:m,fileIconName:f,descriptionColor:g}=gb(o.isDisabled,a),{isDropping:k,onDragEnter:$,onDragLeave:C,onDrop:B}=mb(r);async function T(v){const{files:_}=v.target;if(a.value=!1,n("update:value",!1),d.value={format:!1,size:!1},i.value&&(_!=null&&_.length)){const E=_[0],{name:O,extension:z}=D(E);l.value=O,c.value=z,d.value=pb({size:o.size,format:o.format,fileSize:E.size,fileExtension:c.value,fileType:E.type}),a.value=d.value.size||d.value.format,!d.value.size&&!d.value.format&&(r.value=await I(E)),i.value.value=""}}function M(){r.value=null,a.value=!1,i.value.value="",l.value=""}function I(v){return new Promise((_,E)=>{const O=new FileReader;O.readAsDataURL(v),O.onload=()=>{const z=O.result,[V,q]=z.split(","),F=V.match(/data:(.*);base64/),ae=F?F[1]:"";_({mime:ae,content:q})},O.onerror=z=>E(z)})}function L(v){return{"image/png":"png","image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","application/pdf":"pdf","text/plain":"txt"}[v]||"bin"}function D(v){const _=v.name.lastIndexOf(".");return{name:_!==-1?v.name.slice(0,_):v.name,extension:_!==-1?v.name.slice(_+1).toLowerCase():""}}const w=t.computed(()=>a.value&&o.errorText?o.errorText:a.value||d.value.size||d.value.format?fb({errors:d.value,format:o.format,size:o.size}):o.description?o.description:ub(o.format,o.size)),b=t.computed(()=>o.format?o.format.map(v=>v.indexOf("/")!==-1?`${v}`:`.${v}`).join(","):""),N=t.computed(()=>[s.root,{[s["is-disabled"]]:o.isDisabled}]),H=t.computed(()=>[s.input,{[s["input-hidden"]]:h.value==="file"}]),K=t.computed(()=>[s.area,{[s["is-empty"]]:h.value==="empty",[s["is-file"]]:h.value==="file",[s["is-dropping"]]:k.value,[s["is-disabled"]]:o.isDisabled,[s["is-error"]]:a.value}]);return t.onMounted(()=>{r.value&&(l.value="file",c.value=L(r.value.mime))}),(v,_)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(N.value)},[t.createVNode(t.unref(oe),{size:"subhead",color:t.unref(u)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.label),1)]),_:1},8,["color"]),t.createElementVNode("div",{class:t.normalizeClass(K.value)},[t.createVNode(t.unref(nt),null,{default:t.withCtx(()=>[h.value==="empty"?(t.openBlock(),t.createElementBlock("div",{key:"empty",class:t.normalizeClass(t.unref(s).empty)},[t.createVNode(t.unref(nt),null,{default:t.withCtx(()=>[t.unref(k)?(t.openBlock(),t.createElementBlock("div",{key:"empty-drop",class:t.normalizeClass(t.unref(s)["drop-text"])},[t.createVNode(t.unref(oe),{class:t.normalizeClass(t.unref(s).placeholder),align:"center",size:"subhead",color:"text-input-base-secondary"},{default:t.withCtx(()=>_[3]||(_[3]=[t.createTextVNode(" Отпустите файл для загрузки ")])),_:1,__:[3]},8,["class"])],2)):(t.openBlock(),t.createElementBlock("div",{key:"empty-start",class:t.normalizeClass(t.unref(s).row)},[t.createVNode(t.unref(ye),{class:t.normalizeClass(t.unref(s)["icon-upload"]),color:"icon-input-base-primary",name:"outline-upload",size:"18"},null,8,["class"]),t.createVNode(t.unref(oe),{class:t.normalizeClass(t.unref(s).placeholder),size:"subhead",color:"text-input-base-secondary"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.placeholder),1)]),_:1},8,["class"])],2))]),_:1})],2)):(t.openBlock(),t.createElementBlock("div",{key:"file",class:t.normalizeClass(t.unref(s)["file-data"])},[t.createVNode(t.unref(Mo),null,{default:t.withCtx(()=>[v.isLoading?(t.openBlock(),t.createBlock(t.unref(Sr),{key:0,color:"icon-button-base-primary",size:"18"})):(t.openBlock(),t.createBlock(t.unref(ye),{key:1,class:t.normalizeClass(t.unref(s).icon),color:t.unref(m),name:t.unref(f),size:"18"},null,8,["class","color","name"]))]),_:1}),t.createVNode(t.unref(oe),{class:t.normalizeClass(t.unref(s)["file-name"]),size:"subhead",numberOfLines:"1",color:t.unref(p)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.value),1)]),_:1},8,["class","color"]),t.createVNode(t.unref(oe),{class:t.normalizeClass(t.unref(s)["file-extension"]),size:"subhead",color:t.unref(p)},{default:t.withCtx(()=>[t.createTextVNode(" ."+t.toDisplayString(c.value),1)]),_:1},8,["class","color"]),t.createElementVNode("button",{class:t.normalizeClass(t.unref(s)["button-clear"]),onClick:M},[t.createVNode(t.unref(ye),{color:"icon-input-base-primary",name:"outline-trash",size:"18"})],2)],2))]),_:1})],2),t.createVNode(t.unref(nt),null,{default:t.withCtx(()=>[w.value?(t.openBlock(),t.createBlock(t.unref(oe),{key:w.value,color:t.unref(g)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(w.value),1)]),_:1},8,["color"])):t.createCommentVNode("",!0)]),_:1}),t.createElementVNode("input",{ref_key:"refInput",ref:i,title:"Добавить файл",type:"file",class:t.normalizeClass(H.value),accept:b.value,disabled:v.isLoading||v.isDisabled,onDragenter:_[0]||(_[0]=(...E)=>t.unref($)&&t.unref($)(...E)),onDragleave:_[1]||(_[1]=(...E)=>t.unref(C)&&t.unref(C)(...E)),onDrop:_[2]||(_[2]=(...E)=>t.unref(B)&&t.unref(B)(...E)),onInput:T},null,42,yb)],2))}}),[["__cssModules",{$style:{root:"Dropzone__root_8c6b8","is-disabled":"Dropzone__is-disabled_a174c",input:"Dropzone__input_47a31","input-hidden":"Dropzone__input-hidden_d4ad8",area:"Dropzone__area_668a4","is-file":"Dropzone__is-file_d3781","is-dropping":"Dropzone__is-dropping_01108","is-error":"Dropzone__is-error_d3922",empty:"Dropzone__empty_7ee21",row:"Dropzone__row_19908","file-data":"Dropzone__file-data_29711","file-name":"Dropzone__file-name_84c4b","file-extension":"Dropzone__file-extension_f001e","button-clear":"Dropzone__button-clear_6a354"}}]]),Zi=Symbol();function kb(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Ka={exports:{}},wb=Ka.exports,dh;function _b(){return dh||(dh=1,function(o,e){(function(r,a){o.exports=a()})(wb,function(){return function(n){var r={};function a(s){if(r[s])return r[s].exports;var i=r[s]={i:s,l:!1,exports:{}};return n[s].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=n,a.c=r,a.d=function(s,i,l){a.o(s,i)||Object.defineProperty(s,i,{enumerable:!0,get:l})},a.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},a.t=function(s,i){if(i&1&&(s=a(s)),i&8||i&4&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),i&2&&typeof s!="string")for(var c in s)a.d(l,c,(function(d){return s[d]}).bind(null,c));return l},a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,"a",i),i},a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},a.p="",a(a.s=0)}([function(n,r,a){a.r(r);var s=function(x){return Array.isArray(x)?x:[x]},i=function(x){return x instanceof Node},l=function(x){return x instanceof NodeList},c=function(x,se){if(x&&se){x=l(x)?x:[x];for(var ge=0;ge<x.length&&se(x[ge],ge,x.length)!==!0;ge++);}},d=function(x){return console.error("[scroll-lock] ".concat(x))},h=function(x){if(Array.isArray(x)){var se=x.join(", ");return se}},u=function(x){var se=[];return c(x,function(ge){return se.push(ge)}),se},p=function(x,se){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:document;if(ge&&u(be.querySelectorAll(se)).indexOf(x)!==-1)return x;for(;(x=x.parentElement)&&u(be.querySelectorAll(se)).indexOf(x)===-1;);return x},m=function(x,se){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document,be=u(ge.querySelectorAll(se)).indexOf(x)!==-1;return be},f=function(x){if(x){var se=getComputedStyle(x),ge=se.overflow==="hidden";return ge}},g=function(x){if(x){if(f(x))return!0;var se=x.scrollTop;return se<=0}},k=function(x){if(x){if(f(x))return!0;var se=x.scrollTop,ge=x.scrollHeight,be=se+x.offsetHeight;return be>=ge}},$=function(x){if(x){if(f(x))return!0;var se=x.scrollLeft;return se<=0}},C=function(x){if(x){if(f(x))return!0;var se=x.scrollLeft,ge=x.scrollWidth,be=se+x.offsetWidth;return be>=ge}},B=function(x){var se='textarea, [contenteditable="true"]';return m(x,se)},T=function(x){var se='input[type="range"]';return m(x,se)};a.d(r,"disablePageScroll",function(){return b}),a.d(r,"enablePageScroll",function(){return N}),a.d(r,"getScrollState",function(){return H}),a.d(r,"clearQueueScrollLocks",function(){return K}),a.d(r,"getTargetScrollBarWidth",function(){return v}),a.d(r,"getCurrentTargetScrollBarWidth",function(){return _}),a.d(r,"getPageScrollBarWidth",function(){return E}),a.d(r,"getCurrentPageScrollBarWidth",function(){return O}),a.d(r,"addScrollableTarget",function(){return z}),a.d(r,"removeScrollableTarget",function(){return V}),a.d(r,"addScrollableSelector",function(){return q}),a.d(r,"removeScrollableSelector",function(){return F}),a.d(r,"addLockableTarget",function(){return ae}),a.d(r,"addLockableSelector",function(){return A}),a.d(r,"setFillGapMethod",function(){return R}),a.d(r,"addFillGapTarget",function(){return G}),a.d(r,"removeFillGapTarget",function(){return ee}),a.d(r,"addFillGapSelector",function(){return y}),a.d(r,"removeFillGapSelector",function(){return U}),a.d(r,"refillGaps",function(){return ie});function M(Q){for(var x=1;x<arguments.length;x++){var se=arguments[x]!=null?arguments[x]:{},ge=Object.keys(se);typeof Object.getOwnPropertySymbols=="function"&&(ge=ge.concat(Object.getOwnPropertySymbols(se).filter(function(be){return Object.getOwnPropertyDescriptor(se,be).enumerable}))),ge.forEach(function(be){I(Q,be,se[be])})}return Q}function I(Q,x,se){return x in Q?Object.defineProperty(Q,x,{value:se,enumerable:!0,configurable:!0,writable:!0}):Q[x]=se,Q}var L=["padding","margin","width","max-width","none"],D=3,w={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:L[0],startTouchY:0,startTouchX:0},b=function(x){w.queue<=0&&(w.scroll=!1,Ce(),le()),z(x),w.queue++},N=function(x){w.queue>0&&w.queue--,w.queue<=0&&(w.scroll=!0,W(),de()),V(x)},H=function(){return w.scroll},K=function(){w.queue=0},v=function(x){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i(x)){var ge=x.style.overflowY;se?H()||(x.style.overflowY=x.getAttribute("data-scroll-lock-saved-overflow-y-property")):x.style.overflowY="scroll";var be=_(x);return x.style.overflowY=ge,be}else return 0},_=function(x){if(i(x))if(x===document.body){var se=document.documentElement.clientWidth,ge=window.innerWidth,be=ge-se;return be}else{var Zt=x.style.borderLeftWidth,kn=x.style.borderRightWidth;x.style.borderLeftWidth="0px",x.style.borderRightWidth="0px";var sn=x.offsetWidth-x.clientWidth;return x.style.borderLeftWidth=Zt,x.style.borderRightWidth=kn,sn}else return 0},E=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return v(document.body,x)},O=function(){return _(document.body)},z=function(x){if(x){var se=s(x);se.map(function(ge){c(ge,function(be){i(be)?be.setAttribute("data-scroll-lock-scrollable",""):d('"'.concat(be,'" is not a Element.'))})})}},V=function(x){if(x){var se=s(x);se.map(function(ge){c(ge,function(be){i(be)?be.removeAttribute("data-scroll-lock-scrollable"):d('"'.concat(be,'" is not a Element.'))})})}},q=function(x){if(x){var se=s(x);se.map(function(ge){w.scrollableSelectors.push(ge)})}},F=function(x){if(x){var se=s(x);se.map(function(ge){w.scrollableSelectors=w.scrollableSelectors.filter(function(be){return be!==ge})})}},ae=function(x){if(x){var se=s(x);se.map(function(ge){c(ge,function(be){i(be)?be.setAttribute("data-scroll-lock-lockable",""):d('"'.concat(be,'" is not a Element.'))})}),H()||Ce()}},A=function(x){if(x){var se=s(x);se.map(function(ge){w.lockableSelectors.push(ge)}),H()||Ce(),y(x)}},R=function(x){if(x)if(L.indexOf(x)!==-1)w.fillGapMethod=x,ie();else{var se=L.join(", ");d('"'.concat(x,`" method is not available!
11
11
  Available fill gap methods: `).concat(se,"."))}},G=function(x){if(x){var se=s(x);se.map(function(ge){c(ge,function(be){i(be)?(be.setAttribute("data-scroll-lock-fill-gap",""),w.scroll||Oe(be)):d('"'.concat(be,'" is not a Element.'))})})}},ee=function(x){if(x){var se=s(x);se.map(function(ge){c(ge,function(be){i(be)?(be.removeAttribute("data-scroll-lock-fill-gap"),w.scroll||Re(be)):d('"'.concat(be,'" is not a Element.'))})})}},y=function(x){if(x){var se=s(x);se.map(function(ge){w.fillGapSelectors.indexOf(ge)===-1&&(w.fillGapSelectors.push(ge),w.scroll||ue(ge))})}},U=function(x){if(x){var se=s(x);se.map(function(ge){w.fillGapSelectors=w.fillGapSelectors.filter(function(be){return be!==ge}),w.scroll||Ae(ge)})}},ie=function(){w.scroll||le()},Ce=function(){var x=h(w.lockableSelectors);Be(x)},W=function(){var x=h(w.lockableSelectors);ne(x)},Be=function(x){var se=document.querySelectorAll(x);c(se,function(ge){ce(ge)})},ne=function(x){var se=document.querySelectorAll(x);c(se,function(ge){S(ge)})},ce=function(x){if(i(x)&&x.getAttribute("data-scroll-lock-locked")!=="true"){var se=window.getComputedStyle(x);x.setAttribute("data-scroll-lock-saved-overflow-y-property",se.overflowY),x.setAttribute("data-scroll-lock-saved-inline-overflow-property",x.style.overflow),x.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",x.style.overflowY),x.style.overflow="hidden",x.setAttribute("data-scroll-lock-locked","true")}},S=function(x){i(x)&&x.getAttribute("data-scroll-lock-locked")==="true"&&(x.style.overflow=x.getAttribute("data-scroll-lock-saved-inline-overflow-property"),x.style.overflowY=x.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),x.removeAttribute("data-scroll-lock-saved-overflow-property"),x.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),x.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),x.removeAttribute("data-scroll-lock-locked"))},le=function(){w.fillGapSelectors.map(function(x){ue(x)})},de=function(){w.fillGapSelectors.map(function(x){Ae(x)})},ue=function(x){var se=document.querySelectorAll(x),ge=w.lockableSelectors.indexOf(x)!==-1;c(se,function(be){Oe(be,ge)})},Oe=function(x){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i(x)){var ge;if(x.getAttribute("data-scroll-lock-lockable")===""||se)ge=v(x,!0);else{var be=p(x,h(w.lockableSelectors));ge=v(be,!0)}x.getAttribute("data-scroll-lock-filled-gap")==="true"&&Re(x);var Zt=window.getComputedStyle(x);if(x.setAttribute("data-scroll-lock-filled-gap","true"),x.setAttribute("data-scroll-lock-current-fill-gap-method",w.fillGapMethod),w.fillGapMethod==="margin"){var kn=parseFloat(Zt.marginRight);x.style.marginRight="".concat(kn+ge,"px")}else if(w.fillGapMethod==="width")x.style.width="calc(100% - ".concat(ge,"px)");else if(w.fillGapMethod==="max-width")x.style.maxWidth="calc(100% - ".concat(ge,"px)");else if(w.fillGapMethod==="padding"){var sn=parseFloat(Zt.paddingRight);x.style.paddingRight="".concat(sn+ge,"px")}}},Ae=function(x){var se=document.querySelectorAll(x);c(se,function(ge){Re(ge)})},Re=function(x){if(i(x)&&x.getAttribute("data-scroll-lock-filled-gap")==="true"){var se=x.getAttribute("data-scroll-lock-current-fill-gap-method");x.removeAttribute("data-scroll-lock-filled-gap"),x.removeAttribute("data-scroll-lock-current-fill-gap-method"),se==="margin"?x.style.marginRight="":se==="width"?x.style.width="":se==="max-width"?x.style.maxWidth="":se==="padding"&&(x.style.paddingRight="")}},at=function(x){ie()},j=function(x){w.scroll||(w.startTouchY=x.touches[0].clientY,w.startTouchX=x.touches[0].clientX)},pe=function(x){if(!w.scroll){var se=w.startTouchY,ge=w.startTouchX,be=x.touches[0].clientY,Zt=x.touches[0].clientX;if(x.touches.length<2){var kn=h(w.scrollableSelectors),sn={up:se<be,down:se>be,left:ge<Zt,right:ge>Zt},wo={up:se+D<be,down:se-D>be,left:ge+D<Zt,right:ge-D>Zt},va=function Y(te){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(te){var Ne=p(te,kn,!1);if(T(te))return!1;if(_e||B(te)&&p(te,kn)||m(te,kn)){var J=!1;$(te)&&C(te)?(sn.up&&g(te)||sn.down&&k(te))&&(J=!0):g(te)&&k(te)?(sn.left&&$(te)||sn.right&&C(te))&&(J=!0):(wo.up&&g(te)||wo.down&&k(te)||wo.left&&$(te)||wo.right&&C(te))&&(J=!0),J&&(Ne?Y(Ne,!0):x.cancelable&&x.preventDefault())}else Y(Ne)}else x.cancelable&&x.preventDefault()};va(x.target)}}},Ve=function(x){w.scroll||(w.startTouchY=0,w.startTouchX=0)};typeof window<"u"&&window.addEventListener("resize",at),typeof document<"u"&&(document.addEventListener("touchstart",j),document.addEventListener("touchmove",pe,{passive:!1}),document.addEventListener("touchend",Ve));var gt={hide:function(x){d(`"hide" is deprecated! Use "disablePageScroll" instead.
12
12
  https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget`),b(x)},show:function(x){d(`"show" is deprecated! Use "enablePageScroll" instead.
13
13
  https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget`),N(x)},toggle:function(x){d('"toggle" is deprecated! Do not use it.'),H()?b():N(x)},getState:function(){return d(`"getState" is deprecated! Use "getScrollState" instead.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namba_one/ui-kit-2",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "main": "dist/index.umd.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",