Files
ai/charting_library/bundles/7678.2a02d7fc5a1d8b8dff1f.js
2023-02-02 13:31:14 +00:00

9 lines
26 KiB
JavaScript

(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7678],{52014:()=>{},69445:()=>{},99158:t=>{t.exports={wrapper:"wrapper-BaEDTGCd",touch:"touch-BaEDTGCd"}},13398:function(t,e){var i,s,n,o;o=function(t){var e=Object.prototype.toString,i=Array.isArray||function(t){return"[object Array]"===e.call(t)};function s(t){return"function"==typeof t}function n(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function o(t,e){return null!=t&&"object"==typeof t&&e in t}var r=RegExp.prototype.test,a=/\S/;function h(t){return!function(t,e){return r.call(t,e)}(a,t)}var l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},p=/\s*/,c=/\s+/,d=/\s*=/,u=/\s*\}/,_=/#|\^|\/|>|\{|&|=|!/;function g(t){this.string=t,this.tail=t,this.pos=0}function f(t,e){this.view=t,this.cache={".":this.view},this.parent=e}function v(){this.cache={}}g.prototype.eos=function(){return""===this.tail},g.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return"";var i=e[0];return this.tail=this.tail.substring(i.length),this.pos+=i.length,i},g.prototype.scanUntil=function(t){var e,i=this.tail.search(t);switch(i){case-1:e=this.tail,this.tail="";break;case 0:e="";break;default:e=this.tail.substring(0,i),this.tail=this.tail.substring(i)}return this.pos+=e.length,e},f.prototype.push=function(t){return new f(t,this)},f.prototype.lookup=function(t){var e,i=this.cache;if(i.hasOwnProperty(t))e=i[t];else{for(var n,r,a=this,h=!1;a;){if(t.indexOf(".")>0)for(e=a.view,n=t.split("."),r=0;null!=e&&r<n.length;)r===n.length-1&&(h=o(e,n[r])),e=e[n[r++]];else e=a.view[t],h=o(a.view,t);if(h)break;a=a.parent}i[t]=e}return s(e)&&(e=e.call(this.view)),e},v.prototype.clearCache=function(){this.cache={}},v.prototype.parse=function(e,s){var o=this.cache,r=o[e];return null==r&&(r=o[e]=function(e,s){if(!e)return[];var o,r,a,l=[],f=[],v=[],m=!1,b=!1;function w(){if(m&&!b)for(;v.length;)delete f[v.pop()];else v=[];m=!1,b=!1}function y(t){if("string"==typeof t&&(t=t.split(c,2)),!i(t)||2!==t.length)throw new Error("Invalid tags: "+t);o=new RegExp(n(t[0])+"\\s*"),r=new RegExp("\\s*"+n(t[1])),a=new RegExp("\\s*"+n("}"+t[1]))}y(s||t.tags);for(var T,C,x,S,H,E,L=new g(e);!L.eos();){if(T=L.pos,x=L.scanUntil(o))for(var B=0,k=x.length;B<k;++B)h(S=x.charAt(B))?v.push(f.length):b=!0,f.push(["text",S,T,T+1]),T+=1,"\n"===S&&w();if(!L.scan(o))break;if(m=!0,C=L.scan(_)||"name",L.scan(p),"="===C?(x=L.scanUntil(d),L.scan(d),L.scanUntil(r)):"{"===C?(x=L.scanUntil(a),L.scan(u),L.scanUntil(r),C="&"):x=L.scanUntil(r),!L.scan(r))throw new Error("Unclosed tag at "+L.pos);if(H=[C,x,T,L.pos],f.push(H),"#"===C||"^"===C)l.push(H);else if("/"===C){if(!(E=l.pop()))throw new Error('Unopened section "'+x+'" at '+T);if(E[1]!==x)throw new Error('Unclosed section "'+E[1]+'" at '+T)}else"name"===C||"{"===C||"&"===C?b=!0:"="===C&&y(x)}if(E=l.pop())throw new Error('Unclosed section "'+E[1]+'" at '+L.pos);return function(t){for(var e,i=[],s=i,n=[],o=0,r=t.length;o<r;++o)switch((e=t[o])[0]){case"#":case"^":s.push(e),n.push(e),s=e[4]=[]
;break;case"/":n.pop()[5]=e[2],s=n.length>0?n[n.length-1][4]:i;break;default:s.push(e)}return i}(function(t){for(var e,i,s=[],n=0,o=t.length;n<o;++n)(e=t[n])&&("text"===e[0]&&i&&"text"===i[0]?(i[1]+=e[1],i[3]=e[3]):(s.push(e),i=e));return s}(f))}(e,s)),r},v.prototype.render=function(t,e,i){var s=this.parse(t),n=e instanceof f?e:new f(e);return this.renderTokens(s,n,i,t)},v.prototype.renderTokens=function(t,e,i,s){for(var n,o,r,a="",h=0,l=t.length;h<l;++h)r=void 0,"#"===(o=(n=t[h])[0])?r=this.renderSection(n,e,i,s):"^"===o?r=this.renderInverted(n,e,i,s):">"===o?r=this.renderPartial(n,e,i,s):"&"===o?r=this.unescapedValue(n,e):"name"===o?r=this.escapedValue(n,e):"text"===o&&(r=this.rawValue(n)),void 0!==r&&(a+=r);return a},v.prototype.renderSection=function(t,e,n,o){var r=this,a="",h=e.lookup(t[1]);if(h){if(i(h))for(var l=0,p=h.length;l<p;++l)a+=this.renderTokens(t[4],e.push(h[l]),n,o);else if("object"==typeof h||"string"==typeof h||"number"==typeof h)a+=this.renderTokens(t[4],e.push(h),n,o);else if(s(h)){if("string"!=typeof o)throw new Error("Cannot use higher-order sections without the original template");null!=(h=h.call(e.view,o.slice(t[3],t[5]),(function(t){return r.render(t,e,n)})))&&(a+=h)}else a+=this.renderTokens(t[4],e,n,o);return a}},v.prototype.renderInverted=function(t,e,s,n){var o=e.lookup(t[1]);if(!o||i(o)&&0===o.length)return this.renderTokens(t[4],e,s,n)},v.prototype.renderPartial=function(t,e,i){if(i){var n=s(i)?i(t[1]):i[t[1]];return null!=n?this.renderTokens(this.parse(n),e,i,n):void 0}},v.prototype.unescapedValue=function(t,e){var i=e.lookup(t[1]);if(null!=i)return i},v.prototype.escapedValue=function(e,i){var s=i.lookup(e[1]);if(null!=s)return t.escape(s)},v.prototype.rawValue=function(t){return t[1]},t.name="mustache.js",t.version="2.2.1",t.tags=["{{","}}"];var m=new v;t.clearCache=function(){return m.clearCache()},t.parse=function(t,e){return m.parse(t,e)},t.render=function(t,e,s){if("string"!=typeof t)throw new TypeError('Invalid template! Template should be a "string" but "'+(i(n=t)?"array":typeof n)+'" was given as the first argument for mustache#render(template, view, partials)');var n;return m.render(t,e,s)},t.to_html=function(e,i,n,o){var r=t.render(e,i,n);if(!s(o))return r;o(r)},t.escape=function(t){return String(t).replace(/[&<>"'`=\/]/g,(function(t){return l[t]}))},t.Scanner=g,t.Context=f,t.Writer=v},e&&"string"!=typeof e.nodeName?o(e):(s=[e],void 0===(n="function"==typeof(i=o)?i.apply(e,s):i)||(t.exports=n))},30812:(t,e,i)=>{"use strict";i.d(e,{SidebarCustomScroll:()=>d});var s=i(32563),n=i(2872),o=i.n(n),r=i(15828),a=i(59199),h=i(53364);const l=[()=>navigator.userAgent.includes("Win")&&navigator.userAgent.includes("Chrome")?1/window.devicePixelRatio:1,()=>16,(t=(()=>0))=>{var e;return.8*(null!==(e=t())&&void 0!==e?e:0)}];i(69445);var p=i(99158);const c={headerHeight:0,additionalClass:"",alwaysVisible:!1,showBottomShadow:!0,scrollMarginTop:1,bubbleScrollEvent:!1};class d{constructor(t,e,i={}){if(this.scrolled=new(o()),this.scrolltoend=new(o()),this.scrolltostart=new(o()),
this.visibilityCallbacks=[],this._scrollTargetTop=0,this._scrollSpeed=40,this._shadowOffset=10,this._shadowTop=null,this._shadowBottom=null,this._bottomFixed=!1,this._dragInitialized=!1,this._dragging=!1,this._draggable=null,this._atStart=!1,this._atEnd=!1,this._stickyBottom=null,this._tempIntervalID=void 0,this._animation=null,this._saved=null,this._options={...c,...i},this._wrapper=t,this._wrapper.classList.add(p.wrapper),this._content=e,this._headerHeight=this._options.headerHeight,this._scrollMarginTop=this._options.scrollMarginTop,this._scrollBar=document.createElement("div"),this._scrollBar.classList.add("sb-scrollbar","sb-scrollbar-body"),this._options.additionalClass&&this._scrollBar.classList.add(this._options.additionalClass),this._scrollBar.classList.toggle("active-always",this._options.alwaysVisible),this._scrollBarWrapper=document.createElement("div"),this._scrollBarWrapper.classList.add("sb-scrollbar-wrap"),this._touch=s.touch,this._touch)return this._content.style.position="relative",this._wrapper.classList.add(p.touch),void this._wrapper.addEventListener("scroll",()=>this._onScroll());this._wrapper.style.overflow="hidden",this._unsubscribe=(()=>{const t=()=>{this._bottomFixed||this._dragging||(this._options.alwaysVisible||this._scrollBar.classList.add("active"),this._onScroll())},e=()=>{this._bottomFixed||this._dragging||(this._options.alwaysVisible||this._scrollBar.classList.remove("active"),this._onScroll())},i=t=>{if(!t.defaultPrevented){const e=function(t,e=(()=>({}))){return{x:t.deltaX*l[t.deltaMode](()=>e().width),y:t.deltaY*l[t.deltaMode](()=>e().height)}}(t,()=>({height:this._wrapper.clientHeight})).y;this.scroll(-e,1)||(t.stopPropagation(),t.preventDefault())}};return this._wrapper.addEventListener("mouseenter",t),this._wrapper.addEventListener("mouseleave",e),this._wrapper.addEventListener("wheel",i),()=>{this._wrapper.removeEventListener("mouseenter",t),this._wrapper.removeEventListener("mouseleave",e),this._wrapper.removeEventListener("wheel",i)}})(),!1!==this._options.showTopShadow&&(this._shadowTop=document.createElement("div"),this._shadowTop.classList.add("sb-inner-shadow","top","i-invisible"),this._wrapper.appendChild(this._shadowTop)),!1!==this._options.showBottomShadow&&(this._shadowBottom=document.createElement("div"),this._shadowBottom.classList.add("sb-inner-shadow"),this._wrapper.appendChild(this._shadowBottom)),this._shadowTop&&this._headerHeight&&(this._shadowTop.style.top=this._headerHeight-this._shadowOffset+"px"),this._wrapper.appendChild(this._scrollBarWrapper),this._scrollBarWrapper.appendChild(this._scrollBar),this._onScroll()}isTouch(){return this._touch}getScrollBar(){return this._scrollBar}initDraggable(){return this._dragInitialized||(this._draggable=new h.Draggable({axis:"y",source:this._scrollBar,containment:this._scrollBarWrapper,start:()=>{this._dragging=!0},stop:()=>{this._dragging=!1},drag:()=>{this.updateScroll()}}),this._dragInitialized=!0),this}updateScroll(){if(this._touch)return this;const t=Math.ceil((0,
r.position)(this._scrollBar).top-this._scrollMarginTop-this._headerHeight),e=this.getContainerHeightWithoutHeader(),i=(0,r.outerHeight)(this._content),s=i-e-1;return e<=0||(this._scrollTargetTop=s<=0?this._headerHeight:Math.min(-t*i/e+this._headerHeight,this._headerHeight),t+(0,r.contentHeight)(this._scrollBar)+2>=e?this.scrollToEnd():(this._content.style.top=this._scrollTargetTop+"px",this._onScroll())),this}getContainerHeightWithoutHeader(){return this._wrapper.getBoundingClientRect().height-this._headerHeight}getContainerHeight(){return this._wrapper.getBoundingClientRect().height}getContentHeight(){return this._content.getBoundingClientRect().height}updateScrollBar(){if(this._touch)return this;const t=(0,r.position)(this._content).top,e=this.getContentHeight(),i=this.getContainerHeight(),s=this.getContainerHeightWithoutHeader(),n=1+this._headerHeight,o=s-2,a=(Math.abs(t)-this._headerHeight)*o/e,h=i*i/e;return this.isContentShort()?(this._scrollBar.classList.add("js-hidden"),this._wrapper.classList.remove("sb-scroll-active")):(this._scrollBar.classList.remove("js-hidden"),this._scrollBar.style.height=h+"px",this._scrollBar.style.top=n+a+"px",this._wrapper.classList.add("sb-scroll-active"),this.initDraggable()),this}scroll(t,e){const i=(0,r.position)(this._content).top,s=(0,r.outerHeight)(this._content)-this.getContainerHeightWithoutHeader()-1,n=e||this._scrollSpeed;return s<=0||(this._scrollTargetTop=Math.max(-s+this._headerHeight,Math.min(this._headerHeight,i+t*n)),this.setContentTop(this._scrollTargetTop),this._onScroll())}animateTo(t){if(this._touch)return this;const e=(0,r.outerHeight)(this._content)-this.getContainerHeightWithoutHeader()-1;if(e<=0)return!0;this._scrollTargetTop=Math.max(-e+this._headerHeight,Math.min(this._headerHeight,-t)),this._animation&&this._animation.stop(),this._animation=(0,a.doAnimate)({duration:500,from:parseFloat(getComputedStyle(this._content).top),to:this._scrollTargetTop,onStep:(t,e)=>{this._content.style.top=e+"px"},onComplete:()=>{this._onScroll()}})}resize(){if(this._bottomFixed)return;const t=(0,r.outerHeight)(this._content),e=(0,r.outerHeight)(this._wrapper);!this._options.vAlignBottom&&t<e?this.atStart()||this.scrollToStart():this.atEnd()?this.scrollToEnd():"number"==typeof this._stickyBottom&&this.setContentTop(Math.min(0,this._stickyBottom+(0,r.outerHeight)(this._wrapper)-(0,r.outerHeight)(this._content)))}resizeHeader(t){const e=t-this._headerHeight;this._headerHeight=t,this._scrollTargetTop+=e,this._shadowTop&&(this._shadowTop.style.top=this._headerHeight-this._shadowOffset+"px"),this.resize()}scrollTo(t,e){const i={position:"visible",areaHeight:t instanceof HTMLElement?(0,r.contentHeight)(t):0,...e};t instanceof HTMLElement&&(t=i.offsetTop||(0,r.position)(t).top);const s=(0,r.position)(this._content).top,n=this._content.getBoundingClientRect().height,o=this.getContainerHeightWithoutHeader();if(n-o-1<=0)return!0;const a=-1*(s-this._headerHeight),h=a+o;let l=0;if("visible"===i.position){if(t>a&&t+i.areaHeight<h)return!1;l=t+i.areaHeight>h?h-t-i.areaHeight:a-t
}else"top"===i.position&&(l=a-t);return this.scroll(l,1),this._onScroll(),!1}scrollToEnd(){const t=(0,r.position)(this._content).top,e=(0,r.outerHeight)(this._content),i=(0,r.outerHeight)(this._wrapper),s=e>i?t+(i-(e+t))+1:1;return this.setContentTop(s),this._onScroll(),this}scrollToStart(){return this.setContentTop(this._headerHeight),this._onScroll(),this}currentPosition(){return Math.round((0,r.position)(this._content).top)}atStart(){return Math.round((0,r.position)(this._content).top)>=this._headerHeight}atEnd(t){"number"==typeof t&&isFinite(t)||(t=0);const e=Math.round((0,r.position)(this._content).top),i=Math.round((0,r.outerHeight)(this._content)),s=Math.round((0,r.outerHeight)(this._wrapper));return i-Math.abs(e)-1<=s+t}checkContentVisibility(){this._onContentVisible()}subscribeToContentVisible(t,e,i){this.visibilityCallbacks.push({id:t,element:e,callback:i})}triggerVisibilityCallbacks(t){this._onContentVisible(t)}save(){return this._saved={top:(0,r.position)(this._content).top,height:(0,r.outerHeight)(this._content)},this}restore(){if(this._saved){if(this._saved.top===(0,r.position)(this._content).top&&this._saved.height===(0,r.outerHeight)(this._content))return this._saved=null,this;this._options.vAlignBottom&&(this._saved.top-=(0,r.outerHeight)(this._content)-this._saved.height,this._saved.top>this._headerHeight&&(this._saved.top=this._headerHeight)),this.setContentTop(this._saved.top),this._saved=null,this._onScroll(!0)}return this}fixBottom(){if(this._bottomFixed)return this;if(this._touch){const t=(0,r.outerHeight)(this._content),e=this._wrapper.scrollTop;this._tempIntervalID=setInterval(()=>{this._wrapper.scrollTop=e+((0,r.outerHeight)(this._content)-t)},0)}else this._content.style.top="auto",this._content.style.bottom=(0,r.outerHeight)(this._wrapper)-(0,r.position)(this._content).top-(0,r.outerHeight)(this._content)+"px";return this._bottomFixed=!0,this}releaseBottom(){return this._bottomFixed?(this._touch?clearInterval(this._tempIntervalID):(this._content.style.bottom="auto",this._content.style.top=(0,r.position)(this._content).top+"px"),this._bottomFixed=!1,this._onScroll(),this):this}setContentTop(t){return this._touch?this._options.vAlignBottom&&(0,r.outerHeight)(this._content)<(0,r.outerHeight)(this._wrapper)?(this._wrapper.style.overflowY="visible",this._content.style.position="absolute",this._content.style.bottom="0px"):(this._content.style.position="relative",this._content.style.position="auto",this._wrapper.style.overflowY="auto",this._wrapper.scrollTop=-t):this._content.style.top=t+"px",this}isContentShort(){return this.getContentHeight()<=this.getContainerHeightWithoutHeader()}destroy(){var t;this._animation&&this._animation.stop(),this._scrollBarWrapper&&this._scrollBarWrapper.remove(),this._shadowBottom&&this._shadowBottom.remove(),this._shadowTop&&this._shadowTop.remove(),this._draggable&&(this._draggable.destroy(),this._draggable=null),this._content.style.cssText="",this._wrapper.style.cssText="",null===(t=this._unsubscribe)||void 0===t||t.call(this)}_onScroll(t){
this._touch||(this._content.style.bottom="auto"),this.scrolled.fire(),this._dragging&&!0!==t||this.updateScrollBar();const e=this.atStart(),i=this.atEnd();return this._shadowTop&&this._shadowTop.classList.toggle("i-invisible",!!e),this._shadowBottom&&this._shadowBottom.classList.toggle("i-invisible",!!i),this._onContentVisible(),!this._atStart&&e?(this._atStart=!0,this.scrolltostart.fire()):this._atStart&&!e&&(this._atStart=!1),!this._atEnd&&i?(this._atEnd=!0,this.scrolltoend.fire()):this._atEnd&&!i&&(this._atEnd=!1),this._options.vAlignBottom&&(this._stickyBottom=(0,r.outerHeight)(this._content)-Math.abs((0,r.position)(this._content).top)-(0,r.outerHeight)(this._wrapper)),(this._atStart||this._atEnd)&&("function"==typeof this._options.bubbleScrollEvent?Boolean(this._options.bubbleScrollEvent()):Boolean(this._options.bubbleScrollEvent))}_contentIsVisible(t){return(0,r.position)(t.element).top>-1*this.currentPosition()}_onContentVisible(t){if(!this.visibilityCallbacks.length)return;const e=t||this._contentIsVisible.bind(this),i=[],s=this.visibilityCallbacks.filter((t,s)=>{if(!this._content.contains(t.element))return!1;const n=e(t);return n&&i.push(s),!n});i.forEach(e=>{this.visibilityCallbacks[e].callback(!!t)}),this.visibilityCallbacks=s}}},20497:(t,e,i)=>{"use strict";var s=i(23127);const n=i(98125).getLogger("CommonUI.CreateTVBlockPlugin");t.exports.createTvBlockWithInstance=function(t,e){if(t&&e)return t=t.toString(),function(o,r,a){var h,l,p;return"get"===o?h=r:(l=r,"object"==typeof o&&void 0===r?(l=o,o="init"):"string"!=typeof o&&(o="init")),"getInstance"===o?s(this).eq(0).data(t):"destroy"===o?(p=s(this).eq(0).data(t))?void("function"==typeof p.destroy?(i(p,"destroy",l),s(this).eq(0).removeData(t)):n.logError("[Block Plugin] "+t+" does not support destroy command")):void console.warn("[Block Plugin] Trying to execute destroy method of "+t+" but it has not been inited"):"get"===o?(p=s(this).eq(0).data(t))?"function"==typeof p[h]?i(p,h,a):p[h]:void console.warn("[Block Plugin] Trying to get prop or execute method of "+t+" but it has not been inited"):s(this).each((function(){var r=s(this),a=r.data(t);void 0===a&&(a=void 0===l?e(r):e(r,l),r.data(t,a)),"init"!==o&&("function"==typeof a[o]?i(a,o,l):n.logError("[Block Plugin] "+t+" does not support command "+o))}))};function i(t,e,i){return void 0===i?t[e]():t[e](i)}}},78754:(t,e,i)=>{"use strict";i.d(e,{buttonLoader:()=>r});i(52014);var s=i(20497),n=i(68587),o=i(23127);function r(t){return new a(o(t))}o.fn.tvButtonLoader=(0,s.createTvBlockWithInstance)("tv-button-loader",(function(t){return new a(t)}));class a{constructor(t){this.$btn=o(t).addClass("tv-button--loader"),0===this.$btn.find(".tv-button__loader").length&&this.$btn.html('<span class="tv-button__text">'+this.$btn.html()+'</span><span class="tv-button__loader"><span class="tv-button__loader-item"></span><span class="tv-button__loader-item"></span><span class="tv-button__loader-item"></span></span>'),this.loading=this.$btn.hasClass("i-loading")}_start(){this.starting=!0,this.$btn.addClass("i-start-load"),
this.$btn.trigger("tv-button-loader:start"),setTimeout(()=>{this.loading=!0,this.starting=!1,this._startPromise=!1,this.$btn.addClass("i-loading"),this.$btn.removeClass("i-start-load"),this._stopPromise&&this._stop()},2*n.dur)}start(){this.starting||(this.stopping?this._startPromise=!0:this._start())}_stop(){this.stopping=!0,this.$btn.addClass("i-stop-load"),this.$btn.trigger("tv-button-loader:stop"),setTimeout(()=>{this.loading=!1,this.stopping=!1,this._stopPromise=!1,this.$btn.removeClass("i-loading i-start-load i-stop-load"),this._startPromise&&this._start()},n.dur)}stop(){this.stopping||(this.starting?this._stopPromise=!0:this._stop())}toggle(){this.loading?this.stop():this.start()}contentHtml(t){return t?(this.$btn.find(".tv-button__text").html(t),t):this.$btn.find(".tv-button__text").html()}contentNojQuery(){return this.$btn.get(0)}disable(){this.stop(),this.$btn.addClass("i-disabled")}enable(){this.$btn.removeClass("i-disabled")}}},53364:(t,e,i)=>{"use strict";i.d(e,{Draggable:()=>a});var s=i(88537),n=i(15828),o=i(49483),r=i(32563);class a{constructor(t){var e,i;this._helper=null,this._handleDragStart=t=>{var e;if(null!==this._helper)return;const i=this._source;i.classList.add("ui-draggable-dragging");const[s,o]=[(0,n.outerWidth)(i),(0,n.outerHeight)(i)];this._helper={startTop:parseFloat(i.style.top)||0,startLeft:parseFloat(i.style.left)||0,nextTop:null,nextLeft:null,raf:null,size:[s,o],containment:this._containment instanceof HTMLElement?[parseInt(getComputedStyle(this._containment).borderLeftWidth)+parseInt(getComputedStyle(this._containment).paddingLeft),parseInt(getComputedStyle(this._containment).borderTopWidth)+parseInt(getComputedStyle(this._containment).paddingTop),this._containment.offsetWidth-parseInt(getComputedStyle(this._containment).borderRightWidth)-parseInt(getComputedStyle(this._containment).paddingRight)-parseInt(getComputedStyle(i).marginLeft)-parseInt(getComputedStyle(i).marginRight)-s,this._containment.offsetHeight-parseInt(getComputedStyle(this._containment).borderBottomWidth)-parseInt(getComputedStyle(this._containment).paddingBottom)-parseInt(getComputedStyle(i).marginTop)-parseInt(getComputedStyle(i).marginBottom)-o]:"window"===this._containment?[window.scrollX,window.scrollY,window.scrollX+document.documentElement.offsetWidth-s,window.scrollY+document.documentElement.offsetHeight-o]:null},null===(e=this._start)||void 0===e||e.call(this)},this._handleDragMove=t=>{var e;if(null===this._helper)return;const{current:i,initial:s}=t.detail,n=this._source,o=this._helper.nextTop,r=this._helper.nextLeft,a="y"===this._axis||!1===this._axis||0!==i.movementY;if(a){const t=this._helper.startTop;isFinite(t)&&(this._helper.nextTop=i.clientY-s.clientY+t)}const h="x"===this._axis||!1===this._axis||0!==i.movementY;if(h){const t=this._helper.startLeft;isFinite(t)&&(this._helper.nextLeft=i.clientX-s.clientX+t)}if(null!==this._helper.containment){const[t,e,i,s]=this._helper.containment;a&&this._helper.nextTop&&(this._helper.nextTop=Math.min(this._helper.nextTop,s),
this._helper.nextTop=Math.max(this._helper.nextTop,e)),h&&this._helper.nextLeft&&(this._helper.nextLeft=Math.min(this._helper.nextLeft,i),this._helper.nextLeft=Math.max(this._helper.nextLeft,t))}null!==this._helper.raf||o===this._helper.nextTop&&r===this._helper.nextLeft||(this._helper.raf=requestAnimationFrame(()=>{null!==this._helper&&(null!==this._helper.nextTop&&(n.style.top=this._helper.nextTop+"px",this._helper.nextTop=null),null!==this._helper.nextLeft&&(n.style.left=this._helper.nextLeft+"px",this._helper.nextLeft=null),this._helper.raf=null)})),null===(e=this._drag)||void 0===e||e.call(this)},this._handleDragStop=t=>{var e;if(null===this._helper)return;this._source.classList.remove("ui-draggable-dragging"),this._helper=null,null===(e=this._stop)||void 0===e||e.call(this)};const s=this._source=t.source;s.classList.add("ui-draggable");const o=this._handle=null!==(e=t.handle?s.querySelector(t.handle):null)&&void 0!==e?e:s;o.classList.add("ui-draggable-handle"),this._start=t.start,this._stop=t.stop,this._drag=t.drag,this._backend=new h({handle:o,onDragStart:this._handleDragStart,onDragMove:this._handleDragMove,onDragStop:this._handleDragStop}),this._axis=null!==(i=t.axis)&&void 0!==i&&i,this._containment=t.containment}destroy(){const t=this._source;t.classList.remove("ui-draggable"),t.classList.remove("ui-draggable-dragging");this._handle.classList.remove("ui-draggable-handle"),this._backend.destroy(),null!==this._helper&&(this._helper.raf&&cancelAnimationFrame(this._helper.raf),this._helper=null)}}class h{constructor(t){this._initial=null,this._handlePointerDown=t=>{if(null!==this._initial)return;if(!(t.target instanceof Element&&this._handle.contains(t.target)))return;if(this._initial=t,!this._dispatchEvent(this._createEvent("pointer-drag-start",t)))return void(this._initial=null);t.preventDefault();const e=this._getEventTarget();e.addEventListener("pointermove",this._handlePointerMove),e.addEventListener("pointerup",this._handlePointerUp),e.addEventListener("pointercancel",this._handlePointerUp),e.addEventListener("lostpointercapture",this._handlePointerUp),e.setPointerCapture(t.pointerId)},this._handlePointerMove=t=>{null!==this._initial&&this._initial.pointerId===t.pointerId&&(t.preventDefault(),this._dispatchEvent(this._createEvent("pointer-drag-move",t)))},this._handlePointerUp=t=>{if(null===this._initial||this._initial.pointerId!==t.pointerId)return;t.preventDefault();const e=this._getEventTarget();e.removeEventListener("pointermove",this._handlePointerMove),e.removeEventListener("pointerup",this._handlePointerUp),e.removeEventListener("pointercancel",this._handlePointerUp),e.removeEventListener("lostpointercapture",this._handlePointerUp),e.releasePointerCapture(this._initial.pointerId),this._dispatchEvent(this._createEvent("pointer-drag-stop",t)),this._initial=null};const e=this._handle=t.handle;this._onDragStart=t.onDragStart,this._onDragMove=t.onDragMove,this._onDragStop=t.onDragStop,e.style.touchAction="none";this._getEventTarget().addEventListener("pointerdown",this._handlePointerDown)}destroy(){
this._handle.style.touchAction="";const t=this._getEventTarget();t.removeEventListener("pointerdown",this._handlePointerDown),t.removeEventListener("pointermove",this._handlePointerMove),t.removeEventListener("pointerup",this._handlePointerUp),t.removeEventListener("pointercancel",this._handlePointerUp),t.removeEventListener("lostpointercapture",this._handlePointerUp),null!==this._initial&&(t.releasePointerCapture(this._initial.pointerId),this._initial=null)}_getEventTarget(){return o.CheckMobile.iOS()||(0,o.isMac)()&&r.touch?window.document.documentElement:this._handle}_dispatchEvent(t){switch(t.type){case"pointer-drag-start":this._onDragStart(t);break;case"pointer-drag-move":this._onDragMove(t);break;case"pointer-drag-stop":this._onDragStop(t)}return!t.defaultPrevented}_createEvent(t,e){return(0,s.assert)(null!==this._initial),new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:{backend:this,initial:this._initial,current:e}})}}},15828:(t,e,i)=>{"use strict";i.d(e,{contentHeight:()=>n,outerHeight:()=>o,outerWidth:()=>r,position:()=>h});var s=i(88537);function n(t){const{paddingTop:e,paddingBottom:i}=window.getComputedStyle(t);return[e,i].reduce((t,e)=>t-Number((e||"").replace("px","")),t.clientHeight)}function o(t,e=!1){const i=getComputedStyle(t),s=[i.height];return"border-box"!==i.boxSizing&&s.push(i.paddingTop,i.paddingBottom,i.borderTopWidth,i.borderBottomWidth),e&&s.push(i.marginTop,i.marginBottom),s.reduce((t,e)=>t+(parseFloat(e)||0),0)}function r(t,e=!1){const i=getComputedStyle(t),s=[i.width];return"border-box"!==i.boxSizing&&s.push(i.paddingLeft,i.paddingRight,i.borderLeftWidth,i.borderRightWidth),e&&s.push(i.marginLeft,i.marginRight),s.reduce((t,e)=>t+(parseFloat(e)||0),0)}function a(t){if(!t.getClientRects().length)return{top:0,left:0};const e=t.getBoundingClientRect(),i=(0,s.ensureNotNull)(t.ownerDocument.defaultView);return{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}}function h(t){const e=getComputedStyle(t);let i,s={top:0,left:0};if("fixed"===e.position)i=t.getBoundingClientRect();else{i=a(t);const e=t.ownerDocument;let n=t.offsetParent||e.documentElement;for(;n&&(n===e.body||n===e.documentElement)&&"static"===getComputedStyle(n).position;)n=n.parentElement;n&&n!==t&&1===n.nodeType&&(s=a(n),s.top+=parseFloat(getComputedStyle(n).borderTopWidth),s.left+=parseFloat(getComputedStyle(n).borderLeftWidth))}return{top:i.top-s.top-parseFloat(e.marginTop),left:i.left-s.left-parseFloat(e.marginLeft)}}},4135:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11px" height="9px"><path fill="none" fill-rule="evenodd" stroke-width="2" d="M1 3.22l3.415 3.496L10 1"/></svg>'}}]);