tn-element-ui
Version:
element-ui二次封装
1 lines • 52.3 kB
JavaScript
import t from"vue";import e from"element-ui";function n(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}n("");n(":root{--tn-primary-color:#1890ff;--tn-primary-plus-color:#096dd9;--tn-primary-minus-color:#40a9ff;--tn-primary-tiny-color:#bae7ff;--tn-primary-shadow-color:rgba(24, 144, 255, .15);--tn-success-color:#52c41a;--tn-success-plus-color:#389e0d;--tn-success-minus-color:#73d13d;--tn-success-tiny-color:#d9f7be;--tn-success-shadow-color:rgba(82, 196, 26, .15);--tn-danger-color:#f5222d;--tn-danger-plus-color:#cf1322;--tn-danger-minus-color:#ff4d4f;--tn-danger-tiny-color:#ffccc7;--tn-danger-shadow-color:rgba(245, 34, 45, .15);--tn-warning-color:#faad14}");n('html{color:#666;font-size:14px;font-weight:400}body{font-size:100%}button,html{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Helvetica,Arial,sans-serif}[class^=tn-]{box-sizing:border-box}');n(".tn-bordered,[class^=tn-]>[bordered],[class^=tn-][bordered]{border:1px solid #d6d6d6}");n(".tn-background-normal{background:#fff}.tn-background-grey{background:#e9e9e9}.tn-background-highlight{background:#a6a6a6;color:#fff}.tn-background-info{background:#ffd}.tn-background-hover:hover{background:#ececec}.tn-background-disabled[disabled]{background:#e6e6e6;color:#bbb}.tn-background-primary{background:#1890ff;background:var(--tn-primary-color)}.tn-background-success{background:#52c41a;background:var(--tn-success-color)}.tn-background-danger{background:#52c41a;background:var(--tn-success-color)}.tn-background-warning{background:#faad14;background:var(--tn-warning-color)}");n(".tn-text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tn-text-color-normal{color:#666}.tn-text-color-weak{color:#bbb}.tn-text-color-title{color:#555}.tn-text-color-subtitle{color:#777}.tn-text-title{font-size:1em;color:#555}.tn-text-subtitle{font-size:.9em;color:#777}.tn-text-weak{font-size:.8em;color:#bbb}.tn-text-body{font-size:.9em;color:#666}.tn-text-color-primary{color:#1890ff;color:var(--tn-primary-color)}.tn-text-color-success{color:#52c41a;color:var(--tn-success-color)}.tn-text-color-danger{color:#f5222d;color:var(--tn-danger-color)}.tn-text-color-warning{color:#faad14;color:var(--tn-warning-color)}.tn-text-color-highlight{color:#fff}");n(".tn-badge{display:inline-block;height:1rem;min-width:1.5rem;line-height:1rem;padding:0 4px;font-size:.8rem;border-radius:.5rem;background:#a6a6a6;color:#fff}.tn-badge[badge-type=primary]{background:#1890ff;background:var(--tn-primary-color)}.tn-badge[badge-type=success]{background:#52c41a;background:var(--tn-success-color)}.tn-badge[badge-type=warning]{background:#faad14;background:var(--tn-warning-color)}.tn-badge[badge-type=danger]{background:#f5222d;background:var(--tn-danger-color)}");function i(t,e){t.classList[e?"add":"remove"]("show")}function r(t,e,n){const{value:r,expression:o,modifiers:a}=e;if(void 0!==r||void 0!==o)return t.removeEventListener("mouseenter",(function(){i(t,!0)})),t.removeEventListener("mouseleave",(function(){i(t,!1)})),t.removeEventListener("click",(function(){i(t,t.classList.contains("show"))})),void i(t,r);let s=null;void 0===r&&void 0===o&&(s=a.click?"click":"hover"),"hover"===s?(t.addEventListener("mouseenter",(function(){i(t,!0)})),t.addEventListener("mouseleave",(function(){i(t,!1)}))):"click"===s&&t.addEventListener("click",(function(){i(t,!t.classList.contains("show"))}))}n(".tn-horn-container{position:relative}.tn-horn-container .tn-horn{display:none}.tn-horn-container.show .tn-horn{display:block}.tn-horn{position:absolute;z-index:9999;width:18px;height:18px;border-color:#333;border-style:solid;border-width:0;pointer-events:none;touch-action:none;cursor:inherit}.tn-horn.left-top{left:-6px;top:-6px;border-left-width:1px;border-top-width:1px}.tn-horn.right-top{right:-6px;top:-6px;border-right-width:1px;border-top-width:1px}.tn-horn.left-bottom{left:-6px;bottom:-6px;border-left-width:1px;border-bottom-width:1px}.tn-horn.right-bottom{right:-6px;bottom:-6px;border-right-width:1px;border-bottom-width:1px}");var o={bind:function(t,e,n){t.classList.add("tn-horn-container");["left-top","right-top","left-bottom","right-bottom"].forEach((e=>{const n=document.createElement("div");n.classList.add("tn-horn",e),t.appendChild(n)})),r(t,e)},inserted:function(t,e){},update:function(t,e,n){r(t,e)},componentUpdated:function(){},unbind:function(){}};function a(t){t.directive("horn",o)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function s(t){var e={exports:{}};return t(e,e.exports),e.exports}var l=s((function(t){(t.exports={}).forEach=function(t,e){for(var n=0;n<t.length;n++){var i=e(t[n]);if(i)return i}}})),c=s((function(t){var e=t.exports={};e.isIE=function(t){return(-1!==(e=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==e.indexOf("trident")||-1!==e.indexOf(" edge/"))&&(!t||t===function(){var t=3,e=document.createElement("div"),n=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(n[0]);return t>4?t:undefined}());var e},e.isLegacyOpera=function(){return!!window.opera}})),d=s((function(t){(t.exports={}).getOption=function(t,e,n){var i=t[e];if(null==i&&void 0!==n)return n;return i}})),u=function(t){var e=(t=t||{}).reporter,n=d.getOption(t,"async",!0),i=d.getOption(t,"auto",!0);i&&!n&&(e&&e.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var r,o=h(),a=!1;function s(){for(a=!0;o.size();){var t=o;o=h(),t.process()}a=!1}function l(){var t;t=s,r=setTimeout(t,0)}return{add:function(t,e){!a&&i&&n&&0===o.size()&&l(),o.add(t,e)},force:function(t){a||(void 0===t&&(t=n),r&&(clearTimeout(r),r=null),t?l():s())}}};function h(){var t={},e=0,n=0,i=0;return{add:function(r,o){o||(o=r,r=0),r>n?n=r:r<i&&(i=r),t[r]||(t[r]=[]),t[r].push(o),e++},process:function(){for(var e=i;e<=n;e++)for(var r=t[e],o=0;o<r.length;o++){(0,r[o])()}},size:function(){return e}}}function f(t){return t._erd}var p={initState:function(t){return t._erd={},f(t)},getState:f,cleanState:function(t){delete t._erd}},g=l.forEach,m=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,i=t.stateHandler.getState;t.stateHandler.hasState;var r=t.idHandler;if(!n)throw new Error("Missing required dependency: batchProcessor");if(!e)throw new Error("Missing required dependency: reporter.");var o=function(){var t=500,e=500,n=document.createElement("div");n.style.cssText=l(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var i=document.createElement("div");i.style.cssText=l(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),i.appendChild(n),document.body.insertBefore(i,document.body.firstChild);var r=t-i.clientWidth,o=e-i.clientHeight;return document.body.removeChild(i),{width:r,height:o}}(),a="erd_scroll_detection_container";function s(t){!function(t,e,n){function i(n,i){i=i||function(e){t.head.appendChild(e)};var r=t.createElement("style");return r.innerHTML=n,r.id=e,i(r),r}if(!t.getElementById(e)){var r=n+"_animation",o=n+"_animation_active",a="/* Created by the element-resize-detector library. */\n";a+="."+n+" > div::-webkit-scrollbar { "+l(["display: none"])+" }\n\n",a+="."+o+" { "+l(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+r,"animation-name: "+r])+" }\n",a+="@-webkit-keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",i(a+="@keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(t,"erd_scroll_detection_scrollbar_style",a)}function l(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function c(t,n,i){if(t.addEventListener)t.addEventListener(n,i);else{if(!t.attachEvent)return e.error("[scroll] Don't know how to add event listeners.");t.attachEvent("on"+n,i)}}function d(t,n,i){if(t.removeEventListener)t.removeEventListener(n,i);else{if(!t.detachEvent)return e.error("[scroll] Don't know how to remove event listeners.");t.detachEvent("on"+n,i)}}function u(t){return i(t).container.childNodes[0].childNodes[0].childNodes[0]}function h(t){return i(t).container.childNodes[0].childNodes[0].childNodes[1]}return s(window.document),{makeDetectable:function(t,s,d){function f(){if(t.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(r.get(s),"Scroll: "),e.log.apply)e.log.apply(null,n);else for(var i=0;i<n.length;i++)e.log(n[i])}}function p(t){var e=i(t).container.childNodes[0],n=window.getComputedStyle(e);return!n.width||-1===n.width.indexOf("px")}function m(){var t=window.getComputedStyle(s),e={};return e.position=t.position,e.width=s.offsetWidth,e.height=s.offsetHeight,e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left,e.widthCSS=t.width,e.heightCSS=t.height,e}function b(){if(f("storeStyle invoked."),i(s)){var t=m();i(s).style=t}else f("Aborting because element has been uninstalled")}function v(t,e,n){i(t).lastWidth=e,i(t).lastHeight=n}function y(){return 2*o.width+1}function x(){return 2*o.height+1}function w(t){return t+10+y()}function _(t){return t+10+x()}function S(t,e,n){var i=u(t),r=h(t),o=w(e),a=_(n),s=function(t){return 2*t+y()}(e),l=function(t){return 2*t+x()}(n);i.scrollLeft=o,i.scrollTop=a,r.scrollLeft=s,r.scrollTop=l}function k(){var t=i(s).container;if(!t){(t=document.createElement("div")).className=a,t.style.cssText=l(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),i(s).container=t,function(t){t.className+=" "+a+"_animation_active"}(t),s.appendChild(t);var e=function(){i(s).onRendered&&i(s).onRendered()};c(t,"animationstart",e),i(s).onAnimationStart=e}return t}function $(){if(f("Injecting elements"),i(s)){!function(){var n=i(s).style;if("static"===n.position){s.style.setProperty("position","relative",t.important?"important":"");var r=function(t,e,n,i){var r=n[i];"auto"!==r&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(r)&&(t.warn("An element that is positioned static has style."+i+"="+r+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",e),e.style[i]=0)};r(e,s,n,"top"),r(e,s,n,"right"),r(e,s,n,"bottom"),r(e,s,n,"left")}}();var n=i(s).container;n||(n=k());var r,d,u,h,p=o.width,g=o.height,m=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),b=l(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(["left: "+(r=(r=-(1+p))?r+"px":"0"),"top: "+(d=(d=-(1+g))?d+"px":"0"),"right: "+(h=(h=-p)?h+"px":"0"),"bottom: "+(u=(u=-g)?u+"px":"0")])),v=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),y=l(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),x=l(["position: absolute","left: 0","top: 0"]),w=l(["position: absolute","width: 200%","height: 200%"]),_=document.createElement("div"),S=document.createElement("div"),$=document.createElement("div"),E=document.createElement("div"),D=document.createElement("div"),z=document.createElement("div");_.dir="ltr",_.style.cssText=m,_.className=a,S.className=a,S.style.cssText=b,$.style.cssText=v,E.style.cssText=x,D.style.cssText=y,z.style.cssText=w,$.appendChild(E),D.appendChild(z),S.appendChild($),S.appendChild(D),_.appendChild(S),n.appendChild(_),c($,"scroll",T),c(D,"scroll",C),i(s).onExpandScroll=T,i(s).onShrinkScroll=C}else f("Aborting because element has been uninstalled");function T(){i(s).onExpand&&i(s).onExpand()}function C(){i(s).onShrink&&i(s).onShrink()}}function E(){function o(e,n,i){var r=function(t){return u(t).childNodes[0]}(e),o=w(n),a=_(i);r.style.setProperty("width",o+"px",t.important?"important":""),r.style.setProperty("height",a+"px",t.important?"important":"")}function a(a){var c=s.offsetWidth,d=s.offsetHeight,u=c!==i(s).lastWidth||d!==i(s).lastHeight;f("Storing current size",c,d),v(s,c,d),n.add(0,(function(){if(u)if(i(s))if(l()){if(t.debug){var n=s.offsetWidth,a=s.offsetHeight;n===c&&a===d||e.warn(r.get(s),"Scroll: Size changed before updating detector elements.")}o(s,c,d)}else f("Aborting because element container has not been initialized");else f("Aborting because element has been uninstalled")})),n.add(1,(function(){i(s)?l()?S(s,c,d):f("Aborting because element container has not been initialized"):f("Aborting because element has been uninstalled")})),u&&a&&n.add(2,(function(){i(s)?l()?a():f("Aborting because element container has not been initialized"):f("Aborting because element has been uninstalled")}))}function l(){return!!i(s).container}function c(){f("notifyListenersIfNeeded invoked");var t=i(s);return void 0===i(s).lastNotifiedWidth&&t.lastWidth===t.startSize.width&&t.lastHeight===t.startSize.height?f("Not notifying: Size is the same as the start size, and there has been no notification yet."):t.lastWidth===t.lastNotifiedWidth&&t.lastHeight===t.lastNotifiedHeight?f("Not notifying: Size already notified"):(f("Current size not notified, notifying..."),t.lastNotifiedWidth=t.lastWidth,t.lastNotifiedHeight=t.lastHeight,void g(i(s).listeners,(function(t){t(s)})))}function d(){f("Scroll detected."),p(s)?f("Scroll event fired while unrendered. Ignoring..."):a(c)}if(f("registerListenersAndPositionElements invoked."),i(s)){i(s).onRendered=function(){if(f("startanimation triggered."),p(s))f("Ignoring since element is still unrendered...");else{f("Element rendered.");var t=u(s),e=h(s);0!==t.scrollLeft&&0!==t.scrollTop&&0!==e.scrollLeft&&0!==e.scrollTop||(f("Scrollbars out of sync. Updating detector elements..."),a(c))}},i(s).onExpand=d,i(s).onShrink=d;var m=i(s).style;o(s,m.width,m.height)}else f("Aborting because element has been uninstalled")}function D(){if(f("finalizeDomMutation invoked."),i(s)){var t=i(s).style;v(s,t.width,t.height),S(s,t.width,t.height)}else f("Aborting because element has been uninstalled")}function z(){d(s)}function T(){var t;f("Installing..."),i(s).listeners=[],t=m(),i(s).startSize={width:t.width,height:t.height},f("Element start size",i(s).startSize),n.add(0,b),n.add(1,$),n.add(2,E),n.add(3,D),n.add(4,z)}d||(d=s,s=t,t=null),t=t||{},f("Making detectable..."),!function(t){return!function(t){var e=t.getRootNode&&t.getRootNode().contains(t);return t===t.ownerDocument.body||t.ownerDocument.body.contains(t)||e}(t)||null===window.getComputedStyle(t)}(s)?T():(f("Element is detached"),k(),f("Waiting until element is attached..."),i(s).onRendered=function(){f("Element is now attached"),T()})},addListener:function(t,e){if(!i(t).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");i(t).listeners.push(e)},uninstall:function(t){var e=i(t);e&&(e.onExpandScroll&&d(u(t),"scroll",e.onExpandScroll),e.onShrinkScroll&&d(h(t),"scroll",e.onShrinkScroll),e.onAnimationStart&&d(e.container,"animationstart",e.onAnimationStart),e.container&&t.removeChild(e.container))},initDocument:s}},b=l.forEach;function v(t){return Array.isArray(t)||void 0!==t.length}function y(t){if(Array.isArray(t))return t;var e=[];return b(t,(function(t){e.push(t)})),e}function x(t){return t&&1===t.nodeType}var w=function(t){var e,n;if((t=t||{}).idHandler)e={get:function(e){return t.idHandler.get(e,!0)},set:t.idHandler.set};else{var i=function(t){var e=t.idGenerator,n=t.stateHandler.getState;return{get:function(t){var e=n(t);return e&&void 0!==e.id?e.id:null},set:function(t){var i=n(t);if(!i)throw new Error("setId required the element to have a resize detection state.");var r=e.generate();return i.id=r,r}}}({idGenerator:(n=1,{generate:function(){return n++}}),stateHandler:p});e=i}var r=t.reporter;r||(r=function(t){function e(){}var n={log:e,warn:e,error:e};if(!t&&window.console){var i=function(t,e){t[e]=function(){var t=console[e];if(t.apply)t.apply(console,arguments);else for(var n=0;n<arguments.length;n++)t(arguments[n])}};i(n,"log"),i(n,"warn"),i(n,"error")}return n}(!1===r));var o=_(t,"batchProcessor",u({reporter:r})),a={};a.callOnAdd=!!_(t,"callOnAdd",!0),a.debug=!!_(t,"debug",!1);var s,l=function(t){var e={};function n(n){var i=t.get(n);return void 0===i?[]:e[i]||[]}return{get:n,add:function(n,i){var r=t.get(n);e[r]||(e[r]=[]),e[r].push(i)},removeListener:function(t,e){for(var i=n(t),r=0,o=i.length;r<o;++r)if(i[r]===e){i.splice(r,1);break}},removeAllListeners:function(t){var e=n(t);e&&(e.length=0)}}}(e),d=function(t){var e=t.stateHandler.getState;return{isDetectable:function(t){var n=e(t);return n&&!!n.isDetectable},markAsDetectable:function(t){e(t).isDetectable=!0},isBusy:function(t){return!!e(t).busy},markBusy:function(t,n){e(t).busy=!!n}}}({stateHandler:p}),h=_(t,"strategy","object"),f=_(t,"important",!1),g={reporter:r,batchProcessor:o,stateHandler:p,idHandler:e,important:f};if("scroll"===h&&(c.isLegacyOpera()?(r.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),h="object"):c.isIE(9)&&(r.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),h="object")),"scroll"===h)s=m(g);else{if("object"!==h)throw new Error("Invalid strategy name: "+h);s=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,i=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function r(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function o(t){return i(t).object}return{makeDetectable:function(t,o,a){a||(a=o,o=t,t=null),(t=t||{}).debug,c.isIE(8)?a(o):function(o,a){var s=r(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),l=!1,d=window.getComputedStyle(o),u=o.offsetWidth,h=o.offsetHeight;function f(){function n(){if("static"===d.position){o.style.setProperty("position","relative",t.important?"important":"");var n=function(e,n,i,r){var o=i[r];"auto"!==o&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(o)&&(e.warn("An element that is positioned static has style."+r+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+r+" will be set to 0. Element: ",n),n.style.setProperty(r,"0",t.important?"important":""))};n(e,o,d,"top"),n(e,o,d,"right"),n(e,o,d,"bottom"),n(e,o,d,"left")}}""!==d.position&&(n(),l=!0);var r=document.createElement("object");r.style.cssText=s,r.tabIndex=-1,r.type="text/html",r.setAttribute("aria-hidden","true"),r.onload=function(){l||n(),function t(e,n){if(!e.contentDocument){var r=i(e);return r.checkForObjectDocumentTimeoutId&&window.clearTimeout(r.checkForObjectDocumentTimeoutId),void(r.checkForObjectDocumentTimeoutId=setTimeout((function(){r.checkForObjectDocumentTimeoutId=0,t(e,n)}),100))}n(e.contentDocument)}(this,(function(t){a(o)}))},c.isIE()||(r.data="about:blank"),i(o)&&(o.appendChild(r),i(o).object=r,c.isIE()&&(r.data="about:blank"))}i(o).startSize={width:u,height:h},n?n.add(f):f()}(o,a)},addListener:function(t,e){function n(){e(t)}if(c.isIE(8))i(t).object={proxy:n},t.attachEvent("onresize",n);else{var r=o(t);if(!r)throw new Error("Element is not detectable by this strategy.");r.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(t){if(i(t)){var e=o(t);e&&(c.isIE(8)?t.detachEvent("onresize",e.proxy):t.removeChild(e),i(t).checkForObjectDocumentTimeoutId&&window.clearTimeout(i(t).checkForObjectDocumentTimeoutId),delete i(t).object)}}}}(g)}var w={};return{listenTo:function(t,n,i){function o(t){var e=l.get(t);b(e,(function(e){e(t)}))}function c(t,e,n){l.add(e,n),t&&n(e)}if(i||(i=n,n=t,t={}),!n)throw new Error("At least one element required.");if(!i)throw new Error("Listener required.");if(x(n))n=[n];else{if(!v(n))return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=y(n)}var u=0,h=_(t,"callOnAdd",a.callOnAdd),g=_(t,"onReady",(function(){})),m=_(t,"debug",a.debug);b(n,(function(t){p.getState(t)||(p.initState(t),e.set(t));var a=e.get(t);if(m&&r.log("Attaching listener to element",a,t),!d.isDetectable(t))return m&&r.log(a,"Not detectable."),d.isBusy(t)?(m&&r.log(a,"System busy making it detectable"),c(h,t,i),w[a]=w[a]||[],void w[a].push((function(){++u===n.length&&g()}))):(m&&r.log(a,"Making detectable..."),d.markBusy(t,!0),s.makeDetectable({debug:m,important:f},t,(function(t){if(m&&r.log(a,"onElementDetectable"),p.getState(t)){d.markAsDetectable(t),d.markBusy(t,!1),s.addListener(t,o),c(h,t,i);var e=p.getState(t);if(e&&e.startSize){var l=t.offsetWidth,f=t.offsetHeight;e.startSize.width===l&&e.startSize.height===f||o(t)}w[a]&&b(w[a],(function(t){t()}))}else m&&r.log(a,"Element uninstalled before being detectable.");delete w[a],++u===n.length&&g()})));m&&r.log(a,"Already detecable, adding listener."),c(h,t,i),u++})),u===n.length&&g()},removeListener:l.removeListener,removeAllListeners:l.removeAllListeners,uninstall:function(t){if(!t)return r.error("At least one element is required.");if(x(t))t=[t];else{if(!v(t))return r.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=y(t)}b(t,(function(t){l.removeAllListeners(t),s.uninstall(t),p.cleanState(t)}))},initDocument:function(t){s.initDocument&&s.initDocument(t)}}};function _(t,e,n){var i=t[e];return null==i&&void 0!==n?n:i}function S(t){return null!=t}function k(t,e){return Array(t).fill().map(e||function(t,e){return e})}let $;var E,D={name:"TnRenderCell",functional:!0,props:{row:Object,index:Number,column:{type:Object,default:null}},render:(t,e)=>e.props.column.render.call(null,t,e.props)};const z=(null==e||null===(E=e.Table)||void 0===E?void 0:E.props)||{data:{type:Array,default:function(){return[]}}},T=["columns","emptyCellValue","autoHeight"];var C={name:"TnELtable",components:{TnRenderCell:D},props:{...z,columns:{type:Array,default:()=>[]},emptyCellValue:{type:String,default:"--"},autoHeight:{type:Boolean,default:!0}},data:()=>({tableHeight:200}),computed:{fromParentVmTableProps(){return Object.keys(this.$props).reduce(((t,e)=>(T.includes(e)||(t[e]=this[e]),t)),{})},tableProps(){return{...this.fromParentVmTableProps,...this.autoHeight?{height:this.tableHeight}:{}}}},watch:{columns:{handler(t,e){this.$nextTick((()=>{this.tableVm.doLayout()}))}},data:{handler(t,e){this.$nextTick((()=>{this.tableVm.$refs.bodyWrapper.scrollTo(0,0)}))}}},mounted(){this.detectParantNodeResize(),this.tableVm=this.$refs.table},methods:{getCellValue(t,e){const{caption:n,prop:i}=e;return S(n)?"function"==typeof n?n(t):t[n]||n:t[i]},getNoEmptyCellValue(t,e){const n=this.getCellValue(t,e);return S(n)?n:this.emptyCellValue},buttonClick(t,e,n){this.$emit("button-click",t,e,n)},getAutoHeight(t){const e=this.getStyle(t,"paddingTop"),n=this.getStyle(t,"paddingBottom"),i=Array.from(t.children).reduce(((t,e)=>e.classList.contains("el-table")||null!=e&&e.getAttribute("aria-hidden")?t:t+e.clientHeight),0);this.$nextTick((()=>{this.tableHeight=t.clientHeight-(e+n+i)+"px"}))},getStyle(t,e){const n=t.currentStyle?t.currentStyle[e].replace("px",""):document.defaultView.getComputedStyle(t,null)[e].replace("px","");return Number(n)},detectParantNodeResize(){const t=w(),e=this;t.listenTo(this.$el.parentNode,(function(t){window.ele=t,e.getAutoHeight(t)}))},getShowBtns:(t=[],e)=>t.filter((t=>!1==!!("function"==typeof t.hidden?t.hidden(e):t.hidden)))}};function H(t,e,n,i,r,o,a,s,l,c){"boolean"!=typeof a&&(l=s,s=a,a=!1);const d="function"==typeof n?n.options:n;let u;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,r&&(d.functional=!0)),i&&(d._scopeId=i),o?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},d._ssrRegister=u):e&&(u=a?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),u)if(d.functional){const t=d.render;d.render=function(e,n){return u.call(n),t(e,n)}}else{const t=d.beforeCreate;d.beforeCreate=t?[].concat(t,u):[u]}return n}n("");const A=C;var M=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-table",t._g(t._b({ref:"table"},"el-table",t.tableProps,!1),t.$listeners),[t._l(t.columns,(function(e){return[e.type?[["index","selection","expand"].includes(e.type)?[n("el-table-column",t._b({key:e.key},"el-table-column",e,!1))]:"button"===e.type?[n("el-table-column",t._b({key:e.key,scopedSlots:t._u([{key:"default",fn:function(i){return[t._l(t.getShowBtns(e.buttons,i.row),(function(e){return n("el-button",t._b({key:e.key,on:{click:function(n){return t.buttonClick(e.key,i.$index,i.row)}}},"el-button",e,!1),[t._v("\n "+t._s(e.caption)+"\n ")])})),t._v(" "),t.getShowBtns(e.buttons,i.row).length?t._e():[t._v("\n "+t._s(e.emptyCellValue||t.emptyCellValue)+"\n ")]]}}],null,!0)},"el-table-column",e,!1))]:t._e()]:[n("el-table-column",t._b({key:e.key,scopedSlots:t._u([{key:"default",fn:function(i){return[e.render?n("tn-render-cell",{attrs:{row:i.row,column:e,index:i.$index}}):[t._v("\n "+t._s(t.getNoEmptyCellValue(i.row,e))+"\n ")]]}}],null,!0)},"el-table-column",e,!1))]]})),t._v(" "),t._t("default")],2)};M._withStripped=!0;const L=H({render:M,staticRenderFns:[]},undefined,A,undefined,false,undefined,!1,void 0,void 0,void 0);n(".tn-flex-box{position:relative;display:flex;align-items:stretch}.tn-flex-box[direction=column]{flex-direction:column}.tn-flex-box[direction=row-reverse]{flex-direction:row-reverse}.tn-flex-box[direction=column-reverse]{flex-direction:column-reverse}.tn-flex-box[inline]{display:inline-flex}.tn-flex-box[flex-wrap]{flex-wrap:wrap;align-content:flex-start}.tn-flex-box[justify-content=center]{justify-content:center}.tn-flex-box[align-items=flex-start]{align-items:flex-start}.tn-flex-box[align-items=center]{align-items:center}.tn-flex-box[align-items=stretch]{align-items:stretch}.tn-flex-box[flex-center]{align-items:center;justify-content:center}.tn-flex-box>*{position:relative;box-sizing:border-box}.tn-flex-box>[flex-auto]{flex:1 1 auto!important}.tn-flex-box>[flex-none]{flex:0 0 none!important}.tn-flex-box>[align-self=center]{align-self:center}.tn-flex-box>[align-self=stretch]{align-self:stretch}.tn-flex-box>[size=auto]{flex:1 1 auto}.tn-flex-box>[size='1']{flex:1 1 1px}.tn-flex-box>[size='2']{flex:2 2 2px}.tn-flex-box>[size='3']{flex:3 3 3px}.tn-flex-box>[size='4']{flex:4 4 4px}.tn-flex-box>[size='5']{flex:5 5 5px}.tn-flex-box>[size='6']{flex:6 6 6px}.tn-flex-box>[size='7']{flex:7 7 7px}.tn-flex-box>[size='8']{flex:8 8 8px}.tn-absolute-fit{position:absolute;top:0;left:0;right:0;bottom:0}.tn-no-flex{flex:0 0 auto}:is(table)[cell-spacing],:is(table)[cellspacing]{margin:0}:is(table)[cell-padding],:is(table)[cellpadding]{padding:0}[cell-spacing],[cellspacing]{margin:8px}[cell-padding],[cellpadding]{padding:8px}[cell-padding]>.tn-absolute-fit,[cellpadding]>.tn-absolute-fit{top:8px;left:8px;right:8px;bottom:8px}[content-spacing]{padding:8px}[content-spacing]>div{margin:8px}[content-spacing]>.tn-absolute-fit{top:16px;left:16px;right:16px;bottom:16px}[content-spacing=along][direction=row-reverse],[content-spacing=along][direction=row]{padding:0 8px}[content-spacing=along][direction=row-reverse]>div,[content-spacing=along][direction=row]>div{margin:0 8px}[content-spacing=along][direction=row-reverse]>.tn-absolute-fit,[content-spacing=along][direction=row]>.tn-absolute-fit{top:0;bottom:0}[content-spacing=along][direction=column-reverse],[content-spacing=along][direction=column]{padding:8px 0}[content-spacing=along][direction=column-reverse]>div,[content-spacing=along][direction=column]>div{margin:8px 0}[content-spacing=along][direction=column-reverse]>.tn-absolute-fit,[content-spacing=along][direction=column]>.tn-absolute-fit{left:0;right:0}[content-spacing=between]{padding:0}[content-spacing=between][direction=row-reverse]>div,[content-spacing=between][direction=row]>div{margin:0 8px}[content-spacing=between][direction=row]>div:first-child{margin-left:0}[content-spacing=between][direction=row]>div:last-child{margin-right:0}[content-spacing=between][direction=row-reverse]>div:first-child{margin-right:0}[content-spacing=between][direction=row-reverse]>div:last-child{margin-left:0}[content-spacing=between][direction=column-reverse]>div,[content-spacing=between][direction=column]>div{margin:8px 0}[content-spacing=between][direction=column]>div:first-child{margin-top:0}[content-spacing=between][direction=column]>div:last-child{margin-bottom:0}[content-spacing=between][direction=column-reverse]>div:first-child{margin-bottom:0}[content-spacing=between][direction=column-reverse]>div:last-child{margin-top:0}[content-spacing=between]>div.tn-absolute-fit{top:0;left:0;right:0;bottom:0}");const O={name:"TinyFlexItem",inject:{parentLayout:{default:"row"}},props:{size:{type:[Number,String],validator:t=>void 0===t||/^([1-8]|auto|([1-9]\d*(px|%)))$/.test(t)}},computed:{sizeValue(){var t;return this.size||(null===(t=this.$el)||void 0===t?void 0:t.getAttribute("size"))},sizeUnit(){const t=String(this.sizeValue);return t.indexOf("%")>-1?"%":t.indexOf("px")>-1?"px":null}},watch:{size(){this.setItemAttributes()},parentLayout(){this.setItemAttributes()}},mounted(){const{width:t,height:e}=Object(this.$el.style);this.flexItemOriginStyles={width:t,height:e},this.setItemAttributes()},methods:{setItemAttributes(){const{$el:t,sizeValue:e,sizeUnit:n}=this;t&&(!e||n?t.removeAttribute("size"):e&&t.setAttribute("size",e),Object.assign(t.style,this.flexItemOriginStyles,n?{["column"===this.parentLayout?"height":"width"]:e}:void 0))}}};var P=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",[t._t("default")],2)};P._withStripped=!0;const N=H({render:P,staticRenderFns:[]},undefined,O,undefined,false,undefined,!1,void 0,void 0,void 0);const W={name:"TinyFlexBox",extends:N,provide(){return{parentLayout:this.flexLayout}},props:{flexWrap:Boolean,layout:{type:String,validator:t=>-1!==["flow","column","row"].indexOf(t)},direction:{type:String,default:"row",validator:t=>-1!==["row","column"].indexOf(t)}},computed:{flexLayout(){var t,e;const n=this.layout||(null===(t=this.$el)||void 0===t?void 0:t.getAttribute("layout"))||this.direction||(null===(e=this.$el)||void 0===e?void 0:e.getAttribute("direction"))||"row";return-1!==["flow","column","row"].indexOf(n)?n:"row"},flexDirection(){return"column"===this.flexLayout?"column":"row"}},watch:{layout(t){this.setBoxAttributes()}},mounted(){this.setBoxAttributes()},methods:{setBoxAttributes(){const{$el:t,flexLayout:e,flexDirection:n,flexWrap:i}=this;t&&(t.setAttribute("direction",n),("flow"===e||i)&&t.setAttribute("flex-wrap",""))}}};var I=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"tn-flex-box"},[t._t("default")],2)};I._withStripped=!0;const R=H({render:I,staticRenderFns:[]},undefined,W,undefined,false,undefined,!1,void 0,void 0,void 0);var j={name:"TinyHBox",extends:R,props:["layout","direction"],computed:{flexLayout:()=>"row"}},B={name:"TinyVBox",extends:R,props:["layout","direction"],computed:{flexLayout:()=>"column"}};n(".tn-space{flex:1 1 0%}[direction=row][flex-wrap]>.tn-space{flex:none;width:100%}");const V={name:"TinySpace",extends:N,computed:{flexStyle(){return this.size?"none":void 0}}};var F=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"tn-space",style:{flex:t.flexStyle}})};F._withStripped=!0;const Y=H({render:F,staticRenderFns:[]},undefined,V,undefined,false,undefined,!1,void 0,void 0,void 0);function U(t,e){const{offsetWidth:n=0,offsetHeight:i=0}=Object(t),{offsetWidth:r=0,offsetHeight:o=0}=Object(e);return{maxWidth:n+r,maxHeight:i+o}}n(".tn-splitter{position:relative;background:#e0e0e0;border-radius:1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tn-splitter[draggable]>div{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;border-radius:8px;background:rgba(0,0,0,.01)}.tn-splitter[draggable]>div:hover{background:#d6d6d6}.tn-splitter:first-child,.tn-splitter:last-child{display:none}[direction=row]>.tn-splitter{width:1px;margin-left:0;margin-right:0}[direction=row]>.tn-splitter[draggable]{cursor:col-resize}[direction=row]>.tn-splitter[draggable]>div:hover{left:-1px;right:-1px}[direction=column]>.tn-splitter[draggable]{height:1px;margin-top:0;margin-bottom:0}[direction=column]>.tn-splitter[draggable][draggable]{cursor:row-resize}[direction=column]>.tn-splitter[draggable][draggable]>div:hover{top:-1px;bottom:-1px}[cell-padding]>.tn-splitter,[cellpadding]>.tn-splitter{margin:8px}");const X={name:"TinySplitter",props:{draggable:{type:Boolean,default:!0}},computed:{parentDirection(){return this.$parent.flexDirection||"row"}},methods:{onDragStart(t){if(!this.draggable)return;const e=function(t,e){const n=function(t,e){return t&&!t.getAttribute("size")?t:e&&!e.getAttribute("size")?e:null}(t,e);return n?{el:n,reverse:n===e,startWidth:n.offsetWidth,startHeight:n.offsetHeight,...U(t,e)}:null}(this.$el.previousElementSibling,this.$el.nextElementSibling);e&&(this.initialState={direction:this.parentDirection,startX:t.pageX,startY:t.pageY,...e},window.addEventListener("mousemove",this.onDragMove),window.addEventListener("mouseup",this.onDragEnd),this.initialState.resized&&this.$emit("resizestart"))},onDragMove(t){this.draggable&&function({el:t,direction:e,reverse:n,startWidth:i,startHeight:r,maxWidth:o,maxHeight:a,startX:s,startY:l,x:c,y:d}){if("row"===e){const e=i+(n?s-c:c-s);if(e>=50&&e<o-100)return t.style.width=e+"px",!0}else{const e=r+(n?l-d:d-l);if(e>=50&&e<a-100)return t.style.height=e+"px",!0}}({...this.initialState,x:t.pageX,y:t.pageY})&&(this.initialState.resized=!0,this.$emit("resize"))},onDragEnd(t){this.draggable&&(window.removeEventListener("mousemove",this.onDragMove),window.removeEventListener("mouseup",this.onDragEnd),this.initialState.resized&&this.$emit("resizeend"))}}};var q=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tn-splitter",attrs:{draggable:t.draggable}},[n("div",{on:{mousedown:t.onDragStart}})])};q._withStripped=!0;const J=H({render:q,staticRenderFns:[]},undefined,X,undefined,false,undefined,!1,void 0,void 0,void 0);function Z(t){return isFinite(+t)?+t+"px":t}const G={width:"auto",height:"auto",transitionDuration:"250ms",transitionProperty:"all"};var Q={name:"TinyStretchWrapper",props:{width:{type:[String,Number],default:"auto"},height:{type:[String,Number],default:"auto"},switchPostion:{type:String,default:"right",validator:t=>["left","right","top","bottom"].includes(t)},switchExpandedStyle:{type:Object,default:()=>({})}},data:()=>({isExpanded:!0,stretchWrapperStyle:{width:"auto",height:"auto"},slotsWrapperStyle:{}}),computed:{isHorizontal(){return["left","right"].includes(this.switchPostion)},isVertical(){return["top","bottom"].includes(this.switchPostion)},switchDirection(){const{switchPostion:t,isExpanded:e}=this;switch(t){case"right":return["right","left"][Number(e)];case"left":return["left","right"][Number(e)];case"top":return["bottom","top"][Number(e)];case"bottom":return["top","bottom"][Number(e)];default:return""}},foldDirection(){return this.getReversePostion(this.switchDirection)},switchStyle(){const{switchPostion:t,switchExpandedStyle:e,isExpanded:n}=this;return{...this.isHorizontal?{top:"50%",transform:"translateY(-50%)",[t]:"-30px",...n?e:{[t]:"-30px"}}:{},...this.isVertical?{left:"50%",transform:"translateX(-50%)",[t]:"-30px",...n?e:{[t]:"auto",[this.getReversePostion(t)]:"-30px"}}:{}}}},watch:{width(){this.updateWrapperStyle()},height(){this.updateWrapperStyle()},isExpanded(){this.updateWrapperStyle()}},created(){this.updateWrapperStyle()},methods:{getReversePostion(t){switch(t){case"right":return"left";case"left":return"right";case"top":return"bottom";case"bottom":return"top";default:return""}},updateWrapperStyle(){this.isExpanded?this.stretchWrapperStyle={...G,width:Z(this.width),height:Z(this.height)}:setTimeout((()=>{const{clientWidth:t,clientHeight:e}=this.$refs.stretchWrapper;this.stretchWrapperStyle={...G,transitionProperty:"none",borderWidth:0,...this.isHorizontal?{width:0,height:Z(e),transform:`translateX(${"left"===this.switchPostion?Z(t):"-100%"})`}:{width:Z(t),height:0,transform:`translateY(${"bottom"===this.switchPostion?Z(e):"-100%"})`}}}),300)}}};n(".tn-stretch-wrapper[data-v-ae29d62a]{position:relative;transition:all .25s ease-in-out}.tn-stretch-wrapper.is-fold[fold-direction=left][data-v-ae29d62a]{transform:translateX(-100%)}.tn-stretch-wrapper.is-fold[fold-direction=right][data-v-ae29d62a]{transform:translateX(100%)}.tn-stretch-wrapper.is-fold[fold-direction=top][data-v-ae29d62a]{transform:translateY(-100%)}.tn-stretch-wrapper.is-fold[fold-direction=bottom][data-v-ae29d62a]{transform:translateY(100%)}.tn-stretch-wrapper__slots-wrapper[data-v-ae29d62a]{overflow:hidden;width:100%;height:100%}.tn-stretch-wrapper .switch-icon-wrapper[data-v-ae29d62a]{position:absolute;z-index:9999;font-size:25px;cursor:pointer;transition:all .25s ease-in-out}.tn-stretch-wrapper .switch-icon-wrapper .switch-icon[data-v-ae29d62a]{display:block}.tn-stretch-wrapper .switch-icon-wrapper .switch-icon[direction=left][data-v-ae29d62a]{transform:rotateY(180deg)}.tn-stretch-wrapper .switch-icon-wrapper .switch-icon[direction=top][data-v-ae29d62a]{transform:rotate(-90deg)}.tn-stretch-wrapper .switch-icon-wrapper .switch-icon[direction=bottom][data-v-ae29d62a]{transform:rotate(90deg)}");const K=Q;var tt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{ref:"stretchWrapper",staticClass:"tn-stretch-wrapper tn-flex-box",class:{"is-fold":!t.isExpanded},style:t.stretchWrapperStyle,attrs:{"fold-direction":t.foldDirection,"justify-content":"center","align-items":"center"}},[n("div",{staticClass:"switch-icon-wrapper",style:t.switchStyle,on:{click:function(e){t.isExpanded=!t.isExpanded}}},[n("span",{staticClass:"switch-icon",attrs:{direction:t.switchDirection}},[t._t("arrow-right-icon"),t._v(" "),t.$slots["arrow-right-icon"]?t._e():n("el-icon",{staticClass:"el-icon-d-arrow-right"})],2)]),t._v(" "),n("div",{staticClass:"tn-stretch-wrapper__slots-wrapper",attrs:{size:1}},[t._t("default")],2)])])};tt._withStripped=!0;const et=H({render:tt,staticRenderFns:[]},undefined,K,"data-v-ae29d62a",false,undefined,!1,void 0,void 0,void 0);var nt=s((function(t,e){t.exports=function(){var t=1e3,e=6e4,n=36e5,i="millisecond",r="second",o="minute",a="hour",s="day",l="week",c="month",d="quarter",u="year",h="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},b=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},v={s:b,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+b(i,2,"0")+":"+b(r,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var i=12*(n.year()-e.year())+(n.month()-e.month()),r=e.clone().add(i,c),o=n-r<0,a=e.clone().add(i+(o?-1:1),c);return+(-(i+(n-r)/(o?r-a:a-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:u,w:l,d:s,D:h,h:a,m:o,s:r,ms:i,Q:d}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",x={};x[y]=m;var w=function(t){return t instanceof $},_=function t(e,n,i){var r;if(!e)return y;if("string"==typeof e){var o=e.toLowerCase();x[o]&&(r=o),n&&(x[o]=n,r=o);var a=e.split("-");if(!r&&a.length>1)return t(a[0])}else{var s=e.name;x[s]=e,r=s}return!i&&r&&(y=r),r||!i&&y},S=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new $(n)},k=v;k.l=_,k.i=w,k.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var $=function(){function m(t){this.$L=_(t.locale,null,!0),this.parse(t)}var b=m.prototype;return b.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(k.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(p);if(i){var r=i[2]-1||0,o=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},b.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},b.$utils=function(){return k},b.isValid=function(){return!(this.$d.toString()===f)},b.isSame=function(t,e){var n=S(t);return this.startOf(e)<=n&&n<=this.endOf(e)},b.isAfter=function(t,e){return S(t)<this.startOf(e)},b.isBefore=function(t,e){return this.endOf(e)<S(t)},b.$g=function(t,e,n){return k.u(t)?this[e]:this.set(n,t)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(t,e){var n=this,i=!!k.u(e)||e,d=k.p(t),f=function(t,e){var r=k.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return i?r:r.endOf(s)},p=function(t,e){return k.w(n.toDate()[t].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},g=this.$W,m=this.$M,b=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case u:return i?f(1,0):f(31,11);case c:return i?f(1,m):f(0,m+1);case l:var y=this.$locale().weekStart||0,x=(g<y?g+7:g)-y;return f(i?b-x:b+(6-x),m);case s:case h:return p(v+"Hours",0);case a:return p(v+"Minutes",1);case o:return p(v+"Seconds",2);case r:return p(v+"Milliseconds",3);default:return this.clone()}},b.endOf=function(t){return this.startOf(t,!1)},b.$set=function(t,e){var n,l=k.p(t),d="set"+(this.$u?"UTC":""),f=(n={},n[s]=d+"Date",n[h]=d+"Date",n[c]=d+"Month",n[u]=d+"FullYear",n[a]=d+"Hours",n[o]=d+"Minutes",n[r]=d+"Seconds",n[i]=d+"Milliseconds",n)[l],p=l===s?this.$D+(e-this.$W):e;if(l===c||l===u){var g=this.clone().set(h,1);g.$d[f](p),g.init(),this.$d=g.set(h,Math.min(this.$D,g.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},b.set=function(t,e){return this.clone().$set(t,e)},b.get=function(t){return this[k.p(t)]()},b.add=function(i,d){var h,f=this;i=Number(i);var p=k.p(d),g=function(t){var e=S(f);return k.w(e.date(e.date()+Math.round(t*i)),f)};if(p===c)return this.set(c,this.$M+i);if(p===u)return this.set(u,this.$y+i);if(p===s)return g(1);if(p===l)return g(7);var m=(h={},h[o]=e,h[a]=n,h[r]=t,h)[p]||1,b=this.$d.getTime()+i*m;return k.w(b,this)},b.subtract=function(t,e){return this.add(-1*t,e)},b.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var i=t||"YYYY-MM-DDTHH:mm:ssZ",r=k.z(this),o=this.$H,a=this.$m,s=this.$M,l=n.weekdays,c=n.months,d=function(t,n,r,o){return t&&(t[n]||t(e,i))||r[n].slice(0,o)},u=function(t){return k.s(o%12||12,t,"0")},h=n.meridiem||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:k.s(s+1,2,"0"),MMM:d(n.monthsShort,s,c,3),MMMM:d(c,s),D:this.$D,DD:k.s(this.$D,2,"0"),d:String(this.$W),dd:d(n.weekdaysMin,this.$W,l,2),ddd:d(n.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(o),HH:k.s(o,2,"0"),h:u(1),hh:u(2),a:h(o,a,!0),A:h(o,a,!1),m:String(a),mm:k.s(a,2,"0"),s:String(this.$s),ss:k.s(this.$s,2,"0"),SSS:k.s(this.$ms,3,"0"),Z:r};return i.replace(g,(function(t,e){return e||p[t]||r.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(i,h,f){var p,g=k.p(h),m=S(i),b=(m.utcOffset()-this.utcOffset())*e,v=this-m,y=k.m(this,m);return y=(p={},p[u]=y/12,p[c]=y,p[d]=y/3,p[l]=(v-b)/6048e5,p[s]=(v-b)/864e5,p[a]=v/n,p[o]=v/e,p[r]=v/t,p)[g]||v,f?y:k.a(y)},b.daysInMonth=function(){return this.endOf(c).$D},b.$locale=function(){return x[this.$L]},b.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=_(t,e,!0);return i&&(n.$L=i),n},b.clone=function(){return k.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},m}(),E=$.prototype;return S.prototype=E,[["$ms",i],["$s",r],["$m",o],["$H",a],["$W",s],["$M",c],["$y",u],["$D",h]].forEach((function(t){E[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),S.extend=function(t,e){return t.$i||(t(e,$,S),t.$i=!0),S},S.locale=_,S.isDayjs=w,S.unix=function(t){return S(1e3*t)},S.en=x[y],S.Ls=x,S.p={},S}()})),it={name:"TinyVisualUiPlayerSwitch",model:{prop:"value",event:"change"},props:{value:{type:Boolean,default:!1}},data:()=>({curValue:!1}),computed:{playerSwitchIconClass(){return"el-icon-video-"+(this.curValue?"pause":"play")}},watch:{value:{handler(t){this.curValue=t},immediate:!0},curValue(t){this.$emit("change",t)}},methods:{clickHandler(){this.curValue=!this.curValue}}};n("");const rt=it;var ot=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("i",{staticClass:"player-switch",class:t.playerSwitchIconClass,on:{click:t.clickHandler}})])};ot._withStripped=!0;var at={name:"TinyVisualUiTimeAxisPlayBar",components:{HBox:j,VBox:B,playerSwitch:H({render:ot,staticRenderFns:[]},undefined,rt,undefined,false,undefined,!1,void 0,void 0,void 0)},props:{visible:{type:Boolean,default:!1},rangeStart:Date,rangeEnd:Date,selectMode:{type:String,default:"date",validator:t=>-1!==["date"].indexOf(t)},autoPlaySpeed:{type:Number,default:2e3}},data:()=>({dataRow:[],hourLabelRow:k(7,((t,e)=>3*(e+1))),hourRow:k(24),curRangeStart:null,curRangeEnd:null,playingDate:null,playing:!1,loopPlayPromise:null}),watch:{rangeStart:{handler(){this.updateDateRows()},immediate:!0},rangeEnd:{handler(){this.updateDateRows()},immediate:!0}},methods:{loopPlay(){var t,e;this.loopPlayPromise=(t=()=>{this.playNextHour(),this.playing&&!this.playingDate.isAfter(this.curRangeEnd)&&this.loopPlay()},e=this.autoPlaySpeed,new Promise((n=>{$=setTimeout((function(){t(),n()}),e)})))},autoPlay(t){t?this.loopPlay():(this.playing=!1,function(t){clearTimeout($);const e=new Promise((function(t,e){e(new Error("the promise is aborted"))}));Promise.race([t,e]).then(console.log).catch((t=>{console.log(t)}))}(this.loopPlayPromise))},playNextHour(){this.playingDate=this.playingDate.add(1,"hour"),this.$emit("load-date",this.playingDate.toDate())},playTo(t){t?this.playingDate=nt(t):this.playNextHour()},updateDateRows(){if(this.dataRow=[],this.rangeStart||this.rangeEnd){var t;let e=this.rangeStart?nt(this.rangeStart):nt(this.rangeEnd).subtract(7,"day");e=nt(e.format("YYYY-MM-DD"));const n=this.rangeEnd?nt(this.rangeEnd):nt(e).add(8,"day").subtract(1,"second");for(this.curRangeStart=e.clone(),(!this.playingDate||null!==(t=this.playingDate)&&void 0!==t&&t.isAfter(n))&&(this.playingDate=e.clone()),this.curRangeEnd=n;!e.isAfter(n);)this.dataRow.push(e),e=e.add(1,"day")}},closeHandler(){this.$emit("update:visible",!1),this.autoPlay(!1)},hourMarkerIsPlayed(t,e){return this.playingDate.isAfter(t.add(e,"hour"))},hourMarkerIsPlaying(t,e){return this.playingDate.isSame(t.add(e,"hour"))},hourMarkerIsHide(t,e){return!this.curRangeEnd.isAfter(t.add(e,"hour"))},clickMark(t,e){this.playTo(t.add(e,"hour"))}}};n(".time-axis-player{position:relative;font-size:14px;line-height:1.5;color:#e8e8e8}.time-axis-player .mock-mark{height:.5em;background:#1890ff;background:var(--tn-primary-color)}.time-axis-player .player-switch{padding-top:4px;padding-left:8px;padding-right:8px;font-size:2em;color:#1890ff;color:var(--tn-primary-color);cursor:pointer}.time-axis-player .player-switch.is-disabled{color:var(--tn-normal-disabled-text-color)}.time-axis-player__close-button{position:absolute;left:4px;top:-20px;z-index:1000;font-size:20px;cursor:pointer}.time-axis-player__axis-items{background-color:rgba(11,28,51,.7)}.time-axis-player__axis-item{min-width:120px;border-color:#fff;border-style:solid;border-left-width:1px;border-right-width:0;border-top-width:0;border-bottom-width:0;text-align:center}.time-axis-player__axis-item:last-child{border-right-width:1px}.time-axis-player__axis-hour-labels-wrapper+div{border-top:1px solid #fff}.time-axis-player__axis-hour-labels{width:90%}.time-axis-player__axis-hour-item{minWidth:'16px'}.time-axis-player__axis-hour-item__label{minWidth:18px}.time-axis-player__axis-hour-item__mark{height:.5em;background:#ddd;cursor:pointer}.time-axis-player__axis-hour-item__mark:nth-of-type(3n){border-right:1px solid #fff}.time-axis-player__axis-hour-item__mark:last-child{border-right:none!important}.time-axis-player__axis-hour-item__mark.is-played,.time-axis-player__axis-hour-item__mark.is-playing{background:#1890ff;background:var(--tn-primary-color)}.time-axis-player__axis-hour-item__mark.is-hide{background:0 0;cursor:auto;border-right:none!important}");const st=at;var lt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h-box",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"time-axis-player"},[n("v-box",{staticClass:"player-switch-wrapper"},[n("div",{staticClass:"mock-mark"}),t._v(" "),n("player-switch",{class:{"is-disabled":!t.dataRow.length},attrs:{color:"red"},on:{change:t.autoPlay},model:{val