@verdocs/web-sdk 5.0.27 → 5.0.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/verdocs-preview_6.cjs.entry.js +1 -2
- package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +1 -2
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js.map +1 -1
- package/dist/components/{p-0e4ebc84.js → p-90e3fae6.js} +2 -3
- package/dist/components/p-90e3fae6.js.map +1 -0
- package/dist/components/verdocs-build.js +1 -1
- package/dist/components/verdocs-template-roles.js +1 -1
- package/dist/custom-elements.json +2156 -0
- package/dist/esm/verdocs-preview_6.entry.js +1 -2
- package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
- package/dist/verdocs-web-sdk/{p-4e9a8e8e.entry.js → p-0a745e87.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-4e9a8e8e.entry.js.map → p-0a745e87.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-6e93814f.system.entry.js → p-a41e6f04.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6e93814f.system.entry.js.map → p-a41e6f04.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-0e4ebc84.js.map +0 -1
@@ -4,5 +4,5 @@ import{r as e,c as t,h as i,H as o,F as s,g as n}from"./p-b9654a5e.js";import{Ve
|
|
4
4
|
* @author RubaXa <trash@rubaxa.org>
|
5
5
|
* @author owenm <owen23355@gmail.com>
|
6
6
|
* @license MIT
|
7
|
-
*/function xe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);if(t){o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}i.push.apply(i,o)}return i}function we(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};if(t%2){xe(Object(i),true).forEach((function(t){ke(e,t,i[t])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(i))}else{xe(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}}return e}function ye(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){ye=function(e){return typeof e}}else{ye=function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return ye(e)}function ke(e,t,i){if(t in e){Object.defineProperty(e,t,{value:i,enumerable:true,configurable:true,writable:true})}else{e[t]=i}return e}function Ee(){Ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i){if(Object.prototype.hasOwnProperty.call(i,o)){e[o]=i[o]}}}return e};return Ee.apply(this,arguments)}function Se(e,t){if(e==null)return{};var i={};var o=Object.keys(e);var s,n;for(n=0;n<o.length;n++){s=o[n];if(t.indexOf(s)>=0)continue;i[s]=e[s]}return i}function qe(e,t){if(e==null)return{};var i=Se(e,t);var o,s;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(s=0;s<n.length;s++){o=n[s];if(t.indexOf(o)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,o))continue;i[o]=e[o]}}return i}var Ce="1.15.6";function Me(e){if(typeof window!=="undefined"&&window.navigator){return!!navigator.userAgent.match(e)}}var Te=Me(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);var Ie=Me(/Edge/i);var Le=Me(/firefox/i);var He=Me(/safari/i)&&!Me(/chrome/i)&&!Me(/android/i);var De=Me(/iP(ad|od|hone)/i);var Ze=Me(/chrome/i)&&Me(/android/i);var ze={capture:false,passive:false};function Oe(e,t,i){e.addEventListener(t,i,!Te&&ze)}function _e(e,t,i){e.removeEventListener(t,i,!Te&&ze)}function Ne(e,t){if(!t)return;t[0]===">"&&(t=t.substring(1));if(e){try{if(e.matches){return e.matches(t)}else if(e.msMatchesSelector){return e.msMatchesSelector(t)}else if(e.webkitMatchesSelector){return e.webkitMatchesSelector(t)}}catch(e){return false}}return false}function Ve(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Ae(e,t,i,o){if(e){i=i||document;do{if(t!=null&&(t[0]===">"?e.parentNode===i&&Ne(e,t):Ne(e,t))||o&&e===i){return e}if(e===i)break}while(e=Ve(e))}return null}var Re=/\s+/g;function Ue(e,t,i){if(e&&t){if(e.classList){e.classList[i?"add":"remove"](t)}else{var o=(" "+e.className+" ").replace(Re," ").replace(" "+t+" "," ");e.className=(o+(i?" "+t:"")).replace(Re," ")}}}function je(e,t,i){var o=e&&e.style;if(o){if(i===void 0){if(document.defaultView&&document.defaultView.getComputedStyle){i=document.defaultView.getComputedStyle(e,"")}else if(e.currentStyle){i=e.currentStyle}return t===void 0?i:i[t]}else{if(!(t in o)&&t.indexOf("webkit")===-1){t="-webkit-"+t}o[t]=i+(typeof i==="string"?"":"px")}}}function Be(e,t){var i="";if(typeof e==="string"){i=e}else{do{var o=je(e,"transform");if(o&&o!=="none"){i=o+" "+i}}while(!t&&(e=e.parentNode))}var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(i)}function Pe(e,t,i){if(e){var o=e.getElementsByTagName(t),s=0,n=o.length;if(i){for(;s<n;s++){i(o[s],s)}}return o}return[]}function $e(){var e=document.scrollingElement;if(e){return e}else{return document.documentElement}}function Qe(e,t,i,o,s){if(!e.getBoundingClientRect&&e!==window)return;var n,l,r,a,d,c,h;if(e!==window&&e.parentNode&&e!==$e()){n=e.getBoundingClientRect();l=n.top;r=n.left;a=n.bottom;d=n.right;c=n.height;h=n.width}else{l=0;r=0;a=window.innerHeight;d=window.innerWidth;c=window.innerHeight;h=window.innerWidth}if((t||i)&&e!==window){s=s||e.parentNode;if(!Te){do{if(s&&s.getBoundingClientRect&&(je(s,"transform")!=="none"||i&&je(s,"position")!=="static")){var u=s.getBoundingClientRect();l-=u.top+parseInt(je(s,"border-top-width"));r-=u.left+parseInt(je(s,"border-left-width"));a=l+n.height;d=r+n.width;break}}while(s=s.parentNode)}}if(o&&e!==window){var f=Be(s||e),p=f&&f.a,v=f&&f.d;if(f){l/=v;r/=p;h/=p;c/=v;a=l+c;d=r+h}}return{top:l,left:r,bottom:a,right:d,width:h,height:c}}function Fe(e,t,i){var o=Ke(e,true),s=Qe(e)[t];while(o){var n=Qe(o)[i],l=void 0;if(i==="top"||i==="left"){l=s>=n}else{l=s<=n}if(!l)return o;if(o===$e())break;o=Ke(o,false)}return false}function We(e,t,i,o){var s=0,n=0,l=e.children;while(n<l.length){if(l[n].style.display!=="none"&&l[n]!==hi.ghost&&(o||l[n]!==hi.dragged)&&Ae(l[n],i.draggable,e,false)){if(s===t){return l[n]}s++}n++}return null}function Ye(e,t){var i=e.lastElementChild;while(i&&(i===hi.ghost||je(i,"display")==="none"||t&&!Ne(i,t))){i=i.previousElementSibling}return i||null}function Je(e,t){var i=0;if(!e||!e.parentNode){return-1}while(e=e.previousElementSibling){if(e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==hi.clone&&(!t||Ne(e,t))){i++}}return i}function Xe(e){var t=0,i=0,o=$e();if(e){do{var s=Be(e),n=s.a,l=s.d;t+=e.scrollLeft*n;i+=e.scrollTop*l}while(e!==o&&(e=e.parentNode))}return[t,i]}function Ge(e,t){for(var i in e){if(!e.hasOwnProperty(i))continue;for(var o in t){if(t.hasOwnProperty(o)&&t[o]===e[i][o])return Number(i)}}return-1}function Ke(e,t){if(!e||!e.getBoundingClientRect)return $e();var i=e;var o=false;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var s=je(i);if(i.clientWidth<i.scrollWidth&&(s.overflowX=="auto"||s.overflowX=="scroll")||i.clientHeight<i.scrollHeight&&(s.overflowY=="auto"||s.overflowY=="scroll")){if(!i.getBoundingClientRect||i===document.body)return $e();if(o||t)return i;o=true}}}while(i=i.parentNode);return $e()}function et(e,t){if(e&&t){for(var i in t){if(t.hasOwnProperty(i)){e[i]=t[i]}}}return e}function tt(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var it;function ot(e,t){return function(){if(!it){var i=arguments,o=this;if(i.length===1){e.call(o,i[0])}else{e.apply(o,i)}it=setTimeout((function(){it=void 0}),t)}}}function st(){clearTimeout(it);it=void 0}function nt(e,t,i){e.scrollLeft+=t;e.scrollTop+=i}function lt(e){var t=window.Polymer;var i=window.jQuery||window.Zepto;if(t&&t.dom){return t.dom(e).cloneNode(true)}else if(i){return i(e).clone(true)[0]}else{return e.cloneNode(true)}}function rt(e,t,i){var o={};Array.from(e.children).forEach((function(s){var n,l,r,a;if(!Ae(s,t.draggable,e,false)||s.animated||s===i)return;var d=Qe(s);o.left=Math.min((n=o.left)!==null&&n!==void 0?n:Infinity,d.left);o.top=Math.min((l=o.top)!==null&&l!==void 0?l:Infinity,d.top);o.right=Math.max((r=o.right)!==null&&r!==void 0?r:-Infinity,d.right);o.bottom=Math.max((a=o.bottom)!==null&&a!==void 0?a:-Infinity,d.bottom)}));o.width=o.right-o.left;o.height=o.bottom-o.top;o.x=o.left;o.y=o.top;return o}var at="Sortable"+(new Date).getTime();function dt(){var e=[],t;return{captureAnimationState:function t(){e=[];if(!this.options.animation)return;var i=[].slice.call(this.el.children);i.forEach((function(t){if(je(t,"display")==="none"||t===hi.ghost)return;e.push({target:t,rect:Qe(t)});var i=we({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=Be(t,true);if(o){i.top-=o.f;i.left-=o.e}}t.fromRect=i}))},addAnimationState:function t(i){e.push(i)},removeAnimationState:function t(i){e.splice(Ge(e,{target:i}),1)},animateAll:function i(o){var s=this;if(!this.options.animation){clearTimeout(t);if(typeof o==="function")o();return}var n=false,l=0;e.forEach((function(e){var t=0,i=e.target,o=i.fromRect,r=Qe(i),a=i.prevFromRect,d=i.prevToRect,c=e.rect,h=Be(i,true);if(h){r.top-=h.f;r.left-=h.e}i.toRect=r;if(i.thisAnimationDuration){if(tt(a,r)&&!tt(o,r)&&(c.top-r.top)/(c.left-r.left)===(o.top-r.top)/(o.left-r.left)){t=ht(c,a,d,s.options)}}if(!tt(r,o)){i.prevFromRect=o;i.prevToRect=r;if(!t){t=s.options.animation}s.animate(i,c,r,t)}if(t){n=true;l=Math.max(l,t);clearTimeout(i.animationResetTimer);i.animationResetTimer=setTimeout((function(){i.animationTime=0;i.prevFromRect=null;i.fromRect=null;i.prevToRect=null;i.thisAnimationDuration=null}),t);i.thisAnimationDuration=t}}));clearTimeout(t);if(!n){if(typeof o==="function")o()}else{t=setTimeout((function(){if(typeof o==="function")o()}),l)}e=[]},animate:function e(t,i,o,s){if(s){je(t,"transition","");je(t,"transform","");var n=Be(this.el),l=n&&n.a,r=n&&n.d,a=(i.left-o.left)/(l||1),d=(i.top-o.top)/(r||1);t.animatingX=!!a;t.animatingY=!!d;je(t,"transform","translate3d("+a+"px,"+d+"px,0)");this.forRepaintDummy=ct(t);je(t,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:""));je(t,"transform","translate3d(0,0,0)");typeof t.animated==="number"&&clearTimeout(t.animated);t.animated=setTimeout((function(){je(t,"transition","");je(t,"transform","");t.animated=false;t.animatingX=false;t.animatingY=false}),s)}}}}function ct(e){return e.offsetWidth}function ht(e,t,i,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))*o.animation}var ut=[];var ft={initializeByDefault:true};var pt={mount:function e(t){for(var i in ft){if(ft.hasOwnProperty(i)&&!(i in t)){t[i]=ft[i]}}ut.forEach((function(e){if(e.pluginName===t.pluginName){throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}}));ut.push(t)},pluginEvent:function e(t,i,o){var s=this;this.eventCanceled=false;o.cancel=function(){s.eventCanceled=true};var n=t+"Global";ut.forEach((function(e){if(!i[e.pluginName])return;if(i[e.pluginName][n]){i[e.pluginName][n](we({sortable:i},o))}if(i.options[e.pluginName]&&i[e.pluginName][t]){i[e.pluginName][t](we({sortable:i},o))}}))},initializePlugins:function e(t,i,o,s){ut.forEach((function(e){var s=e.pluginName;if(!t.options[s]&&!e.initializeByDefault)return;var n=new e(t,i,t.options);n.sortable=t;n.options=t.options;t[s]=n;Ee(o,n.defaults)}));for(var n in t.options){if(!t.options.hasOwnProperty(n))continue;var l=this.modifyOption(t,n,t.options[n]);if(typeof l!=="undefined"){t.options[n]=l}}},getEventProperties:function e(t,i){var o={};ut.forEach((function(e){if(typeof e.eventProperties!=="function")return;Ee(o,e.eventProperties.call(i[e.pluginName],t))}));return o},modifyOption:function e(t,i,o){var s;ut.forEach((function(e){if(!t[e.pluginName])return;if(e.optionListeners&&typeof e.optionListeners[i]==="function"){s=e.optionListeners[i].call(t[e.pluginName],o)}}));return s}};function vt(e){var t=e.sortable,i=e.rootEl,o=e.name,s=e.targetEl,n=e.cloneEl,l=e.toEl,r=e.fromEl,a=e.oldIndex,d=e.newIndex,c=e.oldDraggableIndex,h=e.newDraggableIndex,u=e.originalEvent,f=e.putSortable,p=e.extraEventProperties;t=t||i&&i[at];if(!t)return;var v,m=t.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);if(window.CustomEvent&&!Te&&!Ie){v=new CustomEvent(o,{bubbles:true,cancelable:true})}else{v=document.createEvent("Event");v.initEvent(o,true,true)}v.to=l||i;v.from=r||i;v.item=s||i;v.clone=n;v.oldIndex=a;v.newIndex=d;v.oldDraggableIndex=c;v.newDraggableIndex=h;v.originalEvent=u;v.pullMode=f?f.lastPutMode:undefined;var b=we(we({},p),pt.getEventProperties(o,t));for(var x in b){v[x]=b[x]}if(i){i.dispatchEvent(v)}if(m[g]){m[g].call(t,v)}}var mt=["evt"];var gt=function e(t,i){var o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},s=o.evt,n=qe(o,mt);pt.pluginEvent.bind(hi)(t,i,we({dragEl:xt,parentEl:wt,ghostEl:yt,rootEl:kt,nextEl:Et,lastDownEl:St,cloneEl:qt,cloneHidden:Ct,dragStarted:jt,putSortable:Dt,activeSortable:hi.active,originalEvent:s,oldIndex:Mt,oldDraggableIndex:It,newIndex:Tt,newDraggableIndex:Lt,hideGhostForTarget:ri,unhideGhostForTarget:ai,cloneNowHidden:function e(){Ct=true},cloneNowShown:function e(){Ct=false},dispatchSortableEvent:function e(t){bt({sortable:i,name:t,originalEvent:s})}},n))};function bt(e){vt(we({putSortable:Dt,cloneEl:qt,targetEl:xt,rootEl:kt,oldIndex:Mt,oldDraggableIndex:It,newIndex:Tt,newDraggableIndex:Lt},e))}var xt,wt,yt,kt,Et,St,qt,Ct,Mt,Tt,It,Lt,Ht,Dt,Zt=false,zt=false,Ot=[],_t,Nt,Vt,At,Rt,Ut,jt,Bt,Pt,$t=false,Qt=false,Ft,Wt,Yt=[],Jt=false,Xt=[];var Gt=typeof document!=="undefined",Kt=De,ei=Ie||Te?"cssFloat":"float",ti=Gt&&!Ze&&!De&&"draggable"in document.createElement("div"),ii=function(){if(!Gt)return;if(Te){return false}var e=document.createElement("x");e.style.cssText="pointer-events:auto";return e.style.pointerEvents==="auto"}(),oi=function e(t,i){var o=je(t),s=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),n=We(t,0,i),l=We(t,1,i),r=n&&je(n),a=l&&je(l),d=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+Qe(n).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Qe(l).width;if(o.display==="flex"){return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal"}if(o.display==="grid"){return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal"}if(n&&r["float"]&&r["float"]!=="none"){var h=r["float"]==="left"?"left":"right";return l&&(a.clear==="both"||a.clear===h)?"vertical":"horizontal"}return n&&(r.display==="block"||r.display==="flex"||r.display==="table"||r.display==="grid"||d>=s&&o[ei]==="none"||l&&o[ei]==="none"&&d+c>s)?"vertical":"horizontal"},si=function e(t,i,o){var s=o?t.left:t.top,n=o?t.right:t.bottom,l=o?t.width:t.height,r=o?i.left:i.top,a=o?i.right:i.bottom,d=o?i.width:i.height;return s===r||n===a||s+l/2===r+d/2},ni=function e(t,i){var o;Ot.some((function(e){var s=e[at].options.emptyInsertThreshold;if(!s||Ye(e))return;var n=Qe(e),l=t>=n.left-s&&t<=n.right+s,r=i>=n.top-s&&i<=n.bottom+s;if(l&&r){return o=e}}));return o},li=function e(t){function i(e,t){return function(o,s,n,l){var r=o.options.group.name&&s.options.group.name&&o.options.group.name===s.options.group.name;if(e==null&&(t||r)){return true}else if(e==null||e===false){return false}else if(t&&e==="clone"){return e}else if(typeof e==="function"){return i(e(o,s,n,l),t)(o,s,n,l)}else{var a=(t?o:s).options.group.name;return e===true||typeof e==="string"&&e===a||e.join&&e.indexOf(a)>-1}}}var o={};var s=t.group;if(!s||ye(s)!="object"){s={name:s}}o.name=s.name;o.checkPull=i(s.pull,true);o.checkPut=i(s.put);o.revertClone=s.revertClone;t.group=o},ri=function e(){if(!ii&&yt){je(yt,"display","none")}},ai=function e(){if(!ii&&yt){je(yt,"display","")}};if(Gt&&!Ze){document.addEventListener("click",(function(e){if(zt){e.preventDefault();e.stopPropagation&&e.stopPropagation();e.stopImmediatePropagation&&e.stopImmediatePropagation();zt=false;return false}}),true)}var di=function e(t){if(xt){t=t.touches?t.touches[0]:t;var i=ni(t.clientX,t.clientY);if(i){var o={};for(var s in t){if(t.hasOwnProperty(s)){o[s]=t[s]}}o.target=o.rootEl=i;o.preventDefault=void 0;o.stopPropagation=void 0;i[at]._onDragOver(o)}}};var ci=function e(t){if(xt){xt.parentNode[at]._isOutsideThisEl(t.target)}};function hi(e,t){if(!(e&&e.nodeType&&e.nodeType===1)){throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e))}this.el=e;this.options=t=Ee({},t);e[at]=this;var i={group:null,sort:true,disabled:false,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:false,invertedSwapThreshold:null,removeCloneOnHide:true,direction:function t(){return oi(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:true,animation:0,easing:null,setData:function e(t,i){t.setData("Text",i.textContent)},dropBubble:false,dragoverBubble:false,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:false,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:false,fallbackClass:"sortable-fallback",fallbackOnBody:false,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:hi.supportPointer!==false&&"PointerEvent"in window&&(!He||De),emptyInsertThreshold:5};pt.initializePlugins(this,e,i);for(var o in i){!(o in t)&&(t[o]=i[o])}li(t);for(var s in this){if(s.charAt(0)==="_"&&typeof this[s]==="function"){this[s]=this[s].bind(this)}}this.nativeDraggable=t.forceFallback?false:ti;if(this.nativeDraggable){this.options.touchStartThreshold=1}if(t.supportPointer){Oe(e,"pointerdown",this._onTapStart)}else{Oe(e,"mousedown",this._onTapStart);Oe(e,"touchstart",this._onTapStart)}if(this.nativeDraggable){Oe(e,"dragover",this);Oe(e,"dragenter",this)}Ot.push(this.el);t.store&&t.store.get&&this.sort(t.store.get(this)||[]);Ee(this,dt())}hi.prototype={constructor:hi,_isOutsideThisEl:function e(t){if(!this.el.contains(t)&&t!==this.el){Bt=null}},_getDirection:function e(t,i){return typeof this.options.direction==="function"?this.options.direction.call(this,t,i,xt):this.options.direction},_onTapStart:function e(t){if(!t.cancelable)return;var i=this,o=this.el,s=this.options,n=s.preventOnFilter,l=t.type,r=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,a=(r||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=s.filter;yi(o);if(xt){return}if(/mousedown|pointerdown/.test(l)&&t.button!==0||s.disabled){return}if(d.isContentEditable){return}if(!this.nativeDraggable&&He&&a&&a.tagName.toUpperCase()==="SELECT"){return}a=Ae(a,s.draggable,o,false);if(a&&a.animated){return}if(St===a){return}Mt=Je(a);It=Je(a,s.draggable);if(typeof c==="function"){if(c.call(this,t,a,this)){bt({sortable:i,rootEl:d,name:"filter",targetEl:a,toEl:o,fromEl:o});gt("filter",i,{evt:t});n&&t.preventDefault();return}}else if(c){c=c.split(",").some((function(e){e=Ae(d,e.trim(),o,false);if(e){bt({sortable:i,rootEl:e,name:"filter",targetEl:a,fromEl:o,toEl:o});gt("filter",i,{evt:t});return true}}));if(c){n&&t.preventDefault();return}}if(s.handle&&!Ae(d,s.handle,o,false)){return}this._prepareDragStart(t,r,a)},_prepareDragStart:function e(t,i,o){var s=this,n=s.el,l=s.options,r=n.ownerDocument,a;if(o&&!xt&&o.parentNode===n){var d=Qe(o);kt=n;xt=o;wt=xt.parentNode;Et=xt.nextSibling;St=o;Ht=l.group;hi.dragged=xt;_t={target:xt,clientX:(i||t).clientX,clientY:(i||t).clientY};Rt=_t.clientX-d.left;Ut=_t.clientY-d.top;this._lastX=(i||t).clientX;this._lastY=(i||t).clientY;xt.style["will-change"]="all";a=function e(){gt("delayEnded",s,{evt:t});if(hi.eventCanceled){s._onDrop();return}s._disableDelayedDragEvents();if(!Le&&s.nativeDraggable){xt.draggable=true}s._triggerDragStart(t,i);bt({sortable:s,name:"choose",originalEvent:t});Ue(xt,l.chosenClass,true)};l.ignore.split(",").forEach((function(e){Pe(xt,e.trim(),pi)}));Oe(r,"dragover",di);Oe(r,"mousemove",di);Oe(r,"touchmove",di);if(l.supportPointer){Oe(r,"pointerup",s._onDrop);!this.nativeDraggable&&Oe(r,"pointercancel",s._onDrop)}else{Oe(r,"mouseup",s._onDrop);Oe(r,"touchend",s._onDrop);Oe(r,"touchcancel",s._onDrop)}if(Le&&this.nativeDraggable){this.options.touchStartThreshold=4;xt.draggable=true}gt("delayStart",this,{evt:t});if(l.delay&&(!l.delayOnTouchOnly||i)&&(!this.nativeDraggable||!(Ie||Te))){if(hi.eventCanceled){this._onDrop();return}if(l.supportPointer){Oe(r,"pointerup",s._disableDelayedDrag);Oe(r,"pointercancel",s._disableDelayedDrag)}else{Oe(r,"mouseup",s._disableDelayedDrag);Oe(r,"touchend",s._disableDelayedDrag);Oe(r,"touchcancel",s._disableDelayedDrag)}Oe(r,"mousemove",s._delayedDragTouchMoveHandler);Oe(r,"touchmove",s._delayedDragTouchMoveHandler);l.supportPointer&&Oe(r,"pointermove",s._delayedDragTouchMoveHandler);s._dragStartTimer=setTimeout(a,l.delay)}else{a()}}},_delayedDragTouchMoveHandler:function e(t){var i=t.touches?t.touches[0]:t;if(Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))){this._disableDelayedDrag()}},_disableDelayedDrag:function e(){xt&&pi(xt);clearTimeout(this._dragStartTimer);this._disableDelayedDragEvents()},_disableDelayedDragEvents:function e(){var t=this.el.ownerDocument;_e(t,"mouseup",this._disableDelayedDrag);_e(t,"touchend",this._disableDelayedDrag);_e(t,"touchcancel",this._disableDelayedDrag);_e(t,"pointerup",this._disableDelayedDrag);_e(t,"pointercancel",this._disableDelayedDrag);_e(t,"mousemove",this._delayedDragTouchMoveHandler);_e(t,"touchmove",this._delayedDragTouchMoveHandler);_e(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function e(t,i){i=i||t.pointerType=="touch"&&t;if(!this.nativeDraggable||i){if(this.options.supportPointer){Oe(document,"pointermove",this._onTouchMove)}else if(i){Oe(document,"touchmove",this._onTouchMove)}else{Oe(document,"mousemove",this._onTouchMove)}}else{Oe(xt,"dragend",this);Oe(kt,"dragstart",this._onDragStart)}try{if(document.selection){ki((function(){document.selection.empty()}))}else{window.getSelection().removeAllRanges()}}catch(e){}},_dragStarted:function e(t,i){Zt=false;if(kt&&xt){gt("dragStarted",this,{evt:i});if(this.nativeDraggable){Oe(document,"dragover",ci)}var o=this.options;!t&&Ue(xt,o.dragClass,false);Ue(xt,o.ghostClass,true);hi.active=this;t&&this._appendGhost();bt({sortable:this,name:"start",originalEvent:i})}else{this._nulling()}},_emulateDragOver:function e(){if(Nt){this._lastX=Nt.clientX;this._lastY=Nt.clientY;ri();var t=document.elementFromPoint(Nt.clientX,Nt.clientY);var i=t;while(t&&t.shadowRoot){t=t.shadowRoot.elementFromPoint(Nt.clientX,Nt.clientY);if(t===i)break;i=t}xt.parentNode[at]._isOutsideThisEl(t);if(i){do{if(i[at]){var o=void 0;o=i[at]._onDragOver({clientX:Nt.clientX,clientY:Nt.clientY,target:t,rootEl:i});if(o&&!this.options.dragoverBubble){break}}t=i}while(i=Ve(i))}ai()}},_onTouchMove:function e(t){if(_t){var i=this.options,o=i.fallbackTolerance,s=i.fallbackOffset,n=t.touches?t.touches[0]:t,l=yt&&Be(yt,true),r=yt&&l&&l.a,a=yt&&l&&l.d,d=Kt&&Wt&&Xe(Wt),c=(n.clientX-_t.clientX+s.x)/(r||1)+(d?d[0]-Yt[0]:0)/(r||1),h=(n.clientY-_t.clientY+s.y)/(a||1)+(d?d[1]-Yt[1]:0)/(a||1);if(!hi.active&&!Zt){if(o&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))<o){return}this._onDragStart(t,true)}if(yt){if(l){l.e+=c-(Vt||0);l.f+=h-(At||0)}else{l={a:1,b:0,c:0,d:1,e:c,f:h}}var u="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");je(yt,"webkitTransform",u);je(yt,"mozTransform",u);je(yt,"msTransform",u);je(yt,"transform",u);Vt=c;At=h;Nt=n}t.cancelable&&t.preventDefault()}},_appendGhost:function e(){if(!yt){var t=this.options.fallbackOnBody?document.body:kt,i=Qe(xt,true,Kt,true,t),o=this.options;if(Kt){Wt=t;while(je(Wt,"position")==="static"&&je(Wt,"transform")==="none"&&Wt!==document){Wt=Wt.parentNode}if(Wt!==document.body&&Wt!==document.documentElement){if(Wt===document)Wt=$e();i.top+=Wt.scrollTop;i.left+=Wt.scrollLeft}else{Wt=$e()}Yt=Xe(Wt)}yt=xt.cloneNode(true);Ue(yt,o.ghostClass,false);Ue(yt,o.fallbackClass,true);Ue(yt,o.dragClass,true);je(yt,"transition","");je(yt,"transform","");je(yt,"box-sizing","border-box");je(yt,"margin",0);je(yt,"top",i.top);je(yt,"left",i.left);je(yt,"width",i.width);je(yt,"height",i.height);je(yt,"opacity","0.8");je(yt,"position",Kt?"absolute":"fixed");je(yt,"zIndex","100000");je(yt,"pointerEvents","none");hi.ghost=yt;t.appendChild(yt);je(yt,"transform-origin",Rt/parseInt(yt.style.width)*100+"% "+Ut/parseInt(yt.style.height)*100+"%")}},_onDragStart:function e(t,i){var o=this;var s=t.dataTransfer;var n=o.options;gt("dragStart",this,{evt:t});if(hi.eventCanceled){this._onDrop();return}gt("setupClone",this);if(!hi.eventCanceled){qt=lt(xt);qt.removeAttribute("id");qt.draggable=false;qt.style["will-change"]="";this._hideClone();Ue(qt,this.options.chosenClass,false);hi.clone=qt}o.cloneId=ki((function(){gt("clone",o);if(hi.eventCanceled)return;if(!o.options.removeCloneOnHide){kt.insertBefore(qt,xt)}o._hideClone();bt({sortable:o,name:"clone"})}));!i&&Ue(xt,n.dragClass,true);if(i){zt=true;o._loopId=setInterval(o._emulateDragOver,50)}else{_e(document,"mouseup",o._onDrop);_e(document,"touchend",o._onDrop);_e(document,"touchcancel",o._onDrop);if(s){s.effectAllowed="move";n.setData&&n.setData.call(o,s,xt)}Oe(document,"drop",o);je(xt,"transform","translateZ(0)")}Zt=true;o._dragStartId=ki(o._dragStarted.bind(o,i,t));Oe(document,"selectstart",o);jt=true;window.getSelection().removeAllRanges();if(He){je(document.body,"user-select","none")}},_onDragOver:function e(t){var i=this.el,o=t.target,s,n,l,r=this.options,a=r.group,d=hi.active,c=Ht===a,h=r.sort,u=Dt||d,f,p=this,v=false;if(Jt)return;function m(e,r){gt(e,p,we({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:l,dragRect:s,targetRect:n,canSort:h,fromSortable:u,target:o,completed:b,onMove:function e(o,n){return fi(kt,i,xt,s,o,Qe(o),t,n)},changed:x},r))}function g(){m("dragOverAnimationCapture");p.captureAnimationState();if(p!==u){u.captureAnimationState()}}function b(e){m("dragOverCompleted",{insertion:e});if(e){if(c){d._hideClone()}else{d._showClone(p)}if(p!==u){Ue(xt,Dt?Dt.options.ghostClass:d.options.ghostClass,false);Ue(xt,r.ghostClass,true)}if(Dt!==p&&p!==hi.active){Dt=p}else if(p===hi.active&&Dt){Dt=null}if(u===p){p._ignoreWhileAnimating=o}p.animateAll((function(){m("dragOverAnimationComplete");p._ignoreWhileAnimating=null}));if(p!==u){u.animateAll();u._ignoreWhileAnimating=null}}if(o===xt&&!xt.animated||o===i&&!o.animated){Bt=null}if(!r.dragoverBubble&&!t.rootEl&&o!==document){xt.parentNode[at]._isOutsideThisEl(t.target);!e&&di(t)}!r.dragoverBubble&&t.stopPropagation&&t.stopPropagation();return v=true}function x(){Tt=Je(xt);Lt=Je(xt,r.draggable);bt({sortable:p,name:"change",toEl:i,newIndex:Tt,newDraggableIndex:Lt,originalEvent:t})}if(t.preventDefault!==void 0){t.cancelable&&t.preventDefault()}o=Ae(o,r.draggable,i,true);m("dragOver");if(hi.eventCanceled)return v;if(xt.contains(t.target)||o.animated&&o.animatingX&&o.animatingY||p._ignoreWhileAnimating===o){return b(false)}zt=false;if(d&&!r.disabled&&(c?h||(l=wt!==kt):Dt===this||(this.lastPutMode=Ht.checkPull(this,d,xt,t))&&a.checkPut(this,d,xt,t))){f=this._getDirection(t,o)==="vertical";s=Qe(xt);m("dragOverValid");if(hi.eventCanceled)return v;if(l){wt=kt;g();this._hideClone();m("revert");if(!hi.eventCanceled){if(Et){kt.insertBefore(xt,Et)}else{kt.appendChild(xt)}}return b(true)}var w=Ye(i,r.draggable);if(!w||gi(t,f,this)&&!w.animated){if(w===xt){return b(false)}if(w&&i===t.target){o=w}if(o){n=Qe(o)}if(fi(kt,i,xt,s,o,n,t,!!o)!==false){g();if(w&&w.nextSibling){i.insertBefore(xt,w.nextSibling)}else{i.appendChild(xt)}wt=i;x();return b(true)}}else if(w&&mi(t,f,this)){var y=We(i,0,r,true);if(y===xt){return b(false)}o=y;n=Qe(o);if(fi(kt,i,xt,s,o,n,t,false)!==false){g();i.insertBefore(xt,y);wt=i;x();return b(true)}}else if(o.parentNode===i){n=Qe(o);var k=0,E,S=xt.parentNode!==i,q=!si(xt.animated&&xt.toRect||s,o.animated&&o.toRect||n,f),C=f?"top":"left",M=Fe(o,"top","top")||Fe(xt,"top","top"),T=M?M.scrollTop:void 0;if(Bt!==o){E=n[C];$t=false;Qt=!q&&r.invertSwap||S}k=bi(t,o,n,f,q?1:r.swapThreshold,r.invertedSwapThreshold==null?r.swapThreshold:r.invertedSwapThreshold,Qt,Bt===o);var I;if(k!==0){var L=Je(xt);do{L-=k;I=wt.children[L]}while(I&&(je(I,"display")==="none"||I===yt))}if(k===0||I===o){return b(false)}Bt=o;Pt=k;var H=o.nextElementSibling,D=false;D=k===1;var Z=fi(kt,i,xt,s,o,n,t,D);if(Z!==false){if(Z===1||Z===-1){D=Z===1}Jt=true;setTimeout(vi,30);g();if(D&&!H){i.appendChild(xt)}else{o.parentNode.insertBefore(xt,D?H:o)}if(M){nt(M,0,T-M.scrollTop)}wt=xt.parentNode;if(E!==undefined&&!Qt){Ft=Math.abs(E-Qe(o)[C])}x();return b(true)}}if(i.contains(xt)){return b(false)}}return false},_ignoreWhileAnimating:null,_offMoveEvents:function e(){_e(document,"mousemove",this._onTouchMove);_e(document,"touchmove",this._onTouchMove);_e(document,"pointermove",this._onTouchMove);_e(document,"dragover",di);_e(document,"mousemove",di);_e(document,"touchmove",di)},_offUpEvents:function e(){var t=this.el.ownerDocument;_e(t,"mouseup",this._onDrop);_e(t,"touchend",this._onDrop);_e(t,"pointerup",this._onDrop);_e(t,"pointercancel",this._onDrop);_e(t,"touchcancel",this._onDrop);_e(document,"selectstart",this)},_onDrop:function e(t){var i=this.el,o=this.options;Tt=Je(xt);Lt=Je(xt,o.draggable);gt("drop",this,{evt:t});wt=xt&&xt.parentNode;Tt=Je(xt);Lt=Je(xt,o.draggable);if(hi.eventCanceled){this._nulling();return}Zt=false;Qt=false;$t=false;clearInterval(this._loopId);clearTimeout(this._dragStartTimer);Ei(this.cloneId);Ei(this._dragStartId);if(this.nativeDraggable){_e(document,"drop",this);_e(i,"dragstart",this._onDragStart)}this._offMoveEvents();this._offUpEvents();if(He){je(document.body,"user-select","")}je(xt,"transform","");if(t){if(jt){t.cancelable&&t.preventDefault();!o.dropBubble&&t.stopPropagation()}yt&&yt.parentNode&&yt.parentNode.removeChild(yt);if(kt===wt||Dt&&Dt.lastPutMode!=="clone"){qt&&qt.parentNode&&qt.parentNode.removeChild(qt)}if(xt){if(this.nativeDraggable){_e(xt,"dragend",this)}pi(xt);xt.style["will-change"]="";if(jt&&!Zt){Ue(xt,Dt?Dt.options.ghostClass:this.options.ghostClass,false)}Ue(xt,this.options.chosenClass,false);bt({sortable:this,name:"unchoose",toEl:wt,newIndex:null,newDraggableIndex:null,originalEvent:t});if(kt!==wt){if(Tt>=0){bt({rootEl:wt,name:"add",toEl:wt,fromEl:kt,originalEvent:t});bt({sortable:this,name:"remove",toEl:wt,originalEvent:t});bt({rootEl:wt,name:"sort",toEl:wt,fromEl:kt,originalEvent:t});bt({sortable:this,name:"sort",toEl:wt,originalEvent:t})}Dt&&Dt.save()}else{if(Tt!==Mt){if(Tt>=0){bt({sortable:this,name:"update",toEl:wt,originalEvent:t});bt({sortable:this,name:"sort",toEl:wt,originalEvent:t})}}}if(hi.active){if(Tt==null||Tt===-1){Tt=Mt;Lt=It}bt({sortable:this,name:"end",toEl:wt,originalEvent:t});this.save()}}}this._nulling()},_nulling:function e(){gt("nulling",this);kt=xt=wt=yt=Et=qt=St=Ct=_t=Nt=jt=Tt=Lt=Mt=It=Bt=Pt=Dt=Ht=hi.dragged=hi.ghost=hi.clone=hi.active=null;Xt.forEach((function(e){e.checked=true}));Xt.length=Vt=At=0},handleEvent:function e(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":if(xt){this._onDragOver(t);ui(t)}break;case"selectstart":t.preventDefault();break}},toArray:function e(){var t=[],i,o=this.el.children,s=0,n=o.length,l=this.options;for(;s<n;s++){i=o[s];if(Ae(i,l.draggable,this.el,false)){t.push(i.getAttribute(l.dataIdAttr)||wi(i))}}return t},sort:function e(t,i){var o={},s=this.el;this.toArray().forEach((function(e,t){var i=s.children[t];if(Ae(i,this.options.draggable,s,false)){o[e]=i}}),this);i&&this.captureAnimationState();t.forEach((function(e){if(o[e]){s.removeChild(o[e]);s.appendChild(o[e])}}));i&&this.animateAll()},save:function e(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function e(t,i){return Ae(t,i||this.options.draggable,this.el,false)},option:function e(t,i){var o=this.options;if(i===void 0){return o[t]}else{var s=pt.modifyOption(this,t,i);if(typeof s!=="undefined"){o[t]=s}else{o[t]=i}if(t==="group"){li(o)}}},destroy:function e(){gt("destroy",this);var t=this.el;t[at]=null;_e(t,"mousedown",this._onTapStart);_e(t,"touchstart",this._onTapStart);_e(t,"pointerdown",this._onTapStart);if(this.nativeDraggable){_e(t,"dragover",this);_e(t,"dragenter",this)}Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")}));this._onDrop();this._disableDelayedDragEvents();Ot.splice(Ot.indexOf(this.el),1);this.el=t=null},_hideClone:function e(){if(!Ct){gt("hideClone",this);if(hi.eventCanceled)return;je(qt,"display","none");if(this.options.removeCloneOnHide&&qt.parentNode){qt.parentNode.removeChild(qt)}Ct=true}},_showClone:function e(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Ct){gt("showClone",this);if(hi.eventCanceled)return;if(xt.parentNode==kt&&!this.options.group.revertClone){kt.insertBefore(qt,xt)}else if(Et){kt.insertBefore(qt,Et)}else{kt.appendChild(qt)}if(this.options.group.revertClone){this.animate(xt,qt)}je(qt,"display","");Ct=false}}};function ui(e){if(e.dataTransfer){e.dataTransfer.dropEffect="move"}e.cancelable&&e.preventDefault()}function fi(e,t,i,o,s,n,l,r){var a,d=e[at],c=d.options.onMove,h;if(window.CustomEvent&&!Te&&!Ie){a=new CustomEvent("move",{bubbles:true,cancelable:true})}else{a=document.createEvent("Event");a.initEvent("move",true,true)}a.to=t;a.from=e;a.dragged=i;a.draggedRect=o;a.related=s||t;a.relatedRect=n||Qe(t);a.willInsertAfter=r;a.originalEvent=l;e.dispatchEvent(a);if(c){h=c.call(d,a,l)}return h}function pi(e){e.draggable=false}function vi(){Jt=false}function mi(e,t,i){var o=Qe(We(i.el,0,i.options,true));var s=rt(i.el,i.options,yt);var n=10;return t?e.clientX<s.left-n||e.clientY<o.top&&e.clientX<o.right:e.clientY<s.top-n||e.clientY<o.bottom&&e.clientX<o.left}function gi(e,t,i){var o=Qe(Ye(i.el,i.options.draggable));var s=rt(i.el,i.options,yt);var n=10;return t?e.clientX>s.right+n||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>s.bottom+n||e.clientX>o.right&&e.clientY>o.top}function bi(e,t,i,o,s,n,l,r){var a=o?e.clientY:e.clientX,d=o?i.height:i.width,c=o?i.top:i.left,h=o?i.bottom:i.right,u=false;if(!l){if(r&&Ft<d*s){if(!$t&&(Pt===1?a>c+d*n/2:a<h-d*n/2)){$t=true}if(!$t){if(Pt===1?a<c+Ft:a>h-Ft){return-Pt}}else{u=true}}else{if(a>c+d*(1-s)/2&&a<h-d*(1-s)/2){return xi(t)}}}u=u||l;if(u){if(a<c+d*n/2||a>h-d*n/2){return a>c+d/2?1:-1}}return 0}function xi(e){if(Je(xt)<Je(e)){return 1}else{return-1}}function wi(e){var t=e.tagName+e.className+e.src+e.href+e.textContent,i=t.length,o=0;while(i--){o+=t.charCodeAt(i)}return o.toString(36)}function yi(e){Xt.length=0;var t=e.getElementsByTagName("input");var i=t.length;while(i--){var o=t[i];o.checked&&Xt.push(o)}}function ki(e){return setTimeout(e,0)}function Ei(e){return clearTimeout(e)}if(Gt){Oe(document,"touchmove",(function(e){if((hi.active||Zt)&&e.cancelable){e.preventDefault()}}))}hi.utils={on:Oe,off:_e,css:je,find:Pe,is:function e(t,i){return!!Ae(t,i,t,false)},extend:et,throttle:ot,closest:Ae,toggleClass:Ue,clone:lt,index:Je,nextTick:ki,cancelNextTick:Ei,detectDirection:oi,getChild:We,expando:at};hi.get=function(e){return e[at]};hi.mount=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++){t[i]=arguments[i]}if(t[0].constructor===Array)t=t[0];t.forEach((function(e){if(!e.prototype||!e.prototype.constructor){throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e))}if(e.utils)hi.utils=we(we({},hi.utils),e.utils);pt.mount(e)}))};hi.create=function(e,t){return new hi(e,t)};hi.version=Ce;var Si=[],qi,Ci,Mi=false,Ti,Ii,Li,Hi;function Di(){function e(){this.defaults={scroll:true,forceAutoScrollFallback:false,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:true};for(var e in this){if(e.charAt(0)==="_"&&typeof this[e]==="function"){this[e]=this[e].bind(this)}}}e.prototype={dragStarted:function e(t){var i=t.originalEvent;if(this.sortable.nativeDraggable){Oe(document,"dragover",this._handleAutoScroll)}else{if(this.options.supportPointer){Oe(document,"pointermove",this._handleFallbackAutoScroll)}else if(i.touches){Oe(document,"touchmove",this._handleFallbackAutoScroll)}else{Oe(document,"mousemove",this._handleFallbackAutoScroll)}}},dragOverCompleted:function e(t){var i=t.originalEvent;if(!this.options.dragOverBubble&&!i.rootEl){this._handleAutoScroll(i)}},drop:function e(){if(this.sortable.nativeDraggable){_e(document,"dragover",this._handleAutoScroll)}else{_e(document,"pointermove",this._handleFallbackAutoScroll);_e(document,"touchmove",this._handleFallbackAutoScroll);_e(document,"mousemove",this._handleFallbackAutoScroll)}zi();Zi();st()},nulling:function e(){Li=Ci=qi=Mi=Hi=Ti=Ii=null;Si.length=0},_handleFallbackAutoScroll:function e(t){this._handleAutoScroll(t,true)},_handleAutoScroll:function e(t,i){var o=this;var s=(t.touches?t.touches[0]:t).clientX,n=(t.touches?t.touches[0]:t).clientY,l=document.elementFromPoint(s,n);Li=t;if(i||this.options.forceAutoScrollFallback||Ie||Te||He){Oi(t,this.options,l,i);var r=Ke(l,true);if(Mi&&(!Hi||s!==Ti||n!==Ii)){Hi&&zi();Hi=setInterval((function(){var e=Ke(document.elementFromPoint(s,n),true);if(e!==r){r=e;Zi()}Oi(t,o.options,e,i)}),10);Ti=s;Ii=n}}else{if(!this.options.bubbleScroll||Ke(l,true)===$e()){Zi();return}Oi(t,this.options,Ke(l,false),false)}}};return Ee(e,{pluginName:"scroll",initializeByDefault:true})}function Zi(){Si.forEach((function(e){clearInterval(e.pid)}));Si=[]}function zi(){clearInterval(Hi)}var Oi=ot((function(e,t,i,o){if(!t.scroll)return;var s=(e.touches?e.touches[0]:e).clientX,n=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,r=t.scrollSpeed,a=$e();var d=false,c;if(Ci!==i){Ci=i;Zi();qi=t.scroll;c=t.scrollFn;if(qi===true){qi=Ke(i,true)}}var h=0;var u=qi;do{var f=u,p=Qe(f),v=p.top,m=p.bottom,g=p.left,b=p.right,x=p.width,w=p.height,y=void 0,k=void 0,E=f.scrollWidth,S=f.scrollHeight,q=je(f),C=f.scrollLeft,M=f.scrollTop;if(f===a){y=x<E&&(q.overflowX==="auto"||q.overflowX==="scroll"||q.overflowX==="visible");k=w<S&&(q.overflowY==="auto"||q.overflowY==="scroll"||q.overflowY==="visible")}else{y=x<E&&(q.overflowX==="auto"||q.overflowX==="scroll");k=w<S&&(q.overflowY==="auto"||q.overflowY==="scroll")}var T=y&&(Math.abs(b-s)<=l&&C+x<E)-(Math.abs(g-s)<=l&&!!C);var I=k&&(Math.abs(m-n)<=l&&M+w<S)-(Math.abs(v-n)<=l&&!!M);if(!Si[h]){for(var L=0;L<=h;L++){if(!Si[L]){Si[L]={}}}}if(Si[h].vx!=T||Si[h].vy!=I||Si[h].el!==f){Si[h].el=f;Si[h].vx=T;Si[h].vy=I;clearInterval(Si[h].pid);if(T!=0||I!=0){d=true;Si[h].pid=setInterval(function(){if(o&&this.layer===0){hi.active._onTouchMove(Li)}var t=Si[this.layer].vy?Si[this.layer].vy*r:0;var i=Si[this.layer].vx?Si[this.layer].vx*r:0;if(typeof c==="function"){if(c.call(hi.dragged.parentNode[at],i,t,e,Li,Si[this.layer].el)!=="continue"){return}}nt(Si[this.layer].el,i,t)}.bind({layer:h}),24)}}h++}while(t.bubbleScroll&&u!==a&&(u=Ke(u,false)));Mi=d}),30);var _i=function e(t){var i=t.originalEvent,o=t.putSortable,s=t.dragEl,n=t.activeSortable,l=t.dispatchSortableEvent,r=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(!i)return;var d=o||n;r();var c=i.changedTouches&&i.changedTouches.length?i.changedTouches[0]:i;var h=document.elementFromPoint(c.clientX,c.clientY);a();if(d&&!d.el.contains(h)){l("spill");this.onSpill({dragEl:s,putSortable:o})}};function Ni(){}Ni.prototype={startIndex:null,dragStart:function e(t){var i=t.oldDraggableIndex;this.startIndex=i},onSpill:function e(t){var i=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState();if(o){o.captureAnimationState()}var s=We(this.sortable.el,this.startIndex,this.options);if(s){this.sortable.el.insertBefore(i,s)}else{this.sortable.el.appendChild(i)}this.sortable.animateAll();if(o){o.animateAll()}},drop:_i};Ee(Ni,{pluginName:"revertOnSpill"});function Vi(){}Vi.prototype={onSpill:function e(t){var i=t.dragEl,o=t.putSortable;var s=o||this.sortable;s.captureAnimationState();i.parentNode&&i.parentNode.removeChild(i);s.animateAll()},drop:_i};Ee(Vi,{pluginName:"removeOnSpill"});hi.mount(new Di);hi.mount(Vi,Ni);const Ai='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-roles{display:block;max-width:600px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles .roles{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:10px;margin-top:10px}verdocs-template-roles .roles .sequence{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;font-weight:500;padding:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;border-bottom:1px dotted #e3e3e3}verdocs-template-roles .roles .sequence.add-sequence{color:#777777;line-height:34px}verdocs-template-roles .roles .sequence-label{font-size:18px;line-height:32px}verdocs-template-roles .roles .sequence-roles{gap:10px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .roles .role{height:32px;cursor:move;display:-ms-flexbox;display:flex;max-width:200px;position:relative;border-radius:32px;background-color:#eff7fb;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 14px 0 34px;border:1px solid #ccc;-ms-flex-direction:column;flex-direction:column}verdocs-template-roles .roles .role .role-name{font-size:14px;overflow:hidden;font-weight:400;line-height:30px;white-space:nowrap;text-overflow:ellipsis}verdocs-template-roles .roles .role .icons{position:absolute;left:1px;top:-3px;cursor:pointer;padding:5px;z-index:10}verdocs-template-roles .roles .role .icons .gear-button{display:none;-webkit-transform:scale(1.1);transform:scale(1.1);margin:4px 0 0 1px}verdocs-template-roles .roles .role .icons .type-icon{opacity:0.6;display:block;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-roles .roles .role .icons:hover .gear-button{display:block}verdocs-template-roles .roles .role .icons:hover .type-icon{display:none}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#46497d;margin:0 0 10px 0}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{opacity:0.3;padding:0 10px;cursor:pointer;background:none;height:32px;border:1px solid #cccccc;border-radius:32px}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:16px;height:16px;stroke:#666666;margin-bottom:2px;display:inline-block}verdocs-template-roles .sequence-roles{display:-ms-flexbox;display:flex;max-width:400px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}';const Ri=Ai;const Ui='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>';const ji=`<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>`;const Bi='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';const Pi=`<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>`;const $i=`<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>`;const Qi=class{constructor(i){e(this,i);this.next=t(this,"next",7);this.exit=t(this,"exit",7);this.sdkError=t(this,"sdkError",7);this.rolesUpdated=t(this,"rolesUpdated",7);this.templateListenerId=null;this.sortableRefs=[];this.endpoint=l.getDefault();this.templateId="";this.showingRoleDialog=null;this.sender=null;this.dragging=false;this.loading=true;this.template=null}disconnectedCallback(){this.unlistenToTemplate();this.cleanupSortables()}async listenToTemplate(){console.log("[ROLES] Loading template",this.templateId);this.unlistenToTemplate();y.subscribe("templates",this.templateId,(()=>r(this.endpoint,this.templateId)),false,(e=>{console.log("[ROLES] Template Updated",e);this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){y.store.delListener(this.templateListenerId);this.templateListenerId=null}}async componentWillLoad(){var e,t,i;try{this.endpoint.loadSession();if(!this.templateId){console.log(`[ROLES] Missing required template ID ${this.templateId}`);return}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return}this.listenToTemplate()}catch(o){console.log("[ROLES] Error with preview session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(i=o.response)===null||i===void 0?void 0:i.data))}}cleanupSortables(){this.sortableRefs.forEach((e=>e.destroy()));this.sortableRefs.length=0}componentDidRender(){this.cleanupSortables();const e=this.getSequenceNumbers();(e||[]).forEach((e=>{const t=document.getElementById(`verdocs-roles-sequence-${e}`);if(t){const e=new hi(t,{group:"roles",animation:150,dragoverBubble:true,filter:".no-drag",onEnd:this.handleMoveEnd.bind(this),onChoose:()=>this.dragging=true,onUnchoose:()=>this.dragging=false});this.sortableRefs.push(e)}}));const t=document.getElementById(`verdocs-roles-sequence-add-target`);if(t){console.log("[ROLES] Applying sortable to add-sequence slot");const e=new hi(t,{group:"roles",animation:150,dragoverBubble:true,filter:".no-drag",onEnd:this.handleMoveEnd.bind(this),onChoose:()=>this.dragging=true,onUnchoose:()=>this.dragging=false});this.sortableRefs.push(e)}}handleMoveEnd(e){const t=+e.from.dataset.sequence;const i=+e.to.dataset.sequence;const o=+e.oldIndex+1;const s=+e.newIndex+1;console.log(`Move from ${t}:${o} to ${i}:${s}`,e.item);const n={};const l=this.getSequenceNumbers();l.forEach((e=>{const t=this.getRolesAtSequence(e);n[String(e)]=JSON.parse(JSON.stringify(t))}));n[l[l.length-1]+1]=[];const r=n[t].splice(o-1,1)[0];n[i]||(n[i]=[]);n[i].splice(s-1,0,r);const a=[];Object.entries(n).forEach((([e,t])=>{t.forEach(((t,i)=>{if(!t){return}const o=+i+1;if(t.sequence!==+e||t.order!==o){t.sequence=+e;t.order=o;a.push(b(this.endpoint,this.templateId,t.name,{sequence:+e,order:o}).then((e=>console.log("[ROLES] Updated role",t.name,e))).catch((e=>console.log("[ROLES] Error updating role",e))))}}))}));return Promise.all(a).then((async()=>console.log("[ROLES] Done renumbering"))).catch((e=>console.log("[ROLES] Error updating roles",e)))}handleCancel(){var e;(e=this.exit)===null||e===void 0?void 0:e.emit()}handleSubmit(){var e;(e=this.next)===null||e===void 0?void 0:e.emit()}getSortedRoles(){var e;return(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).sort(((e,t)=>e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence))}getSequenceNumbers(){var e;const t=(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).map((e=>e.sequence));const i=[...new Set(t)];i.sort(((e,t)=>e-t));return i}getRoleNames(){const e=this.getSortedRoles();return e.map((e=>e.name))}getRolesAtSequence(e){var t;return(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).filter((t=>t&&t.sequence===e))}async renumberTemplateRoles(){var e;const t={};const i=[];const o=this.getSequenceNumbers();(o||[]).forEach((e=>{(t[e]||[]).forEach(((t,o)=>{const s=+o+1;if(t.sequence!==+e||t.order!==s){console.log("[ROLES] Updating role",t.name,"from",t.sequence,t.order,"to",e,s);t.sequence=+e;t.order=s;i.push(b(this.endpoint,this.templateId,t.name,{sequence:+e,order:s}).then((e=>console.log("[ROLES] Updated role",t.name,e))).catch((e=>console.log("[ROLES] Error updating role",e))))}}))}));console.log(`[ROLES] Awaiting ${i.length} renumber requests`);await Promise.all(i).then((async()=>{const e=JSON.parse(JSON.stringify(this.template));e.roles=Object.keys(t).reduce(((e,i)=>e.concat(t[i])),[]);console.log("[ROLES] Done renumbering",e.roles.map((e=>({name:e.name,sequence:e.sequence,order:e.order}))));y.updateTemplate(this.templateId,e)}));(e=this.rolesUpdated)===null||e===void 0?void 0:e.emit({event:"updated",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})}getNextRoleName(){var e,t;let i="";let o=(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).length;do{o++;i=`Recipient ${o}`}while(!i||(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).some((e=>e&&e.name===i)));return i}callCreateRole(e,t,i){console.log("[ROLES] Will create role",{name:e,sequence:t,order:i});x(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,message:"",order:i,full_name:null,first_name:"",last_name:"",email:"",phone:"",type:"signer",delegator:false,kba_method:null}).then((async e=>{var t;console.log("[ROLES] Created role",e);console.log("Updating template in data store");await y.getTemplate(this.endpoint,this.templateId,true);(t=this.rolesUpdated)===null||t===void 0?void 0:t.emit({event:"added",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})})).catch((e=>{console.log("[ROLES] Error creating role",e)}))}handleAddRole(e,t){e.stopPropagation();const i=this.getRolesAtSequence(t).length+1;const o=this.getNextRoleName();this.callCreateRole(o,t,i)}handleAddStep(e,t){e.stopPropagation();const i=1;const o=this.getNextRoleName();this.callCreateRole(o,t,i)}render(){if(!this.endpoint.session){return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(this.loading||!this.template){return i(o,{class:"loading"},i("verdocs-loader",null))}console.log("[ROLES] Rendering",this.template.roles.map((e=>({name:e.name,sequence:e.sequence,order:e.order}))));const e=this.getRoleNames();const t=this.getSequenceNumbers();const s=t&&t.length>0?(t[t.length-1]||0)+1:1;return i(o,{class:{dragging:this.dragging}},i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Roles and Workflow"),i("div",{class:"roles"},t.map(((e,t)=>i("div",{class:"sequence"},i("div",{class:"sequence-label no-drag"},t+1,"."),i("div",{class:"sequence-roles",id:`verdocs-roles-sequence-${e}`,"data-sequence":e},this.getRolesAtSequence(e).map((t=>{const o=!t.email||!t.first_name||!t.last_name;return o?i("div",{class:"role","data-rolename":t.name,"data-sequence":e,"data-order":t.order},i("div",{class:"role-name"},t.name),i("div",{class:"icons"},i("div",{class:"gear-button",innerHTML:Ui,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"}),i("span",{class:"type-icon",innerHTML:t.type==="signer"?Bi:t.type==="cc"?$i:Pi}))):i("div",{class:"role","data-rolename":t.name,"data-sequence":e,"data-order":t.order},i("div",{class:"role-name"},u(t)),i("div",{class:"icons"},i("div",{class:"gear-button",innerHTML:Ui,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"}),i("span",{class:"type-icon",innerHTML:t.type==="signer"?Bi:t.type==="cc"?$i:Pi})))}))),i("button",{class:"add-role no-drag",onClick:t=>this.handleAddRole(t,e)},"+ Add Role")))),i("div",{class:"sequence add-sequence"},i("div",{class:"sequence-label no-drag"},t.length+1,"."),i("div",{class:"sequence-roles",id:`verdocs-roles-sequence-add-target`,"data-sequence":s}),i("button",{class:"add-role no-drag",onClick:e=>this.handleAddRole(e,s)},"+ Add Role"))),e.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:ji})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:"OK",size:"small",onClick:()=>this.handleSubmit(),disabled:e.length<1}))),this.showingRoleDialog&&i("verdocs-menu-panel",{onClose:()=>this.showingRoleDialog=null},i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{var e;(e=document.getElementById("verdocs-menu-panel-overlay"))===null||e===void 0?void 0:e.remove();this.showingRoleDialog=null},onDelete:async()=>{var e;this.showingRoleDialog=null;await this.renumberTemplateRoles();(e=this.rolesUpdated)===null||e===void 0?void 0:e.emit({event:"deleted",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})}})))}get el(){return n(this)}};Qi.style=Ri;export{R as verdocs_preview,Y as verdocs_send,G as verdocs_template_attachments,se as verdocs_template_build_tabs,be as verdocs_template_fields,Qi as verdocs_template_roles};
|
8
|
-
//# sourceMappingURL=p-
|
7
|
+
*/function xe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);if(t){o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}i.push.apply(i,o)}return i}function we(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};if(t%2){xe(Object(i),true).forEach((function(t){ke(e,t,i[t])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(i))}else{xe(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}}return e}function ye(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){ye=function(e){return typeof e}}else{ye=function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}return ye(e)}function ke(e,t,i){if(t in e){Object.defineProperty(e,t,{value:i,enumerable:true,configurable:true,writable:true})}else{e[t]=i}return e}function Ee(){Ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i){if(Object.prototype.hasOwnProperty.call(i,o)){e[o]=i[o]}}}return e};return Ee.apply(this,arguments)}function Se(e,t){if(e==null)return{};var i={};var o=Object.keys(e);var s,n;for(n=0;n<o.length;n++){s=o[n];if(t.indexOf(s)>=0)continue;i[s]=e[s]}return i}function qe(e,t){if(e==null)return{};var i=Se(e,t);var o,s;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(s=0;s<n.length;s++){o=n[s];if(t.indexOf(o)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,o))continue;i[o]=e[o]}}return i}var Ce="1.15.6";function Me(e){if(typeof window!=="undefined"&&window.navigator){return!!navigator.userAgent.match(e)}}var Te=Me(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);var Ie=Me(/Edge/i);var Le=Me(/firefox/i);var He=Me(/safari/i)&&!Me(/chrome/i)&&!Me(/android/i);var De=Me(/iP(ad|od|hone)/i);var Ze=Me(/chrome/i)&&Me(/android/i);var ze={capture:false,passive:false};function Oe(e,t,i){e.addEventListener(t,i,!Te&&ze)}function _e(e,t,i){e.removeEventListener(t,i,!Te&&ze)}function Ne(e,t){if(!t)return;t[0]===">"&&(t=t.substring(1));if(e){try{if(e.matches){return e.matches(t)}else if(e.msMatchesSelector){return e.msMatchesSelector(t)}else if(e.webkitMatchesSelector){return e.webkitMatchesSelector(t)}}catch(e){return false}}return false}function Ve(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Ae(e,t,i,o){if(e){i=i||document;do{if(t!=null&&(t[0]===">"?e.parentNode===i&&Ne(e,t):Ne(e,t))||o&&e===i){return e}if(e===i)break}while(e=Ve(e))}return null}var Re=/\s+/g;function Ue(e,t,i){if(e&&t){if(e.classList){e.classList[i?"add":"remove"](t)}else{var o=(" "+e.className+" ").replace(Re," ").replace(" "+t+" "," ");e.className=(o+(i?" "+t:"")).replace(Re," ")}}}function je(e,t,i){var o=e&&e.style;if(o){if(i===void 0){if(document.defaultView&&document.defaultView.getComputedStyle){i=document.defaultView.getComputedStyle(e,"")}else if(e.currentStyle){i=e.currentStyle}return t===void 0?i:i[t]}else{if(!(t in o)&&t.indexOf("webkit")===-1){t="-webkit-"+t}o[t]=i+(typeof i==="string"?"":"px")}}}function Be(e,t){var i="";if(typeof e==="string"){i=e}else{do{var o=je(e,"transform");if(o&&o!=="none"){i=o+" "+i}}while(!t&&(e=e.parentNode))}var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(i)}function Pe(e,t,i){if(e){var o=e.getElementsByTagName(t),s=0,n=o.length;if(i){for(;s<n;s++){i(o[s],s)}}return o}return[]}function $e(){var e=document.scrollingElement;if(e){return e}else{return document.documentElement}}function Qe(e,t,i,o,s){if(!e.getBoundingClientRect&&e!==window)return;var n,l,r,a,d,c,h;if(e!==window&&e.parentNode&&e!==$e()){n=e.getBoundingClientRect();l=n.top;r=n.left;a=n.bottom;d=n.right;c=n.height;h=n.width}else{l=0;r=0;a=window.innerHeight;d=window.innerWidth;c=window.innerHeight;h=window.innerWidth}if((t||i)&&e!==window){s=s||e.parentNode;if(!Te){do{if(s&&s.getBoundingClientRect&&(je(s,"transform")!=="none"||i&&je(s,"position")!=="static")){var u=s.getBoundingClientRect();l-=u.top+parseInt(je(s,"border-top-width"));r-=u.left+parseInt(je(s,"border-left-width"));a=l+n.height;d=r+n.width;break}}while(s=s.parentNode)}}if(o&&e!==window){var f=Be(s||e),p=f&&f.a,v=f&&f.d;if(f){l/=v;r/=p;h/=p;c/=v;a=l+c;d=r+h}}return{top:l,left:r,bottom:a,right:d,width:h,height:c}}function Fe(e,t,i){var o=Ke(e,true),s=Qe(e)[t];while(o){var n=Qe(o)[i],l=void 0;if(i==="top"||i==="left"){l=s>=n}else{l=s<=n}if(!l)return o;if(o===$e())break;o=Ke(o,false)}return false}function We(e,t,i,o){var s=0,n=0,l=e.children;while(n<l.length){if(l[n].style.display!=="none"&&l[n]!==hi.ghost&&(o||l[n]!==hi.dragged)&&Ae(l[n],i.draggable,e,false)){if(s===t){return l[n]}s++}n++}return null}function Ye(e,t){var i=e.lastElementChild;while(i&&(i===hi.ghost||je(i,"display")==="none"||t&&!Ne(i,t))){i=i.previousElementSibling}return i||null}function Je(e,t){var i=0;if(!e||!e.parentNode){return-1}while(e=e.previousElementSibling){if(e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==hi.clone&&(!t||Ne(e,t))){i++}}return i}function Xe(e){var t=0,i=0,o=$e();if(e){do{var s=Be(e),n=s.a,l=s.d;t+=e.scrollLeft*n;i+=e.scrollTop*l}while(e!==o&&(e=e.parentNode))}return[t,i]}function Ge(e,t){for(var i in e){if(!e.hasOwnProperty(i))continue;for(var o in t){if(t.hasOwnProperty(o)&&t[o]===e[i][o])return Number(i)}}return-1}function Ke(e,t){if(!e||!e.getBoundingClientRect)return $e();var i=e;var o=false;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var s=je(i);if(i.clientWidth<i.scrollWidth&&(s.overflowX=="auto"||s.overflowX=="scroll")||i.clientHeight<i.scrollHeight&&(s.overflowY=="auto"||s.overflowY=="scroll")){if(!i.getBoundingClientRect||i===document.body)return $e();if(o||t)return i;o=true}}}while(i=i.parentNode);return $e()}function et(e,t){if(e&&t){for(var i in t){if(t.hasOwnProperty(i)){e[i]=t[i]}}}return e}function tt(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var it;function ot(e,t){return function(){if(!it){var i=arguments,o=this;if(i.length===1){e.call(o,i[0])}else{e.apply(o,i)}it=setTimeout((function(){it=void 0}),t)}}}function st(){clearTimeout(it);it=void 0}function nt(e,t,i){e.scrollLeft+=t;e.scrollTop+=i}function lt(e){var t=window.Polymer;var i=window.jQuery||window.Zepto;if(t&&t.dom){return t.dom(e).cloneNode(true)}else if(i){return i(e).clone(true)[0]}else{return e.cloneNode(true)}}function rt(e,t,i){var o={};Array.from(e.children).forEach((function(s){var n,l,r,a;if(!Ae(s,t.draggable,e,false)||s.animated||s===i)return;var d=Qe(s);o.left=Math.min((n=o.left)!==null&&n!==void 0?n:Infinity,d.left);o.top=Math.min((l=o.top)!==null&&l!==void 0?l:Infinity,d.top);o.right=Math.max((r=o.right)!==null&&r!==void 0?r:-Infinity,d.right);o.bottom=Math.max((a=o.bottom)!==null&&a!==void 0?a:-Infinity,d.bottom)}));o.width=o.right-o.left;o.height=o.bottom-o.top;o.x=o.left;o.y=o.top;return o}var at="Sortable"+(new Date).getTime();function dt(){var e=[],t;return{captureAnimationState:function t(){e=[];if(!this.options.animation)return;var i=[].slice.call(this.el.children);i.forEach((function(t){if(je(t,"display")==="none"||t===hi.ghost)return;e.push({target:t,rect:Qe(t)});var i=we({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=Be(t,true);if(o){i.top-=o.f;i.left-=o.e}}t.fromRect=i}))},addAnimationState:function t(i){e.push(i)},removeAnimationState:function t(i){e.splice(Ge(e,{target:i}),1)},animateAll:function i(o){var s=this;if(!this.options.animation){clearTimeout(t);if(typeof o==="function")o();return}var n=false,l=0;e.forEach((function(e){var t=0,i=e.target,o=i.fromRect,r=Qe(i),a=i.prevFromRect,d=i.prevToRect,c=e.rect,h=Be(i,true);if(h){r.top-=h.f;r.left-=h.e}i.toRect=r;if(i.thisAnimationDuration){if(tt(a,r)&&!tt(o,r)&&(c.top-r.top)/(c.left-r.left)===(o.top-r.top)/(o.left-r.left)){t=ht(c,a,d,s.options)}}if(!tt(r,o)){i.prevFromRect=o;i.prevToRect=r;if(!t){t=s.options.animation}s.animate(i,c,r,t)}if(t){n=true;l=Math.max(l,t);clearTimeout(i.animationResetTimer);i.animationResetTimer=setTimeout((function(){i.animationTime=0;i.prevFromRect=null;i.fromRect=null;i.prevToRect=null;i.thisAnimationDuration=null}),t);i.thisAnimationDuration=t}}));clearTimeout(t);if(!n){if(typeof o==="function")o()}else{t=setTimeout((function(){if(typeof o==="function")o()}),l)}e=[]},animate:function e(t,i,o,s){if(s){je(t,"transition","");je(t,"transform","");var n=Be(this.el),l=n&&n.a,r=n&&n.d,a=(i.left-o.left)/(l||1),d=(i.top-o.top)/(r||1);t.animatingX=!!a;t.animatingY=!!d;je(t,"transform","translate3d("+a+"px,"+d+"px,0)");this.forRepaintDummy=ct(t);je(t,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:""));je(t,"transform","translate3d(0,0,0)");typeof t.animated==="number"&&clearTimeout(t.animated);t.animated=setTimeout((function(){je(t,"transition","");je(t,"transform","");t.animated=false;t.animatingX=false;t.animatingY=false}),s)}}}}function ct(e){return e.offsetWidth}function ht(e,t,i,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))*o.animation}var ut=[];var ft={initializeByDefault:true};var pt={mount:function e(t){for(var i in ft){if(ft.hasOwnProperty(i)&&!(i in t)){t[i]=ft[i]}}ut.forEach((function(e){if(e.pluginName===t.pluginName){throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}}));ut.push(t)},pluginEvent:function e(t,i,o){var s=this;this.eventCanceled=false;o.cancel=function(){s.eventCanceled=true};var n=t+"Global";ut.forEach((function(e){if(!i[e.pluginName])return;if(i[e.pluginName][n]){i[e.pluginName][n](we({sortable:i},o))}if(i.options[e.pluginName]&&i[e.pluginName][t]){i[e.pluginName][t](we({sortable:i},o))}}))},initializePlugins:function e(t,i,o,s){ut.forEach((function(e){var s=e.pluginName;if(!t.options[s]&&!e.initializeByDefault)return;var n=new e(t,i,t.options);n.sortable=t;n.options=t.options;t[s]=n;Ee(o,n.defaults)}));for(var n in t.options){if(!t.options.hasOwnProperty(n))continue;var l=this.modifyOption(t,n,t.options[n]);if(typeof l!=="undefined"){t.options[n]=l}}},getEventProperties:function e(t,i){var o={};ut.forEach((function(e){if(typeof e.eventProperties!=="function")return;Ee(o,e.eventProperties.call(i[e.pluginName],t))}));return o},modifyOption:function e(t,i,o){var s;ut.forEach((function(e){if(!t[e.pluginName])return;if(e.optionListeners&&typeof e.optionListeners[i]==="function"){s=e.optionListeners[i].call(t[e.pluginName],o)}}));return s}};function vt(e){var t=e.sortable,i=e.rootEl,o=e.name,s=e.targetEl,n=e.cloneEl,l=e.toEl,r=e.fromEl,a=e.oldIndex,d=e.newIndex,c=e.oldDraggableIndex,h=e.newDraggableIndex,u=e.originalEvent,f=e.putSortable,p=e.extraEventProperties;t=t||i&&i[at];if(!t)return;var v,m=t.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);if(window.CustomEvent&&!Te&&!Ie){v=new CustomEvent(o,{bubbles:true,cancelable:true})}else{v=document.createEvent("Event");v.initEvent(o,true,true)}v.to=l||i;v.from=r||i;v.item=s||i;v.clone=n;v.oldIndex=a;v.newIndex=d;v.oldDraggableIndex=c;v.newDraggableIndex=h;v.originalEvent=u;v.pullMode=f?f.lastPutMode:undefined;var b=we(we({},p),pt.getEventProperties(o,t));for(var x in b){v[x]=b[x]}if(i){i.dispatchEvent(v)}if(m[g]){m[g].call(t,v)}}var mt=["evt"];var gt=function e(t,i){var o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},s=o.evt,n=qe(o,mt);pt.pluginEvent.bind(hi)(t,i,we({dragEl:xt,parentEl:wt,ghostEl:yt,rootEl:kt,nextEl:Et,lastDownEl:St,cloneEl:qt,cloneHidden:Ct,dragStarted:jt,putSortable:Dt,activeSortable:hi.active,originalEvent:s,oldIndex:Mt,oldDraggableIndex:It,newIndex:Tt,newDraggableIndex:Lt,hideGhostForTarget:ri,unhideGhostForTarget:ai,cloneNowHidden:function e(){Ct=true},cloneNowShown:function e(){Ct=false},dispatchSortableEvent:function e(t){bt({sortable:i,name:t,originalEvent:s})}},n))};function bt(e){vt(we({putSortable:Dt,cloneEl:qt,targetEl:xt,rootEl:kt,oldIndex:Mt,oldDraggableIndex:It,newIndex:Tt,newDraggableIndex:Lt},e))}var xt,wt,yt,kt,Et,St,qt,Ct,Mt,Tt,It,Lt,Ht,Dt,Zt=false,zt=false,Ot=[],_t,Nt,Vt,At,Rt,Ut,jt,Bt,Pt,$t=false,Qt=false,Ft,Wt,Yt=[],Jt=false,Xt=[];var Gt=typeof document!=="undefined",Kt=De,ei=Ie||Te?"cssFloat":"float",ti=Gt&&!Ze&&!De&&"draggable"in document.createElement("div"),ii=function(){if(!Gt)return;if(Te){return false}var e=document.createElement("x");e.style.cssText="pointer-events:auto";return e.style.pointerEvents==="auto"}(),oi=function e(t,i){var o=je(t),s=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),n=We(t,0,i),l=We(t,1,i),r=n&&je(n),a=l&&je(l),d=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+Qe(n).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Qe(l).width;if(o.display==="flex"){return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal"}if(o.display==="grid"){return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal"}if(n&&r["float"]&&r["float"]!=="none"){var h=r["float"]==="left"?"left":"right";return l&&(a.clear==="both"||a.clear===h)?"vertical":"horizontal"}return n&&(r.display==="block"||r.display==="flex"||r.display==="table"||r.display==="grid"||d>=s&&o[ei]==="none"||l&&o[ei]==="none"&&d+c>s)?"vertical":"horizontal"},si=function e(t,i,o){var s=o?t.left:t.top,n=o?t.right:t.bottom,l=o?t.width:t.height,r=o?i.left:i.top,a=o?i.right:i.bottom,d=o?i.width:i.height;return s===r||n===a||s+l/2===r+d/2},ni=function e(t,i){var o;Ot.some((function(e){var s=e[at].options.emptyInsertThreshold;if(!s||Ye(e))return;var n=Qe(e),l=t>=n.left-s&&t<=n.right+s,r=i>=n.top-s&&i<=n.bottom+s;if(l&&r){return o=e}}));return o},li=function e(t){function i(e,t){return function(o,s,n,l){var r=o.options.group.name&&s.options.group.name&&o.options.group.name===s.options.group.name;if(e==null&&(t||r)){return true}else if(e==null||e===false){return false}else if(t&&e==="clone"){return e}else if(typeof e==="function"){return i(e(o,s,n,l),t)(o,s,n,l)}else{var a=(t?o:s).options.group.name;return e===true||typeof e==="string"&&e===a||e.join&&e.indexOf(a)>-1}}}var o={};var s=t.group;if(!s||ye(s)!="object"){s={name:s}}o.name=s.name;o.checkPull=i(s.pull,true);o.checkPut=i(s.put);o.revertClone=s.revertClone;t.group=o},ri=function e(){if(!ii&&yt){je(yt,"display","none")}},ai=function e(){if(!ii&&yt){je(yt,"display","")}};if(Gt&&!Ze){document.addEventListener("click",(function(e){if(zt){e.preventDefault();e.stopPropagation&&e.stopPropagation();e.stopImmediatePropagation&&e.stopImmediatePropagation();zt=false;return false}}),true)}var di=function e(t){if(xt){t=t.touches?t.touches[0]:t;var i=ni(t.clientX,t.clientY);if(i){var o={};for(var s in t){if(t.hasOwnProperty(s)){o[s]=t[s]}}o.target=o.rootEl=i;o.preventDefault=void 0;o.stopPropagation=void 0;i[at]._onDragOver(o)}}};var ci=function e(t){if(xt){xt.parentNode[at]._isOutsideThisEl(t.target)}};function hi(e,t){if(!(e&&e.nodeType&&e.nodeType===1)){throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e))}this.el=e;this.options=t=Ee({},t);e[at]=this;var i={group:null,sort:true,disabled:false,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:false,invertedSwapThreshold:null,removeCloneOnHide:true,direction:function t(){return oi(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:true,animation:0,easing:null,setData:function e(t,i){t.setData("Text",i.textContent)},dropBubble:false,dragoverBubble:false,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:false,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:false,fallbackClass:"sortable-fallback",fallbackOnBody:false,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:hi.supportPointer!==false&&"PointerEvent"in window&&(!He||De),emptyInsertThreshold:5};pt.initializePlugins(this,e,i);for(var o in i){!(o in t)&&(t[o]=i[o])}li(t);for(var s in this){if(s.charAt(0)==="_"&&typeof this[s]==="function"){this[s]=this[s].bind(this)}}this.nativeDraggable=t.forceFallback?false:ti;if(this.nativeDraggable){this.options.touchStartThreshold=1}if(t.supportPointer){Oe(e,"pointerdown",this._onTapStart)}else{Oe(e,"mousedown",this._onTapStart);Oe(e,"touchstart",this._onTapStart)}if(this.nativeDraggable){Oe(e,"dragover",this);Oe(e,"dragenter",this)}Ot.push(this.el);t.store&&t.store.get&&this.sort(t.store.get(this)||[]);Ee(this,dt())}hi.prototype={constructor:hi,_isOutsideThisEl:function e(t){if(!this.el.contains(t)&&t!==this.el){Bt=null}},_getDirection:function e(t,i){return typeof this.options.direction==="function"?this.options.direction.call(this,t,i,xt):this.options.direction},_onTapStart:function e(t){if(!t.cancelable)return;var i=this,o=this.el,s=this.options,n=s.preventOnFilter,l=t.type,r=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,a=(r||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=s.filter;yi(o);if(xt){return}if(/mousedown|pointerdown/.test(l)&&t.button!==0||s.disabled){return}if(d.isContentEditable){return}if(!this.nativeDraggable&&He&&a&&a.tagName.toUpperCase()==="SELECT"){return}a=Ae(a,s.draggable,o,false);if(a&&a.animated){return}if(St===a){return}Mt=Je(a);It=Je(a,s.draggable);if(typeof c==="function"){if(c.call(this,t,a,this)){bt({sortable:i,rootEl:d,name:"filter",targetEl:a,toEl:o,fromEl:o});gt("filter",i,{evt:t});n&&t.preventDefault();return}}else if(c){c=c.split(",").some((function(e){e=Ae(d,e.trim(),o,false);if(e){bt({sortable:i,rootEl:e,name:"filter",targetEl:a,fromEl:o,toEl:o});gt("filter",i,{evt:t});return true}}));if(c){n&&t.preventDefault();return}}if(s.handle&&!Ae(d,s.handle,o,false)){return}this._prepareDragStart(t,r,a)},_prepareDragStart:function e(t,i,o){var s=this,n=s.el,l=s.options,r=n.ownerDocument,a;if(o&&!xt&&o.parentNode===n){var d=Qe(o);kt=n;xt=o;wt=xt.parentNode;Et=xt.nextSibling;St=o;Ht=l.group;hi.dragged=xt;_t={target:xt,clientX:(i||t).clientX,clientY:(i||t).clientY};Rt=_t.clientX-d.left;Ut=_t.clientY-d.top;this._lastX=(i||t).clientX;this._lastY=(i||t).clientY;xt.style["will-change"]="all";a=function e(){gt("delayEnded",s,{evt:t});if(hi.eventCanceled){s._onDrop();return}s._disableDelayedDragEvents();if(!Le&&s.nativeDraggable){xt.draggable=true}s._triggerDragStart(t,i);bt({sortable:s,name:"choose",originalEvent:t});Ue(xt,l.chosenClass,true)};l.ignore.split(",").forEach((function(e){Pe(xt,e.trim(),pi)}));Oe(r,"dragover",di);Oe(r,"mousemove",di);Oe(r,"touchmove",di);if(l.supportPointer){Oe(r,"pointerup",s._onDrop);!this.nativeDraggable&&Oe(r,"pointercancel",s._onDrop)}else{Oe(r,"mouseup",s._onDrop);Oe(r,"touchend",s._onDrop);Oe(r,"touchcancel",s._onDrop)}if(Le&&this.nativeDraggable){this.options.touchStartThreshold=4;xt.draggable=true}gt("delayStart",this,{evt:t});if(l.delay&&(!l.delayOnTouchOnly||i)&&(!this.nativeDraggable||!(Ie||Te))){if(hi.eventCanceled){this._onDrop();return}if(l.supportPointer){Oe(r,"pointerup",s._disableDelayedDrag);Oe(r,"pointercancel",s._disableDelayedDrag)}else{Oe(r,"mouseup",s._disableDelayedDrag);Oe(r,"touchend",s._disableDelayedDrag);Oe(r,"touchcancel",s._disableDelayedDrag)}Oe(r,"mousemove",s._delayedDragTouchMoveHandler);Oe(r,"touchmove",s._delayedDragTouchMoveHandler);l.supportPointer&&Oe(r,"pointermove",s._delayedDragTouchMoveHandler);s._dragStartTimer=setTimeout(a,l.delay)}else{a()}}},_delayedDragTouchMoveHandler:function e(t){var i=t.touches?t.touches[0]:t;if(Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))){this._disableDelayedDrag()}},_disableDelayedDrag:function e(){xt&&pi(xt);clearTimeout(this._dragStartTimer);this._disableDelayedDragEvents()},_disableDelayedDragEvents:function e(){var t=this.el.ownerDocument;_e(t,"mouseup",this._disableDelayedDrag);_e(t,"touchend",this._disableDelayedDrag);_e(t,"touchcancel",this._disableDelayedDrag);_e(t,"pointerup",this._disableDelayedDrag);_e(t,"pointercancel",this._disableDelayedDrag);_e(t,"mousemove",this._delayedDragTouchMoveHandler);_e(t,"touchmove",this._delayedDragTouchMoveHandler);_e(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function e(t,i){i=i||t.pointerType=="touch"&&t;if(!this.nativeDraggable||i){if(this.options.supportPointer){Oe(document,"pointermove",this._onTouchMove)}else if(i){Oe(document,"touchmove",this._onTouchMove)}else{Oe(document,"mousemove",this._onTouchMove)}}else{Oe(xt,"dragend",this);Oe(kt,"dragstart",this._onDragStart)}try{if(document.selection){ki((function(){document.selection.empty()}))}else{window.getSelection().removeAllRanges()}}catch(e){}},_dragStarted:function e(t,i){Zt=false;if(kt&&xt){gt("dragStarted",this,{evt:i});if(this.nativeDraggable){Oe(document,"dragover",ci)}var o=this.options;!t&&Ue(xt,o.dragClass,false);Ue(xt,o.ghostClass,true);hi.active=this;t&&this._appendGhost();bt({sortable:this,name:"start",originalEvent:i})}else{this._nulling()}},_emulateDragOver:function e(){if(Nt){this._lastX=Nt.clientX;this._lastY=Nt.clientY;ri();var t=document.elementFromPoint(Nt.clientX,Nt.clientY);var i=t;while(t&&t.shadowRoot){t=t.shadowRoot.elementFromPoint(Nt.clientX,Nt.clientY);if(t===i)break;i=t}xt.parentNode[at]._isOutsideThisEl(t);if(i){do{if(i[at]){var o=void 0;o=i[at]._onDragOver({clientX:Nt.clientX,clientY:Nt.clientY,target:t,rootEl:i});if(o&&!this.options.dragoverBubble){break}}t=i}while(i=Ve(i))}ai()}},_onTouchMove:function e(t){if(_t){var i=this.options,o=i.fallbackTolerance,s=i.fallbackOffset,n=t.touches?t.touches[0]:t,l=yt&&Be(yt,true),r=yt&&l&&l.a,a=yt&&l&&l.d,d=Kt&&Wt&&Xe(Wt),c=(n.clientX-_t.clientX+s.x)/(r||1)+(d?d[0]-Yt[0]:0)/(r||1),h=(n.clientY-_t.clientY+s.y)/(a||1)+(d?d[1]-Yt[1]:0)/(a||1);if(!hi.active&&!Zt){if(o&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))<o){return}this._onDragStart(t,true)}if(yt){if(l){l.e+=c-(Vt||0);l.f+=h-(At||0)}else{l={a:1,b:0,c:0,d:1,e:c,f:h}}var u="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");je(yt,"webkitTransform",u);je(yt,"mozTransform",u);je(yt,"msTransform",u);je(yt,"transform",u);Vt=c;At=h;Nt=n}t.cancelable&&t.preventDefault()}},_appendGhost:function e(){if(!yt){var t=this.options.fallbackOnBody?document.body:kt,i=Qe(xt,true,Kt,true,t),o=this.options;if(Kt){Wt=t;while(je(Wt,"position")==="static"&&je(Wt,"transform")==="none"&&Wt!==document){Wt=Wt.parentNode}if(Wt!==document.body&&Wt!==document.documentElement){if(Wt===document)Wt=$e();i.top+=Wt.scrollTop;i.left+=Wt.scrollLeft}else{Wt=$e()}Yt=Xe(Wt)}yt=xt.cloneNode(true);Ue(yt,o.ghostClass,false);Ue(yt,o.fallbackClass,true);Ue(yt,o.dragClass,true);je(yt,"transition","");je(yt,"transform","");je(yt,"box-sizing","border-box");je(yt,"margin",0);je(yt,"top",i.top);je(yt,"left",i.left);je(yt,"width",i.width);je(yt,"height",i.height);je(yt,"opacity","0.8");je(yt,"position",Kt?"absolute":"fixed");je(yt,"zIndex","100000");je(yt,"pointerEvents","none");hi.ghost=yt;t.appendChild(yt);je(yt,"transform-origin",Rt/parseInt(yt.style.width)*100+"% "+Ut/parseInt(yt.style.height)*100+"%")}},_onDragStart:function e(t,i){var o=this;var s=t.dataTransfer;var n=o.options;gt("dragStart",this,{evt:t});if(hi.eventCanceled){this._onDrop();return}gt("setupClone",this);if(!hi.eventCanceled){qt=lt(xt);qt.removeAttribute("id");qt.draggable=false;qt.style["will-change"]="";this._hideClone();Ue(qt,this.options.chosenClass,false);hi.clone=qt}o.cloneId=ki((function(){gt("clone",o);if(hi.eventCanceled)return;if(!o.options.removeCloneOnHide){kt.insertBefore(qt,xt)}o._hideClone();bt({sortable:o,name:"clone"})}));!i&&Ue(xt,n.dragClass,true);if(i){zt=true;o._loopId=setInterval(o._emulateDragOver,50)}else{_e(document,"mouseup",o._onDrop);_e(document,"touchend",o._onDrop);_e(document,"touchcancel",o._onDrop);if(s){s.effectAllowed="move";n.setData&&n.setData.call(o,s,xt)}Oe(document,"drop",o);je(xt,"transform","translateZ(0)")}Zt=true;o._dragStartId=ki(o._dragStarted.bind(o,i,t));Oe(document,"selectstart",o);jt=true;window.getSelection().removeAllRanges();if(He){je(document.body,"user-select","none")}},_onDragOver:function e(t){var i=this.el,o=t.target,s,n,l,r=this.options,a=r.group,d=hi.active,c=Ht===a,h=r.sort,u=Dt||d,f,p=this,v=false;if(Jt)return;function m(e,r){gt(e,p,we({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:l,dragRect:s,targetRect:n,canSort:h,fromSortable:u,target:o,completed:b,onMove:function e(o,n){return fi(kt,i,xt,s,o,Qe(o),t,n)},changed:x},r))}function g(){m("dragOverAnimationCapture");p.captureAnimationState();if(p!==u){u.captureAnimationState()}}function b(e){m("dragOverCompleted",{insertion:e});if(e){if(c){d._hideClone()}else{d._showClone(p)}if(p!==u){Ue(xt,Dt?Dt.options.ghostClass:d.options.ghostClass,false);Ue(xt,r.ghostClass,true)}if(Dt!==p&&p!==hi.active){Dt=p}else if(p===hi.active&&Dt){Dt=null}if(u===p){p._ignoreWhileAnimating=o}p.animateAll((function(){m("dragOverAnimationComplete");p._ignoreWhileAnimating=null}));if(p!==u){u.animateAll();u._ignoreWhileAnimating=null}}if(o===xt&&!xt.animated||o===i&&!o.animated){Bt=null}if(!r.dragoverBubble&&!t.rootEl&&o!==document){xt.parentNode[at]._isOutsideThisEl(t.target);!e&&di(t)}!r.dragoverBubble&&t.stopPropagation&&t.stopPropagation();return v=true}function x(){Tt=Je(xt);Lt=Je(xt,r.draggable);bt({sortable:p,name:"change",toEl:i,newIndex:Tt,newDraggableIndex:Lt,originalEvent:t})}if(t.preventDefault!==void 0){t.cancelable&&t.preventDefault()}o=Ae(o,r.draggable,i,true);m("dragOver");if(hi.eventCanceled)return v;if(xt.contains(t.target)||o.animated&&o.animatingX&&o.animatingY||p._ignoreWhileAnimating===o){return b(false)}zt=false;if(d&&!r.disabled&&(c?h||(l=wt!==kt):Dt===this||(this.lastPutMode=Ht.checkPull(this,d,xt,t))&&a.checkPut(this,d,xt,t))){f=this._getDirection(t,o)==="vertical";s=Qe(xt);m("dragOverValid");if(hi.eventCanceled)return v;if(l){wt=kt;g();this._hideClone();m("revert");if(!hi.eventCanceled){if(Et){kt.insertBefore(xt,Et)}else{kt.appendChild(xt)}}return b(true)}var w=Ye(i,r.draggable);if(!w||gi(t,f,this)&&!w.animated){if(w===xt){return b(false)}if(w&&i===t.target){o=w}if(o){n=Qe(o)}if(fi(kt,i,xt,s,o,n,t,!!o)!==false){g();if(w&&w.nextSibling){i.insertBefore(xt,w.nextSibling)}else{i.appendChild(xt)}wt=i;x();return b(true)}}else if(w&&mi(t,f,this)){var y=We(i,0,r,true);if(y===xt){return b(false)}o=y;n=Qe(o);if(fi(kt,i,xt,s,o,n,t,false)!==false){g();i.insertBefore(xt,y);wt=i;x();return b(true)}}else if(o.parentNode===i){n=Qe(o);var k=0,E,S=xt.parentNode!==i,q=!si(xt.animated&&xt.toRect||s,o.animated&&o.toRect||n,f),C=f?"top":"left",M=Fe(o,"top","top")||Fe(xt,"top","top"),T=M?M.scrollTop:void 0;if(Bt!==o){E=n[C];$t=false;Qt=!q&&r.invertSwap||S}k=bi(t,o,n,f,q?1:r.swapThreshold,r.invertedSwapThreshold==null?r.swapThreshold:r.invertedSwapThreshold,Qt,Bt===o);var I;if(k!==0){var L=Je(xt);do{L-=k;I=wt.children[L]}while(I&&(je(I,"display")==="none"||I===yt))}if(k===0||I===o){return b(false)}Bt=o;Pt=k;var H=o.nextElementSibling,D=false;D=k===1;var Z=fi(kt,i,xt,s,o,n,t,D);if(Z!==false){if(Z===1||Z===-1){D=Z===1}Jt=true;setTimeout(vi,30);g();if(D&&!H){i.appendChild(xt)}else{o.parentNode.insertBefore(xt,D?H:o)}if(M){nt(M,0,T-M.scrollTop)}wt=xt.parentNode;if(E!==undefined&&!Qt){Ft=Math.abs(E-Qe(o)[C])}x();return b(true)}}if(i.contains(xt)){return b(false)}}return false},_ignoreWhileAnimating:null,_offMoveEvents:function e(){_e(document,"mousemove",this._onTouchMove);_e(document,"touchmove",this._onTouchMove);_e(document,"pointermove",this._onTouchMove);_e(document,"dragover",di);_e(document,"mousemove",di);_e(document,"touchmove",di)},_offUpEvents:function e(){var t=this.el.ownerDocument;_e(t,"mouseup",this._onDrop);_e(t,"touchend",this._onDrop);_e(t,"pointerup",this._onDrop);_e(t,"pointercancel",this._onDrop);_e(t,"touchcancel",this._onDrop);_e(document,"selectstart",this)},_onDrop:function e(t){var i=this.el,o=this.options;Tt=Je(xt);Lt=Je(xt,o.draggable);gt("drop",this,{evt:t});wt=xt&&xt.parentNode;Tt=Je(xt);Lt=Je(xt,o.draggable);if(hi.eventCanceled){this._nulling();return}Zt=false;Qt=false;$t=false;clearInterval(this._loopId);clearTimeout(this._dragStartTimer);Ei(this.cloneId);Ei(this._dragStartId);if(this.nativeDraggable){_e(document,"drop",this);_e(i,"dragstart",this._onDragStart)}this._offMoveEvents();this._offUpEvents();if(He){je(document.body,"user-select","")}je(xt,"transform","");if(t){if(jt){t.cancelable&&t.preventDefault();!o.dropBubble&&t.stopPropagation()}yt&&yt.parentNode&&yt.parentNode.removeChild(yt);if(kt===wt||Dt&&Dt.lastPutMode!=="clone"){qt&&qt.parentNode&&qt.parentNode.removeChild(qt)}if(xt){if(this.nativeDraggable){_e(xt,"dragend",this)}pi(xt);xt.style["will-change"]="";if(jt&&!Zt){Ue(xt,Dt?Dt.options.ghostClass:this.options.ghostClass,false)}Ue(xt,this.options.chosenClass,false);bt({sortable:this,name:"unchoose",toEl:wt,newIndex:null,newDraggableIndex:null,originalEvent:t});if(kt!==wt){if(Tt>=0){bt({rootEl:wt,name:"add",toEl:wt,fromEl:kt,originalEvent:t});bt({sortable:this,name:"remove",toEl:wt,originalEvent:t});bt({rootEl:wt,name:"sort",toEl:wt,fromEl:kt,originalEvent:t});bt({sortable:this,name:"sort",toEl:wt,originalEvent:t})}Dt&&Dt.save()}else{if(Tt!==Mt){if(Tt>=0){bt({sortable:this,name:"update",toEl:wt,originalEvent:t});bt({sortable:this,name:"sort",toEl:wt,originalEvent:t})}}}if(hi.active){if(Tt==null||Tt===-1){Tt=Mt;Lt=It}bt({sortable:this,name:"end",toEl:wt,originalEvent:t});this.save()}}}this._nulling()},_nulling:function e(){gt("nulling",this);kt=xt=wt=yt=Et=qt=St=Ct=_t=Nt=jt=Tt=Lt=Mt=It=Bt=Pt=Dt=Ht=hi.dragged=hi.ghost=hi.clone=hi.active=null;Xt.forEach((function(e){e.checked=true}));Xt.length=Vt=At=0},handleEvent:function e(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":if(xt){this._onDragOver(t);ui(t)}break;case"selectstart":t.preventDefault();break}},toArray:function e(){var t=[],i,o=this.el.children,s=0,n=o.length,l=this.options;for(;s<n;s++){i=o[s];if(Ae(i,l.draggable,this.el,false)){t.push(i.getAttribute(l.dataIdAttr)||wi(i))}}return t},sort:function e(t,i){var o={},s=this.el;this.toArray().forEach((function(e,t){var i=s.children[t];if(Ae(i,this.options.draggable,s,false)){o[e]=i}}),this);i&&this.captureAnimationState();t.forEach((function(e){if(o[e]){s.removeChild(o[e]);s.appendChild(o[e])}}));i&&this.animateAll()},save:function e(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function e(t,i){return Ae(t,i||this.options.draggable,this.el,false)},option:function e(t,i){var o=this.options;if(i===void 0){return o[t]}else{var s=pt.modifyOption(this,t,i);if(typeof s!=="undefined"){o[t]=s}else{o[t]=i}if(t==="group"){li(o)}}},destroy:function e(){gt("destroy",this);var t=this.el;t[at]=null;_e(t,"mousedown",this._onTapStart);_e(t,"touchstart",this._onTapStart);_e(t,"pointerdown",this._onTapStart);if(this.nativeDraggable){_e(t,"dragover",this);_e(t,"dragenter",this)}Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")}));this._onDrop();this._disableDelayedDragEvents();Ot.splice(Ot.indexOf(this.el),1);this.el=t=null},_hideClone:function e(){if(!Ct){gt("hideClone",this);if(hi.eventCanceled)return;je(qt,"display","none");if(this.options.removeCloneOnHide&&qt.parentNode){qt.parentNode.removeChild(qt)}Ct=true}},_showClone:function e(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Ct){gt("showClone",this);if(hi.eventCanceled)return;if(xt.parentNode==kt&&!this.options.group.revertClone){kt.insertBefore(qt,xt)}else if(Et){kt.insertBefore(qt,Et)}else{kt.appendChild(qt)}if(this.options.group.revertClone){this.animate(xt,qt)}je(qt,"display","");Ct=false}}};function ui(e){if(e.dataTransfer){e.dataTransfer.dropEffect="move"}e.cancelable&&e.preventDefault()}function fi(e,t,i,o,s,n,l,r){var a,d=e[at],c=d.options.onMove,h;if(window.CustomEvent&&!Te&&!Ie){a=new CustomEvent("move",{bubbles:true,cancelable:true})}else{a=document.createEvent("Event");a.initEvent("move",true,true)}a.to=t;a.from=e;a.dragged=i;a.draggedRect=o;a.related=s||t;a.relatedRect=n||Qe(t);a.willInsertAfter=r;a.originalEvent=l;e.dispatchEvent(a);if(c){h=c.call(d,a,l)}return h}function pi(e){e.draggable=false}function vi(){Jt=false}function mi(e,t,i){var o=Qe(We(i.el,0,i.options,true));var s=rt(i.el,i.options,yt);var n=10;return t?e.clientX<s.left-n||e.clientY<o.top&&e.clientX<o.right:e.clientY<s.top-n||e.clientY<o.bottom&&e.clientX<o.left}function gi(e,t,i){var o=Qe(Ye(i.el,i.options.draggable));var s=rt(i.el,i.options,yt);var n=10;return t?e.clientX>s.right+n||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>s.bottom+n||e.clientX>o.right&&e.clientY>o.top}function bi(e,t,i,o,s,n,l,r){var a=o?e.clientY:e.clientX,d=o?i.height:i.width,c=o?i.top:i.left,h=o?i.bottom:i.right,u=false;if(!l){if(r&&Ft<d*s){if(!$t&&(Pt===1?a>c+d*n/2:a<h-d*n/2)){$t=true}if(!$t){if(Pt===1?a<c+Ft:a>h-Ft){return-Pt}}else{u=true}}else{if(a>c+d*(1-s)/2&&a<h-d*(1-s)/2){return xi(t)}}}u=u||l;if(u){if(a<c+d*n/2||a>h-d*n/2){return a>c+d/2?1:-1}}return 0}function xi(e){if(Je(xt)<Je(e)){return 1}else{return-1}}function wi(e){var t=e.tagName+e.className+e.src+e.href+e.textContent,i=t.length,o=0;while(i--){o+=t.charCodeAt(i)}return o.toString(36)}function yi(e){Xt.length=0;var t=e.getElementsByTagName("input");var i=t.length;while(i--){var o=t[i];o.checked&&Xt.push(o)}}function ki(e){return setTimeout(e,0)}function Ei(e){return clearTimeout(e)}if(Gt){Oe(document,"touchmove",(function(e){if((hi.active||Zt)&&e.cancelable){e.preventDefault()}}))}hi.utils={on:Oe,off:_e,css:je,find:Pe,is:function e(t,i){return!!Ae(t,i,t,false)},extend:et,throttle:ot,closest:Ae,toggleClass:Ue,clone:lt,index:Je,nextTick:ki,cancelNextTick:Ei,detectDirection:oi,getChild:We,expando:at};hi.get=function(e){return e[at]};hi.mount=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++){t[i]=arguments[i]}if(t[0].constructor===Array)t=t[0];t.forEach((function(e){if(!e.prototype||!e.prototype.constructor){throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e))}if(e.utils)hi.utils=we(we({},hi.utils),e.utils);pt.mount(e)}))};hi.create=function(e,t){return new hi(e,t)};hi.version=Ce;var Si=[],qi,Ci,Mi=false,Ti,Ii,Li,Hi;function Di(){function e(){this.defaults={scroll:true,forceAutoScrollFallback:false,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:true};for(var e in this){if(e.charAt(0)==="_"&&typeof this[e]==="function"){this[e]=this[e].bind(this)}}}e.prototype={dragStarted:function e(t){var i=t.originalEvent;if(this.sortable.nativeDraggable){Oe(document,"dragover",this._handleAutoScroll)}else{if(this.options.supportPointer){Oe(document,"pointermove",this._handleFallbackAutoScroll)}else if(i.touches){Oe(document,"touchmove",this._handleFallbackAutoScroll)}else{Oe(document,"mousemove",this._handleFallbackAutoScroll)}}},dragOverCompleted:function e(t){var i=t.originalEvent;if(!this.options.dragOverBubble&&!i.rootEl){this._handleAutoScroll(i)}},drop:function e(){if(this.sortable.nativeDraggable){_e(document,"dragover",this._handleAutoScroll)}else{_e(document,"pointermove",this._handleFallbackAutoScroll);_e(document,"touchmove",this._handleFallbackAutoScroll);_e(document,"mousemove",this._handleFallbackAutoScroll)}zi();Zi();st()},nulling:function e(){Li=Ci=qi=Mi=Hi=Ti=Ii=null;Si.length=0},_handleFallbackAutoScroll:function e(t){this._handleAutoScroll(t,true)},_handleAutoScroll:function e(t,i){var o=this;var s=(t.touches?t.touches[0]:t).clientX,n=(t.touches?t.touches[0]:t).clientY,l=document.elementFromPoint(s,n);Li=t;if(i||this.options.forceAutoScrollFallback||Ie||Te||He){Oi(t,this.options,l,i);var r=Ke(l,true);if(Mi&&(!Hi||s!==Ti||n!==Ii)){Hi&&zi();Hi=setInterval((function(){var e=Ke(document.elementFromPoint(s,n),true);if(e!==r){r=e;Zi()}Oi(t,o.options,e,i)}),10);Ti=s;Ii=n}}else{if(!this.options.bubbleScroll||Ke(l,true)===$e()){Zi();return}Oi(t,this.options,Ke(l,false),false)}}};return Ee(e,{pluginName:"scroll",initializeByDefault:true})}function Zi(){Si.forEach((function(e){clearInterval(e.pid)}));Si=[]}function zi(){clearInterval(Hi)}var Oi=ot((function(e,t,i,o){if(!t.scroll)return;var s=(e.touches?e.touches[0]:e).clientX,n=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,r=t.scrollSpeed,a=$e();var d=false,c;if(Ci!==i){Ci=i;Zi();qi=t.scroll;c=t.scrollFn;if(qi===true){qi=Ke(i,true)}}var h=0;var u=qi;do{var f=u,p=Qe(f),v=p.top,m=p.bottom,g=p.left,b=p.right,x=p.width,w=p.height,y=void 0,k=void 0,E=f.scrollWidth,S=f.scrollHeight,q=je(f),C=f.scrollLeft,M=f.scrollTop;if(f===a){y=x<E&&(q.overflowX==="auto"||q.overflowX==="scroll"||q.overflowX==="visible");k=w<S&&(q.overflowY==="auto"||q.overflowY==="scroll"||q.overflowY==="visible")}else{y=x<E&&(q.overflowX==="auto"||q.overflowX==="scroll");k=w<S&&(q.overflowY==="auto"||q.overflowY==="scroll")}var T=y&&(Math.abs(b-s)<=l&&C+x<E)-(Math.abs(g-s)<=l&&!!C);var I=k&&(Math.abs(m-n)<=l&&M+w<S)-(Math.abs(v-n)<=l&&!!M);if(!Si[h]){for(var L=0;L<=h;L++){if(!Si[L]){Si[L]={}}}}if(Si[h].vx!=T||Si[h].vy!=I||Si[h].el!==f){Si[h].el=f;Si[h].vx=T;Si[h].vy=I;clearInterval(Si[h].pid);if(T!=0||I!=0){d=true;Si[h].pid=setInterval(function(){if(o&&this.layer===0){hi.active._onTouchMove(Li)}var t=Si[this.layer].vy?Si[this.layer].vy*r:0;var i=Si[this.layer].vx?Si[this.layer].vx*r:0;if(typeof c==="function"){if(c.call(hi.dragged.parentNode[at],i,t,e,Li,Si[this.layer].el)!=="continue"){return}}nt(Si[this.layer].el,i,t)}.bind({layer:h}),24)}}h++}while(t.bubbleScroll&&u!==a&&(u=Ke(u,false)));Mi=d}),30);var _i=function e(t){var i=t.originalEvent,o=t.putSortable,s=t.dragEl,n=t.activeSortable,l=t.dispatchSortableEvent,r=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(!i)return;var d=o||n;r();var c=i.changedTouches&&i.changedTouches.length?i.changedTouches[0]:i;var h=document.elementFromPoint(c.clientX,c.clientY);a();if(d&&!d.el.contains(h)){l("spill");this.onSpill({dragEl:s,putSortable:o})}};function Ni(){}Ni.prototype={startIndex:null,dragStart:function e(t){var i=t.oldDraggableIndex;this.startIndex=i},onSpill:function e(t){var i=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState();if(o){o.captureAnimationState()}var s=We(this.sortable.el,this.startIndex,this.options);if(s){this.sortable.el.insertBefore(i,s)}else{this.sortable.el.appendChild(i)}this.sortable.animateAll();if(o){o.animateAll()}},drop:_i};Ee(Ni,{pluginName:"revertOnSpill"});function Vi(){}Vi.prototype={onSpill:function e(t){var i=t.dragEl,o=t.putSortable;var s=o||this.sortable;s.captureAnimationState();i.parentNode&&i.parentNode.removeChild(i);s.animateAll()},drop:_i};Ee(Vi,{pluginName:"removeOnSpill"});hi.mount(new Di);hi.mount(Vi,Ni);const Ai='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-roles{display:block;max-width:600px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles .roles{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:10px;margin-top:10px}verdocs-template-roles .roles .sequence{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;font-weight:500;padding:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;border-bottom:1px dotted #e3e3e3}verdocs-template-roles .roles .sequence.add-sequence{color:#777777;line-height:34px}verdocs-template-roles .roles .sequence-label{font-size:18px;line-height:32px}verdocs-template-roles .roles .sequence-roles{gap:10px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .roles .role{height:32px;cursor:move;display:-ms-flexbox;display:flex;max-width:200px;position:relative;border-radius:32px;background-color:#eff7fb;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 14px 0 34px;border:1px solid #ccc;-ms-flex-direction:column;flex-direction:column}verdocs-template-roles .roles .role .role-name{font-size:14px;overflow:hidden;font-weight:400;line-height:30px;white-space:nowrap;text-overflow:ellipsis}verdocs-template-roles .roles .role .icons{position:absolute;left:1px;top:-3px;cursor:pointer;padding:5px;z-index:10}verdocs-template-roles .roles .role .icons .gear-button{display:none;-webkit-transform:scale(1.1);transform:scale(1.1);margin:4px 0 0 1px}verdocs-template-roles .roles .role .icons .type-icon{opacity:0.6;display:block;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-roles .roles .role .icons:hover .gear-button{display:block}verdocs-template-roles .roles .role .icons:hover .type-icon{display:none}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#46497d;margin:0 0 10px 0}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{opacity:0.3;padding:0 10px;cursor:pointer;background:none;height:32px;border:1px solid #cccccc;border-radius:32px}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:16px;height:16px;stroke:#666666;margin-bottom:2px;display:inline-block}verdocs-template-roles .sequence-roles{display:-ms-flexbox;display:flex;max-width:400px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}';const Ri=Ai;const Ui='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>';const ji=`<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>`;const Bi='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';const Pi=`<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>`;const $i=`<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>`;const Qi=class{constructor(i){e(this,i);this.next=t(this,"next",7);this.exit=t(this,"exit",7);this.sdkError=t(this,"sdkError",7);this.rolesUpdated=t(this,"rolesUpdated",7);this.templateListenerId=null;this.sortableRefs=[];this.endpoint=l.getDefault();this.templateId="";this.showingRoleDialog=null;this.sender=null;this.dragging=false;this.loading=true;this.template=null}disconnectedCallback(){this.unlistenToTemplate();this.cleanupSortables()}async listenToTemplate(){console.log("[ROLES] Loading template",this.templateId);this.unlistenToTemplate();y.subscribe("templates",this.templateId,(()=>r(this.endpoint,this.templateId)),false,(e=>{console.log("[ROLES] Template Updated",e);this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){y.store.delListener(this.templateListenerId);this.templateListenerId=null}}async componentWillLoad(){var e,t,i;try{this.endpoint.loadSession();if(!this.templateId){console.log(`[ROLES] Missing required template ID ${this.templateId}`);return}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return}this.listenToTemplate()}catch(o){console.log("[ROLES] Error with preview session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(i=o.response)===null||i===void 0?void 0:i.data))}}cleanupSortables(){this.sortableRefs.forEach((e=>e.destroy()));this.sortableRefs.length=0}componentDidRender(){this.cleanupSortables();const e=this.getSequenceNumbers();(e||[]).forEach((e=>{const t=document.getElementById(`verdocs-roles-sequence-${e}`);if(t){const e=new hi(t,{group:"roles",animation:150,dragoverBubble:true,filter:".no-drag",onEnd:this.handleMoveEnd.bind(this),onChoose:()=>this.dragging=true,onUnchoose:()=>this.dragging=false});this.sortableRefs.push(e)}}));const t=document.getElementById(`verdocs-roles-sequence-add-target`);if(t){console.log("[ROLES] Applying sortable to add-sequence slot");const e=new hi(t,{group:"roles",animation:150,dragoverBubble:true,filter:".no-drag",onEnd:this.handleMoveEnd.bind(this),onChoose:()=>this.dragging=true,onUnchoose:()=>this.dragging=false});this.sortableRefs.push(e)}}handleMoveEnd(e){const t=+e.from.dataset.sequence;const i=+e.to.dataset.sequence;const o=+e.oldIndex+1;const s=+e.newIndex+1;console.log(`Move from ${t}:${o} to ${i}:${s}`,e.item);const n={};const l=this.getSequenceNumbers();l.forEach((e=>{const t=this.getRolesAtSequence(e);n[String(e)]=JSON.parse(JSON.stringify(t))}));n[l[l.length-1]+1]=[];const r=n[t].splice(o-1,1)[0];n[i]||(n[i]=[]);n[i].splice(s-1,0,r);const a=[];Object.entries(n).forEach((([e,t])=>{t.forEach(((t,i)=>{if(!t){return}const o=+i+1;if(t.sequence!==+e||t.order!==o){t.sequence=+e;t.order=o;a.push(b(this.endpoint,this.templateId,t.name,{sequence:+e,order:o}).then((e=>console.log("[ROLES] Updated role",t.name,e))).catch((e=>console.log("[ROLES] Error updating role",e))))}}))}));return Promise.all(a).then((async()=>console.log("[ROLES] Done renumbering"))).catch((e=>console.log("[ROLES] Error updating roles",e)))}handleCancel(){var e;(e=this.exit)===null||e===void 0?void 0:e.emit()}handleSubmit(){var e;(e=this.next)===null||e===void 0?void 0:e.emit()}getSortedRoles(){var e;return(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).sort(((e,t)=>e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence))}getSequenceNumbers(){var e;const t=(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).map((e=>e.sequence));const i=[...new Set(t)];i.sort(((e,t)=>e-t));return i}getRoleNames(){const e=this.getSortedRoles();return e.map((e=>e.name))}getRolesAtSequence(e){var t;return(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).filter((t=>t&&t.sequence===e))}async renumberTemplateRoles(){var e;const t={};const i=[];const o=this.getSequenceNumbers();(o||[]).forEach((e=>{(t[e]||[]).forEach(((t,o)=>{const s=+o+1;if(t.sequence!==+e||t.order!==s){console.log("[ROLES] Updating role",t.name,"from",t.sequence,t.order,"to",e,s);t.sequence=+e;t.order=s;i.push(b(this.endpoint,this.templateId,t.name,{sequence:+e,order:s}).then((e=>console.log("[ROLES] Updated role",t.name,e))).catch((e=>console.log("[ROLES] Error updating role",e))))}}))}));console.log(`[ROLES] Awaiting ${i.length} renumber requests`);await Promise.all(i).then((async()=>{const e=JSON.parse(JSON.stringify(this.template));e.roles=Object.keys(t).reduce(((e,i)=>e.concat(t[i])),[]);console.log("[ROLES] Done renumbering",e.roles.map((e=>({name:e.name,sequence:e.sequence,order:e.order}))));y.updateTemplate(this.templateId,e)}));(e=this.rolesUpdated)===null||e===void 0?void 0:e.emit({event:"updated",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})}getNextRoleName(){var e,t;let i="";let o=(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).length;do{o++;i=`Recipient ${o}`}while(!i||(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).some((e=>e&&e.name===i)));return i}callCreateRole(e,t,i){console.log("[ROLES] Will create role",{name:e,sequence:t,order:i});x(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,message:"",order:i,full_name:null,first_name:"",last_name:"",email:"",phone:"",type:"signer",delegator:false,kba_method:null}).then((async e=>{var t;console.log("[ROLES] Created role",e);console.log("Updating template in data store");await y.getTemplate(this.endpoint,this.templateId,true);(t=this.rolesUpdated)===null||t===void 0?void 0:t.emit({event:"added",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})})).catch((e=>{console.log("[ROLES] Error creating role",e)}))}handleAddRole(e,t){e.stopPropagation();const i=this.getRolesAtSequence(t).length+1;const o=this.getNextRoleName();this.callCreateRole(o,t,i)}handleAddStep(e,t){e.stopPropagation();const i=1;const o=this.getNextRoleName();this.callCreateRole(o,t,i)}render(){if(!this.endpoint.session){return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(this.loading||!this.template){return i(o,{class:"loading"},i("verdocs-loader",null))}const e=this.getRoleNames();const t=this.getSequenceNumbers();const s=t&&t.length>0?(t[t.length-1]||0)+1:1;console.log("[ROLES] Rendering",{roleNames:e,sequences:t,nextSequence:s});return i(o,{class:{dragging:this.dragging}},i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Roles and Workflow"),i("div",{class:"roles"},t.map(((e,t)=>i("div",{class:"sequence"},i("div",{class:"sequence-label no-drag"},t+1,"."),i("div",{class:"sequence-roles",id:`verdocs-roles-sequence-${e}`,"data-sequence":e},this.getRolesAtSequence(e).map((t=>{const o=!t.email||!t.first_name||!t.last_name;return o?i("div",{class:"role","data-rolename":t.name,"data-sequence":e,"data-order":t.order},i("div",{class:"role-name"},t.name),i("div",{class:"icons"},i("div",{class:"gear-button",innerHTML:Ui,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"}),i("span",{class:"type-icon",innerHTML:t.type==="signer"?Bi:t.type==="cc"?$i:Pi}))):i("div",{class:"role","data-rolename":t.name,"data-sequence":e,"data-order":t.order},i("div",{class:"role-name"},u(t)),i("div",{class:"icons"},i("div",{class:"gear-button",innerHTML:Ui,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"}),i("span",{class:"type-icon",innerHTML:t.type==="signer"?Bi:t.type==="cc"?$i:Pi})))}))),i("button",{class:"add-role no-drag",onClick:t=>this.handleAddRole(t,e)},"+ Add Role")))),i("div",{class:"sequence add-sequence"},i("div",{class:"sequence-label no-drag"},t.length+1,"."),i("div",{class:"sequence-roles",id:`verdocs-roles-sequence-add-target`,"data-sequence":s}),i("button",{class:"add-role no-drag",onClick:e=>this.handleAddRole(e,s)},"+ Add Role"))),e.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:ji})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:"OK",size:"small",onClick:()=>this.handleSubmit(),disabled:e.length<1}))),this.showingRoleDialog&&i("verdocs-menu-panel",{onClose:()=>this.showingRoleDialog=null},i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{var e;(e=document.getElementById("verdocs-menu-panel-overlay"))===null||e===void 0?void 0:e.remove();this.showingRoleDialog=null},onDelete:async()=>{var e;this.showingRoleDialog=null;await this.renumberTemplateRoles();(e=this.rolesUpdated)===null||e===void 0?void 0:e.emit({event:"deleted",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})}})))}get el(){return n(this)}};Qi.style=Ri;export{R as verdocs_preview,Y as verdocs_send,G as verdocs_template_attachments,se as verdocs_template_build_tabs,be as verdocs_template_fields,Qi as verdocs_template_roles};
|
8
|
+
//# sourceMappingURL=p-0a745e87.entry.js.map
|