@ytsaurus/ui 1.90.1 → 1.91.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 (44) hide show
  1. package/dist/public/build/assets-manifest.json +31 -31
  2. package/dist/public/build/css/2140.254b6ed2.chunk.css +2 -0
  3. package/dist/public/build/css/2140.254b6ed2.chunk.css.map +1 -0
  4. package/dist/public/build/css/{2747.49a10cfc.chunk.css → 2747.46d89bd1.chunk.css} +2 -2
  5. package/dist/public/build/css/2747.46d89bd1.chunk.css.map +1 -0
  6. package/dist/public/build/css/{yt-monaco-editor.35fedd61.chunk.css → yt-monaco-editor.f3c34bec.chunk.css} +2 -2
  7. package/dist/public/build/css/yt-monaco-editor.f3c34bec.chunk.css.map +1 -0
  8. package/dist/public/build/js/{8674.ba5cb9f1.chunk.js → 4330.37e8a0dd.chunk.js} +3 -3
  9. package/dist/public/build/js/4330.37e8a0dd.chunk.js.map +1 -0
  10. package/dist/public/build/js/9312.ce15a566.chunk.js +3 -0
  11. package/dist/public/build/js/9312.ce15a566.chunk.js.map +1 -0
  12. package/dist/public/build/js/{chyt.ca9dd200.chunk.js → chyt.a8612ac3.chunk.js} +2 -2
  13. package/dist/public/build/js/{chyt.ca9dd200.chunk.js.map → chyt.a8612ac3.chunk.js.map} +1 -1
  14. package/dist/public/build/js/{cluster-page-wrapper.96c4ce3a.chunk.js → cluster-page-wrapper.d6af732a.chunk.js} +2 -2
  15. package/dist/public/build/js/{cluster-page-wrapper.96c4ce3a.chunk.js.map → cluster-page-wrapper.d6af732a.chunk.js.map} +1 -1
  16. package/dist/public/build/js/main.376121e5.js +3 -0
  17. package/dist/public/build/js/main.376121e5.js.map +1 -0
  18. package/dist/public/build/js/{navigation.ac5ef83f.chunk.js → navigation.7e77d5e0.chunk.js} +2 -2
  19. package/dist/public/build/js/navigation.7e77d5e0.chunk.js.map +1 -0
  20. package/dist/public/build/js/{query-tracker.bd67de7b.chunk.js → query-tracker.b8789080.chunk.js} +2 -2
  21. package/dist/public/build/js/{query-tracker.bd67de7b.chunk.js.map → query-tracker.b8789080.chunk.js.map} +1 -1
  22. package/dist/public/build/js/{query-widget.e13e8196.chunk.js → query-widget.261b2836.chunk.js} +2 -2
  23. package/dist/public/build/js/{query-widget.e13e8196.chunk.js.map → query-widget.261b2836.chunk.js.map} +1 -1
  24. package/dist/public/build/js/{runtime.1a91f59f.js → runtime.dc94a394.js} +2 -2
  25. package/dist/public/build/js/{runtime.1a91f59f.js.map → runtime.dc94a394.js.map} +1 -1
  26. package/dist/public/build/js/{yt-monaco-editor.46876bce.chunk.js → yt-monaco-editor.b3cf8d2a.chunk.js} +2 -2
  27. package/dist/public/build/js/yt-monaco-editor.b3cf8d2a.chunk.js.map +1 -0
  28. package/dist/public/build/manifest.json +26 -26
  29. package/dist/shared/constants/settings-types.d.ts +4 -2
  30. package/package.json +3 -3
  31. package/dist/public/build/css/2140.0fdc720d.chunk.css +0 -2
  32. package/dist/public/build/css/2140.0fdc720d.chunk.css.map +0 -1
  33. package/dist/public/build/css/2747.49a10cfc.chunk.css.map +0 -1
  34. package/dist/public/build/css/yt-monaco-editor.35fedd61.chunk.css.map +0 -1
  35. package/dist/public/build/js/8674.ba5cb9f1.chunk.js.map +0 -1
  36. package/dist/public/build/js/9312.ae95dc3d.chunk.js +0 -3
  37. package/dist/public/build/js/9312.ae95dc3d.chunk.js.map +0 -1
  38. package/dist/public/build/js/main.adf0339f.js +0 -3
  39. package/dist/public/build/js/main.adf0339f.js.map +0 -1
  40. package/dist/public/build/js/navigation.ac5ef83f.chunk.js.map +0 -1
  41. package/dist/public/build/js/yt-monaco-editor.46876bce.chunk.js.map +0 -1
  42. /package/dist/public/build/js/{8674.ba5cb9f1.chunk.js.LICENSE.txt → 4330.37e8a0dd.chunk.js.LICENSE.txt} +0 -0
  43. /package/dist/public/build/js/{9312.ae95dc3d.chunk.js.LICENSE.txt → 9312.ce15a566.chunk.js.LICENSE.txt} +0 -0
  44. /package/dist/public/build/js/{main.adf0339f.js.LICENSE.txt → main.376121e5.js.LICENSE.txt} +0 -0
@@ -1,3 +1,3 @@
1
- /*! For license information please see 8674.ba5cb9f1.chunk.js.LICENSE.txt */
2
- (self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[8674],{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})]})}},33026:(e,t,n)=>{"use strict";n.d(t,{Ye:()=>V,DC:()=>K,Dz:()=>F});var r=n(40319),i=n(13322),o=n(9736),a=n(77810),s=n(15647),u=n(76872),l=n(46282),c=n(64772),d=n(69835),f=n(11394),h=n(78466),v=n(11843),p=n(34380),m=n(35074),g=n(60680),y=n(84162),x=n(30008),b=n(64922),A=(0,u.A)("elements-toolbar"),w=(0,u.A)("yt-statistics-table");function E(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,b.jsx)("div",{className:A(null,w("toolbar")),children:(0,b.jsxs)("div",{className:A("container"),children:[(0,b.jsx)("div",{className:A("component",w("filter")),children:(0,b.jsx)(y.A,{size:"m",debounce:500,value:"",onChange:i})}),(0,b.jsx)("div",{className:A("component",w("expand-collapse")),children:(0,b.jsx)("span",{className:w("expand-metrics"),children:(0,b.jsx)(h.L,{expanded:o,toggleExpanded:o?t:n})})}),e.helpUrl&&(0,b.jsx)("div",{className:A("component",w("help")),children:(0,b.jsx)(x.A,{url:e.helpUrl})})]})})}var _=n(70353);function C(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 j=n(74360),k=n(39760),S=n.n(k),T=n(30002),N=n.n(T),R=n(73822),O="<Root>";function I(e,t){return{name:t,prefix:e,path:e+"/"+t}}function M(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O,r=t||{children:{},leaves:{}};return S()(e,(function(e,t){if("object"===(0,j.A)(N()(e)[0])){var i=I(n,t);r.children[i.path]=i,r=M(e,r,i.path)}else{var o=function(e,t,n){var r=I(e,t);return r.value=n,r}(n,t,e);r.leaves[o.path]=o}})),r}var L,P=function(e){return t=M(e),n=R.A.treeList.prepareTree(t.children,(function(e){return e.prefix})),(n=R.A.treeList.attachTreeLeaves(n,t.leaves,(function(e){return e.prefix})))[O];var t,n},D=n(68175),z=(L={},(0,D.A)(L,"ms",(function(e,t){return c.A.TimeDuration(Math.round(e),(0,r.A)({format:"milliseconds"},t))})),(0,D.A)(L,"bytes",(function(e,t){return $(e,t)})),(0,D.A)(L,"bytes * sec",(function(e,t){return $(e,t," * sec")})),(0,D.A)(L,"ms * bytes",(function(e,t){return $(e,t," * ms")})),(0,D.A)(L,"Mb*sec",(function(e,t){return $(1024*e*1024,t," * sec")})),L);function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return isNaN(e)?c.A.NO_VALUE:c.A.Bytes(Math.round(e),t)+n}function F(e,t,n){var r,i=null!==(r=z[t])&&void 0!==r?r:c.A.Number;return null==i?void 0:i(e,n)}var U=(0,u.A)("yt-statistics-table"),q=40;function B(e){var t=e.item,n=e.unit,r=t.attributes.value;if(r&&r.count&&r.sum){var i=r.sum/r.count;return i<1?F(i,n,{significantDigits:6}):F(i,n)}return c.A.NO_VALUE}function H(e){var t,n,r=e.item,i=e.aggregation,o=e.unit;return r.isLeafNode&&Boolean(r.attributes.value)?"avg"===i?(0,b.jsx)(B,{item:r,unit:o}):"count"===i?c.A.Number(null===(t=r.attributes)||void 0===t||null===(t=t.value)||void 0===t?void 0:t[i]):F(null===(n=r.attributes)||void 0===n||null===(n=n.value)||void 0===n?void 0:n[i],o):c.A.NO_VALUE}function V(e){var t=e.title,n=e.info,r=!(null!=n&&n.description||null!=n&&n.unit);return(0,b.jsxs)(p.m,{content:r?null:(0,b.jsx)(m.Ay,{items:[{key:"Description",value:n.description,visible:Boolean(n.description),className:U("description")},{key:"Unit",value:n.unit,visible:Boolean(n.unit)}]}),children:[t," ",!r&&(0,b.jsx)(g.L1,{children:(0,b.jsx)(l.A,{awesome:"question-circle"})})]})}function Y(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=e.info,c=a.useMemo((function(){return{minWidth:o,paddingLeft:((null==t?void 0:t.level)||0)*q}}),[t.level,o]),d=a.useCallback((function(){n.empty||r()}),[n,r]);return t.isLeafNode?(0,b.jsxs)("span",{className:U("metric"),style:c,children:[(0,b.jsx)(l.A,{awesome:"chart-line",className:U("metric-icon")}),(0,b.jsx)(V,{title:s(t),info:u})]}):(0,b.jsxs)("span",{className:U("group"),style:c,onClick:d,children:[(0,b.jsx)(h.L,{expanded:!(n.collapsed||n.empty),toggleExpanded:function(){}}),(0,b.jsx)(l.A,{awesome:n.collapsed||n.empty?"folder":"folder-open",className:U("group-icon")}),(0,b.jsx)("span",{children:s(t)})]})}var W=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"}}},G=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"),c=(0,o.A)(l,2),d=c[0],f=c[1],h=a.useMemo((function(){return P(t)}),[t]),v=a.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e)return[];var n=R.A.treeList.filterTree(e,(function(e){return-1!==e.name.indexOf(t)}),!0),r=R.A.treeList.sortTree(n,{field:"name",asc:!0},{name:{get:function(e){return e.name}}});return R.A.treeList.flattenTree(r)}(h,s)}),[h,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)(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.isLeafNode?20:40,u=C(i,a.attributes.name);r=Math.max(r,u+s+a.level*q)}}catch(e){o.e(e)}finally{o.f()}return Math.round(1.05*r)}(v,n)}),[n,v]),items:v,treeState:d,setTreeState:f,onFilterChange:function(e){return u(e)}}};function K(e){var t=e.className,n=e.helpUrl,o=e.virtual,u=e.visibleColumns,l=e.fixedHeader,c=e.statistic,h=e.getStatisticInfo,p=(0,s.d4)(v.Y),m=G({statistic:c,fontFamilies:p}),g=m.items,y=m.minWidth,x=m.treeState,A=m.setTreeState,w=m.onFilterChange,_=a.useMemo((function(){return{name:function(e,t,n,r){var i,o=null!==(i=null==h?void 0:h(e.name))&&void 0!==i?i:{};return(0,b.jsx)(Y,{item:e,minWidth:y,toggleItemState:n,itemState:r,renderValue:function(e){var t;return null==e||null===(t=e.attributes)||void 0===t?void 0:t.name},info:o})},__default__:function(e,t){if(e.isLeafNode){var n,r=(null!==(n=null==h?void 0:h(e.name))&&void 0!==n?n:{}).unit;return(0,b.jsx)(H,{item:e,aggregation:t,unit:r})}return null}}}),[y,h]),C=a.useMemo((function(){return W({visibleColumns:u})}),(0,i.A)(u));return(0,b.jsx)(d.A,{children:(0,b.jsxs)("div",{className:U(null,t),children:[(0,b.jsx)(E,{helpUrl:n,onFilterChange:w,onTreeStateChange:A,treeState:x}),(0,b.jsx)("div",{className:U("table-container"),children:(0,b.jsx)(f.A,(0,r.A)((0,r.A)({},C),{},{virtual:o,treeState:x,templates:_,items:g,css:U(),headerClassName:U("header",{fixed:l})}))})]})})}},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(37338);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(50326);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 k="yc-column-selector";j.registerKeyset("en",k,C);const S=j.keyset(k);var T=(0,o.A)("yc-column-selector"),N=["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?N:m,b=i.useRef(null),A=i.useState(!1),w=(0,r.A)(A,2),_=w[0],C=w[1],j=i.useState(!1),k=(0,r.A)(j,2),R=k[0],O=k[1],I=i.useState(),M=(0,r.A)(I,2),L=M[0],P=M[1];i.useEffect((function(){P(void 0)}),[l,c]),i.useEffect((function(){o&&(C(!1),P(void 0))}),[o]);var D=i.useCallback((function(e){P(e)}),[]),z=i.useCallback((function(){C(!1)}),[]),$=i.useCallback((function(){C(!1),P(void 0)}),[]),F=i.useCallback((function(){C(!1),P(void 0),L&&c!==L&&d(L)}),[L,d,c]);return(0,x.jsxs)("div",{className:T(null,t),children:[(0,x.jsx)("div",{className:T("control"),ref:b,onClick:function(){o||(C((function(e){return!e})),P(void 0),R||O(!0))},children:n||(0,x.jsx)(E,{displayArrow:!0,disabled:o,placeholder:S("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:S("label_columns"),items:l,value:null!=L?L:c,onUpdate:D,getItemId:v,filterItem:p,renderItem:f,renderItemValue:h}),(0,x.jsxs)("div",{className:T("controls"),children:[(0,x.jsx)(s.$,{view:"flat",className:T("control"),onClick:$,children:S("button_cancel")}),(0,x.jsx)(s.$,{view:"action",className:T("control"),onClick:F,children:S("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}},73800:(e,t,n)=>{"use strict";n.d(t,{M:()=>f});var r=n(40319),i=n(28407),o=n(70232),a=n.n(o),s=n(48971),u=n(64714),l=n(55956),c=n(52797),d=new(n(78894).I),f=function(){var e=(0,i.A)(a().mark((function e(t,n){var i,o,f,h;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(0,r.A)({proxy:(0,c.v9)(n)},l.oj),o=[{command:"get",parameters:{path:"".concat(t,"/@")}},{command:"get",parameters:{path:"".concat(t,"/@schema")}}],e.prev=2,e.next=5,u.Qq.executeBatch(u.Vu.navigationGetPath,{parameters:{requests:o},setup:i});case 5:if(f=e.sent,!(h=(0,s.$7)(f,"Failed to get navigation attributes"))){e.next=9;break}throw h;case 9:return e.abrupt("return",(0,r.A)((0,r.A)({},f[0].output),{},{schema:(0,r.A)({},f[1].output)}));case 12:return e.prev=12,e.t0=e.catch(2),d.add({name:"load_table_attributes",theme:"danger",title:"Failed to load table attributes",content:e.t0.message}),e.abrupt("return",{});case 16:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t,n){return e.apply(this,arguments)}}()},52120:(e,t,n)=>{"use strict";n.d(t,{h:()=>c});var r=n(28407),i=n(70232),o=n.n(i),a=n(73800),s=n(29746),u=n(98634),l=n(3659),c=function(){var e=(0,r.A)(o().mark((function e(t){var n,r,i,c,d,f;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.clusterConfig,r=t.path,i=t.engine,c=t.limit,e.next=3,(0,a.M)(r,n);case 3:return d=e.sent,f=s.A.getValue(d.schema),e.abrupt("return","SELECT\n".concat(f.map((function(e){return" "+l.A.prettyprint(e.name,{asHTML:!1}).replaceAll('"',"`")})).join(",\r\n"),"\nFROM ").concat((0,u.$)({path:r,cluster:n.id,engine:i}),"\nLIMIT ").concat(c));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},92115:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var r=n(77720),i=function(e,t){if(t){var n=t.getPosition(),i={range:n?new r.Q6(n.lineNumber,n.column,n.lineNumber,n.column):new r.Q6(0,0,0,0),text:e};t.executeEdits("Insert text",[i])}}},98634:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(30996),i=function(e){var t=e.path,n=e.cluster,i=e.engine;if(!t||"/"===t)return n;switch(i){case r.d.YQL:return n+".`"+t+"`";case r.d.YT_QL:case r.d.CHYT:return"`"+t+"`";default:return"yt.`ytTable:"+t+"`"}}},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(11229),c=n(1701),d=n(19314),f=n(52797),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)},36510:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ne});var r=n(40319),i=n(9736),o=n(77810),a=n(79726),s=n(76872),u=n(85137),l=n(92423),c=n(70436),d=n(64922),f=(0,s.A)("node-details-info");function h(e){var t=e.Streams,n=e.InputColumns,r=e.InputKeyFilterColumns;return(0,d.jsxs)("div",{className:f(),children:[t&&(0,d.jsx)(c.A,{name:"Streams",size:"ns",collapsed:!1,children:(0,d.jsx)("div",{className:f("streams"),children:Object.keys(t).map((function(e){return(0,d.jsx)(v,{name:e,data:t[e]},e)}))})}),(0,d.jsx)(m,{data:n,title:"InputColumns"}),(0,d.jsx)(m,{data:r,title:"InputKeyFilterColumns"})]})}function v(e){var t=e.name,n=e.data;return(0,d.jsxs)("div",{className:f("entry"),children:[(0,d.jsx)("div",{className:f("entry-name"),children:t}),Array.isArray(n)&&(0,d.jsx)("div",{className:f("entry-items"),children:n.map((function(e,t){return(0,d.jsx)(p,(0,r.A)({},e),t)}))})]})}function p(e){var t=e.Name,n=e.Children;return(0,d.jsxs)("div",{className:f("item"),children:[(0,d.jsx)(u.E,{className:f("item-name"),color:"complementary",children:t}),Array.isArray(n)&&(0,d.jsx)("div",{className:f("item-children"),children:n.map((function(e,t){return(0,d.jsx)("div",{className:f("item-group"),children:e.map((function(e,t){return(0,d.jsx)(p,(0,r.A)({},e),t)}))},t)}))})]})}function m(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,d.jsx)(o.Fragment,{children:n.map((function(e,t){return e?(n=Array.isArray(e)?e:[e],(0,d.jsx)(c.A,{name:"".concat(r," #").concat(t+1),size:"ns",children:(0,d.jsx)(g,{items:n,limit:20})},t)):null;var n}))}):(t=Array.isArray(n)?n:[n],(0,d.jsx)(c.A,{name:r,size:"ns",collapsed:!1,children:(0,d.jsx)(g,{items:t,limit:20})})):null}function g(e){var t,n=e.items,r=e.limit,a=e.className,s=o.useState(!1),c=(0,i.A)(s,2),h=c[0],v=c[1],p=r&&!h?Math.min(n.length,r):n.length,m=n.length-p,g=0===p,y=m>0?n.slice(0,p):n;return(0,d.jsxs)("div",{className:f("columns",a),children:[y.map((function(e,t){return(0,d.jsx)("div",{className:f("columns-column"),children:(0,d.jsx)(u.E,{color:"complementary",children:e})},t)})),Boolean(m)&&(0,d.jsx)(l.$,{className:f("columns-expand"),onClick:function(e){e.stopPropagation(),v(!0)},children:(t=m,"Show ".concat(t," more items"))}),g&&(0,d.jsx)("div",{className:f("columns-empty"),children:"Empty list"})]})}var y=n(27222),x=(0,s.A)("node-jobs"),b=[{name:"status",header:"Status",sortable:!1,render:function(e){var t=e.row,n=e.footer;return(0,d.jsxs)("div",{className:x("item"),children:[(0,d.jsx)("div",{className:x("item-color",{status:t.status.toLowerCase()})}),(0,d.jsx)(u.E,{className:x("item-title"),color:n?"primary":"secondary",children:t.status})]})}},{name:"count",header:"Quantity",align:y.Ay.RIGHT,sortable:!1}];function A(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,f=[];return f.push({status:"Pending",count:c-n-i-a-u}),f.push({status:"Running",count:n}),f.push({status:"Completed",count:i}),f.push({status:"Failed",count:a}),f.push({status:"Aborted",count:u}),(0,d.jsx)("div",{className:x(),children:(0,d.jsx)(y.Ay,{theme:"yandex-cloud",columns:b,data:f,footerData:[{status:"Total",count:c}],settings:{displayIndices:!1}})})}var w=n(72679),E=n(18801),_=n(13322),C=n(71291),j=n.n(C),k=n(31470),S=n.n(k),T=n(67981),N=n.n(T),R="StructType",O="ListType",I="StreamType",M="TupleType",L="DictType",P="DataType",D="VariantType",z="OptionalType",$="TaggedType",F="VoidType",U="NullType",q="EmptyDictType",B="EmptyListType",H=["Void","Yson","Json","Null"],V=["Double","Float","Int64","Int32","Int16","Int8","Uint64","Uint32","Uint16","Uint8"],Y=["Date","TzDate","Datetime","TzDatetime","Timestamp","TzTimestamp","Interval"],W=["String","Utf8","Json"];function G(e){return V.indexOf(e)>=0}function K(e){return Y.indexOf(e)>=0}function X(e){return W.indexOf(e)>=0}function Q(e){return Array.isArray(e)&&e[0]===O&&Array.isArray(e[1])}function J(e){return Array.isArray(e)&&e[0]===M&&Array.isArray(e[1])}function Z(e){return Array.isArray(e)&&e[0]===R&&Array.isArray(e[1])}function ee(e){for(var t=e;t[0]===z;)t=t[1];if(t[0]===R){var n=j()(t[1]);return["Bins","Max","Min","WeightsSum"].every((function(e){return Object.prototype.hasOwnProperty.call(n,e)}))&&Array.isArray(n.Bins)&&n.Bins[0]===O&&n.Bins[1][0]===R&&S()(N().apply(void 0,(0,_.A)(n.Bins[1][1]))[0].sort(),["Frequency","Position"])}return!1}function te(e){return"Struct"===e.name}function ne(e){return"Variant"===e.name}function re(e){return Boolean(e.complex)}function ie(e){switch(e[0]){case P:return{name:e[1],simple:(n=e[1],H.indexOf(n)<0),numeric:G(e[1]),dateTime:K(e[1]),string:X(e[1]),params:e.slice(2)};case z:return function(e){return e.optional&&(e.optionalLevel=(e.optionalLevel||1)+1),e.optional=!0,e}(ie(e[1]));case $:return function(e,t){return e.tagged=!0,e.tags=(e.tags||[]).concat(t),e}(ie(e[2]),e[1]);case L:return e[2][0]===F?{name:"Set",complex:!0,type:ie(e[1])}:{name:"Dict",complex:!0,type:e.slice(1).map(ie)};case O:return{name:"List",complex:!0,type:ie(e[1])};case q:return{name:"EmptyDict"};case B:return{name:"EmptyList"};case I:return{name:"Stream",complex:!0,type:ie(e[1])};case M:return{name:"Tuple",complex:!0,type:e[1].map(ie)};case R:return{name:"Struct",complex:!0,struct:e[1].map((function(e){return{key:e[0],type:ie(e[1])}}))};case D:var t=function(e){var t=ie(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 F:return{name:"Void"};case U:return{name:"Null",null:!0};default:return{name:"Unknown"}}var n}var oe=["level","defaultExpanded"],ae=(0,s.A)("data-type"),se=function(e){var t=e.entry,n=e.level;return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("span",{className:ae("struct-key"),children:t.key},"key")," : ",(0,d.jsx)(ue,(0,r.A)({level:n},t.type),"type")]})};function ue(e){var t=e.level,n=void 0===t?0:t,a=e.defaultExpanded,s=(0,E.A)(e,oe),u=o.useState(void 0===a?n<2:a),l=(0,i.A)(u,2),c=l[0],f=l[1],h=s.optional,v=s.optionalLevel,p=s.name,m=s.tagged,g=s.tags,y=s.params,x=s.complex;return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsxs)("span",{className:ae({optional:h,complex:x,"optional-multilevel":(null!=v?v:0)>0}),"data-optional":v?"optional × ".concat(v):void 0,onClick:function(){return f((function(e){return!e}))},children:[p,Array.isArray(y)&&y.length>0&&"(".concat(y.join(", "),")"),m&&g?g.map((function(e){return(0,d.jsx)("span",{className:ae("tag"),children:e},e)})):null]},"name"),re(s)?(0,d.jsxs)("div",{className:ae("subtype",{expanded:c}),children:[(0,d.jsx)("span",{className:ae("ellipsis"),onClick:function(){return f((function(e){return!e}))}}),c&&(0,d.jsx)("div",{className:ae("content",{expanded:c}),children:te(s)||ne(s)?s.struct.map((function(e,t){return(0,d.jsx)(se,{level:n+1,entry:e},t)})):(Array.isArray(s.type)?s.type:[s.type]).map((function(e,t){return(0,d.jsx)(ue,(0,r.A)({level:n+1},e),t)}))})]},"subtype"):(0,d.jsx)("br",{},"separator")]})}const le=function(e){return(0,d.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,d.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 ce=n(10559),de=n(88150),fe=n(93209),he=(0,s.A)("yql-schema-table"),ve=[{name:"name",header:"Name",sortable:!1,render:function(e){var t=e.row;if("function"==typeof t.onNameClick){var n=t.onNameClick;return(0,d.jsxs)(fe.S,{color:"primary",className:he("item"),onClick:function(){n(t.name)},children:[t.sort&&(0,d.jsx)(w.I,{className:he("sort-icon"),data:t.sort.ascending?le:ce.A,size:16}),(0,d.jsx)("span",{className:he("name"),title:t.name,children:t.name}),(0,d.jsx)(w.I,{className:he("insert-icon"),data:de.A,size:16})]})}return(0,d.jsxs)("span",{className:he("item"),children:[t.sort&&(0,d.jsx)(w.I,{className:he("sort-icon"),data:t.sort.ascending?le:ce.A,size:16}),(0,d.jsx)("span",{className:he("name"),title:t.name,children:t.name})]})}},{name:"type",header:"Type",sortable:!1,render:function(e){var t=e.row;return(0,d.jsx)(ue,(0,r.A)({},t.type))}}];function pe(e){var t=e.className,n=e.schemaFields;return(0,d.jsx)("div",{className:he(null,t),children:(0,d.jsx)(y.Ay,{theme:"yandex-cloud",columns:ve,data:n,startIndex:1})})}var me=["key"],ge=function(e){return Boolean(e.type.simple)},ye=function(e){return Boolean(e.type.simple)};function xe(e){if(function(e){return!!J(e)&&e[1].length>0&&e[1].every((function(e){return ee(e)}))}(e))return["HistogramTupleType",e[1].map((function(e){return["HistogramType",e]}))];if(function(e){return!!Q(e)&&ee(e[1])}(e))return["HistogramListType",["HistogramType",e[1]]];if(function(e){return!!Z(e)&&e[1].length>0&&e[1].every((function(e){return ee(e[1])}))}(e))return["HistogramStructType",e[1].map((function(e){return["HistogramType",e[1],e[0]]}))];if(n=e,Array.isArray(n)&&n[0]===D&&(Z(n[1])||J(n[1]))){var t=e[1];if(J(t))return[D,[t[0],t[1].map((function(e){return xe(e)}))]];if(Z(t))return[D,[t[0],t[1].map((function(e){return ee(e[1])?[e[0],["HistogramType",e[1],e[0]]]:e}))]]}var n;return ee(e)?["HistogramType",e]:e}function be(e){if(!Array.isArray(e))return{resultType:"untyped"};var t,n=ie(e),i=function(e){return"List"===e.name}(n)?n.type:n,o=e;return Q(o)&&(o=o[1]),Z(o)&&(o=o[1]),function(e){return Array.isArray(e)&&e[0]===z&&Array.isArray(e[1])}(o)&&(o=o[1]),te(i)&&Array.isArray(o)?{optional:Boolean(i.optional),resultType:Q(e)?"table":"row",scheme:null!==(t=i.struct.map((function(e,t){var n=e.key,i=(0,E.A)(e,me);return(0,r.A)((0,r.A)({},i),{},{index:t,name:"".concat(n),downloadable:ge(e),sortable:ye(e)})})))&&void 0!==t?t:[],columns:o.map((function(e){return xe(e[1])}))}:function(e){return"EmptyList"===e.name}(i)&&Array.isArray(o)?{resultType:"table",scheme:[],columns:[],optional:!1}:{resultType:"cell",scheme:{type:n},columns:e}}var Ae=(0,s.A)("yql-node-schemas");function we(e){var t=e.className,n=e.schemas;return(0,d.jsxs)("div",{className:Ae(null,t),children:[n.inputs.length>0&&(0,d.jsx)(Ee,{title:"Inputs",schemas:n.inputs}),n.outputs.length>0&&(0,d.jsx)(Ee,{title:"Outputs",schemas:n.outputs})]})}function Ee(e){var t=e.title,n=e.schemas;return(0,d.jsx)(c.A,{className:Ae("item",{title:!0}),size:"ss",name:t,collapsed:!1,children:(0,d.jsx)("div",{children:n.map((function(e){var t=e.name,r=be(e.type),i="table"===r.resultType||"row"===r.resultType?r.scheme:void 0;return i?(0,d.jsx)(c.A,{className:Ae("item",{schema:!0}),size:"ns",name:t,collapsed:1!==n.length,children:(0,d.jsx)("div",{children:(0,d.jsx)(pe,{schemaFields:i})},t)},t):null}))})})}var _e=n(51238),Ce=(0,s.A)("node-stages"),je=[{name:"stage",header:"Stage",sortable:!1},{name:"duration",header:"Duration",align:y.Ay.RIGHT,sortable:!1,width:115}];function ke(e){var t=e.stages,n=function(e,t,n){var r=[],o=Object.keys(e).length;if(!o)return r;for(var a=(0,i.A)(Object.entries(e[0])[0],2),s=a[0],u=a[1],l=u,c=1;c<o;c++){var d=(0,i.A)(Object.entries(e[c])[0],2),f=d[0],h=d[1];r.push({stage:s,duration:(0,_e.p0)(u,h)}),s=f,u=h}var v=(0,_e.sj)(t)?null!=n?n:u:void 0;return r.push({stage:s,duration:(0,_e.p0)(u,v)}),r.push({stage:"Total",duration:(0,_e.p0)(l,v),footerIndex:" "}),r}(void 0===t?{}:t,e.state,e.finishedAt);return(0,d.jsx)("div",{className:Ce(),children:(0,d.jsx)(y.Ay,{theme:"yandex-cloud",rowClassName:Se,columns:je,startIndex:1,data:n.slice(0,-1),footerData:n.slice(-1)})})}function Se(e,t,n,r){return Ce(r?"header":n?"footer":"row")}var Te=(0,s.A)("operation-node-info");function Ne(e){var t,n=e.progress,s=e.details,u=e.schemas,l=e.containerRef,c=e.radioWidth,f=e.className,v=[];(0,_e.eg)(n)&&v.push({value:"stages",content:"Stages"}),(0,_e.b_)(s)&&v.push({value:"details",content:"Details"}),(0,_e.pv)(n)&&v.push({value:"jobs",content:"Jobs"}),u&&v.push({value:"schemas",content:"Schemas"});var p=o.useState(null===(t=v[0])||void 0===t?void 0:t.value),m=(0,i.A)(p,2),g=m[0],y=m[1];return(0,d.jsxs)("div",{ref:l,className:Te(null,f),children:[v.length>1&&(0,d.jsx)(a.a,{className:Te("selector"),value:g,options:v,onUpdate:y,width:c}),"stages"===g&&(0,d.jsx)(ke,(0,r.A)({},n)),"details"===g&&(0,d.jsx)(h,(0,r.A)({},s)),"jobs"===g&&(0,d.jsx)(A,(0,r.A)({},n)),"schemas"===g&&u&&(0,d.jsx)(we,{className:Te("schema"),schemas:u})]})}},92603:(e,t,n)=>{"use strict";n.d(t,{Bf:()=>m,IQ:()=>g,gi:()=>p,oy:()=>h,rk:()=>f,wE:()=>v});var r=n(9736),i=n(77810),o=n(64922),a=i.createContext(void 0),s=i.createContext(void 0),u=i.createContext(void 0),l=i.createContext(void 0),c=i.createContext(void 0),d=[{value:"graph",content:"Graph"},{value:"timeline",content:"Timeline"}];function f(e){var t=e.plan,n=e.progress,f=e.children,h=e.defaultView,v=i.useMemo((function(){return d}),[!1]),p=v[0].value,m=i.useState(null!=h?h:p),g=(0,r.A)(m,2),y=g[0],x=g[1],b=y;return v.find((function(e){return e.value===b}))||(b=p),(0,o.jsx)(a.Provider,{value:null!=t?t:null,children:(0,o.jsx)(u.Provider,{value:v,children:(0,o.jsx)(s.Provider,{value:b,children:(0,o.jsx)(l.Provider,{value:x,children:(0,o.jsx)(c.Provider,{value:null!=n?n:null,children:f})})})})})}function h(){var e=i.useContext(a);if(void 0===e)throw new Error("useResultPlan must be used within a PlanProvider");return e}function v(){var e=i.useContext(c);if(void 0===e)throw new Error("useResultProgress must be used within a PlanProvider");return e}function p(){var e=i.useContext(s);if(void 0===e)throw new Error("usePlanView must be used within a PlanProvider");return e}function m(){var e=i.useContext(u);if(void 0===e)throw new Error("usePlanView must be used within a PlanProvider");return e}function g(){var e=i.useContext(l);if(void 0===e)throw new Error("useSetPlanView must be used within a PlanProvider");return e}},91009:(e,t,n)=>{"use strict";n.d(t,{k:()=>i,B:()=>o});var r=n(34108);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body;return getComputedStyle(t).getPropertyValue(e)}function o(e){return(0,r.Mj)(e).toHex()}(0,r.X$)([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"])}])},51238:(e,t,n)=>{"use strict";n.d(t,{$u:()=>$,AX:()=>z,CJ:()=>m,DW:()=>k,GE:()=>M,Ie:()=>y,Ml:()=>S,RQ:()=>F,SV:()=>g,ZG:()=>T,b_:()=>N,eg:()=>O,lt:()=>I,p0:()=>w,pv:()=>R,ry:()=>D,sj:()=>E,vk:()=>j});var r=n(9736),i=n(70353),o=n(13322),a=n(74360),s=n(77810),u=n(73966),l=n(34563),c=n(16040),d=n(74879),f=n(96843),h=n.n(f),v=n(55338);function p(e){return"number"==typeof e?v.c9.fromMillis(e):"string"==typeof e?v.c9.fromISO(e):e instanceof Date?v.c9.fromJSDate(e):v.c9.isDateTime(e)?e:v.c9.now()}function m(e,t){return"object"===(0,a.A)(e)&&e&&Reflect.has(e,t)}function g(e){var t,n=null,r=function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];t=i,null===n&&(n=requestAnimationFrame((function(){n=null,e.apply(void 0,(0,o.A)(t))})))};return r.cancel=function(){n&&cancelAnimationFrame(n),n=null},r}var y={NotStarted:{title:"Not started"},Started:{title:"Waiting"},InProgress:{title:"Running"},Finished:{title:"Completed"},Failed:{title:"Failed"},Aborted:{title:"Aborted"}},x=25;function b(e){return e.length>x?"…"+e.slice(-x):e}function A(e,t){try{var n=Object.keys(t[Object.keys(t).length-1])[0];return"".concat(b(e),"\n(").concat(n,")")}catch(e){return""}}function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"h:mm:ss.SSS",r=p(e),i=p(t),o=i.diff(r);return r>i?o.negate().toFormat(n):o.toFormat(n)}function E(e){return e&&["Finished","Failed","Aborted"].indexOf(e)>=0}function _(e){var t,n,r=e.type,i=e.node,o=e.colors,a=o.operation,s=o.text,f=document.createElement("div"),h=[],v=[],p=s.operationCount;if("update"===r)switch(null==i?void 0:i.state){case"Started":v.push({label:"Started",count:1}),h.push(a.started),n=a.startedBorder;break;case"Failed":v.push({label:"Failed",count:1}),h.push(a.failed),n=a.failedBorder;break;case"Aborted":v.push({label:"Failed",count:1}),h.push(a.aborted),n=a.abortedBorder;break;case"InProgress":var m,g,y=i.total||1,x=Math.round((null!==(m=i.running)&&void 0!==m?m:0)/y*100),b=Math.round((null!==(g=i.completed)&&void 0!==g?g:0)/y*100),A=Math.round(100-x-b);b>0&&(v.push({label:"Completed",count:b}),h.push(a.completed)),x>0&&(v.push({label:"Running",count:x}),h.push(a.running)),A>0&&(v.push({label:"Least",count:A}),h.push(a.started)),p=s.label,n=a.runningBorder;break;case"Finished":v.push({label:"Completed",count:1}),h.push(a.completed),n=a.completedBorder}else v.push({label:"Least",count:100}),h.push(a.new),n=a.newBorder;var w=(0,u.A)(h),E=Math.min(80,80)/2,_=(0,l.A)(f).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)"),C=(0,c.A)().innerRadius(0).outerRadius(E-2),j=(0,d.A)().value((function(e){return e.count})).sort(null);if(_.selectAll("path").data(j(v)).enter().append("path").attr("d",C).attr("fill",(function(e){return w(e.data.label)})),i&&(null!==(t=i.total)&&void 0!==t?t:0)>0){var k,S=Number(null!==(k=i.total)&&void 0!==k?k:0),T=function(e){switch(Math.floor(Math.log10(e))+1){case 1:return 34;case 2:return 30;case 3:return 26;default:return 24}}(S);_.selectAll("text").data([i]).enter().append("text").text(S).attr("fill",p).attr("font-family","YS Text, Arial, sans-serif").attr("font-size","".concat(T)).attr("stroke-width","0").attr("transform","translate(0, ".concat(T/3,")")).attr("text-anchor","middle")}return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(f.innerHTML)}function C(e,t){var n,o=[],a=(0,i.A)(t);try{var s=function(){var t=(0,r.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&&o.push({name:"".concat(s.Cluster,".`").concat(u.Table,"`"),type:u.Type})}};for(a.s();!(n=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return o}function j(e){var t,n=e.Basic,r=e.Detailed,o=[],a=[],s=(0,i.A)(n.nodes);try{var u=function(){var e,n=t.value,i="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=C(r.Providers,a.Inputs)),null!=a&&a.Outputs&&Array.isArray(null==a?void 0:a.Outputs)&&(s.outputs=C(r.Providers,a.Outputs))),o.push({id:n.id,level:Number(n.level),title:i,type:n.type,label:b(i),shape:"image",details:a,schemas:s.inputs.length>0||s.outputs.length>0?s:void 0})};for(s.s();!(t=s.n()).done;)u()}catch(e){s.e(e)}finally{s.f()}return n.links.forEach((function(e){a.push({from:e.source,to:e.target})})),{nodes:o,edges:a}}function k(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:b(null!=d?d:""),type:"op"}}if(l){var f,v,p=t[u];l.progress=p,p.stages&&!h()(p.stages)&&(E(p.state)?l.label=b(null!==(f=l.title)&&void 0!==f?f:""):l.label=A(null!==(v=l.title)&&void 0!==v?v:"",p.stages)),"function"==typeof n&&(l=n(l)),r&&(l.image=_({type:"update",node:p,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 S(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=_(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 T(e,t){var n=[];e.forEach((function(e){n.push(t(e))})),n.length>0&&e.updateOnly(n)}function N(e){return Boolean(e&&(e.Streams||e.InputColumns||e.InputKeyFilterColumns))}function R(e){var t;return(null!==(t=null==e?void 0:e.total)&&void 0!==t?t:0)>0}function O(e){return!h()(null==e?void 0:e.stages)}function I(e){var t=e.progress;if(t){if(R(t))return!0;if(O(t))return!0}return N(e.details)||Boolean(e.schemas)}function M(e){var t=s.useState((function(){return P(e)})),n=(0,r.A)(t,2),i=n[0],o=n[1];return s.useEffect((function(){var t=!1,n=function(){t||o(P(e))};return e.on("*",n),function(){t=!0,e.off("*",n)}}),[e]),i}var L=Object.keys(y);function P(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}})),L.map((function(e){return{state:e,title:y[e].title,count:t[e]||0}}))}function D(e,t,n){for(var r=e.getConnectedNodes(n),a=new Set([n]),s=function(){var n,s=r.shift();if("string"==typeof s&&0===(null===(n=t.get(s))||void 0===n?void 0:n.size)){var u,l=e.getConnectedEdges(s),c=(0,i.A)(l);try{for(c.s();!(u=c.n()).done;){var d=u.value;a.has(d)||(a.add(d),r.push.apply(r,(0,o.A)(e.getConnectedNodes(d).filter((function(e){return"string"==typeof e&&s!==e})))))}}catch(e){c.e(e)}finally{c.f()}}};r.length>0;)s();return a}function z(e,t,n){var r,o=e.getConnectedEdges(n),a=new Set,s=(0,i.A)(o);try{for(s.s();!(r=s.n()).done;){var u,l=D(e,t,r.value),c=(0,i.A)(l);try{for(c.s();!(u=c.n()).done;){var d=u.value;a.add(d)}}catch(e){c.e(e)}finally{c.f()}}}catch(e){s.e(e)}finally{s.f()}return a}function $(e,t){var n=t.operation,r=document.createElement("div"),i=[],o=[],a=null!=e?e:{},s=a.running,f=void 0===s?0:s,h=a.completed,v=void 0===h?0:h,p=a.total||1,m=Math.round(f/p*100),g=Math.round(v/p*100),y=Math.round(100-m-g);g>0&&(o.push({label:"Completed",count:g}),i.push(n.completed)),m>0&&(o.push({label:"Running",count:m}),i.push(n.running)),y>0&&(o.push({label:"Least",count:y}),i.push(n.started));var x=(0,u.A)(i),b=Math.min(80,80)/2,A=(0,l.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)"),w=(0,c.A)().innerRadius(b-10).outerRadius(b),E=(0,d.A)().value((function(e){return e.count})).sort(null);return A.selectAll("path").data(E(o)).enter().append("path").attr("d",w).attr("fill",(function(e){return x(e.data.label)})),"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(r.innerHTML)}function F(){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)}))}}},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(11229),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(89947),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})}))},74663:(e,t,n)=>{"use strict";n.d(t,{w:()=>Ps});var r=n(68175),i=n(9736),o=n(77810),a=n(76872),s=n(91326),u=n(15647),l=n(11229),c=n(46493),d=n(35788),f=n(51444),h=n(18309),v=n(75014),p=n(82964),m=n(3035),g=n(73822),y=n(53246),x=n(4224),b=n(85137),A=n(92423),w=n(72679),E=n(37267),_=n(64994),C=n(13395),j=n(63192),k=n(64922),S=(0,a.A)("query-meta-info"),T=o.memo((function(e){var t=e.query,n=e.className,r=(0,o.useMemo)((function(){return t&&(0,h.lq)(t)}),[t]),i=(0,u.wA)(),a=(0,o.useCallback)((function(){i((0,j.ib)())}),[i]);return(0,k.jsxs)("div",{className:S(null,n),children:[(0,k.jsx)(_.C,{className:S("item"),mode:"both",status:t.state}),(0,k.jsx)(E.H,{query:t,className:S("item")}),(0,k.jsx)(b.E,{className:S("item"),children:g.A.format.DateTime(t.start_time,{format:"short"})}),(0,k.jsxs)(b.E,{className:S("item"),color:"secondary",children:["by ",t.user]}),r&&(0,k.jsxs)(A.$,{size:"s",onClick:a,children:[(0,k.jsx)(w.I,{data:C.A}),"Stop"]})]})})),N=n(74360),R=n(90826),O=n(63366),I=n(28640),M=(0,a.A)("query-meta-table"),L=M("title"),P=M("value"),D=["query","access_control_object"];function z(e){var t=e.query,n=e.className,r=(0,o.useState)(null),a=(0,i.A)(r,2),s=a[0],u=a[1],l=(0,o.useState)(!1),c=(0,i.A)(l,2),d=c[0],f=c[1],h=(0,o.useMemo)((function(){return Object.entries(t).filter((function(e){var t=(0,i.A)(e,1)[0];return!D.includes(t)})).map((function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1],o="object"===(0,N.A)(r),a=r;return o&&(a=(0,k.jsx)(A.$,{view:"outlined",onClick:function(){u(r),f(!0)},children:"View details"})),{title:n,value:a,showCopy:"id"===n}}))}),[t]);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("dl",{className:M(null,n),children:h.map((function(e){var t=Array.isArray(e.value)?e.value:[e.value];return(0,k.jsxs)(o.Fragment,{children:[(0,k.jsx)("dt",{className:L,children:g.A.format.Readable(e.title)}),t.map((function(t,n){return(0,k.jsxs)("dd",{className:P,children:["boolean"==typeof t?String(t):t,e.showCopy&&(0,k.jsx)(I.A,{size:"s",text:t,inlineMargins:!0})]},n)}))]},e.title)}))}),(0,k.jsx)(O.A,{visible:d,disableBodyScrollLock:!0,onOutsideClick:function(){return f(!1)},onCancel:function(){return f(!1)},children:s&&(0,k.jsx)(R.A,{value:s,settings:{}})})]})}var $=n(40319),F=n(79726),U=n(43359);const q=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},e),{},{children:(0,k.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(64644),H=n(81039),V=n(94430),Y=o.memo((function(e){var t=e.allColumns,n=e.columns,r=e.className,i=e.onChange,a=(0,o.useCallback)((function(e){i(e)}),[i]),s=(0,o.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,k.jsx)(k.Fragment,{children:(0,k.jsx)(V.g,{className:r,renderItemValue:function(e){return e.displayName},getItemId:function(e){return e.name},value:s,items:t,switcher:(0,k.jsxs)(A.$,{size:"m",title:"Choose result columns",view:u,children:[(0,k.jsx)(w.I,{data:H.A}),"Columns ",(0,k.jsx)(b.E,{color:"secondary",children:(null==s?void 0:s.length)+"/"+t.length})]}),onUpdate:a})})})),W=n(28407),G=n(29121),K=n(12937),X=n(10785),Q=n(26718),J=n(70232),Z=n.n(J),ee=n(97691),te=n.n(ee),ne=n(52797),re=n(44868),ie=n(55956),oe=n(51194),ae=n(29081),se=n(14475),ue=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.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:te().stringify(r),error:n}}},{key:"getDownloadLink",value:function(){var e=this.props,t=e.getDownloadBaseUrl,n=e.cluster,r=e.queryId,i=this.state,o=i.rowsMode,a=i.startRow,s=i.numRows,u=i.format,l=i.number_precision_mode,c=this.getDownloadParams(),d=c.query,f=c.error;if("excel"===u){var h="".concat((0,ae.t1)({cluster:n}),"/").concat(n,"/api/export-query-result"),v=new URLSearchParams({number_precision_mode:l,result_index:"0",query_id:r});"range"===o&&(v.append("lower_row_index",a.toString()),v.append("upper_row_index",(a+s).toString()));var p=this.prepareColumnsForColumnMode(!1),m=p?"&"+p.map((function(e){return"columns=".concat(e)})).join("&"):"";return{url:"".concat(h,"?").concat(v).concat(m),error:f}}var g=t("range"===o?{start:a,end:a+s}:void 0);return{url:"".concat(g,"&").concat(d),error:f}}}]),n}(re.q),le=o.memo((function(e){var t,n,r=e.queryId,a=e.resultIndex,s=e.allColumns,l=e.visibleColumns,c=e.className,d=(0,u.d4)(ne.dB),f=(0,u.d4)((function(e){return(0,U.iI)(e,r,a)})),h=(0,oe._)(),v=null!=f&&f.resultReady&&(null==f?void 0:f.page)*(null==f||null===(t=f.settings)||void 0===t?void 0:t.pageSize)||0,p=(0,o.useMemo)((function(){return s.map((function(e){return{name:e.displayName,checked:!l||(null==l?void 0:l.includes(e.name))}}))}),[s,l]),m=(0,o.useState)(!1),g=(0,i.A)(m,2),y=g[0],x=g[1],b=function(){var e=(0,W.A)(Z().mark((function e(t,n){return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h((0,se.P)(t,n));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),A=function(){var e=(0,W.A)(Z().mark((function e(t,n){return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h((0,se.P)(t,n,!0));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,k.jsx)(ue,{getDownloadBaseUrl:function(e){return h((0,ie.BK)(d,r,a,e))},proxy:"",externalProxy:"",toggleVisible:function(){},transaction_id:void 0,queryId:r,resultIndex:a,className:c,cluster:d,rowCount:null!=f&&f.resultReady?null==f?void 0:f.meta.data_statistics.row_count:0,allColumns:p,srcColumns:p,columns:p,pageSize:null!=f&&f.resultReady&&(null==f||null===(n=f.settings)||void 0===n?void 0:n.pageSize)||50,showDecoded:!1,loading:!1,path:"",visible:y,handleShow:function(){return x(!0)},handleClose:function(){return x(!1)},offsetValue:v,isSchematicTable:!0,downloadFile:b,downloadToClipboard:A})})),ce=(0,a.A)("query-result-actions"),de=[{value:"table",content:"Full result"},{value:"scheme",content:"Scheme"}];function fe(e){var t,n,r,i,a,s=e.query,l=e.resultIndex,c=(0,u.wA)(),d=(0,u.d4)((function(e){return(0,U.iI)(e,s.id,l)})),f=(0,o.useCallback)((function(){var e;c({type:p.NJ,data:{queryId:s.id,index:l,settings:{transposed:!(null!=d&&null!==(e=d.settings)&&void 0!==e&&e.transposed)}}})}),[null==d?void 0:d.settings,c]),h=(0,o.useCallback)((function(e){c({type:p.NJ,data:{queryId:s.id,index:l,settings:{viewMode:e}}})}),[null==d?void 0:d.settings,c]),v=(0,o.useCallback)((function(e){c({type:p.NJ,data:{queryId:s.id,index:l,settings:(0,$.A)((0,$.A)({},null==d?void 0:d.settings),{},{visibleColumns:e})}})}),[null==d?void 0:d.settings,c]);return!0===(null==d?void 0:d.resultReady)?(0,k.jsxs)("div",{className:ce(),children:[(null==d||null===(t=d.settings)||void 0===t?void 0:t.viewMode)===B.F.Table&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(A.$,{className:ce("item"),onClick:f,view:null!=d&&null!==(n=d.settings)&&void 0!==n&&n.transposed?"action":"normal",children:(0,k.jsx)(w.I,{data:q,width:16})}),(0,k.jsx)(Y,{className:ce("item"),allColumns:d.columns,columns:null===(r=d.settings)||void 0===r?void 0:r.visibleColumns,onChange:v}),(0,k.jsx)(le,{queryId:s.id,resultIndex:l,className:ce("item"),allColumns:d.columns,visibleColumns:null===(i=d.settings)||void 0===i?void 0:i.visibleColumns})]}),(0,k.jsx)(F.a,{className:ce("item"),options:de,value:null==d||null===(a=d.settings)||void 0===a?void 0:a.viewMode,onUpdate:h})]}):null}var he=n(13322),ve=n(38224),pe=n.n(ve),me=n(25930),ge=n.n(me),ye=n(34455),xe=n.n(ye),be=n(62786),Ae=n(3659),we={escapeWhitespace:!1,decodeUTF8:!0,binaryAsHex:!0,escapeYQLStrings:!0,omitStructNull:!0,maxListSize:50,maxStringSize:void 0,treatValAsData:!0};function Ee(e,t,n,r){try{return Ae.A.converters.yql([e,t],n,r)}catch(t){var i;console.log(t);try{i=JSON.stringify(e)}catch(t){i=String(e)}return Ae.A.format({$value:"Failed to convert value: ".concat(i),$type:"yql.string"},n)}}function _e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:we;try{return Ae.A.format(e,t)}catch(r){var n;try{n=JSON.stringify(e)}catch(t){n=String(e)}return Ae.A.format({$value:"Failed to format value: ".concat(n),$type:"yql.string"},t)}}var Ce=1e4;function je(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:we,r={incomplete:!1},i=Ee(e,t,n,r),o=i.$tag,a=i;null!=n&&n.maxStringSize&&(a=Ee(e,t,(0,$.A)((0,$.A)({},n),{},{maxStringSize:void 0}),r));var s="",u=!0;if("yql.tagged"===a.$type&&"url"===a.$tag){var l=a.$value;"tag_value"===l.$type?s=l.$value.text||l.$value.href:"string"==typeof l.$value&&(s=l.$value)}else u=(s=_e(a,(0,$.A)((0,$.A)({},n),{},{asHTML:!1,maxStringSize:void 0}))).length<Ce;var c=u?_e(i,n):"Escaped value";return(0,$.A)((0,$.A)({},a),{},{$formattedValue:c,$fullFormattedValue:i===a?c:u?_e(a,(0,$.A)((0,$.A)({},n),{},{maxStringSize:void 0})):"",$rawValue:s,$incomplete:r.incomplete,$tagValue:o})}var ke=n(48971),Se=n(16455),Te=n(33777),Ne=n(29746),Re=n(39760),Oe=n.n(Re),Ie=n(27652);function Me(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,W.A)(Z().mark((function r(o,a){var s,u,l,c,d,f,h,v,m,g;return Z().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,l=(0,U.JO)(a(),e,t),o({type:p.uu,data:{queryId:e,index:t}}),c=n*l.pageSize,d=c+l.pageSize,r.next=7,o((0,ie.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,ke.fI)(o((0,ie.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,m=h.yql_type_registry,g=h.rows.map((function(e){return Object.entries(e).reduce((function(e,t){var n=(0,i.A)(t,2),r=n[0],o=(0,i.A)(n[1],2),a=o[0],s=o[1];return e[r]=je(a,m[Number(s)]),e}),{})})),Array.isArray(v)&&v.length&&o({type:p.zT,data:{queryId:e,index:t,results:g,settings:l,page:n}}),r.next=37;break;case 34:r.prev=34,r.t6=r.catch(0),o({type:p.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 Le=n(7787),Pe=function(e){return e.ERROR="error",e.META="meta",e.RESULT="result",e.STATISTIC="statistic",e.PROGRESS="progress",e.CHART_TAB="chart-tab",e}({}),De=function(e){return"result/".concat(e)},ze=function(e){var t=e.split("/");return null!=t&&t[1]?parseInt(null==t?void 0:t[1],10):void 0},$e=n(33026);function Fe(){var e=(0,u.d4)(l.VQ);return e?(0,k.jsx)($e.DC,{fixedHeader:!0,virtual:!1,statistic:e,visibleColumns:["min","max","avg","sum","count"]}):null}function Ue(e){var t=e.freeze,n=e.children,r=e.placeholder,i=void 0===r?null:r;return(0,k.jsx)(o.Suspense,{fallback:i,children:(0,k.jsx)(qe,{freeze:t,children:n})})}function qe(e){var t,n,r=e.freeze,i=e.children,a=o.useRef({});if(r&&!a.current.promise)throw a.current.promise=new Promise((function(e){a.current.resolve=e})),a.current.promise;if(r)throw a.current.promise;return a.current.promise&&(null===(t=(n=a.current).resolve)||void 0===t||t.call(n),a.current.promise=void 0),(0,k.jsx)(o.Fragment,{children:i})}var Be=(0,a.A)("not-render-until-first-visible");function He(e){var t=e.hide,n=e.className,r=e.children,a=o.useState(Boolean(t)),s=(0,i.A)(a,2),u=s[0],l=s[1];return o.useEffect((function(){var e=requestAnimationFrame((function(){l(Boolean(t))}));return function(){cancelAnimationFrame(e)}}),[t]),(0,k.jsx)("div",{style:u?{display:"none"}:void 0,className:Be(null,n),children:(0,k.jsx)(Ue,{freeze:u,children:r})})}var Ve=n(92603);function Ye(){var e=(0,Ve.gi)(),t=(0,Ve.Bf)(),n=(0,Ve.IQ)();return(0,k.jsx)(F.a,{options:t,value:e,onUpdate:function(e){n(e)}})}var We=n(6736),Ge=n(64196),Ke=n(8208),Xe=n(76662),Qe=n(24966),Je=n(77950),Ze=n(27222),et=n(14633),tt=n(27814),nt=n(29870),rt=(0,a.A)("data-type-popup");function it(e){var t=e.children,n=e.type,r=e.hideIcon,i=e.className;return n?(0,k.jsx)(et.A,{className:rt(null,i),tooltipClassName:rt("tooltip"),content:n?(0,k.jsx)("div",{className:rt("tooltip-container"),children:(0,k.jsx)(nt.A,(0,$.A)({},n))}):null,hasArrow:!1,delayOpening:400,children:(0,k.jsxs)("span",{className:rt("container"),children:[t,!r&&(0,k.jsx)(w.I,{className:rt("icon"),data:tt.A,size:12})]})}):(0,k.jsx)("span",{className:rt(null,i),children:t})}var ot=n(77318),at=n(93209),st=n(81970),ut=(0,a.A)("yql-result-table"),lt=Symbol("__index__");function ct(e,t){return n=e,r=lt,"object"===(0,N.A)(n)&&n&&Reflect.has(n,r)?e[lt]:t;var n,r}function dt(){window.dispatchEvent(new Event("resize"))}var ft={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:Xe.zQ,stickyTop:0,syncHeadOnResize:!0},ht=(0,$.A)((0,$.A)({},ft),{},{displayIndices:!1}),vt=[];function pt(e){var t=e.className,n=e.header,a=void 0===n?vt:n,s=e.rows,u=void 0===s?vt:s,l=e.totals,c=void 0===l?vt:l,d=e.showColumns,f=void 0===d?vt:d,h=e.theme,v=void 0===h?"yandex-cloud":h,p=e.format,m=e.formatterSettings,g=e.defaultNumberAlign,y=void 0===g?Ze.Ay.RIGHT:g,x=e.resultType,A=e.emptyDataMessage,w=e.message,E=e.isError,_=e.transpose,C=void 0!==_&&_,j=e.page,S=void 0===j?1:j,T=e.pageSize,N=void 0===T?u.length:T,R=e.startIndex,O=e.sortOrder,I=e.onSort,M=e.showFullValueInDialog,L=e.containerRef,P=e.onShowPreview,D="function"==typeof I,z=o.useMemo((function(){var e=a.map((function(e){var t=e.name,n=e.displayName,r=e.type,i=void 0===r?{}:r;return{name:t,header:(0,k.jsx)(it,{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:D&&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 a,s=n,u=s.value,l=s.index;if(!u)return(0,k.jsx)("span",{className:"unipika",children:"<unsupported data type>"});a=Object.prototype.hasOwnProperty.call(u,"$formattedValue")?u.$formattedValue:p(u,m);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:a;if("yql.string"===u.$type&&a.startsWith('<span class="quote">'))c=a;else{var h=a.split("\n");c=h.length>8?h.slice(0,5).join("\n"):a}var v=c!==f,g=u.$additions?(0,k.jsxs)(o.Fragment,{children:[(0,k.jsx)("br",{}),(0,k.jsx)(b.E,{color:"light-hint",children:u.$additions})]}):null,y=function(){P(t,l)},x=u.$incomplete,A=u.$tagValue;return v?(0,k.jsxs)(xt,{rawValue:d,onPreviewClick:y,isTruncated:x,tag:A,children:[M?(0,k.jsx)(o.Fragment,{children:(0,k.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:c}})}):(0,k.jsx)(gt,{onClick:dt,strippedDown:c,formattedValue:f}),g]}):(0,k.jsxs)(xt,{rawValue:d,onPreviewClick:y,isTruncated:x,tag:A,children:[(0,k.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:a}}),g]})},align:i.numeric?y:void 0}}));return e}),[a,D,y,p,m,M,P]),F=(S-1)*N,U=D?1:null!=R?R:F+1,q=o.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,$.A)((0,r.A)({},lt,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[lt]-t[lt]})),o}(u,z,O,U)}),[u,z,O,U]),B=o.useMemo((function(){var e=f.map((function(e){return z.find((function(t){return t.name===e}))})).filter(Boolean),t=q.slice(F,F+N);if(!C)return[e,t,c];var n=t.map((function(e,t){return{name:String(F+t),header:mt(e),render:function(t){var n=t.value;return n.column.render({value:n.data,row:e})}}})).concat(c.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=F;n<F+N&&n!==q.length;n++)t[String(n)]={column:e,data:q[n][e.name]};return c.forEach((function(n,r){t["footer".concat(r)]={column:e,data:n[e.name]}})),t}));return[[{name:"name",header:"Name"}].concat((0,he.A)(n)),r,[]]}),[f,q,F,N,C,c,z]),H=(0,i.A)(B,3),V=H[0],Y=H[1],W=H[2];return"table"===x?(0,k.jsx)("div",{ref:L,className:ut(null,t),children:(0,k.jsx)(ot.Ay,{columns:V,data:Y,footerData:0===W.length?void 0:W,settings:C?ht:ft,startIndex:U,emptyDataMessage:A,theme:v,rowKey:ct,sortOrder:O,onSort:I,visibleRowIndex:C?void 0:mt})}):"cell"===x||"untyped"===x?(0,k.jsx)("div",{ref:L,className:ut({mode:x},t),children:(0,k.jsx)("div",{className:"unipika",dangerouslySetInnerHTML:{__html:u[0].content}})}):w?(0,k.jsx)("div",{className:ut("message",{error:E}),children:w}):null}function mt(e){return g.A.format.Number(e[lt])}function gt(e){var t=e.formattedValue,n=e.strippedDown,r=e.onClick,a=o.useState(!1),s=(0,i.A)(a,2),u=s[0],l=s[1];return(0,k.jsxs)(o.Fragment,{children:[(0,k.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:u?t:n}}),(0,k.jsx)("br",{}),(0,k.jsx)(at.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 yt=ut("cell-action");function xt(e){var t=e.children,n=e.rawValue,r=e.onPreviewClick,a=e.isTruncated,s=e.tag,u=o.useRef(null),l=o.useState(!1),c=(0,i.A)(l,2),d=c[0],f=c[1];o.useEffect((function(){var e,t=null===(e=u.current)||void 0===e?void 0:e.parentElement;function n(){f(!0)}function r(e){null!=t&&t.contains(e.relatedTarget)||f(!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)}}),[]);var h=Boolean(s&&a);return(0,k.jsxs)("span",{ref:u,children:[h?(0,k.jsx)(st.A,{theme:"warning",text:"Incomplete '".concat(s,"' type")}):(0,k.jsx)("span",{className:ut("cell-content"),children:t}),(d||h)&&(0,k.jsxs)(k.Fragment,{children:[n&&!a&&(0,k.jsx)(Je.b,{className:yt,text:n,size:"s"}),a&&(0,k.jsx)(A.$,{className:yt,view:"flat-secondary",size:"s",onClick:r,children:(0,k.jsx)(w.I,{data:Qe.A,size:"12"})})]})]})}var bt=n(31470),At=n.n(bt),wt={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}},Et=o.memo((function(e){var t=e.result,n=e.onShowPreview,r=function(e){var t,n,r=(0,o.useState)(void 0),a=(0,i.A)(r,2),s=a[0],u=a[1];(0,o.useEffect)((function(){var t=setTimeout((function(){u(e)}),0);return function(){clearTimeout(t)}}),[e]);var l=(0,o.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,o.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),a=(0,i.A)(r,5),s=a[0],u=a[1],l=a[2],c=a[3],d=a[4];return(0,k.jsx)(pt,{format:_e,formatterSettings:wt,header:u,rows:s,transpose:c,resultType:"table",showColumns:l,defaultNumberAlign:"left",startIndex:d,theme:Xe.ll,onShowPreview:n})}),(function(e,t){var n,r,i,o;return e.result.columns===t.result.columns&&e.result.results===t.result.results&&At()(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)})),_t=(0,a.A)("query-result-scheme"),Ct={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:Xe.zQ,stickyTop:0},jt=[{name:"name",header:"Name",sortable:!1,width:"auto",render:function(e){var t=e.row;return(0,k.jsx)("span",{className:_t("item"),children:(0,k.jsx)("span",{className:_t("name"),title:t.name,children:t.name})})}},{name:"type",header:"Type",width:"auto",sortable:!1,render:function(e){var t=e.row;return(0,k.jsx)(nt.A,(0,$.A)({},t.type))}}],kt=o.memo((function(e){var t=e.result;return(0,k.jsx)(Ze.Ay,{theme:"yandex-cloud",columns:jt,data:t.columns,startIndex:1,settings:Ct})}));function St(e){var t=e.result,n=e.className;return(0,k.jsxs)("div",{className:_t(null,n),children:[(0,k.jsx)(b.E,{variant:"subheader-2",as:"div",className:_t("title"),children:"Scheme"}),(0,k.jsx)("div",{className:_t("table-wrap"),children:(0,k.jsx)(kt,{result:t})})]})}var Tt=n(59700),Nt=n(98364),Rt=(0,a.A)("query-result-paginator"),Ot=[{value:String(10),content:"10"},{value:String(50),content:"50"},{value:String(100),content:"100"},{value:String(200),content:"200"}];function It(e){var t=e.queryId,n=e.resultIndex,r=e.className,a=(0,u.wA)(),s=function(e,t){var n=(0,o.useState)({lastPage:0,pageSize:0}),r=(0,i.A)(n,2),a=r[0],s=r[1],l=(0,u.d4)((function(n){return(0,U.iI)(n,e,t)}));return(0,o.useEffect)((function(){if(null!=l&&l.resultReady){var e=Math.ceil(((null==l?void 0:l.meta.data_statistics.row_count)||0)/((null==l?void 0:l.settings.pageSize)||1))-1;s({pageSize:(null==l?void 0:l.settings.pageSize)||0,lastPage:e})}}),[l]),[(null==l?void 0:l.page)||0,a]}(t,n),l=(0,i.A)(s,2),c=l[0],d=l[1],f=d.pageSize,h=d.lastPage,v=(0,o.useCallback)((function(e){var r=(0,i.A)(e,1)[0];a(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:p.NJ,data:{queryId:e,index:t,settings:n}}),r(Me(e,t,0))}}(t,n,{pageSize:Number(r)}))}),[a]),m=(0,o.useCallback)((function(e){a(Me(t,n,e))}),[t]);return(0,k.jsxs)("div",{className:Rt(null,r),children:[(0,k.jsx)(Tt.l,{className:Rt("control"),value:[f.toString()],options:Ot,onUpdate:v}),(0,k.jsx)(Nt.A,{className:Rt("control"),value:c,min:0,max:h,onChange:m,step:1})]})}var Mt=n(41347),Lt=n(75566),Pt=n(76365),Dt=n(54522),zt=(0,a.A)("query-result-table");function $t(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,c=n.meta.full_result;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(He,{hide:i!==B.F.Scheme,children:(0,k.jsx)(St,{result:n})}),(0,k.jsxs)(He,{hide:i!==B.F.Table,children:[(0,k.jsxs)(We.s,{alignItems:"center",gap:2,className:zt("result-info"),children:[(0,k.jsxs)(b.E,{children:["Rows ",a,"-",s," of ",u,"".concat(l?" (truncated)":"")]}),c&&(0,k.jsx)(Ge.N,{href:"/".concat(c.cluster,"/navigation?path=//").concat(c.table_path),target:"_blank",children:(0,k.jsxs)(We.s,{alignItems:"center",gap:1,children:[(0,k.jsx)(w.I,{data:Mt.A,size:16})," View full result"]})})]}),(0,k.jsx)(Et,{result:n,onShowPreview:r})]})]})}var Ft=o.memo((function(e){var t=e.query,n=e.index,r=(0,u.wA)(),i=(0,u.d4)((function(e){return(0,U.iI)(e,t.id,n)})),a=o.useCallback((function(e,i){r(function(e,t,n){return function(){var r=(0,W.A)(Z().mark((function r(i){var o,a,s,l,c,d,f,h;return Z().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return(0,u.vA)((function(){i({type:Dt.w.REQUEST,data:{}}),i((0,Lt.ZD)())})),r.prev=1,r.next=4,i((0,ie.BH)(e,t,{start:n.rowIndex,end:n.rowIndex+1},[n.columnName],{cellsSize:Dt.F,stringLimit:Math.round(Dt.F/10)},Lt.Be.removeAllAndSave));case 4:o=r.sent,a=o.rows[0][n.columnName][0],s=o.rows[0][n.columnName][1],l=o.yql_type_registry[Number(s)],c=je(a,l,{maxListSize:void 0,maxStringSize:void 0,treatValAsData:!0}),d=c.$type,f=c.$tag,h=c.$value,i({type:Dt.w.SUCCESS,data:{data:{$value:f?h.$value:h,$type:d,$tag:f}}}),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(1),(0,Pt.m)(r.t0)||i({type:Dt.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,k.jsxs)("div",{className:zt(),children:[((null==i?void 0:i.state)===B.t.Init||(null==i?void 0:i.state)===B.t.Loading)&&(0,k.jsx)("div",{className:zt("loading"),children:(0,k.jsx)(s.a,{size:"m"})}),(null==i?void 0:i.resultReady)&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)($t,{result:i,onShowPreview:a}),i.settings.viewMode===B.F.Table&&(0,k.jsx)(It,{className:zt("pagination"),queryId:t.id,resultIndex:n})]}),(null==i?void 0:i.state)===B.t.Error&&(0,k.jsx)(Ke.z,{error:i.error})]})}),(function(e,t){return e.query.id===t.query.id&&e.index===t.index})),Ut=function(e){var t=e.query,n=e.activeResultParams,r=(0,u.wA)();return(0,o.useEffect)((function(){n&&r(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(){var n=(0,W.A)(Z().mark((function n(r,o){var a,s,u,l,c,d,f,h,v,m;return Z().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=o(),!(0,U.kz)(a,e,t)){n.next=3;break}return n.abrupt("return");case 3:return n.prev=3,r({type:p.uu,data:{queryId:e,index:t}}),n.next=7,r((0,ie.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,Ie.c)(null));case 12:return u=(0,Se.$n)(o()),l=Ne.A.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,be.Pw)((0,Te.z)(n,u)),displayName:t}}))||[],d=(0,U.GN)(),n.next=18,(0,ke.fI)(r((0,ie.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,m=h.map((function(e){return Object.entries(e).reduce((function(e,t){var n=(0,i.A)(t,2),r=n[0],o=(0,i.A)(n[1],2),a=o[0],s=o[1];return e[r]=je(a,v[Number(s)]),e}),{})})),r({type:p.dg,data:{queryId:e,index:t,results:m,columns:c,meta:s}}),n.next=27;break;case 24:n.prev=24,n.t0=n.catch(3),r({type:p.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,k.jsx)(Ft,{query:t,index:(null==n?void 0:n.resultIndex)||0})},qt=function(e){var t;return(null===(t=Le.Ay.getQueryResultChartTab())||void 0===t?void 0:t.renderContent(e))||null},Bt=function(e){return(e+1)%1e6};function Ht(){return(0,o.useReducer)(Bt,0)[1]}var Vt=n(24567),Yt=n(44304),Wt=n(55740),Gt=(0,a.A)("yql-loader");function Kt(e){var t=e.className,n=e.size,r=e.local,a=e.statical,u=e.delay,l=void 0===u?600:u,c=e.veil,d=o.useState(!1),f=(0,i.A)(d,2),h=f[0],v=f[1];return o.useEffect((function(){var e=setTimeout((function(){v(!0)}),l);return function(){clearTimeout(e)}}),[]),h?(0,k.jsx)("div",{className:Gt({local:r,veil:c,statical:a},t),children:(0,k.jsx)(s.a,{size:n})}):null}var Xt=n(92225),Qt=n(59994),Jt=n(91009),Zt=o.createContext(void 0);function en(e){var t=e.children,n=e.container,r=(0,Qt.i)(),a=o.useState((function(){return tn(n)})),s=(0,i.A)(a,2),u=s[0],l=s[1];return o.useEffect((function(){l((function(e){var t=tn(n);return At()(e,t)?e:t}))}),[r,n]),(0,k.jsx)(Zt.Provider,{value:u,children:t})}function tn(e){var t=function(t){return(0,Jt.B)((0,Jt.k)("--yql-graph-color-".concat(t),null!=e?e:void 0))};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 nn(){var e=o.useContext(Zt);if(void 0===e)throw new Error("useGraphColors must be used within a GraphColorsProvider");return e}var rn=n(36510),on=n(51238),an=n(34199),sn=n(30469),un=(0,a.A)("legend");function ln(e){var t=e.className,n=e.orientation,r=e.nodes,i=e.children,o=(0,on.GE)(r);return(0,k.jsxs)("div",{className:un({orientation:n},t),children:[o.map((function(e){var t=e.state,n=e.title,r=e.count;return(0,k.jsxs)("div",{className:un("item"),children:[(0,k.jsx)("div",{className:un("item-color",{state:t.toLowerCase()})}),(0,k.jsxs)(b.E,{className:un("item-title"),color:"complementary",children:[n,r?(0,k.jsxs)("strong",{children:[" ",r]}):null]})]},t)})),i]})}function cn(e){var t=e.className,n=e.nodes,r=o.useState("collapsed"),a=(0,i.A)(r,2),s=a[0],u=a[1];return(0,k.jsx)("div",{className:t,children:"collapsed"===s?(0,k.jsx)(A.$,{title:"Show legend",onClick:function(){u("expanded")},children:(0,k.jsx)(w.I,{data:an.A,size:16})}):(0,k.jsx)(ln,{nodes:n,children:(0,k.jsx)(A.$,{view:"flat-secondary",title:"Hide legend",onClick:function(){u("collapsed")},children:(0,k.jsx)(w.I,{data:sn.A})})})})}var dn=n(73139),fn=(0,a.A)("vis-network");function hn(e){var t=e.nodes,r=e.edges,a=e.options,s=e.className,u=e.getNetwork,l=o.useRef(null),c=o.useState(),d=(0,i.A)(c,2),f=d[0],h=d[1];return o.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()}}),[]),o.useEffect((function(){f&&(f.setData({nodes:t,edges:r}),f.once("afterDrawing",(function(){f.fit()})))}),[t,r,f]),o.useEffect((function(){f&&f.setOptions(a)}),[a,f]),o.useEffect((function(){f&&"function"==typeof u&&u(f)}),[u,f]),(0,k.jsx)("div",{ref:l,className:fn(null,s)})}var vn=(0,a.A)("yql-plan-minimap");function pn(e){var t=e.network,n=e.nodes,r=e.edges,a=e.options,s=e.className,u=function(e){return o.useMemo((function(){return(0,$.A)((0,$.A)({},e),{},{edges:(0,$.A)((0,$.A)({},e.edges),{},{selectionWidth:1}),interaction:{dragNodes:!1,dragView:!1,navigationButtons:!1,hoverConnectedEdges:!1,selectable:!1,zoomView:!1}})}),[e])}(a),l=o.useState(),c=(0,i.A)(l,2),d=c[0],f=c[1],h=o.useRef(!1);!function(e){var t=e.network,n=e.minimap,r=e.nodes;o.useEffect((function(){var e=function(e){var i=e.edge,o=(0,on.ry)(t,r,i);null==n||n.selectEdges((0,he.A)(o))},i=function(){null==n||n.unselectAll()},o=function(e){var i=e.node;if(i&&r.get(i)){var o=(0,on.AX)(t,r,i);null==n||n.selectEdges((0,he.A)(o))}},a=function(){null==n||n.unselectAll()};return t.on("hoverEdge",e),t.on("blurEdge",i),t.on("hoverNode",o),t.on("blurNode",a),function(){t.off("hoverEdge",e),t.off("blurEdge",i),t.off("hoverNode",o),t.off("blurNode",a)}}),[t,n,r])}({network:t,minimap:d,nodes:n});var v=function(e){var t=e.network,n=e.minimap,r=o.useRef(null);return o.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:d});return o.useEffect((function(){var e=function(){h.current=!1};return window.addEventListener("mouseup",e),function(){window.removeEventListener("mouseup",e)}}),[]),o.useEffect((function(){d&&d.fit()}),[d]),(0,k.jsxs)(dn.Z,{className:vn(null,s),type:"action",children:[(0,k.jsx)(hn,{nodes:n,edges:r,options:u,className:vn("minimap"),getNetwork:f}),(0,k.jsx)("div",{className:vn("wrapper"),onMouseDown:function(e){if(d){var n=d.DOMtoCanvas({x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY});t.moveTo({position:n}),h.current=!0}},onMouseMove:function(e){if(d&&h.current){var n=d.DOMtoCanvas({x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY});t.moveTo({position:n})}}}),(0,k.jsx)("div",{ref:v,className:vn("radar")})]})}var mn=n(70353);function gn(e,t){var n,r,i={},o=[],a=new Map,s=0,u=(0,mn.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,$.A)({},l),in:[],out:[]}}}catch(e){u.e(e)}finally{u.f()}var d,f=(0,mn.A)(t);try{for(f.s();!(d=f.n()).done;){var h=d.value,v=a.get(h.from),p=a.get(h.to);void 0!==v&&void 0!==p&&(i[v].out.push(p),i[p].in.push(v))}}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 yn(e,t,n){for(var r=0,i=0;i<t.length;i++){var o,a=t[i],s=t[i+1],u=(0,mn.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 xn(e,t,n){var r,i=n.reduce((function(e,t,n){return e[t]=n,e}),{}),o=[],a=(0,mn.A)(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;o.push.apply(o,(0,he.A)(e[s].out.map((function(e){return i[e]})).sort((function(e,t){return e-t}))))}}catch(e){a.e(e)}finally{a.f()}for(var u=1;u<n.length;)u*=2;var l=2*u-1;u-=1;var c=new Array(l).fill(0),d=0;return o.forEach((function(e){var t=e+u;for(c[t]++;t>0;)t%2&&(d+=c[t+1]),c[t=t-1>>1]++})),d}function bn(e,t){for(var n=0,r=1;r<t.length;++r)n+=xn(e,t[r-1],t[r]);return n}function An(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 wn(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 En(e,t,n){if(n%2==0)for(var r=1;r<t.length;r++){var i,o={},a=(0,mn.A)(t[r]);try{for(a.s();!(i=a.n()).done;){var s=i.value;o[s]=An(e[s].in,t[r-1])}}catch(e){a.e(e)}finally{a.f()}wn(t[r],o)}else for(var u=t.length-2;u>=0;u--){var l,c={},d=(0,mn.A)(t[u]);try{for(d.s();!(l=d.n()).done;){var f=l.value;c[f]=An(e[f].out,t[u+1])}}catch(e){d.e(e)}finally{d.f()}wn(t[u],c)}}function _n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Cn(e,t,n){var r=0;return n>0&&(r+=xn(e,t[n-1],t[n])),n<t.length-1&&(r+=xn(e,t[n],t[n+1])),r}function jn(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=Cn(e,t,i),s=0;s<o.length-1;s++){_n(o,s,s+1);var u=Cn(e,t,i);a>u?(n=!0,a=u):_n(o,s,s+1)}}}function kn(e,t,n){for(var r=function(e,t){for(var n=(0,he.A)(t[0]),r=[],i=new Set(n);n.length>0;){var o=n.shift();if(void 0===o)break;var a=e[o],s=r[a.rank];s||(r[a.rank]=s=[]),s.push(o);var u,l=(0,mn.A)(a.out);try{for(l.s();!(u=l.n()).done;){var c=u.value;i.has(c)||(i.add(c),n.push(c))}}catch(e){l.e(e)}finally{l.f()}}return r}(e,t),i=r.map((function(e){return(0,he.A)(e)})),o=bn(e,r),a=0,s=0;s<4&&a<24;a++,s++){En(e,r,a),n||jn(e,r);var u=bn(e,r);o>u&&(o=u,i=r.map((function(e){return(0,he.A)(e)})),s=0)}return i.forEach((function(t){t.forEach((function(t,n){e[t].order=n}))})),i}function Sn(e,t,n){var r=e[t];r||(e[t]=r=new Set),r.add(n)}function Tn(e,t,n){return e[t]&&e[t].has(n)||e[n]&&e[n].has(t)}function Nn(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 Rn(e,t){var n,r=function(e,t){var n={};return Object.entries(e).forEach((function(e){var t=(0,i.A)(e,2),r=t[0];t[1].forEach((function(e){Sn(n,r,e)}))})),Object.entries(t).forEach((function(e){var t=(0,i.A)(e,2),r=t[0];t[1].forEach((function(e){Sn(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||Sn(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)&&Sn(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)),o={};["u","d"].forEach((function(i){n="u"===i?t:(0,he.A)(t).reverse(),["l","r"].forEach((function(t){"r"===t&&(n=n.map((function(e){return(0,he.A)(e).reverse()})));var a=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]&&!Tn(n,t,f)&&(o[f]=t,o[t]=i[t]=i[f],s=a[f])}}}))})),{root:i,align:o}}(e,n,r,"u"===i?"in":"out"),s=a.root,u=a.align,l=Nn(e,n,s,u,"d"===i);"r"===t&&Object.keys(l).forEach((function(e){l[e]=-l[e]})),o[i+t]=l}))}));var a=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,i.A)(e,2),o=(t[0],t[1]);n=Math.max(o+50,n),r=Math.min(o-50,r)}));var o=n-r;return e.min>o?{min:o,align:t}:e}),{min:Number.POSITIVE_INFINITY}).align}(0,o);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}))}}))}))}(o,a),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}),{})}(o)}function On(e,t){var n=Rn(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 In(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 Mn(e){return Ln.apply(this,arguments)}function Ln(){return(Ln=(0,W.A)(Z().mark((function e(t){var n,r,i,o,a,s,u,l;return Z().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=gn(n,r),a=o.graph,s=o.layering,u=o.levels,yn(a,s,u),l=kn(a,s,i),On(a,l),e.abrupt("return",In(a));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Pn=n(29202),Dn=n(16538);const zn=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 $n=(0,a.A)("graph"),Fn="".concat($n(),"_show-tooltip");function Un(e){var t=o.useRef(e);return t.current=e,t}var qn=(0,on.SV)((function(e,t){if(e)if(t)e.redraw(),e.fit();else{var n=e.getScale();e.redraw(),e.moveTo({scale:n})}}));function Bn(e){var t=e.isActive,n=e.className,r=e.graph,a=e.showMinimap,s=e.prepareNode,u=o.useState(),l=(0,i.A)(u,2),c=l[0],d=l[1],f=o.useState(null),h=(0,i.A)(f,2),v=h[0],p=h[1],m=nn(),g=function(e){return o.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])}(m),y=(0,Ve.wE)(),x=o.useState((function(){return new Vt.DataSet})),E=(0,i.A)(x,1)[0],_=o.useState((function(){return new Vt.DataSet})),C=(0,i.A)(_,1)[0],j=o.useState(!0),S=(0,i.A)(j,2),T=S[0],N=S[1],R=Ht(),O=o.useState(),I=(0,i.A)(O,2),M=I[0],L=I[1],P=o.useRef(null),D=o.useState(),z=(0,i.A)(D,2),F=z[0],U=z[1],q=(0,Yt.m)(F?{rect:{top:F.position.y,left:F.position.x}}:void 0);o.useEffect((function(){var e=function(e){var t;null!==(t=P.current)&&void 0!==t&&t.contains(e.target)||U(void 0)};return F&&window.addEventListener("click",e),function(){window.removeEventListener("click",e)}}),[F]);var B=o.useRef();o.useEffect((function(){var e;return t&&(e=requestAnimationFrame((function(){c&&T&&(c.fit(),N(!1))}))),t||U(void 0),function(){cancelAnimationFrame(e)}}),[t,c,T]);var H=Un(m),V=Un(y),Y=Un(s);o.useEffect((function(){var e=!1;function t(){return(t=(0,W.A)(Z().mark((function e(){var t,n,i,o;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Mn(r);case 2:t=e.sent,n=t.nodes,i=t.edges,o=new Vt.DataSet(n),V.current&&(0,on.DW)(o,V.current),(0,on.Ml)(o,H.current),Y.current&&(0,on.ZG)(o,Y.current),N(E.length!==o.length||C.length!==i.length),E.clear(),E.add(o.get()),C.clear(),C.add(i),R();case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return function(){return t.apply(this,arguments)}().catch((function(t){e||L(null!=t?t:"Unknown error")})),function(){e=!0}}),[r,C,E,R]),o.useEffect((function(){y&&((0,on.DW)(E,y,Y.current,H.current),R())}),[y,E,R]),o.useEffect((function(){"function"==typeof s&&((0,on.ZG)(E,s),R())}),[s,E,R]),o.useEffect((function(){(0,on.Ml)(E,m)}),[E,m]);var G=o.useRef(!0);return o.useLayoutEffect((function(){if(v&&c){var e=new Xt.A((function(){qn(c,G.current)}));return e.observe(v),function(){e.unobserve(v)}}}),[v,c]),o.useEffect((function(){if(c){var e=function(e){var t=e.edge,n=(0,on.ry)(c,E,t);c.selectEdges((0,he.A)(n))},t=function(){c.unselectAll()},n=function(e){var t=e.node;if(t){var n=E.get(t);if(B.current=null!=n?n:void 0,n){var r=(0,on.AX)(c,E,t);if(c.selectEdges((0,he.A)(r)),n.url&&(null==v||v.style.setProperty("cursor","pointer")),"in"!==n.type&&"out"!==n.type||null==v||v.classList.add(Fn),(0,on.lt)(n)){var i=c.getPosition(t),o=i.x,a=i.y,s=c.canvasToDOM({x:o+15,y:a}),u=c.canvasToDOM({x:o-15,y:a}),l=s,d="right";if(v){var f=v.getBoundingClientRect(),h=f.x,p=f.y,m=f.width;l.x+330>m&&(l=u,d="left"),l.x+=h,l.y+=p}U({progress:n.progress,details:n.details,schemas:n.schemas,position:l,placement:d})}}}},r=function(){null==v||v.classList.remove(Fn),null==v||v.style.removeProperty("cursor"),c.unselectAll(),U(void 0),B.current=void 0},i=function(){if(B.current){var e=B.current;e.url&&(0,ke.V3)(e.url)}},o=function(){G.current=!1};return c.on("hoverEdge",e),c.on("blurEdge",t),c.on("hoverNode",n),c.on("blurNode",r),c.on("click",i),c.on("zoom",o),function(){c.off("hoverEdge",e),c.off("blurEdge",t),c.off("hoverNode",n),c.off("blurNode",r),c.off("click",i),c.off("zoom",o)}}}),[c,E,v]),M?(0,k.jsx)(b.E,{color:"danger",children:"".concat(M)}):(0,k.jsx)("div",{ref:p,className:$n(null,n),children:0===E.length?(0,k.jsx)(Kt,{size:"m",local:!0}):(0,k.jsxs)(o.Fragment,{children:[(0,k.jsx)(hn,{nodes:E,edges:C,options:g,className:$n("graph"),getNetwork:d}),c&&a?(0,k.jsx)(pn,{className:$n("minimap-wrapper"),network:c,nodes:E,edges:C,options:g}):null,(0,k.jsxs)("div",{className:$n("toolbar"),children:[(0,k.jsx)(A.$,{className:$n("toolbar-button"),onClick:function(){c&&(c.moveTo({scale:1.1*c.getScale()}),G.current=!1)},children:(0,k.jsx)(w.I,{data:Dn.A,size:16})}),(0,k.jsx)(A.$,{className:$n("toolbar-button"),onClick:function(){c&&(c.moveTo({scale:c.getScale()/1.1}),G.current=!1)},children:(0,k.jsx)(w.I,{data:Pn.A,size:16})}),(0,k.jsx)(A.$,{className:$n("toolbar-button"),onClick:function(){null==c||c.fit(),G.current=!0},children:(0,k.jsx)(w.I,{data:zn,size:16})}),(0,k.jsx)(cn,{nodes:E,className:$n("toolbar-button",$n("legend"))})]}),F&&t?(0,k.jsx)(Wt.z,{anchorRef:q,open:!0,placement:F.placement,children:(0,k.jsx)(rn.A,(0,$.A)((0,$.A)({},F),{},{containerRef:P}))}):null]})})}var Hn=n(65692),Vn=n(75414),Yn=n.n(Vn),Wn=n(9335),Gn=n(79261),Kn=36e5,Xn=24*Kn,Qn=30*Xn,Jn=365*Xn,Zn=function(e){return e.CREATED="CREATED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.FAILED="FAILED",e}({});function er(e,t,n,r,i){var o="".concat(t.eventsCount);e.measureText(o).width<i&&(e.fillStyle=pr.resolveCssValue(pr.COUNTER_FONT_COLOR),e.fillText(o,n,r+pr.COUNTER_FONT_CENTER_OFFSET))}var tr,nr,rr,ir=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}({}),or="#333",ar="#777",sr="#FFF",ur="#08F",lr="#3D5",cr="#D30",dr="#F80",fr="#A5A",hr=globalThis.document.body,vr=window.getComputedStyle(hr),pr={ZOOM_MIN:5e3,ZOOM_MAX:2*Qn,PRIMARY_BACKGROUND_COLOR:sr,BOUNDARY_MARK_COLOR:or,PRIMARY_MARK_COLOR:ar,SECONDARY_MARK_COLOR:"#DDD",CONNECTION_COLOR:lr,RULER_FONT:"10px sans-serif",RULER_PRIMARY_TEXT_COLOR:"#111",RULER_SECONDARY_TEXT_COLOR:ar,RULER_TEXT_OUTLINE_COLOR:sr,RULER_LABEL_SPACING:40,RULER_GRID_SPACING:10,RULER_SUP_LABEL_POS:16,RULER_LABEL_POS:33,RULER_HEADER_HEIGHT:41,RULER_BORDER_COLOR:or,RULER_WEEKEND_COLOR:cr,EVENT_HITBOX_PADDING:2,SELECTION_OUTLINE_COLOR:ur,SELECTION_BG_COLOR:ur,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:(tr={},(0,r.A)(tr,ir.INFO,ur),(0,r.A)(tr,ir.QUEUED,fr),(0,r.A)(tr,ir.DEPRECATED,dr),(0,r.A)(tr,ir.OK,lr),(0,r.A)(tr,ir.WARNING,dr),(0,r.A)(tr,ir.DANGER,cr),(0,r.A)(tr,ir.MUTED,ar),(0,r.A)(tr,ir.DELETED,cr),tr),groupStatusColors:(nr={},(0,r.A)(nr,ir.INFO,ur),(0,r.A)(nr,ir.QUEUED,fr),(0,r.A)(nr,ir.DEPRECATED,dr),(0,r.A)(nr,ir.OK,lr),(0,r.A)(nr,ir.WARNING,dr),(0,r.A)(nr,ir.DANGER,cr),(0,r.A)(nr,ir.MUTED,ar),(0,r.A)(nr,ir.DELETED,cr),nr),regionStateColors:(rr={},(0,r.A)(rr,Zn.CREATED,ur),(0,r.A)(rr,Zn.PROCESSING,"#fe5"),(0,r.A)(rr,Zn.PROCESSED,lr),(0,r.A)(rr,Zn.FAILED,cr),rr),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=vr.getPropertyValue(n);return""!==i?i:n}return e}},mr=function(){function e(t){(0,G.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 gr(){return-1!==navigator.userAgent.indexOf("Mac OS")}function yr(e){return gr()?e.metaKey:e.ctrlKey}var xr=function(){},br=n(18801);function Ar(e,t,n){return e>=t&&e<=n}function wr(e,t,n,r){return t-e>r-n?Ar(n,e,t)||Ar(r,e,t):Ar(e,n,r)||Ar(t,n,r)}function Er(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 _r(e,t,n){return e>n?n:e<t?t:e}function Cr(e,t){return e-e%t}function jr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return e>=t-n&&e<=t+n}var kr=n(48495),Sr=n.n(kr),Tr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,G.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}(),Nr=n(7059),Rr=n.n(Nr),Or=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){var e;(0,G.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=pr.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=pr.resolveCssValue(pr.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 Er(+e,n,r,0,l)}function f(e){return Er(e,u,u+l,n,r)}function h(e,n,r,i,o){t.strokeStyle=pr.resolveCssValue(pr.RULER_TEXT_OUTLINE_COLOR);for(var a=null,s=r.start(e);+s<n;s=r.step(s)){var u=Rr()(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=Rr()(h).format(r.format),p=_r(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=pr.RULER_FONT,t.lineJoin="miter",t.miterLimit=2,t.lineWidth=1;for(var v,p,m=r-n,g=0,y=Lr.length;g<y;g+=1)if(!(m>Lr[g].domain)){for(var x=0,b=Rr()(0);+b<m;b=Lr[g].step(b))Er(+b,0,m,u,u+l)>0&&(x+=pr.RULER_LABEL_SPACING);if(!(x>l)){p=(v=Lr[g]).sup||Lr[g+1];break}}v&&h(n,r,v,s+pr.RULER_LABEL_POS,pr.resolveCssValue(pr.RULER_PRIMARY_TEXT_COLOR)),p&&h(n,r,p,s+pr.RULER_SUP_LABEL_POS,pr.resolveCssValue(pr.RULER_SECONDARY_TEXT_COLOR)),t.strokeStyle=pr.resolveCssValue(pr.RULER_BORDER_COLOR),t.beginPath(),t.moveTo(u,s+c+.5),t.lineTo(u+l,s+c+.5),t.stroke()}}]),n}(mr),Ir={start:function(e){return Rr()(e).startOf("hour")},step:function(e){return Rr()(e).add(1,"hour")},format:"HH"},Mr={start:function(e){return Rr()(e).startOf("day")},step:function(e){return Rr()(e).add(1,"day")},color:function(e){var t=Rr()(e).day();return 6===t||0===t?pr.resolveCssValue(pr.RULER_WEEKEND_COLOR):null},format:"MMM D"},Lr=[{domain:1e3,start:function(e){return Rr()(e).startOf("millisecond")},step:function(e){return Rr()(e).add(1,"millisecond")},format:"SSS[ms]",sup:{start:function(e){return Rr()(e).startOf("second")},step:function(e){return Rr()(e).add(1,"second")},format:"ss[′′]"}},{domain:6e4,start:function(e){return Rr()(e).startOf("second")},step:function(e){return Rr()(e).add(1,"second")},format:"ss[′′]",sup:{start:function(e){var t=Rr()(e).startOf("minute");return t.subtract(t.minute()%5,"minute")},step:function(e){return Rr()(e).add(5,"minute")},format:"mm[′]"}},{domain:Kn,start:function(e){var t=Rr()(e).startOf("minute");return t.subtract(t.minute()%5,"minute")},step:function(e){return Rr()(e).add(5,"minute")},format:"mm[′]",sup:Ir},{domain:Xn,start:function(e){var t=Rr()(e).startOf("minute");return t.subtract(t.minute()%15,"minute")},step:function(e){return Rr()(e).add(15,"minute")},format:"mm[′]",sup:Ir},{domain:Xn,start:function(e){return Rr()(e).startOf("hour")},step:function(e){return Rr()(e).add(1,"hour")},format:"HH",sup:Mr},{domain:Qn,start:function(e){var t=Rr()(e).startOf("hour");return t.subtract(t.hour()%4,"hour")},step:function(e){return Rr()(e).add(4,"hour")},format:"HH",sup:Mr},{domain:Qn,start:function(e){return Rr()(e).startOf("day")},step:function(e){return Rr()(e).add(1,"day")},color:function(e){var t=Rr()(e).day();return 6===t||0===t?pr.resolveCssValue(pr.RULER_WEEKEND_COLOR):null},format:"D",sup:{start:function(e){return Rr()(e).startOf("month")},step:function(e){return Rr()(e).add(1,"month")},format:"MMM YYYY"}},{domain:6*Qn,start:function(e){return Rr()(e).startOf("week").add(1,"day")},step:function(e){return Rr()(e).add(1,"week")},format:"D"},{domain:Jn,start:function(e){return Rr()(e).startOf("month")},step:function(e){return Rr()(e).add(1,"month")},format:"MMM",sup:{start:function(e){return Rr()(e).startOf("year")},step:function(e){return Rr()(e).add(1,"year")},format:"YYYY"}},{domain:10*Jn,start:function(e){var t=Rr()(e).startOf("month");return t.subtract(t.month()%3,"month")},step:function(e){return Rr()(e).add(3,"month")},format:"[Q]Q"},{domain:1/0,start:function(e){return Rr()(e).startOf("year")},step:function(e){return Rr()(e).add(1,"year")},format:"YYYY"}],Pr=function(e){return e[e.STRAIGHT=0]="STRAIGHT",e[e.DASHED=1]="DASHED",e}({}),Dr=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,G.A)(this,n),(r=t.call(this,e)).trackHeight=pr.TRACK_HEIGHT,r.strokeMode=Pr.STRAIGHT,r.axesIndex=void 0,Object.assign((0,Gn.A)(r),i),r.axesIndex=new Tr([],{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=_r(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(Or))||void 0===t?void 0:t.height)||0,r=e.ctx;this.strokeMode===Pr.DASHED&&r.setLineDash([5,3]),e.useScrollTransform(),r.translate(0,n);var i=e.canvas.width;r.strokeStyle=pr.resolveCssValue(pr.SECONDARY_MARK_COLOR),r.beginPath(),r.lineWidth=1;var o,a=(0,mn.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}(mr),zr=(0,K.A)((function e(){(0,G.A)(this,e),this.hitboxResult={top:0,right:0,bottom:0,left:0}})),$r=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.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=pr.resolveCssValue(pr.eventStatusColors[t.status]),e.arc(r,o,5,0,2*Math.PI),n&&(e.strokeStyle=pr.resolveCssValue(pr.SELECTION_OUTLINE_COLOR),e.lineWidth=pr.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();else if(t.eventsCount>1){e.fillStyle=pr.resolveCssValue(pr.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=pr.resolveCssValue(pr.SELECTION_OUTLINE_COLOR),e.lineWidth=pr.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();var a=Math.max(r,pr.COUNTER_PADDING);er(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}(zr),Fr=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.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=pr.resolveCssValue(pr.SELECTION_OUTLINE_COLOR),e.lineWidth=pr.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,s,6)),e.fillStyle=pr.resolveCssValue(pr.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=pr.resolveCssValue(pr.SELECTION_OUTLINE_COLOR),e.lineWidth=pr.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,u,l,12)),e.fillStyle=pr.resolveCssValue(pr.groupStatusColors[t.status]),e.fillRect(r,u,l,12);var c=Math.max(r+pr.COUNTER_PADDING,pr.COUNTER_PADDING);er(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}(zr),Ur=["renderers"],qr=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,G.A)(this,n),(r=t.call(this,e)).eventHitboxPadding=pr.EVENT_HITBOX_PADDING,r.eventCounterFont=pr.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:yr(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 $r],["process",new Fr]]),r.maxIndexTreeWidth=16,r.index=new(Sr())(r.maxIndexTreeWidth),r._selectedEvents=new Set,r._events=[];var o=i.renderers,a=(0,br.A)(i,Ur);if(Object.assign((0,Gn.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(Or))||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,mn.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(Dr),r=(null===(t=e.getComponent(Or))||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&&wr(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(Dr),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}(mr),Br=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,G.A)(this,n),(r=t.call(this,e)).borderColor=pr.SELECTION_OUTLINE_COLOR,r.innerColor=pr.SELECTION_BG_COLOR,r.handleCanvasMousedown=function(e){if(yr(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(qr);t&&t.selectEventsAt(e)},Object.assign((0,Gn.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=pr.resolveCssValue(this.borderColor),n.fillStyle=pr.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}(mr),Hr=n(24503),Vr=n.n(Hr),Yr=function(){function e(t,n){(0,G.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=Cr(this.from,e),this.to=Cr(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,mn.A)(t);try{for(c.s();!(s=c.n()).done;){var d=s.value;wr(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 jr(this.from,e.from,.1)&&jr(this.to,e.to,.1)}}]),e}(),Wr=function(){function e(t){(0,G.A)(this,e),this.getAxisIdentity=function(e){return e.id},this.visibleEvents=[],this.foldedEvents=[],this._timeRange=new Yr(0,0),this._viewportWidth=0,this.axesIndex=void 0,this._getRawEvents=Z().mark((function e(){return Z().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=xr,this.finalizeEvent=xr,this.overlapThreshold=pr.OVERLAPPING_THRESHOLD,this.onVisibleEventsChanged=xr,Object.assign(this,t),this.axesIndex=new Tr([],{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,jr(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];wr(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 _r(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,mn.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=_r(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,mn.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 wr(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}(),Gr=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(e){var r;return(0,G.A)(this,n),(r=t.call(this,e)).handleTimeRangeChanged=Vr()((function(e){r.mapper.timeRange.equals(e)||(r.mapper.timeRange=e)}),250),r.handleVisibleEventsChanged=function(e){r.canvasApi.getComponent(qr).events=e,r.host.scheduleTimelineRender()},r.mapper=void 0,r.events=[],r.mapper=new Wr({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(Dr);t&&(t.axes=e),this.mapper.axes=e}}},{key:"hostConnected",value:function(){this.mapper.viewportWidth=this.canvasApi.canvas.width,this.handleTimeRangeChanged(new Yr(this.host.start,this.host.end))}},{key:"hostUpdated",value:function(){var e=new Yr(this.host.start,this.host.end);this.handleTimeRangeChanged(e)}},{key:"notifyMapperEvents",value:function(){var e=Z().mark(n),t=this.events;function n(){return Z().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}(mr),Kr=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.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(Or))||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=Qr.length;f<h;f+=1)if(!(d>Qr[f].domain)){for(var v=0,p=Rr()(0);+p<d;p=Qr[f].step(p))Er(+p,0,d,0,0+l)>0&&(v+=pr.RULER_GRID_SPACING);if(!(v>l+40)){n=Qr[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=pr.GRID_STROKE_WIDTH;for(var u=s.start(o);+u<a;u=s.step(u)){var l=Math.floor(Er(+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}(mr);function Xr(e,t){return function(n){return n[t]()%e==0?pr.resolveCssValue(pr.PRIMARY_MARK_COLOR):pr.resolveCssValue(pr.SECONDARY_MARK_COLOR)}}var Qr=[{domain:Kn,style:Xr(5,"minute"),start:function(e){return Rr()(e).startOf("minute")},step:function(e){return e.add(1,"minute")}},{domain:Xn,style:function(e){return 0===e.hour()&&0===e.minute()?pr.resolveCssValue(pr.BOUNDARY_MARK_COLOR):e.minute()%4==0?pr.resolveCssValue(pr.PRIMARY_MARK_COLOR):pr.resolveCssValue(pr.SECONDARY_MARK_COLOR)},start:function(e){var t=Rr()(e).startOf("minute");return t.subtract(t.minute()%15,"minute")},step:function(e){return e.add(15,"minute")}},{domain:Qn,style:function(e){return 0===e.hour()?pr.resolveCssValue(pr.BOUNDARY_MARK_COLOR):e.hour()%4==0?pr.resolveCssValue(pr.PRIMARY_MARK_COLOR):pr.resolveCssValue(pr.SECONDARY_MARK_COLOR)},start:function(e){return Rr()(e).startOf("hour")},step:function(e){return e.add(1,"hour")}},{domain:Jn,style:function(e){return 1===e.date()?pr.resolveCssValue(pr.BOUNDARY_MARK_COLOR):1===e.day()?pr.resolveCssValue(pr.PRIMARY_MARK_COLOR):pr.resolveCssValue(pr.SECONDARY_MARK_COLOR)},start:function(e){return Rr()(e).startOf("day")},step:function(e){return e.add(1,"day")}},{domain:5*Jn,style:Xr(3,"month"),start:function(e){return Rr()(e).startOf("month")},step:function(e){return Rr()(e).add(1,"month")}},{domain:1/0,style:function(){return pr.resolveCssValue(pr.PRIMARY_MARK_COLOR)},start:function(e){return Rr()(e).startOf("year")},step:function(e){return e.add(1,"year")}}],Jr=n(64624),Zr=n(28782);const ei=window,ti=ei.ShadowRoot&&(void 0===ei.ShadyCSS||ei.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ni=Symbol(),ri=new WeakMap;class ii{constructor(e,t,n){if(this._$cssResult$=!0,n!==ni)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(ti&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=ri.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ri.set(t,e))}return e}toString(){return this.cssText}}const oi=ti?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new ii("string"==typeof e?e:e+"",void 0,ni))(t)})(e):e;var ai;const si=window,ui=si.trustedTypes,li=ui?ui.emptyScript:"",ci=si.reactiveElementPolyfillSupport,di={toAttribute(e,t){switch(t){case Boolean:e=e?li: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}},fi=(e,t)=>t!==e&&(t==t||e==e),hi={attribute:!0,type:String,converter:di,reflect:!1,hasChanged:fi},vi="finalized";class pi 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=hi){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)||hi}static finalize(){if(this.hasOwnProperty(vi))return!1;this[vi]=!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(oi(e))}else void 0!==e&&t.push(oi(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)=>{ti?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const n=document.createElement("style"),r=ei.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=hi){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:di).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:di;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||fi)(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 mi;pi[vi]=!0,pi.elementProperties=new Map,pi.elementStyles=[],pi.shadowRootOptions={mode:"open"},null==ci||ci({ReactiveElement:pi}),(null!==(ai=si.reactiveElementVersions)&&void 0!==ai?ai:si.reactiveElementVersions=[]).push("1.6.3");const gi=window,yi=gi.trustedTypes,xi=yi?yi.createPolicy("lit-html",{createHTML:e=>e}):void 0,bi="$lit$",Ai=`lit$${(Math.random()+"").slice(9)}$`,wi="?"+Ai,Ei=`<${wi}>`,_i=document,Ci=()=>_i.createComment(""),ji=e=>null===e||"object"!=typeof e&&"function"!=typeof e,ki=Array.isArray,Si="[ \t\n\f\r]",Ti=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ni=/-->/g,Ri=/>/g,Oi=RegExp(`>|${Si}(?:([^\\s"'>=/]+)(${Si}*=${Si}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Ii=/'/g,Mi=/"/g,Li=/^(?:script|style|textarea|title)$/i,Pi=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Di=Pi(1),zi=(Pi(2),Symbol.for("lit-noChange")),$i=Symbol.for("lit-nothing"),Fi=new WeakMap,Ui=_i.createTreeWalker(_i,129,null,!1);function qi(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==xi?xi.createHTML(t):t}const Bi=(e,t)=>{const n=e.length-1,r=[];let i,o=2===t?"<svg>":"",a=Ti;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===Ti?"!--"===u[1]?a=Ni:void 0!==u[1]?a=Ri:void 0!==u[2]?(Li.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=Oi):void 0!==u[3]&&(a=Oi):a===Oi?">"===u[0]?(a=null!=i?i:Ti,l=-1):void 0===u[1]?l=-2:(l=a.lastIndex-u[2].length,s=u[1],a=void 0===u[3]?Oi:'"'===u[3]?Mi:Ii):a===Mi||a===Ii?a=Oi:a===Ni||a===Ri?a=Ti:(a=Oi,i=void 0);const d=a===Oi&&e[t+1].startsWith("/>")?" ":"";o+=a===Ti?n+Ei:l>=0?(r.push(s),n.slice(0,l)+bi+n.slice(l)+Ai+d):n+Ai+(-2===l?(r.push(void 0),t):d)}return[qi(e,o+(e[n]||"<?>")+(2===t?"</svg>":"")),r]};class Hi{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]=Bi(e,t);if(this.el=Hi.createElement(u,n),Ui.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(r=Ui.nextNode())&&s.length<a;){if(1===r.nodeType){if(r.hasAttributes()){const e=[];for(const t of r.getAttributeNames())if(t.endsWith(bi)||t.startsWith(Ai)){const n=l[o++];if(e.push(t),void 0!==n){const e=r.getAttribute(n.toLowerCase()+bi).split(Ai),t=/([.?@])?(.*)/.exec(n);s.push({type:1,index:i,name:t[2],strings:e,ctor:"."===t[1]?Ki:"?"===t[1]?Qi:"@"===t[1]?Ji:Gi})}else s.push({type:6,index:i})}for(const t of e)r.removeAttribute(t)}if(Li.test(r.tagName)){const e=r.textContent.split(Ai),t=e.length-1;if(t>0){r.textContent=yi?yi.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],Ci()),Ui.nextNode(),s.push({type:2,index:++i});r.append(e[t],Ci())}}}else if(8===r.nodeType)if(r.data===wi)s.push({type:2,index:i});else{let e=-1;for(;-1!==(e=r.data.indexOf(Ai,e+1));)s.push({type:7,index:i}),e+=Ai.length-1}i++}}static createElement(e,t){const n=_i.createElement("template");return n.innerHTML=e,n}}function Vi(e,t,n=e,r){var i,o,a,s;if(t===zi)return t;let u=void 0!==r?null===(i=n._$Co)||void 0===i?void 0:i[r]:n._$Cl;const l=ji(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=Vi(e,u._$AS(e,t.values),u,r)),t}class Yi{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:_i).importNode(n,!0);Ui.currentNode=i;let o=Ui.nextNode(),a=0,s=0,u=r[0];for(;void 0!==u;){if(a===u.index){let t;2===u.type?t=new Wi(o,o.nextSibling,this,e):1===u.type?t=new u.ctor(o,u.name,u.strings,this,e):6===u.type&&(t=new Zi(o,this,e)),this._$AV.push(t),u=r[++s]}a!==(null==u?void 0:u.index)&&(o=Ui.nextNode(),a++)}return Ui.currentNode=_i,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 Wi{constructor(e,t,n,r){var i;this.type=2,this._$AH=$i,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=Vi(this,e,t),ji(e)?e===$i||null==e||""===e?(this._$AH!==$i&&this._$AR(),this._$AH=$i):e!==this._$AH&&e!==zi&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):(e=>ki(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!==$i&&ji(this._$AH)?this._$AA.nextSibling.data=e:this.$(_i.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=Hi.createElement(qi(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 Yi(i,this),t=e.u(this.options);e.v(n),this.$(t),this._$AH=e}}_$AC(e){let t=Fi.get(e.strings);return void 0===t&&Fi.set(e.strings,t=new Hi(e)),t}T(e){ki(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 Wi(this.k(Ci()),this.k(Ci()),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 Gi{constructor(e,t,n,r,i){this.type=1,this._$AH=$i,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=$i}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=Vi(this,e,t,0),o=!ji(e)||e!==this._$AH&&e!==zi,o&&(this._$AH=e);else{const r=e;let a,s;for(e=i[0],a=0;a<i.length-1;a++)s=Vi(this,r[n+a],t,a),s===zi&&(s=this._$AH[a]),o||(o=!ji(s)||s!==this._$AH[a]),s===$i?e=$i:e!==$i&&(e+=(null!=s?s:"")+i[a+1]),this._$AH[a]=s}o&&!r&&this.j(e)}j(e){e===$i?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class Ki extends Gi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===$i?void 0:e}}const Xi=yi?yi.emptyScript:"";class Qi extends Gi{constructor(){super(...arguments),this.type=4}j(e){e&&e!==$i?this.element.setAttribute(this.name,Xi):this.element.removeAttribute(this.name)}}class Ji extends Gi{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=Vi(this,e,t,0))&&void 0!==n?n:$i)===zi)return;const r=this._$AH,i=e===$i&&r!==$i||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==$i&&(r===$i||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 Zi{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){Vi(this,e)}}const eo=gi.litHtmlPolyfillSupport;var to,no;null==eo||eo(Hi,Wi),(null!==(mi=gi.litHtmlVersions)&&void 0!==mi?mi:gi.litHtmlVersions=[]).push("2.8.0");class ro extends pi{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 Wi(t.insertBefore(Ci(),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 zi}}ro.finalized=!0,ro._$litElement$=!0,null===(to=globalThis.litElementHydrateSupport)||void 0===to||to.call(globalThis,{LitElement:ro});const io=globalThis.litElementPolyfillSupport;null==io||io({LitElement:ro}),(null!==(no=globalThis.litElementVersions)&&void 0!==no?no:globalThis.litElementVersions=[]).push("3.3.3");var oo,ao=function(){function e(t){(0,G.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 Cr(Date.now(),1e3)}},{key:"timeToPosition",value:function(e){var t=this.width;return Er(e,this.timeline.start,this.timeline.end,0,t)||0}},{key:"positionToTime",value:function(e){return Er(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=pr.resolveCssValue(pr.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}(),so=function(e){(0,X.A)(r,e);var t,n=(0,Q.A)(r);function r(){var e;return(0,G.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(_r(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*pr.WHEEL_PAN_SPEED;r+=s,i+=s}else{var u=t.offsetX/n.canvas.width,l=_r(o*(t.deltaY>0?1.15:.9),pr.ZOOM_MIN,pr.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*pr.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=Qn,e.canvasScrollTop=0,e.isZoomAllowed=!0,e}return(0,K.A)(r,[{key:"render",value:function(){return Di(oo||(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)),oo=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,Jr.A)((0,Zr.A)(r.prototype),"shouldUpdate",this).call(this,e)}},{key:"connectedCallback",value:function(){(0,Jr.A)((0,Zr.A)(r.prototype),"connectedCallback",this).call(this),this.init()}},{key:"disconnectedCallback",value:function(){this.destroy(),(0,Jr.A)((0,Zr.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,W.A)(Z().mark((function e(t){return Z().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,mn.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,Jr.A)((0,Zr.A)(r.prototype),"firstUpdated",this).call(this,e),this.canvasApi=new ao({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,mn.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}(ro);const uo=new Set(["children","wcType"]);class lo extends o.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 o.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)uo.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)}}var co=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.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=function(e,t){if(e&&t)return t-e==0?"0s":t-e<1e3?"<1s":(0,on.p0)(e,t,"h:mm:ss")}(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=pr.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:pr.resolveCssValue(t.borderColor)}),e.strokeStyle=pr.resolveCssValue(t.borderColor),e.lineWidth=2,e.strokeRect(r,a,d||s,u),t.backgroundColor)){var v=(pr.TRACK_HEIGHT-u)/3;e.fillStyle=pr.resolveCssValue(t.backgroundColor),e.fillRect(r-v,a-v,(d||s)+2*v,pr.TRACK_HEIGHT*Object.keys(t.colors).length-v)}}else{var p=t.colors[t.trackIndex].color;e.fillStyle=pr.resolveCssValue(p),e.fillRect(r,a,s,u)}n&&(e.strokeStyle=pr.resolveCssValue(pr.SELECTION_OUTLINE_COLOR),e.lineWidth=pr.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,d||s,u)),l&&function(e,t,n,r){e.fillStyle=pr.resolveCssValue(pr.COUNTER_FONT_COLOR),e.fillText(t,n+pr.COUNTER_PADDING,r+pr.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}(zr),fo=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"events",set:function(e){this.getComponent(Gr).then((function(t){null==t||t.setEvents(e)}))}},{key:"axes",set:function(e){this.getComponent(Gr).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,Jr.A)((0,Zr.A)(n.prototype),"updateCanvasSize",this).call(this)}},{key:"createComponents",value:function(){this.setTimelineConfig();var e=new qr(this);return e.registerRenderer("operation",new co),[new Kr(this),new Dr(this),e,new Br(this),new Gr(this)]}},{key:"setTimelineConfig",value:function(){pr.ZOOM_MAX=3*Jn,pr.PRIMARY_BACKGROUND_COLOR=(0,Jt.k)("--g-color-base-background"),pr.SECONDARY_MARK_COLOR=(0,Jt.k)("--g-color-line-generic"),pr.BOUNDARY_MARK_COLOR=(0,Jt.k)("--g-color-line-generic"),pr.PRIMARY_MARK_COLOR=(0,Jt.k)("--g-color-line-generic-hover"),pr.COUNTER_FONT_COLOR=(0,Jt.k)("--g-color-text-complementary")}}]),n}(so);customElements.define("my-timeline-canvas",fo);var ho=(e=>{const t=o.forwardRef(((e,t)=>o.createElement(lo,Object.assign({wcType:"my-timeline-canvas",innerRef:t},e))));return t})();function vo(){return vo=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},vo.apply(this,arguments)}var po,mo=["bottom","height","left","right","top","width"],go=new Map,yo=function e(){var t=[];go.forEach((function(e,n){var r=n.getBoundingClientRect();(function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),mo.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)}))})),po=window.requestAnimationFrame(e)},xo="undefined"!=typeof window?o.useLayoutEffect:o.useEffect;function bo(e,t){var n=t.rect;return e.height!==n.height||e.width!==n.width?n:e}var Ao=function(e,t){void 0===t&&(t={width:0,height:0});var n=o.useState(e.current),r=n[0],i=n[1],a=o.useReducer(bo,t),s=a[0],u=a[1],l=o.useRef(!1);return xo((function(){e.current!==r&&i(e.current)})),xo((function(){if(r&&!l.current){l.current=!0;var e=r.getBoundingClientRect();u({rect:e})}}),[r]),o.useEffect((function(){if(r){var e,t,n=(e=r,t=function(e){u({rect:e})},{observe:function(){var n=0===go.size;go.has(e)?go.get(e).callbacks.push(t):go.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),n&&yo()},unobserve:function(){var n=go.get(e);if(n){var r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||go.delete(e),go.size||cancelAnimationFrame(po)}}});return n.observe(),function(){n.unobserve()}}}),[r]),s},wo=["align"],Eo=function(){return 50},_o=function(e){return e},Co=function(e,t){return e[t?"offsetWidth":"offsetHeight"]},jo=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},ko=function(e){var t,n=e.size,r=void 0===n?0:n,i=e.estimateSize,a=void 0===i?Eo: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?_o:A,E=e.measureSize,_=void 0===E?Co:E,C=e.rangeExtractor,j=void 0===C?jo:C,k=p?"width":"height",S=p?"scrollLeft":"scrollTop",T=o.useRef({outerSize:0,scrollOffset:0,measurements:[],totalSize:0}),N=o.useState(0),R=N[0],O=N[1];T.current.scrollOffset=R;var I=(g||Ao)(h,y)[k];T.current.outerSize=I;var M=o.useCallback((function(e){h.current&&(h.current[S]=e)}),[h,S]),L=m||M,P=o.useCallback((function(e){L(e,M)}),[M,L]),D=o.useState({}),z=D[0],$=D[1],F=o.useCallback((function(){return $({})}),[]),U=o.useRef([]),q=o.useMemo((function(){var e=U.current.length>0?Math.min.apply(Math,U.current):0;U.current=[];for(var t=T.current.measurements.slice(0,e),n=e;n<r;n++){var i=w(n),o=z[i],s=t[n-1]?t[n-1].end:c,u="number"==typeof o?o:a(n),l=s+u;t[n]={index:n,start:s,size:u,end:l,key:i}}return t}),[a,z,c,r,w]),B=((null==(t=q[r-1])?void 0:t.end)||c)+f;T.current.measurements=q,T.current.totalSize=B;var H=x?x.current:h.current,V=o.useRef(b);V.current=b,xo((function(){if(H){var e=function(e){var t=V.current?V.current(e):H[S];O(t)};return e(),H.addEventListener("scroll",e,{capture:!1,passive:!0}),function(){H.removeEventListener("scroll",e)}}O(0)}),[H,S]);var Y=function(e){for(var t=e.measurements,n=e.outerSize,r=e.scrollOffset,i=t.length-1,o=So(0,i,(function(e){return t[e].start}),r),a=o;a<i&&t[a].end<r+n;)a++;return{start:o,end:a}}(T.current),W=Y.start,G=Y.end,K=o.useMemo((function(){return j({start:W,end:G,overscan:u,size:q.length})}),[W,G,u,q.length,j]),X=o.useRef(_);X.current=_;var Q=o.useMemo((function(){for(var e=[],t=function(t,n){var r=K[t],i=vo({},q[r],{measureRef:function(e){if(e){var t=X.current(e,p);if(t!==i.size){var n=T.current.scrollOffset;i.start<n&&M(n+(t-i.size)),U.current.push(r),$((function(e){var n;return vo({},e,((n={})[i.key]=t,n))}))}}}});e.push(i)},n=0,r=K.length;n<r;n++)t(n);return e}),[K,M,p,q]),J=o.useRef(!1);xo((function(){J.current&&$({}),J.current=!0}),[a]);var Z=o.useCallback((function(e,t){var n=(void 0===t?{align:"start"}:t).align,r=T.current,i=r.scrollOffset,o=r.outerSize;"auto"===n&&(n=e<=i?"start":e>=i+o?"end":"start"),"start"===n?P(e):"end"===n?P(e-o):"center"===n&&P(e-o/2)}),[P]),ee=o.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,wo),a=T.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,vo({align:i},o))}}),[Z,r]),te=o.useCallback((function(e,t){ee(e,t),requestAnimationFrame((function(){ee(e,t)}))}),[ee]);return{virtualItems:Q,totalSize:B,scrollToOffset:Z,scrollToIndex:te,measure:F}},So=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},To=(0,a.A)("yq-virtual-list"),No=3;function Ro(e){var t=e.listRef,n=e.className,r=e.containerRef,a=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,p=e.activeItemIndex,m=e.selectedItemKey,g=e.onItemClick,y=e.onWrapperScroll,x=e.canFetchMore,b=e.isFetchingMore,A=e.fetchMore,w=e.loaderHeight,E=void 0===w?40:w,_=e.alwaysShowActiveItem,C=e.headerClassName,j=e.renderHeader,S=o.useState(),T=(0,i.A)(S,2),R=T[0],O=T[1],I=o.useRef(null);o.useEffect((function(){_&&(!R||R>u.length-1)&&O(0)}),[u,R,_]);var M=o.useRef(null),L=o.useRef(null),P=ko({size:x?u.length+1:u.length,estimateSize:o.useCallback((function(e){return e>=u.length?E:"function"==typeof c?c(u[e],e):c}),[c,E,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:No,parentRef:L});o.useImperativeHandle(t,(function(){return{resetSizes:function(){P.measure()}}}),[P.measure]),o.useEffect((function(){var e=P.virtualItems.slice(-1),t=(0,i.A)(e,1)[0];t&&t.index===u.length&&x&&!b&&(null==A||A())}),[x,A,u.length,b,P.virtualItems]);var D=function(){_||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,N.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&&(P.scrollToIndex(i),M.current&&M.current.contains(e.target)&&M.current!==e.target&&M.current.focus()),i}))};return(0,k.jsxs)("div",{ref:(0,on.RQ)(M,r),tabIndex:0,className:To(null,n),onFocus:function(){I.current&&(clearTimeout(I.current),I.current=null)},onBlur:D,onMouseLeave:D,onKeyDown:function(e){if(0!==P.virtualItems.length){var t=Math.max(1,P.virtualItems.length-2*No),n=P.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&&g&&e.target===e.currentTarget&&void 0!==u[R]&&(e.preventDefault(),g(u[R],R,void 0,!0))}}},children:[(0,k.jsx)("div",{className:To("header",C),children:"function"==typeof j?j():null}),(0,k.jsx)("div",{className:To("list",s),ref:(0,on.RQ)(L,a),onScroll:y,children:(0,k.jsx)("div",{style:{height:"".concat(P.totalSize,"px"),width:"100%",position:"relative"},children:P.virtualItems.map((function(e){if(e.index>u.length-1)return(0,k.jsx)("div",{ref:e.measureRef,className:To("item",{loader:!0}),style:{position:"absolute",top:0,left:0,width:"100%",height:"".concat(E,"px"),transform:"translateY(".concat(e.start,"px)")},children:(0,k.jsx)(Kt,{local:!0,size:"s"})},"loader");var t=u[e.index],n="function"==typeof c?c(t,e.index):c,r=!1;t&&"object"===(0,N.A)(t)&&(0,on.CJ)(t,"disabled")&&(r=Boolean(t.disabled));var i=R===e.index||p===e.index,a=m===e.key;return o.createElement(null!=f?f:"div",{key:e.key,ref:e.measureRef,className:To("item",{active:i,selected:a,clickable:"function"==typeof g&&!r},"function"==typeof h?h(t,e.index):h),style:{position:"absolute",top:0,left:0,width:"100%",height:"".concat(n,"px"),transform:"translateY(".concat(e.start,"px)")},onMouseMove:r?void 0:function(){O(e.index)},onClick:r?void 0:function(n){null==g||g(t,e.index,n)}},"function"==typeof d?d(t,e.index,{active:i,selected:a}):function(e){return String(e)}(t))}))})})]})}var Oo=n(19812),Io={sortOrder:{},sortColumns:[]};function Mo(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!t)return i?e:Io;var a=e.sortOrder,s=e.sortColumns,u=s,l=a[t],c=n;if(l&&(c=l===n||o?"ascending"===l?"descending":"ascending":void 0),!i)return c?{sortOrder:(0,r.A)({},t,c),sortColumns:[t]}:Io;a[t];var d=(0,br.A)(a,[t].map(Oo.A));return c?(d[t]=c,new Set(s).has(t)||(u=[].concat((0,he.A)(s),[t]))):u=s.filter((function(e){return e!==t})),{sortOrder:d,sortColumns:u}}var Lo=(0,a.A)("table"),Po=(0,k.jsx)("svg",{className:Lo("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,k.jsx)("path",{fill:"currentColor",d:"M0 5h10l-5 -5z"})}),Do=(0,k.jsx)("svg",{className:Lo("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,k.jsx)("path",{fill:"currentColor",d:"M0 1h10l-5 5z"})});function zo(e){switch(e){case"ascending":return Po;case"descending":return Do;default:return null}}function $o(e){var t=e.sortOrder,n=e.sortIndex,r=e.sortable,i=e.defaultOrder;return r?(0,k.jsx)("span",{className:Lo("sort-icon",{shadow:!t}),"data-index":n,children:zo(t||i)}):null}var Fo=50;function Uo(e){var t=e.columns,n=e.sortOrder,r=e.sortColumns,i=e.sortable,a=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,k.jsx)(o.Fragment,{children:t.map((function(e,t){var o=e.className,s=e.name,l=e.header,c=e.title,d=e.align,f=e.customStyle,h=e.width,v=e.minWidth,p=void 0===v?Fo:v,m=e.maxWidth,g="number"==typeof h?"0 0 ".concat(h,"px"):"1 0 ".concat(p,"px");return(0,k.jsx)("div",{className:Lo("th",{sortable:i&&e.sortable,align:d},o),title:"string"==typeof c?c:void 0,"data-index":t,style:(0,$.A)({flex:g,maxWidth:m},null==f?void 0:f({header:!0,name:s})),onClick:u(e),children:(0,k.jsxs)("div",{className:Lo("head-cell"),children:[null!=l?l:s,(0,k.jsx)($o,{sortable:i&&e.sortable,defaultOrder:e.defaultOrder||a,sortOrder:n[s],sortIndex:r.indexOf(s)})]})},s)}))})}function qo(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,v=void 0===h?Fo:h,p=e.maxWidth,m=e.customStyle,g=e.render,y=e.onClick,x="function"==typeof d?d(n):n[e.name],b="number"==typeof f?"0 0 ".concat(f,"px"):"1 0 ".concat(v,"px");return(0,k.jsx)("div",{className:Lo("td",{align:u,sortable:l},s),title:"function"==typeof c?c(n):c,style:(0,$.A)({flex:b,maxWidth:p},null==m?void 0:m({row:n,index:r,name:a,header:!1})),onClick:function(){null==y||y(n,e)},children:(0,k.jsx)("div",{className:Lo("row-cell"),children:"function"==typeof g?g({value:x,row:n,index:r,active:i,selected:o}):x})},t)}))}var Bo=o.memo((function(e){var t=e.row,n=e.index,r=e.columns,i=e.render,a=e.active,s=e.selected;return(0,k.jsx)(o.Fragment,{children:"function"==typeof i?i({row:t,index:n,columns:r,render:function(){return qo({columns:r,row:t,index:n,active:a,selected:s})},active:a,selected:s}):qo({columns:r,row:t,index:n,active:a,selected:s})})}));function Ho(e){var t=e.containerRef,n=e.className,r=e.view,a=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,v=e.alwaysShowActiveRow,p=e.activeRowIndex,m=e.selectedRowKey,g=e.headerClassName,y=e.headerHeight,x=e.onSort,b=e.initialSortOrder,A=e.onRowClick,w=e.settings,E=void 0===w?{}:w,_=E.sortable,C=void 0===_||_,j=E.defaultOrder,S=void 0===j?"ascending":j,T=E.disableSortReset,N=void 0!==T&&T,R=e.canFetchMore,O=e.isFetchingMore,I=e.fetchMore,M=e.onWrapperScroll,L=e.scrollRef,P=o.useState((function(){return function(e){return e?(Array.isArray(e)?e:[e]).reduce((function(e,t){return Mo(e,t.name,t.order,!0)}),Io):Io}(b)})),D=(0,i.A)(P,2),z=D[0],F=D[1],U=o.useRef(null),q=o.useCallback((function(e,t){var n,r,i=Mo(z,e.name,e.defaultOrder||S,t,N);F(i),x&&x((r=(n=i).sortOrder,n.sortColumns.map((function(e){return{name:e,order:r[e]}}))))}),[S,N,x,z]),B=o.useCallback((function(){return(0,k.jsx)(Uo,(0,$.A)((0,$.A)({},z),{},{sortable:C,defaultOrder:S,columns:s,onSort:q}))}),[s,S,q,z,C]),H=o.useCallback((function(e,t,n){var r=n.active,i=n.selected;return(0,k.jsx)(Bo,{row:e,index:t,columns:s,active:r,selected:i,render:d})}),[s,d]);o.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?Fo:r)}),0)+30;null===(e=U.current)||void 0===e||e.style.setProperty("--table-min-width","".concat(t,"px"))}),[s]);var V=o.useCallback((function(e,t){return Lo("row","function"==typeof f?f(e,t):f)}),[f]);return(0,k.jsx)(Ro,{containerRef:(0,on.RQ)(U,t),className:Lo({view:a},n),wrapperClassName:Lo("table"),headerClassName:Lo("head",g),headerHeight:y,renderHeader:B,itemWrapper:l,items:u,onItemClick:A,itemClassName:V,itemHeight:c,loaderHeight:c,renderItem:H,itemKey:h,alwaysShowActiveItem:v,activeItemIndex:p,selectedItemKey:m,canFetchMore:R,isFetchingMore:O,fetchMore:I,onWrapperScroll:M,scrollRef:L})}var Vo=(0,a.A)("node-name");function Yo(e){var t=e.node,n=e.className,r=(0,k.jsx)("span",{title:t.title,children:t.label});return t.url&&(r=(0,k.jsxs)(Ge.N,{href:t.url,title:t.title,target:"_blank",children:[t.label,"in"===t.type||"out"===t.type&&(0,k.jsx)(b.E,{color:"secondary",children:" (".concat(t.type,")")})]})),(0,k.jsxs)("span",{className:Vo("name",n),children:[r,(0,on.lt)(t)&&(0,k.jsx)(et.A,{className:Vo("operation-node-info"),tooltipContentClassName:Vo("operation-node-info-popup"),content:(0,k.jsx)(rn.A,(0,$.A)({},t)),hasArrow:!1,placement:["right","left"],delayOpening:300,children:(0,k.jsx)(w.I,{className:Vo("icon"),data:an.A,size:12})})]})}const Wo=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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"})}))},Go=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 Ko=(0,a.A)("timeline"),Xo=(0,k.jsx)(w.I,{data:Go,size:14}),Qo=(0,k.jsx)(w.I,{data:Wo,size:14}),Jo=(0,k.jsx)(w.I,{data:function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 Zo(e){var t=e.onRulerUpdate,n=e.from,r=e.to,i=e.disabled,o=void 0!==i&&i;return(0,k.jsx)(A.$,{view:"flat",title:"Set timeline scale",size:"s",onClick:function(){t({from:n,to:r})},disabled:o,children:Jo})}function ea(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,k.jsx)("span",{title:s,children:(0,k.jsx)(A.$,{view:"flat",title:i?a:o,size:"s",onClick:r,disabled:n,children:i?Xo:Qo})})}function ta(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,k.jsx)("span",{className:Ko("row-status"),children:(0,k.jsx)(b.E,{color:"secondary",children:"in"===n.type||"out"===n.type?"-":(0,k.jsx)(na,{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,k.jsx)("div",{className:Ko("event-name"),title:r,children:r}):(0,k.jsx)("div",{className:Ko("aside-item",{expanded:o}),children:(0,k.jsx)(Yo,{node:a,className:Ko("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,k.jsxs)("div",{children:[(0,k.jsx)(Zo,{onRulerUpdate:r,from:a,to:s}),l&&u&&i?(0,k.jsx)(ea,{onClick:function(){return i(u)},isExpanded:o}):null]})}}]}function na(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,k.jsxs)("span",{className:Ko("node-status"),children:[(0,k.jsx)(ra,{state:r,progress:n}),(0,k.jsx)("span",{children:"InProgress"===r?"".concat(on.Ie[r].title,": ").concat(u,"%"):on.Ie[r].title})]})}function ra(e){var t=e.state,n=e.progress,r=nn();return"InProgress"===t?(0,k.jsx)("img",{className:Ko("node-status-icon"),src:(0,on.$u)(n,r)}):(0,k.jsx)("div",{className:Ko("node-status-icon",{state:t.toLowerCase()})})}function ia(e){var t,n,r,i,o,a;return(0,k.jsx)("div",{className:Ko("aside-header"),children:(0,k.jsx)(Ho,{columns:ta({controlsHeader:(n=e.onRulerUpdate,r=e.onExpandAll,i=e.isSomeAxesCollapsed,o=e.tableItems,a=o.some((function(e){return e.isExpandable})),(0,k.jsxs)("div",{children:[(0,k.jsx)(Zo,{onRulerUpdate:n}),(0,k.jsx)(ea,{onClick:r,disabled:0===o.length||!a,isExpanded:!i,isCommonButton:!0})]})),nameHeader:(t=e.blocksQuantity,(0,k.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:Ko("table-row"),rowHeight:25,headerHeight:27,className:Ko("table"),onWrapperScroll:e.onSidebarScroll,scrollRef:e.sidebarRef})})}var oa=n(34108),aa=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},sa=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},ua=function(e){return 255*(e>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e)},la=96.422,ca=82.521,da=216/24389,fa=24389/27,ha=function(e){var t=function(e){var t=sa(e.r),n=sa(e.g),r=sa(e.b);return function(e){return{x:aa(e.x,0,la),y:aa(e.y,0,100),z:aa(e.z,0,ca),a:aa(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/la,r=t.y/100,i=t.z/ca;return n=n>da?Math.cbrt(n):(fa*n+16)/116,{l:116*(r=r>da?Math.cbrt(r):(fa*r+16)/116)-16,a:500*(n-r),b:200*(r-(i=i>da?Math.cbrt(i):(fa*i+16)/116)),alpha:t.a}},va=n(72617),pa=n.n(va),ma=n(81713),ga=n.n(ma),ya=n(63281),xa=n.n(ya),ba=6e4,Aa={NotStarted:"new",Started:"started",InProgress:"running",Finished:"completed",Failed:"failed",Aborted:"aborted"};function wa(e){var t=e.from,n=e.to;return Math.max(n-t,ba)}(0,oa.X$)([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=ha(e),o=ha(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:ua(.032404542*r-.015371385*i-.004985314*o),g:ua(-.00969266*r+.018760108*i+41556e-8*o),b:ua(556434e-9*r-.002040259*i+.010572252*o),a:e.a},{r:aa(n.r,0,255),g:aa(n.g,0,255),b:aa(n.b,0,255),a:aa(n.a)}}({x:(Math.pow(n,3)>da?Math.pow(n,3):(116*n-16)/fa)*la,y:100*(e.l>8?Math.pow((e.l+16)/116,3):e.l/fa),z:(Math.pow(r,3)>da?Math.pow(r,3):(116*r-16)/fa)*ca,a:e.alpha})}({l:aa((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:aa(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 Ea=(0,a.A)("timeline");const _a=function(e){var t=e.graph,n=e.prepareNode,r=(0,Ve.wE)(),a=(0,Qt.i)(),s=nn(),u=o.useState((function(){return new Vt.DataSet})),l=(0,i.A)(u,1)[0],c=o.useState({}),d=(0,i.A)(c,2),f=d[0],h=d[1],v=o.useState(new Set),p=(0,i.A)(v,2),m=p[0],g=p[1],y=o.useState(""),x=(0,i.A)(y,2),b=x[0],A=x[1],w=o.useState(),E=(0,i.A)(w,2),_=E[0],C=E[1],j=(0,on.GE)(l),S=o.useRef(r);S.current=r;var T=o.useRef(n);T.current=n,o.useEffect((function(){l.clear(),l.add(t.nodes),S.current&&(0,on.DW)(l,S.current,T.current,void 0,!1),h({})}),[l,t]),o.useEffect((function(){r&&((0,on.DW)(l,r,T.current,void 0,!1),h({}))}),[l,r]),o.useEffect((function(){"function"==typeof n&&((0,on.ZG)(l,n),h({}))}),[l,n]);var N=o.useMemo((function(){var e,t=Yn()(S.current,(function(e,t){var n=t.startedAt?new Date(t.startedAt).getTime():1/0;return Math.min(n,e)}),1/0),n=l?function(e){var t=e.nodes,n=e.colors,r=e.theme,o=e.queryStartedAtMillis,a=1/0,s=[];t.forEach((function(e){var t,o,u=e.progress,l={id:e.id,label:null!==(t=e.label)&&void 0!==t?t:"",events:[],level:Number(e.level),node:e,isExpandable:!1};if(u){var c="0";"InProgress"===u.state?c=(new Date).toString():u.finishedAt?c=u.finishedAt:u.stages&&Object.keys(u.stages).length>0&&(c=Object.values(u.stages[Object.keys(u.stages).length-1])[0]);var d=null!==(o=u.startedAt)&&void 0!==o?o:"0",f=new Date(d).getTime(),h=new Date(c).getTime(),v=u.state,p=null!=v?v:"NotStarted";a=Math.min(f,a);var m=(0,$.A)((0,$.A)({},l),{},{from:f,to:h,status:p}),g=function(e){var t=e.stages,n=e.axisId,r=e.dataProgressFinishedAt,o=e.dataProgressStartedAt,a=new Date(o).getTime(),s=new Date(r).getTime(),u=[],l=0,c={renderType:"operation",axisId:n,eventsCount:1},d=0;return u.push((0,$.A)((0,$.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:{},v=(0,i.A)(Object.entries(e)[0],2),p=v[0],m=v[1],g=null!==(f=Object.values(h)[0])&&void 0!==f?f:r;0===n&&o!==m&&u.push((0,$.A)((0,$.A)({},c),{},{trackIndex:d++,from:a,to:new Date(m).getTime(),name:"init",id:l++})),u.push((0,$.A)((0,$.A)({},c),{},{trackIndex:d++,from:new Date(m).getTime(),to:new Date(g).getTime(),name:p,id:l++}))})),u}({stages:null==u?void 0:u.stages,dataProgressFinishedAt:c,dataProgressStartedAt:d,axisId:e.id});m.isExpandable=g.length>1;var y=n.operation[Aa[p]],x=n.operation["".concat(Aa[p],"Border")],b=n.operation["".concat(Aa[p],"Background")],A=function(e){var t=e.events,n=e.theme,r=e.eventMajorColor,i=e.operationDuration,o={},a=t.length,s=(0,he.A)(t);s.sort((function(e,t){var n=e.to-e.from;return t.to-t.from-n}));var u=(0,oa.Mj)(r),l=("light"===n?u.tints(a+2):u.tones(a+2)).map((function(e){return e.toHex()}));return t.forEach((function(e){var t=e.to-e.from,n=s.findIndex((function(t){return t.id===e.id}));o[e.trackIndex]={percentage:i>0?t/i:1,color:l[n]}})),o}({theme:r,events:g,eventMajorColor:y,operationDuration:h-f});m.events=g.map((function(e){return(0,$.A)((0,$.A)({},e),{},{colors:A,borderColor:x,backgroundColor:b})})),s.push(m)}else s.push((0,$.A)((0,$.A)({},l),{},{from:1/0,to:0,notStarted:!0,status:"NotStarted"}))}));var u=xa()(s,["level","from"]);if(o!==1/0&&a!==1/0){var l={id:"preparation",from:o,to:a,events:[{eventsCount:1,axisId:"preparation",renderType:"operation",trackIndex:0,from:o,to:a,colors:{0:{percentage:100,color:n.operation[Aa.Finished]}}}],node:{label:"Preparation",progress:{state:"Finished"},id:"preparation",level:0},isExpandable:!1,level:0,status:"Finished",label:"Preparation"};u.unshift(l)}return u}({nodes:l,colors:s,theme:a,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}}),[l,s,a,f]),R=N.axes,O=N.events,I=function(e){var t=o.useState({}),n=(0,i.A)(t,2),r=n[0],a=r.start,s=r.end,u=n[1],l=o.useRef(!1),c=o.useRef(!1),d=o.useMemo((function(){var t,n=pa()(e,"from"),r=null!==(t=ga()(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=wa({from:t,to:n});if(!r||!i)return{start:t,end:t+o};var a=Math.min(wa({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:a,to:s,queryStart:d.queryStart,queryEnd:d.queryEnd}),h=f.start,v=f.end;return!c.current||a||s||(l.current=!l.current),c.current=Boolean(a||s),[{timelineStart:h,timelineEnd:v,timelineRulerKey:"ruler-".concat(l.current)},u]}(R),M=(0,i.A)(I,2),L=M[0],P=L.timelineStart,D=L.timelineEnd,z=L.timelineRulerKey,F=M[1],U=o.useMemo((function(){var e,t=b.toLowerCase().trim(),n=[],r=!1,i=(0,mn.A)(R);try{for(i.s();!(e=i.n()).done;){var o=e.value;if((!t||o.label.toLowerCase().includes(t))&&(!_||o.status===_)){var a=!!o.isExpandable&&m.has(o.id);r||!o.isExpandable||a||(r=!0);var s=a?o.events.length:1;n.push((0,$.A)((0,$.A)({},o),{},{tracksCount:s,isExpanded:a}))}}}catch(e){i.e(e)}finally{i.f()}return{filteredAxes:n,isSomeAxesCollapsed:r}}),[R,b,_,m]),q=U.filteredAxes,B=U.isSomeAxesCollapsed,H=o.useMemo((function(){var e=0;return q.map((function(t){var n=pr.TRACK_HEIGHT*t.tracksCount,r={id:t.id,top:e,height:n,tracksCount:t.tracksCount};return e+=n,r}))}),[q]),V=o.useRef(null),Y=o.useState(0),W=(0,i.A)(Y,2),G=W[0],K=W[1],X=function(e){var t=e.from,n=e.to;F({start:t,end:n})},Q=o.useMemo((function(){var e=[];return q.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,$.A)((0,$.A)({},n),{},{node:t.node,isEvent:!0}))})))})),e}),[q]);return(0,k.jsxs)("div",{className:Ea(),children:[(0,k.jsxs)("div",{className:Ea("filters"),children:[(0,k.jsx)(Hn.k,{className:Ea("filters-search"),hasClear:!0,value:b,onUpdate:A,placeholder:"Filter by name"}),(0,k.jsx)(Tt.l,{className:Ea("filters-status"),multiple:!1,label:"Status",placeholder:"Select status",value:_?[_]:[],options:j.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){C(e[0])}})]}),(0,k.jsxs)("div",{className:Ea("content-wrapper"),children:[(0,k.jsx)(ia,{tableItems:Q,isSomeAxesCollapsed:B,blocksQuantity:q.length,onExpandAll:function(){if(B){var e=new Set(R.filter((function(e){return e.isExpandable})).map((function(e){return e.id})));g(e)}else g(new Set)},onSidebarScroll:function(){V.current&&K(V.current.scrollTop)},onRulerUpdate:X,sidebarRef:V,onExpandAxis:function(e){var t=new Set(m);t.has(e)?t.delete(e):t.add(e),g(t)}}),P&&D&&(0,k.jsxs)("div",{className:Ea("container"),children:[(0,k.jsx)("div",{className:Ea("ruler-wrapper"),children:(0,k.jsx)(Wn.Kf,{from:P,to:D,onUpdate:X,hasPicker:!1,hasDatePicker:!1,hasRulerNowButton:!1,minRange:ba},z)}),Boolean(H.length)&&(0,k.jsx)(ho,{className:Ea("timeline"),canvasScrollTop:G,scrollTopChanged:function(e){V.current&&(V.current.scrollTop=e.detail.scrollTop)},start:P,end:D,boundsChanged:function(e){X({from:e.detail.start,to:e.detail.end})},axes:H,events:O,theme:a})]})]})]})};var Ca=(0,n(33882).A)(o.lazy((function(){return Promise.all([n.e(8096),n.e(8392)]).then(n.bind(n,1870))}))),ja=n(66026),ka=(0,a.A)("plan");const Sa=o.memo((function(e){var t=e.isActive,n=e.className,r=e.prepareNode,a=(0,Ve.oy)(),s=o.useState(!1),l=(0,i.A)(s,2),c=l[0],d=l[1],f=(0,Ve.gi)(),h=(0,u.d4)(ja.st),v=o.useMemo((function(){return a?(0,on.vk)(a):void 0}),[a]);if(!v)return null;var p=v.nodes.length>250;return(0,k.jsx)("div",{className:ka(null,n),children:(0,k.jsxs)(en,{children:[(0,k.jsx)(He,{hide:"graph"!==f,className:ka("graph"),children:p&&!c?(0,k.jsx)(Ta,{showGraph:d,graph:v}):(0,k.jsx)(k.Fragment,{children:h?(0,k.jsx)(Ca,{processedGraph:v}):(0,k.jsx)(Bn,{isActive:t&&"graph"===f,graph:v,showMinimap:!0,prepareNode:r})})}),(0,k.jsx)(He,{hide:"timeline"!==f,className:ka("table"),children:(0,k.jsx)(_a,{graph:v,prepareNode:r})})]})})}));function Ta(e){var t=e.showGraph,n=e.graph,r=(0,Ve.wE)(),a=o.useState((function(){return new Vt.DataSet})),s=(0,i.A)(a,1)[0],u=Ht(),l=o.useRef(r);l.current=r,o.useEffect((function(){s.clear(),s.add(n.nodes),l.current&&(0,on.DW)(s,l.current),u()}),[s,n,u]),o.useEffect((function(){r&&((0,on.DW)(s,r),u())}),[s,r,u]);var c=n.nodes.length>700||n.edges.length>3e3;return(0,k.jsxs)("div",{className:ka("graph-info"),children:[c?(0,k.jsxs)(b.E,{children:["The plan of this operation is way too large to be visualized in browser.",(0,k.jsx)("br",{}),"It has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges.")]}):(0,k.jsxs)(b.E,{children:["The operation's plan is quite large, it has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges."),(0,k.jsx)("br",{}),"It could take a lot of time to draw."]}),(0,k.jsx)("br",{}),(0,k.jsx)(A.$,{className:ka("graph-info-button"),onClick:function(){t(!0)},children:c?"I understand it might freeze my browser, draw the plan anyway":"Draw the plan anyway"}),(0,k.jsx)(ln,{nodes:s,orientation:"vertical",className:ka("legend")})]})}var Na=n(2722);function Ra(){Ra=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,Na.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,N.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)},Ra.apply(this,arguments)}var Oa=n(85593),Ia=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)},Ma=function(e){var t=e.isActive,n=e.operationIdToCluster,r=(0,o.useCallback)((function(e){var t;if("in"===e.type||"out"===e.type){var r,i=function(e){var t=Ra(/^(?:(\w+|`[^`]+`)\.\s*)?`(\/*)([^`]+)`(?::`?([\w-]+)`?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||Ra(/^(?:(\w+|\[[^\]]+\])\.\s*)?\[(\/*)([^\]]+)\](?::\[?([\w-]+)\]?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||Ra(/^(['"])(\/\/)([^`]+)\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 Ne.A.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,Oa.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 Ia(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=Ia(u,s))}return e}),[n]);return(0,k.jsx)(Sa,{isActive:t,prepareNode:r})},La=n(75299);const Pa=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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"})}))},Da=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 za=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e,r=0,o=[];Array.isArray(n.inner_errors)&&1===n.inner_errors.length;)n=(0,i.A)(n.inner_errors,1)[0],o.unshift(n),r+=1;return{issue:o[t],length:r-t}},$a=n(78466),Fa=(0,a.A)("yt-error-cloud"),Ua=function(e){var t=e.error,n=e.level,r=e.disableCloud,a=e.onErrorClick,s=e.onShowParent,u=e.fromCloud,l=(0,La.A)(e.initialExpanded),c=(0,i.A)(l,2),d=c[0],f=c[1],h=(0,o.useState)(0),v=(0,i.A)(h,2),p=v[0],m=v[1],g=(0,o.useCallback)((function(){m((function(e){return e+1}))}),[]),y=(0,o.useCallback)((function(){m(za(t).length)}),[t]),x=za(t,p);return!r&&x.length>1?(0,k.jsxs)("div",{children:[(0,k.jsxs)("div",{className:Fa("collapsed-messages"),children:[(0,k.jsx)($a.L,{expanded:d,toggleExpanded:f}),(0,k.jsxs)(b.E,{color:"secondary",children:[x.length," intermediate messages"]}),(0,k.jsx)(at.S,{className:Fa("collapsed-messages-show-all"),onClick:y,children:"Show all"})]}),d&&(0,k.jsx)("div",{className:Fa("errors"),children:(0,k.jsx)(Ba,{errors:[(0,$.A)({},x.issue)],level:n+1,expanded:d,disableCloud:!0,onErrorClick:a,onShowParent:g,fromCloud:!0})})]}):(0,k.jsx)(Wa,{error:t,level:n,expanded:d,fromCloud:u,disableCloud:!0,onErrorClick:a,onShowParent:s})},qa=function(e){return"Info"===e.attributes.severity},Ba=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,k.jsx)("div",{children:t.map((function(e,u){return(0,k.jsx)(Ua,{level:n,disableCloud:s&&!(t.length>1),error:e,initialExpanded:!qa(e)&&r,onErrorClick:i,onShowParent:o,fromCloud:a},u)}))})},Ha=n(73032);const Va=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 Ya=(0,a.A)("yt-error-tree-node"),Wa=function(e){var t=e.error,n=e.expanded,r=void 0!==n&&n,a=e.level,s=void 0===a?0:a,u=e.fromCloud,l=void 0!==u&&u,c=e.disableCloud,d=void 0!==c&&c,f=e.onErrorClick,h=e.onShowParent,v=(0,La.A)(r),p=(0,i.A)(v,2),m=p[0],g=p[1],y=(0,La.A)(!1),x=(0,i.A)(y,2),b=x[0],E=x[1],_=t.inner_errors&&t.inner_errors.length>0,C=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),j=qa(t),S=(0,o.useCallback)((function(){var e;null!==(e=t.attributes)&&void 0!==e&&e.start_position&&f(t.attributes.start_position)}),[t.attributes.start_position,f]);return(0,k.jsxs)("div",{className:Ya({leaf:!_,info:j}),children:[(0,k.jsxs)("div",{className:Ya("error-body"),children:[(0,k.jsxs)("div",{className:Ya("line"),children:[_&&(0,k.jsx)($a.L,{expanded:m,toggleExpanded:g}),l&&(0,k.jsx)(A.$,{view:"flat-secondary",title:"Show parent",onClick:h,children:(0,k.jsx)(w.I,{data:Pa,size:16})}),(0,k.jsxs)("span",{className:Ya("header"),children:[(0,k.jsx)(w.I,{className:Ya("icon"),data:j?Da:Va,size:16}),(0,k.jsx)("span",{className:Ya("title"),children:j?"Info":"Error"}),(0,k.jsxs)(A.$,{view:"flat-secondary",onClick:E,children:["Attributes"," ",(0,k.jsx)(w.I,{data:b?Go:Wo,size:16})]}),C&&(0,k.jsx)("span",{className:Ya("place-text"),title:"Position",children:C})]}),C?(0,k.jsx)(at.S,{className:Ya("message"),color:"primary",onClick:S,children:(0,k.jsx)(Ha.H,{value:t.message})}):(0,k.jsx)("span",{className:Ya("message"),children:(0,k.jsx)(Ha.H,{value:t.message})}),t.code?(0,k.jsxs)("span",{className:Ya("code"),children:["Code: ",t.code]}):null]}),b&&(0,k.jsx)(R.A,{value:t.attributes,settings:Ae.A.prepareSettings({})})]}),_&&m&&(0,k.jsx)("div",{className:Ya("errors"),children:(0,k.jsx)(Ba,{errors:t.inner_errors,level:s+1,expanded:m,disableCloud:d,onErrorClick:f})})]})},Ga=n(19904),Ka=n(77720),Xa=function(e){var t=e.rootError,n=(0,Ga.d)().getEditor,r=(0,o.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 Ka.yX(t,r))}),[n]),i=(0,o.useMemo)((function(){return JSON.stringify(t,null,4)}),[t]);return t?(0,k.jsxs)("div",{children:[(0,k.jsx)(b.E,{variant:"subheader-3",children:"Query error"})," ",(0,k.jsx)(I.A,{title:"Copy error",view:"flat-secondary",text:i,size:"l"}),(0,k.jsx)(Wa,{error:t,onErrorClick:r,expanded:!0})]}):null},Qa=n(88786),Ja=n(65873),Za=n(30996),es=function(e){var t=e.query,n=[Za.d.SPYT,Za.d.CHYT].includes(t.engine),r=[ie.RE.RUNNING,ie.RE.COMPLETING].includes(t.state);if(!n||!r)return null;var i=function(e){if(!e)return 0;if(e.spyt_progress)return Math.round(100*e.spyt_progress);if(e.total_progress){var t=e.total_progress,n=t.read_bytes,r=t.total_bytes_to_read;return r>0?Math.round(n/(r/100)):0}return 0}(t.progress);return(0,k.jsx)(Qa.m,{content:"".concat(i,"%"),children:(0,k.jsx)("div",{children:(0,k.jsx)(Ja.k,{theme:"info",size:"xs",value:i})})})},ts=(0,a.A)("query-results"),ns=o.memo((function(e){var t,n,r,a=e.query,s=e.className,l=e.toolbar,c=e.minimized,d=void 0!==c&&c,f=function(e){var t=(0,o.useState)(!1),n=(0,i.A)(t,2),r=n[0],a=n[1],s=(0,o.useState)(Pe.META),l=(0,i.A)(s,2),c=l[0],d=l[1],f=(0,o.useState)(void 0),h=(0,i.A)(f,2),v=h[0],m=h[1],g=(0,u.wA)(),y=(0,u.d4)((function(t){return(0,U.t_)(t,(null==e?void 0:e.id)||"")})),x=(0,o.useMemo)((function(){return c===Pe.RESULT?De((null==v?void 0:v.resultIndex)||0):c}),[c,v]),b=(0,o.useCallback)((function(e,t){if(function(e){return e.startsWith("result/")}(e)){d(Pe.RESULT);var n=t||(null==v?void 0:v.queryId);m(n?{queryId:n,resultIndex:ze(e)||0}:void 0)}else d(e),m(void 0)}),[v]),A=(0,o.useMemo)((function(){var t,n;if(!e)return[];var r=[];e.state===ie.RE.FAILED&&r.push({id:Pe.ERROR,title:"Error"}),e.state===ie.RE.COMPLETED&&r.push.apply(r,(0,he.A)(pe()(e.result_count,(function(t){var n;return y&&y[t]&&ge()(y[t],"error")&&(n=(0,k.jsx)(_.g,{status:ie.RE.FAILED,className:"query-status_tabs"})),{id:De(t),title:1===e.result_count?"Result":"Result #".concat(t+1),icon:n}}))));var i=!(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&&!i&&r.push({id:Pe.PROGRESS,title:"Progress"}),e.state===ie.RE.COMPLETED){var o,a=Le.Ay.getQueryResultChartTab();a&&e.result_count&&r.push({id:Pe.CHART_TAB,title:a.title}),null!==(o=e.progress)&&void 0!==o&&o.yql_statistics&&r.push({id:Pe.STATISTIC,title:"Statistics"})}return r.push({id:Pe.META,title:"Meta"}),r}),[e,y]),w=xe()(ie.GU,(function(t){return(null==e?void 0:e.state)===t}));return(0,o.useEffect)((function(){var t;e&&g(function(e){return function(){var t=(0,W.A)(Z().mark((function t(n,r){var i,o,a,s,u,l;return Z().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,U.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,ke.fI)(n((0,ie.B_)(e.id,a)),{toasterName:"load_query_results",skipSuccessToast:!0,errorTitle:"Failed to load query results meta"});case 11:u=t.sent,l={},Oe()(u,(function(e,t){var n=e.output,r=e.error||(null==n?void 0:n.error);r&&(l[t]={error:r,state:B.t.Error,resultReady:!1})})),n({type:p.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)),b(null==A||null===(t=A[0])||void 0===t?void 0:t.id,null==e?void 0:e.id)}),[g,null==e?void 0:e.id,w]),(0,o.useEffect)((function(){var t=A.some((function(e){return e.id===Pe.PROGRESS}));t&&(null==e?void 0:e.state)===ie.RE.RUNNING&&!r&&(a(!0),d(Pe.PROGRESS))}),[r,null==e?void 0:e.state,A]),[A,b,{activeTabId:x,category:c,activeResultParams:v}]}(a),h=(0,i.A)(f,3),v=h[0],m=h[1],g=h[2],y=g.activeTabId,b=g.category,A=g.activeResultParams,w=o.useMemo((function(){var e,t,n;return t=null==a||null===(e=a.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,N.A)(t[r])&&null!==t[r]&&e(t[r])}(t),n):n}),[null==a||null===(t=a.progress)||void 0===t?void 0:t.yql_statistics]);if(!a)return null;var E=null==A?void 0:A.resultIndex;return(0,k.jsxs)("div",{className:ts(null,s),children:[(0,k.jsxs)("div",{className:ts("meta"),children:[(0,k.jsx)(T,{className:ts("meta-info"),query:a}),(0,k.jsx)("div",{className:ts("toolbar"),children:l})]}),(0,k.jsx)(es,{query:a}),(0,k.jsx)(He,{className:ts("result",{minimized:d}),hide:d,children:(0,k.jsxs)(Ve.rk,{plan:null===(n=a.progress)||void 0===n?void 0:n.yql_plan,progress:null===(r=a.progress)||void 0===r?void 0:r.yql_progress,defaultView:"graph",children:[(0,k.jsxs)("div",{className:ts("header"),children:[(0,k.jsx)(x.t,{className:ts("tabs"),items:v,activeTab:y,onSelectTab:function(e){return m(e,null==a?void 0:a.id)}}),b===Pe.RESULT&&Number.isInteger(E)&&(0,k.jsx)("div",{className:ts("tab_actions"),children:(0,k.jsx)(fe,{query:a,resultIndex:null!=E?E:0})}),b===Pe.PROGRESS&&(0,k.jsx)(Ye,{})]}),(0,k.jsxs)("div",{className:ts("content"),children:[(0,k.jsx)(He,{hide:b!==Pe.RESULT&&!Number.isInteger(E),className:ts("result-wrap"),children:(0,k.jsx)(Ut,{query:a,activeResultParams:A})}),(0,k.jsx)(He,{hide:b!==Pe.CHART_TAB,className:ts("result-wrap"),children:(0,k.jsx)(qt,{query:a})}),b===Pe.ERROR&&(0,k.jsx)(Xa,{rootError:a.error}),b===Pe.META&&(0,k.jsx)(z,{query:a}),(0,k.jsx)(He,{hide:b!==Pe.STATISTIC,children:(0,k.jsx)(Fe,{})}),b===Pe.PROGRESS&&(0,k.jsx)(Ma,{isActive:!0,operationIdToCluster:w})]})]})}),(0,k.jsx)("div",{})]})})),rs=n(78894),is=n(55695);const os=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 as=(0,a.A)("query-share-button"),ss=new rs.I,us=function(){var e=(0,u.wA)(),t=(0,o.useState)(!1),n=(0,i.A)(t,2),r=n[0],a=n[1],s=(0,La.A)(!1),c=(0,i.A)(s,2),d=c[0],h=c[1],v=(0,u.d4)(f.wJ),p=(0,u.d4)(l.Ry).includes(l.PH),m=(0,o.useCallback)((0,W.A)(Z().mark((function t(){return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a(!0),t.next=4,e((0,j.sR)());case 4:return t.prev=4,a(!1),t.finish(4);case 7:case"end":return t.stop()}}),t,null,[[0,,4,7]])}))),[e]),g=(0,o.useCallback)((0,W.A)(Z().mark((function e(){return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.clipboard.writeText(window.location.href),p){e.next=4;break}return e.next=4,m();case 4:ss.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:m}]});case 5:case"end":return e.stop()}}),e)}))),[m,p]);return v?(0,k.jsxs)("div",{className:as(),children:[(0,k.jsxs)(A.$,{onClick:g,view:p?"flat-info":"flat",pin:p?"round-brick":void 0,selected:p,loading:r,children:[(0,k.jsx)(w.I,{data:os,width:16})," ",p?"Shared":"Share"]}),p&&(0,k.jsx)(is.r,{renderSwitcher:function(e){return(0,k.jsx)(A.$,(0,$.A)((0,$.A)({},e),{},{view:"flat",selected:!0,pin:"brick-round",children:(0,k.jsx)(w.I,{size:16,data:d?Go:Wo})}))},onSwitcherClick:h,items:[{action:m,text:"Unpublish query"}]})]}):null},ls=n(20361),cs=n(27117),ds=n(9395),fs=function(e){var t=e.query_id,n=(0,u.wA)(),r=(0,u.d4)(f.EO),a=(0,m.t)(),s=a.selectACOOptions,l=a.changeCurrentQueryACO,c=a.currentQueryACO,d=(0,o.useState)(void 0),h=(0,i.A)(d,2),v=h[0],p=h[1],g=(0,La.A)(!1),y=(0,i.A)(g,2),x=y[0],b=y[1],E=function(){var e=(0,W.A)(Z().mark((function e(r){return Z().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,ds.et)());case 5:e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(0),p(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,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(A.$,{view:"flat",onClick:b,children:[(0,k.jsx)(w.I,{data:cs.A,size:16})," Edit ACO"]}),x&&(0,k.jsx)(ls.yZ,{pristineSubmittable:!0,visible:x,modal:!0,headerProps:{title:"Edit query ACO"},footerProps:{textApply:"Update"},onClose:function(){p(void 0),b()},onAdd:function(e){return E(e.getState().values)},initialValues:{aco:c},fields:[{name:"aco",type:"select",required:!0,extras:{options:s,placeholder:"ACO",width:"max",filterable:!0,multiple:r}}].concat((0,he.A)((0,ls.Y)([v])))})]})},hs=n(28099);const vs=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 ps=(0,a.A)("yt-qt-result-view"),ms=(0,o.memo)((function(e){var t=e.query,n=e.resultViewMode,r=e.setResultViewMode;return(0,k.jsx)(ns,{query:t,className:ps(),minimized:"minimized"===n,toolbar:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(We.s,{gap:2,className:ps("results-toolbar-buttons"),children:[(0,k.jsx)(us,{}),(0,k.jsx)(fs,{query_id:t.id})]}),"split"===n?(0,k.jsx)(A.$,{view:"flat",onClick:function(){return r("full")},children:(0,k.jsx)(w.I,{data:hs.A,size:16})}):(0,k.jsx)(A.$,{view:"flat",onClick:function(){return r("split")},children:(0,k.jsx)(w.I,{data:vs,size:16})}),"minimized"!==n&&(0,k.jsx)(A.$,{view:"flat",onClick:function(){return r("minimized")},children:(0,k.jsx)(w.I,{data:sn.A,size:16})})]})})}));const gs=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 11 12"},e),{},{children:(0,k.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"})}))};function ys(e){return e.filter((function(e){return("string"==typeof e?e:e.value)!==l.PH}))}var xs=function(){var e=(0,u.d4)(f.EO),t=(0,m.t)(),n=t.selectACOOptions,r=t.isFlight,i=t.changeDraftQueryACO,a=t.currentDraftQueryACO,s=(0,o.useCallback)((function(e){return i({aco:e})}),[i]);return(0,k.jsx)(k.Fragment,{children:(0,k.jsx)(Tt.l,{filterable:!0,disabled:r,width:"auto",label:"Access:",className:"query-aco-select",options:ys(n),value:ys(a),onUpdate:s,multiple:e})})},bs=n(94383),As=n(76866),ws=n(80016),Es=n(73689),_s=function(e){switch(e){case Za.d.CHYT:return Es.m.CHYT;case Za.d.SPYT:return Es.m.SPYT;case Za.d.YT_QL:return Es.m.YTQL;default:return Es.m.YQL}},Cs=n(57436),js=function(){function e(t){(0,G.A)(this,e),this.editor=void 0,this.collection=void 0,this.editor=t,this.collection=this.editor.createDecorationsCollection([])}return(0,K.A)(e,[{key:"clearDecorations",value:function(){this.collection.clear()}}]),e}(),ks=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(e,r,i){var o;return(0,G.A)(this,n),(o=t.call(this,e)).links=void 0,o.engine=void 0,o.commandKey=void 0,o.engine=r,o.commandKey=i,o.links=[],o}return(0,K.A)(n,[{key:"setEngine",value:function(e){this.engine=e}},{key:"updateLinks",value:function(){var e=this.editor.getModel();if(e){var t=e.getLineCount();if(t){for(var n=[],r=[],i=1;i<=t;i++){var o=e.getLineContent(i),a=(0,Cs.$)(o,this.engine),s=a.path,u=a.cluster,l=a.position;s&&(n.push({path:s,line:i,position:l,cluster:u}),r.push({range:new Ka.Q6(i,l.start,i,l.end),options:{hoverMessage:{value:"Follow link (".concat(this.commandKey," + click)")}}}))}At()(n,this.links)||(this.clearDecorations(),this.collection.set(r),this.links=n)}}}},{key:"findLink",value:function(e){var t=e.lineNumber,n=e.column;if(this.editor.getModel())return this.links.find((function(e){var r=e.position,i=r.start,o=r.end,a=e.line;return t===a&&n>=i&&n<=o}))}}]),n}(js),Ss=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"setActiveLine",value:function(e){if(e){var t=this.editor.getModel();t&&(this.clearDecorations(),this.collection.set([{range:new Ka.Q6(e,1,e,t.getLineLength(e)+1),options:{isWholeLine:!0,className:"yt-monaco-editor__highlighted-line"}}]),this.editor.setSelection(new Ka.LN(0,0,0,0)))}else this.clearLines()}},{key:"clearLines",value:function(){this.editor.setSelection(new Ka.LN(0,0,0,0)),this.clearDecorations()}}]),n}(js),Ts=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"setErrors",value:function(e,t){var n=this.editor.getModel();if(n){var r=[],i=[],o=new Set;e.forEach((function(e){var n=e.attributes,a=e.message,s=new Ka.Q6(n.start_position.row,n.start_position.column,n.end_position.row,n.end_position.column),u=s.startLineNumber,l=s.startColumn,c=s.endLineNumber,d=s.endColumn,f={message:a,severity:Ka.cj.Error,startLineNumber:u,startColumn:l,endLineNumber:c,endColumn:d};r.push(f),o.has(s.startLineNumber)||(i.push({range:s,options:{isWholeLine:!0,className:t}}),o.add(s.startLineNumber))})),this.clearDecorations(),this.collection.set(i),Ka.EN.setModelMarkers(n,"query-tracker",r)}}}]),n}(js),Ns=n(56447),Rs=(0,a.A)("yq-query-editor-monaco"),Os=function(){var e=(0,o.useState)(!1),t=(0,i.A)(e,2),n=t[0],r=t[1],a=(0,o.useRef)(),s=(0,Ga.d)().setEditor,c=(0,u.d4)(l.Ux),d=(0,u.d4)(l.AC),f=(0,u.d4)(l.Q4),h=(0,u.d4)(l.ln),v=(0,u.d4)(l.Fn),p=(0,u.d4)(l.hS),m=(0,u.wA)(),g=(0,u.d4)(ja.wd),y=(0,o.useRef)({isInitialized:!1,linkDecorator:null,lineDecorator:null,errorDecorator:null});!function(e){var t=(0,u.d4)(bs.RR);(0,o.useEffect)((function(){var e;null===(e=Le.Ay.getInlineSuggestionsApi())||void 0===e||e.sendTelemetry(t?"enabled":"disabled")}),[t]);var n=(0,o.useCallback)((function(n){var r;"Escape"===n.key&&e&&t&&(null===(r=Le.Ay.getInlineSuggestionsApi())||void 0===r||r.sendTelemetry("discarded"))}),[e]);(0,o.useEffect)((function(){Ka.EN.registerCommand("accessQuerySuggestionsTelemetry",(0,W.A)(Z().mark((function e(){var t;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===(t=Le.Ay.getInlineSuggestionsApi())||void 0===t||t.sendTelemetry("accepted");case 1:case"end":return e.stop()}}),e)}))))}),[]),(0,o.useEffect)((function(){return document.addEventListener("keydown",n,!0),function(){document.removeEventListener("keydown",n,!0)}}),[n,e])}(a.current),(0,o.useEffect)((function(){var e,t;null===(e=a.current)||void 0===e||e.focus(),null===(t=a.current)||void 0===t||t.setScrollTop(0)}),[c]),(0,o.useEffect)((function(){a.current&&(s("queryEditor",a.current),y.current.isInitialized||(y.current={isInitialized:!0,linkDecorator:new ks(a.current,h,gr()?"meta":"ctrl"),lineDecorator:new Ss(a.current),errorDecorator:new Ts(a.current)}))}),[s]),(0,o.useEffect)((function(){var e;null===(e=y.current.linkDecorator)||void 0===e||e.updateLinks()}),[d,f]),(0,o.useEffect)((function(){var e;null===(e=y.current.linkDecorator)||void 0===e||e.setEngine(h)}),[h]),(0,o.useEffect)((function(){var e;null===(e=y.current.errorDecorator)||void 0===e||e.setErrors(v,Rs("error-line"));var t,r=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}();p||!r||n||null===(t=y.current.lineDecorator)||void 0===t||t.setActiveLine(r)}),[n,v,p]);var x=(0,o.useMemo)((function(){return function(e){return{fontSize:14,language:e,renderWhitespace:"boundary",minimap:{enabled:!0},inlineSuggest:{enabled:!0,showToolbar:"always",mode:"subword",keepOnBlur:!0}}}(h)}),[h]),b=(0,o.useCallback)((function(e){var t=e.element.dataset.number;if(t){var n;null===(n=y.current.lineDecorator)||void 0===n||n.setActiveLine(parseInt(t,10));var r=new URL(window.location.href);r.hash="#L".concat(t),window.history.pushState(null,"",r.toString())}else{var i;null===(i=y.current.lineDecorator)||void 0===i||i.clearLines()}}),[]),A=(0,o.useCallback)((function(e){var t,n=null===(t=y.current.linkDecorator)||void 0===t?void 0:t.findLink(e);n&&m((0,Ns.in)(n.path,n.cluster))}),[m]),w=(0,o.useCallback)((function(e){var t=e.target,n=e.event;t.type===Ka.EN.MouseTargetType.GUTTER_LINE_NUMBERS&&b(t),t.type===Ka.EN.MouseTargetType.CONTENT_TEXT&&yr(n)&&A(t.position)}),[b,A]),E=(0,o.useCallback)((function(e){r(!0),m((0,j.Bn)({query:e,error:void 0}))}),[m]);return(0,k.jsx)(ws.w,{children:(0,k.jsx)(As.A,{editorRef:a,value:d||"",language:_s(h),className:Rs({"vim-mode":g}),onChange:E,onClick:w,monacoConfig:x})})},Is=(0,a.A)("yt-qt-query-editor-view"),Ms=(0,o.memo)((function(e){var t=e.onStartQuery,n=(0,o.useRef)(),r=(0,Ga.d)().setEditor,i=(0,u.d4)(l.Ux),a=(0,u.d4)(l.ln),s=(0,u.d4)(f.d),c=(0,u.wA)(),d=(0,o.useCallback)((function(){c((0,j.GB)(t))}),[c,t]);(0,o.useEffect)((function(){var e,t;null===(e=n.current)||void 0===e||e.focus(),null===(t=n.current)||void 0===t||t.setScrollTop(0)}),[i]),(0,o.useEffect)((function(){n.current&&r("queryEditor",n.current)}),[r]),(0,o.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(),d())};return document.addEventListener("keydown",e,!0),function(){document.removeEventListener("keydown",e,!0)}}),[d]);var h=(0,o.useCallback)((function(){c((0,j.GB)(t,{execution_mode:"validate"}))}),[c,t]),v=(0,o.useCallback)((function(){c((0,j.GB)(t,{execution_mode:"optimize"}))}),[c,t]);return(0,k.jsxs)("div",{className:Is(),children:[(0,k.jsx)(Os,{}),(0,k.jsx)("div",{className:Is("actions"),children:(0,k.jsxs)("div",{className:"query-run-action",children:[(0,k.jsxs)(A.$,{qa:"qt-run",view:"action",onClick:d,children:[(0,k.jsx)(w.I,{data:gs}),"Run"]}),a===Za.d.YQL?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(A.$,{qa:"qt-validate",onClick:h,children:"Validate"}),(0,k.jsx)(A.$,{qa:"qt-explain",onClick:v,children:"Explain"})]}):null,s&&(0,k.jsx)(xs,{})]})})]})})),Ls=(0,a.A)("query-container"),Ps=function(e){var t=e.onStartQuery,n=e.showStatusInTitle,a=(0,u.wA)(),x=function(){var e=(0,u.d4)(l.st),t=(0,u.d4)(f.B8),n=(0,o.useContext)(d.o),r=(0,u.wA)(),a=(0,o.useMemo)((function(){return function(e){var n=(0,i.A)(e,1)[0];r({type:p.JJ,data:(0,v.n)(n,t)})}}),[r,t]);return(0,o.useEffect)((function(){if(n&&e&&(0,h.KO)(e))return n.watch([e],a)}),[n,e,a]),e}(),b=(0,m.t)().isQueryTrackerInfoLoading,A=(0,o.useState)("minimized"),w=(0,i.A)(A,2),E=w[0],_=w[1],C=(0,o.useState)([50,50]),j=(0,i.A)(C,2),S=j[0],T=j[1];(0,o.useEffect)((function(){var e,t;if(x&&n){var r=x.start_time?g.A.format.DateTime(x.start_time,{format:"short"}):"",i=(null===(e=x.annotations)||void 0===e?void 0:e.title)||"",o=(null===(t=x.state)||void 0===t?void 0:t.toUpperCase())||"";(r||i||o)&&a((0,y.ar)({path:"".concat(i," ").concat(o," ").concat(r," @ ").concat(x.engine)}))}}),[a,x,n]),(0,o.useEffect)((function(){_("split")}),[null==x?void 0:x.id]);var N=(0,u.d4)(l.Kv),R=(0,u.d4)(l.hS),O=b||R;return(0,k.jsxs)(k.Fragment,{children:[O&&(0,k.jsx)("div",{className:Ls("loading"),children:(0,k.jsx)(s.a,{})}),(0,k.jsxs)(c.A,{className:Ls((0,r.A)({},E,!0)),direction:c.A.VERTICAL,onResizeEnd:T,getInitialSizes:function(){return S},children:["full"!==E&&(0,k.jsx)(Ms,{onStartQuery:t}),(null==x?void 0:x.id)&&N&&(0,k.jsx)(ms,{query:x,setResultViewMode:_,resultViewMode:E})]})]})}},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(11229),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,k=(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]),S=(0,i.useCallback)((function(e){var t=e;C(t),j?A(!0):k(t)}),[j,k]),T=(0,i.useCallback)((function(){C(void 0),A(!1)}),[]),N=(0,i.useCallback)((function(){C(void 0),_&&k(_),A(!1)}),[_,k]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.A,{className:t,size:"l",value:p.engine,onUpdate:S,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:T,onConfirm:N,onOutsideClick:T})]})}var p=n(59700),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),k=(0,a.A)("file-item-form"),S=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:k(null,l),children:[(0,v.jsxs)("div",{className:k(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:k("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})})]})]})},T=(0,a.A)("files-add-form"),N=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:T(),children:[n&&(0,v.jsx)(S,{file:{name:"",content:"",type:r,id:(0,A.A)()},onCancel:h,onSave:l,validator:t}),(0,v.jsxs)("div",{className:T("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"})}))},L=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 P=(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:P(),children:[(0,v.jsxs)("div",{className:P("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:P("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:L,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)(S,{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:L,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})})})]})]})},q=(0,a.A)("files-tabs"),B=function(e){return e.Current="current",e.Deleted="deleted",e}(B||{}),H=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)(B.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:q(null,d),children:[(0,v.jsx)(R.t,{activeTab:p,items:[{id:B.Current,title:"Current",counter:t.length,disabled:!t.length},{id:B.Deleted,title:"Deleted",counter:r,disabled:!r}],onSelectTab:m}),(0,v.jsx)("div",{className:q("list"),children:p===B.Current?g:y})]})},V=n(15647),Y=n(10645),W=n(56742),G=n(45035),K=n(63192),X=(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}))}),[]),k=(0,o.useCallback)((function(t){e((0,G.Ro)(t))}),[e]),S=(0,o.useCallback)((function(t){e((0,G.ek)(t))}),[e]),T=(0,o.useCallback)((function(t){e((0,G.pk)(t))}),[e]),R=(0,o.useCallback)((function(t){e((0,K.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:X(),children:[(0,v.jsx)("div",{className:X("header"),children:(0,v.jsx)(l.E,{variant:"subheader-3",children:"Attachments"})}),m&&(0,v.jsx)(H,{className:X("body"),files:n,deletedFiles:a,deletedFilesCounter:a.length,validator:M,onDeleteFile:S,onChangeFile:k,onRestoreFile:T,onEditFile:I}),(0,v.jsx)(N,{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:()=>N});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),k=n(52041),S=["cluster","clique"],T=(0,u.A)("query-settings-popup"),N=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,k.D)(n,r);if(t&&n in t){if(e===n)return i;i.name=k.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:T(),onClose:y,children:[(0,d.jsxs)("div",{className:T("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:T("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:S.includes(n)?void 0:{name:!0,value:!0},validator:_,onDelete:b,onChange:E},n)}))}),(0,d.jsx)(C,{onAdd:A,validator:_})]})]})}},64994:(e,t,n)=>{"use strict";n.d(t,{g:()=>y,C:()=>x});var r=n(68175),i=n(64922),o=n(77810);const a=(0,n(21086).om)("spin"),s=o.forwardRef((function(e,t){const{size:n="m",style:r,className:o,qa:s}=e;return(0,i.jsx)("div",{ref:t,style:r,className:a({size:n},o),"data-qa":s,children:(0,i.jsx)("div",{className:a("inner")})})}));var u=n(72679),l=n(76872),c=n(73822),d=n(55956),f=n(40319);var h=n(16077);var v,p=n(57660),m=(0,l.A)("query-status"),g=(v={},(0,r.A)(v,d.RE.DRAFT,p.A),(0,r.A)(v,d.RE.FAILED,(function(e){return(0,i.jsx)("svg",(0,f.A)((0,f.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-4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0M8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0z",clipRule:"evenodd"})}))})),(0,r.A)(v,d.RE.ABORTED,(function(e){return(0,i.jsx)("svg",(0,f.A)((0,f.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.5 8a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0M5.25 6.25a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1v3.5a1 1 0 0 1-1 1h-3.5a1 1 0 0 1-1-1z",clipRule:"evenodd"})}))})),(0,r.A)(v,d.RE.COMPLETED,h.A),v);function y(e){var t=e.status,n=e.className;if(d.Oc.includes(t))return(0,i.jsx)(s,{size:"xs",className:m("icon-container",n)});var o=g[t];return o?(0,i.jsx)(u.I,{className:m("icon-container",(0,r.A)({},t.toLocaleLowerCase(),!0),n),data:o,size:16}):(0,i.jsx)(i.Fragment,{children:t})}var x=function(e){var t=e.mode,n=e.status,r=e.className;return(0,i.jsxs)("div",{className:m(null,r),children:[("icon"===t||"both"===t)&&(0,i.jsx)(y,{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(11229),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])))}}}},56447:(e,t,n)=>{"use strict";n.d(t,{u_:()=>X,RU:()=>K,dt:()=>V,ID:()=>Y,p3:()=>Q,in:()=>J,vl:()=>G,sS:()=>H});var r=n(28407),i=n(40319),o=n(70232),a=n.n(o),s=n(45045),u=n(50875),l=n(48971),c=n(29746),d=n(20194),f=n(64714),h=n(44639),v=n(78894),p=n(68175),m=n(3659),g=n(2796),y=n(66030),x=n(55956),b=n(52797),A=n(88187),w=function(){var e=(0,r.A)(a().mark((function e(t){var n,r,o,s,u,c,d,h,v,w,E,_,C,j,k,S,T,N,R,O;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.clusterConfig,r=t.path,o=t.login,s=t.schema,u=t.keyColumns,c=t.limit,d=t.output_format,h=s.map((function(e){return e.name})),e.next=4,(0,l.fI)(f.Qq.checkPermission(f.Vu.dynTableCheckPerm,{setup:{proxy:(0,b.v9)(n)},parameters:{columns:h,permission:"read",user:o,path:r}}),{skipSuccessToast:!0,toasterName:"query_navigation_node_permissions",errorTitle:"Navigation node get attributes failure"});case 4:if(v=e.sent,Array.isArray(v.columns)){e.next=7;break}return e.abrupt("return",Promise.reject(new Error("Dynamic table columns is not array")));case 7:if(w=v.columns.reduce((function(e,t,n){return"allow"===t.action?e.availableColumns.push(h[n]):(e.omittedColumns.push(h[n]),u.includes(h[n])&&e.deniedKeyColumns.push((0,p.A)({},h[n],t.action))),e}),{availableColumns:[],omittedColumns:[],deniedKeyColumns:[]}),E=w.availableColumns,_=w.omittedColumns,0===w.deniedKeyColumns.length){e.next=10;break}return e.abrupt("return",Promise.reject(new Error("Dynamic table has denied key columns")));case 10:return C=E.map(m.A.decode),j={query:g.A.prepareQuery({aColumns:C,path:r,keyColumns:u,offset:0,limit:c}),output_format:d,dump_error_into_response:!0},k=(0,i.A)({proxy:(0,b.v9)(n),transformResponse:function(e){var t=e.parsedData,n=e.rawResponse;return{data:t,headers:null==n?void 0:n.headers}}},x.oj),e.next=15,(0,l.fI)((0,A.S)({setup:k,parameters:j}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node get rows failure"});case 15:return S=e.sent,T=S.columns,N=S.rows,R=S.yqlTypes,O=s.map((function(e){return e.name})),e.abrupt("return",{columns:(0,y._)(T,_,O),rows:N,yqlTypes:R});case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=n(96500),_=function(){var e=(0,r.A)(a().mark((function e(t){var n,r,o,s,u,c,d,f,h,v,p,m,g;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.path,r=t.clusterConfig,o=t.schema,s=t.limit,u=t.output_format,c=(0,i.A)({proxy:(0,b.v9)(r),transformResponse:function(e){var t=e.parsedData,n=e.rawResponse;return{data:t,headers:null==n?void 0:n.headers}}},x.oj),d={path:n+"[#0:#"+s+"]",output_format:u,dump_error_into_response:!0,omit_inaccessible_columns:!0,table_reader:{workload_descriptor:{category:"user_interactive"}}},e.next=5,(0,l.fI)((0,E.B)({setup:c,parameters:d}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node get rows failure"});case 5:return f=e.sent,h=f.columns,v=f.omittedColumns,p=f.rows,m=f.yqlTypes,g=o.map((function(e){return e.name})),e.abrupt("return",{columns:(0,y._)(h,v,g),rows:p,yqlTypes:m});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C=n(13724),j=n(21594),k=n(19314),S=n(97583),T=n(27723),N=n(73800),R=n(30996),O=n(63192),I=n(52120),M=n(92115),L=n(11229),P=n(6640),D=n(79329),z=n(54744),$=n(43359),F=n(82964),U=n(97941),q=n(59028),B=new v.I,H=function(e){return function(t,n){var r=n(),o=(0,u.rS)(r),a=(0,u.mk)(r);if(o){var l=(0,j.HL)(o,k.dK.LOCAL);t((0,C.Mb)(e,l));var c=a.map((function(t){return t.path===e?(0,i.A)((0,i.A)({},t),{},{isFavorite:!t.isFavorite}):t}));t((0,s.CU)(c))}}},V=function(e){return function(){var t=(0,r.A)(a().mark((function t(n,r){var o,d,h,v,p;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=r(),d=(0,u.$D)(o),h=(0,u.WS)(o),d){t.next=5;break}return t.abrupt("return");case 5:return n((0,s.r1)(!0)),t.next=8,(0,l.fI)(f.Qq.list(f.Vu.navigationListNodes,{setup:(0,i.A)({proxy:(0,b.v9)(d)},x.oj),parameters:{path:e,attributes:["type","broken","dynamic"]}}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node open failure"}).finally((function(){n((0,s.r1)(!1))}));case 8:v=t.sent,p=v.map((function(t){var n=c.A.getValue(t),r=e+"/"+n,o=c.A.getAttributes(t);return(0,i.A)((0,i.A)({name:n},o),{},{path:r,isFavorite:h.includes(r)})})).sort((function(e,t){return e.name.localeCompare(t.name)})),n((0,s.R6)("")),n((0,s.SO)(e)),n((0,s.VR)(s.Dh.Tree)),n((0,s.CU)(p));case 14:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},Y=function(e){return function(){var t=(0,r.A)(a().mark((function t(n,r){var i,o,l,f,v,p,m,g,y,x,A,E,C,j,k,S,T;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=r(),o=(0,u.$D)(i),l=(0,$.GN)(),f=l.cellSize,v=l.pageSize,p=(0,D.fN)(i),m=(0,z.t5)(i),g=(0,b.ID)(i),o){t.next=8;break}return t.abrupt("return");case 8:return t.next=10,(0,N.M)(e,o);case 10:return y=t.sent,x=c.A.getValue(y.schema),A=(0,P.m3)(x.map((function(e){return e.name})),f,g,p,m),E=y.dynamic?w:_,t.prev=14,t.next=17,E({login:i.global.login,path:e,clusterConfig:o,schema:x,keyColumns:y.key_columns,limit:v,output_format:A});case 17:C=t.sent,j=C.columns,k=C.rows,S=C.yqlTypes,T={name:y.key,meta:(0,d.UQ)({cluster:o.id,attributes:y,tableType:(0,h.H)(y.dynamic,y),isDynamic:y.dynamic}),rows:k,schema:x,columns:j,yqlTypes:S},n((0,s.SO)(e)),n((0,s.tQ)(T)),n((0,s.VR)(s.Dh.Table)),t.next=30;break;case 27:t.prev=27,t.t0=t.catch(14),B.add({theme:"danger",autoHiding:!1,name:"Load table data error",title:t.t0?t.t0.message:"Can't load table data"});case 30:case"end":return t.stop()}}),t,null,[[14,27]])})));return function(e,n){return t.apply(this,arguments)}}()},W=function(e,t){return function(){var n=(0,r.A)(a().mark((function n(r){var o;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r((0,s.l5)(t.id)),r((0,s.SO)(e)),n.next=5,f.Qq.get(f.Vu.navigationGetType,{setup:(0,i.A)({proxy:(0,b.v9)(t)},x.oj),parameters:{path:"".concat(e,"/@type")}});case 5:if(o=n.sent,!(0,S.h)(o)){n.next=11;break}return n.next=9,r(Y(e));case 9:n.next=17;break;case 11:if(!(0,T.R)(o)){n.next=16;break}return n.next=14,r(V(e));case 14:n.next=17;break;case 16:throw new Error("Сan't open this type of node");case 17:n.next=23;break;case 19:n.prev=19,n.t0=n.catch(0),r((0,s.Nh)(n.t0)),r((0,s.VR)(s.Dh.Error));case 23:case"end":return n.stop()}}),n,null,[[0,19]])})));return function(e){return n.apply(this,arguments)}}()},G=function(e){return function(){var t=(0,r.A)(a().mark((function t(n){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n((0,s.l5)(e)),n((0,s.SO)("/")),t.next=4,n(V("/"));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},K=function(){return function(){var e=(0,r.A)(a().mark((function e(t,n){var r,i,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n(),i=(0,u.$D)(r),o=(0,u.I7)(r),i){e.next=5;break}return e.abrupt("return");case 5:o&&t((0,s.VR)(s.Dh.Loading)),t(W(o,i));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},X=function(e){return function(){var t=(0,r.A)(a().mark((function t(n,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=r(),(0,u.rS)(i)){t.next=4;break}return t.abrupt("return");case 4:return t.prev=4,t.next=7,navigator.clipboard.writeText(e);case 7:B.add({theme:"success",name:"copy_navigation_path",title:"Path copied"}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(4),B.add({theme:"danger",name:"copy_navigation_path",title:"Can't copy path",content:t.t0.message,autoHiding:!1});case 13:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e,n){return t.apply(this,arguments)}}()},Q=function(e,t,n){return function(){var o=(0,r.A)(a().mark((function r(o,s){var l,c,d,f,h,v,p,m;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(l=s(),c=(0,$.GN)(),d=c.pageSize,f=(0,u.$D)(l),h=(0,L.sh)(l),v=h.settings,f){r.next=6;break}return r.abrupt("return");case 6:return r.next=8,o((0,O.cQ)());case 8:return(p=v?(0,i.A)({},v):{}).cluster=f.id,t===R.d.CHYT&&o((0,O.TI)(t,f.id)),o((0,O.Bn)({engine:t,settings:p})),r.next=14,(0,I.h)({clusterConfig:f,path:e,engine:t,limit:d});case 14:m=r.sent,(0,M.y)(m,n);case 16:case"end":return r.stop()}}),r)})));return function(e,t){return o.apply(this,arguments)}}()},J=function(e,t){return function(){var n=(0,r.A)(a().mark((function n(r,i){var o,l,c,d,f,h,v;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=i(),l=(0,L.sh)(o),c=l.settings,d=(0,u.oz)(o),f=t||(null==c?void 0:c.cluster)){n.next=6;break}return n.abrupt("return");case 6:if(h=d[f]){n.next=9;break}return n.abrupt("return");case 9:return v=e.replace(/\/+$/,""),n.next=12,r((0,q.rw)("global::queryTracker::queriesListSidebarVisibilityMode",!0));case 12:r({type:F.Zg,data:{listMode:U.e8.Navigation}}),r((0,s.VR)(s.Dh.Loading)),r(W(v,h));case 15:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},50875:(e,t,n)=>{"use strict";n.d(t,{$D:()=>v,I7:()=>m,NZ:()=>h,Nz:()=>d,PR:()=>A,Rv:()=>g,WS:()=>p,fV:()=>y,mV:()=>E,mk:()=>x,n7:()=>w,oz:()=>f,rS:()=>c});var r=n(13322),i=n(40319),o=n(18472),a=n(45033),s=n(79329),u=n(21594),l=n(19314),c=function(e){return e.queryTracker.queryNavigation.cluster},d=function(e){return e.queryTracker.queryNavigation.loading},f=function(e){return e.clustersMenu.clusters},h=function(e){return e.queryTracker.queryNavigation.error},v=(0,o.Mz)([c,f],(function(e,t){return e&&e in t?t[e]:null})),p=(0,o.Mz)([s.th,c],(function(e,t){if(!t)return[];var n=(0,u.HL)(t,l.dK.LOCAL),r=e(l.Ou.LOCAL.FAVOURITES,n);return r?r.map((function(e){return e.path})).sort():[]})),m=function(e){return e.queryTracker.queryNavigation.path},g=function(e){return e.queryTracker.queryNavigation.nodeType},y=function(e){return e.queryTracker.queryNavigation.filter},x=function(e){return e.queryTracker.queryNavigation.nodes},b=function(e,t){return e.toLowerCase().includes(t.toLowerCase())},A=(0,o.Mz)([function(e){return e.queryTracker.queryNavigation.table},y],(function(e,t){return e?(0,i.A)((0,i.A)({},e),{},{schema:e.schema.filter((function(e){var n=e.name,r=e.type;return b(n,t)||b(r,t)}))}):null})),w=(0,o.Mz)([a.Dy,y],(function(e,t){return t?e.filter((function(e){var n=e.name;return b(n,t)})):e})),E=(0,o.Mz)([x,y,m],(function(e,t,n){var i=!n||"/"===n,o={name:"...",type:"map_node",path:i?n:n.split("/").slice(0,-1).join("/"),isFavorite:!1};if(!t)return i?e:[o].concat((0,r.A)(e));var a=e.filter((function(e){var n=e.name;return b(n,t)}));return i||a.unshift(o),a}))},27723:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});var r=function(e){return!!e&&["map_node","scheduler_pool_tree_map","topmost_transaction_map","transaction_map","link","rootstock","portal_entrance"].includes(e)}},97583:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});var r=function(e){return!!e&&["table","tablet_cell","replicated_table"].includes(e)}},41347:(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:"M10 1.5A.75.75 0 0 0 10 3h1.94L6.97 7.97a.75.75 0 0 0 1.06 1.06L13 4.06V6a.75.75 0 0 0 1.5 0V2.25a.75.75 0 0 0-.75-.75zM7.5 3.25a.75.75 0 0 0-.75-.75H4.5a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3V9.25a.75.75 0 0 0-1.5 0v2.25a1.5 1.5 0 0 1-1.5 1.5h-6A1.5 1.5 0 0 1 3 11.5v-6A1.5 1.5 0 0 1 4.5 4h2.25a.75.75 0 0 0 .75-.75",clipRule:"evenodd"})}))}},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"})}))}},16077:(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.5 8a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-3.9-1.55a.75.75 0 1 0-1.2-.9L7.419 8.858 6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z",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:"_"}))},88786:(e,t,n)=>{"use strict";n.d(t,{m:()=>h});var r=n(64922),i=n(77810),o=n(13778),a=n(1093),s=n(55740),u=n(85137),l=n(21086),c=n(93434);const d=(0,l.om)("tooltip"),f=["bottom","top"],h=e=>{const{children:t,content:n,disabled:l,placement:h=f,qa:v,id:p,className:m,style:g,disablePortal:y,contentClassName:x,openDelay:b=1e3,closeDelay:A}=e,[w,E]=i.useState(null),_=(0,a.d)(w,{openDelay:b,closeDelay:A,preventTriggerOnFocus:!0}),C=i.Children.only(t),j=(0,c.Q)(C),k=(0,o.N)(E,j);return(0,r.jsxs)(i.Fragment,{children:[i.cloneElement(C,{ref:k}),w?(0,r.jsx)(s.z,{id:p,role:"tooltip",className:d(null,m),style:g,open:_&&!l,placement:h,anchorRef:{current:w},disablePortal:y,disableEscapeKeyDown:!0,disableOutsideClick:!0,disableLayer:!0,qa:v,children:(0,r.jsx)("div",{className:d("content",x),children:(0,r.jsx)(u.E,{variant:"body-short",color:"complementary",children:n})})}):null]})}},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}},48495:function(e){e.exports=function(){"use strict";function e(e,r,i,o,a){!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)}}(e,r,i||0,o||e.length-1,a||n)}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}var r=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(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 o(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,r,i){i||(i=v(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<n;o++){var a=e.children[o];s(i,e.leaf?r(a):a)}return i}function s(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 u(e,t){return e.minX-t.minX}function l(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function h(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function p(t,n,r,i,o){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=i)){var s=n+Math.ceil((r-n)/i/2)*i;e(t,s,n,r,o),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!h(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var a=t.children[o],s=t.leaf?r(a):a;h(e,s)&&(t.leaf?n.push(a):f(e,s)?this._all(a,n):i.push(a))}t=i.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!h(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var i=t.children[r],o=t.leaf?this.toBBox(i):i;if(h(e,o)){if(t.leaf||f(e,o))return!0;n.push(i)}}t=n.pop()}return!1},r.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=v([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,o,a=this.data,s=this.toBBox(e),u=[],l=[];a||u.length;){if(a||(a=u.pop(),r=u[u.length-1],n=l.pop(),o=!0),a.leaf){var c=i(e,a.children,t);if(-1!==c)return a.children.splice(c,1),u.push(a),this._condense(u),this}o||a.leaf||!f(a,s)?r?(n++,a=r.children[n],o=!1):a=null:(u.push(a),l.push(n),n=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._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},r.prototype._build=function(e,t,n,r){var i,a=n-t+1,s=this._maxEntries;if(a<=s)return o(i=v(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,r-1))),(i=v([])).leaf=!1,i.height=r;var u=Math.ceil(a/s),l=u*Math.ceil(Math.sqrt(s));p(e,t,n,l,this.compareMinX);for(var c=t;c<=n;c+=l){var d=Math.min(c+l-1,n);p(e,c,d,u,this.compareMinY);for(var f=c;f<=d;f+=u){var h=Math.min(f+u-1,d);i.children.push(this._build(e,f,h,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,s=0;s<t.children.length;s++){var u=t.children[s],l=c(u),d=(f=e,h=u,(Math.max(h.maxX,f.maxX)-Math.min(h.minX,f.minX))*(Math.max(h.maxY,f.maxY)-Math.min(h.minY,f.minY))-l);d<o?(o=d,i=l<i?l:i,a=u):d===o&&l<i&&(i=l,a=u)}t=a||t.children[0]}var f,h;return t},r.prototype._insert=function(e,t,n){var r=n?e:this.toBBox(e),i=[],o=this._chooseSubtree(r,this.data,t,i);for(o.children.push(e),s(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),s=v(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,o(n,this.toBBox),o(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(e,t){this.data=v([e,t]),this.data.height=e.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,i,o,s,u,l,d,f=1/0,h=1/0,v=t;v<=n-t;v++){var p=a(e,0,v,this.toBBox),m=a(e,v,n,this.toBBox),g=(i=p,o=m,void 0,void 0,void 0,void 0,s=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),l=Math.min(i.maxX,o.maxX),d=Math.min(i.maxY,o.maxY),Math.max(0,l-s)*Math.max(0,d-u)),y=c(p)+c(m);g<f?(f=g,r=v,h=y<h?y:h):g===f&&y<h&&(h=y,r=v)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:u,i=e.leaf?this.compareMinY:l;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=a(e,0,t,i),u=a(e,n-t,n,i),l=d(o)+d(u),c=t;c<n-t;c++){var f=e.children[c];s(o,e.leaf?i(f):f),l+=d(o)}for(var h=n-t-1;h>=t;h--){var v=e.children[h];s(u,e.leaf?i(v):v),l+=d(u)}return l},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)s(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():o(e[t],this.toBBox)},r}()},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)},k="object"==typeof document&&document.all,S={all:k,IS_HTMLDDA:void 0===k&&void 0!==k},T=S.all,N=S.IS_HTMLDDA?function(e){return"function"==typeof e||e===T}: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,L=I?M.bind(M):function(){return M.apply(M,arguments)},P={},D={}.propertyIsEnumerable,z=Object.getOwnPropertyDescriptor,$=z&&!D.call({1:2},1);P.f=$?function(e){var t=z(this,e);return!!t&&t.enumerable}:D;var F,U,q=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},B=u,H=E,V=Object,Y=x("".split),W=B((function(){return!V("z").propertyIsEnumerable(0)}))?function(e){return"String"==H(e)?Y(e,""):V(e)}:V,G=function(e){return null==e},K=G,X=TypeError,Q=function(e){if(K(e))throw X("Can't call method on "+e);return e},J=W,Z=Q,ee=function(e){return J(Z(e))},te=N,ne=S.all,re=S.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=N,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=N,Ce=ce,je=Object,ke=we?function(e){return"symbol"==typeof e}:function(e){var t=Ee("Symbol");return _e(t)&&Ce(t.prototype,je(e))},Se=String,Te=function(e){try{return Se(e)}catch(e){return"Object"}},Ne=N,Re=Te,Oe=TypeError,Ie=function(e){if(Ne(e))return e;throw Oe(Re(e)+" is not a function")},Me=Ie,Le=G,Pe=function(e,t){var n=e[t];return Le(n)?void 0:Me(n)},De=L,ze=N,$e=re,Fe=TypeError,Ue={exports:{}},qe=s,Be=Object.defineProperty,He="__core-js_shared__",Ve=s[He]||function(e,t){try{Be(qe,e,{value:t,configurable:!0,writable:!0})}catch(n){qe[e]=t}return t}(He,{}),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,Ge=Q,Ke=Object,Xe=function(e){return Ke(Ge(e))},Qe=Xe,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=L,pt=re,mt=ke,gt=Pe,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=ke,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):{}},kt=jt,St=!O&&!u((function(){return 7!=Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Tt=O,Nt=L,Rt=P,Ot=q,It=ee,Mt=wt,Lt=Ze,Pt=St,Dt=Object.getOwnPropertyDescriptor;R.f=Tt?Dt:function(e,t){if(e=It(e),t=Mt(t),Pt)try{return Dt(e,t)}catch(e){}if(Lt(e,t))return Ot(!Nt(Rt.f,e,t),e[t])};var zt=u,$t=N,Ft=/#|\.prototype\./,Ut=function(e,t){var n=Bt[qt(e)];return n==Vt||n!=Ht&&($t(t)?zt(t):!!t)},qt=Ut.normalize=function(e){return String(e).replace(Ft,".").toLowerCase()},Bt=Ut.data={},Ht=Ut.NATIVE="N",Vt=Ut.POLYFILL="P",Yt=Ut,Wt=Ie,Gt=l,Kt=j(j.bind),Xt=function(e,t){return Wt(e),void 0===t?e:Gt?Kt(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=St,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=q,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=N,wn=R.f,En=Yt,_n=ie,Cn=Xt,jn=gn,kn=Ze,Sn=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},Tn=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&&kn(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?Sn(a):v&&An(a)?bn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&jn(l,"sham",!0),jn(m,o,l),v&&(kn(_n,i=d+"Prototype")||jn(_n,i,{}),jn(_n[i],o,a),e.real&&g&&(n||!g[o])&&jn(g,o,a)))},Nn=Tn,Rn=O,On=Qt.f;Nn({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 Ln=o.exports,Pn=Ln,Dn=i(Pn),zn=E,$n=Array.isArray||function(e){return"Array"==zn(e)},Fn=Math.ceil,Un=Math.floor,qn=Math.trunc||function(e){var t=+e;return(t>0?Un:Fn)(t)},Bn=function(e){var t=+e;return t!=t||0===t?0:qn(t)},Hn=Bn,Vn=Math.min,Yn=function(e){return function(e){return e>0?Vn(Hn(e),9007199254740991):0}(e.length)},Wn=TypeError,Gn=function(e){if(e>9007199254740991)throw Wn("Maximum allowed index exceeded");return e},Kn=wt,Xn=Qt,Qn=q,Jn=function(e,t,n){var r=Kn(t);r in e?Xn.f(e,r,Qn(0,n)):e[r]=n},Zn={};Zn[ht("toStringTag")]="z";var er="[object z]"===String(Zn),tr=er,nr=N,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=N,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=N,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,kr=Cr,Sr=re,Tr=ht("species"),Nr=Array,Rr=function(e,t){return new(function(e){var t;return jr(e)&&(t=e.constructor,(kr(t)&&(t===Nr||jr(t.prototype))||Sr(t)&&null===(t=t[Tr]))&&(t=void 0)),void 0===t?Nr:t}(e))(0===t?0:t)},Or=u,Ir=ye,Mr=ht("species"),Lr=function(e){return Ir>=51||!Or((function(){var t=[];return(t.constructor={})[Mr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Pr=Tn,Dr=u,zr=$n,$r=re,Fr=Xe,Ur=Yn,qr=Gn,Br=Jn,Hr=Rr,Vr=Lr,Yr=ye,Wr=ht("isConcatSpreadable"),Gr=Yr>=51||!Dr((function(){var e=[];return e[Wr]=!1,e.concat()[0]!==e})),Kr=function(e){if(!$r(e))return!1;var t=e[Wr];return void 0!==t?!!t:zr(e)};Pr({target:"Array",proto:!0,arity:1,forced:!Gr||!Vr("concat")},{concat:function(e){var t,n,r,i,o,a=Fr(this),s=Hr(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Kr(o=-1===t?a:arguments[t]))for(i=Ur(o),qr(u+i),n=0;n<i;n++,u++)n in o&&Br(s,u,o[n]);else qr(u+1),Br(s,u++,o);return s.length=u,s}});var Xr=sr,Qr=String,Jr=function(e){if("Symbol"===Xr(e))throw TypeError("Cannot convert a Symbol value to a string");return Qr(e)},Zr={},ei=Bn,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,ki=le("document","documentElement"),Si=it,Ti=We("keys"),Ni=function(e){return Ti[e]||(Ti[e]=Si(e))},Ri=nn,Oi=Zr,Ii=mi,Mi=li,Li=ki,Pi=jt,Di="prototype",zi="script",$i=Ni("IE_PROTO"),Fi=function(){},Ui=function(e){return"<"+zi+">"+e+"</"+zi+">"},qi=function(e){e.write(Ui("")),e.close();var t=e.parentWindow.Object;return e=null,t},Bi=function(){try{ji=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Bi="undefined"!=typeof document?document.domain&&ji?qi(ji):(t=Pi("iframe"),n="java"+zi+":",t.style.display="none",Li.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ui("document.F=Object")),e.close(),e.F):qi(ji);for(var r=Ii.length;r--;)delete Bi[Di][Ii[r]];return Bi()};Mi[$i]=!0;var Hi=Object.create||function(e,t){var n;return null!==e?(Fi[Di]=Ri(e),n=new Fi,Fi[Di]=null,n[$i]=e):n=Bi(),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 Gi={},Ki=ri,Xi=Yn,Qi=Jn,Ji=Array,Zi=Math.max,eo=function(e,t,n){for(var r=Xi(e),i=Ki(t,r),o=Ki(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):[];Gi.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=L,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})},ko=sr,So=er?{}.toString:function(){return"[object "+ko(this)+"]"},To=er,No=Qt.f,Ro=gn,Oo=Ze,Io=So,Mo=ht("toStringTag"),Lo=function(e,t,n,r){if(e){var i=n?e:e.prototype;Oo(i,Mo)||No(i,Mo,{configurable:!0,value:t}),r&&!To&&Ro(i,"toString",Io)}},Po=N,Do=s.WeakMap,zo=Po(Do)&&/native code/.test(String(Do)),$o=s,Fo=re,Uo=gn,qo=Ze,Bo=Ve,Ho=Ni,Vo=li,Yo="Object already initialized",Wo=$o.TypeError,Go=$o.WeakMap;if(zo||Bo.state){var Ko=Bo.state||(Bo.state=new Go);Ko.get=Ko.get,Ko.has=Ko.has,Ko.set=Ko.set,vo=function(e,t){if(Ko.has(e))throw Wo(Yo);return t.facade=e,Ko.set(e,t),t},po=function(e){return Ko.get(e)||{}},mo=function(e){return Ko.has(e)}}else{var Xo=Ho("state");Vo[Xo]=!0,vo=function(e,t){if(qo(e,Xo))throw Wo(Yo);return t.facade=e,Uo(e,Xo,t),t},po=function(e){return qo(e,Xo)?e[Xo]:{}},mo=function(e){return qo(e,Xo)}}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=Xt,Zo=W,ea=Xe,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=Tn,sa=s,ua=L,la=x,ca=O,da=Ae,fa=u,ha=Ze,va=ce,pa=nn,ma=ee,ga=wt,ya=Jr,xa=q,ba=Hi,Aa=xi,wa=Vi,Ea=Gi,_a=ao,Ca=R,ja=Qt,ka=Zr,Sa=P,Ta=uo,Na=co,Ra=We,Oa=li,Ia=it,Ma=ht,La=fo,Pa=Ao,Da=jo,za=Lo,$a=Qo,Fa=oa.forEach,Ua=Ni("hidden"),qa="Symbol",Ba="prototype",Ha=$a.set,Va=$a.getterFor(qa),Ya=Object[Ba],Wa=sa.Symbol,Ga=Wa&&Wa[Ba],Ka=sa.TypeError,Xa=sa.QObject,Qa=Ca.f,Ja=ja.f,Za=Ea.f,es=Sa.f,ts=la([].push),ns=Ra("symbols"),rs=Ra("op-symbols"),is=Ra("wks"),os=!Xa||!Xa[Ba]||!Xa[Ba].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(Ga);return Ha(n,{type:qa,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(Ga,this))throw Ka("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)},Ta(Ga=Wa[Ba],"toString",(function(){return Va(this).tag})),Ta(Wa,"withoutSetter",(function(e){return ss(Ia(e),e)})),Sa.f=cs,ja.f=us,ka.f=ls,Ca.f=ds,wa.f=Ea.f=fs,_a.f=hs,La.f=function(e){return ss(Ma(e),e)},ca&&Na(Ga,"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){Pa(e)})),aa({target:qa,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,qa),Oa[Ua]=!0;var vs=Ae&&!!Symbol.for&&!!Symbol.keyFor,ps=Tn,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=Tn,_s=Ze,Cs=ke,js=Te,ks=vs,Ss=We("symbol-to-string-registry");Es({target:"Symbol",stat:!0,forced:!ks},{keyFor:function(e){if(!Cs(e))throw TypeError(js(e)+" is not a symbol");if(_s(Ss,e))return Ss[e]}});var Ts=x([].slice),Ns=$n,Rs=N,Os=E,Is=Jr,Ms=x([].push),Ls=Tn,Ps=le,Ds=v,zs=L,$s=x,Fs=u,Us=N,qs=ke,Bs=Ts,Hs=Ae,Vs=String,Ys=Ps("JSON","stringify"),Ws=$s(/./.exec),Gs=$s("".charAt),Ks=$s("".charCodeAt),Xs=$s("".replace),Qs=$s(1..toString),Js=/[\uD800-\uDFFF]/g,Zs=/^[\uD800-\uDBFF]$/,eu=/^[\uDC00-\uDFFF]$/,tu=!Hs||Fs((function(){var e=Ps("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=Bs(arguments),r=function(e){if(Rs(e))return e;if(Ns(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(Ns(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}}(t);if(Us(r)||void 0!==e&&!qs(e))return n[1]=function(e,t){if(Us(r)&&(t=zs(r,this,Vs(e),t)),!qs(t))return t},Ds(Ys,null,n)},iu=function(e,t,n){var r=Gs(n,t-1),i=Gs(n,t+1);return Ws(Zs,e)&&!Ws(eu,i)||Ws(eu,e)&&!Ws(Zs,r)?"\\u"+Qs(Ks(e,0),16):e};Ys&&Ls({target:"JSON",stat:!0,arity:3,forced:tu||nu},{stringify:function(e,t,n){var r=Bs(arguments),i=Ds(tu?ru:Ys,null,r);return nu&&"string"==typeof i?Xs(i,Js,iu):i}});var ou=ao,au=Xe;Tn({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=Lo;Ao("toStringTag"),lu(uu("Symbol"),"Symbol"),Ao("unscopables"),Lo(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=N,_u=Xe,Cu=Au,ju=Ni("IE_PROTO"),ku=Object,Su=ku.prototype,Tu=Cu?ku.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 ku?Su:null},Nu=u,Ru=N,Ou=re,Iu=Hi,Mu=Tu,Lu=uo,Pu=ht("iterator"),Du=!1;[].keys&&("next"in(fu=[].keys())?(du=Mu(Mu(fu)))!==Object.prototype&&(cu=du):Du=!0);var zu=!Ou(cu)||Nu((function(){var e={};return cu[Pu].call(e)!==e}));Ru((cu=zu?{}:Iu(cu))[Pu])||Lu(cu,Pu,(function(){return this}));var $u={IteratorPrototype:cu,BUGGY_SAFARI_ITERATORS:Du},Fu=$u.IteratorPrototype,Uu=Hi,qu=q,Bu=Lo,Hu=vu,Vu=function(){return this},Yu=x,Wu=Ie,Gu=N,Ku=String,Xu=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||Gu(e))return e;throw Xu("Can't set "+Ku(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Zu=Tn,el=L,tl=Tu,nl=Lo,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:qu(+!r,n)}),Bu(e,i,!1,!0),Hu[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 kl 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 Sl=wl[kl],Tl=Sl&&Sl.prototype;Tl&&El(Tl)!==jl&&_l(Tl,jl,kl),Cl[kl]=Cl.Array}var Nl=hu;Ao("dispose");var Rl=Nl;Ao("asyncDispose");var Ol=Tn,Il=x,Ml=le("Symbol"),Ll=Ml.keyFor,Pl=Il(Ml.prototype.valueOf);Ol({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Ll(Pl(e))}catch(e){return!1}}});for(var Dl=Tn,zl=We,$l=le,Fl=x,Ul=ke,ql=ht,Bl=$l("Symbol"),Hl=Bl.isWellKnown,Vl=$l("Object","getOwnPropertyNames"),Yl=Fl(Bl.prototype.valueOf),Wl=zl("wks"),Gl=0,Kl=Vl(Bl),Xl=Kl.length;Gl<Xl;Gl++)try{var Ql=Kl[Gl];Ul(Bl[Ql])&&ql(Ql)}catch(e){}Dl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Hl&&Hl(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=Bn,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,kc=re,Sc=Ze,Tc=Ts,Nc=l,Rc=Function,Oc=Cc([].concat),Ic=Cc([].join),Mc={},Lc=Nc?Rc.bind:function(e){var t=jc(this),n=t.prototype,r=Tc(arguments,1),i=function(){var n=Oc(r,Tc(arguments));return this instanceof i?function(e,t,n){if(!Sc(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 kc(n)&&(i.prototype=n),i},Pc=Lc;Tn({target:"Function",proto:!0,forced:Function.bind!==Pc},{bind:Pc});var Dc=ie,zc=function(e){return Dc[e+"Prototype"]},$c=zc("Function").bind,Fc=ce,Uc=$c,qc=Function.prototype,Bc=function(e){var t=e.bind;return e===qc||Fc(qc,e)&&t===qc.bind?Uc:t},Hc=i(Bc),Vc=Ie,Yc=Xe,Wc=W,Gc=Yn,Kc=TypeError,Xc=function(e){return function(t,n,r,i){Vc(n);var o=Yc(t),a=Wc(o),s=Gc(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 Kc("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:Xc(!1),right:Xc(!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;Tn({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;Tn({target:"Array",proto:!0,forced:!Lr("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;Tn({target:"Array",proto:!0,forced:!Lr("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=Gn,wd=Xt,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=Xe,kd=Yn,Sd=Rr;Tn({target:"Array",proto:!0},{flatMap:function(e){var t,n=jd(this),r=kd(n);return Cd(e),(t=Sd(n,0)).length=_d(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var Td=zc("Array").flatMap,Nd=ce,Rd=Td,Od=Array.prototype,Id=i((function(e){var t=e.flatMap;return e===Od||Nd(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:Hc(o=this._add).call(o,this),remove:Hc(a=this._remove).call(a,this),update:Hc(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}(),Ld=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}(),Pd=L,Dd=nn,zd=Pe,$d=function(e,t,n){var r,i;Dd(e);try{if(!(r=zd(e,"return"))){if("throw"===t)throw n;return n}r=Pd(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,qd=vu,Bd=ht("iterator"),Hd=Array.prototype,Vd=function(e){return void 0!==e&&(qd.Array===e||Hd[Bd]===e)},Yd=sr,Wd=Pe,Gd=G,Kd=vu,Xd=ht("iterator"),Qd=function(e){if(!Gd(e))return Wd(e,Xd)||Wd(e,"@@iterator")||Kd[Yd(e)]},Jd=L,Zd=Ie,ef=nn,tf=Te,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=Xt,sf=L,uf=Xe,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};Tn({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:{}},kf=Tn,Sf=u,Tf=ee,Nf=R.f,Rf=O;kf({target:"Object",stat:!0,forced:!Rf||Sf((function(){Nf(1)})),sham:!Rf},{getOwnPropertyDescriptor:function(e,t){return Nf(Tf(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),Lf=le,Pf=Vi,Df=ao,zf=nn,$f=x([].concat),Ff=Lf("Reflect","ownKeys")||function(e){var t=Pf.f(zf(e)),n=Df.f;return n?$f(t,n(e)):t},Uf=Ff,qf=ee,Bf=R,Hf=Jn;Tn({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(e){for(var t,n,r=qf(e),i=Bf.f,o=Uf(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&Hf(a,t,n);return a}});var Vf=i(ie.Object.getOwnPropertyDescriptors),Yf={exports:{}},Wf=Tn,Gf=O,Kf=Zr.f;Wf({target:"Object",stat:!0,forced:Object.defineProperties!==Kf,sham:!Gf},{defineProperties:Kf});var Xf=ie.Object,Qf=Yf.exports=function(e,t){return Xf.defineProperties(e,t)};Xf.defineProperties.sham&&(Qf.sham=!0);var Jf=i(Yf.exports),Zf=i(Ln);Tn({target:"Array",stat:!0},{isArray:$n});var eh=ie.Array.isArray,th=i(eh),nh=Tn,rh=$n,ih=Cr,oh=re,ah=ri,sh=Yn,uh=ee,lh=Jn,ch=ht,dh=Ts,fh=Lr("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 kh(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 Sh=i(Nl),Th=zc("Array").concat,Nh=ce,Rh=Th,Oh=Array.prototype,Ih=i((function(e){var t=e.concat;return e===Oh||Nh(Oh,e)&&t===Oh.concat?Rh:t})),Mh=i(bh);Tn({target:"Reflect",stat:!0},{ownKeys:Ff});var Lh=i(ie.Reflect.ownKeys),Ph=i(eh),Dh=Xe,zh=xi;Tn({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)};Tn({target:"Array",proto:!0,forced:[].forEach!=Uh},{forEach:Uh});var qh=zc("Array").forEach,Bh=sr,Hh=Ze,Vh=ce,Yh=qh,Wh=Array.prototype,Gh={DOMTokenList:!0,NodeList:!0},Kh=function(e){var t=e.forEach;return e===Wh||Vh(Wh,e)&&t===Wh.forEach||Hh(Gh,Bh(e))?Yh:t},Xh=i(Kh),Qh=Tn,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=Te,hv=TypeError,vv=function(e,t){if(!delete e[t])throw hv("Cannot delete property "+fv(t)+" of "+fv(e))},pv=Tn,mv=Xe,gv=ri,yv=Bn,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=Gn,wv=Rr,Ev=Jn,_v=vv,Cv=Lr("splice"),jv=Math.max,kv=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=kv(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 Sv=zc("Array").splice,Tv=ce,Nv=Sv,Rv=Array.prototype,Ov=i((function(e){var t=e.splice;return e===Rv||Tv(Rv,e)&&t===Rv.splice?Nv:t})),Iv=O,Mv=x,Lv=L,Pv=u,Dv=xi,zv=ao,$v=P,Fv=Xe,Uv=W,qv=Object.assign,Bv=Object.defineProperty,Hv=Mv([].concat),Vv=!qv||Pv((function(){if(Iv&&1!==qv({b:1},qv(Bv({},"a",{enumerable:!0,get:function(){Bv(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!=qv({},e)[n]||Dv(qv({},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?Hv(Dv(u),o(u)):Dv(u),c=l.length,d=0;c>d;)s=l[d++],Iv&&!Lv(a,u,s)||(n[s]=u[s]);return n}:qv,Yv=Vv;Tn({target:"Object",stat:!0,arity:2,forced:Object.assign!==Yv},{assign:Yv});var Wv=i(ie.Object.assign),Gv=Xe,Kv=Tu,Xv=Au;Tn({target:"Object",stat:!0,forced:u((function(){Kv(1)})),sham:!Xv},{getPrototypeOf:function(e){return Kv(Gv(e))}});var Qv=ie.Object.getPrototypeOf;Tn({target:"Object",stat:!0,sham:!O},{create:Hi});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=N,cp=ip,dp=de,fp=Ts,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=Tn,yp=s,xp=mp(yp.setInterval,!0);gp({global:!0,bind:!0,forced:yp.setInterval!==xp},{setInterval:xp});var bp=Tn,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 kp(){return kp=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},kp.apply(this,arguments)}function Sp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Tp(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 Np,Rp=Cp,Op=["","webkit","Moz","MS","ms","o"],Ip="undefined"==typeof document?{style:{}}:document.createElement("div"),Mp=Math.round,Lp=Math.abs,Pp=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++}}Np="undefined"==typeof window?{}:window;var zp=Dp(Ip.style,"touchAction"),$p=void 0!==zp,Fp="compute",Up="auto",qp="manipulation",Bp="none",Hp="pan-x",Vp="pan-y",Yp=function(){if(!$p)return!1;var e={},t=Np.CSS&&Np.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){return e[n]=!t||Np.CSS.supports("touch-action",n)})),e}(),Wp="ontouchstart"in Np,Gp=void 0!==Dp(Np,"PointerEvent"),Kp=Wp&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Xp="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,Bp))return Bp;var t=vm(e,Hp),n=vm(e,Vp);return t&&n?Bp:t||n?t?Hp:Vp:vm(e,qp)?qp: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,Bp)&&!Yp[Bp],o=vm(r,Vp)&&!Yp[Vp],a=vm(r,Hp)&&!Yp[Hp];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:Pp(),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:Lp(e)>=Lp(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=Pp(),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=Lp(d.x)>Lp(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=Lp(c.x)>Lp(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 km(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Sm=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(km(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(km(this.element),this.evWin,this.domHandler)},e}();function Tm(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 Nm={pointerdown:Zp,pointermove:2,pointerup:em,pointercancel:tm,pointerout:tm},Rm={2:Xp,3:"pen",4:Qp,5:"kinect"},Om="pointerdown",Im="pointermove pointerup pointercancel";Np.MSPointerEvent&&!Np.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 Sp(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Nm[r],o=Rm[e.pointerType]||e.pointerType,a=o===Xp,s=Tm(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}(Sm);function Lm(e){return Array.prototype.slice.call(e,0)}function Pm(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];Tm(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 Sp(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:Xp,srcEvent:e})},t}(Sm);function $m(e,t){var n,r,i=Lm(e.touches),o=this.targetIds;if(t&(2|Zp)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var a=Lm(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?[Pm(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 Sp(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}(Sm),qm=2500;function Bm(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)}),qm)}}function Hm(e,t){e&Zp?(this.primaryTouch=t.changedPointers[0].identifier,Bm.call(this,t)):e&(em|tm)&&Bm.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===Xp,o=n.pointerType===Qp;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Hm.call(Tp(Tp(r)),t,n);else if(o&&Vm.call(Tp(Tp(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 Sp(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Sm);function Wm(e,t,n){return!!Array.isArray(e)&&(fm(e,n[t],n),!0)}var Gm=32,Km=1;function Xm(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=kp({enable:!0},e),this.id=Km++,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=Xm(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return Wm(e,"dropRecognizeWith",this)||(e=Xm(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===Tm(t,e=Xm(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Wm(e,"dropRequireFailure",this))return this;e=Xm(e,this);var t=Tm(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=Gm},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=Gm);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,kp({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}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[qp]},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 Gm},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=Gm}),this.options.interval),Gm},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,kp({pointers:1},t))||this}Sp(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:Gm},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,kp({event:"pan",threshold:10,pointers:1,direction:lm},t))||this).pX=null,n.pY=null,n}Sp(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(Hp),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,kp({event:"swipe",threshold:10,velocity:.3,direction:sm|um,pointers:1},t))||this}Sp(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&&Lp(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,kp({event:"pinch",threshold:0,pointers:2},t))||this}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Bp]},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,kp({event:"rotate",threshold:0,pointers:2},t))||this}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Bp]},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,kp({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}Sp(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 Gm},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=Pp(),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||(Gp?Mm:Kp?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=Tm(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(Tm(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 Sp(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:Xp,srcEvent:e})}},t}(Sm);function hg(e,t){var n=Lm(e.touches),r=Lm(e.changedTouches);return t&(em|tm)&&(n=Pm(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,kp({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=Gm,e.Manager=cg,e.Input=Sm,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=Lm,e.inArray=Tm,e.uniqueArray=Pm,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!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Ph(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=Sh("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,kh(Mh(t).call(t,2))));var i,o=t[0],a=t[1],s=bg(Lh(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])||Ph(o[u])||Ph(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 Ph(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 kg="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 Sg(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=kg(this._dom.overlay);r.on("tap",Hc(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push((function(){r.destroy()}));var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Xh(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(Sg.prototype),Sg.current=null,Sg.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()}},Sg.prototype.activate=function(){Sg.current&&Sg.current.deactivate(),Sg.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)},Sg.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")},Sg.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};var Tg=Cr,Ng=Te,Rg=TypeError,Og=function(e){if(Tg(e))return e;throw Rg(Ng(e)+" is not a constructor")},Ig=Tn,Mg=v,Lg=Lc,Pg=Og,Dg=nn,zg=re,$g=Hi,Fg=u,Ug=le("Reflect","construct"),qg=Object.prototype,Bg=[].push,Hg=Fg((function(){function e(){}return!(Ug((function(){}),[],e)instanceof e)})),Vg=!Fg((function(){Ug((function(){}))})),Yg=Hg||Vg;Ig({target:"Reflect",stat:!0,forced:Yg,sham:Yg},{construct:function(e,t){Pg(e),Dg(t);var n=arguments.length<3?e:Pg(arguments[2]);if(Vg&&!Hg)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(Bg,r,t),new(Mg(Lg,e,r))}var i=n.prototype,o=$g(zg(i)?i:qg),a=Mg(e,o,t);return zg(a)?a:o}});var Wg=i(ie.Reflect.construct);function Gg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Kg=Zv,Xg=i(Kg);Tn({target:"Object",stat:!0},{setPrototypeOf:Ju});var Qg=ie.Object.setPrototypeOf,Jg=i(Qg),Zg=i(Bc);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=Xg(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 Gg(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=Kh,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=q,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=Xt,ky=L,Sy=nn,Ty=Te,Ny=Vd,Ry=Yn,Oy=ce,Iy=of,My=Qd,Ly=$d,Py=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&&Ly(r,"normal",e),new Dy(!0,e)},g=function(e){return d?(Sy(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 Py(Ty(e)+" is not iterable");if(Ny(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=ky(u,r)).done;){try{s=g(l.value)}catch(e){Ly(r,"throw",e)}if("object"==typeof s&&s&&Oy(zy,s))return s}return new Dy(!1)},Fy=Jr,Uy=Tn,qy=ce,By=Tu,Hy=Ju,Vy=Hi,Yy=gn,Wy=q,Gy=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)))},Ky=$y,Xy=ht("toStringTag"),Qy=Error,Jy=[].push,Zy=function(e,t){var n,r=qy(ex,this);Hy?n=Hy(Qy(),r?By(this):ex):(n=r?this:Vy(ex),Yy(n,Xy,"Error")),void 0!==t&&Yy(n,"message",function(e,t){return void 0===e?arguments.length<2?"":t:Fy(e)}(t)),Gy(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 Ky(e,Jy,{that:i}),Yy(n,"errors",i),n};Hy?Hy(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=G,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=Xt,wx=N,Ex=Ze,_x=u,Cx=ki,jx=Ts,kx=jt,Sx=ap,Tx=yx,Nx=ed,Rx=xx.setImmediate,Ox=xx.clearImmediate,Ix=xx.process,Mx=xx.Dispatch,Lx=xx.Function,Px=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()}},qx=function(e){return function(){Ux(e)}},Bx=function(e){Ux(e.data)},Hx=function(e){xx.postMessage(Dx(e),tx.protocol+"//"+tx.host)};Rx&&Ox||(Rx=function(e){Sx(arguments.length,1);var t=wx(e)?e:Lx(e),n=jx(arguments,1);return $x[++zx]=function(){bx(t,void 0,n)},nx(zx),zx},Ox=function(e){delete $x[e]},Nx?nx=function(e){Ix.nextTick(qx(e))}:Mx&&Mx.now?nx=function(e){Mx.now(qx(e))}:Px&&!Tx?(ix=(rx=new Px).port2,rx.port1.onmessage=Bx,nx=Ax(ix.postMessage,ix)):xx.addEventListener&&wx(xx.postMessage)&&!xx.importScripts&&tx&&"file:"!==tx.protocol&&!_x(Hx)?(nx=Hx,xx.addEventListener("message",Bx,!1)):nx=Fx in kx("script")?function(e){Cx.appendChild(kx("script"))[Fx]=function(){Cx.removeChild(this),Ux(e)}}:function(e){setTimeout(qx(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,Gx,Kx,Xx,Qx,Jx=Yx,Zx=/ipad|iphone|ipod/i.test(de)&&"undefined"!=typeof Pebble,eb=/web0s(?!.*chrome)/i.test(de),tb=s,nb=Xt,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?((Xx=hb.resolve(void 0)).constructor=hb,Qx=nb(Xx.then,Xx),Wx=function(){Qx(gb)}):lb?Wx=function(){fb.nextTick(gb)}:(ib=nb(ib,tb),Wx=function(){ib(gb)}):(Gx=!0,Kx=db.createTextNode(""),new cb(gb).observe(Kx,{characterData:!0}),Wx=function(){Kx.data=Gx=!Gx}),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=N,jb=Yt,kb=dr,Sb=ht,Tb=wb,Nb=Ab,Rb=ye,Ob=_b&&_b.prototype,Ib=Sb("species"),Mb=!1,Lb=Cb(Eb.PromiseRejectionEvent),Pb=jb("Promise",(function(){var e=kb(_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&&(Tb||Nb)&&!Lb})),Db={CONSTRUCTOR:Pb,REJECTION_EVENT:Lb,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 qb,Bb,Hb=Tn,Vb=ed,Yb=s,Wb=L,Gb=uo,Kb=Lo,Xb=lx,Qb=Ie,Jb=N,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&&NA(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&&SA(e)})))},kA=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)},SA=function(e){Wb(nA,Yb,(function(){var t,n=e.facade,r=e.value;if(TA(e)&&(t=iA((function(){Vb?xA.emit("unhandledRejection",r,n):kA(EA,n,r)})),e.rejection=Vb||TA(e)?2:1,t.error))throw t.value}))},TA=function(e){return 1!==e.rejection&&!e.parent},NA=function(e){Wb(nA,Yb,(function(){var t=e.facade;Vb?xA.emit("rejectionHandled",t):kA("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(qb,this);var t=fA(this);try{e(RA(IA,t),RA(OA,t))}catch(e){OA(t,e)}}).prototype,(qb=function(e){hA(this,{type:lA,done:!1,notified:!1,parent:!1,reactions:new oA,rejection:!1,state:0,value:void 0})}).prototype=Gb(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})),Bb=function(){var e=new qb,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 Bb(e):AA(e)}),Hb({global:!0,constructor:!0,wrap:!0,forced:cA},{Promise:pA}),Kb(pA,lA,!1,!0),Xb(lA);var MA=bb,LA=Db.CONSTRUCTOR||!Af((function(e){MA.all(e).then(void 0,(function(){}))})),PA=L,DA=Ie,zA=zb,$A=xb,FA=$y;Tn({target:"Promise",stat:!0,forced:LA},{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++,PA(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=Tn,qA=Db.CONSTRUCTOR;bb&&bb.prototype,UA({target:"Promise",proto:!0,forced:qA,real:!0},{catch:function(e){return this.then(void 0,e)}});var BA=L,HA=Ie,VA=zb,YA=xb,WA=$y;Tn({target:"Promise",stat:!0,forced:LA},{race:function(e){var t=this,n=VA.f(t),r=n.reject,i=YA((function(){var i=HA(t.resolve);WA(e,(function(e){BA(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var GA=L,KA=zb;Tn({target:"Promise",stat:!0,forced:Db.CONSTRUCTOR},{reject:function(e){var t=KA.f(this);return GA(t.reject,void 0,e),t.promise}});var XA=nn,QA=re,JA=zb,ZA=function(e,t){if(XA(e),QA(t)&&t.constructor===e)return t;var n=JA.f(e);return(0,n.resolve)(t),n.promise},ew=Tn,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=L,sw=Ie,uw=zb,lw=xb,cw=$y;Tn({target:"Promise",stat:!0,forced:LA},{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=L,fw=Ie,hw=le,vw=zb,pw=xb,mw=$y,gw="No one promise resolved";Tn({target:"Promise",stat:!0,forced:LA},{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=Tn,xw=bb,bw=u,Aw=le,ww=N,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,kw=zb,Sw=xb;Tn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=kw.f(this),n=Sw(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Tw=jw,Nw=ov;!function(e){var t=uy.default,n=Pn,r=Jl,i=Kg,o=ry,a=ly,s=Qg,u=Tw,l=Nw,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 P(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 k={};b(k,g,(function(){return this}));var S=o&&o(o(D([])));S&&S!==h&&v.call(S,g)&&(k=S);var T=j.prototype=_.prototype=i(k);function N(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(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(T,"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(T),e},f.awrap=function(e){return{__await:e}},N(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()}))},N(T),b(T,x,"Generator"),b(T,g,(function(){return this})),b(T,"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,P.prototype={constructor:P,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,L),!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),L(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;L(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:{}},Lw=u((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Pw=u,Dw=re,zw=E,$w=Lw,Fw=Object.isExtensible,Uw=Pw((function(){Fw(1)}))||$w?function(e){return!!Dw(e)&&(!$w||"ArrayBuffer"!=zw(e))&&(!Fw||Fw(e))}:Fw,qw=!u((function(){return Object.isExtensible(Object.preventExtensions({}))})),Bw=Tn,Hw=x,Vw=li,Yw=re,Ww=Ze,Gw=Qt.f,Kw=Vi,Xw=Gi,Qw=Uw,Jw=qw,Zw=!1,eE=it("meta"),tE=0,nE=function(e){Gw(e,eE,{value:{objectID:"O"+tE++,weakData:{}}})},rE=Mw.exports={enable:function(){rE.enable=function(){},Zw=!0;var e=Kw.f,t=Hw([].splice),n={};n[eE]=1,e(n).length&&(Kw.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},Bw({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Xw.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=Tn,aE=s,sE=iE,uE=u,lE=gn,cE=$y,dE=fx,fE=N,hE=re,vE=Lo,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=Hi,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=Xt,jE=fx,kE=G,SE=$y,TE=fl,NE=hl,RE=lx,OE=O,IE=iE.fastKey,ME=Qo.set,LE=Qo.getterFor,PE={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),kE(i)||SE(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=LE(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=LE(t),o=LE(r);TE(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)?NE("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,NE(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)}}),PE);var DE=i(ie.Map),zE=oa.some;Tn({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,qE=Array.prototype,BE=i((function(e){var t=e.some;return e===qE||FE(qE,e)&&t===qE.some?UE:t})),HE=zc("Array").keys,VE=sr,YE=Ze,WE=ce,GE=HE,KE=Array.prototype,XE={DOMTokenList:!0,NodeList:!0},QE=i((function(e){var t=e.keys;return e===KE||WE(KE,e)&&t===KE.keys||YE(XE,VE(e))?GE: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_=Tn,c_=x,d_=Ie,f_=Xe,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)})),k_=m_((function(){E_.sort(null)})),S_=y_("sort"),T_=!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_||!k_||!S_||!T_},{sort:function(e){void 0!==e&&d_(e);var t=f_(this);if(T_)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 N_=zc("Array").sort,R_=ce,O_=N_,I_=Array.prototype,M_=i((function(e){var t=e.sort;return e===I_||R_(I_,e)&&t===I_.sort?O_:t})),L_=zc("Array").values,P_=sr,D_=Ze,z_=ce,$_=L_,F_=Array.prototype,U_={DOMTokenList:!0,NodeList:!0},q_=i((function(e){var t=e.values;return e===F_||z_(F_,e)&&t===F_.values||D_(U_,P_(e))?$_:t})),B_=i(mc),H_=zc("Array").entries,V_=sr,Y_=Ze,W_=ce,G_=H_,K_=Array.prototype,X_={DOMTokenList:!0,NodeList:!0},Q_=i((function(e){var t=e.entries;return e===K_||W_(K_,e)&&t===K_.entries||Y_(X_,V_(e))?G_: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;Xh(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 *");Xh(r=Ih(i=[]).call(i,kh(this._subscribers[e]),kh(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)}}),PE);var sC,uC=i(ie.Set),lC=i(of);function cC(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Ph(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=B_;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=kh(this._pairs)).call(e,(function(e){return e[0]}))}},{key:"toItemArray",value:function(){var e;return yd(e=kh(this._pairs)).call(e,(function(e){return e[1]}))}},{key:"toEntryArray",value:function(){return kh(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(kh(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({},B_,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({},B_,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({},B_,(function(){var e;return lC(M_(e=kh(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?Xh(n=hC(Object(i),!0)).call(n,(function(t){_c(e,t,i[t])})):Vf?Jf(e,Vf(i)):Xh(r=hC(Object(i))).call(r,(function(t){Zf(e,t,Mf(i,t))}))}return e}function pC(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Ph(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(Gg(o=n.call(this)),"flush",void 0),_c(Gg(o),"length",void 0),_c(Gg(o),"_options",void 0),_c(Gg(o),"_data",void 0),_c(Gg(o),"_idProp",void 0),_c(Gg(o),"_queue",null),e&&!Ph(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(Ph(e)){var o=yd(e).call(e,(function(e){return e[r._idProp]}));if(BE(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(Ph(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;Ph(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):Ph(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=kh(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=kh(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=kh(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=kh(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=Ph(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=Ph(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=kh(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(q_(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(q_(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=kh(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({},B_,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({},B_,Hc(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(Gg(a=n.call(this)),"length",0),_c(Gg(a),"_listener",void 0),_c(Gg(a),"_data",void 0),_c(Gg(a),"_ids",new uC),_c(Gg(a),"_options",void 0),a._options=i||{},a._listener=Hc(o=a._onEvent).call(o,Gg(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=kh(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)||Ph(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,Xh(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({},B_,Hc(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!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Ph(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}}}}(Lh(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 Xh(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 Ld(e)},e.isDataSetLike=bC,e.isDataViewLike=function(e,t){return"object"===xc(t)&&null!==t&&e===t.idProp&&"function"==typeof Xh(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)},34108:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>S,X$:()=>N});var r={grad:.9,turn:360,rad:360/(2*Math.PI)},i=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},o=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},a=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},s=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},u=function(e){return{r:a(e.r,0,255),g:a(e.g,0,255),b:a(e.b,0,255),a:a(e.a)}},l=function(e){return{r:o(e.r),g:o(e.g),b:o(e.b),a:o(e.a,3)}},c=/^#([0-9a-f]{3,8})$/i,d=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},f=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}},h=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}},v=function(e){return{h:s(e.h),s:a(e.s,0,100),l:a(e.l,0,100),a:a(e.a)}},p=function(e){return{h:o(e.h),s:o(e.s),l:o(e.l),a:o(e.a,3)}},m=function(e){return h((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},g=function(e){return{h:(t=f(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},y=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,x=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,b=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,A=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,w={string:[[function(e){var t=c.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?o(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?o(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=b.exec(e)||A.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:u({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=y.exec(e)||x.exec(e);if(!t)return null;var n,i,o=v({h:(n=t[1],i=t[2],void 0===i&&(i="deg"),Number(n)*(r[i]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return m(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=void 0===o?1:o;return i(t)&&i(n)&&i(r)?u({r:Number(t),g:Number(n),b:Number(r),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,a=void 0===o?1:o;if(!i(t)||!i(n)||!i(r))return null;var s=v({h:Number(t),s:Number(n),l:Number(r),a:Number(a)});return m(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,u=void 0===o?1:o;if(!i(t)||!i(n)||!i(r))return null;var l=function(e){return{h:s(e.h),s:a(e.s,0,100),v:a(e.v,0,100),a:a(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(u)});return h(l)},"hsv"]]},E=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]},_=function(e,t){var n=g(e);return{h:n.h,s:a(n.s+100*t,0,100),l:n.l,a:n.a}},C=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},j=function(e,t){var n=g(e);return{h:n.h,s:n.s,l:a(n.l+100*t,0,100),a:n.a}},k=function(){function e(e){this.parsed=function(e){return"string"==typeof e?E(e.trim(),w.string):"object"==typeof e&&null!==e?E(e,w.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 o(C(this.rgba),2)},e.prototype.isDark=function(){return C(this.rgba)<.5},e.prototype.isLight=function(){return C(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=l(this.rgba)).r,n=e.g,r=e.b,a=(i=e.a)<1?d(o(255*i)):"","#"+d(t)+d(n)+d(r)+a;var e,t,n,r,i,a},e.prototype.toRgb=function(){return l(this.rgba)},e.prototype.toRgbString=function(){return t=(e=l(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 p(g(this.rgba))},e.prototype.toHslString=function(){return t=(e=p(g(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=f(this.rgba),{h:o(e.h),s:o(e.s),v:o(e.v),a:o(e.a,3)};var e},e.prototype.invert=function(){return S({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),S(_(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),S(_(this.rgba,-e))},e.prototype.grayscale=function(){return S(_(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),S(j(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),S(j(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?S({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):o(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=g(this.rgba);return"number"==typeof e?S({h:e,s:t.s,l:t.l,a:t.a}):o(t.h)},e.prototype.isEqual=function(e){return this.toHex()===S(e).toHex()},e}(),S=function(e){return e instanceof k?e:new k(e)},T=[],N=function(e){e.forEach((function(e){T.indexOf(e)<0&&(e(k,w),T.push(e))}))}}}]);
3
- //# sourceMappingURL=8674.ba5cb9f1.chunk.js.map
1
+ /*! For license information please see 4330.37e8a0dd.chunk.js.LICENSE.txt */
2
+ (self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[4330],{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})]})}},33026:(e,t,n)=>{"use strict";n.d(t,{Ye:()=>V,DC:()=>K,Dz:()=>F});var r=n(40319),i=n(13322),o=n(9736),a=n(77810),s=n(15647),u=n(76872),l=n(46282),c=n(64772),d=n(69835),f=n(11394),h=n(78466),v=n(11843),p=n(34380),m=n(35074),g=n(60680),y=n(84162),x=n(30008),b=n(64922),A=(0,u.A)("elements-toolbar"),w=(0,u.A)("yt-statistics-table");function E(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,b.jsx)("div",{className:A(null,w("toolbar")),children:(0,b.jsxs)("div",{className:A("container"),children:[(0,b.jsx)("div",{className:A("component",w("filter")),children:(0,b.jsx)(y.A,{size:"m",debounce:500,value:"",onChange:i})}),(0,b.jsx)("div",{className:A("component",w("expand-collapse")),children:(0,b.jsx)("span",{className:w("expand-metrics"),children:(0,b.jsx)(h.L,{expanded:o,toggleExpanded:o?t:n})})}),e.helpUrl&&(0,b.jsx)("div",{className:A("component",w("help")),children:(0,b.jsx)(x.A,{url:e.helpUrl})})]})})}var _=n(70353);function C(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 j=n(74360),k=n(39760),S=n.n(k),T=n(30002),N=n.n(T),R=n(73822),O="<Root>";function I(e,t){return{name:t,prefix:e,path:e+"/"+t}}function M(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:O,r=t||{children:{},leaves:{}};return S()(e,(function(e,t){if("object"===(0,j.A)(N()(e)[0])){var i=I(n,t);r.children[i.path]=i,r=M(e,r,i.path)}else{var o=function(e,t,n){var r=I(e,t);return r.value=n,r}(n,t,e);r.leaves[o.path]=o}})),r}var L,P=function(e){return t=M(e),n=R.A.treeList.prepareTree(t.children,(function(e){return e.prefix})),(n=R.A.treeList.attachTreeLeaves(n,t.leaves,(function(e){return e.prefix})))[O];var t,n},D=n(68175),z=(L={},(0,D.A)(L,"ms",(function(e,t){return c.A.TimeDuration(Math.round(e),(0,r.A)({format:"milliseconds"},t))})),(0,D.A)(L,"bytes",(function(e,t){return $(e,t)})),(0,D.A)(L,"bytes * sec",(function(e,t){return $(e,t," * sec")})),(0,D.A)(L,"ms * bytes",(function(e,t){return $(e,t," * ms")})),(0,D.A)(L,"Mb*sec",(function(e,t){return $(1024*e*1024,t," * sec")})),L);function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return isNaN(e)?c.A.NO_VALUE:c.A.Bytes(Math.round(e),t)+n}function F(e,t,n){var r,i=null!==(r=z[t])&&void 0!==r?r:c.A.Number;return null==i?void 0:i(e,n)}var U=(0,u.A)("yt-statistics-table"),q=40;function B(e){var t=e.item,n=e.unit,r=t.attributes.value;if(r&&r.count&&r.sum){var i=r.sum/r.count;return i<1?F(i,n,{significantDigits:6}):F(i,n)}return c.A.NO_VALUE}function H(e){var t,n,r=e.item,i=e.aggregation,o=e.unit;return r.isLeafNode&&Boolean(r.attributes.value)?"avg"===i?(0,b.jsx)(B,{item:r,unit:o}):"count"===i?c.A.Number(null===(t=r.attributes)||void 0===t||null===(t=t.value)||void 0===t?void 0:t[i]):F(null===(n=r.attributes)||void 0===n||null===(n=n.value)||void 0===n?void 0:n[i],o):c.A.NO_VALUE}function V(e){var t=e.title,n=e.info,r=!(null!=n&&n.description||null!=n&&n.unit);return(0,b.jsxs)(p.m,{content:r?null:(0,b.jsx)(m.Ay,{items:[{key:"Description",value:n.description,visible:Boolean(n.description),className:U("description")},{key:"Unit",value:n.unit,visible:Boolean(n.unit)}]}),children:[t," ",!r&&(0,b.jsx)(g.L1,{children:(0,b.jsx)(l.A,{awesome:"question-circle"})})]})}function Y(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=e.info,c=a.useMemo((function(){return{minWidth:o,paddingLeft:((null==t?void 0:t.level)||0)*q}}),[t.level,o]),d=a.useCallback((function(){n.empty||r()}),[n,r]);return t.isLeafNode?(0,b.jsxs)("span",{className:U("metric"),style:c,children:[(0,b.jsx)(l.A,{awesome:"chart-line",className:U("metric-icon")}),(0,b.jsx)(V,{title:s(t),info:u})]}):(0,b.jsxs)("span",{className:U("group"),style:c,onClick:d,children:[(0,b.jsx)(h.L,{expanded:!(n.collapsed||n.empty),toggleExpanded:function(){}}),(0,b.jsx)(l.A,{awesome:n.collapsed||n.empty?"folder":"folder-open",className:U("group-icon")}),(0,b.jsx)("span",{children:s(t)})]})}var W=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"}}},G=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"),c=(0,o.A)(l,2),d=c[0],f=c[1],h=a.useMemo((function(){return P(t)}),[t]),v=a.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e)return[];var n=R.A.treeList.filterTree(e,(function(e){return-1!==e.name.indexOf(t)}),!0),r=R.A.treeList.sortTree(n,{field:"name",asc:!0},{name:{get:function(e){return e.name}}});return R.A.treeList.flattenTree(r)}(h,s)}),[h,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)(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.isLeafNode?20:40,u=C(i,a.attributes.name);r=Math.max(r,u+s+a.level*q)}}catch(e){o.e(e)}finally{o.f()}return Math.round(1.05*r)}(v,n)}),[n,v]),items:v,treeState:d,setTreeState:f,onFilterChange:function(e){return u(e)}}};function K(e){var t=e.className,n=e.helpUrl,o=e.virtual,u=e.visibleColumns,l=e.fixedHeader,c=e.statistic,h=e.getStatisticInfo,p=(0,s.d4)(v.Y),m=G({statistic:c,fontFamilies:p}),g=m.items,y=m.minWidth,x=m.treeState,A=m.setTreeState,w=m.onFilterChange,_=a.useMemo((function(){return{name:function(e,t,n,r){var i,o=null!==(i=null==h?void 0:h(e.name))&&void 0!==i?i:{};return(0,b.jsx)(Y,{item:e,minWidth:y,toggleItemState:n,itemState:r,renderValue:function(e){var t;return null==e||null===(t=e.attributes)||void 0===t?void 0:t.name},info:o})},__default__:function(e,t){if(e.isLeafNode){var n,r=(null!==(n=null==h?void 0:h(e.name))&&void 0!==n?n:{}).unit;return(0,b.jsx)(H,{item:e,aggregation:t,unit:r})}return null}}}),[y,h]),C=a.useMemo((function(){return W({visibleColumns:u})}),(0,i.A)(u));return(0,b.jsx)(d.A,{children:(0,b.jsxs)("div",{className:U(null,t),children:[(0,b.jsx)(E,{helpUrl:n,onFilterChange:w,onTreeStateChange:A,treeState:x}),(0,b.jsx)("div",{className:U("table-container"),children:(0,b.jsx)(f.A,(0,r.A)((0,r.A)({},C),{},{virtual:o,treeState:x,templates:_,items:g,css:U(),headerClassName:U("header",{fixed:l})}))})]})})}},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(37338);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(50326);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 k="yc-column-selector";j.registerKeyset("en",k,C);const S=j.keyset(k);var T=(0,o.A)("yc-column-selector"),N=["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?N:m,b=i.useRef(null),A=i.useState(!1),w=(0,r.A)(A,2),_=w[0],C=w[1],j=i.useState(!1),k=(0,r.A)(j,2),R=k[0],O=k[1],I=i.useState(),M=(0,r.A)(I,2),L=M[0],P=M[1];i.useEffect((function(){P(void 0)}),[l,c]),i.useEffect((function(){o&&(C(!1),P(void 0))}),[o]);var D=i.useCallback((function(e){P(e)}),[]),z=i.useCallback((function(){C(!1)}),[]),$=i.useCallback((function(){C(!1),P(void 0)}),[]),F=i.useCallback((function(){C(!1),P(void 0),L&&c!==L&&d(L)}),[L,d,c]);return(0,x.jsxs)("div",{className:T(null,t),children:[(0,x.jsx)("div",{className:T("control"),ref:b,onClick:function(){o||(C((function(e){return!e})),P(void 0),R||O(!0))},children:n||(0,x.jsx)(E,{displayArrow:!0,disabled:o,placeholder:S("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:S("label_columns"),items:l,value:null!=L?L:c,onUpdate:D,getItemId:v,filterItem:p,renderItem:f,renderItemValue:h}),(0,x.jsxs)("div",{className:T("controls"),children:[(0,x.jsx)(s.$,{view:"flat",className:T("control"),onClick:$,children:S("button_cancel")}),(0,x.jsx)(s.$,{view:"action",className:T("control"),onClick:F,children:S("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}},73800:(e,t,n)=>{"use strict";n.d(t,{M:()=>f});var r=n(40319),i=n(28407),o=n(70232),a=n.n(o),s=n(48971),u=n(64714),l=n(55956),c=n(52797),d=new(n(78894).I),f=function(){var e=(0,i.A)(a().mark((function e(t,n){var i,o,f,h;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(0,r.A)({proxy:(0,c.v9)(n)},l.oj),o=[{command:"get",parameters:{path:"".concat(t,"/@")}},{command:"get",parameters:{path:"".concat(t,"/@schema")}}],e.prev=2,e.next=5,u.Qq.executeBatch(u.Vu.navigationGetPath,{parameters:{requests:o},setup:i});case 5:if(f=e.sent,!(h=(0,s.$7)(f,"Failed to get navigation attributes"))){e.next=9;break}throw h;case 9:return e.abrupt("return",(0,r.A)((0,r.A)({},f[0].output),{},{schema:(0,r.A)({},f[1].output)}));case 12:return e.prev=12,e.t0=e.catch(2),d.add({name:"load_table_attributes",theme:"danger",title:"Failed to load table attributes",content:e.t0.message}),e.abrupt("return",{});case 16:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t,n){return e.apply(this,arguments)}}()},52120:(e,t,n)=>{"use strict";n.d(t,{h:()=>c});var r=n(28407),i=n(70232),o=n.n(i),a=n(73800),s=n(29746),u=n(98634),l=n(3659),c=function(){var e=(0,r.A)(o().mark((function e(t){var n,r,i,c,d,f;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.clusterConfig,r=t.path,i=t.engine,c=t.limit,e.next=3,(0,a.M)(r,n);case 3:return d=e.sent,f=s.A.getValue(d.schema),e.abrupt("return","SELECT\n".concat(f.map((function(e){return" "+l.A.prettyprint(e.name,{asHTML:!1}).replaceAll('"',"`")})).join(",\r\n"),"\nFROM ").concat((0,u.$)({path:r,cluster:n.id,engine:i}),"\nLIMIT ").concat(c));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},92115:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});var r=n(77720),i=function(e,t){if(t){var n=t.getPosition(),i={range:n?new r.Q6(n.lineNumber,n.column,n.lineNumber,n.column):new r.Q6(0,0,0,0),text:e};t.executeEdits("Insert text",[i])}}},98634:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(30996),i=function(e){var t=e.path,n=e.cluster,i=e.engine;if(!t||"/"===t)return n;switch(i){case r.d.YQL:return n+".`"+t+"`";case r.d.YT_QL:case r.d.CHYT:return"`"+t+"`";default:return"yt.`ytTable:"+t+"`"}}},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(11229),c=n(1701),d=n(19314),f=n(52797),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)},36510:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ne});var r=n(40319),i=n(9736),o=n(77810),a=n(79726),s=n(76872),u=n(85137),l=n(92423),c=n(70436),d=n(64922),f=(0,s.A)("node-details-info");function h(e){var t=e.Streams,n=e.InputColumns,r=e.InputKeyFilterColumns;return(0,d.jsxs)("div",{className:f(),children:[t&&(0,d.jsx)(c.A,{name:"Streams",size:"ns",collapsed:!1,children:(0,d.jsx)("div",{className:f("streams"),children:Object.keys(t).map((function(e){return(0,d.jsx)(v,{name:e,data:t[e]},e)}))})}),(0,d.jsx)(m,{data:n,title:"InputColumns"}),(0,d.jsx)(m,{data:r,title:"InputKeyFilterColumns"})]})}function v(e){var t=e.name,n=e.data;return(0,d.jsxs)("div",{className:f("entry"),children:[(0,d.jsx)("div",{className:f("entry-name"),children:t}),Array.isArray(n)&&(0,d.jsx)("div",{className:f("entry-items"),children:n.map((function(e,t){return(0,d.jsx)(p,(0,r.A)({},e),t)}))})]})}function p(e){var t=e.Name,n=e.Children;return(0,d.jsxs)("div",{className:f("item"),children:[(0,d.jsx)(u.E,{className:f("item-name"),color:"complementary",children:t}),Array.isArray(n)&&(0,d.jsx)("div",{className:f("item-children"),children:n.map((function(e,t){return(0,d.jsx)("div",{className:f("item-group"),children:e.map((function(e,t){return(0,d.jsx)(p,(0,r.A)({},e),t)}))},t)}))})]})}function m(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,d.jsx)(o.Fragment,{children:n.map((function(e,t){return e?(n=Array.isArray(e)?e:[e],(0,d.jsx)(c.A,{name:"".concat(r," #").concat(t+1),size:"ns",children:(0,d.jsx)(g,{items:n,limit:20})},t)):null;var n}))}):(t=Array.isArray(n)?n:[n],(0,d.jsx)(c.A,{name:r,size:"ns",collapsed:!1,children:(0,d.jsx)(g,{items:t,limit:20})})):null}function g(e){var t,n=e.items,r=e.limit,a=e.className,s=o.useState(!1),c=(0,i.A)(s,2),h=c[0],v=c[1],p=r&&!h?Math.min(n.length,r):n.length,m=n.length-p,g=0===p,y=m>0?n.slice(0,p):n;return(0,d.jsxs)("div",{className:f("columns",a),children:[y.map((function(e,t){return(0,d.jsx)("div",{className:f("columns-column"),children:(0,d.jsx)(u.E,{color:"complementary",children:e})},t)})),Boolean(m)&&(0,d.jsx)(l.$,{className:f("columns-expand"),onClick:function(e){e.stopPropagation(),v(!0)},children:(t=m,"Show ".concat(t," more items"))}),g&&(0,d.jsx)("div",{className:f("columns-empty"),children:"Empty list"})]})}var y=n(27222),x=(0,s.A)("node-jobs"),b=[{name:"status",header:"Status",sortable:!1,render:function(e){var t=e.row,n=e.footer;return(0,d.jsxs)("div",{className:x("item"),children:[(0,d.jsx)("div",{className:x("item-color",{status:t.status.toLowerCase()})}),(0,d.jsx)(u.E,{className:x("item-title"),color:n?"primary":"secondary",children:t.status})]})}},{name:"count",header:"Quantity",align:y.Ay.RIGHT,sortable:!1}];function A(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,f=[];return f.push({status:"Pending",count:c-n-i-a-u}),f.push({status:"Running",count:n}),f.push({status:"Completed",count:i}),f.push({status:"Failed",count:a}),f.push({status:"Aborted",count:u}),(0,d.jsx)("div",{className:x(),children:(0,d.jsx)(y.Ay,{theme:"yandex-cloud",columns:b,data:f,footerData:[{status:"Total",count:c}],settings:{displayIndices:!1}})})}var w=n(72679),E=n(18801),_=n(13322),C=n(71291),j=n.n(C),k=n(31470),S=n.n(k),T=n(67981),N=n.n(T),R="StructType",O="ListType",I="StreamType",M="TupleType",L="DictType",P="DataType",D="VariantType",z="OptionalType",$="TaggedType",F="VoidType",U="NullType",q="EmptyDictType",B="EmptyListType",H=["Void","Yson","Json","Null"],V=["Double","Float","Int64","Int32","Int16","Int8","Uint64","Uint32","Uint16","Uint8"],Y=["Date","TzDate","Datetime","TzDatetime","Timestamp","TzTimestamp","Interval"],W=["String","Utf8","Json"];function G(e){return V.indexOf(e)>=0}function K(e){return Y.indexOf(e)>=0}function X(e){return W.indexOf(e)>=0}function Q(e){return Array.isArray(e)&&e[0]===O&&Array.isArray(e[1])}function J(e){return Array.isArray(e)&&e[0]===M&&Array.isArray(e[1])}function Z(e){return Array.isArray(e)&&e[0]===R&&Array.isArray(e[1])}function ee(e){for(var t=e;t[0]===z;)t=t[1];if(t[0]===R){var n=j()(t[1]);return["Bins","Max","Min","WeightsSum"].every((function(e){return Object.prototype.hasOwnProperty.call(n,e)}))&&Array.isArray(n.Bins)&&n.Bins[0]===O&&n.Bins[1][0]===R&&S()(N().apply(void 0,(0,_.A)(n.Bins[1][1]))[0].sort(),["Frequency","Position"])}return!1}function te(e){return"Struct"===e.name}function ne(e){return"Variant"===e.name}function re(e){return Boolean(e.complex)}function ie(e){switch(e[0]){case P:return{name:e[1],simple:(n=e[1],H.indexOf(n)<0),numeric:G(e[1]),dateTime:K(e[1]),string:X(e[1]),params:e.slice(2)};case z:return function(e){return e.optional&&(e.optionalLevel=(e.optionalLevel||1)+1),e.optional=!0,e}(ie(e[1]));case $:return function(e,t){return e.tagged=!0,e.tags=(e.tags||[]).concat(t),e}(ie(e[2]),e[1]);case L:return e[2][0]===F?{name:"Set",complex:!0,type:ie(e[1])}:{name:"Dict",complex:!0,type:e.slice(1).map(ie)};case O:return{name:"List",complex:!0,type:ie(e[1])};case q:return{name:"EmptyDict"};case B:return{name:"EmptyList"};case I:return{name:"Stream",complex:!0,type:ie(e[1])};case M:return{name:"Tuple",complex:!0,type:e[1].map(ie)};case R:return{name:"Struct",complex:!0,struct:e[1].map((function(e){return{key:e[0],type:ie(e[1])}}))};case D:var t=function(e){var t=ie(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 F:return{name:"Void"};case U:return{name:"Null",null:!0};default:return{name:"Unknown"}}var n}var oe=["level","defaultExpanded"],ae=(0,s.A)("data-type"),se=function(e){var t=e.entry,n=e.level;return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("span",{className:ae("struct-key"),children:t.key},"key")," : ",(0,d.jsx)(ue,(0,r.A)({level:n},t.type),"type")]})};function ue(e){var t=e.level,n=void 0===t?0:t,a=e.defaultExpanded,s=(0,E.A)(e,oe),u=o.useState(void 0===a?n<2:a),l=(0,i.A)(u,2),c=l[0],f=l[1],h=s.optional,v=s.optionalLevel,p=s.name,m=s.tagged,g=s.tags,y=s.params,x=s.complex;return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsxs)("span",{className:ae({optional:h,complex:x,"optional-multilevel":(null!=v?v:0)>0}),"data-optional":v?"optional × ".concat(v):void 0,onClick:function(){return f((function(e){return!e}))},children:[p,Array.isArray(y)&&y.length>0&&"(".concat(y.join(", "),")"),m&&g?g.map((function(e){return(0,d.jsx)("span",{className:ae("tag"),children:e},e)})):null]},"name"),re(s)?(0,d.jsxs)("div",{className:ae("subtype",{expanded:c}),children:[(0,d.jsx)("span",{className:ae("ellipsis"),onClick:function(){return f((function(e){return!e}))}}),c&&(0,d.jsx)("div",{className:ae("content",{expanded:c}),children:te(s)||ne(s)?s.struct.map((function(e,t){return(0,d.jsx)(se,{level:n+1,entry:e},t)})):(Array.isArray(s.type)?s.type:[s.type]).map((function(e,t){return(0,d.jsx)(ue,(0,r.A)({level:n+1},e),t)}))})]},"subtype"):(0,d.jsx)("br",{},"separator")]})}const le=function(e){return(0,d.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,d.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 ce=n(10559),de=n(88150),fe=n(93209),he=(0,s.A)("yql-schema-table"),ve=[{name:"name",header:"Name",sortable:!1,render:function(e){var t=e.row;if("function"==typeof t.onNameClick){var n=t.onNameClick;return(0,d.jsxs)(fe.S,{color:"primary",className:he("item"),onClick:function(){n(t.name)},children:[t.sort&&(0,d.jsx)(w.I,{className:he("sort-icon"),data:t.sort.ascending?le:ce.A,size:16}),(0,d.jsx)("span",{className:he("name"),title:t.name,children:t.name}),(0,d.jsx)(w.I,{className:he("insert-icon"),data:de.A,size:16})]})}return(0,d.jsxs)("span",{className:he("item"),children:[t.sort&&(0,d.jsx)(w.I,{className:he("sort-icon"),data:t.sort.ascending?le:ce.A,size:16}),(0,d.jsx)("span",{className:he("name"),title:t.name,children:t.name})]})}},{name:"type",header:"Type",sortable:!1,render:function(e){var t=e.row;return(0,d.jsx)(ue,(0,r.A)({},t.type))}}];function pe(e){var t=e.className,n=e.schemaFields;return(0,d.jsx)("div",{className:he(null,t),children:(0,d.jsx)(y.Ay,{theme:"yandex-cloud",columns:ve,data:n,startIndex:1})})}var me=["key"],ge=function(e){return Boolean(e.type.simple)},ye=function(e){return Boolean(e.type.simple)};function xe(e){if(function(e){return!!J(e)&&e[1].length>0&&e[1].every((function(e){return ee(e)}))}(e))return["HistogramTupleType",e[1].map((function(e){return["HistogramType",e]}))];if(function(e){return!!Q(e)&&ee(e[1])}(e))return["HistogramListType",["HistogramType",e[1]]];if(function(e){return!!Z(e)&&e[1].length>0&&e[1].every((function(e){return ee(e[1])}))}(e))return["HistogramStructType",e[1].map((function(e){return["HistogramType",e[1],e[0]]}))];if(n=e,Array.isArray(n)&&n[0]===D&&(Z(n[1])||J(n[1]))){var t=e[1];if(J(t))return[D,[t[0],t[1].map((function(e){return xe(e)}))]];if(Z(t))return[D,[t[0],t[1].map((function(e){return ee(e[1])?[e[0],["HistogramType",e[1],e[0]]]:e}))]]}var n;return ee(e)?["HistogramType",e]:e}function be(e){if(!Array.isArray(e))return{resultType:"untyped"};var t,n=ie(e),i=function(e){return"List"===e.name}(n)?n.type:n,o=e;return Q(o)&&(o=o[1]),Z(o)&&(o=o[1]),function(e){return Array.isArray(e)&&e[0]===z&&Array.isArray(e[1])}(o)&&(o=o[1]),te(i)&&Array.isArray(o)?{optional:Boolean(i.optional),resultType:Q(e)?"table":"row",scheme:null!==(t=i.struct.map((function(e,t){var n=e.key,i=(0,E.A)(e,me);return(0,r.A)((0,r.A)({},i),{},{index:t,name:"".concat(n),downloadable:ge(e),sortable:ye(e)})})))&&void 0!==t?t:[],columns:o.map((function(e){return xe(e[1])}))}:function(e){return"EmptyList"===e.name}(i)&&Array.isArray(o)?{resultType:"table",scheme:[],columns:[],optional:!1}:{resultType:"cell",scheme:{type:n},columns:e}}var Ae=(0,s.A)("yql-node-schemas");function we(e){var t=e.className,n=e.schemas;return(0,d.jsxs)("div",{className:Ae(null,t),children:[n.inputs.length>0&&(0,d.jsx)(Ee,{title:"Inputs",schemas:n.inputs}),n.outputs.length>0&&(0,d.jsx)(Ee,{title:"Outputs",schemas:n.outputs})]})}function Ee(e){var t=e.title,n=e.schemas;return(0,d.jsx)(c.A,{className:Ae("item",{title:!0}),size:"ss",name:t,collapsed:!1,children:(0,d.jsx)("div",{children:n.map((function(e){var t=e.name,r=be(e.type),i="table"===r.resultType||"row"===r.resultType?r.scheme:void 0;return i?(0,d.jsx)(c.A,{className:Ae("item",{schema:!0}),size:"ns",name:t,collapsed:1!==n.length,children:(0,d.jsx)("div",{children:(0,d.jsx)(pe,{schemaFields:i})},t)},t):null}))})})}var _e=n(51238),Ce=(0,s.A)("node-stages"),je=[{name:"stage",header:"Stage",sortable:!1},{name:"duration",header:"Duration",align:y.Ay.RIGHT,sortable:!1,width:115}];function ke(e){var t=e.stages,n=function(e,t,n){var r=[],o=Object.keys(e).length;if(!o)return r;for(var a=(0,i.A)(Object.entries(e[0])[0],2),s=a[0],u=a[1],l=u,c=1;c<o;c++){var d=(0,i.A)(Object.entries(e[c])[0],2),f=d[0],h=d[1];r.push({stage:s,duration:(0,_e.p0)(u,h)}),s=f,u=h}var v=(0,_e.sj)(t)?null!=n?n:u:void 0;return r.push({stage:s,duration:(0,_e.p0)(u,v)}),r.push({stage:"Total",duration:(0,_e.p0)(l,v),footerIndex:" "}),r}(void 0===t?{}:t,e.state,e.finishedAt);return(0,d.jsx)("div",{className:Ce(),children:(0,d.jsx)(y.Ay,{theme:"yandex-cloud",rowClassName:Se,columns:je,startIndex:1,data:n.slice(0,-1),footerData:n.slice(-1)})})}function Se(e,t,n,r){return Ce(r?"header":n?"footer":"row")}var Te=(0,s.A)("operation-node-info");function Ne(e){var t,n=e.progress,s=e.details,u=e.schemas,l=e.containerRef,c=e.radioWidth,f=e.className,v=[];(0,_e.eg)(n)&&v.push({value:"stages",content:"Stages"}),(0,_e.b_)(s)&&v.push({value:"details",content:"Details"}),(0,_e.pv)(n)&&v.push({value:"jobs",content:"Jobs"}),u&&v.push({value:"schemas",content:"Schemas"});var p=o.useState(null===(t=v[0])||void 0===t?void 0:t.value),m=(0,i.A)(p,2),g=m[0],y=m[1];return(0,d.jsxs)("div",{ref:l,className:Te(null,f),children:[v.length>1&&(0,d.jsx)(a.a,{className:Te("selector"),value:g,options:v,onUpdate:y,width:c}),"stages"===g&&(0,d.jsx)(ke,(0,r.A)({},n)),"details"===g&&(0,d.jsx)(h,(0,r.A)({},s)),"jobs"===g&&(0,d.jsx)(A,(0,r.A)({},n)),"schemas"===g&&u&&(0,d.jsx)(we,{className:Te("schema"),schemas:u})]})}},92603:(e,t,n)=>{"use strict";n.d(t,{Bf:()=>m,IQ:()=>g,gi:()=>p,oy:()=>h,rk:()=>f,wE:()=>v});var r=n(9736),i=n(77810),o=n(64922),a=i.createContext(void 0),s=i.createContext(void 0),u=i.createContext(void 0),l=i.createContext(void 0),c=i.createContext(void 0),d=[{value:"graph",content:"Graph"},{value:"timeline",content:"Timeline"}];function f(e){var t=e.plan,n=e.progress,f=e.children,h=e.defaultView,v=i.useMemo((function(){return d}),[!1]),p=v[0].value,m=i.useState(null!=h?h:p),g=(0,r.A)(m,2),y=g[0],x=g[1],b=y;return v.find((function(e){return e.value===b}))||(b=p),(0,o.jsx)(a.Provider,{value:null!=t?t:null,children:(0,o.jsx)(u.Provider,{value:v,children:(0,o.jsx)(s.Provider,{value:b,children:(0,o.jsx)(l.Provider,{value:x,children:(0,o.jsx)(c.Provider,{value:null!=n?n:null,children:f})})})})})}function h(){var e=i.useContext(a);if(void 0===e)throw new Error("useResultPlan must be used within a PlanProvider");return e}function v(){var e=i.useContext(c);if(void 0===e)throw new Error("useResultProgress must be used within a PlanProvider");return e}function p(){var e=i.useContext(s);if(void 0===e)throw new Error("usePlanView must be used within a PlanProvider");return e}function m(){var e=i.useContext(u);if(void 0===e)throw new Error("usePlanView must be used within a PlanProvider");return e}function g(){var e=i.useContext(l);if(void 0===e)throw new Error("useSetPlanView must be used within a PlanProvider");return e}},91009:(e,t,n)=>{"use strict";n.d(t,{k:()=>i,B:()=>o});var r=n(34108);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body;return getComputedStyle(t).getPropertyValue(e)}function o(e){return(0,r.Mj)(e).toHex()}(0,r.X$)([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"])}])},51238:(e,t,n)=>{"use strict";n.d(t,{$u:()=>$,AX:()=>z,CJ:()=>m,DW:()=>k,GE:()=>M,Ie:()=>y,Ml:()=>S,RQ:()=>F,SV:()=>g,ZG:()=>T,b_:()=>N,eg:()=>O,lt:()=>I,p0:()=>w,pv:()=>R,ry:()=>D,sj:()=>E,vk:()=>j});var r=n(9736),i=n(70353),o=n(13322),a=n(74360),s=n(77810),u=n(73966),l=n(34563),c=n(16040),d=n(74879),f=n(96843),h=n.n(f),v=n(55338);function p(e){return"number"==typeof e?v.c9.fromMillis(e):"string"==typeof e?v.c9.fromISO(e):e instanceof Date?v.c9.fromJSDate(e):v.c9.isDateTime(e)?e:v.c9.now()}function m(e,t){return"object"===(0,a.A)(e)&&e&&Reflect.has(e,t)}function g(e){var t,n=null,r=function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];t=i,null===n&&(n=requestAnimationFrame((function(){n=null,e.apply(void 0,(0,o.A)(t))})))};return r.cancel=function(){n&&cancelAnimationFrame(n),n=null},r}var y={NotStarted:{title:"Not started"},Started:{title:"Waiting"},InProgress:{title:"Running"},Finished:{title:"Completed"},Failed:{title:"Failed"},Aborted:{title:"Aborted"}},x=25;function b(e){return e.length>x?"…"+e.slice(-x):e}function A(e,t){try{var n=Object.keys(t[Object.keys(t).length-1])[0];return"".concat(b(e),"\n(").concat(n,")")}catch(e){return""}}function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"h:mm:ss.SSS",r=p(e),i=p(t),o=i.diff(r);return r>i?o.negate().toFormat(n):o.toFormat(n)}function E(e){return e&&["Finished","Failed","Aborted"].indexOf(e)>=0}function _(e){var t,n,r=e.type,i=e.node,o=e.colors,a=o.operation,s=o.text,f=document.createElement("div"),h=[],v=[],p=s.operationCount;if("update"===r)switch(null==i?void 0:i.state){case"Started":v.push({label:"Started",count:1}),h.push(a.started),n=a.startedBorder;break;case"Failed":v.push({label:"Failed",count:1}),h.push(a.failed),n=a.failedBorder;break;case"Aborted":v.push({label:"Failed",count:1}),h.push(a.aborted),n=a.abortedBorder;break;case"InProgress":var m,g,y=i.total||1,x=Math.round((null!==(m=i.running)&&void 0!==m?m:0)/y*100),b=Math.round((null!==(g=i.completed)&&void 0!==g?g:0)/y*100),A=Math.round(100-x-b);b>0&&(v.push({label:"Completed",count:b}),h.push(a.completed)),x>0&&(v.push({label:"Running",count:x}),h.push(a.running)),A>0&&(v.push({label:"Least",count:A}),h.push(a.started)),p=s.label,n=a.runningBorder;break;case"Finished":v.push({label:"Completed",count:1}),h.push(a.completed),n=a.completedBorder}else v.push({label:"Least",count:100}),h.push(a.new),n=a.newBorder;var w=(0,u.A)(h),E=Math.min(80,80)/2,_=(0,l.A)(f).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)"),C=(0,c.A)().innerRadius(0).outerRadius(E-2),j=(0,d.A)().value((function(e){return e.count})).sort(null);if(_.selectAll("path").data(j(v)).enter().append("path").attr("d",C).attr("fill",(function(e){return w(e.data.label)})),i&&(null!==(t=i.total)&&void 0!==t?t:0)>0){var k,S=Number(null!==(k=i.total)&&void 0!==k?k:0),T=function(e){switch(Math.floor(Math.log10(e))+1){case 1:return 34;case 2:return 30;case 3:return 26;default:return 24}}(S);_.selectAll("text").data([i]).enter().append("text").text(S).attr("fill",p).attr("font-family","YS Text, Arial, sans-serif").attr("font-size","".concat(T)).attr("stroke-width","0").attr("transform","translate(0, ".concat(T/3,")")).attr("text-anchor","middle")}return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(f.innerHTML)}function C(e,t){var n,o=[],a=(0,i.A)(t);try{var s=function(){var t=(0,r.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&&o.push({name:"".concat(s.Cluster,".`").concat(u.Table,"`"),type:u.Type})}};for(a.s();!(n=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return o}function j(e){var t,n=e.Basic,r=e.Detailed,o=[],a=[],s=(0,i.A)(n.nodes);try{var u=function(){var e,n=t.value,i="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=C(r.Providers,a.Inputs)),null!=a&&a.Outputs&&Array.isArray(null==a?void 0:a.Outputs)&&(s.outputs=C(r.Providers,a.Outputs))),o.push({id:n.id,level:Number(n.level),title:i,type:n.type,label:b(i),shape:"image",details:a,schemas:s.inputs.length>0||s.outputs.length>0?s:void 0})};for(s.s();!(t=s.n()).done;)u()}catch(e){s.e(e)}finally{s.f()}return n.links.forEach((function(e){a.push({from:e.source,to:e.target})})),{nodes:o,edges:a}}function k(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:b(null!=d?d:""),type:"op"}}if(l){var f,v,p=t[u];l.progress=p,p.stages&&!h()(p.stages)&&(E(p.state)?l.label=b(null!==(f=l.title)&&void 0!==f?f:""):l.label=A(null!==(v=l.title)&&void 0!==v?v:"",p.stages)),"function"==typeof n&&(l=n(l)),r&&(l.image=_({type:"update",node:p,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 S(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=_(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 T(e,t){var n=[];e.forEach((function(e){n.push(t(e))})),n.length>0&&e.updateOnly(n)}function N(e){return Boolean(e&&(e.Streams||e.InputColumns||e.InputKeyFilterColumns))}function R(e){var t;return(null!==(t=null==e?void 0:e.total)&&void 0!==t?t:0)>0}function O(e){return!h()(null==e?void 0:e.stages)}function I(e){var t=e.progress;if(t){if(R(t))return!0;if(O(t))return!0}return N(e.details)||Boolean(e.schemas)}function M(e){var t=s.useState((function(){return P(e)})),n=(0,r.A)(t,2),i=n[0],o=n[1];return s.useEffect((function(){var t=!1,n=function(){t||o(P(e))};return e.on("*",n),function(){t=!0,e.off("*",n)}}),[e]),i}var L=Object.keys(y);function P(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}})),L.map((function(e){return{state:e,title:y[e].title,count:t[e]||0}}))}function D(e,t,n){for(var r=e.getConnectedNodes(n),a=new Set([n]),s=function(){var n,s=r.shift();if("string"==typeof s&&0===(null===(n=t.get(s))||void 0===n?void 0:n.size)){var u,l=e.getConnectedEdges(s),c=(0,i.A)(l);try{for(c.s();!(u=c.n()).done;){var d=u.value;a.has(d)||(a.add(d),r.push.apply(r,(0,o.A)(e.getConnectedNodes(d).filter((function(e){return"string"==typeof e&&s!==e})))))}}catch(e){c.e(e)}finally{c.f()}}};r.length>0;)s();return a}function z(e,t,n){var r,o=e.getConnectedEdges(n),a=new Set,s=(0,i.A)(o);try{for(s.s();!(r=s.n()).done;){var u,l=D(e,t,r.value),c=(0,i.A)(l);try{for(c.s();!(u=c.n()).done;){var d=u.value;a.add(d)}}catch(e){c.e(e)}finally{c.f()}}}catch(e){s.e(e)}finally{s.f()}return a}function $(e,t){var n=t.operation,r=document.createElement("div"),i=[],o=[],a=null!=e?e:{},s=a.running,f=void 0===s?0:s,h=a.completed,v=void 0===h?0:h,p=a.total||1,m=Math.round(f/p*100),g=Math.round(v/p*100),y=Math.round(100-m-g);g>0&&(o.push({label:"Completed",count:g}),i.push(n.completed)),m>0&&(o.push({label:"Running",count:m}),i.push(n.running)),y>0&&(o.push({label:"Least",count:y}),i.push(n.started));var x=(0,u.A)(i),b=Math.min(80,80)/2,A=(0,l.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)"),w=(0,c.A)().innerRadius(b-10).outerRadius(b),E=(0,d.A)().value((function(e){return e.count})).sort(null);return A.selectAll("path").data(E(o)).enter().append("path").attr("d",w).attr("fill",(function(e){return x(e.data.label)})),"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(r.innerHTML)}function F(){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)}))}}},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(11229),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(89947),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})}))},74663:(e,t,n)=>{"use strict";n.d(t,{w:()=>Ps});var r=n(68175),i=n(9736),o=n(77810),a=n(76872),s=n(91326),u=n(15647),l=n(11229),c=n(46493),d=n(35788),f=n(51444),h=n(18309),v=n(75014),p=n(82964),m=n(3035),g=n(73822),y=n(53246),x=n(4224),b=n(85137),A=n(92423),w=n(72679),E=n(37267),_=n(64994),C=n(13395),j=n(63192),k=n(64922),S=(0,a.A)("query-meta-info"),T=o.memo((function(e){var t=e.query,n=e.className,r=(0,o.useMemo)((function(){return t&&(0,h.lq)(t)}),[t]),i=(0,u.wA)(),a=(0,o.useCallback)((function(){i((0,j.ib)())}),[i]);return(0,k.jsxs)("div",{className:S(null,n),children:[(0,k.jsx)(_.C,{className:S("item"),mode:"both",status:t.state}),(0,k.jsx)(E.H,{query:t,className:S("item")}),(0,k.jsx)(b.E,{className:S("item"),children:g.A.format.DateTime(t.start_time,{format:"short"})}),(0,k.jsxs)(b.E,{className:S("item"),color:"secondary",children:["by ",t.user]}),r&&(0,k.jsxs)(A.$,{size:"s",onClick:a,children:[(0,k.jsx)(w.I,{data:C.A}),"Stop"]})]})})),N=n(74360),R=n(90826),O=n(63366),I=n(28640),M=(0,a.A)("query-meta-table"),L=M("title"),P=M("value"),D=["query","access_control_object"];function z(e){var t=e.query,n=e.className,r=(0,o.useState)(null),a=(0,i.A)(r,2),s=a[0],u=a[1],l=(0,o.useState)(!1),c=(0,i.A)(l,2),d=c[0],f=c[1],h=(0,o.useMemo)((function(){return Object.entries(t).filter((function(e){var t=(0,i.A)(e,1)[0];return!D.includes(t)})).map((function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1],o="object"===(0,N.A)(r),a=r;return o&&(a=(0,k.jsx)(A.$,{view:"outlined",onClick:function(){u(r),f(!0)},children:"View details"})),{title:n,value:a,showCopy:"id"===n}}))}),[t]);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("dl",{className:M(null,n),children:h.map((function(e){var t=Array.isArray(e.value)?e.value:[e.value];return(0,k.jsxs)(o.Fragment,{children:[(0,k.jsx)("dt",{className:L,children:g.A.format.Readable(e.title)}),t.map((function(t,n){return(0,k.jsxs)("dd",{className:P,children:["boolean"==typeof t?String(t):t,e.showCopy&&(0,k.jsx)(I.A,{size:"s",text:t,inlineMargins:!0})]},n)}))]},e.title)}))}),(0,k.jsx)(O.A,{visible:d,disableBodyScrollLock:!0,onOutsideClick:function(){return f(!1)},onCancel:function(){return f(!1)},children:s&&(0,k.jsx)(R.A,{value:s,settings:{}})})]})}var $=n(40319),F=n(79726),U=n(43359);const q=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},e),{},{children:(0,k.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(64644),H=n(81039),V=n(94430),Y=o.memo((function(e){var t=e.allColumns,n=e.columns,r=e.className,i=e.onChange,a=(0,o.useCallback)((function(e){i(e)}),[i]),s=(0,o.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,k.jsx)(k.Fragment,{children:(0,k.jsx)(V.g,{className:r,renderItemValue:function(e){return e.displayName},getItemId:function(e){return e.name},value:s,items:t,switcher:(0,k.jsxs)(A.$,{size:"m",title:"Choose result columns",view:u,children:[(0,k.jsx)(w.I,{data:H.A}),"Columns ",(0,k.jsx)(b.E,{color:"secondary",children:(null==s?void 0:s.length)+"/"+t.length})]}),onUpdate:a})})})),W=n(28407),G=n(29121),K=n(12937),X=n(10785),Q=n(26718),J=n(70232),Z=n.n(J),ee=n(97691),te=n.n(ee),ne=n(52797),re=n(44868),ie=n(55956),oe=n(51194),ae=n(29081),se=n(14475),ue=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.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:te().stringify(r),error:n}}},{key:"getDownloadLink",value:function(){var e=this.props,t=e.getDownloadBaseUrl,n=e.cluster,r=e.queryId,i=e.resultIndex,o=this.state,a=o.rowsMode,s=o.startRow,u=o.numRows,l=o.format,c=o.number_precision_mode,d=this.getDownloadParams(),f=d.query,h=d.error;if("excel"===l){var v="".concat((0,ae.t1)({cluster:n}),"/").concat(n,"/api/export-query-result"),p=new URLSearchParams({number_precision_mode:c,result_index:i,query_id:r});"range"===a&&(p.append("lower_row_index",s.toString()),p.append("upper_row_index",(s+u).toString()));var m=this.prepareColumnsForColumnMode(!1),g=m?"&"+m.map((function(e){return"columns=".concat(e)})).join("&"):"";return{url:"".concat(v,"?").concat(p).concat(g),error:h}}var y=t("range"===a?{start:s,end:s+u}:void 0);return{url:"".concat(y,"&").concat(f),error:h}}}]),n}(re.q),le=o.memo((function(e){var t,n,r=e.queryId,a=e.resultIndex,s=e.allColumns,l=e.visibleColumns,c=e.className,d=(0,u.d4)(ne.dB),f=(0,u.d4)((function(e){return(0,U.iI)(e,r,a)})),h=(0,oe._)(),v=null!=f&&f.resultReady&&(null==f?void 0:f.page)*(null==f||null===(t=f.settings)||void 0===t?void 0:t.pageSize)||0,p=(0,o.useMemo)((function(){return s.map((function(e){return{name:e.displayName,checked:!l||(null==l?void 0:l.includes(e.name))}}))}),[s,l]),m=(0,o.useState)(!1),g=(0,i.A)(m,2),y=g[0],x=g[1],b=function(){var e=(0,W.A)(Z().mark((function e(t,n){return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h((0,se.P)(t,n));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),A=function(){var e=(0,W.A)(Z().mark((function e(t,n){return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h((0,se.P)(t,n,!0));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,k.jsx)(ue,{getDownloadBaseUrl:function(e){return h((0,ie.BK)(d,r,a,e))},proxy:"",externalProxy:"",toggleVisible:function(){},transaction_id:void 0,queryId:r,resultIndex:a,className:c,cluster:d,rowCount:null!=f&&f.resultReady?null==f?void 0:f.meta.data_statistics.row_count:0,allColumns:p,srcColumns:p,columns:p,pageSize:null!=f&&f.resultReady&&(null==f||null===(n=f.settings)||void 0===n?void 0:n.pageSize)||50,showDecoded:!1,loading:!1,path:"",visible:y,handleShow:function(){return x(!0)},handleClose:function(){return x(!1)},offsetValue:v,isSchematicTable:!0,downloadFile:b,downloadToClipboard:A})})),ce=(0,a.A)("query-result-actions"),de=[{value:"table",content:"Full result"},{value:"scheme",content:"Scheme"}];function fe(e){var t,n,r,i,a,s=e.query,l=e.resultIndex,c=(0,u.wA)(),d=(0,u.d4)((function(e){return(0,U.iI)(e,s.id,l)})),f=(0,o.useCallback)((function(){var e;c({type:p.NJ,data:{queryId:s.id,index:l,settings:{transposed:!(null!=d&&null!==(e=d.settings)&&void 0!==e&&e.transposed)}}})}),[null==d?void 0:d.settings,c]),h=(0,o.useCallback)((function(e){c({type:p.NJ,data:{queryId:s.id,index:l,settings:{viewMode:e}}})}),[null==d?void 0:d.settings,c]),v=(0,o.useCallback)((function(e){c({type:p.NJ,data:{queryId:s.id,index:l,settings:(0,$.A)((0,$.A)({},null==d?void 0:d.settings),{},{visibleColumns:e})}})}),[null==d?void 0:d.settings,c]);return!0===(null==d?void 0:d.resultReady)?(0,k.jsxs)("div",{className:ce(),children:[(null==d||null===(t=d.settings)||void 0===t?void 0:t.viewMode)===B.F.Table&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(A.$,{className:ce("item"),onClick:f,view:null!=d&&null!==(n=d.settings)&&void 0!==n&&n.transposed?"action":"normal",children:(0,k.jsx)(w.I,{data:q,width:16})}),(0,k.jsx)(Y,{className:ce("item"),allColumns:d.columns,columns:null===(r=d.settings)||void 0===r?void 0:r.visibleColumns,onChange:v}),(0,k.jsx)(le,{queryId:s.id,resultIndex:l,className:ce("item"),allColumns:d.columns,visibleColumns:null===(i=d.settings)||void 0===i?void 0:i.visibleColumns})]}),(0,k.jsx)(F.a,{className:ce("item"),options:de,value:null==d||null===(a=d.settings)||void 0===a?void 0:a.viewMode,onUpdate:h})]}):null}var he=n(13322),ve=n(38224),pe=n.n(ve),me=n(25930),ge=n.n(me),ye=n(34455),xe=n.n(ye),be=n(62786),Ae=n(3659),we={escapeWhitespace:!1,decodeUTF8:!0,binaryAsHex:!0,escapeYQLStrings:!0,omitStructNull:!0,maxListSize:50,maxStringSize:void 0,treatValAsData:!0};function Ee(e,t,n,r){try{return Ae.A.converters.yql([e,t],n,r)}catch(t){var i;console.log(t);try{i=JSON.stringify(e)}catch(t){i=String(e)}return Ae.A.format({$value:"Failed to convert value: ".concat(i),$type:"yql.string"},n)}}function _e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:we;try{return Ae.A.format(e,t)}catch(r){var n;try{n=JSON.stringify(e)}catch(t){n=String(e)}return Ae.A.format({$value:"Failed to format value: ".concat(n),$type:"yql.string"},t)}}var Ce=1e4;function je(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:we,r={incomplete:!1},i=Ee(e,t,n,r),o=i.$tag,a=i;null!=n&&n.maxStringSize&&(a=Ee(e,t,(0,$.A)((0,$.A)({},n),{},{maxStringSize:void 0}),r));var s="",u=!0;if("yql.tagged"===a.$type&&"url"===a.$tag){var l=a.$value;"tag_value"===l.$type?s=l.$value.text||l.$value.href:"string"==typeof l.$value&&(s=l.$value)}else u=(s=_e(a,(0,$.A)((0,$.A)({},n),{},{asHTML:!1,maxStringSize:void 0}))).length<Ce;var c=u?_e(i,n):"Escaped value";return(0,$.A)((0,$.A)({},a),{},{$formattedValue:c,$fullFormattedValue:i===a?c:u?_e(a,(0,$.A)((0,$.A)({},n),{},{maxStringSize:void 0})):"",$rawValue:s,$incomplete:r.incomplete,$tagValue:o})}var ke=n(48971),Se=n(16455),Te=n(33777),Ne=n(29746),Re=n(39760),Oe=n.n(Re),Ie=n(27652);function Me(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,W.A)(Z().mark((function r(o,a){var s,u,l,c,d,f,h,v,m,g;return Z().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,l=(0,U.JO)(a(),e,t),o({type:p.uu,data:{queryId:e,index:t}}),c=n*l.pageSize,d=c+l.pageSize,r.next=7,o((0,ie.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,ke.fI)(o((0,ie.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,m=h.yql_type_registry,g=h.rows.map((function(e){return Object.entries(e).reduce((function(e,t){var n=(0,i.A)(t,2),r=n[0],o=(0,i.A)(n[1],2),a=o[0],s=o[1];return e[r]=je(a,m[Number(s)]),e}),{})})),Array.isArray(v)&&v.length&&o({type:p.zT,data:{queryId:e,index:t,results:g,settings:l,page:n}}),r.next=37;break;case 34:r.prev=34,r.t6=r.catch(0),o({type:p.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 Le=n(7787),Pe=function(e){return e.ERROR="error",e.META="meta",e.RESULT="result",e.STATISTIC="statistic",e.PROGRESS="progress",e.CHART_TAB="chart-tab",e}({}),De=function(e){return"result/".concat(e)},ze=function(e){var t=e.split("/");return null!=t&&t[1]?parseInt(null==t?void 0:t[1],10):void 0},$e=n(33026);function Fe(){var e=(0,u.d4)(l.VQ);return e?(0,k.jsx)($e.DC,{fixedHeader:!0,virtual:!1,statistic:e,visibleColumns:["min","max","avg","sum","count"]}):null}function Ue(e){var t=e.freeze,n=e.children,r=e.placeholder,i=void 0===r?null:r;return(0,k.jsx)(o.Suspense,{fallback:i,children:(0,k.jsx)(qe,{freeze:t,children:n})})}function qe(e){var t,n,r=e.freeze,i=e.children,a=o.useRef({});if(r&&!a.current.promise)throw a.current.promise=new Promise((function(e){a.current.resolve=e})),a.current.promise;if(r)throw a.current.promise;return a.current.promise&&(null===(t=(n=a.current).resolve)||void 0===t||t.call(n),a.current.promise=void 0),(0,k.jsx)(o.Fragment,{children:i})}var Be=(0,a.A)("not-render-until-first-visible");function He(e){var t=e.hide,n=e.className,r=e.children,a=o.useState(Boolean(t)),s=(0,i.A)(a,2),u=s[0],l=s[1];return o.useEffect((function(){var e=requestAnimationFrame((function(){l(Boolean(t))}));return function(){cancelAnimationFrame(e)}}),[t]),(0,k.jsx)("div",{style:u?{display:"none"}:void 0,className:Be(null,n),children:(0,k.jsx)(Ue,{freeze:u,children:r})})}var Ve=n(92603);function Ye(){var e=(0,Ve.gi)(),t=(0,Ve.Bf)(),n=(0,Ve.IQ)();return(0,k.jsx)(F.a,{options:t,value:e,onUpdate:function(e){n(e)}})}var We=n(6736),Ge=n(64196),Ke=n(8208),Xe=n(76662),Qe=n(24966),Je=n(77950),Ze=n(27222),et=n(14633),tt=n(27814),nt=n(29870),rt=(0,a.A)("data-type-popup");function it(e){var t=e.children,n=e.type,r=e.hideIcon,i=e.className;return n?(0,k.jsx)(et.A,{className:rt(null,i),tooltipClassName:rt("tooltip"),content:n?(0,k.jsx)("div",{className:rt("tooltip-container"),children:(0,k.jsx)(nt.A,(0,$.A)({},n))}):null,hasArrow:!1,delayOpening:400,children:(0,k.jsxs)("span",{className:rt("container"),children:[t,!r&&(0,k.jsx)(w.I,{className:rt("icon"),data:tt.A,size:12})]})}):(0,k.jsx)("span",{className:rt(null,i),children:t})}var ot=n(77318),at=n(93209),st=n(81970),ut=(0,a.A)("yql-result-table"),lt=Symbol("__index__");function ct(e,t){return n=e,r=lt,"object"===(0,N.A)(n)&&n&&Reflect.has(n,r)?e[lt]:t;var n,r}function dt(){window.dispatchEvent(new Event("resize"))}var ft={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:Xe.zQ,stickyTop:0,syncHeadOnResize:!0},ht=(0,$.A)((0,$.A)({},ft),{},{displayIndices:!1}),vt=[];function pt(e){var t=e.className,n=e.header,a=void 0===n?vt:n,s=e.rows,u=void 0===s?vt:s,l=e.totals,c=void 0===l?vt:l,d=e.showColumns,f=void 0===d?vt:d,h=e.theme,v=void 0===h?"yandex-cloud":h,p=e.format,m=e.formatterSettings,g=e.defaultNumberAlign,y=void 0===g?Ze.Ay.RIGHT:g,x=e.resultType,A=e.emptyDataMessage,w=e.message,E=e.isError,_=e.transpose,C=void 0!==_&&_,j=e.page,S=void 0===j?1:j,T=e.pageSize,N=void 0===T?u.length:T,R=e.startIndex,O=e.sortOrder,I=e.onSort,M=e.showFullValueInDialog,L=e.containerRef,P=e.onShowPreview,D="function"==typeof I,z=o.useMemo((function(){var e=a.map((function(e){var t=e.name,n=e.displayName,r=e.type,i=void 0===r?{}:r;return{name:t,header:(0,k.jsx)(it,{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:D&&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 a,s=n,u=s.value,l=s.index;if(!u)return(0,k.jsx)("span",{className:"unipika",children:"<unsupported data type>"});a=Object.prototype.hasOwnProperty.call(u,"$formattedValue")?u.$formattedValue:p(u,m);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:a;if("yql.string"===u.$type&&a.startsWith('<span class="quote">'))c=a;else{var h=a.split("\n");c=h.length>8?h.slice(0,5).join("\n"):a}var v=c!==f,g=u.$additions?(0,k.jsxs)(o.Fragment,{children:[(0,k.jsx)("br",{}),(0,k.jsx)(b.E,{color:"light-hint",children:u.$additions})]}):null,y=function(){P(t,l)},x=u.$incomplete,A=u.$tagValue;return v?(0,k.jsxs)(xt,{rawValue:d,onPreviewClick:y,isTruncated:x,tag:A,children:[M?(0,k.jsx)(o.Fragment,{children:(0,k.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:c}})}):(0,k.jsx)(gt,{onClick:dt,strippedDown:c,formattedValue:f}),g]}):(0,k.jsxs)(xt,{rawValue:d,onPreviewClick:y,isTruncated:x,tag:A,children:[(0,k.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:a}}),g]})},align:i.numeric?y:void 0}}));return e}),[a,D,y,p,m,M,P]),F=(S-1)*N,U=D?1:null!=R?R:F+1,q=o.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,$.A)((0,r.A)({},lt,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[lt]-t[lt]})),o}(u,z,O,U)}),[u,z,O,U]),B=o.useMemo((function(){var e=f.map((function(e){return z.find((function(t){return t.name===e}))})).filter(Boolean),t=q.slice(F,F+N);if(!C)return[e,t,c];var n=t.map((function(e,t){return{name:String(F+t),header:mt(e),render:function(t){var n=t.value;return n.column.render({value:n.data,row:e})}}})).concat(c.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=F;n<F+N&&n!==q.length;n++)t[String(n)]={column:e,data:q[n][e.name]};return c.forEach((function(n,r){t["footer".concat(r)]={column:e,data:n[e.name]}})),t}));return[[{name:"name",header:"Name"}].concat((0,he.A)(n)),r,[]]}),[f,q,F,N,C,c,z]),H=(0,i.A)(B,3),V=H[0],Y=H[1],W=H[2];return"table"===x?(0,k.jsx)("div",{ref:L,className:ut(null,t),children:(0,k.jsx)(ot.Ay,{columns:V,data:Y,footerData:0===W.length?void 0:W,settings:C?ht:ft,startIndex:U,emptyDataMessage:A,theme:v,rowKey:ct,sortOrder:O,onSort:I,visibleRowIndex:C?void 0:mt})}):"cell"===x||"untyped"===x?(0,k.jsx)("div",{ref:L,className:ut({mode:x},t),children:(0,k.jsx)("div",{className:"unipika",dangerouslySetInnerHTML:{__html:u[0].content}})}):w?(0,k.jsx)("div",{className:ut("message",{error:E}),children:w}):null}function mt(e){return g.A.format.Number(e[lt])}function gt(e){var t=e.formattedValue,n=e.strippedDown,r=e.onClick,a=o.useState(!1),s=(0,i.A)(a,2),u=s[0],l=s[1];return(0,k.jsxs)(o.Fragment,{children:[(0,k.jsx)("span",{className:"unipika",dangerouslySetInnerHTML:{__html:u?t:n}}),(0,k.jsx)("br",{}),(0,k.jsx)(at.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 yt=ut("cell-action");function xt(e){var t=e.children,n=e.rawValue,r=e.onPreviewClick,a=e.isTruncated,s=e.tag,u=o.useRef(null),l=o.useState(!1),c=(0,i.A)(l,2),d=c[0],f=c[1];o.useEffect((function(){var e,t=null===(e=u.current)||void 0===e?void 0:e.parentElement;function n(){f(!0)}function r(e){null!=t&&t.contains(e.relatedTarget)||f(!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)}}),[]);var h=Boolean(s&&a);return(0,k.jsxs)("span",{ref:u,children:[h?(0,k.jsx)(st.A,{theme:"warning",text:"Incomplete '".concat(s,"' type")}):(0,k.jsx)("span",{className:ut("cell-content"),children:t}),(d||h)&&(0,k.jsxs)(k.Fragment,{children:[n&&!a&&(0,k.jsx)(Je.b,{className:yt,text:n,size:"s"}),a&&(0,k.jsx)(A.$,{className:yt,view:"flat-secondary",size:"s",onClick:r,children:(0,k.jsx)(w.I,{data:Qe.A,size:"12"})})]})]})}var bt=n(31470),At=n.n(bt),wt={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}},Et=o.memo((function(e){var t=e.result,n=e.onShowPreview,r=function(e){var t,n,r=(0,o.useState)(void 0),a=(0,i.A)(r,2),s=a[0],u=a[1];(0,o.useEffect)((function(){var t=setTimeout((function(){u(e)}),0);return function(){clearTimeout(t)}}),[e]);var l=(0,o.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,o.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),a=(0,i.A)(r,5),s=a[0],u=a[1],l=a[2],c=a[3],d=a[4];return(0,k.jsx)(pt,{format:_e,formatterSettings:wt,header:u,rows:s,transpose:c,resultType:"table",showColumns:l,defaultNumberAlign:"left",startIndex:d,theme:Xe.ll,onShowPreview:n})}),(function(e,t){var n,r,i,o;return e.result.columns===t.result.columns&&e.result.results===t.result.results&&At()(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)})),_t=(0,a.A)("query-result-scheme"),Ct={sortable:!1,displayIndices:!0,stripedRows:!0,externalSort:!0,stickyHead:Xe.zQ,stickyTop:0},jt=[{name:"name",header:"Name",sortable:!1,width:"auto",render:function(e){var t=e.row;return(0,k.jsx)("span",{className:_t("item"),children:(0,k.jsx)("span",{className:_t("name"),title:t.name,children:t.name})})}},{name:"type",header:"Type",width:"auto",sortable:!1,render:function(e){var t=e.row;return(0,k.jsx)(nt.A,(0,$.A)({},t.type))}}],kt=o.memo((function(e){var t=e.result;return(0,k.jsx)(Ze.Ay,{theme:"yandex-cloud",columns:jt,data:t.columns,startIndex:1,settings:Ct})}));function St(e){var t=e.result,n=e.className;return(0,k.jsxs)("div",{className:_t(null,n),children:[(0,k.jsx)(b.E,{variant:"subheader-2",as:"div",className:_t("title"),children:"Scheme"}),(0,k.jsx)("div",{className:_t("table-wrap"),children:(0,k.jsx)(kt,{result:t})})]})}var Tt=n(59700),Nt=n(98364),Rt=(0,a.A)("query-result-paginator"),Ot=[{value:String(10),content:"10"},{value:String(50),content:"50"},{value:String(100),content:"100"},{value:String(200),content:"200"}];function It(e){var t=e.queryId,n=e.resultIndex,r=e.className,a=(0,u.wA)(),s=function(e,t){var n=(0,o.useState)({lastPage:0,pageSize:0}),r=(0,i.A)(n,2),a=r[0],s=r[1],l=(0,u.d4)((function(n){return(0,U.iI)(n,e,t)}));return(0,o.useEffect)((function(){if(null!=l&&l.resultReady){var e=Math.ceil(((null==l?void 0:l.meta.data_statistics.row_count)||0)/((null==l?void 0:l.settings.pageSize)||1))-1;s({pageSize:(null==l?void 0:l.settings.pageSize)||0,lastPage:e})}}),[l]),[(null==l?void 0:l.page)||0,a]}(t,n),l=(0,i.A)(s,2),c=l[0],d=l[1],f=d.pageSize,h=d.lastPage,v=(0,o.useCallback)((function(e){var r=(0,i.A)(e,1)[0];a(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:p.NJ,data:{queryId:e,index:t,settings:n}}),r(Me(e,t,0))}}(t,n,{pageSize:Number(r)}))}),[a]),m=(0,o.useCallback)((function(e){a(Me(t,n,e))}),[t]);return(0,k.jsxs)("div",{className:Rt(null,r),children:[(0,k.jsx)(Tt.l,{className:Rt("control"),value:[f.toString()],options:Ot,onUpdate:v}),(0,k.jsx)(Nt.A,{className:Rt("control"),value:c,min:0,max:h,onChange:m,step:1})]})}var Mt=n(41347),Lt=n(75566),Pt=n(76365),Dt=n(54522),zt=(0,a.A)("query-result-table");function $t(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,c=n.meta.full_result;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(He,{hide:i!==B.F.Scheme,children:(0,k.jsx)(St,{result:n})}),(0,k.jsxs)(He,{hide:i!==B.F.Table,children:[(0,k.jsxs)(We.s,{alignItems:"center",gap:2,className:zt("result-info"),children:[(0,k.jsxs)(b.E,{children:["Rows ",a,"-",s," of ",u,"".concat(l?" (truncated)":"")]}),c&&(0,k.jsx)(Ge.N,{href:"/".concat(c.cluster,"/navigation?path=//").concat(c.table_path),target:"_blank",children:(0,k.jsxs)(We.s,{alignItems:"center",gap:1,children:[(0,k.jsx)(w.I,{data:Mt.A,size:16})," View full result"]})})]}),(0,k.jsx)(Et,{result:n,onShowPreview:r})]})]})}var Ft=o.memo((function(e){var t=e.query,n=e.index,r=(0,u.wA)(),i=(0,u.d4)((function(e){return(0,U.iI)(e,t.id,n)})),a=o.useCallback((function(e,i){r(function(e,t,n){return function(){var r=(0,W.A)(Z().mark((function r(i){var o,a,s,l,c,d,f,h;return Z().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return(0,u.vA)((function(){i({type:Dt.w.REQUEST,data:{}}),i((0,Lt.ZD)())})),r.prev=1,r.next=4,i((0,ie.BH)(e,t,{start:n.rowIndex,end:n.rowIndex+1},[n.columnName],{cellsSize:Dt.F,stringLimit:Math.round(Dt.F/10)},Lt.Be.removeAllAndSave));case 4:o=r.sent,a=o.rows[0][n.columnName][0],s=o.rows[0][n.columnName][1],l=o.yql_type_registry[Number(s)],c=je(a,l,{maxListSize:void 0,maxStringSize:void 0,treatValAsData:!0}),d=c.$type,f=c.$tag,h=c.$value,i({type:Dt.w.SUCCESS,data:{data:{$value:f?h.$value:h,$type:d,$tag:f}}}),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(1),(0,Pt.m)(r.t0)||i({type:Dt.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,k.jsxs)("div",{className:zt(),children:[((null==i?void 0:i.state)===B.t.Init||(null==i?void 0:i.state)===B.t.Loading)&&(0,k.jsx)("div",{className:zt("loading"),children:(0,k.jsx)(s.a,{size:"m"})}),(null==i?void 0:i.resultReady)&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)($t,{result:i,onShowPreview:a}),i.settings.viewMode===B.F.Table&&(0,k.jsx)(It,{className:zt("pagination"),queryId:t.id,resultIndex:n})]}),(null==i?void 0:i.state)===B.t.Error&&(0,k.jsx)(Ke.z,{error:i.error})]})}),(function(e,t){return e.query.id===t.query.id&&e.index===t.index})),Ut=function(e){var t=e.query,n=e.activeResultParams,r=(0,u.wA)();return(0,o.useEffect)((function(){n&&r(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(){var n=(0,W.A)(Z().mark((function n(r,o){var a,s,u,l,c,d,f,h,v,m;return Z().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=o(),!(0,U.kz)(a,e,t)){n.next=3;break}return n.abrupt("return");case 3:return n.prev=3,r({type:p.uu,data:{queryId:e,index:t}}),n.next=7,r((0,ie.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,Ie.c)(null));case 12:return u=(0,Se.$n)(o()),l=Ne.A.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,be.Pw)((0,Te.z)(n,u)),displayName:t}}))||[],d=(0,U.GN)(),n.next=18,(0,ke.fI)(r((0,ie.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,m=h.map((function(e){return Object.entries(e).reduce((function(e,t){var n=(0,i.A)(t,2),r=n[0],o=(0,i.A)(n[1],2),a=o[0],s=o[1];return e[r]=je(a,v[Number(s)]),e}),{})})),r({type:p.dg,data:{queryId:e,index:t,results:m,columns:c,meta:s}}),n.next=27;break;case 24:n.prev=24,n.t0=n.catch(3),r({type:p.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,k.jsx)(Ft,{query:t,index:(null==n?void 0:n.resultIndex)||0})},qt=function(e){var t;return(null===(t=Le.Ay.getQueryResultChartTab())||void 0===t?void 0:t.renderContent(e))||null},Bt=function(e){return(e+1)%1e6};function Ht(){return(0,o.useReducer)(Bt,0)[1]}var Vt=n(24567),Yt=n(44304),Wt=n(55740),Gt=(0,a.A)("yql-loader");function Kt(e){var t=e.className,n=e.size,r=e.local,a=e.statical,u=e.delay,l=void 0===u?600:u,c=e.veil,d=o.useState(!1),f=(0,i.A)(d,2),h=f[0],v=f[1];return o.useEffect((function(){var e=setTimeout((function(){v(!0)}),l);return function(){clearTimeout(e)}}),[]),h?(0,k.jsx)("div",{className:Gt({local:r,veil:c,statical:a},t),children:(0,k.jsx)(s.a,{size:n})}):null}var Xt=n(92225),Qt=n(59994),Jt=n(91009),Zt=o.createContext(void 0);function en(e){var t=e.children,n=e.container,r=(0,Qt.i)(),a=o.useState((function(){return tn(n)})),s=(0,i.A)(a,2),u=s[0],l=s[1];return o.useEffect((function(){l((function(e){var t=tn(n);return At()(e,t)?e:t}))}),[r,n]),(0,k.jsx)(Zt.Provider,{value:u,children:t})}function tn(e){var t=function(t){return(0,Jt.B)((0,Jt.k)("--yql-graph-color-".concat(t),null!=e?e:void 0))};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 nn(){var e=o.useContext(Zt);if(void 0===e)throw new Error("useGraphColors must be used within a GraphColorsProvider");return e}var rn=n(36510),on=n(51238),an=n(34199),sn=n(30469),un=(0,a.A)("legend");function ln(e){var t=e.className,n=e.orientation,r=e.nodes,i=e.children,o=(0,on.GE)(r);return(0,k.jsxs)("div",{className:un({orientation:n},t),children:[o.map((function(e){var t=e.state,n=e.title,r=e.count;return(0,k.jsxs)("div",{className:un("item"),children:[(0,k.jsx)("div",{className:un("item-color",{state:t.toLowerCase()})}),(0,k.jsxs)(b.E,{className:un("item-title"),color:"complementary",children:[n,r?(0,k.jsxs)("strong",{children:[" ",r]}):null]})]},t)})),i]})}function cn(e){var t=e.className,n=e.nodes,r=o.useState("collapsed"),a=(0,i.A)(r,2),s=a[0],u=a[1];return(0,k.jsx)("div",{className:t,children:"collapsed"===s?(0,k.jsx)(A.$,{title:"Show legend",onClick:function(){u("expanded")},children:(0,k.jsx)(w.I,{data:an.A,size:16})}):(0,k.jsx)(ln,{nodes:n,children:(0,k.jsx)(A.$,{view:"flat-secondary",title:"Hide legend",onClick:function(){u("collapsed")},children:(0,k.jsx)(w.I,{data:sn.A})})})})}var dn=n(73139),fn=(0,a.A)("vis-network");function hn(e){var t=e.nodes,r=e.edges,a=e.options,s=e.className,u=e.getNetwork,l=o.useRef(null),c=o.useState(),d=(0,i.A)(c,2),f=d[0],h=d[1];return o.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()}}),[]),o.useEffect((function(){f&&(f.setData({nodes:t,edges:r}),f.once("afterDrawing",(function(){f.fit()})))}),[t,r,f]),o.useEffect((function(){f&&f.setOptions(a)}),[a,f]),o.useEffect((function(){f&&"function"==typeof u&&u(f)}),[u,f]),(0,k.jsx)("div",{ref:l,className:fn(null,s)})}var vn=(0,a.A)("yql-plan-minimap");function pn(e){var t=e.network,n=e.nodes,r=e.edges,a=e.options,s=e.className,u=function(e){return o.useMemo((function(){return(0,$.A)((0,$.A)({},e),{},{edges:(0,$.A)((0,$.A)({},e.edges),{},{selectionWidth:1}),interaction:{dragNodes:!1,dragView:!1,navigationButtons:!1,hoverConnectedEdges:!1,selectable:!1,zoomView:!1}})}),[e])}(a),l=o.useState(),c=(0,i.A)(l,2),d=c[0],f=c[1],h=o.useRef(!1);!function(e){var t=e.network,n=e.minimap,r=e.nodes;o.useEffect((function(){var e=function(e){var i=e.edge,o=(0,on.ry)(t,r,i);null==n||n.selectEdges((0,he.A)(o))},i=function(){null==n||n.unselectAll()},o=function(e){var i=e.node;if(i&&r.get(i)){var o=(0,on.AX)(t,r,i);null==n||n.selectEdges((0,he.A)(o))}},a=function(){null==n||n.unselectAll()};return t.on("hoverEdge",e),t.on("blurEdge",i),t.on("hoverNode",o),t.on("blurNode",a),function(){t.off("hoverEdge",e),t.off("blurEdge",i),t.off("hoverNode",o),t.off("blurNode",a)}}),[t,n,r])}({network:t,minimap:d,nodes:n});var v=function(e){var t=e.network,n=e.minimap,r=o.useRef(null);return o.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:d});return o.useEffect((function(){var e=function(){h.current=!1};return window.addEventListener("mouseup",e),function(){window.removeEventListener("mouseup",e)}}),[]),o.useEffect((function(){d&&d.fit()}),[d]),(0,k.jsxs)(dn.Z,{className:vn(null,s),type:"action",children:[(0,k.jsx)(hn,{nodes:n,edges:r,options:u,className:vn("minimap"),getNetwork:f}),(0,k.jsx)("div",{className:vn("wrapper"),onMouseDown:function(e){if(d){var n=d.DOMtoCanvas({x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY});t.moveTo({position:n}),h.current=!0}},onMouseMove:function(e){if(d&&h.current){var n=d.DOMtoCanvas({x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY});t.moveTo({position:n})}}}),(0,k.jsx)("div",{ref:v,className:vn("radar")})]})}var mn=n(70353);function gn(e,t){var n,r,i={},o=[],a=new Map,s=0,u=(0,mn.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,$.A)({},l),in:[],out:[]}}}catch(e){u.e(e)}finally{u.f()}var d,f=(0,mn.A)(t);try{for(f.s();!(d=f.n()).done;){var h=d.value,v=a.get(h.from),p=a.get(h.to);void 0!==v&&void 0!==p&&(i[v].out.push(p),i[p].in.push(v))}}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 yn(e,t,n){for(var r=0,i=0;i<t.length;i++){var o,a=t[i],s=t[i+1],u=(0,mn.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 xn(e,t,n){var r,i=n.reduce((function(e,t,n){return e[t]=n,e}),{}),o=[],a=(0,mn.A)(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;o.push.apply(o,(0,he.A)(e[s].out.map((function(e){return i[e]})).sort((function(e,t){return e-t}))))}}catch(e){a.e(e)}finally{a.f()}for(var u=1;u<n.length;)u*=2;var l=2*u-1;u-=1;var c=new Array(l).fill(0),d=0;return o.forEach((function(e){var t=e+u;for(c[t]++;t>0;)t%2&&(d+=c[t+1]),c[t=t-1>>1]++})),d}function bn(e,t){for(var n=0,r=1;r<t.length;++r)n+=xn(e,t[r-1],t[r]);return n}function An(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 wn(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 En(e,t,n){if(n%2==0)for(var r=1;r<t.length;r++){var i,o={},a=(0,mn.A)(t[r]);try{for(a.s();!(i=a.n()).done;){var s=i.value;o[s]=An(e[s].in,t[r-1])}}catch(e){a.e(e)}finally{a.f()}wn(t[r],o)}else for(var u=t.length-2;u>=0;u--){var l,c={},d=(0,mn.A)(t[u]);try{for(d.s();!(l=d.n()).done;){var f=l.value;c[f]=An(e[f].out,t[u+1])}}catch(e){d.e(e)}finally{d.f()}wn(t[u],c)}}function _n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Cn(e,t,n){var r=0;return n>0&&(r+=xn(e,t[n-1],t[n])),n<t.length-1&&(r+=xn(e,t[n],t[n+1])),r}function jn(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=Cn(e,t,i),s=0;s<o.length-1;s++){_n(o,s,s+1);var u=Cn(e,t,i);a>u?(n=!0,a=u):_n(o,s,s+1)}}}function kn(e,t,n){for(var r=function(e,t){for(var n=(0,he.A)(t[0]),r=[],i=new Set(n);n.length>0;){var o=n.shift();if(void 0===o)break;var a=e[o],s=r[a.rank];s||(r[a.rank]=s=[]),s.push(o);var u,l=(0,mn.A)(a.out);try{for(l.s();!(u=l.n()).done;){var c=u.value;i.has(c)||(i.add(c),n.push(c))}}catch(e){l.e(e)}finally{l.f()}}return r}(e,t),i=r.map((function(e){return(0,he.A)(e)})),o=bn(e,r),a=0,s=0;s<4&&a<24;a++,s++){En(e,r,a),n||jn(e,r);var u=bn(e,r);o>u&&(o=u,i=r.map((function(e){return(0,he.A)(e)})),s=0)}return i.forEach((function(t){t.forEach((function(t,n){e[t].order=n}))})),i}function Sn(e,t,n){var r=e[t];r||(e[t]=r=new Set),r.add(n)}function Tn(e,t,n){return e[t]&&e[t].has(n)||e[n]&&e[n].has(t)}function Nn(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 Rn(e,t){var n,r=function(e,t){var n={};return Object.entries(e).forEach((function(e){var t=(0,i.A)(e,2),r=t[0];t[1].forEach((function(e){Sn(n,r,e)}))})),Object.entries(t).forEach((function(e){var t=(0,i.A)(e,2),r=t[0];t[1].forEach((function(e){Sn(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||Sn(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)&&Sn(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)),o={};["u","d"].forEach((function(i){n="u"===i?t:(0,he.A)(t).reverse(),["l","r"].forEach((function(t){"r"===t&&(n=n.map((function(e){return(0,he.A)(e).reverse()})));var a=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]&&!Tn(n,t,f)&&(o[f]=t,o[t]=i[t]=i[f],s=a[f])}}}))})),{root:i,align:o}}(e,n,r,"u"===i?"in":"out"),s=a.root,u=a.align,l=Nn(e,n,s,u,"d"===i);"r"===t&&Object.keys(l).forEach((function(e){l[e]=-l[e]})),o[i+t]=l}))}));var a=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,i.A)(e,2),o=(t[0],t[1]);n=Math.max(o+50,n),r=Math.min(o-50,r)}));var o=n-r;return e.min>o?{min:o,align:t}:e}),{min:Number.POSITIVE_INFINITY}).align}(0,o);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}))}}))}))}(o,a),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}),{})}(o)}function On(e,t){var n=Rn(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 In(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 Mn(e){return Ln.apply(this,arguments)}function Ln(){return(Ln=(0,W.A)(Z().mark((function e(t){var n,r,i,o,a,s,u,l;return Z().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=gn(n,r),a=o.graph,s=o.layering,u=o.levels,yn(a,s,u),l=kn(a,s,i),On(a,l),e.abrupt("return",In(a));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Pn=n(29202),Dn=n(16538);const zn=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 $n=(0,a.A)("graph"),Fn="".concat($n(),"_show-tooltip");function Un(e){var t=o.useRef(e);return t.current=e,t}var qn=(0,on.SV)((function(e,t){if(e)if(t)e.redraw(),e.fit();else{var n=e.getScale();e.redraw(),e.moveTo({scale:n})}}));function Bn(e){var t=e.isActive,n=e.className,r=e.graph,a=e.showMinimap,s=e.prepareNode,u=o.useState(),l=(0,i.A)(u,2),c=l[0],d=l[1],f=o.useState(null),h=(0,i.A)(f,2),v=h[0],p=h[1],m=nn(),g=function(e){return o.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])}(m),y=(0,Ve.wE)(),x=o.useState((function(){return new Vt.DataSet})),E=(0,i.A)(x,1)[0],_=o.useState((function(){return new Vt.DataSet})),C=(0,i.A)(_,1)[0],j=o.useState(!0),S=(0,i.A)(j,2),T=S[0],N=S[1],R=Ht(),O=o.useState(),I=(0,i.A)(O,2),M=I[0],L=I[1],P=o.useRef(null),D=o.useState(),z=(0,i.A)(D,2),F=z[0],U=z[1],q=(0,Yt.m)(F?{rect:{top:F.position.y,left:F.position.x}}:void 0);o.useEffect((function(){var e=function(e){var t;null!==(t=P.current)&&void 0!==t&&t.contains(e.target)||U(void 0)};return F&&window.addEventListener("click",e),function(){window.removeEventListener("click",e)}}),[F]);var B=o.useRef();o.useEffect((function(){var e;return t&&(e=requestAnimationFrame((function(){c&&T&&(c.fit(),N(!1))}))),t||U(void 0),function(){cancelAnimationFrame(e)}}),[t,c,T]);var H=Un(m),V=Un(y),Y=Un(s);o.useEffect((function(){var e=!1;function t(){return(t=(0,W.A)(Z().mark((function e(){var t,n,i,o;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Mn(r);case 2:t=e.sent,n=t.nodes,i=t.edges,o=new Vt.DataSet(n),V.current&&(0,on.DW)(o,V.current),(0,on.Ml)(o,H.current),Y.current&&(0,on.ZG)(o,Y.current),N(E.length!==o.length||C.length!==i.length),E.clear(),E.add(o.get()),C.clear(),C.add(i),R();case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return function(){return t.apply(this,arguments)}().catch((function(t){e||L(null!=t?t:"Unknown error")})),function(){e=!0}}),[r,C,E,R]),o.useEffect((function(){y&&((0,on.DW)(E,y,Y.current,H.current),R())}),[y,E,R]),o.useEffect((function(){"function"==typeof s&&((0,on.ZG)(E,s),R())}),[s,E,R]),o.useEffect((function(){(0,on.Ml)(E,m)}),[E,m]);var G=o.useRef(!0);return o.useLayoutEffect((function(){if(v&&c){var e=new Xt.A((function(){qn(c,G.current)}));return e.observe(v),function(){e.unobserve(v)}}}),[v,c]),o.useEffect((function(){if(c){var e=function(e){var t=e.edge,n=(0,on.ry)(c,E,t);c.selectEdges((0,he.A)(n))},t=function(){c.unselectAll()},n=function(e){var t=e.node;if(t){var n=E.get(t);if(B.current=null!=n?n:void 0,n){var r=(0,on.AX)(c,E,t);if(c.selectEdges((0,he.A)(r)),n.url&&(null==v||v.style.setProperty("cursor","pointer")),"in"!==n.type&&"out"!==n.type||null==v||v.classList.add(Fn),(0,on.lt)(n)){var i=c.getPosition(t),o=i.x,a=i.y,s=c.canvasToDOM({x:o+15,y:a}),u=c.canvasToDOM({x:o-15,y:a}),l=s,d="right";if(v){var f=v.getBoundingClientRect(),h=f.x,p=f.y,m=f.width;l.x+330>m&&(l=u,d="left"),l.x+=h,l.y+=p}U({progress:n.progress,details:n.details,schemas:n.schemas,position:l,placement:d})}}}},r=function(){null==v||v.classList.remove(Fn),null==v||v.style.removeProperty("cursor"),c.unselectAll(),U(void 0),B.current=void 0},i=function(){if(B.current){var e=B.current;e.url&&(0,ke.V3)(e.url)}},o=function(){G.current=!1};return c.on("hoverEdge",e),c.on("blurEdge",t),c.on("hoverNode",n),c.on("blurNode",r),c.on("click",i),c.on("zoom",o),function(){c.off("hoverEdge",e),c.off("blurEdge",t),c.off("hoverNode",n),c.off("blurNode",r),c.off("click",i),c.off("zoom",o)}}}),[c,E,v]),M?(0,k.jsx)(b.E,{color:"danger",children:"".concat(M)}):(0,k.jsx)("div",{ref:p,className:$n(null,n),children:0===E.length?(0,k.jsx)(Kt,{size:"m",local:!0}):(0,k.jsxs)(o.Fragment,{children:[(0,k.jsx)(hn,{nodes:E,edges:C,options:g,className:$n("graph"),getNetwork:d}),c&&a?(0,k.jsx)(pn,{className:$n("minimap-wrapper"),network:c,nodes:E,edges:C,options:g}):null,(0,k.jsxs)("div",{className:$n("toolbar"),children:[(0,k.jsx)(A.$,{className:$n("toolbar-button"),onClick:function(){c&&(c.moveTo({scale:1.1*c.getScale()}),G.current=!1)},children:(0,k.jsx)(w.I,{data:Dn.A,size:16})}),(0,k.jsx)(A.$,{className:$n("toolbar-button"),onClick:function(){c&&(c.moveTo({scale:c.getScale()/1.1}),G.current=!1)},children:(0,k.jsx)(w.I,{data:Pn.A,size:16})}),(0,k.jsx)(A.$,{className:$n("toolbar-button"),onClick:function(){null==c||c.fit(),G.current=!0},children:(0,k.jsx)(w.I,{data:zn,size:16})}),(0,k.jsx)(cn,{nodes:E,className:$n("toolbar-button",$n("legend"))})]}),F&&t?(0,k.jsx)(Wt.z,{anchorRef:q,open:!0,placement:F.placement,children:(0,k.jsx)(rn.A,(0,$.A)((0,$.A)({},F),{},{containerRef:P}))}):null]})})}var Hn=n(65692),Vn=n(75414),Yn=n.n(Vn),Wn=n(9335),Gn=n(79261),Kn=36e5,Xn=24*Kn,Qn=30*Xn,Jn=365*Xn,Zn=function(e){return e.CREATED="CREATED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.FAILED="FAILED",e}({});function er(e,t,n,r,i){var o="".concat(t.eventsCount);e.measureText(o).width<i&&(e.fillStyle=pr.resolveCssValue(pr.COUNTER_FONT_COLOR),e.fillText(o,n,r+pr.COUNTER_FONT_CENTER_OFFSET))}var tr,nr,rr,ir=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}({}),or="#333",ar="#777",sr="#FFF",ur="#08F",lr="#3D5",cr="#D30",dr="#F80",fr="#A5A",hr=globalThis.document.body,vr=window.getComputedStyle(hr),pr={ZOOM_MIN:5e3,ZOOM_MAX:2*Qn,PRIMARY_BACKGROUND_COLOR:sr,BOUNDARY_MARK_COLOR:or,PRIMARY_MARK_COLOR:ar,SECONDARY_MARK_COLOR:"#DDD",CONNECTION_COLOR:lr,RULER_FONT:"10px sans-serif",RULER_PRIMARY_TEXT_COLOR:"#111",RULER_SECONDARY_TEXT_COLOR:ar,RULER_TEXT_OUTLINE_COLOR:sr,RULER_LABEL_SPACING:40,RULER_GRID_SPACING:10,RULER_SUP_LABEL_POS:16,RULER_LABEL_POS:33,RULER_HEADER_HEIGHT:41,RULER_BORDER_COLOR:or,RULER_WEEKEND_COLOR:cr,EVENT_HITBOX_PADDING:2,SELECTION_OUTLINE_COLOR:ur,SELECTION_BG_COLOR:ur,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:(tr={},(0,r.A)(tr,ir.INFO,ur),(0,r.A)(tr,ir.QUEUED,fr),(0,r.A)(tr,ir.DEPRECATED,dr),(0,r.A)(tr,ir.OK,lr),(0,r.A)(tr,ir.WARNING,dr),(0,r.A)(tr,ir.DANGER,cr),(0,r.A)(tr,ir.MUTED,ar),(0,r.A)(tr,ir.DELETED,cr),tr),groupStatusColors:(nr={},(0,r.A)(nr,ir.INFO,ur),(0,r.A)(nr,ir.QUEUED,fr),(0,r.A)(nr,ir.DEPRECATED,dr),(0,r.A)(nr,ir.OK,lr),(0,r.A)(nr,ir.WARNING,dr),(0,r.A)(nr,ir.DANGER,cr),(0,r.A)(nr,ir.MUTED,ar),(0,r.A)(nr,ir.DELETED,cr),nr),regionStateColors:(rr={},(0,r.A)(rr,Zn.CREATED,ur),(0,r.A)(rr,Zn.PROCESSING,"#fe5"),(0,r.A)(rr,Zn.PROCESSED,lr),(0,r.A)(rr,Zn.FAILED,cr),rr),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=vr.getPropertyValue(n);return""!==i?i:n}return e}},mr=function(){function e(t){(0,G.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 gr(){return-1!==navigator.userAgent.indexOf("Mac OS")}function yr(e){return gr()?e.metaKey:e.ctrlKey}var xr=function(){},br=n(18801);function Ar(e,t,n){return e>=t&&e<=n}function wr(e,t,n,r){return t-e>r-n?Ar(n,e,t)||Ar(r,e,t):Ar(e,n,r)||Ar(t,n,r)}function Er(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 _r(e,t,n){return e>n?n:e<t?t:e}function Cr(e,t){return e-e%t}function jr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return e>=t-n&&e<=t+n}var kr=n(48495),Sr=n.n(kr),Tr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,G.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}(),Nr=n(7059),Rr=n.n(Nr),Or=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){var e;(0,G.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=pr.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=pr.resolveCssValue(pr.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 Er(+e,n,r,0,l)}function f(e){return Er(e,u,u+l,n,r)}function h(e,n,r,i,o){t.strokeStyle=pr.resolveCssValue(pr.RULER_TEXT_OUTLINE_COLOR);for(var a=null,s=r.start(e);+s<n;s=r.step(s)){var u=Rr()(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=Rr()(h).format(r.format),p=_r(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=pr.RULER_FONT,t.lineJoin="miter",t.miterLimit=2,t.lineWidth=1;for(var v,p,m=r-n,g=0,y=Lr.length;g<y;g+=1)if(!(m>Lr[g].domain)){for(var x=0,b=Rr()(0);+b<m;b=Lr[g].step(b))Er(+b,0,m,u,u+l)>0&&(x+=pr.RULER_LABEL_SPACING);if(!(x>l)){p=(v=Lr[g]).sup||Lr[g+1];break}}v&&h(n,r,v,s+pr.RULER_LABEL_POS,pr.resolveCssValue(pr.RULER_PRIMARY_TEXT_COLOR)),p&&h(n,r,p,s+pr.RULER_SUP_LABEL_POS,pr.resolveCssValue(pr.RULER_SECONDARY_TEXT_COLOR)),t.strokeStyle=pr.resolveCssValue(pr.RULER_BORDER_COLOR),t.beginPath(),t.moveTo(u,s+c+.5),t.lineTo(u+l,s+c+.5),t.stroke()}}]),n}(mr),Ir={start:function(e){return Rr()(e).startOf("hour")},step:function(e){return Rr()(e).add(1,"hour")},format:"HH"},Mr={start:function(e){return Rr()(e).startOf("day")},step:function(e){return Rr()(e).add(1,"day")},color:function(e){var t=Rr()(e).day();return 6===t||0===t?pr.resolveCssValue(pr.RULER_WEEKEND_COLOR):null},format:"MMM D"},Lr=[{domain:1e3,start:function(e){return Rr()(e).startOf("millisecond")},step:function(e){return Rr()(e).add(1,"millisecond")},format:"SSS[ms]",sup:{start:function(e){return Rr()(e).startOf("second")},step:function(e){return Rr()(e).add(1,"second")},format:"ss[′′]"}},{domain:6e4,start:function(e){return Rr()(e).startOf("second")},step:function(e){return Rr()(e).add(1,"second")},format:"ss[′′]",sup:{start:function(e){var t=Rr()(e).startOf("minute");return t.subtract(t.minute()%5,"minute")},step:function(e){return Rr()(e).add(5,"minute")},format:"mm[′]"}},{domain:Kn,start:function(e){var t=Rr()(e).startOf("minute");return t.subtract(t.minute()%5,"minute")},step:function(e){return Rr()(e).add(5,"minute")},format:"mm[′]",sup:Ir},{domain:Xn,start:function(e){var t=Rr()(e).startOf("minute");return t.subtract(t.minute()%15,"minute")},step:function(e){return Rr()(e).add(15,"minute")},format:"mm[′]",sup:Ir},{domain:Xn,start:function(e){return Rr()(e).startOf("hour")},step:function(e){return Rr()(e).add(1,"hour")},format:"HH",sup:Mr},{domain:Qn,start:function(e){var t=Rr()(e).startOf("hour");return t.subtract(t.hour()%4,"hour")},step:function(e){return Rr()(e).add(4,"hour")},format:"HH",sup:Mr},{domain:Qn,start:function(e){return Rr()(e).startOf("day")},step:function(e){return Rr()(e).add(1,"day")},color:function(e){var t=Rr()(e).day();return 6===t||0===t?pr.resolveCssValue(pr.RULER_WEEKEND_COLOR):null},format:"D",sup:{start:function(e){return Rr()(e).startOf("month")},step:function(e){return Rr()(e).add(1,"month")},format:"MMM YYYY"}},{domain:6*Qn,start:function(e){return Rr()(e).startOf("week").add(1,"day")},step:function(e){return Rr()(e).add(1,"week")},format:"D"},{domain:Jn,start:function(e){return Rr()(e).startOf("month")},step:function(e){return Rr()(e).add(1,"month")},format:"MMM",sup:{start:function(e){return Rr()(e).startOf("year")},step:function(e){return Rr()(e).add(1,"year")},format:"YYYY"}},{domain:10*Jn,start:function(e){var t=Rr()(e).startOf("month");return t.subtract(t.month()%3,"month")},step:function(e){return Rr()(e).add(3,"month")},format:"[Q]Q"},{domain:1/0,start:function(e){return Rr()(e).startOf("year")},step:function(e){return Rr()(e).add(1,"year")},format:"YYYY"}],Pr=function(e){return e[e.STRAIGHT=0]="STRAIGHT",e[e.DASHED=1]="DASHED",e}({}),Dr=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,G.A)(this,n),(r=t.call(this,e)).trackHeight=pr.TRACK_HEIGHT,r.strokeMode=Pr.STRAIGHT,r.axesIndex=void 0,Object.assign((0,Gn.A)(r),i),r.axesIndex=new Tr([],{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=_r(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(Or))||void 0===t?void 0:t.height)||0,r=e.ctx;this.strokeMode===Pr.DASHED&&r.setLineDash([5,3]),e.useScrollTransform(),r.translate(0,n);var i=e.canvas.width;r.strokeStyle=pr.resolveCssValue(pr.SECONDARY_MARK_COLOR),r.beginPath(),r.lineWidth=1;var o,a=(0,mn.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}(mr),zr=(0,K.A)((function e(){(0,G.A)(this,e),this.hitboxResult={top:0,right:0,bottom:0,left:0}})),$r=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.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=pr.resolveCssValue(pr.eventStatusColors[t.status]),e.arc(r,o,5,0,2*Math.PI),n&&(e.strokeStyle=pr.resolveCssValue(pr.SELECTION_OUTLINE_COLOR),e.lineWidth=pr.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();else if(t.eventsCount>1){e.fillStyle=pr.resolveCssValue(pr.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=pr.resolveCssValue(pr.SELECTION_OUTLINE_COLOR),e.lineWidth=pr.SELECTION_OUTLINE_THICKNESS,e.stroke()),e.fill();var a=Math.max(r,pr.COUNTER_PADDING);er(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}(zr),Fr=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.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=pr.resolveCssValue(pr.SELECTION_OUTLINE_COLOR),e.lineWidth=pr.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,s,6)),e.fillStyle=pr.resolveCssValue(pr.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=pr.resolveCssValue(pr.SELECTION_OUTLINE_COLOR),e.lineWidth=pr.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,u,l,12)),e.fillStyle=pr.resolveCssValue(pr.groupStatusColors[t.status]),e.fillRect(r,u,l,12);var c=Math.max(r+pr.COUNTER_PADDING,pr.COUNTER_PADDING);er(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}(zr),Ur=["renderers"],qr=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,G.A)(this,n),(r=t.call(this,e)).eventHitboxPadding=pr.EVENT_HITBOX_PADDING,r.eventCounterFont=pr.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:yr(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 $r],["process",new Fr]]),r.maxIndexTreeWidth=16,r.index=new(Sr())(r.maxIndexTreeWidth),r._selectedEvents=new Set,r._events=[];var o=i.renderers,a=(0,br.A)(i,Ur);if(Object.assign((0,Gn.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(Or))||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,mn.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(Dr),r=(null===(t=e.getComponent(Or))||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&&wr(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(Dr),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}(mr),Br=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,G.A)(this,n),(r=t.call(this,e)).borderColor=pr.SELECTION_OUTLINE_COLOR,r.innerColor=pr.SELECTION_BG_COLOR,r.handleCanvasMousedown=function(e){if(yr(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(qr);t&&t.selectEventsAt(e)},Object.assign((0,Gn.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=pr.resolveCssValue(this.borderColor),n.fillStyle=pr.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}(mr),Hr=n(24503),Vr=n.n(Hr),Yr=function(){function e(t,n){(0,G.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=Cr(this.from,e),this.to=Cr(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,mn.A)(t);try{for(c.s();!(s=c.n()).done;){var d=s.value;wr(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 jr(this.from,e.from,.1)&&jr(this.to,e.to,.1)}}]),e}(),Wr=function(){function e(t){(0,G.A)(this,e),this.getAxisIdentity=function(e){return e.id},this.visibleEvents=[],this.foldedEvents=[],this._timeRange=new Yr(0,0),this._viewportWidth=0,this.axesIndex=void 0,this._getRawEvents=Z().mark((function e(){return Z().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=xr,this.finalizeEvent=xr,this.overlapThreshold=pr.OVERLAPPING_THRESHOLD,this.onVisibleEventsChanged=xr,Object.assign(this,t),this.axesIndex=new Tr([],{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,jr(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];wr(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 _r(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,mn.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=_r(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,mn.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 wr(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}(),Gr=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(e){var r;return(0,G.A)(this,n),(r=t.call(this,e)).handleTimeRangeChanged=Vr()((function(e){r.mapper.timeRange.equals(e)||(r.mapper.timeRange=e)}),250),r.handleVisibleEventsChanged=function(e){r.canvasApi.getComponent(qr).events=e,r.host.scheduleTimelineRender()},r.mapper=void 0,r.events=[],r.mapper=new Wr({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(Dr);t&&(t.axes=e),this.mapper.axes=e}}},{key:"hostConnected",value:function(){this.mapper.viewportWidth=this.canvasApi.canvas.width,this.handleTimeRangeChanged(new Yr(this.host.start,this.host.end))}},{key:"hostUpdated",value:function(){var e=new Yr(this.host.start,this.host.end);this.handleTimeRangeChanged(e)}},{key:"notifyMapperEvents",value:function(){var e=Z().mark(n),t=this.events;function n(){return Z().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}(mr),Kr=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.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(Or))||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=Qr.length;f<h;f+=1)if(!(d>Qr[f].domain)){for(var v=0,p=Rr()(0);+p<d;p=Qr[f].step(p))Er(+p,0,d,0,0+l)>0&&(v+=pr.RULER_GRID_SPACING);if(!(v>l+40)){n=Qr[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=pr.GRID_STROKE_WIDTH;for(var u=s.start(o);+u<a;u=s.step(u)){var l=Math.floor(Er(+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}(mr);function Xr(e,t){return function(n){return n[t]()%e==0?pr.resolveCssValue(pr.PRIMARY_MARK_COLOR):pr.resolveCssValue(pr.SECONDARY_MARK_COLOR)}}var Qr=[{domain:Kn,style:Xr(5,"minute"),start:function(e){return Rr()(e).startOf("minute")},step:function(e){return e.add(1,"minute")}},{domain:Xn,style:function(e){return 0===e.hour()&&0===e.minute()?pr.resolveCssValue(pr.BOUNDARY_MARK_COLOR):e.minute()%4==0?pr.resolveCssValue(pr.PRIMARY_MARK_COLOR):pr.resolveCssValue(pr.SECONDARY_MARK_COLOR)},start:function(e){var t=Rr()(e).startOf("minute");return t.subtract(t.minute()%15,"minute")},step:function(e){return e.add(15,"minute")}},{domain:Qn,style:function(e){return 0===e.hour()?pr.resolveCssValue(pr.BOUNDARY_MARK_COLOR):e.hour()%4==0?pr.resolveCssValue(pr.PRIMARY_MARK_COLOR):pr.resolveCssValue(pr.SECONDARY_MARK_COLOR)},start:function(e){return Rr()(e).startOf("hour")},step:function(e){return e.add(1,"hour")}},{domain:Jn,style:function(e){return 1===e.date()?pr.resolveCssValue(pr.BOUNDARY_MARK_COLOR):1===e.day()?pr.resolveCssValue(pr.PRIMARY_MARK_COLOR):pr.resolveCssValue(pr.SECONDARY_MARK_COLOR)},start:function(e){return Rr()(e).startOf("day")},step:function(e){return e.add(1,"day")}},{domain:5*Jn,style:Xr(3,"month"),start:function(e){return Rr()(e).startOf("month")},step:function(e){return Rr()(e).add(1,"month")}},{domain:1/0,style:function(){return pr.resolveCssValue(pr.PRIMARY_MARK_COLOR)},start:function(e){return Rr()(e).startOf("year")},step:function(e){return e.add(1,"year")}}],Jr=n(64624),Zr=n(28782);const ei=window,ti=ei.ShadowRoot&&(void 0===ei.ShadyCSS||ei.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ni=Symbol(),ri=new WeakMap;class ii{constructor(e,t,n){if(this._$cssResult$=!0,n!==ni)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(ti&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=ri.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ri.set(t,e))}return e}toString(){return this.cssText}}const oi=ti?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new ii("string"==typeof e?e:e+"",void 0,ni))(t)})(e):e;var ai;const si=window,ui=si.trustedTypes,li=ui?ui.emptyScript:"",ci=si.reactiveElementPolyfillSupport,di={toAttribute(e,t){switch(t){case Boolean:e=e?li: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}},fi=(e,t)=>t!==e&&(t==t||e==e),hi={attribute:!0,type:String,converter:di,reflect:!1,hasChanged:fi},vi="finalized";class pi 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=hi){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)||hi}static finalize(){if(this.hasOwnProperty(vi))return!1;this[vi]=!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(oi(e))}else void 0!==e&&t.push(oi(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)=>{ti?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const n=document.createElement("style"),r=ei.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=hi){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:di).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:di;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||fi)(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 mi;pi[vi]=!0,pi.elementProperties=new Map,pi.elementStyles=[],pi.shadowRootOptions={mode:"open"},null==ci||ci({ReactiveElement:pi}),(null!==(ai=si.reactiveElementVersions)&&void 0!==ai?ai:si.reactiveElementVersions=[]).push("1.6.3");const gi=window,yi=gi.trustedTypes,xi=yi?yi.createPolicy("lit-html",{createHTML:e=>e}):void 0,bi="$lit$",Ai=`lit$${(Math.random()+"").slice(9)}$`,wi="?"+Ai,Ei=`<${wi}>`,_i=document,Ci=()=>_i.createComment(""),ji=e=>null===e||"object"!=typeof e&&"function"!=typeof e,ki=Array.isArray,Si="[ \t\n\f\r]",Ti=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ni=/-->/g,Ri=/>/g,Oi=RegExp(`>|${Si}(?:([^\\s"'>=/]+)(${Si}*=${Si}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Ii=/'/g,Mi=/"/g,Li=/^(?:script|style|textarea|title)$/i,Pi=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Di=Pi(1),zi=(Pi(2),Symbol.for("lit-noChange")),$i=Symbol.for("lit-nothing"),Fi=new WeakMap,Ui=_i.createTreeWalker(_i,129,null,!1);function qi(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==xi?xi.createHTML(t):t}const Bi=(e,t)=>{const n=e.length-1,r=[];let i,o=2===t?"<svg>":"",a=Ti;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===Ti?"!--"===u[1]?a=Ni:void 0!==u[1]?a=Ri:void 0!==u[2]?(Li.test(u[2])&&(i=RegExp("</"+u[2],"g")),a=Oi):void 0!==u[3]&&(a=Oi):a===Oi?">"===u[0]?(a=null!=i?i:Ti,l=-1):void 0===u[1]?l=-2:(l=a.lastIndex-u[2].length,s=u[1],a=void 0===u[3]?Oi:'"'===u[3]?Mi:Ii):a===Mi||a===Ii?a=Oi:a===Ni||a===Ri?a=Ti:(a=Oi,i=void 0);const d=a===Oi&&e[t+1].startsWith("/>")?" ":"";o+=a===Ti?n+Ei:l>=0?(r.push(s),n.slice(0,l)+bi+n.slice(l)+Ai+d):n+Ai+(-2===l?(r.push(void 0),t):d)}return[qi(e,o+(e[n]||"<?>")+(2===t?"</svg>":"")),r]};class Hi{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]=Bi(e,t);if(this.el=Hi.createElement(u,n),Ui.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(r=Ui.nextNode())&&s.length<a;){if(1===r.nodeType){if(r.hasAttributes()){const e=[];for(const t of r.getAttributeNames())if(t.endsWith(bi)||t.startsWith(Ai)){const n=l[o++];if(e.push(t),void 0!==n){const e=r.getAttribute(n.toLowerCase()+bi).split(Ai),t=/([.?@])?(.*)/.exec(n);s.push({type:1,index:i,name:t[2],strings:e,ctor:"."===t[1]?Ki:"?"===t[1]?Qi:"@"===t[1]?Ji:Gi})}else s.push({type:6,index:i})}for(const t of e)r.removeAttribute(t)}if(Li.test(r.tagName)){const e=r.textContent.split(Ai),t=e.length-1;if(t>0){r.textContent=yi?yi.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],Ci()),Ui.nextNode(),s.push({type:2,index:++i});r.append(e[t],Ci())}}}else if(8===r.nodeType)if(r.data===wi)s.push({type:2,index:i});else{let e=-1;for(;-1!==(e=r.data.indexOf(Ai,e+1));)s.push({type:7,index:i}),e+=Ai.length-1}i++}}static createElement(e,t){const n=_i.createElement("template");return n.innerHTML=e,n}}function Vi(e,t,n=e,r){var i,o,a,s;if(t===zi)return t;let u=void 0!==r?null===(i=n._$Co)||void 0===i?void 0:i[r]:n._$Cl;const l=ji(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=Vi(e,u._$AS(e,t.values),u,r)),t}class Yi{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:_i).importNode(n,!0);Ui.currentNode=i;let o=Ui.nextNode(),a=0,s=0,u=r[0];for(;void 0!==u;){if(a===u.index){let t;2===u.type?t=new Wi(o,o.nextSibling,this,e):1===u.type?t=new u.ctor(o,u.name,u.strings,this,e):6===u.type&&(t=new Zi(o,this,e)),this._$AV.push(t),u=r[++s]}a!==(null==u?void 0:u.index)&&(o=Ui.nextNode(),a++)}return Ui.currentNode=_i,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 Wi{constructor(e,t,n,r){var i;this.type=2,this._$AH=$i,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=Vi(this,e,t),ji(e)?e===$i||null==e||""===e?(this._$AH!==$i&&this._$AR(),this._$AH=$i):e!==this._$AH&&e!==zi&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):(e=>ki(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!==$i&&ji(this._$AH)?this._$AA.nextSibling.data=e:this.$(_i.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=Hi.createElement(qi(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 Yi(i,this),t=e.u(this.options);e.v(n),this.$(t),this._$AH=e}}_$AC(e){let t=Fi.get(e.strings);return void 0===t&&Fi.set(e.strings,t=new Hi(e)),t}T(e){ki(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 Wi(this.k(Ci()),this.k(Ci()),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 Gi{constructor(e,t,n,r,i){this.type=1,this._$AH=$i,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=$i}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=Vi(this,e,t,0),o=!ji(e)||e!==this._$AH&&e!==zi,o&&(this._$AH=e);else{const r=e;let a,s;for(e=i[0],a=0;a<i.length-1;a++)s=Vi(this,r[n+a],t,a),s===zi&&(s=this._$AH[a]),o||(o=!ji(s)||s!==this._$AH[a]),s===$i?e=$i:e!==$i&&(e+=(null!=s?s:"")+i[a+1]),this._$AH[a]=s}o&&!r&&this.j(e)}j(e){e===$i?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class Ki extends Gi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===$i?void 0:e}}const Xi=yi?yi.emptyScript:"";class Qi extends Gi{constructor(){super(...arguments),this.type=4}j(e){e&&e!==$i?this.element.setAttribute(this.name,Xi):this.element.removeAttribute(this.name)}}class Ji extends Gi{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=Vi(this,e,t,0))&&void 0!==n?n:$i)===zi)return;const r=this._$AH,i=e===$i&&r!==$i||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==$i&&(r===$i||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 Zi{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){Vi(this,e)}}const eo=gi.litHtmlPolyfillSupport;var to,no;null==eo||eo(Hi,Wi),(null!==(mi=gi.litHtmlVersions)&&void 0!==mi?mi:gi.litHtmlVersions=[]).push("2.8.0");class ro extends pi{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 Wi(t.insertBefore(Ci(),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 zi}}ro.finalized=!0,ro._$litElement$=!0,null===(to=globalThis.litElementHydrateSupport)||void 0===to||to.call(globalThis,{LitElement:ro});const io=globalThis.litElementPolyfillSupport;null==io||io({LitElement:ro}),(null!==(no=globalThis.litElementVersions)&&void 0!==no?no:globalThis.litElementVersions=[]).push("3.3.3");var oo,ao=function(){function e(t){(0,G.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 Cr(Date.now(),1e3)}},{key:"timeToPosition",value:function(e){var t=this.width;return Er(e,this.timeline.start,this.timeline.end,0,t)||0}},{key:"positionToTime",value:function(e){return Er(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=pr.resolveCssValue(pr.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}(),so=function(e){(0,X.A)(r,e);var t,n=(0,Q.A)(r);function r(){var e;return(0,G.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(_r(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*pr.WHEEL_PAN_SPEED;r+=s,i+=s}else{var u=t.offsetX/n.canvas.width,l=_r(o*(t.deltaY>0?1.15:.9),pr.ZOOM_MIN,pr.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*pr.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=Qn,e.canvasScrollTop=0,e.isZoomAllowed=!0,e}return(0,K.A)(r,[{key:"render",value:function(){return Di(oo||(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)),oo=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,Jr.A)((0,Zr.A)(r.prototype),"shouldUpdate",this).call(this,e)}},{key:"connectedCallback",value:function(){(0,Jr.A)((0,Zr.A)(r.prototype),"connectedCallback",this).call(this),this.init()}},{key:"disconnectedCallback",value:function(){this.destroy(),(0,Jr.A)((0,Zr.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,W.A)(Z().mark((function e(t){return Z().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,mn.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,Jr.A)((0,Zr.A)(r.prototype),"firstUpdated",this).call(this,e),this.canvasApi=new ao({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,mn.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}(ro);const uo=new Set(["children","wcType"]);class lo extends o.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 o.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)uo.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)}}var co=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.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=function(e,t){if(e&&t)return t-e==0?"0s":t-e<1e3?"<1s":(0,on.p0)(e,t,"h:mm:ss")}(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=pr.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:pr.resolveCssValue(t.borderColor)}),e.strokeStyle=pr.resolveCssValue(t.borderColor),e.lineWidth=2,e.strokeRect(r,a,d||s,u),t.backgroundColor)){var v=(pr.TRACK_HEIGHT-u)/3;e.fillStyle=pr.resolveCssValue(t.backgroundColor),e.fillRect(r-v,a-v,(d||s)+2*v,pr.TRACK_HEIGHT*Object.keys(t.colors).length-v)}}else{var p=t.colors[t.trackIndex].color;e.fillStyle=pr.resolveCssValue(p),e.fillRect(r,a,s,u)}n&&(e.strokeStyle=pr.resolveCssValue(pr.SELECTION_OUTLINE_COLOR),e.lineWidth=pr.SELECTION_OUTLINE_THICKNESS,e.strokeRect(r,a,d||s,u)),l&&function(e,t,n,r){e.fillStyle=pr.resolveCssValue(pr.COUNTER_FONT_COLOR),e.fillText(t,n+pr.COUNTER_PADDING,r+pr.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}(zr),fo=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"events",set:function(e){this.getComponent(Gr).then((function(t){null==t||t.setEvents(e)}))}},{key:"axes",set:function(e){this.getComponent(Gr).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,Jr.A)((0,Zr.A)(n.prototype),"updateCanvasSize",this).call(this)}},{key:"createComponents",value:function(){this.setTimelineConfig();var e=new qr(this);return e.registerRenderer("operation",new co),[new Kr(this),new Dr(this),e,new Br(this),new Gr(this)]}},{key:"setTimelineConfig",value:function(){pr.ZOOM_MAX=3*Jn,pr.PRIMARY_BACKGROUND_COLOR=(0,Jt.k)("--g-color-base-background"),pr.SECONDARY_MARK_COLOR=(0,Jt.k)("--g-color-line-generic"),pr.BOUNDARY_MARK_COLOR=(0,Jt.k)("--g-color-line-generic"),pr.PRIMARY_MARK_COLOR=(0,Jt.k)("--g-color-line-generic-hover"),pr.COUNTER_FONT_COLOR=(0,Jt.k)("--g-color-text-complementary")}}]),n}(so);customElements.define("my-timeline-canvas",fo);var ho=(e=>{const t=o.forwardRef(((e,t)=>o.createElement(lo,Object.assign({wcType:"my-timeline-canvas",innerRef:t},e))));return t})();function vo(){return vo=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},vo.apply(this,arguments)}var po,mo=["bottom","height","left","right","top","width"],go=new Map,yo=function e(){var t=[];go.forEach((function(e,n){var r=n.getBoundingClientRect();(function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),mo.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)}))})),po=window.requestAnimationFrame(e)},xo="undefined"!=typeof window?o.useLayoutEffect:o.useEffect;function bo(e,t){var n=t.rect;return e.height!==n.height||e.width!==n.width?n:e}var Ao=function(e,t){void 0===t&&(t={width:0,height:0});var n=o.useState(e.current),r=n[0],i=n[1],a=o.useReducer(bo,t),s=a[0],u=a[1],l=o.useRef(!1);return xo((function(){e.current!==r&&i(e.current)})),xo((function(){if(r&&!l.current){l.current=!0;var e=r.getBoundingClientRect();u({rect:e})}}),[r]),o.useEffect((function(){if(r){var e,t,n=(e=r,t=function(e){u({rect:e})},{observe:function(){var n=0===go.size;go.has(e)?go.get(e).callbacks.push(t):go.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),n&&yo()},unobserve:function(){var n=go.get(e);if(n){var r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||go.delete(e),go.size||cancelAnimationFrame(po)}}});return n.observe(),function(){n.unobserve()}}}),[r]),s},wo=["align"],Eo=function(){return 50},_o=function(e){return e},Co=function(e,t){return e[t?"offsetWidth":"offsetHeight"]},jo=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},ko=function(e){var t,n=e.size,r=void 0===n?0:n,i=e.estimateSize,a=void 0===i?Eo: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?_o:A,E=e.measureSize,_=void 0===E?Co:E,C=e.rangeExtractor,j=void 0===C?jo:C,k=p?"width":"height",S=p?"scrollLeft":"scrollTop",T=o.useRef({outerSize:0,scrollOffset:0,measurements:[],totalSize:0}),N=o.useState(0),R=N[0],O=N[1];T.current.scrollOffset=R;var I=(g||Ao)(h,y)[k];T.current.outerSize=I;var M=o.useCallback((function(e){h.current&&(h.current[S]=e)}),[h,S]),L=m||M,P=o.useCallback((function(e){L(e,M)}),[M,L]),D=o.useState({}),z=D[0],$=D[1],F=o.useCallback((function(){return $({})}),[]),U=o.useRef([]),q=o.useMemo((function(){var e=U.current.length>0?Math.min.apply(Math,U.current):0;U.current=[];for(var t=T.current.measurements.slice(0,e),n=e;n<r;n++){var i=w(n),o=z[i],s=t[n-1]?t[n-1].end:c,u="number"==typeof o?o:a(n),l=s+u;t[n]={index:n,start:s,size:u,end:l,key:i}}return t}),[a,z,c,r,w]),B=((null==(t=q[r-1])?void 0:t.end)||c)+f;T.current.measurements=q,T.current.totalSize=B;var H=x?x.current:h.current,V=o.useRef(b);V.current=b,xo((function(){if(H){var e=function(e){var t=V.current?V.current(e):H[S];O(t)};return e(),H.addEventListener("scroll",e,{capture:!1,passive:!0}),function(){H.removeEventListener("scroll",e)}}O(0)}),[H,S]);var Y=function(e){for(var t=e.measurements,n=e.outerSize,r=e.scrollOffset,i=t.length-1,o=So(0,i,(function(e){return t[e].start}),r),a=o;a<i&&t[a].end<r+n;)a++;return{start:o,end:a}}(T.current),W=Y.start,G=Y.end,K=o.useMemo((function(){return j({start:W,end:G,overscan:u,size:q.length})}),[W,G,u,q.length,j]),X=o.useRef(_);X.current=_;var Q=o.useMemo((function(){for(var e=[],t=function(t,n){var r=K[t],i=vo({},q[r],{measureRef:function(e){if(e){var t=X.current(e,p);if(t!==i.size){var n=T.current.scrollOffset;i.start<n&&M(n+(t-i.size)),U.current.push(r),$((function(e){var n;return vo({},e,((n={})[i.key]=t,n))}))}}}});e.push(i)},n=0,r=K.length;n<r;n++)t(n);return e}),[K,M,p,q]),J=o.useRef(!1);xo((function(){J.current&&$({}),J.current=!0}),[a]);var Z=o.useCallback((function(e,t){var n=(void 0===t?{align:"start"}:t).align,r=T.current,i=r.scrollOffset,o=r.outerSize;"auto"===n&&(n=e<=i?"start":e>=i+o?"end":"start"),"start"===n?P(e):"end"===n?P(e-o):"center"===n&&P(e-o/2)}),[P]),ee=o.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,wo),a=T.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,vo({align:i},o))}}),[Z,r]),te=o.useCallback((function(e,t){ee(e,t),requestAnimationFrame((function(){ee(e,t)}))}),[ee]);return{virtualItems:Q,totalSize:B,scrollToOffset:Z,scrollToIndex:te,measure:F}},So=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},To=(0,a.A)("yq-virtual-list"),No=3;function Ro(e){var t=e.listRef,n=e.className,r=e.containerRef,a=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,p=e.activeItemIndex,m=e.selectedItemKey,g=e.onItemClick,y=e.onWrapperScroll,x=e.canFetchMore,b=e.isFetchingMore,A=e.fetchMore,w=e.loaderHeight,E=void 0===w?40:w,_=e.alwaysShowActiveItem,C=e.headerClassName,j=e.renderHeader,S=o.useState(),T=(0,i.A)(S,2),R=T[0],O=T[1],I=o.useRef(null);o.useEffect((function(){_&&(!R||R>u.length-1)&&O(0)}),[u,R,_]);var M=o.useRef(null),L=o.useRef(null),P=ko({size:x?u.length+1:u.length,estimateSize:o.useCallback((function(e){return e>=u.length?E:"function"==typeof c?c(u[e],e):c}),[c,E,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:No,parentRef:L});o.useImperativeHandle(t,(function(){return{resetSizes:function(){P.measure()}}}),[P.measure]),o.useEffect((function(){var e=P.virtualItems.slice(-1),t=(0,i.A)(e,1)[0];t&&t.index===u.length&&x&&!b&&(null==A||A())}),[x,A,u.length,b,P.virtualItems]);var D=function(){_||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,N.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&&(P.scrollToIndex(i),M.current&&M.current.contains(e.target)&&M.current!==e.target&&M.current.focus()),i}))};return(0,k.jsxs)("div",{ref:(0,on.RQ)(M,r),tabIndex:0,className:To(null,n),onFocus:function(){I.current&&(clearTimeout(I.current),I.current=null)},onBlur:D,onMouseLeave:D,onKeyDown:function(e){if(0!==P.virtualItems.length){var t=Math.max(1,P.virtualItems.length-2*No),n=P.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&&g&&e.target===e.currentTarget&&void 0!==u[R]&&(e.preventDefault(),g(u[R],R,void 0,!0))}}},children:[(0,k.jsx)("div",{className:To("header",C),children:"function"==typeof j?j():null}),(0,k.jsx)("div",{className:To("list",s),ref:(0,on.RQ)(L,a),onScroll:y,children:(0,k.jsx)("div",{style:{height:"".concat(P.totalSize,"px"),width:"100%",position:"relative"},children:P.virtualItems.map((function(e){if(e.index>u.length-1)return(0,k.jsx)("div",{ref:e.measureRef,className:To("item",{loader:!0}),style:{position:"absolute",top:0,left:0,width:"100%",height:"".concat(E,"px"),transform:"translateY(".concat(e.start,"px)")},children:(0,k.jsx)(Kt,{local:!0,size:"s"})},"loader");var t=u[e.index],n="function"==typeof c?c(t,e.index):c,r=!1;t&&"object"===(0,N.A)(t)&&(0,on.CJ)(t,"disabled")&&(r=Boolean(t.disabled));var i=R===e.index||p===e.index,a=m===e.key;return o.createElement(null!=f?f:"div",{key:e.key,ref:e.measureRef,className:To("item",{active:i,selected:a,clickable:"function"==typeof g&&!r},"function"==typeof h?h(t,e.index):h),style:{position:"absolute",top:0,left:0,width:"100%",height:"".concat(n,"px"),transform:"translateY(".concat(e.start,"px)")},onMouseMove:r?void 0:function(){O(e.index)},onClick:r?void 0:function(n){null==g||g(t,e.index,n)}},"function"==typeof d?d(t,e.index,{active:i,selected:a}):function(e){return String(e)}(t))}))})})]})}var Oo=n(19812),Io={sortOrder:{},sortColumns:[]};function Mo(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!t)return i?e:Io;var a=e.sortOrder,s=e.sortColumns,u=s,l=a[t],c=n;if(l&&(c=l===n||o?"ascending"===l?"descending":"ascending":void 0),!i)return c?{sortOrder:(0,r.A)({},t,c),sortColumns:[t]}:Io;a[t];var d=(0,br.A)(a,[t].map(Oo.A));return c?(d[t]=c,new Set(s).has(t)||(u=[].concat((0,he.A)(s),[t]))):u=s.filter((function(e){return e!==t})),{sortOrder:d,sortColumns:u}}var Lo=(0,a.A)("table"),Po=(0,k.jsx)("svg",{className:Lo("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,k.jsx)("path",{fill:"currentColor",d:"M0 5h10l-5 -5z"})}),Do=(0,k.jsx)("svg",{className:Lo("icon"),viewBox:"0 0 10 6",width:"10",height:"6",children:(0,k.jsx)("path",{fill:"currentColor",d:"M0 1h10l-5 5z"})});function zo(e){switch(e){case"ascending":return Po;case"descending":return Do;default:return null}}function $o(e){var t=e.sortOrder,n=e.sortIndex,r=e.sortable,i=e.defaultOrder;return r?(0,k.jsx)("span",{className:Lo("sort-icon",{shadow:!t}),"data-index":n,children:zo(t||i)}):null}var Fo=50;function Uo(e){var t=e.columns,n=e.sortOrder,r=e.sortColumns,i=e.sortable,a=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,k.jsx)(o.Fragment,{children:t.map((function(e,t){var o=e.className,s=e.name,l=e.header,c=e.title,d=e.align,f=e.customStyle,h=e.width,v=e.minWidth,p=void 0===v?Fo:v,m=e.maxWidth,g="number"==typeof h?"0 0 ".concat(h,"px"):"1 0 ".concat(p,"px");return(0,k.jsx)("div",{className:Lo("th",{sortable:i&&e.sortable,align:d},o),title:"string"==typeof c?c:void 0,"data-index":t,style:(0,$.A)({flex:g,maxWidth:m},null==f?void 0:f({header:!0,name:s})),onClick:u(e),children:(0,k.jsxs)("div",{className:Lo("head-cell"),children:[null!=l?l:s,(0,k.jsx)($o,{sortable:i&&e.sortable,defaultOrder:e.defaultOrder||a,sortOrder:n[s],sortIndex:r.indexOf(s)})]})},s)}))})}function qo(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,v=void 0===h?Fo:h,p=e.maxWidth,m=e.customStyle,g=e.render,y=e.onClick,x="function"==typeof d?d(n):n[e.name],b="number"==typeof f?"0 0 ".concat(f,"px"):"1 0 ".concat(v,"px");return(0,k.jsx)("div",{className:Lo("td",{align:u,sortable:l},s),title:"function"==typeof c?c(n):c,style:(0,$.A)({flex:b,maxWidth:p},null==m?void 0:m({row:n,index:r,name:a,header:!1})),onClick:function(){null==y||y(n,e)},children:(0,k.jsx)("div",{className:Lo("row-cell"),children:"function"==typeof g?g({value:x,row:n,index:r,active:i,selected:o}):x})},t)}))}var Bo=o.memo((function(e){var t=e.row,n=e.index,r=e.columns,i=e.render,a=e.active,s=e.selected;return(0,k.jsx)(o.Fragment,{children:"function"==typeof i?i({row:t,index:n,columns:r,render:function(){return qo({columns:r,row:t,index:n,active:a,selected:s})},active:a,selected:s}):qo({columns:r,row:t,index:n,active:a,selected:s})})}));function Ho(e){var t=e.containerRef,n=e.className,r=e.view,a=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,v=e.alwaysShowActiveRow,p=e.activeRowIndex,m=e.selectedRowKey,g=e.headerClassName,y=e.headerHeight,x=e.onSort,b=e.initialSortOrder,A=e.onRowClick,w=e.settings,E=void 0===w?{}:w,_=E.sortable,C=void 0===_||_,j=E.defaultOrder,S=void 0===j?"ascending":j,T=E.disableSortReset,N=void 0!==T&&T,R=e.canFetchMore,O=e.isFetchingMore,I=e.fetchMore,M=e.onWrapperScroll,L=e.scrollRef,P=o.useState((function(){return function(e){return e?(Array.isArray(e)?e:[e]).reduce((function(e,t){return Mo(e,t.name,t.order,!0)}),Io):Io}(b)})),D=(0,i.A)(P,2),z=D[0],F=D[1],U=o.useRef(null),q=o.useCallback((function(e,t){var n,r,i=Mo(z,e.name,e.defaultOrder||S,t,N);F(i),x&&x((r=(n=i).sortOrder,n.sortColumns.map((function(e){return{name:e,order:r[e]}}))))}),[S,N,x,z]),B=o.useCallback((function(){return(0,k.jsx)(Uo,(0,$.A)((0,$.A)({},z),{},{sortable:C,defaultOrder:S,columns:s,onSort:q}))}),[s,S,q,z,C]),H=o.useCallback((function(e,t,n){var r=n.active,i=n.selected;return(0,k.jsx)(Bo,{row:e,index:t,columns:s,active:r,selected:i,render:d})}),[s,d]);o.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?Fo:r)}),0)+30;null===(e=U.current)||void 0===e||e.style.setProperty("--table-min-width","".concat(t,"px"))}),[s]);var V=o.useCallback((function(e,t){return Lo("row","function"==typeof f?f(e,t):f)}),[f]);return(0,k.jsx)(Ro,{containerRef:(0,on.RQ)(U,t),className:Lo({view:a},n),wrapperClassName:Lo("table"),headerClassName:Lo("head",g),headerHeight:y,renderHeader:B,itemWrapper:l,items:u,onItemClick:A,itemClassName:V,itemHeight:c,loaderHeight:c,renderItem:H,itemKey:h,alwaysShowActiveItem:v,activeItemIndex:p,selectedItemKey:m,canFetchMore:R,isFetchingMore:O,fetchMore:I,onWrapperScroll:M,scrollRef:L})}var Vo=(0,a.A)("node-name");function Yo(e){var t=e.node,n=e.className,r=(0,k.jsx)("span",{title:t.title,children:t.label});return t.url&&(r=(0,k.jsxs)(Ge.N,{href:t.url,title:t.title,target:"_blank",children:[t.label,"in"===t.type||"out"===t.type&&(0,k.jsx)(b.E,{color:"secondary",children:" (".concat(t.type,")")})]})),(0,k.jsxs)("span",{className:Vo("name",n),children:[r,(0,on.lt)(t)&&(0,k.jsx)(et.A,{className:Vo("operation-node-info"),tooltipContentClassName:Vo("operation-node-info-popup"),content:(0,k.jsx)(rn.A,(0,$.A)({},t)),hasArrow:!1,placement:["right","left"],delayOpening:300,children:(0,k.jsx)(w.I,{className:Vo("icon"),data:an.A,size:12})})]})}const Wo=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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"})}))},Go=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 Ko=(0,a.A)("timeline"),Xo=(0,k.jsx)(w.I,{data:Go,size:14}),Qo=(0,k.jsx)(w.I,{data:Wo,size:14}),Jo=(0,k.jsx)(w.I,{data:function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 Zo(e){var t=e.onRulerUpdate,n=e.from,r=e.to,i=e.disabled,o=void 0!==i&&i;return(0,k.jsx)(A.$,{view:"flat",title:"Set timeline scale",size:"s",onClick:function(){t({from:n,to:r})},disabled:o,children:Jo})}function ea(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,k.jsx)("span",{title:s,children:(0,k.jsx)(A.$,{view:"flat",title:i?a:o,size:"s",onClick:r,disabled:n,children:i?Xo:Qo})})}function ta(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,k.jsx)("span",{className:Ko("row-status"),children:(0,k.jsx)(b.E,{color:"secondary",children:"in"===n.type||"out"===n.type?"-":(0,k.jsx)(na,{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,k.jsx)("div",{className:Ko("event-name"),title:r,children:r}):(0,k.jsx)("div",{className:Ko("aside-item",{expanded:o}),children:(0,k.jsx)(Yo,{node:a,className:Ko("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,k.jsxs)("div",{children:[(0,k.jsx)(Zo,{onRulerUpdate:r,from:a,to:s}),l&&u&&i?(0,k.jsx)(ea,{onClick:function(){return i(u)},isExpanded:o}):null]})}}]}function na(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,k.jsxs)("span",{className:Ko("node-status"),children:[(0,k.jsx)(ra,{state:r,progress:n}),(0,k.jsx)("span",{children:"InProgress"===r?"".concat(on.Ie[r].title,": ").concat(u,"%"):on.Ie[r].title})]})}function ra(e){var t=e.state,n=e.progress,r=nn();return"InProgress"===t?(0,k.jsx)("img",{className:Ko("node-status-icon"),src:(0,on.$u)(n,r)}):(0,k.jsx)("div",{className:Ko("node-status-icon",{state:t.toLowerCase()})})}function ia(e){var t,n,r,i,o,a;return(0,k.jsx)("div",{className:Ko("aside-header"),children:(0,k.jsx)(Ho,{columns:ta({controlsHeader:(n=e.onRulerUpdate,r=e.onExpandAll,i=e.isSomeAxesCollapsed,o=e.tableItems,a=o.some((function(e){return e.isExpandable})),(0,k.jsxs)("div",{children:[(0,k.jsx)(Zo,{onRulerUpdate:n}),(0,k.jsx)(ea,{onClick:r,disabled:0===o.length||!a,isExpanded:!i,isCommonButton:!0})]})),nameHeader:(t=e.blocksQuantity,(0,k.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:Ko("table-row"),rowHeight:25,headerHeight:27,className:Ko("table"),onWrapperScroll:e.onSidebarScroll,scrollRef:e.sidebarRef})})}var oa=n(34108),aa=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},sa=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},ua=function(e){return 255*(e>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e)},la=96.422,ca=82.521,da=216/24389,fa=24389/27,ha=function(e){var t=function(e){var t=sa(e.r),n=sa(e.g),r=sa(e.b);return function(e){return{x:aa(e.x,0,la),y:aa(e.y,0,100),z:aa(e.z,0,ca),a:aa(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/la,r=t.y/100,i=t.z/ca;return n=n>da?Math.cbrt(n):(fa*n+16)/116,{l:116*(r=r>da?Math.cbrt(r):(fa*r+16)/116)-16,a:500*(n-r),b:200*(r-(i=i>da?Math.cbrt(i):(fa*i+16)/116)),alpha:t.a}},va=n(72617),pa=n.n(va),ma=n(81713),ga=n.n(ma),ya=n(63281),xa=n.n(ya),ba=6e4,Aa={NotStarted:"new",Started:"started",InProgress:"running",Finished:"completed",Failed:"failed",Aborted:"aborted"};function wa(e){var t=e.from,n=e.to;return Math.max(n-t,ba)}(0,oa.X$)([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=ha(e),o=ha(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:ua(.032404542*r-.015371385*i-.004985314*o),g:ua(-.00969266*r+.018760108*i+41556e-8*o),b:ua(556434e-9*r-.002040259*i+.010572252*o),a:e.a},{r:aa(n.r,0,255),g:aa(n.g,0,255),b:aa(n.b,0,255),a:aa(n.a)}}({x:(Math.pow(n,3)>da?Math.pow(n,3):(116*n-16)/fa)*la,y:100*(e.l>8?Math.pow((e.l+16)/116,3):e.l/fa),z:(Math.pow(r,3)>da?Math.pow(r,3):(116*r-16)/fa)*ca,a:e.alpha})}({l:aa((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:aa(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 Ea=(0,a.A)("timeline");const _a=function(e){var t=e.graph,n=e.prepareNode,r=(0,Ve.wE)(),a=(0,Qt.i)(),s=nn(),u=o.useState((function(){return new Vt.DataSet})),l=(0,i.A)(u,1)[0],c=o.useState({}),d=(0,i.A)(c,2),f=d[0],h=d[1],v=o.useState(new Set),p=(0,i.A)(v,2),m=p[0],g=p[1],y=o.useState(""),x=(0,i.A)(y,2),b=x[0],A=x[1],w=o.useState(),E=(0,i.A)(w,2),_=E[0],C=E[1],j=(0,on.GE)(l),S=o.useRef(r);S.current=r;var T=o.useRef(n);T.current=n,o.useEffect((function(){l.clear(),l.add(t.nodes),S.current&&(0,on.DW)(l,S.current,T.current,void 0,!1),h({})}),[l,t]),o.useEffect((function(){r&&((0,on.DW)(l,r,T.current,void 0,!1),h({}))}),[l,r]),o.useEffect((function(){"function"==typeof n&&((0,on.ZG)(l,n),h({}))}),[l,n]);var N=o.useMemo((function(){var e,t=Yn()(S.current,(function(e,t){var n=t.startedAt?new Date(t.startedAt).getTime():1/0;return Math.min(n,e)}),1/0),n=l?function(e){var t=e.nodes,n=e.colors,r=e.theme,o=e.queryStartedAtMillis,a=1/0,s=[];t.forEach((function(e){var t,o,u=e.progress,l={id:e.id,label:null!==(t=e.label)&&void 0!==t?t:"",events:[],level:Number(e.level),node:e,isExpandable:!1};if(u){var c="0";"InProgress"===u.state?c=(new Date).toString():u.finishedAt?c=u.finishedAt:u.stages&&Object.keys(u.stages).length>0&&(c=Object.values(u.stages[Object.keys(u.stages).length-1])[0]);var d=null!==(o=u.startedAt)&&void 0!==o?o:"0",f=new Date(d).getTime(),h=new Date(c).getTime(),v=u.state,p=null!=v?v:"NotStarted";a=Math.min(f,a);var m=(0,$.A)((0,$.A)({},l),{},{from:f,to:h,status:p}),g=function(e){var t=e.stages,n=e.axisId,r=e.dataProgressFinishedAt,o=e.dataProgressStartedAt,a=new Date(o).getTime(),s=new Date(r).getTime(),u=[],l=0,c={renderType:"operation",axisId:n,eventsCount:1},d=0;return u.push((0,$.A)((0,$.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:{},v=(0,i.A)(Object.entries(e)[0],2),p=v[0],m=v[1],g=null!==(f=Object.values(h)[0])&&void 0!==f?f:r;0===n&&o!==m&&u.push((0,$.A)((0,$.A)({},c),{},{trackIndex:d++,from:a,to:new Date(m).getTime(),name:"init",id:l++})),u.push((0,$.A)((0,$.A)({},c),{},{trackIndex:d++,from:new Date(m).getTime(),to:new Date(g).getTime(),name:p,id:l++}))})),u}({stages:null==u?void 0:u.stages,dataProgressFinishedAt:c,dataProgressStartedAt:d,axisId:e.id});m.isExpandable=g.length>1;var y=n.operation[Aa[p]],x=n.operation["".concat(Aa[p],"Border")],b=n.operation["".concat(Aa[p],"Background")],A=function(e){var t=e.events,n=e.theme,r=e.eventMajorColor,i=e.operationDuration,o={},a=t.length,s=(0,he.A)(t);s.sort((function(e,t){var n=e.to-e.from;return t.to-t.from-n}));var u=(0,oa.Mj)(r),l=("light"===n?u.tints(a+2):u.tones(a+2)).map((function(e){return e.toHex()}));return t.forEach((function(e){var t=e.to-e.from,n=s.findIndex((function(t){return t.id===e.id}));o[e.trackIndex]={percentage:i>0?t/i:1,color:l[n]}})),o}({theme:r,events:g,eventMajorColor:y,operationDuration:h-f});m.events=g.map((function(e){return(0,$.A)((0,$.A)({},e),{},{colors:A,borderColor:x,backgroundColor:b})})),s.push(m)}else s.push((0,$.A)((0,$.A)({},l),{},{from:1/0,to:0,notStarted:!0,status:"NotStarted"}))}));var u=xa()(s,["level","from"]);if(o!==1/0&&a!==1/0){var l={id:"preparation",from:o,to:a,events:[{eventsCount:1,axisId:"preparation",renderType:"operation",trackIndex:0,from:o,to:a,colors:{0:{percentage:100,color:n.operation[Aa.Finished]}}}],node:{label:"Preparation",progress:{state:"Finished"},id:"preparation",level:0},isExpandable:!1,level:0,status:"Finished",label:"Preparation"};u.unshift(l)}return u}({nodes:l,colors:s,theme:a,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}}),[l,s,a,f]),R=N.axes,O=N.events,I=function(e){var t=o.useState({}),n=(0,i.A)(t,2),r=n[0],a=r.start,s=r.end,u=n[1],l=o.useRef(!1),c=o.useRef(!1),d=o.useMemo((function(){var t,n=pa()(e,"from"),r=null!==(t=ga()(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=wa({from:t,to:n});if(!r||!i)return{start:t,end:t+o};var a=Math.min(wa({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:a,to:s,queryStart:d.queryStart,queryEnd:d.queryEnd}),h=f.start,v=f.end;return!c.current||a||s||(l.current=!l.current),c.current=Boolean(a||s),[{timelineStart:h,timelineEnd:v,timelineRulerKey:"ruler-".concat(l.current)},u]}(R),M=(0,i.A)(I,2),L=M[0],P=L.timelineStart,D=L.timelineEnd,z=L.timelineRulerKey,F=M[1],U=o.useMemo((function(){var e,t=b.toLowerCase().trim(),n=[],r=!1,i=(0,mn.A)(R);try{for(i.s();!(e=i.n()).done;){var o=e.value;if((!t||o.label.toLowerCase().includes(t))&&(!_||o.status===_)){var a=!!o.isExpandable&&m.has(o.id);r||!o.isExpandable||a||(r=!0);var s=a?o.events.length:1;n.push((0,$.A)((0,$.A)({},o),{},{tracksCount:s,isExpanded:a}))}}}catch(e){i.e(e)}finally{i.f()}return{filteredAxes:n,isSomeAxesCollapsed:r}}),[R,b,_,m]),q=U.filteredAxes,B=U.isSomeAxesCollapsed,H=o.useMemo((function(){var e=0;return q.map((function(t){var n=pr.TRACK_HEIGHT*t.tracksCount,r={id:t.id,top:e,height:n,tracksCount:t.tracksCount};return e+=n,r}))}),[q]),V=o.useRef(null),Y=o.useState(0),W=(0,i.A)(Y,2),G=W[0],K=W[1],X=function(e){var t=e.from,n=e.to;F({start:t,end:n})},Q=o.useMemo((function(){var e=[];return q.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,$.A)((0,$.A)({},n),{},{node:t.node,isEvent:!0}))})))})),e}),[q]);return(0,k.jsxs)("div",{className:Ea(),children:[(0,k.jsxs)("div",{className:Ea("filters"),children:[(0,k.jsx)(Hn.k,{className:Ea("filters-search"),hasClear:!0,value:b,onUpdate:A,placeholder:"Filter by name"}),(0,k.jsx)(Tt.l,{className:Ea("filters-status"),multiple:!1,label:"Status",placeholder:"Select status",value:_?[_]:[],options:j.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){C(e[0])}})]}),(0,k.jsxs)("div",{className:Ea("content-wrapper"),children:[(0,k.jsx)(ia,{tableItems:Q,isSomeAxesCollapsed:B,blocksQuantity:q.length,onExpandAll:function(){if(B){var e=new Set(R.filter((function(e){return e.isExpandable})).map((function(e){return e.id})));g(e)}else g(new Set)},onSidebarScroll:function(){V.current&&K(V.current.scrollTop)},onRulerUpdate:X,sidebarRef:V,onExpandAxis:function(e){var t=new Set(m);t.has(e)?t.delete(e):t.add(e),g(t)}}),P&&D&&(0,k.jsxs)("div",{className:Ea("container"),children:[(0,k.jsx)("div",{className:Ea("ruler-wrapper"),children:(0,k.jsx)(Wn.Kf,{from:P,to:D,onUpdate:X,hasPicker:!1,hasDatePicker:!1,hasRulerNowButton:!1,minRange:ba},z)}),Boolean(H.length)&&(0,k.jsx)(ho,{className:Ea("timeline"),canvasScrollTop:G,scrollTopChanged:function(e){V.current&&(V.current.scrollTop=e.detail.scrollTop)},start:P,end:D,boundsChanged:function(e){X({from:e.detail.start,to:e.detail.end})},axes:H,events:O,theme:a})]})]})]})};var Ca=(0,n(33882).A)(o.lazy((function(){return Promise.all([n.e(8096),n.e(8392)]).then(n.bind(n,1870))}))),ja=n(66026),ka=(0,a.A)("plan");const Sa=o.memo((function(e){var t=e.isActive,n=e.className,r=e.prepareNode,a=(0,Ve.oy)(),s=o.useState(!1),l=(0,i.A)(s,2),c=l[0],d=l[1],f=(0,Ve.gi)(),h=(0,u.d4)(ja.st),v=o.useMemo((function(){return a?(0,on.vk)(a):void 0}),[a]);if(!v)return null;var p=v.nodes.length>250;return(0,k.jsx)("div",{className:ka(null,n),children:(0,k.jsxs)(en,{children:[(0,k.jsx)(He,{hide:"graph"!==f,className:ka("graph"),children:p&&!c?(0,k.jsx)(Ta,{showGraph:d,graph:v}):(0,k.jsx)(k.Fragment,{children:h?(0,k.jsx)(Ca,{processedGraph:v}):(0,k.jsx)(Bn,{isActive:t&&"graph"===f,graph:v,showMinimap:!0,prepareNode:r})})}),(0,k.jsx)(He,{hide:"timeline"!==f,className:ka("table"),children:(0,k.jsx)(_a,{graph:v,prepareNode:r})})]})})}));function Ta(e){var t=e.showGraph,n=e.graph,r=(0,Ve.wE)(),a=o.useState((function(){return new Vt.DataSet})),s=(0,i.A)(a,1)[0],u=Ht(),l=o.useRef(r);l.current=r,o.useEffect((function(){s.clear(),s.add(n.nodes),l.current&&(0,on.DW)(s,l.current),u()}),[s,n,u]),o.useEffect((function(){r&&((0,on.DW)(s,r),u())}),[s,r,u]);var c=n.nodes.length>700||n.edges.length>3e3;return(0,k.jsxs)("div",{className:ka("graph-info"),children:[c?(0,k.jsxs)(b.E,{children:["The plan of this operation is way too large to be visualized in browser.",(0,k.jsx)("br",{}),"It has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges.")]}):(0,k.jsxs)(b.E,{children:["The operation's plan is quite large, it has ".concat(n.nodes.length," nodes and ").concat(n.edges.length," edges."),(0,k.jsx)("br",{}),"It could take a lot of time to draw."]}),(0,k.jsx)("br",{}),(0,k.jsx)(A.$,{className:ka("graph-info-button"),onClick:function(){t(!0)},children:c?"I understand it might freeze my browser, draw the plan anyway":"Draw the plan anyway"}),(0,k.jsx)(ln,{nodes:s,orientation:"vertical",className:ka("legend")})]})}var Na=n(2722);function Ra(){Ra=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,Na.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,N.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)},Ra.apply(this,arguments)}var Oa=n(85593),Ia=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)},Ma=function(e){var t=e.isActive,n=e.operationIdToCluster,r=(0,o.useCallback)((function(e){var t;if("in"===e.type||"out"===e.type){var r,i=function(e){var t=Ra(/^(?:(\w+|`[^`]+`)\.\s*)?`(\/*)([^`]+)`(?::`?([\w-]+)`?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||Ra(/^(?:(\w+|\[[^\]]+\])\.\s*)?\[(\/*)([^\]]+)\](?::\[?([\w-]+)\]?)?/,{cluster:1,openingSlash:2,tablePath:3,view:4}).exec(e)||Ra(/^(['"])(\/\/)([^`]+)\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 Ne.A.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,Oa.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 Ia(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=Ia(u,s))}return e}),[n]);return(0,k.jsx)(Sa,{isActive:t,prepareNode:r})},La=n(75299);const Pa=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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"})}))},Da=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 za=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e,r=0,o=[];Array.isArray(n.inner_errors)&&1===n.inner_errors.length;)n=(0,i.A)(n.inner_errors,1)[0],o.unshift(n),r+=1;return{issue:o[t],length:r-t}},$a=n(78466),Fa=(0,a.A)("yt-error-cloud"),Ua=function(e){var t=e.error,n=e.level,r=e.disableCloud,a=e.onErrorClick,s=e.onShowParent,u=e.fromCloud,l=(0,La.A)(e.initialExpanded),c=(0,i.A)(l,2),d=c[0],f=c[1],h=(0,o.useState)(0),v=(0,i.A)(h,2),p=v[0],m=v[1],g=(0,o.useCallback)((function(){m((function(e){return e+1}))}),[]),y=(0,o.useCallback)((function(){m(za(t).length)}),[t]),x=za(t,p);return!r&&x.length>1?(0,k.jsxs)("div",{children:[(0,k.jsxs)("div",{className:Fa("collapsed-messages"),children:[(0,k.jsx)($a.L,{expanded:d,toggleExpanded:f}),(0,k.jsxs)(b.E,{color:"secondary",children:[x.length," intermediate messages"]}),(0,k.jsx)(at.S,{className:Fa("collapsed-messages-show-all"),onClick:y,children:"Show all"})]}),d&&(0,k.jsx)("div",{className:Fa("errors"),children:(0,k.jsx)(Ba,{errors:[(0,$.A)({},x.issue)],level:n+1,expanded:d,disableCloud:!0,onErrorClick:a,onShowParent:g,fromCloud:!0})})]}):(0,k.jsx)(Wa,{error:t,level:n,expanded:d,fromCloud:u,disableCloud:!0,onErrorClick:a,onShowParent:s})},qa=function(e){return"Info"===e.attributes.severity},Ba=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,k.jsx)("div",{children:t.map((function(e,u){return(0,k.jsx)(Ua,{level:n,disableCloud:s&&!(t.length>1),error:e,initialExpanded:!qa(e)&&r,onErrorClick:i,onShowParent:o,fromCloud:a},u)}))})},Ha=n(73032);const Va=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 Ya=(0,a.A)("yt-error-tree-node"),Wa=function(e){var t=e.error,n=e.expanded,r=void 0!==n&&n,a=e.level,s=void 0===a?0:a,u=e.fromCloud,l=void 0!==u&&u,c=e.disableCloud,d=void 0!==c&&c,f=e.onErrorClick,h=e.onShowParent,v=(0,La.A)(r),p=(0,i.A)(v,2),m=p[0],g=p[1],y=(0,La.A)(!1),x=(0,i.A)(y,2),b=x[0],E=x[1],_=t.inner_errors&&t.inner_errors.length>0,C=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),j=qa(t),S=(0,o.useCallback)((function(){var e;null!==(e=t.attributes)&&void 0!==e&&e.start_position&&f(t.attributes.start_position)}),[t.attributes.start_position,f]);return(0,k.jsxs)("div",{className:Ya({leaf:!_,info:j}),children:[(0,k.jsxs)("div",{className:Ya("error-body"),children:[(0,k.jsxs)("div",{className:Ya("line"),children:[_&&(0,k.jsx)($a.L,{expanded:m,toggleExpanded:g}),l&&(0,k.jsx)(A.$,{view:"flat-secondary",title:"Show parent",onClick:h,children:(0,k.jsx)(w.I,{data:Pa,size:16})}),(0,k.jsxs)("span",{className:Ya("header"),children:[(0,k.jsx)(w.I,{className:Ya("icon"),data:j?Da:Va,size:16}),(0,k.jsx)("span",{className:Ya("title"),children:j?"Info":"Error"}),(0,k.jsxs)(A.$,{view:"flat-secondary",onClick:E,children:["Attributes"," ",(0,k.jsx)(w.I,{data:b?Go:Wo,size:16})]}),C&&(0,k.jsx)("span",{className:Ya("place-text"),title:"Position",children:C})]}),C?(0,k.jsx)(at.S,{className:Ya("message"),color:"primary",onClick:S,children:(0,k.jsx)(Ha.H,{value:t.message})}):(0,k.jsx)("span",{className:Ya("message"),children:(0,k.jsx)(Ha.H,{value:t.message})}),t.code?(0,k.jsxs)("span",{className:Ya("code"),children:["Code: ",t.code]}):null]}),b&&(0,k.jsx)(R.A,{value:t.attributes,settings:Ae.A.prepareSettings({})})]}),_&&m&&(0,k.jsx)("div",{className:Ya("errors"),children:(0,k.jsx)(Ba,{errors:t.inner_errors,level:s+1,expanded:m,disableCloud:d,onErrorClick:f})})]})},Ga=n(19904),Ka=n(77720),Xa=function(e){var t=e.rootError,n=(0,Ga.d)().getEditor,r=(0,o.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 Ka.yX(t,r))}),[n]),i=(0,o.useMemo)((function(){return JSON.stringify(t,null,4)}),[t]);return t?(0,k.jsxs)("div",{children:[(0,k.jsx)(b.E,{variant:"subheader-3",children:"Query error"})," ",(0,k.jsx)(I.A,{title:"Copy error",view:"flat-secondary",text:i,size:"l"}),(0,k.jsx)(Wa,{error:t,onErrorClick:r,expanded:!0})]}):null},Qa=n(88786),Ja=n(65873),Za=n(30996),es=function(e){var t=e.query,n=[Za.d.SPYT,Za.d.CHYT].includes(t.engine),r=[ie.RE.RUNNING,ie.RE.COMPLETING].includes(t.state);if(!n||!r)return null;var i=function(e){if(!e)return 0;if(e.spyt_progress)return Math.round(100*e.spyt_progress);if(e.total_progress){var t=e.total_progress,n=t.read_bytes,r=t.total_bytes_to_read;return r>0?Math.round(n/(r/100)):0}return 0}(t.progress);return(0,k.jsx)(Qa.m,{content:"".concat(i,"%"),children:(0,k.jsx)("div",{children:(0,k.jsx)(Ja.k,{theme:"info",size:"xs",value:i})})})},ts=(0,a.A)("query-results"),ns=o.memo((function(e){var t,n,r,a=e.query,s=e.className,l=e.toolbar,c=e.minimized,d=void 0!==c&&c,f=function(e){var t=(0,o.useState)(!1),n=(0,i.A)(t,2),r=n[0],a=n[1],s=(0,o.useState)(Pe.META),l=(0,i.A)(s,2),c=l[0],d=l[1],f=(0,o.useState)(void 0),h=(0,i.A)(f,2),v=h[0],m=h[1],g=(0,u.wA)(),y=(0,u.d4)((function(t){return(0,U.t_)(t,(null==e?void 0:e.id)||"")})),x=(0,o.useMemo)((function(){return c===Pe.RESULT?De((null==v?void 0:v.resultIndex)||0):c}),[c,v]),b=(0,o.useCallback)((function(e,t){if(function(e){return e.startsWith("result/")}(e)){d(Pe.RESULT);var n=t||(null==v?void 0:v.queryId);m(n?{queryId:n,resultIndex:ze(e)||0}:void 0)}else d(e),m(void 0)}),[v]),A=(0,o.useMemo)((function(){var t,n;if(!e)return[];var r=[];e.state===ie.RE.FAILED&&r.push({id:Pe.ERROR,title:"Error"}),e.state===ie.RE.COMPLETED&&r.push.apply(r,(0,he.A)(pe()(e.result_count,(function(t){var n;return y&&y[t]&&ge()(y[t],"error")&&(n=(0,k.jsx)(_.g,{status:ie.RE.FAILED,className:"query-status_tabs"})),{id:De(t),title:1===e.result_count?"Result":"Result #".concat(t+1),icon:n}}))));var i=!(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&&!i&&r.push({id:Pe.PROGRESS,title:"Progress"}),e.state===ie.RE.COMPLETED){var o,a=Le.Ay.getQueryResultChartTab();a&&e.result_count&&r.push({id:Pe.CHART_TAB,title:a.title}),null!==(o=e.progress)&&void 0!==o&&o.yql_statistics&&r.push({id:Pe.STATISTIC,title:"Statistics"})}return r.push({id:Pe.META,title:"Meta"}),r}),[e,y]),w=xe()(ie.GU,(function(t){return(null==e?void 0:e.state)===t}));return(0,o.useEffect)((function(){var t;e&&g(function(e){return function(){var t=(0,W.A)(Z().mark((function t(n,r){var i,o,a,s,u,l;return Z().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,U.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,ke.fI)(n((0,ie.B_)(e.id,a)),{toasterName:"load_query_results",skipSuccessToast:!0,errorTitle:"Failed to load query results meta"});case 11:u=t.sent,l={},Oe()(u,(function(e,t){var n=e.output,r=e.error||(null==n?void 0:n.error);r&&(l[t]={error:r,state:B.t.Error,resultReady:!1})})),n({type:p.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)),b(null==A||null===(t=A[0])||void 0===t?void 0:t.id,null==e?void 0:e.id)}),[g,null==e?void 0:e.id,w]),(0,o.useEffect)((function(){var t=A.some((function(e){return e.id===Pe.PROGRESS}));t&&(null==e?void 0:e.state)===ie.RE.RUNNING&&!r&&(a(!0),d(Pe.PROGRESS))}),[r,null==e?void 0:e.state,A]),[A,b,{activeTabId:x,category:c,activeResultParams:v}]}(a),h=(0,i.A)(f,3),v=h[0],m=h[1],g=h[2],y=g.activeTabId,b=g.category,A=g.activeResultParams,w=o.useMemo((function(){var e,t,n;return t=null==a||null===(e=a.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,N.A)(t[r])&&null!==t[r]&&e(t[r])}(t),n):n}),[null==a||null===(t=a.progress)||void 0===t?void 0:t.yql_statistics]);if(!a)return null;var E=null==A?void 0:A.resultIndex;return(0,k.jsxs)("div",{className:ts(null,s),children:[(0,k.jsxs)("div",{className:ts("meta"),children:[(0,k.jsx)(T,{className:ts("meta-info"),query:a}),(0,k.jsx)("div",{className:ts("toolbar"),children:l})]}),(0,k.jsx)(es,{query:a}),(0,k.jsx)(He,{className:ts("result",{minimized:d}),hide:d,children:(0,k.jsxs)(Ve.rk,{plan:null===(n=a.progress)||void 0===n?void 0:n.yql_plan,progress:null===(r=a.progress)||void 0===r?void 0:r.yql_progress,defaultView:"graph",children:[(0,k.jsxs)("div",{className:ts("header"),children:[(0,k.jsx)(x.t,{className:ts("tabs"),items:v,activeTab:y,onSelectTab:function(e){return m(e,null==a?void 0:a.id)}}),b===Pe.RESULT&&Number.isInteger(E)&&(0,k.jsx)("div",{className:ts("tab_actions"),children:(0,k.jsx)(fe,{query:a,resultIndex:null!=E?E:0})}),b===Pe.PROGRESS&&(0,k.jsx)(Ye,{})]}),(0,k.jsxs)("div",{className:ts("content"),children:[(0,k.jsx)(He,{hide:b!==Pe.RESULT&&!Number.isInteger(E),className:ts("result-wrap"),children:(0,k.jsx)(Ut,{query:a,activeResultParams:A})}),(0,k.jsx)(He,{hide:b!==Pe.CHART_TAB,className:ts("result-wrap"),children:(0,k.jsx)(qt,{query:a})}),b===Pe.ERROR&&(0,k.jsx)(Xa,{rootError:a.error}),b===Pe.META&&(0,k.jsx)(z,{query:a}),(0,k.jsx)(He,{hide:b!==Pe.STATISTIC,children:(0,k.jsx)(Fe,{})}),b===Pe.PROGRESS&&(0,k.jsx)(Ma,{isActive:!0,operationIdToCluster:w})]})]})}),(0,k.jsx)("div",{})]})})),rs=n(78894),is=n(55695);const os=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 as=(0,a.A)("query-share-button"),ss=new rs.I,us=function(){var e=(0,u.wA)(),t=(0,o.useState)(!1),n=(0,i.A)(t,2),r=n[0],a=n[1],s=(0,La.A)(!1),c=(0,i.A)(s,2),d=c[0],h=c[1],v=(0,u.d4)(f.wJ),p=(0,u.d4)(l.Ry).includes(l.PH),m=(0,o.useCallback)((0,W.A)(Z().mark((function t(){return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a(!0),t.next=4,e((0,j.sR)());case 4:return t.prev=4,a(!1),t.finish(4);case 7:case"end":return t.stop()}}),t,null,[[0,,4,7]])}))),[e]),g=(0,o.useCallback)((0,W.A)(Z().mark((function e(){return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(navigator.clipboard.writeText(window.location.href),p){e.next=4;break}return e.next=4,m();case 4:ss.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:m}]});case 5:case"end":return e.stop()}}),e)}))),[m,p]);return v?(0,k.jsxs)("div",{className:as(),children:[(0,k.jsxs)(A.$,{onClick:g,view:p?"flat-info":"flat",pin:p?"round-brick":void 0,selected:p,loading:r,children:[(0,k.jsx)(w.I,{data:os,width:16})," ",p?"Shared":"Share"]}),p&&(0,k.jsx)(is.r,{renderSwitcher:function(e){return(0,k.jsx)(A.$,(0,$.A)((0,$.A)({},e),{},{view:"flat",selected:!0,pin:"brick-round",children:(0,k.jsx)(w.I,{size:16,data:d?Go:Wo})}))},onSwitcherClick:h,items:[{action:m,text:"Unpublish query"}]})]}):null},ls=n(20361),cs=n(27117),ds=n(9395),fs=function(e){var t=e.query_id,n=(0,u.wA)(),r=(0,u.d4)(f.EO),a=(0,m.t)(),s=a.selectACOOptions,l=a.changeCurrentQueryACO,c=a.currentQueryACO,d=(0,o.useState)(void 0),h=(0,i.A)(d,2),v=h[0],p=h[1],g=(0,La.A)(!1),y=(0,i.A)(g,2),x=y[0],b=y[1],E=function(){var e=(0,W.A)(Z().mark((function e(r){return Z().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,ds.et)());case 5:e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(0),p(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,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(A.$,{view:"flat",onClick:b,children:[(0,k.jsx)(w.I,{data:cs.A,size:16})," Edit ACO"]}),x&&(0,k.jsx)(ls.yZ,{pristineSubmittable:!0,visible:x,modal:!0,headerProps:{title:"Edit query ACO"},footerProps:{textApply:"Update"},onClose:function(){p(void 0),b()},onAdd:function(e){return E(e.getState().values)},initialValues:{aco:c},fields:[{name:"aco",type:"select",required:!0,extras:{options:s,placeholder:"ACO",width:"max",filterable:!0,multiple:r}}].concat((0,he.A)((0,ls.Y)([v])))})]})},hs=n(28099);const vs=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,k.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 ps=(0,a.A)("yt-qt-result-view"),ms=(0,o.memo)((function(e){var t=e.query,n=e.resultViewMode,r=e.setResultViewMode;return(0,k.jsx)(ns,{query:t,className:ps(),minimized:"minimized"===n,toolbar:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(We.s,{gap:2,className:ps("results-toolbar-buttons"),children:[(0,k.jsx)(us,{}),(0,k.jsx)(fs,{query_id:t.id})]}),"split"===n?(0,k.jsx)(A.$,{view:"flat",onClick:function(){return r("full")},children:(0,k.jsx)(w.I,{data:hs.A,size:16})}):(0,k.jsx)(A.$,{view:"flat",onClick:function(){return r("split")},children:(0,k.jsx)(w.I,{data:vs,size:16})}),"minimized"!==n&&(0,k.jsx)(A.$,{view:"flat",onClick:function(){return r("minimized")},children:(0,k.jsx)(w.I,{data:sn.A,size:16})})]})})}));const gs=function(e){return(0,k.jsx)("svg",(0,$.A)((0,$.A)({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 11 12"},e),{},{children:(0,k.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"})}))};function ys(e){return e.filter((function(e){return("string"==typeof e?e:e.value)!==l.PH}))}var xs=function(){var e=(0,u.d4)(f.EO),t=(0,m.t)(),n=t.selectACOOptions,r=t.isFlight,i=t.changeDraftQueryACO,a=t.currentDraftQueryACO,s=(0,o.useCallback)((function(e){return i({aco:e})}),[i]);return(0,k.jsx)(k.Fragment,{children:(0,k.jsx)(Tt.l,{filterable:!0,disabled:r,width:"auto",label:"Access:",className:"query-aco-select",options:ys(n),value:ys(a),onUpdate:s,multiple:e})})},bs=n(94383),As=n(76866),ws=n(80016),Es=n(73689),_s=function(e){switch(e){case Za.d.CHYT:return Es.m.CHYT;case Za.d.SPYT:return Es.m.SPYT;case Za.d.YT_QL:return Es.m.YTQL;default:return Es.m.YQL}},Cs=n(57436),js=function(){function e(t){(0,G.A)(this,e),this.editor=void 0,this.collection=void 0,this.editor=t,this.collection=this.editor.createDecorationsCollection([])}return(0,K.A)(e,[{key:"clearDecorations",value:function(){this.collection.clear()}}]),e}(),ks=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(e,r,i){var o;return(0,G.A)(this,n),(o=t.call(this,e)).links=void 0,o.engine=void 0,o.commandKey=void 0,o.engine=r,o.commandKey=i,o.links=[],o}return(0,K.A)(n,[{key:"setEngine",value:function(e){this.engine=e}},{key:"updateLinks",value:function(){var e=this.editor.getModel();if(e){var t=e.getLineCount();if(t){for(var n=[],r=[],i=1;i<=t;i++){var o=e.getLineContent(i),a=(0,Cs.$)(o,this.engine),s=a.path,u=a.cluster,l=a.position;s&&(n.push({path:s,line:i,position:l,cluster:u}),r.push({range:new Ka.Q6(i,l.start,i,l.end),options:{hoverMessage:{value:"Follow link (".concat(this.commandKey," + click)")}}}))}At()(n,this.links)||(this.clearDecorations(),this.collection.set(r),this.links=n)}}}},{key:"findLink",value:function(e){var t=e.lineNumber,n=e.column;if(this.editor.getModel())return this.links.find((function(e){var r=e.position,i=r.start,o=r.end,a=e.line;return t===a&&n>=i&&n<=o}))}}]),n}(js),Ss=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"setActiveLine",value:function(e){if(e){var t=this.editor.getModel();t&&(this.clearDecorations(),this.collection.set([{range:new Ka.Q6(e,1,e,t.getLineLength(e)+1),options:{isWholeLine:!0,className:"yt-monaco-editor__highlighted-line"}}]),this.editor.setSelection(new Ka.LN(0,0,0,0)))}else this.clearLines()}},{key:"clearLines",value:function(){this.editor.setSelection(new Ka.LN(0,0,0,0)),this.clearDecorations()}}]),n}(js),Ts=function(e){(0,X.A)(n,e);var t=(0,Q.A)(n);function n(){return(0,G.A)(this,n),t.apply(this,arguments)}return(0,K.A)(n,[{key:"setErrors",value:function(e,t){var n=this.editor.getModel();if(n){var r=[],i=[],o=new Set;e.forEach((function(e){var n=e.attributes,a=e.message,s=new Ka.Q6(n.start_position.row,n.start_position.column,n.end_position.row,n.end_position.column),u=s.startLineNumber,l=s.startColumn,c=s.endLineNumber,d=s.endColumn,f={message:a,severity:Ka.cj.Error,startLineNumber:u,startColumn:l,endLineNumber:c,endColumn:d};r.push(f),o.has(s.startLineNumber)||(i.push({range:s,options:{isWholeLine:!0,className:t}}),o.add(s.startLineNumber))})),this.clearDecorations(),this.collection.set(i),Ka.EN.setModelMarkers(n,"query-tracker",r)}}}]),n}(js),Ns=n(56447),Rs=(0,a.A)("yq-query-editor-monaco"),Os=function(){var e=(0,o.useState)(!1),t=(0,i.A)(e,2),n=t[0],r=t[1],a=(0,o.useRef)(),s=(0,Ga.d)().setEditor,c=(0,u.d4)(l.Ux),d=(0,u.d4)(l.AC),f=(0,u.d4)(l.Q4),h=(0,u.d4)(l.ln),v=(0,u.d4)(l.Fn),p=(0,u.d4)(l.hS),m=(0,u.wA)(),g=(0,o.useRef)({isInitialized:!1,linkDecorator:null,lineDecorator:null,errorDecorator:null});!function(e){var t=(0,u.d4)(bs.RR);(0,o.useEffect)((function(){var e;null===(e=Le.Ay.getInlineSuggestionsApi())||void 0===e||e.sendTelemetry(t?"enabled":"disabled")}),[t]);var n=(0,o.useCallback)((function(n){var r;"Escape"===n.key&&e&&t&&(null===(r=Le.Ay.getInlineSuggestionsApi())||void 0===r||r.sendTelemetry("discarded"))}),[e]);(0,o.useEffect)((function(){Ka.EN.registerCommand("accessQuerySuggestionsTelemetry",(0,W.A)(Z().mark((function e(){var t;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===(t=Le.Ay.getInlineSuggestionsApi())||void 0===t||t.sendTelemetry("accepted");case 1:case"end":return e.stop()}}),e)}))))}),[]),(0,o.useEffect)((function(){return document.addEventListener("keydown",n,!0),function(){document.removeEventListener("keydown",n,!0)}}),[n,e])}(a.current),(0,o.useEffect)((function(){var e,t;null===(e=a.current)||void 0===e||e.focus(),null===(t=a.current)||void 0===t||t.setScrollTop(0)}),[c]),(0,o.useEffect)((function(){a.current&&(s("queryEditor",a.current),g.current.isInitialized||(g.current={isInitialized:!0,linkDecorator:new ks(a.current,h,gr()?"meta":"ctrl"),lineDecorator:new Ss(a.current),errorDecorator:new Ts(a.current)}))}),[s]),(0,o.useEffect)((function(){var e;null===(e=g.current.linkDecorator)||void 0===e||e.updateLinks()}),[d,f]),(0,o.useEffect)((function(){var e;null===(e=g.current.linkDecorator)||void 0===e||e.setEngine(h)}),[h]),(0,o.useEffect)((function(){var e;null===(e=g.current.errorDecorator)||void 0===e||e.setErrors(v,Rs("error-line"));var t,r=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}();p||!r||n||null===(t=g.current.lineDecorator)||void 0===t||t.setActiveLine(r)}),[n,v,p]);var y=(0,o.useMemo)((function(){return function(e){return{fontSize:14,language:e,renderWhitespace:"boundary",minimap:{enabled:!0},inlineSuggest:{enabled:!0,showToolbar:"always",mode:"subword",keepOnBlur:!0}}}(h)}),[h]),x=(0,o.useCallback)((function(e){var t=e.element.dataset.number;if(t){var n;null===(n=g.current.lineDecorator)||void 0===n||n.setActiveLine(parseInt(t,10));var r=new URL(window.location.href);r.hash="#L".concat(t),window.history.pushState(null,"",r.toString())}else{var i;null===(i=g.current.lineDecorator)||void 0===i||i.clearLines()}}),[]),b=(0,o.useCallback)((function(e){var t,n=null===(t=g.current.linkDecorator)||void 0===t?void 0:t.findLink(e);n&&m((0,Ns.in)(n.path,n.cluster))}),[m]),A=(0,o.useCallback)((function(e){var t=e.target,n=e.event;t.type===Ka.EN.MouseTargetType.GUTTER_LINE_NUMBERS&&x(t),t.type===Ka.EN.MouseTargetType.CONTENT_TEXT&&yr(n)&&b(t.position)}),[x,b]),w=(0,o.useCallback)((function(e){r(!0),m((0,j.Bn)({query:e,error:void 0}))}),[m]);return(0,k.jsx)(ws.w,{children:(0,k.jsx)(As.A,{editorRef:a,value:d||"",language:_s(h),className:Rs(),onChange:w,onClick:A,monacoConfig:y})})},Is=(0,a.A)("yt-qt-query-editor-view"),Ms=(0,o.memo)((function(e){var t=e.onStartQuery,n=(0,o.useRef)(),r=(0,Ga.d)().setEditor,i=(0,u.d4)(l.Ux),a=(0,u.d4)(l.ln),s=(0,u.d4)(f.d),c=(0,u.wA)(),d=(0,o.useCallback)((function(){c((0,j.GB)(t))}),[c,t]);(0,o.useEffect)((function(){var e,t;null===(e=n.current)||void 0===e||e.focus(),null===(t=n.current)||void 0===t||t.setScrollTop(0)}),[i]),(0,o.useEffect)((function(){n.current&&r("queryEditor",n.current)}),[r]),(0,o.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(),d())};return document.addEventListener("keydown",e,!0),function(){document.removeEventListener("keydown",e,!0)}}),[d]);var h=(0,o.useCallback)((function(){c((0,j.GB)(t,{execution_mode:"validate"}))}),[c,t]),v=(0,o.useCallback)((function(){c((0,j.GB)(t,{execution_mode:"optimize"}))}),[c,t]);return(0,k.jsxs)("div",{className:Is(),children:[(0,k.jsx)(Os,{}),(0,k.jsx)("div",{className:Is("actions"),children:(0,k.jsxs)("div",{className:"query-run-action",children:[(0,k.jsxs)(A.$,{qa:"qt-run",view:"action",onClick:d,children:[(0,k.jsx)(w.I,{data:gs}),"Run"]}),a===Za.d.YQL?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(A.$,{qa:"qt-validate",onClick:h,children:"Validate"}),(0,k.jsx)(A.$,{qa:"qt-explain",onClick:v,children:"Explain"})]}):null,s&&(0,k.jsx)(xs,{})]})})]})})),Ls=(0,a.A)("query-container"),Ps=function(e){var t=e.onStartQuery,n=e.showStatusInTitle,a=(0,u.wA)(),x=function(){var e=(0,u.d4)(l.st),t=(0,u.d4)(f.B8),n=(0,o.useContext)(d.o),r=(0,u.wA)(),a=(0,o.useMemo)((function(){return function(e){var n=(0,i.A)(e,1)[0];r({type:p.JJ,data:(0,v.n)(n,t)})}}),[r,t]);return(0,o.useEffect)((function(){if(n&&e&&(0,h.KO)(e))return n.watch([e],a)}),[n,e,a]),e}(),b=(0,m.t)().isQueryTrackerInfoLoading,A=(0,o.useState)("minimized"),w=(0,i.A)(A,2),E=w[0],_=w[1],C=(0,o.useState)([50,50]),j=(0,i.A)(C,2),S=j[0],T=j[1];(0,o.useEffect)((function(){var e,t;if(x&&n){var r=x.start_time?g.A.format.DateTime(x.start_time,{format:"short"}):"",i=(null===(e=x.annotations)||void 0===e?void 0:e.title)||"",o=(null===(t=x.state)||void 0===t?void 0:t.toUpperCase())||"";(r||i||o)&&a((0,y.ar)({path:"".concat(i," ").concat(o," ").concat(r," @ ").concat(x.engine)}))}}),[a,x,n]),(0,o.useEffect)((function(){_("split")}),[null==x?void 0:x.id]);var N=(0,u.d4)(l.Kv),R=(0,u.d4)(l.hS),O=b||R;return(0,k.jsxs)(k.Fragment,{children:[O&&(0,k.jsx)("div",{className:Ls("loading"),children:(0,k.jsx)(s.a,{})}),(0,k.jsxs)(c.A,{className:Ls((0,r.A)({},E,!0)),direction:c.A.VERTICAL,onResizeEnd:T,getInitialSizes:function(){return S},children:["full"!==E&&(0,k.jsx)(Ms,{onStartQuery:t}),(null==x?void 0:x.id)&&N&&(0,k.jsx)(ms,{query:x,setResultViewMode:_,resultViewMode:E})]})]})}},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(11229),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,k=(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]),S=(0,i.useCallback)((function(e){var t=e;C(t),j?A(!0):k(t)}),[j,k]),T=(0,i.useCallback)((function(){C(void 0),A(!1)}),[]),N=(0,i.useCallback)((function(){C(void 0),_&&k(_),A(!1)}),[_,k]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.A,{className:t,size:"l",value:p.engine,onUpdate:S,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:T,onConfirm:N,onOutsideClick:T})]})}var p=n(59700),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})}},85874:(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),k=(0,a.A)("file-item-form"),S=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:k(null,l),children:[(0,v.jsxs)("div",{className:k(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:k("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})})]})]})},T=(0,a.A)("files-add-form"),N=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:T(),children:[n&&(0,v.jsx)(S,{file:{name:"",content:"",type:r,id:(0,A.A)()},onCancel:h,onSave:l,validator:t}),(0,v.jsxs)("div",{className:T("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"})}))};var L=n(76091),P=(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:P(),children:[(0,v.jsxs)("div",{className:P("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:P("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:L.A,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)(S,{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:L.A,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})})})]})]})},q=(0,a.A)("files-tabs"),B=function(e){return e.Current="current",e.Deleted="deleted",e}(B||{}),H=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)(B.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:q(null,d),children:[(0,v.jsx)(R.t,{activeTab:p,items:[{id:B.Current,title:"Current",counter:t.length,disabled:!t.length},{id:B.Deleted,title:"Deleted",counter:r,disabled:!r}],onSelectTab:m}),(0,v.jsx)("div",{className:q("list"),children:p===B.Current?g:y})]})},V=n(15647),Y=n(10645),W=n(56742),G=n(45035),K=n(63192),X=(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}))}),[]),k=(0,o.useCallback)((function(t){e((0,G.Ro)(t))}),[e]),S=(0,o.useCallback)((function(t){e((0,G.ek)(t))}),[e]),T=(0,o.useCallback)((function(t){e((0,G.pk)(t))}),[e]),R=(0,o.useCallback)((function(t){e((0,K.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:X(),children:[(0,v.jsx)("div",{className:X("header"),children:(0,v.jsx)(l.E,{variant:"subheader-3",children:"Attachments"})}),m&&(0,v.jsx)(H,{className:X("body"),files:n,deletedFiles:a,deletedFilesCounter:a.length,validator:M,onDeleteFile:S,onChangeFile:k,onRestoreFile:T,onEditFile:I}),(0,v.jsx)(N,{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:()=>N});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),k=n(52041),S=["cluster","clique"],T=(0,u.A)("query-settings-popup"),N=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,k.D)(n,r);if(t&&n in t){if(e===n)return i;i.name=k.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:T(),onClose:y,children:[(0,d.jsxs)("div",{className:T("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:T("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:S.includes(n)?void 0:{name:!0,value:!0},validator:_,onDelete:b,onChange:E},n)}))}),(0,d.jsx)(C,{onAdd:A,validator:_})]})]})}},64994:(e,t,n)=>{"use strict";n.d(t,{g:()=>y,C:()=>x});var r=n(68175),i=n(64922),o=n(77810);const a=(0,n(21086).om)("spin"),s=o.forwardRef((function(e,t){const{size:n="m",style:r,className:o,qa:s}=e;return(0,i.jsx)("div",{ref:t,style:r,className:a({size:n},o),"data-qa":s,children:(0,i.jsx)("div",{className:a("inner")})})}));var u=n(72679),l=n(76872),c=n(73822),d=n(55956),f=n(40319);var h=n(16077);var v,p=n(57660),m=(0,l.A)("query-status"),g=(v={},(0,r.A)(v,d.RE.DRAFT,p.A),(0,r.A)(v,d.RE.FAILED,(function(e){return(0,i.jsx)("svg",(0,f.A)((0,f.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-4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0M8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0z",clipRule:"evenodd"})}))})),(0,r.A)(v,d.RE.ABORTED,(function(e){return(0,i.jsx)("svg",(0,f.A)((0,f.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.5 8a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0M5.25 6.25a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1v3.5a1 1 0 0 1-1 1h-3.5a1 1 0 0 1-1-1z",clipRule:"evenodd"})}))})),(0,r.A)(v,d.RE.COMPLETED,h.A),v);function y(e){var t=e.status,n=e.className;if(d.Oc.includes(t))return(0,i.jsx)(s,{size:"xs",className:m("icon-container",n)});var o=g[t];return o?(0,i.jsx)(u.I,{className:m("icon-container",(0,r.A)({},t.toLocaleLowerCase(),!0),n),data:o,size:16}):(0,i.jsx)(i.Fragment,{children:t})}var x=function(e){var t=e.mode,n=e.status,r=e.className;return(0,i.jsxs)("div",{className:m(null,r),children:[("icon"===t||"both"===t)&&(0,i.jsx)(y,{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(11229),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])))}}}},56447:(e,t,n)=>{"use strict";n.d(t,{u_:()=>X,RU:()=>K,dt:()=>V,ID:()=>Y,p3:()=>Q,in:()=>J,vl:()=>G,sS:()=>H});var r=n(28407),i=n(40319),o=n(70232),a=n.n(o),s=n(45045),u=n(50875),l=n(48971),c=n(29746),d=n(20194),f=n(64714),h=n(44639),v=n(78894),p=n(68175),m=n(3659),g=n(2796),y=n(66030),x=n(55956),b=n(52797),A=n(88187),w=function(){var e=(0,r.A)(a().mark((function e(t){var n,r,o,s,u,c,d,h,v,w,E,_,C,j,k,S,T,N,R,O;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.clusterConfig,r=t.path,o=t.login,s=t.schema,u=t.keyColumns,c=t.limit,d=t.output_format,h=s.map((function(e){return e.name})),e.next=4,(0,l.fI)(f.Qq.checkPermission(f.Vu.dynTableCheckPerm,{setup:{proxy:(0,b.v9)(n)},parameters:{columns:h,permission:"read",user:o,path:r}}),{skipSuccessToast:!0,toasterName:"query_navigation_node_permissions",errorTitle:"Navigation node get attributes failure"});case 4:if(v=e.sent,Array.isArray(v.columns)){e.next=7;break}return e.abrupt("return",Promise.reject(new Error("Dynamic table columns is not array")));case 7:if(w=v.columns.reduce((function(e,t,n){return"allow"===t.action?e.availableColumns.push(h[n]):(e.omittedColumns.push(h[n]),u.includes(h[n])&&e.deniedKeyColumns.push((0,p.A)({},h[n],t.action))),e}),{availableColumns:[],omittedColumns:[],deniedKeyColumns:[]}),E=w.availableColumns,_=w.omittedColumns,0===w.deniedKeyColumns.length){e.next=10;break}return e.abrupt("return",Promise.reject(new Error("Dynamic table has denied key columns")));case 10:return C=E.map(m.A.decode),j={query:g.A.prepareQuery({aColumns:C,path:r,keyColumns:u,offset:0,limit:c}),output_format:d,dump_error_into_response:!0},k=(0,i.A)({proxy:(0,b.v9)(n),transformResponse:function(e){var t=e.parsedData,n=e.rawResponse;return{data:t,headers:null==n?void 0:n.headers}}},x.oj),e.next=15,(0,l.fI)((0,A.S)({setup:k,parameters:j}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node get rows failure"});case 15:return S=e.sent,T=S.columns,N=S.rows,R=S.yqlTypes,O=s.map((function(e){return e.name})),e.abrupt("return",{columns:(0,y._)(T,_,O),rows:N,yqlTypes:R});case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=n(96500),_=function(){var e=(0,r.A)(a().mark((function e(t){var n,r,o,s,u,c,d,f,h,v,p,m,g;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.path,r=t.clusterConfig,o=t.schema,s=t.limit,u=t.output_format,c=(0,i.A)({proxy:(0,b.v9)(r),transformResponse:function(e){var t=e.parsedData,n=e.rawResponse;return{data:t,headers:null==n?void 0:n.headers}}},x.oj),d={path:n+"[#0:#"+s+"]",output_format:u,dump_error_into_response:!0,omit_inaccessible_columns:!0,table_reader:{workload_descriptor:{category:"user_interactive"}}},e.next=5,(0,l.fI)((0,E.B)({setup:c,parameters:d}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node get rows failure"});case 5:return f=e.sent,h=f.columns,v=f.omittedColumns,p=f.rows,m=f.yqlTypes,g=o.map((function(e){return e.name})),e.abrupt("return",{columns:(0,y._)(h,v,g),rows:p,yqlTypes:m});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C=n(13724),j=n(21594),k=n(19314),S=n(97583),T=n(27723),N=n(73800),R=n(30996),O=n(63192),I=n(52120),M=n(92115),L=n(11229),P=n(6640),D=n(79329),z=n(54744),$=n(43359),F=n(82964),U=n(97941),q=n(59028),B=new v.I,H=function(e){return function(t,n){var r=n(),o=(0,u.rS)(r),a=(0,u.mk)(r);if(o){var l=(0,j.HL)(o,k.dK.LOCAL);t((0,C.Mb)(e,l));var c=a.map((function(t){return t.path===e?(0,i.A)((0,i.A)({},t),{},{isFavorite:!t.isFavorite}):t}));t((0,s.CU)(c))}}},V=function(e){return function(){var t=(0,r.A)(a().mark((function t(n,r){var o,d,h,v,p;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=r(),d=(0,u.$D)(o),h=(0,u.WS)(o),d){t.next=5;break}return t.abrupt("return");case 5:return n((0,s.r1)(!0)),t.next=8,(0,l.fI)(f.Qq.list(f.Vu.navigationListNodes,{setup:(0,i.A)({proxy:(0,b.v9)(d)},x.oj),parameters:{path:e,attributes:["type","broken","dynamic"]}}),{skipSuccessToast:!0,toasterName:"query_navigation_node",errorTitle:"Navigation node open failure"}).finally((function(){n((0,s.r1)(!1))}));case 8:v=t.sent,p=v.map((function(t){var n=c.A.getValue(t),r=e+"/"+n,o=c.A.getAttributes(t);return(0,i.A)((0,i.A)({name:n},o),{},{path:r,isFavorite:h.includes(r)})})).sort((function(e,t){return e.name.localeCompare(t.name)})),n((0,s.R6)("")),n((0,s.SO)(e)),n((0,s.VR)(s.Dh.Tree)),n((0,s.CU)(p));case 14:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},Y=function(e){return function(){var t=(0,r.A)(a().mark((function t(n,r){var i,o,l,f,v,p,m,g,y,x,A,E,C,j,k,S,T;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=r(),o=(0,u.$D)(i),l=(0,$.GN)(),f=l.cellSize,v=l.pageSize,p=(0,D.fN)(i),m=(0,z.t5)(i),g=(0,b.ID)(i),o){t.next=8;break}return t.abrupt("return");case 8:return t.next=10,(0,N.M)(e,o);case 10:return y=t.sent,x=c.A.getValue(y.schema),A=(0,P.m3)(x.map((function(e){return e.name})),f,g,p,m),E=y.dynamic?w:_,t.prev=14,t.next=17,E({login:i.global.login,path:e,clusterConfig:o,schema:x,keyColumns:y.key_columns,limit:v,output_format:A});case 17:C=t.sent,j=C.columns,k=C.rows,S=C.yqlTypes,T={name:y.key,meta:(0,d.UQ)({cluster:o.id,attributes:y,tableType:(0,h.H)(y.dynamic,y),isDynamic:y.dynamic}),rows:k,schema:x,columns:j,yqlTypes:S},n((0,s.SO)(e)),n((0,s.tQ)(T)),n((0,s.VR)(s.Dh.Table)),t.next=30;break;case 27:t.prev=27,t.t0=t.catch(14),B.add({theme:"danger",autoHiding:!1,name:"Load table data error",title:t.t0?t.t0.message:"Can't load table data"});case 30:case"end":return t.stop()}}),t,null,[[14,27]])})));return function(e,n){return t.apply(this,arguments)}}()},W=function(e,t){return function(){var n=(0,r.A)(a().mark((function n(r){var o;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,r((0,s.l5)(t.id)),r((0,s.SO)(e)),n.next=5,f.Qq.get(f.Vu.navigationGetType,{setup:(0,i.A)({proxy:(0,b.v9)(t)},x.oj),parameters:{path:"".concat(e,"/@type")}});case 5:if(o=n.sent,!(0,S.h)(o)){n.next=11;break}return n.next=9,r(Y(e));case 9:n.next=17;break;case 11:if(!(0,T.R)(o)){n.next=16;break}return n.next=14,r(V(e));case 14:n.next=17;break;case 16:throw new Error("Сan't open this type of node");case 17:n.next=23;break;case 19:n.prev=19,n.t0=n.catch(0),r((0,s.Nh)(n.t0)),r((0,s.VR)(s.Dh.Error));case 23:case"end":return n.stop()}}),n,null,[[0,19]])})));return function(e){return n.apply(this,arguments)}}()},G=function(e){return function(){var t=(0,r.A)(a().mark((function t(n){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n((0,s.l5)(e)),n((0,s.SO)("/")),t.next=4,n(V("/"));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},K=function(){return function(){var e=(0,r.A)(a().mark((function e(t,n){var r,i,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n(),i=(0,u.$D)(r),o=(0,u.I7)(r),i){e.next=5;break}return e.abrupt("return");case 5:o&&t((0,s.VR)(s.Dh.Loading)),t(W(o,i));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},X=function(e){return function(){var t=(0,r.A)(a().mark((function t(n,r){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=r(),(0,u.rS)(i)){t.next=4;break}return t.abrupt("return");case 4:return t.prev=4,t.next=7,navigator.clipboard.writeText(e);case 7:B.add({theme:"success",name:"copy_navigation_path",title:"Path copied"}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(4),B.add({theme:"danger",name:"copy_navigation_path",title:"Can't copy path",content:t.t0.message,autoHiding:!1});case 13:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e,n){return t.apply(this,arguments)}}()},Q=function(e,t,n){return function(){var o=(0,r.A)(a().mark((function r(o,s){var l,c,d,f,h,v,p,m;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(l=s(),c=(0,$.GN)(),d=c.pageSize,f=(0,u.$D)(l),h=(0,L.sh)(l),v=h.settings,f){r.next=6;break}return r.abrupt("return");case 6:return r.next=8,o((0,O.cQ)());case 8:return(p=v?(0,i.A)({},v):{}).cluster=f.id,t===R.d.CHYT&&o((0,O.TI)(t,f.id)),o((0,O.Bn)({engine:t,settings:p})),r.next=14,(0,I.h)({clusterConfig:f,path:e,engine:t,limit:d});case 14:m=r.sent,(0,M.y)(m,n);case 16:case"end":return r.stop()}}),r)})));return function(e,t){return o.apply(this,arguments)}}()},J=function(e,t){return function(){var n=(0,r.A)(a().mark((function n(r,i){var o,l,c,d,f,h,v;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=i(),l=(0,L.sh)(o),c=l.settings,d=(0,u.oz)(o),f=t||(null==c?void 0:c.cluster)){n.next=6;break}return n.abrupt("return");case 6:if(h=d[f]){n.next=9;break}return n.abrupt("return");case 9:return v=e.replace(/\/+$/,""),n.next=12,r((0,q.rw)("global::queryTracker::queriesListSidebarVisibilityMode",!0));case 12:r({type:F.Zg,data:{listMode:U.e8.Navigation}}),r((0,s.VR)(s.Dh.Loading)),r(W(v,h));case 15:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()}},50875:(e,t,n)=>{"use strict";n.d(t,{$D:()=>v,I7:()=>m,NZ:()=>h,Nz:()=>d,PR:()=>A,Rv:()=>g,WS:()=>p,fV:()=>y,mV:()=>E,mk:()=>x,n7:()=>w,oz:()=>f,rS:()=>c});var r=n(13322),i=n(40319),o=n(18472),a=n(45033),s=n(79329),u=n(21594),l=n(19314),c=function(e){return e.queryTracker.queryNavigation.cluster},d=function(e){return e.queryTracker.queryNavigation.loading},f=function(e){return e.clustersMenu.clusters},h=function(e){return e.queryTracker.queryNavigation.error},v=(0,o.Mz)([c,f],(function(e,t){return e&&e in t?t[e]:null})),p=(0,o.Mz)([s.th,c],(function(e,t){if(!t)return[];var n=(0,u.HL)(t,l.dK.LOCAL),r=e(l.Ou.LOCAL.FAVOURITES,n);return r?r.map((function(e){return e.path})).sort():[]})),m=function(e){return e.queryTracker.queryNavigation.path},g=function(e){return e.queryTracker.queryNavigation.nodeType},y=function(e){return e.queryTracker.queryNavigation.filter},x=function(e){return e.queryTracker.queryNavigation.nodes},b=function(e,t){return e.toLowerCase().includes(t.toLowerCase())},A=(0,o.Mz)([function(e){return e.queryTracker.queryNavigation.table},y],(function(e,t){return e?(0,i.A)((0,i.A)({},e),{},{schema:e.schema.filter((function(e){var n=e.name,r=e.type;return b(n,t)||b(r,t)}))}):null})),w=(0,o.Mz)([a.Dy,y],(function(e,t){return t?e.filter((function(e){var n=e.name;return b(n,t)})):e})),E=(0,o.Mz)([x,y,m],(function(e,t,n){var i=!n||"/"===n,o={name:"...",type:"map_node",path:i?n:n.split("/").slice(0,-1).join("/"),isFavorite:!1};if(!t)return i?e:[o].concat((0,r.A)(e));var a=e.filter((function(e){var n=e.name;return b(n,t)}));return i||a.unshift(o),a}))},27723:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});var r=function(e){return!!e&&["map_node","scheduler_pool_tree_map","topmost_transaction_map","transaction_map","link","rootstock","portal_entrance"].includes(e)}},97583:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});var r=function(e){return!!e&&["table","tablet_cell","replicated_table"].includes(e)}},41347:(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:"M10 1.5A.75.75 0 0 0 10 3h1.94L6.97 7.97a.75.75 0 0 0 1.06 1.06L13 4.06V6a.75.75 0 0 0 1.5 0V2.25a.75.75 0 0 0-.75-.75zM7.5 3.25a.75.75 0 0 0-.75-.75H4.5a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3V9.25a.75.75 0 0 0-1.5 0v2.25a1.5 1.5 0 0 1-1.5 1.5h-6A1.5 1.5 0 0 1 3 11.5v-6A1.5 1.5 0 0 1 4.5 4h2.25a.75.75 0 0 0 .75-.75",clipRule:"evenodd"})}))}},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"})}))}},16077:(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.5 8a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-3.9-1.55a.75.75 0 1 0-1.2-.9L7.419 8.858 6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z",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:"_"}))},88786:(e,t,n)=>{"use strict";n.d(t,{m:()=>h});var r=n(64922),i=n(77810),o=n(13778),a=n(1093),s=n(55740),u=n(85137),l=n(21086),c=n(93434);const d=(0,l.om)("tooltip"),f=["bottom","top"],h=e=>{const{children:t,content:n,disabled:l,placement:h=f,qa:v,id:p,className:m,style:g,disablePortal:y,contentClassName:x,openDelay:b=1e3,closeDelay:A}=e,[w,E]=i.useState(null),_=(0,a.d)(w,{openDelay:b,closeDelay:A,preventTriggerOnFocus:!0}),C=i.Children.only(t),j=(0,c.Q)(C),k=(0,o.N)(E,j);return(0,r.jsxs)(i.Fragment,{children:[i.cloneElement(C,{ref:k}),w?(0,r.jsx)(s.z,{id:p,role:"tooltip",className:d(null,m),style:g,open:_&&!l,placement:h,anchorRef:{current:w},disablePortal:y,disableEscapeKeyDown:!0,disableOutsideClick:!0,disableLayer:!0,qa:v,children:(0,r.jsx)("div",{className:d("content",x),children:(0,r.jsx)(u.E,{variant:"body-short",color:"complementary",children:n})})}):null]})}},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}},48495:function(e){e.exports=function(){"use strict";function e(e,r,i,o,a){!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)}}(e,r,i||0,o||e.length-1,a||n)}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}var r=function(e){void 0===e&&(e=9),this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(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 o(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,r,i){i||(i=v(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=t;o<n;o++){var a=e.children[o];s(i,e.leaf?r(a):a)}return i}function s(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 u(e,t){return e.minX-t.minX}function l(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function h(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function p(t,n,r,i,o){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=i)){var s=n+Math.ceil((r-n)/i/2)*i;e(t,s,n,r,o),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(e){var t=this.data,n=[];if(!h(e,t))return n;for(var r=this.toBBox,i=[];t;){for(var o=0;o<t.children.length;o++){var a=t.children[o],s=t.leaf?r(a):a;h(e,s)&&(t.leaf?n.push(a):f(e,s)?this._all(a,n):i.push(a))}t=i.pop()}return n},r.prototype.collides=function(e){var t=this.data;if(!h(e,t))return!1;for(var n=[];t;){for(var r=0;r<t.children.length;r++){var i=t.children[r],o=t.leaf?this.toBBox(i):i;if(h(e,o)){if(t.leaf||f(e,o))return!0;n.push(i)}}t=n.pop()}return!1},r.prototype.load=function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0;t<e.length;t++)this.insert(e[t]);return this}var n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(e){return e&&this._insert(e,this.data.height-1),this},r.prototype.clear=function(){return this.data=v([]),this},r.prototype.remove=function(e,t){if(!e)return this;for(var n,r,o,a=this.data,s=this.toBBox(e),u=[],l=[];a||u.length;){if(a||(a=u.pop(),r=u[u.length-1],n=l.pop(),o=!0),a.leaf){var c=i(e,a.children,t);if(-1!==c)return a.children.splice(c,1),u.push(a),this._condense(u),this}o||a.leaf||!f(a,s)?r?(n++,a=r.children[n],o=!1):a=null:(u.push(a),l.push(n),n=0,r=a,a=a.children[0])}return this},r.prototype.toBBox=function(e){return e},r.prototype.compareMinX=function(e,t){return e.minX-t.minX},r.prototype.compareMinY=function(e,t){return e.minY-t.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(e){return this.data=e,this},r.prototype._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},r.prototype._build=function(e,t,n,r){var i,a=n-t+1,s=this._maxEntries;if(a<=s)return o(i=v(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,r-1))),(i=v([])).leaf=!1,i.height=r;var u=Math.ceil(a/s),l=u*Math.ceil(Math.sqrt(s));p(e,t,n,l,this.compareMinX);for(var c=t;c<=n;c+=l){var d=Math.min(c+l-1,n);p(e,c,d,u,this.compareMinY);for(var f=c;f<=d;f+=u){var h=Math.min(f+u-1,d);i.children.push(this._build(e,f,h,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,s=0;s<t.children.length;s++){var u=t.children[s],l=c(u),d=(f=e,h=u,(Math.max(h.maxX,f.maxX)-Math.min(h.minX,f.minX))*(Math.max(h.maxY,f.maxY)-Math.min(h.minY,f.minY))-l);d<o?(o=d,i=l<i?l:i,a=u):d===o&&l<i&&(i=l,a=u)}t=a||t.children[0]}var f,h;return t},r.prototype._insert=function(e,t,n){var r=n?e:this.toBBox(e),i=[],o=this._chooseSubtree(r,this.data,t,i);for(o.children.push(e),s(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)},r.prototype._split=function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),s=v(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,o(n,this.toBBox),o(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(e,t){this.data=v([e,t]),this.data.height=e.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(e,t,n){for(var r,i,o,s,u,l,d,f=1/0,h=1/0,v=t;v<=n-t;v++){var p=a(e,0,v,this.toBBox),m=a(e,v,n,this.toBBox),g=(i=p,o=m,void 0,void 0,void 0,void 0,s=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),l=Math.min(i.maxX,o.maxX),d=Math.min(i.maxY,o.maxY),Math.max(0,l-s)*Math.max(0,d-u)),y=c(p)+c(m);g<f?(f=g,r=v,h=y<h?y:h):g===f&&y<h&&(h=y,r=v)}return r||n-t},r.prototype._chooseSplitAxis=function(e,t,n){var r=e.leaf?this.compareMinX:u,i=e.leaf?this.compareMinY:l;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)},r.prototype._allDistMargin=function(e,t,n,r){e.children.sort(r);for(var i=this.toBBox,o=a(e,0,t,i),u=a(e,n-t,n,i),l=d(o)+d(u),c=t;c<n-t;c++){var f=e.children[c];s(o,e.leaf?i(f):f),l+=d(o)}for(var h=n-t-1;h>=t;h--){var v=e.children[h];s(u,e.leaf?i(v):v),l+=d(u)}return l},r.prototype._adjustParentBBoxes=function(e,t,n){for(var r=n;r>=0;r--)s(t[r],e)},r.prototype._condense=function(e){for(var t=e.length-1,n=void 0;t>=0;t--)0===e[t].children.length?t>0?(n=e[t-1].children).splice(n.indexOf(e[t]),1):this.clear():o(e[t],this.toBBox)},r}()},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)},k="object"==typeof document&&document.all,S={all:k,IS_HTMLDDA:void 0===k&&void 0!==k},T=S.all,N=S.IS_HTMLDDA?function(e){return"function"==typeof e||e===T}: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,L=I?M.bind(M):function(){return M.apply(M,arguments)},P={},D={}.propertyIsEnumerable,z=Object.getOwnPropertyDescriptor,$=z&&!D.call({1:2},1);P.f=$?function(e){var t=z(this,e);return!!t&&t.enumerable}:D;var F,U,q=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},B=u,H=E,V=Object,Y=x("".split),W=B((function(){return!V("z").propertyIsEnumerable(0)}))?function(e){return"String"==H(e)?Y(e,""):V(e)}:V,G=function(e){return null==e},K=G,X=TypeError,Q=function(e){if(K(e))throw X("Can't call method on "+e);return e},J=W,Z=Q,ee=function(e){return J(Z(e))},te=N,ne=S.all,re=S.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=N,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=N,Ce=ce,je=Object,ke=we?function(e){return"symbol"==typeof e}:function(e){var t=Ee("Symbol");return _e(t)&&Ce(t.prototype,je(e))},Se=String,Te=function(e){try{return Se(e)}catch(e){return"Object"}},Ne=N,Re=Te,Oe=TypeError,Ie=function(e){if(Ne(e))return e;throw Oe(Re(e)+" is not a function")},Me=Ie,Le=G,Pe=function(e,t){var n=e[t];return Le(n)?void 0:Me(n)},De=L,ze=N,$e=re,Fe=TypeError,Ue={exports:{}},qe=s,Be=Object.defineProperty,He="__core-js_shared__",Ve=s[He]||function(e,t){try{Be(qe,e,{value:t,configurable:!0,writable:!0})}catch(n){qe[e]=t}return t}(He,{}),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,Ge=Q,Ke=Object,Xe=function(e){return Ke(Ge(e))},Qe=Xe,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=L,pt=re,mt=ke,gt=Pe,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=ke,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):{}},kt=jt,St=!O&&!u((function(){return 7!=Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Tt=O,Nt=L,Rt=P,Ot=q,It=ee,Mt=wt,Lt=Ze,Pt=St,Dt=Object.getOwnPropertyDescriptor;R.f=Tt?Dt:function(e,t){if(e=It(e),t=Mt(t),Pt)try{return Dt(e,t)}catch(e){}if(Lt(e,t))return Ot(!Nt(Rt.f,e,t),e[t])};var zt=u,$t=N,Ft=/#|\.prototype\./,Ut=function(e,t){var n=Bt[qt(e)];return n==Vt||n!=Ht&&($t(t)?zt(t):!!t)},qt=Ut.normalize=function(e){return String(e).replace(Ft,".").toLowerCase()},Bt=Ut.data={},Ht=Ut.NATIVE="N",Vt=Ut.POLYFILL="P",Yt=Ut,Wt=Ie,Gt=l,Kt=j(j.bind),Xt=function(e,t){return Wt(e),void 0===t?e:Gt?Kt(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=St,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=q,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=N,wn=R.f,En=Yt,_n=ie,Cn=Xt,jn=gn,kn=Ze,Sn=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},Tn=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&&kn(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?Sn(a):v&&An(a)?bn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&jn(l,"sham",!0),jn(m,o,l),v&&(kn(_n,i=d+"Prototype")||jn(_n,i,{}),jn(_n[i],o,a),e.real&&g&&(n||!g[o])&&jn(g,o,a)))},Nn=Tn,Rn=O,On=Qt.f;Nn({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 Ln=o.exports,Pn=Ln,Dn=i(Pn),zn=E,$n=Array.isArray||function(e){return"Array"==zn(e)},Fn=Math.ceil,Un=Math.floor,qn=Math.trunc||function(e){var t=+e;return(t>0?Un:Fn)(t)},Bn=function(e){var t=+e;return t!=t||0===t?0:qn(t)},Hn=Bn,Vn=Math.min,Yn=function(e){return function(e){return e>0?Vn(Hn(e),9007199254740991):0}(e.length)},Wn=TypeError,Gn=function(e){if(e>9007199254740991)throw Wn("Maximum allowed index exceeded");return e},Kn=wt,Xn=Qt,Qn=q,Jn=function(e,t,n){var r=Kn(t);r in e?Xn.f(e,r,Qn(0,n)):e[r]=n},Zn={};Zn[ht("toStringTag")]="z";var er="[object z]"===String(Zn),tr=er,nr=N,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=N,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=N,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,kr=Cr,Sr=re,Tr=ht("species"),Nr=Array,Rr=function(e,t){return new(function(e){var t;return jr(e)&&(t=e.constructor,(kr(t)&&(t===Nr||jr(t.prototype))||Sr(t)&&null===(t=t[Tr]))&&(t=void 0)),void 0===t?Nr:t}(e))(0===t?0:t)},Or=u,Ir=ye,Mr=ht("species"),Lr=function(e){return Ir>=51||!Or((function(){var t=[];return(t.constructor={})[Mr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Pr=Tn,Dr=u,zr=$n,$r=re,Fr=Xe,Ur=Yn,qr=Gn,Br=Jn,Hr=Rr,Vr=Lr,Yr=ye,Wr=ht("isConcatSpreadable"),Gr=Yr>=51||!Dr((function(){var e=[];return e[Wr]=!1,e.concat()[0]!==e})),Kr=function(e){if(!$r(e))return!1;var t=e[Wr];return void 0!==t?!!t:zr(e)};Pr({target:"Array",proto:!0,arity:1,forced:!Gr||!Vr("concat")},{concat:function(e){var t,n,r,i,o,a=Fr(this),s=Hr(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Kr(o=-1===t?a:arguments[t]))for(i=Ur(o),qr(u+i),n=0;n<i;n++,u++)n in o&&Br(s,u,o[n]);else qr(u+1),Br(s,u++,o);return s.length=u,s}});var Xr=sr,Qr=String,Jr=function(e){if("Symbol"===Xr(e))throw TypeError("Cannot convert a Symbol value to a string");return Qr(e)},Zr={},ei=Bn,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,ki=le("document","documentElement"),Si=it,Ti=We("keys"),Ni=function(e){return Ti[e]||(Ti[e]=Si(e))},Ri=nn,Oi=Zr,Ii=mi,Mi=li,Li=ki,Pi=jt,Di="prototype",zi="script",$i=Ni("IE_PROTO"),Fi=function(){},Ui=function(e){return"<"+zi+">"+e+"</"+zi+">"},qi=function(e){e.write(Ui("")),e.close();var t=e.parentWindow.Object;return e=null,t},Bi=function(){try{ji=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Bi="undefined"!=typeof document?document.domain&&ji?qi(ji):(t=Pi("iframe"),n="java"+zi+":",t.style.display="none",Li.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ui("document.F=Object")),e.close(),e.F):qi(ji);for(var r=Ii.length;r--;)delete Bi[Di][Ii[r]];return Bi()};Mi[$i]=!0;var Hi=Object.create||function(e,t){var n;return null!==e?(Fi[Di]=Ri(e),n=new Fi,Fi[Di]=null,n[$i]=e):n=Bi(),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 Gi={},Ki=ri,Xi=Yn,Qi=Jn,Ji=Array,Zi=Math.max,eo=function(e,t,n){for(var r=Xi(e),i=Ki(t,r),o=Ki(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):[];Gi.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=L,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})},ko=sr,So=er?{}.toString:function(){return"[object "+ko(this)+"]"},To=er,No=Qt.f,Ro=gn,Oo=Ze,Io=So,Mo=ht("toStringTag"),Lo=function(e,t,n,r){if(e){var i=n?e:e.prototype;Oo(i,Mo)||No(i,Mo,{configurable:!0,value:t}),r&&!To&&Ro(i,"toString",Io)}},Po=N,Do=s.WeakMap,zo=Po(Do)&&/native code/.test(String(Do)),$o=s,Fo=re,Uo=gn,qo=Ze,Bo=Ve,Ho=Ni,Vo=li,Yo="Object already initialized",Wo=$o.TypeError,Go=$o.WeakMap;if(zo||Bo.state){var Ko=Bo.state||(Bo.state=new Go);Ko.get=Ko.get,Ko.has=Ko.has,Ko.set=Ko.set,vo=function(e,t){if(Ko.has(e))throw Wo(Yo);return t.facade=e,Ko.set(e,t),t},po=function(e){return Ko.get(e)||{}},mo=function(e){return Ko.has(e)}}else{var Xo=Ho("state");Vo[Xo]=!0,vo=function(e,t){if(qo(e,Xo))throw Wo(Yo);return t.facade=e,Uo(e,Xo,t),t},po=function(e){return qo(e,Xo)?e[Xo]:{}},mo=function(e){return qo(e,Xo)}}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=Xt,Zo=W,ea=Xe,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=Tn,sa=s,ua=L,la=x,ca=O,da=Ae,fa=u,ha=Ze,va=ce,pa=nn,ma=ee,ga=wt,ya=Jr,xa=q,ba=Hi,Aa=xi,wa=Vi,Ea=Gi,_a=ao,Ca=R,ja=Qt,ka=Zr,Sa=P,Ta=uo,Na=co,Ra=We,Oa=li,Ia=it,Ma=ht,La=fo,Pa=Ao,Da=jo,za=Lo,$a=Qo,Fa=oa.forEach,Ua=Ni("hidden"),qa="Symbol",Ba="prototype",Ha=$a.set,Va=$a.getterFor(qa),Ya=Object[Ba],Wa=sa.Symbol,Ga=Wa&&Wa[Ba],Ka=sa.TypeError,Xa=sa.QObject,Qa=Ca.f,Ja=ja.f,Za=Ea.f,es=Sa.f,ts=la([].push),ns=Ra("symbols"),rs=Ra("op-symbols"),is=Ra("wks"),os=!Xa||!Xa[Ba]||!Xa[Ba].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(Ga);return Ha(n,{type:qa,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(Ga,this))throw Ka("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)},Ta(Ga=Wa[Ba],"toString",(function(){return Va(this).tag})),Ta(Wa,"withoutSetter",(function(e){return ss(Ia(e),e)})),Sa.f=cs,ja.f=us,ka.f=ls,Ca.f=ds,wa.f=Ea.f=fs,_a.f=hs,La.f=function(e){return ss(Ma(e),e)},ca&&Na(Ga,"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){Pa(e)})),aa({target:qa,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,qa),Oa[Ua]=!0;var vs=Ae&&!!Symbol.for&&!!Symbol.keyFor,ps=Tn,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=Tn,_s=Ze,Cs=ke,js=Te,ks=vs,Ss=We("symbol-to-string-registry");Es({target:"Symbol",stat:!0,forced:!ks},{keyFor:function(e){if(!Cs(e))throw TypeError(js(e)+" is not a symbol");if(_s(Ss,e))return Ss[e]}});var Ts=x([].slice),Ns=$n,Rs=N,Os=E,Is=Jr,Ms=x([].push),Ls=Tn,Ps=le,Ds=v,zs=L,$s=x,Fs=u,Us=N,qs=ke,Bs=Ts,Hs=Ae,Vs=String,Ys=Ps("JSON","stringify"),Ws=$s(/./.exec),Gs=$s("".charAt),Ks=$s("".charCodeAt),Xs=$s("".replace),Qs=$s(1..toString),Js=/[\uD800-\uDFFF]/g,Zs=/^[\uD800-\uDBFF]$/,eu=/^[\uDC00-\uDFFF]$/,tu=!Hs||Fs((function(){var e=Ps("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=Bs(arguments),r=function(e){if(Rs(e))return e;if(Ns(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(Ns(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}}(t);if(Us(r)||void 0!==e&&!qs(e))return n[1]=function(e,t){if(Us(r)&&(t=zs(r,this,Vs(e),t)),!qs(t))return t},Ds(Ys,null,n)},iu=function(e,t,n){var r=Gs(n,t-1),i=Gs(n,t+1);return Ws(Zs,e)&&!Ws(eu,i)||Ws(eu,e)&&!Ws(Zs,r)?"\\u"+Qs(Ks(e,0),16):e};Ys&&Ls({target:"JSON",stat:!0,arity:3,forced:tu||nu},{stringify:function(e,t,n){var r=Bs(arguments),i=Ds(tu?ru:Ys,null,r);return nu&&"string"==typeof i?Xs(i,Js,iu):i}});var ou=ao,au=Xe;Tn({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=Lo;Ao("toStringTag"),lu(uu("Symbol"),"Symbol"),Ao("unscopables"),Lo(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=N,_u=Xe,Cu=Au,ju=Ni("IE_PROTO"),ku=Object,Su=ku.prototype,Tu=Cu?ku.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 ku?Su:null},Nu=u,Ru=N,Ou=re,Iu=Hi,Mu=Tu,Lu=uo,Pu=ht("iterator"),Du=!1;[].keys&&("next"in(fu=[].keys())?(du=Mu(Mu(fu)))!==Object.prototype&&(cu=du):Du=!0);var zu=!Ou(cu)||Nu((function(){var e={};return cu[Pu].call(e)!==e}));Ru((cu=zu?{}:Iu(cu))[Pu])||Lu(cu,Pu,(function(){return this}));var $u={IteratorPrototype:cu,BUGGY_SAFARI_ITERATORS:Du},Fu=$u.IteratorPrototype,Uu=Hi,qu=q,Bu=Lo,Hu=vu,Vu=function(){return this},Yu=x,Wu=Ie,Gu=N,Ku=String,Xu=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||Gu(e))return e;throw Xu("Can't set "+Ku(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Zu=Tn,el=L,tl=Tu,nl=Lo,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:qu(+!r,n)}),Bu(e,i,!1,!0),Hu[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 kl 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 Sl=wl[kl],Tl=Sl&&Sl.prototype;Tl&&El(Tl)!==jl&&_l(Tl,jl,kl),Cl[kl]=Cl.Array}var Nl=hu;Ao("dispose");var Rl=Nl;Ao("asyncDispose");var Ol=Tn,Il=x,Ml=le("Symbol"),Ll=Ml.keyFor,Pl=Il(Ml.prototype.valueOf);Ol({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Ll(Pl(e))}catch(e){return!1}}});for(var Dl=Tn,zl=We,$l=le,Fl=x,Ul=ke,ql=ht,Bl=$l("Symbol"),Hl=Bl.isWellKnown,Vl=$l("Object","getOwnPropertyNames"),Yl=Fl(Bl.prototype.valueOf),Wl=zl("wks"),Gl=0,Kl=Vl(Bl),Xl=Kl.length;Gl<Xl;Gl++)try{var Ql=Kl[Gl];Ul(Bl[Ql])&&ql(Ql)}catch(e){}Dl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Hl&&Hl(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=Bn,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,kc=re,Sc=Ze,Tc=Ts,Nc=l,Rc=Function,Oc=Cc([].concat),Ic=Cc([].join),Mc={},Lc=Nc?Rc.bind:function(e){var t=jc(this),n=t.prototype,r=Tc(arguments,1),i=function(){var n=Oc(r,Tc(arguments));return this instanceof i?function(e,t,n){if(!Sc(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 kc(n)&&(i.prototype=n),i},Pc=Lc;Tn({target:"Function",proto:!0,forced:Function.bind!==Pc},{bind:Pc});var Dc=ie,zc=function(e){return Dc[e+"Prototype"]},$c=zc("Function").bind,Fc=ce,Uc=$c,qc=Function.prototype,Bc=function(e){var t=e.bind;return e===qc||Fc(qc,e)&&t===qc.bind?Uc:t},Hc=i(Bc),Vc=Ie,Yc=Xe,Wc=W,Gc=Yn,Kc=TypeError,Xc=function(e){return function(t,n,r,i){Vc(n);var o=Yc(t),a=Wc(o),s=Gc(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 Kc("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:Xc(!1),right:Xc(!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;Tn({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;Tn({target:"Array",proto:!0,forced:!Lr("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;Tn({target:"Array",proto:!0,forced:!Lr("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=Gn,wd=Xt,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=Xe,kd=Yn,Sd=Rr;Tn({target:"Array",proto:!0},{flatMap:function(e){var t,n=jd(this),r=kd(n);return Cd(e),(t=Sd(n,0)).length=_d(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var Td=zc("Array").flatMap,Nd=ce,Rd=Td,Od=Array.prototype,Id=i((function(e){var t=e.flatMap;return e===Od||Nd(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:Hc(o=this._add).call(o,this),remove:Hc(a=this._remove).call(a,this),update:Hc(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}(),Ld=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}(),Pd=L,Dd=nn,zd=Pe,$d=function(e,t,n){var r,i;Dd(e);try{if(!(r=zd(e,"return"))){if("throw"===t)throw n;return n}r=Pd(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,qd=vu,Bd=ht("iterator"),Hd=Array.prototype,Vd=function(e){return void 0!==e&&(qd.Array===e||Hd[Bd]===e)},Yd=sr,Wd=Pe,Gd=G,Kd=vu,Xd=ht("iterator"),Qd=function(e){if(!Gd(e))return Wd(e,Xd)||Wd(e,"@@iterator")||Kd[Yd(e)]},Jd=L,Zd=Ie,ef=nn,tf=Te,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=Xt,sf=L,uf=Xe,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};Tn({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:{}},kf=Tn,Sf=u,Tf=ee,Nf=R.f,Rf=O;kf({target:"Object",stat:!0,forced:!Rf||Sf((function(){Nf(1)})),sham:!Rf},{getOwnPropertyDescriptor:function(e,t){return Nf(Tf(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),Lf=le,Pf=Vi,Df=ao,zf=nn,$f=x([].concat),Ff=Lf("Reflect","ownKeys")||function(e){var t=Pf.f(zf(e)),n=Df.f;return n?$f(t,n(e)):t},Uf=Ff,qf=ee,Bf=R,Hf=Jn;Tn({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(e){for(var t,n,r=qf(e),i=Bf.f,o=Uf(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&Hf(a,t,n);return a}});var Vf=i(ie.Object.getOwnPropertyDescriptors),Yf={exports:{}},Wf=Tn,Gf=O,Kf=Zr.f;Wf({target:"Object",stat:!0,forced:Object.defineProperties!==Kf,sham:!Gf},{defineProperties:Kf});var Xf=ie.Object,Qf=Yf.exports=function(e,t){return Xf.defineProperties(e,t)};Xf.defineProperties.sham&&(Qf.sham=!0);var Jf=i(Yf.exports),Zf=i(Ln);Tn({target:"Array",stat:!0},{isArray:$n});var eh=ie.Array.isArray,th=i(eh),nh=Tn,rh=$n,ih=Cr,oh=re,ah=ri,sh=Yn,uh=ee,lh=Jn,ch=ht,dh=Ts,fh=Lr("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 kh(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 Sh=i(Nl),Th=zc("Array").concat,Nh=ce,Rh=Th,Oh=Array.prototype,Ih=i((function(e){var t=e.concat;return e===Oh||Nh(Oh,e)&&t===Oh.concat?Rh:t})),Mh=i(bh);Tn({target:"Reflect",stat:!0},{ownKeys:Ff});var Lh=i(ie.Reflect.ownKeys),Ph=i(eh),Dh=Xe,zh=xi;Tn({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)};Tn({target:"Array",proto:!0,forced:[].forEach!=Uh},{forEach:Uh});var qh=zc("Array").forEach,Bh=sr,Hh=Ze,Vh=ce,Yh=qh,Wh=Array.prototype,Gh={DOMTokenList:!0,NodeList:!0},Kh=function(e){var t=e.forEach;return e===Wh||Vh(Wh,e)&&t===Wh.forEach||Hh(Gh,Bh(e))?Yh:t},Xh=i(Kh),Qh=Tn,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=Te,hv=TypeError,vv=function(e,t){if(!delete e[t])throw hv("Cannot delete property "+fv(t)+" of "+fv(e))},pv=Tn,mv=Xe,gv=ri,yv=Bn,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=Gn,wv=Rr,Ev=Jn,_v=vv,Cv=Lr("splice"),jv=Math.max,kv=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=kv(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 Sv=zc("Array").splice,Tv=ce,Nv=Sv,Rv=Array.prototype,Ov=i((function(e){var t=e.splice;return e===Rv||Tv(Rv,e)&&t===Rv.splice?Nv:t})),Iv=O,Mv=x,Lv=L,Pv=u,Dv=xi,zv=ao,$v=P,Fv=Xe,Uv=W,qv=Object.assign,Bv=Object.defineProperty,Hv=Mv([].concat),Vv=!qv||Pv((function(){if(Iv&&1!==qv({b:1},qv(Bv({},"a",{enumerable:!0,get:function(){Bv(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!=qv({},e)[n]||Dv(qv({},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?Hv(Dv(u),o(u)):Dv(u),c=l.length,d=0;c>d;)s=l[d++],Iv&&!Lv(a,u,s)||(n[s]=u[s]);return n}:qv,Yv=Vv;Tn({target:"Object",stat:!0,arity:2,forced:Object.assign!==Yv},{assign:Yv});var Wv=i(ie.Object.assign),Gv=Xe,Kv=Tu,Xv=Au;Tn({target:"Object",stat:!0,forced:u((function(){Kv(1)})),sham:!Xv},{getPrototypeOf:function(e){return Kv(Gv(e))}});var Qv=ie.Object.getPrototypeOf;Tn({target:"Object",stat:!0,sham:!O},{create:Hi});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=N,cp=ip,dp=de,fp=Ts,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=Tn,yp=s,xp=mp(yp.setInterval,!0);gp({global:!0,bind:!0,forced:yp.setInterval!==xp},{setInterval:xp});var bp=Tn,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 kp(){return kp=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},kp.apply(this,arguments)}function Sp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Tp(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 Np,Rp=Cp,Op=["","webkit","Moz","MS","ms","o"],Ip="undefined"==typeof document?{style:{}}:document.createElement("div"),Mp=Math.round,Lp=Math.abs,Pp=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++}}Np="undefined"==typeof window?{}:window;var zp=Dp(Ip.style,"touchAction"),$p=void 0!==zp,Fp="compute",Up="auto",qp="manipulation",Bp="none",Hp="pan-x",Vp="pan-y",Yp=function(){if(!$p)return!1;var e={},t=Np.CSS&&Np.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){return e[n]=!t||Np.CSS.supports("touch-action",n)})),e}(),Wp="ontouchstart"in Np,Gp=void 0!==Dp(Np,"PointerEvent"),Kp=Wp&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Xp="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,Bp))return Bp;var t=vm(e,Hp),n=vm(e,Vp);return t&&n?Bp:t||n?t?Hp:Vp:vm(e,qp)?qp: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,Bp)&&!Yp[Bp],o=vm(r,Vp)&&!Yp[Vp],a=vm(r,Hp)&&!Yp[Hp];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:Pp(),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:Lp(e)>=Lp(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=Pp(),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=Lp(d.x)>Lp(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=Lp(c.x)>Lp(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 km(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Sm=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(km(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(km(this.element),this.evWin,this.domHandler)},e}();function Tm(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 Nm={pointerdown:Zp,pointermove:2,pointerup:em,pointercancel:tm,pointerout:tm},Rm={2:Xp,3:"pen",4:Qp,5:"kinect"},Om="pointerdown",Im="pointermove pointerup pointercancel";Np.MSPointerEvent&&!Np.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 Sp(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Nm[r],o=Rm[e.pointerType]||e.pointerType,a=o===Xp,s=Tm(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}(Sm);function Lm(e){return Array.prototype.slice.call(e,0)}function Pm(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];Tm(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 Sp(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:Xp,srcEvent:e})},t}(Sm);function $m(e,t){var n,r,i=Lm(e.touches),o=this.targetIds;if(t&(2|Zp)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var a=Lm(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?[Pm(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 Sp(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}(Sm),qm=2500;function Bm(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)}),qm)}}function Hm(e,t){e&Zp?(this.primaryTouch=t.changedPointers[0].identifier,Bm.call(this,t)):e&(em|tm)&&Bm.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===Xp,o=n.pointerType===Qp;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Hm.call(Tp(Tp(r)),t,n);else if(o&&Vm.call(Tp(Tp(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 Sp(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Sm);function Wm(e,t,n){return!!Array.isArray(e)&&(fm(e,n[t],n),!0)}var Gm=32,Km=1;function Xm(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=kp({enable:!0},e),this.id=Km++,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=Xm(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return Wm(e,"dropRecognizeWith",this)||(e=Xm(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===Tm(t,e=Xm(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Wm(e,"dropRequireFailure",this))return this;e=Xm(e,this);var t=Tm(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=Gm},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=Gm);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,kp({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}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[qp]},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 Gm},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=Gm}),this.options.interval),Gm},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,kp({pointers:1},t))||this}Sp(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:Gm},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,kp({event:"pan",threshold:10,pointers:1,direction:lm},t))||this).pX=null,n.pY=null,n}Sp(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(Hp),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,kp({event:"swipe",threshold:10,velocity:.3,direction:sm|um,pointers:1},t))||this}Sp(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&&Lp(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,kp({event:"pinch",threshold:0,pointers:2},t))||this}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Bp]},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,kp({event:"rotate",threshold:0,pointers:2},t))||this}Sp(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Bp]},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,kp({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}Sp(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 Gm},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=Pp(),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||(Gp?Mm:Kp?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=Tm(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(Tm(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 Sp(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:Xp,srcEvent:e})}},t}(Sm);function hg(e,t){var n=Lm(e.touches),r=Lm(e.changedTouches);return t&(em|tm)&&(n=Pm(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,kp({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=Gm,e.Manager=cg,e.Input=Sm,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=Lm,e.inArray=Tm,e.uniqueArray=Pm,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!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Ph(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=Sh("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,kh(Mh(t).call(t,2))));var i,o=t[0],a=t[1],s=bg(Lh(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])||Ph(o[u])||Ph(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 Ph(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 kg="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 Sg(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=kg(this._dom.overlay);r.on("tap",Hc(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push((function(){r.destroy()}));var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Xh(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(Sg.prototype),Sg.current=null,Sg.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()}},Sg.prototype.activate=function(){Sg.current&&Sg.current.deactivate(),Sg.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)},Sg.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")},Sg.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};var Tg=Cr,Ng=Te,Rg=TypeError,Og=function(e){if(Tg(e))return e;throw Rg(Ng(e)+" is not a constructor")},Ig=Tn,Mg=v,Lg=Lc,Pg=Og,Dg=nn,zg=re,$g=Hi,Fg=u,Ug=le("Reflect","construct"),qg=Object.prototype,Bg=[].push,Hg=Fg((function(){function e(){}return!(Ug((function(){}),[],e)instanceof e)})),Vg=!Fg((function(){Ug((function(){}))})),Yg=Hg||Vg;Ig({target:"Reflect",stat:!0,forced:Yg,sham:Yg},{construct:function(e,t){Pg(e),Dg(t);var n=arguments.length<3?e:Pg(arguments[2]);if(Vg&&!Hg)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(Bg,r,t),new(Mg(Lg,e,r))}var i=n.prototype,o=$g(zg(i)?i:qg),a=Mg(e,o,t);return zg(a)?a:o}});var Wg=i(ie.Reflect.construct);function Gg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Kg=Zv,Xg=i(Kg);Tn({target:"Object",stat:!0},{setPrototypeOf:Ju});var Qg=ie.Object.setPrototypeOf,Jg=i(Qg),Zg=i(Bc);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=Xg(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 Gg(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=Kh,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=q,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=Xt,ky=L,Sy=nn,Ty=Te,Ny=Vd,Ry=Yn,Oy=ce,Iy=of,My=Qd,Ly=$d,Py=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&&Ly(r,"normal",e),new Dy(!0,e)},g=function(e){return d?(Sy(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 Py(Ty(e)+" is not iterable");if(Ny(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=ky(u,r)).done;){try{s=g(l.value)}catch(e){Ly(r,"throw",e)}if("object"==typeof s&&s&&Oy(zy,s))return s}return new Dy(!1)},Fy=Jr,Uy=Tn,qy=ce,By=Tu,Hy=Ju,Vy=Hi,Yy=gn,Wy=q,Gy=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)))},Ky=$y,Xy=ht("toStringTag"),Qy=Error,Jy=[].push,Zy=function(e,t){var n,r=qy(ex,this);Hy?n=Hy(Qy(),r?By(this):ex):(n=r?this:Vy(ex),Yy(n,Xy,"Error")),void 0!==t&&Yy(n,"message",function(e,t){return void 0===e?arguments.length<2?"":t:Fy(e)}(t)),Gy(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 Ky(e,Jy,{that:i}),Yy(n,"errors",i),n};Hy?Hy(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=G,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=Xt,wx=N,Ex=Ze,_x=u,Cx=ki,jx=Ts,kx=jt,Sx=ap,Tx=yx,Nx=ed,Rx=xx.setImmediate,Ox=xx.clearImmediate,Ix=xx.process,Mx=xx.Dispatch,Lx=xx.Function,Px=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()}},qx=function(e){return function(){Ux(e)}},Bx=function(e){Ux(e.data)},Hx=function(e){xx.postMessage(Dx(e),tx.protocol+"//"+tx.host)};Rx&&Ox||(Rx=function(e){Sx(arguments.length,1);var t=wx(e)?e:Lx(e),n=jx(arguments,1);return $x[++zx]=function(){bx(t,void 0,n)},nx(zx),zx},Ox=function(e){delete $x[e]},Nx?nx=function(e){Ix.nextTick(qx(e))}:Mx&&Mx.now?nx=function(e){Mx.now(qx(e))}:Px&&!Tx?(ix=(rx=new Px).port2,rx.port1.onmessage=Bx,nx=Ax(ix.postMessage,ix)):xx.addEventListener&&wx(xx.postMessage)&&!xx.importScripts&&tx&&"file:"!==tx.protocol&&!_x(Hx)?(nx=Hx,xx.addEventListener("message",Bx,!1)):nx=Fx in kx("script")?function(e){Cx.appendChild(kx("script"))[Fx]=function(){Cx.removeChild(this),Ux(e)}}:function(e){setTimeout(qx(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,Gx,Kx,Xx,Qx,Jx=Yx,Zx=/ipad|iphone|ipod/i.test(de)&&"undefined"!=typeof Pebble,eb=/web0s(?!.*chrome)/i.test(de),tb=s,nb=Xt,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?((Xx=hb.resolve(void 0)).constructor=hb,Qx=nb(Xx.then,Xx),Wx=function(){Qx(gb)}):lb?Wx=function(){fb.nextTick(gb)}:(ib=nb(ib,tb),Wx=function(){ib(gb)}):(Gx=!0,Kx=db.createTextNode(""),new cb(gb).observe(Kx,{characterData:!0}),Wx=function(){Kx.data=Gx=!Gx}),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=N,jb=Yt,kb=dr,Sb=ht,Tb=wb,Nb=Ab,Rb=ye,Ob=_b&&_b.prototype,Ib=Sb("species"),Mb=!1,Lb=Cb(Eb.PromiseRejectionEvent),Pb=jb("Promise",(function(){var e=kb(_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&&(Tb||Nb)&&!Lb})),Db={CONSTRUCTOR:Pb,REJECTION_EVENT:Lb,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 qb,Bb,Hb=Tn,Vb=ed,Yb=s,Wb=L,Gb=uo,Kb=Lo,Xb=lx,Qb=Ie,Jb=N,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&&NA(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&&SA(e)})))},kA=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)},SA=function(e){Wb(nA,Yb,(function(){var t,n=e.facade,r=e.value;if(TA(e)&&(t=iA((function(){Vb?xA.emit("unhandledRejection",r,n):kA(EA,n,r)})),e.rejection=Vb||TA(e)?2:1,t.error))throw t.value}))},TA=function(e){return 1!==e.rejection&&!e.parent},NA=function(e){Wb(nA,Yb,(function(){var t=e.facade;Vb?xA.emit("rejectionHandled",t):kA("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(qb,this);var t=fA(this);try{e(RA(IA,t),RA(OA,t))}catch(e){OA(t,e)}}).prototype,(qb=function(e){hA(this,{type:lA,done:!1,notified:!1,parent:!1,reactions:new oA,rejection:!1,state:0,value:void 0})}).prototype=Gb(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})),Bb=function(){var e=new qb,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 Bb(e):AA(e)}),Hb({global:!0,constructor:!0,wrap:!0,forced:cA},{Promise:pA}),Kb(pA,lA,!1,!0),Xb(lA);var MA=bb,LA=Db.CONSTRUCTOR||!Af((function(e){MA.all(e).then(void 0,(function(){}))})),PA=L,DA=Ie,zA=zb,$A=xb,FA=$y;Tn({target:"Promise",stat:!0,forced:LA},{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++,PA(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=Tn,qA=Db.CONSTRUCTOR;bb&&bb.prototype,UA({target:"Promise",proto:!0,forced:qA,real:!0},{catch:function(e){return this.then(void 0,e)}});var BA=L,HA=Ie,VA=zb,YA=xb,WA=$y;Tn({target:"Promise",stat:!0,forced:LA},{race:function(e){var t=this,n=VA.f(t),r=n.reject,i=YA((function(){var i=HA(t.resolve);WA(e,(function(e){BA(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var GA=L,KA=zb;Tn({target:"Promise",stat:!0,forced:Db.CONSTRUCTOR},{reject:function(e){var t=KA.f(this);return GA(t.reject,void 0,e),t.promise}});var XA=nn,QA=re,JA=zb,ZA=function(e,t){if(XA(e),QA(t)&&t.constructor===e)return t;var n=JA.f(e);return(0,n.resolve)(t),n.promise},ew=Tn,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=L,sw=Ie,uw=zb,lw=xb,cw=$y;Tn({target:"Promise",stat:!0,forced:LA},{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=L,fw=Ie,hw=le,vw=zb,pw=xb,mw=$y,gw="No one promise resolved";Tn({target:"Promise",stat:!0,forced:LA},{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=Tn,xw=bb,bw=u,Aw=le,ww=N,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,kw=zb,Sw=xb;Tn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=kw.f(this),n=Sw(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Tw=jw,Nw=ov;!function(e){var t=uy.default,n=Pn,r=Jl,i=Kg,o=ry,a=ly,s=Qg,u=Tw,l=Nw,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 P(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 k={};b(k,g,(function(){return this}));var S=o&&o(o(D([])));S&&S!==h&&v.call(S,g)&&(k=S);var T=j.prototype=_.prototype=i(k);function N(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(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(T,"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(T),e},f.awrap=function(e){return{__await:e}},N(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()}))},N(T),b(T,x,"Generator"),b(T,g,(function(){return this})),b(T,"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,P.prototype={constructor:P,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,L),!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),L(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;L(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:{}},Lw=u((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Pw=u,Dw=re,zw=E,$w=Lw,Fw=Object.isExtensible,Uw=Pw((function(){Fw(1)}))||$w?function(e){return!!Dw(e)&&(!$w||"ArrayBuffer"!=zw(e))&&(!Fw||Fw(e))}:Fw,qw=!u((function(){return Object.isExtensible(Object.preventExtensions({}))})),Bw=Tn,Hw=x,Vw=li,Yw=re,Ww=Ze,Gw=Qt.f,Kw=Vi,Xw=Gi,Qw=Uw,Jw=qw,Zw=!1,eE=it("meta"),tE=0,nE=function(e){Gw(e,eE,{value:{objectID:"O"+tE++,weakData:{}}})},rE=Mw.exports={enable:function(){rE.enable=function(){},Zw=!0;var e=Kw.f,t=Hw([].splice),n={};n[eE]=1,e(n).length&&(Kw.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},Bw({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Xw.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=Tn,aE=s,sE=iE,uE=u,lE=gn,cE=$y,dE=fx,fE=N,hE=re,vE=Lo,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=Hi,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=Xt,jE=fx,kE=G,SE=$y,TE=fl,NE=hl,RE=lx,OE=O,IE=iE.fastKey,ME=Qo.set,LE=Qo.getterFor,PE={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),kE(i)||SE(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=LE(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=LE(t),o=LE(r);TE(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)?NE("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,NE(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)}}),PE);var DE=i(ie.Map),zE=oa.some;Tn({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,qE=Array.prototype,BE=i((function(e){var t=e.some;return e===qE||FE(qE,e)&&t===qE.some?UE:t})),HE=zc("Array").keys,VE=sr,YE=Ze,WE=ce,GE=HE,KE=Array.prototype,XE={DOMTokenList:!0,NodeList:!0},QE=i((function(e){var t=e.keys;return e===KE||WE(KE,e)&&t===KE.keys||YE(XE,VE(e))?GE: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_=Tn,c_=x,d_=Ie,f_=Xe,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)})),k_=m_((function(){E_.sort(null)})),S_=y_("sort"),T_=!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_||!k_||!S_||!T_},{sort:function(e){void 0!==e&&d_(e);var t=f_(this);if(T_)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 N_=zc("Array").sort,R_=ce,O_=N_,I_=Array.prototype,M_=i((function(e){var t=e.sort;return e===I_||R_(I_,e)&&t===I_.sort?O_:t})),L_=zc("Array").values,P_=sr,D_=Ze,z_=ce,$_=L_,F_=Array.prototype,U_={DOMTokenList:!0,NodeList:!0},q_=i((function(e){var t=e.values;return e===F_||z_(F_,e)&&t===F_.values||D_(U_,P_(e))?$_:t})),B_=i(mc),H_=zc("Array").entries,V_=sr,Y_=Ze,W_=ce,G_=H_,K_=Array.prototype,X_={DOMTokenList:!0,NodeList:!0},Q_=i((function(e){var t=e.entries;return e===K_||W_(K_,e)&&t===K_.entries||Y_(X_,V_(e))?G_: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;Xh(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 *");Xh(r=Ih(i=[]).call(i,kh(this._subscribers[e]),kh(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)}}),PE);var sC,uC=i(ie.Set),lC=i(of);function cC(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Ph(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=B_;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=kh(this._pairs)).call(e,(function(e){return e[0]}))}},{key:"toItemArray",value:function(){var e;return yd(e=kh(this._pairs)).call(e,(function(e){return e[1]}))}},{key:"toEntryArray",value:function(){return kh(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(kh(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({},B_,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({},B_,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({},B_,(function(){var e;return lC(M_(e=kh(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?Xh(n=hC(Object(i),!0)).call(n,(function(t){_c(e,t,i[t])})):Vf?Jf(e,Vf(i)):Xh(r=hC(Object(i))).call(r,(function(t){Zf(e,t,Mf(i,t))}))}return e}function pC(e,t){var n=void 0!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Ph(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(Gg(o=n.call(this)),"flush",void 0),_c(Gg(o),"length",void 0),_c(Gg(o),"_options",void 0),_c(Gg(o),"_data",void 0),_c(Gg(o),"_idProp",void 0),_c(Gg(o),"_queue",null),e&&!Ph(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(Ph(e)){var o=yd(e).call(e,(function(e){return e[r._idProp]}));if(BE(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(Ph(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;Ph(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):Ph(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=kh(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=kh(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=kh(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=kh(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=Ph(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=Ph(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=kh(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(q_(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(q_(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=kh(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({},B_,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({},B_,Hc(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(Gg(a=n.call(this)),"length",0),_c(Gg(a),"_listener",void 0),_c(Gg(a),"_data",void 0),_c(Gg(a),"_ids",new uC),_c(Gg(a),"_options",void 0),a._options=i||{},a._listener=Hc(o=a._onEvent).call(o,Gg(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=kh(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)||Ph(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,Xh(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({},B_,Hc(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!==Sh&&_f(e)||e["@@iterator"];if(!n){if(Ph(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}}}}(Lh(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 Xh(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 Ld(e)},e.isDataSetLike=bC,e.isDataViewLike=function(e,t){return"object"===xc(t)&&null!==t&&e===t.idProp&&"function"==typeof Xh(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)},34108:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>S,X$:()=>N});var r={grad:.9,turn:360,rad:360/(2*Math.PI)},i=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},o=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},a=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},s=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},u=function(e){return{r:a(e.r,0,255),g:a(e.g,0,255),b:a(e.b,0,255),a:a(e.a)}},l=function(e){return{r:o(e.r),g:o(e.g),b:o(e.b),a:o(e.a,3)}},c=/^#([0-9a-f]{3,8})$/i,d=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},f=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}},h=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}},v=function(e){return{h:s(e.h),s:a(e.s,0,100),l:a(e.l,0,100),a:a(e.a)}},p=function(e){return{h:o(e.h),s:o(e.s),l:o(e.l),a:o(e.a,3)}},m=function(e){return h((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},g=function(e){return{h:(t=f(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},y=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,x=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,b=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,A=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,w={string:[[function(e){var t=c.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?o(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?o(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=b.exec(e)||A.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:u({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=y.exec(e)||x.exec(e);if(!t)return null;var n,i,o=v({h:(n=t[1],i=t[2],void 0===i&&(i="deg"),Number(n)*(r[i]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return m(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=void 0===o?1:o;return i(t)&&i(n)&&i(r)?u({r:Number(t),g:Number(n),b:Number(r),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,a=void 0===o?1:o;if(!i(t)||!i(n)||!i(r))return null;var s=v({h:Number(t),s:Number(n),l:Number(r),a:Number(a)});return m(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,u=void 0===o?1:o;if(!i(t)||!i(n)||!i(r))return null;var l=function(e){return{h:s(e.h),s:a(e.s,0,100),v:a(e.v,0,100),a:a(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(u)});return h(l)},"hsv"]]},E=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]},_=function(e,t){var n=g(e);return{h:n.h,s:a(n.s+100*t,0,100),l:n.l,a:n.a}},C=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},j=function(e,t){var n=g(e);return{h:n.h,s:n.s,l:a(n.l+100*t,0,100),a:n.a}},k=function(){function e(e){this.parsed=function(e){return"string"==typeof e?E(e.trim(),w.string):"object"==typeof e&&null!==e?E(e,w.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 o(C(this.rgba),2)},e.prototype.isDark=function(){return C(this.rgba)<.5},e.prototype.isLight=function(){return C(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=l(this.rgba)).r,n=e.g,r=e.b,a=(i=e.a)<1?d(o(255*i)):"","#"+d(t)+d(n)+d(r)+a;var e,t,n,r,i,a},e.prototype.toRgb=function(){return l(this.rgba)},e.prototype.toRgbString=function(){return t=(e=l(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 p(g(this.rgba))},e.prototype.toHslString=function(){return t=(e=p(g(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=f(this.rgba),{h:o(e.h),s:o(e.s),v:o(e.v),a:o(e.a,3)};var e},e.prototype.invert=function(){return S({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),S(_(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),S(_(this.rgba,-e))},e.prototype.grayscale=function(){return S(_(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),S(j(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),S(j(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?S({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):o(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=g(this.rgba);return"number"==typeof e?S({h:e,s:t.s,l:t.l,a:t.a}):o(t.h)},e.prototype.isEqual=function(e){return this.toHex()===S(e).toHex()},e}(),S=function(e){return e instanceof k?e:new k(e)},T=[],N=function(e){e.forEach((function(e){T.indexOf(e)<0&&(e(k,w),T.push(e))}))}}}]);
3
+ //# sourceMappingURL=4330.37e8a0dd.chunk.js.map