@ytsaurus/ui 1.72.0 → 1.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/public/build/assets-manifest.json +26 -26
  2. package/dist/public/build/css/yt-monaco-editor.43c1d967.chunk.css +2 -0
  3. package/dist/public/build/css/yt-monaco-editor.43c1d967.chunk.css.map +1 -0
  4. package/dist/public/build/js/3302.dff164d9.chunk.js +3 -0
  5. package/dist/public/build/js/3302.dff164d9.chunk.js.map +1 -0
  6. package/dist/public/build/js/{chyt.eff6e270.chunk.js → chyt.8c82dc61.chunk.js} +2 -2
  7. package/dist/public/build/js/{chyt.eff6e270.chunk.js.map → chyt.8c82dc61.chunk.js.map} +1 -1
  8. package/dist/public/build/js/{cluster-page-wrapper.434bb4ef.chunk.js → cluster-page-wrapper.7c7301b9.chunk.js} +2 -2
  9. package/dist/public/build/js/{cluster-page-wrapper.434bb4ef.chunk.js.map → cluster-page-wrapper.7c7301b9.chunk.js.map} +1 -1
  10. package/dist/public/build/js/{components.233a938d.chunk.js → components.a4b032ee.chunk.js} +2 -2
  11. package/dist/public/build/js/components.a4b032ee.chunk.js.map +1 -0
  12. package/dist/public/build/js/main.afa006d1.js +3 -0
  13. package/dist/public/build/js/main.afa006d1.js.map +1 -0
  14. package/dist/public/build/js/{navigation.f5cf971c.chunk.js → navigation.0adc0583.chunk.js} +2 -2
  15. package/dist/public/build/js/{navigation.f5cf971c.chunk.js.map → navigation.0adc0583.chunk.js.map} +1 -1
  16. package/dist/public/build/js/{query-tracker.64472502.chunk.js → query-tracker.5f5e3683.chunk.js} +2 -2
  17. package/dist/public/build/js/{query-tracker.64472502.chunk.js.map → query-tracker.5f5e3683.chunk.js.map} +1 -1
  18. package/dist/public/build/js/{query-widget.2271e15c.chunk.js → query-widget.4bd0f75f.chunk.js} +2 -2
  19. package/dist/public/build/js/{query-widget.2271e15c.chunk.js.map → query-widget.4bd0f75f.chunk.js.map} +1 -1
  20. package/dist/public/build/js/{runtime.c88113bf.js → runtime.30501cea.js} +2 -2
  21. package/dist/public/build/js/{runtime.c88113bf.js.map → runtime.30501cea.js.map} +1 -1
  22. package/dist/public/build/js/yt-monaco-editor.00e55e53.chunk.js +2 -0
  23. package/dist/public/build/js/yt-monaco-editor.00e55e53.chunk.js.map +1 -0
  24. package/dist/public/build/manifest.json +22 -22
  25. package/package.json +2 -2
  26. package/dist/public/build/css/yt-monaco-editor.e7c3868b.chunk.css +0 -2
  27. package/dist/public/build/css/yt-monaco-editor.e7c3868b.chunk.css.map +0 -1
  28. package/dist/public/build/js/3337.31ee332d.chunk.js +0 -3
  29. package/dist/public/build/js/3337.31ee332d.chunk.js.map +0 -1
  30. package/dist/public/build/js/components.233a938d.chunk.js.map +0 -1
  31. package/dist/public/build/js/main.c46b0cfa.js +0 -3
  32. package/dist/public/build/js/main.c46b0cfa.js.map +0 -1
  33. package/dist/public/build/js/yt-monaco-editor.59382231.chunk.js +0 -2
  34. package/dist/public/build/js/yt-monaco-editor.59382231.chunk.js.map +0 -1
  35. /package/dist/public/build/js/{3337.31ee332d.chunk.js.LICENSE.txt → 3302.dff164d9.chunk.js.LICENSE.txt} +0 -0
  36. /package/dist/public/build/js/{main.c46b0cfa.js.LICENSE.txt → main.afa006d1.js.LICENSE.txt} +0 -0
@@ -0,0 +1,3 @@
1
+ /*! For license information please see 3302.dff164d9.chunk.js.LICENSE.txt */
2
+ (self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[3302],{73032:(e,t,n)=>{"use strict";n.d(t,{H:()=>c});var r=n(9736),i=n(77810),o=n(75299),a=n(76872),s=n(93209),u=n(64922),l=(0,a.A)("yt-collapsed-string"),c=function(e){var t=e.value,n=e.limit,a=void 0===n?200:n,c=(0,o.A)(!1),d=(0,r.A)(c,2),f=d[0],h=d[1],v=t.length>a,p=(0,i.useMemo)((function(){return f||t.length<=a?t:t.slice(0,a-1)+"…"}),[f,a,t]);return(0,u.jsxs)("div",{className:l(),children:[p,v&&(0,u.jsx)(s.S,{className:l("toggle"),onClick:h,children:f?"Hide":"Show more"})]})}},78466:(e,t,n)=>{"use strict";n.d(t,{L:()=>c}),n(77810);var r=n(92423),i=n(72679),o=n(39702),a=n(40319),s=n(64922);const u=function(e){return(0,s.jsx)("svg",(0,a.A)((0,a.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,s.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.47 10.97a.75.75 0 1 0 1.06 1.06l3.5-3.5a.75.75 0 0 0 0-1.06l-3.5-3.5a.75.75 0 0 0-1.06 1.06L6.44 8zm5 0a.75.75 0 1 0 1.06 1.06l3.5-3.5a.75.75 0 0 0 0-1.06l-3.5-3.5a.75.75 0 0 0-1.06 1.06L11.44 8z",clipRule:"evenodd"})}))};var l=(0,n(76872).A)("yt-expanded-button"),c=function(e){var t=e.className,n=e.expanded,a=e.inline,c=e.toggleExpanded,d=e.all,f=e.showText,h=e.qa,v=d?"Collapse All":"Collapse",p=d?"Expand All":"Expand";return(0,s.jsxs)(r.$,{className:l({inline:a},t),view:"flat-secondary",title:n?v:p,onClick:c,qa:h,children:[f&&(n?v:p)+" ",(0,s.jsx)(i.I,{className:l("expand",{expanded:n}),data:d?u:o.A,size:16})]})}},82564:(e,t,n)=>{"use strict";n.d(t,{DC:()=>$});var r=n(40319),i=n(13322),o=n(9736),a=n(77810),s=n(15647),u=n(76872),l=n(60620),c=n(73822),d=n(69835),f=n(11394),h=n(11843),v=n(84162),p=n(30008),m=n(78466),g=n(64922),y=(0,u.A)("elements-toolbar"),x=(0,u.A)("job-statistics");function b(e){var t=a.useCallback((function(){return e.onTreeStateChange("collapsed")}),[e.onTreeStateChange]),n=a.useCallback((function(){return e.onTreeStateChange("expanded")}),[e.onTreeStateChange]),r=(0,s.wA)(),i=(0,a.useCallback)((function(t){return r(e.onFilterChange(t))}),[r]),o="expanded"===e.treeState||"mixed"===e.treeState;return(0,g.jsx)("div",{className:y(null,x("toolbar")),children:(0,g.jsxs)("div",{className:y("container"),children:[(0,g.jsx)("div",{className:y("component",x("filter")),children:(0,g.jsx)(v.A,{size:"m",debounce:500,value:"",onChange:i})}),(0,g.jsx)("div",{className:y("component",x("expand-collapse")),children:(0,g.jsx)("span",{className:x("expand-metrics"),children:(0,g.jsx)(m.L,{expanded:o,toggleExpanded:o?t:n})})}),e.helpUrl&&(0,g.jsx)("div",{className:y("component",x("help")),children:(0,g.jsx)(p.A,{url:e.helpUrl})})]})})}var A=n(70353);function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.measureText(t).width;return Math.max(1,Math.ceil(n))}var E=n(74360),_=n(39760),C=n.n(_),j=n(30002),S=n.n(j),k="<Root>";function N(e,t){return{name:t,prefix:e,path:e+"/"+t}}function T(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k,r=t||{children:{},leaves:{}};return C()(e,(function(e,t){if("object"===(0,E.A)(S()(e)[0])){var i=N(n,t);r.children[i.path]=i,r=T(e,r,i.path)}else{var o=function(e,t,n){var r=N(e,t);return r.value=n,r}(n,t,e);r.leaves[o.path]=o}})),r}var R=function(e){return t=T(e),n=c.A.treeList.prepareTree(t.children,(function(e){return e.prefix})),(n=c.A.treeList.attachTreeLeaves(n,t.leaves,(function(e){return e.prefix})))[k];var t,n},O=(0,u.A)("job-statistics"),I=40;function M(e){var t=e.item.attributes.value;if(t&&t.count&&t.sum){var n=t.sum/t.count;return n<1?c.A.format.Number(n,{significantDigits:6}):c.A.format.Number(n)}return c.A.format.NO_VALUE}function P(e){var t,n=e.item,r=e.aggregation;return n.isLeafNode&&Boolean(n.attributes.value)?"avg"===r?(0,g.jsx)(M,{item:n}):c.A.format.Number(null===(t=n.attributes)||void 0===t||null===(t=t.value)||void 0===t?void 0:t[r]):c.A.format.NO_VALUE}function L(e){var t=e.item,n=e.itemState,r=e.toggleItemState,i=e.minWidth,o=void 0===i?void 0:i,s=e.renderValue,u=a.useMemo((function(){return{minWidth:o,paddingLeft:((null==t?void 0:t.level)||0)*I}}),[t.level,o]),c=a.useCallback((function(){n.empty||r()}),[n,r]);return t.isLeafNode?(0,g.jsxs)("span",{className:O("metric"),style:u,children:[(0,g.jsx)(l.A,{awesome:"chart-line",className:O("metric-icon")}),(0,g.jsx)("span",{children:s(t)})]}):(0,g.jsxs)("span",{className:O("group"),style:u,onClick:c,children:[(0,g.jsx)(m.L,{expanded:!(n.collapsed||n.empty),toggleExpanded:function(){}}),(0,g.jsx)(l.A,{awesome:n.collapsed||n.empty?"folder":"folder-open",className:O("group-icon")}),(0,g.jsx)("span",{children:s(t)})]})}var D=function(e){var t=e.visibleColumns.reduce((function(e,t){return e[t]={sort:!1,align:"right"},e}),{name:{sort:!1,align:"left"}});return{theme:"light",size:"s",striped:!1,computeKey:function(e){return e.name},tree:!0,columns:{sets:{default:{items:Object.keys(t)}},items:t,mode:"default"}}},z=function(e){var t=e.statistic,n=e.fontFamilies,r=a.useState(""),i=(0,o.A)(r,2),s=i[0],u=i[1],l=a.useState("expanded"),d=(0,o.A)(l,2),f=d[0],h=d[1],v=a.useMemo((function(){return R(t)}),[t]),p=a.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e)return[];var n=c.A.treeList.filterTree(e,(function(e){return-1!==e.name.indexOf(t)}),!0),r=c.A.treeList.sortTree(n,{field:"name",asc:!0},{name:{get:function(e){return e.name}}});return c.A.treeList.flattenTree(r)}(v,s)}),[v,s]);return{minWidth:a.useMemo((function(){return function(e,t){var n,r=300,i=function(e){var t=document.createElement("canvas").getContext("2d");return t.font=e,t}('14px / 20.02px "'.concat(t.regular,'", "Helvetica Neue", Arial, Helvetica, sans-serif')),o=(0,A.A)(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.isLeafNode?20:40,u=w(i,a.attributes.name);r=Math.max(r,u+s+a.level*I)}}catch(e){o.e(e)}finally{o.f()}return Math.round(1.05*r)}(p,n)}),[n,p]),items:p,treeState:f,setTreeState:h,onFilterChange:function(e){return u(e)}}};function $(e){var t=e.helpUrl,n=e.virtual,o=e.visibleColumns,u=e.fixedHeader,l=e.statistic,c=(0,s.d4)(h.Y),v=z({statistic:l,fontFamilies:c}),p=v.items,m=v.minWidth,y=v.treeState,x=v.setTreeState,A=v.onFilterChange,w=a.useMemo((function(){return{name:function(e,t,n,r){return(0,g.jsx)(L,{item:e,minWidth:m,toggleItemState:n,itemState:r,renderValue:function(e){var t;return null==e||null===(t=e.attributes)||void 0===t?void 0:t.name}})},__default__:function(e,t){return e.isLeafNode?(0,g.jsx)(P,{item:e,aggregation:t}):null}}}),[m]),E=a.useMemo((function(){return D({visibleColumns:o})}),(0,i.A)(o));return(0,g.jsx)(d.A,{children:(0,g.jsxs)("div",{className:O(),children:[(0,g.jsx)(b,{helpUrl:t,onFilterChange:A,onTreeStateChange:x,treeState:y}),(0,g.jsx)("div",{className:O("table-container"),children:(0,g.jsx)(f.A,(0,r.A)((0,r.A)({},E),{},{virtual:n,treeState:y,templates:w,items:p,css:O(),headerClassName:O("header",{fixed:u})}))})]})})}},94430:(e,t,n)=>{"use strict";n.d(t,{g:()=>R});var r=n(9736),i=n(77810),o=n(76872),a=n(55740),s=n(92423),u=n(72890),l=n(72679),c=n(86022),d=n(65986),f=n(54205);const h=JSON.parse('{"button_select-all":"Select all","button_deselect-all":"Clear","button_select":"Select","label_selected":"Selected","placeholder_search":"Search"}'),v=JSON.parse('{"button_select-all":"Выбрать все","button_deselect-all":"Очистить","button_select":"Выбрать","label_selected":"Выбрано","placeholder_search":"Поиск"}'),p=(0,f.N)({en:h,ru:v},`${d.C}item-selector`),m=(0,d.o)("item-selector");class g extends i.Component{constructor(){super(...arguments),this.renderItemTitle=e=>{const{renderItemValue:t,getItemId:n}=this.props;return t?t(e):n(e)},this.renderItem=(e,t)=>i.createElement("div",{className:m("item",{active:t})},i.createElement("span",{className:m("item-text")},this.renderItemTitle(e)),i.createElement(s.$,{view:"flat-secondary",size:"s",className:m("item-select"),onClick:this.onAddItem.bind(this,e)},p("button_select"))),this.filterItem=e=>t=>{const{getItemId:n}=this.props;return n(t).includes(e)},this.renderValueItem=(e,t)=>i.createElement("div",{className:m("value-item",{active:t})},i.createElement("span",{className:m("value-item-text")},this.renderItemTitle(e)),i.createElement(s.$,{view:"flat-secondary",size:"s",className:m("value-item-remove"),onClick:()=>this.onRemoveItem(e)},i.createElement(l.I,{data:u.A,size:16}))),this.onAddItem=e=>{const{getItemId:t,value:n}=this.props,r=t(e),i=new Set(n).has(r)?n:[...n,r];setTimeout((()=>{this.onUpdate(i)}),0)},this.onRemoveItem=e=>{const{value:t,getItemId:n}=this.props,r=n(e),i=t.filter((e=>e!==r));setTimeout((()=>{this.onUpdate(i)}),0)},this.onErase=()=>{this.onUpdate([])},this.onSelectAll=()=>{const{items:e,getItemId:t}=this.props,n=e.map(t);this.onUpdate(n)},this.onMoveItem=({oldIndex:e,newIndex:t})=>{if(e!==t){const n=this.props.value.slice();this.onUpdate(c.B.moveListElement(n,e,t))}},this.onUpdate=e=>{this.props.onUpdate(e)}}getActualItems(){const{items:e,value:t,hideSelected:n,getItemId:r}=this.props,i=[],o=new Array(t.length),a=new Map(t.map(((e,t)=>[e,t])));for(const t of e){const e=a.get(r(t));void 0!==e&&(o[e]=t),n&&void 0!==e||i.push(t)}return[i,o]}render(){const{value:e,selectorTitle:t,renderItem:n=this.renderItem,filterItem:r=this.filterItem,hideSelectAllButton:o}=this.props,[a,u]=this.getActualItems();return i.createElement("div",{className:m()},i.createElement("div",{className:m("list")},i.createElement("div",{className:m("list-header")},i.createElement("span",{className:m("list-title")},t),!o&&i.createElement(s.$,{view:"flat",size:"s",disabled:0===a.length,onClick:this.onSelectAll},p("button_select-all"))),i.createElement(c.B,{items:a,renderItem:n,filterItem:r,filterPlaceholder:p("placeholder_search"),itemsHeight:196})),i.createElement("div",{className:m("list")},i.createElement("div",{className:m("list-header")},i.createElement("span",{className:m("list-title")},`${p("label_selected")}: ${e.length}`),i.createElement(s.$,{view:"flat",size:"s",disabled:0===e.length,onClick:this.onErase},p("button_deselect-all"))),i.createElement(c.B,{items:u,renderItem:this.renderValueItem,filterItem:r,filterPlaceholder:p("placeholder_search"),sortable:!0,onSortEnd:this.onMoveItem,itemsHeight:196})))}}g.defaultProps={hideSelected:!0,selectorTitle:"",getItemId:function(e){return`${e}`}};var y=n(40319),x=n(64922);const b=function(e){return(0,x.jsx)("svg",(0,y.A)((0,y.A)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},e),{},{children:(0,x.jsx)("path",{fill:"none",stroke:"currentColor",d:"m3 6 5 5 5-5"})}))};var A=(0,o.A)("yc-selector-control");function w(e){var t=e.value,n=e.placeholder;return t.length>0?(0,x.jsx)("span",{className:A("value"),children:t.join(", ")}):(0,x.jsx)("span",{className:A("placeholder"),children:n})}function E(e){var t=e.size,n=void 0===t?"s":t,r=e.width,o=e.label,a=e.focused,s=e.disabled,u=e.displayArrow,c=e.value,d=e.icon,f=e.badgeFocused,h=e.badgeRef,v=e.onBadgeClick,p=e.onClick,m=e.placeholder,g={};r&&(g.width=r);var y=i.useRef(null);return c?(0,x.jsxs)("div",{ref:y,className:A({size:n,focused:a,disabled:s}),style:g,onClick:p,children:[Boolean(o)&&(0,x.jsx)("span",{className:A("label"),children:o}),Boolean(d)&&(0,x.jsx)("div",{className:A("selected-item-icon"),children:d}),w({value:c,placeholder:m}),Boolean(c.length>0)&&(0,x.jsx)("div",{ref:h,className:A("badge",{focused:f}),onClick:v,children:c.length}),u&&(0,x.jsx)("div",{className:A("arrow"),children:(0,x.jsx)(l.I,{data:b})})]}):null}var _=n(56802);const C=JSON.parse('{"button_apply":"Apply","button_cancel":"Cancel","label_columns":"Columns","label_placeholder":"Select 1 or more columns"}');var j=new _.TH;j.setLang("en");var S="yc-column-selector";j.registerKeyset("en",S,C);const k=j.keyset(S);var N=(0,o.A)("yc-column-selector"),T=["bottom-start","bottom-end","top-start","top-end"];function R(e){var t=e.className,n=e.switcher,o=e.disabled,u=e.controlWidth,l=e.items,c=e.value,d=e.onUpdate,f=e.renderItem,h=e.renderItemValue,v=e.getItemId,p=e.filterItem,m=e.popupPlacement,y=void 0===m?T:m,b=i.useRef(null),A=i.useState(!1),w=(0,r.A)(A,2),_=w[0],C=w[1],j=i.useState(!1),S=(0,r.A)(j,2),R=S[0],O=S[1],I=i.useState(),M=(0,r.A)(I,2),P=M[0],L=M[1];i.useEffect((function(){L(void 0)}),[l,c]),i.useEffect((function(){o&&(C(!1),L(void 0))}),[o]);var D=i.useCallback((function(e){L(e)}),[]),z=i.useCallback((function(){C(!1)}),[]),$=i.useCallback((function(){C(!1),L(void 0)}),[]),F=i.useCallback((function(){C(!1),L(void 0),P&&c!==P&&d(P)}),[P,d,c]);return(0,x.jsxs)("div",{className:N(null,t),children:[(0,x.jsx)("div",{className:N("control"),ref:b,onClick:function(){o||(C((function(e){return!e})),L(void 0),R||O(!0))},children:n||(0,x.jsx)(E,{displayArrow:!0,disabled:o,placeholder:k("label_placeholder"),value:c,focused:_,width:u})}),R&&(0,x.jsxs)(a.z,{anchorRef:b,placement:y,open:_,onClose:z,children:[(0,x.jsx)(g,{selectorTitle:k("label_columns"),items:l,value:null!=P?P:c,onUpdate:D,getItemId:v,filterItem:p,renderItem:f,renderItemValue:h}),(0,x.jsxs)("div",{className:N("controls"),children:[(0,x.jsx)(s.$,{view:"flat",className:N("control"),onClick:$,children:k("button_cancel")}),(0,x.jsx)(s.$,{view:"action",className:N("control"),onClick:F,children:k("button_apply")})]})]})]})}},80016:(e,t,n)=>{"use strict";n.d(t,{w:()=>u});var r=n(9736),i=n(77810),o=n(15647),a=n(11843),s=n(27652);function u(e){var t=e.children,n=(0,o.d4)(a.Y),u=n.regular,l=n.monospace,c=i.useState(!1),d=(0,r.A)(c,2),f=d[0],h=d[1];return i.useEffect((function(){Promise.all([(0,s.w)(u),(0,s.w)(l)]).then((function(){return h(!0)}))}),[u,l]),f?t:null}},5166:(e,t,n)=>{"use strict";n.d(t,{J:()=>v,f:()=>p});var r=n(9736),i=n(77810),o=n(15647),a=n(92423),s=n(72679),u=n(11960),l=n(66853),c=n(1701),d=n(19314),f=n(27497),h=n(64922),v=function(e){return(0,h.jsx)(u.A,{title:"New query",content:"All the changes will be lost. Are you sure you want to reset query?",onCancel:e.cancel,onConfirm:e.confirm,onOutsideClick:e.cancel,visible:e.visible})},p=function(e){var t=e.onClick,n=(0,o.d4)(l.Py),u=(0,i.useState)(!1),p=(0,r.A)(u,2),m=p[0],g=p[1],y=(0,o.d4)(f.dB);return(0,h.jsxs)(i.Fragment,{children:[(0,h.jsxs)(a.$,{qa:"new-query-btn",view:"action",size:"l",title:"New query",href:"/".concat(y,"/").concat(d.YW.QUERIES),onClick:function(e){e.preventDefault(),n?g(!0):t()},children:[(0,h.jsx)(s.I,{data:c.A,size:16}),"New"]}),(0,h.jsx)(v,{confirm:function(){t(),g(!1)},cancel:function(){g(!1)},visible:m})]})}},95910:(e,t,n)=>{"use strict";n.d(t,{f:()=>r.f});var r=n(5166)},3035:(e,t,n)=>{"use strict";n.d(t,{t:()=>d});var r=n(9736),i=n(77810),o=n(15647),a=n(51194),s=n(66853),u=n(51444),l=n(93918),c=n(63192),d=function(){var e=(0,a._)(),t=(0,o.d4)(s.Ry),n=(0,o.d4)(s.q9),d=(0,o.d4)(u.kz),f=(0,o.d4)(u.rE),h=(0,o.d4)(u.ND),v=(0,i.useState)(!1),p=(0,r.A)(v,2),m=p[0],g=p[1],y=(0,i.useCallback)((function(t){var n=t.aco,r=t.query_id;if(!r)throw new Error("query_id is empty");return g(!0),e((0,c.s_)({aco:n,query_id:r})).finally((function(){return g(!1)}))}),[e]);return{selectACOOptions:d,currentQueryACO:t,changeDraftQueryACO:(0,i.useCallback)((function(t){var n=t.aco;return g(!0),e((0,c.Tk)({aco:n})).finally((function(){return g(!1)}))}),[e]),changeCurrentQueryACO:y,currentDraftQueryACO:n,trackerInfo:h,loadQueryTrackerInfo:function(){e((0,l.E)())},isFlight:m||f,isQueryTrackerInfoLoading:f}}},37267:(e,t,n)=>{"use strict";n.d(t,{H:()=>d});var r=n(9736),i=n(29665),o=n(77810),a=n(55956),s=n(73822);function u(e){return t=e.start_time,n=e.finish_time,r=new Date(t).getTime(),i=(n?new Date(n):new Date).getTime(),s.A.format.TimeDuration(i-r);var t,n,r,i}var l=n(18309),c=n(64922),d=o.memo((function(e){var t=e.query,n=e.className,s=function(e){var t=(0,o.useState)(u(e)),n=(0,r.A)(t,2),i=n[0],s=n[1];return(0,o.useEffect)((function(){if(e.state!==a.RE.DRAFT){if((0,l.qo)(e))s(e.finish_time?u(e):"-");else if(s(u(e)),!e.finish_time){var t=setInterval((function(){return s(u(e))}),1e3);return function(){clearInterval(t)}}}else s(null)}),[e.id,e.state,e.start_time]),i}(t);return s&&(0,c.jsx)(i.J,{className:n,children:s})}))},58801:(e,t,n)=>{"use strict";n.d(t,{A:()=>Xl});var r=n(68175),i=n(13322),o=n(9736),a=n(77810),s=n(76866),u=n(76872),l=n(21274),c=n(92423),d=n(72679),f=n(6736),h=n(91326),v=n(40319),p=n(64922);const m=function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 11 12"},e),{},{children:(0,p.jsx)("path",{fillRule:"evenodd",d:"M0 .994v10.013a.993.993 0 0 0 1.475.868l9.012-5.007a.993.993 0 0 0 0-1.735L1.475.125A.993.993 0 0 0 0 .994",clipRule:"evenodd"})}))};var g=n(15647),y=n(66853),x=n(63192),b=n(46493),A=n(4224),w=n(85137),E=n(73822),_=n(37267),C=n(16554),j=n(13395),S=n(18309),k=(0,u.A)("query-meta-info"),N=a.memo((function(e){var t=e.query,n=e.className,r=(0,a.useMemo)((function(){return t&&(0,S.lq)(t)}),[t]),i=(0,g.wA)(),o=(0,a.useCallback)((function(){i((0,x.ib)())}),[i]);return(0,p.jsxs)("div",{className:k(null,n),children:[(0,p.jsx)(C.C,{className:k("item"),mode:"both",status:t.state}),(0,p.jsx)(_.H,{query:t,className:k("item")}),(0,p.jsx)(w.E,{className:k("item"),children:E.A.format.DateTime(t.start_time,{format:"short"})}),(0,p.jsxs)(w.E,{className:k("item"),color:"secondary",children:["by ",t.user]}),r&&(0,p.jsxs)(c.$,{size:"s",onClick:o,children:[(0,p.jsx)(d.I,{data:j.A}),"Stop"]})]})})),T=n(74360),R=n(90826),O=n(63366),I=n(28640),M=(0,u.A)("query-meta-table"),P=M("title"),L=M("value"),D=["query","access_control_object"];function z(e){var t=e.query,n=e.className,r=(0,a.useState)(null),i=(0,o.A)(r,2),s=i[0],u=i[1],l=(0,a.useState)(!1),d=(0,o.A)(l,2),f=d[0],h=d[1],v=(0,a.useMemo)((function(){return Object.entries(t).filter((function(e){var t=(0,o.A)(e,1)[0];return!D.includes(t)})).map((function(e){var t=(0,o.A)(e,2),n=t[0],r=t[1],i="object"===(0,T.A)(r),a=r;return i&&(a=(0,p.jsx)(c.$,{view:"outlined",onClick:function(){u(r),h(!0)},children:"View details"})),{title:n,value:a,showCopy:"id"===n}}))}),[t]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("dl",{className:M(null,n),children:v.map((function(e){var t=Array.isArray(e.value)?e.value:[e.value];return(0,p.jsxs)(a.Fragment,{children:[(0,p.jsx)("dt",{className:P,children:E.A.format.Readable(e.title)}),t.map((function(t,n){return(0,p.jsxs)("dd",{className:L,children:["boolean"==typeof t?String(t):t,e.showCopy&&(0,p.jsx)(I.A,{size:"s",text:t,inlineMargins:!0})]},n)}))]},e.title)}))}),(0,p.jsx)(O.A,{visible:f,disableBodyScrollLock:!0,onOutsideClick:function(){return h(!1)},onCancel:function(){return h(!1)},children:s&&(0,p.jsx)(R.A,{value:s,settings:{}})})]})}var $=n(79726),F=n(43359);const U=function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},e),{},{children:(0,p.jsx)("path",{fillRule:"evenodd",d:"M1.5 3.5a1 1 0 0 1 1-1h1.96a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H2.5a1 1 0 0 1-1-1zm12-1a1 1 0 0 1 1 1v2.05a1 1 0 0 1-1 1H7.59a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1zm0 5.33c.2-.2.56-.14.68.11.21.42.34.87.32 1.38 0 1.6-1.3 2.87-2.85 2.87h-2.8v.87c0 .4-.47.58-.72.31l-1.41-1.45a.4.4 0 0 1 0-.6l1.41-1.45c.27-.3.73-.1.73.29v.87h2.8c.93 0 1.7-.76 1.7-1.7.02-.3-.05-.55-.15-.79a.46.46 0 0 1 .09-.49l.08-.09a1 1 0 0 0 .13-.13z",clipRule:"evenodd"})}))};var B=n(82964),H=n(64644),q=n(81039),V=n(94430),Y=a.memo((function(e){var t=e.allColumns,n=e.columns,r=e.className,i=e.onChange,o=(0,a.useCallback)((function(e){i(e)}),[i]),s=(0,a.useMemo)((function(){return n||t.map((function(e){return e.name}))}),[t,n]),u=n&&s.length!==(null==n?void 0:n.length)?"action":"normal";return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(V.g,{className:r,renderItemValue:function(e){return e.displayName},getItemId:function(e){return e.name},value:s,items:t,switcher:(0,p.jsxs)(c.$,{size:"m",title:"Choose result columns",view:u,children:[(0,p.jsx)(d.I,{data:q.A}),"Columns ",(0,p.jsx)(w.E,{color:"secondary",children:(null==s?void 0:s.length)+"/"+t.length})]}),onUpdate:o})})})),W=n(29121),K=n(12937),X=n(10785),G=n(26718),Q=n(97691),J=n.n(Q),Z=n(27497),ee=n(42447),te=n(55956),ne=n(51194),re=n(29081),ie=function(e){(0,X.A)(n,e);var t=(0,G.A)(n);function n(){return(0,W.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"getDownloadParams",value:function(){var e=this.getOutputFormat(),t=e.value,n=e.error,r={output_format:t,dump_error_into_response:!0};return"schemaful_dsv"!==this.state.format&&(r.columns=this.prepareColumnsForColumnMode(!1)),{query:J().stringify(r),error:n}}},{key:"getDownloadLink",value:function(){var e=this.props.getDownloadBaseUrl,t=this.state,n=t.rowsMode,r=t.startRow,i=t.numRows,o=e("range"===n?{start:r,end:r+i}:void 0),a=this.getDownloadParams(),s=a.query,u=a.error;return{url:"".concat(o,"&").concat(s),error:u}}},{key:"getExcelDownloadLink",value:function(){var e=this.props,t=e.cluster,n=e.queryId,r=this.state,i=r.number_precision_mode,o=r.rowsMode,a=r.startRow,s=r.numRows,u="".concat((0,re.t1)({cluster:t}),"/").concat(t,"/api/export-query-result"),l=new URLSearchParams({number_precision_mode:i,result_index:"0",query_id:n});"range"===o&&(l.append("lower_row_index",a.toString()),l.append("upper_row_index",(a+s).toString()));var c=this.prepareColumnsForColumnMode(!1),d=c?"&"+c.map((function(e){return"columns=".concat(e)})).join("&"):"",f=this.getDownloadParams().error;return{url:"".concat(u,"?").concat(l).concat(d),error:f}}}]),n}(ee.q),oe=a.memo((function(e){var t,n,r=e.queryId,i=e.resultIndex,s=e.allColumns,u=e.visibleColumns,l=e.className,c=(0,g.d4)(Z.dB),d=(0,g.d4)((function(e){return(0,F.iI)(e,r,i)})),f=(0,ne._)(),h=null!=d&&d.resultReady&&(null==d?void 0:d.page)*(null==d||null===(t=d.settings)||void 0===t?void 0:t.pageSize)||0,v=(0,a.useMemo)((function(){return s.map((function(e){return{name:e.displayName,checked:!u||(null==u?void 0:u.includes(e.name))}}))}),[s,u]),m=(0,a.useState)(!1),y=(0,o.A)(m,2),x=y[0],b=y[1];return(0,p.jsx)(ie,{getDownloadBaseUrl:function(e){return f((0,te.BK)(c,r,i,e))},proxy:"",externalProxy:"",toggleVisible:function(){},transaction_id:void 0,queryId:r,resultIndex:i,className:l,cluster:c,rowCount:null!=d&&d.resultReady?null==d?void 0:d.meta.data_statistics.row_count:0,allColumns:v,srcColumns:v,columns:v,pageSize:null!=d&&d.resultReady&&(null==d||null===(n=d.settings)||void 0===n?void 0:n.pageSize)||50,showDecoded:!1,loading:!1,path:"",visible:x,handleShow:function(){return b(!0)},handleClose:function(){return b(!1)},offsetValue:h,isSchematicTable:!0})})),ae=(0,u.A)("query-result-actions"),se=[{value:"table",content:"Full result"},{value:"scheme",content:"Scheme"}];function ue(e){var t,n,r,i,o,s=e.query,u=e.resultIndex,l=(0,g.wA)(),f=(0,g.d4)((function(e){return(0,F.iI)(e,s.id,u)})),h=(0,a.useCallback)((function(){var e;l({type:B.NJ,data:{queryId:s.id,index:u,settings:{transposed:!(null!=f&&null!==(e=f.settings)&&void 0!==e&&e.transposed)}}})}),[null==f?void 0:f.settings,l]),m=(0,a.useCallback)((function(e){l({type:B.NJ,data:{queryId:s.id,index:u,settings:{viewMode:e}}})}),[null==f?void 0:f.settings,l]),y=(0,a.useCallback)((function(e){l({type:B.NJ,data:{queryId:s.id,index:u,settings:(0,v.A)((0,v.A)({},null==f?void 0:f.settings),{},{visibleColumns:e})}})}),[null==f?void 0:f.settings,l]);return!0===(null==f?void 0:f.resultReady)?(0,p.jsxs)("div",{className:ae(),children:[(null==f||null===(t=f.settings)||void 0===t?void 0:t.viewMode)===H.F.Table&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(c.$,{className:ae("item"),onClick:h,view:null!=f&&null!==(n=f.settings)&&void 0!==n&&n.transposed?"action":"normal",children:(0,p.jsx)(d.I,{data:U,width:16})}),(0,p.jsx)(Y,{className:ae("item"),allColumns:f.columns,columns:null===(r=f.settings)||void 0===r?void 0:r.visibleColumns,onChange:y}),(0,p.jsx)(oe,{queryId:s.id,resultIndex:u,className:ae("item"),allColumns:f.columns,visibleColumns:null===(i=f.settings)||void 0===i?void 0:i.visibleColumns})]}),(0,p.jsx)($.a,{className:ae("item"),options:se,value:null==f||null===(o=f.settings)||void 0===o?void 0:o.viewMode,onUpdate:m})]}):null}var le=n(38224),ce=n.n(le),de=n(25930),fe=n.n(de),he=n(34455),ve=n.n(he),pe=n(28407),me=n(70232),ge=n.n(me),ye=n(62786),xe=n(3659),be={escapeWhitespace:!1,decodeUTF8:!0,binaryAsHex:!0,escapeYQLStrings:!0,omitStructNull:!0,maxListSize:50,maxStringSize:void 0,treatValAsData:!0};function Ae(e,t,n){try{return xe.A.converters.yql([e,t],n)}catch(t){var r;console.log(t);try{r=JSON.stringify(e)}catch(t){r=String(e)}return xe.A.format({$value:"Failed to convert value: ".concat(r),$type:"yql.string"},n)}}function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be;try{return xe.A.format(e,t)}catch(r){var n;try{n=JSON.stringify(e)}catch(t){n=String(e)}return xe.A.format({$value:"Failed to format value: ".concat(n),$type:"yql.string"},t)}}var Ee=1e4;function _e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:be,r=Ae(e,t,n),i=r;null!=n&&n.maxStringSize&&(i=Ae(e,t,(0,v.A)((0,v.A)({},n),{},{maxStringSize:void 0})));var o="",a=!0;if("yql.tagged"===i.$type&&"url"===i.$tag){var s=i.$value;"tag_value"===s.$type?o=s.$value.text||s.$value.href:"string"==typeof s.$value&&(o=s.$value)}else a=(o=we(i,(0,v.A)((0,v.A)({},n),{},{asHTML:!1,maxStringSize:void 0}))).length<Ee;var u=a?we(r,n):"Escaped value";return(0,v.A)((0,v.A)({},i),{},{$formattedValue:u,$fullFormattedValue:r===i?u:a?we(i,(0,v.A)((0,v.A)({},n),{},{maxStringSize:void 0})):"",$rawValue:o})}var Ce=n(48971),je=n(16455),Se=n(33777),ke=n(29746),Ne=n(39760),Te=n.n(Ne),Re=n(27652);function Oe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return function(){var r=(0,pe.A)(ge().mark((function r(i,a){var s,u,l,c,d,f,h,v,p,m;return ge().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,l=(0,F.JO)(a(),e,t),i({type:B.uu,data:{queryId:e,index:t}}),c=n*l.pageSize,d=c+l.pageSize,r.next=7,i((0,te.X3)(e,t));case 7:if(r.t2=u=r.sent,r.t1=null===r.t2,r.t1){r.next=11;break}r.t1=void 0===u;case 11:if(!r.t1){r.next=15;break}r.t3=void 0,r.next=16;break;case 15:r.t3=u.schema.$value;case 16:if(r.t4=s=r.t3,r.t0=null!==r.t4,!r.t0){r.next=20;break}r.t0=void 0!==s;case 20:if(!r.t0){r.next=24;break}r.t5=s,r.next=25;break;case 24:r.t5=[];case 25:return f=r.t5,r.next=28,(0,Ce.fI)(i((0,te.BH)(e,t,{start:n*l.pageSize,end:d},f.map((function(e){return e.name})),{cellsSize:l.cellSize})),{toasterName:"load_result_page_".concat(n),skipSuccessToast:!0,errorTitle:"Failed to load query result #".concat(n)});case 28:h=r.sent,v=h.rows,p=h.yql_type_registry,m=h.rows.map((function(e){return Object.entries(e).reduce((function(e,t){var n=(0,o.A)(t,2),r=n[0],i=(0,o.A)(n[1],2),a=i[0],s=i[1];return e[r]=_e(a,p[Number(s)]),e}),{})})),Array.isArray(v)&&v.length&&i({type:B.zT,data:{queryId:e,index:t,results:m,settings:l,page:n}}),r.next=37;break;case 34:r.prev=34,r.t6=r.catch(0),i({type:B.uQ,data:{queryId:e,index:t,error:r.t6}});case 37:case"end":return r.stop()}}),r,null,[[0,34]])})));return function(e,t){return r.apply(this,arguments)}}()}var Ie=n(7787),Me=function(e){return e.ERROR="error",e.META="meta",e.RESULT="result",e.STATISTIC="statistic",e.PROGRESS="progress",e.CHART_TAB="chart-tab",e}({}),Pe=function(e){return"result/".concat(e)},Le=function(e){var t=e.split("/");return null!=t&&t[1]?parseInt(null==t?void 0:t[1],10):void 0},De=n(82564);function ze(){var e=(0,g.d4)(y.VQ);return e?(0,p.jsx)(De.DC,{fixedHeader:!0,virtual:!1,statistic:e,visibleColumns:["min","max","avg","sum","count"]}):null}function $e(e){var t=e.freeze,n=e.children,r=e.placeholder,i=void 0===r?null:r;return(0,p.jsx)(a.Suspense,{fallback:i,children:(0,p.jsx)(Fe,{freeze:t,children:n})})}function Fe(e){var t,n,r=e.freeze,i=e.children,o=a.useRef({});if(r&&!o.current.promise)throw o.current.promise=new Promise((function(e){o.current.resolve=e})),o.current.promise;if(r)throw o.current.promise;return o.current.promise&&(null===(t=(n=o.current).resolve)||void 0===t||t.call(n),o.current.promise=void 0),(0,p.jsx)(a.Fragment,{children:i})}var Ue=(0,u.A)("not-render-until-first-visible");function Be(e){var t=e.hide,n=e.className,r=e.children,i=a.useState(Boolean(t)),s=(0,o.A)(i,2),u=s[0],l=s[1];return a.useEffect((function(){var e=requestAnimationFrame((function(){l(Boolean(t))}));return function(){cancelAnimationFrame(e)}}),[t]),(0,p.jsx)("div",{style:u?{display:"none"}:void 0,className:Ue(null,n),children:(0,p.jsx)($e,{freeze:u,children:r})})}var He=a.createContext(void 0),qe=a.createContext(void 0),Ve=a.createContext(void 0),Ye=a.createContext(void 0),We=a.createContext(void 0),Ke=[{value:"graph",content:"Graph"},{value:"timeline",content:"Timeline"}];function Xe(e){var t=e.plan,n=e.progress,r=e.children,i=e.defaultView,s=a.useMemo((function(){return Ke}),[!1]),u=s[0].value,l=a.useState(null!=i?i:u),c=(0,o.A)(l,2),d=c[0],f=c[1],h=d;return s.find((function(e){return e.value===h}))||(h=u),(0,p.jsx)(He.Provider,{value:null!=t?t:null,children:(0,p.jsx)(Ve.Provider,{value:s,children:(0,p.jsx)(qe.Provider,{value:h,children:(0,p.jsx)(Ye.Provider,{value:f,children:(0,p.jsx)(We.Provider,{value:null!=n?n:null,children:r})})})})})}function Ge(){var e=a.useContext(We);if(void 0===e)throw new Error("useResultProgress must be used within a PlanProvider");return e}function Qe(){var e=a.useContext(qe);if(void 0===e)throw new Error("usePlanView must be used within a PlanProvider");return e}function Je(){var e=Qe(),t=function(){var e=a.useContext(Ve);if(void 0===e)throw new Error("usePlanView must be used within a PlanProvider");return e}(),n=function(){var e=a.useContext(Ye);if(void 0===e)throw new Error("useSetPlanView must be used within a PlanProvider");return e}();return(0,p.jsx)($.a,{options:t,value:e,onUpdate:function(e){n(e)}})}var Ze=n(82060),et=n(76662),tt=n(24966),nt=n(5219),rt=n(27222),it=n(14633),ot=n(27814),at=n(29870),st=(0,u.A)("data-type-popup");function ut(e){var t=e.children,n=e.type,r=e.hideIcon,i=e.className;return n?(0,p.jsx)(it.A,{className:st(null,i),tooltipClassName:st("tooltip"),content:n?(0,p.jsx)("div",{className:st("tooltip-container"),children:(0,p.jsx)(at.A,(0,v.A)({},n))}):null,hasArrow:!1,delayOpening:400,children:(0,p.jsxs)("span",{className:st("container"),children:[t,!r&&(0,p.jsx)(d.I,{className:st("icon"),data:ot.A,size:12})]})}):(0,p.jsx)("span",{className:st(null,i),children:t})}var lt=n(77318),ct=n(93209),dt=(0,u.A)("yql-result-table"),ft=Symbol("__index__");function ht(e,t){return n=e,r=ft,"object"===(0,T.A)(n)&&n&&Reflect.has(n,r)?e[ft]:t;var n,r}function vt(){window.dispatchEvent(new Event("resize"))}var pt={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:et.zQ,stickyTop:0,syncHeadOnResize:!0},mt=(0,v.A)((0,v.A)({},pt),{},{displayIndices:!1}),gt=[];function yt(e){var t=e.className,n=e.header,s=void 0===n?gt:n,u=e.rows,l=void 0===u?gt:u,c=e.totals,d=void 0===c?gt:c,f=e.showColumns,h=void 0===f?gt:f,m=e.theme,g=void 0===m?"yandex-cloud":m,y=e.format,x=e.formatterSettings,b=e.defaultNumberAlign,A=void 0===b?rt.Ay.RIGHT:b,E=e.resultType,_=e.emptyDataMessage,C=e.message,j=e.isError,S=e.transpose,k=void 0!==S&&S,N=e.page,T=void 0===N?1:N,R=e.pageSize,O=void 0===R?l.length:R,I=e.startIndex,M=e.sortOrder,P=e.onSort,L=e.showFullValueInDialog,D=e.containerRef,z=e.onShowPreview,$="function"==typeof P,F=a.useMemo((function(){var e=s.map((function(e){var t=e.name,n=e.displayName,r=e.type,i=void 0===r?{}:r;return{name:t,header:(0,p.jsx)(ut,{type:i,children:null!=n?n:t}),className:e.key||e.sort?"is-key":void 0,accessor:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})[t]},sortable:$&&Boolean(i.simple),sortAccessor:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})[t].$sortValue},render:function(n){var r,i;if("function"==typeof e.render)return e.render(n);var o,s=n,u=s.value,l=s.index;if(!u)return(0,p.jsx)("span",{className:"unipika",children:"<unsupported data type>"});o=Object.prototype.hasOwnProperty.call(u,"$formattedValue")?u.$formattedValue:y(u,x);var c,d=function(e){return"string"==typeof e&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}(null!==(r=u.$rawValue)&&void 0!==r?r:u.$value),f=null!==(i=u.$fullFormattedValue)&&void 0!==i?i:o;if("yql.string"===u.$type&&o.startsWith('<span class="quote">'))c=o;else{var h=o.split("\n");c=h.length>8?h.slice(0,5).join("\n"):o}var v=c!==f,m=u.$additions?(0,p.jsxs)(a.Fragment,{children:[(0,p.jsx)("br",{}),(0,p.jsx)(w.E,{color:"light-hint",children:u.$additions})]}):null,g=function(){z(t,l)},b=u.$incomplete;return v?(0,p.jsxs)(wt,{rawValue:d,onPreviewClick:g,isTruncated:b,children:[L?(0,p.jsx)(a.Fragment,{children:(0,p.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:c}})}):(0,p.jsx)(bt,{onClick:vt,strippedDown:c,formattedValue:f}),m]}):(0,p.jsxs)(wt,{rawValue:d,onPreviewClick:g,isTruncated:b,children:[(0,p.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:o}}),m]})},align:i.numeric?A:void 0}}));return e}),[s,$,A,y,x,L,z]),U=(T-1)*O,B=$?1:null!=I?I:U+1,H=a.useMemo((function(){return function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=e.map((function(e,t){return(0,v.A)((0,r.A)({},ft,i+t),e)}));if(!n)return o;var a=(Array.isArray(n)?n:[n]).reduce((function(e,t){var n=t.columnId,r=t.order;return e[n]=r,e}),{}),s={};t.forEach((function(e){a[e.name]&&(s[e.name]=function(e,t){var n=t;return function(t,r){var i,o;return"function"==typeof e.sortAccessor&&(i=e.sortAccessor(t),o=e.sortAccessor(r)),Number.isNaN(i)&&!Number.isNaN(o)?Number(n):Number.isNaN(o)&&!Number.isNaN(i)||null==i&&null!=o?Number(-n):null==o&&null!=i?Number(n):i<o?Number(-n):i>o?Number(n):0}}(e,a[e.name]))}));var u=Object.keys(a).map((function(e){return s[e]})).filter(Boolean);return u.length&&o.sort((function(e,t){var n=0;return u.some((function(r){return n=r(e,t),Boolean(n)})),n||e[ft]-t[ft]})),o}(l,F,M,B)}),[l,F,M,B]),q=a.useMemo((function(){var e=h.map((function(e){return F.find((function(t){return t.name===e}))})).filter(Boolean),t=H.slice(U,U+O);if(!k)return[e,t,d];var n=t.map((function(e,t){return{name:String(U+t),header:xt(e),render:function(t){var n=t.value;return n.column.render({value:n.data,row:e})}}})).concat(d.map((function(e,t){var n=e.footerIndex;return{name:"footer".concat(t),header:String(n||t),render:function(e){var t=e.value;return t.column.render({value:t.data,footer:!0})}}}))),r=e.map((function(e){for(var t={name:e.name},n=U;n<U+O&&n!==H.length;n++)t[String(n)]={column:e,data:H[n][e.name]};return d.forEach((function(n,r){t["footer".concat(r)]={column:e,data:n[e.name]}})),t}));return[[{name:"name",header:"Name"}].concat((0,i.A)(n)),r,[]]}),[h,H,U,O,k,d,F]),V=(0,o.A)(q,3),Y=V[0],W=V[1],K=V[2];return"table"===E?(0,p.jsx)("div",{ref:D,className:dt(null,t),children:(0,p.jsx)(lt.Ay,{columns:Y,data:W,footerData:0===K.length?void 0:K,settings:k?mt:pt,startIndex:B,emptyDataMessage:_,theme:g,rowKey:ht,sortOrder:M,onSort:P,visibleRowIndex:k?void 0:xt})}):"cell"===E||"untyped"===E?(0,p.jsx)("div",{ref:D,className:dt({mode:E},t),children:(0,p.jsx)("div",{className:"unipika",dangerouslySetInnerHTML:{__html:l[0].content}})}):C?(0,p.jsx)("div",{className:dt("message",{error:j}),children:C}):null}function xt(e){return E.A.format.Number(e[ft])}function bt(e){var t=e.formattedValue,n=e.strippedDown,r=e.onClick,i=a.useState(!1),s=(0,o.A)(i,2),u=s[0],l=s[1];return(0,p.jsxs)(a.Fragment,{children:[(0,p.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:u?t:n}}),(0,p.jsx)("br",{}),(0,p.jsx)(ct.S,{onClick:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){l((function(e){return!e})),null==r||r()})),children:u?"Show less":"Show more"})]})}var At=dt("cell-action");function wt(e){var t=e.children,n=e.rawValue,r=e.onPreviewClick,i=e.isTruncated,s=a.useRef(null),u=a.useState(!1),l=(0,o.A)(u,2),f=l[0],h=l[1];return a.useEffect((function(){var e,t=null===(e=s.current)||void 0===e?void 0:e.parentElement;function n(){h(!0)}function r(e){null!=t&&t.contains(e.relatedTarget)||h(!1)}return null==t||t.addEventListener("mouseover",n),null==t||t.addEventListener("mouseout",r),function(){null==t||t.removeEventListener("mouseover",n),null==t||t.removeEventListener("mouseout",r)}}),[]),(0,p.jsxs)("span",{ref:s,children:[(0,p.jsx)("span",{className:dt("cell-content"),children:t}),f&&(0,p.jsxs)(p.Fragment,{children:[n&&!i&&(0,p.jsx)(nt.b,{className:At,text:n,size:"s"}),i&&(0,p.jsx)(c.$,{className:At,view:"flat-secondary",size:"s",onClick:r,children:(0,p.jsx)(d.I,{data:tt.A,size:"12"})})]})]})}var Et=n(31470),_t=n.n(Et),Ct={escapeWhitespace:!1,decodeUTF8:!0,showDecoded:!1,binaryAsHex:!0,escapeYQLStrings:!0,stringAsJSON:!1,omitStructNull:!0,maxStringSize:void 0,customNumberFormatter:{numberFormatDigitSpaces:!0,numberFormatDisableExponential:!0,numberFormatPrecision:void 0}},jt=a.memo((function(e){var t=e.result,n=e.onShowPreview,r=function(e){var t,n,r=(0,a.useState)(void 0),i=(0,o.A)(r,2),s=i[0],u=i[1];(0,a.useEffect)((function(){var t=setTimeout((function(){u(e)}),0);return function(){clearTimeout(t)}}),[e]);var l=(0,a.useMemo)((function(){var t,n;return null!==(t=e.settings)&&void 0!==t&&t.visibleColumns?null===(n=e.settings)||void 0===n?void 0:n.visibleColumns:e.columns.map((function(e){return e.name}))}),[null===(t=e.settings)||void 0===t?void 0:t.visibleColumns,s]),c=(0,a.useMemo)((function(){return 1+(e.page?e.page*e.settings.pageSize:0)}),[e.page,e.settings.pageSize]);return[e.results,e.columns,l,Boolean(null===(n=e.settings)||void 0===n?void 0:n.transposed),c]}(t),i=(0,o.A)(r,5),s=i[0],u=i[1],l=i[2],c=i[3],d=i[4];return(0,p.jsx)(yt,{format:we,formatterSettings:Ct,header:u,rows:s,transpose:c,resultType:"table",showColumns:l,defaultNumberAlign:"right",startIndex:d,theme:et.ll,onShowPreview:n})}),(function(e,t){var n,r,i,o;return e.result.columns===t.result.columns&&e.result.results===t.result.results&&_t()(null===(n=e.result.settings)||void 0===n?void 0:n.visibleColumns,null===(r=t.result.settings)||void 0===r?void 0:r.visibleColumns)&&(null===(i=e.result.settings)||void 0===i?void 0:i.transposed)===(null===(o=t.result.settings)||void 0===o?void 0:o.transposed)})),St=(0,u.A)("query-result-scheme"),kt={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:et.zQ,stickyTop:0},Nt=[{name:"name",header:"Name",sortable:!1,width:"auto",render:function(e){var t=e.row;return(0,p.jsx)("span",{className:St("item"),children:(0,p.jsx)("span",{className:St("name"),title:t.name,children:t.name})})}},{name:"type",header:"Type",width:"auto",sortable:!1,render:function(e){var t=e.row;return(0,p.jsx)(at.A,(0,v.A)({},t.type))}}],Tt=a.memo((function(e){var t=e.result;return(0,p.jsx)(rt.Ay,{theme:"yandex-cloud",columns:Nt,data:t.columns,startIndex:1,settings:kt})}));function Rt(e){var t=e.result,n=e.className;return(0,p.jsxs)("div",{className:St(null,n),children:[(0,p.jsx)(w.E,{variant:"subheader-2",as:"div",className:St("title"),children:"Scheme"}),(0,p.jsx)("div",{className:St("table-wrap"),children:(0,p.jsx)(Tt,{result:t})})]})}var Ot=n(60090),It=n(98364),Mt=(0,u.A)("query-result-paginator"),Pt=[{value:String(10),content:"10"},{value:String(50),content:"50"},{value:String(100),content:"100"},{value:String(200),content:"200"}];function Lt(e){var t=e.queryId,n=e.resultIndex,r=e.className,i=(0,g.wA)(),s=function(e,t){var n=(0,a.useState)({lastPage:0,pageSize:0}),r=(0,o.A)(n,2),i=r[0],s=r[1],u=(0,g.d4)((function(n){return(0,F.iI)(n,e,t)}));return(0,a.useEffect)((function(){if(null!=u&&u.resultReady){var e=Math.ceil(((null==u?void 0:u.meta.data_statistics.row_count)||0)/((null==u?void 0:u.settings.pageSize)||1))-1;s({pageSize:(null==u?void 0:u.settings.pageSize)||0,lastPage:e})}}),[u]),[(null==u?void 0:u.page)||0,i]}(t,n),u=(0,o.A)(s,2),l=u[0],c=u[1],d=c.pageSize,f=c.lastPage,h=(0,a.useCallback)((function(e){var r=(0,o.A)(e,1)[0];i(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return function(r){r({type:B.NJ,data:{queryId:e,index:t,settings:n}}),r(Oe(e,t,0))}}(t,n,{pageSize:Number(r)}))}),[i]),v=(0,a.useCallback)((function(e){i(Oe(t,n,e))}),[t]);return(0,p.jsxs)("div",{className:Mt(null,r),children:[(0,p.jsx)(Ot.l,{className:Mt("control"),value:[d.toString()],options:Pt,onUpdate:h}),(0,p.jsx)(It.A,{className:Mt("control"),value:l,min:0,max:f,onChange:v,step:1})]})}var Dt=n(75566),zt=n(76365),$t=n(54522),Ft=(0,u.A)("query-result-table");function Ut(e){var t,n=e.result,r=e.onShowPreview,i=null==n||null===(t=n.settings)||void 0===t?void 0:t.viewMode,o=function(e){var t=e.meta.data_statistics.row_count,n=e.meta.is_truncated,r=e.settings.pageSize;return{start:r*e.page+1,end:Math.min(r*e.page+r,t),total:t,truncated:n}}(n),a=o.start,s=o.end,u=o.total,l=o.truncated;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Be,{hide:i!==H.F.Scheme,children:(0,p.jsx)(Rt,{result:n})}),(0,p.jsxs)(Be,{hide:i!==H.F.Table,children:[(0,p.jsx)("div",{className:Ft("result-info"),children:(0,p.jsxs)(w.E,{children:["Rows ",a,"-",s," of ",u,"".concat(l?" (truncated)":"")]})}),(0,p.jsx)(jt,{result:n,onShowPreview:r})]})]})}var Bt=a.memo((function(e){var t=e.query,n=e.index,r=(0,g.wA)(),i=(0,g.d4)((function(e){return(0,F.iI)(e,t.id,n)})),o=a.useCallback((function(e,i){r(function(e,t,n){return function(){var r=(0,pe.A)(ge().mark((function r(i){var o,a,s,u,l,c;return ge().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return(0,g.vA)((function(){i({type:$t.w.REQUEST,data:{}}),i((0,Dt.ZD)())})),r.prev=1,r.next=4,i((0,te.BH)(e,t,{start:n.rowIndex,end:n.rowIndex+1},[n.columnName],{cellsSize:$t.F},Dt.Be.removeAllAndSave));case 4:o=r.sent,a=o.rows[0][n.columnName][0],s=o.rows[0][n.columnName][1],u=o.yql_type_registry[Number(s)],l=_e(a,u,{maxListSize:void 0,maxStringSize:void 0,treatValAsData:!0}),c=l.$type,i({type:$t.w.SUCCESS,data:{data:{$value:a,$type:c}}}),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(1),(0,zt.m)(r.t0)||i({type:$t.w.FAILURE,data:{error:r.t0}});case 15:case"end":return r.stop()}}),r,null,[[1,12]])})));return function(e){return r.apply(this,arguments)}}()}(t.id,n,{columnName:e,rowIndex:i}))}),[n,t.id]);return(0,p.jsxs)("div",{className:Ft(),children:[((null==i?void 0:i.state)===H.t.Init||(null==i?void 0:i.state)===H.t.Loading)&&(0,p.jsx)("div",{className:Ft("loading"),children:(0,p.jsx)(h.a,{size:"m"})}),(null==i?void 0:i.resultReady)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ut,{result:i,onShowPreview:o}),i.settings.viewMode===H.F.Table&&(0,p.jsx)(Lt,{className:Ft("pagination"),queryId:t.id,resultIndex:n})]}),(null==i?void 0:i.state)===H.t.Error&&(0,p.jsx)(Ze.A,{error:i.error})]})}),(function(e,t){return e.query.id===t.query.id&&e.index===t.index})),Ht=function(e){var t=e.query,n=e.activeResultParams,r=(0,g.wA)();return(0,a.useEffect)((function(){n&&r(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(){var n=(0,pe.A)(ge().mark((function n(r,i){var a,s,u,l,c,d,f,h,v,p;return ge().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=i(),!(0,F.kz)(a,e,t)){n.next=3;break}return n.abrupt("return");case 3:return n.prev=3,r({type:B.uu,data:{queryId:e,index:t}}),n.next=7,r((0,te.X3)(e,t));case 7:if(null==(s=n.sent)||!s.error){n.next=10;break}throw s.error;case 10:return n.next=12,r((0,Re.c)(null));case 12:return u=(0,je.$n)(i()),l=ke.Ay.getValue(null==s?void 0:s.schema)||[],c=l.map((function(e){var t=e.name,n=e.type_v3;return{name:t,type:(0,ye.Pw)((0,Se.z)(n,u)),displayName:t}}))||[],d=(0,F.GN)(),n.next=18,(0,Ce.fI)(r((0,te.BH)(e,t,{start:0,end:d.pageSize},c.map((function(e){return e.name})),{cellsSize:d.cellSize})),{toasterName:"load_result",skipSuccessToast:!0,errorTitle:"Failed to load query result"});case 18:f=n.sent,h=f.rows,v=f.yql_type_registry,p=h.map((function(e){return Object.entries(e).reduce((function(e,t){var n=(0,o.A)(t,2),r=n[0],i=(0,o.A)(n[1],2),a=i[0],s=i[1];return e[r]=_e(a,v[Number(s)]),e}),{})})),r({type:B.dg,data:{queryId:e,index:t,results:p,columns:c,meta:s}}),n.next=27;break;case 24:n.prev=24,n.t0=n.catch(3),r({type:B.uQ,data:{queryId:e,index:t,error:n.t0}});case 27:case"end":return n.stop()}}),n,null,[[3,24]])})));return function(e,t){return n.apply(this,arguments)}}()}(n.queryId,n.resultIndex))}),[n,r]),(0,p.jsx)(Bt,{query:t,index:(null==n?void 0:n.resultIndex)||0})},qt=function(e){var t;return(null===(t=Ie.Ay.getQueryResultChartTab())||void 0===t?void 0:t.renderContent(e))||null},Vt=function(e){return(e+1)%1e6};function Yt(){return(0,a.useReducer)(Vt,0)[1]}var Wt=n(24567),Kt=n(44304),Xt=n(55740),Gt=(0,u.A)("yql-loader");function Qt(e){var t=e.className,n=e.size,r=e.local,i=e.statical,s=e.delay,u=void 0===s?600:s,l=e.veil,c=a.useState(!1),d=(0,o.A)(c,2),f=d[0],v=d[1];return a.useEffect((function(){var e=setTimeout((function(){v(!0)}),u);return function(){clearTimeout(e)}}),[]),f?(0,p.jsx)("div",{className:Gt({local:r,veil:l,statical:i},t),children:(0,p.jsx)(h.a,{size:n})}):null}var Jt=n(92225),Zt=n(59994),en={grad:.9,turn:360,rad:360/(2*Math.PI)},tn=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},nn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},rn=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},on=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},an=function(e){return{r:rn(e.r,0,255),g:rn(e.g,0,255),b:rn(e.b,0,255),a:rn(e.a)}},sn=function(e){return{r:nn(e.r),g:nn(e.g),b:nn(e.b),a:nn(e.a,3)}},un=/^#([0-9a-f]{3,8})$/i,ln=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},cn=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(s<0?s+6:s),s:o?a/o*100:0,v:o/255*100,a:i}},dn=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),u=r*(1-(1-t+o)*n),l=o%6;return{r:255*[r,s,a,a,u,r][l],g:255*[u,r,r,s,a,a][l],b:255*[a,a,u,r,r,s][l],a:i}},fn=function(e){return{h:on(e.h),s:rn(e.s,0,100),l:rn(e.l,0,100),a:rn(e.a)}},hn=function(e){return{h:nn(e.h),s:nn(e.s),l:nn(e.l),a:nn(e.a,3)}},vn=function(e){return dn((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},pn=function(e){return{h:(t=cn(e)).h,s:(i=(200-(n=t.s))*(r=t.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,r,i},mn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yn=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xn=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bn={string:[[function(e){var t=un.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?nn(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?nn(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=yn.exec(e)||xn.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:an({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=mn.exec(e)||gn.exec(e);if(!t)return null;var n,r,i=fn({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(en[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return vn(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=void 0===i?1:i;return tn(t)&&tn(n)&&tn(r)?an({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,i=e.a,o=void 0===i?1:i;if(!tn(t)||!tn(n)||!tn(r))return null;var a=fn({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return vn(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,o=void 0===i?1:i;if(!tn(t)||!tn(n)||!tn(r))return null;var a=function(e){return{h:on(e.h),s:rn(e.s,0,100),v:rn(e.v,0,100),a:rn(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return dn(a)},"hsv"]]},An=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},wn=function(e,t){var n=pn(e);return{h:n.h,s:rn(n.s+100*t,0,100),l:n.l,a:n.a}},En=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},_n=function(e,t){var n=pn(e);return{h:n.h,s:n.s,l:rn(n.l+100*t,0,100),a:n.a}},Cn=function(){function e(e){this.parsed=function(e){return"string"==typeof e?An(e.trim(),bn.string):"object"==typeof e&&null!==e?An(e,bn.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return nn(En(this.rgba),2)},e.prototype.isDark=function(){return En(this.rgba)<.5},e.prototype.isLight=function(){return En(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=sn(this.rgba)).r,n=e.g,r=e.b,o=(i=e.a)<1?ln(nn(255*i)):"","#"+ln(t)+ln(n)+ln(r)+o;var e,t,n,r,i,o},e.prototype.toRgb=function(){return sn(this.rgba)},e.prototype.toRgbString=function(){return t=(e=sn(this.rgba)).r,n=e.g,r=e.b,(i=e.a)<1?"rgba("+t+", "+n+", "+r+", "+i+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,i},e.prototype.toHsl=function(){return hn(pn(this.rgba))},e.prototype.toHslString=function(){return t=(e=hn(pn(this.rgba))).h,n=e.s,r=e.l,(i=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+i+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,i},e.prototype.toHsv=function(){return e=cn(this.rgba),{h:nn(e.h),s:nn(e.s),v:nn(e.v),a:nn(e.a,3)};var e},e.prototype.invert=function(){return jn({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),jn(wn(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),jn(wn(this.rgba,-e))},e.prototype.grayscale=function(){return jn(wn(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),jn(_n(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),jn(_n(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?jn({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):nn(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=pn(this.rgba);return"number"==typeof e?jn({h:e,s:t.s,l:t.l,a:t.a}):nn(t.h)},e.prototype.isEqual=function(e){return this.toHex()===jn(e).toHex()},e}(),jn=function(e){return e instanceof Cn?e:new Cn(e)},Sn=[],kn=function(e){e.forEach((function(e){Sn.indexOf(e)<0&&(e(Cn,bn),Sn.push(e))}))};function Nn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body;return getComputedStyle(t).getPropertyValue(e)}kn([function(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var o={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var i,a,s=r[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var u=this.toRgb(),l=1/0,c="black";if(!o.length)for(var d in n)o[d]=new e(n[d]).toRgb();for(var f in n){var h=(i=u,a=o[f],Math.pow(i.r-a.r,2)+Math.pow(i.g-a.g,2)+Math.pow(i.b-a.b,2));h<l&&(l=h,c=f)}return c}},t.string.push([function(t){var r=t.toLowerCase(),i="transparent"===r?"#0000":n[r];return i?new e(i).toRgb():null},"name"])}]);var Tn=a.createContext(void 0);function Rn(e){var t=e.children,n=e.container,r=(0,Zt.i)(),i=a.useState((function(){return On(n)})),s=(0,o.A)(i,2),u=s[0],l=s[1];return a.useEffect((function(){l((function(e){var t=On(n);return _t()(e,t)?e:t}))}),[r,n]),(0,p.jsx)(Tn.Provider,{value:u,children:t})}function On(e){var t=function(t){return n=Nn("--yql-graph-color-".concat(t),null!=e?e:void 0),jn(n).toHex();var n};return{operation:{new:t("operation-new"),newBorder:t("operation-new-border"),newBackground:t("operation-new-background"),pending:t("operation-pending"),completed:t("operation-completed"),completedBorder:t("operation-completed-border"),completedBackground:t("operation-completed-background"),aborted:t("operation-aborted"),abortedBorder:t("operation-aborted-border"),abortedBackground:t("operation-aborted-background"),failed:t("operation-failed"),failedBorder:t("operation-failed-border"),failedBackground:t("operation-failed-background"),running:t("operation-running"),runningBorder:t("operation-running-border"),runningBackground:t("operation-running-background"),started:t("operation-started"),startedBorder:t("operation-started-border"),startedBackground:t("operation-started-background")},table:{fill1:t("table-fill1"),fill2:t("table-fill2")},edge:{color:t("edge"),highlight:t("edge-highlight")},text:{label:t("text-label"),link:t("text-link"),operationCount:t("text-operation-count")}}}function In(){var e=a.useContext(Tn);if(void 0===e)throw new Error("useGraphColors must be used within a GraphColorsProvider");return e}var Mn=n(70436),Pn=(0,u.A)("node-details-info");function Ln(e){var t=e.Streams,n=e.InputColumns,r=e.InputKeyFilterColumns;return(0,p.jsxs)("div",{className:Pn(),children:[t&&(0,p.jsx)(Mn.A,{name:"Streams",size:"ns",collapsed:!1,children:(0,p.jsx)("div",{className:Pn("streams"),children:Object.keys(t).map((function(e){return(0,p.jsx)(Dn,{name:e,data:t[e]},e)}))})}),(0,p.jsx)($n,{data:n,title:"InputColumns"}),(0,p.jsx)($n,{data:r,title:"InputKeyFilterColumns"})]})}function Dn(e){var t=e.name,n=e.data;return(0,p.jsxs)("div",{className:Pn("entry"),children:[(0,p.jsx)("div",{className:Pn("entry-name"),children:t}),Array.isArray(n)&&(0,p.jsx)("div",{className:Pn("entry-items"),children:n.map((function(e,t){return(0,p.jsx)(zn,(0,v.A)({},e),t)}))})]})}function zn(e){var t=e.Name,n=e.Children;return(0,p.jsxs)("div",{className:Pn("item"),children:[(0,p.jsx)(w.E,{className:Pn("item-name"),color:"complementary",children:t}),Array.isArray(n)&&(0,p.jsx)("div",{className:Pn("item-children"),children:n.map((function(e,t){return(0,p.jsx)("div",{className:Pn("item-group"),children:e.map((function(e,t){return(0,p.jsx)(zn,(0,v.A)({},e),t)}))},t)}))})]})}function $n(e){var t,n=e.data,r=e.title;return n?function(e){return Array.isArray(e)&&e.some((function(e){return Array.isArray(e)}))}(n)?(0,p.jsx)(a.Fragment,{children:n.map((function(e,t){return e?(n=Array.isArray(e)?e:[e],(0,p.jsx)(Mn.A,{name:"".concat(r," #").concat(t+1),size:"ns",children:(0,p.jsx)(Fn,{items:n,limit:20})},t)):null;var n}))}):(t=Array.isArray(n)?n:[n],(0,p.jsx)(Mn.A,{name:r,size:"ns",collapsed:!1,children:(0,p.jsx)(Fn,{items:t,limit:20})})):null}function Fn(e){var t,n=e.items,r=e.limit,i=e.className,s=a.useState(!1),u=(0,o.A)(s,2),l=u[0],d=u[1],f=r&&!l?Math.min(n.length,r):n.length,h=n.length-f,v=0===f,m=h>0?n.slice(0,f):n;return(0,p.jsxs)("div",{className:Pn("columns",i),children:[m.map((function(e,t){return(0,p.jsx)("div",{className:Pn("columns-column"),children:(0,p.jsx)(w.E,{color:"complementary",children:e})},t)})),Boolean(h)&&(0,p.jsx)(c.$,{className:Pn("columns-expand"),onClick:function(e){e.stopPropagation(),d(!0)},children:(t=h,"Show ".concat(t," more items"))}),v&&(0,p.jsx)("div",{className:Pn("columns-empty"),children:"Empty list"})]})}var Un=(0,u.A)("node-jobs"),Bn=[{name:"status",header:"Status",sortable:!1,render:function(e){var t=e.row,n=e.footer;return(0,p.jsxs)("div",{className:Un("item"),children:[(0,p.jsx)("div",{className:Un("item-color",{status:t.status.toLowerCase()})}),(0,p.jsx)(w.E,{className:Un("item-title"),color:n?"primary":"secondary",children:t.status})]})}},{name:"count",header:"Quantity",align:rt.Ay.RIGHT,sortable:!1}];function Hn(e){var t=e.running,n=void 0===t?0:t,r=e.completed,i=void 0===r?0:r,o=e.failed,a=void 0===o?0:o,s=e.aborted,u=void 0===s?0:s,l=e.total,c=void 0===l?0:l,d=[];return d.push({status:"Pending",count:c-n-i-a-u}),d.push({status:"Running",count:n}),d.push({status:"Completed",count:i}),d.push({status:"Failed",count:a}),d.push({status:"Aborted",count:u}),(0,p.jsx)("div",{className:Un(),children:(0,p.jsx)(rt.Ay,{theme:"yandex-cloud",columns:Bn,data:d,footerData:[{status:"Total",count:c}],settings:{displayIndices:!1}})})}var qn=n(18801),Vn=n(71291),Yn=n.n(Vn),Wn=n(67981),Kn=n.n(Wn),Xn="StructType",Gn="ListType",Qn="StreamType",Jn="TupleType",Zn="DictType",er="DataType",tr="VariantType",nr="OptionalType",rr="TaggedType",ir="VoidType",or="NullType",ar="EmptyDictType",sr="EmptyListType",ur=["Void","Yson","Json","Null"],lr=["Double","Float","Int64","Int32","Int16","Int8","Uint64","Uint32","Uint16","Uint8"],cr=["Date","TzDate","Datetime","TzDatetime","Timestamp","TzTimestamp","Interval"],dr=["String","Utf8","Json"];function fr(e){return lr.indexOf(e)>=0}function hr(e){return cr.indexOf(e)>=0}function vr(e){return dr.indexOf(e)>=0}function pr(e){return Array.isArray(e)&&e[0]===Gn&&Array.isArray(e[1])}function mr(e){return Array.isArray(e)&&e[0]===Jn&&Array.isArray(e[1])}function gr(e){return Array.isArray(e)&&e[0]===Xn&&Array.isArray(e[1])}function yr(e){for(var t=e;t[0]===nr;)t=t[1];if(t[0]===Xn){var n=Yn()(t[1]);return["Bins","Max","Min","WeightsSum"].every((function(e){return Object.prototype.hasOwnProperty.call(n,e)}))&&Array.isArray(n.Bins)&&n.Bins[0]===Gn&&n.Bins[1][0]===Xn&&_t()(Kn().apply(void 0,(0,i.A)(n.Bins[1][1]))[0].sort(),["Frequency","Position"])}return!1}function xr(e){return"Struct"===e.name}function br(e){return"Variant"===e.name}function Ar(e){return Boolean(e.complex)}function wr(e){switch(e[0]){case er:return{name:e[1],simple:(n=e[1],ur.indexOf(n)<0),numeric:fr(e[1]),dateTime:hr(e[1]),string:vr(e[1]),params:e.slice(2)};case nr:return function(e){return e.optional&&(e.optionalLevel=(e.optionalLevel||1)+1),e.optional=!0,e}(wr(e[1]));case rr:return function(e,t){return e.tagged=!0,e.tags=(e.tags||[]).concat(t),e}(wr(e[2]),e[1]);case Zn:return e[2][0]===ir?{name:"Set",complex:!0,type:wr(e[1])}:{name:"Dict",complex:!0,type:e.slice(1).map(wr)};case Gn:return{name:"List",complex:!0,type:wr(e[1])};case ar:return{name:"EmptyDict"};case sr:return{name:"EmptyList"};case Qn:return{name:"Stream",complex:!0,type:wr(e[1])};case Jn:return{name:"Tuple",complex:!0,type:e[1].map(wr)};case Xn:return{name:"Struct",complex:!0,struct:e[1].map((function(e){return{key:e[0],type:wr(e[1])}}))};case tr:var t=function(e){var t=wr(e);switch(t.name){case"Tuple":return t.type.map((function(e,t){return{key:t,type:e}}));case"Struct":return t.struct;default:throw new Error("Invalid type in Variant type: ".concat(t.name))}}(e[1]);return t.every((function(e){return"Void"===e.type.name}))?{name:"Enum",complex:!0,type:t.map((function(e){return{name:e.key}}))}:{name:"Variant",complex:!0,struct:t};case ir:return{name:"Void"};case or:return{name:"Null",null:!0};default:return{name:"Unknown"}}var n}var Er=["level","defaultExpanded"],_r=(0,u.A)("data-type"),Cr=function(e){var t=e.entry,n=e.level;return(0,p.jsxs)(a.Fragment,{children:[(0,p.jsx)("span",{className:_r("struct-key"),children:t.key},"key")," : ",(0,p.jsx)(jr,(0,v.A)({level:n},t.type),"type")]})};function jr(e){var t=e.level,n=void 0===t?0:t,r=e.defaultExpanded,i=(0,qn.A)(e,Er),s=a.useState(void 0===r?n<2:r),u=(0,o.A)(s,2),l=u[0],c=u[1],d=i.optional,f=i.optionalLevel,h=i.name,m=i.tagged,g=i.tags,y=i.params,x=i.complex;return(0,p.jsxs)(a.Fragment,{children:[(0,p.jsxs)("span",{className:_r({optional:d,complex:x,"optional-multilevel":(null!=f?f:0)>0}),"data-optional":f?"optional × ".concat(f):void 0,onClick:function(){return c((function(e){return!e}))},children:[h,Array.isArray(y)&&y.length>0&&"(".concat(y.join(", "),")"),m&&g?g.map((function(e){return(0,p.jsx)("span",{className:_r("tag"),children:e},e)})):null]},"name"),Ar(i)?(0,p.jsxs)("div",{className:_r("subtype",{expanded:l}),children:[(0,p.jsx)("span",{className:_r("ellipsis"),onClick:function(){return c((function(e){return!e}))}}),l&&(0,p.jsx)("div",{className:_r("content",{expanded:l}),children:xr(i)||br(i)?i.struct.map((function(e,t){return(0,p.jsx)(Cr,{level:n+1,entry:e},t)})):(Array.isArray(i.type)?i.type:[i.type]).map((function(e,t){return(0,p.jsx)(jr,(0,v.A)({level:n+1},e),t)}))})]},"subtype"):(0,p.jsx)("br",{},"separator")]})}const Sr=function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,p.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 12.75c0 .414.336.75.75.75h12.5a.75.75 0 0 0 0-1.5H1.75a.75.75 0 0 0-.75.75M1 8c0 .414.336.75.75.75h8.5a.75.75 0 0 0 0-1.5h-8.5A.75.75 0 0 0 1 8m.75-4a.75.75 0 0 1 0-1.5h2.5a.75.75 0 0 1 0 1.5z",clipRule:"evenodd"})}))};var kr=n(10559),Nr=n(88150),Tr=(0,u.A)("yql-schema-table"),Rr=[{name:"name",header:"Name",sortable:!1,render:function(e){var t=e.row;if("function"==typeof t.onNameClick){var n=t.onNameClick;return(0,p.jsxs)(ct.S,{color:"primary",className:Tr("item"),onClick:function(){n(t.name)},children:[t.sort&&(0,p.jsx)(d.I,{className:Tr("sort-icon"),data:t.sort.ascending?Sr:kr.A,size:16}),(0,p.jsx)("span",{className:Tr("name"),title:t.name,children:t.name}),(0,p.jsx)(d.I,{className:Tr("insert-icon"),data:Nr.A,size:16})]})}return(0,p.jsxs)("span",{className:Tr("item"),children:[t.sort&&(0,p.jsx)(d.I,{className:Tr("sort-icon"),data:t.sort.ascending?Sr:kr.A,size:16}),(0,p.jsx)("span",{className:Tr("name"),title:t.name,children:t.name})]})}},{name:"type",header:"Type",sortable:!1,render:function(e){var t=e.row;return(0,p.jsx)(jr,(0,v.A)({},t.type))}}];function Or(e){var t=e.className,n=e.schemaFields;return(0,p.jsx)("div",{className:Tr(null,t),children:(0,p.jsx)(rt.Ay,{theme:"yandex-cloud",columns:Rr,data:n,startIndex:1})})}var Ir=["key"],Mr=function(e){return Boolean(e.type.simple)},Pr=function(e){return Boolean(e.type.simple)};function Lr(e){if(function(e){return!!mr(e)&&e[1].length>0&&e[1].every((function(e){return yr(e)}))}(e))return["HistogramTupleType",e[1].map((function(e){return["HistogramType",e]}))];if(function(e){return!!pr(e)&&yr(e[1])}(e))return["HistogramListType",["HistogramType",e[1]]];if(function(e){return!!gr(e)&&e[1].length>0&&e[1].every((function(e){return yr(e[1])}))}(e))return["HistogramStructType",e[1].map((function(e){return["HistogramType",e[1],e[0]]}))];if(n=e,Array.isArray(n)&&n[0]===tr&&(gr(n[1])||mr(n[1]))){var t=e[1];if(mr(t))return[tr,[t[0],t[1].map((function(e){return Lr(e)}))]];if(gr(t))return[tr,[t[0],t[1].map((function(e){return yr(e[1])?[e[0],["HistogramType",e[1],e[0]]]:e}))]]}var n;return yr(e)?["HistogramType",e]:e}function Dr(e){if(!Array.isArray(e))return{resultType:"untyped"};var t,n=wr(e),r=function(e){return"List"===e.name}(n)?n.type:n,i=e;return pr(i)&&(i=i[1]),gr(i)&&(i=i[1]),function(e){return Array.isArray(e)&&e[0]===nr&&Array.isArray(e[1])}(i)&&(i=i[1]),xr(r)&&Array.isArray(i)?{optional:Boolean(r.optional),resultType:pr(e)?"table":"row",scheme:null!==(t=r.struct.map((function(e,t){var n=e.key,r=(0,qn.A)(e,Ir);return(0,v.A)((0,v.A)({},r),{},{index:t,name:"".concat(n),downloadable:Mr(e),sortable:Pr(e)})})))&&void 0!==t?t:[],columns:i.map((function(e){return Lr(e[1])}))}:function(e){return"EmptyList"===e.name}(r)&&Array.isArray(i)?{resultType:"table",scheme:[],columns:[],optional:!1}:{resultType:"cell",scheme:{type:n},columns:e}}var zr=(0,u.A)("yql-node-schemas");function $r(e){var t=e.className,n=e.schemas;return(0,p.jsxs)("div",{className:zr(null,t),children:[n.inputs.length>0&&(0,p.jsx)(Fr,{title:"Inputs",schemas:n.inputs}),n.outputs.length>0&&(0,p.jsx)(Fr,{title:"Outputs",schemas:n.outputs})]})}function Fr(e){var t=e.title,n=e.schemas;return(0,p.jsx)(Mn.A,{className:zr("item",{title:!0}),size:"ss",name:t,collapsed:!1,children:(0,p.jsx)("div",{children:n.map((function(e){var t=e.name,r=Dr(e.type),i="table"===r.resultType||"row"===r.resultType?r.scheme:void 0;return i?(0,p.jsx)(Mn.A,{className:zr("item",{schema:!0}),size:"ns",name:t,collapsed:1!==n.length,children:(0,p.jsx)("div",{children:(0,p.jsx)(Or,{schemaFields:i})},t)},t):null}))})})}var Ur=n(70353),Br=n(73966),Hr=n(34563),qr=n(16040),Vr=n(74879),Yr=n(96843),Wr=n.n(Yr),Kr=n(55338);function Xr(e){return"number"==typeof e?Kr.c9.fromMillis(e):"string"==typeof e?Kr.c9.fromISO(e):e instanceof Date?Kr.c9.fromJSDate(e):Kr.c9.isDateTime(e)?e:Kr.c9.now()}var Gr={NotStarted:{title:"Not started"},Started:{title:"Waiting"},InProgress:{title:"Running"},Finished:{title:"Completed"},Failed:{title:"Failed"},Aborted:{title:"Aborted"}},Qr=25;function Jr(e){return e.length>Qr?"…"+e.slice(-Qr):e}function Zr(e,t){try{var n=Object.keys(t[Object.keys(t).length-1])[0];return"".concat(Jr(e),"\n(").concat(n,")")}catch(e){return""}}function ei(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"h:mm:ss.SSS",r=Xr(e),i=Xr(t),o=i.diff(r);return r>i?o.negate().toFormat(n):o.toFormat(n)}function ti(e){return e&&["Finished","Failed","Aborted"].indexOf(e)>=0}function ni(e){var t,n,r=e.type,i=e.node,o=e.colors,a=o.operation,s=o.text,u=document.createElement("div"),l=[],c=[],d=s.operationCount;if("update"===r)switch(null==i?void 0:i.state){case"Started":c.push({label:"Started",count:1}),l.push(a.started),n=a.startedBorder;break;case"Failed":c.push({label:"Failed",count:1}),l.push(a.failed),n=a.failedBorder;break;case"Aborted":c.push({label:"Failed",count:1}),l.push(a.aborted),n=a.abortedBorder;break;case"InProgress":var f,h,v=i.total||1,p=Math.round((null!==(f=i.running)&&void 0!==f?f:0)/v*100),m=Math.round((null!==(h=i.completed)&&void 0!==h?h:0)/v*100),g=Math.round(100-p-m);m>0&&(c.push({label:"Completed",count:m}),l.push(a.completed)),p>0&&(c.push({label:"Running",count:p}),l.push(a.running)),g>0&&(c.push({label:"Least",count:g}),l.push(a.started)),d=s.label,n=a.runningBorder;break;case"Finished":c.push({label:"Completed",count:1}),l.push(a.completed),n=a.completedBorder}else c.push({label:"Least",count:100}),l.push(a.new),n=a.newBorder;var y=(0,Br.A)(l),x=Math.min(80,80)/2,b=(0,Hr.A)(u).append("svg").attr("xmlns","http://www.w3.org/2000/svg").attr("width",80).attr("height",80).attr("stroke",n).attr("stroke-width",2).append("g").attr("transform","translate(40,40)"),A=(0,qr.A)().innerRadius(0).outerRadius(x-2),w=(0,Vr.A)().value((function(e){return e.count})).sort(null);if(b.selectAll("path").data(w(c)).enter().append("path").attr("d",A).attr("fill",(function(e){return y(e.data.label)})),i&&(null!==(t=i.total)&&void 0!==t?t:0)>0){var E,_=Number(null!==(E=i.total)&&void 0!==E?E:0),C=function(e){switch(Math.floor(Math.log10(e))+1){case 1:return 34;case 2:return 30;case 3:return 26;default:return 24}}(_);b.selectAll("text").data([i]).enter().append("text").text(_).attr("fill",d).attr("font-family","YS Text, Arial, sans-serif").attr("font-size","".concat(C)).attr("stroke-width","0").attr("transform","translate(0, ".concat(C/3,")")).attr("text-anchor","middle")}return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(u.innerHTML)}function ri(e,t){var n,r=[],i=(0,Ur.A)(t);try{var a=function(){var t=(0,o.A)(n.value,2),i=t[0],a=t[1],s=e.find((function(e){return e.Id===i}));if(s){var u=s.Pins.find((function(e){return e.Id===a}));u&&u.Type&&r.push({name:"".concat(s.Cluster,".`").concat(u.Table,"`"),type:u.Type})}};for(i.s();!(n=i.n()).done;)a()}catch(e){i.e(e)}finally{i.f()}return r}function ii(e,t,n,r){for(var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[],a=0,s=Object.keys(t);a<s.length;a++){var u=s[a],l=e.get(u);if(!l&&i){var c=t[u],d="Node #".concat(u).concat(c.category?" (".concat(c.category,")"):"");l={id:u,level:0,title:d,label:Jr(null!=d?d:""),type:"op"}}if(l){var f,h,v=t[u];l.progress=v,v.stages&&!Wr()(v.stages)&&(ti(v.state)?l.label=Jr(null!==(f=l.title)&&void 0!==f?f:""):l.label=Zr(null!==(h=l.title)&&void 0!==h?h:"",v.stages)),"function"==typeof n&&(l=n(l)),r&&(l.image=ni({type:"update",node:v,colors:r}),l.font={color:l.url?r.text.link:r.text.label}),o.push(l)}}o.length>0&&(i?e.update(o):e.updateOnly(o))}function oi(e,t){var n=[];e.forEach((function(e){if("in"===e.type||"out"===e.type)e.image=function(e){var t=e.table.fill1,n='\n <svg width="24" height="24" viewBox="0 0 24 24" fill="'.concat(t,'" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M15 7H9v3.5h6V7zm1.5 0v3.5h6V7h-6zM15 12H9v3.5h6V12zm1.5 3.5V12h6v3.5h-6zM15 17H9v3.5h6V17zm1.5 3.5V17h6v3.5h-6zm0 1.5h-15A1.5 1.5 0 010 20.5v-17C0 2.67.67 2 1.5 2h21c.83 0 1.5.67 1.5 1.5v17c0 .83-.67 1.5-1.5 1.5h-6zm-9-10v3.5h-6V12h6zm0 5h-6v3.5h6V17zm0-6.5h-6V7h6v3.5z"/>\n </svg>');return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(n)}(t);else{var r=e.progress;e.font={color:null!=r&&r.remoteId?t.text.link:t.text.label},e.image=ni(r?{type:"update",node:r,colors:t}:{type:"new",colors:t})}n.push(e)}),{filter:function(e){return Boolean(e.type)}}),n.length>0&&e.updateOnly(n)}function ai(e,t){var n=[];e.forEach((function(e){n.push(t(e))})),n.length>0&&e.updateOnly(n)}function si(e){return Boolean(e&&(e.Streams||e.InputColumns||e.InputKeyFilterColumns))}function ui(e){var t;return(null!==(t=null==e?void 0:e.total)&&void 0!==t?t:0)>0}function li(e){return!Wr()(null==e?void 0:e.stages)}function ci(e){var t=e.progress;if(t){if(ui(t))return!0;if(li(t))return!0}return si(e.details)||Boolean(e.schemas)}function di(e){var t=a.useState((function(){return hi(e)})),n=(0,o.A)(t,2),r=n[0],i=n[1];return a.useEffect((function(){var t=!1,n=function(){t||i(hi(e))};return e.on("*",n),function(){t=!0,e.off("*",n)}}),[e]),r}var fi=Object.keys(Gr);function hi(e){var t={};return e.forEach((function(e){var n;if("in"!==e.type&&"out"!==e.type){var r=(null===(n=e.progress)||void 0===n?void 0:n.state)||"NotStarted";void 0===t[r]&&(t[r]=0),t[r]+=1}})),fi.map((function(e){return{state:e,title:Gr[e].title,count:t[e]||0}}))}function vi(e,t,n){for(var r=e.getConnectedNodes(n),o=new Set([n]),a=function(){var n,a=r.shift();if("string"==typeof a&&0===(null===(n=t.get(a))||void 0===n?void 0:n.size)){var s,u=e.getConnectedEdges(a),l=(0,Ur.A)(u);try{for(l.s();!(s=l.n()).done;){var c=s.value;o.has(c)||(o.add(c),r.push.apply(r,(0,i.A)(e.getConnectedNodes(c).filter((function(e){return"string"==typeof e&&a!==e})))))}}catch(e){l.e(e)}finally{l.f()}}};r.length>0;)a();return o}function pi(e,t,n){var r,i=e.getConnectedEdges(n),o=new Set,a=(0,Ur.A)(i);try{for(a.s();!(r=a.n()).done;){var s,u=vi(e,t,r.value),l=(0,Ur.A)(u);try{for(l.s();!(s=l.n()).done;){var c=s.value;o.add(c)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){a.e(e)}finally{a.f()}return o}function mi(e,t){var n=t.operation,r=document.createElement("div"),i=[],o=[],a=null!=e?e:{},s=a.running,u=void 0===s?0:s,l=a.completed,c=void 0===l?0:l,d=a.total||1,f=Math.round(u/d*100),h=Math.round(c/d*100),v=Math.round(100-f-h);h>0&&(o.push({label:"Completed",count:h}),i.push(n.completed)),f>0&&(o.push({label:"Running",count:f}),i.push(n.running)),v>0&&(o.push({label:"Least",count:v}),i.push(n.started));var p=(0,Br.A)(i),m=Math.min(80,80)/2,g=(0,Hr.A)(r).append("svg").attr("xmlns","http://www.w3.org/2000/svg").attr("viewBox","0 0 ".concat(80," ").concat(80)).append("g").attr("transform","translate(40,40)"),y=(0,qr.A)().innerRadius(m-10).outerRadius(m),x=(0,Vr.A)().value((function(e){return e.count})).sort(null);return g.selectAll("path").data(x(o)).enter().append("path").attr("d",y).attr("fill",(function(e){return p(e.data.label)})),"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(r.innerHTML)}function gi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}var yi=(0,u.A)("node-stages"),xi=[{name:"stage",header:"Stage",sortable:!1},{name:"duration",header:"Duration",align:rt.Ay.RIGHT,sortable:!1,width:115}];function bi(e){var t=e.stages,n=function(e,t,n){for(var r=[],i=Object.keys(e).length,a=(0,o.A)(Object.entries(e[0])[0],2),s=a[0],u=a[1],l=u,c=1;c<i;c++){var d=(0,o.A)(Object.entries(e[c])[0],2),f=d[0],h=d[1];r.push({stage:s,duration:ei(u,h)}),s=f,u=h}var v=ti(t)?null!=n?n:u:void 0;return r.push({stage:s,duration:ei(u,v)}),r.push({stage:"Total",duration:ei(l,v),footerIndex:" "}),r}(void 0===t?{}:t,e.state,e.finishedAt);return(0,p.jsx)("div",{className:yi(),children:(0,p.jsx)(rt.Ay,{theme:"yandex-cloud",rowClassName:Ai,columns:xi,startIndex:1,data:n.slice(0,-1),footerData:n.slice(-1)})})}function Ai(e,t,n,r){return yi(r?"header":n?"footer":"row")}var wi=(0,u.A)("operation-node-info");function Ei(e){var t,n=e.progress,r=e.details,i=e.schemas,s=e.containerRef,u=[];li(n)&&u.push({value:"stages",content:"Stages"}),si(r)&&u.push({value:"details",content:"Details"}),ui(n)&&u.push({value:"jobs",content:"Jobs"}),i&&u.push({value:"schemas",content:"Schemas"});var l=a.useState(null===(t=u[0])||void 0===t?void 0:t.value),c=(0,o.A)(l,2),d=c[0],f=c[1];return(0,p.jsxs)("div",{ref:s,className:wi(),children:[(0,p.jsx)("div",{children:u.length>1&&(0,p.jsx)($.a,{className:wi("selector"),value:d,options:u,onUpdate:f})}),"stages"===d&&(0,p.jsx)(bi,(0,v.A)({},n)),"details"===d&&(0,p.jsx)(Ln,(0,v.A)({},r)),"jobs"===d&&(0,p.jsx)(Hn,(0,v.A)({},n)),"schemas"===d&&i&&(0,p.jsx)($r,{className:wi("schema"),schemas:i})]})}var _i=n(34199),Ci=n(30469),ji=(0,u.A)("legend");function Si(e){var t=e.className,n=e.orientation,r=e.nodes,i=e.children,o=di(r);return(0,p.jsxs)("div",{className:ji({orientation:n},t),children:[o.map((function(e){var t=e.state,n=e.title,r=e.count;return(0,p.jsxs)("div",{className:ji("item"),children:[(0,p.jsx)("div",{className:ji("item-color",{state:t.toLowerCase()})}),(0,p.jsxs)(w.E,{className:ji("item-title"),color:"complementary",children:[n,r?(0,p.jsxs)("strong",{children:[" ",r]}):null]})]},t)})),i]})}function ki(e){var t=e.className,n=e.nodes,r=a.useState("collapsed"),i=(0,o.A)(r,2),s=i[0],u=i[1];return(0,p.jsx)("div",{className:t,children:"collapsed"===s?(0,p.jsx)(c.$,{title:"Show legend",onClick:function(){u("expanded")},children:(0,p.jsx)(d.I,{data:_i.A,size:16})}):(0,p.jsx)(Si,{nodes:n,children:(0,p.jsx)(c.$,{view:"flat-secondary",title:"Hide legend",onClick:function(){u("collapsed")},children:(0,p.jsx)(d.I,{data:Ci.A})})})})}var Ni=n(73139),Ti=(0,u.A)("vis-network");function Ri(e){var t=e.nodes,r=e.edges,i=e.options,s=e.className,u=e.getNetwork,l=a.useRef(null),c=a.useState(),d=(0,o.A)(c,2),f=d[0],h=d[1];return a.useEffect((function(){var e;return n.e(502).then(n.t.bind(n,18275,23)).then((function(t){var n=t.Network;e=new n(l.current,{}),h(e)})),function(){var t;null===(t=e)||void 0===t||t.destroy()}}),[]),a.useEffect((function(){f&&(f.setData({nodes:t,edges:r}),f.once("afterDrawing",(function(){f.fit()})))}),[t,r,f]),a.useEffect((function(){f&&f.setOptions(i)}),[i,f]),a.useEffect((function(){f&&"function"==typeof u&&u(f)}),[u,f]),(0,p.jsx)("div",{ref:l,className:Ti(null,s)})}var Oi=(0,u.A)("yql-plan-minimap");function Ii(e){var t=e.network,n=e.nodes,r=e.edges,s=e.options,u=e.className,l=function(e){return a.useMemo((function(){return(0,v.A)((0,v.A)({},e),{},{edges:(0,v.A)((0,v.A)({},e.edges),{},{selectionWidth:1}),interaction:{dragNodes:!1,dragView:!1,navigationButtons:!1,hoverConnectedEdges:!1,selectable:!1,zoomView:!1}})}),[e])}(s),c=a.useState(),d=(0,o.A)(c,2),f=d[0],h=d[1],m=a.useRef(!1);!function(e){var t=e.network,n=e.minimap,r=e.nodes;a.useEffect((function(){var e=function(e){var o=e.edge,a=vi(t,r,o);null==n||n.selectEdges((0,i.A)(a))},o=function(){null==n||n.unselectAll()},a=function(e){var o=e.node;if(o&&r.get(o)){var a=pi(t,r,o);null==n||n.selectEdges((0,i.A)(a))}},s=function(){null==n||n.unselectAll()};return t.on("hoverEdge",e),t.on("blurEdge",o),t.on("hoverNode",a),t.on("blurNode",s),function(){t.off("hoverEdge",e),t.off("blurEdge",o),t.off("hoverNode",a),t.off("blurNode",s)}}),[t,n,r])}({network:t,minimap:f,nodes:n});var g=function(e){var t=e.network,n=e.minimap,r=a.useRef(null);return a.useEffect((function(){var e=function(){n&&r.current&&function(e,t,n){var r=n.body.container,i=r.clientWidth,o=r.clientHeight,a=n.getScale(),s=t.getScale(),u=n.getViewPosition(),l=t.canvasToDOM(u);e.style.transform="translate(calc(".concat(l.x,"px - 50%), calc(").concat(l.y,"px - 50%))"),e.style.width="".concat(i/a*s,"px"),e.style.height="".concat(o/a*s,"px")}(r.current,n,t)};return t.on("afterDrawing",e),function(){t.off("afterDrawing",e)}}),[t,n]),r}({network:t,minimap:f});return a.useEffect((function(){var e=function(){m.current=!1};return window.addEventListener("mouseup",e),function(){window.removeEventListener("mouseup",e)}}),[]),a.useEffect((function(){f&&f.fit()}),[f]),(0,p.jsxs)(Ni.Z,{className:Oi(null,u),type:"action",children:[(0,p.jsx)(Ri,{nodes:n,edges:r,options:l,className:Oi("minimap"),getNetwork:h}),(0,p.jsx)("div",{className:Oi("wrapper"),onMouseDown:function(e){if(f){var n=f.DOMtoCanvas({x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY});t.moveTo({position:n}),m.current=!0}},onMouseMove:function(e){if(f&&m.current){var n=f.DOMtoCanvas({x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY});t.moveTo({position:n})}}}),(0,p.jsx)("div",{ref:g,className:Oi("radar")})]})}function Mi(e,t){var n,r,i={},o=[],a=new Map,s=0,u=(0,Ur.A)(e);try{for(u.s();!(r=u.n()).done;){var l=r.value;n="innerNodeId_".concat(s++);var c=o[l.level];c||(o[l.level]=c=new Set),c.add(n),a.set(l.id,n),i[n]={node:(0,v.A)({},l),in:[],out:[]}}}catch(e){u.e(e)}finally{u.f()}var d,f=(0,Ur.A)(t);try{for(f.s();!(d=f.n()).done;){var h=d.value,p=a.get(h.from),m=a.get(h.to);void 0!==p&&void 0!==m&&(i[p].out.push(m),i[m].in.push(p))}}catch(e){f.e(e)}finally{f.f()}return{graph:i,layering:o.filter(Boolean),levels:o.map((function(e,t){return e?t:-1})).filter((function(e){return-1!==e}))}}function Pi(e,t,n){for(var r=0,i=0;i<t.length;i++){var o,a=t[i],s=t[i+1],u=(0,Ur.A)(a);try{for(u.s();!(o=u.n()).done;){var l=o.value,c=e[l];if(c.rank=i,i!==t.length-1)for(var d=0;d<c.out.length;d++){var f=c.out[d];if(!s.has(f)){var h="".concat(f,"_").concat(r++),v={id:h,shape:"dot",size:0,level:n[i]};e[h]={node:v,in:[l],out:[],virtual:!0},s.add(h),c.out[d]=h,e[h].out.push(f),e[f].in[e[f].in.indexOf(l)]=h}}}}catch(e){u.e(e)}finally{u.f()}}}function Li(e,t,n){var r,o=n.reduce((function(e,t,n){return e[t]=n,e}),{}),a=[],s=(0,Ur.A)(t);try{for(s.s();!(r=s.n()).done;){var u=r.value;a.push.apply(a,(0,i.A)(e[u].out.map((function(e){return o[e]})).sort((function(e,t){return e-t}))))}}catch(e){s.e(e)}finally{s.f()}for(var l=1;l<n.length;)l*=2;var c=2*l-1;l-=1;var d=new Array(c).fill(0),f=0;return a.forEach((function(e){var t=e+l;for(d[t]++;t>0;)t%2&&(f+=d[t+1]),d[t=t-1>>1]++})),f}function Di(e,t){for(var n=0,r=1;r<t.length;++r)n+=Li(e,t[r-1],t[r]);return n}function zi(e,t){var n=t.reduce((function(t,n,r){return e.includes(n)&&t.push(r),t}),[]);if(0===n.length)return-1;var r=n.length>>1;if(n.length%2==1)return n[r];if(2===n.length)return(n[0]+n[1])/2;var i=n[r-1]-n[0],o=n[n.length-1]-n[r];return(n[r-1]*o+n[r]*i)/(i+o)}function $i(e,t){for(var n=e.filter((function(e){return-1!==t[e]})).sort((function(e,n){return t[e]-t[n]})),r=0,i=0;i<n.length;r++)-1!==t[e[r]]&&(e[r]=n[i++])}function Fi(e,t,n){if(n%2==0)for(var r=1;r<t.length;r++){var i,o={},a=(0,Ur.A)(t[r]);try{for(a.s();!(i=a.n()).done;){var s=i.value;o[s]=zi(e[s].in,t[r-1])}}catch(e){a.e(e)}finally{a.f()}$i(t[r],o)}else for(var u=t.length-2;u>=0;u--){var l,c={},d=(0,Ur.A)(t[u]);try{for(d.s();!(l=d.n()).done;){var f=l.value;c[f]=zi(e[f].out,t[u+1])}}catch(e){d.e(e)}finally{d.f()}$i(t[u],c)}}function Ui(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Bi(e,t,n){var r=0;return n>0&&(r+=Li(e,t[n-1],t[n])),n<t.length-1&&(r+=Li(e,t[n],t[n+1])),r}function Hi(e,t){for(var n=!0,r=0;n&&r++<10;){n=!1;for(var i=0;i<t.length;i++)for(var o=t[i],a=Bi(e,t,i),s=0;s<o.length-1;s++){Ui(o,s,s+1);var u=Bi(e,t,i);a>u?(n=!0,a=u):Ui(o,s,s+1)}}}function qi(e,t,n){for(var r=function(e,t){for(var n=(0,i.A)(t[0]),r=[],o=new Set(n);n.length>0;){var a=n.shift();if(void 0===a)break;var s=e[a],u=r[s.rank];u||(r[s.rank]=u=[]),u.push(a);var l,c=(0,Ur.A)(s.out);try{for(c.s();!(l=c.n()).done;){var d=l.value;o.has(d)||(o.add(d),n.push(d))}}catch(e){c.e(e)}finally{c.f()}}return r}(e,t),o=r.map((function(e){return(0,i.A)(e)})),a=Di(e,r),s=0,u=0;u<4&&s<24;s++,u++){Fi(e,r,s),n||Hi(e,r);var l=Di(e,r);a>l&&(a=l,o=r.map((function(e){return(0,i.A)(e)})),u=0)}return o.forEach((function(t){t.forEach((function(t,n){e[t].order=n}))})),o}function Vi(e,t,n){var r=e[t];r||(e[t]=r=new Set),r.add(n)}function Yi(e,t,n){return e[t]&&e[t].has(n)||e[n]&&e[n].has(t)}function Wi(e,t,n,r,i){var o={},a=Object.keys(e).reduce((function(e,t){return e[t]=t,e}),{}),s=Object.keys(e).reduce((function(e,t){return e[t]=Number.POSITIVE_INFINITY,e}),{});function u(l){if(void 0===o[l]){o[l]=0;var c=l;do{var d=i?t.length-e[c].rank-1:e[c].rank,f=t[d].indexOf(c);if(f>0){var h=n[t[d][f-1]];u(h),a[l]===l&&(a[l]=a[h]),a[l]===a[h]?o[l]=Math.max(o[l],o[h]+100):s[a[h]]=Math.min(s[a[h]],o[l]-o[h]-100)}c=r[c]}while(c!==l)}}return Object.keys(e).forEach((function(e){n[e]===e&&u(e)})),Object.keys(e).forEach((function(e){o[e]=o[n[e]],s[a[n[e]]]<Number.POSITIVE_INFINITY&&(o[e]=o[e]+s[a[n[e]]])})),o}function Ki(e,t){var n,r=function(e,t){var n={};return Object.entries(e).forEach((function(e){var t=(0,o.A)(e,2),r=t[0];t[1].forEach((function(e){Vi(n,r,e)}))})),Object.entries(t).forEach((function(e){var t=(0,o.A)(e,2),r=t[0];t[1].forEach((function(e){Vi(n,r,e)}))})),n}(function(e,t){var n={};return t.reduce((function(t,r){var i=0,o=0,a=t.length,s=r[r.length-1];return r.forEach((function(t,u){var l=function(e,t){if(e[t].virtual)return e[t].in.find((function(t){return e[t].virtual}))}(e,t),c=l?e[l].order:a;(l||t===s)&&(r.slice(o,u+1).forEach((function(t){e[t].in.forEach((function(r){var o=e[r],a=o.order;!(a<i||c<a)||o.virtual&&e[t].virtual||Vi(n,r,t)}))})),o=u+1,i=c)})),r})),n}(e,t),function(e,t){var n={};function r(t,r,i,o,a){for(var s=function(){var r=t[u];e[r].virtual&&e[r].in.forEach((function(t){var i=e[t];i.virtual&&(i.order<o||i.order>a)&&Vi(n,t,r)}))},u=r;u<i;u++)s()}return t.reduce((function(t,n){var i,o=-1,a=0;return n.forEach((function(s,u){if(e[s].virtual){var l=e[s].in;l.length&&(i=e[l[0]].order,r(n,a,u,o,i),a=u,o=i)}r(n,a,n.length,i,t.length)})),n})),n}(e,t)),a={};["u","d"].forEach((function(o){n="u"===o?t:(0,i.A)(t).reverse(),["l","r"].forEach((function(t){"r"===t&&(n=n.map((function(e){return(0,i.A)(e).reverse()})));var s=function(e,t,n,r){var i={},o={},a={};return t.forEach((function(e){e.forEach((function(e,t){i[e]=e,o[e]=e,a[e]=t}))})),t.forEach((function(t){var s=-1;t.forEach((function(t){var u=e[t][r];if(u.length){u.sort((function(e,t){return a[e]-a[t]}));for(var l=(u.length-1)/2,c=Math.floor(l),d=Math.ceil(l);c<=d;c++){var f=u[c];o[t]===t&&s<a[f]&&!Yi(n,t,f)&&(o[f]=t,o[t]=i[t]=i[f],s=a[f])}}}))})),{root:i,align:o}}(e,n,r,"u"===o?"in":"out"),u=s.root,l=s.align,c=Wi(e,n,u,l,"d"===o);"r"===t&&Object.keys(c).forEach((function(e){c[e]=-c[e]})),a[o+t]=c}))}));var s=function(e,t){return Object.values(t).reduce((function(e,t){var n=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;Object.entries(t).forEach((function(e){var t=(0,o.A)(e,2),i=(t[0],t[1]);n=Math.max(i+50,n),r=Math.min(i-50,r)}));var i=n-r;return e.min>i?{min:i,align:t}:e}),{min:Number.POSITIVE_INFINITY}).align}(0,a);return function(e,t){var n=Object.values(t),r=n.reduce((function(e,t){return Math.min(e,t)})),i=n.reduce((function(e,t){return Math.max(e,t)}));["u","d"].forEach((function(n){["l","r"].forEach((function(o){var a=e[n+o];if(a!==t){var s=Object.values(a),u="l"===o?r-s.reduce((function(e,t){return Math.min(e,t)})):i-s.reduce((function(e,t){return Math.max(e,t)}));u&&Object.keys(a).forEach((function(e){a[e]+=u}))}}))}))}(a,s),function(e,t){return Object.keys(e.ul).reduce((function(t,n){var r=Object.values(e).map((function(e){return e[n]})).sort((function(e,t){return e-t}));return t[n]=(r[1]+r[2])/2,t}),{})}(a)}function Xi(e,t){var n=Ki(e,t);Object.keys(n).forEach((function(t){e[t].node.y=n[t]}));var r=Object.values(n),i=1.7*Math.max(100,(r.reduce((function(e,t){return Math.max(e,t)}))-r.reduce((function(e,t){return Math.min(e,t)})))/t.length),o=0;t.forEach((function(t){t.forEach((function(t){e[t].node.x=o})),o+=i}))}function Gi(e){var t=[],n=[];return Object.values(e).forEach((function(r){var i=r.node;if(r.virtual){if(!e[r.in[0]].virtual){var o=r.out[0];if(e[o].virtual)for(;e[e[o].out[0]].virtual;)o=e[o].out[0];var a=e[r.in[0]].node,s=e[o].node;if(e[o].virtual){var u=e[e[o].out[0]].node;a.y===i.y?s.y===u.y?n.push({from:a.id,to:u.id}):(t.push(s),n.push({from:a.id,to:s.id,arrows:{to:!1}}),n.push({from:s.id,to:u.id,arrows:{from:!1}})):s.y===u.y?(t.push(i),n.push({from:a.id,to:i.id,arrows:{to:!1}}),n.push({from:i.id,to:u.id,arrows:{from:!1}})):(t.push(i),t.push(s),n.push({from:a.id,to:i.id,arrows:{to:!1}}),n.push({from:i.id,to:s.id,arrows:{from:!1,to:!1}}),n.push({from:s.id,to:u.id,arrows:{from:!1}}))}else a.y===i.y&&i.y===s.y?n.push({from:a.id,to:s.id}):(t.push(i),n.push({from:a.id,to:i.id,arrows:{to:!1}}),n.push({from:i.id,to:s.id,arrows:{from:!1}}))}}else t.push(i),r.out.forEach((function(t){if(!e[t].virtual){var r={from:i.id,to:e[t].node.id};n.push(r)}}))})),{nodes:t,edges:n}}function Qi(e){return Ji.apply(this,arguments)}function Ji(){return(Ji=(0,pe.A)(ge().mark((function e(t){var n,r,i,o,a,s,u,l;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.nodes,r=t.edges,i=n.length>700||r.length>3e3,o=Mi(n,r),a=o.graph,s=o.layering,u=o.levels,Pi(a,s,u),l=qi(a,s,i),Xi(a,l),e.abrupt("return",Gi(a));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Zi=n(29202),eo=n(16538);const to=function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,p.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m0-4.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8m0-3a1 1 0 1 0 0-2 1 1 0 0 0 0 2",clipRule:"evenodd"})}))};var no=(0,u.A)("graph"),ro="".concat(no(),"_show-tooltip");function io(e){var t=a.useRef(e);return t.current=e,t}var oo,ao,so,uo,lo=(oo=function(e,t){if(e)if(t)e.redraw(),e.fit();else{var n=e.getScale();e.redraw(),e.moveTo({scale:n})}},so=null,(uo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];ao=t,null===so&&(so=requestAnimationFrame((function(){so=null,oo.apply(void 0,(0,i.A)(ao))})))}).cancel=function(){so&&cancelAnimationFrame(so),so=null},uo);function co(e){var t=e.isActive,n=e.className,r=e.graph,s=e.showMinimap,u=e.prepareNode,l=a.useState(),f=(0,o.A)(l,2),h=f[0],m=f[1],g=a.useState(null),y=(0,o.A)(g,2),x=y[0],b=y[1],A=In(),E=function(e){return a.useMemo((function(){return{width:"100%",height:"100%",autoResize:!1,configure:!1,edges:{arrows:{from:{enabled:!0,type:"circle",scaleFactor:.1},to:!0},arrowStrikethrough:!1,smooth:{enabled:!0,type:"cubicBezier",forceDirection:"horizontal",roundness:.5},color:{color:e.edge.color,highlight:e.edge.highlight,inherit:!1,opacity:1},hoverWidth:.5,width:1,selectionWidth:.5,selfReference:{size:80}},nodes:{font:{color:e.text.label,size:16}},layout:{hierarchical:!1},interaction:{dragNodes:!1,navigationButtons:!1,hover:!0,hoverConnectedEdges:!1,selectable:!1,zoomSpeed:.5},physics:!1}}),[e])}(A),_=Ge(),C=a.useState((function(){return new Wt.DataSet})),j=(0,o.A)(C,1)[0],S=a.useState((function(){return new Wt.DataSet})),k=(0,o.A)(S,1)[0],N=a.useState(!0),T=(0,o.A)(N,2),R=T[0],O=T[1],I=Yt(),M=a.useState(),P=(0,o.A)(M,2),L=P[0],D=P[1],z=a.useRef(null),$=a.useState(),F=(0,o.A)($,2),U=F[0],B=F[1],H=(0,Kt.m)(U?{rect:{top:U.position.y,left:U.position.x}}:void 0);a.useEffect((function(){var e=function(e){var t;null!==(t=z.current)&&void 0!==t&&t.contains(e.target)||B(void 0)};return U&&window.addEventListener("click",e),function(){window.removeEventListener("click",e)}}),[U]);var q=a.useRef();a.useEffect((function(){var e;return t&&(e=requestAnimationFrame((function(){h&&R&&(h.fit(),O(!1))}))),t||B(void 0),function(){cancelAnimationFrame(e)}}),[t,h,R]);var V=io(A),Y=io(_),W=io(u);a.useEffect((function(){var e=!1;function t(){return(t=(0,pe.A)(ge().mark((function e(){var t,n,i,o;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qi(r);case 2:t=e.sent,n=t.nodes,i=t.edges,o=new Wt.DataSet(n),Y.current&&ii(o,Y.current),oi(o,V.current),W.current&&ai(o,W.current),O(j.length!==o.length||k.length!==i.length),j.clear(),j.add(o.get()),k.clear(),k.add(i),I();case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return function(){return t.apply(this,arguments)}().catch((function(t){e||D(null!=t?t:"Unknown error")})),function(){e=!0}}),[r,k,j,I]),a.useEffect((function(){_&&(ii(j,_,W.current,V.current),I())}),[_,j,I]),a.useEffect((function(){"function"==typeof u&&(ai(j,u),I())}),[u,j,I]),a.useEffect((function(){oi(j,A)}),[j,A]);var K=a.useRef(!0);return a.useLayoutEffect((function(){if(x&&h){var e=new Jt.A((function(){lo(h,K.current)}));return e.observe(x),function(){e.unobserve(x)}}}),[x,h]),a.useEffect((function(){if(h){var e=function(e){var t=e.edge,n=vi(h,j,t);h.selectEdges((0,i.A)(n))},t=function(){h.unselectAll()},n=function(e){var t=e.node;if(t){var n=j.get(t);if(q.current=null!=n?n:void 0,n){var r=pi(h,j,t);if(h.selectEdges((0,i.A)(r)),n.url&&(null==x||x.style.setProperty("cursor","pointer")),"in"!==n.type&&"out"!==n.type||null==x||x.classList.add(ro),ci(n)){var o=h.getPosition(t),a=o.x,s=o.y,u=h.canvasToDOM({x:a+15,y:s}),l=h.canvasToDOM({x:a-15,y:s}),c=u,d="right";if(x){var f=x.getBoundingClientRect(),v=f.x,p=f.y,m=f.width;c.x+330>m&&(c=l,d="left"),c.x+=v,c.y+=p}B({progress:n.progress,details:n.details,schemas:n.schemas,position:c,placement:d})}}}},r=function(){null==x||x.classList.remove(ro),null==x||x.style.removeProperty("cursor"),h.unselectAll(),B(void 0),q.current=void 0},o=function(){if(q.current){var e=q.current;e.url&&(0,Ce.V3)(e.url)}},a=function(){K.current=!1};return h.on("hoverEdge",e),h.on("blurEdge",t),h.on("hoverNode",n),h.on("blurNode",r),h.on("click",o),h.on("zoom",a),function(){h.off("hoverEdge",e),h.off("blurEdge",t),h.off("hoverNode",n),h.off("blurNode",r),h.off("click",o),h.off("zoom",a)}}}),[h,j,x]),L?(0,p.jsx)(w.E,{color:"danger",children:"".concat(L)}):(0,p.jsx)("div",{ref:b,className:no(null,n),children:0===j.length?(0,p.jsx)(Qt,{size:"m",local:!0}):(0,p.jsxs)(a.Fragment,{children:[(0,p.jsx)(Ri,{nodes:j,edges:k,options:E,className:no("graph"),getNetwork:m}),h&&s?(0,p.jsx)(Ii,{className:no("minimap-wrapper"),network:h,nodes:j,edges:k,options:E}):null,(0,p.jsxs)("div",{className:no("toolbar"),children:[(0,p.jsx)(c.$,{className:no("toolbar-button"),onClick:function(){h&&(h.moveTo({scale:1.1*h.getScale()}),K.current=!1)},children:(0,p.jsx)(d.I,{data:eo.A,size:16})}),(0,p.jsx)(c.$,{className:no("toolbar-button"),onClick:function(){h&&(h.moveTo({scale:h.getScale()/1.1}),K.current=!1)},children:(0,p.jsx)(d.I,{data:Zi.A,size:16})}),(0,p.jsx)(c.$,{className:no("toolbar-button"),onClick:function(){null==h||h.fit(),K.current=!0},children:(0,p.jsx)(d.I,{data:to,size:16})}),(0,p.jsx)(ki,{nodes:j,className:no("toolbar-button",no("legend"))})]}),U&&t?(0,p.jsx)(Xt.z,{anchorRef:H,open:!0,placement:U.placement,children:(0,p.jsx)(Ei,(0,v.A)((0,v.A)({},U),{},{containerRef:z}))}):null]})})}var fo=n(65692),ho=n(75414),vo=n.n(ho),po=n(9335),mo=n(79261),go=36e5,yo=24*go,xo=30*yo,bo=365*yo,Ao=function(e){return e.CREATED="CREATED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.FAILED="FAILED",e}({});function wo(e,t,n,r,i){var o="".concat(t.eventsCount);e.measureText(o).width<i&&(e.fillStyle=Do.resolveCssValue(Do.COUNTER_FONT_COLOR),e.fillText(o,n,r+Do.COUNTER_FONT_CENTER_OFFSET))}var Eo,_o,Co,jo=function(e){return e.INFO="INFO",e.QUEUED="QUEUED",e.DEPRECATED="DEPRECATED",e.OK="OK",e.WARNING="WARNING",e.DANGER="DANGER",e.MUTED="MUTED",e.DELETED="DELETED",e}({}),So="#333",ko="#777",No="#FFF",To="#08F",Ro="#3D5",Oo="#D30",Io="#F80",Mo="#A5A",Po=globalThis.document.body,Lo=window.getComputedStyle(Po),Do={ZOOM_MIN:5e3,ZOOM_MAX:2*xo,PRIMARY_BACKGROUND_COLOR:No,BOUNDARY_MARK_COLOR:So,PRIMARY_MARK_COLOR:ko,SECONDARY_MARK_COLOR:"#DDD",CONNECTION_COLOR:Ro,RULER_FONT:"10px sans-serif",RULER_PRIMARY_TEXT_COLOR:"#111",RULER_SECONDARY_TEXT_COLOR:ko,RULER_TEXT_OUTLINE_COLOR:No,RULER_LABEL_SPACING:40,RULER_GRID_SPACING:10,RULER_SUP_LABEL_POS:16,RULER_LABEL_POS:33,RULER_HEADER_HEIGHT:41,RULER_BORDER_COLOR:So,RULER_WEEKEND_COLOR:Oo,EVENT_HITBOX_PADDING:2,SELECTION_OUTLINE_COLOR:To,SELECTION_BG_COLOR:To,SELECTION_OUTLINE_THICKNESS:5,COUNTER_FONT:"12px monospace",COUNTER_FONT_CENTER_OFFSET:4,COUNTER_FONT_COLOR:"#111",COUNTER_PADDING:5,WHEEL_PAN_SPEED:25e-5,MAX_TRACKS:5,TRACK_HEIGHT:25,OVERLAPPING_THRESHOLD:8,GRID_STROKE_WIDTH:1,eventStatusColors:(Eo={},(0,r.A)(Eo,jo.INFO,To),(0,r.A)(Eo,jo.QUEUED,Mo),(0,r.A)(Eo,jo.DEPRECATED,Io),(0,r.A)(Eo,jo.OK,Ro),(0,r.A)(Eo,jo.WARNING,Io),(0,r.A)(Eo,jo.DANGER,Oo),(0,r.A)(Eo,jo.MUTED,ko),(0,r.A)(Eo,jo.DELETED,Oo),Eo),groupStatusColors:(_o={},(0,r.A)(_o,jo.INFO,To),(0,r.A)(_o,jo.QUEUED,Mo),(0,r.A)(_o,jo.DEPRECATED,Io),(0,r.A)(_o,jo.OK,Ro),(0,r.A)(_o,jo.WARNING,Io),(0,r.A)(_o,jo.DANGER,Oo),(0,r.A)(_o,jo.MUTED,ko),(0,r.A)(_o,jo.DELETED,Oo),_o),regionStateColors:(Co={},(0,r.A)(Co,Ao.CREATED,To),(0,r.A)(Co,Ao.PROCESSING,"#fe5"),(0,r.A)(Co,Ao.PROCESSED,Ro),(0,r.A)(Co,Ao.FAILED,Oo),Co),resolveCssValue:function(e){if("string"!=typeof e||!e)return e;if(e.startsWith("var(")&&e.endsWith(")")){var t,n=e.substring(4,e.length-1),r=(null===(t=globalThis.document)||void 0===t?void 0:t.documentElement).style.getPropertyValue(n);if(""!==r)return r;var i=Lo.getPropertyValue(n);return""!==i?i:n}return e}},zo=function(){function e(t){(0,W.A)(this,e),this.host=void 0,this.canvasApi=void 0,this.host=t,this.canvasApi=t.getCanvasApiUnsafe()}return(0,K.A)(e,[{key:"render",value:function(e){}},{key:"hostConnected",value:function(){}}]),e}();function $o(e){return-1!==navigator.userAgent.indexOf("Mac OS")?e.metaKey:e.ctrlKey}var Fo=function(){};function Uo(e,t,n){return e>=t&&e<=n}function Bo(e,t,n,r){return t-e>r-n?Uo(n,e,t)||Uo(r,e,t):Uo(e,n,r)||Uo(t,n,r)}function Ho(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e){return e},a=Math.abs(i-r),s=function(e,t,n){var r=Math.abs(n-t);return t<n?(e-t)/r:(e-n)/r}(e,t,n);return r<i?r+o(s)*a:i+o(1-s)*a}function qo(e,t,n){return e>n?n:e<t?t:e}function Vo(e,t){return e-e%t}function Yo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return e>=t-n&&e<=t+n}var Wo=n(21281),Ko=n.n(Wo),Xo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,W.A)(this,e),this._axes=[],this._sortedAxes=void 0,this._axesById=void 0,this.axes=t,n&&n.identityFunction&&(this.getIdentity=n.identityFunction)}return(0,K.A)(e,[{key:"getIdentity",value:function(e){return e.id}},{key:"axes",get:function(){return this._axes},set:function(e){e!==this._axes&&(this._axes=e,this._sortedAxes=void 0,this._axesById=void 0)}},{key:"sortedAxes",get:function(){return this._sortedAxes||(this._sortedAxes=this._axes.slice().sort((function(e,t){return e.top-t.top}))),this._sortedAxes}},{key:"axesById",get:function(){var e=this;return this._axesById||(this._axesById=this._axes.reduce((function(t,n){return t[e.getIdentity(n)]=n,t}),{})),this._axesById}}]),e}(),Go=n(7059),Qo=n.n(Go),Jo=function(e){(0,X.A)(n,e);var t=(0,G.A)(n);function n(){var e;(0,W.A)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).height=Do.RULER_HEADER_HEIGHT,e}return(0,K.A)(n,[{key:"render",value:function(e){e.useStaticTransform();var t=e.ctx,n=e.start,r=e.end,i=e.canvas,o=e.pixelRatio;t.fillStyle=Do.resolveCssValue(Do.PRIMARY_BACKGROUND_COLOR),t.fillRect(0,0,i.width,this.height);var a=[0,0,t.canvas.width/o,this.height],s=a[0],u=a[1],l=a[2],c=a[3];function d(e){return Ho(+e,n,r,0,l)}function f(e){return Ho(e,u,u+l,n,r)}function h(e,n,r,i,o){t.strokeStyle=Do.resolveCssValue(Do.RULER_TEXT_OUTLINE_COLOR);for(var a=null,s=r.start(e);+s<n;s=r.step(s)){var u=Qo()(s).format(r.format),c=d(s);c>10&&c<l&&(a||(a=s),t.fillStyle=r.color&&r.color(s)||o,t.strokeText(u,c,i),t.fillText(u,c,i))}var h=f(10),v=Qo()(h).format(r.format),p=qo(10,-1/0,d(a||n)-t.measureText(v).width-5);t.fillStyle=r.color&&r.color(h)||o,t.strokeText(v,p,i),t.fillText(v,p,i)}t.font=Do.RULER_FONT,t.lineJoin="miter",t.miterLimit=2,t.lineWidth=1;for(var v,p,m=r-n,g=0,y=ta.length;g<y;g+=1)if(!(m>ta[g].domain)){for(var x=0,b=Qo()(0);+b<m;b=ta[g].step(b))Ho(+b,0,m,u,u+l)>0&&(x+=Do.RULER_LABEL_SPACING);if(!(x>l)){p=(v=ta[g]).sup||ta[g+1];break}}v&&h(n,r,v,s+Do.RULER_LABEL_POS,Do.resolveCssValue(Do.RULER_PRIMARY_TEXT_COLOR)),p&&h(n,r,p,s+Do.RULER_SUP_LABEL_POS,Do.resolveCssValue(Do.RULER_SECONDARY_TEXT_COLOR)),t.strokeStyle=Do.resolveCssValue(Do.RULER_BORDER_COLOR),t.beginPath(),t.moveTo(u,s+c+.5),t.lineTo(u+l,s+c+.5),t.stroke()}}]),n}(zo),Zo={start:function(e){return Qo()(e).startOf("hour")},step:function(e){return Qo()(e).add(1,"hour")},format:"HH"},ea={start:function(e){return Qo()(e).startOf("day")},step:function(e){return Qo()(e).add(1,"day")},color:function(e){var t=Qo()(e).day();return 6===t||0===t?Do.resolveCssValue(Do.RULER_WEEKEND_COLOR):null},format:"MMM D"},ta=[{domain:1e3,start:function(e){return Qo()(e).startOf("millisecond")},step:function(e){return Qo()(e).add(1,"millisecond")},format:"SSS[ms]",sup:{start:function(e){return Qo()(e).startOf("second")},step:function(e){return Qo()(e).add(1,"second")},format:"ss[′′]"}},{domain:6e4,start:function(e){return Qo()(e).startOf("second")},step:function(e){return Qo()(e).add(1,"second")},format:"ss[′′]",sup:{start:function(e){var t=Qo()(e).startOf("minute");return t.subtract(t.minute()%5,"minute")},step:function(e){return Qo()(e).add(5,"minute")},format:"mm[′]"}},{domain:go,start:function(e){var t=Qo()(e).startOf("minute");return t.subtract(t.minute()%5,"minute")},step:function(e){return Qo()(e).add(5,"minute")},format:"mm[′]",sup:Zo},{domain:yo,start:function(e){var t=Qo()(e).startOf("minute");return t.subtract(t.minute()%15,"minute")},step:function(e){return Qo()(e).add(15,"minute")},format:"mm[′]",sup:Zo},{domain:yo,start:function(e){return Qo()(e).startOf("hour")},step:function(e){return Qo()(e).add(1,"hour")},format:"HH",sup:ea},{domain:xo,start:function(e){var t=Qo()(e).startOf("hour");return t.subtract(t.hour()%4,"hour")},step:function(e){return Qo()(e).add(4,"hour")},format:"HH",sup:ea},{domain:xo,start:function(e){return Qo()(e).startOf("day")},step:function(e){return Qo()(e).add(1,"day")},color:function(e){var t=Qo()(e).day();return 6===t||0===t?Do.resolveCssValue(Do.RULER_WEEKEND_COLOR):null},format:"D",sup:{start:function(e){return Qo()(e).startOf("month")},step:function(e){return Qo()(e).add(1,"month")},format:"MMM YYYY"}},{domain:6*xo,start:function(e){return Qo()(e).startOf("week").add(1,"day")},step:function(e){return Qo()(e).add(1,"week")},format:"D"},{domain:bo,start:function(e){return Qo()(e).startOf("month")},step:function(e){return Qo()(e).add(1,"month")},format:"MMM",sup:{start:function(e){return Qo()(e).startOf("year")},step:function(e){return Qo()(e).add(1,"year")},format:"YYYY"}},{domain:10*bo,start:function(e){var t=Qo()(e).startOf("month");return t.subtract(t.month()%3,"month")},step:function(e){return Qo()(e).add(3,"month")},format:"[Q]Q"},{domain:1/0,start:function(e){return Qo()(e).startOf("year")},step:function(e){return Qo()(e).add(1,"year")},format:"YYYY"}],na=function(e){return e[e.STRAIGHT=0]="STRAIGHT",e[e.DASHED=1]="DASHED",e}({}),ra=function(e){(0,X.A)(n,e);var t=(0,G.A)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,W.A)(this,n),(r=t.call(this,e)).trackHeight=Do.TRACK_HEIGHT,r.strokeMode=na.STRAIGHT,r.axesIndex=void 0,Object.assign((0,mo.A)(r),i),r.axesIndex=new Xo([],{identityFunction:i.identityFunction}),r}return(0,K.A)(n,[{key:"axes",get:function(){return this.axesIndex.axes},set:function(e){this.axesIndex.axes=e}},{key:"axesById",get:function(){return this.axesIndex.axesById}},{key:"getAxisTrackPosition",value:function(e,t){var n=qo(t,0,e.tracksCount-1);return e.top+this.trackHeight*n+this.trackHeight/2}},{key:"render",value:function(e){var t,n=(null===(t=e.getComponent(Jo))||void 0===t?void 0:t.height)||0,r=e.ctx;this.strokeMode===na.DASHED&&r.setLineDash([5,3]),e.useScrollTransform(),r.translate(0,n);var i=e.canvas.width;r.strokeStyle=Do.resolveCssValue(Do.SECONDARY_MARK_COLOR),r.beginPath(),r.lineWidth=1;var o,a=(0,Ur.A)(this.axesIndex.sortedAxes);try{for(a.s();!(o=a.n()).done;)for(var s=o.value,u=0;u<s.tracksCount;u+=1){var l=this.getAxisTrackPosition(s,u);r.moveTo(0,l),r.lineTo(i,l)}}catch(e){a.e(e)}finally{a.f()}r.stroke(),r.setLineDash([0,0])}}]),n}(zo),ia=(0,K.A)((function e(){(0,W.A)(this,e),this.hitboxResult={top:0,right:0,bottom:0,left:0}})),oa=function(e){(0,X.A)(n,e);var t=(0,G.A)(n);function n(){return(0,W.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"render",value:function(e,t,n,r,i,o){if(1===t.eventsCount)e.beginPath(),e.fillStyle=Do.resolveCssValue(Do.eventStatusColors[t.status]),e.arc(r,o,5,0,2*Math.PI),n&&(e.strokeStyle=Do.resolveCssValue(Do.SELECTION_OUTLINE_COLOR),e.lineWidth=Do.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();else if(t.eventsCount>1){e.fillStyle=Do.resolveCssValue(Do.groupStatusColors[t.status]),e.beginPath(),e.arc(r,o,6,Math.PI/2,3*Math.PI/2),e.arc(i,o,6,3*Math.PI/2,Math.PI/2),e.closePath(),n&&(e.strokeStyle=Do.resolveCssValue(Do.SELECTION_OUTLINE_COLOR),e.lineWidth=Do.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();var a=Math.max(r,Do.COUNTER_PADDING);wo(e,t,a,o,i-a)}}},{key:"getHitbox",value:function(e,t,n){return this.hitboxResult.left=t-6,this.hitboxResult.right=n+6,this.hitboxResult}}]),n}(ia),aa=function(e){(0,X.A)(n,e);var t=(0,G.A)(n);function n(){return(0,W.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"render",value:function(e,t,n,r,i,o){if(1===t.eventsCount){var a=o-3,s=Math.max(i-r,5);n&&(e.strokeStyle=Do.resolveCssValue(Do.SELECTION_OUTLINE_COLOR),e.lineWidth=Do.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,s,6)),e.fillStyle=Do.resolveCssValue(Do.eventStatusColors[t.status]),e.fillRect(r,a,s,6)}else if(t.eventsCount>1){var u=o-6,l=Math.max(i-r,5);n&&(e.strokeStyle=Do.resolveCssValue(Do.SELECTION_OUTLINE_COLOR),e.lineWidth=Do.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,u,l,12)),e.fillStyle=Do.resolveCssValue(Do.groupStatusColors[t.status]),e.fillRect(r,u,l,12);var c=Math.max(r+Do.COUNTER_PADDING,Do.COUNTER_PADDING);wo(e,t,c,o,i-c)}}},{key:"getHitbox",value:function(e,t,n){return this.hitboxResult.left=t,this.hitboxResult.right=t+Math.max(n-t,5),this.hitboxResult}}]),n}(ia),sa=["renderers"],ua=function(e){(0,X.A)(n,e);var t=(0,G.A)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,W.A)(this,n),(r=t.call(this,e)).eventHitboxPadding=Do.EVENT_HITBOX_PADDING,r.eventCounterFont=Do.COUNTER_FONT,r.allowMultipleSelection=!0,r.handleCanvasMouseup=function(e){var t=r.getEventsAtPoint(e.offsetX,e.offsetY);t.length>0?r.selectEvents([t[0]],{append:$o(e),toggle:!0}):r.selectEvents([])},r.handleCanvasContextmenu=function(e){e.preventDefault();var t=r.getEventsAtPoint(e.offsetX,e.offsetY),n=t.length>0?t[0]:void 0;r.host.dispatchEvent(new CustomEvent("openContextmenu",{detail:{event:n,relativeX:e.clientX,relativeY:e.clientY}}))},r.getEventIdentity=function(e){return"".concat(e.axisId,":").concat(e.from,"-").concat(e.to)},r.renderers=new Map([["event",new oa],["process",new aa]]),r.maxIndexTreeWidth=16,r.index=new(Ko())(r.maxIndexTreeWidth),r._selectedEvents=new Set,r._events=[];var o=i.renderers,a=(0,qn.A)(i,sa);if(Object.assign((0,mo.A)(r),a),o)for(var s in o)r.registerRenderer(s,o[s]);return r.canvasApi.canvas.addEventListener("mouseup",r.handleCanvasMouseup),r.canvasApi.canvas.addEventListener("contextmenu",r.handleCanvasContextmenu),r}return(0,K.A)(n,[{key:"events",get:function(){return this._events},set:function(e){this._events=e,this.rebuildIndex()}},{key:"registerRenderer",value:function(e,t){this.renderers.set(e,t)}},{key:"getRenderer",value:function(e){return this.renderers.get(e)}},{key:"getEventsAt",value:function(e){var t,n=this.canvasApi,r=-((null===(t=n.getComponent(Jo))||void 0===t?void 0:t.height)||0)+n.canvasScrollTop;return this.index.search({minX:n.positionToTime(e.left-this.eventHitboxPadding),maxX:n.positionToTime(e.right+this.eventHitboxPadding),minY:e.top+r-this.eventHitboxPadding,maxY:e.bottom+r+this.eventHitboxPadding}).map((function(e){return e.event}))}},{key:"getEventsAtPoint",value:function(e,t){return this.getEventsAt(new DOMRect(e-3,t-3,6,6))}},{key:"selectedEvents",get:function(){var e=this;return this.events.filter((function(t){return e.isSelectedEvent(t)}))}},{key:"isSelectedEvent",value:function(e){if(!e)return!1;var t=this.getEventIdentity(e);return this._selectedEvents.has(t)}},{key:"selectEvents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._selectedEvents;t.append||n.clear();var r=t.toggle?function(e){n.has(e)?n.delete(e):n.add(e)}:function(e){return n.add(e)};if(this.allowMultipleSelection){var i,o=(0,Ur.A)(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;r(this.getEventIdentity(a))}}catch(e){o.e(e)}finally{o.f()}}else e.length>0&&(n.size>0&&!n.has(e[0])&&n.clear(),e.length>0&&r(this.getEventIdentity(e[0])));this.host.dispatchEvent(new CustomEvent("eventsSelected",{detail:{events:this.selectedEvents}})),this.host.scheduleTimelineRender()}},{key:"selectEventsAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.selectEvents(this.getEventsAt(e),t)}},{key:"render",value:function(e){var t,n=e.getComponent(ra),r=(null===(t=e.getComponent(Jo))||void 0===t?void 0:t.height)||0;if(n){var i=n.axesById;e.useScrollTransform();var o=e.ctx,a=function(t){return e.timeToPosition(t)};o.translate(0,r),o.font=this.eventCounterFont,o.lineWidth=2;for(var s=0,u=this.events.length;s<u;s+=1){var l=this.events[s],c=i[l.axisId];if(c){var d=n.getAxisTrackPosition(c,l.trackIndex);if(c&&Bo(e.start,e.end,l.from,l.to)){var f=e.timeToPosition(l.from),h=e.timeToPosition(l.to);this.runRenderer(o,l,this.isSelectedEvent(l),f,h,d,c.height,a)}}}}}},{key:"runRenderer",value:function(e,t,n,r,i,o,a,s,u){var l;null===(l=this.renderers)||void 0===l||null===(l=l.get(t.renderType))||void 0===l||l.render(e,t,n,r,i,o,a,s,u)}},{key:"rebuildIndex",value:function(){var e=this.canvasApi.getComponent(ra),t=this._events.map((function(t){var n=e.axesById[t.axisId],r=e.getAxisTrackPosition(n,t.trackIndex),i=t.from;return{minX:i,maxX:t.to?t.to:i+1,minY:r-e.trackHeight/2,maxY:r+e.trackHeight/2,event:t}}));this.index.clear(),this.index.load(t)}}]),n}(zo),la=function(e){(0,X.A)(n,e);var t=(0,G.A)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,W.A)(this,n),(r=t.call(this,e)).borderColor=Do.SELECTION_OUTLINE_COLOR,r.innerColor=Do.SELECTION_BG_COLOR,r.handleCanvasMousedown=function(e){if($o(e)){e.stopPropagation(),e.stopImmediatePropagation();var t=r.canvasApi.canvas.getBoundingClientRect(),n=e.clientX-t.left,i=e.clientY-t.top,o=function(e){var o=e.clientX-t.left,a=e.clientY-t.top;Math.sqrt(Math.pow(o-n,2)+Math.pow(a-i,2))>3&&(r.area=new DOMRect(n,i,o-n,a-i),r.host.scheduleTimelineRender())};document.addEventListener("mousemove",o),document.addEventListener("mouseup",(function e(){r.area&&(r.onSelected(r.area),r.area=void 0,r.host.scheduleTimelineRender()),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",e)}))}},r.area=void 0,r.onSelected=function(e){var t=r.canvasApi.getComponent(ua);t&&t.selectEventsAt(e)},Object.assign((0,mo.A)(r),i),r.canvasApi.canvas.addEventListener("mousedown",r.handleCanvasMousedown),r}return(0,K.A)(n,[{key:"render",value:function(e){if(this.area){var t=this.area,n=e.ctx;e.useStaticTransform(),n.strokeStyle=Do.resolveCssValue(this.borderColor),n.fillStyle=Do.resolveCssValue(this.innerColor),n.lineWidth=2,n.beginPath(),n.strokeRect(t.x,t.y,t.width,t.height);var r=n.globalAlpha;n.globalAlpha=.1,n.fillRect(t.x,t.y,t.width,t.height),n.globalAlpha=r}}}]),n}(zo),ca=n(24503),da=n.n(ca),fa=function(){function e(t,n){(0,W.A)(this,e),this.from=t,this.to=n}return(0,K.A)(e,[{key:"set",value:function(e,t){return this.from=e,this.to=t,this}},{key:"align",value:function(e){return this.from=Vo(this.from,e),this.to=Vo(this.to,e),this}},{key:"contain",value:function(t){return new e(Math.min(this.from,t.from),Math.max(this.to,t.to))}},{key:"subtract",value:function(){for(var t=[this],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s,u=a[o],l=[],c=(0,Ur.A)(t);try{for(c.s();!(s=c.n()).done;){var d=s.value;Bo(d.from,d.to,u.from,u.to)?(d.from<u.from&&l.push(new e(d.from,u.from)),d.to>u.to&&l.push(new e(u.to,d.to))):l.push(d)}}catch(e){c.e(e)}finally{c.f()}t=l}return t.sort((function(e,t){return e.from-t.from}))}},{key:"clone",value:function(){return new e(this.from,this.to)}},{key:"length",get:function(){return this.to-this.from}},{key:"equals",value:function(e){return Yo(this.from,e.from,.1)&&Yo(this.to,e.to,.1)}}]),e}(),ha=function(){function e(t){(0,W.A)(this,e),this.getAxisIdentity=function(e){return e.id},this.visibleEvents=[],this.foldedEvents=[],this._timeRange=new fa(0,0),this._viewportWidth=0,this.axesIndex=void 0,this._getRawEvents=ge().mark((function e(){return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield([],"t0",1);case 1:case"end":return e.stop()}}),e)})),this.mapEvent=void 0,this.mergeEvents=Fo,this.finalizeEvent=Fo,this.overlapThreshold=Do.OVERLAPPING_THRESHOLD,this.onVisibleEventsChanged=Fo,Object.assign(this,t),this.axesIndex=new Xo([],{identityFunction:this.getAxisIdentity})}return(0,K.A)(e,[{key:"getRawEvents",set:function(e){this._getRawEvents=e,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"axes",get:function(){return this.axesIndex.axes},set:function(e){this.axesIndex.axes=e,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"timeRange",get:function(){return this._timeRange},set:function(e){var t=this._timeRange;this._timeRange=e,Yo(e.length,t.length,.1)||this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"viewportWidth",set:function(e){this._viewportWidth=e,this.foldEvents(),this.recalcVisibility(),this.onVisibleEventsChanged(this.visibleEvents)}},{key:"recalcVisibility",value:function(){this.visibleEvents.length=0;for(var e=this.foldedEvents,t=0,n=e.length;t<n;t+=1){var r=e[t];Bo(this._timeRange.from,this._timeRange.to,r.from,r.to||r.from)&&this.visibleEvents.push(r)}return this.visibleEvents}},{key:"clampEventTrackIndex",value:function(e,t){return qo(e.trackIndex,-1,t.tracksCount-1)}},{key:"foldEvents",value:function(){var e=this;this.foldedEvents.length=0;var t,n=this._getRawEvents(),r=this.axesIndex.axes.reduce((function(t,n){return t[e.getAxisIdentity(n)]=[],t}),{}),i=Object.create(null),o=(0,Ur.A)(n);try{for(o.s();!(t=o.n()).done;){var a=t.value;this.mapEvent(i,a),i.eventsCount=1;var s=i.axisId,u=this.axesIndex.axesById[s];if(u){var l=this.clampEventTrackIndex(i,u);if(-1===l){for(l=0;l<u.tracksCount;){var c=r[s][l];if(!c||!this.isOverlapping(c,i))break;l+=1}l=qo(l,0,u.tracksCount-1),i.trackIndex=l}var d=r[s][l];d?this.isOverlapping(d,i)?(d.eventsCount+=i.eventsCount,d.from=Math.min(d.from,i.from),d.to=Math.max(d.to,i.to),this.mergeEvents(d,i)):(this.finalizeEvent(d),this.foldedEvents.push(d),r[s][l]=i,i=Object.create(null)):(r[s][l]=i,i=Object.create(null))}}}catch(e){o.e(e)}finally{o.f()}for(var f=0,h=Object.values(r);f<h.length;f++){var v,p=h[f],m=(0,Ur.A)(p);try{for(m.s();!(v=m.n()).done;){var g=v.value;g&&(this.finalizeEvent(g),this.foldedEvents.push(g))}}catch(e){m.e(e)}finally{m.f()}}}},{key:"isOverlapping",value:function(e,t){return Bo(e.from,e.to,t.from,t.to)||this.timeToWidth(t.from-e.to)<=this.overlapThreshold}},{key:"timeToWidth",value:function(e){return e*this._viewportWidth/this._timeRange.length}}]),e}(),va=function(e){(0,X.A)(n,e);var t=(0,G.A)(n);function n(e){var r;return(0,W.A)(this,n),(r=t.call(this,e)).handleTimeRangeChanged=da()((function(e){r.mapper.timeRange.equals(e)||(r.mapper.timeRange=e)}),250),r.handleVisibleEventsChanged=function(e){r.canvasApi.getComponent(ua).events=e,r.host.scheduleTimelineRender()},r.mapper=void 0,r.events=[],r.mapper=new ha({mapEvent:function(e,t){Object.assign(e,t)},onVisibleEventsChanged:r.handleVisibleEventsChanged}),r}return(0,K.A)(n,[{key:"appendEvents",value:function(e){this.events=this.events.concat(e),this.notifyMapperEvents()}},{key:"setEvents",value:function(e){this.events=e,this.notifyMapperEvents()}},{key:"axes",get:function(){return this.mapper.axes},set:function(e){if(e!==this.mapper.axes){var t=this.canvasApi.getComponent(ra);t&&(t.axes=e),this.mapper.axes=e}}},{key:"hostConnected",value:function(){this.mapper.viewportWidth=this.canvasApi.canvas.width,this.handleTimeRangeChanged(new fa(this.host.start,this.host.end))}},{key:"hostUpdated",value:function(){var e=new fa(this.host.start,this.host.end);this.handleTimeRangeChanged(e)}},{key:"notifyMapperEvents",value:function(){var e=ge().mark(n),t=this.events;function n(){return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(t,"t0",1);case 1:case"end":return e.stop()}}),e)}this.mapper.getRawEvents=n}}]),n}(zo),pa=function(e){(0,X.A)(n,e);var t=(0,G.A)(n);function n(){return(0,W.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"render",value:function(e){for(var t,n,r=(null===(t=e.getComponent(Jo))||void 0===t?void 0:t.height)||0,i=e.canvas,o=e.start,a=e.end,s=e.pixelRatio,u=r,l=i.width/s,c=i.height-r,d=a-o,f=0,h=ga.length;f<h;f+=1)if(!(d>ga[f].domain)){for(var v=0,p=Qo()(0);+p<d;p=ga[f].step(p))Ho(+p,0,d,0,0+l)>0&&(v+=Do.RULER_GRID_SPACING);if(!(v>l+40)){n=ga[f];break}}e.useStaticTransform(),e.ctx.lineJoin="miter",e.ctx.miterLimit=2,e.ctx.lineWidth=1,this.renderLevel(e.ctx,u,0,l,c,o,a,n)}},{key:"renderLevel",value:function(e,t,n,r,i,o,a,s){e.lineWidth=Do.GRID_STROKE_WIDTH;for(var u=s.start(o);+u<a;u=s.step(u)){var l=Math.floor(Ho(+u,o,a,n,n+r));e.beginPath(),e.strokeStyle=s.style(u),e.moveTo(l,t),e.lineTo(l,t+i),e.stroke()}}}]),n}(zo);function ma(e,t){return function(n){return n[t]()%e==0?Do.resolveCssValue(Do.PRIMARY_MARK_COLOR):Do.resolveCssValue(Do.SECONDARY_MARK_COLOR)}}var ga=[{domain:go,style:ma(5,"minute"),start:function(e){return Qo()(e).startOf("minute")},step:function(e){return e.add(1,"minute")}},{domain:yo,style:function(e){return 0===e.hour()&&0===e.minute()?Do.resolveCssValue(Do.BOUNDARY_MARK_COLOR):e.minute()%4==0?Do.resolveCssValue(Do.PRIMARY_MARK_COLOR):Do.resolveCssValue(Do.SECONDARY_MARK_COLOR)},start:function(e){var t=Qo()(e).startOf("minute");return t.subtract(t.minute()%15,"minute")},step:function(e){return e.add(15,"minute")}},{domain:xo,style:function(e){return 0===e.hour()?Do.resolveCssValue(Do.BOUNDARY_MARK_COLOR):e.hour()%4==0?Do.resolveCssValue(Do.PRIMARY_MARK_COLOR):Do.resolveCssValue(Do.SECONDARY_MARK_COLOR)},start:function(e){return Qo()(e).startOf("hour")},step:function(e){return e.add(1,"hour")}},{domain:bo,style:function(e){return 1===e.date()?Do.resolveCssValue(Do.BOUNDARY_MARK_COLOR):1===e.day()?Do.resolveCssValue(Do.PRIMARY_MARK_COLOR):Do.resolveCssValue(Do.SECONDARY_MARK_COLOR)},start:function(e){return Qo()(e).startOf("day")},step:function(e){return e.add(1,"day")}},{domain:5*bo,style:ma(3,"month"),start:function(e){return Qo()(e).startOf("month")},step:function(e){return Qo()(e).add(1,"month")}},{domain:1/0,style:function(){return Do.resolveCssValue(Do.PRIMARY_MARK_COLOR)},start:function(e){return Qo()(e).startOf("year")},step:function(e){return e.add(1,"year")}}],ya=n(64624),xa=n(28782);const ba=window,Aa=ba.ShadowRoot&&(void 0===ba.ShadyCSS||ba.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,wa=Symbol(),Ea=new WeakMap;class _a{constructor(e,t,n){if(this._$cssResult$=!0,n!==wa)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Aa&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=Ea.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Ea.set(t,e))}return e}toString(){return this.cssText}}const Ca=Aa?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new _a("string"==typeof e?e:e+"",void 0,wa))(t)})(e):e;var ja;const Sa=window,ka=Sa.trustedTypes,Na=ka?ka.emptyScript:"",Ta=Sa.reactiveElementPolyfillSupport,Ra={toAttribute(e,t){switch(t){case Boolean:e=e?Na:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Oa=(e,t)=>t!==e&&(t==t||e==e),Ia={attribute:!0,type:String,converter:Ra,reflect:!1,hasChanged:Oa},Ma="finalized";class Pa extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,n)=>{const r=this._$Ep(n,t);void 0!==r&&(this._$Ev.set(r,n),e.push(r))})),e}static createProperty(e,t=Ia){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n="symbol"==typeof e?Symbol():"__"+e,r=this.getPropertyDescriptor(e,n,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(r){const i=this[e];this[t]=r,this.requestUpdate(e,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Ia}static finalize(){if(this.hasOwnProperty(Ma))return!1;this[Ma]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(Ca(e))}else void 0!==e&&t.push(Ca(e));return t}static _$Ep(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,n;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{Aa?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const n=document.createElement("style"),r=ba.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=t.cssText,e.appendChild(n)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=Ia){var r;const i=this.constructor._$Ep(e,n);if(void 0!==i&&!0===n.reflect){const o=(void 0!==(null===(r=n.converter)||void 0===r?void 0:r.toAttribute)?n.converter:Ra).toAttribute(t,n.type);this._$El=e,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(e,t){var n;const r=this.constructor,i=r._$Ev.get(e);if(void 0!==i&&this._$El!==i){const e=r.getPropertyOptions(i),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(n=e.converter)||void 0===n?void 0:n.fromAttribute)?e.converter:Ra;this._$El=i,this[i]=o.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,n){let r=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||Oa)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(n)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}var La;Pa[Ma]=!0,Pa.elementProperties=new Map,Pa.elementStyles=[],Pa.shadowRootOptions={mode:"open"},null==Ta||Ta({ReactiveElement:Pa}),(null!==(ja=Sa.reactiveElementVersions)&&void 0!==ja?ja:Sa.reactiveElementVersions=[]).push("1.6.3");const Da=window,za=Da.trustedTypes,$a=za?za.createPolicy("lit-html",{createHTML:e=>e}):void 0,Fa="$lit$",Ua=`lit$${(Math.random()+"").slice(9)}$`,Ba="?"+Ua,Ha=`<${Ba}>`,qa=document,Va=()=>qa.createComment(""),Ya=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Wa=Array.isArray,Ka="[ \t\n\f\r]",Xa=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ga=/-->/g,Qa=/>/g,Ja=RegExp(`>|${Ka}(?:([^\\s"'>=/]+)(${Ka}*=${Ka}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Za=/'/g,es=/"/g,ts=/^(?:script|style|textarea|title)$/i,ns=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),rs=ns(1),is=(ns(2),Symbol.for("lit-noChange")),os=Symbol.for("lit-nothing"),as=new WeakMap,ss=qa.createTreeWalker(qa,129,null,!1);function us(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==$a?$a.createHTML(t):t}class ls{constructor({strings:e,_$litType$:t},n){let r;this.parts=[];let i=0,o=0;const a=e.length-1,s=this.parts,[u,l]=((e,t)=>{const n=e.length-1,r=[];let i,o=2===t?"<svg>":"",a=Xa;for(let t=0;t<n;t++){const n=e[t];let s,u,l=-1,c=0;for(;c<n.length&&(a.lastIndex=c,u=a.exec(n),null!==u);)c=a.lastIndex,a===Xa?"!--"===u[1]?a=Ga:void 0!==u[1]?a=Qa:void 0!==u[2]?(ts.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=Ja):void 0!==u[3]&&(a=Ja):a===Ja?">"===u[0]?(a=null!=i?i:Xa,l=-1):void 0===u[1]?l=-2:(l=a.lastIndex-u[2].length,s=u[1],a=void 0===u[3]?Ja:'"'===u[3]?es:Za):a===es||a===Za?a=Ja:a===Ga||a===Qa?a=Xa:(a=Ja,i=void 0);const d=a===Ja&&e[t+1].startsWith("/>")?" ":"";o+=a===Xa?n+Ha:l>=0?(r.push(s),n.slice(0,l)+Fa+n.slice(l)+Ua+d):n+Ua+(-2===l?(r.push(void 0),t):d)}return[us(e,o+(e[n]||"<?>")+(2===t?"</svg>":"")),r]})(e,t);if(this.el=ls.createElement(u,n),ss.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(r=ss.nextNode())&&s.length<a;){if(1===r.nodeType){if(r.hasAttributes()){const e=[];for(const t of r.getAttributeNames())if(t.endsWith(Fa)||t.startsWith(Ua)){const n=l[o++];if(e.push(t),void 0!==n){const e=r.getAttribute(n.toLowerCase()+Fa).split(Ua),t=/([.?@])?(.*)/.exec(n);s.push({type:1,index:i,name:t[2],strings:e,ctor:"."===t[1]?vs:"?"===t[1]?ms:"@"===t[1]?gs:hs})}else s.push({type:6,index:i})}for(const t of e)r.removeAttribute(t)}if(ts.test(r.tagName)){const e=r.textContent.split(Ua),t=e.length-1;if(t>0){r.textContent=za?za.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],Va()),ss.nextNode(),s.push({type:2,index:++i});r.append(e[t],Va())}}}else if(8===r.nodeType)if(r.data===Ba)s.push({type:2,index:i});else{let e=-1;for(;-1!==(e=r.data.indexOf(Ua,e+1));)s.push({type:7,index:i}),e+=Ua.length-1}i++}}static createElement(e,t){const n=qa.createElement("template");return n.innerHTML=e,n}}function cs(e,t,n=e,r){var i,o,a,s;if(t===is)return t;let u=void 0!==r?null===(i=n._$Co)||void 0===i?void 0:i[r]:n._$Cl;const l=Ya(t)?void 0:t._$litDirective$;return(null==u?void 0:u.constructor)!==l&&(null===(o=null==u?void 0:u._$AO)||void 0===o||o.call(u,!1),void 0===l?u=void 0:(u=new l(e),u._$AT(e,n,r)),void 0!==r?(null!==(a=(s=n)._$Co)&&void 0!==a?a:s._$Co=[])[r]=u:n._$Cl=u),void 0!==u&&(t=cs(e,u._$AS(e,t.values),u,r)),t}class ds{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:n},parts:r}=this._$AD,i=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:qa).importNode(n,!0);ss.currentNode=i;let o=ss.nextNode(),a=0,s=0,u=r[0];for(;void 0!==u;){if(a===u.index){let t;2===u.type?t=new fs(o,o.nextSibling,this,e):1===u.type?t=new u.ctor(o,u.name,u.strings,this,e):6===u.type&&(t=new ys(o,this,e)),this._$AV.push(t),u=r[++s]}a!==(null==u?void 0:u.index)&&(o=ss.nextNode(),a++)}return ss.currentNode=qa,i}v(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class fs{constructor(e,t,n,r){var i;this.type=2,this._$AH=os,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cp=null===(i=null==r?void 0:r.isConnected)||void 0===i||i}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===(null==e?void 0:e.nodeType)&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=cs(this,e,t),Ya(e)?e===os||null==e||""===e?(this._$AH!==os&&this._$AR(),this._$AH=os):e!==this._$AH&&e!==is&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):(e=>Wa(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==os&&Ya(this._$AH)?this._$AA.nextSibling.data=e:this.$(qa.createTextNode(e)),this._$AH=e}g(e){var t;const{values:n,_$litType$:r}=e,i="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=ls.createElement(us(r.h,r.h[0]),this.options)),r);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===i)this._$AH.v(n);else{const e=new ds(i,this),t=e.u(this.options);e.v(n),this.$(t),this._$AH=e}}_$AC(e){let t=as.get(e.strings);return void 0===t&&as.set(e.strings,t=new ls(e)),t}T(e){Wa(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,r=0;for(const i of e)r===t.length?t.push(n=new fs(this.k(Va()),this.k(Va()),this,this.options)):n=t[r],n._$AI(i),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cp=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class hs{constructor(e,t,n,r,i){this.type=1,this._$AH=os,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=os}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,r){const i=this.strings;let o=!1;if(void 0===i)e=cs(this,e,t,0),o=!Ya(e)||e!==this._$AH&&e!==is,o&&(this._$AH=e);else{const r=e;let a,s;for(e=i[0],a=0;a<i.length-1;a++)s=cs(this,r[n+a],t,a),s===is&&(s=this._$AH[a]),o||(o=!Ya(s)||s!==this._$AH[a]),s===os?e=os:e!==os&&(e+=(null!=s?s:"")+i[a+1]),this._$AH[a]=s}o&&!r&&this.j(e)}j(e){e===os?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class vs extends hs{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===os?void 0:e}}const ps=za?za.emptyScript:"";class ms extends hs{constructor(){super(...arguments),this.type=4}j(e){e&&e!==os?this.element.setAttribute(this.name,ps):this.element.removeAttribute(this.name)}}class gs extends hs{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){var n;if((e=null!==(n=cs(this,e,t,0))&&void 0!==n?n:os)===is)return;const r=this._$AH,i=e===os&&r!==os||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==os&&(r===os||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}class ys{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){cs(this,e)}}const xs=Da.litHtmlPolyfillSupport;var bs,As;null==xs||xs(ls,fs),(null!==(La=Da.litHtmlVersions)&&void 0!==La?La:Da.litHtmlVersions=[]).push("2.8.0");class ws extends Pa{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{var r,i;const o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:t;let a=o._$litPart$;if(void 0===a){const e=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=a=new fs(t.insertBefore(Va(),e),e,void 0,null!=n?n:{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return is}}ws.finalized=!0,ws._$litElement$=!0,null===(bs=globalThis.litElementHydrateSupport)||void 0===bs||bs.call(globalThis,{LitElement:ws});const Es=globalThis.litElementPolyfillSupport;null==Es||Es({LitElement:ws}),(null!==(As=globalThis.litElementVersions)&&void 0!==As?As:globalThis.litElementVersions=[]).push("3.3.3");var _s,Cs=function(){function e(t){(0,W.A)(this,e),this.canvas=void 0,this.ctx=void 0,this.notifyBoundsChanged=void 0,this.notifyScrollTopChanged=void 0,this.timeline=void 0,Object.assign(this,t),this.canvas=t.timeline.renderRoot.querySelector("canvas"),this.ctx=this.canvas.getContext("2d"),this.ctx.globalAlpha=1}return(0,K.A)(e,[{key:"pixelRatio",get:function(){return window.devicePixelRatio||1}},{key:"canvasScrollTop",get:function(){return this.timeline.canvasScrollTop||0}},{key:"start",get:function(){return this.timeline.start}},{key:"end",get:function(){return this.timeline.end}},{key:"width",get:function(){return this.canvas.width/this.pixelRatio}},{key:"height",get:function(){return this.canvas.height/this.pixelRatio}},{key:"currentTime",get:function(){return Vo(Date.now(),1e3)}},{key:"timeToPosition",value:function(e){var t=this.width;return Ho(e,this.timeline.start,this.timeline.end,0,t)||0}},{key:"positionToTime",value:function(e){return Ho(e,0,this.width,this.timeline.start,this.timeline.end)}},{key:"widthToTime",value:function(e){return this.positionToTime(e)-this.start}},{key:"clear",value:function(){this.ctx.fillStyle=Do.resolveCssValue(Do.PRIMARY_BACKGROUND_COLOR),this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}},{key:"useStaticTransform",value:function(){var e=this.pixelRatio;this.ctx.setTransform(e,0,0,e,0,0)}},{key:"useScrollTransform",value:function(){var e=this.pixelRatio;this.ctx.setTransform(e,0,0,e,0,-this.canvasScrollTop*e)}},{key:"getComponent",value:function(e){return this.timeline.getComponentUnsafe(e)}}]),e}(),js=function(e){(0,X.A)(r,e);var t,n=(0,G.A)(r);function r(){var e;return(0,W.A)(this,r),(e=n.call(this)).start=void 0,e.end=void 0,e.canvasScrollTop=void 0,e.canvasLastWidth=void 0,e.canvasLastHeight=void 0,e.isZoomAllowed=void 0,e.handleWindowResize=function(){e.updateCanvasSize()},e.handleCanvasMousedown=function(t){t.stopPropagation(),t.preventDefault();var n=t.pageX,r=t.pageY,i=e.start,o=e.canvasScrollTop,a=e.end-i,s=e.canvasApi.canvas.width/e.canvasApi.pixelRatio,u=0,l=function(t){var l=(t.pageX-n)/s*a;e.notifyBoundsChanged(i-l,i-l+a);var c=t.pageY-r;Math.abs(c)>.1&&e.notifyScrollTopChanged(qo(o-c,0,1/0)),u=Math.sqrt(Math.pow(t.pageX-n,2)+Math.pow(c,2))};document.addEventListener("mousemove",l),document.addEventListener("mouseup",(function e(t){u>2&&t.stopPropagation(),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",e,{capture:!0})}),{capture:!0})},e.handleCanvasWheel=function(t){t.stopPropagation(),t.preventDefault();var n=e.canvasApi;if(t.shiftKey||e.isZoomAllowed){var r=e.start,i=e.end,o=i-r,a=!1;if(Math.abs(t.deltaY)>2)if(t.shiftKey){a=!0;var s=o*t.deltaY*Do.WHEEL_PAN_SPEED;r+=s,i+=s}else{var u=t.offsetX/n.canvas.width,l=qo(o*(t.deltaY>0?1.15:.9),Do.ZOOM_MIN,Do.ZOOM_MAX);r=Math.round(e.start-(l-o)*u),i=Math.round(e.end+(l-o)*(1-u))}if(!a&&0!==t.deltaX){var c=(i-r)*t.deltaX*Do.WHEEL_PAN_SPEED;r+=c,i+=c}r===e.start&&i===e.end||e.notifyBoundsChanged(r,i)}},e.canvasApi=void 0,e.isTimelineRenderScheduled=!1,e.components=[],e.sizeUpdateTimerId=void 0,e.notifyBoundsChanged=function(t,n){e.dispatchEvent(new CustomEvent("boundsChanged",{detail:{start:t,end:n}}))},e.notifyScrollTopChanged=function(t){e.dispatchEvent(new CustomEvent("scrollTopChanged",{detail:{scrollTop:t}}))},e.canvasLastWidth=0,e.canvasLastHeight=0,e.start=0,e.end=xo,e.canvasScrollTop=0,e.isZoomAllowed=!0,e}return(0,K.A)(r,[{key:"render",value:function(){return rs(_s||(e=['\n <style>\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n canvas {\n position: relative;\n height: 100%;\n width: 100%;\n }\n </style>\n\n <canvas tabindex="0">'," "," ","</canvas>\n "],t||(t=e.slice(0)),_s=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),this.start,this.end,this.canvasScrollTop);var e,t}},{key:"shouldUpdate",value:function(e){return(e.has("start")||e.has("end")||e.has("canvasScrollTop"))&&this.scheduleTimelineRender(),(0,ya.A)((0,xa.A)(r.prototype),"shouldUpdate",this).call(this,e)}},{key:"connectedCallback",value:function(){(0,ya.A)((0,xa.A)(r.prototype),"connectedCallback",this).call(this),this.init()}},{key:"disconnectedCallback",value:function(){this.destroy(),(0,ya.A)((0,xa.A)(r.prototype),"disconnectedCallback",this).call(this)}},{key:"getComponentUnsafe",value:function(e){return this.components.find((function(t){return t instanceof e}))}},{key:"getComponent",value:(t=(0,pe.A)(ge().mark((function e(t){return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.updateComplete;case 2:return e.abrupt("return",this.getComponentUnsafe(t));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getCanvasApiUnsafe",value:function(){return this.canvasApi}},{key:"initComponents",value:function(){this.components=this.createComponents();var e,t=(0,Ur.A)(this.components);try{for(t.s();!(e=t.n()).done;){var n=e.value;this.addController(n)}}catch(e){t.e(e)}finally{t.f()}}},{key:"firstUpdated",value:function(e){(0,ya.A)((0,xa.A)(r.prototype),"firstUpdated",this).call(this,e),this.canvasApi=new Cs({timeline:this,notifyBoundsChanged:this.notifyBoundsChanged,notifyScrollTopChanged:this.notifyScrollTopChanged}),this.initComponents();var t=this.canvasApi.canvas;t.addEventListener("mousedown",this.handleCanvasMousedown),t.addEventListener("wheel",this.handleCanvasWheel)}},{key:"init",value:function(){var e=this;this.canvasLastWidth=0,this.canvasLastHeight=0,this.updateComplete.then((function(){window.addEventListener("resize",e.handleWindowResize),e.sizeUpdateTimerId=window.setInterval((function(){(e.offsetHeight!==e.canvasLastHeight||e.offsetWidth!==e.canvasLastWidth)&&(e.updateCanvasSize(),e.canvasLastWidth=e.offsetWidth,e.canvasLastHeight=e.offsetHeight)}),2e3),e.updateCanvasSize()}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.handleWindowResize),clearInterval(this.sizeUpdateTimerId)}},{key:"reset",value:function(){var e=this;this.destroy(),requestAnimationFrame((function(){return e.init()}))}},{key:"scheduleTimelineRender",value:function(){var e=this;this.isTimelineRenderScheduled||(this.isTimelineRenderScheduled=!0,requestAnimationFrame((function(){e.renderTimeline(),e.isTimelineRenderScheduled=!1})))}},{key:"renderTimeline",value:function(){var e=this.canvasApi;e.useStaticTransform(),e.clear();var t,n=(0,Ur.A)(this.components);try{for(n.s();!(t=n.n()).done;)t.value.render(e)}catch(e){n.e(e)}finally{n.f()}}},{key:"updateCanvasSize",value:function(){var e=this.canvasApi,t=null==e?void 0:e.canvas;t&&(t.width=Math.floor(this.offsetWidth*e.pixelRatio),t.height=Math.floor(this.offsetHeight*e.pixelRatio),this.canvasLastWidth=t.width,this.canvasLastHeight=t.height,this.scheduleTimelineRender())}}],[{key:"properties",get:function(){return{start:{type:Number},end:{type:Number},canvasScrollTop:{type:Number},isZoomAllowed:{type:Boolean}}}}]),r}(ws);const Ss=new Set(["children","wcType"]);class ks extends a.Component{get element(){return this._element}getTag(){let e;return"function"==typeof this.props.wcType?e=this.props.wcType.name.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase():"string"==typeof this.props.wcType&&(e=this.props.wcType),e}render(){const e=this.getTag();if(!e)throw'"wcType" must be set!';const t={};for(const e of Object.keys(this.props))e&&!0===this.props[e]&&(t[e]=!0);return a.createElement(e,Object.assign(Object.assign({},t),{ref:e=>this.setRef(e)}),this.props.children)}setRef(e){e?(e!==this._element&&this.cleanUp(),this._element=e,this.syncProps(this.props)):this.cleanUp(),this.props.innerRef&&("function"==typeof this.props.innerRef?this.props.innerRef(e):this.props.innerRef.current=e)}cleanUp(){if(this._element){for(const e in this.props)this.props.hasOwnProperty(e)&&this.isEventProp(e,this.props[e])&&this.removeEventListener(e,this.props[e]);this._element=null}}componentDidUpdate(e){const t={};for(const n in this.props)this.props.hasOwnProperty(n)&&(e[n]&&e[n]===this.props[n]||(t[n]=this.props[n],e[n]&&this.isEventProp(n,e[n])&&this.removeEventListener(n,e[n])));for(const t in e)e.hasOwnProperty(t)&&!this.props[t]&&this.isEventProp(t,e[t])&&this.removeEventListener(t,e[t]);this.syncProps(t)}syncProps(e){if(this._element)for(const t in e)Ss.has(t)||(this.isEventProp(t,e[t])&&this.addEventListener(t,e[t]),this._element[t]=e[t])}isEventProp(e,t){return e&&"function"==typeof t}addEventListener(e,t){let n=e;n.match(/^on[A-Z]/gm)&&(n=n.substring(2).toLowerCase()),this._element.addEventListener(n,t)}removeEventListener(e,t){let n=e;n.match(/^on[A-Z]/gm)&&(n=n.substring(2).toLowerCase()),this._element.removeEventListener(n,t)}}function Ns(e,t){if(e&&t)return t-e==0?"0s":t-e<1e3?"<1s":ei(e,t,"h:mm:ss")}var Ts=function(e){(0,X.A)(n,e);var t=(0,G.A)(n);function n(){return(0,W.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"render",value:function(e,t,n,r,i,o){var a=o-8,s=Math.max(i-r,4),u=16,l=Ns(t.from,t.to),c=r,d=0;if(0===t.trackIndex&&Object.keys(t.colors).length>1){for(var f=1;f<Object.keys(t.colors).length;f++){var h=s*t.colors[f].percentage;f===Object.keys(t.colors).length-1&&(h=Math.max(s*t.colors[f].percentage,4)),e.fillStyle=Do.resolveCssValue(t.colors[f].color),e.fillRect(c,a,h,u),c+=h,d+=h}if(1===t.eventsCount&&t.borderColor&&(function(e){var t=e.ctx,n=e.x0,r=e.y0,i=e.width,o=e.height,a=e.color;t.fillStyle=a,t.beginPath(),t.lineTo(n-1,r+o+5+1),t.lineTo(n+10,r+o+1),t.lineTo(n-1,r+o+1),t.fill(),t.beginPath(),t.lineTo(n+i+1,r+o+5+1),t.lineTo(n+i-10,r+o+1),t.lineTo(n+i+1,r+o+1),t.fill()}({ctx:e,x0:r,y0:a,width:d||s,height:u,color:Do.resolveCssValue(t.borderColor)}),e.strokeStyle=Do.resolveCssValue(t.borderColor),e.lineWidth=2,e.strokeRect(r,a,d||s,u),t.backgroundColor)){var v=(Do.TRACK_HEIGHT-u)/3;e.fillStyle=Do.resolveCssValue(t.backgroundColor),e.fillRect(r-v,a-v,(d||s)+2*v,Do.TRACK_HEIGHT*Object.keys(t.colors).length-v)}}else{var p=t.colors[t.trackIndex].color;e.fillStyle=Do.resolveCssValue(p),e.fillRect(r,a,s,u)}n&&(e.strokeStyle=Do.resolveCssValue(Do.SELECTION_OUTLINE_COLOR),e.lineWidth=Do.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,d||s,u)),l&&function(e,t,n,r){e.fillStyle=Do.resolveCssValue(Do.COUNTER_FONT_COLOR),e.fillText(t,n+Do.COUNTER_PADDING,r+Do.COUNTER_FONT_CENTER_OFFSET)}(e,l,r+Math.max(d,s),o)}},{key:"getHitbox",value:function(e,t,n){return this.hitboxResult.left=t,this.hitboxResult.right=t+Math.max(n-t,4),this.hitboxResult}}]),n}(ia),Rs=function(e){(0,X.A)(n,e);var t=(0,G.A)(n);function n(){return(0,W.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"events",set:function(e){this.getComponent(va).then((function(t){null==t||t.setEvents(e)}))}},{key:"axes",set:function(e){this.getComponent(va).then((function(t){t&&(t.axes=e)}))}},{key:"theme",set:function(e){this.setTimelineConfig(),this.scheduleTimelineRender()}},{key:"updateCanvasSize",value:function(){if(this.offsetHeight)return(0,ya.A)((0,xa.A)(n.prototype),"updateCanvasSize",this).call(this)}},{key:"createComponents",value:function(){this.setTimelineConfig();var e=new ua(this);return e.registerRenderer("operation",new Ts),[new pa(this),new ra(this),e,new la(this),new va(this)]}},{key:"setTimelineConfig",value:function(){Do.ZOOM_MAX=3*bo,Do.PRIMARY_BACKGROUND_COLOR=Nn("--g-color-base-background"),Do.SECONDARY_MARK_COLOR=Nn("--g-color-line-generic"),Do.BOUNDARY_MARK_COLOR=Nn("--g-color-line-generic"),Do.PRIMARY_MARK_COLOR=Nn("--g-color-line-generic-hover"),Do.COUNTER_FONT_COLOR=Nn("--g-color-text-complementary")}}]),n}(js);customElements.define("my-timeline-canvas",Rs);var Os=(e=>{const t=a.forwardRef(((e,t)=>a.createElement(ks,Object.assign({wcType:"my-timeline-canvas",innerRef:t},e))));return t})();function Is(){return Is=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Is.apply(this,arguments)}var Ms,Ps=["bottom","height","left","right","top","width"],Ls=new Map,Ds=function e(){var t=[];Ls.forEach((function(e,n){var r=n.getBoundingClientRect();(function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),Ps.some((function(n){return e[n]!==t[n]}))})(r,e.rect)&&(e.rect=r,t.push(e))})),t.forEach((function(e){e.callbacks.forEach((function(t){return t(e.rect)}))})),Ms=window.requestAnimationFrame(e)},zs="undefined"!=typeof window?a.useLayoutEffect:a.useEffect;function $s(e,t){var n=t.rect;return e.height!==n.height||e.width!==n.width?n:e}var Fs=function(e,t){void 0===t&&(t={width:0,height:0});var n=a.useState(e.current),r=n[0],i=n[1],o=a.useReducer($s,t),s=o[0],u=o[1],l=a.useRef(!1);return zs((function(){e.current!==r&&i(e.current)})),zs((function(){if(r&&!l.current){l.current=!0;var e=r.getBoundingClientRect();u({rect:e})}}),[r]),a.useEffect((function(){if(r){var e,t,n=(e=r,t=function(e){u({rect:e})},{observe:function(){var n=0===Ls.size;Ls.has(e)?Ls.get(e).callbacks.push(t):Ls.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),n&&Ds()},unobserve:function(){var n=Ls.get(e);if(n){var r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Ls.delete(e),Ls.size||cancelAnimationFrame(Ms)}}});return n.observe(),function(){n.unobserve()}}}),[r]),s},Us=["align"],Bs=function(){return 50},Hs=function(e){return e},qs=function(e,t){return e[t?"offsetWidth":"offsetHeight"]},Vs=function(e){for(var t=Math.max(e.start-e.overscan,0),n=Math.min(e.end+e.overscan,e.size-1),r=[],i=t;i<=n;i++)r.push(i);return r},Ys=function(e){var t,n=e.size,r=void 0===n?0:n,i=e.estimateSize,o=void 0===i?Bs:i,s=e.overscan,u=void 0===s?1:s,l=e.paddingStart,c=void 0===l?0:l,d=e.paddingEnd,f=void 0===d?0:d,h=e.parentRef,v=e.horizontal,p=void 0!==v&&v,m=e.scrollToFn,g=e.useObserver,y=e.initialRect,x=e.onScrollElement,b=e.scrollOffsetFn,A=e.keyExtractor,w=void 0===A?Hs:A,E=e.measureSize,_=void 0===E?qs:E,C=e.rangeExtractor,j=void 0===C?Vs:C,S=p?"width":"height",k=p?"scrollLeft":"scrollTop",N=a.useRef({outerSize:0,scrollOffset:0,measurements:[],totalSize:0}),T=a.useState(0),R=T[0],O=T[1];N.current.scrollOffset=R;var I=(g||Fs)(h,y)[S];N.current.outerSize=I;var M=a.useCallback((function(e){h.current&&(h.current[k]=e)}),[h,k]),P=m||M,L=a.useCallback((function(e){P(e,M)}),[M,P]),D=a.useState({}),z=D[0],$=D[1],F=a.useCallback((function(){return $({})}),[]),U=a.useRef([]),B=a.useMemo((function(){var e=U.current.length>0?Math.min.apply(Math,U.current):0;U.current=[];for(var t=N.current.measurements.slice(0,e),n=e;n<r;n++){var i=w(n),a=z[i],s=t[n-1]?t[n-1].end:c,u="number"==typeof a?a:o(n),l=s+u;t[n]={index:n,start:s,size:u,end:l,key:i}}return t}),[o,z,c,r,w]),H=((null==(t=B[r-1])?void 0:t.end)||c)+f;N.current.measurements=B,N.current.totalSize=H;var q=x?x.current:h.current,V=a.useRef(b);V.current=b,zs((function(){if(q){var e=function(e){var t=V.current?V.current(e):q[k];O(t)};return e(),q.addEventListener("scroll",e,{capture:!1,passive:!0}),function(){q.removeEventListener("scroll",e)}}O(0)}),[q,k]);var Y=function(e){for(var t=e.measurements,n=e.outerSize,r=e.scrollOffset,i=t.length-1,o=Ws(0,i,(function(e){return t[e].start}),r),a=o;a<i&&t[a].end<r+n;)a++;return{start:o,end:a}}(N.current),W=Y.start,K=Y.end,X=a.useMemo((function(){return j({start:W,end:K,overscan:u,size:B.length})}),[W,K,u,B.length,j]),G=a.useRef(_);G.current=_;var Q=a.useMemo((function(){for(var e=[],t=function(t,n){var r=X[t],i=Is({},B[r],{measureRef:function(e){if(e){var t=G.current(e,p);if(t!==i.size){var n=N.current.scrollOffset;i.start<n&&M(n+(t-i.size)),U.current.push(r),$((function(e){var n;return Is({},e,((n={})[i.key]=t,n))}))}}}});e.push(i)},n=0,r=X.length;n<r;n++)t(n);return e}),[X,M,p,B]),J=a.useRef(!1);zs((function(){J.current&&$({}),J.current=!0}),[o]);var Z=a.useCallback((function(e,t){var n=(void 0===t?{align:"start"}:t).align,r=N.current,i=r.scrollOffset,o=r.outerSize;"auto"===n&&(n=e<=i?"start":e>=i+o?"end":"start"),"start"===n?L(e):"end"===n?L(e-o):"center"===n&&L(e-o/2)}),[L]),ee=a.useCallback((function(e,t){var n=void 0===t?{align:"auto"}:t,i=n.align,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,Us),a=N.current,s=a.measurements,u=a.scrollOffset,l=a.outerSize,c=s[Math.max(0,Math.min(e,r-1))];if(c){if("auto"===i)if(c.end>=u+l)i="end";else{if(!(c.start<=u))return;i="start"}var d="center"===i?c.start+c.size/2:"end"===i?c.end:c.start;Z(d,Is({align:i},o))}}),[Z,r]),te=a.useCallback((function(e,t){ee(e,t),requestAnimationFrame((function(){ee(e,t)}))}),[ee]);return{virtualItems:Q,totalSize:H,scrollToOffset:Z,scrollToIndex:te,measure:F}},Ws=function(e,t,n,r){for(;e<=t;){var i=(e+t)/2|0,o=n(i);if(o<r)e=i+1;else{if(!(o>r))return i;t=i-1}}return e>0?e-1:0},Ks=(0,u.A)("yq-virtual-list"),Xs=3;function Gs(e){var t=e.listRef,n=e.className,r=e.containerRef,i=e.scrollRef,s=e.wrapperClassName,u=e.items,l=e.itemHeight,c=void 0===l?40:l,d=e.renderItem,f=e.itemWrapper,h=e.itemClassName,v=e.itemKey,m=e.activeItemIndex,g=e.selectedItemKey,y=e.onItemClick,x=e.onWrapperScroll,b=e.canFetchMore,A=e.isFetchingMore,w=e.fetchMore,E=e.loaderHeight,_=void 0===E?40:E,C=e.alwaysShowActiveItem,j=e.headerClassName,S=e.renderHeader,k=a.useState(),N=(0,o.A)(k,2),R=N[0],O=N[1],I=a.useRef(null);a.useEffect((function(){C&&(!R||R>u.length-1)&&O(0)}),[u,R,C]);var M=a.useRef(null),P=a.useRef(null),L=Ys({size:b?u.length+1:u.length,estimateSize:a.useCallback((function(e){return e>=u.length?_:"function"==typeof c?c(u[e],e):c}),[c,_,u.length,"function"==typeof c?u:void 0]),keyExtractor:function(e){return e===u.length?"loader":"function"==typeof v?v(u[e],e):e},overscan:Xs,parentRef:P});a.useImperativeHandle(t,(function(){return{resetSizes:function(){L.measure()}}}),[L.measure]),a.useEffect((function(){var e=L.virtualItems.slice(-1),t=(0,o.A)(e,1)[0];t&&t.index===u.length&&b&&!A&&(null==w||w())}),[b,w,u.length,A,L.virtualItems]);var D=function(){C||I.current||(I.current=window.setTimeout((function(){O(void 0),I.current=null}),50))},z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e.preventDefault(),O((function(r){var i=function(e,t,n,r){var i=e.length,o=n,a=r;o>=i?(o=i-1,a=-1):o<0&&(o=0,a=1);for(var s=0;s<i&&o>=0&&o<i;s++){var u=e[o],l="object"===(0,T.A)(u)&&null!==u&&"disabled"in u&&u.disabled;if(e[o]&&!l)return o;-1!==(o+=a)&&o!==i||void 0===t||(o=n+(a=-a))}}(u,r,(null!=r?r:n)+t,Math.sign(t));return void 0!==i&&(L.scrollToIndex(i),M.current&&M.current.contains(e.target)&&M.current!==e.target&&M.current.focus()),i}))};return(0,p.jsxs)("div",{ref:gi(M,r),tabIndex:0,className:Ks(null,n),onFocus:function(){I.current&&(clearTimeout(I.current),I.current=null)},onBlur:D,onMouseLeave:D,onKeyDown:function(e){if(0!==L.virtualItems.length){var t=Math.max(1,L.virtualItems.length-2*Xs),n=L.virtualItems[0].index;switch(e.key){case"ArrowDown":z(e,1,n-1);break;case"ArrowUp":z(e,-1,n);break;case"PageDown":z(e,t,n);break;case"PageUp":z(e,-t,n);break;case"Home":z(e,-(R||0));break;case"End":z(e,u.length-(R||0)-1);break;case"Enter":"number"==typeof R&&y&&e.target===e.currentTarget&&void 0!==u[R]&&(e.preventDefault(),y(u[R],R,void 0,!0))}}},children:[(0,p.jsx)("div",{className:Ks("header",j),children:"function"==typeof S?S():null}),(0,p.jsx)("div",{className:Ks("list",s),ref:gi(P,i),onScroll:x,children:(0,p.jsx)("div",{style:{height:"".concat(L.totalSize,"px"),width:"100%",position:"relative"},children:L.virtualItems.map((function(e){if(e.index>u.length-1)return(0,p.jsx)("div",{ref:e.measureRef,className:Ks("item",{loader:!0}),style:{position:"absolute",top:0,left:0,width:"100%",height:"".concat(_,"px"),transform:"translateY(".concat(e.start,"px)")},children:(0,p.jsx)(Qt,{local:!0,size:"s"})},"loader");var t,n=u[e.index],r="function"==typeof c?c(n,e.index):c,i=!1;n&&"object"===(0,T.A)(n)&&(t=n,"object"===(0,T.A)(t)&&t&&Reflect.has(t,"disabled"))&&(i=Boolean(n.disabled));var o=R===e.index||m===e.index,s=g===e.key;return a.createElement(null!=f?f:"div",{key:e.key,ref:e.measureRef,className:Ks("item",{active:o,selected:s,clickable:"function"==typeof y&&!i},"function"==typeof h?h(n,e.index):h),style:{position:"absolute",top:0,left:0,width:"100%",height:"".concat(r,"px"),transform:"translateY(".concat(e.start,"px)")},onMouseMove:i?void 0:function(){O(e.index)},onClick:i?void 0:function(t){null==y||y(n,e.index,t)}},"function"==typeof d?d(n,e.index,{active:o,selected:s}):function(e){return String(e)}(n))}))})})]})}var Qs=n(19812),Js={sortOrder:{},sortColumns:[]};function Zs(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!t)return o?e:Js;var s=e.sortOrder,u=e.sortColumns,l=u,c=s[t],d=n;if(c&&(d=c===n||a?"ascending"===c?"descending":"ascending":void 0),!o)return d?{sortOrder:(0,r.A)({},t,d),sortColumns:[t]}:Js;s[t];var f=(0,qn.A)(s,[t].map(Qs.A));return d?(f[t]=d,new Set(u).has(t)||(l=[].concat((0,i.A)(u),[t]))):l=u.filter((function(e){return e!==t})),{sortOrder:f,sortColumns:l}}var eu=(0,u.A)("table"),tu=(0,p.jsx)("svg",{className:eu("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,p.jsx)("path",{fill:"currentColor",d:"M0 5h10l-5 -5z"})}),nu=(0,p.jsx)("svg",{className:eu("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,p.jsx)("path",{fill:"currentColor",d:"M0 1h10l-5 5z"})});function ru(e){switch(e){case"ascending":return tu;case"descending":return nu;default:return null}}function iu(e){var t=e.sortOrder,n=e.sortIndex,r=e.sortable,i=e.defaultOrder;return r?(0,p.jsx)("span",{className:eu("sort-icon",{shadow:!t}),"data-index":n,children:ru(t||i)}):null}var ou=50;function au(e){var t=e.columns,n=e.sortOrder,r=e.sortColumns,i=e.sortable,o=e.defaultOrder,s=e.onSort;function u(e){return i&&e.sortable?function(t){null==s||s(e,t.ctrlKey||t.metaKey)}:void 0}return(0,p.jsx)(a.Fragment,{children:t.map((function(e,t){var a=e.className,s=e.name,l=e.header,c=e.title,d=e.align,f=e.customStyle,h=e.width,m=e.minWidth,g=void 0===m?ou:m,y=e.maxWidth,x="number"==typeof h?"0 0 ".concat(h,"px"):"1 0 ".concat(g,"px");return(0,p.jsx)("div",{className:eu("th",{sortable:i&&e.sortable,align:d},a),title:"string"==typeof c?c:void 0,"data-index":t,style:(0,v.A)({flex:x,maxWidth:y},null==f?void 0:f({header:!0,name:s})),onClick:u(e),children:(0,p.jsxs)("div",{className:eu("head-cell"),children:[null!=l?l:s,(0,p.jsx)(iu,{sortable:i&&e.sortable,defaultOrder:e.defaultOrder||o,sortOrder:n[s],sortIndex:r.indexOf(s)})]})},s)}))})}function su(e){var t=e.columns,n=e.row,r=e.index,i=e.active,o=e.selected;return t.map((function(e,t){var a=e.name,s=e.className,u=e.align,l=e.sortable,c=e.title,d=e.accessor,f=e.width,h=e.minWidth,m=void 0===h?ou:h,g=e.maxWidth,y=e.customStyle,x=e.render,b=e.onClick,A="function"==typeof d?d(n):n[e.name],w="number"==typeof f?"0 0 ".concat(f,"px"):"1 0 ".concat(m,"px");return(0,p.jsx)("div",{className:eu("td",{align:u,sortable:l},s),title:"function"==typeof c?c(n):c,style:(0,v.A)({flex:w,maxWidth:g},null==y?void 0:y({row:n,index:r,name:a,header:!1})),onClick:function(){null==b||b(n,e)},children:(0,p.jsx)("div",{className:eu("row-cell"),children:"function"==typeof x?x({value:A,row:n,index:r,active:i,selected:o}):A})},t)}))}var uu=a.memo((function(e){var t=e.row,n=e.index,r=e.columns,i=e.render,o=e.active,s=e.selected;return(0,p.jsx)(a.Fragment,{children:"function"==typeof i?i({row:t,index:n,columns:r,render:function(){return su({columns:r,row:t,index:n,active:o,selected:s})},active:o,selected:s}):su({columns:r,row:t,index:n,active:o,selected:s})})}));function lu(e){var t=e.containerRef,n=e.className,r=e.view,i=void 0===r?"default":r,s=e.columns,u=e.data,l=e.rowWrapper,c=e.rowHeight,d=e.renderRow,f=e.rowClassName,h=e.rowKey,m=e.alwaysShowActiveRow,g=e.activeRowIndex,y=e.selectedRowKey,x=e.headerClassName,b=e.headerHeight,A=e.onSort,w=e.initialSortOrder,E=e.onRowClick,_=e.settings,C=void 0===_?{}:_,j=C.sortable,S=void 0===j||j,k=C.defaultOrder,N=void 0===k?"ascending":k,T=C.disableSortReset,R=void 0!==T&&T,O=e.canFetchMore,I=e.isFetchingMore,M=e.fetchMore,P=e.onWrapperScroll,L=e.scrollRef,D=a.useState((function(){return function(e){return e?(Array.isArray(e)?e:[e]).reduce((function(e,t){return Zs(e,t.name,t.order,!0)}),Js):Js}(w)})),z=(0,o.A)(D,2),$=z[0],F=z[1],U=a.useRef(null),B=a.useCallback((function(e,t){var n,r,i=Zs($,e.name,e.defaultOrder||N,t,R);F(i),A&&A((r=(n=i).sortOrder,n.sortColumns.map((function(e){return{name:e,order:r[e]}}))))}),[N,R,A,$]),H=a.useCallback((function(){return(0,p.jsx)(au,(0,v.A)((0,v.A)({},$),{},{sortable:S,defaultOrder:N,columns:s,onSort:B}))}),[s,N,B,$,S]),q=a.useCallback((function(e,t,n){var r=n.active,i=n.selected;return(0,p.jsx)(uu,{row:e,index:t,columns:s,active:r,selected:i,render:d})}),[s,d]);a.useEffect((function(){var e,t=s.reduce((function(e,t){var n=t.width,r=t.minWidth;return e+(null!=n?n:void 0===r?ou:r)}),0)+30;null===(e=U.current)||void 0===e||e.style.setProperty("--table-min-width","".concat(t,"px"))}),[s]);var V=a.useCallback((function(e,t){return eu("row","function"==typeof f?f(e,t):f)}),[f]);return(0,p.jsx)(Gs,{containerRef:gi(U,t),className:eu({view:i},n),wrapperClassName:eu("table"),headerClassName:eu("head",x),headerHeight:b,renderHeader:H,itemWrapper:l,items:u,onItemClick:E,itemClassName:V,itemHeight:c,loaderHeight:c,renderItem:q,itemKey:h,alwaysShowActiveItem:m,activeItemIndex:g,selectedItemKey:y,canFetchMore:O,isFetchingMore:I,fetchMore:M,onWrapperScroll:P,scrollRef:L})}var cu=n(64196),du=(0,u.A)("node-name");function fu(e){var t=e.node,n=e.className,r=(0,p.jsx)("span",{title:t.title,children:t.label});return t.url&&(r=(0,p.jsxs)(cu.N,{href:t.url,title:t.title,target:"_blank",children:[t.label,"in"===t.type||"out"===t.type&&(0,p.jsx)(w.E,{color:"secondary",children:" (".concat(t.type,")")})]})),(0,p.jsxs)("span",{className:du("name",n),children:[r,ci(t)&&(0,p.jsx)(it.A,{className:du("operation-node-info"),tooltipContentClassName:du("operation-node-info-popup"),content:(0,p.jsx)(Ei,(0,v.A)({},t)),hasArrow:!1,placement:["right","left"],delayOpening:300,children:(0,p.jsx)(d.I,{className:du("icon"),data:_i.A,size:12})})]})}const hu=function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,p.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.97 5.47a.75.75 0 0 1 1.06 0L8 9.44l3.97-3.97a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})}))},vu=function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,p.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.03 10.53a.75.75 0 0 1-1.06 0L8 6.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06",clipRule:"evenodd"})}))};var pu=(0,u.A)("timeline"),mu=(0,p.jsx)(d.I,{data:vu,size:14}),gu=(0,p.jsx)(d.I,{data:hu,size:14}),yu=(0,p.jsx)(d.I,{data:function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,p.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.754 2.004a.75.75 0 0 0 0 1.5h4.75v4.742a.75.75 0 0 0 1.5 0V2.754a.75.75 0 0 0-.75-.75zm.492 11.992a.75.75 0 0 0 0-1.5h-4.75V7.754a.75.75 0 0 0-1.5 0v5.492a.75.75 0 0 0 .75.75z",clipRule:"evenodd"})}))},size:14});function xu(e){var t=e.onRulerUpdate,n=e.from,r=e.to,i=e.disabled,o=void 0!==i&&i;return(0,p.jsx)(c.$,{view:"flat",title:"Set timeline scale",size:"s",onClick:function(){t({from:n,to:r})},disabled:o,children:yu})}function bu(e){var t=e.isCommonButton,n=e.disabled,r=e.onClick,i=e.isExpanded,o=t?"Expand all":"Expand",a=t?"Collapse all":"Collapse",s=n?"No items to expand":"";return(0,p.jsx)("span",{title:s,children:(0,p.jsx)(c.$,{view:"flat",title:i?a:o,size:"s",onClick:r,disabled:n,children:i?mu:gu})})}function Au(e){var t=e.nameHeader,n=e.controlsHeader,r=e.onRulerUpdate,i=e.onExpandAxis;return[{name:"status",header:"Status",width:110,sortable:!1,render:function(e){var t=e.row,n=t.node;return t.isEvent?null:(0,p.jsx)("span",{className:pu("row-status"),children:(0,p.jsx)(w.E,{color:"secondary",children:"in"===n.type||"out"===n.type?"-":(0,p.jsx)(wu,{progress:n.progress})})})}},{name:"name",header:null!=t?t:"Name",sortable:!1,width:220,align:"right",render:function(e){var t=e.row,n=t.isEvent,r=t.name,i=t.id,o=t.isExpanded,a=t.node;return n?(0,p.jsx)("div",{className:pu("event-name"),title:r,children:r}):(0,p.jsx)("div",{className:pu("aside-item",{expanded:o}),children:(0,p.jsx)(fu,{node:a,className:pu("node-name")})},i)}},{name:"controls",header:null!=n?n:"",sortable:!1,width:60,render:function(e){var t=e.row,n=t.node,o=t.isExpanded,a=t.from,s=t.to,u=t.id,l=t.isExpandable;return"in"===n.type||"out"===n.type?null:(0,p.jsxs)("div",{children:[(0,p.jsx)(xu,{onRulerUpdate:r,from:a,to:s}),l&&u&&i?(0,p.jsx)(bu,{onClick:function(){return i(u)},isExpanded:o}):null]})}}]}function wu(e){var t,n=e.progress,r=null!==(t=null==n?void 0:n.state)&&void 0!==t?t:"NotStarted",i=null!=n?n:{},o=i.completed,a=void 0===o?0:o,s=i.total,u=Math.floor(a/(s||1)*100);return(0,p.jsxs)("span",{className:pu("node-status"),children:[(0,p.jsx)(Eu,{state:r,progress:n}),(0,p.jsx)("span",{children:"InProgress"===r?"".concat(Gr[r].title,": ").concat(u,"%"):Gr[r].title})]})}function Eu(e){var t=e.state,n=e.progress,r=In();return"InProgress"===t?(0,p.jsx)("img",{className:pu("node-status-icon"),src:mi(n,r)}):(0,p.jsx)("div",{className:pu("node-status-icon",{state:t.toLowerCase()})})}function _u(e){var t,n,r,i,o,a;return(0,p.jsx)("div",{className:pu("aside-header"),children:(0,p.jsx)(lu,{columns:Au({controlsHeader:(n=e.onRulerUpdate,r=e.onExpandAll,i=e.isSomeAxesCollapsed,o=e.tableItems,a=o.some((function(e){return e.isExpandable})),(0,p.jsxs)("div",{children:[(0,p.jsx)(xu,{onRulerUpdate:n}),(0,p.jsx)(bu,{onClick:r,disabled:0===o.length||!a,isExpanded:!i,isCommonButton:!0})]})),nameHeader:(t=e.blocksQuantity,(0,p.jsx)("span",{children:["Name (".concat(t," block)"),"Name (".concat(t," blocks)"),"Name (".concat(t," blocks)"),"Name (no blocks)"][t]})),onRulerUpdate:e.onRulerUpdate,onExpandAxis:e.onExpandAxis}),data:e.tableItems,rowClassName:pu("table-row"),rowHeight:25,headerHeight:27,className:pu("table"),onWrapperScroll:e.onSidebarScroll,scrollRef:e.sidebarRef})})}var Cu=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},ju=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Su=function(e){return 255*(e>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e)},ku=96.422,Nu=82.521,Tu=216/24389,Ru=24389/27,Ou=function(e){var t=function(e){var t=ju(e.r),n=ju(e.g),r=ju(e.b);return function(e){return{x:Cu(e.x,0,ku),y:Cu(e.y,0,100),z:Cu(e.z,0,Nu),a:Cu(e.a)}}(function(e){return{x:1.0478112*e.x+.0228866*e.y+-.050127*e.z,y:.0295424*e.x+.9904844*e.y+-.0170491*e.z,z:-.0092345*e.x+.0150436*e.y+.7521316*e.z,a:e.a}}({x:100*(.4124564*t+.3575761*n+.1804375*r),y:100*(.2126729*t+.7151522*n+.072175*r),z:100*(.0193339*t+.119192*n+.9503041*r),a:e.a}))}(e),n=t.x/ku,r=t.y/100,i=t.z/Nu;return n=n>Tu?Math.cbrt(n):(Ru*n+16)/116,{l:116*(r=r>Tu?Math.cbrt(r):(Ru*r+16)/116)-16,a:500*(n-r),b:200*(r-(i=i>Tu?Math.cbrt(i):(Ru*i+16)/116)),alpha:t.a}},Iu=n(72617),Mu=n.n(Iu),Pu=n(81713),Lu=n.n(Pu),Du=n(63281),zu=n.n(Du),$u=6e4,Fu={NotStarted:"new",Started:"started",InProgress:"running",Finished:"completed",Failed:"failed",Aborted:"aborted"};function Uu(e){var t=e.from,n=e.to;return Math.max(n-t,$u)}kn([function(e){function t(e,t,n){void 0===n&&(n=5);for(var r=[],i=1/(n-1),o=0;o<=n-1;o++)r.push(e.mix(t,i*o));return r}e.prototype.mix=function(t,n){void 0===n&&(n=.5);var r=t instanceof e?t:new e(t),i=function(e,t,n){var r,i=Ou(e),o=Ou(t);return function(e){var t=(e.l+16)/116,n=e.a/500+t,r=t-e.b/200;return function(e){var t,n,r=.9555766*(t=e).x+-.0230393*t.y+.0631636*t.z,i=-.0282895*t.x+1.0099416*t.y+.0210077*t.z,o=.0122982*t.x+-.020483*t.y+1.3299098*t.z;return n={r:Su(.032404542*r-.015371385*i-.004985314*o),g:Su(-.00969266*r+.018760108*i+41556e-8*o),b:Su(556434e-9*r-.002040259*i+.010572252*o),a:e.a},{r:Cu(n.r,0,255),g:Cu(n.g,0,255),b:Cu(n.b,0,255),a:Cu(n.a)}}({x:(Math.pow(n,3)>Tu?Math.pow(n,3):(116*n-16)/Ru)*ku,y:100*(e.l>8?Math.pow((e.l+16)/116,3):e.l/Ru),z:(Math.pow(r,3)>Tu?Math.pow(r,3):(116*r-16)/Ru)*Nu,a:e.alpha})}({l:Cu((r={l:i.l*(1-n)+o.l*n,a:i.a*(1-n)+o.a*n,b:i.b*(1-n)+o.b*n,alpha:i.alpha*(1-n)+o.alpha*n}).l,0,400),a:r.a,b:r.b,alpha:Cu(r.alpha)})}(this.toRgb(),r.toRgb(),n);return new e(i)},e.prototype.tints=function(e){return t(this,"#fff",e)},e.prototype.shades=function(e){return t(this,"#000",e)},e.prototype.tones=function(e){return t(this,"#808080",e)}}]);var Bu=(0,u.A)("timeline");const Hu=function(e){var t=e.graph,n=e.prepareNode,r=Ge(),s=(0,Zt.i)(),u=In(),l=a.useState((function(){return new Wt.DataSet})),c=(0,o.A)(l,1)[0],d=a.useState({}),f=(0,o.A)(d,2),h=f[0],m=f[1],g=a.useState(new Set),y=(0,o.A)(g,2),x=y[0],b=y[1],A=a.useState(""),w=(0,o.A)(A,2),E=w[0],_=w[1],C=a.useState(),j=(0,o.A)(C,2),S=j[0],k=j[1],N=di(c),T=a.useRef(r);T.current=r;var R=a.useRef(n);R.current=n,a.useEffect((function(){c.clear(),c.add(t.nodes),T.current&&ii(c,T.current,R.current,void 0,!1),m({})}),[c,t]),a.useEffect((function(){r&&(ii(c,r,R.current,void 0,!1),m({}))}),[c,r]),a.useEffect((function(){"function"==typeof n&&(ai(c,n),m({}))}),[c,n]);var O=a.useMemo((function(){var e,t=vo()(T.current,(function(e,t){var n=t.startedAt?new Date(t.startedAt).getTime():1/0;return Math.min(n,e)}),1/0),n=c?function(e){var t=e.nodes,n=e.colors,r=e.theme,a=e.queryStartedAtMillis,s=1/0,u=[];t.forEach((function(e){var t,a,l=e.progress,c={id:e.id,label:null!==(t=e.label)&&void 0!==t?t:"",events:[],level:Number(e.level),node:e,isExpandable:!1};if(l){var d="0";"InProgress"===l.state?d=(new Date).toString():l.finishedAt?d=l.finishedAt:l.stages&&Object.keys(l.stages).length>0&&(d=Object.values(l.stages[Object.keys(l.stages).length-1])[0]);var f=null!==(a=l.startedAt)&&void 0!==a?a:"0",h=new Date(f).getTime(),p=new Date(d).getTime(),m=l.state,g=null!=m?m:"NotStarted";s=Math.min(h,s);var y=(0,v.A)((0,v.A)({},c),{},{from:h,to:p,status:g}),x=function(e){var t=e.stages,n=e.axisId,r=e.dataProgressFinishedAt,i=e.dataProgressStartedAt,a=new Date(i).getTime(),s=new Date(r).getTime(),u=[],l=0,c={renderType:"operation",axisId:n,eventsCount:1},d=0;return u.push((0,v.A)((0,v.A)({},c),{},{trackIndex:d++,from:a,to:s,id:l++})),t&&Object.values(t).forEach((function(e,n){var s,f,h=null!==(s=t[n+1])&&void 0!==s?s:{},p=(0,o.A)(Object.entries(e)[0],2),m=p[0],g=p[1],y=null!==(f=Object.values(h)[0])&&void 0!==f?f:r;0===n&&i!==g&&u.push((0,v.A)((0,v.A)({},c),{},{trackIndex:d++,from:a,to:new Date(g).getTime(),name:"init",id:l++})),u.push((0,v.A)((0,v.A)({},c),{},{trackIndex:d++,from:new Date(g).getTime(),to:new Date(y).getTime(),name:m,id:l++}))})),u}({stages:null==l?void 0:l.stages,dataProgressFinishedAt:d,dataProgressStartedAt:f,axisId:e.id});y.isExpandable=x.length>1;var b=n.operation[Fu[g]],A=n.operation["".concat(Fu[g],"Border")],w=n.operation["".concat(Fu[g],"Background")],E=function(e){var t=e.events,n=e.theme,r=e.eventMajorColor,o=e.operationDuration,a={},s=t.length,u=(0,i.A)(t);u.sort((function(e,t){var n=e.to-e.from;return t.to-t.from-n}));var l=jn(r),c=("light"===n?l.tints(s+2):l.tones(s+2)).map((function(e){return e.toHex()}));return t.forEach((function(e){var t=e.to-e.from,n=u.findIndex((function(t){return t.id===e.id}));a[e.trackIndex]={percentage:o>0?t/o:1,color:c[n]}})),a}({theme:r,events:x,eventMajorColor:b,operationDuration:p-h});y.events=x.map((function(e){return(0,v.A)((0,v.A)({},e),{},{colors:E,borderColor:A,backgroundColor:w})})),u.push(y)}else u.push((0,v.A)((0,v.A)({},c),{},{from:1/0,to:0,notStarted:!0,status:"NotStarted"}))}));var l=zu()(u,["level","from"]);if(a!==1/0&&s!==1/0){var c={id:"preparation",from:a,to:s,events:[{eventsCount:1,axisId:"preparation",renderType:"operation",trackIndex:0,from:a,to:s,colors:{0:{percentage:100,color:n.operation[Fu.Finished]}}}],node:{label:"Preparation",progress:{state:"Finished"},id:"preparation",level:0},isExpandable:!1,level:0,status:"Finished",label:"Preparation"};l.unshift(c)}return l}({nodes:c,colors:u,theme:s,queryStartedAtMillis:t}):[],r=null!==(e=n.map((function(e){var t;return null!==(t=e.events)&&void 0!==t?t:[]})).flat())&&void 0!==e?e:[];return{axes:n,events:r}}),[c,u,s,h]),I=O.axes,M=O.events,P=function(e){var t=a.useState({}),n=(0,o.A)(t,2),r=n[0],i=r.start,s=r.end,u=n[1],l=a.useRef(!1),c=a.useRef(!1),d=a.useMemo((function(){var t,n=Mu()(e,"from"),r=null!==(t=Lu()(e,"to"))&&void 0!==t?t:Object.create(null),i=n?n.from-1e3:void 0;return{queryStart:i,queryEnd:r.to&&i?r.to+.08*(r.to-i):(new Date).getTime()}}),[e]),f=function(e){var t=e.queryStart,n=e.queryEnd,r=e.from,i=e.to;if(!t)return{};var o=Uu({from:t,to:n});if(!r||!i)return{start:t,end:t+o};var a=Math.min(Uu({from:r,to:i}),o);return t&&r<t||r>n?{start:t,end:t+a}:n<i||t&&t>i?{start:n-a,end:n}:{start:r,end:r+a}}({from:i,to:s,queryStart:d.queryStart,queryEnd:d.queryEnd}),h=f.start,v=f.end;return!c.current||i||s||(l.current=!l.current),c.current=Boolean(i||s),[{timelineStart:h,timelineEnd:v,timelineRulerKey:"ruler-".concat(l.current)},u]}(I),L=(0,o.A)(P,2),D=L[0],z=D.timelineStart,$=D.timelineEnd,F=D.timelineRulerKey,U=L[1],B=a.useMemo((function(){var e,t=E.toLowerCase().trim(),n=[],r=!1,i=(0,Ur.A)(I);try{for(i.s();!(e=i.n()).done;){var o=e.value;if((!t||o.label.toLowerCase().includes(t))&&(!S||o.status===S)){var a=!!o.isExpandable&&x.has(o.id);r||!o.isExpandable||a||(r=!0);var s=a?o.events.length:1;n.push((0,v.A)((0,v.A)({},o),{},{tracksCount:s,isExpanded:a}))}}}catch(e){i.e(e)}finally{i.f()}return{filteredAxes:n,isSomeAxesCollapsed:r}}),[I,E,S,x]),H=B.filteredAxes,q=B.isSomeAxesCollapsed,V=a.useMemo((function(){var e=0;return H.map((function(t){var n=Do.TRACK_HEIGHT*t.tracksCount,r={id:t.id,top:e,height:n,tracksCount:t.tracksCount};return e+=n,r}))}),[H]),Y=a.useRef(null),W=a.useState(0),K=(0,o.A)(W,2),X=K[0],G=K[1],Q=function(e){var t=e.from,n=e.to;U({start:t,end:n})},J=a.useMemo((function(){var e=[];return H.forEach((function(t){var n;e.push(t),t.isExpanded&&(null===(n=t.events)||void 0===n||n.forEach((function(n,r){0!==r&&e.push((0,v.A)((0,v.A)({},n),{},{node:t.node,isEvent:!0}))})))})),e}),[H]);return(0,p.jsxs)("div",{className:Bu(),children:[(0,p.jsxs)("div",{className:Bu("filters"),children:[(0,p.jsx)(fo.k,{className:Bu("filters-search"),hasClear:!0,value:E,onUpdate:_,placeholder:"Filter by name"}),(0,p.jsx)(Ot.l,{className:Bu("filters-status"),multiple:!1,label:"Status",placeholder:"Select status",value:S?[S]:[],options:N.map((function(e){var t=e.state,n=e.title,r=e.count;return{value:t,content:"".concat(n).concat(r>0?" (".concat(r,")"):"")}})),width:230,hasClear:!0,onUpdate:function(e){k(e[0])}})]}),(0,p.jsxs)("div",{className:Bu("content-wrapper"),children:[(0,p.jsx)(_u,{tableItems:J,isSomeAxesCollapsed:q,blocksQuantity:H.length,onExpandAll:function(){if(q){var e=new Set(I.filter((function(e){return e.isExpandable})).map((function(e){return e.id})));b(e)}else b(new Set)},onSidebarScroll:function(){Y.current&&G(Y.current.scrollTop)},onRulerUpdate:Q,sidebarRef:Y,onExpandAxis:function(e){var t=new Set(x);t.has(e)?t.delete(e):t.add(e),b(t)}}),z&&$&&(0,p.jsxs)("div",{className:Bu("container"),children:[(0,p.jsx)("div",{className:Bu("ruler-wrapper"),children:(0,p.jsx)(po.Kf,{from:z,to:$,onUpdate:Q,hasPicker:!1,hasDatePicker:!1,hasRulerNowButton:!1,minRange:$u},F)}),Boolean(V.length)&&(0,p.jsx)(Os,{className:Bu("timeline"),canvasScrollTop:X,scrollTopChanged:function(e){Y.current&&(Y.current.scrollTop=e.detail.scrollTop)},start:z,end:$,boundsChanged:function(e){Q({from:e.detail.start,to:e.detail.end})},axes:V,events:M,theme:s})]})]})]})};var qu=(0,u.A)("plan");const Vu=a.memo((function(e){var t=e.isActive,n=e.className,r=e.prepareNode,i=function(){var e=a.useContext(He);if(void 0===e)throw new Error("useResultPlan must be used within a PlanProvider");return e}(),s=a.useState(!1),u=(0,o.A)(s,2),l=u[0],c=u[1],d=Qe(),f=a.useMemo((function(){return i?function(e){var t,n=e.Basic,r=e.Detailed,i=[],o=[],a=(0,Ur.A)(n.nodes);try{var s=function(){var e,n=t.value,o="op"===n.type?n.name.replace(/!/g,""):n.name,a=null==r||null===(e=r.Operations)||void 0===e?void 0:e.find((function(e){return e.Id===n.id})),s={inputs:[],outputs:[]};null!=r&&r.Providers&&(null!=a&&a.Inputs&&Array.isArray(null==a?void 0:a.Inputs)&&(s.inputs=ri(r.Providers,a.Inputs)),null!=a&&a.Outputs&&Array.isArray(null==a?void 0:a.Outputs)&&(s.outputs=ri(r.Providers,a.Outputs))),i.push({id:n.id,level:Number(n.level),title:o,type:n.type,label:Jr(o),shape:"image",details:a,schemas:s.inputs.length>0||s.outputs.length>0?s:void 0})};for(a.s();!(t=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return n.links.forEach((function(e){o.push({from:e.source,to:e.target})})),{nodes:i,edges:o}}(i):void 0}),[i]);if(!f)return null;var h=f.nodes.length>250;return(0,p.jsx)("div",{className:qu(null,n),children:(0,p.jsxs)(Rn,{children:[(0,p.jsx)(Be,{hide:"graph"!==d,className:qu("graph"),children:h&&!l?(0,p.jsx)(Yu,{showGraph:c,graph:f}):(0,p.jsx)(co,{isActive:t&&"graph"===d,graph:f,showMinimap:!0,prepareNode:r})}),(0,p.jsx)(Be,{hide:"timeline"!==d,className:qu("table"),children:(0,p.jsx)(Hu,{graph:f,prepareNode:r})})]})})}));function Yu(e){var t=e.showGraph,n=e.graph,r=Ge(),i=a.useState((function(){return new Wt.DataSet})),s=(0,o.A)(i,1)[0],u=Yt(),l=a.useRef(r);l.current=r,a.useEffect((function(){s.clear(),s.add(n.nodes),l.current&&ii(s,l.current),u()}),[s,n,u]),a.useEffect((function(){r&&(ii(s,r),u())}),[s,r,u]);var d=n.nodes.length>700||n.edges.length>3e3;return(0,p.jsxs)("div",{className:qu("graph-info"),children:[d?(0,p.jsxs)(w.E,{children:["The plan of this operation is way too large to be visualized in browser.",(0,p.jsx)("br",{}),"It has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges.")]}):(0,p.jsxs)(w.E,{children:["The operation's plan is quite large, it has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges."),(0,p.jsx)("br",{}),"It could take a lot of time to draw."]}),(0,p.jsx)("br",{}),(0,p.jsx)(c.$,{className:qu("graph-info-button"),onClick:function(){t(!0)},children:d?"I understand it might freeze my browser, draw the plan anyway":"Draw the plan anyway"}),(0,p.jsx)(Si,{nodes:s,orientation:"vertical",className:qu("legend")})]})}var Wu=n(2722);function Ku(){Ku=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,i){var o=RegExp(e,r);return t.set(o,i||t.get(e)),(0,Wu.A)(o,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var i=r[n];if("number"==typeof i)t[n]=e[i];else{for(var o=0;void 0===e[i[o]]&&o+1<i.length;)o++;t[n]=e[i[o]]}return t}),Object.create(null))}return(0,X.A)(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var i=n.indices;i&&(i.groups=r(i,this))}return n},n.prototype[Symbol.replace]=function(n,i){if("string"==typeof i){var o=t.get(this);return e[Symbol.replace].call(this,n,i.replace(/\$<([^>]+)>/g,(function(e,t){var n=o[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof i){var a=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=(0,T.A)(e[e.length-1])&&(e=[].slice.call(e)).push(r(e,a)),i.apply(this,e)}))}return e[Symbol.replace].call(this,n,i)},Ku.apply(this,arguments)}var Xu=n(85593),Gu=function(e,t,n){var r="";return void 0===n?r="/operations/".concat(encodeURIComponent(t)):"filter"===n&&(r="/operations?type=all&state=all&filter=".concat(encodeURIComponent(t))),"/".concat(e.split(".")[0]).concat(r)},Qu=function(e){var t=e.isActive,n=e.operationIdToCluster,r=(0,a.useCallback)((function(e){var t;if("in"===e.type||"out"===e.type){var r,i=function(e){var t=Ku(/^(?:(\w+|`[^`]+`)\.\s*)?`(\/*)([^`]+)`(?::`?([\w-]+)`?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||Ku(/^(?:(\w+|\[[^\]]+\])\.\s*)?\[(\/*)([^\]]+)\](?::\[?([\w-]+)\]?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||Ku(/^(['"])(\/\/)([^`]+)\1/,{quote:1,openingSlash:2,tablePath:3}).exec(e),n=null==t?void 0:t.groups;if(n){var r=n.cluster;r&&r.startsWith("`")&&(r=r.replace(/`/g,"")),r&&r.startsWith("[")&&(r=r.replace(/[[\]]/g,""));var i=function(e){try{return ke.Ay.YPath.parseRelative(function(e){return e.startsWith("//")?e.slice(1):e.startsWith("/")||0===e.length?e:"/".concat(e)}(e))}catch(e){return[]}}(n.openingSlash+n.tablePath).filter((function(e){var t=e.name;return Boolean(t)}));if(0===i.length)return null;var o=i.map((function(e){return e.name})).join("/");return o.startsWith("//")||(o=o.startsWith("/")?"/"+o:"//"+o),{cluster:r,isPathAbsolute:Boolean(n.openingSlash),path:o,view:n.view}}return null}(null!==(r=e.title)&&void 0!==r?r:"");return i&&(e.url=(0,Xu.K)({cluster:i.cluster,path:i.path})),e}if(null!==(t=e.progress)&&void 0!==t&&t.remoteId){var o,a,s=null===(o=e.progress)||void 0===o?void 0:o.remoteId.split("/").pop();if(!s)return e.url=function(e){var t,n=null===(t=e.progress)||void 0===t?void 0:t.remoteId;if(n){var r=n.split("/"),i=r[0].split(".")[0];return Gu(i,r[1],r[2])||void 0}}(e),e;var u=n.has(s)?n.get(s):null===(a=e.progress)||void 0===a||null===(a=a.remoteData)||void 0===a?void 0:a.cluster_name;u&&(e.url=Gu(u,s))}return e}),[n]);return(0,p.jsx)(Vu,{isActive:t,prepareNode:r})},Ju=n(75299);const Zu=function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,p.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 14.75a.75.75 0 0 1-.75-.75V3.81L4.53 6.53a.75.75 0 0 1-1.06-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06L8.75 3.81V14a.75.75 0 0 1-.75.75",clipRule:"evenodd"})}))},el=function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,p.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0M8 7.75a.75.75 0 0 1 .75.75V11a.75.75 0 0 1-1.5 0V8.5A.75.75 0 0 1 8 7.75",clipRule:"evenodd"})}))};var tl=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e,r=0,i=[];Array.isArray(n.inner_errors)&&1===n.inner_errors.length;)n=(0,o.A)(n.inner_errors,1)[0],i.unshift(n),r+=1;return{issue:i[t],length:r-t}},nl=n(78466),rl=(0,u.A)("yt-error-cloud"),il=function(e){var t=e.error,n=e.level,r=e.disableCloud,i=e.onErrorClick,s=e.onShowParent,u=e.fromCloud,l=(0,Ju.A)(e.initialExpanded),c=(0,o.A)(l,2),d=c[0],f=c[1],h=(0,a.useState)(0),m=(0,o.A)(h,2),g=m[0],y=m[1],x=(0,a.useCallback)((function(){y((function(e){return e+1}))}),[]),b=(0,a.useCallback)((function(){y(tl(t).length)}),[t]),A=tl(t,g);return!r&&A.length>1?(0,p.jsxs)("div",{children:[(0,p.jsxs)("div",{className:rl("collapsed-messages"),children:[(0,p.jsx)(nl.L,{expanded:d,toggleExpanded:f}),(0,p.jsxs)(w.E,{color:"secondary",children:[A.length," intermediate messages"]}),(0,p.jsx)(ct.S,{className:rl("collapsed-messages-show-all"),onClick:b,children:"Show all"})]}),d&&(0,p.jsx)("div",{className:rl("errors"),children:(0,p.jsx)(al,{errors:[(0,v.A)({},A.issue)],level:n+1,expanded:d,disableCloud:!0,onErrorClick:i,onShowParent:x,fromCloud:!0})})]}):(0,p.jsx)(cl,{error:t,level:n,expanded:d,fromCloud:u,disableCloud:!0,onErrorClick:i,onShowParent:s})},ol=function(e){return"Info"===e.attributes.severity},al=function(e){var t=e.errors,n=e.level,r=e.expanded,i=e.onErrorClick,o=e.onShowParent,a=e.fromCloud,s=e.disableCloud;return(0,p.jsx)("div",{children:t.map((function(e,u){return(0,p.jsx)(il,{level:n,disableCloud:s&&!(t.length>1),error:e,initialExpanded:!ol(e)&&r,onErrorClick:i,onShowParent:o,fromCloud:a},u)}))})},sl=n(73032);const ul=function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,p.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.836 2.244c.962-1.665 3.366-1.665 4.328 0l4.917 8.505c.964 1.666-.239 3.751-2.164 3.751H3.083c-1.925 0-3.128-2.085-2.164-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 1 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})}))};var ll=(0,u.A)("yt-error-tree-node"),cl=function(e){var t=e.error,n=e.expanded,r=void 0!==n&&n,i=e.level,s=void 0===i?0:i,u=e.fromCloud,l=void 0!==u&&u,f=e.disableCloud,h=void 0!==f&&f,v=e.onErrorClick,m=e.onShowParent,g=(0,Ju.A)(r),y=(0,o.A)(g,2),x=y[0],b=y[1],A=(0,Ju.A)(!1),w=(0,o.A)(A,2),E=w[0],_=w[1],C=t.inner_errors&&t.inner_errors.length>0,j=function(e){var t,n=null===(t=e.attributes)||void 0===t?void 0:t.start_position;return!!n&&"".concat(n.row,":").concat(n.column)}(t),S=ol(t),k=(0,a.useCallback)((function(){var e;null!==(e=t.attributes)&&void 0!==e&&e.start_position&&v(t.attributes.start_position)}),[t.attributes.start_position,v]);return(0,p.jsxs)("div",{className:ll({leaf:!C,info:S}),children:[(0,p.jsxs)("div",{className:ll("error-body"),children:[(0,p.jsxs)("div",{className:ll("line"),children:[C&&(0,p.jsx)(nl.L,{expanded:x,toggleExpanded:b}),l&&(0,p.jsx)(c.$,{view:"flat-secondary",title:"Show parent",onClick:m,children:(0,p.jsx)(d.I,{data:Zu,size:16})}),(0,p.jsxs)("span",{className:ll("header"),children:[(0,p.jsx)(d.I,{className:ll("icon"),data:S?el:ul,size:16}),(0,p.jsx)("span",{className:ll("title"),children:S?"Info":"Error"}),(0,p.jsxs)(c.$,{view:"flat-secondary",onClick:_,children:["Attributes"," ",(0,p.jsx)(d.I,{data:E?vu:hu,size:16})]}),j&&(0,p.jsx)("span",{className:ll("place-text"),title:"Position",children:j})]}),j?(0,p.jsx)(ct.S,{className:ll("message"),color:"primary",onClick:k,children:(0,p.jsx)(sl.H,{value:t.message})}):(0,p.jsx)("span",{className:ll("message"),children:(0,p.jsx)(sl.H,{value:t.message})}),t.code?(0,p.jsxs)("span",{className:ll("code"),children:["Code: ",t.code]}):null]}),E&&(0,p.jsx)(R.A,{value:t.attributes,settings:xe.A.prepareSettings({})})]}),C&&x&&(0,p.jsx)("div",{className:ll("errors"),children:(0,p.jsx)(al,{errors:t.inner_errors,level:s+1,expanded:x,disableCloud:h,onErrorClick:v})})]})},dl=n(19904),fl=n(77720),hl=function(e){var t=e.rootError,n=(0,dl.d)().getEditor,r=(0,a.useCallback)((function(e){var t=e.row,r=e.column,i=n("queryEditor");null==i||i.focus(),null==i||i.revealLine(t),null==i||i.setPosition(new fl.yX(t,r))}),[n]),i=(0,a.useMemo)((function(){return JSON.stringify(t,null,4)}),[t]);return t?(0,p.jsxs)("div",{children:[(0,p.jsx)(w.E,{variant:"subheader-3",children:"Query error"})," ",(0,p.jsx)(I.A,{title:"Copy error",view:"flat-secondary",text:i,size:"l"}),(0,p.jsx)(cl,{error:t,onErrorClick:r,expanded:!0})]}):null},vl=n(88786),pl=n(65873),ml=function(e){var t,n=e.query;if("spyt"!==n.engine||n.state!==te.RE.RUNNING&&n.state!==te.RE.COMPLETING)return null;var r=null!==(t=n.progress)&&void 0!==t&&t.spyt_progress?Math.round(100*n.progress.spyt_progress):0;return(0,p.jsx)(vl.m,{content:"".concat(r,"%"),children:(0,p.jsx)("div",{children:(0,p.jsx)(pl.k,{theme:"info",size:"xs",value:r})})})},gl=(0,u.A)("query-results"),yl=a.memo((function(e){var t,n,r,s=e.query,u=e.className,l=e.toolbar,c=e.minimized,d=void 0!==c&&c,f=function(e){var t=(0,a.useState)(!1),n=(0,o.A)(t,2),r=n[0],s=n[1],u=(0,a.useState)(Me.META),l=(0,o.A)(u,2),c=l[0],d=l[1],f=(0,a.useState)(void 0),h=(0,o.A)(f,2),v=h[0],m=h[1],y=(0,g.wA)(),x=(0,g.d4)((function(t){return(0,F.t_)(t,(null==e?void 0:e.id)||"")})),b=(0,a.useMemo)((function(){return c===Me.RESULT?Pe((null==v?void 0:v.resultIndex)||0):c}),[c,v]),A=(0,a.useCallback)((function(e,t){if(function(e){return e.startsWith("result/")}(e)){d(Me.RESULT);var n=t||(null==v?void 0:v.queryId);m(n?{queryId:n,resultIndex:Le(e)||0}:void 0)}else d(e),m(void 0)}),[v]),w=(0,a.useMemo)((function(){var t,n;if(!e)return[];var r=[];e.state===te.RE.FAILED&&r.push({id:Me.ERROR,title:"Error"}),e.state===te.RE.COMPLETED&&r.push.apply(r,(0,i.A)(ce()(e.result_count,(function(t){var n;return x&&x[t]&&fe()(x[t],"error")&&(n=(0,p.jsx)(C.g,{status:te.RE.FAILED,className:"query-status_tabs"})),{id:Pe(t),title:1===e.result_count?"Result":"Result #".concat(t+1),icon:n}}))));var o=!(null!==(t=e.progress)&&void 0!==t&&null!==(t=t.yql_plan)&&void 0!==t&&t.Basic.nodes.length||null!==(n=e.progress)&&void 0!==n&&null!==(n=n.yql_plan)&&void 0!==n&&null!==(n=n.Basic.links)&&void 0!==n&&n.length);if(e.progress&&!o&&r.push({id:Me.PROGRESS,title:"Progress"}),e.state===te.RE.COMPLETED){var a,s=Ie.Ay.getQueryResultChartTab();s&&e.result_count&&r.push({id:Me.CHART_TAB,title:s.title}),null!==(a=e.progress)&&void 0!==a&&a.yql_statistics&&r.push({id:Me.STATISTIC,title:"Statistics"})}return r.push({id:Me.META,title:"Meta"}),r}),[e,x]),E=ve()(te.GU,(function(t){return(null==e?void 0:e.state)===t}));return(0,a.useEffect)((function(){var t;e&&y(function(e){return function(){var t=(0,pe.A)(ge().mark((function t(n,r){var i,o,a,s,u,l;return ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=r(),o=e.result_count){t.next=4;break}return t.abrupt("return");case 4:for(a=[],s=0;s<o;s++)(0,F.kz)(i,e.id,s)||a.push(s);if(0!==a.length){t.next=8;break}return t.abrupt("return");case 8:return t.prev=8,t.next=11,(0,Ce.fI)(n((0,te.B_)(e.id,a)),{toasterName:"load_query_results",skipSuccessToast:!0,errorTitle:"Failed to load query results meta"});case 11:u=t.sent,l={},Te()(u,(function(e,t){var n=e.output,r=e.error||(null==n?void 0:n.error);r&&(l[t]={error:r,state:H.t.Error,resultReady:!1})})),n({type:B.vj,data:{queryId:e.id,errors:l}}),t.next=19;break;case 17:t.prev=17,t.t0=t.catch(8);case 19:case"end":return t.stop()}}),t,null,[[8,17]])})));return function(e,n){return t.apply(this,arguments)}}()}(e)),A(null==w||null===(t=w[0])||void 0===t?void 0:t.id,null==e?void 0:e.id)}),[y,null==e?void 0:e.id,E]),(0,a.useEffect)((function(){var t=w.some((function(e){return e.id===Me.PROGRESS}));t&&(null==e?void 0:e.state)===te.RE.RUNNING&&!r&&(s(!0),d(Me.PROGRESS))}),[r,null==e?void 0:e.state,w]),[w,A,{activeTabId:b,category:c,activeResultParams:v}]}(s),h=(0,o.A)(f,3),v=h[0],m=h[1],y=h[2],x=y.activeTabId,b=y.category,w=y.activeResultParams,E=a.useMemo((function(){var e,t,n;return t=null==s||null===(e=s.progress)||void 0===e?void 0:e.yql_statistics,n=new Map,t?(function e(t){for(var r in t)"_cluster_name"===r?n.set(t._id,t._cluster_name):"object"===(0,T.A)(t[r])&&null!==t[r]&&e(t[r])}(t),n):n}),[null==s||null===(t=s.progress)||void 0===t?void 0:t.yql_statistics]);if(!s)return null;var _=null==w?void 0:w.resultIndex;return(0,p.jsxs)("div",{className:gl(null,u),children:[(0,p.jsxs)("div",{className:gl("meta"),children:[(0,p.jsx)(N,{className:gl("meta-info"),query:s}),(0,p.jsx)("div",{className:gl("toolbar"),children:l})]}),(0,p.jsx)(ml,{query:s}),(0,p.jsx)(Be,{className:gl("result",{minimized:d}),hide:d,children:(0,p.jsxs)(Xe,{plan:null===(n=s.progress)||void 0===n?void 0:n.yql_plan,progress:null===(r=s.progress)||void 0===r?void 0:r.yql_progress,defaultView:"graph",children:[(0,p.jsxs)("div",{className:gl("header"),children:[(0,p.jsx)(A.t,{className:gl("tabs"),items:v,activeTab:x,onSelectTab:function(e){return m(e,null==s?void 0:s.id)}}),b===Me.RESULT&&Number.isInteger(_)&&(0,p.jsx)("div",{className:gl("tab_actions"),children:(0,p.jsx)(ue,{query:s,resultIndex:null!=_?_:0})}),b===Me.PROGRESS&&(0,p.jsx)(Je,{})]}),(0,p.jsxs)("div",{className:gl("content"),children:[(0,p.jsx)(Be,{hide:b!==Me.RESULT&&!Number.isInteger(_),className:gl("result-wrap"),children:(0,p.jsx)(Ht,{query:s,activeResultParams:w})}),(0,p.jsx)(Be,{hide:b!==Me.CHART_TAB,className:gl("result-wrap"),children:(0,p.jsx)(qt,{query:s})}),b===Me.ERROR&&(0,p.jsx)(hl,{rootError:s.error}),b===Me.META&&(0,p.jsx)(z,{query:s}),(0,p.jsx)(Be,{hide:b!==Me.STATISTIC,children:(0,p.jsx)(ze,{})}),b===Me.PROGRESS&&(0,p.jsx)(Qu,{isActive:!0,operationIdToCluster:E})]})]})}),(0,p.jsx)("div",{})]})})),xl=n(28099);const bl=function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,p.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 12.5h8a1.5 1.5 0 0 0 1.5-1.5v-.5h-11v.5A1.5 1.5 0 0 0 4 12.5M2.5 9V5A1.5 1.5 0 0 1 4 3.5h8A1.5 1.5 0 0 1 13.5 5v4zM1 11a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3H4a3 3 0 0 0-3 3z",clipRule:"evenodd"})}))};var Al=n(35788),wl=n(51444),El=n(75014),_l=n(38496),Cl=n.n(_l),jl=n(3035);function Sl(e){return e.filter((function(e){return("string"==typeof e?e:e.value)!==y.PH}))}var kl=function(){var e=(0,g.d4)(wl.EO),t=(0,jl.t)(),n=t.selectACOOptions,r=t.isFlight,i=t.changeDraftQueryACO,o=t.currentDraftQueryACO,s=(0,a.useCallback)((function(e){return i({aco:e})}),[i]);return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(Ot.l,{filterable:!0,disabled:r,width:"auto",label:"Access:",className:"query-aco-select",options:Sl(n),value:Sl(o),onUpdate:s,multiple:e})})},Nl=n(21347),Tl=n(73689),Rl=n(53246),Ol=n(20361),Il=n(27117),Ml=n(9395),Pl=function(e){var t=e.query_id,n=(0,g.wA)(),r=(0,g.d4)(wl.EO),s=(0,jl.t)(),u=s.selectACOOptions,l=s.changeCurrentQueryACO,f=s.currentQueryACO,h=(0,a.useState)(void 0),v=(0,o.A)(h,2),m=v[0],y=v[1],x=(0,Ju.A)(!1),b=(0,o.A)(x,2),A=b[0],w=b[1],E=function(){var e=(0,pe.A)(ge().mark((function e(r){return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l({aco:r.aco,query_id:t});case 3:return e.next=5,n((0,Ml.et)());case 5:e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(0),y(e.t0),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}();return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(c.$,{view:"flat",onClick:w,children:[(0,p.jsx)(d.I,{data:Il.A,size:16})," Edit ACO"]}),A&&(0,p.jsx)(Ol.yZ,{pristineSubmittable:!0,visible:A,modal:!0,headerProps:{title:"Edit query ACO"},footerProps:{textApply:"Update"},onClose:function(){y(void 0),w()},onAdd:function(e){return E(e.getState().values)},initialValues:{aco:f},fields:[{name:"aco",type:"select",required:!0,extras:{options:u,placeholder:"ACO",width:"max",filterable:!0,multiple:r}}].concat((0,i.A)((0,Ol.Y)([m])))})]})},Ll=n(78894),Dl=n(55695);const zl=function(e){return(0,p.jsx)("svg",(0,v.A)((0,v.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,p.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M9 9v2.665a.335.335 0 0 0 .55.257l4.72-3.934a.635.635 0 0 0 0-.976L9.55 3.078a.335.335 0 0 0-.55.257V6H7.5c-1.584 0-3.182.571-4.241 1.692-.9.951-1.549 2.446-1.31 4.723.65-1.026 1.365-1.837 2.201-2.413C5.198 9.278 6.323 9 7.5 9zm-3 1.731c-1.162.396-2.165 1.337-3.151 3.106-.223.4-.64.663-1.098.663-.552 0-1.04-.376-1.143-.917C-.598 7.237 3.678 4.5 7.499 4.5V3.335a1.835 1.835 0 0 1 3.01-1.41l4.722 3.935a2.135 2.135 0 0 1 0 3.28l-4.721 3.935a1.835 1.835 0 0 1-3.01-1.41V10.5c-.533 0-1.03.07-1.5.231",clipRule:"evenodd"})}))};var $l=(0,u.A)("query-share-button"),Fl=new Ll.I,Ul=function(){var e=(0,g.wA)(),t=(0,a.useState)(!1),n=(0,o.A)(t,2),r=n[0],i=n[1],s=(0,Ju.A)(!1),u=(0,o.A)(s,2),l=u[0],f=u[1],h=(0,g.d4)(wl.wJ),m=(0,g.d4)(y.Ry).includes(y.PH),b=(0,a.useCallback)((0,pe.A)(ge().mark((function t(){return ge().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i(!0),t.next=4,e((0,x.sR)());case 4:return t.prev=4,i(!1),t.finish(4);case 7:case"end":return t.stop()}}),t,null,[[0,,4,7]])}))),[e]),A=(0,a.useCallback)((0,pe.A)(ge().mark((function e(){return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.clipboard.writeText(window.location.href),m){e.next=4;break}return e.next=4,b();case 4:Fl.add({name:"",autoHiding:5e3,theme:"success",title:"Query successful shared",content:"The link to your Query is published and copied to the clipboard",actions:[{label:"Unpublish",onClick:b}]});case 5:case"end":return e.stop()}}),e)}))),[b,m]);return h?(0,p.jsxs)("div",{className:$l(),children:[(0,p.jsxs)(c.$,{onClick:A,view:m?"flat-info":"flat",pin:m?"round-brick":void 0,selected:m,loading:r,children:[(0,p.jsx)(d.I,{data:zl,width:16})," ",m?"Shared":"Share"]}),m&&(0,p.jsx)(Dl.r,{renderSwitcher:function(e){return(0,p.jsx)(c.$,(0,v.A)((0,v.A)({},e),{},{view:"flat",selected:!0,pin:"brick-round",children:(0,p.jsx)(d.I,{size:16,data:l?vu:hu})}))},onSwitcherClick:f,items:[{action:b,text:"Unpublish query"}]})]}):null},Bl=n(80016),Hl="yt-monaco-editor__highlighted-line",ql=function(e,t){return{range:new fl.Q6(t,1,t,e.getLineLength(t)+1),options:{isWholeLine:!0,className:Hl}}},Vl=(0,u.A)("query-container"),Yl=function(e){switch(e){case Nl.d.CHYT:return Tl.m.CHYT;case Nl.d.SPYT:return Tl.m.SPYT;case Nl.d.YT_QL:return Tl.m.YTQL;default:return Tl.m.YQL}},Wl=a.memo((function(e){var t,n=e.onStartQuery,r=(0,a.useState)(!1),u=(0,o.A)(r,2),f=u[0],h=u[1],v=(0,a.useRef)(),b=(0,dl.d)().setEditor,A=(0,g.d4)(y.$Z),w=(0,g.d4)(y.AC),E=(0,g.d4)(y.ln),_=(0,g.d4)(y.Fn),C=(0,g.d4)(wl.d),j=(0,g.d4)(y.hS),S=(0,g.wA)(),k=(0,a.useRef)(void 0),N=null===(t=v.current)||void 0===t?void 0:t.getModel(),T=(0,a.useCallback)((function(){S((0,x.GB)(n))}),[S,n]);(0,a.useEffect)((function(){var e,t;null===(e=v.current)||void 0===e||e.focus(),null===(t=v.current)||void 0===t||t.setScrollTop(0)}),[null==A?void 0:A.id]),(0,a.useEffect)((function(){v.current&&b("queryEditor",v.current)}),[b]),(0,a.useEffect)((function(){var e=function(e){var t=e.ctrlKey||e.metaKey,n="Enter"===e.key||"e"===e.key,r="F8"===e.key;(t&&n||r)&&(e.preventDefault(),e.stopPropagation(),T())};return document.addEventListener("keydown",e,!0),function(){document.removeEventListener("keydown",e,!0)}}),[T]),(0,a.useEffect)((function(){if(N){var e,t,n=[],r=[];Te()(_,(function(e){var t=e.attributes,i=e.message,o=new l.Range(t.start_position.row,t.start_position.column,t.end_position.row,t.end_position.column),a=o.startLineNumber,s=o.startColumn,u=o.endLineNumber,c=o.endColumn,d={message:i,severity:l.MarkerSeverity.Error,startLineNumber:a,startColumn:s,endLineNumber:u,endColumn:c};n.push(d);var f={range:o,options:{isWholeLine:!0,className:Vl("error-line")}};r.push(f)})),l.editor.setModelMarkers(N,"query-tracker",n);var i=function(){var e=window.location.hash;if(!e.startsWith("#L"))return null;var t=parseInt(e.replace(/[^0-9]/g,""),10);return isNaN(t)?null:t}();j||!i||f||r.push(ql(N,i)),null===(e=k.current)||void 0===e||e.clear(),k.current=null===(t=v.current)||void 0===t?void 0:t.createDecorationsCollection(Cl()(r,(function(e){return e.range.startLineNumber})))}}),[_,j,N]);var R=(0,a.useMemo)((function(){return{fontSize:14,language:E,renderWhitespace:"boundary",minimap:{enabled:!0}}}),[E]),O=(0,a.useCallback)((function(e){var t,n,r,o=e.target;if(o.type===l.editor.MouseTargetType.GUTTER_LINE_NUMBERS&&N){var a=o.element.dataset.number;if(a){var s=new URL(window.location.href);s.hash="#L".concat(a),window.history.pushState(null,"",s.toString());var u=function(e,t){var n=null==e?void 0:e.getFullModelRange();return n?((null==t?void 0:t.getDecorationsInRange(n))||[]).filter((function(e){return e.options.className!==Hl})):[]}(N,v.current);null===(t=k.current)||void 0===t||t.clear(),null===(n=k.current)||void 0===n||n.set([].concat((0,i.A)(u),[ql(N,parseInt(a,10))])),null===(r=v.current)||void 0===r||r.setSelection(new l.Selection(0,0,0,0))}else{var c;null===(c=v.current)||void 0===c||c.setSelection(new l.Selection(0,0,0,0))}}}),[N]),I=(0,a.useCallback)((function(e){h(!0),S((0,x.Bn)({query:e,error:void 0}))}),[S]),M=(0,a.useCallback)((function(){S((0,x.GB)(n,{execution_mode:"validate"}))}),[S,n]),P=(0,a.useCallback)((function(){S((0,x.GB)(n,{execution_mode:"optimize"}))}),[S,n]);return(0,p.jsxs)("div",{className:Vl("query"),children:[(0,p.jsx)(Bl.w,{children:(0,p.jsx)(s.A,{editorRef:v,value:w||"",language:Yl(E),className:Vl("editor"),onChange:I,onClick:O,monacoConfig:R})}),(0,p.jsx)("div",{className:Vl("actions"),children:(0,p.jsxs)("div",{className:"query-run-action",children:[(0,p.jsxs)(c.$,{qa:"qt-run",view:"action",onClick:T,children:[(0,p.jsx)(d.I,{data:m}),"Run"]}),E===Nl.d.YQL?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(c.$,{qa:"qt-validate",onClick:M,children:"Validate"}),(0,p.jsx)(c.$,{qa:"qt-explain",onClick:P,children:"Explain"})]}):null,C&&(0,p.jsx)(kl,{})]})})]})})),Kl=a.memo((function(e){var t=e.query,n=e.resultViewMode,r=e.setResultViewMode;return(0,p.jsx)(yl,{query:t,className:Vl("results"),minimized:"minimized"===n,toolbar:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(f.s,{gap:2,className:Vl("results-toolbar-buttons"),children:[(0,p.jsx)(Ul,{}),(0,p.jsx)(Pl,{query_id:t.id})]}),"split"===n?(0,p.jsx)(c.$,{className:Vl("meta-action"),view:"flat",onClick:function(){return r("full")},children:(0,p.jsx)(d.I,{data:xl.A,size:16})}):(0,p.jsx)(c.$,{className:Vl("meta-action"),view:"flat",onClick:function(){return r("split")},children:(0,p.jsx)(d.I,{data:bl,size:16})}),"minimized"!==n&&(0,p.jsx)(c.$,{className:Vl("meta-action"),view:"flat",onClick:function(){return r("minimized")},children:(0,p.jsx)(d.I,{data:Ci.A,size:16})})]})})}));function Xl(e){var t=e.onStartQuery,n=e.showStatusInTitle,i=(0,g.wA)(),s=function(){var e=(0,g.d4)(y.st),t=(0,g.d4)(wl.B8),n=(0,a.useContext)(Al.o),r=(0,g.wA)(),i=(0,a.useMemo)((function(){return function(e){var n=(0,o.A)(e,1)[0];r({type:B.f4,data:(0,El.n)(n,t)})}}),[r,t]);return(0,a.useEffect)((function(){if(n&&e&&(0,S.KO)(e))return n.watch([e],i)}),[n,e,i]),e}(),u=(0,jl.t)().isQueryTrackerInfoLoading,l=(0,a.useState)("minimized"),c=(0,o.A)(l,2),d=c[0],f=c[1],v=(0,a.useState)([50,50]),m=(0,o.A)(v,2),x=m[0],A=m[1];(0,a.useEffect)((function(){var e,t;if(s&&n){var r=s.start_time?E.A.format.DateTime(s.start_time,{format:"short"}):"",o=(null===(e=s.annotations)||void 0===e?void 0:e.title)||"",a=(null===(t=s.state)||void 0===t?void 0:t.toUpperCase())||"";(r||o||a)&&i((0,Rl.ar)({path:"".concat(o," ").concat(a," ").concat(r," @ ").concat(s.engine)}))}}),[i,s]),(0,a.useEffect)((function(){f("split")}),[null==s?void 0:s.id]);var w=(0,g.d4)(y.Kv),_=(0,g.d4)(y.hS),C=u||_;return(0,p.jsxs)(p.Fragment,{children:[C&&(0,p.jsx)("div",{className:Vl("loading"),children:(0,p.jsx)(h.a,{})}),(0,p.jsxs)(b.A,{className:Vl((0,r.A)({},d,!0)),direction:b.A.VERTICAL,onResizeEnd:A,getInitialSizes:function(){return x},children:["full"!==d&&(0,p.jsx)(Wl,{onStartQuery:t}),(null==s?void 0:s.id)&&w&&(0,p.jsx)(Kl,{query:s,setResultViewMode:f,resultViewMode:d})]})]})}},53708:(e,t,n)=>{"use strict";n.d(t,{H:()=>g,u:()=>v});var r=n(9736),i=n(77810),o=n(15647),a=n(11960),s=n(18309),u=n(55956),l=n(63192),c=n(66853),d=n(87604),f=n(64922),h=u.qS.map((function(e){return{value:e,text:s.ix[e]}}));function v(e){var t=e.className,n=e.cluster,s=e.path,u=e.onChange,v=(0,o.wA)(),p=(0,o.d4)(c.sh),m=(0,o.d4)(c.Py),g=(0,o.d4)(c.xy),y=(0,i.useState)(!1),x=(0,r.A)(y,2),b=x[0],A=x[1],w=(0,i.useState)(void 0),E=(0,r.A)(w,2),_=E[0],C=E[1],j=(m||g)&&n&&s,S=(0,i.useCallback)((function(e){v((0,l.Bn)({engine:e})),n&&s&&v((0,l.I2)(e,n,s)),u&&u(e)}),[u,n,v,s]),k=(0,i.useCallback)((function(e){var t=e;C(t),j?A(!0):S(t)}),[j,S]),N=(0,i.useCallback)((function(){C(void 0),A(!1)}),[]),T=(0,i.useCallback)((function(){C(void 0),_&&S(_),A(!1)}),[_,S]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.A,{className:t,size:"l",value:p.engine,onUpdate:k,name:"query-tracker-engine-selector",items:h}),(0,f.jsx)(a.g,{title:"Switching engine",content:"All the changes will be lost. Are you sure you want to switch the engine?",visible:b,onCancel:N,onConfirm:T,onOutsideClick:N})]})}var p=n(60090),m=u.qS.map((function(e){return{value:e,content:s.ix[e]}})),g=function(e){var t=e.onChange,n=e.cluster,r=e.path,a=(0,o.wA)(),s=(0,o.d4)(c.sh),u=(0,i.useCallback)((function(e){var i=e[0];a((0,l.Bn)({engine:i})),n&&r&&a((0,l.I2)(i,n,r)),t&&t(i)}),[t,n,a,r]);return(0,f.jsx)(p.l,{options:m,value:[s.engine],size:"l",onUpdate:u})}},52250:(e,t,n)=>{"use strict";n.d(t,{y:()=>Q});var r=n(13322),i=n(9736),o=n(77810),a=n(76872),s=n(92423),u=n(72679),l=n(85137),c=n(88150),d=n(52041),f=n(42160),h=n(40319),v=n(64922);const p=function(e){return(0,v.jsx)("svg",(0,h.A)((0,h.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,v.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.47 6.53a.75.75 0 0 1 1.06 1.061l-.727.727a2.743 2.743 0 0 0 3.879 3.879l.727-.727a.75.75 0 0 1 1.06 1.06l-.726.727a4.243 4.243 0 0 1-6-6zm8 1.879a.75.75 0 0 0 1.06 1.06l.727-.726a4.243 4.243 0 0 0-6-6l-.727.727a.75.75 0 0 0 1.061 1.06l.727-.727a2.743 2.743 0 0 1 3.879 3.879zm-.94-1.879a.75.75 0 1 0-1.06-1.06l-4 4a.75.75 0 1 0 1.06 1.06z",clipRule:"evenodd"})}))};var m=n(28407),g=n(70232),y=n.n(g),x=n(1701),b=n(48971),A=n(50266),w=function(){var e=(0,m.A)(y().mark((function e(t){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new FileReader;r.onloadend=function(){return e(r.result)},r.onerror=function(){return n(r.error)},r.readAsText(t)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(e){var t=e.disabled,n=e.onLoad,r=(0,o.useState)(!1),a=(0,i.A)(r,2),l=a[0],c=a[1],d=(0,o.useRef)(null),f=function(){var e=(0,m.A)(y().mark((function e(t){var r,i,o;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.target,i=r.files&&r.files[0]){e.next=4;break}return e.abrupt("return");case 4:return c(!0),e.prev=5,e.next=8,(0,b.fI)(w(i),{toasterName:"add_query_file"+i.name,skipSuccessToast:!0,errorTitle:"Failed to load file"});case 8:o=e.sent,n({name:i.name,content:o,type:"raw_inline_data",id:(0,A.A)()});case 10:return e.prev=10,c(!1),e.finish(10);case 13:case"end":return e.stop()}}),e,null,[[5,,10,13]])})));return function(t){return e.apply(this,arguments)}}();return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(s.$,{width:"auto",onClick:function(){var e;null===(e=d.current)||void 0===e||e.click()},size:"l",loading:l,disabled:t,children:[(0,v.jsx)(u.I,{data:x.A,size:16}),"Add file"]}),(0,v.jsx)("input",{ref:d,type:"file",style:{display:"none"},onChange:f})]})},_=n(65692),C=n(30469),j=n(82662),S=(0,a.A)("file-item-form"),k=function(e){var t=e.file,n=e.validator,r=e.onCancel,a=e.onSave,l=e.className,c=(0,o.useState)(void 0),d=(0,i.A)(c,2),f=d[0],p=d[1],m=(0,o.useRef)((0,h.A)({},t)),g="url"===t.type,y=(0,o.useCallback)((function(){var e=n(t.name,m.current);p(e),e.name||e.content||a(m.current)}),[t.name,a,n]),x=(0,o.useCallback)((function(e){"Enter"===e.key&&y(),"Escape"===e.key&&r()}),[y,r]);return(0,v.jsxs)("div",{className:S(null,l),children:[(0,v.jsxs)("div",{className:S(g?"link-form":"form"),children:[(0,v.jsx)(_.k,{defaultValue:t.name,onChange:function(e){p(void 0),m.current.name=e.currentTarget.value},onKeyDown:x,error:null==f?void 0:f.name,size:"l"}),g&&(0,v.jsx)(_.k,{defaultValue:t.content,onChange:function(e){p(void 0),m.current.content=e.currentTarget.value},onKeyDown:x,error:null==f?void 0:f.content,size:"l"})]}),(0,v.jsxs)("div",{className:S("actions"),children:[(0,v.jsx)(s.$,{view:"normal",onClick:y,size:"l",children:(0,v.jsx)(u.I,{data:j.A,size:16})}),(0,v.jsx)(s.$,{view:"flat",onClick:r,size:"l",children:(0,v.jsx)(u.I,{data:C.A,size:16})})]})]})},N=(0,a.A)("files-add-form"),T=function(e){var t=e.validator,n=e.addFormOpen,r=e.addFormType,i=e.onFormToggle,a=e.onAddFile,l=(0,o.useCallback)((function(e){a(e)}),[a]),c=(0,o.useCallback)((function(e){var t=e.name,n=e.content;a({name:t,content:n,type:"raw_inline_data",id:(0,A.A)()})}),[a]),d=(0,o.useCallback)((function(){i({isOpen:!0,type:"raw_inline_data"})}),[i]),f=(0,o.useCallback)((function(){i({isOpen:!0,type:"url"})}),[i]),h=(0,o.useCallback)((function(){i({isOpen:!1})}),[i]);return(0,v.jsxs)("div",{className:N(),children:[n&&(0,v.jsx)(k,{file:{name:"",content:"",type:r,id:(0,A.A)()},onCancel:h,onSave:l,validator:t}),(0,v.jsxs)("div",{className:N("buttons"),children:[(0,v.jsx)(E,{disabled:n,onLoad:c}),(0,v.jsxs)(s.$,{width:"auto",size:"l",onClick:d,disabled:n,children:[(0,v.jsx)(u.I,{data:x.A,size:16}),"New file"]}),(0,v.jsxs)(s.$,{width:"auto",size:"l",onClick:f,disabled:n,children:[(0,v.jsx)(u.I,{data:p,size:16}),"Add URL"]})]})]})},R=n(4224),O=n(88786),I=n(57660);const M=function(e){return(0,v.jsx)("svg",(0,h.A)((0,h.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,v.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 1.5a6.5 6.5 0 1 0 6.445 7.348.75.75 0 1 0-1.487-.194A5.001 5.001 0 1 1 11.57 4.5h-1.32a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 .75-.75v-3a.75.75 0 0 0-1.5 0v1.06A6.48 6.48 0 0 0 8 1.5",clipRule:"evenodd"})}))},P=function(e){return(0,v.jsx)("svg",(0,h.A)((0,h.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,v.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.169 6.331a3 3 0 0 0-.833 1.6l-.338 1.912a1 1 0 0 0 1.159 1.159l1.912-.338a3 3 0 0 0 1.6-.833l3.07-3.07 2-2A.9.9 0 0 0 15 4.13 3.13 3.13 0 0 0 11.87 1a.9.9 0 0 0-.632.262l-2 2-3.07 3.07Zm3.936-1.814L7.229 7.392a1.5 1.5 0 0 0-.416.8L6.6 9.4l1.208-.213.057-.01a1.5 1.5 0 0 0 .743-.406l2.875-2.876a1.63 1.63 0 0 0-1.378-1.378m2.558.199a3.14 3.14 0 0 0-1.379-1.38l.82-.82a1.63 1.63 0 0 1 1.38 1.38l-.82.82ZM8 2.25a.75.75 0 0 0-.75-.75H4.5a3 3 0 0 0-3 3v7a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3V8.75a.75.75 0 0 0-1.5 0v2.75a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 3 11.5v-7A1.5 1.5 0 0 1 4.5 3h2.75A.75.75 0 0 0 8 2.25",clipRule:"evenodd"})}))};var L=(0,a.A)("deleted-file-item"),D=function(e){var t=e.file,n=e.onEditFile,r=e.onRestore,i="raw_inline_data"===t.type;return(0,v.jsxs)("div",{className:L(),children:[(0,v.jsxs)("div",{className:L("info"),children:[(0,v.jsx)(u.I,{data:i?I.A:p,size:16}),(0,v.jsx)(l.E,{variant:"subheader-2",ellipsis:!0,children:t.name})]}),(0,v.jsxs)("div",{className:L("actions"),children:[i&&(0,v.jsx)(O.m,{content:"Edit file",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){n(t.id,"deletedFile")},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:P,size:16})})}),(0,v.jsx)(O.m,{content:"Restore",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){r(t.id)},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:M,size:16})})})]})]})},z=n(79988),$=n(27117),F=(0,a.A)("file-item"),U=function(e){var t=e.file,n=e.validator,r=e.onChange,a=e.onEditFile,c=e.onDelete,d=(0,o.useState)(!1),f=(0,i.A)(d,2),h=f[0],m=f[1],g=t.id,y=t.name,x=t.content,b="raw_inline_data"===t.type,A=function(){m((function(e){return!e}))};return h?(0,v.jsx)("div",{className:F({edit:!0}),children:(0,v.jsx)(k,{file:t,onSave:function(e){r(e),m(!1)},onCancel:A,validator:n})}):(0,v.jsxs)("div",{className:F(),children:[(0,v.jsxs)("div",{className:F("info"),children:[(0,v.jsx)(u.I,{className:F("icon"),data:b?I.A:p,size:16}),(0,v.jsx)(l.E,{variant:"subheader-2",ellipsis:!0,children:y}),!b&&(0,v.jsx)(l.E,{variant:"subheader-2",ellipsis:!0,children:x})]}),(0,v.jsxs)("div",{className:F("actions"),children:[b&&(0,v.jsx)(O.m,{content:"Edit file",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){a(g,"file")},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:P,size:16})})}),(0,v.jsx)(O.m,{content:"Edit file name",placement:"top",children:(0,v.jsx)(s.$,{onClick:A,view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:$.A,size:16})})}),(0,v.jsx)(O.m,{content:"Remove",placement:"top",children:(0,v.jsx)(s.$,{onClick:function(){c(g)},view:"flat",size:"l",children:(0,v.jsx)(u.I,{data:z.A,size:16})})})]})]})},B=(0,a.A)("files-tabs"),H=function(e){return e.Current="current",e.Deleted="deleted",e}(H||{}),q=function(e){var t=e.files,n=e.deletedFiles,r=e.deletedFilesCounter,a=e.validator,s=e.onDeleteFile,u=e.onChangeFile,l=e.onRestoreFile,c=e.onEditFile,d=e.className,f=(0,o.useState)(H.Current),h=(0,i.A)(f,2),p=h[0],m=h[1],g=(0,o.useMemo)((function(){return t.map((function(e){return(0,v.jsx)(U,{file:e,onDelete:s,onChange:u,onEditFile:c,validator:a},e.id)}))}),[t,s,u,c,a]),y=(0,o.useMemo)((function(){return n.map((function(e){return(0,v.jsx)(D,{file:e,onRestore:l,onEditFile:c},e.id)}))}),[n,c,l]);return(0,v.jsxs)("div",{className:B(null,d),children:[(0,v.jsx)(R.t,{activeTab:p,items:[{id:H.Current,title:"Current",counter:t.length,disabled:!t.length},{id:H.Deleted,title:"Deleted",counter:r,disabled:!r}],onSelectTab:m}),(0,v.jsx)("div",{className:B("list"),children:p===H.Current?g:y})]})},V=n(15647),Y=n(10645),W=n(56742),K=n(45035),X=n(63192),G=(0,a.A)("query-files-popup"),Q=function(){var e=(0,V.wA)(),t=(0,V.d4)(W.CG),n=t.files,a=t.deletedFiles,h=t.addFormOpen,p=t.addFormType,m=t.showTabs,g=(0,o.useState)(new Map),y=(0,i.A)(g,2),x=y[0],b=y[1],A=(0,o.useState)(!1),w=(0,i.A)(A,2),E=w[0],_=w[1],C=(0,o.useRef)(null);(0,o.useEffect)((function(){b(new Map(n.map((function(e){return[e.name,e]}))))}),[n]);var j=(0,o.useCallback)((function(){_((function(e){return!e}))}),[]),S=(0,o.useCallback)((function(t){e((0,K.Ro)(t))}),[e]),k=(0,o.useCallback)((function(t){e((0,K.ek)(t))}),[e]),N=(0,o.useCallback)((function(t){e((0,K.pk)(t))}),[e]),R=(0,o.useCallback)((function(t){e((0,X.Bn)({files:[].concat((0,r.A)(n),[t])})),e((0,Y.M3)({isOpen:!1}))}),[e,n]),O=(0,o.useCallback)((function(t){e((0,Y.M3)(t))}),[e]),I=(0,o.useCallback)((function(t,n){e((0,Y.QH)({fileId:t,fileType:n,isOpen:!0,isFullWidth:!1})),_(!1)}),[e]),M=(0,o.useCallback)((function(e,t){var n={};return t.name||(n.name=d.j.NAME_REQUIRED),x.has(t.name)&&e!==t.name&&(n.name=d.j.NAME_ALREADY_EXIST),"url"!==t.type||t.content||(n.content=d.j.VALUE_REQUIRED),n}),[x]);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(s.$,{ref:C,onClick:j,view:E?"outlined-info":"outlined",selected:E,size:"l",children:[(0,v.jsx)(u.I,{data:c.A,size:16}),n.length>0?" ".concat(n.length):void 0]}),(0,v.jsxs)(f.x,{anchorRef:C,open:E,onClose:j,className:G(),children:[(0,v.jsx)("div",{className:G("header"),children:(0,v.jsx)(l.E,{variant:"subheader-3",children:"Attachments"})}),m&&(0,v.jsx)(q,{className:G("body"),files:n,deletedFiles:a,deletedFilesCounter:a.length,validator:M,onDeleteFile:k,onChangeFile:S,onRestoreFile:N,onEditFile:I}),(0,v.jsx)(T,{validator:M,addFormOpen:h,addFormType:p,onAddFile:R,onFormToggle:O})]})]})}},42160:(e,t,n)=>{"use strict";n.d(t,{x:()=>c}),n(77810);var r=n(76872),i=n(55740),o=n(92423),a=n(72679),s=n(30469),u=n(64922),l=(0,r.A)("popup-with-close-button"),c=function(e){var t=e.anchorRef,n=e.open,r=e.onClose,c=e.children,d=e.className;return(0,u.jsxs)(i.z,{anchorRef:t,open:n,className:l(null,d),onOutsideClick:r,children:[(0,u.jsx)(o.$,{view:"flat",className:l("close-button"),onClick:r,children:(0,u.jsx)(a.I,{data:s.A})}),c]})}},52041:(e,t,n)=>{"use strict";n.d(t,{D:()=>i,j:()=>r});var r={NAME_REQUIRED:"Name is required field",NAME_ALREADY_EXIST:"This name is already in use, please type some another",VALUE_REQUIRED:"Values is required field"},i=function(e,t){var n={};return e||(n.name=r.NAME_REQUIRED),t||(n.value=r.VALUE_REQUIRED),n}},24915:(e,t,n)=>{"use strict";n.d(t,{g:()=>T});var r=n(40319),i=n(9736),o=n(92423),a=n(72679),s=n(85137),u=n(76872),l=n(77810),c=n(60111),d=n(64922);const f=function(e){return(0,d.jsxs)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:[(0,d.jsxs)("g",{fillRule:"evenodd",clipPath:"url(#gear-dot_svg__a)",clipRule:"evenodd",children:[(0,d.jsx)("path",{fill:"currentColor",d:"M7.199 2A.2.2 0 0 0 7 2.199c0 1.808-1.958 2.939-3.524 2.034a.2.2 0 0 0-.272.073l-.8 1.388a.2.2 0 0 0 .072.271c1.566.905 1.566 3.165 0 4.07a.2.2 0 0 0-.073.271l.801 1.388a.2.2 0 0 0 .272.073C5.042 10.862 7 11.993 7 13.8c0 .11.089.199.199.199H8.8c.11 0 .199-.089.199-.199 0-1.808 1.958-2.939 3.524-2.034a.2.2 0 0 0 .271-.073l.802-1.388a.2.2 0 0 0-.073-.271c-1.303-.753-1.516-2.434-.665-3.5a.75.75 0 0 1 1.172.936.852.852 0 0 0 .243 1.265 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .938-.76 1.699-1.699 1.699H7.2c-.938 0-1.699-.76-1.699-1.699a.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.472 1.7 1.7 0 0 1-.622-2.32l.801-1.388a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2c0-.94.76-1.7 1.699-1.7H9.3a.75.75 0 1 1 0 1.5H7.2Zm.8 7.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6"}),(0,d.jsx)("path",{fill:"#F33",d:"M12.5 5.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4"})]}),(0,d.jsx)("defs",{children:(0,d.jsx)("clipPath",{id:"gear-dot_svg__a",children:(0,d.jsx)("path",{fill:"currentColor",d:"M0 0h16v16H0z"})})})]}))};var h=n(88786),v=n(27117),p=n(79988),m=n(65692),g=n(30469),y=n(82662),x=(0,u.A)("settings-item-form"),b=function(e){var t=e.name,n=e.value,r=e.validator,s=e.onCancel,u=e.onSave,c=e.className,f=e.config,h=(0,l.useState)(void 0),v=(0,i.A)(h,2),p=v[0],b=v[1],A=(0,l.useRef)({name:t,value:n}),w=(0,l.useCallback)((function(){var e=r(t,A.current.name,A.current.value);b(e),e.name||e.value||u({oldName:t,name:A.current.name,value:A.current.value})}),[t,u,r]),E=(0,l.useCallback)((function(e){"Enter"===e.key&&w(),"Escape"===e.key&&s()}),[w,s]);return(0,d.jsxs)("div",{className:x(null,c),children:[(0,d.jsxs)("div",{className:x("form"),children:[(0,d.jsx)(m.k,{defaultValue:t,onChange:function(e){b(void 0),A.current.name=e.currentTarget.value},onKeyDown:E,error:null==p?void 0:p.name,size:"l",disabled:!!f&&!f.name}),(0,d.jsx)(m.k,{defaultValue:n,onChange:function(e){b(void 0),A.current.value=e.currentTarget.value},onKeyDown:E,error:null==p?void 0:p.value,size:"l",disabled:!!f&&!f.value})]}),(0,d.jsxs)("div",{className:x("actions"),children:[(0,d.jsx)(o.$,{view:"normal",onClick:w,size:"l",children:(0,d.jsx)(a.I,{data:y.A,size:16})}),(0,d.jsx)(o.$,{view:"flat",onClick:s,size:"l",children:(0,d.jsx)(a.I,{data:g.A,size:16})})]})]})},A=(0,u.A)("settings-item"),w=function(e){var t=e.name,n=e.value,r=e.canEdit,u=e.onDelete,f=e.validator,m=e.onChange,g=(0,l.useState)(!1),y=(0,i.A)(g,2),x=y[0],w=y[1],E=function(){w((function(e){return!e}))};return x?(0,d.jsx)("div",{className:A({edit:!0}),children:(0,d.jsx)(b,{name:t,value:n,onSave:function(e){m(e),w(!1)},onCancel:E,validator:f,config:r})}):(0,d.jsxs)("div",{className:A(),children:[(0,d.jsxs)("div",{className:A("info"),children:[(0,d.jsx)(a.I,{className:A("icon"),data:c.A,size:16}),(0,d.jsx)(s.E,{variant:"subheader-2",ellipsis:!0,children:t}),(0,d.jsx)(s.E,{className:A("value"),ellipsis:!0,children:n})]}),(0,d.jsxs)("div",{className:A("actions"),children:[r&&(0,d.jsx)(h.m,{content:"Edit",placement:"top",children:(0,d.jsx)(o.$,{onClick:E,view:"flat",size:"l",children:(0,d.jsx)(a.I,{data:v.A,size:16})})}),(0,d.jsx)(h.m,{content:"Remove",placement:"top",children:(0,d.jsx)(o.$,{onClick:function(){u(t)},view:"flat",size:"l",children:(0,d.jsx)(a.I,{data:p.A,size:16})})})]})]})},E=n(16538),_=(0,u.A)("settings-add-form"),C=function(e){var t=e.validator,n=e.onAdd,r=(0,l.useState)(!1),s=(0,i.A)(r,2),u=s[0],c=s[1],f=(0,l.useCallback)((function(){c((function(e){return!e}))}),[]),h=(0,l.useCallback)((function(e){n(e),c(!1)}),[n]);return(0,d.jsxs)("div",{className:_(),children:[u&&(0,d.jsx)(b,{name:"",value:"",onCancel:f,onSave:h,validator:t,className:_("add-form")}),(0,d.jsxs)(o.$,{className:_("button"),onClick:f,disabled:u,size:"l",children:[(0,d.jsx)(a.I,{data:E.A,size:16}),"Add setting"]})]})},j=n(42160),S=n(52041),k=["cluster","clique"],N=(0,u.A)("query-settings-popup"),T=function(e){var t=e.settings,n=e.className,u=e.onChange,h=(0,l.useState)(!1),v=(0,i.A)(h,2),p=v[0],m=v[1],g=(0,l.useRef)(null),y=(0,l.useCallback)((function(){m(!p)}),[m,p]),x=(0,l.useMemo)((function(){return t?Object.keys(t).length:0}),[t]),b=(0,l.useCallback)((function(e){var n=(0,r.A)({},t);e in n&&delete n[e],u(n)}),[u,t]),A=(0,l.useCallback)((function(e){var n=e.name,i=e.value,o=(0,r.A)({},t);o[n]=i,u(o)}),[u,t]),E=(0,l.useCallback)((function(e){var n=e.oldName,i=e.name,o=e.value,a=(0,r.A)({},t);n!==i&&delete a[n],a[i]=o,u(a)}),[u,t]),_=(0,l.useCallback)((function(e,n,r){var i=(0,S.D)(n,r);if(t&&n in t){if(e===n)return i;i.name=S.j.NAME_ALREADY_EXIST}return i}),[t]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.$,{className:n,onClick:y,ref:g,view:p?"outlined-info":"outlined",selected:p,size:"l",children:(0,d.jsx)(a.I,{data:x?f:c.A,size:16})}),(0,d.jsxs)(j.x,{anchorRef:g,open:p,className:N(),onClose:y,children:[(0,d.jsxs)("div",{className:N("header"),children:[(0,d.jsx)(s.E,{variant:"subheader-3",children:"Settings "}),x>0&&(0,d.jsx)(s.E,{variant:"subheader-3",color:"secondary",children:x})]}),(0,d.jsx)("div",{className:N("body"),children:Object.entries(t||{}).map((function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1];return(0,d.jsx)(w,{name:n,value:r,canEdit:k.includes(n)?void 0:{name:!0,value:!0},validator:_,onDelete:b,onChange:E},n)}))}),(0,d.jsx)(C,{onAdd:A,validator:_})]})]})}},16554:(e,t,n)=>{"use strict";n.d(t,{g:()=>x,C:()=>b});var r=n(68175),i=n(77810);const o=(0,n(21086).om)("spin"),a=i.forwardRef((function(e,t){const{size:n="m",style:r,className:a,qa:s}=e;return i.createElement("div",{ref:t,style:r,className:o({size:n},a),"data-qa":s},i.createElement("div",{className:o("inner")}))}));var s,u=n(72679),l=n(76872),c=n(73822),d=n(36699),f=n(27814),h=n(13395),v=n(26212),p=n(55956),m=n(64922),g=(0,l.A)("query-status"),y=(s={},(0,r.A)(s,p.RE.DRAFT,v.A),(0,r.A)(s,p.RE.FAILED,f.A),(0,r.A)(s,p.RE.ABORTED,h.A),(0,r.A)(s,p.RE.COMPLETED,d.A),s);function x(e){var t=e.status,n=e.className;return p.Oc.includes(t)?(0,m.jsx)(a,{size:"s",className:g("icon-container",{loading:!0},n)}):y[t]?(0,m.jsx)(u.I,{className:g("icon-container",(0,r.A)({},t.toLocaleLowerCase(),!0),n),data:y[t],size:16}):(0,m.jsx)(m.Fragment,{children:t})}var b=function(e){var t=e.mode,n=e.status,r=e.className;return(0,m.jsxs)("div",{className:g(null,r),children:[("icon"===t||"both"===t)&&(0,m.jsx)(x,{status:n}),("text"===t||"both"===t)&&c.A.format.Readable(n)]})}},82785:(e,t,n)=>{"use strict";n.d(t,{P:()=>r});var r=(0,n(77810).createContext)(new Map)},35788:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p,o:()=>v});var r=n(77810),i=n(28407),o=n(29121),a=n(12937),s=n(70232),u=n.n(s),l=n(18309),c=function(){function e(t){var n=this;(0,o.A)(this,e),this.intervaTime=1e3,this.watchedQueries=new Map,this.intervalKey=void 0,this.loading=!1,this.requestQueryList=void 0,this.run=(0,i.A)(u().mark((function e(){var t,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(t=Array.from(n.watchedQueries.keys()))&&t.length){e.next=4;break}return n.intervalKey=void 0,e.abrupt("return");case 4:return n.loading=!0,e.prev=5,e.next=8,n.requestQueryList(t);case 8:null==(r=e.sent)||r.forEach((function(e){var t=n.watchedQueries.get(e.id);null==t||t.forEach((function(t){return t([e])})),(0,l.KO)(e)||n.unsubscribe(e.id)})),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),console.error(e.t0);case 15:return e.prev=15,n.loading=!1,n.intervalKey=void 0,n.start(),e.finish(15);case 20:case"end":return e.stop()}}),e,null,[[5,12,15,20]])}))),this.requestQueryList=t}return(0,a.A)(e,[{key:"watch",value:function(e,t){var n=this,r=e.map((function(e){if(n.watchedQueries.has(e.id)){var r=n.watchedQueries.get(e.id);null==r||r.add(t)}else n.subscribe(e.id,t);return function(){return n.removeHandler(e.id,t)}}));return function(){r.forEach((function(e){return e()}))}}},{key:"start",value:function(){this.intervalKey||this.loading||(this.intervalKey=Number(setTimeout(this.run,this.intervaTime)))}},{key:"stop",value:function(){clearTimeout(this.intervalKey),this.intervalKey=void 0}},{key:"subscribe",value:function(e,t){this.watchedQueries.set(e,new Set([t])),this.start()}},{key:"unsubscribe",value:function(e){this.watchedQueries.delete(e),0===this.watchedQueries.size&&this.stop()}},{key:"removeHandler",value:function(e,t){var n=this.watchedQueries.get(e);n&&n.delete(t)}}]),e}(),d=n(55956),f=n(51194),h=n(64922),v=(0,r.createContext)(new c((function(){return Promise.resolve([])}))),p=function(e){var t=e.children,n=(0,f._)(),i=(0,r.useMemo)((function(){return new c((function(e){return n((0,d.Am)(e))}))}),[n]);return(0,h.jsx)(v.Provider,{value:i,children:t})}},19904:(e,t,n)=>{"use strict";n.d(t,{d:()=>o});var r=n(77810),i=n(82785),o=function(){var e=(0,r.useContext)(i.P);return{setEditor:function(t,n){e.set(t,n)},getEditor:function(t){return e.get(t)}}}},45035:(e,t,n)=>{"use strict";n.d(t,{Ro:()=>d,ek:()=>h,pk:()=>f});var r=n(9736),i=n(13322),o=n(66853),a=n(63192),s=n(10645),u=n(56742),l=new(n(78894).I),c=function(e,t){var n=e.findIndex(t);return n<0?null:[e[n],[].concat((0,i.A)(e.slice(0,n)),(0,i.A)(e.slice(n+1)))]},d=function(e){return function(t,n){var r=n(),s=(0,o._M)(r),u=s.findIndex((function(t){return t.id===e.id}));if(!(u<0)){var l=(0,i.A)(s);l[u]=e,t((0,a.Bn)({files:l}))}}},f=function(e){return function(t,n){var d=n(),f=(0,u.xK)(d),h=(0,o._M)(d),v=c(f,(function(t){return t.id===e}));if(null!==v){var p=(0,r.A)(v,2),m=p[0],g=p[1];h.some((function(e){return e.name===m.name}))?l.add({name:"restore_query_file",theme:"danger",title:"The file could not be restored. The file name already exists in the list of active files.",autoHiding:!1}):(t((0,a.Bn)({files:[].concat((0,i.A)(h),[m])})),t((0,s.pB)(g)))}}},h=function(e){return function(t,n){var l=n(),d=(0,u.xK)(l),f=(0,o._M)(l),h=c(f,(function(t){return t.id===e}));if(null!==h){var v=(0,r.A)(h,2),p=v[0],m=v[1];t((0,a.Bn)({files:m})),t((0,s.pB)([].concat((0,i.A)(d),[p])))}}}},82662:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.488 3.43a.75.75 0 0 1 .081 1.058l-6 7a.75.75 0 0 1-1.1.042l-3.5-3.5A.75.75 0 0 1 4.03 6.97l2.928 2.927 5.473-6.385a.75.75 0 0 1 1.057-.081Z",clipRule:"evenodd"})}))}},39702:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.47 13.03a.75.75 0 0 1 0-1.06L9.44 8 5.47 4.03a.75.75 0 0 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0",clipRule:"evenodd"})}))}},34199:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",clipRule:"evenodd"})}))}},1701:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.5 12a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 12V4A1.5 1.5 0 0 1 5 2.5h2.757a1.5 1.5 0 0 1 1.061.44l3.243 3.242a1.5 1.5 0 0 1 .439 1.06zm.621-6.879A3 3 0 0 1 14 7.243V12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h2.757a3 3 0 0 1 2.122.879L13.12 5.12ZM8.75 6.75a.75.75 0 0 0-1.5 0v1.5h-1.5a.75.75 0 0 0 0 1.5h1.5v1.5a.75.75 0 0 0 1.5 0v-1.5h1.5a.75.75 0 0 0 0-1.5h-1.5z",clipRule:"evenodd"})}))}},57660:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11 13.5H5A1.5 1.5 0 0 1 3.5 12V4A1.5 1.5 0 0 1 5 2.5h2V5a3 3 0 0 0 3 3h2.5v4a1.5 1.5 0 0 1-1.5 1.5m1.303-7a1.5 1.5 0 0 0-.242-.318L8.818 2.939a1.5 1.5 0 0 0-.318-.242V5A1.5 1.5 0 0 0 10 6.5zm.818-1.379A3 3 0 0 1 14 7.243V12a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h2.757a3 3 0 0 1 2.122.879L13.12 5.12Z",clipRule:"evenodd"})}))}},60111:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsxs)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:[(0,i.jsx)("g",{clipPath:"url(#gear_svg__a)",children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.2.2 0 0 1 .271.073l.802 1.388a.2.2 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.2.2 0 0 1 .073.271l-.802 1.388a.2.2 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.2.2 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.2.2 0 0 1-.272-.073l-.8-1.388a.2.2 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.2.2 0 0 1-.073-.271l.801-1.388a.2.2 0 0 1 .272-.073C5.042 5.138 7 4.007 7 2.2c0-.11.089-.199.199-.199ZM5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.7 1.7 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.7 1.7 0 0 1-.622-2.321l.801-1.388a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2m4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0",clipRule:"evenodd"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"gear_svg__a",children:(0,i.jsx)("path",{fill:"currentColor",d:"M0 0h16v16H0z"})})})]}))}},88150:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"m9.77 10.73.01-.01 3.08-3.08a3.889 3.889 0 1 0-5.5-5.5L4.73 4.77l-.01.01-1.667 1.666a5.303 5.303 0 0 0 7.5 7.5l3.167-3.166a.75.75 0 1 0-1.061-1.06l-3.166 3.166a3.803 3.803 0 1 1-5.379-5.379L5.33 6.291l.011-.01L8.421 3.2a2.39 2.39 0 0 1 3.38 3.378l-1.13 1.13-.012.012-2.995 2.994a.975.975 0 1 1-1.378-1.378L9.28 6.34a.75.75 0 0 0-1.06-1.06L5.225 8.274a2.475 2.475 0 0 0 3.5 3.5z",clipRule:"evenodd"})}))}},27117:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.423 1A3.577 3.577 0 0 1 15 4.577c0 .27-.108.53-.3.722l-.528.529-1.971 1.971-5.059 5.059a3 3 0 0 1-1.533.82l-2.638.528a1 1 0 0 1-1.177-1.177l.528-2.638a3 3 0 0 1 .82-1.533l5.059-5.059 2.5-2.5c.191-.191.451-.299.722-.299m-2.31 4.009-4.91 4.91a1.5 1.5 0 0 0-.41.766l-.38 1.903 1.902-.38a1.5 1.5 0 0 0 .767-.41l4.91-4.91a2.08 2.08 0 0 0-1.88-1.88Zm3.098.658a3.6 3.6 0 0 0-1.878-1.879l1.28-1.28c.995.09 1.788.884 1.878 1.88l-1.28 1.28Z",clipRule:"evenodd"})}))}},28099:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.5 3h-7A1.5 1.5 0 0 0 3 4.5v7A1.5 1.5 0 0 0 4.5 13h7a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 11.5 3m-7-1.5a3 3 0 0 0-3 3v7a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3v-7a3 3 0 0 0-3-3z",clipRule:"evenodd"})}))}},30469:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(40319),i=n(64922);const o=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06",clipRule:"evenodd"})}))}},65986:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,o:()=>o});var r=n(29717);const i="gc-",o=((0,r.withNaming)({e:"__",m:"_",v:"_"}),(0,r.withNaming)({n:i,e:"__",m:"_",v:"_"}))},38749:(e,t,n)=>{"use strict";n.d(t,{m:()=>w});var r=n(56911),i=n(77810),o=n(13778),a=n(1093),s=n(21086);const u={pc:{NormalizeMap:{arrowup:"up",arrowdown:"down",arrowleft:"left",arrowright:"right",esc:"escape",return:"enter",mod:"ctrl",control:"ctrl",opt:"alt",option:"alt",cmd:"ctrl",command:"ctrl"},Priority:{shift:200,alt:300,ctrl:400},DisplayName:{up:"↑",down:"↓",left:"←",right:"→",escape:"Esc",plus:"+",enter:"Enter",ctrl:"Ctrl",alt:"Alt",shift:"Shift",tab:"Tab",backspace:"Backspace"}},mac:{NormalizeMap:{arrowup:"up",arrowdown:"down",arrowleft:"left",arrowright:"right",esc:"escape",enter:"return",mod:"command",ctrl:"control",alt:"option",opt:"option",cmd:"command"},Priority:{command:100,shift:200,option:300,control:400},DisplayName:{up:"▲",down:"▼",left:"◀",right:"▶",escape:"⎋",plus:"+",return:"⏎",command:"⌘",option:"⌥",control:"⌃",shift:"⇧",backspace:"⌫",tab:"⇥"}}};var l=n(88314),c=n.n(l),d=n(38496),f=n.n(d);function h(e,t){return e.trim().split(t).filter(Boolean)}const v=/\s/;function p(e){var t;return null!==(t=e.displayName)&&void 0!==t?t:c()(e.id)}const m=(0,s.om)("hotkey"),g={BetweenGroups:String.fromCharCode(160),BetweenKeys:String.fromCharCode(8239)},y=i.forwardRef((function(e,t){const{value:n,platform:r,view:o="light",qa:a,style:s,className:l}=e,c=function(e,t){var n;const r=null!==(n=t.platform)&&void 0!==n?n:"undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform)?"mac":"pc";return function(e,t){return h(t,v).map((t=>f()(h(t,"+").map(function(e){return function(t){var n;const r=function(e,t){var n;return t=t.toLowerCase(),null!==(n=e.NormalizeMap[t])&&void 0!==n?n:t}(e,t);return{raw:t,id:r,priority:null!==(n=e.Priority[r])&&void 0!==n?n:0,displayName:e.DisplayName[r]}}}(e)).sort(((e,t)=>t.priority-e.priority)),(e=>e.id)).map(p)))}(u[r],e)}(n,{platform:r}),d=[];let y=!1;return c.forEach(((e,t)=>{0!==e.length&&(y?d.push(g.BetweenGroups):y=!0,e.forEach(((e,n)=>{0===n||d.push(g.BetweenKeys,i.createElement("span",{key:`${e}_${t}_${n}_plus`,className:m("plus")},"+"),g.BetweenKeys),d.push(i.createElement("kbd",{key:`${e}_${t}_${n}`},e))})))})),0===d.length?null:i.createElement("kbd",{ref:t,style:s,"data-qa":a,className:m({view:o},l)},d)}));var x=n(55740);const b=["bottom","top"],A=(0,s.om)("action-tooltip");function w(e){const{placement:t=b,title:n,hotkey:s,children:u,className:l,contentClassName:c,description:d,disabled:f=!1,style:h,qa:v,id:p,disablePortal:m}=e,g=(0,r.Tt)(e,["placement","title","hotkey","children","className","contentClassName","description","disabled","style","qa","id","disablePortal"]),[w,E]=i.useState(null),_=(0,a.d)(w,g),C=i.Children.only(u),j=C.ref,S=(0,o.N)(E,j);return i.createElement(i.Fragment,null,i.cloneElement(C,{ref:S}),w?i.createElement(x.z,{id:p,disablePortal:m,role:"tooltip",className:A(null,l),style:h,open:_&&!f,placement:t,anchorRef:{current:w},disableEscapeKeyDown:!0,disableOutsideClick:!0,disableLayer:!0,qa:v},i.createElement("div",{className:A("content",c)},i.createElement("div",{className:A("heading")},i.createElement("div",{className:A("title")},n),s&&i.createElement(y,{view:"dark",value:s,className:A("hotkey")})),d&&i.createElement("div",{className:A("description")},d))):null)}},5219:(e,t,n)=>{"use strict";n.d(t,{b:()=>m});var r=n(56911),i=n(77810),o=n(38749),a=n(92423),s=n(11415),u=n(48382),l=n(54205);const c=JSON.parse('{"startCopy":"Copy","endCopy":"Copied!"}'),d=JSON.parse('{"startCopy":"Копировать","endCopy":"Скопировано!"}'),f=(0,l.N)({en:c,ru:d},"ClipboardButton"),h=1e3,v={xs:12,s:16,m:16,l:16,xl:20},p=e=>{const{size:t="m",hasTooltip:n=!0,tooltipInitialText:u=f("startCopy"),tooltipSuccessText:l=f("endCopy"),status:c,view:d="flat",extraProps:h={}}=e,p=(0,r.Tt)(e,["size","hasTooltip","tooltipInitialText","tooltipSuccessText","status","view","extraProps"]);return i.createElement(o.m,{disabled:!n,title:"success"===c?l:u},i.createElement(a.$,Object.assign({view:d,size:t,extraProps:Object.assign({"aria-label":u},h)},p),i.createElement(a.$.Icon,null,i.createElement(s.u,{size:v[t],status:c}))))};function m(e){const{text:t,timeout:n=h,onCopy:o,options:a}=e,s=(0,r.Tt)(e,["text","timeout","onCopy","options"]);return i.createElement(u.$,{text:t,timeout:n,onCopy:o,options:a},(e=>i.createElement(p,Object.assign({},s,{status:e}))))}},88786:(e,t,n)=>{"use strict";n.d(t,{m:()=>c});var r=n(77810),i=n(13778),o=n(1093),a=n(55740),s=n(85137);const u=(0,n(21086).om)("tooltip"),l=["bottom","top"],c=e=>{const{children:t,content:n,disabled:c,placement:d=l,qa:f,id:h,className:v,style:p,disablePortal:m,contentClassName:g,openDelay:y=1e3,closeDelay:x}=e,[b,A]=r.useState(null),w=(0,o.d)(b,{openDelay:y,closeDelay:x,preventTriggerOnFocus:!0}),E=r.Children.only(t),_=E.ref,C=(0,i.N)(A,_);return r.createElement(r.Fragment,null,r.cloneElement(E,{ref:C}),b?r.createElement(a.z,{id:h,role:"tooltip",className:u(null,v),style:p,open:w&&!c,placement:d,anchorRef:{current:b},disablePortal:m,disableEscapeKeyDown:!0,disableOutsideClick:!0,disableLayer:!0,qa:f},r.createElement("div",{className:u("content",g)},r.createElement(s.E,{variant:"body-short",color:"complementary"},n))):null)}},1093:(e,t,n)=>{"use strict";n.d(t,{d:()=>o});var r=n(77810),i=n(653);const o=(e,{openDelay:t=250,closeDelay:n,preventTriggerOnFocus:o=!1})=>{const[a,s,u]=function(e){const[t,n]=r.useState(!1);return[t,r.useCallback((()=>n(!0)),[]),r.useCallback((()=>n(!1)),[]),r.useCallback((()=>n((e=>!e))),[])]}(),l=r.useRef(),c=r.useRef(!1);return r.useEffect((()=>{if(e)return e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",a),e.addEventListener("keydown",h),o||(e.addEventListener("focus",d),e.addEventListener("blur",f)),()=>{e.removeEventListener("mouseenter",r),e.removeEventListener("mouseleave",a),e.removeEventListener("focus",d),e.removeEventListener("blur",f),e.removeEventListener("keydown",h)};function r(){clearTimeout(l.current),l.current=window.setTimeout(s,t)}function a(){clearTimeout(l.current),l.current=window.setTimeout(u,n)}function d(e){c.current||document.activeElement!==e.target||(c.current=!0,clearTimeout(l.current),s())}function f(e){c.current&&!e.currentTarget.contains(e.relatedTarget)&&(c.current=!1,clearTimeout(l.current),u())}function h(e){e.key===i.D.ESCAPE&&(clearTimeout(l.current),u())}}),[e,s,u,t,n,o]),a}},44304:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});var r=n(77810);const i={top:0,right:0,bottom:0,left:0};function o(e={}){const{rect:t,contextElement:n}=e,o=r.useRef(i),a=r.useRef({contextElement:n,getBoundingClientRect(){const{top:e,right:t,bottom:n,left:r}=o.current;return{top:e,right:t,bottom:n,left:r,width:t-r,height:n-e}}});if(a.current.contextElement=n,t){const{top:e=0,left:n=0,right:r=n,bottom:i=e}=t;o.current={top:e,right:r,bottom:i,left:n}}else o.current=i;return a}},48689:function(e){e.exports=function(){"use strict";function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-u*c/s+d)),Math.min(o,Math.floor(r+(s-u)*c/s+d)),a)}var f=n[r],h=i,v=o;for(t(n,i,r),a(n[o],f)>0&&t(n,i,o);h<v;){for(t(n,h,v),h++,v--;a(n[h],f)<0;)h++;for(;a(n[v],f)>0;)v--}0===a(n[i],f)?t(n,i,v):t(n,++v,o),v<=r&&(i=v+1),r<=v&&(o=v-1)}}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}return function(t,r,i,o,a){e(t,r,i||0,o||t.length-1,a||n)}}()},21281:(e,t,n)=>{"use strict";e.exports=i,e.exports.default=i;var r=n(48689);function i(e,t){if(!(this instanceof i))return new i(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function o(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function a(e,t){s(e,0,e.children.length,t,e)}function s(e,t,n,r,i){i||(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o,a=t;a<n;a++)o=e.children[a],u(i,e.leaf?r(o):o);return i}function u(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function h(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function p(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(e,t,n,i,o){for(var a,s=[t,n];s.length;)(n=s.pop())-(t=s.pop())<=i||(a=t+Math.ceil((n-t)/i/2)*i,r(e,a,t,n,o),s.push(t,a,a,n))}i.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,n=[],r=this.toBBox;if(!v(e,t))return n;for(var i,o,a,s,u=[];t;){for(i=0,o=t.children.length;i<o;i++)a=t.children[i],v(e,s=t.leaf?r(a):a)&&(t.leaf?n.push(a):h(e,s)?this._all(a,n):u.push(a));t=u.pop()}return n},collides:function(e){var t=this.data,n=this.toBBox;if(!v(e,t))return!1;for(var r,i,o,a,s=[];t;){for(r=0,i=t.children.length;r<i;r++)if(o=t.children[r],v(e,a=t.leaf?n(o):o)){if(t.leaf||h(e,a))return!0;s.push(o)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}var r=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var i=this.data;this.data=r,r=i}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=p([]),this},remove:function(e,t){if(!e)return this;for(var n,r,i,a,s=this.data,u=this.toBBox(e),l=[],c=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=c.pop(),a=!0),s.leaf&&-1!==(i=o(e,s.children,t)))return s.children.splice(i,1),l.push(s),this._condense(l),this;a||s.leaf||!h(s,u)?r?(n++,s=r.children[n],a=!1):s=null:(l.push(s),c.push(n),n=0,r=s,s=s.children[0])}return this},toBBox:function(e){return e},compareMinX:l,compareMinY:c,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},_build:function(e,t,n,r){var i,o=n-t+1,s=this._maxEntries;if(o<=s)return a(i=p(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,r-1))),(i=p([])).leaf=!1,i.height=r;var u,l,c,d,f=Math.ceil(o/s),h=f*Math.ceil(Math.sqrt(s));for(m(e,t,n,h,this.compareMinX),u=t;u<=n;u+=h)for(m(e,u,c=Math.min(u+h-1,n),f,this.compareMinY),l=u;l<=c;l+=f)d=Math.min(l+f-1,c),i.children.push(this._build(e,l,d,r-1));return a(i,this.toBBox),i},_chooseSubtree:function(e,t,n,r){for(var i,o,a,s,u,l,c,f,h,v;r.push(t),!t.leaf&&r.length-1!==n;){for(c=f=1/0,i=0,o=t.children.length;i<o;i++)u=d(a=t.children[i]),h=e,v=a,(l=(Math.max(v.maxX,h.maxX)-Math.min(v.minX,h.minX))*(Math.max(v.maxY,h.maxY)-Math.min(v.minY,h.minY))-u)<f?(f=l,c=u<c?u:c,s=a):l===f&&u<c&&(c=u,s=a);t=s||t.children[0]}return t},_insert:function(e,t,n){var r=this.toBBox,i=n?e:r(e),o=[],a=this._chooseSubtree(i,this.data,t,o);for(a.children.push(e),u(a,i);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(i,o,t)},_split:function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),s=p(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(e,t){this.data=p([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,n){var r,i,o,a,u,l,c,f,h,v,p,m,g,y;for(l=c=1/0,r=t;r<=n-t;r++)h=i=s(e,0,r,this.toBBox),v=o=s(e,r,n,this.toBBox),void 0,void 0,void 0,void 0,p=Math.max(h.minX,v.minX),m=Math.max(h.minY,v.minY),g=Math.min(h.maxX,v.maxX),y=Math.min(h.maxY,v.maxY),a=Math.max(0,g-p)*Math.max(0,y-m),u=d(i)+d(o),a<l?(l=a,f=r,c=u<c?u:c):a===l&&u<c&&(c=u,f=r);return f},_chooseSplitAxis:function(e,t,n){var r=e.leaf?this.compareMinX:l,i=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)},_allDistMargin:function(e,t,n,r){e.children.sort(r);var i,o,a=this.toBBox,l=s(e,0,t,a),c=s(e,n-t,n,a),d=f(l)+f(c);for(i=t;i<n-t;i++)o=e.children[i],u(l,e.leaf?a(o):o),d+=f(l);for(i=n-t-1;i>=t;i--)o=e.children[i],u(c,e.leaf?a(o):o),d+=f(c);return d},_adjustParentBBoxes:function(e,t,n){for(var r=n;r>=0;r--)u(t[r],e)},_condense:function(e){for(var t,n=e.length-1;n>=0;n--)0===e[n].children.length?n>0?(t=e[n-1].children).splice(t.indexOf(e[n]),1):this.clear():a(e[n],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},75299:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(77810),i=function(e,t){return"boolean"==typeof t?t:!e};const o=function(e){return(0,r.useReducer)(i,e)}},24567:function(e,t,n){!function(e){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o={exports:{}},a=function(e){return e&&e.Math==Math&&e},s=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof r&&r)||function(){return this}()||Function("return this")(),u=function(e){try{return!!e()}catch(e){return!0}},l=!u((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),c=l,d=Function.prototype,f=d.apply,h=d.call,v="object"==typeof Reflect&&Reflect.apply||(c?h.bind(f):function(){return h.apply(f,arguments)}),p=l,m=Function.prototype,g=m.call,y=p&&m.bind.bind(g,g),x=p?y:function(e){return function(){return g.apply(e,arguments)}},b=x,A=b({}.toString),w=b("".slice),E=function(e){return w(A(e),8,-1)},_=E,C=x,j=function(e){if("Function"===_(e))return C(e)},S="object"==typeof document&&document.all,k={all:S,IS_HTMLDDA:void 0===S&&void 0!==S},N=k.all,T=k.IS_HTMLDDA?function(e){return"function"==typeof e||e===N}:function(e){return"function"==typeof e},R={},O=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I=l,M=Function.prototype.call,P=I?M.bind(M):function(){return M.apply(M,arguments)},L={},D={}.propertyIsEnumerable,z=Object.getOwnPropertyDescriptor,$=z&&!D.call({1:2},1);L.f=$?function(e){var t=z(this,e);return!!t&&t.enumerable}:D;var F,U,B=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},H=u,q=E,V=Object,Y=x("".split),W=H((function(){return!V("z").propertyIsEnumerable(0)}))?function(e){return"String"==q(e)?Y(e,""):V(e)}:V,K=function(e){return null==e},X=K,G=TypeError,Q=function(e){if(X(e))throw G("Can't call method on "+e);return e},J=W,Z=Q,ee=function(e){return J(Z(e))},te=T,ne=k.all,re=k.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:te(e)||e===ne}:function(e){return"object"==typeof e?null!==e:te(e)},ie={},oe=ie,ae=s,se=T,ue=function(e){return se(e)?e:void 0},le=function(e,t){return arguments.length<2?ue(oe[e])||ue(ae[e]):oe[e]&&oe[e][t]||ae[e]&&ae[e][t]},ce=x({}.isPrototypeOf),de="undefined"!=typeof navigator&&String(navigator.userAgent)||"",fe=s,he=de,ve=fe.process,pe=fe.Deno,me=ve&&ve.versions||pe&&pe.version,ge=me&&me.v8;ge&&(U=(F=ge.split("."))[0]>0&&F[0]<4?1:+(F[0]+F[1])),!U&&he&&(!(F=he.match(/Edge\/(\d+)/))||F[1]>=74)&&(F=he.match(/Chrome\/(\d+)/))&&(U=+F[1]);var ye=U,xe=ye,be=u,Ae=!!Object.getOwnPropertySymbols&&!be((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&xe&&xe<41})),we=Ae&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ee=le,_e=T,Ce=ce,je=Object,Se=we?function(e){return"symbol"==typeof e}:function(e){var t=Ee("Symbol");return _e(t)&&Ce(t.prototype,je(e))},ke=String,Ne=function(e){try{return ke(e)}catch(e){return"Object"}},Te=T,Re=Ne,Oe=TypeError,Ie=function(e){if(Te(e))return e;throw Oe(Re(e)+" is not a function")},Me=Ie,Pe=K,Le=function(e,t){var n=e[t];return Pe(n)?void 0:Me(n)},De=P,ze=T,$e=re,Fe=TypeError,Ue={exports:{}},Be=s,He=Object.defineProperty,qe="__core-js_shared__",Ve=s[qe]||function(e,t){try{He(Be,e,{value:t,configurable:!0,writable:!0})}catch(n){Be[e]=t}return t}(qe,{}),Ye=Ve;(Ue.exports=function(e,t){return Ye[e]||(Ye[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var We=Ue.exports,Ke=Q,Xe=Object,Ge=function(e){return Xe(Ke(e))},Qe=Ge,Je=x({}.hasOwnProperty),Ze=Object.hasOwn||function(e,t){return Je(Qe(e),t)},et=x,tt=0,nt=Math.random(),rt=et(1..toString),it=function(e){return"Symbol("+(void 0===e?"":e)+")_"+rt(++tt+nt,36)},ot=We,at=Ze,st=it,ut=Ae,lt=we,ct=s.Symbol,dt=ot("wks"),ft=lt?ct.for||ct:ct&&ct.withoutSetter||st,ht=function(e){return at(dt,e)||(dt[e]=ut&&at(ct,e)?ct[e]:ft("Symbol."+e)),dt[e]},vt=P,pt=re,mt=Se,gt=Le,yt=TypeError,xt=ht("toPrimitive"),bt=function(e,t){if(!pt(e)||mt(e))return e;var n,r=gt(e,xt);if(r){if(void 0===t&&(t="default"),n=vt(r,e,t),!pt(n)||mt(n))return n;throw yt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&ze(n=e.toString)&&!$e(r=De(n,e)))return r;if(ze(n=e.valueOf)&&!$e(r=De(n,e)))return r;if("string"!==t&&ze(n=e.toString)&&!$e(r=De(n,e)))return r;throw Fe("Can't convert object to primitive value")}(e,t)},At=Se,wt=function(e){var t=bt(e,"string");return At(t)?t:t+""},Et=re,_t=s.document,Ct=Et(_t)&&Et(_t.createElement),jt=function(e){return Ct?_t.createElement(e):{}},St=jt,kt=!O&&!u((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),Nt=O,Tt=P,Rt=L,Ot=B,It=ee,Mt=wt,Pt=Ze,Lt=kt,Dt=Object.getOwnPropertyDescriptor;R.f=Nt?Dt:function(e,t){if(e=It(e),t=Mt(t),Lt)try{return Dt(e,t)}catch(e){}if(Pt(e,t))return Ot(!Tt(Rt.f,e,t),e[t])};var zt=u,$t=T,Ft=/#|\.prototype\./,Ut=function(e,t){var n=Ht[Bt(e)];return n==Vt||n!=qt&&($t(t)?zt(t):!!t)},Bt=Ut.normalize=function(e){return String(e).replace(Ft,".").toLowerCase()},Ht=Ut.data={},qt=Ut.NATIVE="N",Vt=Ut.POLYFILL="P",Yt=Ut,Wt=Ie,Kt=l,Xt=j(j.bind),Gt=function(e,t){return Wt(e),void 0===t?e:Kt?Xt(e,t):function(){return e.apply(t,arguments)}},Qt={},Jt=O&&u((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Zt=re,en=String,tn=TypeError,nn=function(e){if(Zt(e))return e;throw tn(en(e)+" is not an object")},rn=O,on=kt,an=Jt,sn=nn,un=wt,ln=TypeError,cn=Object.defineProperty,dn=Object.getOwnPropertyDescriptor,fn="enumerable",hn="configurable",vn="writable";Qt.f=rn?an?function(e,t,n){if(sn(e),t=un(t),sn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&vn in n&&!n[vn]){var r=dn(e,t);r&&r[vn]&&(e[t]=n.value,n={configurable:hn in n?n[hn]:r[hn],enumerable:fn in n?n[fn]:r[fn],writable:!1})}return cn(e,t,n)}:cn:function(e,t,n){if(sn(e),t=un(t),sn(n),on)try{return cn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw ln("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var pn=Qt,mn=B,gn=O?function(e,t,n){return pn.f(e,t,mn(1,n))}:function(e,t,n){return e[t]=n,e},yn=s,xn=v,bn=j,An=T,wn=R.f,En=Yt,_n=ie,Cn=Gt,jn=gn,Sn=Ze,kn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return xn(e,this,arguments)};return t.prototype=e.prototype,t},Nn=function(e,t){var n,r,i,o,a,s,u,l,c,d=e.target,f=e.global,h=e.stat,v=e.proto,p=f?yn:h?yn[d]:(yn[d]||{}).prototype,m=f?_n:_n[d]||jn(_n,d,{})[d],g=m.prototype;for(o in t)r=!(n=En(f?o:d+(h?".":"#")+o,e.forced))&&p&&Sn(p,o),s=m[o],r&&(u=e.dontCallGetSet?(c=wn(p,o))&&c.value:p[o]),a=r&&u?u:t[o],r&&typeof s==typeof a||(l=e.bind&&r?Cn(a,yn):e.wrap&&r?kn(a):v&&An(a)?bn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&jn(l,"sham",!0),jn(m,o,l),v&&(Sn(_n,i=d+"Prototype")||jn(_n,i,{}),jn(_n[i],o,a),e.real&&g&&(n||!g[o])&&jn(g,o,a)))},Tn=Nn,Rn=O,On=Qt.f;Tn({target:"Object",stat:!0,forced:Object.defineProperty!==On,sham:!Rn},{defineProperty:On});var In=ie.Object,Mn=o.exports=function(e,t,n){return In.defineProperty(e,t,n)};In.defineProperty.sham&&(Mn.sham=!0);var Pn=o.exports,Ln=Pn,Dn=i(Ln),zn=E,$n=Array.isArray||function(e){return"Array"==zn(e)},Fn=Math.ceil,Un=Math.floor,Bn=Math.trunc||function(e){var t=+e;return(t>0?Un:Fn)(t)},Hn=function(e){var t=+e;return t!=t||0===t?0:Bn(t)},qn=Hn,Vn=Math.min,Yn=function(e){return function(e){return e>0?Vn(qn(e),9007199254740991):0}(e.length)},Wn=TypeError,Kn=function(e){if(e>9007199254740991)throw Wn("Maximum allowed index exceeded");return e},Xn=wt,Gn=Qt,Qn=B,Jn=function(e,t,n){var r=Xn(t);r in e?Gn.f(e,r,Qn(0,n)):e[r]=n},Zn={};Zn[ht("toStringTag")]="z";var er="[object z]"===String(Zn),tr=er,nr=T,rr=E,ir=ht("toStringTag"),or=Object,ar="Arguments"==rr(function(){return arguments}()),sr=tr?rr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=or(e),ir))?n:ar?rr(t):"Object"==(r=rr(t))&&nr(t.callee)?"Arguments":r},ur=T,lr=Ve,cr=x(Function.toString);ur(lr.inspectSource)||(lr.inspectSource=function(e){return cr(e)});var dr=lr.inspectSource,fr=x,hr=u,vr=T,pr=sr,mr=dr,gr=function(){},yr=[],xr=le("Reflect","construct"),br=/^\s*(?:class|function)\b/,Ar=fr(br.exec),wr=!br.exec(gr),Er=function(e){if(!vr(e))return!1;try{return xr(gr,yr,e),!0}catch(e){return!1}},_r=function(e){if(!vr(e))return!1;switch(pr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return wr||!!Ar(br,mr(e))}catch(e){return!0}};_r.sham=!0;var Cr=!xr||hr((function(){var e;return Er(Er.call)||!Er(Object)||!Er((function(){e=!0}))||e}))?_r:Er,jr=$n,Sr=Cr,kr=re,Nr=ht("species"),Tr=Array,Rr=function(e,t){return new(function(e){var t;return jr(e)&&(t=e.constructor,(Sr(t)&&(t===Tr||jr(t.prototype))||kr(t)&&null===(t=t[Nr]))&&(t=void 0)),void 0===t?Tr:t}(e))(0===t?0:t)},Or=u,Ir=ye,Mr=ht("species"),Pr=function(e){return Ir>=51||!Or((function(){var t=[];return(t.constructor={})[Mr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Lr=Nn,Dr=u,zr=$n,$r=re,Fr=Ge,Ur=Yn,Br=Kn,Hr=Jn,qr=Rr,Vr=Pr,Yr=ye,Wr=ht("isConcatSpreadable"),Kr=Yr>=51||!Dr((function(){var e=[];return e[Wr]=!1,e.concat()[0]!==e})),Xr=function(e){if(!$r(e))return!1;var t=e[Wr];return void 0!==t?!!t:zr(e)};Lr({target:"Array",proto:!0,arity:1,forced:!Kr||!Vr("concat")},{concat:function(e){var t,n,r,i,o,a=Fr(this),s=qr(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Xr(o=-1===t?a:arguments[t]))for(i=Ur(o),Br(u+i),n=0;n<i;n++,u++)n in o&&Hr(s,u,o[n]);else Br(u+1),Hr(s,u++,o);return s.length=u,s}});var Gr=sr,Qr=String,Jr=function(e){if("Symbol"===Gr(e))throw TypeError("Cannot convert a Symbol value to a string");return Qr(e)},Zr={},ei=Hn,ti=Math.max,ni=Math.min,ri=function(e,t){var n=ei(e);return n<0?ti(n+t,0):ni(n,t)},ii=ee,oi=ri,ai=Yn,si=function(e){return function(t,n,r){var i,o=ii(t),a=ai(o),s=oi(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ui={includes:si(!0),indexOf:si(!1)},li={},ci=Ze,di=ee,fi=ui.indexOf,hi=li,vi=x([].push),pi=function(e,t){var n,r=di(e),i=0,o=[];for(n in r)!ci(hi,n)&&ci(r,n)&&vi(o,n);for(;t.length>i;)ci(r,n=t[i++])&&(~fi(o,n)||vi(o,n));return o},mi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gi=pi,yi=mi,xi=Object.keys||function(e){return gi(e,yi)},bi=O,Ai=Jt,wi=Qt,Ei=nn,_i=ee,Ci=xi;Zr.f=bi&&!Ai?Object.defineProperties:function(e,t){Ei(e);for(var n,r=_i(t),i=Ci(t),o=i.length,a=0;o>a;)wi.f(e,n=i[a++],r[n]);return e};var ji,Si=le("document","documentElement"),ki=it,Ni=We("keys"),Ti=function(e){return Ni[e]||(Ni[e]=ki(e))},Ri=nn,Oi=Zr,Ii=mi,Mi=li,Pi=Si,Li=jt,Di="prototype",zi="script",$i=Ti("IE_PROTO"),Fi=function(){},Ui=function(e){return"<"+zi+">"+e+"</"+zi+">"},Bi=function(e){e.write(Ui("")),e.close();var t=e.parentWindow.Object;return e=null,t},Hi=function(){try{ji=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Hi="undefined"!=typeof document?document.domain&&ji?Bi(ji):(t=Li("iframe"),n="java"+zi+":",t.style.display="none",Pi.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ui("document.F=Object")),e.close(),e.F):Bi(ji);for(var r=Ii.length;r--;)delete Hi[Di][Ii[r]];return Hi()};Mi[$i]=!0;var qi=Object.create||function(e,t){var n;return null!==e?(Fi[Di]=Ri(e),n=new Fi,Fi[Di]=null,n[$i]=e):n=Hi(),void 0===t?n:Oi.f(n,t)},Vi={},Yi=pi,Wi=mi.concat("length","prototype");Vi.f=Object.getOwnPropertyNames||function(e){return Yi(e,Wi)};var Ki={},Xi=ri,Gi=Yn,Qi=Jn,Ji=Array,Zi=Math.max,eo=function(e,t,n){for(var r=Gi(e),i=Xi(t,r),o=Xi(void 0===n?r:n,r),a=Ji(Zi(o-i,0)),s=0;i<o;i++,s++)Qi(a,s,e[i]);return a.length=s,a},to=E,no=ee,ro=Vi.f,io=eo,oo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ki.f=function(e){return oo&&"Window"==to(e)?function(e){try{return ro(e)}catch(e){return io(oo)}}(e):ro(no(e))};var ao={};ao.f=Object.getOwnPropertySymbols;var so=gn,uo=function(e,t,n,r){return r&&r.enumerable?e[t]=n:so(e,t,n),e},lo=Qt,co=function(e,t,n){return lo.f(e,t,n)},fo={},ho=ht;fo.f=ho;var vo,po,mo,go=ie,yo=Ze,xo=fo,bo=Qt.f,Ao=function(e){var t=go.Symbol||(go.Symbol={});yo(t,e)||bo(t,e,{value:xo.f(e)})},wo=P,Eo=le,_o=ht,Co=uo,jo=function(){var e=Eo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=_o("toPrimitive");t&&!t[r]&&Co(t,r,(function(e){return wo(n,this)}),{arity:1})},So=sr,ko=er?{}.toString:function(){return"[object "+So(this)+"]"},No=er,To=Qt.f,Ro=gn,Oo=Ze,Io=ko,Mo=ht("toStringTag"),Po=function(e,t,n,r){if(e){var i=n?e:e.prototype;Oo(i,Mo)||To(i,Mo,{configurable:!0,value:t}),r&&!No&&Ro(i,"toString",Io)}},Lo=T,Do=s.WeakMap,zo=Lo(Do)&&/native code/.test(String(Do)),$o=s,Fo=re,Uo=gn,Bo=Ze,Ho=Ve,qo=Ti,Vo=li,Yo="Object already initialized",Wo=$o.TypeError,Ko=$o.WeakMap;if(zo||Ho.state){var Xo=Ho.state||(Ho.state=new Ko);Xo.get=Xo.get,Xo.has=Xo.has,Xo.set=Xo.set,vo=function(e,t){if(Xo.has(e))throw Wo(Yo);return t.facade=e,Xo.set(e,t),t},po=function(e){return Xo.get(e)||{}},mo=function(e){return Xo.has(e)}}else{var Go=qo("state");Vo[Go]=!0,vo=function(e,t){if(Bo(e,Go))throw Wo(Yo);return t.facade=e,Uo(e,Go,t),t},po=function(e){return Bo(e,Go)?e[Go]:{}},mo=function(e){return Bo(e,Go)}}var Qo={set:vo,get:po,has:mo,enforce:function(e){return mo(e)?po(e):vo(e,{})},getterFor:function(e){return function(t){var n;if(!Fo(t)||(n=po(t)).type!==e)throw Wo("Incompatible receiver, "+e+" required");return n}}},Jo=Gt,Zo=W,ea=Ge,ta=Yn,na=Rr,ra=x([].push),ia=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,l,c,d){for(var f,h,v=ea(u),p=Zo(v),m=Jo(l,c),g=ta(p),y=0,x=d||na,b=t?x(u,g):n||a?x(u,0):void 0;g>y;y++)if((s||y in p)&&(h=m(f=p[y],y,v),e))if(t)b[y]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:ra(b,f)}else switch(e){case 4:return!1;case 7:ra(b,f)}return o?-1:r||i?i:b}},oa={forEach:ia(0),map:ia(1),filter:ia(2),some:ia(3),every:ia(4),find:ia(5),findIndex:ia(6),filterReject:ia(7)},aa=Nn,sa=s,ua=P,la=x,ca=O,da=Ae,fa=u,ha=Ze,va=ce,pa=nn,ma=ee,ga=wt,ya=Jr,xa=B,ba=qi,Aa=xi,wa=Vi,Ea=Ki,_a=ao,Ca=R,ja=Qt,Sa=Zr,ka=L,Na=uo,Ta=co,Ra=We,Oa=li,Ia=it,Ma=ht,Pa=fo,La=Ao,Da=jo,za=Po,$a=Qo,Fa=oa.forEach,Ua=Ti("hidden"),Ba="Symbol",Ha="prototype",qa=$a.set,Va=$a.getterFor(Ba),Ya=Object[Ha],Wa=sa.Symbol,Ka=Wa&&Wa[Ha],Xa=sa.TypeError,Ga=sa.QObject,Qa=Ca.f,Ja=ja.f,Za=Ea.f,es=ka.f,ts=la([].push),ns=Ra("symbols"),rs=Ra("op-symbols"),is=Ra("wks"),os=!Ga||!Ga[Ha]||!Ga[Ha].findChild,as=ca&&fa((function(){return 7!=ba(Ja({},"a",{get:function(){return Ja(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Qa(Ya,t);r&&delete Ya[t],Ja(e,t,n),r&&e!==Ya&&Ja(Ya,t,r)}:Ja,ss=function(e,t){var n=ns[e]=ba(Ka);return qa(n,{type:Ba,tag:e,description:t}),ca||(n.description=t),n},us=function(e,t,n){e===Ya&&us(rs,t,n),pa(e);var r=ga(t);return pa(n),ha(ns,r)?(n.enumerable?(ha(e,Ua)&&e[Ua][r]&&(e[Ua][r]=!1),n=ba(n,{enumerable:xa(0,!1)})):(ha(e,Ua)||Ja(e,Ua,xa(1,{})),e[Ua][r]=!0),as(e,r,n)):Ja(e,r,n)},ls=function(e,t){pa(e);var n=ma(t),r=Aa(n).concat(hs(n));return Fa(r,(function(t){ca&&!ua(cs,n,t)||us(e,t,n[t])})),e},cs=function(e){var t=ga(e),n=ua(es,this,t);return!(this===Ya&&ha(ns,t)&&!ha(rs,t))&&(!(n||!ha(this,t)||!ha(ns,t)||ha(this,Ua)&&this[Ua][t])||n)},ds=function(e,t){var n=ma(e),r=ga(t);if(n!==Ya||!ha(ns,r)||ha(rs,r)){var i=Qa(n,r);return!i||!ha(ns,r)||ha(n,Ua)&&n[Ua][r]||(i.enumerable=!0),i}},fs=function(e){var t=Za(ma(e)),n=[];return Fa(t,(function(e){ha(ns,e)||ha(Oa,e)||ts(n,e)})),n},hs=function(e){var t=e===Ya,n=Za(t?rs:ma(e)),r=[];return Fa(n,(function(e){!ha(ns,e)||t&&!ha(Ya,e)||ts(r,ns[e])})),r};da||(Wa=function(){if(va(Ka,this))throw Xa("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ya(arguments[0]):void 0,t=Ia(e),n=function(e){this===Ya&&ua(n,rs,e),ha(this,Ua)&&ha(this[Ua],t)&&(this[Ua][t]=!1),as(this,t,xa(1,e))};return ca&&os&&as(Ya,t,{configurable:!0,set:n}),ss(t,e)},Na(Ka=Wa[Ha],"toString",(function(){return Va(this).tag})),Na(Wa,"withoutSetter",(function(e){return ss(Ia(e),e)})),ka.f=cs,ja.f=us,Sa.f=ls,Ca.f=ds,wa.f=Ea.f=fs,_a.f=hs,Pa.f=function(e){return ss(Ma(e),e)},ca&&Ta(Ka,"description",{configurable:!0,get:function(){return Va(this).description}})),aa({global:!0,constructor:!0,wrap:!0,forced:!da,sham:!da},{Symbol:Wa}),Fa(Aa(is),(function(e){La(e)})),aa({target:Ba,stat:!0,forced:!da},{useSetter:function(){os=!0},useSimple:function(){os=!1}}),aa({target:"Object",stat:!0,forced:!da,sham:!ca},{create:function(e,t){return void 0===t?ba(e):ls(ba(e),t)},defineProperty:us,defineProperties:ls,getOwnPropertyDescriptor:ds}),aa({target:"Object",stat:!0,forced:!da},{getOwnPropertyNames:fs}),Da(),za(Wa,Ba),Oa[Ua]=!0;var vs=Ae&&!!Symbol.for&&!!Symbol.keyFor,ps=Nn,ms=le,gs=Ze,ys=Jr,xs=We,bs=vs,As=xs("string-to-symbol-registry"),ws=xs("symbol-to-string-registry");ps({target:"Symbol",stat:!0,forced:!bs},{for:function(e){var t=ys(e);if(gs(As,t))return As[t];var n=ms("Symbol")(t);return As[t]=n,ws[n]=t,n}});var Es=Nn,_s=Ze,Cs=Se,js=Ne,Ss=vs,ks=We("symbol-to-string-registry");Es({target:"Symbol",stat:!0,forced:!Ss},{keyFor:function(e){if(!Cs(e))throw TypeError(js(e)+" is not a symbol");if(_s(ks,e))return ks[e]}});var Ns=x([].slice),Ts=$n,Rs=T,Os=E,Is=Jr,Ms=x([].push),Ps=Nn,Ls=le,Ds=v,zs=P,$s=x,Fs=u,Us=T,Bs=Se,Hs=Ns,qs=Ae,Vs=String,Ys=Ls("JSON","stringify"),Ws=$s(/./.exec),Ks=$s("".charAt),Xs=$s("".charCodeAt),Gs=$s("".replace),Qs=$s(1..toString),Js=/[\uD800-\uDFFF]/g,Zs=/^[\uD800-\uDBFF]$/,eu=/^[\uDC00-\uDFFF]$/,tu=!qs||Fs((function(){var e=Ls("Symbol")();return"[null]"!=Ys([e])||"{}"!=Ys({a:e})||"{}"!=Ys(Object(e))})),nu=Fs((function(){return'"\\udf06\\ud834"'!==Ys("\udf06\ud834")||'"\\udead"'!==Ys("\udead")})),ru=function(e,t){var n=Hs(arguments),r=function(e){if(Rs(e))return e;if(Ts(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Ms(n,i):"number"!=typeof i&&"Number"!=Os(i)&&"String"!=Os(i)||Ms(n,Is(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ts(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}}(t);if(Us(r)||void 0!==e&&!Bs(e))return n[1]=function(e,t){if(Us(r)&&(t=zs(r,this,Vs(e),t)),!Bs(t))return t},Ds(Ys,null,n)},iu=function(e,t,n){var r=Ks(n,t-1),i=Ks(n,t+1);return Ws(Zs,e)&&!Ws(eu,i)||Ws(eu,e)&&!Ws(Zs,r)?"\\u"+Qs(Xs(e,0),16):e};Ys&&Ps({target:"JSON",stat:!0,arity:3,forced:tu||nu},{stringify:function(e,t,n){var r=Hs(arguments),i=Ds(tu?ru:Ys,null,r);return nu&&"string"==typeof i?Gs(i,Js,iu):i}});var ou=ao,au=Ge;Nn({target:"Object",stat:!0,forced:!Ae||u((function(){ou.f(1)}))},{getOwnPropertySymbols:function(e){var t=ou.f;return t?t(au(e)):[]}}),Ao("asyncIterator"),Ao("hasInstance"),Ao("isConcatSpreadable"),Ao("iterator"),Ao("match"),Ao("matchAll"),Ao("replace"),Ao("search"),Ao("species"),Ao("split");var su=jo;Ao("toPrimitive"),su();var uu=le,lu=Po;Ao("toStringTag"),lu(uu("Symbol"),"Symbol"),Ao("unscopables"),Po(s.JSON,"JSON",!0);var cu,du,fu,hu=ie.Symbol,vu={},pu=O,mu=Ze,gu=Function.prototype,yu=pu&&Object.getOwnPropertyDescriptor,xu=mu(gu,"name"),bu={EXISTS:xu,PROPER:xu&&"something"===function(){}.name,CONFIGURABLE:xu&&(!pu||pu&&yu(gu,"name").configurable)},Au=!u((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),wu=Ze,Eu=T,_u=Ge,Cu=Au,ju=Ti("IE_PROTO"),Su=Object,ku=Su.prototype,Nu=Cu?Su.getPrototypeOf:function(e){var t=_u(e);if(wu(t,ju))return t[ju];var n=t.constructor;return Eu(n)&&t instanceof n?n.prototype:t instanceof Su?ku:null},Tu=u,Ru=T,Ou=re,Iu=qi,Mu=Nu,Pu=uo,Lu=ht("iterator"),Du=!1;[].keys&&("next"in(fu=[].keys())?(du=Mu(Mu(fu)))!==Object.prototype&&(cu=du):Du=!0);var zu=!Ou(cu)||Tu((function(){var e={};return cu[Lu].call(e)!==e}));Ru((cu=zu?{}:Iu(cu))[Lu])||Pu(cu,Lu,(function(){return this}));var $u={IteratorPrototype:cu,BUGGY_SAFARI_ITERATORS:Du},Fu=$u.IteratorPrototype,Uu=qi,Bu=B,Hu=Po,qu=vu,Vu=function(){return this},Yu=x,Wu=Ie,Ku=T,Xu=String,Gu=TypeError,Qu=nn,Ju=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e,t,n){try{return Yu(Wu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Qu(n),function(e){if("object"==typeof e||Ku(e))return e;throw Gu("Can't set "+Xu(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Zu=Nn,el=P,tl=Nu,nl=Po,rl=uo,il=vu,ol=bu.PROPER,al=$u.BUGGY_SAFARI_ITERATORS,sl=ht("iterator"),ul="keys",ll="values",cl="entries",dl=function(){return this},fl=function(e,t,n,r,i,o,a){!function(e,t,n,r){var i=t+" Iterator";e.prototype=Uu(Fu,{next:Bu(+!r,n)}),Hu(e,i,!1,!0),qu[i]=Vu}(n,t,r);var s,u,l,c=function(e){if(e===i&&p)return p;if(!al&&e in h)return h[e];switch(e){case ul:case ll:case cl:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",f=!1,h=e.prototype,v=h[sl]||h["@@iterator"]||i&&h[i],p=!al&&v||c(i),m="Array"==t&&h.entries||v;if(m&&(s=tl(m.call(new e)))!==Object.prototype&&s.next&&(nl(s,d,!0,!0),il[d]=dl),ol&&i==ll&&v&&v.name!==ll&&(f=!0,p=function(){return el(v,this)}),i)if(u={values:c(ll),keys:o?p:c(ul),entries:c(cl)},a)for(l in u)(al||f||!(l in h))&&rl(h,l,u[l]);else Zu({target:t,proto:!0,forced:al||f},u);return a&&h[sl]!==p&&rl(h,sl,p,{name:i}),il[t]=p,u},hl=function(e,t){return{value:e,done:t}},vl=ee,pl=vu,ml=Qo;Qt.f;var gl=fl,yl=hl,xl="Array Iterator",bl=ml.set,Al=ml.getterFor(xl);gl(Array,"Array",(function(e,t){bl(this,{type:xl,target:vl(e),index:0,kind:t})}),(function(){var e=Al(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,yl(void 0,!0)):yl("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),pl.Arguments=pl.Array;var wl=s,El=sr,_l=gn,Cl=vu,jl=ht("toStringTag");for(var Sl in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var kl=wl[Sl],Nl=kl&&kl.prototype;Nl&&El(Nl)!==jl&&_l(Nl,jl,Sl),Cl[Sl]=Cl.Array}var Tl=hu;Ao("dispose");var Rl=Tl;Ao("asyncDispose");var Ol=Nn,Il=x,Ml=le("Symbol"),Pl=Ml.keyFor,Ll=Il(Ml.prototype.valueOf);Ol({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Pl(Ll(e))}catch(e){return!1}}});for(var Dl=Nn,zl=We,$l=le,Fl=x,Ul=Se,Bl=ht,Hl=$l("Symbol"),ql=Hl.isWellKnown,Vl=$l("Object","getOwnPropertyNames"),Yl=Fl(Hl.prototype.valueOf),Wl=zl("wks"),Kl=0,Xl=Vl(Hl),Gl=Xl.length;Kl<Gl;Kl++)try{var Ql=Xl[Kl];Ul(Hl[Ql])&&Bl(Ql)}catch(e){}Dl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(ql&&ql(e))return!0;try{for(var t=Yl(e),n=0,r=Vl(Wl),i=r.length;n<i;n++)if(Wl[r[n]]==t)return!0}catch(e){}return!1}}),Ao("matcher"),Ao("metadataKey"),Ao("observable"),Ao("metadata"),Ao("patternMatch"),Ao("replaceAll");var Jl=Rl,Zl=i(Jl),ec=x,tc=Hn,nc=Jr,rc=Q,ic=ec("".charAt),oc=ec("".charCodeAt),ac=ec("".slice),sc=function(e){return function(t,n){var r,i,o=nc(rc(t)),a=tc(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=oc(o,a))<55296||r>56319||a+1===s||(i=oc(o,a+1))<56320||i>57343?e?ic(o,a):r:e?ac(o,a,a+2):i-56320+(r-55296<<10)+65536}},uc=(sc(!1),sc(!0)),lc=Jr,cc=Qo,dc=fl,fc=hl,hc="String Iterator",vc=cc.set,pc=cc.getterFor(hc);dc(String,"String",(function(e){vc(this,{type:hc,string:lc(e),index:0})}),(function(){var e,t=pc(this),n=t.string,r=t.index;return r>=n.length?fc(void 0,!0):(e=uc(n,r),t.index+=e.length,fc(e,!1))}));var mc=fo.f("iterator"),gc=mc,yc=i(gc);function xc(e){return xc="function"==typeof Zl&&"symbol"==typeof yc?function(e){return typeof e}:function(e){return e&&"function"==typeof Zl&&e.constructor===Zl&&e!==Zl.prototype?"symbol":typeof e},xc(e)}var bc=i(fo.f("toPrimitive"));function Ac(e){var t=function(e,t){if("object"!==xc(e)||null===e)return e;var n=e[bc];if(void 0!==n){var r=n.call(e,"string");if("object"!==xc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===xc(t)?t:String(t)}function wc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Dn(e,Ac(r.key),r)}}function Ec(e,t,n){return t&&wc(e.prototype,t),n&&wc(e,n),Dn(e,"prototype",{writable:!1}),e}function _c(e,t,n){return(t=Ac(t))in e?Dn(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cc=x,jc=Ie,Sc=re,kc=Ze,Nc=Ns,Tc=l,Rc=Function,Oc=Cc([].concat),Ic=Cc([].join),Mc={},Pc=Tc?Rc.bind:function(e){var t=jc(this),n=t.prototype,r=Nc(arguments,1),i=function(){var n=Oc(r,Nc(arguments));return this instanceof i?function(e,t,n){if(!kc(Mc,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";Mc[t]=Rc("C,a","return new C("+Ic(r,",")+")")}return Mc[t](e,n)}(t,n.length,n):t.apply(e,n)};return Sc(n)&&(i.prototype=n),i},Lc=Pc;Nn({target:"Function",proto:!0,forced:Function.bind!==Lc},{bind:Lc});var Dc=ie,zc=function(e){return Dc[e+"Prototype"]},$c=zc("Function").bind,Fc=ce,Uc=$c,Bc=Function.prototype,Hc=function(e){var t=e.bind;return e===Bc||Fc(Bc,e)&&t===Bc.bind?Uc:t},qc=i(Hc),Vc=Ie,Yc=Ge,Wc=W,Kc=Yn,Xc=TypeError,Gc=function(e){return function(t,n,r,i){Vc(n);var o=Yc(t),a=Wc(o),s=Kc(o),u=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,e?u<0:s<=u)throw Xc("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=l)u in a&&(i=n(i,a[u],u,o));return i}},Qc={left:Gc(!1),right:Gc(!0)},Jc=u,Zc=function(e,t){var n=[][e];return!!n&&Jc((function(){n.call(null,t||function(){return 1},1)}))},ed="undefined"!=typeof process&&"process"==E(process),td=Qc.left;Nn({target:"Array",proto:!0,forced:!ed&&ye>79&&ye<83||!Zc("reduce")},{reduce:function(e){var t=arguments.length;return td(this,e,t,t>1?arguments[1]:void 0)}});var nd=zc("Array").reduce,rd=ce,id=nd,od=Array.prototype,ad=i((function(e){var t=e.reduce;return e===od||rd(od,e)&&t===od.reduce?id:t})),sd=oa.filter;Nn({target:"Array",proto:!0,forced:!Pr("filter")},{filter:function(e){return sd(this,e,arguments.length>1?arguments[1]:void 0)}});var ud=zc("Array").filter,ld=ce,cd=ud,dd=Array.prototype,fd=i((function(e){var t=e.filter;return e===dd||ld(dd,e)&&t===dd.filter?cd:t})),hd=oa.map;Nn({target:"Array",proto:!0,forced:!Pr("map")},{map:function(e){return hd(this,e,arguments.length>1?arguments[1]:void 0)}});var vd=zc("Array").map,pd=ce,md=vd,gd=Array.prototype,yd=i((function(e){var t=e.map;return e===gd||pd(gd,e)&&t===gd.map?md:t})),xd=$n,bd=Yn,Ad=Kn,wd=Gt,Ed=function(e,t,n,r,i,o,a,s){for(var u,l,c=i,d=0,f=!!a&&wd(a,s);d<r;)d in n&&(u=f?f(n[d],d,t):n[d],o>0&&xd(u)?(l=bd(u),c=Ed(e,t,u,l,c,o-1)-1):(Ad(c+1),e[c]=u),c++),d++;return c},_d=Ed,Cd=Ie,jd=Ge,Sd=Yn,kd=Rr;Nn({target:"Array",proto:!0},{flatMap:function(e){var t,n=jd(this),r=Sd(n);return Cd(e),(t=kd(n,0)).length=_d(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var Nd=zc("Array").flatMap,Td=ce,Rd=Nd,Od=Array.prototype,Id=i((function(e){var t=e.flatMap;return e===Od||Td(Od,e)&&t===Od.flatMap?Rd:t})),Md=function(){function e(n,r,i){var o,a,s;t(this,e),_c(this,"_source",void 0),_c(this,"_transformers",void 0),_c(this,"_target",void 0),_c(this,"_listeners",{add:qc(o=this._add).call(o,this),remove:qc(a=this._remove).call(a,this),update:qc(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Ec(e,[{key:"all",value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:"start",value:function(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}},{key:"stop",value:function(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}},{key:"_transformItems",value:function(e){var t;return ad(t=this._transformers).call(t,(function(e,t){return t(e)}),e)}},{key:"_add",value:function(e,t){null!=t&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:"_update",value:function(e,t){null!=t&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:"_remove",value:function(e,t){null!=t&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),Pd=function(){function e(n){t(this,e),_c(this,"_source",void 0),_c(this,"_transformers",[]),this._source=n}return Ec(e,[{key:"filter",value:function(e){return this._transformers.push((function(t){return fd(t).call(t,e)})),this}},{key:"map",value:function(e){return this._transformers.push((function(t){return yd(t).call(t,e)})),this}},{key:"flatMap",value:function(e){return this._transformers.push((function(t){return Id(t).call(t,e)})),this}},{key:"to",value:function(e){return new Md(this._source,this._transformers,e)}}]),e}(),Ld=P,Dd=nn,zd=Le,$d=function(e,t,n){var r,i;Dd(e);try{if(!(r=zd(e,"return"))){if("throw"===t)throw n;return n}r=Ld(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Dd(r),n},Fd=nn,Ud=$d,Bd=vu,Hd=ht("iterator"),qd=Array.prototype,Vd=function(e){return void 0!==e&&(Bd.Array===e||qd[Hd]===e)},Yd=sr,Wd=Le,Kd=K,Xd=vu,Gd=ht("iterator"),Qd=function(e){if(!Kd(e))return Wd(e,Gd)||Wd(e,"@@iterator")||Xd[Yd(e)]},Jd=P,Zd=Ie,ef=nn,tf=Ne,nf=Qd,rf=TypeError,of=function(e,t){var n=arguments.length<2?nf(e):t;if(Zd(n))return ef(Jd(n,e));throw rf(tf(e)+" is not iterable")},af=Gt,sf=P,uf=Ge,lf=function(e,t,n,r){try{return r?t(Fd(n)[0],n[1]):t(n)}catch(t){Ud(e,"throw",t)}},cf=Vd,df=Cr,ff=Yn,hf=Jn,vf=of,pf=Qd,mf=Array,gf=ht("iterator"),yf=!1;try{var xf=0,bf={next:function(){return{done:!!xf++}},return:function(){yf=!0}};bf[gf]=function(){return this},Array.from(bf,(function(){throw 2}))}catch(e){}var Af=function(e,t){if(!t&&!yf)return!1;var n=!1;try{var r={};r[gf]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n};Nn({target:"Array",stat:!0,forced:!Af((function(e){Array.from(e)}))},{from:function(e){var t=uf(e),n=df(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=af(i,r>2?arguments[2]:void 0));var a,s,u,l,c,d,f=pf(t),h=0;if(!f||this===mf&&cf(f))for(a=ff(t),s=n?new this(a):mf(a);a>h;h++)d=o?i(t[h],h):t[h],hf(s,h,d);else for(c=(l=vf(t,f)).next,s=n?new this:[];!(u=sf(c,l)).done;h++)d=o?lf(l,i,[u.value,h],!0):u.value,hf(s,h,d);return s.length=h,s}});var wf=ie.Array.from,Ef=i(wf),_f=i(Qd),Cf=i(ie.Object.getOwnPropertySymbols),jf={exports:{}},Sf=Nn,kf=u,Nf=ee,Tf=R.f,Rf=O;Sf({target:"Object",stat:!0,forced:!Rf||kf((function(){Tf(1)})),sham:!Rf},{getOwnPropertyDescriptor:function(e,t){return Tf(Nf(e),t)}});var Of=ie.Object,If=jf.exports=function(e,t){return Of.getOwnPropertyDescriptor(e,t)};Of.getOwnPropertyDescriptor.sham&&(If.sham=!0);var Mf=i(jf.exports),Pf=le,Lf=Vi,Df=ao,zf=nn,$f=x([].concat),Ff=Pf("Reflect","ownKeys")||function(e){var t=Lf.f(zf(e)),n=Df.f;return n?$f(t,n(e)):t},Uf=Ff,Bf=ee,Hf=R,qf=Jn;Nn({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Bf(e),i=Hf.f,o=Uf(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&qf(a,t,n);return a}});var Vf=i(ie.Object.getOwnPropertyDescriptors),Yf={exports:{}},Wf=Nn,Kf=O,Xf=Zr.f;Wf({target:"Object",stat:!0,forced:Object.defineProperties!==Xf,sham:!Kf},{defineProperties:Xf});var Gf=ie.Object,Qf=Yf.exports=function(e,t){return Gf.defineProperties(e,t)};Gf.defineProperties.sham&&(Qf.sham=!0);var Jf=i(Yf.exports),Zf=i(Pn);Nn({target:"Array",stat:!0},{isArray:$n});var eh=ie.Array.isArray,th=i(eh),nh=Nn,rh=$n,ih=Cr,oh=re,ah=ri,sh=Yn,uh=ee,lh=Jn,ch=ht,dh=Ns,fh=Pr("slice"),hh=ch("species"),vh=Array,ph=Math.max;nh({target:"Array",proto:!0,forced:!fh},{slice:function(e,t){var n,r,i,o=uh(this),a=sh(o),s=ah(e,a),u=ah(void 0===t?a:t,a);if(rh(o)&&(n=o.constructor,(ih(n)&&(n===vh||rh(n.prototype))||oh(n)&&null===(n=n[hh]))&&(n=void 0),n===vh||void 0===n))return dh(o,s,u);for(r=new(void 0===n?vh:n)(ph(u-s,0)),i=0;s<u;s++,i++)s in o&&lh(r,i,o[s]);return r.length=i,r}});var mh=zc("Array").slice,gh=ce,yh=mh,xh=Array.prototype,bh=function(e){var t=e.slice;return e===xh||gh(xh,e)&&t===xh.slice?yh:t},Ah=bh,wh=i(Ah),Eh=i(wf);function _h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ch(e,t){var n;if(e){if("string"==typeof e)return _h(e,t);var r=wh(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Eh(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_h(e,t):void 0}}function jh(e,t){return function(e){if(th(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==Zl&&_f(e)||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||Ch(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sh(e){return function(e){if(th(e))return _h(e)}(e)||function(e){if(void 0!==Zl&&null!=_f(e)||null!=e["@@iterator"])return Eh(e)}(e)||Ch(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var kh=i(Tl),Nh=zc("Array").concat,Th=ce,Rh=Nh,Oh=Array.prototype,Ih=i((function(e){var t=e.concat;return e===Oh||Th(Oh,e)&&t===Oh.concat?Rh:t})),Mh=i(bh);Nn({target:"Reflect",stat:!0},{ownKeys:Ff});var Ph=i(ie.Reflect.ownKeys),Lh=i(eh),Dh=Ge,zh=xi;Nn({target:"Object",stat:!0,forced:u((function(){zh(1)}))},{keys:function(e){return zh(Dh(e))}});var $h=i(ie.Object.keys),Fh=oa.forEach,Uh=Zc("forEach")?[].forEach:function(e){return Fh(this,e,arguments.length>1?arguments[1]:void 0)};Nn({target:"Array",proto:!0,forced:[].forEach!=Uh},{forEach:Uh});var Bh=zc("Array").forEach,Hh=sr,qh=Ze,Vh=ce,Yh=Bh,Wh=Array.prototype,Kh={DOMTokenList:!0,NodeList:!0},Xh=function(e){var t=e.forEach;return e===Wh||Vh(Wh,e)&&t===Wh.forEach||qh(Kh,Hh(e))?Yh:t},Gh=i(Xh),Qh=Nn,Jh=$n,Zh=x([].reverse),ev=[1,2];Qh({target:"Array",proto:!0,forced:String(ev)===String(ev.reverse())},{reverse:function(){return Jh(this)&&(this.length=this.length),Zh(this)}});var tv=zc("Array").reverse,nv=ce,rv=tv,iv=Array.prototype,ov=function(e){var t=e.reverse;return e===iv||nv(iv,e)&&t===iv.reverse?rv:t},av=i(ov),sv=O,uv=$n,lv=TypeError,cv=Object.getOwnPropertyDescriptor,dv=sv&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),fv=Ne,hv=TypeError,vv=function(e,t){if(!delete e[t])throw hv("Cannot delete property "+fv(t)+" of "+fv(e))},pv=Nn,mv=Ge,gv=ri,yv=Hn,xv=Yn,bv=dv?function(e,t){if(uv(e)&&!cv(e,"length").writable)throw lv("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Av=Kn,wv=Rr,Ev=Jn,_v=vv,Cv=Pr("splice"),jv=Math.max,Sv=Math.min;pv({target:"Array",proto:!0,forced:!Cv},{splice:function(e,t){var n,r,i,o,a,s,u=mv(this),l=xv(u),c=gv(e,l),d=arguments.length;for(0===d?n=r=0:1===d?(n=0,r=l-c):(n=d-2,r=Sv(jv(yv(t),0),l-c)),Av(l+n-r),i=wv(u,r),o=0;o<r;o++)(a=c+o)in u&&Ev(i,o,u[a]);if(i.length=r,n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:_v(u,s);for(o=l;o>l-r+n;o--)_v(u,o-1)}else if(n>r)for(o=l-r;o>c;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:_v(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return bv(u,l-r+n),i}});var kv=zc("Array").splice,Nv=ce,Tv=kv,Rv=Array.prototype,Ov=i((function(e){var t=e.splice;return e===Rv||Nv(Rv,e)&&t===Rv.splice?Tv:t})),Iv=O,Mv=x,Pv=P,Lv=u,Dv=xi,zv=ao,$v=L,Fv=Ge,Uv=W,Bv=Object.assign,Hv=Object.defineProperty,qv=Mv([].concat),Vv=!Bv||Lv((function(){if(Iv&&1!==Bv({b:1},Bv(Hv({},"a",{enumerable:!0,get:function(){Hv(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=Bv({},e)[n]||Dv(Bv({},t)).join("")!=r}))?function(e,t){for(var n=Fv(e),r=arguments.length,i=1,o=zv.f,a=$v.f;r>i;)for(var s,u=Uv(arguments[i++]),l=o?qv(Dv(u),o(u)):Dv(u),c=l.length,d=0;c>d;)s=l[d++],Iv&&!Pv(a,u,s)||(n[s]=u[s]);return n}:Bv,Yv=Vv;Nn({target:"Object",stat:!0,arity:2,forced:Object.assign!==Yv},{assign:Yv});var Wv=i(ie.Object.assign),Kv=Ge,Xv=Nu,Gv=Au;Nn({target:"Object",stat:!0,forced:u((function(){Xv(1)})),sham:!Gv},{getPrototypeOf:function(e){return Xv(Kv(e))}});var Qv=ie.Object.getPrototypeOf;Nn({target:"Object",stat:!0,sham:!O},{create:qi});var Jv=ie.Object,Zv=function(e,t){return Jv.create(e,t)},ep=i(Zv),tp=ie,np=v;tp.JSON||(tp.JSON={stringify:JSON.stringify});var rp=i((function(e,t,n){return np(tp.JSON.stringify,null,arguments)})),ip="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,op=TypeError,ap=function(e,t){if(e<t)throw op("Not enough arguments");return e},sp=s,up=v,lp=T,cp=ip,dp=de,fp=Ns,hp=ap,vp=sp.Function,pp=/MSIE .\./.test(dp)||cp&&function(){var e=sp.Bun.version.split(".");return e.length<3||0==e[0]&&(e[1]<3||3==e[1]&&0==e[2])}(),mp=function(e,t){var n=t?2:1;return pp?function(r,i){var o=hp(arguments.length,1)>n,a=lp(r)?r:vp(r),s=o?fp(arguments,n):[],u=o?function(){up(a,this,s)}:a;return t?e(u,i):e(u)}:e},gp=Nn,yp=s,xp=mp(yp.setInterval,!0);gp({global:!0,bind:!0,forced:yp.setInterval!==xp},{setInterval:xp});var bp=Nn,Ap=s,wp=mp(Ap.setTimeout,!0);bp({global:!0,bind:!0,forced:Ap.setTimeout!==wp},{setTimeout:wp});var Ep=i(ie.setTimeout),_p={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}(_p);var Cp,jp=i(_p.exports);function Sp(){return Sp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sp.apply(this,arguments)}function kp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Np(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Cp="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}:Object.assign;var Tp,Rp=Cp,Op=["","webkit","Moz","MS","ms","o"],Ip="undefined"==typeof document?{style:{}}:document.createElement("div"),Mp=Math.round,Pp=Math.abs,Lp=Date.now;function Dp(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),o=0;o<Op.length;){if((r=(n=Op[o])?n+i:t)in e)return r;o++}}Tp="undefined"==typeof window?{}:window;var zp=Dp(Ip.style,"touchAction"),$p=void 0!==zp,Fp="compute",Up="auto",Bp="manipulation",Hp="none",qp="pan-x",Vp="pan-y",Yp=function(){if(!$p)return!1;var e={},t=Tp.CSS&&Tp.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){return e[n]=!t||Tp.CSS.supports("touch-action",n)})),e}(),Wp="ontouchstart"in Tp,Kp=void 0!==Dp(Tp,"PointerEvent"),Xp=Wp&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Gp="touch",Qp="mouse",Jp=25,Zp=1,em=4,tm=8,nm=1,rm=2,im=4,om=8,am=16,sm=rm|im,um=om|am,lm=sm|um,cm=["x","y"],dm=["clientX","clientY"];function fm(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function hm(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function vm(e,t){return e.indexOf(t)>-1}var pm=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===Fp&&(e=this.compute()),$p&&this.manager.element.style&&Yp[e]&&(this.manager.element.style[zp]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return fm(this.manager.recognizers,(function(t){hm(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(vm(e,Hp))return Hp;var t=vm(e,qp),n=vm(e,Vp);return t&&n?Hp:t||n?t?qp:Vp:vm(e,Bp)?Bp:Up}(e.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=vm(r,Hp)&&!Yp[Hp],o=vm(r,Vp)&&!Yp[Vp],a=vm(r,qp)&&!Yp[qp];if(i){var s=1===e.pointers.length,u=e.distance<2,l=e.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return i||o&&n&sm||a&&n&um?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function mm(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function gm(e){var t=e.length;if(1===t)return{x:Mp(e[0].clientX),y:Mp(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:Mp(n/t),y:Mp(r/t)}}function ym(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:Mp(e.pointers[n].clientX),clientY:Mp(e.pointers[n].clientY)},n++;return{timeStamp:Lp(),pointers:t,center:gm(t),deltaX:e.deltaX,deltaY:e.deltaY}}function xm(e,t,n){n||(n=cm);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function bm(e,t,n){n||(n=cm);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}function Am(e,t){return e===t?nm:Pp(e)>=Pp(t)?e<0?rm:im:t<0?om:am}function wm(e,t,n){return{x:t/e||0,y:n/e||0}}function Em(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,o=t&Zp&&r-i==0,a=t&(em|tm)&&r-i==0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||(n.firstInput=ym(t)),i>1&&!n.firstMultiple?n.firstMultiple=ym(t):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=t.center=gm(r);t.timeStamp=Lp(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=bm(s,u),t.distance=xm(s,u),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};t.eventType!==Zp&&o.eventType!==em||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=Am(t.deltaX,t.deltaY);var l,c,d=wm(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=Pp(d.x)>Pp(d.y)?d.x:d.y,t.scale=a?(l=a.pointers,xm((c=r)[0],c[1],dm)/xm(l[0],l[1],dm)):1,t.rotation=a?function(e,t){return bm(t[1],t[0],dm)+bm(e[1],e[0],dm)}(a.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,o,a=e.lastInterval||t,s=t.timeStamp-a.timeStamp;if(t.eventType!==tm&&(s>Jp||void 0===a.velocity)){var u=t.deltaX-a.deltaX,l=t.deltaY-a.deltaY,c=wm(s,u,l);r=c.x,i=c.y,n=Pp(c.x)>Pp(c.y)?c.x:c.y,o=Am(u,l),e.lastInterval=t}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=o}(n,t);var f,h=e.element,v=t.srcEvent;mm(f=v.composedPath?v.composedPath()[0]:v.path?v.path[0]:v.target,h)&&(h=f),t.target=h}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function _m(e){return e.trim().split(/\s+/g)}function Cm(e,t,n){fm(_m(t),(function(t){e.addEventListener(t,n,!1)}))}function jm(e,t,n){fm(_m(t),(function(t){e.removeEventListener(t,n,!1)}))}function Sm(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var km=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){hm(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Cm(this.element,this.evEl,this.domHandler),this.evTarget&&Cm(this.target,this.evTarget,this.domHandler),this.evWin&&Cm(Sm(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&jm(this.element,this.evEl,this.domHandler),this.evTarget&&jm(this.target,this.evTarget,this.domHandler),this.evWin&&jm(Sm(this.element),this.evWin,this.domHandler)},e}();function Nm(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var Tm={pointerdown:Zp,pointermove:2,pointerup:em,pointercancel:tm,pointerout:tm},Rm={2:Gp,3:"pen",4:Qp,5:"kinect"},Om="pointerdown",Im="pointermove pointerup pointercancel";Tp.MSPointerEvent&&!Tp.PointerEvent&&(Om="MSPointerDown",Im="MSPointerMove MSPointerUp MSPointerCancel");var Mm=function(e){function t(){var n,r=t.prototype;return r.evEl=Om,r.evWin=Im,(n=e.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return kp(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Tm[r],o=Rm[e.pointerType]||e.pointerType,a=o===Gp,s=Nm(t,e.pointerId,"pointerId");i&Zp&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):i&(em|tm)&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))},t}(km);function Pm(e){return Array.prototype.slice.call(e,0)}function Lm(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];Nm(i,a)<0&&r.push(e[o]),i[o]=a,o++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}var Dm={touchstart:Zp,touchmove:2,touchend:em,touchcancel:tm},zm=function(e){function t(){var n;return t.prototype.evTarget="touchstart touchmove touchend touchcancel",(n=e.apply(this,arguments)||this).targetIds={},n}return kp(t,e),t.prototype.handler=function(e){var t=Dm[e.type],n=$m.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Gp,srcEvent:e})},t}(km);function $m(e,t){var n,r,i=Pm(e.touches),o=this.targetIds;if(t&(2|Zp)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var a=Pm(e.changedTouches),s=[],u=this.target;if(r=i.filter((function(e){return mm(e.target,u)})),t===Zp)for(n=0;n<r.length;)o[r[n].identifier]=!0,n++;for(n=0;n<a.length;)o[a[n].identifier]&&s.push(a[n]),t&(em|tm)&&delete o[a[n].identifier],n++;return s.length?[Lm(r.concat(s),"identifier",!0),s]:void 0}var Fm={mousedown:Zp,mousemove:2,mouseup:em},Um=function(e){function t(){var n,r=t.prototype;return r.evEl="mousedown",r.evWin="mousemove mouseup",(n=e.apply(this,arguments)||this).pressed=!1,n}return kp(t,e),t.prototype.handler=function(e){var t=Fm[e.type];t&Zp&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=em),this.pressed&&(t&em&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Qp,srcEvent:e}))},t}(km),Bm=2500;function Hm(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),Bm)}}function qm(e,t){e&Zp?(this.primaryTouch=t.changedPointers[0].identifier,Hm.call(this,t)):e&(em|tm)&&Hm.call(this,t)}function Vm(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}var Ym=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handler=function(e,t,n){var i=n.pointerType===Gp,o=n.pointerType===Qp;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)qm.call(Np(Np(r)),t,n);else if(o&&Vm.call(Np(Np(r)),n))return;r.callback(e,t,n)}},r.touch=new zm(r.manager,r.handler),r.mouse=new Um(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}return kp(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(km);function Wm(e,t,n){return!!Array.isArray(e)&&(fm(e,n[t],n),!0)}var Km=32,Xm=1;function Gm(e,t){var n=t.manager;return n?n.get(e):e}function Qm(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}var Jm=function(){function e(e){void 0===e&&(e={}),this.options=Sp({enable:!0},e),this.id=Xm++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Rp(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(Wm(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Gm(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return Wm(e,"dropRecognizeWith",this)||(e=Gm(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(Wm(e,"requireFailure",this))return this;var t=this.requireFail;return-1===Nm(t,e=Gm(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Wm(e,"dropRequireFailure",this))return this;e=Gm(e,this);var t=Nm(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+Qm(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+Qm(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Km},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){var t=Rp({},e);if(!hm(this.options.enable,[this,t]))return this.reset(),void(this.state=Km);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),Zm=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,Sp({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}kp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Bp]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,o=e.deltaTime<n.time;if(this.reset(),e.eventType&Zp&&0===this.count)return this.failTimeout();if(i&&o&&r){if(e.eventType!==em)return this.failTimeout();var a=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||xm(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&a?this.count+=1:this.count=1,this._input=e,0==this.count%n.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.interval),2):8}return Km},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=Km}),this.options.interval),Km},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(Jm),eg=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Sp({pointers:1},t))||this}kp(t,e);var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(n&tm||!i)?16|t:r||i?n&em?8|t:2&t?4|t:2:Km},t}(Jm);function tg(e){return e===am?"down":e===om?"up":e===rm?"left":e===im?"right":""}var ng=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,Sp({event:"pan",threshold:10,pointers:1,direction:lm},t))||this).pX=null,n.pY=null,n}kp(t,e);var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&sm&&t.push(Vp),e&um&&t.push(qp),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;return i&t.direction||(t.direction&sm?(i=0===o?nm:o<0?rm:im,n=o!==this.pX,r=Math.abs(e.deltaX)):(i=0===a?nm:a<0?om:am,n=a!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return eg.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=tg(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(eg),rg=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Sp({event:"swipe",threshold:10,velocity:.3,direction:sm|um,pointers:1},t))||this}kp(t,e);var n=t.prototype;return n.getTouchAction=function(){return ng.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n,r=this.options.direction;return r&(sm|um)?n=t.overallVelocity:r&sm?n=t.overallVelocityX:r&um&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Pp(n)>this.options.velocity&&t.eventType&em},n.emit=function(e){var t=tg(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(eg),ig=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Sp({event:"pinch",threshold:0,pointers:2},t))||this}kp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Hp]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},n.emit=function(t){if(1!==t.scale){var n=t.scale<1?"in":"out";t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(eg),og=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Sp({event:"rotate",threshold:0,pointers:2},t))||this}kp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Hp]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(eg),ag=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,Sp({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}kp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Up]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,o=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(em|tm)&&!o)this.reset();else if(e.eventType&Zp)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.time);else if(e.eventType&em)return 8;return Km},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){8===this.state&&(e&&e.eventType&em?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=Lp(),this.manager.emit(this.options.event,this._input)))},t}(Jm),sg={domEvents:!1,touchAction:Fp,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},ug=[[og,{enable:!1}],[ig,{enable:!1},["rotate"]],[rg,{direction:sm}],[ng,{direction:sm},["swipe"]],[Zm],[Zm,{event:"doubletap",taps:2},["tap"]],[ag]];function lg(e,t){var n,r=e.element;r.style&&(fm(e.options.cssProps,(function(i,o){n=Dp(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}var cg=function(){function e(e,t){var n=this;this.options=Rp({},sg,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new(this.options.inputClass||(Kp?Mm:Xp?zm:Wp?Ym:Um))(this,Em),this.touchAction=new pm(this,this.options.touchAction),lg(this,!0),fm(this.options.recognizers,(function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return Rp(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(t.curRecognizer=null,i=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!==i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(t.curRecognizer=n,i=n),o++}},t.get=function(e){if(e instanceof Jm)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(Wm(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(Wm(e,"remove",this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Nm(n,t);-1!==r&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(void 0===e||void 0===t)return this;var n=this.handlers;return fm(_m(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this},t.off=function(e,t){if(void 0===e)return this;var n=this.handlers;return fm(_m(e),(function(e){t?n[e]&&n[e].splice(Nm(n[e],t),1):delete n[e]})),this},t.emit=function(e,t){this.options.domEvents&&function(e,t){var n=document.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&lg(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),dg={touchstart:Zp,touchmove:2,touchend:em,touchcancel:tm},fg=function(e){function t(){var n,r=t.prototype;return r.evTarget="touchstart",r.evWin="touchstart touchmove touchend touchcancel",(n=e.apply(this,arguments)||this).started=!1,n}return kp(t,e),t.prototype.handler=function(e){var t=dg[e.type];if(t===Zp&&(this.started=!0),this.started){var n=hg.call(this,e,t);t&(em|tm)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Gp,srcEvent:e})}},t}(km);function hg(e,t){var n=Pm(e.touches),r=Pm(e.changedTouches);return t&(em|tm)&&(n=Lm(n.concat(r),"identifier",!0)),[n,r]}function vg(e,t,n){var r="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var pg=vg((function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&void 0===e[r[i]])&&(e[r[i]]=t[r[i]]),i++;return e}),"extend","Use `assign`."),mg=vg((function(e,t){return pg(e,t,!0)}),"merge","Use `assign`.");function gg(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&Rp(r,n)}function yg(e,t){return function(){return e.apply(t,arguments)}}var xg=function(){var e=function(e,t){return void 0===t&&(t={}),new cg(e,Sp({recognizers:ug.concat()},t))};return e.VERSION="2.0.17-rc",e.DIRECTION_ALL=lm,e.DIRECTION_DOWN=am,e.DIRECTION_LEFT=rm,e.DIRECTION_RIGHT=im,e.DIRECTION_UP=om,e.DIRECTION_HORIZONTAL=sm,e.DIRECTION_VERTICAL=um,e.DIRECTION_NONE=nm,e.DIRECTION_DOWN=am,e.INPUT_START=Zp,e.INPUT_MOVE=2,e.INPUT_END=em,e.INPUT_CANCEL=tm,e.STATE_POSSIBLE=1,e.STATE_BEGAN=2,e.STATE_CHANGED=4,e.STATE_ENDED=8,e.STATE_RECOGNIZED=8,e.STATE_CANCELLED=16,e.STATE_FAILED=Km,e.Manager=cg,e.Input=km,e.TouchAction=pm,e.TouchInput=zm,e.MouseInput=Um,e.PointerEventInput=Mm,e.TouchMouseInput=Ym,e.SingleTouchInput=fg,e.Recognizer=Jm,e.AttrRecognizer=eg,e.Tap=Zm,e.Pan=ng,e.Swipe=rg,e.Pinch=ig,e.Rotate=og,e.Press=ag,e.on=Cm,e.off=jm,e.each=fm,e.merge=mg,e.extend=pg,e.bindFn=yg,e.assign=Rp,e.inherit=gg,e.bindFn=yg,e.prefixed=Dp,e.toArray=Pm,e.inArray=Nm,e.uniqueArray=Lm,e.splitStr=_m,e.boolOrFn=hm,e.hasParent=mm,e.addEventListeners=Cm,e.removeEventListeners=jm,e.defaults=Rp({},sg,{preset:ug}),e}();function bg(e,t){var n=void 0!==kh&&_f(e)||e["@@iterator"];if(!n){if(Lh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return Ag(e,t);var r=Mh(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ag(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ag(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var wg=kh("DELETE");function Eg(){var e=_g.apply(void 0,arguments);return jg(e),e}function _g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length<2)return t[0];var r;if(t.length>2)return _g.apply(void 0,Ih(r=[Eg(t[0],t[1])]).call(r,Sh(Mh(t).call(t,2))));var i,o=t[0],a=t[1],s=bg(Ph(a));try{for(s.s();!(i=s.n()).done;){var u=i.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===wg?delete o[u]:null===o[u]||null===a[u]||"object"!==xc(o[u])||"object"!==xc(a[u])||Lh(o[u])||Lh(a[u])?o[u]=Cg(a[u]):o[u]=_g(o[u],a[u]))}}catch(e){s.e(e)}finally{s.f()}return o}function Cg(e){return Lh(e)?yd(e).call(e,(function(e){return Cg(e)})):"object"===xc(e)&&null!==e?_g({},e):e}function jg(e){for(var t=0,n=$h(e);t<n.length;t++){var r=n[t];e[r]===wg?delete e[r]:"object"===xc(e[r])&&null!==e[r]&&jg(e[r])}}var Sg="undefined"!=typeof window?window.Hammer||xg:function(){return function(){var e=function(){};return{on:e,off:e,destroy:e,emit:e,get:function(){return{set:e}}}}()};function kg(e){var t,n=this;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push((function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)}));var r=Sg(this._dom.overlay);r.on("tap",qc(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push((function(){r.destroy()}));var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Gh(i).call(i,(function(e){r.on(e,(function(e){e.srcEvent.stopPropagation()}))})),document&&document.body&&(this._onClick=function(t){(function(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1})(t.target,e)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push((function(){document.body.removeEventListener("click",n._onClick)}))),this._escListener=function(e){("key"in e?"Escape"===e.key:27===e.keyCode)&&n.deactivate()}}jp(kg.prototype),kg.current=null,kg.prototype.destroy=function(){var e,t;this.deactivate();var n,r=bg(av(e=Ov(t=this._cleanupQueue).call(t,0)).call(e));try{for(r.s();!(n=r.n()).done;)(0,n.value)()}catch(e){r.e(e)}finally{r.f()}},kg.prototype.activate=function(){kg.current&&kg.current.deactivate(),kg.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},kg.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},kg.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};var Ng=Cr,Tg=Ne,Rg=TypeError,Og=function(e){if(Ng(e))return e;throw Rg(Tg(e)+" is not a constructor")},Ig=Nn,Mg=v,Pg=Pc,Lg=Og,Dg=nn,zg=re,$g=qi,Fg=u,Ug=le("Reflect","construct"),Bg=Object.prototype,Hg=[].push,qg=Fg((function(){function e(){}return!(Ug((function(){}),[],e)instanceof e)})),Vg=!Fg((function(){Ug((function(){}))})),Yg=qg||Vg;Ig({target:"Reflect",stat:!0,forced:Yg,sham:Yg},{construct:function(e,t){Lg(e),Dg(t);var n=arguments.length<3?e:Lg(arguments[2]);if(Vg&&!qg)return Ug(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return Mg(Hg,r,t),new(Mg(Pg,e,r))}var i=n.prototype,o=$g(zg(i)?i:Bg),a=Mg(e,o,t);return zg(a)?a:o}});var Wg=i(ie.Reflect.construct);function Kg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Xg=Zv,Gg=i(Xg);Nn({target:"Object",stat:!0},{setPrototypeOf:Ju});var Qg=ie.Object.setPrototypeOf,Jg=i(Qg),Zg=i(Hc);function ey(e,t){var n;return ey=Jg?Zg(n=Jg).call(n):function(e,t){return e.__proto__=t,e},ey(e,t)}function ty(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Gg(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Dn(e,"prototype",{writable:!1}),t&&ey(e,t)}function ny(e,t){if(t&&("object"===xc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Kg(e)}var ry=Qv,iy=i(ry);function oy(e){var t;return oy=Jg?Zg(t=iy).call(t):function(e){return e.__proto__||iy(e)},oy(e)}var ay={exports:{}},sy={exports:{}};!function(e){var t=Jl,n=gc;function r(i){return e.exports=r="function"==typeof t&&"symbol"==typeof n?function(e){return typeof e}:function(e){return e&&"function"==typeof t&&e.constructor===t&&e!==t.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(sy);var uy=sy.exports,ly=Xh,cy=Ze,dy=Ff,fy=R,hy=Qt,vy=re,py=gn,my=Error,gy=x("".replace),yy=String(my("zxcasd").stack),xy=/\n\s*at [^:]*:[^\n]*/,by=xy.test(yy),Ay=B,wy=!u((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ay(1,7)),7!==e.stack)})),Ey=gn,_y=wy,Cy=Error.captureStackTrace,jy=Gt,Sy=P,ky=nn,Ny=Ne,Ty=Vd,Ry=Yn,Oy=ce,Iy=of,My=Qd,Py=$d,Ly=TypeError,Dy=function(e,t){this.stopped=e,this.result=t},zy=Dy.prototype,$y=function(e,t,n){var r,i,o,a,s,u,l,c=n&&n.that,d=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),v=!(!n||!n.INTERRUPTED),p=jy(t,c),m=function(e){return r&&Py(r,"normal",e),new Dy(!0,e)},g=function(e){return d?(ky(e),v?p(e[0],e[1],m):p(e[0],e[1])):v?p(e,m):p(e)};if(f)r=e.iterator;else if(h)r=e;else{if(!(i=My(e)))throw Ly(Ny(e)+" is not iterable");if(Ty(i)){for(o=0,a=Ry(e);a>o;o++)if((s=g(e[o]))&&Oy(zy,s))return s;return new Dy(!1)}r=Iy(e,i)}for(u=f?e.next:r.next;!(l=Sy(u,r)).done;){try{s=g(l.value)}catch(e){Py(r,"throw",e)}if("object"==typeof s&&s&&Oy(zy,s))return s}return new Dy(!1)},Fy=Jr,Uy=Nn,By=ce,Hy=Nu,qy=Ju,Vy=qi,Yy=gn,Wy=B,Ky=function(e,t,n,r){_y&&(Cy?Cy(e,t):Ey(e,"stack",function(e,t){if(by&&"string"==typeof e&&!my.prepareStackTrace)for(;t--;)e=gy(e,xy,"");return e}(n,r)))},Xy=$y,Gy=ht("toStringTag"),Qy=Error,Jy=[].push,Zy=function(e,t){var n,r=By(ex,this);qy?n=qy(Qy(),r?Hy(this):ex):(n=r?this:Vy(ex),Yy(n,Gy,"Error")),void 0!==t&&Yy(n,"message",function(e,t){return void 0===e?arguments.length<2?"":t:Fy(e)}(t)),Ky(n,Zy,n.stack,1),arguments.length>2&&function(e,t){vy(t)&&"cause"in t&&py(e,"cause",t.cause)}(n,arguments[2]);var i=[];return Xy(e,Jy,{that:i}),Yy(n,"errors",i),n};qy?qy(Zy,Qy):function(e,t,n){for(var r=dy(t),i=hy.f,o=fy.f,a=0;a<r.length;a++){var s=r[a];cy(e,s)||n&&cy(n,s)||i(e,s,o(t,s))}}(Zy,Qy,{name:!0});var ex=Zy.prototype=Vy(Qy.prototype,{constructor:Wy(1,Zy),message:Wy(1,""),name:Wy(1,"AggregateError")});Uy({global:!0,constructor:!0,arity:2},{AggregateError:Zy});var tx,nx,rx,ix,ox=le,ax=co,sx=O,ux=ht("species"),lx=function(e){var t=ox(e);sx&&t&&!t[ux]&&ax(t,ux,{configurable:!0,get:function(){return this}})},cx=ce,dx=TypeError,fx=function(e,t){if(cx(t,e))return e;throw dx("Incorrect invocation")},hx=nn,vx=Og,px=K,mx=ht("species"),gx=function(e,t){var n,r=hx(e).constructor;return void 0===r||px(n=hx(r)[mx])?t:vx(n)},yx=/(?:ipad|iphone|ipod).*applewebkit/i.test(de),xx=s,bx=v,Ax=Gt,wx=T,Ex=Ze,_x=u,Cx=Si,jx=Ns,Sx=jt,kx=ap,Nx=yx,Tx=ed,Rx=xx.setImmediate,Ox=xx.clearImmediate,Ix=xx.process,Mx=xx.Dispatch,Px=xx.Function,Lx=xx.MessageChannel,Dx=xx.String,zx=0,$x={},Fx="onreadystatechange";_x((function(){tx=xx.location}));var Ux=function(e){if(Ex($x,e)){var t=$x[e];delete $x[e],t()}},Bx=function(e){return function(){Ux(e)}},Hx=function(e){Ux(e.data)},qx=function(e){xx.postMessage(Dx(e),tx.protocol+"//"+tx.host)};Rx&&Ox||(Rx=function(e){kx(arguments.length,1);var t=wx(e)?e:Px(e),n=jx(arguments,1);return $x[++zx]=function(){bx(t,void 0,n)},nx(zx),zx},Ox=function(e){delete $x[e]},Tx?nx=function(e){Ix.nextTick(Bx(e))}:Mx&&Mx.now?nx=function(e){Mx.now(Bx(e))}:Lx&&!Nx?(ix=(rx=new Lx).port2,rx.port1.onmessage=Hx,nx=Ax(ix.postMessage,ix)):xx.addEventListener&&wx(xx.postMessage)&&!xx.importScripts&&tx&&"file:"!==tx.protocol&&!_x(qx)?(nx=qx,xx.addEventListener("message",Hx,!1)):nx=Fx in Sx("script")?function(e){Cx.appendChild(Sx("script"))[Fx]=function(){Cx.removeChild(this),Ux(e)}}:function(e){setTimeout(Bx(e),0)});var Vx={set:Rx,clear:Ox},Yx=function(){this.head=null,this.tail=null};Yx.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Wx,Kx,Xx,Gx,Qx,Jx=Yx,Zx=/ipad|iphone|ipod/i.test(de)&&"undefined"!=typeof Pebble,eb=/web0s(?!.*chrome)/i.test(de),tb=s,nb=Gt,rb=R.f,ib=Vx.set,ob=Jx,ab=yx,sb=Zx,ub=eb,lb=ed,cb=tb.MutationObserver||tb.WebKitMutationObserver,db=tb.document,fb=tb.process,hb=tb.Promise,vb=rb(tb,"queueMicrotask"),pb=vb&&vb.value;if(!pb){var mb=new ob,gb=function(){var e,t;for(lb&&(e=fb.domain)&&e.exit();t=mb.get();)try{t()}catch(e){throw mb.head&&Wx(),e}e&&e.enter()};ab||lb||ub||!cb||!db?!sb&&hb&&hb.resolve?((Gx=hb.resolve(void 0)).constructor=hb,Qx=nb(Gx.then,Gx),Wx=function(){Qx(gb)}):lb?Wx=function(){fb.nextTick(gb)}:(ib=nb(ib,tb),Wx=function(){ib(gb)}):(Kx=!0,Xx=db.createTextNode(""),new cb(gb).observe(Xx,{characterData:!0}),Wx=function(){Xx.data=Kx=!Kx}),pb=function(e){mb.head||Wx(),mb.add(e)}}var yb=pb,xb=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},bb=s.Promise,Ab="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,wb=!Ab&&!ed&&"object"==typeof window&&"object"==typeof document,Eb=s,_b=bb,Cb=T,jb=Yt,Sb=dr,kb=ht,Nb=wb,Tb=Ab,Rb=ye,Ob=_b&&_b.prototype,Ib=kb("species"),Mb=!1,Pb=Cb(Eb.PromiseRejectionEvent),Lb=jb("Promise",(function(){var e=Sb(_b),t=e!==String(_b);if(!t&&66===Rb)return!0;if(!Ob.catch||!Ob.finally)return!0;if(!Rb||Rb<51||!/native code/.test(e)){var n=new _b((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Ib]=r,!(Mb=n.then((function(){}))instanceof r))return!0}return!t&&(Nb||Tb)&&!Pb})),Db={CONSTRUCTOR:Lb,REJECTION_EVENT:Pb,SUBCLASSING:Mb},zb={},$b=Ie,Fb=TypeError,Ub=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Fb("Bad Promise constructor");t=e,n=r})),this.resolve=$b(t),this.reject=$b(n)};zb.f=function(e){return new Ub(e)};var Bb,Hb,qb=Nn,Vb=ed,Yb=s,Wb=P,Kb=uo,Xb=Po,Gb=lx,Qb=Ie,Jb=T,Zb=re,eA=fx,tA=gx,nA=Vx.set,rA=yb,iA=xb,oA=Jx,aA=Qo,sA=bb,uA=zb,lA="Promise",cA=Db.CONSTRUCTOR,dA=Db.REJECTION_EVENT,fA=aA.getterFor(lA),hA=aA.set,vA=sA&&sA.prototype,pA=sA,mA=vA,gA=Yb.TypeError,yA=Yb.document,xA=Yb.process,bA=uA.f,AA=bA,wA=!!(yA&&yA.createEvent&&Yb.dispatchEvent),EA="unhandledrejection",_A=function(e){var t;return!(!Zb(e)||!Jb(t=e.then))&&t},CA=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&TA(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===e.promise?l(gA("Promise-chain cycle")):(r=_A(n))?Wb(r,n,u,l):u(n)):l(o)}catch(e){c&&!i&&c.exit(),l(e)}},jA=function(e,t){e.notified||(e.notified=!0,rA((function(){for(var n,r=e.reactions;n=r.get();)CA(n,e);e.notified=!1,t&&!e.rejection&&kA(e)})))},SA=function(e,t,n){var r,i;wA?((r=yA.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Yb.dispatchEvent(r)):r={promise:t,reason:n},!dA&&(i=Yb["on"+e])?i(r):e===EA&&function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",n)},kA=function(e){Wb(nA,Yb,(function(){var t,n=e.facade,r=e.value;if(NA(e)&&(t=iA((function(){Vb?xA.emit("unhandledRejection",r,n):SA(EA,n,r)})),e.rejection=Vb||NA(e)?2:1,t.error))throw t.value}))},NA=function(e){return 1!==e.rejection&&!e.parent},TA=function(e){Wb(nA,Yb,(function(){var t=e.facade;Vb?xA.emit("rejectionHandled",t):SA("rejectionhandled",t,e.value)}))},RA=function(e,t,n){return function(r){e(t,r,n)}},OA=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,jA(e,!0))},IA=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw gA("Promise can't be resolved itself");var r=_A(t);r?rA((function(){var n={done:!1};try{Wb(r,t,RA(IA,n,e),RA(OA,n,e))}catch(t){OA(n,t,e)}})):(e.value=t,e.state=1,jA(e,!1))}catch(t){OA({done:!1},t,e)}}};cA&&(mA=(pA=function(e){eA(this,mA),Qb(e),Wb(Bb,this);var t=fA(this);try{e(RA(IA,t),RA(OA,t))}catch(e){OA(t,e)}}).prototype,(Bb=function(e){hA(this,{type:lA,done:!1,notified:!1,parent:!1,reactions:new oA,rejection:!1,state:0,value:void 0})}).prototype=Kb(mA,"then",(function(e,t){var n=fA(this),r=bA(tA(this,pA));return n.parent=!0,r.ok=!Jb(e)||e,r.fail=Jb(t)&&t,r.domain=Vb?xA.domain:void 0,0==n.state?n.reactions.add(r):rA((function(){CA(r,n)})),r.promise})),Hb=function(){var e=new Bb,t=fA(e);this.promise=e,this.resolve=RA(IA,t),this.reject=RA(OA,t)},uA.f=bA=function(e){return e===pA||void 0===e?new Hb(e):AA(e)}),qb({global:!0,constructor:!0,wrap:!0,forced:cA},{Promise:pA}),Xb(pA,lA,!1,!0),Gb(lA);var MA=bb,PA=Db.CONSTRUCTOR||!Af((function(e){MA.all(e).then(void 0,(function(){}))})),LA=P,DA=Ie,zA=zb,$A=xb,FA=$y;Nn({target:"Promise",stat:!0,forced:PA},{all:function(e){var t=this,n=zA.f(t),r=n.resolve,i=n.reject,o=$A((function(){var n=DA(t.resolve),o=[],a=0,s=1;FA(e,(function(e){var u=a++,l=!1;s++,LA(n,t,e).then((function(e){l||(l=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var UA=Nn,BA=Db.CONSTRUCTOR;bb&&bb.prototype,UA({target:"Promise",proto:!0,forced:BA,real:!0},{catch:function(e){return this.then(void 0,e)}});var HA=P,qA=Ie,VA=zb,YA=xb,WA=$y;Nn({target:"Promise",stat:!0,forced:PA},{race:function(e){var t=this,n=VA.f(t),r=n.reject,i=YA((function(){var i=qA(t.resolve);WA(e,(function(e){HA(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var KA=P,XA=zb;Nn({target:"Promise",stat:!0,forced:Db.CONSTRUCTOR},{reject:function(e){var t=XA.f(this);return KA(t.reject,void 0,e),t.promise}});var GA=nn,QA=re,JA=zb,ZA=function(e,t){if(GA(e),QA(t)&&t.constructor===e)return t;var n=JA.f(e);return(0,n.resolve)(t),n.promise},ew=Nn,tw=bb,nw=Db.CONSTRUCTOR,rw=ZA,iw=le("Promise"),ow=!nw;ew({target:"Promise",stat:!0,forced:!0},{resolve:function(e){return rw(ow&&this===iw?tw:this,e)}});var aw=P,sw=Ie,uw=zb,lw=xb,cw=$y;Nn({target:"Promise",stat:!0,forced:PA},{allSettled:function(e){var t=this,n=uw.f(t),r=n.resolve,i=n.reject,o=lw((function(){var n=sw(t.resolve),i=[],o=0,a=1;cw(e,(function(e){var s=o++,u=!1;a++,aw(n,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--a||r(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var dw=P,fw=Ie,hw=le,vw=zb,pw=xb,mw=$y,gw="No one promise resolved";Nn({target:"Promise",stat:!0,forced:PA},{any:function(e){var t=this,n=hw("AggregateError"),r=vw.f(t),i=r.resolve,o=r.reject,a=pw((function(){var r=fw(t.resolve),a=[],s=0,u=1,l=!1;mw(e,(function(e){var c=s++,d=!1;u++,dw(r,t,e).then((function(e){d||l||(l=!0,i(e))}),(function(e){d||l||(d=!0,a[c]=e,--u||o(new n(a,gw)))}))})),--u||o(new n(a,gw))}));return a.error&&o(a.value),r.promise}});var yw=Nn,xw=bb,bw=u,Aw=le,ww=T,Ew=gx,_w=ZA,Cw=xw&&xw.prototype;yw({target:"Promise",proto:!0,real:!0,forced:!!xw&&bw((function(){Cw.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Ew(this,Aw("Promise")),n=ww(e);return this.then(n?function(n){return _w(t,e()).then((function(){return n}))}:e,n?function(n){return _w(t,e()).then((function(){throw n}))}:e)}});var jw=ie.Promise,Sw=zb,kw=xb;Nn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Sw.f(this),n=kw(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Nw=jw,Tw=ov;!function(e){var t=uy.default,n=Ln,r=Jl,i=Xg,o=ry,a=ly,s=Qg,u=Nw,l=Tw,c=Ah;function d(){e.exports=d=function(){return f},e.exports.__esModule=!0,e.exports.default=e.exports;var f={},h=Object.prototype,v=h.hasOwnProperty,p=n||function(e,t,n){e[t]=n.value},m="function"==typeof r?r:{},g=m.iterator||"@@iterator",y=m.asyncIterator||"@@asyncIterator",x=m.toStringTag||"@@toStringTag";function b(e,t,r){return n(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{b({},"")}catch(e){b=function(e,t,n){return e[t]=n}}function A(e,t,n,r){var o=t&&t.prototype instanceof _?t:_,a=i(o.prototype),s=new L(r||[]);return p(a,"_invoke",{value:O(e,n,s)}),a}function w(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}f.wrap=A;var E={};function _(){}function C(){}function j(){}var S={};b(S,g,(function(){return this}));var k=o&&o(o(D([])));k&&k!==h&&v.call(k,g)&&(S=k);var N=j.prototype=_.prototype=i(S);function T(e){var t;a(t=["next","throw","return"]).call(t,(function(t){b(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,n){function r(i,o,a,s){var u=w(e[i],e,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==t(c)&&v.call(c,"__await")?n.resolve(c.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):n.resolve(c).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;p(this,"_invoke",{value:function(e,t){function o(){return new n((function(n,i){r(e,t,n,i)}))}return i=i?i.then(o,o):o()}})}function O(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=I(a,n);if(s){if(s===E)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=w(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===E)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function I(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,I(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),E;var i=w(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,E;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,E):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,E)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],a(e).call(e,M,this),this.reset(!0)}function D(e){if(e){var t=e[g];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(v.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:z}}function z(){return{value:void 0,done:!0}}return C.prototype=j,p(N,"constructor",{value:j,configurable:!0}),p(j,"constructor",{value:C,configurable:!0}),C.displayName=b(j,x,"GeneratorFunction"),f.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===C||"GeneratorFunction"===(t.displayName||t.name))},f.mark=function(e){return s?s(e,j):(e.__proto__=j,b(e,x,"GeneratorFunction")),e.prototype=i(N),e},f.awrap=function(e){return{__await:e}},T(R.prototype),b(R.prototype,y,(function(){return this})),f.AsyncIterator=R,f.async=function(e,t,n,r,i){void 0===i&&(i=u);var o=new R(A(e,t,n,r),i);return f.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},T(N),b(N,x,"Generator"),b(N,g,(function(){return this})),b(N,"toString",(function(){return"[object Generator]"})),f.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return l(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},f.values=D,L.prototype={constructor:L,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,a(t=this.tryEntries).call(t,P),!e)for(var n in this)"t"===n.charAt(0)&&v.call(this,n)&&!isNaN(+c(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=v.call(i,"catchLoc"),s=v.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&v.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,E):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:D(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),E}},f}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports}(ay);var Rw=(0,ay.exports)(),Ow=Rw;try{regeneratorRuntime=Rw}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=Rw:Function("r","regeneratorRuntime = r")(Rw)}var Iw=i(Ow),Mw={exports:{}},Pw=u((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Lw=u,Dw=re,zw=E,$w=Pw,Fw=Object.isExtensible,Uw=Lw((function(){Fw(1)}))||$w?function(e){return!!Dw(e)&&(!$w||"ArrayBuffer"!=zw(e))&&(!Fw||Fw(e))}:Fw,Bw=!u((function(){return Object.isExtensible(Object.preventExtensions({}))})),Hw=Nn,qw=x,Vw=li,Yw=re,Ww=Ze,Kw=Qt.f,Xw=Vi,Gw=Ki,Qw=Uw,Jw=Bw,Zw=!1,eE=it("meta"),tE=0,nE=function(e){Kw(e,eE,{value:{objectID:"O"+tE++,weakData:{}}})},rE=Mw.exports={enable:function(){rE.enable=function(){},Zw=!0;var e=Xw.f,t=qw([].splice),n={};n[eE]=1,e(n).length&&(Xw.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===eE){t(r,i,1);break}return r},Hw({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Gw.f}))},fastKey:function(e,t){if(!Yw(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Ww(e,eE)){if(!Qw(e))return"F";if(!t)return"E";nE(e)}return e[eE].objectID},getWeakData:function(e,t){if(!Ww(e,eE)){if(!Qw(e))return!0;if(!t)return!1;nE(e)}return e[eE].weakData},onFreeze:function(e){return Jw&&Zw&&Qw(e)&&!Ww(e,eE)&&nE(e),e}};Vw[eE]=!0;var iE=Mw.exports,oE=Nn,aE=s,sE=iE,uE=u,lE=gn,cE=$y,dE=fx,fE=T,hE=re,vE=Po,pE=Qt.f,mE=oa.forEach,gE=O,yE=Qo.set,xE=Qo.getterFor,bE=function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=aE[e],u=s&&s.prototype,l={};if(gE&&fE(s)&&(o||u.forEach&&!uE((function(){(new s).entries().next()})))){var c=(r=t((function(t,n){yE(dE(t,c),{type:e,collection:new s}),null!=n&&cE(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,d=xE(e);mE(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||lE(c,e,(function(n,r){var i=d(this).collection;if(!t&&o&&!hE(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||pE(c,"size",{configurable:!0,get:function(){return d(this).collection.size}})}else r=n.getConstructor(t,e,i,a),sE.enable();return vE(r,e,!1,!0),l[e]=r,oE({global:!0,forced:!0},l),o||n.setStrong(r,e,i),r},AE=uo,wE=qi,EE=co,_E=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:AE(e,r,t[r],n);return e},CE=Gt,jE=fx,SE=K,kE=$y,NE=fl,TE=hl,RE=lx,OE=O,IE=iE.fastKey,ME=Qo.set,PE=Qo.getterFor,LE={getConstructor:function(e,t,n,r){var i=e((function(e,i){jE(e,o),ME(e,{type:t,index:wE(null),first:void 0,last:void 0,size:0}),OE||(e.size=0),SE(i)||kE(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=PE(t),s=function(e,t,n){var r,i,o=a(e),s=u(e,t);return s?s.value=n:(o.last=s={index:i=IE(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),OE?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var n,r=a(e),i=IE(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return _E(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,OE?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=u(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),OE?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=CE(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),_E(o,n?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),OE&&EE(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=PE(t),o=PE(r);NE(e,t,(function(e,t){ME(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?TE("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,TE(void 0,!0))}),n?"entries":"values",!n,!0),RE(t)}};bE("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),LE);var DE=i(ie.Map),zE=oa.some;Nn({target:"Array",proto:!0,forced:!Zc("some")},{some:function(e){return zE(this,e,arguments.length>1?arguments[1]:void 0)}});var $E=zc("Array").some,FE=ce,UE=$E,BE=Array.prototype,HE=i((function(e){var t=e.some;return e===BE||FE(BE,e)&&t===BE.some?UE:t})),qE=zc("Array").keys,VE=sr,YE=Ze,WE=ce,KE=qE,XE=Array.prototype,GE={DOMTokenList:!0,NodeList:!0},QE=i((function(e){var t=e.keys;return e===XE||WE(XE,e)&&t===XE.keys||YE(GE,VE(e))?KE:t})),JE=eo,ZE=Math.floor,e_=function(e,t){var n=e.length,r=ZE(n/2);return n<8?t_(e,t):n_(e,e_(JE(e,0,r),t),e_(JE(e,r),t),t)},t_=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},n_=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},r_=e_,i_=de.match(/firefox\/(\d+)/i),o_=!!i_&&+i_[1],a_=/MSIE|Trident/.test(de),s_=de.match(/AppleWebKit\/(\d+)\./),u_=!!s_&&+s_[1],l_=Nn,c_=x,d_=Ie,f_=Ge,h_=Yn,v_=vv,p_=Jr,m_=u,g_=r_,y_=Zc,x_=o_,b_=a_,A_=ye,w_=u_,E_=[],__=c_(E_.sort),C_=c_(E_.push),j_=m_((function(){E_.sort(void 0)})),S_=m_((function(){E_.sort(null)})),k_=y_("sort"),N_=!m_((function(){if(A_)return A_<70;if(!(x_&&x_>3)){if(b_)return!0;if(w_)return w_<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)E_.push({k:t+r,v:n})}for(E_.sort((function(e,t){return t.v-e.v})),r=0;r<E_.length;r++)t=E_[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));l_({target:"Array",proto:!0,forced:j_||!S_||!k_||!N_},{sort:function(e){void 0!==e&&d_(e);var t=f_(this);if(N_)return void 0===e?__(t):__(t,e);var n,r,i=[],o=h_(t);for(r=0;r<o;r++)r in t&&C_(i,t[r]);for(g_(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:p_(t)>p_(n)?1:-1}}(e)),n=h_(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)v_(t,r++);return t}});var T_=zc("Array").sort,R_=ce,O_=T_,I_=Array.prototype,M_=i((function(e){var t=e.sort;return e===I_||R_(I_,e)&&t===I_.sort?O_:t})),P_=zc("Array").values,L_=sr,D_=Ze,z_=ce,$_=P_,F_=Array.prototype,U_={DOMTokenList:!0,NodeList:!0},B_=i((function(e){var t=e.values;return e===F_||z_(F_,e)&&t===F_.values||D_(U_,L_(e))?$_:t})),H_=i(mc),q_=zc("Array").entries,V_=sr,Y_=Ze,W_=ce,K_=q_,X_=Array.prototype,G_={DOMTokenList:!0,NodeList:!0},Q_=i((function(e){var t=e.entries;return e===X_||W_(X_,e)&&t===X_.entries||Y_(G_,V_(e))?K_:t}));let J_;const Z_=new Uint8Array(16);function eC(){if(!J_&&(J_="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!J_))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return J_(Z_)}const tC=[];for(let e=0;e<256;++e)tC.push((e+256).toString(16).slice(1));var nC={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function rC(e,t,n){if(nC.randomUUID&&!t&&!e)return nC.randomUUID();const r=(e=e||{}).random||(e.rng||eC)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return tC[e[t+0]]+tC[e[t+1]]+tC[e[t+2]]+tC[e[t+3]]+"-"+tC[e[t+4]]+tC[e[t+5]]+"-"+tC[e[t+6]]+tC[e[t+7]]+"-"+tC[e[t+8]]+tC[e[t+9]]+"-"+tC[e[t+10]]+tC[e[t+11]]+tC[e[t+12]]+tC[e[t+13]]+tC[e[t+14]]+tC[e[t+15]]}(r)}function iC(e){return"string"==typeof e||"number"==typeof e}var oC=function(){function e(n){t(this,e),_c(this,"delay",void 0),_c(this,"max",void 0),_c(this,"_queue",[]),_c(this,"_timeout",null),_c(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(n)}return Ec(e,[{key:"setOptions",value:function(e){e&&void 0!==e.delay&&(this.delay=e.delay),e&&void 0!==e.max&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,n=0;n<t.length;n++){var r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}},{key:"replace",value:function(e,t){var n=this,r=e[t];if(!r)throw new Error("Method "+t+" undefined");e[t]=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.queue({args:t,fn:r,context:this})}}},{key:"queue",value:function(e){"function"==typeof e?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var e=this;this._queue.length>this.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=Ep((function(){e.flush()}),this.delay))}},{key:"flush",value:function(){var e,t;Gh(e=Ov(t=this._queue).call(t,0)).call(e,(function(e){e.fn.apply(e.context||e.fn,e.args||[])}))}}],[{key:"extend",value:function(t,n){var r=new e(n);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){r.flush()};var i=[{name:"flush",original:void 0}];if(n&&n.replace)for(var o=0;o<n.replace.length;o++){var a=n.replace[o];i.push({name:a,original:t[a]}),r.replace(t,a)}return r._extended={object:t,methods:i},r}}]),e}(),aC=function(){function e(){t(this,e),_c(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),_c(this,"subscribe",e.prototype.on),_c(this,"unsubscribe",e.prototype.off)}return Ec(e,[{key:"_trigger",value:function(e,t,n){var r,i;if("*"===e)throw new Error("Cannot trigger event *");Gh(r=Ih(i=[]).call(i,Sh(this._subscribers[e]),Sh(this._subscribers["*"]))).call(r,(function(r){r(e,t,null!=n?n:null)}))}},{key:"on",value:function(e,t){"function"==typeof t&&this._subscribers[e].push(t)}},{key:"off",value:function(e,t){var n;this._subscribers[e]=fd(n=this._subscribers[e]).call(n,(function(e){return e!==t}))}}]),e}();bE("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),LE);var sC,uC=i(ie.Set),lC=i(of);function cC(e,t){var n=void 0!==kh&&_f(e)||e["@@iterator"];if(!n){if(Lh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return dC(e,t);var r=Mh(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dC(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function dC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}sC=H_;var fC=function(){function e(n){t(this,e),_c(this,"_pairs",void 0),this._pairs=n}return Ec(e,[{key:sC,value:Iw.mark((function e(){var t,n,r,i,o;return Iw.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,2),i=r[0],o=r[1],e.next=7,[i,o];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"entries",value:Iw.mark((function e(){var t,n,r,i,o;return Iw.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,2),i=r[0],o=r[1],e.next=7,[i,o];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"keys",value:Iw.mark((function e(){var t,n,r,i;return Iw.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,1),i=r[0],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"values",value:Iw.mark((function e(){var t,n,r,i;return Iw.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=cC(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=jh(n.value,2),i=r[1],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"toIdArray",value:function(){var e;return yd(e=Sh(this._pairs)).call(e,(function(e){return e[0]}))}},{key:"toItemArray",value:function(){var e;return yd(e=Sh(this._pairs)).call(e,(function(e){return e[1]}))}},{key:"toEntryArray",value:function(){return Sh(this._pairs)}},{key:"toObjectMap",value:function(){var e,t=ep(null),n=cC(this._pairs);try{for(n.s();!(e=n.n()).done;){var r=jh(e.value,2),i=r[0],o=r[1];t[i]=o}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"toMap",value:function(){return new DE(this._pairs)}},{key:"toIdSet",value:function(){return new uC(this.toIdArray())}},{key:"toItemSet",value:function(){return new uC(this.toItemArray())}},{key:"cache",value:function(){return new e(Sh(this._pairs))}},{key:"distinct",value:function(e){var t,n=new uC,r=cC(this._pairs);try{for(r.s();!(t=r.n()).done;){var i=jh(t.value,2),o=i[0],a=i[1];n.add(e(a,o))}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"filter",value:function(t){var n=this._pairs;return new e(_c({},H_,Iw.mark((function e(){var r,i,o,a,s;return Iw.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=cC(n),e.prev=1,r.s();case 3:if((i=r.n()).done){e.next=10;break}if(o=jh(i.value,2),a=o[0],s=o[1],!t(s,a)){e.next=8;break}return e.next=8,[a,s];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),r.e(e.t0);case 15:return e.prev=15,r.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[1,12,15,18]])}))))}},{key:"forEach",value:function(e){var t,n=cC(this._pairs);try{for(n.s();!(t=n.n()).done;){var r=jh(t.value,2),i=r[0];e(r[1],i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"map",value:function(t){var n=this._pairs;return new e(_c({},H_,Iw.mark((function e(){var r,i,o,a,s;return Iw.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=cC(n),e.prev=1,r.s();case 3:if((i=r.n()).done){e.next=9;break}return o=jh(i.value,2),a=o[0],s=o[1],e.next=7,[a,t(s,a)];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),r.e(e.t0);case 14:return e.prev=14,r.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])}))))}},{key:"max",value:function(e){var t=lC(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var o=jh(n.value,2),a=o[0],s=o[1],u=e(s,a);u>i&&(i=u,r=s)}return r}},{key:"min",value:function(e){var t=lC(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var o=jh(n.value,2),a=o[0],s=o[1],u=e(s,a);u<i&&(i=u,r=s)}return r}},{key:"reduce",value:function(e,t){var n,r=cC(this._pairs);try{for(r.s();!(n=r.n()).done;){var i=jh(n.value,2),o=i[0];t=e(t,i[1],o)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"sort",value:function(t){var n=this;return new e(_c({},H_,(function(){var e;return lC(M_(e=Sh(n._pairs)).call(e,(function(e,n){var r=jh(e,2),i=r[0],o=r[1],a=jh(n,2),s=a[0],u=a[1];return t(o,u,i,s)})))})))}}]),e}();function hC(e,t){var n=$h(e);if(Cf){var r=Cf(e);t&&(r=fd(r).call(r,(function(t){return Mf(e,t).enumerable}))),n.push.apply(n,r)}return n}function vC(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?Gh(n=hC(Object(i),!0)).call(n,(function(t){_c(e,t,i[t])})):Vf?Jf(e,Vf(i)):Gh(r=hC(Object(i))).call(r,(function(t){Zf(e,t,Mf(i,t))}))}return e}function pC(e,t){var n=void 0!==kh&&_f(e)||e["@@iterator"];if(!n){if(Lh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return mC(e,t);var r=Mh(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mC(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function mC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gC=function(e){ty(r,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Wg)return!1;if(Wg.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Wg(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oy(e);if(t){var i=oy(this).constructor;n=Wg(r,arguments,i)}else n=r.apply(this,arguments);return ny(this,n)}}(r);function r(e,i){var o;return t(this,r),_c(Kg(o=n.call(this)),"flush",void 0),_c(Kg(o),"length",void 0),_c(Kg(o),"_options",void 0),_c(Kg(o),"_data",void 0),_c(Kg(o),"_idProp",void 0),_c(Kg(o),"_queue",null),e&&!Lh(e)&&(i=e,e=[]),o._options=i||{},o._data=new DE,o.length=0,o._idProp=o._options.fieldId||"id",e&&e.length&&o.add(e),o.setOptions(i),o}return Ec(r,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(e){e&&void 0!==e.queue&&(!1===e.queue?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=oC.extend(this,{replace:["add","update","remove"]})),e.queue&&"object"===xc(e.queue)&&this._queue.setOptions(e.queue)))}},{key:"add",value:function(e,t){var n,r=this,i=[];if(Lh(e)){var o=yd(e).call(e,(function(e){return e[r._idProp]}));if(HE(o).call(o,(function(e){return r._data.has(e)})))throw new Error("A duplicate id was found in the parameter array.");for(var a=0,s=e.length;a<s;a++)n=this._addItem(e[a]),i.push(n)}else{if(!e||"object"!==xc(e))throw new Error("Unknown dataType");n=this._addItem(e),i.push(n)}return i.length&&this._trigger("add",{items:i},t),i}},{key:"update",value:function(e,t){var n=this,r=[],i=[],o=[],a=[],s=this._idProp,u=function(e){var t=e[s];if(null!=t&&n._data.has(t)){var u=e,l=Wv({},n._data.get(t)),c=n._updateItem(u);i.push(c),a.push(u),o.push(l)}else{var d=n._addItem(e);r.push(d)}};if(Lh(e))for(var l=0,c=e.length;l<c;l++)e[l]&&"object"===xc(e[l])?u(e[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!e||"object"!==xc(e))throw new Error("Unknown dataType");u(e)}if(r.length&&this._trigger("add",{items:r},t),i.length){var d={items:i,oldData:o,data:a};this._trigger("update",d,t)}return Ih(r).call(r,i)}},{key:"updateOnly",value:function(e,t){var n,r=this;Lh(e)||(e=[e]);var i=yd(n=yd(e).call(e,(function(e){var t=r._data.get(e[r._idProp]);if(null==t)throw new Error("Updating non-existent items is not allowed.");return{oldData:t,update:e}}))).call(n,(function(e){var t=e.oldData,n=e.update,i=t[r._idProp],o=function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Eg.apply(void 0,Ih(t=[{},e]).call(t,r))}(t,n);return r._data.set(i,o),{id:i,oldData:t,updatedData:o}}));if(i.length){var o={items:yd(i).call(i,(function(e){return e.id})),oldData:yd(i).call(i,(function(e){return e.oldData})),data:yd(i).call(i,(function(e){return e.updatedData}))};return this._trigger("update",o,t),o.items}return[]}},{key:"get",value:function(e,t){var n=void 0,r=void 0,i=void 0;iC(e)?(n=e,i=t):Lh(e)?(r=e,i=t):i=e;var o,a=i&&"Object"===i.returnType?"Object":"Array",s=i&&fd(i),u=[],l=void 0,c=void 0,d=void 0;if(null!=n)(l=this._data.get(n))&&s&&!s(l)&&(l=void 0);else if(null!=r)for(var f=0,h=r.length;f<h;f++)null==(l=this._data.get(r[f]))||s&&!s(l)||u.push(l);else for(var v,p=0,m=(c=Sh(QE(v=this._data).call(v))).length;p<m;p++)d=c[p],null==(l=this._data.get(d))||s&&!s(l)||u.push(l);if(i&&i.order&&null==n&&this._sort(u,i.order),i&&i.fields){var g=i.fields;if(null!=n&&null!=l)l=this._filterFields(l,g);else for(var y=0,x=u.length;y<x;y++)u[y]=this._filterFields(u[y],g)}if("Object"==a){for(var b={},A=0,w=u.length;A<w;A++){var E=u[A];b[E[this._idProp]]=E}return b}return null!=n?null!==(o=l)&&void 0!==o?o:null:u}},{key:"getIds",value:function(e){var t=this._data,n=e&&fd(e),r=e&&e.order,i=Sh(QE(t).call(t)),o=[];if(n)if(r){for(var a=[],s=0,u=i.length;s<u;s++){var l=i[s],c=this._data.get(l);null!=c&&n(c)&&a.push(c)}this._sort(a,r);for(var d=0,f=a.length;d<f;d++)o.push(a[d][this._idProp])}else for(var h=0,v=i.length;h<v;h++){var p=i[h],m=this._data.get(p);null!=m&&n(m)&&o.push(m[this._idProp])}else if(r){for(var g=[],y=0,x=i.length;y<x;y++){var b=i[y];g.push(t.get(b))}this._sort(g,r);for(var A=0,w=g.length;A<w;A++)o.push(g[A][this._idProp])}else for(var E=0,_=i.length;E<_;E++){var C=i[E],j=t.get(C);null!=j&&o.push(j[this._idProp])}return o}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(e,t){var n=t&&fd(t),r=this._data,i=Sh(QE(r).call(r));if(t&&t.order)for(var o=this.get(t),a=0,s=o.length;a<s;a++){var u=o[a];e(u,u[this._idProp])}else for(var l=0,c=i.length;l<c;l++){var d=i[l],f=this._data.get(d);null==f||n&&!n(f)||e(f,d)}}},{key:"map",value:function(e,t){for(var n=t&&fd(t),r=[],i=this._data,o=Sh(QE(i).call(i)),a=0,s=o.length;a<s;a++){var u=o[a],l=this._data.get(u);null==l||n&&!n(l)||r.push(e(l,u))}return t&&t.order&&this._sort(r,t.order),r}},{key:"_filterFields",value:function(e,t){var n;return e?ad(n=Lh(t)?t:$h(t)).call(n,(function(t,n){return t[n]=e[n],t}),{}):e}},{key:"_sort",value:function(e,t){if("string"==typeof t){var n=t;M_(e).call(e,(function(e,t){var r=e[n],i=t[n];return r>i?1:r<i?-1:0}))}else{if("function"!=typeof t)throw new TypeError("Order must be a function or a string");M_(e).call(e,t)}}},{key:"remove",value:function(e,t){for(var n=[],r=[],i=Lh(e)?e:[e],o=0,a=i.length;o<a;o++){var s=this._remove(i[o]);if(s){var u=s[this._idProp];null!=u&&(n.push(u),r.push(s))}}return n.length&&this._trigger("remove",{items:n,oldData:r},t),n}},{key:"_remove",value:function(e){var t;if(iC(e)?t=e:e&&"object"===xc(e)&&(t=e[this._idProp]),null!=t&&this._data.has(t)){var n=this._data.get(t)||null;return this._data.delete(t),--this.length,n}return null}},{key:"clear",value:function(e){for(var t,n=Sh(QE(t=this._data).call(t)),r=[],i=0,o=n.length;i<o;i++)r.push(this._data.get(n[i]));return this._data.clear(),this.length=0,this._trigger("remove",{items:n,oldData:r},e),n}},{key:"max",value:function(e){var t,n,r=null,i=null,o=pC(B_(t=this._data).call(t));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a[e];"number"==typeof s&&(null==i||s>i)&&(r=a,i=s)}}catch(e){o.e(e)}finally{o.f()}return r||null}},{key:"min",value:function(e){var t,n,r=null,i=null,o=pC(B_(t=this._data).call(t));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a[e];"number"==typeof s&&(null==i||s<i)&&(r=a,i=s)}}catch(e){o.e(e)}finally{o.f()}return r||null}},{key:"distinct",value:function(e){for(var t=this._data,n=Sh(QE(t).call(t)),r=[],i=0,o=0,a=n.length;o<a;o++){for(var s=n[o],u=t.get(s)[e],l=!1,c=0;c<i;c++)if(r[c]==u){l=!0;break}l||void 0===u||(r[i]=u,i++)}return r}},{key:"_addItem",value:function(e){var t=function(e,t){return null==e[t]&&(e[t]=rC()),e}(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw new Error("Cannot add item: item with id "+n+" already exists");return this._data.set(n,t),++this.length,n}},{key:"_updateItem",value:function(e){var t=e[this._idProp];if(null==t)throw new Error("Cannot update item: item has no id (item: "+rp(e)+")");var n=this._data.get(t);if(!n)throw new Error("Cannot update item: no item with id "+t+" found");return this._data.set(t,vC(vC({},n),e)),t}},{key:"stream",value:function(e){if(e){var t=this._data;return new fC(_c({},H_,Iw.mark((function n(){var r,i,o,a;return Iw.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=pC(e),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=11;break}if(o=i.value,null==(a=t.get(o))){n.next=9;break}return n.next=9,[o,a];case 9:n.next=3;break;case 11:n.next=16;break;case 13:n.prev=13,n.t0=n.catch(1),r.e(n.t0);case 16:return n.prev=16,r.f(),n.finish(16);case 19:case"end":return n.stop()}}),n,null,[[1,13,16,19]])}))))}var n;return new fC(_c({},H_,qc(n=Q_(this._data)).call(n,this._data)))}}]),r}(aC);function yC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xC=function(e){ty(r,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Wg)return!1;if(Wg.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Wg(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oy(e);if(t){var i=oy(this).constructor;n=Wg(r,arguments,i)}else n=r.apply(this,arguments);return ny(this,n)}}(r);function r(e,i){var o,a;return t(this,r),_c(Kg(a=n.call(this)),"length",0),_c(Kg(a),"_listener",void 0),_c(Kg(a),"_data",void 0),_c(Kg(a),"_ids",new uC),_c(Kg(a),"_options",void 0),a._options=i||{},a._listener=qc(o=a._onEvent).call(o,Kg(a)),a.setData(e),a}return Ec(r,[{key:"idProp",get:function(){return this.getDataSet().idProp}},{key:"setData",value:function(e){if(this._data){this._data.off&&this._data.off("*",this._listener);var t=this._data.getIds({filter:fd(this._options)}),n=this._data.get(t);this._ids.clear(),this.length=0,this._trigger("remove",{items:t,oldData:n})}if(null!=e){this._data=e;for(var r=this._data.getIds({filter:fd(this._options)}),i=0,o=r.length;i<o;i++){var a=r[i];this._ids.add(a)}this.length=r.length,this._trigger("add",{items:r})}else this._data=new gC;this._data.on&&this._data.on("*",this._listener)}},{key:"refresh",value:function(){for(var e=this._data.getIds({filter:fd(this._options)}),t=Sh(this._ids),n={},r=[],i=[],o=[],a=0,s=e.length;a<s;a++){var u=e[a];n[u]=!0,this._ids.has(u)||(r.push(u),this._ids.add(u))}for(var l=0,c=t.length;l<c;l++){var d=t[l],f=this._data.get(d);null==f?console.error("If you see this, report it please."):n[d]||(i.push(d),o.push(f),this._ids.delete(d))}this.length+=r.length-i.length,r.length&&this._trigger("add",{items:r}),i.length&&this._trigger("remove",{items:i,oldData:o})}},{key:"get",value:function(e,t){if(null==this._data)return null;var n,r=null;iC(e)||Lh(e)?(r=e,n=t):n=e;var i=Wv({},this._options,n),o=fd(this._options),a=n&&fd(n);return o&&a&&(i.filter=function(e){return o(e)&&a(e)}),null==r?this._data.get(i):this._data.get(r,i)}},{key:"getIds",value:function(e){if(this._data.length){var t,n=fd(this._options),r=null!=e?fd(e):null;return t=r?n?function(e){return n(e)&&r(e)}:r:n,this._data.getIds({filter:t,order:e&&e.order})}return[]}},{key:"forEach",value:function(e,t){if(this._data){var n,r,i=fd(this._options),o=t&&fd(t);r=o?i?function(e){return i(e)&&o(e)}:o:i,Gh(n=this._data).call(n,e,{filter:r,order:t&&t.order})}}},{key:"map",value:function(e,t){if(this._data){var n,r,i=fd(this._options),o=t&&fd(t);return r=o?i?function(e){return i(e)&&o(e)}:o:i,yd(n=this._data).call(n,e,{filter:r,order:t&&t.order})}return[]}},{key:"getDataSet",value:function(){return this._data.getDataSet()}},{key:"stream",value:function(e){var t;return this._data.stream(e||_c({},H_,qc(t=QE(this._ids)).call(t,this._ids)))}},{key:"dispose",value:function(){var e;null!==(e=this._data)&&void 0!==e&&e.off&&this._data.off("*",this._listener);var t,n="This data view has already been disposed of.",i={get:function(){throw new Error(n)},set:function(){throw new Error(n)},configurable:!1},o=function(e,t){var n=void 0!==kh&&_f(e)||e["@@iterator"];if(!n){if(Lh(e)||(n=function(e,t){var n;if(e){if("string"==typeof e)return yC(e,t);var r=Mh(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Ef(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yC(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(Ph(r.prototype));try{for(o.s();!(t=o.n()).done;){var a=t.value;Zf(this,a,i)}}catch(e){o.e(e)}finally{o.f()}}},{key:"_onEvent",value:function(e,t,n){if(t&&t.items&&this._data){var r=t.items,i=[],o=[],a=[],s=[],u=[],l=[];switch(e){case"add":for(var c=0,d=r.length;c<d;c++){var f=r[c];this.get(f)&&(this._ids.add(f),i.push(f))}break;case"update":for(var h=0,v=r.length;h<v;h++){var p=r[h];this.get(p)?this._ids.has(p)?(o.push(p),u.push(t.data[h]),s.push(t.oldData[h])):(this._ids.add(p),i.push(p)):this._ids.has(p)&&(this._ids.delete(p),a.push(p),l.push(t.oldData[h]))}break;case"remove":for(var m=0,g=r.length;m<g;m++){var y=r[m];this._ids.has(y)&&(this._ids.delete(y),a.push(y),l.push(t.oldData[m]))}}this.length+=i.length-a.length,i.length&&this._trigger("add",{items:i},n),o.length&&this._trigger("update",{items:o,oldData:s,data:u},n),a.length&&this._trigger("remove",{items:a,oldData:l},n)}}}]),r}(aC);function bC(e,t){return"object"===xc(t)&&null!==t&&e===t.idProp&&"function"==typeof t.add&&"function"==typeof t.clear&&"function"==typeof t.distinct&&"function"==typeof Gh(t)&&"function"==typeof t.get&&"function"==typeof t.getDataSet&&"function"==typeof t.getIds&&"number"==typeof t.length&&"function"==typeof yd(t)&&"function"==typeof t.max&&"function"==typeof t.min&&"function"==typeof t.off&&"function"==typeof t.on&&"function"==typeof t.remove&&"function"==typeof t.setOptions&&"function"==typeof t.stream&&"function"==typeof t.update&&"function"==typeof t.updateOnly}e.DELETE=wg,e.DataSet=gC,e.DataStream=fC,e.DataView=xC,e.Queue=oC,e.createNewDataPipeFrom=function(e){return new Pd(e)},e.isDataSetLike=bC,e.isDataViewLike=function(e,t){return"object"===xc(t)&&null!==t&&e===t.idProp&&"function"==typeof Gh(t)&&"function"==typeof t.get&&"function"==typeof t.getDataSet&&"function"==typeof t.getIds&&"number"==typeof t.length&&"function"==typeof yd(t)&&"function"==typeof t.off&&"function"==typeof t.on&&"function"==typeof t.stream&&bC(e,t.getDataSet())}}(t)}}]);
3
+ //# sourceMappingURL=3302.dff164d9.chunk.js.map