1/*! For license information please see 880.64333554.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkreactjs=self.webpackChunkreactjs||[]).push([[880],{72878:function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"}},34231:function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"}},59961:function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.default={icon:function(t,e){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:e}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"}},65097:function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.default={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"}},13844:function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.default={icon:function(t,e){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:e}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:e}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:e}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"}},7177:function(t,e,n){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=(r=n(5433))&&r.__esModule?r:{default:r};e.default=i,t.exports=i},77567:function(t,e,n){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=(r=n(13673))&&r.__esModule?r:{default:r};
2e.default=i,t.exports=i},90672:function(t,e,n){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=(r=n(80521))&&r.__esModule?r:{default:r};e.default=i,t.exports=i},47046:function(t,e,n){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=(r=n(59011))&&r.__esModule?r:{default:r};e.default=i,t.exports=i},68652:function(t,e,n){var r;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=(r=n(81162))&&r.__esModule?r:{default:r};e.default=i,t.exports=i},6314:function(t,e,n){n.d(e,{Z:function(){return s}});var r=n(1413),i=n(72791),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M518.3 459a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-upload",theme:"outlined"},a=n(63717),l=function(t,e){return i.createElement(a.Z,(0,r.Z)((0,r.Z)({},t),{},{ref:e,icon:o}))};l.displayName="CloudUploadOutlined";var s=i.forwardRef(l)},5433:function(t,e,n){var r=n(64836),i=n(18698);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(42122)),a=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!==typeof t)return{default:t};var n=u(e);if(n&&n.has(t))return n.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var l=o?Object.getOwnPropertyDescriptor(t,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=t[a]}r.default=t,n&&n.set(t,r);return r}(n(72791)),l=r(n(72878)),s=r(n(32225));function u(t){if("function"!==typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(u=function(t){return t?n:e})(t)}var c=function(t,e){return a.createElement(s.default,(0,o.default)((0,o.default)({},t),{},{ref:e,icon:l.default}))};c.displayName="DeleteOutlined";var h=a.forwardRef(c);e.default=h},13673:function(t,e,n){var r=n(64836),i=n(18698);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(42122)),a=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!==typeof t)return{default:t};var n=u(e);if(n&&n.has(t))return n.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var l=o?Object.getOwnPropertyDescriptor(t,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=t[a]}r.default=t,n&&n.set(t,r);return r}(n(72791)),l=r(n(34231)),s=r(n(32225));function u(t){if("function"!==typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(u=function(t){return t?n:e})(t)}var c=function(t,e){return a.createElement(s.default,(0,o.default)((0,o.default)({},t),{},{ref:e,icon:l.default}))};c.displayName="DownloadOutlined";var h=a.forwardRef(c);e.default=h},80521:function(t,e,n){var r=n(64836),i=n(18698);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(42122)),a=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!==typeof t)return{default:t};var n=u(e);if(n&&n.has(t))return n.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var l=o?Object.getOwnPropertyDescriptor(t,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=t[a]}r.default=t,n&&n.set(t,r);return r}(n(72791)),l=r(n(59961)),s=r(n(32225));function u(t){if("function"!==typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(u=function(t){return t?n:e})(t)}var c=function(t,e){return a.createElement(s.default,(0,o.default)((0,o.default)({},t),{},{ref:e,icon:l.default}))};c.displayName="FileTwoTone";var h=a.forwardRef(c);e.default=h},59011:function(t,e,n){var r=n(64836),i=n(18698);
2Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(42122)),a=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!==typeof t)return{default:t};var n=u(e);if(n&&n.has(t))return n.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var l=o?Object.getOwnPropertyDescriptor(t,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=t[a]}r.default=t,n&&n.set(t,r);return r}(n(72791)),l=r(n(65097)),s=r(n(32225));function u(t){if("function"!==typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(u=function(t){return t?n:e})(t)}var c=function(t,e){return a.createElement(s.default,(0,o.default)((0,o.default)({},t),{},{ref:e,icon:l.default}))};c.displayName="PaperClipOutlined";var h=a.forwardRef(c);e.default=h},81162:function(t,e,n){var r=n(64836),i=n(18698);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(n(42122)),a=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!==typeof t)return{default:t};var n=u(e);if(n&&n.has(t))return n.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var l=o?Object.getOwnPropertyDescriptor(t,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=t[a]}r.default=t,n&&n.set(t,r);return r}(n(72791)),l=r(n(13844)),s=r(n(32225));function u(t){if("function"!==typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(u=function(t){return t?n:e})(t)}var c=function(t,e){return a.createElement(s.default,(0,o.default)((0,o.default)({},t),{},{ref:e,icon:l.default}))};c.displayName="PictureTwoTone";var h=a.forwardRef(c);e.default=h},39142:function(t,e,n){n.d(e,{AfN:function(){return iw},CoU:function(){return po},D6R:function(){return Dx},EDF:function(){return pw},F1h:function(){return db},HZt:function(){return JL},Hu7:function(){return UE},IZo:function(){return AE},KdS:function(){return ow},LRf:function(){return ob},N6r:function(){return KL},NO_:function(){return lw},O9R:function(){return ZE},Pyr:function(){return Mx},TA7:function(){return $L},Teh:function(){return go},Unm:function(){return jS},VQD:function(){return nw},WNh:function(){return pa},Wg1:function(){return rw},X0t:function(){return lS},_61:function(){return Zo},_Ge:function(){return WS},__x:function(){return fo},agQ:function(){return aw},c8d:function(){return fb},ch4:function(){return uo},d5G:function(){return YE},f4X:function(){return Sb},o3g:function(){return Bx},q7_:function(){return Vw},qPk:function(){return kx},utx:function(){return QC},vQq:function(){return ib},vhY:function(){return jo}}),t=n.hmd(t);var r=Object.freeze({__proto__:null,get Base(){return _i},get Circle(){return Li},get Ellipse(){return Ii},get Image(){return Ai},get Line(){return Ni},get Marker(){return zi},get Path(){return qi},get Polygon(){return $i},get Polyline(){return Ji},get Rect(){return eo},get Text(){return ro}}),i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)};var l=function(t){return null!==t&&"function"!==typeof t&&isFinite(t.length)},s={}.toString,u=function(t,e){return s.call(t)==="[object "+e+"]"},c=function(t){return u(t,"Function")},h=function(t){return null===t||void 0===t},d=function(t){return Array.isArray?Array.isArray(t):u(t,"Array")},f=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};function p(t,e){if(t)if(d(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(f(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var v=function(t){return"object"===typeof t&&null!==t},g=function(t){if(d(t))return t.reduce((function(t,e){return Math.max(t,e)}),t[0])},y=function(t){if(d(t))return t.reduce((function(t,e){return Math.min(t,e)}),t[0])},m=function(t){return u(t,"String")},C=function(t){return u(t,"Number")};var w=function(t,e){return(t%e+e)%e},x=Math.PI/180,b=function(t){return x*t},S=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return p(t,(function(n,r){c(t)&&"prototype"===r||e.push(n)})),e},_=function(t){var e=function(t){return h(t)?"":t.toString()}(t);return e.charAt(0).toUpperCase()+e.substring(1)};function E(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function L(t,e,n,r){return e&&E(t,e),n&&E(t,n),r&&E(t,r),t}var T,O=function t(e,n){if(e===n)return!0;
2if(!e||!n)return!1;if(m(e)||m(n))return!1;if(l(e)||l(n)){if(e.length!==n.length)return!1;for(var r=!0,i=0;i<e.length&&(r=t(e[i],n[i]));i++);return r}if(v(e)||v(n)){var o=Object.keys(e),a=Object.keys(n);if(o.length!==a.length)return!1;for(r=!0,i=0;i<o.length&&(r=t(e[o[i]],n[o[i]]));i++);return r}return!1},I={},M=function(t){return I[t=t||"g"]?I[t]+=1:I[t]=1,t+I[t]},R=function(){};!function(t,e){if(!c(t))throw new TypeError("Expected a function");var n=function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return T||(T=document.createElement("canvas").getContext("2d")),T.font=[o,a,i,n+"px",r].join(" "),T.measureText(m(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,l=o.length;a<l;a++,i++)r[i]=o[a];return r}([t],S(e)).join("")}));var A="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",B=new RegExp("([a-z])["+A+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+A+"]*,?["+A+"]*)+)","ig"),k=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+A+"]*,?["+A+"]*","ig"),N=function(t){if(!t)return null;if(d(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(B,(function(r,i,o){var a=[],l=i.toLowerCase();if(o.replace(k,(function(t,e){e&&a.push(+e)})),"m"===l&&a.length>2&&(n.push([i].concat(a.splice(0,2))),l="l",i="m"===i?"l":"L"),"o"===l&&1===a.length&&n.push([i,a[0]]),"r"===l)n.push([i].concat(a));else for(;a.length>=e[l]&&(n.push([i].concat(a.splice(0,e[l]))),e[l]););return t})),n},D=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var o=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?o[3]={x:+t[0],y:+t[1]}:i-2===r&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?o[3]=o[2]:r||(o[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n},P=function(t,e,n,r,i){var o=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var a=Math.PI/180,l=t+n*Math.cos(-r*a),s=t+n*Math.cos(-i*a);o=[["M",l,e+n*Math.sin(-r*a)],["A",n,n,0,+(i-r>180),0,s,e+n*Math.sin(-i*a)]]}else o=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return o},z=function(t){if(!(t=N(t))||!t.length)return[["M",0,0]];var e,n,r=[],i=0,o=0,a=0,l=0,s=0;"M"===t[0][0]&&(a=i=+t[0][1],l=o=+t[0][2],s++,r[0]=["M",i,o]);for(var u=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),c=void 0,h=void 0,d=s,f=t.length;d<f;d++){if(r.push(c=[]),(e=(h=t[d])[0])!==e.toUpperCase())switch(c[0]=e.toUpperCase(),c[0]){case"A":c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5],c[6]=+h[6]+i,c[7]=+h[7]+o;break;case"V":c[1]=+h[1]+o;break;case"H":c[1]=+h[1]+i;break;case"R":for(var p=2,v=(n=[i,o].concat(h.slice(1))).length;p<v;p++)n[p]=+n[p]+i,n[++p]=+n[p]+o;r.pop(),r=r.concat(D(n,u));break;case"O":r.pop(),(n=P(i,o,h[1],h[2])).push(n[0]),r=r.concat(n);break;case"U":r.pop(),r=r.concat(P(i,o,h[1],h[2],h[3])),c=["U"].concat(r[r.length-1].slice(-2));break;case"M":a=+h[1]+i,l=+h[2]+o;break;default:for(p=1,v=h.length;p<v;p++)c[p]=+h[p]+(p%2?i:o)}else if("R"===e)n=[i,o].concat(h.slice(1)),r.pop(),r=r.concat(D(n,u)),c=["R"].concat(h.slice(-2));else if("O"===e)r.pop(),(n=P(i,o,h[1],h[2])).push(n[0]),r=r.concat(n);else if("U"===e)r.pop(),r=r.concat(P(i,o,h[1],h[2],h[3])),c=["U"].concat(r[r.length-1].slice(-2));else for(var g=0,y=h.length;g<y;g++)c[g]=h[g];if("O"!==(e=e.toUpperCase()))switch(c[0]){case"Z":i=+a,o=+l;break;case"H":i=c[1];break;case"V":o=c[1];break;case"M":a=c[c.length-2],l=c[c.length-1];break;default:i=c[c.length-2],o=c[c.length-1]}}return r},F=function(t,e,n,r){return[t,e,n,r,n,r]},H=function(t,e,n,r,i,o){var a=1/3,l=2/3;
2return[a*t+l*n,a*e+l*r,a*i+l*n,a*o+l*r,i,o]},W=function t(e,n,r,i,o,a,l,s,u,c){r===i&&(r+=1);var h,d,f,p,v,g=120*Math.PI/180,y=Math.PI/180*(+o||0),m=[],C=function(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}};if(c)d=c[0],f=c[1],p=c[2],v=c[3];else{e=(h=C(e,n,-y)).x,n=h.y,s=(h=C(s,u,-y)).x,u=h.y,e===s&&n===u&&(s+=1,u+=1);var w=(e-s)/2,x=(n-u)/2,b=w*w/(r*r)+x*x/(i*i);b>1&&(r*=b=Math.sqrt(b),i*=b);var S=r*r,_=i*i,E=(a===l?-1:1)*Math.sqrt(Math.abs((S*_-S*x*x-_*w*w)/(S*x*x+_*w*w)));p=E*r*x/i+(e+s)/2,v=E*-i*w/r+(n+u)/2,d=Math.asin(((n-v)/i).toFixed(9)),f=Math.asin(((u-v)/i).toFixed(9)),d=e<p?Math.PI-d:d,f=s<p?Math.PI-f:f,d<0&&(d=2*Math.PI+d),f<0&&(f=2*Math.PI+f),l&&d>f&&(d-=2*Math.PI),!l&&f>d&&(f-=2*Math.PI)}var L=f-d;if(Math.abs(L)>g){var T=f,O=s,I=u;f=d+g*(l&&f>d?1:-1),m=t(s=p+r*Math.cos(f),u=v+i*Math.sin(f),r,i,o,0,l,O,I,[f,T,p,v])}L=f-d;var M=Math.cos(d),R=Math.sin(d),A=Math.cos(f),B=Math.sin(f),k=Math.tan(L/4),N=4/3*r*k,D=4/3*i*k,P=[e,n],z=[e+N*R,n-D*M],F=[s+N*B,u-D*A],H=[s,u];if(z[0]=2*P[0]-z[0],z[1]=2*P[1]-z[1],c)return[z,F,H].concat(m);for(var W=[],G=0,j=(m=[z,F,H].concat(m).join().split(",")).length;G<j;G++)W[G]=G%2?C(m[G-1],m[G],y).y:C(m[G],m[G+1],y).x;return W},G=function(t,e){var n,r=z(t),i=e&&z(e),o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},l=[],s=[],u="",c="",h=function(t,e,n){var r,i;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"].concat(W.apply(0,[e.x,e.y].concat(t.slice(1))));break;case"S":"C"===n||"S"===n?(r=2*e.x-e.bx,i=2*e.y-e.by):(r=e.x,i=e.y),t=["C",r,i].concat(t.slice(1));break;case"T":"Q"===n||"T"===n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"].concat(H(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"].concat(H(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"].concat(F(e.x,e.y,t[1],t[2]));break;case"H":t=["C"].concat(F(e.x,e.y,t[1],e.y));break;case"V":t=["C"].concat(F(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"].concat(F(e.x,e.y,e.X,e.Y))}return t},d=function(t,e){if(t[e].length>7){t[e].shift();for(var o=t[e];o.length;)l[e]="A",i&&(s[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),n=Math.max(r.length,i&&i.length||0)}},f=function(t,e,o,a,l){t&&e&&"M"===t[l][0]&&"M"!==e[l][0]&&(e.splice(l,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[l][1],o.y=t[l][2],n=Math.max(r.length,i&&i.length||0))};n=Math.max(r.length,i&&i.length||0);for(var p=0;p<n;p++){r[p]&&(u=r[p][0]),"C"!==u&&(l[p]=u,p&&(c=l[p-1])),r[p]=h(r[p],o,c),"A"!==l[p]&&"C"===u&&(l[p]="C"),d(r,p),i&&(i[p]&&(u=i[p][0]),"C"!==u&&(s[p]=u,p&&(c=s[p-1])),i[p]=h(i[p],a,c),"A"!==s[p]&&"C"===u&&(s[p]="C"),d(i,p)),f(r,i,o,a,p),f(i,r,a,o,p);var v=r[p],g=i&&i[p],y=v.length,m=i&&g.length;o.x=v[y-2],o.y=v[y-1],o.bx=parseFloat(v[y-4])||o.x,o.by=parseFloat(v[y-3])||o.y,a.bx=i&&(parseFloat(g[m-4])||a.x),a.by=i&&(parseFloat(g[m-3])||a.y),a.x=i&&g[m-2],a.y=i&&g[m-1]}return i?[r,i]:r},j=/,?([a-z]),?/gi,U=function(t){return t.join(",").replace(j,"$1")},V=function(t,e,n,r,i){return t*(t*(-3*e+9*n-9*r+3*i)+6*e-12*n+6*r)-3*e+3*n},Y=function(t,e,n,r,i,o,a,l,s){null===s&&(s=1);for(var u=(s=s>1?1:s<0?0:s)/2,c=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,f=0;f<12;f++){var p=u*c[f]+u,v=V(p,t,n,i,a),g=V(p,e,r,o,l),y=v*v+g*g;d+=h[f]*Math.sqrt(y)}return u*d},X=function(t,e,n,r,i,o,a,l){for(var s,u,c,h,d=[],f=[[],[]],p=0;p<2;++p)if(0===p?(u=6*t-12*n+6*i,s=-3*t+9*n-9*i+3*a,c=3*n-3*t):(u=6*e-12*r+6*o,s=-3*e+9*r-9*o+3*l,c=3*r-3*e),Math.abs(s)<1e-12){if(Math.abs(u)<1e-12)continue;(h=-c/u)>0&&h<1&&d.push(h)}else{var v=u*u-4*c*s,g=Math.sqrt(v);if(!(v<0)){var y=(-u+g)/(2*s);y>0&&y<1&&d.push(y);var m=(-u-g)/(2*s);m>0&&m<1&&d.push(m)}}for(var C,w=d.length,x=w;w--;)C=1-(h=d[w]),f[0][w]=C*C*C*t+3*C*C*h*n+3*C*h*h*i+h*h*h*a,f[1][w]=C*C*C*e+3*C*C*h*r+3*C*h*h*o+h*h*h*l;return f[0][x]=t,f[1][x]=e,f[0][x+1]=a,f[1][x+1]=l,f[0].length=f[1].length=x+2,{min:{x:Math.min.apply(0,f[0]),y:Math.min.apply(0,f[1])},max:{x:Math.max.apply(0,f[0]),y:Math.max.apply(0,f[1])}}},q=function(t,e,n,r,i,o,a,l){if(!(Math.max(t,n)<Math.min(i,a)||Math.min(t,n)>Math.max(i,a)||Math.max(e,r)<Math.min(o,l)||Math.min(e,r)>Math.max(o,l))){var s=(t-n)*(o-l)-(e-r)*(i-a);if(s){var u=((t*r-e*n)*(i-a)-(t-n)*(i*l-o*a))/s,c=((t*r-e*n)*(o-l)-(e-r)*(i*l-o*a))/s,h=+u.toFixed(2),d=+c.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,a).toFixed(2)||h>+Math.max(i,a).toFixed(2)||d<+Math.min(e,r).toFixed(2)||d>+Math.max(e,r).toFixed(2)||d<+Math.min(o,l).toFixed(2)||d>+Math.max(o,l).toFixed(2)))return{x:u,y:c}}}},K=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},Z=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var o=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return o.parsePathArray=U,o},$=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:Z(t,e,n,r),vb:[t,e,n,r].join(" ")}},Q=function(t,e,n,r,i,o,a,l){d(t)||(t=[t,e,n,r,i,o,a,l]);var s=X.apply(null,t);return $(s.min.x,s.min.y,s.max.x-s.min.x,s.max.y-s.min.y)},J=function(t,e,n,r,i,o,a,l,s){var u=1-s,c=Math.pow(u,3),h=Math.pow(u,2),d=s*s,f=d*s,p=t+2*s*(n-t)+d*(i-2*n+t),v=e+2*s*(r-e)+d*(o-2*r+e),g=n+2*s*(i-n)+d*(a-2*i+n),y=r+2*s*(o-r)+d*(l-2*o+r);return{x:c*t+3*h*s*n+3*u*s*s*i+f*a,y:c*e+3*h*s*r+3*u*s*s*o+f*l,m:{x:p,y:v},n:{x:g,y:y},start:{x:u*t+s*n,y:u*e+s*r},end:{x:u*i+s*a,y:u*o+s*l},alpha:90-180*Math.atan2(p-g,v-y)/Math.PI}},tt=function(t,e,n){if(!function(t,e){return t=$(t),e=$(e),K(e,t.x,t.y)||K(e,t.x2,t.y)||K(e,t.x,t.y2)||K(e,t.x2,t.y2)||K(t,e.x,e.y)||K(t,e.x2,e.y)||K(t,e.x,e.y2)||K(t,e.x2,e.y2)||(t.x<e.x2&&t.x>e.x||e.x<t.x2&&e.x>t.x)&&(t.y<e.y2&&t.y>e.y||e.y<t.y2&&e.y>t.y)}(Q(t),Q(e)))return n?0:[];for(var r=~~(Y.apply(0,t)/8),i=~~(Y.apply(0,e)/8),o=[],a=[],l={},s=n?0:[],u=0;u<r+1;u++){var c=J.apply(0,t.concat(u/r));o.push({x:c.x,y:c.y,t:u/r})}for(u=0;
2u<i+1;u++){c=J.apply(0,e.concat(u/i));a.push({x:c.x,y:c.y,t:u/i})}for(u=0;u<r;u++)for(var h=0;h<i;h++){var d=o[u],f=o[u+1],p=a[h],v=a[h+1],g=Math.abs(f.x-d.x)<.001?"y":"x",y=Math.abs(v.x-p.x)<.001?"y":"x",m=q(d.x,d.y,f.x,f.y,p.x,p.y,v.x,v.y);if(m){if(l[m.x.toFixed(4)]===m.y.toFixed(4))continue;l[m.x.toFixed(4)]=m.y.toFixed(4);var C=d.t+Math.abs((m[g]-d[g])/(f[g]-d[g]))*(f.t-d.t),w=p.t+Math.abs((m[y]-p[y])/(v[y]-p[y]))*(v.t-p.t);C>=0&&C<=1&&w>=0&&w<=1&&(n?s+=1:s.push({x:m.x,y:m.y,t1:C,t2:w}))}}return s};function et(t,e){var n=[],r=[];return t.length&&function t(e,i){if(1===e.length)n.push(e[0]),r.push(e[0]);else{for(var o=[],a=0;a<e.length-1;a++)0===a&&n.push(e[0]),a===e.length-2&&r.push(e[a+1]),o[a]=[(1-i)*e[a][0]+i*e[a+1][0],(1-i)*e[a][1]+i*e[a+1][1]];t(o,i)}}(t,e),{left:n,right:r.reverse()}}var nt=function(t,e,n){if(1===n)return[[].concat(t)];var r=[];if("L"===e[0]||"C"===e[0]||"Q"===e[0])r=r.concat(function(t,e,n){var r=[[t[1],t[2]]];n=n||2;var i=[];"A"===e[0]?(r.push(e[6]),r.push(e[7])):"C"===e[0]?(r.push([e[1],e[2]]),r.push([e[3],e[4]]),r.push([e[5],e[6]])):"S"===e[0]||"Q"===e[0]?(r.push([e[1],e[2]]),r.push([e[3],e[4]])):r.push([e[1],e[2]]);for(var o=r,a=1/n,l=0;l<n-1;l++){var s=et(o,a/(1-a*l));i.push(s.left),o=s.right}return i.push(o),i.map((function(t){var e=[];return 4===t.length&&(e.push("C"),e=e.concat(t[2])),t.length>=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var o=0;o<=n-1;o++)r.push(i)}return r},rt=function(t,e){if(t.length!==e.length)return!1;var n=!0;return p(t,(function(t,r){if(t!==e[r])return n=!1,!1})),n};function it(t,e,n){var r=null,i=n;return e<i&&(i=e,r="add"),t<i&&(i=t,r="del"),{type:r,min:i}}var ot=function(t,e){var n=function(t,e){var n,r,i=t.length,o=e.length,a=0;if(0===i||0===o)return null;for(var l=[],s=0;s<=i;s++)l[s]=[],l[s][0]={min:s};for(var u=0;u<=o;u++)l[0][u]={min:u};for(s=1;s<=i;s++)for(n=t[s-1],u=1;u<=o;u++){r=e[u-1],a=rt(n,r)?0:1;var c=l[s-1][u].min+1,h=l[s][u-1].min+1,d=l[s-1][u-1].min+a;l[s][u]=it(c,h,d)}return l}(t,e),r=t.length,i=e.length,o=[],a=1,l=1;if(n[r][i].min!==r){for(var s=1;s<=r;s++){var u=n[s][s].min;l=s;for(var c=a;c<=i;c++)n[s][c].min<u&&(u=n[s][c].min,l=c);a=l,n[s][a].type&&o.push({index:s-1,type:n[s][a].type})}for(s=o.length-1;s>=0;s--)a=o[s].index,"add"===o[s].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var h=i-(r=t.length);if(r<i)for(s=0;s<h;s++)"z"===t[r-1][0]||"Z"===t[r-1][0]?t.splice(r-2,0,t[r-2]):t.push(t[r-1]),r+=1;return t};function at(t,e,n){for(var r,i=[].concat(t),o=1/(n+1),a=lt(e)[0],l=1;l<=n;l++)o*=l,0===(r=Math.floor(t.length*o))?i.unshift([a[0]*o+t[r][0]*(1-o),a[1]*o+t[r][1]*(1-o)]):i.splice(r,0,[a[0]*o+t[r][0]*(1-o),a[1]*o+t[r][1]*(1-o)]);return i}function lt(t){var e=[];switch(t[0]){case"M":case"L":case"T":e.push([t[1],t[2]]);break;case"A":e.push([t[6],t[7]]);break;case"Q":case"S":e.push([t[3],t[4]]),e.push([t[1],t[2]]);break;case"C":e.push([t[5],t[6]]),e.push([t[1],t[2]]),e.push([t[3],t[4]]);break;case"H":case"V":e.push([t[1],t[1]])}return e}var st=function(t,e){if(t.length<=1)return t;for(var n,r=0;r<e.length;r++)if(t[r][0]!==e[r][0])switch(n=lt(t[r]),e[r][0]){case"M":t[r]=["M"].concat(n[0]);break;case"L":t[r]=["L"].concat(n[0]);break;case"A":t[r]=[].concat(e[r]),t[r][6]=n[0][0],t[r][7]=n[0][1];break;case"Q":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=at(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=at(n,t[r-1],2)}t[r]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=at(n,t[r-1],1)}t[r]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[r]=e[r]}return t},ut=Object.freeze({__proto__:null,catmullRomToBezier:D,fillPath:function(t,e){if(1===t.length)return t;var n=t.length-1,r=e.length-1,i=n/r,o=[];if(1===t.length&&"M"===t[0][0]){for(var a=0;a<r-n;a++)t.push(t[0]);return t}for(a=0;a<r;
2a++){var l=Math.floor(i*a);o[l]=(o[l]||0)+1}var s=o.reduce((function(e,r,i){return i===n?e.concat(t[n]):e.concat(nt(t[i],t[i+1],r))}),[]);return s.unshift(t[0]),"Z"!==e[r]&&"z"!==e[r]||s.push("Z"),s},fillPathByDiff:ot,formatPath:st,intersection:function(t,e){return function(t,e,n){var r,i,o,a,l,s,u,c,h,d;t=G(t),e=G(e);for(var f=n?0:[],p=0,v=t.length;p<v;p++){var g=t[p];if("M"===g[0])r=l=g[1],i=s=g[2];else{"C"===g[0]?(h=[r,i].concat(g.slice(1)),r=h[6],i=h[7]):(h=[r,i,r,i,l,s,l,s],r=l,i=s);for(var y=0,m=e.length;y<m;y++){var C=e[y];if("M"===C[0])o=u=C[1],a=c=C[2];else{"C"===C[0]?(d=[o,a].concat(C.slice(1)),o=d[6],a=d[7]):(d=[o,a,o,a,u,c,u,c],o=u,a=c);var w=tt(h,d,n);if(n)f+=w;else{for(var x=0,b=w.length;x<b;x++)w[x].segment1=p,w[x].segment2=y,w[x].bez1=h,w[x].bez2=d;f=f.concat(w)}}}}}return f}(t,e)},parsePathArray:U,parsePathString:N,pathToAbsolute:z,pathToCurve:G,rectPath:Z}),ct=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),ht=function(t,e){return ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},ht(t,e)};function dt(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ht(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ft=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0)},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this._events[t]||[],o=this._events["*"]||[],a=function(r){for(var i=r.length,o=0;o<i;o++)if(r[o]){var a=r[o],l=a.callback;a.once&&(r.splice(o,1),0===r.length&&delete e._events[t],i--,o--),l.apply(e,n)}};a(i),a(o)},t.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},t.prototype.getEvents=function(){return this._events},t}();function pt(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}var vt="undefined"!==typeof window&&"undefined"!==typeof window.document;function gt(t,e){if(t.isCanvas())return!0;for(var n=e.getParent(),r=!1;n;){if(n===t){r=!0;break}n=n.getParent()}return r}function yt(t){return t.cfg.visible&&t.cfg.capture}var mt=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var r=n.getDefaultCfg();return n.cfg=L(r,e),n}return dt(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(ft),Ct=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},wt=function(t,e,n){this.name=t,this.version=e,this.os=n,this.type="browser"},xt=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},bt=function(t,e,n,r){this.name=t,this.version=e,this.os=n,this.bot=r,this.type="bot-device"},St=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},_t=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},Et=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Lt=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;
2\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],Tt=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function Ot(t){var e=function(t){return""!==t&&Lt.reduce((function(e,n){var r=n[0],i=n[1];if(e)return e;var o=i.exec(t);return!!o&&[r,o]}),!1)}(t);if(!e)return null;var n=e[0],r=e[1];if("searchbot"===n)return new St;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<3&&(i=Ct(Ct([],i,!0),function(t){for(var e=[],n=0;n<t;n++)e.push("0");return e}(3-i.length),!0)):i=[];var o=i.join("."),a=function(t){for(var e=0,n=Tt.length;e<n;e++){var r=Tt[e],i=r[0];if(r[1].exec(t))return i}return null}(t),l=Et.exec(t);return l&&l[1]?new bt(n,o,a,l[1]):new wt(n,o,a)}var It="undefined"!==typeof Float32Array?Float32Array:Array;function Mt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],h=e[8],d=n[0],f=n[1],p=n[2],v=n[3],g=n[4],y=n[5],m=n[6],C=n[7],w=n[8];return t[0]=d*r+f*a+p*u,t[1]=d*i+f*l+p*c,t[2]=d*o+f*s+p*h,t[3]=v*r+g*a+y*u,t[4]=v*i+g*l+y*c,t[5]=v*o+g*s+y*h,t[6]=m*r+C*a+w*u,t[7]=m*i+C*l+w*c,t[8]=m*o+C*s+w*h,t}function Rt(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function At(t,e,n){var r=[0,0,0,0,0,0,0,0,0];return function(t,e){t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1}(r,n),Mt(t,r,e)}function Bt(t,e,n){var r=[0,0,0,0,0,0,0,0,0];return function(t,e){var n=Math.sin(e),r=Math.cos(e);t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1}(r,n),Mt(t,r,e)}function kt(t,e,n){var r=[0,0,0,0,0,0,0,0,0];return function(t,e){t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1}(r,n),Mt(t,r,e)}function Nt(t,e){for(var n,r,i,o=t?[].concat(t):[1,0,0,0,1,0,0,0,1],a=0,l=e.length;a<l;a++){var s=e[a];switch(s[0]){case"t":At(o,o,[s[1],s[2]]);break;case"s":kt(o,o,[s[1],s[2]]);break;case"r":Bt(o,o,s[1]);break;case"m":n=o,r=o,i=s[1],Mt(n,i,r)}}return o}function Dt(t,e){var n=[],r=t[0],i=t[1],o=t[2],a=t[3],l=t[4],s=t[5],u=t[6],c=t[7],h=t[8],d=e[0],f=e[1],p=e[2],v=e[3],g=e[4],y=e[5],m=e[6],C=e[7],w=e[8];return n[0]=d*r+f*a+p*u,n[1]=d*i+f*l+p*c,n[2]=d*o+f*s+p*h,n[3]=v*r+g*a+y*u,n[4]=v*i+g*l+y*c,n[5]=v*o+g*s+y*h,n[6]=m*r+C*a+w*u,n[7]=m*i+C*l+w*c,n[8]=m*o+C*s+w*h,n}function Pt(t,e){var n=[],r=e[0],i=e[1];return n[0]=t[0]*r+t[3]*i+t[6],n[1]=t[1]*r+t[4]*i+t[7],n}function zt(t){var e=[],n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],l=t[5],s=t[6],u=t[7],c=t[8],h=c*a-l*u,d=-c*o+l*s,f=u*o-a*s,p=n*h+r*d+i*f;return p?(p=1/p,e[0]=h*p,e[1]=(-c*r+i*u)*p,e[2]=(l*r-i*a)*p,e[3]=d*p,e[4]=(c*n-i*s)*p,e[5]=(-l*n+i*o)*p,e[6]=f*p,e[7]=(-u*n+r*s)*p,e[8]=(a*n-r*o)*p,e):null}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),function(){var t=function(){var t=new It(3);return It!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}()}(),function(){var t=function(){var t=new It(2);return It!=Float32Array&&(t[0]=0,t[1]=0),t}()}();var Ft=Nt,Ht="matrix",Wt=["zIndex","capture","visible","type"],Gt
2=["repeat"];function jt(t,e){var n={},r=e.attrs;for(var i in t)n[i]=r[i];return n}function Ut(t,e){var n={},r=e.attr();return p(t,(function(t,e){-1!==Gt.indexOf(e)||O(r[e],t)||(n[e]=t)})),n}function Vt(t,e){if(e.onFrame)return t;var n=e.startTime,r=e.delay,i=e.duration,o=Object.prototype.hasOwnProperty;return p(t,(function(t){n+r<t.startTime+t.delay+t.duration&&i>t.delay&&p(e.toAttrs,(function(e,n){o.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var Yt=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var r=n.getDefaultAttrs();return L(r,e.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return dt(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e[0],i=e[1];if(!r)return this.attrs;if(f(r)){for(var o in r)this.setAttr(o,r[o]);return this.afterAttrsChange(r),this}return 2===e.length?(this.setAttr(r,i),this.afterAttrsChange(((t={})[r]=i,t)),this):this.attrs[r]},e.prototype.isClipped=function(t,e){var n=this.getClip();return n&&!n.isHit(t,e)},e.prototype.setAttr=function(t,e){var n=this.attrs[t];n!==e&&(this.attrs[t]=e,this.onAttrChange(t,e,n))},e.prototype.onAttrChange=function(t,e,n){"matrix"===t&&this.set("totalMatrix",null)},e.prototype.afterAttrsChange=function(t){if(this.cfg.isClipShape){var e=this.cfg.applyTo;e&&e.onCanvasChange("clip")}else this.onCanvasChange("attr")},e.prototype.show=function(){return this.set("visible",!0),this.onCanvasChange("show"),this},e.prototype.hide=function(){return this.set("visible",!1),this.onCanvasChange("hide"),this},e.prototype.setZIndex=function(t){this.set("zIndex",t);var e=this.getParent();return e&&e.sort(),this},e.prototype.toFront=function(){var t=this.getParent();if(t){var e=t.getChildren();this.get("el");var n=e.indexOf(this);e.splice(n,1),e.push(this),this.onCanvasChange("zIndex")}},e.prototype.toBack=function(){var t=this.getParent();if(t){var e=t.getChildren();this.get("el");var n=e.indexOf(this);e.splice(n,1),e.unshift(this),this.onCanvasChange("zIndex")}},e.prototype.remove=function(t){void 0===t&&(t=!0);var e=this.getParent();e?(pt(e.getChildren(),this),e.get("clearing")||this.onCanvasChange("remove")):this.onCanvasChange("remove"),t&&this.destroy()},e.prototype.resetMatrix=function(){this.attr(Ht,this.getDefaultMatrix()),this.onCanvasChange("matrix")},e.prototype.getMatrix=function(){return this.attr(Ht)}
2,e.prototype.setMatrix=function(t){this.attr(Ht,t),this.onCanvasChange("matrix")},e.prototype.getTotalMatrix=function(){var t=this.cfg.totalMatrix;if(!t){var e=this.attr("matrix"),n=this.cfg.parentMatrix;t=n&&e?Dt(n,e):e||n,this.set("totalMatrix",t)}return t},e.prototype.applyMatrix=function(t){var e=this.attr("matrix"),n=null;n=t&&e?Dt(t,e):e||t,this.set("totalMatrix",n),this.set("parentMatrix",t)},e.prototype.getDefaultMatrix=function(){return null},e.prototype.applyToMatrix=function(t){var e=this.attr("matrix");return e?Pt(e,t):t},e.prototype.invertFromMatrix=function(t){var e=this.attr("matrix");if(e){var n=zt(e);if(n)return Pt(n,t)}return t},e.prototype.setClip=function(t){var e=this.getCanvas(),n=null;if(t){var r=this.getShapeBase()[_(t.type)];r&&(n=new r({type:t.type,isClipShape:!0,applyTo:this,attrs:t.attrs,canvas:e}))}return this.set("clipShape",n),this.onCanvasChange("clip"),n},e.prototype.getClip=function(){var t=this.cfg.clipShape;return t||null},e.prototype.clone=function(){var t=this,e=this.attrs,n={};p(e,(function(t,r){d(e[r])?n[r]=function(t){for(var e=[],n=0;n<t.length;n++)d(t[n])?e.push([].concat(t[n])):e.push(t[n]);return e}(e[r]):n[r]=e[r]}));var r=new(0,this.constructor)({attrs:n});return p(Wt,(function(e){r.set(e,t.get(e))})),r},e.prototype.destroy=function(){this.destroyed||(this.attrs={},t.prototype.destroy.call(this))},e.prototype.isAnimatePaused=function(){return this.get("_pause").isPaused},e.prototype.animate=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.get("timeline")||this.get("canvas")){this.set("animating",!0);var n=this.get("timeline");n||(n=this.get("canvas").get("timeline"),this.set("timeline",n));var r=this.get("animations")||[];n.timer||n.initTimer();var i,o,a,l,s,u=t[0],h=t[1],d=t[2],p=void 0===d?"easeLinear":d,v=t[3],g=void 0===v?R:v,y=t[4],m=void 0===y?0:y;c(u)?(i=u,u={}):f(u)&&u.onFrame&&(i=u.onFrame,o=u.repeat),f(h)?(h=(s=h).duration,p=s.easing||"easeLinear",m=s.delay||0,o=s.repeat||o||!1,g=s.callback||R,a=s.pauseCallback||R,l=s.resumeCallback||R):(C(g)&&(m=g,g=null),c(p)?(g=p,p="easeLinear"):p=p||"easeLinear");var w=Ut(u,this),x={fromAttrs:jt(w,this),toAttrs:w,duration:h,easing:p,repeat:o,callback:g,pauseCallback:a,resumeCallback:l,delay:m,startTime:n.getTime(),id:M(),onFrame:i,pathFormatted:!1};r.length>0?r=Vt(r,x):n.addAnimator(this),r.push(x),this.set("animations",r),this.set("_pause",{isPaused:!1})}},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0),p(this.get("animations"),(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations"),n=t.getTime();return p(e,(function(t){t._paused=!0,t._pauseTime=n,t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:n}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),n=this.get("_pause").pauseTime;return p(e,(function(e){e.startTime=e.startTime+(t-n),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){var n,r=this,i=e.propagationPath;this.getEvents(),"mouseenter"===t?n=e.fromShape:"mouseleave"===t&&(n=e.toShape);for(var o=function(t){var o=i[t],l=o.get("name");if(l){if((o.isGroup()||o.isCanvas&&o.isCanvas())&&n&>(o,n))return"break";d(l)?p(l,(function(t){r.emitDelegateEvent(o,t,e)})):a.emitDelegateEvent(o,l,e)}},a=this,l=0;l<i.length;l++){if("break"===o(l))break}},e.prototype.emitDelegateEvent=function(t,e,n){var r=this.getEvents(),i=e+":"+n.type;(r[i]||r["*"])&&(n.name=i,n.currentTarget=t,n.delegateTarget=this,n.delegateObject=t.get("delegateObject"),this.emit(i,n))},e.prototype.translate=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var n=this.getMatrix(),r=Ft(n,[["t",t,e]]);return this.setMatrix(r),this},e.prototype.move=function(t,e){var n=this.attr("x")||0,r=this.attr("y")||0;return this.translate(t-n,e-r),this},e.prototype.moveTo=function(t,e){return this.move(t,e)},e.prototype.scale=function(t,e){var n=this.getMatrix(),r=Ft(n,[["s",t,e||t]]);return this.setMatrix(r),this},e.prototype.rotate=function(t){var e=this.getMatrix(),n=Ft(e,[["r",t]]);return this.setMatrix(n),this},e.prototype.rotateAtStart=function(t){var e=this.attr(),n=e.x,r=e.y,i=this.getMatrix(),o=Ft(i,[["t",-n,-r],["r",t],["t",n,r]]);return this.setMatrix(o),this},e.prototype.rotateAtPoint=function(t,e,n){var r=this.getMatrix(),i=Ft(r,[["t",
2-t,-e],["r",n],["t",t,e]]);return this.setMatrix(i),this},e}(mt),Xt={},qt="_INDEX";function Kt(t,e){if(t.set("canvas",e),t.isGroup()){var n=t.get("children");n.length&&n.forEach((function(t){Kt(t,e)}))}}function Zt(t,e){if(t.set("timeline",e),t.isGroup()){var n=t.get("children");n.length&&n.forEach((function(t){Zt(t,e)}))}}var $t,Qt,Jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return dt(e,t),e.prototype.isCanvas=function(){return!1},e.prototype.getBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=[],o=[],a=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return a.length>0?(p(a,(function(t){var e=t.getBBox();i.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=y(i),e=g(i),n=y(o),r=g(o)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=[],o=[],a=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return a.length>0?(p(a,(function(t){var e=t.getCanvasBBox();i.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=y(i),e=g(i),n=y(o),r=g(o)):(t=0,e=0,n=0,r=0),{x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,n,r){if(t.prototype.onAttrChange.call(this,e,n,r),"matrix"===e){var i=this.getTotalMatrix();this._applyChildrenMarix(i)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},e.prototype._applyChildrenMarix=function(t){p(this.getChildren(),(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1];f(n)?r=n:r.type=n;var i=Xt[r.type];i||(i=_(r.type),Xt[r.type]=i);var o=this.getShapeBase(),a=new o[i](r);return this.add(a),a},e.prototype.addGroup=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=t[0],i=t[1];if(c(r))n=new r(i||{parent:this});else{var o=r||{},a=this.getGroupBase();n=new a(o)}return this.add(n),n},e.prototype.getCanvas=function(){return this.isCanvas()?this:this.get("canvas")},e.prototype.getShape=function(t,e,n){if(!yt(this))return null;var r,i=this.getChildren();if(this.isCanvas())r=this._findShape(i,t,e,n);else{var o=[t,e,1];o=this.invertFromMatrix(o),this.isClipped(o[0],o[1])||(r=this._findShape(i,o[0],o[1],n))}return r},e.prototype._findShape=function(t,e,n,r){for(var i=null,o=t.length-1;o>=0;o--){var a=t[o];if(yt(a)&&(a.isGroup()?i=a.getShape(e,n,r):a.isHit(e,n)&&(i=a)),i)break}return i},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),i=t.getParent();i&&function(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),pt(t.getChildren(),e)}(i,t,!1),t.set("parent",this),e&&Kt(t,e),r&&Zt(t,r),n.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();p(e,(function(t,e){return t[qt]=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,n){var r=t(e,n);return 0===r?e[qt]-n[qt]:r})),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[];return p(this.getChildren(),(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null;return p(this.getChildren(),(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(Yt),te=0,ee=0,ne=0,re=0,ie=0,oe=0,ae="object"===typeof performance&&performance.now?performance:Date,le="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function se(){return ie||(le(ue),ie=ae.now()+oe)}function ue(){ie=0}function ce(){this._call=this._time=this._next=null}function he(t,e,n){var r=new ce;return r.restart(t,e,n),r}function de(){ie=(re=ae.now())+oe,te=ee=0;try{!function(){se(),++te;
2for(var t,e=$t;e;)(t=ie-e._time)>=0&&e._call.call(null,t),e=e._next;--te}()}finally{te=0,function(){var t,e,n=$t,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:$t=e);Qt=t,pe(r)}(),ie=0}}function fe(){var t=ae.now(),e=t-re;e>1e3&&(oe-=e,re=t)}function pe(t){te||(ee&&(ee=clearTimeout(ee)),t-ie>24?(t<1/0&&(ee=setTimeout(de,t-ae.now()-oe)),ne&&(ne=clearInterval(ne))):(ne||(re=ae.now(),ne=setInterval(fe,1e3)),te=1,le(de)))}function ve(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ge(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ye(){}ce.prototype=he.prototype={constructor:ce,restart:function(t,e,n){if("function"!==typeof t)throw new TypeError("callback is not a function");n=(null==n?se():+n)+(null==e?0:+e),this._next||Qt===this||(Qt?Qt._next=this:$t=this,Qt=this),this._call=t,this._time=n,pe()},stop:function(){this._call&&(this._call=null,this._time=1/0,pe())}};var me=.7,Ce=1/me,we="\\s*([+-]?\\d+)\\s*",xe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Se=/^#([0-9a-f]{3,8})$/,_e=new RegExp("^rgb\\("+[we,we,we]+"\\)$"),Ee=new RegExp("^rgb\\("+[be,be,be]+"\\)$"),Le=new RegExp("^rgba\\("+[we,we,we,xe]+"\\)$"),Te=new RegExp("^rgba\\("+[be,be,be,xe]+"\\)$"),Oe=new RegExp("^hsl\\("+[xe,be,be]+"\\)$"),Ie=new RegExp("^hsla\\("+[xe,be,be,xe]+"\\)$"),Me={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Re(){return this.rgb().formatHex()}function Ae(){return this.rgb().formatRgb()}function Be(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Se.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ke(e):3===n?
2new ze(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Ne(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Ne(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=_e.exec(t))?new ze(e[1],e[2],e[3],1):(e=Ee.exec(t))?new ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Le.exec(t))?Ne(e[1],e[2],e[3],e[4]):(e=Te.exec(t))?Ne(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Oe.exec(t))?Ge(e[1],e[2]/100,e[3]/100,1):(e=Ie.exec(t))?Ge(e[1],e[2]/100,e[3]/100,e[4]):Me.hasOwnProperty(t)?ke(Me[t]):"transparent"===t?new ze(NaN,NaN,NaN,0):null}function ke(t){return new ze(t>>16&255,t>>8&255,255&t,1)}function Ne(t,e,n,r){return r<=0&&(t=e=n=NaN),new ze(t,e,n,r)}function De(t){return t instanceof ye||(t=Be(t)),t?new ze((t=t.rgb()).r,t.g,t.b,t.opacity):new ze}function Pe(t,e,n,r){return 1===arguments.length?De(t):new ze(t,e,n,null==r?1:r)}function ze(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Fe(){return"#"+We(this.r)+We(this.g)+We(this.b)}function He(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function We(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ge(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ue(t,e,n,r)}function je(t){if(t instanceof Ue)return new Ue(t.h,t.s,t.l,t.opacity);if(t instanceof ye||(t=Be(t)),!t)return new Ue;if(t instanceof Ue)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+6*(n<r):n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new Ue(a,l,s,t.opacity)}function Ue(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ve(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Ye(t){return function(){return t}}function Xe(t){return 1===(t=+t)?qe:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ye(isNaN(e)?n:e)}}function qe(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ye(isNaN(t)?e:t)}ve(ye,Be,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Re,formatHex:Re,formatHsl:function(){return je(this).formatHsl()},formatRgb:Ae,toString:Ae}),ve(ze,Pe,ge(ye,{brighter:function(t){return t=null==t?Ce:Math.pow(Ce,t),new ze(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?me:Math.pow(me,t),new ze(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fe,formatHex:Fe,formatRgb:He,toString:He})),ve(Ue,(function(t,e,n,r){return 1===arguments.length?je(t):new Ue(t,e,n,null==r?1:r)}),ge(ye,{brighter:function(t){return t=null==t?Ce:Math.pow(Ce,t),new Ue(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?me:Math.pow(me,t),new Ue(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ze(Ve(t>=240?t-240:t+120,i,r),Ve(t,i,r),Ve(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Ke=function t(e){var n=Xe(e);function r(t,e){var r=n((t=Pe(t)).r,(e=Pe(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=qe(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Ze(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function $e(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Qe(t,e){return($e(e)?Ze:Je)(t,e)}function Je(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=ln(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}function tn(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function en(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function nn(t,e){var n,r={},i={};for(n in null!==t&&"object"===typeof t||(t={}),null!==e&&"object"===typeof e||(e={}),e)n in t?r[n]=ln(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var rn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,on=new RegExp(rn.source,"g");function an(t,e){var n,r,i,o=rn.lastIndex=on.lastIndex=0,a=-1,l=[],s=[];for(t+="",e+="";(n=rn.exec(t))&&(r=on.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),l[a]?l[a]+=i:l[++a]=i),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,s.push({i:a,x:en(n,r)})),o=on.lastIndex;return o<e.length&&(i=e.slice(o),l[a]?l[a]+=i:l[++a]=i),l.length<2?s[0]?function(t){return function(e){return t(e)+""}}(s[0].x):function(t){return function(){return t}}(e):(e=s.length,function(t){for(var n,r=0;r<e;++r)l[(n=s[r]).i]=n.x(t);return l.join("")})}function ln(t,e){var n,r=typeof e;return null==e||"boolean"===r?Ye(e):("number"===r?en:"string"===r?(n=Be(e))?(e=n,Ke):an:e instanceof Be?Ke:e instanceof Date?tn:$e(e)?Ze:Array.isArray(e)?Je:"function"!==typeof e.valueOf&&"function"!==typeof e.toString||isNaN(e)?nn:en)(t,e)}function sn(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function un(t){return t*t*t}function cn(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var hn=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),dn=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),fn=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),pn=Math.PI,vn=pn/2;function gn(t){return(1-Math.cos(pn*t))/2}function yn(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function mn(t){return((t*=2)<=1?yn(1-t):2-yn(t-1))/2}function Cn(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var wn=4/11,xn=7.5625;function bn(t){return(t=+t)<wn?xn*t*t:t<.7272727272727273?xn*(t-=.5454545454545454)*t+.75:t<.9090909090909091?xn*(t-=.8181818181818182)*t+.9375:xn*(t-=.9545454545454546)*t+.984375}var Sn=1.70158,_n=function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(Sn),En=function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(Sn),Ln=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(Sn),Tn=2*Math.PI,On=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tn);function i(t){return e*yn(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Tn)},i.period=function(n){return t(e,n)},i}(1,.3),In=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tn);function i(t){return 1-e*yn(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Tn)},i.period=function(n){return t(e,n)},i}(1,.3),Mn=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Tn);function i(t){return((t=2*t-1)<0?e*yn(-t)*Math.sin((r-t)/n):2-e*yn(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Tn)},i.period=function(n){return t(e,n)},i}(1,.3),Rn=Object.freeze({__proto__:null,easeLinear:function(t){return+t},easeQuad:sn,easeQuadIn:function(t){return t*t},easeQuadOut:function(t){return t*(2-t)},easeQuadInOut:sn,easeCubic:cn,easeCubicIn:un,easeCubicOut:function(t){return--t*t*t+1},easeCubicInOut:cn,easePoly:fn,easePolyIn:hn,easePolyOut:dn,easePolyInOut:fn,easeSin:gn,easeSinIn:function(t){return 1===+t?1:1-Math.cos(t*vn)},easeSinOut:function(t){return Math.sin(t*vn)},easeSinInOut:gn,easeExp:mn,easeExpIn:function(t){return yn(1-+t)},easeExpOut:function(t){return 1-yn(t)}
2,easeExpInOut:mn,easeCircle:Cn,easeCircleIn:function(t){return 1-Math.sqrt(1-t*t)},easeCircleOut:function(t){return Math.sqrt(1- --t*t)},easeCircleInOut:Cn,easeBounce:bn,easeBounceIn:function(t){return 1-bn(1-t)},easeBounceOut:bn,easeBounceInOut:function(t){return((t*=2)<=1?1-bn(1-t):bn(t-1)+1)/2},easeBack:Ln,easeBackIn:_n,easeBackOut:En,easeBackInOut:Ln,easeElastic:In,easeElasticIn:On,easeElasticOut:In,easeElasticInOut:Mn}),An={};var Bn=[1,0,0,0,1,0,0,0,1];function kn(t,e,n){var r,i=e.startTime;if(n<i+e.delay||e._paused)return!1;var o,a=e.duration,l=e.easing,s=An[(o=l).toLowerCase()]||Rn[o];if(n=n-i-e.delay,e.repeat)r=s(r=n%a/a);else{if(!((r=n/a)<1))return e.onFrame?t.attr(e.onFrame(1)):t.attr(e.toAttrs),!0;r=s(r)}if(e.onFrame){var u=e.onFrame(r);t.attr(u)}else!function(t,e,n){var r={},i=e.fromAttrs,o=e.toAttrs;if(!t.destroyed){var a,l;for(var s in o)if(!O(i[s],o[s]))if("path"===s){var u=o[s],h=i[s];u.length>h.length?(u=N(o[s]),h=N(i[s]),h=ot(h,u),h=st(h,u),e.fromAttrs.path=h,e.toAttrs.path=u):e.pathFormatted||(u=N(o[s]),h=N(i[s]),h=st(h,u),e.fromAttrs.path=h,e.toAttrs.path=u,e.pathFormatted=!0),r[s]=[];for(var d=0;d<u.length;d++){for(var f=u[d],p=h[d],v=[],g=0;g<f.length;g++)C(f[g])&&p&&C(p[g])?(a=ln(p[g],f[g]),v.push(a(n))):v.push(f[g]);r[s].push(v)}}else if("matrix"===s){var y=Qe(i[s]||Bn,o[s]||Bn)(n);r[s]=y}else["fill","stroke","fillStyle","strokeStyle"].includes(s)&&(l=o[s],/^[r,R,L,l]{1}[\s]*\(/.test(l))?r[s]=o[s]:c(o[s])||(a=ln(i[s],o[s]),r[s]=a(n));t.attr(r)}}(t,e,r);return!1}var Nn=function(){function t(t){this.animators=[],this.current=0,this.timer=null,this.canvas=t}return t.prototype.initTimer=function(){var t,e,n,r=this;this.timer=he((function(i){if(r.current=i,r.animators.length>0){for(var o=r.animators.length-1;o>=0;o--)if((t=r.animators[o]).destroyed)r.removeAnimator(o);else{if(!t.isAnimatePaused())for(var a=(e=t.get("animations")).length-1;a>=0;a--)n=e[a],kn(t,n,i)&&(e.splice(a,1),!1,n.callback&&n.callback());0===e.length&&r.removeAnimator(o)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),Dn=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function Pn(t,e,n){n.name=e,n.target=t,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}function zn(t,e,n){if(n.bubbles){var r=void 0,i=!1;if("mouseenter"===e?(r=n.fromShape,i=!0):"mouseleave"===e&&(i=!0,r=n.toShape),t.isCanvas()&&i)return;if(r&>(t,r))return void(n.bubbles=!1);n.name=e,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}}var Fn,Hn=function(){function t(t){var e=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var n=t.type;e._triggerEvent(n,t)},this._onDocumentMove=function(t){if(e.canvas.get("el")!==t.target&&(e.dragging||e.currentShape)){var n=e._getPointInfo(t);e.dragging&&e._emitEvent("drag",t,n,e.draggingShape)}},this._onDocumentMouseUp=function(t){if(e.canvas.get("el")!==t.target&&e.dragging){var n=e._getPointInfo(t);e.draggingShape&&e._emitEvent("drop",t,n,null),e._emitEvent("dragend",t,n,e.draggingShape),e._afterDrag(e.draggingShape,n,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,e=this.canvas.get("el");p(Dn,(function(n){e.addEventListener(n,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,e=this.canvas.get("el");p(Dn,(function(n){e.removeEventListener(n,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,e,n,r,i,o){var a=new ct(t,e);return a.fromShape=i,a.toShape=o,a.x=n.x,a.y=n.y,a.clientX=n.clientX,a.clientY=n.clientY,a.prop
2agationPath.push(r),a},t.prototype._getShape=function(t,e){return this.canvas.getShape(t.x,t.y,e)},t.prototype._getPointInfo=function(t){var e=this.canvas,n=e.getClientByEvent(t),r=e.getPointByEvent(t);return{x:r.x,y:r.y,clientX:n.x,clientY:n.y}},t.prototype._triggerEvent=function(t,e){var n=this._getPointInfo(e),r=this._getShape(n,e),i=this["_on"+t],o=!1;if(i)i.call(this,n,r,e);else{var a=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,e,n,null,null,r),r&&this._emitEvent(t,e,n,r,null,r),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",e,n,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(o=!0,a&&this._emitEvent(t,e,n,a,a,null),this._emitEvent(t,e,n,null,a,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",e,n,null)):this._emitEvent(t,e,n,r,null,null)}if(o||(this.currentShape=r),r&&!r.get("destroyed")){var l=this.canvas;l.get("el").style.cursor=r.attr("cursor")||l.get("cursor")}},t.prototype._onmousedown=function(t,e,n){0===n.button&&(this.mousedownShape=e,this.mousedownPoint=t,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,t,e,null,null)},t.prototype._emitMouseoverEvents=function(t,e,n,r){var i=this.canvas.get("el");n!==r&&(n&&(this._emitEvent("mouseout",t,e,n,n,r),this._emitEvent("mouseleave",t,e,n,n,r),r&&!r.get("destroyed")||(i.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",t,e,r,n,r),this._emitEvent("mouseenter",t,e,r,n,r)))},t.prototype._emitDragoverEvents=function(t,e,n,r,i){r?(r!==n&&(n&&this._emitEvent("dragleave",t,e,n,n,r),this._emitEvent("dragenter",t,e,r,n,r)),i||this._emitEvent("dragover",t,e,r)):n&&this._emitEvent("dragleave",t,e,n,n,r),i&&this._emitEvent("dragover",t,e,r)},t.prototype._afterDrag=function(t,e,n){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(e,n);r!==t&&this._emitMouseoverEvents(n,e,t,r),this.currentShape=r},t.prototype._onmouseup=function(t,e,n){if(0===n.button){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",n,t,e),this._emitEvent("dragend",n,t,r),this._afterDrag(r,t,n)):(this._emitEvent("mouseup",n,t,e),e===this.mousedownShape&&this._emitEvent("click",n,t,e),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,e,n){n.preventDefault();var r=this.currentShape;this._emitDragoverEvents(n,t,r,e,!0)},t.prototype._onmousemove=function(t,e,n){var r=this.canvas,i=this.currentShape,o=this.draggingShape;if(this.dragging)o&&this._emitDragoverEvents(n,t,i,e,!1),this._emitEvent("drag",n,t,o);else{var a=this.mousedownPoint;if(a){var l=this.mousedownShape,s=n.timeStamp-this.mousedownTimeStamp,u=a.clientX-t.clientX,c=a.clientY-t.clientY;s>120||u*u+c*c>40?l&&l.get("draggable")?((o=this.mousedownShape).set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",n,t,o),this.mousedownShape=null,this.mousedownPoint=null):!l&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,r,i,o){var a=this._getEventObj(t,e,n,r,i,o);if(r){a.shape=r,Pn(r,t,a);for(var l=r.getParent();l;)l.emitDelegation(t,a),a.propagationStopped||zn(l,t,a),a.propagationPath.push(l),l=l.getParent()}else{Pn(this.canvas,t,a)}},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}(),Wn=Fn?Ot(Fn):"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product?new _t:"undefined"!==typeof navigator?Ot(navigator.userAgent):"undefined"!==typeof process&&process.version?new xt(process.version.slice(1)):null,Gn=Wn&&"firefox"===Wn.name,jn=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return dt(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);
2return e.cursor="default",e.supportCSSTransform=!1,e},e.prototype.initContainer=function(){var t=this.get("container");m(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){var t=new Hn({canvas:this});t.init(),this.set("eventController",t)},e.prototype.initTimeline=function(){var t=new Nn(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");vt&&(n.style.width=t+"px",n.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");vt&&e&&(e.style.cursor=t)},e.prototype.getPointByEvent=function(t){if(this.get("supportCSSTransform")){if(Gn&&!h(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!h(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var e=this.getClientByEvent(t),n=e.x,r=e.y;return this.getPointByClient(n,r)},e.prototype.getClientByEvent=function(t){var e=t;return t.touches&&(e="touchend"===t.type?t.changedTouches[0]:t.touches[0]),{x:e.clientX,y:e.clientY}},e.prototype.getPointByClient=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t-n.left,y:e-n.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el").getBoundingClientRect();return{x:t+n.left,y:e+n.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){this.get("eventController").destroy()},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(Jt),Un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return dt(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=this.getChildren(),r=0;r<n.length;r++){var i=n[r];e.add(i.clone())}return e},e}(Jt),Vn=function(t){function e(e){return t.call(this,e)||this}return dt(e,t),e.prototype._isInBBox=function(t,e){var n=this.getBBox();return n.minX<=t&&n.maxX>=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,r=t.minY,i=t.maxX,o=t.maxY;if(e){var a=Pt(e,[t.minX,t.minY]),l=Pt(e,[t.maxX,t.minY]),s=Pt(e,[t.minX,t.maxY]),u=Pt(e,[t.maxX,t.maxY]);n=Math.min(a[0],l[0],s[0],u[0]),i=Math.max(a[0],l[0],s[0],u[0]),r=Math.min(a[1],l[1],s[1],u[1]),o=Math.max(a[1],l[1],s[1],u[1])}var c=this.attrs;if(c.shadowColor){var h=c.shadowBlur,d=void 0===h?0:h,f=c.shadowOffsetX,p=void 0===f?0:f,v=c.shadowOffsetY,g=void 0===v?0:v,y=n-d+p,m=i+d+p,C=r-d+g,w=o+d+g;n=Math.min(n,y),i=Math.max(i,m),r=Math.min(r,C),o=Math.max(o,w)}return{x:n,y:r,minX:n,minY:r,maxX:i,maxY:o,width:i-n,height:o-r}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),i=[t,e,1],o=(i=this.invertFromMatrix(i))[0],a=i[1],l=this._isInBBox(o,a);if(this.isOnlyHitBox())return l;if(l&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;
2if(n&&n.isHit(o,a))return!0;if(r&&r.isHit(o,a))return!0}return!1},e}(Yt),Yn=new Map;function Xn(t,e){Yn.set(t,e)}function qn(t){var e=t.attr();return{x:e.x,y:e.y,width:e.width,height:e.height}}function Kn(t){var e=t.attr(),n=e.x,r=e.y,i=e.r;return{x:n-i,y:r-i,width:2*i,height:2*i}}function Zn(t){return Math.min.apply(null,t)}function $n(t){return Math.max.apply(null,t)}function Qn(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function Jn(t,e){return Math.abs(t-e)<.001}function tr(t,e){var n=Zn(t),r=Zn(e);return{x:n,y:r,width:$n(t)-n,height:$n(e)-r}}function er(t){return(t+2*Math.PI)%(2*Math.PI)}var nr={box:function(t,e,n,r){return tr([t,n],[e,r])},length:function(t,e,n,r){return Qn(t,e,n,r)},pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,o){var a=(n-t)*(i-t)+(r-e)*(o-e);return a<0?Qn(t,e,i,o):a>(n-t)*(n-t)+(r-e)*(r-e)?Qn(n,r,i,o):this.pointToLine(t,e,n,r,i,o)},pointToLine:function(t,e,n,r,i,o){var a=[n-t,r-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var l=[-a[1],a[0]];!function(t,e){var n=e[0],r=e[1],i=n*n+r*r;i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i}(l,l);var s=[i-t,o-e];return Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}(s,l))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function rr(t,e,n,r,i,o){var a,l=1/0,s=[n,r],u=20;o&&o>200&&(u=o/10);for(var c=1/u,h=c/10,d=0;d<=u;d++){var f=d*c,p=[i.apply(null,t.concat([f])),i.apply(null,e.concat([f]))];(m=Qn(s[0],s[1],p[0],p[1]))<l&&(a=f,l=m)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var v=t.length;return{x:t[v-1],y:e[v-1]}}l=1/0;for(d=0;d<32&&!(h<1e-4);d++){var g=a-h,y=a+h,m=(p=[i.apply(null,t.concat([g])),i.apply(null,e.concat([g]))],Qn(s[0],s[1],p[0],p[1]));if(g>=0&&m<l)a=g,l=m;else{var C=[i.apply(null,t.concat([y])),i.apply(null,e.concat([y]))],w=Qn(s[0],s[1],C[0],C[1]);y<=1&&w<l?(a=y,l=w):h*=.5}}return{x:i.apply(null,t.concat([a])),y:i.apply(null,e.concat([a]))}}function ir(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function or(t,e,n){var r=t+n-2*e;if(Jn(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}function ar(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function lr(t,e,n,r,i,o,a){var l=ir(t,n,i,a),s=ir(e,r,o,a),u=nr.pointAt(t,e,n,r,a),c=nr.pointAt(n,r,i,o,a);return[[t,e,u.x,u.y,l,s],[l,s,c.x,c.y,i,o]]}function sr(t,e,n,r,i,o,a){if(0===a)return(Qn(t,e,n,r)+Qn(n,r,i,o)+Qn(t,e,i,o))/2;var l=lr(t,e,n,r,i,o,.5),s=l[0],u=l[1];return s.push(a-1),u.push(a-1),sr.apply(null,s)+sr.apply(null,u)}var ur={box:function(t,e,n,r,i,o){var a=or(t,n,i)[0],l=or(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(ir(t,n,i,a)),void 0!==l&&u.push(ir(e,r,o,l)),tr(s,u)},length:function(t,e,n,r,i,o){return sr(t,e,n,r,i,o,3)},nearestPoint:function(t,e,n,r,i,o,a,l){return rr([t,n,i],[e,r,o],a,l,ir)},pointDistance:function(t,e,n,r,i,o,a,l){var s=this.nearestPoint(t,e,n,r,i,o,a,l);return Qn(s.x,s.y,a,l)},interpolationAt:ir,pointAt:function(t,e,n,r,i,o,a){return{x:ir(t,n,i,a),y:ir(e,r,o,a)}},divide:function(t,e,n,r,i,o,a){return lr(t,e,n,r,i,o,a)},tangentAngle:function(t,e,n,r,i,o,a){var l=ar(t,n,i,a),s=ar(e,r,o,a);return er(Math.atan2(s,l))}};function cr(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function hr(t,e,n,r,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(n-e)+i*i*(r-n))}function dr(t,e,n,r){var i,o,a,l=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,u=3*e-3*t,c=[];if(Jn(l,0))Jn(s,0)||(i=-u/s)>=0&&i<=1&&c.push(i);else{var h=s*s-4*l*u;Jn(h,0)?c.push(-s/(2*l)):h>0&&(o=(-s-(a=Math.sqrt(h)))/(2*l),(i=(-s+a)/(2*l))>=0&&i<=1&&c.push(i),o>=0&&o<=1&&c.push(o))}return c}function fr(t,e,n,r,i,o,a,l,s){var u=cr(t,n,i,a,s),c=cr(e,r,o,l,s),h=nr.pointAt(t,e,n,r,s),d=nr.pointAt(n,r,i,o,s),f=nr.pointAt(i,o,a,l,s),p=nr.pointAt(h.x,h.y,d.x,d.y,s),v=nr.pointAt(d.x,d.y,f.x,f.y,s);return[[t,e,h.x,h.y,p.x,p.y,u,c],[u,c,v.x,v.y,f.x,f.y,a,l]]}function pr(t,e,n,r,i,o,a,l,s){if(0===s)return function(t,e){for(var n=0,r=t.length,i=0;i<r;i++)n+=Qn(t[i],e[i],t[(i+1)%r],e[(i+1)%r]);return n/2}([t,n,i,a],[e,r,o,l]);var u=fr(t,e,n,r,i,o,a,l,.5),c=u[0],h=u[1];return c.push(s-1),h.push(s-1),pr.apply(null,c)+pr.apply(null,h)}var vr={extrema:dr,box:function(t,e,n,r,i,o,a,l){for(var s=[t,a],u=[e,l],c=dr(t,n,i,a),h=dr(e,r,o,l),d=0;d<c.length;d++)s.push(cr(t,n,i,a,c[d]));for(d=0;d<h.length;d++)u.push(cr(e,r,o,l,h[d]));return tr(s,u)},length:function(t,e,n,r,i,o,a,l){return pr(t,e,n,r,i,o,a,l,3)},nearestPoint:function(t,e,n,r,i,o,a,l,s,u,c){return rr([t,n,i,a],[e,r,o,l],s,u,cr,c)},pointDistance:function(t,e,n,r,i,o,a,l,s,u,c){var h=this.nearestPoint(t,e,n,r,i,o,a,l,s,u,c);return Qn(h.x,h.y,s,u)},interpolationAt:cr,pointAt:function(t,e,n,r,i,o,a,l,s){return{x:cr(t,n,i,a,s),y:cr(e,r,o,l,s)}},divide:function(t,e,n,r,i,o,a,l,s){return fr(t,e,n,r,i,o,a,l,s)},tangentAngle:function(t,e,n,r,i,o,a,l,s){var u=hr(t,n,i,a,s),c=hr(e,r,o,l,s);return er(Math.atan2(c,u))}};function gr(t,e,n,r,i,o){return n*Math.cos(i)*Math.cos(o)-r*Math.sin(i)*Math.sin(o)+t}function yr(t,e,n,r,i,o){return n*Math.sin(i)*Math.cos(o)+r*Math.cos(i)*Math.sin(o)+e}var mr=function(t,e,n,r,i,o,a){for(var l=function(t,e,n){return Math.atan(-e/t*Math.tan(n))}(n,r,i),s=1/0,u=-1/0,c=[o,a],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var d=l+h;o<a?o<d&&d<a&&c.push(d):a<d&&d<o&&c.push(d)}for(h=0;h<c.length;h++){var f=gr(t,0,n,r,i,c[h]);f<s&&(s=f),f>u&&(u=f)}var p=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,r,i),v=1/0,g=-1/0,y=[o,a];for(h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var m=p+h;o<a?o<m&&m<a&&y.push(m):a<m&&m<o&&y.push(m)}for(h=0;h<y.length;h++){var C=yr(0,e,n,r,i,y[h]);C<v&&(v=C),C>g&&(g=C)}return{x:s,y:v,width:u-s,height:g-v}};var Cr=function(t){return function(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=Qn(r[0],r[1],i[0],i[1])}return e}(t)};function wr(t,e){return t&&e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t||e}function xr(t,e){var n=t.get("startArrowShape"),r=t.get("endArrowShape");return n&&(e=wr(e,n.getCanvasBBox())),r&&(e=wr(e,r.getCanvasBBox())),e}var br=null;function Sr(){if(!br){var t=document.createElement("canvas");t.width=1,t.height=1,br=t.getContext("2d")}return br}function _r(t,e,n){var r=1;if(m(t)&&(r=t.split("\n").length),r>1){var i=function(t,e){return e?e-t:.14*t}(e,n);return e*r+i*(r-1)}return e}function Er(t){var e=t.fontSize,n=t.fontFamily,r=t.fontWeight;return[t.fontStyle,t.fontVariant,r,e+"px",n].join(" ").trim()}var Lr=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,Tr=/[^\s\,]+/gi;var Or="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",Ir=ne
2w RegExp("([a-z])["+Or+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Or+"]*,?["+Or+"]*)+)","ig"),Mr=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Or+"]*,?["+Or+"]*","ig");var Rr=/[a-z]/;function Ar(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Br(t){var e=function(t){if(!t)return null;if(d(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(Ir,(function(t,r,i){var o=[],a=r.toLowerCase();if(i.replace(Mr,(function(t,e){e&&o.push(+e)})),"m"===a&&o.length>2&&(n.push([r].concat(o.splice(0,2))),a="l",r="m"===r?"l":"L"),"o"===a&&1===o.length&&n.push([r,o[0]]),"r"===a)n.push([r].concat(o));else for(;o.length>=e[a]&&(n.push([r].concat(o.splice(0,e[a]))),e[a]););return""})),n}(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,r=0;r<e.length;r++){var i=e[r][0];if(Rr.test(i)||["V","H","T","S"].indexOf(i)>=0){n=!0;break}}if(!n)return e;var o=[],a=0,l=0,s=0,u=0,c=0,h=e[0];"M"!==h[0]&&"m"!==h[0]||(s=a=+h[1],u=l=+h[2],c++,o[0]=["M",a,l]);r=c;for(var f=e.length;r<f;r++){var p=e[r],v=o[r-1],g=[],y=(i=p[0]).toUpperCase();if(i!==y)switch(g[0]=y,y){case"A":g[1]=p[1],g[2]=p[2],g[3]=p[3],g[4]=p[4],g[5]=p[5],g[6]=+p[6]+a,g[7]=+p[7]+l;break;case"V":g[1]=+p[1]+l;break;case"H":g[1]=+p[1]+a;break;case"M":s=+p[1]+a,u=+p[2]+l,g[1]=s,g[2]=u;break;default:for(var m=1,C=p.length;m<C;m++)g[m]=+p[m]+(m%2?a:l)}else g=e[r];switch(y){case"Z":a=+s,l=+u;break;case"H":g=["L",a=g[1],l];break;case"V":g=["L",a,l=g[1]];break;case"T":a=g[1],l=g[2];var w=Ar([v[1],v[2]],[v[3],v[4]]);g=["Q",w[0],w[1],a,l];break;case"S":a=g[g.length-2],l=g[g.length-1];var x=v.length,b=Ar([v[x-4],v[x-3]],[v[x-2],v[x-1]]);g=["C",b[0],b[1],g[1],g[2],a,l];break;case"M":s=g[g.length-2],u=g[g.length-1];break;default:a=g[g.length-2],l=g[g.length-1]}o.push(g)}return o}function kr(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Nr(t,e){return kr(t)*kr(e)?(t[0]*e[0]+t[1]*e[1])/(kr(t)*kr(e)):1}function Dr(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Nr(t,e))}function Pr(t,e){return t[0]===e[0]&&t[1]===e[1]}function zr(t,e){var n=e[1],r=e[2],i=w(b(e[3]),2*Math.PI),o=e[4],a=e[5],l=t[0],s=t[1],u=e[6],c=e[7],h=Math.cos(i)*(l-u)/2+Math.sin(i)*(s-c)/2,d=-1*Math.sin(i)*(l-u)/2+Math.cos(i)*(s-c)/2,f=h*h/(n*n)+d*d/(r*r);f>1&&(n*=Math.sqrt(f),r*=Math.sqrt(f));var p=n*n*(d*d)+r*r*(h*h),v=p?Math.sqrt((n*n*(r*r)-p)/p):1;o===a&&(v*=-1),isNaN(v)&&(v=0);var g=r?v*n*d/r:0,y=n?v*-r*h/n:0,m=(l+u)/2+Math.cos(i)*g-Math.sin(i)*y,C=(s+c)/2+Math.sin(i)*g+Math.cos(i)*y,x=[(h-g)/n,(d-y)/r],S=[(-1*h-g)/n,(-1*d-y)/r],_=Dr([1,0],x),E=Dr(x,S);return Nr(x,S)<=-1&&(E=Math.PI),Nr(x,S)>=1&&(E=0),0===a&&E>0&&(E-=2*Math.PI),1===a&&E<0&&(E+=2*Math.PI),{cx:m,cy:C,rx:Pr(t,[u,c])?0:n,ry:Pr(t,[u,c])?0:r,startAngle:_,endAngle:_+E,xRotation:i,arcFlag:o,sweepFlag:a}}function Fr(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Hr(t){t=function(t){var e=t||[];return d(e)?e:m(e)?(p(e=e.match(Lr),(function(t,n){if((t=t.match(Tr))[0].length>1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}p(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}(t);for(var e=[],n=null,r=null,i=null,o=0,a=t.length,l=0;l<a;l++){var s=t[l];r=t[l+1];var u=s[0],c={command:u,prePoint:n,params:s,startTangent:null,endTangent:null};switch(u){case"M":i=[s[1],s[2]],o=l;break;case"A":var h=zr(n,s);c.arcParams=h}if("Z"===u)n=i,r=t[o+1];else{var f=s.length;n=[s[f-2],s[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),c.currentPoint=n,e[o]&&Pr(n,e[o].currentPoint)&&(e[o].prePoint=c.prePoint);var v=r?[r[r.length-2],r[r.length-1]]:null;c.nextPoint=v;var g=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[g[0]-n[0],g[1]-n[1]],c.endTangent=[n[0]-g[0],n[1]-g[1]];else if("Q"===u){var y=[s[1],s[2]];c.startTangent=[g[0]-y[0],g[1]-y[1]],c.endTangent=[n[0]-y[0],n[1]-y[1]]}else if("T"===u){y=Fr((x=e[l-1]).currentPoint,g);"Q"===x.command?(c.command="Q",c.startTangent=[g[0]-y[0],g[1]-y[1]],c.endTangent=[n[0]-y[0],n[1]-y[1]]):(c.command="TL",c.startTangent=[g[0]-n[0],g[1]-n[1]],c.endTangent=[n[0]-g[0],n[1]-g[1]])}else if("C"===u){var C=[s[1],s[2]],w=[s[3],s[4]];c.startTangent=[g[0]-C[0],g[1]-C[1]],c.endTangent=[n[0]-w[0],n[1]-w[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[C[0]-w[0],C[1]-w[1]]),0===c.endTangent[0]&&0===c.endTangent[1]&&(c.endTangent=[w[0]-C[0],w[1]-C[1]])}else if("S"===u){var x;C=Fr((x=e[l-1]).currentPoint,g),w=[s[1],s[2]];"C"===x.command?(c.command="C",c.startTangent=[g[0]-C[0],g[1]-C[1]],c.endTangent=[n[0]-w[0],n[1]-w[1]]):(c.command="SQ",c.startTangent=[g[0]-w[0],g[1]-w[1]],c.endTangent=[n[0]-w[0],n[1]-w[1]])}else if("A"===u){var b=.001,S=c.arcParams||{},_=S.cx,E=void 0===_?0:_,L=S.cy,T=void 0===L?0:L,O=S.rx,I=void 0===O?0:O,M=S.ry,R=void 0===M?0:M,A=S.sweepFlag,B=void 0===A?0:A,k=S.startAngle,N=void 0===k?0:k,D=S.endAngle,P=void 0===D?0:D;0===B&&(b*=-1);var z=I*Math.cos(N-b)+E,F=R*Math.sin(N-b)+T;c.startTangent=[z-i[0],F-i[1]];
2var H=I*Math.cos(N+P+b)+E,W=R*Math.sin(N+P-b)+T;c.endTangent=[g[0]-H,g[1]-W]}e.push(c)}return e}function Wr(t,e){var n,r,i,o=t.prePoint,a=t.currentPoint,l=t.nextPoint,s=Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2),u=Math.pow(a[0]-l[0],2)+Math.pow(a[1]-l[1],2),c=Math.pow(o[0]-l[0],2)+Math.pow(o[1]-l[1],2),h=Math.acos((s+u-c)/(2*Math.sqrt(s)*Math.sqrt(u)));if(!h||0===Math.sin(h)||(n=h,r=0,void 0===i&&(i=1e-5),Math.abs(n-r)<i))return{xExtra:0,yExtra:0};var d=Math.abs(Math.atan2(l[1]-a[1],l[0]-a[0])),f=Math.abs(Math.atan2(l[0]-a[0],l[1]-a[1]));return d=d>Math.PI/2?Math.PI-d:d,f=f>Math.PI/2?Math.PI-f:f,{xExtra:Math.cos(h/2-d)*(e/2*(1/Math.sin(h/2)))-e/2||0,yExtra:Math.cos(f-h/2)*(e/2*(1/Math.sin(h/2)))-e/2||0}}function Gr(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function jr(t,e,n,r,i,o){return i>=t&&i<=t+n&&o>=e&&o<=e+r}function Ur(t,e){return!(e.minX>t.maxX||e.maxX<t.minX||e.minY>t.maxY||e.maxY<t.minY)}function Vr(t,e){return t[0]===e[0]&&t[1]===e[1]}Xn("rect",qn),Xn("image",qn),Xn("circle",Kn),Xn("marker",Kn),Xn("polyline",(function(t){for(var e=t.attr().points,n=[],r=[],i=0;i<e.length;i++){var o=e[i];n.push(o[0]),r.push(o[1])}var a=tr(n,r),l=a.x,s=a.y,u={minX:l,minY:s,maxX:l+a.width,maxY:s+a.height};return{x:(u=xr(t,u)).minX,y:u.minY,width:u.maxX-u.minX,height:u.maxY-u.minY}})),Xn("polygon",(function(t){for(var e=t.attr().points,n=[],r=[],i=0;i<e.length;i++){var o=e[i];n.push(o[0]),r.push(o[1])}return tr(n,r)})),Xn("text",(function(t){var e=t.attr(),n=e.x,r=e.y,i=e.text,o=e.fontSize,a=e.lineHeight,l=e.font;l||(l=Er(e));var s,u=function(t,e){var n=Sr(),r=0;return h(t)||""===t||(n.save(),n.font=e,m(t)&&t.includes("\n")?p(t.split("\n"),(function(t){var e=n.measureText(t).width;r<e&&(r=e)})):r=n.measureText(t).width,n.restore()),r}(i,l);if(u){var c=e.textAlign,d=e.textBaseline,f=_r(i,o,a),v={x:n,y:r-f};c&&("end"===c||"right"===c?v.x-=u:"center"===c&&(v.x-=u/2)),d&&("top"===d?v.y+=f:"middle"===d&&(v.y+=f/2)),s={x:v.x,y:v.y,width:u,height:f}}else s={x:n,y:r,width:0,height:0};return s})),Xn("path",(function(t){var e=t.attr(),n=e.path,r=e.stroke?e.lineWidth:0,i=function(t,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=(v=t[o]).currentPoint,l=v.params,s=v.prePoint,u=void 0;switch(v.command){case"Q":u=ur.box(s[0],s[1],l[1],l[2],l[3],l[4]);break;case"C":u=vr.box(s[0],s[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var c=v.arcParams;u=mr(c.cx,c.cy,c.rx,c.ry,c.xRotation,c.startAngle,c.endAngle);break;default:n.push(a[0]),r.push(a[1])}u&&(v.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===v.command||"M"===v.command)&&v.prePoint&&v.nextPoint&&i.push(v)}n=n.filter((function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0})),r=r.filter((function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}));var h=y(n),d=y(r),f=g(n),p=g(r);if(0===i.length)return{x:h,y:d,width:f-h,height:p-d};for(o=0;o<i.length;o++){var v;(a=(v=i[o]).currentPoint)[0]===h?h-=Wr(v,e).xExtra:a[0]===f&&(f+=Wr(v,e).xExtra),a[1]===d?d-=Wr(v,e).yExtra:a[1]===p&&(p+=Wr(v,e).yExtra)}return{x:h,y:d,width:f-h,height:p-d}}(t.get("segments")||Hr(n),r),o=i.x,a=i.y,l={minX:o,minY:a,maxX:o+i.width,maxY:a+i.height};return{x:(l=xr(t,l)).minX,y:l.minY,width:l.maxX-l.minX,height:l.maxY-l.minY}})),Xn("line",(function(t){var e=t.attr(),n=e.x1,r=e.y1,i=e.x2,o=e.y2,a={minX:Math.min(n,i),maxX:Math.max(n,i),minY:Math.min(r,o),maxY:Math.max(r,o)};return{x:(a=xr(t,a)).minX,y:a.minY,width:a.maxX-a.minX,height:a.maxY-a.minY}})),Xn("ellipse",(function(t){var e=t.attr(),n=e.x,r=e.y,i=e.rx,o=e.ry;return{x:n-i,y:r-o,width:2*i,height:2*o}}));var Yr=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Xr=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,qr=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Kr=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function Zr(t,e){p(t.match(Kr),(function(t){var n=t.split(":");e.addColorStop(n[0],n[1])}))}function $r(t,e,n){var r=e.getBBox();if(isNaN(r.x)||isNaN(r.y)||isNaN(r.width)||isNaN(r.height))return n;if(m(n)){if("("===n[1]||"("===n[2]){if("l"===n[0])return function(t,e,n){var r,i,o=Yr.exec(n),a=parseFloat(o[1])%360*(Math.PI/180),l=o[2],s=e.getBBox();a>=0&&a<.5*Math.PI?(r={x:s.minX,y:s.minY},i={x:s.maxX,y:s.maxY}):.5*Math.PI<=a&&a<Math.PI?(r={x:s.maxX,y:s.minY},i={x:s.minX,y:s.maxY}):Math.PI<=a&&a<1.5*Math.PI?(r={x:s.maxX,y:s.maxY},i={x:s.minX,y:s.minY}):(r={x:s.minX,y:s.maxY},i={x:s.maxX,y:s.minY});var u=Math.tan(a),c=u*u,h=(i.x-r.x+u*(i.y-r.y))/(c+1)+r.x,d=u*(i.x-r.x+u*(i.y-r.y))/(c+1)+r.y,f=t.createLinearGradient(r.x,r.y,h,d);return Zr(l,f),f}(t,e,n);if("r"===n[0])return function(t,e,n){var r=Xr.exec(n),i=parseFloat(r[1]),o=parseFloat(r[2]),a=parseFloat(r[3]),l=r[4];if(0===a){var s=l.match(Kr);return s[s.length-1].split(":")[1]}var u=e.getBBox(),c=u.maxX-u.minX,h=u.maxY-u.minY,d=Math.sqrt(c*c+h*h)/2,f=t.createRadialGradient(u.minX+c*i,u.minY+h*o,0,u.minX+c/2,u.minY+h/2,a*d);return Zr(l,f),f}(t,e,n);if("p"===n[0])return function(t,e,n){if(e.get("patternSource")&&e.get("patternSource")===n)return e.get("pattern");var r,i,o=qr.exec(n),a=o[1],l=o[2];function s(){r=t.createPattern(i,a),e.set("pattern",r),e.set("patternSource",n)}switch(a){case"a":a="repeat";break;case"x":a="repeat-x";break;case"y":a="repeat-y";break;default:a="no-repeat"}return i=new Image,l.match(/^data:/i)||(i.crossOrigin="Anonymous"),i.src=l,i.complete?s():(i.onload=s,i.src=i.src),r}(t,e,n)}return n}return n instanceof CanvasPattern?n:void 0}function Qr(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Jr(t,e){return Qr(t)*Qr(e)?(t[0]*e[0]+t[1]*e[1])/(Qr(t)*Qr(e)):1}function ti(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Jr(t,e))}function ei(t,e){var n=e[1],r=e[2],i=w(b(e[3]),2*Math.PI),o=e[4],a=e[5],l=t[0],s=t[1],u=e[6],c=e[7],h=Math.cos(i)*(l-u)/2+Math.sin(i)*(s-c)/2,d=-1*Math.sin(i)*(l-u)/2+Math.cos(i)*(s-c)/2,f=h*h/(n*n)+d*d/(r*r);f>1&&(n*=Math.sqrt(f),r*=Math.sqrt(f));var p=n*n*(d*d)+r*r*(h*h),v=p?Math.sqrt((n*n*(r*r)-p)/p):1;o===a&&(v*=-1),isNaN(v)&&(v=0);var g=r?v*n*d/r:0,y=n?v*-r*h/n:0,m=(l+u)/2+Math.cos(i)*g-Math.sin(i)*y,C=(s+c)/2+Math.sin(i)*g+Math.cos(i)*y,x=[(h-g)/n,(d-y)/r],S=[(-1*h-g)/n,(-1*d-y)/r],_=ti([1,0],x),E=ti(x,S);return Jr(x,S)<=-1&&(E=Math.PI),Jr(x,S)>=1&&(E=0),0===a&&E>0&&(E-=2*Math.PI),1===a&&E<0&&(E+=2*Math.PI),{cx:m,cy:C,rx:Vr(t,[u,c])?0:n,ry:Vr(t,[u,c])?0:r,startAngle:_,endAngle:_+E,xRotation:i,arcFlag:o,sweepFlag:a}}var ni=Math.sin,ri=Math.cos,ii=Math.atan2,oi=Math.PI;function ai(t,e,n,r,i,o,a){var l=e.stroke,s=e.lineWidth,u=ii(r-o,n-i),c=new qi({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*ri(oi/6)+","+10*ni(oi/6)+" L0,0 L"+10*ri(oi/6)+",-"+10*ni(oi/6),stroke:l,lineWidth:s}});c.translate(i,o),c.rotateAtPoint(i,o,u),t.set(a?"startArrowShape":"endArrowShape",c)}function li(t,e,n,r,i,o,l){var s=e.startArrow,u=e.endArrow,c=e.stroke,h=e.lineWidth,d=l?s:u,f=d.d,p=d.fill,v=d.stroke,g=d.lineWidth,y=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(d,["d","fill","stroke","lineWidth"]),m=ii(r-o,n-i);f&&(i-=ri(m)*f,o-=ni(m)*f);var C=new qi({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:a(a({},y),{stroke:v||c,lineWidth:g||h,fill:p})});C.translate(i,o),C.rotateAtPoint(i,o,m),t.set(l?"startArrowShape":"endArrowShape",C)}function si(t,e,n,r,i){var o=ii(r-e,n-t);return{dx:ri(o)*i,dy:ni(o)*i}}function ui(t,e,n,r,i,o){"object"===typeof e.startArrow?li(t,e,n,r,i,o,!0):e.startArrow?ai(t,e,n,r,i,o,!0):t.set("startArrowShape",null)}function ci(t,e,n,r,i,o){"object"===typeof e.endArrow?li(t,e,n,r,i,o,!1):e.endArrow?ai(t,e,n,r,i,o,!1):t.set("startArrowShape",null)}var hi={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function di(t,e){var n=e.attr();for(var r in n){var i=n[r],o=hi[r]?hi[r]:r;"matrix"===o&&i?t.transform(i[0],i[1],i[3],i[4],i[6],i[7]):"lineDash"===o&&t.setLineDash?d(i)&&t.setLineDash(i):("strokeStyle"===o||"fillStyle"===o?i=$r(t,e,i):"globalAlpha"===o&&(i*=t.globalAlpha),t[o]=i)}}function fi(t,e,n){for(var r=0;r<e.length;r++){var i=e[r];i.cfg.visible?i.draw(t,n):i.skipDraw()}}function pi(t,e,n){var r=t.get("refreshElements");p(r,(function(e){if(e!==t)for(var n=e.cfg.parent;n&&n!==t&&!n.cfg.refresh;)n.cfg.refresh=!0,n=n.cfg.parent})),r[0]===t?yi(e):vi(e,n)}function vi(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.cfg.visible)if(r.cfg.hasChanged)r.cfg.refresh=!0,r.isGroup()&&yi(r.cfg.children);else if(r.cfg.refresh)r.isGroup()&&vi(r.cfg.children,e);else{var i=mi(r,e);r.cfg.refresh=i,i&&r.isGroup()&&vi(r.cfg.children,e)}}}function gi(t){for(var e=0;e<t.length;e++){var n=t[e];
2n.cfg.hasChanged=!1,n.isGroup()&&!n.destroyed&&gi(n.cfg.children)}}function yi(t,e){for(var n=0;n<t.length;n++){var r=t[n];r.cfg.refresh=!0,r.isGroup()&&yi(r.get("children"))}}function mi(t,e){var n=t.cfg.cacheCanvasBBox;return t.cfg.isInView&&n&&Ur(n,e)}function Ci(t,e,n,r){var i=n.path,o=n.startArrow,a=n.endArrow;if(i){var l=[0,0],s=[0,0],u={dx:0,dy:0};e.beginPath();for(var c=0;c<i.length;c++){var h=i[c],d=h[0];if(0===c&&o&&o.d)u=si((f=t.getStartTangent())[0][0],f[0][1],f[1][0],f[1][1],o.d);else if(c===i.length-2&&"Z"===i[c+1][0]&&a&&a.d){if("Z"===i[c+1][0])u=si((f=t.getEndTangent())[0][0],f[0][1],f[1][0],f[1][1],a.d)}else if(c===i.length-1&&a&&a.d){var f;if("Z"!==i[0])u=si((f=t.getEndTangent())[0][0],f[0][1],f[1][0],f[1][1],a.d)}var p=u.dx,v=u.dy;switch(d){case"M":e.moveTo(h[1]-p,h[2]-v),s=[h[1],h[2]];break;case"L":e.lineTo(h[1]-p,h[2]-v);break;case"Q":e.quadraticCurveTo(h[1],h[2],h[3]-p,h[4]-v);break;case"C":e.bezierCurveTo(h[1],h[2],h[3],h[4],h[5]-p,h[6]-v);break;case"A":var g=void 0;r?(g=r[c])||(g=ei(l,h),r[c]=g):g=ei(l,h);var y=g.cx,m=g.cy,C=g.rx,w=g.ry,x=g.startAngle,b=g.endAngle,S=g.xRotation,_=g.sweepFlag;if(e.ellipse)e.ellipse(y,m,C,w,S,x,b,1-_);else{var E=C>w?C:w,L=C>w?1:C/w,T=C>w?w/C:1;e.translate(y,m),e.rotate(S),e.scale(L,T),e.arc(0,0,E,x,b,1-_),e.scale(1/L,1/T),e.rotate(-S),e.translate(-y,-m)}break;case"Z":e.closePath()}if("Z"===d)l=s;else{var O=h.length;l=[h[O-2],h[O-1]]}}}}function wi(t,e){var n=t.get("canvas");n&&("remove"===e&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(t.set("hasChanged",!0),t.cfg.parent&&t.cfg.parent.get("hasChanged")||(n.refreshElement(t,e,n),n.get("autoDraw")&&n.draw())))}function xi(t){var e,n,r;if(t.destroyed)e=t._cacheCanvasBBox;else{var i=t.get("cacheCanvasBBox"),o=i&&!(!i.width||!i.height),a=t.getCanvasBBox(),l=a&&!(!a.width||!a.height);o&&l?(r=a,e=(n=i)&&r?{minX:Math.min(n.minX,r.minX),minY:Math.min(n.minY,r.minY),maxX:Math.max(n.maxX,r.maxX),maxY:Math.max(n.maxY,r.maxY)}:n||r):o?e=i:l&&(e=a)}return e}var bi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.onCanvasChange=function(t){wi(this,t)},e.prototype.getShapeBase=function(){return r},e.prototype.getGroupBase=function(){return e},e.prototype._applyClip=function(t,e){e&&(t.save(),di(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())},e.prototype.cacheCanvasBBox=function(){var t=this.cfg.children,e=[],n=[];p(t,(function(t){var r=t.cfg.cacheCanvasBBox;r&&t.cfg.isInView&&(e.push(r.minX,r.maxX),n.push(r.minY,r.maxY))}));var r=null;if(e.length){var i=y(e),o=g(e),a=y(n),l=g(n);r={minX:i,minY:a,x:i,y:a,maxX:o,maxY:l,width:o-i,height:l-a};var s=this.cfg.canvas;if(s){var u=s.getViewRange();this.set("isInView",Ur(r,u))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",r)},e.prototype.draw=function(t,e){var n=this.cfg.children,r=!e||this.cfg.refresh;n.length&&r&&(t.save(),di(t,this),this._applyClip(t,this.getClip()),fi(t,n,e),t.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},e}(Un),Si=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return a(a({},e),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.getShapeBase=function(){return r},e.prototype.getGroupBase=function(){return bi},e.prototype.onCanvasChange=function(t){wi(this,t)},e.prototype.calculateBBox=function(){var t=this.get("type"),e=this.getHitLineWidth(),n=function(t){return Yn.get(t)}(t),r=n(this),i=e/2,o=r.x-i,a=r.y-i,l=r.x+r.width+i,s=r.y+r.height+i;return{x:o,minX:o,y:a,minY:a,width:r.width+e,height:r.height+e,maxX:l,maxY:s}},e.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},e.prototype.isStroke=function(){return!!this.attrs.stroke},e.prototype._applyClip=function(t,e){e&&(t.save(),di(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())}
2,e.prototype.draw=function(t,e){var n=this.cfg.clipShape;if(e){if(!1===this.cfg.refresh)return void this.set("hasChanged",!1);if(!Ur(e,this.getCanvasBBox()))return this.set("hasChanged",!1),void(this.cfg.isInView&&this._afterDraw())}t.save(),di(t,this),this._applyClip(t,n),this.drawPath(t),t.restore(),this._afterDraw()},e.prototype.getCanvasViewBox=function(){var t=this.cfg.canvas;return t?t.getViewRange():null},e.prototype.cacheCanvasBBox=function(){var t=this.getCanvasViewBox();if(t){var e=this.getCanvasBBox(),n=Ur(e,t);this.set("isInView",n),n?this.set("cacheCanvasBBox",e):this.set("cacheCanvasBBox",null)}},e.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},e.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},e.prototype.fill=function(t){t.fill()},e.prototype.stroke=function(t){t.stroke()},e.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,r=e.opacity,i=e.strokeOpacity,o=e.fillOpacity;this.isFill()&&(h(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=r)),this.isStroke()&&n>0&&(h(i)||1===i||(t.globalAlpha=i),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,e){var n=this.isStroke(),r=this.isFill(),i=this.getHitLineWidth();return this.isInStrokeOrPath(t,e,n,r,i)},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},e}(Vn),_i=Si,Ei=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return a(a({},e),{x:0,y:0,r:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var o=this.attr(),a=o.x,l=o.y,s=o.r,u=i/2,c=Gr(a,l,t,e);return r&&n?c<=s+u:r?c<=s:!!n&&(c>=s-u&&c<=s+u)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.r;t.beginPath(),t.arc(n,r,i,0,2*Math.PI,!1),t.closePath()},e}(_i),Li=Ei;function Ti(t,e,n,r){return t/(n*n)+e/(r*r)}var Oi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return a(a({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var o=this.attr(),a=i/2,l=o.x,s=o.y,u=o.rx,c=o.ry,h=(t-l)*(t-l),d=(e-s)*(e-s);return r&&n?Ti(h,d,u+a,c+a)<=1:r?Ti(h,d,u,c)<=1:!!n&&(Ti(h,d,u-a,c-a)>=1&&Ti(h,d,u+a,c+a)<=1)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.rx,o=e.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,r,i,o,0,0,2*Math.PI,!1);else{var a=i>o?i:o,l=i>o?1:i/o,s=i>o?o/i:1;t.save(),t.translate(n,r),t.scale(l,s),t.arc(0,0,a,0,2*Math.PI),t.restore(),t.closePath()}},e}(_i),Ii=Oi;function Mi(t){return t instanceof HTMLElement&&m(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var Ri=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return a(a({},e),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var e=this,n=this.attrs;if(m(t)){var r=new Image;r.onload=function(){if(e.destroyed)return!1;e.attr("img",r),e.set("loading",!1),e._afterLoading();var t=e.get("callback");t&&t.call(e)},r.crossOrigin="Anonymous",r.src=t,this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):Mi(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,Number(t.getAttribute("height"))))},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),"img"===e&&this._setImage(n)},e.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var e=this.attr(),n=e.x,r=e.y,i=e.width,o=e.height,a=e.sx,l=e.sy,s=e.swidth,u=e.sheight,c=e.img;(c instanceof Image||Mi(c))&&(h(a)||h(l)||h(s)||h(u)?t.drawImage(c,n,r,i,o):t.drawImage(c,a,l,s,u,n,r,i,o))},e}(_i),Ai=Ri;function Bi(t,e,n,r,i,o,a){var l=Math.min(t,n),s=Math.max(t,n),u=Math.min(e,r),c=Math.max(e,r),h=i/2;return o>=l-h&&o<=s+h&&a>=u-h&&a<=c+h&&nr.pointToLine(t,e,n,r,o,a)<=i/2}var ki=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return a(a({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1}
2)},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),this.setArrow()},e.prototype.setArrow=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=t.startArrow,a=t.endArrow;o&&ui(this,t,r,i,e,n),a&&ci(this,t,e,n,r,i)},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){if(!n||!i)return!1;var o=this.attr();return Bi(o.x1,o.y1,o.x2,o.y2,i,t,e)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.startArrow,l=e.endArrow,s={dx:0,dy:0},u={dx:0,dy:0};a&&a.d&&(s=si(n,r,i,o,e.startArrow.d)),l&&l.d&&(u=si(n,r,i,o,e.endArrow.d)),t.beginPath(),t.moveTo(n+s.dx,r+s.dy),t.lineTo(i-u.dx,o-u.dy)},e.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),n=this.get("endArrowShape");e&&e.draw(t),n&&n.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,i=t.y2;return nr.length(e,n,r,i)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,r=e.y1,i=e.x2,o=e.y2;return nr.pointAt(n,r,i,o,t)},e}(_i),Ni=ki,Di={circle:function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},"triangle-down":function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}},Pi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.initAttrs=function(t){this._resetParamsCache()},e.prototype._resetParamsCache=function(){this.set("paramsCache",{})},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),-1!==["symbol","x","y","r","radius"].indexOf(e)&&this._resetParamsCache()},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._getR=function(t){return h(t.r)?t.radius:t.r},e.prototype._getPath=function(){var t,n,r=this.attr(),i=r.x,o=r.y,a=r.symbol||"circle",l=this._getR(r);if(c(a))n=Br(n=(t=a)(i,o,l));else{if(!(t=e.Symbols[a]))return console.warn(a+" marker is not supported."),null;n=t(i,o,l)}return n},e.prototype.createPath=function(t){Ci(this,t,{path:this._getPath()},this.get("paramsCache"))},e.Symbols=Di,e}(_i),zi=Pi;function Fi(t,e,n){var r=Sr();return t.createPath(r),r.isPointInPath(e,n)}function Hi(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function Wi(t,e,n){return(n[0]-t[0])*(e[1]-t[1])===(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function Gi(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var o=0;o<i;o++){var a=t[o],l=t[(o+1)%i];if(Wi(a,l,[e,n]))return!0;Hi(a[1]-n)>0!==Hi(l[1]-n)>0&&Hi(e-(n-a[1])*(a[0]-l[0])/(a[1]-l[1])-a[0])<0&&(r=!r)}return r}function ji(t,e,n,r,i,o,a,l){var s=(Math.atan2(l-e,a-t)+2*Math.PI)%(2*Math.PI);if(s<r||s>i)return!1;var u={x:t+n*Math.cos(s),y:e+n*Math.sin(s)};return Gr(u.x,u.y,a,l)<=o/2}var Ui=Nt;var Vi=a({hasArc:function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e},extractPolygons:function(t){for(var e=t.length,n=[],r=[],i=[],o=0;o<e;o++){var a=t[o],l=a[0];"M"===l?(i.length&&(r.push(i),i=[]),i.push([a[1],a[2]])):"Z"===l?i.length&&(n.push(i),i=[]):i.push([a[1],a[2]])}return i.length>0&&r.push(i),{polygons:n,polylines:r}},isPointInStroke:function(t,e,n,r,i){for(var o=!1,a=e/2,l=0;l<t.length;l++){var s=t[l],u=s.currentPoint,c=s.params,h=s.prePoint,d=s.box;if(!d||jr(d.x-a,d.y-a,d.width+e,d.height+e,n,r)){switch(s.command){case"L":case"Z":o=Bi(h[0],h[1],u[0],u[1],e,n,r);break;case"Q":o=ur.pointDistance(h[0],h[1],c[1],c[2],c[3],c[4],n,r)<=e/2;break;case"C":o=vr.pointDistance(h[0],h[1],c[1],c[2],c[3],c[4],c[5],c[6],n,r,i)<=e/2;break;case"A":var f=s.arcParams,p=f.cx,v=f.cy,g=f.rx,y=f.ry,m=f.startAngle,C=f.endAngle,w=f.xRotation,x=[n,r,1],b=g>y?g:y;Rt(x,x,Ui(null,[["t",-p,-v],["r",-w],["s",1/(g>y?1:g/y),1/(g>y?y/g:1)]])),o=ji(0,0,b,m,C,e,x[0],x[1])}if(o)break}}return o}},ut);function Yi(t,e,n){for(var r=!1,i=0;i<t.length;i++){if(r=Gi(t[i],e,n))break}return r}var Xi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return a(a({},e),{startArrow:!1,endArrow:!1}
2)},e.prototype.initAttrs=function(t){this._setPathArr(t.path),this.setArrow()},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),"path"===e&&this._setPathArr(n),this.setArrow()},e.prototype._setPathArr=function(t){this.attrs.path=Br(t);var e=Vi.hasArc(t);this.set("hasArc",e),this.set("paramsCache",{}),this.set("segments",null),this.set("curve",null),this.set("tCache",null),this.set("totalLength",null)},e.prototype.getSegments=function(){var t=this.get("segements");return t||(t=Hr(this.attr("path")),this.set("segments",t)),t},e.prototype.setArrow=function(){var t,e=this.attr(),n=e.startArrow,r=e.endArrow;n&&ui(this,e,(t=this.getStartTangent())[0][0],t[0][1],t[1][0],t[1][1]);r&&ci(this,e,(t=this.getEndTangent())[0][0],t[0][1],t[1][0],t[1][1])},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var o=this.getSegments(),a=this.get("hasArc"),l=!1;if(n){var s=this.getTotalLength();l=Vi.isPointInStroke(o,i,t,e,s)}if(!l&&r)if(a)l=Fi(this,t,e);else{var u=this.attr("path"),c=Vi.extractPolygons(u);l=Yi(c.polygons,t,e)||Yi(c.polylines,t,e)}return l},e.prototype.createPath=function(t){Ci(this,t,this.attr(),this.get("paramsCache"))},e.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),n=this.get("endArrowShape");e&&e.draw(t),n&&n.draw(t)},e.prototype.getTotalLength=function(){var t=this.get("totalLength");return h(t)?(this._calculateCurve(),this._setTcache(),this.get("totalLength")):t},e.prototype.getPoint=function(t){var e,n,r=this.get("tCache");r||(this._calculateCurve(),this._setTcache(),r=this.get("tCache"));var i=this.get("curve");if(!r||0===r.length)return i?{x:i[0][1],y:i[0][2]}:null;p(r,(function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}));var o=i[n];if(h(o)||h(n))return null;var a=o.length,l=i[n+1];return vr.pointAt(o[a-2],o[a-1],l[1],l[2],l[3],l[4],l[5],l[6],e)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",Vi.pathToCurve(t))},e.prototype._setTcache=function(){var t,e,n,r,i=0,o=0,a=[],l=this.get("curve");l&&(p(l,(function(t,e){n=l[e+1],r=t.length,n&&(i+=vr.length(t[r-2],t[r-1],n[1],n[2],n[3],n[4],n[5],n[6])||0)})),this.set("totalLength",i),0!==i?(p(l,(function(s,u){n=l[u+1],r=s.length,n&&((t=[])[0]=o/i,e=vr.length(s[r-2],s[r-1],n[1],n[2],n[3],n[4],n[5],n[6]),o+=e||0,t[1]=o/i,a.push(t))})),this.set("tCache",a)):this.set("tCache",[]))},e.prototype.getStartTangent=function(){var t,e=this.getSegments();if(e.length>1){var n=e[0].currentPoint,r=e[1].currentPoint,i=e[1].startTangent;t=[],i?(t.push([n[0]-i[0],n[1]-i[1]]),t.push([n[0],n[1]])):(t.push([r[0],r[1]]),t.push([n[0],n[1]]))}return t},e.prototype.getEndTangent=function(){var t,e=this.getSegments(),n=e.length;if(n>1){var r=e[n-2].currentPoint,i=e[n-1].currentPoint,o=e[n-1].endTangent;t=[],o?(t.push([i[0]-o[0],i[1]-o[1]]),t.push([i[0],i[1]])):(t.push([r[0],r[1]]),t.push([i[0],i[1]]))}return t},e}(_i),qi=Xi;function Ki(t,e,n,r,i){var o=t.length;if(o<2)return!1;for(var a=0;a<o-1;a++){if(Bi(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,n,r))return!0}if(i){var l=t[0],s=t[o-1];if(Bi(l[0],l[1],s[0],s[1],e,n,r))return!0}return!1}var Zi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var o=this.attr().points,a=!1;return n&&(a=Ki(o,i,t,e,!0)),!a&&r&&(a=Gi(o,t,e)),a},e.prototype.createPath=function(t){var e=this.attr().points;if(!(e.length<2)){t.beginPath();for(var n=0;n<e.length;n++){var r=e[n];0===n?t.moveTo(r[0],r[1]):t.lineTo(r[0],r[1])}t.closePath()}},e}(_i),$i=Zi,Qi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return a(a({},e),{startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),this.setArrow(),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.setArrow=function(){var t=this.attr(),e=this.attrs,n=e.points,r=e.startArrow,i=e.endArrow,o=n.length,a=n[0][0],l=n[0][1],s=n[o-1][0],u=n[o-1][1];r&&ui(this,t,n[1][0],n[1][1],a,l),i&&ci(this,t,n[o-2][0],n[o-2][1],s,u)},e.prototype.isFill=function(){return!1},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){return!(!n||!i)&&Ki(this.attr().points,i,t,e,!1)},e.prototype.isStroke=function(){return!0},e.prototype.createPath=function(t){var e=this.attr(),n=e.points,r=e.startArrow,i=e.endArrow,o=n.length;if(!(n.length<2)){var a,l=n[0][0],s=n[0][1],u=n[o-1][0],c=n[o-1][1];if(r&&r.d)l+=(a=si(l,s,n[1][0],n[1][1],r.d)).dx,s+=a.dy;if(i&&i.d)u-=(a=si(n[o-2][0],n[o-2][1],u,c,i.d)).dx,c-=a.dy;t.beginPath(),t.moveTo(l,s);for(var h=0;h<o-1;h++){var d=n[h];t.lineTo(d[0],d[1])}t.lineTo(u,c)}},e.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),n=this.get("endArrowShape");e&&e.draw(t),n&&n.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return h(e)?(this.set("totalLength",Cr(t)),this.get("totalLength")):e},e.prototype.getPoint=function(t){var e,n,r=this.attr().points,i=this.get("tCache");
2return i||(this._setTcache(),i=this.get("tCache")),p(i,(function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)})),nr.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,r,i=0,o=[];p(t,(function(a,l){t[l+1]&&((n=[])[0]=i/e,r=nr.length(a[0],a[1],t[l+1][0],t[l+1][1]),i+=r,n[1]=i/e,o.push(n))})),this.set("tCache",o)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(_i),Ji=Qi;var to=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return a(a({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var o=this.attr(),a=o.x,l=o.y,s=o.width,u=o.height,c=o.radius;if(c){var h=!1;return n&&(h=function(t,e,n,r,i,o,a,l){return Bi(t+i,e,t+n-i,e,o,a,l)||Bi(t+n,e+i,t+n,e+r-i,o,a,l)||Bi(t+n-i,e+r,t+i,e+r,o,a,l)||Bi(t,e+r-i,t,e+i,o,a,l)||ji(t+n-i,e+i,i,1.5*Math.PI,2*Math.PI,o,a,l)||ji(t+n-i,e+r-i,i,0,.5*Math.PI,o,a,l)||ji(t+i,e+r-i,i,.5*Math.PI,Math.PI,o,a,l)||ji(t+i,e+i,i,Math.PI,1.5*Math.PI,o,a,l)}(a,l,s,u,c,i,t,e)),!h&&r&&(h=Fi(this,t,e)),h}var d=i/2;return r&&n?jr(a-d,l-d,s+d,u+d,t,e):r?jr(a,l,s,u,t,e):n?function(t,e,n,r,i,o,a){var l=i/2;return jr(t-l,e-l,n,i,o,a)||jr(t+n-l,e-l,i,r,o,a)||jr(t+l,e+r-l,n,i,o,a)||jr(t-l,e+l,i,r,o,a)}(a,l,s,u,i,t,e):void 0},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.width,o=e.height,a=e.radius;
2if(t.beginPath(),0===a)t.rect(n,r,i,o);else{var l=function(t){var e=0,n=0,r=0,i=0;return d(t)?1===t.length?e=n=r=i=t[0]:2===t.length?(e=r=t[0],n=i=t[1]):3===t.length?(e=t[0],n=i=t[1],r=t[2]):(e=t[0],n=t[1],r=t[2],i=t[3]):e=n=r=i=t,[e,n,r,i]}(a),s=l[0],u=l[1],c=l[2],h=l[3];t.moveTo(n+s,r),t.lineTo(n+i-u,r),0!==u&&t.arc(n+i-u,r+u,u,-Math.PI/2,0),t.lineTo(n+i,r+o-c),0!==c&&t.arc(n+i-c,r+o-c,c,0,Math.PI/2),t.lineTo(n+h,r+o),0!==h&&t.arc(n+h,r+o-h,h,Math.PI/2,Math.PI),t.lineTo(n,r+s),0!==s&&t.arc(n+s,r+s,s,Math.PI,1.5*Math.PI),t.closePath()}},e}(_i),eo=to,no=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return a(a({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.isOnlyHitBox=function(){return!0},e.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},e.prototype._assembleFont=function(){var t=this.attrs;t.font=Er(t)},e.prototype._setText=function(t){var e=null;m(t)&&-1!==t.indexOf("\n")&&(e=t.split("\n")),this.set("textArr",e)},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),e.startsWith("font")&&this._assembleFont(),"text"===e&&this._setText(n)},e.prototype._getSpaceingY=function(){var t=this.attrs,e=t.lineHeight,n=1*t.fontSize;return e?e-n:.14*n},e.prototype._drawTextArr=function(t,e,n){var r,i=this.attrs,o=i.textBaseline,a=i.x,l=i.y,s=1*i.fontSize,u=this._getSpaceingY(),c=_r(i.text,i.fontSize,i.lineHeight);p(e,(function(e,i){r=l+i*(u+s)-c+s,"middle"===o&&(r+=c-s-(c-s)/2),"top"===o&&(r+=c-s),h(e)||(n?t.fillText(e,a,r):t.strokeText(e,a,r))}))},e.prototype._drawText=function(t,e){var n=this.attr(),r=n.x,i=n.y,o=this.get("textArr");if(o)this._drawTextArr(t,o,e);else{var a=n.text;h(a)||(e?t.fillText(a,r,i):t.strokeText(a,r,i))}},e.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,r=e.opacity,i=e.strokeOpacity,o=e.fillOpacity;this.isStroke()&&n>0&&(h(i)||1===i||(t.globalAlpha=r),this.stroke(t)),this.isFill()&&(h(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=r)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(_i),ro=no;function io(t,e,n){var r,i,o=t.getTotalMatrix();if(o){var a=(r=[e,n,1],(i=o)?Pt(zt(i),r):r);return[a[0],a[1]]}return[e,n]}function oo(t,e,n){if(t.isCanvas&&t.isCanvas())return!0;if(!yt(t)||!1===t.cfg.isInView)return!1;if(t.cfg.clipShape){var r=io(t,e,n),i=r[0],o=r[1];if(t.isClipped(i,o))return!1}var a=t.cfg.cacheCanvasBBox||t.getCanvasBBox();return e>=a.minX&&e<=a.maxX&&n>=a.minY&&n<=a.maxY}function ao(t,e,n){if(!oo(t,e,n))return null;for(var r=null,i=t.getChildren(),o=i.length-1;o>=0;o--){var a=i[o];if(a.isGroup())r=ao(a,e,n);else if(oo(a,e,n)){var l=a,s=io(a,e,n),u=s[0],c=s[1];l.isInShape(u,c)&&(r=a)}if(r)break}return r}var lo,so,uo,co=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.renderer="canvas",e.autoDraw=!0,e.localRefresh=!0,e.refreshElements=[],e.clipView=!0,e.quickHit=!1,e},e.prototype.onCanvasChange=function(t){"attr"!==t&&"sort"!==t&&"changeSize"!==t||(this.set("refreshElements",[this]),this.draw())},e.prototype.getShapeBase=function(){return r},e.prototype.getGroupBase=function(){return bi},e.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||(window?window.devicePixelRatio:1);return t>=1?Math.ceil(t):1},e.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},e.prototype.createDom=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return this.set("context",e),t},e.prototype.setDOMSize=function(e,n){t.prototype.setDOMSize.call(this,e,n);var r=this.get("context"),i=this.get("el"),o=this.getPixelRatio();i.width=o*e,i.height=o*n,o>1&&r.scale(o,o)},e.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var e=this.get("context"),n=this.get("el");e.clearRect(0,0,n.width,n.height)},e.prototype.getShape=function(e,n){return this.get("quickHit")?ao(this,e,n):t.prototype.getShape.call(this,e,n,null)},e.prototype._getRefreshRegion=function(){var t,e=this.get("refreshElements"),n=this.getViewRange();e.length&&e[0]===this?t=n:(t=function(t){if(!t.length)return null;var e=[],n=[],r=[],i=[];return p(t,(function(t){var o=xi(t);o&&(e.push(o.minX),n.push(o.minY),r.push(o.maxX),i.push(o.maxY))})),{minX:y(e),minY:y(n),maxX:g(r),maxY:g(i)}}(e),t&&(t.minX=Math.floor(t.minX),t.minY=Math.floor(t.minY),t.maxX=Math.ceil(t.maxX),t.maxY=Math.ceil(t.maxY),t.maxY+=1,this.get("clipView")&&(t=function(t,e){return t&&e&&Ur(t,e)?{minX:Math.max(t.minX,e.minX),minY:Math.max(t.minY,e.minY),maxX:Math.min(t.maxX,e.maxX),maxY:Math.min(t.maxY,e.maxY)}:null}(t,n))));return t},e.prototype.refreshElement=function(t){this.get("refreshElements").push(t)},e.prototype._clearFrame=function(){var t,e=this.get("drawFrame");e&&(t=e,(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout)(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),e=this.get("el"),n=this.getChildren();t.clearRect(0,0,e.width,e.height),di(t,this),fi(t,n),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t=this.get("context"),e=this.get("refreshElements"),n=this.getChildren(),r=this._getRefreshRegion();r?(t.clearRect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.save(),t.beginPath(),t.rect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.clip(),di(t,this),pi(this,n,r),fi(t,n,r),t.restore(
2)):e.length&&gi(e),p(e,(function(t){t.get("hasChanged")&&t.set("hasChanged",!1)})),this.set("refreshElements",[])},e.prototype._startDraw=function(){var t,e=this,n=this.get("drawFrame");n||(t=function(){e.get("localRefresh")?e._drawRegion():e._drawAll(),e.set("drawFrame",null)},n=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,16)})(t),this.set("drawFrame",n))},e.prototype.skipDraw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.width=0,t.height=0,t.parentNode.removeChild(t)},e}(jn);!function(t){t.DATA_CELL_CLICK_EVENT="interaction:data-cell-click",t.MERGED_CELLS_CLICK_EVENT="interaction:merged-cells-click",t.CORNER_TEXT_CLICK_EVENT="interaction:corner-cell-text-click",t.ROW_COLUMN_CLICK_EVENT="interaction:row-column-click",t.ROW_TEXT_CLICK_EVENT="interaction:row-text-click",t.HOVER_EVENT="interaction:hover",t.TREND_ICON_CLICK="interaction:trend-icon-click"}(lo||(lo={})),function(t){t.MOUSE_DOWN="mousedown",t.MOUSE_MOVE="mousemove",t.MOUSE_OUT="mouseout",t.MOUSE_LEAVE="mouseleave",t.MOUSE_UP="mouseup",t.KEY_DOWN="keydown",t.KEY_UP="keyup",t.CLICK="click",t.HOVER="hover",t.DOUBLE_CLICK="dblclick",t.CONTEXT_MENU="contextmenu"}(so||(so={})),function(t){t.ROW_CELL_HOVER="row-cell:hover",t.ROW_CELL_CLICK="row-cell:click",t.ROW_CELL_DOUBLE_CLICK="row-cell:double-click",t.ROW_CELL_CONTEXT_MENU="row-cell:context-menu",t.ROW_CELL_MOUSE_DOWN="row-cell:mouse-down",t.ROW_CELL_MOUSE_UP="row-cell:mouse-up",t.ROW_CELL_MOUSE_MOVE="row-cell:mouse-move",t.ROW_CELL_COLLAPSE_TREE_ROWS="row-cell:collapsed-tree-rows",t.ROW_CELL_SCROLL="row-cell:scroll",t.ROW_CELL_BRUSH_SELECTION="row-cell:brush-selection",t.COL_CELL_HOVER="col-cell:hover",t.COL_CELL_CLICK="col-cell:click",t.COL_CELL_DOUBLE_CLICK="col-cell:double-click",t.COL_CELL_CONTEXT_MENU="col-cell:context-menu",t.COL_CELL_MOUSE_DOWN="col-cell:mouse-down",t.COL_CELL_MOUSE_UP="col-cell:mouse-up",t.COL_CELL_MOUSE_MOVE="col-cell:mouse-move",t.COL_CELL_BRUSH_SELECTION="col-cell:brush-selection",t.DATA_CELL_HOVER="data-cell:hover",t.DATA_CELL_CLICK="data-cell:click",t.DATA_CELL_DOUBLE_CLICK="data-cell:double-click",t.DATA_CELL_CONTEXT_MENU="data-cell:context-menu",t.DATA_CELL_MOUSE_UP="data-cell:mouse-up",t.DATA_CELL_MOUSE_DOWN="data-cell:mouse-down",t.DATA_CELL_MOUSE_MOVE="data-cell:mouse-move",t.DATA_CELL_TREND_ICON_CLICK="data-cell:trend-icon-click",t.DATA_CELL_BRUSH_SELECTION="data-cell:brush-selection",t.DATA_CELL_SELECT_MOVE="data-cell:select-move",t.CORNER_CELL_HOVER="corner-cell:hover",t.CORNER_CELL_CLICK="corner-cell:click",t.CORNER_CELL_DOUBLE_CLICK="corner-cell:double-click",t.CORNER_CELL_CONTEXT_MENU="corner-cell:context-menu",t.CORNER_CELL_MOUSE_DOWN="corner-cell:mouse-down",t.CORNER_CELL_MOUSE_UP="corner-cell:mouse-up",t.CORNER_CELL_MOUSE_MOVE="corner-cell:mouse-move",t.MERGED_CELLS_HOVER="merged-cells:hover",t.MERGED_CELLS_CLICK="merged-cells:click",t.MERGED_CELLS_DOUBLE_CLICK="merged-cells:double-click",t.MERGED_CELLS_CONTEXT_MENU="merged-cell:context-menu",t.MERGED_CELLS_MOUSE_DOWN="merged-cells:mouse-down",t.MERGED_CELLS_MOUSE_UP="merged-cells:mouse-up",t.MERGED_CELLS_MOUSE_MOVE="merged-cells:mouse-move",t.RANGE_SORT="sort:range-sort",t.RANGE_SORTED="sort:range-sorted",t.RANGE_FILTER="filter:range-filter",t.RANGE_FILTERED="filter:range-filtered",t.LAYOUT_AFTER_HEADER_LAYOUT="layout:after-header-layout",t.LAYOUT_CELL_SCROLL="layout:cell-scroll",t.LAYOUT_PAGINATION="layout:pagination",t.LAYOUT_COLLAPSE_ROWS="layout:collapsed-rows",t.LAYOUT_AFTER_COLLAPSE_ROWS="layout:after-collapsed-rows",t.LAYOUT_AFTER_REAL_DATA_CELL_RENDER="layout:after-real-data-cell-render",t.LAYOUT_TREE_ROWS_COLLAPSE_ALL="layout:toggle-collapse-all",t.LAYOUT_COLS_EXPANDED="layout:table-col-expanded",t.LAYOUT_COLS_HIDDEN="layout:table-col-hidden",t.LAYOUT_AFTER_RENDER="layout:after-render",t.LAYOUT_BEFORE_RENDER="layout:before-render",t.LAYOUT_DESTROY="layout:destroy",t.LAYOUT_RESIZE="layout:resize",t.LAYOUT_RESIZE_SERIES_WIDTH="layout:resize-series-width",t.LAYOUT_RESIZE_ROW_WIDTH="layout:resize-row-width",t.LAYOUT_RESIZE_ROW_HEIGHT="layout:resize-row-height",t.LAYOUT_RESIZE_COL_WIDTH="layout:resize-column-width",t.LAYOUT_RESIZE_COL_HEIGHT="layout:resize-column-height",t.LAYOUT_RESIZE_TREE_WIDTH="layout:resize-tree-width",t.LAYOUT_RESIZE_MOUSE_DOWN="layout:resize:mouse-down",t.LAYOUT_RESIZE_MOUSE_MOVE="layout:resize:mouse-move",t.LAYOUT_RESIZE_MOUSE_UP="layout:resize-mouse-up",t.GLOBAL_KEYBOARD_DOWN="global:keyboard-down",t.GLOBAL_KEYBOARD_UP="global:keyboard-up",t.GLOBAL_COPIED="global:copied",t.GLOBAL_MOUSE_UP="global:mouse-up",t.GLOBAL_MOUSE_MOVE="global:mouse-move",t.GLOBAL_ACTION_ICON_CLICK="global:action-icon-click",t.GLOBAL_ACTION_ICON_HOVER="global:action-icon-hover",t.G
2LOBAL_ACTION_ICON_HOVER_OFF="global:action-icon-hover-off",t.GLOBAL_CONTEXT_MENU="global:context-menu",t.GLOBAL_CLICK="global:click",t.GLOBAL_DOUBLE_CLICK="global:double-click",t.GLOBAL_SELECTED="global:selected",t.GLOBAL_HOVER="global:hover",t.GLOBAL_RESET="global:reset",t.GLOBAL_LINK_FIELD_JUMP="global:link-field-jump",t.GLOBAL_SCROLL="global:scroll"}(uo||(uo={}));var ho,fo="$$value$$",po="$$extra$$",vo="$$extra_column$$",go="$$total$$",yo="$$series_number$$",mo="mergedCellsGroup",Co="frozenRowGroup",wo="frozenColGroup",xo="frozenTrailingRowGroup",bo="frozenTrailingColGroup",So="frozenTopGroup",_o="frozenBottomGroup",Eo="rowResizeAreaGroup",Lo="rowFrozenResizeAreaGroup",To="frozenSplitLine",Oo="rowIndexResizeAreaGroup",Io="cornerResizeAreaGroup",Mo="colResizeAreaGroup",Ro="colFrozenResizeAreaGroup",Ao="gridGroup",Bo="horizontal-resize-area-",ko="root",No="[&]",Do="-",Po=/^root\[&\]*/;!function(t){t.Line="line",t.Bar="bar",t.Bullet="bullet"}(ho||(ho={}));var zo,Fo,Ho,Wo="square",Go="...",jo="antv-s2",Uo="valueRanges",Vo={},Yo="#000000",Xo="#FFFFFF",qo={data:[],totalData:[],fields:{rows:[],columns:[],values:[],customTreeItems:[],valueInCols:!0},meta:[],sortParams:[],filterParams:[]};!function(t){t.ROW="row",t.COL="col",t.TRAILING_ROW="trailingRow",t.TRAILING_COL="trailingCol",t.SCROLL="scroll",t.TOP="top",t.BOTTOM="bottom"}(Fo||(Fo={})),function(t){t.FROZEN_COL="frozenCol",t.FROZEN_ROW="frozenRow",t.FROZEN_TRAILING_COL="frozenTrailingCol",t.FROZEN_TRAILING_ROW="frozenTrailingRow"}(Ho||(Ho={}));var Ko,Zo,$o,Qo=((zo={})[Fo.ROW]="frozenRowGroup",zo[Fo.COL]="frozenColGroup",zo[Fo.TRAILING_COL]="frozenTrailingColGroup",zo[Fo.TRAILING_ROW]="frozenTrailingRowGroup",zo[Fo.SCROLL]="panelScrollGroup",zo[Fo.TOP]="frozenTopGroup",zo[Fo.BOTTOM]="frozenBottomGroup",zo);!function(t){t.CORNER_CELL_CLICK="cornerCellClick",t.DATA_CELL_CLICK="dataCellClick",t.MERGED_CELLS_CLICK="mergedCellsClick",t.ROW_COLUMN_CLICK="rowColumnClick",t.ROW_TEXT_CLICK="rowTextClick",t.HOVER="hover",t.BRUSH_SELECTION="brushSelection",t.ROW_BRUSH_SELECTION="rowBrushSelection",t.COL_BRUSH_SELECTION="colBrushSelection",t.COL_ROW_RESIZE="rowColResize",t.DATA_CELL_MULTI_SELECTION="dataCellMultiSelection",t.RANGE_SELECTION="rangeSelection",t.SELECTED_CELL_MOVE="selectedCellMove"}(Ko||(Ko={})),function(t){t.ALL_SELECTED="allSelected",t.SELECTED="selected",t.UNSELECTED="unselected",t.HOVER="hover",t.HOVER_FOCUS="hoverFocus",t.HIGHLIGHT="highlight",t.SEARCH_RESULT="searchResult",t.PREPARE_SELECT="prepareSelect"}(Zo||(Zo={})),function(t){t.DATA_CELL="dataCell",t.HEADER_CELL="headerCell",t.ROW_CELL="rowCell",t.COL_CELL="colCell",t.CORNER_CELL="cornerCell",t.MERGED_CELL="mergedCell"}($o||($o={}));var Jo,ta,ea,na,ra={textOpacity:"fillOpacity",backgroundOpacity:"fillOpacity",backgroundColor:"fill",borderOpacity:"strokeOpacity",borderColor:"stroke",borderWidth:"lineWidth",opacity:"opacity"},ia={textShape:["textOpacity"],textShapes:["textOpacity"],linkFieldShape:["opacity"],interactiveBgShape:["backgroundColor","backgroundOpacity"],interactiveBorderShape:["borderColor","borderOpacity","borderWidth"]},oa="interactionStateInfo";!function(t){t.CLICK="click",t.UN_DRAGGED="unDragged",t.DRAGGED="dragged"}(Jo||(Jo={})),function(t){t.SHIFT="Shift",t.COPY="c",t.ESC="Escape",t.META="Meta",t.CONTROL="Control",t.ARROW_UP="ArrowUp",t.ARROW_DOWN="ArrowDown",t.ARROW_LEFT="ArrowLeft",t.ARROW_RIGHT="ArrowRight"}(ta||(ta={})),function(t){t.ASC="ASC",t.DESC="DESC"}(ea||(ea={})),function(t){t.HOVER="hover",t.CLICK="click",t.BRUSH_SELECTION="brushSelection",t.ROW_BRUSH_SELECTION="rowBrushSelection",t.COL_BRUSH_SELECTION="colBrushSelection",t.MULTI_SELECTION="multiSelection",t.RESIZE="resize"}(na||(na={}));var aa,la,sa={x:{value:0,scroll:!1},y:{value:0,scroll:!1}};!function(t){t.CONTENT="content",t.CANVAS="canvas"}(aa||(aa={})),function(t){t.LEADING="leading",t.TRAILING="trailing"}(la||(la={}));var ua,ca,ha;!function(t){t.Horizontal="col",t.Vertical="row"}(ua||(ua={})),function(t){t.Field="field",t.Cell="cell",t.Tree="tree",t.Series="series"}(ca||(ca={})),function(t){t.ALL="all",t.CURRENT="current"}(ha||(ha={}));var da;!function(t){t.Adaptive="adaptive",t.ColAdaptive="colAdaptive",t.Compact="compact"}(da||(da={}));var fa={layoutWidthType:da.Adaptive,showTreeLeafNodeAlignDot:!1,collapsedRows:{},collapsedCols:{},cellCfg:{width:96,height:30},rowCfg:{width:null,widthByField:{},heightByField:{}},colCfg:{height:30,widthByFieldValue:{},heightByField:{}},device:"pc"},pa={width:600,height:480,debug:!1,hierarchyType:"grid",conditions:{},totals:{},tooltip:{showTooltip:!1,autoAdjustBoundary:"body",operation:{hiddenColumns:!1,trend:!1,sort:!1,menus:[]}},interaction:{linkFields:[],hiddenColumnFields:[],selectedCellsSpotlight:!1,hoverHighlight:!0,hoverFocus:{duration:800},scrollSpeedRatio:{horizontal:1,vertical:1},autoResetSheetStyle:!0,brushSelection:{data:!0,row:!1,col:!1},multiSelection:!0,rangeSelection:!0,scrollbarPosition:aa.CONTENT,resize:{rowCellVertical:!0,cornerCellHorizontal:!0,colCellHorizontal:!0,colCellVertical:!0,rowResizeType:ha.ALL},eventListenerOptions:!1,selectedCellHighlight:!1,overscrollBehavior:"auto"},showSeriesNumber:!1,customSVGIcons:[],showDefaultHeaderActionIcon:!1,headerActionIcons:[],style:fa,frozenRowHeader:!0,frozenRowCount:0,frozenColCount:0,frozenTrailingRowCount:0,frozenTrailingColCount:0,hdAdapter:!0,cornerText:"",cornerExtraFieldText:"",placeholder:Do,supportCSSTransform:!1,devicePixelRatio:window.devicePixelRatio}
2,va=function(t,e){return va=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},va(t,e)};function ga(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}va(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ya=function(){return ya=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ya.apply(this,arguments)};function ma(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function Ca(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function wa(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(l){i={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function xa(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var ba="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Sa="object"==typeof self&&self&&self.Object===Object&&self,_a=ba||Sa||Function("return this")(),Ea=_a.Symbol,La=Object.prototype,Ta=La.hasOwnProperty,Oa=La.toString,Ia=Ea?Ea.toStringTag:void 0;var Ma=Object.prototype.toString;var Ra=Ea?Ea.toStringTag:void 0;function Aa(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Ra&&Ra in Object(t)?function(t){var e=Ta.call(t,Ia),n=t[Ia];try{t[Ia]=void 0;var r=!0}catch(o){}var i=Oa.call(t);return r&&(e?t[Ia]=n:delete t[Ia]),i}(t):function(t){return Ma.call(t)}(t)}function Ba(t){return null!=t&&"object"==typeof t}function ka(t){return"symbol"==typeof t||Ba(t)&&"[object Symbol]"==Aa(t)}function Na(t){return"number"==typeof t?t:ka(t)?NaN:+t}function Da(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Pa=Array.isArray,za=Ea?Ea.prototype:void 0,Fa=za?za.toString:void 0;function Ha(t){if("string"==typeof t)return t;if(Pa(t))return Da(t,Ha)+"";if(ka(t))return Fa?Fa.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function Wa(t,e){return function(n,r){var i;if(void 0===n&&void 0===r)return e;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Ha(n),r=Ha(r)):(n=Na(n),r=Na(r)),i=t(n,r)}return i}}var Ga=Wa((function(t,e){return t+e}),0),ja=/\s/;function Ua(t){for(var e=t.length;e--&&ja.test(t.charAt(e)););return e}var Va=/^\s+/;function Ya(t){return t?t.slice(0,Ua(t)+1).replace(Va,""):t}function Xa(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var qa=/^[-+]0x[0-9a-f]+$/i,Ka=/^0b[01]+$/i,Za=/^0o[0-7]+$/i,$a=parseInt;function Qa(t){if("number"==typeof t)return t;if(ka(t))return NaN;if(Xa(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Xa(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ya(t);var n=Ka.test(t);return n||Za.test(t)?$a(t.slice(2),n?2:8):qa.test(t)?NaN:+t}var Ja=1/0;function tl(t){return t?(t=Qa(t))===Ja||t===-1/0?17976931348623157e292*(t<0?-1:1):t===t?t:0:0===t?t:0}function el(t){var e=tl(t),n=e%1;return e===e?n?e-n:e:0}function nl(t){return t}function rl(t){if(!Xa(t))return!1;var e=Aa(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var il=_a["__core-js_shared__"],ol=function(){var t=/[^.]+$/.exec(il&&il.keys&&il.keys.IE_PROTO||"");
2return t?"Symbol(src)_1."+t:""}();var al=Function.prototype.toString;function ll(t){if(null!=t){try{return al.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var sl=/^\[object .+?Constructor\]$/,ul=Function.prototype,cl=Object.prototype,hl=ul.toString,dl=cl.hasOwnProperty,fl=RegExp("^"+hl.call(dl).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pl(t){return!(!Xa(t)||function(t){return!!ol&&ol in t}(t))&&(rl(t)?fl:sl).test(ll(t))}function vl(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return pl(n)?n:void 0}var gl=vl(_a,"WeakMap"),yl=gl&&new gl,ml=yl?function(t,e){return yl.set(t,e),t}:nl,Cl=ml,wl=Object.create,xl=function(){function t(){}return function(e){if(!Xa(e))return{};if(wl)return wl(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),bl=xl;function Sl(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=bl(t.prototype),r=t.apply(n,e);return Xa(r)?r:n}}function _l(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var El=Math.max;function Ll(t,e,n,r){for(var i=-1,o=t.length,a=n.length,l=-1,s=e.length,u=El(o-a,0),c=Array(s+u),h=!r;++l<s;)c[l]=e[l];for(;++i<a;)(h||i<o)&&(c[n[i]]=t[i]);for(;u--;)c[l++]=t[i++];return c}var Tl=Math.max;function Ol(t,e,n,r){for(var i=-1,o=t.length,a=-1,l=n.length,s=-1,u=e.length,c=Tl(o-l,0),h=Array(c+u),d=!r;++i<c;)h[i]=t[i];for(var f=i;++s<u;)h[f+s]=e[s];for(;++a<l;)(d||i<o)&&(h[f+n[a]]=t[i++]);return h}function Il(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}function Ml(){}function Rl(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Al(){}Rl.prototype=bl(Ml.prototype),Rl.prototype.constructor=Rl;var Bl=yl?function(t){return yl.get(t)}:Al,kl=Bl,Nl={},Dl=Object.prototype.hasOwnProperty;function Pl(t){for(var e=t.name+"",n=Nl[e],r=Dl.call(Nl,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function zl(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Fl(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function Hl(t){if(t instanceof Rl)return t.clone();var e=new zl(t.__wrapped__,t.__chain__);return e.__actions__=Fl(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}zl.prototype=bl(Ml.prototype),zl.prototype.constructor=zl;var Wl=Object.prototype.hasOwnProperty;function Gl(t){if(Ba(t)&&!Pa(t)&&!(t instanceof Rl)){if(t instanceof zl)return t;if(Wl.call(t,"__wrapped__"))return Hl(t)}return new zl(t)}function jl(t){var e=Pl(t),n=Gl[e];if("function"!=typeof n||!(e in Rl.prototype))return!1;if(t===n)return!0;var r=kl(n);return!!r&&t===r[0]}Gl.prototype=Ml.prototype,Gl.prototype.constructor=Gl;var Ul=Date.now;function Vl(t){var e=0,n=0;return function(){var r=Ul(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Yl=Vl(Cl),Xl=/\{\n\/\* \[wrapped with (.+)\] \*/,ql=/,? & /;var Kl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Zl(t){return function(){return t}}var $l=function(){try{var t=vl(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Ql=$l,Jl=Ql?function(t,e){return Ql(t,"toString",{configurable:!0,enumerable:!1,value:Zl(e),writable:!0})}:nl,ts=Vl(Jl);function es(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function ns(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function rs(t){return t!==t}function is(t,e,n){return e===e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):ns(t,rs,n)}function os(t,e){return!!(null==t?0:t.length)&&is(t,e,0)>-1}var as=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function ls(t,e,n){var r=e+"";return ts(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Kl,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return es(as,(function(n){var r="_."+n[0];e&n[1]&&!os(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(Xl);return e?e[1].split(ql):[]}(r),n)))}function ss(t,e,n,r,i,o,a,l,s,u){var c=8&e;e|=c?32:64,4&(e&=~(c?64:32))||(e&=-4);var h=[t,e,i,c?o:void 0,c?a:void 0,c?void 0:o,c?void 0:a,l,s,u],d=n.apply(void 0,h);return jl(t)&&Yl(d,h),d.placeholder=r,ls(d,t,e)}function us(t){return t.placeholder}var cs=/^(?:0|[1-9]\d*)$/;function hs(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&cs.test(t))&&t>-1&&t%1==0&&t<e}var ds=Math.min;function fs(t,e){for(var n=t.length,r=ds(e.length,n),i=Fl(t);r--;){var o=e[r];t[r]=hs(o,n)?i[o]:void 0}return t}var ps="__lodash_placeholder__";function vs(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==ps||(t[n]=ps,o[i++]=n)}return o}function gs(t,e,n,r,i,o,a,l,s,u){var c=128&e,h=1&e,d=2&e,f=24&e,p=512&e,v=d?void 0:Sl(t);return function g(){for(var y=arguments.length,m=Array(y),C=y;C--;)m[C]=arguments[C];if(f)var w=us(g),x=Il(m,w);if(r&&(m=Ll(m,r,i,f)),o&&(m=Ol(m,o,a,f)),y-=x,f&&y<u){var b=vs(m,w);return ss(t,e,gs,g.placeholder,n,m,b,l,s,u-y)}var S=h?n:this,_=d?S[t]:t;return y=m.length,l?m=fs(m,l):p&&y>1&&m.reverse(),c&&s<y&&(m.length=s),this&&this!==_a&&this instanceof g&&(_=v||Sl(_)),_.apply(S,m)}}var ys="__lodash_placeholder__",ms=128,Cs=Math.min;var ws=Math.max;function xs(t,e,n,r,i,o,a,l){var s=2&e;if(!s&&"function"!=typeof t)throw new TypeError("Expected a function");var u=r?r.length:0;if(u||(e&=-97,r=i=void 0),a=void 0===a?a:ws(el(a),0),l=void 0===l?l:el(l),u-=i?i.length:0,64&e){var c=r,h=i;r=i=void 0}var d=s?void 0:kl(t),f=[t,e,n,r,i,c,h,o,a,l];if(d&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=r==ms&&8==n||r==ms&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;
2if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var l=e[3];if(l){var s=t[3];t[3]=s?Ll(s,l,e[4]):l,t[4]=s?vs(t[3],ys):e[4]}(l=e[5])&&(s=t[5],t[5]=s?Ol(s,l,e[6]):l,t[6]=s?vs(t[5],ys):e[6]),(l=e[7])&&(t[7]=l),r&ms&&(t[8]=null==t[8]?e[8]:Cs(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(f,d),t=f[0],e=f[1],n=f[2],r=f[3],i=f[4],!(l=f[9]=void 0===f[9]?s?0:t.length:ws(f[9]-u,0))&&24&e&&(e&=-25),e&&1!=e)p=8==e||16==e?function(t,e,n){var r=Sl(t);return function i(){for(var o=arguments.length,a=Array(o),l=o,s=us(i);l--;)a[l]=arguments[l];var u=o<3&&a[0]!==s&&a[o-1]!==s?[]:vs(a,s);return(o-=u.length)<n?ss(t,e,gs,i.placeholder,void 0,a,u,void 0,void 0,n-o):_l(this&&this!==_a&&this instanceof i?r:t,this,a)}}(t,e,l):32!=e&&33!=e||i.length?gs.apply(void 0,f):function(t,e,n,r){var i=1&e,o=Sl(t);return function e(){for(var a=-1,l=arguments.length,s=-1,u=r.length,c=Array(u+l),h=this&&this!==_a&&this instanceof e?o:t;++s<u;)c[s]=r[s];for(;l--;)c[s++]=arguments[++a];return _l(h,i?n:this,c)}}(t,e,n,r);else var p=function(t,e,n){var r=1&e,i=Sl(t);return function e(){return(this&&this!==_a&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return ls((d?Cl:Yl)(p,f),t,e)}function bs(t,e,n){return e=n?void 0:e,xs(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function Ss(t,e,n){"__proto__"==e&&Ql?Ql(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function _s(t,e){return t===e||t!==t&&e!==e}var Es=Object.prototype.hasOwnProperty;function Ls(t,e,n){var r=t[e];Es.call(t,e)&&_s(r,n)&&(void 0!==n||e in t)||Ss(t,e,n)}function Ts(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var l=e[o],s=r?r(n[l],t[l],l,n,t):void 0;void 0===s&&(s=t[l]),i?Ss(n,l,s):Ls(n,l,s)}return n}var Os=Math.max;function Is(t,e,n){return e=Os(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Os(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=r[i];return l[e]=n(a),_l(t,this,l)}}function Ms(t,e){return ts(Is(t,e,nl),t+"")}function Rs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function As(t){return null!=t&&Rs(t.length)&&!rl(t)}function Bs(t,e,n){if(!Xa(n))return!1;var r=typeof e;return!!("number"==r?As(n)&&hs(e,n.length):"string"==r&&e in n)&&_s(n[e],t)}function ks(t){return Ms((function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&Bs(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var l=n[r];l&&t(e,l,r,o)}return e}))}var Ns=Object.prototype;function Ds(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ns)}function Ps(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function zs(t){return Ba(t)&&"[object Arguments]"==Aa(t)}var Fs=Object.prototype,Hs=Fs.hasOwnProperty,Ws=Fs.propertyIsEnumerable,Gs=zs(function(){return arguments}())?zs:function(t){return Ba(t)&&Hs.call(t,"callee")&&!Ws.call(t,"callee")},js=Gs;function Us(){return!1}var Vs="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ys=Vs&&t&&!t.nodeType&&t,Xs=Ys&&Ys.exports===Vs?_a.Buffer:void 0,qs=(Xs?Xs.isBuffer:void 0)||Us,Ks={};function Zs(t){return function(e){return t(e)}}Ks["[object Float32Array]"]=Ks["[object Float64Array]"]=Ks["[object Int8Array]"]=Ks["[object Int16Array]"]=Ks["[object Int32Array]"]=Ks["[object Uint8Array]"]=Ks["[object Uint8ClampedArray]"]=Ks["[object Uint16Array]"]=Ks["[object Uint32Array]"]=!0,Ks["[object Arguments]"]=Ks["[object Array]"]=Ks["[object ArrayBuffer]"]=Ks["[object Boolean]"]=Ks["[object DataView]"]=Ks["[object Date]"]=Ks["[object Error]"]=Ks["[object Function]"]=Ks["[object Map]"]=Ks["[object Number]"]=Ks["[object Object]"]=Ks["[object RegExp]"]=Ks["[object Set]"]=Ks["[object String]"]=Ks["[object WeakMap]"]=!1;var $s="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qs=$s&&t&&!t.nodeType&&t,Js=Qs&&Qs.exports===$s&&ba.process,tu=function(){try{var t=Qs&&Qs.require&&Qs.require("util").types;return t||Js&&Js.binding&&Js.binding("util")}catch(e){}}(),eu=tu&&tu.isTypedArray,nu=eu?Zs(eu):function(t){return Ba(t)&&Rs(t.length)&&!!Ks[Aa(t)]},ru=Object.prototype.hasOwnProperty;function iu(t,e){var n=Pa(t),r=!n&&js(t),i=!n&&!r&&qs(t),o=!n&&!r&&!i&&nu(t),a=n||r||i||o,l=a?Ps(t.length,String):[],s=l.length;for(var u in t)!e&&!ru.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||hs(u,s))||l.push(u);return l}function ou(t,e){return function(n){return t(e(n))}}var au=ou(Object.keys,Object),lu=Object.prototype.hasOwnProperty;function su(t){if(!Ds(t))return au(t);var e=[];for(var n in Object(t))lu.call(t,n)&&"constructor"!=n&&e.push(n);return e}function uu(t){return As(t)?iu(t):su(t)}var cu=Object.prototype.hasOwnProperty,hu=ks((function(t,e){if(Ds(e)||As(e))Ts(e,uu(e),t);else for(var n in e)cu.call(e,n)&&Ls(t,n,e[n])})),du=hu;var fu=Object.prototype.hasOwnProperty;function pu(t){if(!Xa(t))return function(t){var e=[];
2if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Ds(t),n=[];for(var r in t)("constructor"!=r||!e&&fu.call(t,r))&&n.push(r);return n}function vu(t){return As(t)?iu(t,!0):pu(t)}var gu=ks((function(t,e){Ts(e,vu(e),t)})),yu=gu,mu=ks((function(t,e,n,r){Ts(e,vu(e),t,r)})),Cu=mu,wu=ks((function(t,e,n,r){Ts(e,uu(e),t,r)})),xu=wu,bu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Su=/^\w*$/;function _u(t,e){if(Pa(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!ka(t))||(Su.test(t)||!bu.test(t)||null!=e&&t in Object(e))}var Eu=vl(Object,"create");var Lu=Object.prototype.hasOwnProperty;var Tu=Object.prototype.hasOwnProperty;function Ou(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Iu(t,e){for(var n=t.length;n--;)if(_s(t[n][0],e))return n;return-1}Ou.prototype.clear=function(){this.__data__=Eu?Eu(null):{},this.size=0},Ou.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ou.prototype.get=function(t){var e=this.__data__;if(Eu){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Lu.call(e,t)?e[t]:void 0},Ou.prototype.has=function(t){var e=this.__data__;return Eu?void 0!==e[t]:Tu.call(e,t)},Ou.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Eu&&void 0===e?"__lodash_hash_undefined__":e,this};var Mu=Array.prototype.splice;function Ru(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ru.prototype.clear=function(){this.__data__=[],this.size=0},Ru.prototype.delete=function(t){var e=this.__data__,n=Iu(e,t);return!(n<0)&&(n==e.length-1?e.pop():Mu.call(e,n,1),--this.size,!0)},Ru.prototype.get=function(t){var e=this.__data__,n=Iu(e,t);return n<0?void 0:e[n][1]},Ru.prototype.has=function(t){return Iu(this.__data__,t)>-1},Ru.prototype.set=function(t,e){var n=this.__data__,r=Iu(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Au=vl(_a,"Map");function Bu(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function ku(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ku.prototype.clear=function(){this.size=0,this.__data__={hash:new Ou,map:new(Au||Ru),string:new Ou}},ku.prototype.delete=function(t){var e=Bu(this,t).delete(t);return this.size-=e?1:0,e},ku.prototype.get=function(t){return Bu(this,t).get(t)},ku.prototype.has=function(t){return Bu(this,t).has(t)},ku.prototype.set=function(t,e){var n=Bu(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Nu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Nu.Cache||ku),n}Nu.Cache=ku;var Du=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pu=/\\(\\)?/g,zu=function(t){var e=Nu(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Du,(function(t,n,r,i){e.push(r?i.replace(Pu,"$1"):n||t)})),e})),Fu=zu;function Hu(t){return null==t?"":Ha(t)}function Wu(t,e){return Pa(t)?t:_u(t,e)?[t]:Fu(Hu(t))}function Gu(t){if("string"==typeof t||ka(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function ju(t,e){for(var n=0,r=(e=Wu(e,t)).length;null!=t&&n<r;)t=t[Gu(e[n++])];return n&&n==r?t:void 0}function Uu(t,e,n){var r=null==t?void 0:ju(t,e);return void 0===r?n:r}function Vu(t,e){for(var n=-1,r=e.length,i=Array(r),o=null==t;++n<r;)i[n]=o?void 0:Uu(t,e[n]);return i}function Yu(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Xu=Ea?Ea.isConcatSpreadable:void 0;function qu(t){return Pa(t)||js(t)||!!(Xu&&t&&t[Xu])}function Ku(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=qu),i||(i=[]);++o<a;){var l=t[o];e>0&&n(l)?e>1?Ku(l,e-1,n,r,i):Yu(i,l):r||(i[i.length]=l)}return i}function Zu(t){return(null==t?0:t.length)?Ku(t,1):[]}function $u(t){return ts(Is(t,void 0,Zu),t+"")}var Qu=$u(Vu),Ju=ou(Object.getPrototypeOf,Object),tc=Function.prototype,ec=Object.prototype,nc=tc.toString,rc=ec.hasOwnProperty,ic=nc.call(Object);function oc(t){if(!Ba(t)||"[object Object]"!=Aa(t))return!1;var e=Ju(t);if(null===e)return!0;var n=rc.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&nc.call(n)==ic}function ac(t){if(!Ba(t))return!1;var e=Aa(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!oc(t)}var lc=Ms((function(t,e){try{return _l(t,void 0,e)}catch(n){return ac(n)?n:new Error(n)}})),sc=lc;function uc(t,e){var n;if("function"!=typeof e)throw new TypeError("Expected a function");return t=el(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var cc=Ms((function(t,e,n){var r=1;if(n.length){var i=vs(n,us(cc));r|=32}return xs(t,r,e,n,i)}));cc.placeholder={};var hc=cc,dc=$u((function(t,e){return es(e,(function(e){e=Gu(e),Ss(t,e,hc(t[e],t))})),t})),fc=dc,pc=Ms((function(t,e,n){var r=3;if(n.length){var i=vs(n,us(pc));r|=32}return xs(e,r,t,n,i)}));pc.placeholder={};var vc=pc;function gc(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function yc(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:gc(t,e,n)}var mc=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Cc(t){return mc.test(t)}var wc="\\ud800-\\udfff",xc="["+wc+"]",bc="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Sc="\\ud83c[\\udffb-\\udfff]",_c="[^"+wc+"]",Ec="(?:\\ud83c[\\udde6-\\uddff]){2}
2",Lc="[\\ud800-\\udbff][\\udc00-\\udfff]",Tc="(?:"+bc+"|"+Sc+")"+"?",Oc="[\\ufe0e\\ufe0f]?",Ic=Oc+Tc+("(?:\\u200d(?:"+[_c,Ec,Lc].join("|")+")"+Oc+Tc+")*"),Mc="(?:"+[_c+bc+"?",bc,Ec,Lc,xc].join("|")+")",Rc=RegExp(Sc+"(?="+Sc+")|"+Mc+Ic,"g");function Ac(t){return Cc(t)?function(t){return t.match(Rc)||[]}(t):function(t){return t.split("")}(t)}function Bc(t){return function(e){var n=Cc(e=Hu(e))?Ac(e):void 0,r=n?n[0]:e.charAt(0),i=n?yc(n,1).join(""):e.slice(1);return r[t]()+i}}var kc=Bc("toUpperCase");function Nc(t){return kc(Hu(t).toLowerCase())}function Dc(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Pc(t){return function(e){return null==t?void 0:t[e]}}var zc=Pc({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}
2),Fc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hc=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function Wc(t){return(t=Hu(t))&&t.replace(Fc,zc).replace(Hc,"")}var Gc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var jc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Uc="\\ud800-\\udfff",Vc="\\u2700-\\u27bf",Yc="a-z\\xdf-\\xf6\\xf8-\\xff",Xc="A-Z\\xc0-\\xd6\\xd8-\\xde",qc="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Kc="["+qc+"]",Zc="\\d+",$c="["+Vc+"]",Qc="["+Yc+"]",Jc="[^"+Uc+qc+Zc+Vc+Yc+Xc+"]",th="(?:\\ud83c[\\udde6-\\uddff]){2}",eh="[\\ud800-\\udbff][\\udc00-\\udfff]",nh="["+Xc+"]",rh="(?:"+Qc+"|"+Jc+")",ih="(?:"+nh+"|"+Jc+")",oh="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",ah="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",lh="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",sh="[\\ufe0e\\ufe0f]?",uh=sh+lh+("(?:\\u200d(?:"+["[^"+Uc+"]",th,eh].join("|")+")"+sh+lh+")*"),ch="(?:"+[$c,th,eh].join("|")+")"+uh,hh=RegExp([nh+"?"+Qc+"+"+oh+"(?="+[Kc,nh,"$"].join("|")+")",ih+"+"+ah+"(?="+[Kc,nh+rh,"$"].join("|")+")",nh+"?"+rh+"+"+oh,nh+"+"+ah,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zc,ch].join("|"),"g");function dh(t,e,n){return t=Hu(t),void 0===(e=n?void 0:e)?function(t){return jc.test(t)}(t)?function(t){return t.match(hh)||[]}(t):function(t){return t.match(Gc)||[]}(t):t.match(e)||[]}var fh=RegExp("['\u2019]","g");function ph(t){return function(e){return Dc(dh(Wc(e).replace(fh,"")),t,"")}}var vh=ph((function(t,e,n){return e=e.toLowerCase(),t+(n?Nc(e):e)})),gh=vh;var yh=_a.isFinite,mh=Math.min;function Ch(t){var e=Math[t];return function(t,n){if(t=Qa(t),(n=null==n?0:mh(el(n),292))&&yh(t)){var r=(Hu(t)+"e").split("e");return+((r=(Hu(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var wh=Ch("ceil");function xh(t){var e=Gl(t);return e.__chain__=!0,e}var bh=Math.ceil,Sh=Math.max;function _h(t,e,n){return t===t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function Eh(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=Qa(n))===n?n:0),void 0!==e&&(e=(e=Qa(e))===e?e:0),_h(Qa(t),e,n)}function Lh(t){var e=this.__data__=new Ru(t);this.size=e.size}function Th(t,e){return t&&Ts(e,uu(e),t)}Lh.prototype.clear=function(){this.__data__=new Ru,this.size=0},Lh.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Lh.prototype.get=function(t){return this.__data__.get(t)},Lh.prototype.has=function(t){return this.__data__.has(t)},Lh.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ru){var r=n.__data__;if(!Au||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ku(r)}return n.set(t,e),this.size=n.size,this};var Oh="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ih=Oh&&t&&!t.nodeType&&t,Mh=Ih&&Ih.exports===Oh?_a.Buffer:void 0,Rh=Mh?Mh.allocUnsafe:void 0;function Ah(t,e){if(e)return t.slice();var n=t.length,r=Rh?Rh(n):new t.constructor(n);return t.copy(r),r}function Bh(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function kh(){return[]}var Nh=Object.prototype.propertyIsEnumerable,Dh=Object.getOwnPropertySymbols,Ph=Dh?function(t){return null==t?[]:(t=Object(t),Bh(Dh(t),(function(e){return Nh.call(t,e)})))}:kh,zh=Ph;var Fh=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Yu(e,zh(t)),t=Ju(t);return e}:kh,Hh=Fh;function Wh(t,e,n){var r=e(t);return Pa(t)?r:Yu(r,n(t))}function Gh(t){return Wh(t,uu,zh)}function jh(t){return Wh(t,vu,Hh)}var Uh=vl(_a,"DataView"),Vh=vl(_a,"Promise"),Yh=vl(_a,"Set"),Xh="[object Map]",qh="[object Promise]",Kh="[object Set]",Zh="[object WeakMap]",$h="[object DataView]",Qh=ll(Uh),Jh=ll(Au),td=ll(Vh),ed=ll(Yh),nd=ll(gl),rd=Aa;(Uh&&rd(new Uh(new ArrayBuffer(1)))!=$h||Au&&rd(new Au)!=Xh||Vh&&rd(Vh.resolve())!=qh||Yh&&rd(new Yh)!=Kh||gl&&rd(new gl)!=Zh)&&(rd=function(t){var e=Aa(t),n="[object Object]"==e?t.constructor:void 0,r=n?ll(n):"";if(r)switch(r){case Qh:return $h;case Jh:return Xh;case td:return qh;case ed:return Kh;case nd:return Zh}return e});var id=rd,od=Object.prototype.hasOwnProperty;var ad=_a.Uint8Array;function ld(t){var e=new t.constructor(t.byteLength);return new ad(e).set(new ad(t)),e}var sd=/\w*$/;
2var ud=Ea?Ea.prototype:void 0,cd=ud?ud.valueOf:void 0;function hd(t,e){var n=e?ld(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function dd(t,e,n){var r,i=t.constructor;switch(e){case"[object ArrayBuffer]":return ld(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return function(t,e){var n=e?ld(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return hd(t,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,sd.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Symbol]":return r=t,cd?Object(cd.call(r)):{}}}function fd(t){return"function"!=typeof t.constructor||Ds(t)?{}:bl(Ju(t))}var pd=tu&&tu.isMap,vd=pd?Zs(pd):function(t){return Ba(t)&&"[object Map]"==id(t)};var gd=tu&&tu.isSet,yd=gd?Zs(gd):function(t){return Ba(t)&&"[object Set]"==id(t)},md="[object Arguments]",Cd="[object Function]",wd="[object Object]",xd={};function bd(t,e,n,r,i,o){var a,l=1&e,s=2&e,u=4&e;if(n&&(a=i?n(t,r,i,o):n(t)),void 0!==a)return a;if(!Xa(t))return t;var c=Pa(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&od.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!l)return Fl(t,a)}else{var h=id(t),d=h==Cd||"[object GeneratorFunction]"==h;if(qs(t))return Ah(t,l);if(h==wd||h==md||d&&!i){if(a=s||d?{}:fd(t),!l)return s?function(t,e){return Ts(t,Hh(t),e)}(t,function(t,e){return t&&Ts(e,vu(e),t)}(a,t)):function(t,e){return Ts(t,zh(t),e)}(t,Th(a,t))}else{if(!xd[h])return i?t:{};a=dd(t,h,l)}}o||(o=new Lh);var f=o.get(t);if(f)return f;o.set(t,a),yd(t)?t.forEach((function(r){a.add(bd(r,e,n,r,t,o))})):vd(t)&&t.forEach((function(r,i){a.set(i,bd(r,e,n,i,t,o))}));var p=c?void 0:(u?s?jh:Gh:s?vu:uu)(t);return es(p||t,(function(r,i){p&&(r=t[i=r]),Ls(a,i,bd(r,e,n,i,t,o))})),a}xd[md]=xd["[object Array]"]=xd["[object ArrayBuffer]"]=xd["[object DataView]"]=xd["[object Boolean]"]=xd["[object Date]"]=xd["[object Float32Array]"]=xd["[object Float64Array]"]=xd["[object Int8Array]"]=xd["[object Int16Array]"]=xd["[object Int32Array]"]=xd["[object Map]"]=xd["[object Number]"]=xd[wd]=xd["[object RegExp]"]=xd["[object Set]"]=xd["[object String]"]=xd["[object Symbol]"]=xd["[object Uint8Array]"]=xd["[object Uint8ClampedArray]"]=xd["[object Uint16Array]"]=xd["[object Uint32Array]"]=!0,xd["[object Error]"]=xd[Cd]=xd["[object WeakMap]"]=!1;function Sd(t){return bd(t,4)}function _d(t){return bd(t,5)}function Ed(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i}function Ld(){var t=arguments.length;if(!t)return[];for(var e=Array(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Yu(Pa(n)?Fl(n):[n],Ku(e,1))}function Td(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ku;++e<n;)this.add(t[e])}function Od(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Id(t,e){return t.has(e)}Td.prototype.add=Td.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Td.prototype.has=function(t){return this.__data__.has(t)};function Md(t,e,n,r,i,o){var a=1&n,l=t.length,s=e.length;if(l!=s&&!(a&&s>l))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var h=-1,d=!0,f=2&n?new Td:void 0;for(o.set(t,e),o.set(e,t);++h<l;){var p=t[h],v=e[h];if(r)var g=a?r(v,p,h,e,t,o):r(p,v,h,t,e,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!Od(e,(function(t,e){if(!Id(f,e)&&(p===t||i(p,t,n,r,o)))return f.push(e)}))){d=!1;break}}else if(p!==v&&!i(p,v,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Rd(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Ad(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}
vendor: 1,208 bytes, line 2
2var Bd=Ea?Ea.prototype:void 0,kd=Bd?Bd.valueOf:void 0;var Nd=Object.prototype.hasOwnProperty;var Dd="[object Arguments]",Pd="[object Array]",zd="[object Object]",Fd=Object.prototype.hasOwnProperty;function Hd(t,e,n,r,i,o){var a=Pa(t),l=Pa(e),s=a?Pd:id(t),u=l?Pd:id(e),c=(s=s==Dd?zd:s)==zd,h=(u=u==Dd?zd:u)==zd,d=s==u;if(d&&qs(t)){if(!qs(e))return!1;a=!0,c=!1}if(d&&!c)return o||(o=new Lh),a||nu(t)?Md(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new ad(t),new ad(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return _s(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=Rd;case"[object Set]":var s=1&r;if(l||(l=Ad),t.size!=e.size&&!s)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var c=Md(l(t),l(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(kd)return kd.call(t)==kd.call(e)}return!1}(t,e,s,n,r,i,o);if(!(1&n)){var f=c&&Fd.call(t,"__wrapped__"),p=h&&Fd.call(e,"__wrapped__");
2if(f||p){var v=f?t.value():t,g=p?e.value():e;return o||(o=new Lh),i(v,g,n,r,o)}}return!!d&&(o||(o=new Lh),function(t,e,n,r,i,o){var a=1&n,l=Gh(t),s=l.length;if(s!=Gh(e).length&&!a)return!1;for(var u=s;u--;){var c=l[u];if(!(a?c in e:Nd.call(e,c)))return!1}var h=o.get(t),d=o.get(e);if(h&&d)return h==e&&d==t;var f=!0;o.set(t,e),o.set(e,t);for(var p=a;++u<s;){var v=t[c=l[u]],g=e[c];if(r)var y=a?r(g,v,c,e,t,o):r(v,g,c,t,e,o);if(!(void 0===y?v===g||i(v,g,n,r,o):y)){f=!1;break}p||(p="constructor"==c)}if(f&&!p){var m=t.constructor,C=e.constructor;m==C||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof C&&C instanceof C||(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function Wd(t,e,n,r,i){return t===e||(null==t||null==e||!Ba(t)&&!Ba(e)?t!==t&&e!==e:Hd(t,e,n,r,Wd,i))}function Gd(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var l=n[i];if(a&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++i<o;){var s=(l=n[i])[0],u=t[s],c=l[1];if(a&&l[2]){if(void 0===u&&!(s in t))return!1}else{var h=new Lh;if(r)var d=r(u,c,s,t,e,h);if(!(void 0===d?Wd(c,u,3,r,h):d))return!1}}return!0}function jd(t){return t===t&&!Xa(t)}function Ud(t){for(var e=uu(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,jd(i)]}return e}function Vd(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Yd(t){var e=Ud(t);return 1==e.length&&e[0][2]?Vd(e[0][0],e[0][1]):function(n){return n===t||Gd(n,t,e)}}function Xd(t,e){return null!=t&&e in Object(t)}function qd(t,e,n){for(var r=-1,i=(e=Wu(e,t)).length,o=!1;++r<i;){var a=Gu(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Rs(i)&&hs(a,i)&&(Pa(t)||js(t))}function Kd(t,e){return null!=t&&qd(t,e,Xd)}function Zd(t,e){return _u(t)&&jd(e)?Vd(Gu(t),e):function(n){var r=Uu(n,t);return void 0===r&&r===e?Kd(n,t):Wd(e,r,3)}}function $d(t){return function(e){return null==e?void 0:e[t]}}function Qd(t){return _u(t)?$d(Gu(t)):function(t){return function(e){return ju(e,t)}}(t)}function Jd(t){return"function"==typeof t?t:null==t?nl:"object"==typeof t?Pa(t)?Zd(t[0],t[1]):Yd(t):Qd(t)}function tf(t){var e=null==t?0:t.length,n=Jd;return t=e?Da(t,(function(t){if("function"!=typeof t[1])throw new TypeError("Expected a function");return[n(t[0]),t[1]]})):[],Ms((function(n){for(var r=-1;++r<e;){var i=t[r];if(_l(i[0],this,n))return _l(i[1],this,n)}}))}function ef(t,e,n){var r=n.length;if(null==t)return!r;for(t=Object(t);r--;){var i=n[r],o=e[i],a=t[i];if(void 0===a&&!(i in t)||!o(a))return!1}return!0}function nf(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function rf(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),l=a.length;l--;){var s=a[t?l:++i];if(!1===n(o[s],s,o))break}return e}}var of=rf();function af(t,e){return t&&of(t,e,uu)}function lf(t,e){return function(n,r){if(null==n)return n;if(!As(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}var sf=lf(af);function uf(t,e,n,r){return sf(t,(function(t,i,o){e(r,t,n(t),o)})),r}function cf(t,e){return function(n,r){var i=Pa(n)?nf:uf,o=e?e():{};return i(n,t,Jd(r),o)}}var hf=Object.prototype.hasOwnProperty,df=cf((function(t,e,n){hf.call(t,n)?++t[n]:Ss(t,n,1)})),ff=df;function pf(t,e,n){var r=xs(t,8,void 0,void 0,void 0,void 0,void 0,e=n?void 0:e);return r.placeholder=pf.placeholder,r}pf.placeholder={};function vf(t,e,n){var r=xs(t,16,void 0,void 0,void 0,void 0,void 0,e=n?void 0:e);return r.placeholder=vf.placeholder,r}vf.placeholder={};var gf=function(){return _a.Date.now()},yf=Math.max,mf=Math.min;function Cf(t,e,n){var r,i,o,a,l,s,u=0,c=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=r,o=i;return r=i=void 0,u=e,a=t.apply(o,n)}function p(t){return u=t,l=setTimeout(g,e),c?f(t):a}function v(t){var n=t-s;return void 0===s||n>=e||n<0||h&&t-u>=o}function g(){var t=gf();if(v(t))return y(t);l=setTimeout(g,function(t){var n=e-(t-s);return h?mf(n,o-(t-u)):n}(t))}function y(t){return l=void 0,d&&r?f(t):(r=i=void 0,a)}function m(){var t=gf(),n=v(t);if(r=arguments,i=this,s=t,n){if(void 0===l)return p(s);if(h)return clearTimeout(l),l=setTimeout(g,e),f(s)}return void 0===l&&(l=setTimeout(g,e)),a}return e=Qa(e)||0,Xa(n)&&(c=!!n.leading,o=(h="maxWait"in n)?yf(Qa(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),m.cancel=function(){void 0!==l&&clearTimeout(l),u=0,r=s=i=l=void 0},m.flush=function(){return void 0===l?a:y(gf())},m}var wf=Object.prototype,xf=wf.hasOwnProperty,bf=Ms((function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&Bs(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],a=vu(o),l=-1,s=a.length;++l<s;){var u=a[l],c=t[u];(void 0===c||_s(c,wf[u])&&!xf.call(t,u))&&(t[u]=o[u])}return t})),Sf=bf;function _f(t,e,n){(void 0!==n&&!_s(t[e],n)||void 0===n&&!(e in t))&&Ss(t,e,n)}function Ef(t){return Ba(t)&&As(t)}function Lf(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}function Tf(t){return Ts(t,vu(t))}function Of(t,e,n,r,i){t!==e&&of(e,(function(o,a){if(i||(i=new Lh),Xa(o))!function(t,e,n,r,i,o,a){var l=Lf(t,n),s=Lf(e,n),u=a.get(s);if(u)_f(t,n,u);else{var c=o?o(l,s,n+"",t,e,a):void 0,h=void 0===c;if(h){var d=Pa(s),f=!d&&qs(s),p=!d&&!f&&nu(s);c=s,d||f||p?Pa(l)?c=l:Ef(l)?c=Fl(l):f?(h=!1,c=Ah(s,!0)):p?(h=!1,c=hd(s,!0)):c=[]:oc(s)||js(s)?(c=l,js(l)?c=Tf(l):Xa(l)&&!rl(l)||(c=fd(s))):h=!1}h&&(a.set(s,c),i(c,s,r,o,a),a.delete(s)),_f(t,n,c)}}
2(t,e,a,n,Of,r,i);else{var l=r?r(Lf(t,a),o,a+"",t,e,i):void 0;void 0===l&&(l=o),_f(t,a,l)}}),vu)}function If(t,e,n,r,i,o){return Xa(t)&&Xa(e)&&(o.set(e,t),Of(t,e,void 0,If,o),o.delete(e)),t}var Mf=ks((function(t,e,n,r){Of(t,e,n,r)})),Rf=Mf,Af=Ms((function(t){return t.push(void 0,If),_l(Rf,void 0,t)}));function Bf(t,e,n){if("function"!=typeof t)throw new TypeError("Expected a function");return setTimeout((function(){t.apply(void 0,n)}),e)}var kf=Ms((function(t,e){return Bf(t,1,e)})),Nf=kf,Df=Ms((function(t,e,n){return Bf(t,Qa(e)||0,n)})),Pf=Df;function zf(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ff(t,e,n,r){var i=-1,o=os,a=!0,l=t.length,s=[],u=e.length;if(!l)return s;n&&(e=Da(e,Zs(n))),r?(o=zf,a=!1):e.length>=200&&(o=Id,a=!1,e=new Td(e));t:for(;++i<l;){var c=t[i],h=null==n?c:n(c);if(c=r||0!==c?c:0,a&&h===h){for(var d=u;d--;)if(e[d]===h)continue t;s.push(c)}else o(e,h,r)||s.push(c)}return s}var Hf=Ms((function(t,e){return Ef(t)?Ff(t,Ku(e,1,Ef,!0)):[]})),Wf=Hf;function Gf(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var jf=Ms((function(t,e){var n=Gf(e);return Ef(n)&&(n=void 0),Ef(t)?Ff(t,Ku(e,1,Ef,!0),Jd(n)):[]})),Uf=jf,Vf=Ms((function(t,e){var n=Gf(e);return Ef(n)&&(n=void 0),Ef(t)?Ff(t,Ku(e,1,Ef,!0),void 0,n):[]})),Yf=Vf,Xf=Wa((function(t,e){return t/e}),1);function qf(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?gc(t,r?0:o,r?o+1:i):gc(t,r?o+1:0,r?i:o)}function Kf(t){return"function"==typeof t?t:nl}function Zf(t,e){return(Pa(t)?es:sf)(t,Kf(e))}function $f(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}var Qf=rf(!0);function Jf(t,e){return t&&Qf(t,e,uu)}var tp=lf(Jf,!0);function ep(t,e){return(Pa(t)?$f:tp)(t,Kf(e))}function np(t,e,n){t=Hu(t),e=Ha(e);var r=t.length,i=n=void 0===n?r:_h(el(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e}function rp(t){return function(e){var n=id(e);return"[object Map]"==n?Rd(e):"[object Set]"==n?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):function(t,e){return Da(e,(function(e){return[e,t[e]]}))}(e,t(e))}}var ip=rp(uu),op=rp(vu),ap=Pc({"&":"&","<":"<",">":">",'"':""","'":"'"}),lp=/[&<>"']/g,sp=RegExp(lp.source);function up(t){return(t=Hu(t))&&sp.test(t)?t.replace(lp,ap):t}var cp=/[\\^$.*+?()[\]{}|]/g,hp=RegExp(cp.source);function dp(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function fp(t,e){var n=!0;return sf(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function pp(t,e,n){var r=Pa(t)?dp:fp;return n&&Bs(t,e,n)&&(e=void 0),r(t,Jd(e))}function vp(t){return t?_h(el(t),0,4294967295):0}function gp(t,e){var n=[];return sf(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function yp(t,e){return(Pa(t)?Bh:gp)(t,Jd(e))}function mp(t){return function(e,n,r){var i=Object(e);if(!As(e)){var o=Jd(n);e=uu(e),n=function(t){return o(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[o?e[a]:a]:void 0}}var Cp=Math.max;function wp(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:el(n);return i<0&&(i=Cp(r+i,0)),ns(t,Jd(e),i)}var xp=mp(wp);function bp(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}var Sp=Math.max,_p=Math.min;function Ep(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=el(n),i=n<0?Sp(r+i,0):_p(i,r-1)),ns(t,Jd(e),i,!0)}var Lp=mp(Ep);function Tp(t){return t&&t.length?t[0]:void 0}function Op(t,e){var n=-1,r=As(t)?Array(t.length):[];return sf(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Ip(t,e){return(Pa(t)?Da:Op)(t,Jd(e))}var Mp=Ch("floor");function Rp(t){return $u((function(e){var n=e.length,r=n,i=zl.prototype.thru;for(t&&e.reverse();r--;){var o=e[r];if("function"!=typeof o)throw new TypeError("Expected a function");if(i&&!a&&"wrapper"==Pl(o))var a=new zl([],!0)}for(r=a?r:n;++r<n;){var l=Pl(o=e[r]),s="wrapper"==l?kl(o):void 0;a=s&&jl(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?a[Pl(s[0])].apply(a,s[3]):1==o.length&&jl(o)?a[l]():a.thru(o)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Pa(r))return a.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}var Ap=Rp(),Bp=Rp(!0);function kp(t,e){return null==t?t:of(t,Kf(e),vu)}function Np(t,e){return Bh(e,(function(e){return rl(t[e])}))}var Dp=Object.prototype.hasOwnProperty,Pp=cf((function(t,e,n){Dp.call(t,n)?t[n].push(e):Ss(t,n,[e])})),zp=Pp;function Fp(t,e){return t>e}function Hp(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Qa(e),n=Qa(n)),t(e,n)}}var Wp=Hp(Fp),Gp=Hp((function(t,e){return t>=e})),jp=Object.prototype.hasOwnProperty;function Up(t,e){return null!=t&&jp.call(t,e)}function Vp(t,e){return null!=t&&qd(t,e,Up)}var Yp=Math.max,Xp=Math.min;function qp(t,e,n){return e=tl(e),void 0===n?(n=e,e=0):n=tl(n),function(t,e,n){return t>=Xp(e,n)&&t<Yp(e,n)}(t=Qa(t),e,n)}function Kp(t){return"string"==typeof t||!Pa(t)&&Ba(t)&&"[object String]"==Aa(t)}function Zp(t,e){return Da(e,(function(e){return t[e]}))}function $p(t){return null==t?[]:Zp(t,uu(t))}var Qp=Math.max;function Jp(t,e,n,r){t=As(t)?t:$p(t),n=n&&!r?el(n):0;var i=t.length;return n<0&&(n=Qp(i+n,0)),Kp(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&is(t,e,n)>-1}var tv=Math.max;function ev(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:el(n);
2return i<0&&(i=tv(r+i,0)),is(t,e,i)}var nv=Math.min;function rv(t,e,n){for(var r=n?zf:os,i=t[0].length,o=t.length,a=o,l=Array(o),s=1/0,u=[];a--;){var c=t[a];a&&e&&(c=Da(c,Zs(e))),s=nv(c.length,s),l[a]=!n&&(e||i>=120&&c.length>=120)?new Td(a&&c):void 0}c=t[0];var h=-1,d=l[0];t:for(;++h<i&&u.length<s;){var f=c[h],p=e?e(f):f;if(f=n||0!==f?f:0,!(d?Id(d,p):r(u,p,n))){for(a=o;--a;){var v=l[a];if(!(v?Id(v,p):r(t[a],p,n)))continue t}d&&d.push(p),u.push(f)}}return u}function iv(t){return Ef(t)?t:[]}var ov=Ms((function(t){var e=Da(t,iv);return e.length&&e[0]===t[0]?rv(e):[]})),av=Ms((function(t){var e=Gf(t),n=Da(t,iv);return e===Gf(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?rv(n,Jd(e)):[]})),lv=av,sv=Ms((function(t){var e=Gf(t),n=Da(t,iv);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?rv(n,void 0,e):[]}));function uv(t,e){return function(n,r){return function(t,e,n,r){return af(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}var cv=Object.prototype.toString,hv=uv((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=cv.call(e)),t[e]=n}),Zl(nl)),dv=hv,fv=Object.prototype,pv=fv.hasOwnProperty,vv=fv.toString,gv=uv((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=vv.call(e)),pv.call(t,e)?t[e].push(n):t[e]=[n]}),Jd),yv=gv;function mv(t,e){return e.length<2?t:ju(t,gc(e,0,-1))}function Cv(t,e,n){var r=null==(t=mv(t,e=Wu(e,t)))?t:t[Gu(Gf(e))];return null==r?void 0:_l(r,t,n)}var wv=Ms(Cv),xv=Ms((function(t,e,n){var r=-1,i="function"==typeof e,o=As(t)?Array(t.length):[];return sf(t,(function(t){o[++r]=i?_l(e,t,n):Cv(t,e,n)})),o})),bv=xv;var Sv=tu&&tu.isArrayBuffer,_v=Sv?Zs(Sv):function(t){return Ba(t)&&"[object ArrayBuffer]"==Aa(t)};function Ev(t){return!0===t||!1===t||Ba(t)&&"[object Boolean]"==Aa(t)}var Lv=tu&&tu.isDate,Tv=Lv?Zs(Lv):function(t){return Ba(t)&&"[object Date]"==Aa(t)};var Ov=Object.prototype.hasOwnProperty;function Iv(t){if(null==t)return!0;if(As(t)&&(Pa(t)||"string"==typeof t||"function"==typeof t.splice||qs(t)||nu(t)||js(t)))return!t.length;var e=id(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(Ds(t))return!su(t).length;for(var n in t)if(Ov.call(t,n))return!1;return!0}function Mv(t,e){return Wd(t,e)}var Rv=_a.isFinite;function Av(t){return"number"==typeof t&&t==el(t)}function Bv(t){return"number"==typeof t||Ba(t)&&"[object Number]"==Aa(t)}function kv(t){return Bv(t)&&t!=+t}var Nv=il?rl:Us;function Dv(t){return null==t}var Pv=tu&&tu.isRegExp,zv=Pv?Zs(Pv):function(t){return Ba(t)&&"[object RegExp]"==Aa(t)},Fv=9007199254740991;function Hv(t){return void 0===t}var Wv=Array.prototype.join;var Gv=ph((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),jv=Gv,Uv=cf((function(t,e,n){Ss(t,n,e)})),Vv=Uv;var Yv=Math.max,Xv=Math.min;var qv=ph((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Kv=qv,Zv=Bc("toLowerCase");function $v(t,e){return t<e}var Qv=Hp($v),Jv=Hp((function(t,e){return t<=e}));function tg(t,e){var n={};return e=Jd(e),af(t,(function(t,r,i){Ss(n,e(t,r,i),t)})),n}function eg(t){return Yd(bd(t,1))}function ng(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=e(o);if(null!=a&&(void 0===l?a===a&&!ka(a):n(a,l)))var l=a,s=o}return s}function rg(t){return t&&t.length?ng(t,nl,Fp):void 0}function ig(t,e){return t&&t.length?ng(t,Jd(e),Fp):void 0}function og(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function ag(t,e){var n=null==t?0:t.length;return n?og(t,e)/n:NaN}var lg=ks((function(t,e,n){Of(t,e,n)})),sg=lg,ug=Ms((function(t,e){return function(n){return Cv(n,t,e)}})),cg=ug,hg=Ms((function(t,e){return function(n){return Cv(t,n,e)}})),dg=hg;function fg(t){return t&&t.length?ng(t,nl,$v):void 0}function pg(t,e,n){var r=uu(e),i=Np(e,r),o=!(Xa(n)&&"chain"in n)||!!n.chain,a=rl(t);return es(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=Fl(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Yu([this.value()],arguments))})})),t}var vg=Wa((function(t,e){return t*e}),1);function gg(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var yg=Ea?Ea.iterator:void 0;function mg(t){if(!t)return[];if(As(t))return Kp(t)?Ac(t):Fl(t);if(yg&&t[yg])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[yg]());var e=id(t);return("[object Map]"==e?Rd:"[object Set]"==e?Ad:$p)(t)}function Cg(t,e){var n=t.length;if(n)return hs(e+=e<0?n:0,n)?t[e]:void 0}function wg(t,e){return null==(t=mv(t,e=Wu(e,t)))||delete t[Gu(Gf(e))]}function xg(t){return oc(t)?void 0:t}var bg=$u((function(t,e){var n={};if(null==t)return n;var r=!1;e=Da(e,(function(e){return e=Wu(e,t),r||(r=e.length>1),e}
2)),Ts(t,jh(t),n),r&&(n=bd(n,7,xg));for(var i=e.length;i--;)wg(n,e[i]);return n})),Sg=bg;function _g(t,e,n,r){if(!Xa(t))return t;for(var i=-1,o=(e=Wu(e,t)).length,a=o-1,l=t;null!=l&&++i<o;){var s=Gu(e[i]),u=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(i!=a){var c=l[s];void 0===(u=r?r(c,s,l):void 0)&&(u=Xa(c)?c:hs(e[i+1])?[]:{})}Ls(l,s,u),l=l[s]}return t}function Eg(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],l=ju(t,a);n(l,a)&&_g(o,Wu(a,t),l)}return o}function Lg(t,e){if(null==t)return{};var n=Da(jh(t),(function(t){return[t]}));return e=Jd(e),Eg(t,n,(function(t,n){return e(t,n[0])}))}function Tg(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t===t,o=ka(t),a=void 0!==e,l=null===e,s=e===e,u=ka(e);if(!l&&!u&&!o&&t>e||o&&a&&s&&!l&&!u||r&&a&&s||!n&&s||!i)return 1;if(!r&&!o&&!u&&t<e||u&&n&&i&&!r&&!o||l&&n&&i||!a&&i||!s)return-1}return 0}function Og(t,e,n){e=e.length?Da(e,(function(t){return Pa(t)?function(e){return ju(e,1===t.length?t[0]:t)}:t})):[nl];var r=-1;e=Da(e,Zs(Jd));var i=Op(t,(function(t,n,i){var o=Da(e,(function(e){return e(t)}));return{criteria:o,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(i,(function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,l=n.length;++r<a;){var s=Tg(i[r],o[r]);if(s)return r>=l?s:s*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Ig(t,e,n,r){return null==t?[]:(Pa(e)||(e=null==e?[]:[e]),Pa(n=r?void 0:n)||(n=null==n?[]:[n]),Og(t,e,n))}function Mg(t){return $u((function(e){return e=Da(e,Zs(Jd)),Ms((function(n){var r=this;return t(e,(function(t){return _l(t,r,n)}))}))}))}var Rg=Mg(Da),Ag=Ms,Bg=Math.min,kg=Ag((function(t,e){var n=(e=1==e.length&&Pa(e[0])?Da(e[0],Zs(Jd)):Da(Ku(e,1),Zs(Jd))).length;return Ms((function(r){for(var i=-1,o=Bg(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return _l(t,this,r)}))})),Ng=kg,Dg=Mg(dp),Pg=Mg(Od),zg=Math.floor;function Fg(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=zg(e/2))&&(t+=t)}while(e);return n}var Hg=$d("length"),Wg="\\ud800-\\udfff",Gg="["+Wg+"]",jg="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ug="\\ud83c[\\udffb-\\udfff]",Vg="[^"+Wg+"]",Yg="(?:\\ud83c[\\udde6-\\uddff]){2}",Xg="[\\ud800-\\udbff][\\udc00-\\udfff]",qg="(?:"+jg+"|"+Ug+")"+"?",Kg="[\\ufe0e\\ufe0f]?",Zg=Kg+qg+("(?:\\u200d(?:"+[Vg,Yg,Xg].join("|")+")"+Kg+qg+")*"),$g="(?:"+[Vg+jg+"?",jg,Yg,Xg,Gg].join("|")+")",Qg=RegExp(Ug+"(?="+Ug+")|"+$g+Zg,"g");function Jg(t){return Cc(t)?function(t){for(var e=Qg.lastIndex=0;Qg.test(t);)++e;return e}(t):Hg(t)}var ty=Math.ceil;function ey(t,e){var n=(e=void 0===e?" ":Ha(e)).length;if(n<2)return n?Fg(e,t):e;var r=Fg(e,ty(t/Jg(e)));return Cc(e)?yc(Ac(r),0,t).join(""):r.slice(0,t)}var ny=Math.ceil,ry=Math.floor;var iy=/^\s+/,oy=_a.parseInt;var ay=Ms((function(t,e){return xs(t,32,void 0,e,vs(e,us(ay)))}));ay.placeholder={};var ly=ay,sy=Ms((function(t,e){return xs(t,64,void 0,e,vs(e,us(sy)))}));sy.placeholder={};var uy=sy,cy=cf((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),hy=cy;var dy=$u((function(t,e){return null==t?{}:function(t,e){return Eg(t,e,(function(e,n){return Kd(t,n)}))}(t,e)})),fy=dy;function py(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}var vy=Array.prototype.splice;function gy(t,e,n,r){var i=r?py:is,o=-1,a=e.length,l=t;
2for(t===e&&(e=Fl(e)),n&&(l=Da(t,Zs(n)));++o<a;)for(var s=0,u=e[o],c=n?n(u):u;(s=i(l,c,s,r))>-1;)l!==t&&vy.call(l,s,1),vy.call(t,s,1);return t}function yy(t,e){return t&&t.length&&e&&e.length?gy(t,e):t}var my=Ms(yy);var Cy=Array.prototype.splice;function wy(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;hs(i)?Cy.call(t,i,1):wg(t,i)}}return t}var xy=$u((function(t,e){var n=null==t?0:t.length,r=Vu(t,e);return wy(t,Da(e,(function(t){return hs(t,n)?+t:t})).sort(Tg)),r})),by=xy,Sy=Math.floor,_y=Math.random;function Ey(t,e){return t+Sy(_y()*(e-t+1))}var Ly=parseFloat,Ty=Math.min,Oy=Math.random;var Iy=Math.ceil,My=Math.max;function Ry(t){return function(e,n,r){return r&&"number"!=typeof r&&Bs(e,n,r)&&(n=r=void 0),e=tl(e),void 0===n?(n=e,e=0):n=tl(n),function(t,e,n,r){for(var i=-1,o=My(Iy((e-t)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=t,t+=n;return a}(e,n,r=void 0===r?e<n?1:-1:tl(r),t)}}var Ay=Ry(),By=Ry(!0),ky=$u((function(t,e){return xs(t,256,void 0,void 0,void 0,e)})),Ny=ky;function Dy(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Py(t,e,n){var r=Pa(t)?Dc:Dy,i=arguments.length<3;return r(t,Jd(e),n,i,sf)}function zy(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Fy(t,e,n){return e=(n?Bs(t,e,n):void 0===e)?1:el(e),Fg(Hu(t),e)}var Hy=Array.prototype.reverse;function Wy(t){return null==t?t:Hy.call(t)}var Gy=Ch("round");function jy(t){var e=t.length;return e?t[Ey(0,e-1)]:void 0}function Uy(t){return jy($p(t))}function Vy(t,e){var n=-1,r=t.length,i=r-1;for(e=void 0===e?r:e;++n<e;){var o=Ey(n,i),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}function Yy(t,e){return Vy(Fl(t),_h(e,0,t.length))}function Xy(t,e){var n=$p(t);return Vy(n,_h(e,0,n.length))}function qy(t,e,n){return null==t?t:_g(t,e,n)}function Ky(t){return Vy(Fl(t))}function Zy(t){return Vy($p(t))}function $y(t){if(null==t)return 0;if(As(t))return Kp(t)?Jg(t):t.length;var e=id(t);return"[object Map]"==e||"[object Set]"==e?t.size:su(t).length}var Qy=ph((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Jy=Qy;function tm(t,e){var n;return sf(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}var em=Ms((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Bs(t,e[0],e[1])?e=[]:n>2&&Bs(e[0],e[1],e[2])&&(e=[e[0]]),Og(t,Ku(e,1),[])})),nm=em,rm=Math.floor,im=Math.min;function om(t,e,n,r){var i=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(e=n(e))!==e,l=null===e,s=ka(e),u=void 0===e;i<o;){var c=rm((i+o)/2),h=n(t[c]),d=void 0!==h,f=null===h,p=h===h,v=ka(h);if(a)var g=r||p;else g=u?p&&(r||d):l?p&&d&&(r||!f):s?p&&d&&!f&&(r||!v):!f&&!v&&(r?h<=e:h<e);g?i=c+1:o=c}return im(o,4294967294)}function am(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e===e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!ka(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return om(t,e,nl,n)}function lm(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],l=e?e(a):a;if(!n||!_s(l,s)){var s=l;o[i++]=0===a?0:a}}return o}function sm(t,e,n){return n&&"number"!=typeof n&&Bs(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=Hu(t))&&("string"==typeof e||null!=e&&!zv(e))&&!(e=Ha(e))&&Cc(t)?yc(Ac(t),0,n):t.split(e,n):[]}var um=Math.max;var cm=ph((function(t,e,n){return t+(n?" ":"")+kc(e)})),hm=cm;function dm(){return!0}var fm=Wa((function(t,e){return t-e}),0);var pm=Object.prototype,vm=pm.hasOwnProperty;function gm(t,e,n,r){return void 0===t||_s(t,pm[n])&&!vm.call(r,n)?e:t}var ym={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function mm(t){return"\\"+ym[t]}var Cm=/<%=([\s\S]+?)%>/g,wm={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:Cm,variable:"",imports:{_:{escape:up}}},xm=/\b__p \+= '';/g,bm=/\b(__p \+=) '' \+/g,Sm=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_m=/[()=,{}\[\]\/\s]/,Em=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Lm=/($^)/,Tm=/['\n\r\u2028\u2029\\]/g,Om=Object.prototype.hasOwnProperty;function Im(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return Xa(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Cf(t,e,{leading:r,maxWait:e,trailing:i})}function Mm(t,e){return e(t)}var Rm=4294967295,Am=Math.min;function Bm(t,e){var n=t;return n instanceof Rl&&(n=n.value()),Dc(e,(function(t,e){return e.func.apply(e.thisArg,Yu([t],e.args))}),n)}function km(){return Bm(this.__wrapped__,this.__actions__)}var Nm=9007199254740991;function Dm(t){return Hu(t).toUpperCase()}function Pm(t,e){for(var n=t.length;n--&&is(e,t[n],0)>-1;);return n}function zm(t,e){for(var n=-1,r=t.length;++n<r&&is(e,t[n],0)>-1;);return n}function Fm(t,e,n){if((t=Hu(t))&&(n||void 0===e))return Ya(t);if(!t||!(e=Ha(e)))return t;var r=Ac(t),i=Ac(e);return yc(r,zm(r,i),Pm(r,i)+1).join("")}var Hm=/^\s+/;var Wm=/\w*$/;var Gm=Pc({"&":"&","<":"<",">":">",""":'"',"'":"'"}),jm=/&(?:amp|lt|gt|quot|#39);/g,Um=RegExp(jm.source);var Vm=Yh&&1/Ad(new Yh([,-0]))[1]==1/0?function(t){return new Yh(t)}:Al,Ym=Vm;function Xm(t,e,n){var r=-1,i=os,o=t.length,a=!0,l=[],s=l;if(n)a=!1,i=zf;else if(o>=200){var u=e?null:Ym(t);if(u)return Ad(u);a=!1,i=Id,s=new Td}else s=e?[]:l;t:for(;++r<o;){var c=t[r],h=e?e(c):c;
2if(c=n||0!==c?c:0,a&&h===h){for(var d=s.length;d--;)if(s[d]===h)continue t;e&&s.push(h),l.push(c)}else i(s,h,n)||(s!==l&&s.push(h),l.push(c))}return l}var qm=Ms((function(t){return Xm(Ku(t,1,Ef,!0))})),Km=Ms((function(t){var e=Gf(t);return Ef(e)&&(e=void 0),Xm(Ku(t,1,Ef,!0),Jd(e))})),Zm=Km,$m=Ms((function(t){var e=Gf(t);return e="function"==typeof e?e:void 0,Xm(Ku(t,1,Ef,!0),void 0,e)}));function Qm(t){return t&&t.length?Xm(t):[]}function Jm(t,e){return t&&t.length?Xm(t,Jd(e)):[]}var tC=0;function eC(t,e){return null==t||wg(t,e)}var nC=Math.max;function rC(t){if(!t||!t.length)return[];var e=0;return t=Bh(t,(function(t){if(Ef(t))return e=nC(t.length,e),!0})),Ps(e,(function(e){return Da(t,$d(e))}))}function iC(t,e){if(!t||!t.length)return[];var n=rC(t);return null==e?n:Da(n,(function(t){return _l(e,void 0,t)}))}function oC(t,e,n,r){return _g(t,e,n(ju(t,e)),r)}var aC=ph((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),lC=aC;var sC=Ms((function(t,e){return Ef(t)?Ff(t,e):[]})),uC=sC;var cC=$u((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,
2i=function(e){return Vu(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Rl&&hs(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Mm,args:[i],thisArg:void 0}),new zl(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)})),hC=cC;function dC(t,e,n){var r=t.length;if(r<2)return r?Xm(t[0]):[];for(var i=-1,o=Array(r);++i<r;)for(var a=t[i],l=-1;++l<r;)l!=i&&(o[i]=Ff(o[i]||a,t[l],e,n));return Xm(Ku(o,1),e,n)}var fC=Ms((function(t){return dC(Bh(t,Ef))})),pC=Ms((function(t){var e=Gf(t);return Ef(e)&&(e=void 0),dC(Bh(t,Ef),Jd(e))})),vC=pC,gC=Ms((function(t){var e=Gf(t);return e="function"==typeof e?e:void 0,dC(Bh(t,Ef),void 0,e)})),yC=Ms(rC);function mC(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var l=r<o?e[r]:void 0;n(a,t[r],l)}return a}var CC=Ms((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,iC(t,n)})),wC={chunk:function(t,e,n){e=(n?Bs(t,e,n):void 0===e)?1:Sh(el(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var i=0,o=0,a=Array(bh(r/e));i<r;)a[o++]=gc(t,i,i+=e);return a},compact:Ed,concat:Ld,difference:Wf,differenceBy:Uf,differenceWith:Yf,drop:function(t,e,n){var r=null==t?0:t.length;return r?gc(t,(e=n||void 0===e?1:el(e))<0?0:e,r):[]},dropRight:function(t,e,n){var r=null==t?0:t.length;return r?gc(t,0,(e=r-(e=n||void 0===e?1:el(e)))<0?0:e):[]},dropRightWhile:function(t,e){return t&&t.length?qf(t,Jd(e),!0,!0):[]},dropWhile:function(t,e){return t&&t.length?qf(t,Jd(e),!0):[]},fill:function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Bs(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=el(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:el(r))<0&&(r+=i),r=n>r?0:vp(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},findIndex:wp,findLastIndex:Ep,first:Tp,flatten:Zu,flattenDeep:function(t){return(null==t?0:t.length)?Ku(t,Infinity):[]},flattenDepth:function(t,e){return(null==t?0:t.length)?Ku(t,e=void 0===e?1:el(e)):[]},fromPairs:function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},head:Tp,indexOf:ev,initial:function(t){return(null==t?0:t.length)?gc(t,0,-1):[]},intersection:ov,intersectionBy:lv,intersectionWith:sv,join:function(t,e){return null==t?"":Wv.call(t,e)},last:Gf,lastIndexOf:function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=el(n))<0?Yv(r+i,0):Xv(i,r-1)),e===e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):ns(t,rs,i,!0)},nth:function(t,e){return t&&t.length?Cg(t,el(e)):void 0},pull:my,pullAll:yy,pullAllBy:function(t,e,n){return t&&t.length&&e&&e.length?gy(t,e,Jd(n)):t},pullAllWith:function(t,e,n){return t&&t.length&&e&&e.length?gy(t,e,void 0,n):t},pullAt:by,remove:function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Jd(e);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return wy(t,i),n},reverse:Wy,slice:function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Bs(t,e,n)?(e=0,n=r):(e=null==e?0:el(e),n=void 0===n?r:el(n)),gc(t,e,n)):[]},sortedIndex:function(t,e){return am(t,e)},sortedIndexBy:function(t,e,n){return om(t,e,Jd(n))},sortedIndexOf:function(t,e){var n=null==t?0:t.length;if(n){var r=am(t,e);if(r<n&&_s(t[r],e))return r}return-1},sortedLastIndex:function(t,e){return am(t,e,!0)},sortedLastIndexBy:function(t,e,n){return om(t,e,Jd(n),!0)},sortedLastIndexOf:function(t,e){if(null==t?0:t.length){var n=am(t,e,!0)-1;if(_s(t[n],e))return n}return-1},sortedUniq:function(t){return t&&t.length?lm(t):[]},sortedUniqBy:function(t,e){return t&&t.length?lm(t,Jd(e)):[]},tail:function(t){var e=null==t?0:t.length;return e?gc(t,1,e):[]},take:function(t,e,n){return t&&t.length?gc(t,0,(e=n||void 0===e?1:el(e))<0?0:e):[]},takeRight:function(t,e,n){var r=null==t?0:t.length;return r?gc(t,(e=r-(e=n||void 0===e?1:el(e)))<0?0:e,r):[]},takeRightWhile:function(t,e){return t&&t.length?qf(t,Jd(e),!1,!0):[]},takeWhile:function(t,e){return t&&t.length?qf(t,Jd(e)):[]},union:qm,unionBy:Zm,unionWith:$m,uniq:Qm,uniqBy:Jm,uniqWith:function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Xm(t,void 0,e):[]},unzip:rC,unzipWith:iC,without:uC,xor:fC,xorBy:vC,xorWith:gC,zip:yC,zipObject:function(t,e){return mC(t||[],e||[],Ls)},zipObjectDeep:function(t,e){return mC(t||[],e||[],_g)},zipWith:CC},xC={countBy:ff,each:Zf,eachRight:ep,every:pp,filter:yp,find:xp,findLast:Lp,flatMap:function(t,e){return Ku(Ip(t,e),1)},flatMapDeep:function(t,e){return Ku(Ip(t,e),Infinity)},flatMapDepth:function(t,e,n){return n=void 0===n?1:el(n),Ku(Ip(t,e),n)}
2,forEach:Zf,forEachRight:ep,groupBy:zp,includes:Jp,invokeMap:bv,keyBy:Vv,map:Ip,orderBy:Ig,partition:hy,reduce:Py,reduceRight:function(t,e,n){var r=Pa(t)?zy:Dy,i=arguments.length<3;return r(t,Jd(e),n,i,tp)},reject:function(t,e){return(Pa(t)?Bh:gp)(t,gg(Jd(e)))},sample:function(t){return(Pa(t)?jy:Uy)(t)},sampleSize:function(t,e,n){return e=(n?Bs(t,e,n):void 0===e)?1:el(e),(Pa(t)?Yy:Xy)(t,e)},shuffle:function(t){return(Pa(t)?Ky:Zy)(t)},size:$y,some:function(t,e,n){var r=Pa(t)?Od:tm;return n&&Bs(t,e,n)&&(e=void 0),r(t,Jd(e))},sortBy:nm},bC={now:gf},SC={after:function(t,e){if("function"!=typeof e)throw new TypeError("Expected a function");return t=el(t),function(){if(--t<1)return e.apply(this,arguments)}},ary:bs,before:uc,bind:hc,bindKey:vc,curry:pf,curryRight:vf,debounce:Cf,defer:Nf,delay:Pf,flip:function(t){return xs(t,512)},memoize:Nu,negate:gg,once:function(t){return uc(2,t)},overArgs:Ng,partial:ly,partialRight:uy,rearg:Ny,rest:function(t,e){if("function"!=typeof t)throw new TypeError("Expected a function");return Ms(t,e=void 0===e?e:el(e))},spread:function(t,e){if("function"!=typeof t)throw new TypeError("Expected a function");return e=null==e?0:um(el(e),0),Ms((function(n){var r=n[e],i=yc(n,0,e);return r&&Yu(i,r),_l(t,this,i)}))},throttle:Im,unary:function(t){return bs(t,1)},wrap:function(t,e){return ly(Kf(e),t)}},_C={castArray:function(){if(!arguments.length)return[];var t=arguments[0];return Pa(t)?t:[t]},clone:Sd,cloneDeep:_d,cloneDeepWith:function(t,e){return bd(t,5,e="function"==typeof e?e:void 0)},cloneWith:function(t,e){return bd(t,4,e="function"==typeof e?e:void 0)},conformsTo:function(t,e){return null==e||ef(t,e,uu(e))},eq:_s,gt:Wp,gte:Gp,isArguments:js,isArray:Pa,isArrayBuffer:_v,isArrayLike:As,isArrayLikeObject:Ef,isBoolean:Ev,isBuffer:qs,isDate:Tv,isElement:function(t){return Ba(t)&&1===t.nodeType&&!oc(t)},isEmpty:Iv,isEqual:Mv,isEqualWith:function(t,e,n){var r=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===r?Wd(t,e,void 0,n):!!r},isError:ac,isFinite:function(t){return"number"==typeof t&&Rv(t)},isFunction:rl,isInteger:Av,isLength:Rs,isMap:vd,isMatch:function(t,e){return t===e||Gd(t,e,Ud(e))},isMatchWith:function(t,e,n){return n="function"==typeof n?n:void 0,Gd(t,e,Ud(e),n)},isNaN:kv,isNative:function(t){if(Nv(t))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return pl(t)},isNil:Dv,isNull:function(t){return null===t},isNumber:Bv,isObject:Xa,isObjectLike:Ba,isPlainObject:oc,isRegExp:zv,isSafeInteger:function(t){return Av(t)&&t>=-9007199254740991&&t<=Fv},isSet:yd,isString:Kp,isSymbol:ka,isTypedArray:nu,isUndefined:Hv,isWeakMap:function(t){return Ba(t)&&"[object WeakMap]"==id(t)},isWeakSet:function(t){return Ba(t)&&"[object WeakSet]"==Aa(t)},lt:Qv,lte:Jv,toArray:mg,toFinite:tl,toInteger:el,toLength:vp,toNumber:Qa,toPlainObject:Tf,toSafeInteger:function(t){return t?_h(el(t),-9007199254740991,Nm):0===t?t:0},toString:Hu},EC={add:Ga,ceil:wh,divide:Xf,floor:Mp,max:rg,maxBy:ig,mean:function(t){return ag(t,nl)},meanBy:function(t,e){return ag(t,Jd(e))},min:fg,minBy:function(t,e){return t&&t.length?ng(t,Jd(e),$v):void 0},multiply:vg,round:Gy,subtract:fm,sum:function(t){return t&&t.length?og(t,nl):0},sumBy:function(t,e){return t&&t.length?og(t,Jd(e)):0}},LC=Eh,TC=qp,OC=function(t,e,n){if(n&&"boolean"!=typeof n&&Bs(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=tl(t),void 0===e?(e=t,t=0):e=tl(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Oy();return Ty(t+i*(e-t+Ly("1e-"+((i+"").length-1))),e)}return Ey(t,e)},IC={assign:du,assignIn:yu,assignInWith:Cu,assignWith:xu,at:Qu,create:function(t,e){var n=bl(t);return null==e?n:Th(n,e)},defaults:Sf,defaultsDeep:Af,entries:ip,entriesIn:op,extend:yu,extendWith:Cu,findKey:function(t,e){return bp(t,Jd(e),af)},findLastKey:function(t,e){return bp(t,Jd(e),Jf)},forIn:kp,forInRight:function(t,e){return null==t?t:Qf(t,Kf(e),vu)},forOwn:function(t,e){return t&&af(t,Kf(e))},forOwnRight:function(t,e){return t&&Jf(t,Kf(e))},functions:function(t){return null==t?[]:Np(t,uu(t))},functionsIn:function(t){return null==t?[]:Np(t,vu(t))},get:Uu,has:Vp,hasIn:Kd,invert:dv,invertBy:yv,invoke:wv,keys:uu,keysIn:vu,mapKeys:tg,mapValues:function(t,e){var n={};return e=Jd(e),af(t,(function(t,r,i){Ss(n,r,e(t,r,i))})),n},merge:sg,mergeWith:Rf,omit:Sg,omitBy:function(t,e){return Lg(t,gg(Jd(e)))},pick:fy,pickBy:Lg,result:function(t,e,n){var r=-1,i=(e=Wu(e,t)).length;for(i||(i=1,t=void 0);++r<i;){var o=null==t?void 0:t[Gu(e[r])];void 0===o&&(r=i,o=n),t=rl(o)?o.call(t):o}return t},set:qy,setWith:function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:_g(t,e,n,r)},toPairs:ip,toPairsIn:op,transform:function(t,e,n){var r=Pa(t),i=r||qs(t)||nu(t);if(e=Jd(e),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Xa(t)&&rl(o)?bl(Ju(t)):{}}return(i?es:af)(t,(function(t,r,i){return e(n,t,r,i)})),n},unset:eC,update:function(t,e,n){return null==t?t:oC(t,e,Kf(n))},updateWith:function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:oC(t,e,Kf(n),r)},values:$p,valuesIn:function(t){return null==t?[]:Zp(t,vu(t))}},MC={at:hC,chain:xh,commit:function(){return new zl(this.value(),this.__chain__)},lodash:Gl,next:function(){void 0===this.__values__&&(this.__values__=mg(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},plant:function(t){for(var e,n=this;n instanceof Ml;){var r=Hl(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},reverse:function(){var t=this.__wrapped__;if(t instanceof Rl){var e=t;return this.__actions__.length&&(e=new Rl(this)),(e=e.reverse()).__actions__.push({func:Mm,args:[Wy],thisArg:void 0}),new zl(e,this.__chain__)}return this.thru(Wy)},tap:function(t,e){return e(t),t},thru:Mm,toIterator:function(){return this},toJSON:km,value:km,valueOf:km,wrapperChain:function(){return xh(this)}},RC={camelCase:gh,capitalize:Nc,deburr:Wc,endsWith:np,escape:up,escapeRegExp:function(t){return(t=Hu(t))&&hp.test(t)?t.replace(cp,"\\$&"):t},kebabCase:jv,lowerCase:Kv,lowerFirst:Zv,pad:function(t,e,n){t=Hu(t);var r=(e=el(e))?Jg(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return ey(ry(i),n)+t+ey(ny(i),n)},padEnd:function(t,e,n){t=Hu(t);var r=(e=el(e))?Jg(t):0;return e&&r<e?t+ey(e-r,n):t},padStart:function(t,e,n){t=Hu(t);var r=(e=el(e))?Jg(t):0;return e&&r<e?ey(e-r,n)+t:t},parseInt:function(t,e,n){return n||null==e?e=0:e&&(e=+e),oy(Hu(t).replace(iy,""),e||0)},repeat:Fy,replace:function(){var t=arguments,e=Hu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},snakeCase:Jy,split:sm,startCase:hm,startsWith:function(t,e,n){return t=Hu(t),n=null==n?0:_h(el(n),0,t.length),e=Ha(e),t.slice(n,n+e.length)==e},template:function(t,e,n){var r=wm.imports._.templateSettings||wm;n&&Bs(t,e,n)&&(e=void 0),t=Hu(t),e=Cu({},e,r,gm);var i,o,a=Cu({},e.imports,r.imports,gm),l=uu(a),s=Zp(a,l),u=0,c=e.interpolate||Lm,h="__p += '",d=RegExp((e.escape||Lm).source+"|"+c.source+"|"+(c===Cm?Em:Lm).source+"|"+(e.evaluate||Lm).source+"|$","g"),f=Om.call(e,"sourceURL")?"//# sourceURL="+(e.s
2ourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(d,(function(e,n,r,a,l,s){return r||(r=a),h+=t.slice(u,s).replace(Tm,mm),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),l&&(o=!0,h+="';\n"+l+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=s+e.length,e})),h+="';\n";var p=Om.call(e,"variable")&&e.variable;if(p){if(_m.test(p))throw new Error("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(xm,""):h).replace(bm,"$1").replace(Sm,"$1;"),h="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=sc((function(){return Function(l,f+"return "+h).apply(void 0,s)}));if(v.source=h,ac(v))throw v;return v},templateSettings:wm,toLower:function(t){return Hu(t).toLowerCase()},toUpper:Dm,trim:Fm,trimEnd:function(t,e,n){if((t=Hu(t))&&(n||void 0===e))return t.slice(0,Ua(t)+1);if(!t||!(e=Ha(e)))return t;var r=Ac(t);return yc(r,0,Pm(r,Ac(e))+1).join("")},trimStart:function(t,e,n){if((t=Hu(t))&&(n||void 0===e))return t.replace(Hm,"");if(!t||!(e=Ha(e)))return t;var r=Ac(t);return yc(r,zm(r,Ac(e))).join("")},truncate:function(t,e){var n=30,r="...";if(Xa(e)){var i="separator"in e?e.separator:i;n="length"in e?el(e.length):n,r="omission"in e?Ha(e.omission):r}var o=(t=Hu(t)).length;if(Cc(t)){var a=Ac(t);o=a.length}if(n>=o)return t;var l=n-Jg(r);if(l<1)return r;var s=a?yc(a,0,l).join(""):t.slice(0,l);if(void 0===i)return s+r;if(a&&(l+=s.length-l),zv(i)){if(t.slice(l).search(i)){var u,c=s;for(i.global||(i=RegExp(i.source,Hu(Wm.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var h=u.index;s=s.slice(0,void 0===h?l:h)}}else if(t.indexOf(Ha(i),l)!=l){var d=s.lastIndexOf(i);d>-1&&(s=s.slice(0,d))}return s+r},unescape:function(t){return(t=Hu(t))&&Um.test(t)?t.replace(jm,Gm):t},upperCase:lC,upperFirst:kc,words:dh},AC={attempt:sc,bindAll:fc,cond:tf,conforms:function(t){return function(t){var e=uu(t);return function(n){return ef(n,t,e)}}(bd(t,1))},constant:Zl,defaultTo:function(t,e){return null==t||t!==t?e:t},flow:Ap,flowRight:Bp,identity:nl,iteratee:function(t){return Jd("function"==typeof t?t:bd(t,1))},matches:eg,matchesProperty:function(t,e){return Zd(t,bd(e,1))},method:cg,methodOf:dg,mixin:pg,noop:Al,nthArg:function(t){return t=el(t),Ms((function(e){return Cg(e,t)}))},over:Rg,overEvery:Dg,overSome:Pg,property:Qd,propertyOf:function(t){return function(e){return null==t?void 0:ju(t,e)}},range:Ay,rangeRight:By,stubArray:kh,stubFalse:Us,stubObject:function(){return{}},stubString:function(){return""},stubTrue:dm,times:function(t,e){if((t=el(t))<1||t>9007199254740991)return[];var n=Rm,r=Am(t,Rm);e=Kf(e),t-=Rm;for(var i=Ps(r,e);++n<t;)e(n);return i},toPath:function(t){return Pa(t)?Da(t,Gu):ka(t)?[t]:Fl(Fu(Hu(t)))},uniqueId:function(t){var e=++tC;return Hu(t)+e}};var BC=Math.max,kC=Math.min;var NC=Math.min;var DC=4294967295,PC=Array.prototype,zC=Object.prototype.hasOwnProperty,FC=Ea?Ea.iterator:void 0,HC=Math.max,WC=Math.min,GC=function(t){return function(e,n,r){if(null==r){var i=Xa(n),o=i&&uu(n),a=o&&o.length&&Np(n,o);(a?a.length:i)||(r=n,n=e,e=this)}return t(e,n,r)}}(pg);Gl.after=SC.after,Gl.ary=SC.ary,Gl.assign=IC.assign,Gl.assignIn=IC.assignIn,Gl.assignInWith=IC.assignInWith,Gl.assignWith=IC.assignWith,Gl.at=IC.at,Gl.before=SC.before,Gl.bind=SC.bind,Gl.bindAll=AC.bindAll,Gl.bindKey=SC.bindKey,Gl.castArray=_C.castArray,Gl.chain=MC.chain,Gl.chunk=wC.chunk,Gl.compact=wC.compact,Gl.concat=wC.concat,Gl.cond=AC.cond,Gl.conforms=AC.conforms,Gl.constant=AC.constant,Gl.countBy=xC.countBy,Gl.create=IC.create,Gl.curry=SC.curry,Gl.curryRight=SC.curryRight,Gl.debounce=SC.debounce,Gl.defaults=IC.defaults,Gl.defaultsDeep=IC.defaultsDeep,Gl.defer=SC.defer,Gl.delay=SC.delay,Gl.difference=wC.difference,Gl.differenceBy=wC.differenceBy,Gl.differenceWith=wC.differenceWith,Gl.drop=wC.drop,Gl.dropRight=wC.dropRight,Gl.dropRightWhile=wC.dropRightWhile,Gl.dropWhile=wC.dropWhile,Gl.fill=wC.fill,Gl.filter=xC.filter,Gl.flatMap=xC.flatMap,Gl.flatMapDeep=xC.flatMapDeep,Gl.flatMapDepth=xC.flatMapDepth,Gl.flatten=wC.flatten,Gl.flatten
2Deep=wC.flattenDeep,Gl.flattenDepth=wC.flattenDepth,Gl.flip=SC.flip,Gl.flow=AC.flow,Gl.flowRight=AC.flowRight,Gl.fromPairs=wC.fromPairs,Gl.functions=IC.functions,Gl.functionsIn=IC.functionsIn,Gl.groupBy=xC.groupBy,Gl.initial=wC.initial,Gl.intersection=wC.intersection,Gl.intersectionBy=wC.intersectionBy,Gl.intersectionWith=wC.intersectionWith,Gl.invert=IC.invert,Gl.invertBy=IC.invertBy,Gl.invokeMap=xC.invokeMap,Gl.iteratee=AC.iteratee,Gl.keyBy=xC.keyBy,Gl.keys=uu,Gl.keysIn=IC.keysIn,Gl.map=xC.map,Gl.mapKeys=IC.mapKeys,Gl.mapValues=IC.mapValues,Gl.matches=AC.matches,Gl.matchesProperty=AC.matchesProperty,Gl.memoize=SC.memoize,Gl.merge=IC.merge,Gl.mergeWith=IC.mergeWith,Gl.method=AC.method,Gl.methodOf=AC.methodOf,Gl.mixin=GC,Gl.negate=gg,Gl.nthArg=AC.nthArg,Gl.omit=IC.omit,Gl.omitBy=IC.omitBy,Gl.once=SC.once,Gl.orderBy=xC.orderBy,Gl.over=AC.over,Gl.overArgs=SC.overArgs,Gl.overEvery=AC.overEvery,Gl.overSome=AC.overSome,Gl.partial=SC.partial,Gl.partialRight=SC.partialRight,Gl.partition=xC.partition,Gl.pick=IC.pick,Gl.pickBy=IC.pickBy,Gl.property=AC.property,Gl.propertyOf=AC.propertyOf,Gl.pull=wC.pull,Gl.pullAll=wC.pullAll,Gl.pullAllBy=wC.pullAllBy,Gl.pullAllWith=wC.pullAllWith,Gl.pullAt=wC.pullAt,Gl.range=AC.range,Gl.rangeRight=AC.rangeRight,Gl.rearg=SC.rearg,Gl.reject=xC.reject,Gl.remove=wC.remove,Gl.rest=SC.rest,Gl.reverse=wC.reverse,Gl.sampleSize=xC.sampleSize,Gl.set=IC.set,Gl.setWith=IC.setWith,Gl.shuffle=xC.shuffle,Gl.slice=wC.slice,Gl.sortBy=xC.sortBy,Gl.sortedUniq=wC.sortedUniq,Gl.sortedUniqBy=wC.sortedUniqBy,Gl.split=RC.split,Gl.spread=SC.spread,Gl.tail=wC.tail,Gl.take=wC.take,Gl.takeRight=wC.takeRight,Gl.takeRightWhile=wC.takeRightWhile,Gl.takeWhile=wC.takeWhile,Gl.tap=MC.tap,Gl.throttle=SC.throttle,Gl.thru=Mm,Gl.toArray=_C.toArray,Gl.toPairs=IC.toPairs,Gl.toPairsIn=IC.toPairsIn,Gl.toPath=AC.toPath,Gl.toPlainObject=_C.toPlainObject,Gl.transform=IC.transform,Gl.unary=SC.unary,Gl.union=wC.union,Gl.unionBy=wC.unionBy,Gl.unionWith=wC.unionWith,Gl.uniq=wC.uniq,Gl.uniqBy=wC.uniqBy,Gl.uniqWith=wC.uniqWith,Gl.unset=IC.unset,Gl.unzip=wC.unzip,Gl.unzipWith=wC.unzipWith,Gl.update=IC.update,Gl.updateWith=IC.updateWith,Gl.values=IC.values,Gl.valuesIn=IC.valuesIn,Gl.without=wC.without,Gl.words=RC.words,Gl.wrap=SC.wrap,Gl.xor=wC.xor,Gl.xorBy=wC.xorBy,Gl.xorWith=wC.xorWith,Gl.zip=wC.zip,Gl.zipObject=wC.zipObject,Gl.zipObjectDeep=wC.zipObjectDeep,Gl.zipWith=wC.zipWith,Gl.entries=IC.toPairs,Gl.entriesIn=IC.toPairsIn,Gl.extend=IC.assignIn,Gl.extendWith=IC.assignInWith,GC(Gl,Gl),Gl.add=EC.add,Gl.attempt=AC.attempt,Gl.camelCase=RC.camelCase,Gl.capitalize=RC.capitalize,Gl.ceil=EC.ceil,Gl.clamp=LC,Gl.clone=_C.clone,Gl.cloneDeep=_C.cloneDeep,Gl.cloneDeepWith=_C.cloneDeepWith,Gl.cloneWith=_C.cloneWith,Gl.conformsTo=_C.conformsTo,Gl.deburr=RC.deburr,Gl.defaultTo=AC.defaultTo,Gl.divide=EC.divide,Gl.endsWith=RC.endsWith,Gl.eq=_C.eq,Gl.escape=RC.escape,Gl.escapeRegExp=RC.escapeRegExp,Gl.every=xC.every,Gl.find=xC.find,Gl.findIndex=wC.findIndex,Gl.findKey=IC.findKey,Gl.findLast=xC.findLast,Gl.findLastIndex=wC.findLastIndex,Gl.findLastKey=IC.findLastKey,Gl.floor=EC.floor,Gl.forEach=xC.forEach,Gl.forEachRight=xC.forEachRight,Gl.forIn=IC.forIn,Gl.forInRight=IC.forInRight,Gl.forOwn=IC.forOwn,Gl.forOwnRight=IC.forOwnRight,Gl.get=IC.get,Gl.gt=_C.gt,Gl.gte=_C.gte,Gl.has=IC.has,Gl.hasIn=IC.hasIn,Gl.head=wC.head,Gl.identity=nl,Gl.includes=xC.includes,Gl.indexOf=wC.indexOf,Gl.inRange=TC,Gl.invoke=IC.invoke,Gl.isArguments=_C.isArguments,Gl.isArray=Pa,Gl.isArrayBuffer=_C.isArrayBuffer,Gl.isArrayLike=_C.isArrayLike,Gl.isArrayLikeObject=_C.isArrayLikeObject,Gl.isBoolean=_C.isBoolean,Gl.isBuffer=_C.isBuffer,Gl.isDate=_C.isDate,Gl.isElement=_C.isElement,Gl.isEmpty=_C.isEmpty,Gl.isEqual=_C.isEqual,Gl.isEqualWith=_C.isEqualWith,Gl.isError=_C.isError,Gl.isFinite=_C.isFinite,Gl.isFunction=_C.isFunction,Gl.isInteger=_C.isInteger,Gl.isLength=_C.isLength,Gl.isMap=_C.isMap,Gl.isMatch=_C.isMatch,Gl.isMatchWith=_C.isMatchWith,Gl.isNaN=_C.isNaN,Gl.isNative=_C.isNative,Gl.isNil=_C.isNil,Gl.isNull=_C.isNull,Gl.isNumber=_C.isNumber,Gl.isObject=Xa,Gl.isObjectLike=_C.isObjectLike,Gl.isPlainObject=_C.isPlainObject,Gl.isRegExp=_C.isRegExp,Gl.isSafeInteger=_C.isSafeInteger,Gl.isSet=_C.isSet,Gl.isString=_C.isString,Gl.isSymbol
vendor: 16,256 bytes, line 2
2=_C.isSymbol,Gl.isTypedArray=_C.isTypedArray,Gl.isUndefined=_C.isUndefined,Gl.isWeakMap=_C.isWeakMap,Gl.isWeakSet=_C.isWeakSet,Gl.join=wC.join,Gl.kebabCase=RC.kebabCase,Gl.last=Gf,Gl.lastIndexOf=wC.lastIndexOf,Gl.lowerCase=RC.lowerCase,Gl.lowerFirst=RC.lowerFirst,Gl.lt=_C.lt,Gl.lte=_C.lte,Gl.max=EC.max,Gl.maxBy=EC.maxBy,Gl.mean=EC.mean,Gl.meanBy=EC.meanBy,Gl.min=EC.min,Gl.minBy=EC.minBy,Gl.stubArray=AC.stubArray,Gl.stubFalse=AC.stubFalse,Gl.stubObject=AC.stubObject,Gl.stubString=AC.stubString,Gl.stubTrue=AC.stubTrue,Gl.multiply=EC.multiply,Gl.nth=wC.nth,Gl.noop=AC.noop,Gl.now=bC.now,Gl.pad=RC.pad,Gl.padEnd=RC.padEnd,Gl.padStart=RC.padStart,Gl.parseInt=RC.parseInt,Gl.random=OC,Gl.reduce=xC.reduce,Gl.reduceRight=xC.reduceRight,Gl.repeat=RC.repeat,Gl.replace=RC.replace,Gl.result=IC.result,Gl.round=EC.round,Gl.sample=xC.sample,Gl.size=xC.size,Gl.snakeCase=RC.snakeCase,Gl.some=xC.some,Gl.sortedIndex=wC.sortedIndex,Gl.sortedIndexBy=wC.sortedIndexBy,Gl.sortedIndexOf=wC.sortedIndexOf,Gl.sortedLastIndex=wC.sortedLastIndex,Gl.sortedLastIndexBy=wC.sortedLastIndexBy,Gl.sortedLastIndexOf=wC.sortedLastIndexOf,Gl.startCase=RC.startCase,Gl.startsWith=RC.startsWith,Gl.subtract=EC.subtract,Gl.sum=EC.sum,Gl.sumBy=EC.sumBy,Gl.template=RC.template,Gl.times=AC.times,Gl.toFinite=_C.toFinite,Gl.toInteger=el,Gl.toLength=_C.toLength,Gl.toLower=RC.toLower,Gl.toNumber=_C.toNumber,Gl.toSafeInteger=_C.toSafeInteger,Gl.toString=_C.toString,Gl.toUpper=RC.toUpper,Gl.trim=RC.trim,Gl.trimEnd=RC.trimEnd,Gl.trimStart=RC.trimStart,Gl.truncate=RC.truncate,Gl.unescape=RC.unescape,Gl.uniqueId=AC.uniqueId,Gl.upperCase=RC.upperCase,Gl.upperFirst=RC.upperFirst,Gl.each=xC.forEach,Gl.eachRight=xC.forEachRight,Gl.first=wC.head,GC(Gl,function(){var t={};return af(Gl,(function(e,n){zC.call(Gl.prototype,n)||(t[n]=e)})),t}(),{chain:!1}),Gl.VERSION="4.17.21",(Gl.templateSettings=RC.templateSettings).imports._=Gl,es(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Gl[t].placeholder=Gl})),es(["drop","take"],(function(t,e){Rl.prototype[t]=function(n){n=void 0===n?1:HC(el(n),0);var r=this.__filtered__&&!e?new Rl(this):this.clone();return r.__filtered__?r.__takeCount__=WC(n,r.__takeCount__):r.__views__.push({size:WC(n,DC),type:t+(r.__dir__<0?"Right":"")}),r},Rl.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),es(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Rl.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Jd(t),type:n}),e.__filtered__=e.__filtered__||r,e}})),es(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Rl.prototype[t]=function(){return this[n](1).value()[0]}})),es(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Rl.prototype[t]=function(){return this.__filtered__?new Rl(this):this[n](1)}})),Rl.prototype.compact=function(){return this.filter(nl)},Rl.prototype.find=function(t){return this.filter(t).head()},Rl.prototype.findLast=function(t){return this.reverse().find(t)},Rl.prototype.invokeMap=Ms((function(t,e){return"function"==typeof t?new Rl(this):this.map((function(n){return Cv(n,t,e)}))})),Rl.prototype.reject=function(t){return this.filter(gg(Jd(t)))},Rl.prototype.slice=function(t,e){t=el(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Rl(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=el(e))<0?n.dropRight(-e):n.take(e-t)),n)},Rl.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Rl.prototype.toArray=function(){return this.take(DC)},af(Rl.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Gl[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(Gl.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,l=e instanceof Rl,s=a[0],u=l||Pa(e),c=function(t){var e=i.apply(Gl,Yu([t],a));return r&&h?e[0]:e};u&&n&&"function"==typeof s&&1!=s.length&&(l=u=!1);var h=this.__chain__,d=!!this.__actions__.length,f=o&&!h,p=l&&!d;if(!o&&u){e=p?e:new Rl(this);var v=t.apply(e,a);return v.__actions__.push({func:Mm,args:[c],thisArg:void 0}),new zl(v,h)}return f&&p?t.apply(this,a):(v=this.thru(c),f?r?v.value()[0]:v.value():v)})})),es(["pop","push","shift","sort","splice","unshift"],(function(t){var e=PC[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Gl.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Pa(i)?i:[],t)}return this[n]((function(n){return e.apply(Pa(n)?n:[],t)}))}})),af(Rl.prototype,(function(t,e){var n=Gl[e];if(n){var r=n.name+"";zC.call(Nl,r)||(Nl[r]=[]),Nl[r].push({name:e,func:n})}})),Nl[gs(void 0,2).name]=[{name:"wrapper",func:void 0}],Rl.prototype.clone=function(){var t=new Rl(this.__wrapped__);return t.__actions__=Fl(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Fl(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Fl(this.__views__),t},Rl.prototype.reverse=function(){if(this.__filtered__){var t=new Rl(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Rl.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Pa(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=kC(e,t+a);break;case"takeRight":t=BC(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,l=o.end,s=l-a,u=r?l:a-1,c=this.__iteratees__,h=c.length,d=0,f=NC(s,this.__takeCount__);if(!n||!r&&i==s&&f==s)return Bm(t,this.__actions__);var p=[];t:for(;s--&&d<f;){for(var v=-1,g=t[u+=e];++v<h;){var y=c[v],m=y.iteratee,C=y.type,w=m(g);if(2==C)g=w;else if(!w){if(1==C)continue t;break t}}p[d++]=g}return p},Gl.prototype.at=MC.at,Gl.prototype.chain=MC.wrapperChain,Gl.prototype.commit=MC.commit,Gl.prototype.next=MC.next,Gl.prototype.plant=MC.plant,Gl.prototype.reverse=MC.reverse,Gl.prototype.toJSON=Gl.prototype.valueOf=Gl.prototype.value=MC.value,Gl.prototype.first=Gl.prototype.head,FC&&(Gl.prototype[FC]=MC.toIterator);var jC={exports:{}};!function(t){!function(e){var n=/^\s+/,r=/\s+$/,i=0,o=e.round,a=e.min,l=e.max,s=e.random;function u(t,s){if(s=s||{},(t=t||"")instanceof u)return t;if(!(this instanceof u))return new u(t,s);var c=function(t){var i={r:0,g:0,b:0},o=1,s=null,u=null,c=null,h=!1,d=!1;"string"==typeof t&&(t=function(t){t=t.replace(n,"").replace(r,"").toLowerCase();var e,i=!1;if(T[t])t=T[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=P.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=P.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=P.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=P.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=P.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=P.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=P.hex8.exec(t))return{r:A(e[1]),g:A(e[2]),b:A(e[3]),a:D(e[4]),format:i?"name":"hex8"};if(e=P.hex6.exec(t))return{r:A(e[1]),g:A(e[2]),b:A(e[3]),format:i?"name":"hex"};if(e=P.hex4.exec(t))return{r:A(e[1]+""+e[1]),g:A(e[2]+""+e[2]),b:A(e[3]+""+e[3]),a:D(e[4]+""+e[4]),format:i?"name":"hex8"};if(e=P.hex3.exec(t))return{r:A(e[1]+""+e[1]),g:A(e[2]+""+e[2]),b:A(e[3]+""+e[3]),format:i?"name":"hex"};return!1}(t));"object"==typeof t&&(z(t.r)&&z(t.g)&&z(t.b)?(f=t.r,p=t.g,v=t.b,i={r:255*M(f,255),g:255*M(p,255),b:255*M(v,255)},h=!0,d="%"===String(t.r).substr(-1)?"prgb":"rgb"):z(t.h)&&z(t.s)&&z(t.v)?(s=k(t.s),u=k(t.v),i=function(t,n,r){t=6*M(t,360),n=M(n,100),r=M(r,100);var i=e.floor(t),o=t-i,a=r*(1-n),l=r*(1-o*n),s=r*(1-(1-o)*n),u=i%6,c=[r,l,a,a,s,r][u],h=[s,r,r,l,a,a][u],d=[a,a,s,r,r,l][u];return{r:255*c,g:255*h,b:255*d}}(t.h,s,u),h=!0,d="hsv"):z(t.h)&&z(t.s)&&z(t.l)&&(s=k(t.s),c=k(t.l),i=function(t,e,n){var r,i,o;function a(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=M(t,360),e=M(e,100),n=M(n,100),0===e)r=i=o=n;else{var l=n<.5?n*(1+e):n+e-n*e,s=2*n-l;r=a(s,l,t+1/3),i=a(s,l,t),o=a(s,l,t-1/3)}return{r:255*r,g:255*i,b:255*o}}(t.h,s,c),h=!0,d="hsl"),t.hasOwnProperty("a")&&(o=t.a));var f,p,v;return o=I(o),{ok:h,format:t.format||d,r:a(255,l(i.r,0)),g:a(255,l(i.g,0)),b:a(255,l(i.b,0)),a:o}}(t);this._originalInput=t,this._r=c.r,this._g=c.g,this._b=c.b,this._a=c.a,this._roundA=o(100*this._a)/100,this._format=s.format||c.format,this._gradientType=s.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=c.ok,this._tc_id=i++}function c(t,e,n){t=M(t,255),e=M(e,255),n=M(n,255);var r,i,o=l(t,e,n),s=a(t,e,n),u=(o+s)/2;if(o==s)r=i=0;else{var c=o-s;switch(i=u>.5?c/(2-o-s):c/(o+s),o){case t:r=(e-n)/c+(e<n?6:0);break;case e:r=(n-t)/c+2;break;case n:r=(t-e)/c+4}r/=6}return{h:r,s:i,l:u}}function h(t,e,n){t=M(t,255),e=M(e,255),n=M(n,255);var r,i,o=l(t,e,n),s=a(t,e,n),u=o,c=o-s;if(i=0===o?0:c/o,o==s)r=0;else{switch(o){case t:r=(e-n)/c+(e<n?6:0);break;case e:r=(n-t)/c+2;break;case n:r=(t-e)/c+4}r/=6}return{h:r,s:i,v:u}}function d(t,e,n,r){var i=[B(o(t).toString(16)),B(o(e).toString(16)),B(o(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function f(t,e,n,r){return[B(N(r)),B(o(t).toString(16)),B(o(e).toString(16)),B(o(n).toString(16))].join("")}function p(t,e){e=0===e?0:e||10;var n=u(t).toHsl();return n.s-=e/100,n.s=R(n.s),u(n)}function v(t,e){e=0===e?0:e||10;var n=u(t).toHsl();return n.s+=e/100,n.s=R(n.s),u(n)}function g(t){return u(t).desaturate(100)}function y(t,e){e=0===e?0:e||10;var n=u(t).toHsl();return n.l+=e/100,n.l=R(n.l),u(n)}function m(t,e){e=0===e?0:e||10;var n=u(t).toRgb();return n.r=l(0,a(255,n.r-o(-e/100*255))),n.g=l(0,a(255,n.g-o(-e/100*255))),n.b=l(0,a(255,n.b-o(-e/100*255))),u(n)}function C(t,e){e=0===e?0:e||10;var n=u(t).toHsl();return n.l-=e/100,n.l=R(n.l),u(n)}function w(t,e){var n=u(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,u(n)}function x(t){var e=u(t).toHsl();return e.h=(e.h+180)%360,u(e)}function b(t){var e=u(t).toHsl(),n=e.h;return[u(t),u({h:(n+120)%360,s:e.s,l:e.l}),u({h:(n+240)%360,s:e.s,l:e.l})]}function S(t){var e=u(t).toHsl(),n=e.h;return[u(t),u({h:(n+90)%360,s:e.s,l:e.l}),u({h:(n+180)%360,s:e.s,l:e.l}),u({h:(n+270)%360,s:e.s,l:e.l})]}function _(t){var e=u(t).toHsl(),n=e.h;return[u(t),u({h:(n+72)%360,s:e.s,l:e.l}),u({h:(n+216)%360,s:e.s,l:e.l})]}function E(t,e,n){e=e||6,n=n||30;var r=u(t).toHsl(),i=360/n,o=[u(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(u(r));return o}function L(t,e){e=e||6;for(var n=u(t).toHsv(),r=n.h,i=n.s,o=n.v,a=[],l=1/e;e--;)a.push(u({h:r,s:i,v:o})),o=(o+l)%1;return a}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,n,r,i=this.toRgb();return t=i.r/255,n=i.g/255,r=i.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=I(t),this._roundA=o(100*this._a)/100,this},toHsv:function(){var t=h(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=h(this._r,this._g,this._b),e=o(360*t.h),n=o(100*t.s),r=o(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=c(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=c(this._r,this._g,this._b),e=o(360*t.h),n=o(100*t.s),r=o(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return d(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,n,r,i){var a=[B(o(t).toString(16)),B(o(e).toString(16)),B(o(n).toString(16)),B(N(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(100*M(this._r,255))+"%",g:o(100*M(this._g,255))+"%",b:o(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+o(100*M(this._r,255))+"%, "+o(100*M(this._g,255))+"%, "+o(100*M(this._b,255))+"%)":"rgba("+o(100*M(this._r,255))+"%, "+o(100*M(this._g,255))+"%, "+o(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(O[d(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+f(this._r,this._g,this._b,this._a),n=e,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=u(t);n="#"+f(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(L,arguments)},splitcomplement:function(){return this._applyCombination(_,arguments)},triad:function(){return this._applyCombination(b,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},u.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:k(t[r]));t=n}return u(t,e)},u.equals=function(t,e){return!(!t||!e)&&u(t).toRgbString()==u(e).toRgbString()},u.random=function(){return u.fromRatio({r:s(),g:s(),b:s()})},u.mix=function(t,e,n){n=0===n?0:n||50;var r=u(t).toRgb(),i=u(e).toRgb(),o=n/100;return u({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},u.readability=function(t,n){var r=u(t),i=u(n);return(e.max(r.getLuminance(),i.getLuminance())+.05)/(e.min(r.getLuminance(),i.getLuminance())+.05)},u.isReadable=function(t,e,n){var r,i,o=u.readability(t,e);switch(i=!1,r=function(t){var e,n;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==n&&"large"!==n&&(n="small");return{level:e,size:n}}(n),r.level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},u.mostReadable=function(t,e,n){var r,i,o,a,l=null,s=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;
vendor: 1,583 bytes, line 2
2for(var c=0;c<e.length;c++)(r=u.readability(t,e[c]))>s&&(s=r,l=u(e[c]));return u.isReadable(t,l,{level:o,size:a})||!i?l:(n.includeFallbackColors=!1,u.mostReadable(t,["#fff","#000"],n))};var T=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
20",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=u.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(T);function I(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function M(t,n){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"===typeof t&&-1!=t.indexOf("%")}(t);return t=a(n,l(0,parseFloat(t))),r&&(t=parseInt(t*n,10)/100),e.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function R(t){return a(1,l(0,t))}function A(t){return parseInt(t,16)}function B(t){return 1==t.length?"0"+t:""+t}function k(t){return t<=1&&(t=100*t+"%"),t}function N(t){return e.round(255*parseFloat(t)).toString(16)}function D(t){return A(t)/255}var P=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"
2+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function z(t){return!!P.CSS_UNIT.exec(t)}t.exports?t.exports=u:window.tinycolor=u}(Math)}(jC);var UC,VC=jC.exports,YC=[95,85,75,30,15,0,15,30,45,60,80],XC=function(t){return VC(t).getLuminance()<=.5},qC=[{fontColorIndex:0,bgColorIndex:3},{fontColorIndex:13,bgColorIndex:8},{fontColorIndex:14,bgColorIndex:1}],KC=function(t){void 0===t&&(t={});var e=Array.from(Array(15)).fill(Xo),n=t.basicColorRelations,r=void 0===n?[]:n,i=function(t){for(var e=[],n=0;n<11;n++){var r=YC[n];e.push(Dm(0===r?t:VC.mix(t,n<5?"#FFFFFF":"#000000",r).toHexString()))}return e}(t.brandColor);return r.forEach((function(t){e[t.basicColorIndex]=i[t.standardColorIndex]})),qC.forEach((function(t){var n=t.fontColorIndex,r=t.bgColorIndex;e[n]=XC(e[r])?Xo:Yo})),ya(ya({},t),{basicColors:e})},ZC=KC({brandColor:"#3471F9",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:5},{basicColorIndex:4,standardColorIndex:6},{basicColorIndex:5,standardColorIndex:6},{basicColorIndex:6,standardColorIndex:6},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:4},{basicColorIndex:11,standardColorIndex:4},{basicColorIndex:12,standardColorIndex:5}]}),$C={default:KC({brandColor:"#326EF4",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:1},{basicColorIndex:4,standardColorIndex:2},{basicColorIndex:5,standardColorIndex:7},{basicColorIndex:6,standardColorIndex:5},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:2},{basicColorIndex:11,standardColorIndex:5},{basicColorIndex:12,standardColorIndex:5}]}),colorful:ZC,gray:KC({brandColor:"#9DA7B6",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:1},{basicColorIndex:4,standardColorIndex:2},{basicColorIndex:5,standardColorIndex:7},{basicColorIndex:6,standardColorIndex:8},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:2},{basicColorIndex:11,standardColorIndex:3},{basicColorIndex:12,standardColorIndex:3}]})},QC="Roboto, PingFangSC, BlinkMacSystemFont, Microsoft YaHei, Arial, sans-serif",JC="zh_CN",tw=JC,ew={zh_CN:{"\u5c0f\u8ba1":"\u5c0f\u8ba1","\u603b\u8ba1":"\u603b\u8ba1","\u603b\u548c":"\u603b\u548c","\u9879":"\u9879","\u5df2\u9009\u62e9":"\u5df2\u9009\u62e9","\u5e8f\u53f7":"\u5e8f\u53f7","\u5ea6\u91cf":"\u5ea6\u91cf","\u6570\u503c":"\u6570\u503c","\u5171\u8ba1":"\u5171\u8ba1","\u6761":"\u6761","\u8d8b\u52bf":"\u8d8b\u52bf","\u9690\u85cf":"\u9690\u85cf","\u7ec4\u5185\u5347\u5e8f":"\u7ec4\u5185\u5347\u5e8f","\u5347\u5e8f":"\u5347\u5e8f","\u964d\u5e8f":"\u964d\u5e8f","\u7ec4\u5185\u964d\u5e8f":"\u7ec4\u5185\u964d\u5e8f","\u4e0d\u6392\u5e8f":"\u4e0d\u6392\u5e8f"},en_US:{"\u5c0f\u8ba1":"Total","\u603b\u8ba1":"Total","\u603b\u548c":"SUM","\u9879":"items","\u5df2\u9009\u62e9":"selected","\u5e8f\u53f7":"Index","\u5ea6\u91cf":"Measure","\u6570\u503c":"Measure","\u5171\u8ba1":"Total","\u6761":"","\u9690\u85cf":"Hide","\u8d8b\u52bf":"Trend","\u7ec4\u5185\u5347\u5e8f":"Group ASC","\u7ec4\u5185\u964d\u5e8f":"Group DESC","\u5347\u5e8f":"ASC","\u964d\u5e8f":"DESC","\u4e0d\u6392\u5e8f":"No order"}},nw=function(){return tw},rw=function(t){tw=t||JC},iw=function(t){ew=sg({},ew,t)},ow=function(){return ew},aw=function(t,e){return void 0===e&&(e=t),Uu(ew,[tw,t],e)},lw="".concat(jo,"-tooltip"),sw="".concat(lw,"-container"),uw="".concat(sw,"-show"),cw="".concat(sw,"-hide"),hw=("".concat(lw,"-operation"),15),dw=10;!function(t){t[t.ALL=0]="ALL",t[t.COL=1]="COL",t[t.ROW=2]="ROW"}(UC||(UC={}));function fw(t){return"mobile"===t||/(iPhone|iPad|SymbianOS|Windows Phone|iPod|iOS|Android)/i.test(navigator.userAgent)}function pw(){return/windows/i.test(navigator.userAgent)}var vw=function(t){var e,n,r,i,o,a,l=(null===t||void 0===t?void 0:t.palette)||(a=null===t||void 0===t?void 0:t.name,$C[(a||"default").toLowerCase()]),s=l.basicColors,u=l.semanticColors,c=l.others,h=null===(e=null===t||void 0===t?void 0:t.spreadsheet)||void 0===e?void 0:e.isTableMode(),d=pw()?"bold":700,f=function(){var t,e;return{bolderText:{fontFamily:QC,fontSize:12,fontWeight:d,fill:s[13],opacity:1,textAlign:"right",textBaseline:"middle"},text:{fontFamily:QC,fontSize:12,fontWeight:"normal",fill:s[13],opacity:1,textAlign:"right",textBaseline:"middle"}
2,cell:{crossBackgroundColor:s[1],backgroundColor:s[8],backgroundColorOpacity:1,horizontalBorderColor:s[9],horizontalBorderColorOpacity:1,verticalBorderColor:s[9],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,padding:{top:8,right:8,bottom:8,left:8},interactionState:{hover:{backgroundColor:s[2],backgroundOpacity:.6},hoverFocus:{backgroundColor:s[2],backgroundOpacity:.6,borderColor:s[14],borderWidth:1,borderOpacity:1},selected:{backgroundColor:s[2],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},searchResult:{backgroundColor:null!==(t=null===c||void 0===c?void 0:c.results)&&void 0!==t?t:s[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(e=null===c||void 0===c?void 0:c.highlight)&&void 0!==e?e:s[6],backgroundOpacity:1},prepareSelect:{borderColor:s[14],borderOpacity:1,borderWidth:1}}},miniChart:{line:{point:{size:2.2,fill:s[6],opacity:1},linkLine:{size:1.5,fill:s[6],opacity:.6}},bar:{intervalPadding:4,fill:s[6],opacity:1},bullet:{progressBar:{widthPercent:.6,height:10,innerHeight:6},comparativeMeasure:{width:1,height:12,fill:s[13],opacity:.25},rangeColors:{good:null===u||void 0===u?void 0:u.green,satisfactory:u.yellow,bad:u.red},backgroundColor:"#E9E9E9"},interval:{height:12,fill:s[7]}},icon:{fill:s[13],downIconColor:u.red,upIconColor:u.green,size:10,margin:{right:4,left:4}}}};return{cornerCell:{bolderText:{fontFamily:QC,fontSize:12,fontWeight:d,fill:s[0],opacity:1,textAlign:h?"center":"left",textBaseline:"middle"},text:{fontFamily:QC,fontSize:12,fontWeight:d,fill:s[0],opacity:1,textAlign:"right",textBaseline:"middle"},cell:{backgroundColor:s[3],backgroundColorOpacity:1,horizontalBorderColor:s[10],horizontalBorderColorOpacity:1,verticalBorderColor:s[10],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,padding:{top:0,right:8,bottom:0,left:8}},icon:{fill:s[0],size:10,margin:{right:4,left:4}}},rowCell:{seriesText:{fontFamily:QC,fontSize:12,fontWeight:"normal",fill:s[14],linkTextFill:s[6],opacity:1,textBaseline:"middle",textAlign:"center"},measureText:{fontFamily:QC,fontSize:12,fontWeight:"normal",fill:s[14],linkTextFill:s[6],opacity:1,textAlign:h?"center":"left",textBaseline:"top"},bolderText:{fontFamily:QC,fontSize:12,fontWeight:d,fill:s[14],linkTextFill:s[6],opacity:1,textAlign:h?"center":"left",textBaseline:"top"},text:{fontFamily:QC,fontSize:12,fontWeight:"normal",fill:s[14],linkTextFill:s[6],opacity:1,textBaseline:"top",textAlign:h?"center":"left"},cell:{backgroundColor:s[1],backgroundColorOpacity:1,horizontalBorderColor:s[9],horizontalBorderColorOpacity:1,verticalBorderColor:s[9],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,padding:{top:0,right:8,bottom:0,left:8},interactionState:{hover:{backgroundColor:s[2],backgroundOpacity:.6},selected:{backgroundColor:s[2],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},prepareSelect:{borderColor:s[14],borderOpacity:1,borderWidth:1},searchResult:{backgroundColor:null!==(n=null===c||void 0===c?void 0:c.results)&&void 0!==n?n:s[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(r=null===c||void 0===c?void 0:c.highlight)&&void 0!==r?r:s[6],backgroundOpacity:1}}},icon:{fill:s[14],size:10,margin:{right:4,left:4}},seriesNumberWidth:80},colCell:{measureText:{fontFamily:QC,fontSize:12,fontWeight:"normal",fill:s[0],opacity:1,textAlign:"right",textBaseline:"middle"},bolderText:{fontFamily:QC,fontSize:12,fontWeight:d,fill:s[0],opacity:1,textAlign:"center",textBaseline:"middle"},text:{fontFamily:QC,fontSize:12,fontWeight:"normal",fill:s[0],opacity:1,textAlign:"center",textBaseline:"middle"},cell:{backgroundColor:s[3],backgroundColorOpacity:1,horizontalBorderColor:s[10],horizontalBorderColorOpacity:1,verticalBorderColor:s[10],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,padding:{top:0,right:8,bottom:0,left:8},interactionState:{hover:{backgroundColor:s[4],backgroundOpacity:.6},selected:{backgroundColor:s[4],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},prepareSelect:{borderColor:s[14],borderOpacity:1,borderWidth:1},searchResult:{backgroundColor:null!==(i=null===c||void 0===c?void 0:c.results)&&void 0!==i?i:s[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(o=null===c||void 0===c?void 0:c.highlight)&&void 0!==o?o:s[6],backgroundOpacity:1}}},icon:{fill:s[0],size:10,margin:{top:6,right:4,bottom:6,left:4}}},dataCell:f(),mergedCell:f(),resizeArea:{size:3,background:s[7],backgroundOpacity:0,guideLineColor:s[7],guideLineDisableColor:"rgba(0,0,0,0.25)",guideLineDash:[3,3],interactionState:{hover:{backgroundColor:s[7],backgroundOpacity:1}}},scrollBar:{trackColor:"rgba(0,0,0,0.01)",thumbHoverColor:"rgba(0,0,0,0.25)",thumbColor:"rgba(0,0,0,0.15)",thumbHorizontalMinSize:32,thumbVerticalMinSize:32,size:fw()?3:6,hoverSize:fw()?4:8,lineCap:"round"},splitLine:{horizontalBorderColor:s[12],horizontalBorderColorOpacity:.2,horizontalBorderWidth:2,verticalBorderColor:s[11],verticalBorderColorOpacity:.25,verticalBorderWidth:2,showShadow:!0,shadowWidth:8,shadowColors:{left:"rgba(0,0,0,0.1)",right:"rgba(0,0,0,0)"}},prepareSelectMask:{backgroundColor:s[5],backgroundOpacity:.3},background:{color:s[8],opacity:1}}},gw=function(){function t(t){this.x=0,this.y=0,this.width=0,this.height=0,this.colIndex=-1,this.level=0,this.isLeaf=!1,this.children=[],this.padding=0;
2var e=t.id,n=t.key,r=t.value,i=t.label,o=t.parent,a=t.level,l=t.rowIndex,s=t.isTotals,u=t.isGrandTotals,c=t.isSubTotals,h=t.isCollapsed,d=t.hierarchy,f=t.isPivotMode,p=t.seriesNumberWidth,v=t.field,g=t.spreadsheet,y=t.query,m=t.belongsCell,C=t.inCollapseNode,w=t.isTotalMeasure,x=t.isLeaf,b=t.extra;this.id=e,this.key=n,this.value=r,this.label=i||r,this.parent=o,this.level=a,this.rowIndex=l,this.isTotals=s,this.isCollapsed=h,this.hierarchy=d,this.isPivotMode=f,this.seriesNumberWidth=p,this.field=v,this.spreadsheet=g,this.query=y,this.belongsCell=m,this.inCollapseNode=C,this.isTotalMeasure=w,this.isLeaf=x,this.isGrandTotals=u,this.isSubTotals=c,this.config={x:0,y:0,width:0,height:0,colIndex:-1,children:[],padding:0,id:"",key:"",value:"",label:""},this.extra=b}return t.getFieldPath=function(t,e){if(t&&!t.isTotals||t&&e){for(var n=t.parent,r=[t.field];n&&n.id!==ko;)r.push(n.field),n=n.parent;return r.reverse()}return[]},t.getAllLeaveNodes=function(t){var e=[];if(t.isLeaf)return[t];for(var n=xa([],wa(t.children),!1),r=n.shift();r;)r.isLeaf?e.push(r):n.unshift.apply(n,xa([],wa(r.children),!1)),r=n.shift();return e},t.getAllChildrenNodes=function(t){var e=[];if(t.isLeaf)return[t];for(var n=xa([],wa(t.children||[]),!1),r=n.shift();r;)e.push(r),n.unshift.apply(n,xa([],wa(r.children),!1)),r=n.shift();return e},t.getAllBranch=function(t){for(var e=[],n=this.getAllLeaveNodes(t),r=n.shift(),i=[];r;){i.unshift(r);for(var o=r.parent;o&&!Mv(o,t);)i.unshift(o),o=o.parent;e.push(i),r=n.shift(),i=[]}return e},t.blankNode=function(){return new t({id:"",key:"",value:""})},t.rootNode=function(){return new t({id:"root",key:"",value:""})},t.prototype.toJSON=function(){return Sg(this,["config","hierarchy","parent","spreadsheet"])},t.prototype.getHeadLeafChild=function(){for(var t=this;!Iv(t.children);)t=Tp(t.children);return t},t}(),yw=function(){function t(){this.width=0,this.height=0,this.maxLevel=-1,this.sampleNodesForAllLevels=[],this.sampleNodeForLastLevel=null,this.allNodesWithoutRoot=[],this.indexNode=[]}return t.prototype.getLeaves=function(){return this.allNodesWithoutRoot.filter((function(t){return t.isLeaf}))},t.prototype.getNodes=function(t){return void 0!==t?this.allNodesWithoutRoot.filter((function(e){return e.level===t})):this.allNodesWithoutRoot},t.prototype.getNodesLessThanLevel=function(t){return this.allNodesWithoutRoot.filter((function(e){return e.level<=t}))},t.prototype.pushNode=function(t,e){void 0===e&&(e=-1),-1===e?this.allNodesWithoutRoot.push(t):this.allNodesWithoutRoot.splice(e,0,t)},t.prototype.pushIndexNode=function(t){this.indexNode.push(t)},t.prototype.getIndexNodes=function(){return this.indexNode},t}(),mw=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1),this.label=t,this.isSubTotals=e,this.isGrandTotals=n};function Cw(t,e){for(var n={},r=t;r&&r.key;)r.isTotals&&!e||(n[r.key]=r.value),r=r.parent;return n}var ww=function(t,e,n,r){return e.layoutArrange?e.layoutArrange(e.spreadsheet,n,r,t):t},xw=function(t,e,n,r){var i,o;if(null===(o=null===(i=t.spreadsheet)||void 0===i?void 0:i.facet)||void 0===o?void 0:o.getHiddenColumnsInfo(n))return!1;var a=!0,l=function(t,n,i){void 0===n&&(n=-1),void 0===i&&(i=-1),-1===n?(e.children.push(t),r.pushNode(t)):(e.children.splice(n,0,t),r.pushNode(t,i))};if(t.layoutHierarchy){var s=t.layoutHierarchy(t.spreadsheet,n);if(s){var u=!!Ev(null===s||void 0===s?void 0:s.delete)&&(null===s||void 0===s?void 0:s.delete);a=!u;var c=s.push,h=s.unshift,d=e.children.length,f=r.getNodes().length;Iv(h)||(Zf(h,(function(t){l(t)})),d=e.children.length,f=r.getNodes().length),Iv(c)||Zf(c,(function(t){l(t)})),u||l(n,d,f)}else l(n)}else l(n);return a},bw=function(t,e,n){(null===t||void 0===t?void 0:t.layoutCoordinate)&&((null===e||void 0===e?void 0:e.isLeaf)||(null===n||void 0===n?void 0:n.isLeaf))&&(null===t||void 0===t||t.layoutCoordinate(t.spreadsheet,e,n))},Sw=function(t){this.label=t},_w=function(t){var e,n=t.addTotalMeasureInTotal,r=t.addMeasureInTotalQuery,i=t.parentNode,o=t.currentField,a=t.fields,l=t.facetCfg,s=t.hierarchy,u=a.indexOf(o),c=l.dataSet,h=l.values,d=l.spreadsheet,f=[],p={};if(i.isTotals)n&&(p=Cw(i.parent,!0),f.push.apply(f,xa([],wa(h.map((function(t){return new Sw(t)}))),!1)));else{p=Cw(i,!0);var v=c.getDimensionValues(o,p),g=ww(v,l,i,o);f.push.apply(f,xa([],wa(g||[]),!1));var y=c.getFieldName(o);Iv(f)&&(o===po?f.push.apply(f,xa([],wa(null===(e=c.fields)||void 0===e?void 0:e.values),!1)):f.push(y)),function(t,e,n){var r,i,o,a,l=null!==(a=null===(o=n.colCfg)||void 0===o?void 0:o.hideMeasureColumn)&&void 0!==a&&a,s=n.dataSet.fields.valueInCols;
2try{for(var u=Ca(t),c=u.next();!c.done;c=u.next()){var h=c.value;l&&s&&e===po&&t.splice(t.indexOf(h),1)}}catch(d){r={error:d}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}(f,o,l),function(t){var e,n,r,i=t.isFirstField,o=t.currentField,a=t.fieldValues,l=t.spreadsheet,s=t.lastField,u=l.getTotalsConfig(i?o:s);i?(null===u||void 0===u?void 0:u.showGrandTotals)&&(n=u.reverseLayout?"unshift":"push",r=new mw(u.label,!1,!0)):(null===u||void 0===u?void 0:u.showSubTotals)&&(Gl.size(a)>1||!1!==Gl.get(u,"showSubTotals.always"))&&o!==po&&(n=u.reverseSubLayout?"unshift":"push",r=new mw(u.subLabel,!0)),null===(e=a[n])||void 0===e||e.call(a,r)}({currentField:o,lastField:a[u-1],isFirstField:0===u,fieldValues:f,spreadsheet:d})}var m=f.filter((function(t){return!Hv(t)}));Lw({currentField:o,fields:a,fieldValues:m,facetCfg:l,hierarchy:s,parentNode:i,level:u,query:p,addMeasureInTotalQuery:r,addTotalMeasureInTotal:n})},Ew=function(t,e){return"".concat(t).concat(No).concat(e)},Lw=function(t){var e,n,r,i,o,a,l,s,u,c,h,d,f,p=t.currentField,v=t.fields,g=t.fieldValues,y=t.facetCfg,m=t.hierarchy,C=t.parentNode,w=t.level,x=t.query,b=t.addMeasureInTotalQuery,S=t.addTotalMeasureInTotal,_=y.spreadsheet,E=y.collapsedCols,L=y.colCfg;try{for(var T=Ca(g.entries()),O=T.next();!O.done;O=T.next()){var I=wa(O.value,2),M=I[0],R=I[1],A=R instanceof mw,B=R instanceof Sw,k=void 0,N=void 0,D=!1,P=!1,z=!1,F=p;if(A){var H=R;P=H.isGrandTotals,z=H.isSubTotals,k=aw(R.label),b?(N=ya(ya({},x),((r={})[po]=null===(l=null===_||void 0===_?void 0:_.dataSet)||void 0===l?void 0:l.fields.values[0],r)),D=!0):(N=x,S||(D=!0))}else if(B)k=aw(R.label),N=ya(ya({},x),((i={})[po]=k,i)),F=po,D=!0;else if(_.isTableMode())k=R,F=v[M],N=ya(ya({},x),((o={})[F]=k,o)),D=!0;else{k=R,N=ya(ya({},x),((a={})[p]=k,a));var W=null===(u=null===(s=_.dataCfg.fields)||void 0===s?void 0:s.valueInCols)||void 0===u||u,G=(null===L||void 0===L?void 0:L.hideMeasureColumn)&&W&&Jp(v,po)?2:1;D=w===v.length-G}var j=Ew(C.id,k);if(!j)return;var U=!!Ev(null===E||void 0===E?void 0:E[j])&&(null===E||void 0===E?void 0:E[j]),V=new gw({id:j,key:F,value:k,level:w,field:F,parent:C,isTotals:A,isGrandTotals:P,isSubTotals:z,isTotalMeasure:B,isCollapsed:U,hierarchy:m,query:N,spreadsheet:_,isLeaf:D||U}),Y=xw(y,C,V,m);if(w>m.maxLevel&&!P&&!C.isGrandTotals&&!C.isSubTotals&&!V.isSubTotals){var X=null===(h=null===(c=y.spreadsheet)||void 0===c?void 0:c.facet)||void 0===h?void 0:h.getHiddenColumnsInfo(V);m.sampleNodesForAllLevels.push(V),m.maxLevel=w,m.sampleNodeForLastLevel=X?(null===(d=null===X||void 0===X?void 0:X.displaySiblingNode)||void 0===d?void 0:d.next)||(null===(f=null===X||void 0===X?void 0:X.displaySiblingNode)||void 0===f?void 0:f.prev):V}D||U||!Y?(V.isLeaf=!0,m.pushIndexNode(V),V.rowIndex=m.getIndexNodes().length-1):_w({addTotalMeasureInTotal:S,addMeasureInTotalQuery:b,parentNode:V,currentField:v[w+1],fields:v,facetCfg:y,hierarchy:m})}}catch(q){e={error:q}}finally{try{O&&!O.done&&(n=T.return)&&n.call(T)}finally{if(e)throw e.error}}},Tw=function t(e,n,r,i){var o=n.facetCfg,a=n.hierarchy,l=n.parentNode,s=o.dataSet;e.forEach((function(e,u){"string"===typeof e&&(e={key:e});var c=e.key,h=c===yo?aw("\u5e8f\u53f7"):s.getFieldName(c),d=i||l;if(Lw({currentField:c,fields:[c],fieldValues:[h],facetCfg:o,hierarchy:a,parentNode:d,level:r,query:{},addMeasureInTotalQuery:!1,addTotalMeasureInTotal:!1}),e.children&&e.children.length){var f=d.children[u];f.isLeaf=!1,t(e.children,n,r+1,f)}}))},Ow=function(t,e){return e>0&&t<e},Iw=function(t,e,n){return e>0&&t>=n-e},Mw=function(t,e,n){return n>0&&t<e+n},Rw=function(t,e,n){return n>0&&t>=e+1-n},Aw=function(t,e,n,r,i,o){var a=wp(n,(function(e,r){var a=t-(Dv(o)?0:o)+i.x;return a>=e&&a<n[r+1]}),0);a=Math.max(a,0);var l=wp(n,(function(e,r){var o=i.width+t+i.x;return o>=e&&o<n[r+1]}),a);l=Math.min(-1===l?1/0:l,n.length-2);var s=r.getIndexRange(e+i.y,i.height+e+i.y);return[a,l,s.start,s.end]},Bw=function(t,e,n){var r,i,o=null===t||void 0===t?void 0:t.getMatrix(),a=null!==(r=null===o||void 0===o?void 0:o[6])&&void 0!==r?r:0,l=null!==(i=null===o||void 0===o?void 0:o[7])&&void 0!==i?i:0;null===t||void 0===t||t.translate(e-a,n-l)},kw=function(t,e){var n,r=null===t||void 0===t?void 0:t.getMatrix(),i=null!==(n=null===r||void 0===r?void 0:r[6])&&void 0!==n?n:0;null===t||void 0===t||t.translate(e-i,0)},Nw=function(t,e,n){var r=e,i=n,o=function t(e){return e.isLeaf?1:e.children?e.children.reduce((function(e,n){return e+=t(n)}),0):0};return e&&(r=t.slice(0,e).reduce((function(t,e){return t+=o(e)}),0)),n&&(i=t.slice(t.length-n).reduce((function(t,e){return t+=o(e)}),0)),{colCount:r,trailingColCount:i}},Dw=function t(e,n){return e.reduce((function(e,r){"string"===typeof r&&(r={key:r});var i=ya({},r);return i.children?(i.children=t(i.children,n),e.push(i),e):(n[i.key]&&e.push(i),e)}),[])},Pw=function(t){return"root"===t.parent.id},zw=function(t){var e=function(t){var e=[];
2return function t(n){n.forEach((function(n){"string"!==typeof n&&n.children?t(n.children):e.push(n)}))}(t),e}(t);return e.map((function(t){return"string"===typeof t?t:t.key}))},Fw=function t(e){var n=e.children[0];return n?n.isLeaf?n:t(n):e},Hw=function(t){var e=t.facetCfg,n=e.columns,r=e.spreadsheet.store.get("hiddenColumnsDetail"),i=null===e||void 0===e?void 0:e.showSeriesNumber,o=xa([],wa(zw(n).filter((function(t){return!r||r.every((function(e){return e.hideColumnNodes.every((function(e){return e.field!==t}))}))}))),!1),a=xa([],wa(n),!1),l={};i&&(a.unshift({key:yo}),l[yo]=!0),o.reduce((function(t,e){return t[e]=!0,t}),l),Tw(Dw(a,l),t,0,null)},Ww=function(){function t(){var t=this;this.debug=!1,this.debugCallback=function(e,n){if(t.debug){var r=performance.now();n();var i=performance.now();console.log(e,"".concat(i-r," ms"))}else n()},this.logger=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.debug&&console.log.apply(console,xa([e],wa(n),!1))}}return t.getInstance=function(){return t.instance||(t.instance=new t),t.instance},t.prototype.setDebug=function(t){this.debug=t},t}(),Gw=Object.freeze({__proto__:null,ArrowDown:'\n<svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<g id="\u9875\u9762-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" font-family="Roboto, PingFangSC, BlinkMacSystemFont, Microsoft YaHei, Arial, sans-serif" font-size="12" font-weight="bold">\n <text id="\u2193" fill="#29A294">\n <tspan x="-0.225097656" y="8.5">\u2193</tspan>\n </text>\n</g>\n</svg>',ArrowUp:'<svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<g id="\u9875\u9762-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" font-family="Roboto, PingFangSC, BlinkMacSystemFont, Microsoft YaHei, Arial, sans-serif" font-size="12" font-weight="bold">\n <text id="\u2191" fill="#FF4D4F">\n <tspan x="-0.225097656" y="8.5">\u2191</tspan>\n </text>\n</g>\n</svg>\n',CellDown:'<?xml version="1.0" encoding="UTF-8"?>\n<svg width="7px" height="9px" viewBox="0 0 7 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n \x3c!-- Generator: Sketch 58 (84663) - https://sketch.com --\x3e\n <title>down</title>\n <desc>Created with Sketch.</desc>\n <g id="\u4e00\u671f\u5f00\u53d1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <polygon id="down" fill="#58AE57" transform="translate(3.500000, 4.500000) scale(1, -1) translate(-3.500000, -4.500000) " points="3.5 0 7 9 0 9"></polygon>\n </g>\n</svg>',CellUp:'<?xml version="1.0" encoding="UTF-8"?>\n<svg width="7px" height="9px" viewBox="0 0 7 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n \x3c!-- Generator: Sketch 58 (84663) - https://sketch.com --\x3e\n <title>up</title>\n <desc>Created with Sketch.</desc>\n <g id="\u4e00\u671f\u5f00\u53d1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <polygon id="up" fill="#F46649" points="3.5 0 7 9 0 9"></polygon>\n </g>\n</svg> ',GlobalAsc:'<svg t="1557124621626" class="icon" style="" viewBox="0 0 1024 1024" version="1.1"\nxmlns="http://www.w3.org/2000/svg" p-id="17452"\nxmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n<defs>\n <style type="text/css"></style>\n</defs>\n<path d="M182.272 167.04a8 8 0 0 0-12.544 0L57.728 309.056A8 8 0 0 0 64 321.984h76.032v530.048c0 4.352 3.584 7.936 7.936 7.936h56.064a8 8 0 0 0 7.936-7.936V321.92H288a8 8 0 0 0 6.272-12.992l-112-141.888z m209.728 626.944h176c4.416 0 8 3.584 8 8v56a8 8 0 0 1-8 8h-176A8 8 0 0 1 384 857.984v-56c0-4.416 3.584-8 8-8z m0-424h368c4.416 0 8 3.648 8 8v56a8 8 0 0 1-8 8h-368A8 8 0 0 1 384 433.984v-56c0-4.352 3.584-8 8-8z m528-139.968h-528A8 8 0 0 1 384 222.016v-56c0-4.416 3.584-8 8-8h528c4.416 0 8 3.584 8 8v56a8 8 0 0 1-8 8z m-256 424h-272A8 8 0 0 1 384 646.016v-56c0-4.416 3.584-8 8-8h272c4.416 0 8 3.584 8 8v56a8 8 0 0 1-8 8z" p-id="17453"></path>\n</svg>',GlobalDesc:'<svg t="1557124685600" class="icon" style="" viewBox="0 0 1024 1024" version="1.1"\n xmlns="http://www.w3.org/2000/svg" p-id="17561"\n xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path d="M182.272 856.96a8 8 0 0 1-12.544 0l-112-141.952A8 8 0 0 1 64 702.08h76.032V172.032c0-4.416 3.584-8 7.936-8h56.064c4.352 0 7.936 3.584 7.936 8v529.984H288c6.72 0 10.496 7.808 6.272 12.992l-112 141.888z m209.728-626.944h176A8 8 0 0 0 576 222.016v-56a8 8 0 0 0-8-8h-176A8 8 0 0 0 384 166.016v56c0 4.416 3.584 8 8 8z m0 424h368a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8h-368A8 8 0 0 0 384 590.016v56c0 4.416 3.584 8 8 8z m528 139.968h-528a8 8 0 0 0-8 8v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z m-256-424h-272A8 8 0 0 0 384 377.984v56c0 4.416 3.584 8 8 8h272a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z" p-id="17562"></path>\n</svg>',GroupAsc:'<svg t="1557124695786" class="icon" style="" viewBox="0 0 1024 1024" version="1.1"\n xmlns="http://www.w3.org/2000/svg" p-id="17670"\n xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path d="M182.272 167.04a8 8 0 0 0-12.544 0L57.728 309.056A8 8 0 0 0 64 321.984h76.032v530.048c0 4.352 3.584 7.936 7.936 7.936h56.064a8 8 0 0 0 7.936-7.936V321.92H288a8 8 0 0 0 6.272-12.992l-112-141.888z m209.728 62.976h304A8 8 0 0 0 704 222.016v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 166.016v56c0 4.416 3.584 8 8 8z m0 424h304a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 590.016v56c0 4.416 3.584 8 8 8z m528 139.968h-528a8 8 0 0 0-8 8v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z m0-424h-528A8 8 0 0 0 384 377.984v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z" p-id="17671"></path>\n</svg>',GroupDesc:'<svg t="1557124710652" class="icon" style="" viewBox="0 0 1024 1024" version="1.1"\n xmlns="http://www.w3.org/2000/svg" p-id="17779"\n xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path d="M182.272 856.96a8 8 0 0 1-12.544 0l-112-141.952A8 8 0 0 1 64 702.08h76.032V172.032c0-4.416 3.584-8 7.936-8h56.064c4.352 0 7.936 3.584 7.936 8v529.984H288c6.72 0 10.496 7.808 6.272 12.992l-112 141.888z m209.728-626.944h304A8 8 0 0 0 704 222.016v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 166.016v56c0 4.416 3.584 8 8 8z m0 424h304a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 590.016v56c0 4.416 3.584 8 8 8z m528 139.968h-528a8 8 0 0 0-8 8v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z m0-424h-528A8 8 0 0 0 384 377.984v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z" p-id="17780"></path>\n</svg>',GroupNone:'<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<g id="\u8bbe\u8ba1\u8f93\u51fa" stroke="none" stroke-width="1" fill-opacity="0.25" fill-rule="evenodd">\n <g id="\u8bbe\u8ba1\u8f93\u51fa-\u79fb\u52a8\u7aef\u6307\u6807\u8be6\u60c5\u9875-\u9605\u8bfb\u7aef" transform="translate(-3275.000000, -724.000000)" fill-rule="nonzero">\n <g id="\u7f16\u7ec4-39" transform="translate(3064.500000, 667.000000)">\n <g id="\u7f16\u7ec4-36" transform="translate(80.500000, 44.000000)">\n <g id="\u4e0d\u6392\u5e8f" transform="translate(130.000000, 13.000000)">\n <path d="M12.0009375,12.40625 C12.0696875,12.40625 12.1259375,12.4625 12.1259375,12.53125 L12.1259375,12.53125 L12.1259375,13.40625 C12.1259375,13.475 12.0696875,13.53125 12.0009375,13.53125 L12.0009375,13.53125 L6.25093747,13.53125 C6.18218747,13.53125 6.12593747,13.475 6.12593747,13.40625 L6.12593747,13.40625 L6.12593747,12.53125 C6.12593747,12.4625 6.18218747,12.40625 6.25093747,12.40625 L6.25093747,12.40625 Z M2.93949997,2.5801875 L2.97437497,2.6109375 L4.72437497,4.828125 C4.78062497,4.89776786 4.74503823,4.99725765 4.66779698,5.02426203 L4.62593747,5.03125 L3.438,5.03089062 L3.43843747,10.9691406 L4.62593747,10.9691406 C4.73062497,10.9691406 4.78999997,11.0910156 4.72437497,11.1722656 L2.97437497,13.3894531 C2.92437497,13.4535156 2.82749997,13.4535156 2.77749997,13.3894531 L1.02749997,11.1722656 C0.961874969,11.0894531 1.02124997,10.9691406 1.12593747,10.9691406 L2.31343747,10.9691406 L2.313,5.03089062 L1.12593747,5.03125 C1.03620533,5.03125 0.979764,4.94285714 1.00679571,4.8654519 L1.02749997,4.828125 L2.77749997,2.6109375 C2.81749997,2.5596875 2.88749997,2.5494375 2.93949997,2.5801875 Z M10.5009375,9.09375 C10.5696875,9.09375 10.6259375,9.15 10.6259375,9.21875 L10.6259375,9.21875 L10.6259375,10.09375 C10.
26259375,10.1625 10.5696875,10.21875 10.5009375,10.21875 L10.5009375,10.21875 L6.25093747,10.21875 C6.18218747,10.21875 6.12593747,10.1625 6.12593747,10.09375 L6.12593747,10.09375 L6.12593747,9.21875 C6.12593747,9.15 6.18218747,9.09375 6.25093747,9.09375 L6.25093747,9.09375 Z M14.5009375,5.78125 C14.5696875,5.78125 14.6259375,5.8375 14.6259375,5.90625 L14.6259375,5.90625 L14.6259375,6.78125 C14.6259375,6.85 14.5696875,6.90625 14.5009375,6.90625 L14.5009375,6.90625 L6.25093747,6.90625 C6.18218747,6.90625 6.12593747,6.85 6.12593747,6.78125 L6.12593747,6.78125 L6.12593747,5.90625 C6.12593747,5.8375 6.18218747,5.78125 6.25093747,5.78125 L6.25093747,5.78125 Z M9.00093747,2.46875 C9.06968747,2.46875 9.12593747,2.525 9.12593747,2.59375 L9.12593747,2.59375 L9.12593747,3.46875 C9.12593747,3.5375 9.06968747,3.59375 9.00093747,3.59375 L9.00093747,3.59375 L6.25093747,3.59375 C6.18218747,3.59375 6.12593747,3.5375 6.12593747,3.46875 L6.12593747,3.46875 L6.12593747,2.59375 C6.12593747,2.525 6.18218747,2.46875 6.25093747,2.46875 L6.25093747,2.46875 Z" id="\u5f62\u72b6\u7ed3\u5408"></path>\n </g>\n </g>\n </g>\n </g>q\n</g>\n</svg>',Minus:'<svg t="1557140120188" class="icon" style="" viewBox="0 0 1024 1024" version="1.1"\nxmlns="http://www.w3.org/2000/svg" p-id="16909" xmlns:xlink="http://www.w3.org/1999/xlink"\nwidth="200" height="200">\n\t<defs>\n\t\t<style type="text/css">\n\t\t</style>\n\t</defs>\n\t<path d="M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"\n\tp-id="16910">\n\t</path>\n\t<path d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32z m-40 728H184V184h656v656z"\n\tp-id="16911">\n\t</path>\n</svg>',Plus:'<svg t="1557140186692" class="icon" style="" viewBox="0 0 1024 1024" version="1.1"\nxmlns="http://www.w3.org/2000/svg" p-id="17025" xmlns:xlink="http://www.w3.org/1999/xlink"\nwidth="200" height="200">\n\t<defs>\n\t\t<style type="text/css">\n\t\t</style>\n\t</defs>\n\t<path d="M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"\n\tp-id="17026">\n\t</path>\n\t<path d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32z m-40 728H184V184h656v656z"\n\tp-id="17027">\n\t</path>\n</svg>',SortDown:'<svg t="1565940955886" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"\n p-id="17472" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path\n fill-opacity="0.45"\n d="M948 392.992l-403.008 488.99200001Q532 896 512.992 896t-32-14.016L76 392.992q-18.016-20.992-7.008-46.016T108 321.98400001L916 321.98400001q28 0 39.008 24.99199999T948 392.992z"\n p-id="17473" data-spm-anchor-id="a313x.7781069.0.i2" class="selected"></path>\n</svg>\n',SortUp:'<svg t="1565940979768" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"\n p-id="17620" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path\n fill-opacity="0.45"\n d="M76 631.008l403.008-488.99200001Q492 128 511.008 128t32 14.016L948 631.008q18.016 20.992 7.008 46.016T916 702.01599999L108 702.01599999q-28 0-39.008-24.99199999T76 631.008z"\n p-id="17621"></path>\n</svg>\n',SortDownSelected:'<svg t="1565940955886" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"\n p-id="17472" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n <defs>\n <style type="text/css"></style>\n </defs>\n <path\n d="M948 392.992l-403.008 488.99200001Q532 896 512.992 896t-32-14.016L76 392.992q-18.016-20.992-7.008-46.016T108 321.98400001L916 321.98400001q28 0 39.008 24.99199999T948 392.992z"\n p-id="17473" data-spm-anchor-id="a313x.7781069.0.i2" class="selected"></path>\n</svg>
2\n',SortUpSelected:'<svg t="1565940979768" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"\np-id="17620" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n<defs>\n<style type="text/css"></style>\n</defs>\n<path\nd="M76 631.008l403.008-488.99200001Q492 128 511.008 128t32 14.016L948 631.008q18.016 20.992 7.008 46.016T916 702.01599999L108 702.01599999q-28 0-39.008-24.99199999T76 631.008z"\np-id="17621"></path>\n</svg>\n',InfoCircle:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1590389330617" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19656" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 64c-247.4 0-448 200.6-448 448s200.6 448 448 448 448-200.6 448-448-200.6-448-448-448z m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" fill="" p-id="19657"></path><path d="M464 336c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48zM536 448h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-272c0-4.4-3.6-8-8-8z" fill="" p-id="19658"></path></svg>',ExpandColIcon:'<?xml version="1.0" encoding="UTF-8"?>\n<svg width="23px" height="12px" viewBox="0 0 23 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>\u7f16\u7ec4 8\u5907\u4efd 3</title>\n <g id="----\u9690\u85cf\u5217\u6807\u6ce8\uff01" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="\u9690\u85cf\u5217\u6807\u6ce8" transform="translate(-275.000000, -824.000000)">\n <rect fill="#FFFFFF" x="0" y="0" width="1333" height="1167"></rect>\n <g id="\u7f16\u7ec4-8\u5907\u4efd-3" transform="translate(275.000000, 824.000000)">\n <rect id="\u77e9\u5f62" stroke-opacity="0.25" stroke="#000000" fill="#F7F7F7" x="0.5" y="0.5" width="11" height="11"></rect>\n <rect id="\u77e9\u5f62\u5907\u4efd-9" stroke-opacity="0.25" stroke="#000000" fill="#F7F7F7" x="11.5" y="0.5" width="11" height="11"></rect>\n <g id="7.Icon/arrow/15.down/fill" transform="translate(6.000000, 6.000000) rotate(90.000000) translate(-6.000000, -6.000000) " fill="#000000" fill-rule="nonzero" opacity="0.65">\n <path d="M7.25020811,6.37218077 L4.91348936,8.20968077 C4.82677061,8.27764952 4.69903624,8.21671202 4.69903624,8.10655577 L4.69903624,4.43272764 C4.69903624,4.32257139 4.82677061,4.26046202 4.91348936,4.32960264 L7.25020811,6.16593077 C7.31700499,6.21866514 7.31700499,6.31944639 7.25020811,6.37218077 Z" id="fill" transform="translate(5.999671, 6.269385) rotate(90.000000) translate(-5.999671, -6.269385) "></path>\n </g>\n <g id="7.Icon/arrow/15.down/fill" transform="translate(17.000000, 6.000000) rotate(270.000000) translate(-17.000000, -6.000000) translate(11.000000, 0.000000)" fill="#000000" fill-rule="nonzero" opacity="0.65">\n <path d="M7.25020811,6.37218077 L4.91348936,8.20968077 C4.82677061,8.27764952 4.69903624,8.21671202 4.69903624,8.10655577 L4.69903624,4.43272764 C4.69903624,4.32257139 4.82677061,4.26046202 4.91348936,4.32960264 L7.25020811,6.16593077 C7.31700499,6.21866514 7.31700499,6.31944639 7.25020811,6.37218077 Z" id="fill" transform="translate(5.999671, 6.269385) rotate(90.000000) translate(-5.999671, -6.269385) "></path>\n </g>\n </g>\n <line x1="286.5" y1="813" x2="286.5" y2="864.5" id="\u8def\u5f84-2\u5907\u4efd-3" stroke="#000000" opacity="0.25"></line>\n </g>\n </g>\n</svg>',Trend:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1596433821690" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20229" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4
20 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6c-3.1-3.1-8.2-3.1-11.3 0l-230 229.9L461.4 404c-3.1-3.1-8.2-3.1-11.3 0L266.3 586.7c-3.1 3.1-3.1 8.2 0 11.3l39.5 39.7z" p-id="20230"></path></svg>',DrillDownIcon:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1608030723688" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21482" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M547.648 696a32 32 0 0 1 31.488 26.24l0.512 5.76v151.68l145.216-144.512a32 32 0 0 1 40.832-3.648l4.416 3.712a32 32 0 0 1 3.584 40.832l-3.712 4.48-203.072 202.24a32 32 0 0 1-40.768 3.648l-4.416-3.712-202.24-202.24a32 32 0 0 1 40.832-48.96l4.416 3.712 150.912 150.912v-158.144a32 32 0 0 1 32-32z m194.56-529.28l4.928 3.072 233.792 180.224a32 32 0 0 1 1.728 49.28l-4.864 3.52-409.792 245.568a32 32 0 0 1-27.328 2.624l-5.184-2.432-422.4-245.568a32 32 0 0 1-7.552-49.28l4.544-4.032 242.816-180.288a32 32 0 0 1 42.432 47.552l-4.288 3.84-203.84 151.296 364.16 211.648 353.28-211.712-196.608-151.552a32 32 0 0 1-8.896-40l3.136-4.864a32 32 0 0 1 40-8.96zM547.712 28.672a32 32 0 0 1 31.488 26.24l0.512 5.76v396.992a32 32 0 0 1-63.488 5.76l-0.512-5.76V60.736a32 32 0 0 1 32-32z" p-id="21483" fill="currentColor"></path></svg>\n',EyeOutlined:'<svg viewBox="64 64 896 896" focusable="false" data-icon="eye" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"></path></svg>'}),jw={},Uw=function(t,e){jw[Kv(t)]=e},Vw=function(t){return jw[Kv(t)]};uu(Gw).forEach((function(t){Uw(t,Gw[t])}));var Yw,Xw,qw,Kw="<svg",Zw={},$w=function(t){function e(e){var n=t.call(this,e)||this;return n.hasSupportSuffix=function(t){return[".png",".jpg",".gif",".svg"].some((function(e){return null===t||void 0===t?void 0:t.endsWith(e)}))},n.render(),n}return ga(e,t),e.prototype.getImage=function(t,e,n){var r=this;return new Promise((function(i,o){var a=new Image;a.onload=function(){Zw[e]=a,i(a)},a.onerror=function(t){o(t)};var l=Vw(t);l&&(l.includes("data:image/svg+xml")||r.hasSupportSuffix(l))?a.src=l:l&&(n&&(l=(l=l.replace(/fill=[\'\"]#?\w+[\'\"]/g,"")).replace(/fill>/g,">")),l=l.replace(Kw,"".concat(Kw,' fill="').concat(n,'"')),a.src="data:image/svg+xml;utf-8,".concat(encodeURIComponent(l)))}))},e.prototype.render=function(){var t=this,n=this.cfg,r=n.name,i=n.fill,o=Sd(this.cfg),a=ya(ya({},Sg(o,"fill")),{type:e.type}),l=new Ai({attrs:a}),s="".concat(r,"-").concat(i),u=Zw[s];u?(l.attr("img",u),this.addShape("image",l)):this.getImage(r,s,i).then((function(e){t.destroyed||(l.attr("img",e),t.addShape("image",l))})).catch((function(t){console.warn("GuiIcon ".concat(r," load error"),t)})),this.iconImageShape=l},e.type="__GUI_ICON__",e}(bi);!function(t){t.TOP="TOP",t.BOTTOM="BOTTOM",t.LEFT="LEFT",t.RIGHT="RIGHT"}(Yw||(Yw={})),function(t){t.SUM="SUM",t.MIN="MIN",t.MAX="MAX",t.AVG="AVG"}(Xw||(Xw={})),function(t){t.Row="row",t.Col="col",t.Series="series"}(qw||(qw={}));var Qw=function(){function t(){this.store=new Map}return t.prototype.set=function(t,e){return this.store.set(t,e)},t.prototype.get=function(t,e){var n;return null!==(n=this.store.get(t))&&void 0!==n?n:e},t.prototype.clear=function(){this.store.clear()},t.prototype.size=function(){return this.store.size},t}(),Jw=function(t,e,n){return t.sort((function(t,r){n&&(t=n(t),r=n(r));var i=e.indexOf(t),o=e.indexOf(r);return-1===i&&-1===o?0:-1===i?1:-1===o?-1:i-o}))},tx=function(t){return yp(t,(function(t){return!Hv(t)&&"undefined"!==t}))},ex=function t(e){var n;return null===(n=uu(e))||void 0===n?void 0:n.reduce((function(n,r){var i=Uu(e,r);return Array.isArray(i)?n=n.concat(t(i)):null===n||void 0===n||n.push(i),n}),[])},nx=function(t){var e=[];
2if(Array.isArray(t))for(var n=("undefined"in t),r=t.length+(n?1:0),i=0,o=function(){var n=i===t.length?t[void 0]:t[i];i++,n&&"undefined"in n?uu(n).forEach((function(t){e.push(n[t])})):Array.isArray(n)?e.push.apply(e,xa([],wa(n),!1)):e.push(n)};i<r;)o();else e.push(t);return e},rx=function(t,e){var n=[];return null===t||void 0===t||t.forEach((function(t,r){void 0===t&&e[r]&&n.push(e[r])})),n},ix=function(t,e){return!pp(t,(function(t){return e[t]}))};function ox(t,e){var n=e.rows,r=e.columns;return Py(t,(function(t,e){return ix([].concat(n).concat(r),e)&&t.push(e),t}),[])}"KMBTP".split("");var ax=function(t){return Number.parseFloat((Qa(t)||0).toPrecision(16))},lx=function(t,e,n){if(void 0===n&&(n=0),!Object.values(t).find((function(t){return t>0})))return t;var r=ya({},t);r.frozenColCount>=e&&(r.frozenColCount=e);var i=e-r.frozenColCount;r.frozenTrailingColCount>i&&(r.frozenTrailingColCount=i),r.frozenRowCount>=n&&(r.frozenRowCount=n);var o=n-r.frozenRowCount;return r.frozenTrailingRowCount>o&&(r.frozenTrailingRowCount=o),r};function sx(t,e,n){var r;return null===(r=null===t||void 0===t?void 0:t.addShape)||void 0===r?void 0:r.call(t,"rect",ya({zIndex:1,attrs:e},n||{}))}function ux(t,e){var n;return null===(n=null===t||void 0===t?void 0:t.addShape)||void 0===n?void 0:n.call(t,"circle",{attrs:e})}function cx(t,e,n,r,i,o,a){var l;return!Iv(e)&&t&&Zf(e,(function(e){t.contain(e)&&t.removeChild(e,!0)})),null===(l=null===t||void 0===t?void 0:t.addShape)||void 0===l?void 0:l.call(t,"text",{attrs:ya(ya({x:n,y:r,text:i},o),a)})}function hx(t,e,n){var r;return null===(r=null===t||void 0===t?void 0:t.addShape)||void 0===r?void 0:r.call(t,"line",{zIndex:100,attrs:ya(ya({},e),n)})}function dx(t,e,n){Iv(t)||(Pa(t)?t:[t]).forEach((function(t){qy(t,"attrs.".concat(e),n)}))}function fx(t,e){var n=new $w(e);return null===t||void 0===t||t.add(n),n}function px(t,e,n,r,i){var o=new $w(ya(ya({name:r?"Plus":"Minus"},e),{fill:n}));return rl(i)&&o.on("click",i),null===t||void 0===t||t.add(o),o}var vx="s2-offscreen-canvas",gx=function(t){var e;return null!==(e=null===t||void 0===t?void 0:t.position)&&void 0!==e?e:"right"},yx=function(t,e){var n,r,i,o=t.data,a=t.encode,l=t.type,s=e.getMeta(),u=s.x,c=s.y,h=s.height,d=s.width,f=e.getStyle($o.DATA_CELL),p=f.cell,v=f.miniChart,g=[],y=Ip(o,(function(t){return g.push(null===t||void 0===t?void 0:t[a.y]),{x:t[a.x],y:t[a.y]}})),m=rg(g),C=fg(g),w=m-C,x=u+p.padding.left,b=u+d-p.padding.right,S=c+p.padding.top,_=c+h-p.padding.bottom,E=_-S,L=l===ho.Bar?(b-x-(g.length-1)*(null===(n=null===v||void 0===v?void 0:v.bar)||void 0===n?void 0:n.intervalPadding))/g.length+(null===(r=null===v||void 0===v?void 0:v.bar)||void 0===r?void 0:r.intervalPadding):null!==(i=(b-x)/(g.length-1))&&void 0!==i?i:0,T=[],O=Ip(y,(function(t,e){var n,r,i=x+e*L;if(r=0!==w?_-((null===t||void 0===t?void 0:t.y)-C)/w*E:C>0?S:_,l===ho.Bar){var o=void 0,a=void 0;C<0&&m>0&&0!==w?(o=_-(0-C)/w*E,a=Math.abs(r-o),(null===t||void 0===t?void 0:t.y)<0&&(r=o)):(o=C<0?S:_,a=0===(w=rg([Math.abs(m),Math.abs(C)]))?E:Math.abs((null===t||void 0===t?void 0:t.y)-0)/w*E,r=o);var s=L-(null===(n=null===v||void 0===v?void 0:v.bar)||void 0===n?void 0:n.intervalPadding);T.push([s,a])}return[i,r]}));return{points:O,box:T}},mx=function(t,e,n){var r=Number(e)-Number(t);return Number.isNaN(r)||Number(t)<0?n.bad:r<=.1?n.good:r>.1&&r<=.2?n.satisfactory:n.bad},Cx=function(t){var e,n,r,i,o,a;if(!Iv(t)){var l=t.getCellArea(),s=l.x,u=l.y,c=l.height,h=l.width,d=t.findFieldCondition(null===(e=t.cellConditions)||void 0===e?void 0:e.interval);if(d&&d.mapping){var f=t.mappingValue(d);if(!f)return;var p=f.isCompare?f:t.valueRangeByField,v=ax(p.minValue),g=ax(p.maxValue),y=Dv(null===f||void 0===f?void 0:f.fieldValue)?ax(t.getMeta().fieldValue):ax(null===f||void 0===f?void 0:f.fieldValue);if(y<v||y>g)return;var m=null!==(r=null===(n=t.getStyle().miniChart.interval)||void 0===n?void 0:n.height)&&void 0!==r?r:t.getStyle().cell.miniBarChartHeight,C=null!==(o=null===(i=t.getStyle().miniChart.interval)||void 0===i?void 0:i.fill)&&void 0!==o?o:t.getStyle().cell.miniBarChartFillColor,w=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),t=ax(t),e=ax(e);var n=t>=0,r=e>=0&&t<=0,i=r?0:n?t:e,o=e-t;return function(e){var a=n?0:1;return{zeroScale:r?Eh(Math.abs(0-t)/o,0,1):a,scale:Eh((e-i)/o,-1,1)}}}(v,g),x=w(y);return sx(t,{x:s+h*x.zeroScale,y:u+c/2-m/2,width:h*x.scale,height:m,fill:null!==(a=f.fill)&&void 0!==a?a:C})}}},wx=function(t,e){var n,r=e.getStyle($o.DATA_CELL),i=e.getMeta(),o=i.x,a=i.y,l=i.height,s=i.width,u=i.spreadsheet;if(Iv(t))cx(e,[],o+s-r.cell.padding.right,a+l/2,Bx(e,u.options.placeholder),r.text);else{var c=r.miniChart.bullet,h=c.progressBar,d=c.comparativeMeasure,f=c.rangeColors,p=c.backgroundColor,v=t.measure,g=t.target,y=Math.max(Number(v),0),m=Math.max(Number(g),0),C=function(t,e){var n,r;void 0===e&&(e={min:0,max:0});var i=Number(t);if(Number.isNaN(i))return t;var o=null!==(n=null===e||void 0===e?void 0:e.min)&&void 0!==n?n:e,a=null!==(r=null===e||void 0===e?void 0:e.max)&&void 0!==r?r:e;return new Intl.NumberFormat("en-US",{minimumFractionDigits:o,maximumFractionDigits:a,useGrouping:!1,style:"percent"}).format(i)}(v,2),w=(null===h||void 0===h?void 0:h.widthPercent)>1?(null===h||void 0===h?void 0:h.widthPercent)/100:null===h||void 0===h?void 0:h.widthPercent,x=r.cell.padding,b=s-x.left-x.right,S=w*b,_=b-S,E=o+s-x.right-S,L=a+l/2-h.height/2;sx(e,{x:E,y:L,width:S,height:h.height,fill:p,textBaseline:r.text.textBaseline});var T=Uu(e.getMeta(),"spreadsheet.options.bullet.getRangeColor"),O=Math.max(Math.min(S*y,S),0);sx(e,{x:E,y:L+(h.height-h.innerHeight)/2,width:O,height:h.innerHeight,fill:null!==(n=null===T||void 0===T?void 0:T(y,m))&&void 0!==n?n:mx(y,m,f)});var I=E+S*m;hx(e,{x1:I,y1:a+(l-d.height)/2,x2:I,y2:a+(l-d.height)/2+d.height},{stroke:(null===d||void 0===d?void 0:d.fill)||(null===d||void 0===d?void 0:d.color),lineWidth:d.width,opacity:null===d||void 0===d?void 0:d.opacity}),cx(e,[],E-x.right,a+l/2,Ix({measureTextWidth:u.measureTextWidth,text:C,maxWidth:_-x.right,fontParam:r.text}),r.text)}},xx=function(t,e){switch(null===e||void 0===e?void 0:e.type){case ho.Line:!function(t,e){if(!Iv(null===t||void 0===t?void 0:t.data)&&!Iv(e)){var n=e.getStyle($o.DATA_CELL).miniChart.line,r=n.point,i=n.linkLine,o=yx(t,e).points;!function(t,e){var n;null===(n=null===t||void 0===t?void 0:t.addShape)||void 0===n||n.call(t,"polyline",{attrs:e})}(e,{points:o,stroke:i.fill,lineWidth:i.size,opacity:i.opacity});for(var a=0;a<o.length;a++)ux(e,{x:o[a][0],y:o[a][1],r:r.size,fill:r.fill,fillOpacity:r.opacity})}}(e,t);break;case ho.Bar:!function(t,e){if(!Iv(null===t||void 0===t?void 0:t.data)&&!Iv(e))for(var n=e.getStyle($o.DATA_CELL).miniChart.bar,r=yx(t,e),i=r.points,o=r.box,a=0;a<i.length;a++)sx(e,{x:i[a][0],y:i[a][1],width:o[a][0],height:o[a][1],fill:n.fill,fillOpacity:n.opacity})}(e,t);break;default:wx(e,t)}},bx=function(t,e){var n=t.x,r=t.y,i=t.width,o=t.height,a=i-(null===e||void 0===e?void 0:e.left)-(null===e||void 0===e?void 0:e.right),l=o-(null===e||void 0===e?void 0:e.top)-(null===e||void 0===e?void 0:e.bottom);return{x:n+(null===e||void 0===e?void 0:e.left),y:r+(null===e||void 0===e?void 0:e.top),width:a,height:l}},Sx=function(t){return sg({size:0,position:"right",margin:{left:0,right:0}},t)},_x=function(t,e){return t-(e=Sx(e)).size-e.margin.right-e.margin.left},Ex=function(t,e,n){var r=t.y,i=t.height;void 0===n&&(n=0);var o=0;switch(e){case"top":o=r;break;case"middle":o=r+i/2-n/2;break;default:o=r+i-n}return o},Lx=function(t,e,n,r,i){void 0===n&&(n=0),void 0===i&&(i=1);var o,a,l=t.x,s=t.width,u=e.textAlign,c=e.textBaseline,h=Sx(r),d=h.size,f=h.margin,p=h.position,v=i*(d+f.left)+(i?f.right:0);switch(u){case"left":o=l+("left"===p?v:0),a=l+("left"===p?f.left:n+f.left);break;case"center":var g=l+s/2-(v-("left"===p?f.left:f.right)+n)/2;o=g+n/2+("left"===p?v-f.left:0),a=g+("left"===p?0:n+f.left);break;default:o=l+s-("right"===p?v:0),a=l+s-("right"===p?v-f.left:n+v-f.left)}return{text:{x:o,y:Ex(t,c,0)},icon:{x:a,y:Ex(t,c,d)}}},Tx=function(t,e,n){var r,i,o,a,l,s=e.x,u=e.y,c=e.width,h=e.height,d=n.horizontalBorderWidth,f=n.horizontalBorderColorOpacity,p=n.horizontalBorderColor,v=n.verticalBorderWidth,g=n.verticalBorderColor,y=n.verticalBorderColorOpacity;if(t===Yw.TOP||t===Yw.BOTTOM){var m=u;i=m=t===Yw.TOP?u+v/2:u+h-v/2,a=m,r=s,o=s+c,l={lineWidth:d,stroke:p,strokeOpacity:f}}
2if(t===Yw.LEFT||t===Yw.RIGHT){var C=s;r=C=t===Yw.LEFT?s+d/2:s+c-d/2,o=C,i=u,a=u+h,l={lineWidth:v,stroke:g,strokeOpacity:y}}return{position:{x1:r,x2:o,y1:i,y2:a},style:l}},Ox=(Nu((function(t,e){if(void 0===t&&(t=""),!e)return 0;var n=function(){var t=document.getElementById(vx);return t||((t=document.createElement("canvas")).id=vx,t.style.display="none",document.body.appendChild(t),t)}().getContext("2d"),r=e,i=r.fontSize,o=r.fontFamily,a=r.fontWeight,l=r.fontStyle,s=r.fontVariant;return n.font=[l,s,a,"".concat(i,"px"),o].join(" ").trim(),n.measureText("".concat(t)).width}),(function(t,e){return xa([t],wa($p(e)),!1).join("")})),function(t,e,n,r){var i,o=t(Go,r);i=Kp(e)?e:Hu(e);var a,l,s=n,u=[];if(t(e,r)<=n)return e;for(var c=!0;c;){if((l=t(a=i.substr(0,16),r))+o>s&&l>s){c=!1;break}if(u.push(a),s-=l,!(i=i.substr(16)))return u.join("")}for(var h=!0;h;){if((l=t(a=i.substr(0,1),r))+o>s){h=!1;break}if(u.push(a),s-=l,!(i=i.substr(1)))return u.join("")}return"".concat(u.join(""),"...")}),Ix=function(t){var e=t.measureTextWidth,n=t.text,r=t.maxWidth,i=t.fontParam,o=t.priorityParam,a=t.placeholder,l={},s=null!==a&&void 0!==a?a:Do,u=Dv(n)||""===n?s:"".concat(n),c=o;if(i&&Pa(i)?c=i:l=i||{},!c||!c.length)return Ox(e,u,r,l);var h=[],d=[u];c.forEach((function(t){d.forEach((function(e,n){var r=-1,i=e.match(new RegExp(t));if(i){var o=i[0];r=i.index,h.push(o);var a=r+o.length,l=[e.slice(0,r),e.slice(a)].filter((function(t){return!!t}));d.splice.apply(d,xa([n,1],wa(l),!1))}}))})),d=h.concat(d);var f=u,p=e(Go,l),v=r;return d.forEach((function(t){if(v<=0){var n=f.indexOf(t),r=f.slice(n-3,n);if(r&&r!==Go){var i=e(t,l);f=f.replace(t,i>p?Go:t)}else f=f.replace(t,"");v-=p}else{i=e(t,l);if(v<i&&i>p){var o=Ox(e,t,v,l);f=f.replace(t,o),v=0}else v-=i}})),f},Mx=function(t){return Bv(t)?t>=0:!!t&&!Fm(t).startsWith("-")},Rx=function(t,e,n,r){void 0===r&&(r="left");var i=e.right,o=e.left,a=n||0;return"left"===r?t+i/2+a:"right"===r?t-i/2-a:t+o/2+a},Ax=function(t){var e=t.rowIndex,n=t.colIndex,r=t.meta,i=t.data,o=t.textStyle,a=t.textCondition,l=o.fill;return(null===a||void 0===a?void 0:a.mapping)&&(l=null===a||void 0===a?void 0:a.mapping(i,{rowIndex:e,colIndex:n,meta:r}).fill),ya(ya({},o),{fill:l})},Bx=function(t,e){return rl(e)?e(t):e},kx=function(t,e,n){var r,i,o,a;void 0===n&&(n=!0);var l=t.getContentArea(),s=l.x,u=l.y,c=l.height,h=l.width,d=e||t.getMeta().fieldValue,f=d.values,p=t.getMeta().spreadsheet,v=p.options,g=p.measureTextWidth,y=v.style.cellCfg.valuesCfg,m=null===(i=null===(r=null===v||void 0===v?void 0:v.conditions)||void 0===r?void 0:r.text)||void 0===i?void 0:i[0],C=null===(a=null===(o=null===v||void 0===v?void 0:v.conditions)||void 0===o?void 0:o.icon)||void 0===a?void 0:a[0];if(Pa(f)){var w=null===y||void 0===y?void 0:y.widthPercent,x=0;if(null===d||void 0===d?void 0:d.label){var b=t.getStyle($o.DATA_CELL).bolderText,S=cx(t,[],s,u+(x=c/(f.length+1))/2,Ix({measureTextWidth:g,text:d.label,maxWidth:h,fontParam:b}),b);t.addTextShape(S)}for(var _,E=function(t){var e,n,r=t.getMeta().isTotals,i=null===(n=(e=t).isMeasureField)||void 0===n?void 0:n.call(e),o=t.getStyle(i?$o.COL_CELL:$o.DATA_CELL);return{cellStyle:o,textStyle:i?o.measureText:r?o.bolderText:o.text}}(t),L=E.cellStyle,T=E.textStyle,O=null===L||void 0===L?void 0:L.icon,I=C&&C.mapping&&{size:null===O||void 0===O?void 0:O.size,margin:null===O||void 0===O?void 0:O.margin,position:null===C||void 0===C?void 0:C.position},M=function(t,e,n){for(var r,i,o,a=t.x,l=t.y,s=t.width,u=t.height/$y(e),c=[],h=0,d=Ip(n,(function(t){return t>1?t/100:t})),f=0;f<$y(e);f++){i=l+u*f;var p=[];r=a,h=0;for(var v=0;v<$y(e[f]);v++)o=Iv(d)?s/$y(e[0]):s*d[v],r=Rx(a,{left:0,right:0},h,"left"),h+=o,p.push({x:r,y:i,width:o,height:u});c.push(p)}return c}({x:s,y:u+x,height:c-x,width:h},f,w),R=0;R<f.length;R++)for(var A=Sd(f[R]),B=0;B<A.length;B++){_=A[B];var k=n?Ax({rowIndex:R,colIndex:B,meta:null===t||void 0===t?void 0:t.getMeta(),data:_,textStyle:T,textCondition:m}):T,N=(null===t||void 0===t?void 0:t.getMeta().spreadsheet.options).placeholder,D=Bx(null===t||void 0===t?void 0:t.getMeta(),N),P=_x(M[R][B].width,O),z=Ix({measureTextWidth:g,text:_,maxWidth:P,fontParam:k,placeholder:D}),F=g(z,T),H=Lx(M[R][B],T,F,I,C?1:0);S=cx(t,[],H.text.x,H.text.y,z,k);if(t.addTextShape(S),C&&n){var W=null===C||void 0===C?void 0:C.mapping(_,{rowIndex:R,colIndex:B,meta:null===t||void 0===t?void 0:t.getMeta()});if(W){var G=fx(t,ya(ya({},H.icon),{name:W.icon,width:null===O||void 0===O?void 0:O.size,height:null===O||void 0===O?void 0:O.size,fill:W.fill}));t.addConditionIconShape(G)}}}}else xx(t,f)},Nx=function(t,e){return void 0===e&&(e=1),(null===t||void 0===t?void 0:t.width)*e},Dx=function(t){try{return JSON.parse(t)}catch(e){return null}};function Px(t,e){return!(!t||!e)&&String(t).toLowerCase()===String(e).toLowerCase()}var zx,Fx=function(t,e){var n=t.getColumnNodes().find((function(t){return t.id===e}));return t.isPivotMode()?null===n||void 0===n?void 0:n.value:null===n||void 0===n?void 0:n.field},Hx=function(t,e){var n=e.getColumnNodes().find((function(e){return e.colIndex===t})),r=Fx(e,n.id);return e.options.interaction.copyWithFormat?e.dataSet.getFieldFormatter(r):function(t){return t}},Wx=function(t,e,n){var r,i;if(n.isPivotMode()){var o=wa(function(t,e){var n=t.rowIndex,r=t.colIndex;return[e.getRowNodes().find((function(t){return t.rowIndex===n})),e.getColumnNodes().find((function(t){return t.colIndex===r}))]}(t,n),2),a=o[0],l=o[1],s=function(t){var e,n,r,i;return(null===(i=null===(r=null===(n=t.options)||void 0===n?void 0:n.style)||void 0===r?void 0:r.colCfg)||void 0===i?void 0:i.hideMeasureColumn)&&t.isValueInCols()?((e={})[po]=t.dataCfg.fields.values[0],e):{}}(n),u=n.dataSet.getCellData({query:ya(ya(ya({},a.query),l.query),s),rowNode:a,isTotals:a.isTotals||a.isTotalMeasure||l.isTotals||l.isTotalMeasure});return null!==(r=null===u||void 0===u?void 0:u[fo])&&void 0!==r?r:""}var c=function(t,e){var n=e.getColumnNodes().find((function(e){return e.colIndex===t}));return Fx(e,n.id)}(t.colIndex,n);return null===(i=e[t.rowIndex])||void 0===i?void 0:i[c]},Gx=function(t,e,n){return Hx(t.colIndex,n)(Wx(t,e,n))},jx=function(t){return/\n/.test(t)?'"'+t.replace(/\r\n?/g,"\n").replace(/"/g,"'")+'"':t},Ux=function(t,e){var n=t.split(No);return e?n.slice(n.length-e):(n.shift(),n)};function Vx(t,e){return void 0===e&&(e=zx.PLAIN),Array.isArray(e)?[].concat(t).filter((function(t){return e.includes(t.type)})).map((function(t){return t.content})):[].concat(t).filter((function(t){return(null===t||void 0===t?void 0:t.type)===e})).map((function(t){return t.content}))[0]||""}!function(t){t.PLAIN="text/plain",t.HTML="text/html"}(zx||(zx={}));var Yx=function(t){return{type:zx.PLAIN,content:Ip(t,(function(t){return t.join("\t")})).join("\r\n")}},Xx=function(t){return{type:zx.HTML,content:'<meta charset="utf-8"><table><tbody>'.concat((e=t,n="tr",e.map((function(t){return"<".concat(n,">").concat(function(t,e){return t.map((function(t){return"<".concat(e,">").concat(up(t),"</").concat(e,">")})).join("")}(t,"td"),"</").concat(n,">")})).join("")),"</tbody></table>")};var e,n},qx=function(t,e,n){var r,i,o,a,l,s,u=null!==(i=null===(r=t[0])||void 0===r?void 0:r.length)&&void 0!==i?i:0,c=null!==(o=null===e||void 0===e?void 0:e.length)&&void 0!==o?o:0,h=null!==(l=null===(a=n[0])||void 0===a?void 0:a.length)&&void 0!==l?l:0,d=null!==(s=n.length)&&void 0!==s?s:0,f=u+h,p=c+d,v=Array.from(Array(p),(function(){return new Array(f)}));return v=Ip(v,(function(r,i){return Ip(r,(function(r,o){return o>=0&&o<u&&i>=0&&i<c?"":o>=u&&o<=f&&i>=0&&i<c?e[i][o-u]:o>=0&&o<u&&i>=c&&i<p?t[i-c][o]:o>=u&&o<=f&&i>=c&&i<p?n[i-c][o-u]:void 0}))})),[Yx(v),Xx(v)]},Kx=function(t,e,n){return Ip(t,(function(t){return e.map((function(e){var r,i=n.dataSet.getCellData({query:ya(ya({},t.query),e.query),rowNode:t,isTotals:t.isTotals||t.isTotalMeasure||e.isTotals||e.isTotalMeasure});return Hx(e.colIndex,n)(null!==(r=null===i||void 0===i?void 0:i[fo])&&void 0!==r?r:"")}))}))};function Zx(t,e,n){return t.options.interaction.copyWithHeader?function(t,e,n){var r=Ip(e,(function(t){return Ux(t.id)})),i=yC.apply(void 0,xa([],wa(Ip(n,(function(t){return Ux(t.id)}))),!1)),o=Kx(e,n,t);return qx(r,i,o)}(t,e,n):function(t,e,n){var r=Kx(e,n,t);return[Yx(r),Xx(r)]}(t,e,n)}var $x=function(t,e,n){return e.isPivotMode()?function(t,e){var n=t.getRowNodes().filter((function(e){return e.isLeaf||t.isHierarchyTreeType()})),r=t.getColumnNodes().filter((function(t){return t.isLeaf})),i=e.length?e.reduce((function(t,e){return t.push.apply(t,xa([],wa(r.filter((function(t){return t.id.startsWith(e.id)}
2))),!1)),t}),[]):r;return Zx(t,n,i)}(e,n):function(t,e){var n=t.dataSet.getDisplayDataSet(),r=e.length?e.map((function(e){return{field:Fx(t,e.id),formatter:Hx(e.colIndex,t)}})):t.dataCfg.fields.columns.map((function(e){return t.getColumnNodes().find((function(t){return t.field===e}))})).map((function(e){return{field:Fx(t,e.id),formatter:Hx(e.colIndex,t)}})),i=n.map((function(t){return r.map((function(e){var n=e.field,r=e.formatter;return jx(r(t[n]))}))}));return[Yx(i),Xx(i)]}(e,n)},Qx=function(t,e,n){return e.isPivotMode()?function(t,e){var n=t.getRowNodes().filter((function(e){return e.isLeaf||t.isHierarchyTreeType()})),r=t.getColumnNodes().filter((function(t){return t.isLeaf})),i=e.reduce((function(t,e){return t.push.apply(t,xa([],wa(n.filter((function(t){return t.id.startsWith(e.id)}))),!1)),t}),[]);return Zx(t,i,r)}(e,n):function(t,e){var n=t.dataSet.getDisplayDataSet().filter((function(t,n){return e.map((function(t){return t.rowIndex})).includes(n)})).map((function(e){return Object.keys(e).map((function(e){return t.getColumnNodes().find((function(t){return t.field===e}))})).filter(Boolean).map((function(n){return jx(Hx(n.colIndex,t)(e[n.field]))}))}));return[Yx(n),Xx(n)]}(e,n)};function Jx(t){var e,n=function(t){var e=new Set;return Zf(t,(function(t){var n=t.getMeta().level;e.has(n)||e.add(n)})),e}(t),r=null!==(e=rg(Array.from(n)))&&void 0!==e?e:0,i=function(t,e){return yp(t,(function(t){var n=t.getMeta(),r=n.level===e,i=n.isTotals&&Iv(n.children);return r||i}))}(t,r),o=t[0].cellType===$o.COL_CELL,a=function(t,e,n){return Ip(t,(function(t){var r=t.getMeta(),i=r.id,o=r.label,a=r.isTotals,l=r.level,s=i;return a&&l!==e&&(s=i+No+Fy(o,e-l)),Ux(s,n.size)}))}(i,r,n);return o&&(a=yC.apply(void 0,xa([],wa(a),!1))),[Yx(a),Xx(a)]}var tb=function(t,e,n){return Ip(e,(function(e){var r;return null!==(r=t[e])&&void 0!==r?r:n}))};function eb(t,e){var n,r,i=e.filter((function(t){return t.type===$o.COL_CELL})),o=e.filter((function(t){return t.type===$o.ROW_CELL})),a=t.dataSet.getDisplayDataSet();if(t.interaction.getCurrentStateName()===Zo.ALL_SELECTED)r=$x(0,t,[]);else if(i.length)r=$x(0,t,i);else if(o.length)r=Qx(0,t,o);else{if(!e.length)return;var l=function(t){if(!(null===t||void 0===t?void 0:t.length))return[];var e=wa([{row:1/0,col:1/0},{row:0,col:0}],2),n=e[0],r=e[1];t.forEach((function(t){var e=t.rowIndex,i=t.colIndex;n.col=Math.min(i,n.col),n.row=Math.min(e,n.row),r.col=Math.max(i,r.col),r.row=Math.max(e,r.row)}));var i=wa([r.row-n.row+1,r.col-n.col+1],2),o=i[0],a=i[1],l=new Array(o).fill("").map((function(){return new Array(a).fill("")}));return t.forEach((function(t){var e=t.rowIndex,r=t.colIndex,i=wa([e-n.row,r-n.col],2),o=i[0],a=i[1];l[o][a]=t})),l}(e);if(t.interaction.getSelectedCellHighlight().rowCells){var s=Ig(e,"rowIndex","asc").map((function(e){return t.dataSet.getRowData(e)}));r=function(t,e){var n=t.options.placeholder,r=t.dataCfg.fields,i=r.rows,o=r.columns,a=r.values,l=Bx(t,n),s=t.getColumnLeafNodes(),u=[];if(t.isTableMode()){var c=yp(s,(function(t){return t.field!==yo}));u=Ip(e,(function(t){return Ip(c,(function(e){var n;return null!==(n=null===t||void 0===t?void 0:t[e.field])&&void 0!==n?n:l}))}))}else if(t.isPivotMode()){var h=xa(xa(xa([],wa(i),!1),wa(o),!1),wa(a),!1);u=Py(ex(e).filter((function(t){return xa(xa([],wa(i),!1),wa(o),!1).every((function(e){return!Dv(t[e])}))})),(function(t,e){return xa(xa([],wa(t),!1),[tb(e,h,l)],!1)}),[])}return Yx(u)}(t,s)}else r=(null===(n=t.options.interaction)||void 0===n?void 0:n.copyWithHeader)?function(t,e,n){var r=yC.apply(void 0,xa([],wa(Ip(t[0],(function(t){var e,n,r=null!==(n=null===(e=t.id.split(Do))||void 0===e?void 0:e[1])&&void 0!==n?n:"";return Ux(r)}))),!1)),i=Ip(t,(function(t){var e,n,r=null!==(n=null===(e=t[0].id.split(Do))||void 0===e?void 0:e[0])&&void 0!==n?n:"";return Ux(r)})),o=Ip(t,(function(t){return Ip(t,(function(t){return Gx(t,e,n)}))}));return qx(i,r,o)}(l,a,t):function(t,e,n){var r=e.map((function(e){return e.map((function(e){return jx(Gx(e,t,n))}))}));return[Yx(r),Xx(r)]}(a,l,t)}return r}function nb(t){return t?'"'.concat("string"===typeof t?t.replace(/"/g,'""'):t,'"'):t}var rb=function(t){return new Promise((function(e,n){var r;r=Array.isArray(t)?Uu(t.filter((function(t){return t.type===zx.PLAIN}
2)),"[0].content",""):t.content||"";var i=document.createElement("textarea");i.value=r,document.body.appendChild(i),i.focus({preventScroll:!0}),i.select();var o=document.execCommand("copy");document.body.removeChild(i),o?e():n()}))},ib=function(t,e){var n;return void 0===e&&(e=!1),n="string"===typeof t?{content:t,type:zx.PLAIN}:t,navigator.clipboard&&window.ClipboardItem&&!e?function(t){return navigator.clipboard.write([new ClipboardItem([].concat(t).reduce((function(t,e){var n,r=e.type,i=e.content;return ya(ya({},t),((n={})[r]=new Blob([i],{type:r}),n))}),{}))]).catch((function(){return rb(t)}))}(n):rb(n)},ob=function(t,e){try{var n=document.createElement("a");n.download="".concat(e,".csv");var r=new Blob(["\ufeff".concat(t)],{type:"text/csv;charset=utf-8"});n.href=URL.createObjectURL(r),n.click(),URL.revokeObjectURL(n.href)}catch(i){console.error(i)}},ab=function(t,e,n){if(!t)return"";var r=t.fieldValue,i=t.valueField,o=t.data;return Xa(r)?function(t){var e=(null===t||void 0===t?void 0:t.label)?[null===t||void 0===t?void 0:t.label]:[],n=null===t||void 0===t?void 0:t.values;return Iv(n)||Zf(n,(function(t){e.push(t.join(" "))})),e.join("$")}(r):n?e.dataSet.getFieldFormatter(i)(r,o):"".concat(r)},lb=function(t,e,n,r){var i=[];if(t){var o=t.fieldValue,a=t.valueField,l=t.data;if(Xa(o))return i=function(t,e){var n,r,i,o;return e?null===(o=null===t||void 0===t?void 0:t.values)||void 0===o?void 0:o[0]:null!==(r=null===(n=null===t||void 0===t?void 0:t.originalValues)||void 0===n?void 0:n[0])&&void 0!==r?r:null===(i=null===t||void 0===t?void 0:t.values)||void 0===i?void 0:i[0]}(o,r),i;if(Dv(o)&&n.length>1)return i.push.apply(i,xa([],wa(n),!1)),i;if(r){var s=e.dataSet.getFieldFormatter(a);i.push(s(o,l))}else i.push(o)}else i.push.apply(i,xa([],wa(n),!1));return i.join(" ")},sb=function(t){var e=Dx(t);return Pa(e)?e:t},ub=function(t,e,n){var r=sb(e.label),i=Pa(r)?r.length:1,o=n.options.placeholder,a=rl(o)?o(t):o;return Array(i).fill(a)},cb=function(t){var e,n,r,i,o=null===(r=null===(n=null===(e=t.spreadsheet)||void 0===e?void 0:e.dataSet)||void 0===n?void 0:n.getFieldFormatter)||void 0===r?void 0:r.call(n,t.field);return null!==(i=null===o||void 0===o?void 0:o(t.label))&&void 0!==i?i:t.label},hb=function(t){var e=[];return function t(n){if(n.id!==ko){var r=cb(n);return e.unshift(r),(null===n||void 0===n?void 0:n.parent)?t(n.parent):void 0}}(t),e},db=function(t,e,n){var r,i,o,a,l,s=function(t){var e,n;return"object"===typeof t?{isFormatHeader:null!==(e=t.isFormatHeader)&&void 0!==e&&e,isFormatData:null!==(n=t.isFormatData)&&void 0!==n&&n}:{isFormatHeader:null!==t&&void 0!==t&&t,isFormatData:null!==t&&void 0!==t&&t}}(n),u=s.isFormatHeader,c=s.isFormatData,h=null===(l=null===t||void 0===t?void 0:t.facet)||void 0===l?void 0:l.layoutResult,d=h.rowsHierarchy,f=h.rowLeafNodes,p=h.colLeafNodes,v=h.getCellMeta,g=d.maxLevel,y=t.dataCfg.fields.valueInCols,m=d.sampleNodesForAllLevels.map((function(e){return t.dataSet.getFieldName(e.key)})),C=f.reduce((function(t,e){var n,r=(null!==(n=e.level)&&void 0!==n?n:0)+1;return r>t?r:t}),0),w=[],x=0;if(t.isPivotMode()){var b=f.filter((function(t){return 0!==t.height}));try{for(var S=Ca(b),_=S.next();!_.done;_=S.next()){var E=_.value,L=[];if(u)L=hb(E);else E.label=Fm(null===E||void 0===E?void 0:E.label),L=E.id.replace(Po,"").split(No);var T=g+1-L.length;T>0&&L.push.apply(L,xa([],wa(new Array(T)),!1));var O=t.dataSet.getFieldName(Gf(L));L[L.length-1]=O;try{for(var I=(o=void 0,Ca(p)),M=I.next();!M.done;M=I.next()){var R=M.value;if(y){var A=v(E.rowIndex,R.colIndex);L.push(ab(A,t,c))}else{A=v(E.rowIndex,R.colIndex);var B=ub(A,R,t),k=lb(A,t,B,c);Pa(k)?L=L.concat.apply(L,xa([],wa(k),!1)):L.push(k)}}}catch(U){o={error:U}}finally{try{M&&!M.done&&(a=I.return)&&a.call(I)}finally{if(o)throw o.error}}x=rg([L.length,x]);var N=L.map((function(t){return nb(t)})).join(e);w.push(N)}}catch(V){r={error:V}}finally{try{_&&!_.done&&(i=S.return)&&i.call(S)}finally{if(r)throw r.error}}}else w=function(t,e,n){var r,i,o,a=t.dataSet.getDisplayDataSet(),l=(null===(o=t.dataCfg)||void 0===o?void 0:o.fields).columns,s=zw(l||[]),u=[],c=function(r,i){var o=[];o=n?s.map((function(e){return nb(t.dataSet.getFieldFormatter(e)(i[e],i))})):s.map((function(t){return nb(i[t])})),t.options.showSeriesNumber&&(o=[nb(r+1)].concat(o)),u.push(o.join(e))};try{for(var h=Ca(a.entries()),d=h.next();!d.done;d=h.next()){var f=wa(d.value,2);c(f[0],f[1])}}catch(p){r={error:p}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}return u}(t,e,c);var D=[];if(Iv(p)&&!t.isPivotMode())D=[m];else{var P=0,z=Sd(p).map((function(e){for(var n=e,r=[];void 0!==n.level;){var i=sb(n.label);Pa(i)?P=rg([P,$y(i)]):i=u&&t.isPivotMode()?cb(n):i,r.push(i),n=n.parent}return r}));P>1&&(z=function(t){return t.map((function(t){return t.map((function(e){return Pa(e)?e:Pa(t[0])?xa([e],wa(new Array(t[0].length-1)),!1):e}))}))}(z));for(var F=rg(z.map((function(t){return t.length}))),H=[],W=function(e){var n=z.map((function(t){return t.length<F?xa(xa([],wa(new Array(F-t.length)),!1),wa(t),!1):t})).map((function(t){return t[e]})).map((function(e){return t.dataSet.getFieldName(e)}));H.push(Zu(n))},G=F-1;G>=0;G-=1)W(G);D=H.map((function(e,n){var r,i;if(t.isPivotMode()){var o=t.facet.cornerHeader.cfg,a=o.columns,l=o.rows,s=o.data.filter((function(t){return t.cornerType===qw.Col}));if(n<H.length-1)return xa(xa(xa([],wa(Array(g).fill("")),!1),[(null===(i=s.find((function(t){return t.field===a[n]}
2)))||void 0===i?void 0:i.label)||""],!1),wa(e),!1);var u=l.slice(0,C);return u.length<C&&u.unshift.apply(u,xa([],wa(Array(C-u.length).fill("")),!1)),xa(xa([],wa(u.map((function(e){return t.dataSet.getFieldName(e)||""}))),!1),wa(e),!1)}return n<H.length?(r=Array(C).fill("")).concat.apply(r,xa([],wa(e),!1)):m.concat.apply(m,xa([],wa(e),!1))}))}var j=D.map((function(t){var n=x-t.length;return n>0&&t.unshift.apply(t,xa([],wa(new Array(n)),!1)),t.map((function(t){return nb(t)})).join(e)})).join("\r\n");return[j].concat(w).join("\r\n")},fb=function(t){var e,n,r,i,o,a,l=null===(r=null===(n=null===(e=t.target)||void 0===e?void 0:e.attrs)||void 0===n?void 0:n.appendInfo)||void 0===r?void 0:r.cellData,s=null===(o=(i=t.target).get)||void 0===o?void 0:o.call(i,"parent");return{target:s,viewMeta:(null===(a=null===s||void 0===s?void 0:s.getMeta)||void 0===a?void 0:a.call(s))||l,event:t}},pb=function(t,e,n){var r,i=t.split(No);if(n)r=[t];else{r=[Ew(i[0],i[1])];for(var o=2;o<i.length;o+=1)r.push(Ew(r[o-2],i[o]))}var a=yp(e,(function(t){var e;return r.includes(null===(e=t.getMeta())||void 0===e?void 0:e.id)}));return a},vb=function(t,e,n){t&&Zf(pb(t,e),(function(t){t.updateByState(n)}))},gb=function(t,e){return"function"===typeof t?t(e):t.some((function(t){return t===e.key||t===e.id||t===e.valueField}))},yb=function(t){function e(e,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o=t.call(this,{})||this;return o.textShapes=[],o.actualTextWidth=0,o.conditionIconShapes=[],o.stateShapes=new Map,o.meta=e,o.spreadsheet=n,o.theme=n.theme,o.conditions=o.spreadsheet.options.conditions,o.handleRestOptions.apply(o,xa([],wa(r),!1)),o.shouldInit()&&o.initCell(),o}return ga(e,t),e.prototype.getMeta=function(){return this.meta},e.prototype.setMeta=function(t){this.meta=t},e.prototype.getIconStyle=function(){return this.theme[this.cellType].icon},e.prototype.getTextAndIconPosition=function(t){void 0===t&&(t=1);var e=this.getTextStyle(),n=this.getIconStyle();return Lx(this.getContentArea(),e,this.actualTextWidth,n,t)},e.prototype.getActualText=function(){return this.actualText},e.prototype.getFieldValue=function(){return this.getFormattedFieldValue().formattedValue},e.prototype.handleRestOptions=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.shouldInit=function(){var t=this.meta,e=t.width,n=t.height;return e>0&&n>0},e.prototype.getStyle=function(t){return Uu(this.theme,t||this.cellType)},e.prototype.getResizeAreaStyle=function(){return this.getStyle("resizeArea")},e.prototype.shouldDrawResizeAreaByType=function(t,e){var n=this.spreadsheet.options.interaction.resize;return Ev(n)?n:rl(n.visible)?n.visible(e):n[t]},e.prototype.getCellArea=function(){var t=this.meta;return{x:t.x,y:t.y,height:t.height,width:t.width}},e.prototype.getContentArea=function(){var t=this.getStyle()||this.theme.dataCell,e=(null===t||void 0===t?void 0:t.cell).padding;return bx(this.getCellArea(),e)},e.prototype.getIconPosition=function(t){return void 0===t&&(t=1),this.getTextAndIconPosition(t).icon},e.prototype.drawTextShape=function(){var t=this.getFormattedFieldValue().formattedValue,e=this.getMaxTextWidth(),n=this.getTextStyle(),r=this.spreadsheet,i=r.options.placeholder,o=r.measureTextWidth,a=Bx(this,i),l=Ix({measureTextWidth:o,text:t,maxWidth:e,fontParam:n,placeholder:a});this.actualText=l,this.actualTextWidth=o(l,n);var s=this.getTextPosition();this.textShape=cx(this,[this.textShape],s.x,s.y,l,n),this.textShapes.push(this.textShape)},e.prototype.drawLinkFieldShape=function(t,e){if(t){if(!fw(this.spreadsheet.options.style.device)){var n=this.getTextStyle(),r=this.getTextPosition().x;"center"===n.textAlign?r-=this.actualTextWidth/2:"right"===n.textAlign&&(r-=this.actualTextWidth);var i=this.textShape.getBBox().maxY;this.linkFieldShape=hx(this,{x1:r,y1:i+1,x2:r+this.actualTextWidth,y2:i+1},{stroke:e,lineWidth:1})}this.textShape.attr({fill:e,cursor:"pointer",appendInfo:{isLinkFieldText:!0,cellData:this.meta}})}},e.prototype.updateByState=function(t,e){var n=this;this.spreadsheet.interaction.setInteractedCells(e),Zf(Uu(this.theme,"".concat(this.cellType,".cell.interactionState.").concat(t)),(function(t,e){uu(Lg(ia,(function(t){return Jp(t,e)}
2))).forEach((function(r){var i=n.stateShapes.has(r),o=i?n.stateShapes.get(r):n[r],a=Pa(o)?o:[o];(i&&a.forEach((function(t){t.set("visible",!0)})),"interactiveBorderShape"===r&&"borderWidth"===e)&&(Bv(t)&&Zf(n.getInteractiveBorderShapeStyle(t),(function(t,e){dx(a,e,t)})));dx(a,ra[e],t)}))}))},e.prototype.getInteractiveBorderShapeStyle=function(t){var e=this.getCellArea(),n=e.x,r=e.y,i=e.height,o=e.width,a=this.theme.dataCell.cell,l=a.horizontalBorderWidth,s=a.verticalBorderWidth;return{x:n+s/2+t/2,y:r+l/2+t/2,width:o-s-t,height:i-l-t}},e.prototype.hideInteractionShape=function(){this.stateShapes.forEach((function(t){dx(t,ra.backgroundOpacity,0),dx(t,ra.backgroundColor,"transparent"),dx(t,ra.borderOpacity,0),dx(t,ra.borderWidth,1),dx(t,ra.borderColor,"transparent")}))},e.prototype.clearUnselectedState=function(){dx(this.backgroundShape,ra.backgroundOpacity,1),dx(this.textShapes,ra.textOpacity,1),dx(this.linkFieldShape,ra.opacity,1)},e.prototype.getTextShape=function(){return this.textShape},e.prototype.getTextShapes=function(){return this.textShapes||[this.textShape]},e.prototype.addTextShape=function(t){t&&this.textShapes.push(t)},e.prototype.getConditionIconShape=function(){return this.conditionIconShape},e.prototype.getConditionIconShapes=function(){return this.conditionIconShapes||[this.conditionIconShape]},e.prototype.addConditionIconShape=function(t){t&&this.conditionIconShapes.push(t)},e.prototype.resetTextAndConditionIconShapes=function(){this.textShapes=[],this.conditionIconShapes=[]},Object.defineProperty(e.prototype,"cellConditions",{get:function(){return this.conditions},enumerable:!1,configurable:!0}),e.prototype.drawConditionIconShapes=function(){var t,e=this.findFieldCondition(null===(t=this.conditions)||void 0===t?void 0:t.icon);if(e&&e.mapping){var n=this.mappingValue(e),r=this.getIconPosition(),i=this.theme.dataCell.icon.size;Iv(null===n||void 0===n?void 0:n.icon)||(this.conditionIconShape=fx(this,ya(ya({},r),{name:n.icon,width:i,height:i,fill:n.fill})),this.addConditionIconShape(this.conditionIconShape))}},e.prototype.getTextConditionFill=function(t){var e,n,r=t.fill,i=this.findFieldCondition(null===(e=this.conditions)||void 0===e?void 0:e.text);return(null===i||void 0===i?void 0:i.mapping)&&(r=(null===(n=this.mappingValue(i))||void 0===n?void 0:n.fill)||t.fill),r},e}(bi),mb=function(t,e){return e?e(t[po],t[fo]):t[fo]},Cb=function(t,e){var n=e.getMeta().id;return t.some((function(t){return Mv(t.id,n)}))},wb=function(t,e){return"".concat(t).concat(Do).concat(e)},xb=function(t){return t.type===$o.DATA_CELL},bb=function(t,e,n){var r=n.interaction.getSelectedCellHighlight(),i=r.rowHeader,o=r.colHeader,a=r.rowCells,l=r.colCells,s=e.cellType===$o.ROW_CELL,u=n.isTableMode()&&n.options.showSeriesNumber&&i&&s;(a||u)&&function(t,e){Zf(t,(function(t){xb(t)&&t.rowIndex===e.getMeta().rowIndex&&e.updateByState(Zo.SELECTED)}))}(t,e),l&&function(t,e){Zf(t,(function(t){xb(t)&&t.colIndex===e.getMeta().colIndex&&e.updateByState(Zo.SELECTED)}))}(t,e),(i||o)&&function(t,e){Zf(t,(function(t){xb(t)&&t.rowIndex===e.getMeta().rowIndex&&t.colIndex===e.getMeta().colIndex&&e.updateByState(Zo.SELECTED)}))}(t,e)},Sb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),Object.defineProperty(e.prototype,"cellType",{get:function(){return $o.DATA_CELL},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valueRangeByField",{get:function(){return this.spreadsheet.dataSet.getValueRangeByField(this.meta.valueField)},enumerable:!1,configurable:!0}),e.prototype.handleByStateName=function(t,e){Cb(t,this)&&this.updateByState(e)},e.prototype.handleSearchResult=function(t){Cb(t,this)&&(xp(t,(function(t){return null===t||void 0===t?void 0:t.isTarget})).id===this.getMeta().id?this.updateByState(Zo.HIGHLIGHT):this.updateByState(Zo.SEARCH_RESULT))},e.prototype.handleSelect=function(t){var e;switch(null===(e=null===t||void 0===t?void 0:t[0])||void 0===e?void 0:e.type){case $o.COL_CELL:this.changeRowColSelectState("colIndex");break;case $o.ROW_CELL:this.changeRowColSelectState("rowIndex");break;case $o.DATA_CELL:!function(t){var e=t.interaction.getSelectedCellHighlight(),n=e.rowCells,r=e.colCells,i=e.rowHeader,o=e.colHeader;return n||r||i||o}(this.spreadsheet)?Cb(t,this)?this.updateByState(Zo.SELECTED):this.spreadsheet.options.interaction.selectedCellsSpotlight&&this.updateByState(Zo.UNSELECTED):bb(t,this,this.spreadsheet)}},e.prototype.handleHover=function(t){var e=Tp(t);if(e.type===$o.DATA_CELL){if(this.spreadsheet.options.interaction.hoverHighlight){var n=this.meta.colIndex,r=this.meta.rowIndex;n===(null===e||void 0===e?void 0:e.colIndex)||r===(null===e||void 0===e?void 0:e.rowIndex)?this.updateByState(Zo.HOVER):this.hideInteractionShape()}Mv(e.id,this.getMeta().id)&&this.updateByState(Zo.HOVER_FOCUS)}else this.hideInteractionShape()},e.prototype.update=function(){var t=this.spreadsheet.interaction.getCurrentStateName(),e=this.spreadsheet.interaction.getCells();if(t!==Zo.ALL_SELECTED){if(!Iv(e)&&t)switch(t){case Zo.SELECTED:this.handleSelect(e);break;case Zo.HOVER_FOCUS:case Zo.HOVER:this.handleHover(e);break;case Zo.SEARCH_RESULT:this.handleSearchResult(e);break;default:this.handleByStateName(e,t)}}else this.updateByState(Zo.SELECTED)},e.prototype.setMeta=function(e){t.prototype.setMeta.call(this,e),this.initCell()},e.prototype.initCell=function(){this.resetTextAndConditionIconShapes(),this.drawBackgroun
2dShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.shouldHideRowSubtotalData()||(this.drawConditionIntervalShape(),this.drawTextShape(),this.drawConditionIconShapes()),this.meta.isFrozenCorner&&this.drawBorderShape(),this.update()},e.prototype.getDefaultTextFill=function(t){var e=t.fill,n=this.getBackgroundColor(),r=n.backgroundColor,i=n.intelligentReverseTextColor;return XC(r)&&t.fill===Yo&&i&&(e=Xo),e},e.prototype.getTextStyle=function(){var t=this.meta.isTotals?this.theme.dataCell.bolderText:this.theme.dataCell.text,e=this.getTextConditionFill(ya(ya({},t),{fill:this.getDefaultTextFill(t)}));return ya(ya({},t),{fill:e})},e.prototype.getIconStyle=function(){var t,e=this.theme.dataCell.icon,n=e.size,r=e.margin,i=this.findFieldCondition(null===(t=this.conditions)||void 0===t?void 0:t.icon);return i&&i.mapping&&{size:n,margin:r,position:gx(i)}},e.prototype.drawConditionIntervalShape=function(){this.conditionIntervalShape=Cx(this)},e.prototype.shouldHideRowSubtotalData=function(){var t,e=(null!==(t=this.spreadsheet.options.totals)&&void 0!==t?t:{}).row,n=void 0===e?{}:e,r=this.meta.rowIndex,i=this.spreadsheet.facet.layoutResult.rowLeafNodes[r],o=!(null===i||void 0===i?void 0:i.isGrandTotals)&&(null===i||void 0===i?void 0:i.isTotals);return"tree"===this.spreadsheet.options.hierarchyType&&!n.showSubTotals&&o},e.prototype.getFormattedFieldValue=function(){if(this.shouldHideRowSubtotalData())return{value:null,formattedValue:Do};var t=this.meta,e=t.rowId,n=t.valueField,r=t.fieldValue,i=t.data,o=this.spreadsheet.dataSet.getFieldMeta(e)?e:n;return{value:r,formattedValue:this.spreadsheet.dataSet.getFieldFormatter(o)(r,i,this.meta)}},e.prototype.getMaxTextWidth=function(){var t=this.getContentArea().width;return _x(t,this.getIconStyle())},e.prototype.getTextPosition=function(){return this.getTextAndIconPosition().text},e.prototype.getBackgroundColor=function(){var t,e=this.getStyle().cell,n=e.crossBackgroundColor,r=e.backgroundColorOpacity,i=this.getStyle().cell.backgroundColor;if(n&&this.meta.rowIndex%2===0&&(i=n),this.shouldHideRowSubtotalData())return{backgroundColor:i,backgroundColorOpacity:r};var o=this.findFieldCondition(null===(t=this.conditions)||void 0===t?void 0:t.background),a=!1;if(o&&o.mapping){var l=this.mappingValue(o);l&&(i=l.fill,a=l.intelligentReverseTextColor)}return{backgroundColor:i,backgroundColorOpacity:r,intelligentReverseTextColor:a}},e.prototype.drawBackgroundShape=function(){var t=this.getBackgroundColor(),e=t.backgroundColor,n=t.backgroundColorOpacity;this.backgroundShape=sx(this,ya(ya({},this.getCellArea()),{fill:e,fillOpacity:n}))},e.prototype.drawInteractiveBorderShape=function(){var t=this.getCellArea(),e=t.x,n=t.y,r=t.height,i=t.width;this.stateShapes.set("interactiveBorderShape",sx(this,{x:e+1,y:n+1,width:i-2,height:r-2},{visible:!1}))},e.prototype.drawInteractiveBgShape=function(){this.stateShapes.set("interactiveBgShape",sx(this,ya({},this.getCellArea()),{visible:!1}))},e.prototype.changeRowColSelectState=function(t){var e=this.spreadsheet.interaction,n=Uu(this.meta,t),r=e.getState(),i=r.nodes,o=void 0===i?[]:i,a=r.cells,l=void 0===a?[]:a,s=!1;this.spreadsheet.isTableMode()&&o.length?s=o[0].hierarchy.getLeaves().some((function(t,e){return!!o.some((function(e){return e===t}))&&e===n})):s=xa(xa([],wa(o),!1),wa(l),!1).some((function(e){return Uu(e,t)===n}));s?this.updateByState(Zo.SELECTED):this.spreadsheet.options.interaction.selectedCellsSpotlight?this.updateByState(Zo.UNSELECTED):this.hideInteractionShape()},e.prototype.drawBorderShape=function(){var t=this;[Yw.BOTTOM,Yw.RIGHT].forEach((function(e){var n=Tx(e,t.getCellArea(),t.getStyle().cell),r=n.position,i=n.style;hx(t,r,i)}))},e.prototype.findFieldCondition=function(t){var e=this;return Lp(t,(function(t){return t.field instanceof RegExp?t.field.test(e.meta.valueField):t.field===e.meta.valueField}))},e.prototype.mappingValue=function(t){var e=this.meta.fieldValue,n=this.spreadsheet.isTableMode()?this.spreadsheet.dataSet.getCellData({query:{rowIndex:this.meta.rowIndex}}):this.meta.data;return null===t||void 0===t?void 0:t.mapping(e,n)},e.prototype.updateByState=function(e){if(t.prototype.updateByState.call(this,e,this),e===Zo.UNSELECTED){var n=Uu(this.theme,"".concat(this.cellType,".cell.interactionState.").concat(e));n&&this.toggleConditionIntervalShapeOpacity(n.opacity)}},e.prototype.clearUnselectedState=function(){t.prototype.clearUnselectedState.call(this),this.toggleConditionIntervalShapeOpacity(1)},e.prototype.toggleConditionIntervalShapeOpacity=function(t){dx(this.conditionIntervalShape,ra.backgroundOpacity,t),dx(this.conditionIconShapes,ra.opacity,t)},e.prototype.drawLeftBorder=function(){var t=Tx(Yw.LEFT,this.getCellArea(),this.get
2Style().cell);hx(this,t.position,t.style)},e}(yb),_b=function(t){function e(e,n,r){return t.call(this,r,e,n)||this}return ga(e,t),e.prototype.handleRestOptions=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=wa(t,1),r=n[0];this.cells=r},Object.defineProperty(e.prototype,"cellType",{get:function(){return $o.MERGED_CELL},enumerable:!1,configurable:!0}),e.prototype.update=function(){},e.prototype.initCell=function(){this.resetTextAndConditionIconShapes(),this.conditions=this.spreadsheet.options.conditions,this.drawBackgroundShape(),this.drawTextShape()},e.prototype.drawBackgroundShape=function(){var t=Lb(this.cells),e=this.theme.dataCell.cell;this.backgroundShape=function(t,e){var n;return null===(n=null===t||void 0===t?void 0:t.addShape)||void 0===n?void 0:n.call(t,"polygon",{attrs:e})}(this,{points:t,stroke:e.horizontalBorderColor,fill:e.backgroundColor,lineHeight:e.horizontalBorderWidth})},e.prototype.drawTextShape=function(){Iv(this.meta)||(Xa(this.meta.fieldValue)?kx(this):t.prototype.drawTextShape.call(this))},e}(Sb),Eb=function(t,e){return xp(e,(function(e){return Mv(e[0],t[1])}))},Lb=function(t){var e=[];t.forEach((function(t){var n=t.getMeta(),r=n.x,i=n.y,o=n.width,a=n.height;e=e.concat(function(t,e,n,r){var i=[t,e],o=[t+n,e],a=[t+n,e+r],l=[t,e+r];return[[i,o],[o,a],[a,l],[l,i]]}(r,i,o,a))})),e=function(t){var e=[];return Zf(t,(function(n){var r=[n[1],n[0]];JSON.stringify(t).includes(JSON.stringify(r))||e.push(n)})),e}(e);for(var n=[],r=e[0],i=r,o=[];!Mv(r,o);)n=n.concat(i),i=o=Eb(i,e);return n},Tb=function(t,e,n){var r;void 0===n&&(n=[]);var i=function(t,e){var n,r=[],i=[];return Zf(t,(function(t){var o=xp(e,(function(e){var n,r=null===(n=null===e||void 0===e?void 0:e.getMeta)||void 0===n?void 0:n.call(e);if((null===r||void 0===r?void 0:r.colIndex)===(null===t||void 0===t?void 0:t.colIndex)&&(null===r||void 0===r?void 0:r.rowIndex)===(null===t||void 0===t?void 0:t.rowIndex))return e}));o?(r.push(o),n=(null===t||void 0===t?void 0:t.showText)?null===o||void 0===o?void 0:o.getMeta():n):i.push(t)})),{cells:r,invisibleCellInfo:i,cellsMeta:n}}(n,t),o=i.cellsMeta,a=i.cells,l=i.invisibleCellInfo,s=o,u=a;if((null===l||void 0===l?void 0:l.length)>0&&l.length<n.length){var c=function(t,e){var n,r=[];return Zf(t,(function(t){var i,o,a,l=null===(o=null===(i=null===e||void 0===e?void 0:e.facet)||void 0===i?void 0:i.layoutResult)||void 0===o?void 0:o.getCellMeta(t.rowIndex,t.colIndex);if(l){var s=null===(a=null===e||void 0===e?void 0:e.facet)||void 0===a?void 0:a.cfg.dataCell(l);n=(null===t||void 0===t?void 0:t.showText)?l:n,r.push(s)}})),{cells:r,cellsMeta:n}}(l,e),h=c.cells,d=c.cellsMeta;s=s||d,u=a.concat(h)}return Iv(a)||s||(s=null===(r=u[0])||void 0===r?void 0:r.getMeta()),{cells:u,viewMeta:s}},Ob=function(t,e,n){var r,i=e||function(t){var e=t.interaction.getActiveCells(),n=[];return Zf(e,(function(t,e){var r=t.getMeta(),i=0===e?{showText:!0}:{};n.push(ya(ya({},i),{colIndex:null===r||void 0===r?void 0:r.colIndex,rowIndex:null===r||void 0===r?void 0:r.rowIndex}))})),n}(t);if((null===i||void 0===i?void 0:i.length)<=1)console.error("then merged cells must be more than one");else{var o=t.interaction.getPanelGroupAllDataCells(),a=Tb(o,t,i),l=a.cells,s=a.viewMeta;if(!Iv(l)){var u=(null===(r=t.options)||void 0===r?void 0:r.mergedCellsInfo)||[];u.push(i),t.setOptions({mergedCellsInfo:u});var c=n?void 0:s;t.panelScrollGroup.addMergeCell(new _b(t,l,c))}}},Ib=function(t,e){var n,r,i;if(e&&e.cellType===$o.MERGED_CELL){var o=function(t,e){var n=Ip(t.cells,(function(t){return{colIndex:t.getMeta().colIndex,rowIndex:t.getMeta().rowIndex}}));return yp(e,(function(t){return!Mv(t.map((function(t){return t.showText?{colIndex:t.colIndex,rowIndex:t.rowIndex}:t})),n)}))}(e,null===(n=t.options)||void 0===n?void 0:n.mergedCellsInfo);(null===o||void 0===o?void 0:o.length)!==(null===(i=null===(r=t.options)||void 0===r?void 0:r.mergedCellsInfo)||void 0===i?void 0:i.length)&&(t.setOptions({mergedCellsInfo:o}),e.remove(!0))}else console.error("unmergeCell: the ".concat(e," is not a MergedCell"))},Mb=function(t,e){return Yf(t,e,(function(t,e){return Mv(t.viewMeta.id,e.viewMeta.id)}))},Rb=function(t,e){var n,r=null===(n=t.options)||void 0===n?void 0:n.mergedCellsInfo;if(!Iv(r)){var i=t.interaction.getPanelGroupAllDataCells();if(!Iv(i)){var o=[];r.forEach((function(e){var n=Tb(i,t,e);n.cells.length>0&&o.push(n)}));var a=e.getChildren(),l=function(t){return Ip(t,(function(t){return{cells:t.cells,viewMeta:t.getMeta()}}))}(a),s=Mb(l,o),u=Mb(o,l);Zf(s,(function(t){var e=xp(a,(function(e){return Mv(e.getMeta().id,t.viewMeta.id)}));null===e||void 0===e||e.remove(!0)})),Zf(u,(function(n){var r=n.cells,i=n.viewMeta;e.add(new _b(t,r,i))}))}}},Ab=function(t){return t.includes(No)?"id":"field"},Bb=function(t,e){void 0===e&&(e=[]);var n=t.getInitColumnLeafNodes();return Ed(e.map((function(t){var e=Ab(t);return n.find((function(n){return n[e]===t}))})))},kb=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var r=function(e,n){void 0===e&&(e=[]),void 0===n&&(n=[]),t.setOptions({interaction:{hiddenColumnFields:e}}),t.interaction.reset(),t.store.set("hiddenColumnsDetail",n),t.render(!1,{reBuildHiddenColumnsDetail:!1})};if(Iv(e)&&n)r();else{var i=t.store.get("hiddenColumnsDetail",[]),o=t.options.interaction.hiddenColumnFields;if(!Mv(e,o)||n){var a=Qm(xa(xa([],wa(e),!1),wa(o),!1)),l=function(t,e){if(void 0===e&&(e=[]),Iv(e))return{prev:null,next:null};var n=t.getInitColumnLeafNodes(),r=Bb(t,e).map((function(t){return null===t||void 0===t?void 0:t.colIndex})),i=Math.max.apply(Math,xa([],wa(r),!1)),o=Math.min.apply(Math,xa([],wa(r),!1)),a=n.find((function(t){return t.colIndex===i+1}));return{prev:n.find((function(t){return t.colIndex===o-1}))||null,next:a||null}}(t,e),s={hideColumnNodes:Bb(t,e),displaySiblingNode:l},u=xa(xa([],wa(i),!1),[s],!1);t.emit(uo.LAYOUT_COLS_HIDDEN,s,u),r(a,u)}}},Nb=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1),Iv(e)&&n&&kb(t,e,!0);var r=function(t){var e=t.dataCfg.fields.columns,n=void 0===e?[]:e;return t.isTableMode()?n:t.getInitColumnLeafNodes().map((function(t){return t.id}))}(t),i=function(t,e){if(Iv(e))return[];var n=Number.NEGATIVE_INFINITY;return t.reduce((function(t,r,i){if(!e.includes(r))return t;if(i===n+1)Gf(t).push(r);else{var o=[r];t.push(o)}return n=i,t}),[])}(zw(r),e);
2i.forEach((function(e){kb(t,e,n)}))},Db=function(t,e){return function(t){var e=function(t){return(null===t||void 0===t?void 0:t.next)||(null===t||void 0===t?void 0:t.prev)}(t);return null===e||void 0===e?void 0:e.id}(t)===e},Pb=function(t){var e=t.type,n=t.id,r=t.theme,i=t.width,o=t.height,a=ma(t,["type","id","theme","width","height"]),l=e===ua.Horizontal?r.size:null,s=e===ua.Vertical?r.size:null;return{fill:r.background,fillOpacity:r.backgroundOpacity,cursor:"".concat(e,"-resize"),width:l,height:s,appendInfo:ya(ya({},a),{isResizeArea:!0,type:e,id:n,width:i,height:o,size:r.size})}},zb=function(t,e){if(t.foregroundGroup)return t.foregroundGroup.findById(e)||t.foregroundGroup.addGroup({id:e,zIndex:5})},Fb=function(t,e,n){var r=null!==n&&void 0!==n?n:{},i=r.scrollX,o=void 0===i?0:i,a=r.scrollY,l=void 0===a?0:a,s=!(t.x-o>e.x+e.width||t.x+t.width-o<e.x),u=!(t.y-l>e.y+e.height||t.y+t.height-l<e.y);return s&&u},Hb=function(t,e,n){var r=xp(t,(function(t){return function(t,e,n){if(!t)return!1;var r=t.iconNames,i=t.displayCondition,o=t.belongsCell;return!Iv(r)&&o===n&&(!i||r.some((function(t){return i(e,t)})))}(t,e,n)}));if(r){var i=r.iconNames;return r.displayCondition&&(i=i.filter((function(t){return r.displayCondition(e,t)}))),ya(ya({},r),{iconNames:i})}},Wb=function(t,e){var n=t.label;return Mv(t.field,po)?{formattedValue:e||n,value:n}:{formattedValue:n,value:n}};function Gb(t,e){return e.map((function(e){var n=t[e];return void 0===n?n:"".concat(n)}))}function jb(t){return t.map((function(t){var e=null===t||void 0===t?void 0:t.split(No);return e[(null===e||void 0===e?void 0:e.length)-1]||t}))}function Ub(t){var e=t.rowDimensionValues,n=t.colDimensionValues,r=t.careUndefined,i=t.isFirstCreate,o=t.onFirstCreate,a=t.rowFields,l=t.colFields,s=t.rowPivotMeta,u=t.colPivotMeta,c=function(t,e,n,s){void 0===e&&(e=!0);for(var u=e?n:s,c=e?a:l,h=[],d=0;d<t.length;d++){var f=t[d];if(!u.has(f))if(i)u.set(f,{level:u.size,children:new Map}),null===o||void 0===o||o({isRow:e,dimension:null===c||void 0===c?void 0:c[d],dimensionPath:t.slice(0,d+1)});else{var p=u.get(f);if(p&&h.push(p.level),!r)break}var v=u.get(f);Hv(f)&&r?h.push(f):h.push(null===v||void 0===v?void 0:v.level),v&&(i&&(v.childField=null===c||void 0===c?void 0:c[d+1]),u=null===v||void 0===v?void 0:v.children)}return h},h=c(e,!0,s,u),d=c(n,!1,s,u);return h.concat.apply(h,xa([],wa(d),!1))}function Vb(t,e){return Py(t,(function(t,n){return t.push(e[n]),t}),[])}function Yb(t){var e=t.rows,n=t.columns,r=t.originData,i=void 0===r?[]:r,o=t.indexesData,a=void 0===o?[]:o,l=t.totalData,s=void 0===l?[]:l,u=t.sortedDimensionValues,c=t.rowPivotMeta,h=t.colPivotMeta,d=[],f=new Set(ov(e,n)),p=function(t){var e=t.isRow,n=t.dimension,r=t.dimensionPath;!e&&f.has(n)||(u[n]||(u[n]=[])).push(r.map((function(t){return"".concat(t)})).join(No))};return i.concat(s).forEach((function(t){var r=Ub({rowDimensionValues:Gb(t,e),colDimensionValues:Gb(t,n),rowPivotMeta:c,colPivotMeta:h,isFirstCreate:!0,onFirstCreate:p,careUndefined:(null===s||void 0===s?void 0:s.length)>0,rowFields:e,colFields:n});d.push(r),qy(a,r,t)})),{paths:d,indexesData:a,rowPivotMeta:c,colPivotMeta:h,sortedDimensionValues:u}}function Xb(t,e){if(t&&e){var n=e.split(No),r=Gf(n),i=t;Zf(n,(function(t,e){var n=i.get(t);return n?(t===r?(n.children=new Map,n.childField=void 0):i=n.children,!0):0===e&&t===ko}))}}var qb=function(t){return"ASC"===Dm(t)},Kb=function(t){return"DESC"===Dm(t)},Zb=function(t){return!kv(Number(t))},$b=function(t,e,n){var r=qb(e)?1:-1,i=["-",void 0];return null===t||void 0===t?void 0:t.sort((function(t,e){var o=t,a=e;if(n){if(o=t[n],a=e[n],Zb(o)&&Zb(a))return(Number(o)-Number(a))*r;if(o&&(null===i||void 0===i?void 0:i.includes(null===o||void 0===o?void 0:o.toString())))return-r;if(Number(o)&&(null===i||void 0===i?void 0:i.includes(null===a||void 0===a?void 0:a.toString())))return r}return Dv(o)||Dv(a)?o?r:-r:o.toString().localeCompare(a.toString(),"zh")*r}))},Qb=function(t,e,n){return n?function(t,e){var n;return null===(n=null===t||void 0===t?void 0:t.filter((function(t){return!(null===e||void 0===e?void 0:e.includes(t))})))||void 0===n?void 0:n.concat(e)}
2(e,Qm(t)):xa([],wa(new Set(xa(xa([],wa(t),!1),wa(e),!1))),!1)},Jb=function(t){var e=t.sortByValues,n=t.originValues,r=n.filter((function(t){return e.find((function(e){return np(t,e)}))})).map((function(t){var e=t.split(No);return e.length>1?[e.slice(0,e.length-1).join(No),e[e.length-1]]:e})),i=Array.from(new Set(r.map((function(t){return t[0]}))));r.sort((function(t,n){var r=t.slice(0,t.length-1),o=n.slice(0,n.length-1);return r.join()!==o.join()?i.indexOf(r[0])-i.indexOf(o[0]):e.indexOf(t[t.length-1])-e.indexOf(n[n.length-1])}));var o=r.map((function(t){return t.join(No)}));return Jw(n,o)},tS=function(t){var e,n=t.sortParam,r=t.measureValues,i=t.originValues,o=t.dataSet,a=n.sortByMeasure,l=n.query,s=n.sortFieldId,u=n.sortMethod,c=o.fields,h=c.rows,d=c.columns,f=h.includes(s);if(a){var p=$b(r,u,a===go?l[po]:a);e=function(t,e,n){var r,i=e.slice(0,e.indexOf(t)+1);return null===(r=n.map((function(t){return i.map((function(e){return t[e]})).join("".concat(No))})))||void 0===r?void 0:r.filter((function(t){return t}))}(s,f?h:zw(d),p)}else e=Ip($b(r,u));return Qb(e,i,qb(u))},eS=function(t){var e=t.sortParam,n=t.originValues,r=t.measureValues,i=t.dataSet,o=e.sortFunc,a=e.sortMethod,l=e.sortBy,s=n,u={originValues:n,measureValues:r,sortParam:e,dataSet:i};return o?s=function(t){var e=t.originValues,n=t.measureValues,r=t.sortParam,i=t.dataSet,o=r.sortFunc,a=r.sortFieldId,l=r.sortMethod,s=o(ya({data:n},r));return(null===s||void 0===s?void 0:s.length)?(i.fields.rows.indexOf(a)>0||i.fields.columns.indexOf(a)>0)&&!Jp(s[0],No)?Jb({sortByValues:s,originValues:e}):Qb(s,e,qb(l)):e}(u):l?s=Jb({sortByValues:l,originValues:n}):(qb(a)||Kb(a))&&(s=tS(u)),s},nS=function(t){return t.filter((function(t){return t!==po}))},rS=function(t){var e=t.dataSet,n=t.sortParam,r=t.originValues,i=e.fields,o=n.sortByMeasure,a=n.query,l=n.sortFieldId,s=e.getMultiData(a),u=zw(i.columns);if(o!==go){var c=Ld(i.rows,u);return s.filter((function(t){var e=new Set(uu(t));return c.every((function(t){return e.has(t)}))}))}var h=Jp(i.rows,l),d=nS(h?i.rows:u),f=nS(h?u:i.rows),p=d[d.indexOf(l)+1],v=uu(a),g=f.filter((function(t){return!v.includes(t)})),y=s.filter((function(t){var e=new Set(uu(t));return!!e.has(l)&&(!e.has(p)&&g.every((function(t){return!e.has(t)})))}));return Iv(y)?Ed(Ip(r,(function(t){var n=function(t,e,n){var r,i={};if(Jp(t,No))for(var o=sm(t,No),a=(null===(r=null===e||void 0===e?void 0:e.rows)||void 0===r?void 0:r.includes(n))?e.rows:zw(e.columns),l=0;l<=ev(a,n);l++)i[a[l]]=o[l];else i[n]=t;return i}(t,i,l);return e.getTotalValue(ya(ya({},a),n))}))):y},iS=function(t){var e,n=t.dataSet,r=t.sortParam,i=t.originValues;return e=t.isSortByMeasure?rS(t):i,eS({sortParam:r,originValues:i,measureValues:e,dataSet:n})},oS=function(t,e){if(null===t||void 0===t?void 0:t.sortMethod){if(qb(null===t||void 0===t?void 0:t.sortMethod))return"groupAsc";if(Kb(null===t||void 0===t?void 0:t.sortMethod))return"groupDesc"}if(e)return"SortDown"},aS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.handleRestOptions=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=wa(t,1),r=n[0];this.headerConfig=ya({},r);var i=this.meta,o=i.value,a=i.query,l=this.spreadsheet.dataCfg.sortParams,s=this.isSortCell(),u=xp(xa([],wa(l),!1).reverse(),(function(t){return s&&(null===t||void 0===t?void 0:t.sortByMeasure)===o&&Mv(Uu(t,"query"),a)})),c=oS(u,s);this.headerConfig.sortParam=ya(ya(ya({},this.headerConfig.sortParam),u||{query:a}),{type:c})},e.prototype.initCell=function(){this.resetTextAndConditionIconShapes(),this.actionIcons=[],this.hasDefaultHiddenIcon=!1},e.prototype.getInteractiveBorderShapeStyle=function(t){var e=this.getCellArea(),n=e.x,r=e.y,i=e.height;return{x:n+t,y:r+t,width:e.width-2*t,height:i-2*t}},e.prototype.getFormattedFieldValue=function(){var t=this.meta.label,e=this.spreadsheet.dataSet.getFieldFormatter(this.meta.field),n=this.spreadsheet.isTableMode();return{formattedValue:e&&!n?e(t,void 0,this.meta):t,value:t}},e.prototype.getActionIconCfg=function(){return Hb(this.spreadsheet.options.headerActionIcons,this.meta,this.cellType)},e.prototype.showSortIcon=function(){var t=this.spreadsheet,e=t.options,n=Iv(t.dataCfg.fields.values);if(e.showDefaultHeaderActionIcon&&!n){var r=this.headerConfig.sortParam,i=this.meta.query;return i&&Mv(null===r||void 0===r?void 0:r.query,i)&&(null===r||void 0===r?void 0:r.type)&&"none"!==(null===r||void 0===r?void 0:r.type)}return!1},e.prototype.getActionIconsCount=function(){if(this.showSortIcon())return 1;var t=this.getActionIconCfg();return t?t.iconNames.length:0},e.prototype.getActionIconsWidth=function(){var t=this.getStyle().icon;return(t.size+t.margin.left)*this.getActionIconsCount()},e.prototype.drawSortIcons=function(){var t=this;if(this.showSortIcon()){var e=this.getStyle(),n=e.icon,r=e.text,i=this.getTextConditionFill(r),o=this.headerConfig.sortParam,a=this.getIconPosition(),l=new $w(ya(ya({name:Uu(o,"type","none")},a),{width:n.size,height:n.size,fill:i}));l.on("click",(function(e){t.spreadsheet.emit(uo.GLOBAL_ACTION_ICON_CLICK,e),t.spreadsheet.handleGroupSort(e,t.meta)})),this.add(l),this.actionIcons.push(l)}},e.prototype.hasDefaultHideActionIcon=function(){return this.hasDefaultHiddenIcon},e.prototype.addActionIcon=function(t){var e=this,n=t.x,r=t.y,i=t.iconName,o=t.defaultHide,a=t.action,l=t.onClick,s=t.onHover,u=this.getStyle(),c=u.icon,h=u.text,d=this.getTextConditionFill(h),f=(null===c||void 0===c?void 0:c.fill)||d,p=new $w({name:i,x:n,y:r,width:null===c||void 0===c?void 0:c.size,height:null===c||void 0===c?void 0:c.size,fill:f});p.set("visible",!o),p.on("mouseover",(function(t){e.spreadsheet.emit(uo.GLOBAL_ACTION_ICON_HOVER,t),null===s||void 0===s||s({hovering:!0,iconName:i,meta:e.meta,event:t})})),p.on("mouseleave",(function(t){e.spreadsheet.emit(uo.GLOBAL_ACTION_ICON_HOVER_OFF,t),null===s||void 0===s||s({hovering:!1,iconName:i,meta:e.meta,event:t})})),p.on("click",(function(t){var n;e.spreadsheet.emit(uo.GLOBAL_ACTION_ICON_CLICK,t),null===(n=l||a)||void 0===n||n({iconName:i,meta:e.meta,event:t})})),this.actionIcons.push(p),this.add(p)},e.prototype.drawActionIcons=function(){var t=this;if(this.showSortIcon())this.drawSortIcons();else{var e=this.getActionIconCfg();if(e){var n=e.iconNames,r=e.action,i=e.onClick,o=e.onHover,a=e.defaultHide,l=this.getIconPosition(n.length),s=this.getStyle().icon,u=s.size,c=s.margin;Zf(n,(function(e,n){var s=l.x+n*u+n*c.left,h=l.y,d="function"===typeof a?a(t.meta,e):a;d&&(t.hasDefaultHiddenIcon=!0),t.addActionIcon({iconName:e,x:s,y:h,defaultHide:d,action:r,onClick:i,onHover:o})}))}}}
2,e.prototype.drawBackgroundShape=function(){var t=this.getBackgroundColor(),e=t.backgroundColor,n=t.backgroundColorOpacity;this.backgroundShape=sx(this,ya(ya({},this.getCellArea()),{fill:e,fillOpacity:n}))},e.prototype.isSortCell=function(){var t,e,n,r=null===(e=null===(t=this.meta.spreadsheet)||void 0===t?void 0:t.isValueInCols)||void 0===e?void 0:e.call(t),i=this.meta.level===(null===(n=this.meta.hierarchy)||void 0===n?void 0:n.maxLevel);return r?i&&this.cellType===$o.COL_CELL:i&&this.cellType===$o.ROW_CELL},e.prototype.handleByStateName=function(t,e){Cb(t,this)&&this.updateByState(e)},e.prototype.handleSearchResult=function(t){Cb(t,this)&&(xp(t,(function(t){return null===t||void 0===t?void 0:t.isTarget})).id===this.getMeta().id?this.updateByState(Zo.HIGHLIGHT):this.updateByState(Zo.SEARCH_RESULT))},e.prototype.handleHover=function(t){var e;Cb(t,this)&&(this.updateByState(Zo.HOVER),this.hasDefaultHideActionIcon()&&this.toggleActionIcon(null===(e=null===t||void 0===t?void 0:t[0])||void 0===e?void 0:e.id))},e.prototype.handleSelect=function(t,e){Cb(t,this)&&this.updateByState(Zo.SELECTED),Jp(Ip(e,"id"),this.meta.id)&&this.updateByState(Zo.SELECTED)},e.prototype.getTextStyle=function(){var t,e=this.getStyle(),n=e.text,r=e.bolderText,i=e.measureText;t=this.isMeasureField()?i||n:this.isBolderText()?r:n;var o=this.getTextConditionFill(t);return ya(ya({},t),{fill:o})},e.prototype.getBackgroundColor=function(){var t,e,n=(null===(t=this.getStyle())||void 0===t?void 0:t.cell)||{},r=n.backgroundColor,i=n.backgroundColorOpacity,o=r,a=this.findFieldCondition(null===(e=this.conditions)||void 0===e?void 0:e.background);if(a&&a.mapping){var l=this.mappingValue(a);l&&(o=l.fill)}return{backgroundColor:o,backgroundColorOpacity:i}},e.prototype.toggleActionIcon=function(t){if(this.getMeta().id===t){var e=[];Zf(this.actionIcons,(function(t){t.get("visible")||(t.set("visible",!0),e.push(t))})),this.spreadsheet.store.set("visibleActionIcons",e)}},e.prototype.update=function(){var t=this.spreadsheet.interaction,e=null===t||void 0===t?void 0:t.getState(),n=null===t||void 0===t?void 0:t.getCells([$o.COL_CELL,$o.ROW_CELL]);if(Tp(n))switch(null===e||void 0===e?void 0:e.stateName){case Zo.SELECTED:this.handleSelect(n,null===e||void 0===e?void 0:e.nodes);break;case Zo.HOVER_FOCUS:case Zo.HOVER:this.handleHover(n);break;case Zo.SEARCH_RESULT:this.handleSearchResult(n);break;default:this.handleByStateName(n,null===e||void 0===e?void 0:e.stateName)}},e.prototype.updateByState=function(e){t.prototype.updateByState.call(this,e,this)},e.prototype.hideInteractionShape=function(){t.prototype.hideInteractionShape.call(this)},e.prototype.isMeasureField=function(){return[po,vo].includes(this.meta.field)},e.prototype.mappingValue=function(t){var e=this.getMeta().label;return null===t||void 0===t?void 0:t.mapping(e,this.meta)},e.prototype.findFieldCondition=function(t){var e=this;return Lp(t,(function(t){return t.field instanceof RegExp?t.field.test(e.meta.field):t.field===e.meta.field}))},e}(yb),lS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),Object.defineProperty(e.prototype,"cellType",{get:function(){return $o.COL_CELL},enumerable:!1,configurable:!0}),e.prototype.initCell=function(){t.prototype.initCell.call(this),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.drawTextShape(),this.drawConditionIconShapes(),this.drawActionIcons(),this.drawBorders(),this.drawResizeArea(),this.addExpandColumnIconShapes(),this.update()},e.prototype.drawInteractiveBgShape=function(){this.stateShapes.set("interactiveBgShape",sx(this,ya({},this.getCellArea()),{visible:!1}))},e.prototype.drawInteractiveBorderShape=function(){this.stateShapes.set("interactiveBorderShape",sx(this,this.getInteractiveBorderShapeStyle(2),{visible:!1}))},e.prototype.getMaxTextWidth=function(){return this.getContentArea().width-this.getActionIconsWidth()},e.prototype.getIconPosition=function(){if(this.meta.isLeaf)return t.prototype.getIconPosition.call(this,this.getActionIconsCount());var e=this.getIconStyle(),n=e.margin.left,r=this.getTextStyle(),i=this.textPosition,o=i.x,a=i.y-e.size/2;return"left"===r.textAlign?{x:o+this.actualTextWidth+n,y:a}:"right"===r.textAlign?{x:o+n,y:a}:{x:o+this.actualTextWidth/2+n,y:a}},e.prototype.isBolderText=function(){var t=this.meta,e=t.isLeaf;return!(!t.isTotals&&e)},e.prototype.getTextPosition=function(){var t,e=this.meta.isLeaf,n=this.headerConfig,r=n.width,i=n.scrollContainsRowHeader,o=n.cornerWidth,a=n.scrollX,l=this.getTextStyle(),s=this.getContentArea(),u=this.getIconStyle();if(e)return Lx(s,l,this.actualTextWidth,u,this.getActionIconsCount()).text;var c={start:a-(i?o:0),width:r+(i?o:0)};this.handleViewport(c);var h=this.getTextStyle().textAlign,d=function(t,e,n){void 0===n&&(n={left:0,right:0});var r=ya({},t);return"left"===e?(r.start+=n.left,r.width-=n.left):"right"===e&&(r.width-=n.right),r}(c,h,null===(t=this.getStyle().cell)||void 0===t?void 0:t.padding),f=this.getActionIconsWidth(),p=this.actualTextWidth+f,v=function(t,e,n){var r,i,o=e.start+e.width,a=t.start+t.width;if(e.start<=t.start&&o>=a)r=t.start+t.width/2,i=t.width;else if(e.start<=t.start)r=(l=e.width-(t.start-e.start))<n?o-n/2:o-l/2,i=l;else if(o>=a){var l;r=(l=e.width-(o-a))<n?e.start+n/2:e.start+l/2,i=l}else r=e.start+e.width/2,i=e.width;return{start:r,width:i}}(d,{start:s.x,width:s.width},p),g=function(t,e,n,r){var i=e+n,o=t.start;if("center"===r)return o-n/2;var a=t.width-i>0?t.width/2:i/2;return"left"===r?o-a:o+a-n}(v,this.actualTextWidth,f,h),y=s.y+s.height/2;return this.textPosition={x:g,y:y},this.textPosition},e.prototype.getActionIconsWidth=function(){var t=this.getStyle().icon,e=t.size,n=t.margin,r=this.getActionIconsCount();return(e+n.left)*r+(r>0?n.right:0)},e.prototype.getColResizeAreaKey=function(){return this.meta.key},e.prototype.getColResizeArea=function(){return zb(this.spreadsheet,Mo)},e.prototype.getHorizontalResizeAreaName=function(){return"".concat(Bo).concat(this.meta.key)},e.prototype.drawHorizontalResizeArea=function(){var t,e;if(!(0===(null===(e=null===(t=this.spreadsheet.options.style)||void 0===t?void 0:t.colCfg)||void 0===e?void 0:e.he
2ight))&&this.shouldDrawResizeAreaByType("colCellVertical",this)){var n=this.headerConfig,r=n.cornerWidth,i=n.viewportWidth,o=this.meta,a=o.y,l=o.height,s=this.getResizeAreaStyle(),u=this.getColResizeArea(),c=this.getHorizontalResizeAreaName();if(!u.find((function(t){return t.attrs.name===c}))){var h=r+i;u.addShape("rect",{attrs:ya(ya({},Pb({theme:s,type:ua.Vertical,id:this.getColResizeAreaKey(),effect:ca.Field,offsetX:0,offsetY:a,width:h,height:l,meta:this.meta})),{name:c,x:0,y:a+l-s.size/2,width:h})})}}},e.prototype.shouldAddVerticalResizeArea=function(){var t=this.meta,e=t.x,n=t.y,r=t.width,i=t.height,o=this.headerConfig,a=o.scrollX,l=o.scrollY,s=o.scrollContainsRowHeader,u=o.cornerWidth,c=o.height,h=o.width,d=this.getResizeAreaStyle(),f={x:e+r-d.size/2,y:n,width:d.size,height:i};return Fb(f,{x:s?-u:0,y:0,width:s?u+h:h,height:c},{scrollX:a,scrollY:l})},e.prototype.getVerticalResizeAreaOffset=function(){var t=this.meta,e=t.x,n=t.y,r=this.headerConfig,i=r.scrollX,o=r.position;return{x:o.x+e-i,y:o.y+n}},e.prototype.drawVerticalResizeArea=function(){if(this.meta.isLeaf&&this.shouldDrawResizeAreaByType("colCellHorizontal",this)){var t=this.meta,e=t.label,n=t.width,r=t.height,i=this.getResizeAreaStyle(),o=this.getColResizeArea();if(this.shouldAddVerticalResizeArea()){var a=this.getVerticalResizeAreaOffset(),l=a.x,s=a.y;o.addShape("rect",{attrs:ya(ya({},Pb({theme:i,type:ua.Horizontal,effect:ca.Cell,id:e,offsetX:l,offsetY:s,width:n,height:r,meta:this.meta})),{x:l+n-i.size/2,y:s,height:r})})}}},e.prototype.drawResizeArea=function(){this.drawHorizontalResizeArea(),this.drawVerticalResizeArea()},e.prototype.drawHorizontalBorder=function(){var t=Tx(Yw.TOP,this.meta,this.theme.colCell.cell);hx(this,t.position,t.style)},e.prototype.drawVerticalBorder=function(t){var e=Tx(t,this.meta,this.theme.colCell.cell);hx(this,e.position,e.style)},e.prototype.drawBorders=function(){var t=this.spreadsheet,e=t.options,n=t.isTableMode;0===this.meta.colIndex&&n()&&!e.showSeriesNumber&&this.drawVerticalBorder(Yw.LEFT),this.drawHorizontalBorder(),this.drawVerticalBorder(Yw.RIGHT)},e.prototype.hasHiddenColumnCell=function(){var t=this,e=this.spreadsheet.options,n=e.interaction.hiddenColumnFields,r=void 0===n?[]:n,i=e.tooltip.operation,o=this.spreadsheet.store.get("hiddenColumnsDetail",[]);return!(Iv(o)||Iv(r)||!i.hiddenColumns)&&!!o.find((function(e){return Db(null===e||void 0===e?void 0:e.displaySiblingNode,t.meta.id)}))},e.prototype.getExpandIconTheme=function(){return this.getStyle().icon},e.prototype.addExpandColumnSplitLine=function(){var t=this.meta,e=t.x,n=t.y,r=t.width,i=t.height,o=this.theme.splitLine,a=o.horizontalBorderColor,l=o.horizontalBorderWidth,s=o.horizontalBorderColorOpacity,u=this.isLastColumn()?e+r-l:e;hx(this,{x1:u,y1:n,x2:u,y2:n+i},{stroke:a,lineWidth:l,strokeOpacity:s})},e.prototype.addExpandColumnIconShapes=function(){this.hasHiddenColumnCell()&&(this.addExpandColumnSplitLine(),this.addExpandColumnIcon())},e.prototype.addExpandColumnIcon=function(){var t=this,e=this.getExpandColumnIconConfig();fx(this,ya(ya({},e),{name:"ExpandColIcon",cursor:"pointer"})).on("click",(function(){t.spreadsheet.emit(uo.LAYOUT_COLS_EXPANDED,t.meta)}))},e.prototype.getExpandColumnIconConfig=function(){var t=this.getExpandIconTheme().size,e=this.getCellArea(),n=e.x,r=e.y,i=e.width,o=e.height,a=n-t;return{x:this.isLastColumn()?a+i:a,y:r+o/2-t/2,width:2*t,height:t}},e.prototype.isLastColumn=function(){return function(t,e){var n=t.getColumnNodes(),r=t.getInitColumnLeafNodes(),i=Ab(e);return Uu(Gf(n),i)===e&&Uu(Gf(r),i)!==e}(this.spreadsheet,this.meta.id)},e.prototype.handleViewport=function(t){return t},e}(aS),sS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.isBolderText=function(){return this.meta.cornerType===qw.Col},Object.defineProperty(e.prototype,"cellType",{get:function(){return $o.CORNER_CELL},enumerable:!1,configurable:!0}),e.prototype.update=function(){},e.prototype.initCell=function(){t.prototype.initCell.call(this),this.resetTextAndConditionIconShapes(),this.drawBackgroundShape(),this.drawTreeIcon(),this.drawCellText(),this.drawConditionIconShapes(),this.drawActionIcons(),this.drawBorderShape(),this.drawResizeArea()},e.prototype.drawCellText=function(){this.drawTextShape()},e.prototype.drawTextShape=function(){var t=this.getContentArea().x,e=this.getCellArea(),n=e.y,r=e.height,i=this.getTextStyle(),o=this.getCornerText(),a=this.getMaxTextWidth(),l=Bx(this.meta,this.spreadsheet.options.placeholder),s=this.spreadsheet.measureTextWidth,u=Ix({measureTextWidth:s,text:o,maxWidth:a,fontParam:i,placeholder:l});this.actualText=u;var c=u.indexOf(Go),h=u,d="";if(-1!==c&&this.spreadsheet.isHierarchyTreeType()){var f=c+(/iPhone/gi.test(navigator.userAgent)&&812===window.screen.height&&375===window.screen.width?1:0);h=o.substr(0,f),d=o.slice(f),d=Ix({measureTextWidth:s,text:d,maxWidth:a,fontParam:i})}var p,v,g=(p={x:t+this.getTreeIconWidth(),y:n,width:a,height:r},v=i,Lx(p,v).text).x,y=n+(Iv(d)?r/2:r/4);this.addTextShape(cx(this,[this.textShapes[0]],g,y,h,i)),Iv(d)||this.addTextShape(cx(this,[this.textShapes[1]],g,n+.75*r,d,i)),this.actualTextWidth=rg([s(h,i),s(d,i)])},e.prototype.drawTreeIcon=function(){var t=this;if(this.showTreeIcon()&&this.meta.cornerType!==qw.Col){var e=this.headerConfig.hierarchyCollapse,n=this.getStyle().icon.size,r=this.getTextStyle(),i=r.textBaseline,o=r.fill,a=this.getContentArea();this.treeIcon=px(this,{x:a.x,y:Ex(a,i,n),width:n,height:n},o,e,(function(){t.headerConfig.spreadsheet.store.set("scrollY",0),t.headerConfig.spreadsheet.emit(uo.LAYOUT_TREE_ROWS_COLLAPSE_ALL,e)}))}},e.prototype.drawBorderShape=function(){var t=this;[Yw.TOP,Yw.LEFT].forEach((function(e){var n=Tx(e,t.getCellArea(),t.getStyle().cell),r=n.position,i=n.style;hx(t,r,i)}))},e.prototype.isLastRowCornerCell=function(){var t=this.meta,e=t.cornerType,n=t.field,r=this.headerConfig.rows;return e===qw.Row&&(this.spreadsheet.isHierarchyTreeType()||Gf(r)===n)},e.prototype.getResizeAreaEffect=function(){return this.meta.cornerType===qw.Series?ca.Series:this.isLastRowCornerCell()&&this.spreadsheet.isHierarchyTreeType()?ca.Tree:ca.Field},e.prototype.drawResizeArea=function(){if(this.shouldDrawResizeAreaByType("cornerCellHorizontal",this)){var t=this.getResizeAreaStyle(),e=zb(this.spreadsheet,Io),n=this.headerConfig,r=n.position,i=n.scrollX,o=n.scrollY,a=n.width,l=n.height,s=this.meta,u=s.x,c=s.y,h=s.width,d=s.height,f=s.field,p=s.cornerType,v={x:u+h-t.size/2,y:c,width:t.size,height:d},g={x:0,y:0,width:a,height:l};if(p!==qw.Col&&Fb(v,g,{scrollX:i,scrollY:o})){var y=r.x+u-i,m=r.y+(this.isLastRowCornerCell()?0:c);e.addShape("rect",{attrs:ya(ya({},Pb({theme:t,id:f,type:ua.Horizontal,effect:this.getResizeAreaEffect(),offsetX:y,offsetY:m,width:h,height:d,meta:this.meta})),{x:y+h-t.size/2,y:m,height:this.isLastRowCornerCell()?l:d})})}}},e.prototype.showTreeIcon=function(){var t;return this.spreadsheet.isHierarchyTreeType()&&0===(null===(t=this.meta)||void 0===t?void 0:t.x)},e.prototype.getIconPosition=function(){var t,e,n=null===(e=null===(t=this.textShapes)||void 0===t?void 0:t[0])||void 0===e?void 0:e.cfg.attrs,r=this.getTextStyle(),i=r.textBaseline,o=r.textAlign,a=this.getStyle().icon,l=a.size,s=a.margin;return{x:(null===n||void 0===n?void 0:n.x)+tf([[eg("center"),Zl(this.actualTextWidth/2)],[eg("right"),Zl(0)],[dm,Zl(this.actualTextWidth)]])(o)+s.left,y:Ex(this.getContentArea(),i,l)}},e.prototype.getTreeIconWidth=function(){var t=this.getStyle().icon,e=t.size,n=t.margin;return this.showTreeIcon()?e+n.right:0},e.prototype.getTextStyle=function(){var t=this.getStyle(),e=t.text,n=t.bolderText,r=this.isBolderText()?e:n,i=this.getTextConditionFill(r);return ya(ya({},r),{fill:i})},e.prototype.getMaxTextWidth=function(){return this.getContentArea().width-this.getTreeIconWidth()-this.getActionIconsWidth()},e.prototype.getTextPosition=function(){return{x:0,y:0}},e.prototype.getFormattedFieldValue=function(){return Wb(this.meta,this.spreadsheet.dataSet.getFieldName(this.meta.label))},e.prototype.getCornerText=function(){var t;return Mv(this.meta.label,po)?(null===(t=this.spreadsheet.options)||void 0===t?void 0:t.cornerText)||aw("\u6307\u6807"):this.getFormattedFieldValue().formattedValue},e}(aS),uS=function(){function t(t){this.EVENT="gesture",this.gm=t}return t.prototype.do=function(t){switch(t.type){case"touchstart":this.onTouchStart(t);break;case"touchmove":this.onTouchMove(t);break;case"touchend":this.onTouchEnd(t);break;case"touchcancel":this.onTouchCancel(t);break;default:return}},t.prototype.emit=function(t){this.gm.emit(this.EVENT,t)},t}(),cS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.EVENT="pan",e}return ga(e,t),e.prototype.onTouchCancel=function(t){},e.prototype.onTouchEnd=function(t){},e.prototype.onTouchMove=function(t){var e=t.x,n=t.y,r=e-this.preX,i=n-this.preY;
2this.preX=e,this.preY=n,this.emit({x:e,y:n,deltaX:r,deltaY:i,event:t})},e.prototype.onTouchStart=function(t){var e=t.x,n=t.y;this.preX=e,this.preY=n},e}(uS),hS="object"===typeof performance&&performance.now?performance:Date,dS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.EVENT="press",e}return ga(e,t),e.prototype.onTouchCancel=function(t){this.clearTimeout()},e.prototype.onTouchEnd=function(t){this.clearTimeout()},e.prototype.onTouchMove=function(t){var e=t.x,n=t.y;(e-this.touchStartX>10||n-this.touchStartY>10)&&this.clearTimeout()},e.prototype.onTouchStart=function(t){var e=this;this.clearTimeout();var n=t.x,r=t.y;this.touchStartTime=hS.now(),this.touchStartX=n,this.touchStartY=r,this.pressTimeout=window.setTimeout((function(){e.emit({x:n,y:r,event:t})}),300)},e.prototype.clearTimeout=function(){window.clearTimeout(this.pressTimeout)},e}(uS),fS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.EVENT="swipe",e.latestMoveTime=0,e.ms=0,e.speedX=0,e.speedY=0,e.preX=0,e.preY=0,e}return ga(e,t),e.prototype.onTouchCancel=function(t){},e.prototype.onTouchEnd=function(t){var e=this.speedX,n=this.speedY;if(hS.now()-this.latestMoveTime<100){var r=t.x,i=t.y;this.emit({x:r,y:i,speedX:e,speedY:n,event:t})}},e.prototype.onTouchMove=function(t){var e=t.x,n=t.y,r=hS.now(),i=e-this.preX,o=n-this.preY,a=r-this.ms;this.speedX=i/a,this.speedY=o/a,this.latestMoveTime=r},e.prototype.onTouchStart=function(t){var e=t.x,n=t.y;this.speedX=this.speedY=0,this.preX=e,this.preY=n,this.ms=hS.now()},e}(uS),pS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.EVENT="tap",e}return ga(e,t),e.prototype.onTouchCancel=function(t){},e.prototype.onTouchEnd=function(t){var e=t.x,n=t.y;e-this.touchStartX<2&&n-this.touchStartY<2&&hS.now()-this.touchStartTime<300&&this.emit({x:e,y:n,event:t})},e.prototype.onTouchMove=function(t){},e.prototype.onTouchStart=function(t){var e=t.x,n=t.y;this.touchStartTime=hS.now(),this.touchStartX=e,this.touchStartY=n},e}(uS),vS={Pan:cS,Press:dS,Swipe:fS,Tap:pS},gS=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this)||this;return r.onTouchStart=function(t){r.preventEvent(t),r.element.on("touchmove",r.onTouchMove),r.element.on("touchend",r.onTouchEnd),r.element.on("touchcancel",r.onTouchCancel),r.emit("touchdown",t),r.doGestures(t)},r.onTouchMove=function(t){r.preventEvent(t),r.emit("touchmove",t),r.doGestures(t)},r.onTouchEnd=function(t){r.preventEvent(t),r.emit("touchend",t),r.element.off("touchmove",r.onTouchMove),r.element.off("touchend",r.onTouchEnd),r.element.off("touchcancel",r.onTouchCancel),r.doGestures(t)},r.onTouchCancel=function(t){r.preventEvent(t),r.emit("touchcancel",t),r.element.off("touchmove",r.onTouchMove),r.element.off("touchend",r.onTouchEnd),r.element.off("touchcancel",r.onTouchCancel),r.doGestures(t)},r.element=e,r.options=n,r.initialGestures(),r.bindTouchStart(),r}return ga(e,t),e.prototype.destroy=function(){this.element.off("touchstart",this.onTouchStart),this.off()},e.prototype.initialGestures=function(){var t=this,e=this.options.gestures||["Pan","Press","Swipe","Tap"];this.gestures=e.map((function(e){return new(0,vS[e])(t)}))},e.prototype.bindTouchStart=function(){this.element.on("touchstart",this.onTouchStart)},e.prototype.preventEvent=function(t){var e=t.type;(this.options.prevents||[]).includes(e)&&t.preventDefault()},e.prototype.doGestures=function(t){this.gestures.forEach((function(e){e.do(t)}))},e}(ft),yS=un,mS="wheel",CS=function(t){function e(e){var n=t.call(this)||this;return n.rafMs=0,n.onPan=function(t){n.raf&&cancelAnimationFrame(n.raf);var e=t.deltaX,r=t.deltaY,i=n.getWrapperEvent(t,e,r);n.emit(mS,i)},n.onSwipe=function(t){var e=t.speedX,r=t.speedY;n.rafMs=hS.now(),n.ms=n.rafMs,0===e&&0===r||n.rafInertia(t)},n.element=e,n.gm=new gS(e,{gestures:["Pan","Swipe"]}),n.gm.on("swipe",n.onSwipe),n.gm.on("pan",n.onPan),n}return ga(e,t),e.prototype.destroy=function(){window.cancelAnimationFrame(this.raf),this.gm.destroy(),this.off()},e.prototype.rafInertia=function(t){var e=this,n=t.speedX,r=t.speedY;this.raf=window.requestAnimationFrame((function(){var i=hS.now(),o=(i-e.ms)/800;if(o<1){o=yS(1-o);var a=i-e.rafMs,l=n*o*a,s=r*o*a,u=e.getWrapperEvent(t,l,s);e.emit(mS,u),e.rafMs=i,e.rafInertia(t)}}))},e.prototype.getWrapperEvent=function(t,e,n){return ya(ya({},t),{deltaX:-e,deltaY:-n})},e}(ft),wS=function(t,e,n,r,i){var o=n+r;return t+i>=o?t:o<t+(e+i)/2?n+r-i:n>t+(e-i)/2?t+e-n>i?n:t+e-i:t+(e-i)/2},xS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),Object.defineProperty(e.prototype,"cellType",{get:function(){return $o.ROW_CELL}
2,enumerable:!1,configurable:!0}),e.prototype.destroy=function(){var e;t.prototype.destroy.call(this),null===(e=this.gm)||void 0===e||e.destroy()},e.prototype.initCell=function(){t.prototype.initCell.call(this),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.drawTextShape(),this.drawConditionIconShapes(),this.drawTreeIcon(),this.drawTreeLeafNodeAlignDot(),this.drawRectBorder(),this.drawResizeAreaInLeaf(),this.drawActionIcons(),this.update()},e.prototype.drawInteractiveBorderShape=function(){this.stateShapes.set("interactiveBorderShape",sx(this,this.getInteractiveBorderShapeStyle(2),{visible:!1}))},e.prototype.drawInteractiveBgShape=function(){this.stateShapes.set("interactiveBgShape",sx(this,ya({},this.getCellArea()),{visible:!1}))},e.prototype.showTreeIcon=function(){return this.spreadsheet.isHierarchyTreeType()&&!this.meta.isLeaf},e.prototype.showTreeLeafNodeAlignDot=function(){var t;return(null===(t=this.spreadsheet.options.style)||void 0===t?void 0:t.showTreeLeafNodeAlignDot)&&this.spreadsheet.isHierarchyTreeType()},e.prototype.getParentTreeIconCfg=function(){if(this.showTreeLeafNodeAlignDot()&&this.spreadsheet.isHierarchyTreeType()&&this.meta.isLeaf)return Uu(this.meta,"parent.belongsCell.treeIcon.cfg")},e.prototype.drawTreeIcon=function(){var t=this;if(this.showTreeIcon()){var e=this.meta,n=e.isCollapsed,r=e.id,i=e.hierarchy,o=this.getContentArea().x,a=this.getTextStyle().fill,l=this.getStyle().icon.size,s=o+this.getContentIndent(),u=this.getIconYPosition();this.treeIcon=px(this,{x:s,y:u,width:l,height:l},a,n,(function(){if(!fw()){if(!n){var e=t.spreadsheet.store.get("scrollY"),o=t.spreadsheet.facet.panelBBox.viewportHeight||0,a=function(t){var e=0,n=t.children;return null===n||void 0===n||n.forEach((function(t){e+=t.height||0})),e}(t.meta),l=i.height-a;if(e>0&&e+o>l){var s=l-o;t.spreadsheet.store.set("scrollY",s>0?s:0)}}t.spreadsheet.emit(uo.ROW_CELL_COLLAPSE_TREE_ROWS,{id:r,isCollapsed:!n,node:t.meta})}})),fw()&&(this.gm=new gS(this,{gestures:["Tap"]}),this.gm.on("tap",(function(){t.spreadsheet.emit(uo.ROW_CELL_COLLAPSE_TREE_ROWS,{id:r,isCollapsed:!n,node:t.meta})})))}},e.prototype.drawTreeLeafNodeAlignDot=function(){var t=this.getParentTreeIconCfg();if(t){var e=this.getStyle().icon,n=e.size,r=e.margin,i=t.x+n+r.right,o=this.getTextPosition().y,a=this.getTextStyle(),l=a.fill,s=a.fontSize,u=n/5;this.treeLeafNodeAlignDot=ux(this,{x:i+n/2,y:o+(s-u)/2,r:u,fill:l,fillOpacity:.3})}},e.prototype.isBolderText=function(){var t=this.meta,e=t.isLeaf,n=t.isTotals,r=t.level;return!e&&0===r||n},e.prototype.drawTextShape=function(){t.prototype.drawTextShape.call(this),this.drawLinkFieldShape()},e.prototype.drawLinkFieldShape=function(){var e=this.headerConfig.linkFields,n=void 0===e?[]:e,r=this.getTextStyle().linkTextFill,i=gb(n,this.meta);t.prototype.drawLinkFieldShape.call(this,i,r)},e.prototype.drawRectBorder=function(){var t=this,e=this.getCellArea().x,n=this.getContentIndent(),r=this.spreadsheet.isHierarchyTreeType()?e:e+n;[Yw.BOTTOM,Yw.LEFT].forEach((function(e){var n=Tx(e,ya(ya({},t.getCellArea()),{x:r}),t.getStyle().cell),i=n.position,o=n.style;hx(t,i,o)}))},e.prototype.drawResizeAreaInLeaf=function(){if(this.meta.isLeaf&&this.shouldDrawResizeAreaByType("rowCellVertical",this)){var t=this.getCellArea(),e=t.x,n=t.y,r=t.width,i=t.height,o=this.getResizeAreaStyle(),a=zb(this.spreadsheet,Eo),l=this.headerConfig,s=l.position,u=l.seriesNumberWidth,c=l.width,h=l.viewportHeight,d=l.scrollX,f=l.scrollY,p={x:e,y:n+i-o.size/2,width:r,height:o.size};if(Fb(p,{x:0,y:0,width:c,height:h},{scrollX:d,scrollY:f})){var v=s.x+e-d+u,g=s.y+n-f,y=this.spreadsheet.isFrozenRowHeader()?c-u-(e-d):r;a.addShape("rect",{attrs:ya(ya({},Pb({id:this.meta.id,theme:o,type:ua.Vertical,effect:ca.Cell,offsetX:v,offsetY:g,width:r,height:i,meta:this.meta})),{x:v,y:g+i-o.size/2,width:y})})}}},e.prototype.getContentIndent=function(){if(!this.spreadsheet.isHierarchyTreeType())return 0;for(var t=this.getStyle(),e=t.icon,n=t.cell,r=e.size+e.margin.right,i=this.meta.parent,o=0;i;)0!==i.height&&(o+=r),i=i.parent;return this.showTreeLeafNodeAlignDot()&&(o+=this.isTreeLevel()?0:n.padding.right+e.margin.right),o},e.prototype.getTextIndent=function(){var t=this.getStyle().icon,e=t.size,n=t.margin;return this.getContentIndent()+(this.showTreeIcon()||this.isTreeLevel()&&this.showTreeLeafNodeAlignDot()?e+n.r
2ight:0)},e.prototype.isTreeLevel=function(){return xp(Uu(this.meta,"parent.children"),(function(t){return!t.isLeaf}))},e.prototype.getIconPosition=function(){var t=this.textShape.cfg.attrs,e=t.x,n=t.y,r=t.textAlign,i=this.getStyle().icon.margin.left;return"left"===r?{x:e+this.actualTextWidth+i,y:n}:"right"===r?{x:e+i,y:n}:{x:e+this.actualTextWidth/2+i,y:n}},e.prototype.getMaxTextWidth=function(){return this.getContentArea().width-this.getTextIndent()-this.getActionIconsWidth()},e.prototype.getTextArea=function(){var t=this.getContentArea(),e=this.getTextIndent();return ya(ya({},t),{x:t.x+e,width:t.width-e})},e.prototype.getTextPosition=function(){var t=this.getTextArea(),e=this.headerConfig,n=e.scrollY,r=e.viewportHeight,i=this.getTextStyle().fontSize,o=wS(t.y,t.height,n,r,i);return{x:Lx(t,this.getTextStyle(),0,this.getIconStyle(),this.getActionIconsCount()).text.x,y:o}},e.prototype.getIconYPosition=function(){var t=this.getTextPosition().y,e=this.getStyle().icon.size;return t+(this.getTextStyle().fontSize-e)/2},e}(aS),bS=function(t,e,n){var r,i,o=(null===(r=n.icon.margin)||void 0===r?void 0:r.left)||0,a=(null===(i=n.icon.margin)||void 0===i?void 0:i.right)||0,l=t.store.get("hiddenColumnsDetail",[]),s=!1,u=!1;l.forEach((function(t){var n,r,i,o;(null===(r=null===(n=null===t||void 0===t?void 0:t.displaySiblingNode)||void 0===n?void 0:n.prev)||void 0===r?void 0:r.field)===e&&(s=!0),(null===(o=null===(i=null===t||void 0===t?void 0:t.displaySiblingNode)||void 0===i?void 0:i.next)||void 0===o?void 0:o.field)===e&&(u=!0)}));var c=Uu(n,"icon.size");return{left:u?c+a:0,right:s?c+o:0}},SS=function(t,e,n){var r=Uu(n,"cell.padding"),i=bS(t,e.field,n);return r.left+r.right+function(t,e,n,r){var i,o,a=Uu(r,"size"),l=Uu(r,"margin"),s=0;return(s=t.options.showDefaultHeaderActionIcon?1:null!==(o=null===(i=Hb(t.options.headerActionIcons,e,n))||void 0===i?void 0:i.iconNames.length)&&void 0!==o?o:0)*(a+l.left)+(s>0?l.right:0)}(t,e,$o.COL_CELL,Uu(n,"icon"))+i.left+i.right},_S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.handleRestOptions=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=wa(t,1),r=n[0];this.headerConfig=ya({},r);var i=this.meta.field,o=this.spreadsheet.dataCfg.sortParams,a=xp(o,(function(t){return(null===t||void 0===t?void 0:t.sortFieldId)===i})),l=oS(a,!0);this.headerConfig.sortParam=ya(ya(ya({},this.headerConfig.sortParam),a||{}),{type:l})},e.prototype.isFrozenCell=function(){var t=this.spreadsheet.options,e=t.frozenColCount,n=t.frozenTrailingColCount,r=this.spreadsheet.facet.layoutResult.colNodes.filter((function(t){return Pw(t)})),i=function(t){for(;!Pw(t);)t=t.parent;return t}(this.meta).colIndex;return Ow(i,e)||Iw(i,n,r.length)},e.prototype.getFormattedFieldValue=function(){return Wb(this.meta,this.spreadsheet.dataSet.getFieldName(this.meta.label))},e.prototype.shouldAddVerticalResizeArea=function(){return!!this.isFrozenCell()||t.prototype.shouldAddVerticalResizeArea.call(this)},e.prototype.getVerticalResizeAreaOffset=function(){var t=this.meta,e=t.x,n=t.y,r=this.headerConfig,i=r.scrollX,o=r.position;return this.isFrozenCell()?{x:e,y:n}:{x:o.x+e-i,y:o.y+n}},e.prototype.getColResizeArea=function(){return this.isFrozenCell()?zb(this.spreadsheet,Ro):t.prototype.getColResizeArea.call(this)},e.prototype.isSortCell=function(){return!0},e.prototype.showSortIcon=function(){return this.spreadsheet.options.showDefaultHeaderActionIcon},e.prototype.getTextStyle=function(){var t=this.getStyle();return null===t||void 0===t?void 0:t.bolderText},e.prototype.getContentArea=function(){var t,e=((null===(t=this.getStyle())||void 0===t?void 0:t.cell)||this.theme.dataCell.cell).padding,n=ya({},e),r=bS(this.spreadsheet,this.meta.field,this.getStyle());return r.left&&(n.left=(n.left||0)+r.left),r.right&&(n.right=(n.right||0)+r.right),bx(this.getCellArea(),n)},e.prototype.getHorizontalResizeAreaName=function(){return"".concat(Bo).concat("table-col-cell")},e.prototype.drawBackgroundShape=function(){var t=this.getStyle().cell.backgroundColor;this.backgroundShape=sx(this,ya(ya({},this.getCellArea()),{fill:t}))},e.prototype.handleViewport=function(t){return this.isFrozenCell()&&(t.start=0),t},e}(lS),ES=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.getStyle=function(t){return t?this.theme[t]:Uu(this,"theme.cornerCell")},e.prototype.showSortIcon=function(){return!1},e.prototype.drawLeftBorder=function(){var t=Tx(Yw.LEFT,this.getCellArea(),this.get
2Style().cell);hx(this,t.position,t.style)},e.prototype.drawBorders=function(){t.prototype.drawBorders.call(this),0===this.meta.colIndex&&this.drawLeftBorder()},e}(_S),LS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.drawTextShape=function(){t.prototype.drawTextShape.call(this),this.drawLinkFieldShape()},e.prototype.drawLinkFieldShape=function(){var e=this.spreadsheet.options.interaction.linkFields,n=void 0===e?[]:e,r=this.theme.rowCell.text.linkTextFill,i=gb(n,this.meta);t.prototype.drawLinkFieldShape.call(this,i,r)},e.prototype.drawBorderShape=function(){t.prototype.drawBorderShape.call(this),0===this.meta.colIndex&&this.drawLeftBorder()},e.prototype.shouldDrawResizeArea=function(){return 0===this.meta.colIndex},e.prototype.drawResizeArea=function(){if(this.shouldDrawResizeArea()){var t=this.getCellArea(),e=t.x,n=t.y,r=t.width,i=t.height,o=this.meta.rowIndex,a=this.getResizeAreaStyle(),l=this.spreadsheet.options,s=l.frozenRowCount,u=l.frozenTrailingRowCount,c=this.spreadsheet.facet.getCellRange(),h=Mw(o,c.start,s),d=Rw(o,c.end,u),f=h||d?Lo:Eo,p=zb(this.spreadsheet,f),v=this.spreadsheet.facet.layoutResult.colsHierarchy.height,g=this.spreadsheet.facet.getScrollOffset().scrollY,y=this.spreadsheet.facet.getPaginationScrollY(),m=n+(d?0:v);d||(m-=h?y:g+y),p.addShape("rect",{attrs:ya(ya({},Pb({id:String(this.meta.rowIndex),theme:a,type:ua.Vertical,effect:ca.Cell,offsetX:e,offsetY:m,width:r,height:i,meta:this.meta})),{x:e,y:m+i-a.size/2,width:r})})}},e}(Sb),TS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),Object.defineProperty(e.prototype,"cellType",{get:function(){return $o.ROW_CELL},enumerable:!1,configurable:!0}),e.prototype.getTextStyle=function(){return this.theme.rowCell.seriesText},e}(LS),OS=function(t){return[ta.META,ta.CONTROL].includes(t.key)},IS=function(t){var e=t.getMeta(),n=e.id,r=e.colIndex,i=e.rowIndex,o=e.rowQuery;return{id:n,colIndex:r,rowIndex:i,type:t.cellType,rowQuery:o}};function MS(t,e){var n=Math.min(t.rowIndex,e.rowIndex),r=Math.max(t.rowIndex,e.rowIndex);return{start:{rowIndex:n,colIndex:Math.min(t.colIndex,e.colIndex)},end:{rowIndex:r,colIndex:Math.max(t.colIndex,e.colIndex)}}}var RS,AS,BS=function(t,e){return e.getRowNodes().filter((function(e){return t.includes(e.id)}
2))},kS=function(t,e){return e.getColumnNodes().filter((function(e){return t.includes(e.id)}))},NS=function(t,e){var n=e.interaction.getSelectedCellHighlight(),r=n.colHeader,i=[{shouldGet:n.rowHeader,getter:BS},{shouldGet:r,getter:kS}].filter((function(t){return t.shouldGet})).reduce((function(n,r){return xa(xa([],wa(n),!1),wa(r.getter(t.id,e)),!1)}),[]).filter((function(t){return!!t.belongsCell})).map((function(t){return IS(t.belongsCell)}));return xa([t],wa(i),!1)},DS=function(t,e){var n=Py(t,(function(t,n){return xa(xa([],wa(t),!1),wa(NS(n,e)),!1)}),[]);return Jm(xa(xa([],wa(t),!1),wa(n),!1),"id")},PS=function(t,e){var n=t.getSelectedCellHighlight(),r=n.colHeader,i=n.rowHeader;r&&t.updateCells(t.getAllColHeaderCells()),i&&t.updateCells(t.getAllRowHeaderCells()),e()},zS=function(t){var e=t.store.get("visibleActionIcons"),n=t.interaction.getInteractedCells(),r=t.interaction.getState().cells;if(Iv(n)&&Iv(r)&&Iv(e))return!1;(Zf(e,(function(t){t.set("visible",!1)})),t.store.set("visibleActionIcons",[]),Zf(n,(function(t){t.hideInteractionShape()})),t.interaction.resetState(),t.options.interaction.selectedCellsSpotlight)&&Zf(t.interaction.getPanelGroupAllUnSelectedDataCells()||[],(function(t){t.clearUnselectedState()}));return!0},FS=function(t,e,n){var r,i,o=n.facet,a=o.panelBBox.width,l=null===o||void 0===o?void 0:o.frozenGroupInfo,s=null!==(r=null===l||void 0===l?void 0:l.frozenCol.width)&&void 0!==r?r:0,u=null!==(i=null===l||void 0===l?void 0:l.frozenTrailingCol.width)&&void 0!==i?i:0,c=o.layoutResult.colLeafNodes[t];return e===la.LEADING?c.x-s:c.x+c.width-(a-u)},HS=function(t,e,n){var r,i,o=n.facet,a=o.viewCellHeights.getCellOffsetY,l=a(t+1),s=o.panelBBox.height,u=null===o||void 0===o?void 0:o.frozenGroupInfo,c=null!==(r=null===u||void 0===u?void 0:u.frozenRow.height)&&void 0!==r?r:0,h=null!==(i=null===u||void 0===u?void 0:u.frozenTrailingRow.height)&&void 0!==i?i:0;return e===la.LEADING?a(t)-c:l-(s-h)},WS=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(t,e){if(Pa(t)&&Pa(e))return e},r=xa(xa([],wa(t),!1),[n],!1);return Rf.apply(void 0,xa([{}],wa(r),!1))},GS=function(t){var e=["rows","columns","values"].reduce((function(e,n){var r=t[n],i=Qm(r);return Mv(i,r)||console.warn("fields.".concat(n,":[").concat(r,"] should be unique")),e[n]=i,e}),{});return ya(ya({},t),e)},jS=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=WS.apply(void 0,xa([qo],wa(t),!1));return n.fields=GS(n.fields),Iv(n.fields.customTreeItems)&&!Iv(n.fields.values)||(n.fields.valueInCols=!1),n},US=function(t){return WS(pa,t)},VS=9e15,YS=1e9,XS="0123456789abcdef",qS="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",KS="3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859502445945534690830264252230825334468503526193
211881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",ZS={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-VS,maxE:VS,crypto:!1},$S=!0,QS="[DecimalError] ",JS=QS+"Invalid argument: ",t_=QS+"Precision limit exceeded",e_=QS+"crypto unavailable",n_="[object Decimal]",r_=Math.floor,i_=Math.pow,o_=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,a_=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,l_=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,s_=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,u_=1e7,c_=qS.length-1,h_=KS.length-1,d_={toStringTag:n_};function f_(t){var e,n,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;e<i;e++)(n=7-(r=t[e]+"").length)&&(o+=__(n)),o+=r;(n=7-(r=(a=t[e])+"").length)&&(o+=__(n))}else if(0===a)return"0";for(;a%10===0;)a/=10;return o+a}function p_(t,e,n){if(t!==~~t||t<e||t>n)throw Error(JS+t)}function v_(t,e,n,r){var i,o,a,l;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=7,i=0):(i=Math.ceil((e+1)/7),e%=7),o=i_(10,7-e),l=t[i]%o|0,null==r?e<3?(0==e?l=l/100|0:1==e&&(l=l/10|0),a=n<4&&99999==l||n>3&&49999==l||5e4==l||0==l):a=(n<4&&l+1==o||n>3&&l+1==o/2)&&(t[i+1]/o/100|0)==i_(10,e-2)-1||(l==o/2||0==l)&&0==(t[i+1]/o/100|0):e<4?(0==e?l=l/1e3|0:1==e?l=l/100|0:2==e&&(l=l/10|0),a=(r||n<4)&&9999==l||!r&&n>3&&4999==l):a=((r||n<4)&&l+1==o||!r&&n>3&&l+1==o/2)&&(t[i+1]/o/1e3|0)==i_(10,e-3)-1,a}function g_(t,e,n){for(var r,i,o=[0],a=0,l=t.length;a<l;){for(i=o.length;i--;)o[i]*=e;
2for(o[0]+=XS.indexOf(t.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}d_.absoluteValue=d_.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),m_(t)},d_.ceil=function(){return m_(new this.constructor(this),this.e+1,2)},d_.clampedTo=d_.clamp=function(t,e){var n=this,r=n.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(JS+e);return n.cmp(t)<0?t:n.cmp(e)>0?e:new r(n)},d_.comparedTo=d_.cmp=function(t){var e,n,r,i,o=this,a=o.d,l=(t=new o.constructor(t)).d,s=o.s,u=t.s;if(!a||!l)return s&&u?s!==u?s:a===l?0:!a^s<0?1:-1:NaN;if(!a[0]||!l[0])return a[0]?s:l[0]?-u:0;if(s!==u)return s;if(o.e!==t.e)return o.e>t.e^s<0?1:-1;for(e=0,n=(r=a.length)<(i=l.length)?r:i;e<n;++e)if(a[e]!==l[e])return a[e]>l[e]^s<0?1:-1;return r===i?0:r>i^s<0?1:-1},d_.cosine=d_.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r,i;if(e.isZero())return e;r=e.d.length,r<32?i=(1/k_(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");t.precision+=n,e=B_(t,1,e.times(i),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(r,N_(r,n)),r.precision=t,r.rounding=e,m_(2==AS||3==AS?n.neg():n,t,e,!0)):new r(1):new r(NaN)},d_.cubeRoot=d_.cbrt=function(){var t,e,n,r,i,o,a,l,s,u,c=this,h=c.constructor;if(!c.isFinite()||c.isZero())return new h(c);for($S=!1,(o=c.s*i_(c.s*c,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(n=f_(c.d),(o=((t=c.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=i_(n,1/3),t=r_((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=c.s),a=(t=h.precision)+3;;)if(u=(s=(l=r).times(l).times(l)).plus(c),r=y_(u.plus(c).times(l),u.plus(s),a+2,1),f_(l.d).slice(0,a)===(n=f_(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(m_(r,t+1,1),e=!r.times(r).times(r).eq(c));break}if(!i&&(m_(l,t+1,0),l.times(l).times(l).eq(c))){r=l;break}a+=4,i=1}return $S=!0,m_(r,t,h.rounding,e)},d_.decimalPlaces=d_.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=7*((t=e.length-1)-r_(this.e/7)),t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},d_.dividedBy=d_.div=function(t){return y_(this,new this.constructor(t))},d_.dividedToIntegerBy=d_.divToInt=function(t){var e=this.constructor;return m_(y_(this,new e(t),0,1,1),e.precision,e.rounding)},d_.equals=d_.eq=function(t){return 0===this.cmp(t)},d_.floor=function(){return m_(new this.constructor(this),this.e+1,3)},d_.greaterThan=d_.gt=function(t){return this.cmp(t)>0},d_.greaterThanOrEqualTo=d_.gte=function(t){var e=this.cmp(t);return 1==e||0===e},d_.hyperbolicCosine=d_.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,l=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return l;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?e=(1/k_(4,t=Math.ceil(i/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=B_(a,1,o.times(e),new a(1),!0);for(var s,u=t,c=new a(8);u--;)s=o.times(o),o=l.minus(s.times(c.minus(s.times(c))));return m_(o,a.precision=n,a.rounding=r,!0)},d_.hyperbolicSine=d_.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=B_(o,2,i,i,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,i=B_(o,2,i=i.times(1/k_(5,t)),i,!0);for(var a,l=new o(5),s=new o(16),u=new o(20);t--;)a=i.times(i),i=i.times(l.plus(a.times(s.times(a).plus(u))))}return o.precision=e,o.rounding=n,m_(i,e,n,!0)},d_.hyperbolicTangent=d_.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,y_(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)},d_.inverseCosine=d_.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?e.isNeg()?b_(n,i,o):new n(0):new n(NaN):e.isZero()?b_(n,i+4,o).times(.5):(n.precision=i+6,n.roun
2ding=1,e=e.asin(),t=b_(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))},d_.inverseHyperbolicCosine=d_.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,$S=!1,n=n.times(n).minus(1).sqrt().plus(n),$S=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)},d_.inverseHyperbolicSine=d_.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,$S=!1,n=n.times(n).plus(1).sqrt().plus(n),$S=!0,r.precision=t,r.rounding=e,n.ln())},d_.inverseHyperbolicTangent=d_.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?m_(new o(i),t,e,!0):(o.precision=n=r-i.e,i=y_(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)},d_.inverseSine=d_.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==e?0===e?((t=b_(o,n+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},d_.inverseTangent=d_.atan=function(){var t,e,n,r,i,o,a,l,s,u=this,c=u.constructor,h=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&h+4<=h_)return(a=b_(c,h+4,d).times(.25)).s=u.s,a}else{if(!u.s)return new c(NaN);if(h+4<=h_)return(a=b_(c,h+4,d).times(.5)).s=u.s,a}for(c.precision=l=h+10,c.rounding=1,t=n=Math.min(28,l/7+2|0);t;--t)u=u.div(u.times(u).plus(1).sqrt().plus(1));for($S=!1,e=Math.ceil(l/7),r=1,s=u.times(u),a=new c(u),i=u;-1!==t;)if(i=i.times(s),o=a.minus(i.div(r+=2)),i=i.times(s),void 0!==(a=o.plus(i.div(r+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<<n-1)),$S=!0,m_(a,c.precision=h,c.rounding=d,!0)},d_.isFinite=function(){return!!this.d},d_.isInteger=d_.isInt=function(){return!!this.d&&r_(this.e/7)>this.d.length-2},d_.isNaN=function(){return!this.s},d_.isNegative=d_.isNeg=function(){return this.s<0},d_.isPositive=d_.isPos=function(){return this.s>0},d_.isZero=function(){return!!this.d&&0===this.d[0]},d_.lessThan=d_.lt=function(t){return this.cmp(t)<0},d_.lessThanOrEqualTo=d_.lte=function(t){return this.cmp(t)<1},d_.logarithm=d_.log=function(t){var e,n,r,i,o,a,l,s,u=this,c=u.constructor,h=c.precision,d=c.rounding;if(null==t)t=new c(10),e=!0;else{if(n=(t=new c(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(n=u.d,u.s<0||!n||!n[0]||u.eq(1))return new c(n&&!n[0]?-1/0:1!=u.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10===0;)i/=10;o=1!==i}if($S=!1,a=I_(u,l=h+5),r=e?x_(c,l+10):I_(t,l),v_((s=y_(a,r,l,1)).d,i=h,d))do{if(a=I_(u,l+=10),r=e?x_(c,l+10):I_(t,l),s=y_(a,r,l,1),!o){+f_(s.d).slice(i+1,i+15)+1==1e14&&(s=m_(s,h+1,0));break}}while(v_(s.d,i+=10,d));return $S=!0,m_(s,h,d)},d_.minus=d_.sub=function(t){var e,n,r,i,o,a,l,s,u,c,h,d,f=this,p=f.constructor;if(t=new p(t),!f.d||!t.d)return f.s&&t.s?f.d?t.s=-t.s:t=new p(t.d||f.s!==t.s?f:NaN):t=new p(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.plus(t);if(u=f.d,d=t.d,l=p.precision,s=p.rounding,!u[0]||!d[0]){if(d[0])t.s=-t.s;else{if(!u[0])return new p(3===s?-0:0);t=new p(f)}return $S?m_(t,l,s):t}if(n=r_(t.e/7),c=r_(f.e/7),u=u.slice(),o=c-n){for((h=o<0)?(e=u,o=-o,a=d.length):(e=d,n=c,a=u.length),o>(r=Math.max(Math.ceil(l/7),a)+2)&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for((h=(r=u.length)<(a=d.length))&&(a=r),r=0;r<a;r++)if(u[r]!=d[r]){h=u[r]<d[r];break}o=0}for(h&&(e=u,u=d,d=e,t.s=-t.s),a=u.length,r=d.length-a;r>0;--r)u[a++]=0;for(r=d.length;r>o;){if(u[--r]<d[r]){for(i=r;i&&0===u[--i];)u[i]=u_-1;--u[i],u[r]+=u_}u[r]-=d[r]}for(;0===u[--a];)u.pop();for(;0===u[0];u.shift())--n;return u[0]?(t.d=u,t.e=w_(u,n),$S?m_(t,l,s):t):new p(3===s?-0:0)},d_.modulo=d_.mod=function(t){var e,n=this,r=n.constructor;return t=new r(t),!n.d||!t.s||t.d&&!t.d[0]?new r(NaN):!t.d||n.d&&!n.d[0]?m_(new r(n),r.precision,r.rounding):($S=!1,9==r.modulo?(e=y_(n,t.abs(),0,3,1)).s*=t.s:e=y_(n,t,0,r.modulo,1),e=e.times(t),$
2S=!0,n.minus(e))},d_.naturalExponential=d_.exp=function(){return O_(this)},d_.naturalLogarithm=d_.ln=function(){return I_(this)},d_.negated=d_.neg=function(){var t=new this.constructor(this);return t.s=-t.s,m_(t)},d_.plus=d_.add=function(t){var e,n,r,i,o,a,l,s,u,c,h=this,d=h.constructor;if(t=new d(t),!h.d||!t.d)return h.s&&t.s?h.d||(t=new d(t.d||h.s===t.s?h:NaN)):t=new d(NaN),t;if(h.s!=t.s)return t.s=-t.s,h.minus(t);if(u=h.d,c=t.d,l=d.precision,s=d.rounding,!u[0]||!c[0])return c[0]||(t=new d(h)),$S?m_(t,l,s):t;if(o=r_(h.e/7),r=r_(t.e/7),u=u.slice(),i=o-r){for(i<0?(n=u,i=-i,a=c.length):(n=c,r=o,a=u.length),i>(a=(o=Math.ceil(l/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=u.length)-(i=c.length)<0&&(i=a,n=c,c=u,u=n),e=0;i;)e=(u[--i]=u[i]+c[i]+e)/u_|0,u[i]%=u_;for(e&&(u.unshift(e),++r),a=u.length;0==u[--a];)u.pop();return t.d=u,t.e=w_(u,r),$S?m_(t,l,s):t},d_.precision=d_.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(JS+t);return n.d?(e=S_(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},d_.round=function(){var t=this,e=t.constructor;return m_(new e(t),t.e+1,e.rounding)},d_.sine=d_.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r=e.d.length;if(r<3)return e.isZero()?e:B_(t,2,e,e);n=(n=1.4*Math.sqrt(r))>16?16:0|n,e=e.times(1/k_(5,n)),e=B_(t,2,e,e);for(var i,o=new t(5),a=new t(16),l=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(l))));return e}(r,N_(r,n)),r.precision=t,r.rounding=e,m_(AS>2?n.neg():n,t,e,!0)):new r(NaN)},d_.squareRoot=d_.sqrt=function(){var t,e,n,r,i,o,a=this,l=a.d,s=a.e,u=a.s,c=a.constructor;if(1!==u||!l||!l[0])return new c(!u||u<0&&(!l||l[0])?NaN:l?a:1/0);for($S=!1,0==(u=Math.sqrt(+a))||u==1/0?(((e=f_(l)).length+s)%2==0&&(e+="0"),u=Math.sqrt(e),s=r_((s+1)/2)-(s<0||s%2),r=new c(e=u==1/0?"5e"+s:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+s)):r=new c(u.toString()),n=(s=c.precision)+3;;)if(r=(o=r).plus(y_(a,o,n+2,1)).times(.5),f_(o.d).slice(0,n)===(e=f_(r.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(m_(r,s+1,1),t=!r.times(r).eq(a));break}if(!i&&(m_(o,s+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return $S=!0,m_(r,s,c.rounding,t)},d_.tangent=d_.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(n=n.sin()).s=1,n=y_(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,m_(2==AS||4==AS?n.neg():n,t,e,!0)):new r(NaN)},d_.times=d_.mul=function(t){var e,n,r,i,o,a,l,s,u,c=this,h=c.constructor,d=c.d,f=(t=new h(t)).d;if(t.s*=c.s,!d||!d[0]||!f||!f[0])return new h(!t.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:d&&f?0*t.s:t.s/0);for(n=r_(c.e/7)+r_(t.e/7),(s=d.length)<(u=f.length)&&(o=d,d=f,f=o,a=s,s=u,u=a),o=[],r=a=s+u;r--;)o.push(0);for(r=u;--r>=0;){for(e=0,i=s+r;i>r;)l=o[i]+f[r]*d[i-r-1]+e,o[i--]=l%u_|0,e=l/u_|0;o[i]=(o[i]+e)%u_|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=w_(o,n),$S?m_(t,h.precision,h.rounding):t},d_.toBinary=function(t,e){return D_(this,2,t,e)},d_.toDecimalPlaces=d_.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(p_(t,0,YS),void 0===e?e=r.rounding:p_(e,0,8),m_(n,t+n.e+1,e))},d_.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=C_(r,!0):(p_(t,0,YS),void 0===e?e=i.rounding:p_(e,0,8),n=C_(r=m_(new i(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n},d_.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?n=C_(i):(p_(t,0,YS),void 0===e?e=o.rounding:p_(e,0,8),n=C_(r=m_(new o(i),t+i.e+1,e),!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},d_.toFraction=function(t){var e,n,r,i,o,a,l,s,u,c,h,d,f=this,p=f.d,v=f.constructor;if(!p)return new v(f);if(u=n=new v(1),r=s=new v(0),a=(o=(e=new v(r)).e=S_(p)-f.e-1)%7,e.d[0]=i_(10,a<0?7+a:a),null==t)t=o>0?e:u;else{if(!(l=new v(t)).isInt()||l.lt(u))throw Error(JS+l);t=l.gt(e)?o>0?e:u:l}for($S=!1,l=new v(f_(p)),c=v.precision,v.precision=o=7*p.length*2;h=y_(l,e,0,1,1),1!=(i=n.plus(h.times(r))).cmp(t);)n=r,r=i,i=u,u=s.plus(h.times(i)),s=i,i=e,e=l.minus(h.times(i)),l=i;return i=y_(t.minus(n),r,0,1,1),s=s.plus(i.times(u)),n=n.plus(i.times(r)),s.s=u.s=f.s,d=y_(u,r,o,1).minus(f).abs().cmp(y_(s,n,o,1).minus(f).abs())<1?[u,r]:[s,n],v.precision=c,$S=!0,d},d_.toHexadecimal=d_.toHex=function(t,e){return D_(this,16,t,e)},d_.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),null==t){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:p_(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}
2return t.d[0]?($S=!1,n=y_(n,t,0,e,1).times(t),$S=!0,m_(n)):(t.s=n.s,n=t),n},d_.toNumber=function(){return+this},d_.toOctal=function(t,e){return D_(this,8,t,e)},d_.toPower=d_.pow=function(t){var e,n,r,i,o,a,l=this,s=l.constructor,u=+(t=new s(t));if(!l.d||!t.d||!l.d[0]||!t.d[0])return new s(i_(+l,u));if((l=new s(l)).eq(1))return l;if(r=s.precision,o=s.rounding,t.eq(1))return m_(l,r,o);if((e=r_(t.e/7))>=t.d.length-1&&(n=u<0?-u:u)<=9007199254740991)return i=E_(s,l,n,r),t.s<0?new s(1).div(i):m_(i,r,o);if((a=l.s)<0){if(e<t.d.length-1)return new s(NaN);if(0==(1&t.d[e])&&(a=1),0==l.e&&1==l.d[0]&&1==l.d.length)return l.s=a,l}return(e=0!=(n=i_(+l,u))&&isFinite(n)?new s(n+"").e:r_(u*(Math.log("0."+f_(l.d))/Math.LN10+l.e+1)))>s.maxE+1||e<s.minE-1?new s(e>0?a/0:0):($S=!1,s.rounding=l.s=1,n=Math.min(12,(e+"").length),(i=O_(t.times(I_(l,r+n)),r)).d&&v_((i=m_(i,r+5,1)).d,r,o)&&(e=r+10,+f_((i=m_(O_(t.times(I_(l,e+n)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=m_(i,r+1,0))),i.s=a,$S=!0,s.rounding=o,m_(i,r,o))},d_.toPrecision=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=C_(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(p_(t,1,YS),void 0===e?e=i.rounding:p_(e,0,8),n=C_(r=m_(new i(r),t,e),t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n},d_.toSignificantDigits=d_.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(p_(t,1,YS),void 0===e?e=n.rounding:p_(e,0,8)),m_(new n(this),t,e)},d_.toString=function(){var t=this,e=t.constructor,n=C_(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},d_.truncated=d_.trunc=function(){return m_(new this.constructor(this),this.e+1,1)},d_.valueOf=d_.toJSON=function(){var t=this,e=t.constructor,n=C_(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var y_=function(){function t(t,e,n){var r,i=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+i,t[o]=r%n|0,i=r/n|0;return i&&t.unshift(i),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*r+t[n]-e[n];for(;!t[0]&&t.length>1;)t.shift()}return function(r,i,o,a,l,s){var u,c,h,d,f,p,v,g,y,m,C,w,x,b,S,_,E,L,T,O,I=r.constructor,M=r.s==i.s?1:-1,R=r.d,A=i.d;if(!R||!R[0]||!A||!A[0])return new I(r.s&&i.s&&(R?!A||R[0]!=A[0]:A)?R&&0==R[0]||!A?0*M:M/0:NaN);for(s?(f=1,c=r.e-i.e):(s=u_,f=7,c=r_(r.e/f)-r_(i.e/f)),T=A.length,E=R.length,m=(y=new I(M)).d=[],h=0;A[h]==(R[h]||0);h++);if(A[h]>(R[h]||0)&&c--,null==o?(b=o=I.precision,a=I.rounding):b=l?o+(r.e-i.e)+1:o,b<0)m.push(1),p=!0;else{if(b=b/f+2|0,h=0,1==T){for(d=0,A=A[0],b++;(h<E||d)&&b--;h++)S=d*s+(R[h]||0),m[h]=S/A|0,d=S%A|0;p=d||h<E}else{for((d=s/(A[0]+1)|0)>1&&(A=t(A,d,s),R=t(R,d,s),T=A.length,E=R.length),_=T,w=(C=R.slice(0,T)).length;w<T;)C[w++]=0;(O=A.slice()).unshift(0),L=A[0],A[1]>=s/2&&++L;do{d=0,(u=e(A,C,T,w))<0?(x=C[0],T!=w&&(x=x*s+(C[1]||0)),(d=x/L|0)>1?(d>=s&&(d=s-1),1==(u=e(v=t(A,d,s),C,g=v.length,w=C.length))&&(d--,n(v,T<g?O:A,g,s))):(0==d&&(u=d=1),v=A.slice()),(g=v.length)<w&&v.unshift(0),n(C,v,w,s),-1==u&&(u=e(A,C,T,w=C.length))<1&&(d++,n(C,T<w?O:A,w,s)),w=C.length):0===u&&(d++,C=[0]),m[h++]=d,u&&C[0]?C[w++]=R[_]||0:(C=[R[_]],w=1)}while((_++<E||void 0!==C[0])&&b--);p=void 0!==C[0]}m[0]||m.shift()}if(1==f)y.e=c,RS=p;else{for(h=1,d=m[0];d>=10;d/=10)h++;y.e=h+c*f-1,m_(y,l?o+y.e+1:o,a,p)}return y}}();function m_(t,e,n,r){var i,o,a,l,s,u,c,h,d,f=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(i=1,l=h[0];l>=10;l/=10)i++;if((o=e-i)<0)o+=7,a=e,s=(c=h[d=0])/i_(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(l=h.length)){if(!r)break t;for(;l++<=d;)h.push(0);c=s=0,i=1,a=(o%=7)-7+1}else{for(c=l=h[d],i=1;l>=10;l/=10)i++;s=(a=(o%=7)-7+i)<0?0:c/i_(10,i-a-1)%10|0}if(r=r||e<0||void 0!==h[d+1]||(a<0?c:c%i_(10,i-a-1)),u=n<4?(s||r)&&(0==n||n==(t.s<0?3:2)):s>5||5==s&&(4==n||r||6==n&&(o>0?a>0?c/i_(10,i-a):0:h[d-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,u?(e-=t.e+1,h[0]=i_(10,(7-e%7)%7),t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=d,l=1,d--):(h.length=d+1,l=i_(10,7-o),h[d]=a>0?(c/i_(10,i-a)%i_(10,a)|0)*l:0),u)for(;;){if(0==d){for(o=1,a=h[0];a>=10;a/=10)o++;for(a=h[0]+=l,l=1;a>=10;a/=10)l++;o!=l&&(t.e++,h[0]==u_&&(h[0]=1));break}if(h[d]+=l,h[d]!=u_)break;h[d--]=0,l=1}for(o=h.length;0===h[--o];)h.pop()}return $S&&(t.e>f.maxE?(t.d=null,t.e=NaN):t.e<f.minE&&(t.e=0,t.d=[0])),t}function C_(t,e,n){if(!t.isFinite())return M_(t);var r,i=t.e,o=f_(t.d),a=o.length;return e?(n&&(r=n-a)>
20?o=o.charAt(0)+"."+o.slice(1)+__(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+__(-i-1)+o,n&&(r=n-a)>0&&(o+=__(r))):i>=a?(o+=__(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+__(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=__(r))),o}function w_(t,e){var n=t[0];for(e*=7;n>=10;n/=10)e++;return e}function x_(t,e,n){if(e>c_)throw $S=!0,n&&(t.precision=n),Error(t_);return m_(new t(qS),e,1,!0)}function b_(t,e,n){if(e>h_)throw Error(t_);return m_(new t(KS),e,n,!0)}function S_(t){var e=t.length-1,n=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function __(t){for(var e="";t--;)e+="0";return e}function E_(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/7+4);for($S=!1;;){if(n%2&&P_((o=o.times(e)).d,a)&&(i=!0),0===(n=r_(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}P_((e=e.times(e)).d,a)}return $S=!0,o}function L_(t){return 1&t.d[t.d.length-1]}function T_(t,e,n){for(var r,i=new t(e[0]),o=0;++o<e.length;){if(!(r=new t(e[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function O_(t,e){var n,r,i,o,a,l,s,u=0,c=0,h=0,d=t.constructor,f=d.rounding,p=d.precision;if(!t.d||!t.d[0]||t.e>17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?($S=!1,s=p):s=e,l=new d(.03125);t.e>-2;)t=t.times(l),h+=5;for(s+=r=Math.log(i_(2,h))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=s;;){if(o=m_(o.times(t),s,1),n=n.times(++c),f_((l=a.plus(y_(o,n,s,1))).d).slice(0,s)===f_(a.d).slice(0,s)){for(i=h;i--;)a=m_(a.times(a),s,1);if(null!=e)return d.precision=p,a;if(!(u<3&&v_(a.d,s-r,f,u)))return m_(a,d.precision=p,f,$S=!0);d.precision=s+=10,n=o=l=new d(1),c=0,u++}a=l}}function I_(t,e){var n,r,i,o,a,l,s,u,c,h,d,f=1,p=t,v=p.d,g=p.constructor,y=g.rounding,m=g.precision;if(p.s<0||!v||!v[0]||!p.e&&1==v[0]&&1==v.length)return new g(v&&!v[0]?-1/0:1!=p.s?NaN:v?0:p);if(null==e?($S=!1,c=m):c=e,g.precision=c+=10,r=(n=f_(v)).charAt(0),!(Math.abs(o=p.e)<15e14))return u=x_(g,c+2,m).times(o+""),p=I_(new g(r+"."+n.slice(1)),c-10).plus(u),g.precision=m,null==e?m_(p,m,y,$S=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=f_((p=p.times(t)).d)).charAt(0),f++;for(o=p.e,r>1?(p=new g("0."+n),o++):p=new g(r+"."+n.slice(1)),h=p,s=a=p=y_(p.minus(1),p.plus(1),c,1),d=m_(p.times(p),c,1),i=3;;){if(a=m_(a.times(d),c,1),f_((u=s.plus(y_(a,new g(i),c,1))).d).slice(0,c)===f_(s.d).slice(0,c)){if(s=s.times(2),0!==o&&(s=s.plus(x_(g,c+2,m).times(o+""))),s=y_(s,new g(f),c,1),null!=e)return g.precision=m,s;if(!v_(s.d,c-10,y,l))return m_(s,g.precision=m,y,$S=!0);g.precision=c+=10,u=a=p=y_(h.minus(1),h.plus(1),c,1),d=m_(p.times(p),c,1),i=l=1}s=u,i+=2}}function M_(t){return String(t.s*t.s/0)}function R_(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);r++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(r,i)){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=7;r<i;)t.d.push(+e.slice(r,r+=7));r=7-(e=e.slice(r)).length}else r-=i;for(;r--;)e+="0";t.d.push(+e),$S&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function A_(t,e){var n,r,i,o,a,l,s,u,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),s_.test(e))return R_(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(a_.test(e))n=16,e=e.toLowerCase();else if(o_.test(e))n=2;else{if(!l_.test(e))throw Error(JS+e);n=8}for((o=e.search(/p/i))>0?(s=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),a=(o=e.indexOf("."))>=0,r=t.constructor,a&&(o=(l=(e=e.replace(".","")).length)-o,i=E_(r,new r(n),o,2*o)),o=c=(u=g_(e,n,u_)).length-1;0===u[o];--o)u.pop();return o<0?new r(0*t.s):(t.e=w_(u,c),t.d=u,$S=!1,a&&(t=y_(t,i,4*l)),s&&(t=t.times(Math.abs(s)<54?i_(2,s):EE.pow(2,s))),$S=!0,t)}function B_(t,e,n,r,i){var o,a,l,s,u=t.precision,c=Math.ceil(u/7);for($S=!1,s=n.times(n),l=new t(r);;){if(a=y_(l.times(s),new t(e++*e++),u,1),l=i?r.plus(a):r.minus(a),r=y_(a.times(s),new t(e++*e++),u,1),void 0!==(a=l.plus(r)).d[c]){for(o=c;a.d[o]===l.d[o]&&o--;);if(-1==o)break}
2o=l,l=r,r=a,a=o}return $S=!0,a.d.length=c+1,a}function k_(t,e){for(var n=t;--e;)n*=t;return n}function N_(t,e){var n,r=e.s<0,i=b_(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return AS=r?4:1,e;if((n=e.divToInt(i)).isZero())AS=r?3:2;else{if((e=e.minus(n.times(i))).lte(o))return AS=L_(n)?r?2:3:r?4:1,e;AS=L_(n)?r?1:4:r?3:2}return e.minus(i).abs()}function D_(t,e,n,r){var i,o,a,l,s,u,c,h,d,f=t.constructor,p=void 0!==n;if(p?(p_(n,1,YS),void 0===r?r=f.rounding:p_(r,0,8)):(n=f.precision,r=f.rounding),t.isFinite()){for(p?(i=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):i=e,(a=(c=C_(t)).indexOf("."))>=0&&(c=c.replace(".",""),(d=new f(1)).e=c.length-a,d.d=g_(C_(d),10,i),d.e=d.d.length),o=s=(h=g_(c,10,i)).length;0==h[--s];)h.pop();if(h[0]){if(a<0?o--:((t=new f(t)).d=h,t.e=o,h=(t=y_(t,d,n,r,0,i)).d,o=t.e,u=RS),a=h[n],l=i/2,u=u||void 0!==h[n+1],u=r<4?(void 0!==a||u)&&(0===r||r===(t.s<0?3:2)):a>l||a===l&&(4===r||u||6===r&&1&h[n-1]||r===(t.s<0?8:7)),h.length=n,u)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(s=h.length;!h[s-1];--s);for(a=0,c="";a<s;a++)c+=XS.charAt(h[a]);if(p){if(s>1)if(16==e||8==e){for(a=16==e?4:3,--s;s%a;s++)c+="0";for(s=(h=g_(c,i,e)).length;!h[s-1];--s);for(a=1,c="1.";a<s;a++)c+=XS.charAt(h[a])}else c=c.charAt(0)+"."+c.slice(1);c=c+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)c="0"+c;c="0."+c}else if(++o>s)for(o-=s;o--;)c+="0";else o<s&&(c=c.slice(0,o)+"."+c.slice(o))}else c=p?"0p+0":"0";c=(16==e?"0x":2==e?"0b":8==e?"0o":"")+c}else c=M_(t);return t.s<0?"-"+c:c}function P_(t,e){if(t.length>e)return t.length=e,!0}function z_(t){return new this(t).abs()}function F_(t){return new this(t).acos()}function H_(t){return new this(t).acosh()}function W_(t,e){return new this(t).plus(e)}function G_(t){return new this(t).asin()}function j_(t){return new this(t).asinh()}function U_(t){return new this(t).atan()}function V_(t){return new this(t).atanh()}function Y_(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?b_(this,r,i):new this(0)).s=t.s:!t.d||e.isZero()?(n=b_(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(y_(t,e,o,1)),e=b_(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(y_(t,e,o,1)):(n=b_(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function X_(t){return new this(t).cbrt()}function q_(t){return m_(t=new this(t),t.e+1,2)}function K_(t,e,n){return new this(t).clamp(e,n)}function Z_(t){if(!t||"object"!==typeof t)throw Error(QS+"Object expected");var e,n,r,i=!0===t.defaults,o=["precision",1,YS,"rounding",0,8,"toExpNeg",-VS,0,"toExpPos",0,VS,"maxE",0,VS,"minE",-VS,0,"modulo",0,9];for(e=0;e<o.length;e+=3)if(n=o[e],i&&(this[n]=ZS[n]),void 0!==(r=t[n])){if(!(r_(r)===r&&r>=o[e+1]&&r<=o[e+2]))throw Error(JS+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=ZS[n]),void 0!==(r=t[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(JS+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(e_);this[n]=!0}else this[n]=!1}return this}function $_(t){return new this(t).cos()}function Q_(t){return new this(t).cosh()}function J_(t,e){return new this(t).div(e)}function tE(t){return new this(t).exp()}function eE(t){return m_(t=new this(t),t.e+1,3)}function nE(){var t,e,n=new this(0);for($S=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)n.d&&(n=n.plus(e.times(e)));else{if(e.s)return $S=!0,new this(1/0);n=e}return $S=!0,n.sqrt()}function rE(t){return t instanceof EE||t&&t.toStringTag===n_||!1}function iE(t){return new this(t).ln()}function oE(t,e){return new this(t).log(e)}function aE(t){return new this(t).log(2)}function lE(t){return new this(t).log(10)}function sE(){return T_(this,arguments,"lt")}function uE(){return T_(this,arguments,"gt")}function cE(t,e){return new this(t).mod(e)}function hE(t,e){return new this(t).mul(e)}function dE(t,e){return new this(t).pow(e)}function fE(t){var e,n,r,i,o=0,a=new this(1),l=[];if(void 0===t?t=this.precision:p_(t,1,YS),r=Math.ceil(t/7),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=e[o])>=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:l[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(e_);for(e=crypto.randomBytes(r*=4);o<r;)(i=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((127&e[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,o):(l.push(i%1e7),o+=4);o=r/4}else for(;o<r;)l[o++]=1e7*Math.random()|0;for(t%=7,(r=l[--o])&&t&&(i=i_(10,7-t),l[o]=(r/i|0)*i);0===l[o];o--)l.pop();if(o<0)n=0,l=[0];else{for(n=-1;0===l[0];n-=7)l.shift();for(r=1,i=l[0];i>=10;
2i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=l,a}function pE(t){return m_(t=new this(t),t.e+1,this.rounding)}function vE(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function gE(t){return new this(t).sin()}function yE(t){return new this(t).sinh()}function mE(t){return new this(t).sqrt()}function CE(t,e){return new this(t).sub(e)}function wE(){var t=0,e=arguments,n=new this(e[t]);for($S=!1;n.s&&++t<e.length;)n=n.plus(e[t]);return $S=!0,m_(n,this.precision,this.rounding)}function xE(t){return new this(t).tan()}function bE(t){return new this(t).tanh()}function SE(t){return m_(t=new this(t),t.e+1,1)}d_[Symbol.for("nodejs.util.inspect.custom")]=d_.toString,d_[Symbol.toStringTag]="Decimal";var _E,EE=d_.constructor=function t(e){var n,r,i;function o(t){var e,n,r,i=this;if(!(i instanceof o))return new o(t);if(i.constructor=o,rE(t))return i.s=t.s,void($S?!t.d||t.e>o.maxE?(i.e=NaN,i.d=null):t.e<o.minE?(i.e=0,i.d=[0]):(i.e=t.e,i.d=t.d.slice()):(i.e=t.e,i.d=t.d?t.d.slice():t.d));if("number"===(r=typeof t)){if(0===t)return i.s=1/t<0?-1:1,i.e=0,void(i.d=[0]);if(t<0?(t=-t,i.s=-1):i.s=1,t===~~t&&t<1e7){for(e=0,n=t;n>=10;n/=10)e++;return void($S?e>o.maxE?(i.e=NaN,i.d=null):e<o.minE?(i.e=0,i.d=[0]):(i.e=e,i.d=[t]):(i.e=e,i.d=[t]))}return 0*t!==0?(t||(i.s=NaN),i.e=NaN,void(i.d=null)):R_(i,t.toString())}if("string"!==r)throw Error(JS+t);return 45===(n=t.charCodeAt(0))?(t=t.slice(1),i.s=-1):(43===n&&(t=t.slice(1)),i.s=1),s_.test(t)?R_(i,t):A_(i,t)}if(o.prototype=d_,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=Z_,o.clone=t,o.isDecimal=rE,o.abs=z_,o.acos=F_,o.acosh=H_,o.add=W_,o.asin=G_,o.asinh=j_,o.atan=U_,o.atanh=V_,o.atan2=Y_,o.cbrt=X_,o.ceil=q_,o.clamp=K_,o.cos=$_,o.cosh=Q_,o.div=J_,o.exp=tE,o.floor=eE,o.hypot=nE,o.ln=iE,o.log=oE,o.log10=lE,o.log2=aE,o.max=sE,o.min=uE,o.mod=cE,o.mul=hE,o.pow=dE,o.random=fE,o.round=pE,o.sign=vE,o.sin=gE,o.sinh=yE,o.sqrt=mE,o.sub=CE,o.sum=wE,o.tan=xE,o.tanh=bE,o.trunc=SE,void 0===e&&(e={}),e&&!0!==e.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)e.hasOwnProperty(r=i[n++])||(e[r]=this[r]);return o.config(e),o}(ZS);qS=new EE(qS),KS=new EE(KS);var LE,TE=function(t){return"number"===typeof t?Number.isNaN(t):!t||("string"!==typeof t||Number.isNaN(Number(t)))},OE=function(t,e,n){return void 0===n&&(n=!1),(null===t||void 0===t?void 0:t.length)?t.reduce((function(t,r){var i=Uu(r,e),o=TE(i);if(n&&o)return t;var a=o?0:i;return t.push(new EE(a)),t}),[]):[]},IE=function(t,e){var n=OE(t,e);return n.length?EE.sum.apply(EE,xa([],wa(n),!1)).toNumber():0},ME=function(t,e,n){var r=OE(e,n,!0);if(null===r||void 0===r?void 0:r.length)return EE[t].apply(EE,xa([],wa(r),!1)).toNumber()},RE=((_E={})[Xw.SUM]=IE,_E[Xw.MIN]=function(t,e){return ME("min",t,e)},_E[Xw.MAX]=function(t,e){return ME("max",t,e)},_E[Xw.AVG]=function(t,e){var n=OE(t,e);return(null===n||void 0===n?void 0:n.length)?EE.sum.apply(EE,xa([],wa(n),!1)).dividedBy(n.length).toNumber():0},_E),AE=function(t){return ya({operator:{onClick:Al,menus:[]},enterable:!0,enableFormat:!0},t)},BE=function(t){return ya(ya({},null===t||void 0===t?void 0:t.colQuery),null===t||void 0===t?void 0:t.rowQuery)},kE=function(t,e){var n;if(t){var r=e.style,i=e.className,o=void 0===i?[]:i,a=e.visible;if(r&&Object.assign(t.style,r),o.length){var l=o.filter(Boolean);(n=t.classList).add.apply(n,xa([],wa(l),!1))}t.classList.toggle(uw,a),t.classList.toggle(cw,!a)}},NE=function(t,e){var n,r=null===(n=null===t||void 0===t?void 0:t.dataSet)||void 0===n?void 0:n.getFieldFormatter(e);return function(t,e){return function(t){var e=Bv(t)&&Number.isNaN(t),n=""===t;return Dv(t)||e||n?"-":t}(r(t,e))}},DE=function(t,e){var n,r=e.data,i=e.field,o=e.valueField,a=e.useCompleteDataForFormatter,l=void 0===a||a,s=null===(n=null===t||void 0===t?void 0:t.dataSet)||void 0===n?void 0:n.getFieldName(i),u=NE(t,i),c=Xa(r[i])?JSON.stringify(r[i]):r[i];return{name:s,value:u(o||c,l?r:void 0)}},PE=function(t,e,n){return Ip(yp(Ld([],e),(function(t){return t!==po&&n[t]})),(function(e){return DE(t,{data:n,field:e,useCompleteDataForFormatter:!1})}))},zE=function(t,e,n){if(e){var r=n.isTotals,i=e[po],o=e[i],a=[];if(r)a.push(DE(t,{data:e,field:i,valueField:Uu(e,fo)}));else if(function(t){return Xa(t)&&"values"in t}(o)&&t.getTooltipDataItemMappingCallback()){var l=mb(e,t.getTooltipDataItemMappingCallback());Zf(l,(function(e,n){a.push(DE(t,{data:l,field:n}))}))}else a.push(DE(t,{data:e,field:i}));return a}},FE=function(t,e,n){void 0===n&&(n=!0);var r=[];return Zf(e,(function(e,i){Zf(t,(function(t){n||-1===t.colIndex?n&&-1!==t.rowIndex&&r.push([t.rowIndex,i]):r.push([i,t.colIndex])}))})),r},HE=function(t,e,n){var r,i=null===(r=t.facet)||void 0===r?void 0:r.layoutRe
2sult,o=function(t){var n=null===e||void 0===e?void 0:e.getMeta(),r=null===n||void 0===n?void 0:n.isTotals,o=(null===e||void 0===e?void 0:e.cellType)===$o.COL_CELL,a=(null===e||void 0===e?void 0:e.cellType)===$o.ROW_CELL;if(!o&&!a)return!1;var l=i.colNodes.find((function(e){return e.colIndex===t.colIndex})),s=i.rowNodes.find((function(e){return e.rowIndex===t.rowIndex})),u=o?null===s||void 0===s?void 0:s.isTotals:null===l||void 0===l?void 0:l.isTotals;return!r&&(null===t||void 0===t?void 0:t.isTotals)||r&&u};if(n){var a=function(t,e){var n,r=e.rowLeafNodes,i=e.colLeafNodes,o=t.interaction.getState(),a=o.nodes,l=void 0===a?[]:a,s=o.cells,u=void 0===s?[]:s,c=null===(n=null===u||void 0===u?void 0:u[0])||void 0===n?void 0:n.type;return c===$o.COL_CELL?FE(l,r,!1):c===$o.ROW_CELL?FE(l,i):[]}(t,i);return Ed(Ip(a,(function(t){var e=wa(t,2),n=e[0],r=e[1],a=i.getCellMeta(n,r);if(!o(a))return(null===a||void 0===a?void 0:a.data)||BE(a)})))}return t.interaction.getCells().filter((function(t){var e=i.getCellMeta(t.rowIndex,t.colIndex);return!o(e)})).map((function(t){var e=i.getCellMeta(t.rowIndex,t.colIndex);return(null===e||void 0===e?void 0:e.data)||BE(e)}))},WE=function(t){var e=t.spreadsheet,n=t.getShowValue,r=t.targetCell,i=t.options,o=void 0===i?{}:i,a=[],l={},s=e.isTableMode();return s&&(null===o||void 0===o?void 0:o.showSingleTips)?[{selectedData:e.dataSet.getMultiData({}),name:"",value:""}]:(Zf(HE(e,r,o.showSingleTips),(function(t){var e;l[null===t||void 0===t?void 0:t[po]]?null===(e=l[null===t||void 0===t?void 0:t[po]])||void 0===e||e.push(t):l[null===t||void 0===t?void 0:t[po]]=[t]})),tg(l,(function(t,r){var i,u=function(t,e,n){var r;if(n)return aw("\u603b\u8ba1");var i=null===(r=null===t||void 0===t?void 0:t.dataSet)||void 0===r?void 0:r.getFieldName(e);return i&&"undefined"!==i?i:""}(e,r,null===o||void 0===o?void 0:o.isTotals),c=null===n||void 0===n?void 0:n(t,fo);if(s)c="";else if(pp(t,(function(t){return TE(Uu(t,fo))}))){var h=e.options.placeholder;c=Bx(l,h)}else{var d=NE(e,r),f=IE(t,fo);c=null!==(i=null===d||void 0===d?void 0:d(f,t))&&void 0!==i?i:parseFloat(f.toPrecision(16))}a.push({selectedData:t,name:u,value:c})})),a)},GE=function(t){var e=t.spreadsheet,n=t.cellInfos,r=void 0===n?[]:n,i=t.options,o=void 0===i?{}:i,a=t.getShowValue,l=t.targetCell,s=null,u=null,c=null,h=function(t){if(t){var e=t.getMeta();if(!e.isTotals){var n=xp(e.spreadsheet.dataCfg.meta,{field:e.field||e.value||e.valueField}),r=null===n||void 0===n?void 0:n.field;return e.spreadsheet.dataSet.getFieldDescription(r)}}}(l),d=r[0]||{};if(null===o||void 0===o?void 0:o.hideSummary)if(o.showSingleTips){var f=NE(e,d.valueField)(d.value),p=o.enableFormat?e.dataSet.getFieldName(d.value)||f:e.dataSet.getFieldName(d.valueField);d.name=p||""}else u=function(t,e,n){var r,i,o,a,l=(n||{}).isTotals,s=[],u=[];if(e){var c=null===(i=null===(r=null===t||void 0===t?void 0:t.dataSet)||void 0===r?void 0:r.fields)||void 0===i?void 0:i.columns,h=null===(a=null===(o=null===t||void 0===t?void 0:t.dataSet)||void 0===o?void 0:o.fields)||void 0===a?void 0:a.rows;s=PE(t,zw(c||[]),e),u=PE(t,h,e)}return Iv(s)&&Iv(u)&&l&&(s=[{value:aw("\u603b\u8ba1")}]),{cols:s,rows:u}}(e,d,o),c=zE(e,d,o);else s=WE({spreadsheet:e,options:o,targetCell:l,getShowValue:a});var v=d||{};return{summaries:s,interpretation:v.interpretation,infos:v.infos,tips:v.tips,name:v.name,headInfo:u,details:c,description:h}},jE=function(t){if(!t.interaction.isSelectedState())return[];var e=t.dataCfg.fields.valueInCols;return t.interaction.getCells().reduce((function(n,r){var i=t.facet.layoutResult.getCellMeta(null===r||void 0===r?void 0:r.rowIndex,null===r||void 0===r?void 0:r.colIndex),o=BE(i);if(Iv(i)||Iv(o))return[];var a=ya(ya({},o),{colIndex:e?i.colIndex:null,rowIndex:e?null:i.rowIndex});return n.find((function(t){return Mv(a,t)}))||n.push(a),n}),[])},UE=function(t,e){var n;if(e&&t){var r=null===(n=t.getCellType)||void 0===n?void 0:n.call(t,null===e||void 0===e?void 0:e.target);return function(t,e){void 0===t&&(t={});var n=function(e){return WS(t,e)},r=t.col,i=t.row,o=t.data,a=t.corner;return e===$o.COL_CELL?n(r):e===$o.ROW_CELL?n(i):e===$o.DATA_CELL?
2n(o):e===$o.CORNER_CELL?n(a):ya({},t)}(t.options.tooltip,r)}},VE=function(t,e){var n=e.defaultMenus,r=void 0===n?[]:n,i=e.cell,o=function t(e){return void 0===e&&(e=[]),e.filter((function(t){var e;return rl(t.visible)?t.visible(i):null===(e=t.visible)||void 0===e||e})).map((function(e){return e.children&&(e.children=t(e.children)),e}))}(t.menus);return{onClick:t.onClick,menus:Ed(xa(xa([],wa(r),!1),wa(o),!1))}},YE=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"".concat(jo,"-").concat(t.join("-"))},XE=function(){function t(t){var e=this;this.getFieldMeta=Nu((function(t,n){return xp(e.meta||n,(function(e){return e.field===t}))})),this.spreadsheet=t}return t.prototype.getFieldName=function(t){return Uu(this.getFieldMeta(t,this.meta),"name",t)},t.prototype.getFieldFormatter=function(t){return Uu(this.getFieldMeta(t,this.meta),"formatter",nl)},t.prototype.getFieldDescription=function(t){return Uu(this.getFieldMeta(t,this.meta),"description")},t.prototype.setDataCfg=function(t){this.getFieldMeta.cache.clear();var e=this.processDataCfg(t),n=e.fields,r=e.meta,i=e.data,o=e.totalData,a=e.sortParams,l=e.filterParams;this.fields=n,this.meta=r,this.originData=i,this.totalData=o,this.sortParams=a,this.filterParams=l,this.displayData=this.originData,this.indexesData=[]},t.prototype.getDisplayDataSet=function(){return this.displayData},t.prototype.getValueRangeByField=function(t){var e,n,r,i=(n=this.spreadsheet,r=t,n.store.get(Uo,Vo)[r]);if(i)return i;var o=Ed(Ip(this.originData,(function(e){var n=e[t];return Dv(n)?null:Number.parseFloat(n)}))),a={maxValue:rg(o),minValue:fg(o)};return function(t,e){var n=t.store.get(Uo,Vo);t.store.set(Uo,ya(ya({},n),e))}(this.spreadsheet,((e={})[t]=a,e)),a},t.prototype.moreThanOneValue=function(){var t,e;return(null===(e=null===(t=this.fields)||void 0===t?void 0:t.values)||void 0===e?void 0:e.length)>1},t}(),qE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleDimensionValuesSort=function(){Zf(e.sortParams,(function(t){var n=t.sortFieldId,r=t.sortByMeasure;if(n){var i=xa([],wa(e.sortedDimensionValues[n]||[]),!1),o=iS({dataSet:e,sortParam:t,originValues:i,isSortByMeasure:!Iv(r)});e.sortedDimensionValues[n]=o}}))},e.getCustomData=function(t){for(var n,r=!1,i=e.indexesData,o=function(e){var o=t[e];r?i=Hv(o)?nx(i):null===(n=$p(i))||void 0===n?void 0:n.map((function(t){return t&&Uu(t,o)})):Hv(o)?r=!0:i=null===i||void 0===i?void 0:i[o]},a=0;a<t.length;a++)o(a);return i},e.getTotalStatus=function(t){var n=e.fields,r=n.columns,i=n.rows,o=function(e,n){if(n){var r=xp(e,(function(e){return!Vp(t,e)}));return r&&r!==Tp(e)}return pp(e,(function(e){return!Vp(t,e)}))},a=function(t,e){return e?t.filter((function(t){return t!==po})):t};return{isRowTotal:o(a(i,!e.spreadsheet.isValueInCols())),isRowSubTotal:o(i,!0),isColTotal:o(a(r,e.spreadsheet.isValueInCols())),isColSubTotal:o(r,!0)}},e}return ga(e,t),e.prototype.setDataCfg=function(e){var n=this;t.prototype.setDataCfg.call(this,e),this.sortedDimensionValues={},this.rowPivotMeta=new Map,this.colPivotMeta=new Map,this.totalData=[].concat(ox(e.data,e.fields)).concat(this.totalData),Ww.getInstance().debugCallback("Transform Data",(function(){var t=n.fields,e=Yb({rows:t.rows,columns:t.columns,originData:n.originData,totalData:n.totalData,indexesData:n.indexesData,sortedDimensionValues:n.sortedDimensionValues,rowPivotMeta:n.rowPivotMeta,colPivotMeta:n.colPivotMeta}).indexesData;n.indexesData=e})),this.handleDimensionValuesSort()},e.prototype.transformDrillDownData=function(t,e,n){var r,i=this,o=this.fields,a=o.columns,l=o.values,s=xa(xa([],wa(gw.getFieldPath(n,!0)),!1),[t],!1),u=this.spreadsheet.store,c=this.standardTransform(e,l),h=ox(c,{columns:this.fields.columns,rows:s}),d=Wf(c,h),f=null===n||void 0===n?void 0:n.id,p=null!==(r=u.get("drillDownIdPathMap"))&&void 0!==r?r:new Map;p.has(f)&&(Zf(p.get(f),(function(t){eC(i.indexesData,t)})),Xb(this.rowPivotMeta,f));var v=Yb({rows:s,columns:a,originData:d,totalData:h,indexesData:this.indexesData,sortedDimensionValues:this.sortedDimensionValues,rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta}),g=v.paths,y=v.indexesData,m=v.rowPivotMeta,C=v.colPivotMeta,w=v.sortedDimensionValues;this.indexesData=y,this.rowPivotMeta=m,this.colPivotMeta=C,this.sortedDimensionValues=w,p.set(f,g),u.set("drillDownIdPathMap",p)},e.prototype.clearDrillDownData=function(t){var e=this,n=this.spreadsheet.store,r=n.get("drillDownIdPathMap");if(r){var i=n.get("drillDownDataCache",[]);if(t){var o=r.get(t);o&&Zf(o,(function(t){eC(e.indexesData,t)})),Xb(this.rowPivotMeta,t),r.delete(t);var a=yp(i,(function(t){return r.has(null===t||void 0===t?void 0:t.rowId)}));n.set("drillDownDataCache",a);var l=a.map((function(t){return null===t||void 0===t?void 0:t.drillLevel})),s=n.get("drillDownFieldInLevel",[]).filter((function(t){return Jp(l,null===t||void 0===t?void 0:t.drillLevel)}));n.set("drillDownFieldInLevel",s)}else{r.clear();var u=this.spreadsheet.store.get("originalDataCfg");Iv(u)||this.spreadsheet.setDataCfg(u),this.spreadsheet.store.set("drillItemsNum",-1),this.spreadsheet.store.set("drillDownDataCache",[]),this.spreadsheet.store.set("drillDownFieldInLevel",[])}n.set("drillDownIdPathMap",r)}},e.prototype.standardTransform=function(t,e){if(Iv(e))return t;var n=[];return Zf(e,(function(e){Zf(t,(function(t){var r;Vp(t,e)&&n.push(ya(ya({},t),((r={})[po]=e,r[fo]=t[e],r)))}))})),n},e.prototype.processDataCfg=function(t){var e,n,r=t.data,i=t.meta,o=void 0===i?[]:i,a=t.fields,l=t.sortParams,s=void 0===l?[]:l,u=t.totalData,c=a.columns,h=a.rows,d=a.values,f=a.valueInCols,p=a.customValueOrder,v=c,g=h;
2f?v=this.isCustomMeasuresPosition(p)?this.handleCustomMeasuresOrder(p,v):Qm(xa(xa([],wa(c),!1),[po],!1)):g=this.isCustomMeasuresPosition(p)?this.handleCustomMeasuresOrder(p,g):Qm(xa(xa([],wa(h),!1),[po],!1));var y=(null===(n=null===(e=this.spreadsheet)||void 0===e?void 0:e.options)||void 0===n?void 0:n.cornerExtraFieldText)||aw("\u6570\u503c"),m={field:po,name:y,formatter:function(t){return function(t){var e=xp(o,(function(e){return e.field===t}));return Uu(e,"name",t)}(t)}},C=xa(xa([],wa(o),!1),[m],!1),w=this.standardTransform(r,d),x=this.standardTransform(u,d);return{data:w,meta:C,fields:ya(ya({},a),{rows:g,columns:v,values:d}),totalData:x,sortParams:s}},e.prototype.getDimensionValues=function(t,e){var n,r,i,o,a=this.fields||{},l=a.rows,s=void 0===l?[]:l,u=a.columns,c=void 0===u?[]:u,h=new Map,d=[];if(Jp(s,t)?(h=this.rowPivotMeta,d=s):Jp(c,t)&&(h=this.colPivotMeta,d=c),!Iv(e)){var f=[],p=[],v=function(t){var n=Uu(e,t);p.push("".concat(n));var r=p.join("".concat(No));if(h.has(n)&&!Hv(n)){var a=null===(i=h.get(n))||void 0===i?void 0:i.childField;if(h=h.get(n).children,xp(g.sortParams,(function(t){return t.sortFieldId===a}))&&g.sortedDimensionValues[a]){var l=null===(o=g.sortedDimensionValues[a])||void 0===o?void 0:o.filter((function(t){return null===t||void 0===t?void 0:t.startsWith(r)}));f=jb(xa([],wa(l),!1))}else f=xa([],wa(h.keys()),!1)}},g=this;try{for(var y=Ca(d),m=y.next();!m.done;m=y.next()){v(m.value)}}catch(C){n={error:C}}finally{try{m&&!m.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}return Iv(f)?[]:tx(Jw(xa([],wa(h.keys()),!1),f))}return this.sortedDimensionValues[t]?tx(jb(xa([],wa(this.sortedDimensionValues[t]),!1))):tx(xa([],wa(h.keys()),!1))},e.prototype.getTotalValue=function(t){var e,n,r=function(t,e){var n=t.isRowTotal,r=t.isRowSubTotal,i=t.isColTotal,o=t.isColSubTotal,a=e||{},l=a.row,s=a.col,u=l||{},c=u.calcTotals,h=void 0===c?{}:c,d=u.calcSubTotals,f=void 0===d?{}:d,p=s||{},v=p.calcTotals,g=void 0===v?{}:v,y=p.calcSubTotals,m=void 0===y?{}:y,C=function(t,e){if((t.aggregation||t.calcFunc)&&e)return{aggregation:t.aggregation,calcFunc:t.calcFunc}};return C(g,i)||C(m,o)||C(h,n)||C(f,r)}(this.getTotalStatus(t),null===(n=this.spreadsheet.options)||void 0===n?void 0:n.totals)||{},i=r.aggregation,o=r.calcFunc,a=RE[i];if(a||o){var l=this.getMultiData(t),s=void 0;return o?s=o(t,l):a&&(s=a(l,fo)),ya(ya({},t),((e={})[fo]=s,e[t[po]]=s,e))}},e.prototype.getCellData=function(t){var e,n,r,i=t||{},o=i.query,a=i.rowNode,l=i.isTotals,s=void 0!==l&&l,u=this.fields,c=u.columns,h=u.rows,d=h,f=null===(e=this.spreadsheet)||void 0===e?void 0:e.store.get("drillDownIdPathMap"),p=Array.from(null!==(n=null===f||void 0===f?void 0:f.keys())&&void 0!==n?n:[]).some((function(t){return a.id.startsWith(t)}));s&&!p||(d=null!==(r=gw.getFieldPath(a,p))&&void 0!==r?r:h);var v=Ub({rowDimensionValues:Vb(d,o),colDimensionValues:Vb(c,o),careUndefined:s||ix([].concat(h).concat(c),o),rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta}),g=Uu(this.indexesData,v);return g||(s?this.getTotalValue(o):g)},e.prototype.getMultiData=function(t,e,n,r){var i;if(Iv(t))return Ed(ex(this.indexesData));var o=this.fields,a=o.rows,l=o.columns,s=o.values,u=Vb(Iv(r)?a:a.concat(r),t),c=Vb(l,t),h=Ub({rowDimensionValues:u,colDimensionValues:c,careUndefined:!0,isFirstCreate:!0,rowFields:a,colFields:l,rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta}),d=this.getCustomData(h),f=Ed(nx(d));if(e){var p=[],v=rx(u,a),g=rx(c,l);if(n)p=v;else if(1===(null===(i=uu(t))||void 0===i?void 0:i.length)&&Vp(t,po))p=g;else{var y=function(t){return null===(e=null===t||void 0===t?void 0:t.filter((function(t){return!(null===s||void 0===s?void 0:s.includes(t))})))||void 0===e?void 0:e.every((function(t){return Hv(t)}));var e},m=y(c),C=y(u);p=m?v:C?g:xa(xa([],wa(v),!1),wa(g),!1)}f=f.filter((function(t){return!(null===p||void 0===p?void 0:p.find((function(e){var n;return e!==po&&(null===(n=uu(t))||void 0===n?void 0:n.includes(e))})))}))}return f||[]},e.prototype.getFieldFormatter=function(e,n){return e===go?this.getFieldFormatterForTotalValue(n):t.prototype.getFieldFormatter.call(this,e)},e.prototype.getFieldFormatterForTotalValue=function(e){var n;return!this.spreadsheet.isValueInCols()&&e&&(n=Uu(e.rowQuery,po)),n=null!==n&&void 0!==n?n:Uu(this.fields.values,0),t.prototype.getFieldFormatter.call(this,n)},e.prototype.handleCustomMeasuresOrder=function(t,e){var n=Qm(xa([],wa(e),!1));return e.length>=t?(n.splice(t,0,po),n):xa(xa([],wa(n),!1),[po],!1)},e.prototype.isCustomMeasuresPosition=function(t){return Bv(t)},e.prototype.getRowData=function(t){return this.getMultiData(t.rowQuery)},e}(XE),KE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleDimensionValueFilter=function(){Zf(e.filterParams,(function(t){var n=t.filterKey,r=t.filteredValues,i=t.customFilter,o=function(t){return!Jp(r,t[n])};e.displayData=xa(xa(xa([],wa(e.getStartRows()),!1),wa(yp(e.getMovableRows(),(function(t){return i?i(t)&&o(t):o(t)}))),!1),wa(e.getEndRows()),!1)}))},e.handleDimensionValuesSort=function(){Zf(e.sortParams,(function(t){var n=t.sortFieldId,r=t.sortBy,i=t.sortFunc,o=t.sortMethod,a=t.query;if(n){var l=e.getMovableRows(),s=[];if(a){var u=[];l.forEach((function(t){for(var e=Object.keys(a),n=!0,r=0;r<e.length;r++){var i=e[r];if(t[i]!==a[i]){n=!1,s.push(t);break}}n&&u.push(t)})),l=u}var c=l;if(i)c=i(ya(ya({},t),{data:l}));else if(r&&!rl(r)){var h=xa([],wa(r),!1).reverse();c=l.sort((function(t,e){var r=h.indexOf(t[n]);return h.indexOf(e[n])-r}))}else if(qb(o)||Kb(o)){c=Ig(l,[(rl(r)?r:null)||n],[o.toLocaleLowerCase()])}s.length&&(c=xa(xa([],wa(c),!1),wa(s),!1)),e.displayData=xa(xa(xa([],wa(e.getStartRows()),!1),wa(c),!1),wa(e.getEndRows()),!1)}}))},e}return ga(e,t),e.prototype.processDataCfg=function(t){return t},e.prototype.setDataCfg=function(e){t.prototype.setDataCfg.call(this,e),this.handleDimensionValueFilter(),this.handleDimensionValuesSort()},e.prototype.getStartRows=function(){var t=(this.spreadsheet.options||{}).frozenRowCount;return t?this.displayData.slice(0,t):[]},e.prototype.getEndRows=function(){var t=(this.spreadsheet.options||{}).frozenTrailingRowCount;return t?this.displayData.slice(-t):[]},e.prototype.getMovableRows=function(){var t=this.displayData,e=this.spreadsheet.options||{},n=e.frozenTrailingRowCount,r=e.frozenRowCount;return t.slice(r||0,-n||void 0)},e.prototype.getDimensionValues=function(t,e){return[]},e.prototype.getCellData=function(t){var e=t.query;if(0!==this.displayData.length||0!==e.rowIndex){var n=this.displayData[e.rowIndex];return"col"in e&&Xa(n)?n[e.col]:n}},e.prototype.getMultiData=function(t,e){return this.displayData}
2,e.prototype.getRowData=function(t){return this.getCellData({query:{rowIndex:t.rowIndex}})},e}(XE),ZE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.getCellData=function(t){var e=t.query,n=this.fields,r=n.columns,i=n.rows,o=Ub({rowDimensionValues:Vb(i,e),colDimensionValues:Vb(r,e),rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta,isFirstCreate:!0,careUndefined:!0,rowFields:i,colFields:r});return Uu(this.indexesData,o)},e.prototype.setDataCfg=function(e){t.prototype.setDataCfg.call(this,e),this.sortedDimensionValues={},this.rowPivotMeta=new Map,this.colPivotMeta=new Map;var n=this.fields,r=Yb({rows:n.rows,columns:n.columns,originData:this.originData,totalData:[],indexesData:this.indexesData,sortedDimensionValues:this.sortedDimensionValues,rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta}).indexesData;this.indexesData=r,this.handleDimensionValuesSort()},e.prototype.processDataCfg=function(t){t.fields.rows=[po],t.fields.valueInCols=!1;var e=t.data,n=ma(t,["data"]),r=t.fields.values,i=[];return Zf(e,(function(t){Iv(ov(uu(t),r))?i.push(t):Zf(r,(function(e){var n;Vp(t,e)&&i.push(ya(ya({},t),((n={})[po]=e,n[fo]=t[e],n)))}))})),ya({data:Qm(i)},n)},e}(qE);!function(t){t.ScrollChange="scroll-change",t.ScrollEnd="scroll-end"}(LE||(LE={}));var $E=function(t){function e(e){var n=t.call(this,e)||this;n.isMobile=!1,n.eventHandlers=[],n.scrollFrameId=null,n.getCoordinatesName=function(){return{from:n.isHorizontal?"x1":"y1",to:n.isHorizontal?"x2":"y2"}},n.getCoordinatesWithBBoxExtraPadding=function(){var t=n.theme.size,e=n.isHorizontal?0:t/2,r=n.isHorizontal?t:t/2;return{start:n.thumbOffset+e,end:n.thumbOffset+n.thumbLen-r}},n.current=function(){var t=n.thumbLen/n.trackLen;return n.thumbOffset/n.trackLen/(1-t)},n.updateThumbLen=function(t){if(n.thumbLen!==t){n.thumbLen=t;var e=n.getCoordinatesName();n.thumbShape.attr(e.to,n.thumbOffset+t),n.emitScrollChange(n.thumbOffset/(n.trackLen-n.thumbLen)*n.scrollTargetMaxOffset,!1)}},n.updateThumbOffset=function(t,e){var r;void 0===e&&(e=!0);var i=n.validateRange(t);if(!(n.thumbOffset===i&&0!==i)){n.thumbOffset=i;var o=n.getCoordinatesName(),a=o.from,l=o.to,s=n.getCoordinatesWithBBoxExtraPadding(),u=s.start,c=s.end;n.thumbShape.attr(((r={})[a]=u,r[l]=c,r)),e&&n.emitScrollChange(i/(n.trackLen-n.thumbLen)*n.scrollTargetMaxOffset,!1)}},n.onlyUpdateThumbOffset=function(t){var e;n.updateThumbOffset(t,!1),null===(e=n.get("canvas"))||void 0===e||e.draw()},n.emitScrollChange=function(t,e){void 0===e&&(e=!0),cancelAnimationFrame(n.scrollFrameId),n.scrollFrameId=requestAnimationFrame((function(){n.emit(LE.ScrollChange,{offset:t,updateThumbOffset:e})}))},n.addEventListener=function(t,e,n){return null===t||void 0===t||t.addEventListener(e,n,!1),{remove:function(){null===t||void 0===t||t.removeEventListener(e,n,!1)}}},n.addEvent=function(t,e,r){t.on(e,r),n.eventHandlers.push({target:t,type:e,handler:r})},n.initScrollBar=function(){n.scrollBarGroup=n.createScrollBarGroup(),n.scrollBarGroup.move(n.position.x,n.position.y),n.bindEvents()},n.createScrollBarGroup=function(){var t=n.addGroup({className:n.isHorizontal?"horizontalBar":"verticalBar"});return n.trackShape=n.createTrackShape(t),n.thumbShape=n.createThumbShape(t),t},n.createTrackShape=function(t){var e=n.theme,r=e.lineCap,i=void 0===r?"round":r,o=e.trackColor,a=e.size,l={lineWidth:a,stroke:o,lineCap:i};return n.isHorizontal?t.addShape("line",{attrs:ya(ya({},l),{x1:0,y1:a/2,x2:n.trackLen,y2:a/2})}):t.addShape("line",{attrs:ya(ya({},l),{x1:a/2,y1:0,x2:a/2,y2:n.trackLen})})},n.createThumbShape=function(t){var e=n.theme,r=e.size,i=e.lineCap,o=void 0===i?"round":i,a={lineWidth:r,stroke:e.thumbColor,lineCap:o,cursor:"default"},l=n.getCoordinatesWithBBoxExtraPadding(),s=l.start,u=l.end;return n.isHorizontal?t.addShape("line",{attrs:ya(ya({},a),{x1:s,y1:r/2,x2:u,y2:r/2})}):t.addShape("line",{attrs:ya(ya({},a),{x1:r/2,y1:s,x2:r/2,y2:u})})},n.bindEvents=function(){n.on("mousedown",n.onStartEvent(!1)),n.on("mouseup",n.onMouseUp),n.on("touchstart",n.onStartEvent(!0)),n.on("touchend",n.onMouseUp),n.trackShape.on("click",n.onTrackClick),n.thumbShape.on("mouseover",n.onTrackMouseOver),n.thumbShape.on("mouseout",n.onTrackMouseOut)},n.onStartEvent=function(t){return function(e){e.preventDefault(),n.isMobile=t;var r=n.isMobile?Uu(e,"touches.0",e):e,i=r.clientX,o=r.clientY;n.startPos=n.isHorizontal?i:o,n.bindLaterEvent()}},n.bindLaterEvent=function(){var t=n.get("canvas"),e=document.body,r=[];n.isMobile?(r=[n.addEventListener(e,"touchmove",n.onMouseMove),n.addEventListener(e,"touchend",n.onMouseUp),n.addEventListener(e,"touchcancel",n.onMouseUp)],n.addEvent(t,"touchend",n.onMouseUp),n.addEvent(t,"touchcancel",n.onMouseUp)):(r=[n.addEventListener(e,"mousemove",n.onMouseMove),n.addEventListener(e,"mouseup",n.onMouseUp),n.addEventListener(e,"mouseleave",n.onMouseUp)],n.addEvent(t,"mouseup",n.onMouseUp)),n.clearEvents=function(){r.forEach((function(t){null===t||void 0===t||t.remove()})),Zf(n.eventHandlers,(function(t){var e;null===(e=t.target)||void 0===e||e.off(t.type,t.handler)})),n.eventHandlers.length=0}},n.onTrackClick=function(t){var e=n.isHorizontal?t.x-n.position.x-n.thumbLen/2:t.y-n.position.y-n.thumbLen/2,r=n.validateRange(e);n.updateThumbOffset(r)},n.onMouseMove=function(t){t.preventDefault();var e=n.isMobile?Uu(t,"touches.0",t):t,r=e.clientX,i=e.clientY,o=n.isHorizontal?r:i,a=o-n.startPos;
2n.startPos=o,n.updateThumbOffset(n.thumbOffset+a)},n.onMouseUp=function(t){var e;n.emit(LE.ScrollEnd,{}),t.preventDefault(),null===(e=n.clearEvents)||void 0===e||e.call(n)},n.onTrackMouseOver=function(){var t=n.theme,e=t.thumbHoverColor,r=t.hoverSize;n.thumbShape.attr("stroke",e),n.thumbShape.attr("lineWidth",r)},n.onTrackMouseOut=function(){var t=n.theme,e=t.thumbColor,r=t.size;n.thumbShape.attr("stroke",e),n.thumbShape.attr("lineWidth",r)},n.validateRange=function(t){var e=t;return t+n.thumbLen>n.trackLen?e=n.trackLen-n.thumbLen:t+n.thumbLen<n.thumbLen&&(e=0),e};var r=e.isHorizontal,i=void 0!==r&&r,o=e.trackLen,a=e.thumbLen,l=e.position,s=e.thumbOffset,u=void 0===s?0:s,c=e.theme,h=e.scrollTargetMaxOffset;return n.isHorizontal=i,n.thumbOffset=u,n.trackLen=o,n.thumbLen=a,n.position=l,n.theme=c,n.scrollTargetMaxOffset=h,n.initScrollBar(),n}return ga(e,t),e}(bi),QE=function(t,e,n){return t.filter((function(t){return t.level>=e})).map((function(t){return t[n]})).reduce((function(t,e){return t+e}),0)},JE=function(t,e,n){if(n<=0)return{start:0,end:0};var r=wp(t,(function(n,r){return e>=n&&e<t[r+1]}),0);r=Math.max(r,0);var i=n===e?r:wp(t,(function(e,r){return n>e&&n<=t[r+1]}),r);return{start:r,end:i=Math.min(-1===i?1/0:i,t.length-2)}},tL=function(t,e){var n=e.width,r=e.originalWidth,i=Math.min(r-n,t);return i<0?0:i},eL=function(t,e,n){var r=Math.min(e-n,t);return r<0?0:r},nL=function(t,e){if(void 0===t&&(t=[]),Iv(t))return[];var n=[];return t.forEach((function(t){(t instanceof e&&n.push(t),t instanceof bi)&&t.getChildren().forEac
2h((function(t){t instanceof e&&n.push(t)}))})),n},rL=function(t,e,n){return n.slice(t,e+1).map((function(t){return t.x+t.width}))},iL=function(t,e,n){for(var r=[],i=t;i<e+1;i++)r.push(n.getCellOffsetY(i+1));return r},oL=function(t,e,n){var r=wa(n,4),i=r[0],o=r[1],a=r[2],l=r[3];return t>=i&&t<=o&&e>=a&&e<=l},aL=function(t){for(var e=wa(t,4),n=e[0],r=e[1],i=e[2],o=e[3],a=[],l=n;l<=r;l+=1)for(var s=i;s<=o;s+=1)a.push([l,s]);return a},lL=function(t,e){var n=[],r=[];return Object.keys(e).forEach((function(i){var o=function(t,e){var n=[],r=[];if(Iv(t))return Iv(e)?{add:n,remove:r}:{add:aL(e),remove:r};if(Iv(e))return{add:n,remove:aL(t)};for(var i=wa(t,4),o=i[0],a=i[1],l=i[2],s=i[3],u=wa(e,4),c=u[0],h=u[1],d=u[2],f=u[3],p=o;p<=a;p++)for(var v=l;v<=s;v++)oL(p,v,e)||r.push([p,v]);for(p=c;p<=h;p+=1)for(v=d;v<=f;v+=1)oL(p,v,t)||n.push([p,v]);return{add:n,remove:r}}((null===t||void 0===t?void 0:t[i])||[],e[i]),a=o.add,l=o.remove;n.push.apply(n,xa([],wa(a),!1)),r.push.apply(r,xa([],wa(l),!1))})),{add:n,remove:r}},sL=function(t,e){void 0===e&&(e=!1),this.x=0,this.y=0,this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.width=0,this.height=0,this.originalWidth=0,this.originalHeight=0,this.viewportHeight=0,this.viewportWidth=0,this.facet=t,this.spreadsheet=t.spreadsheet,this.layoutResult=t.layoutResult,e&&this.calculateBBox()},uL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.calculateBBox=function(){var t=this.getCornerBBoxWidth(),e=this.getCornerBBoxHeight();this.width=t,this.height=e,this.maxX=t,this.maxY=e},e.prototype.getCornerBBoxHeight=function(){var t=this.layoutResult.colsHierarchy;return this.originalHeight=Math.floor(t.height),this.originalHeight},e.prototype.getCornerBBoxWidth=function(){var t=this.layoutResult.rowsHierarchy;return this.originalWidth=Math.floor(t.width+this.facet.getSeriesNumberWidth()),this.spreadsheet.isScrollContainsRowHeader()?this.originalWidth:this.adjustCornerBBoxWidth()},e.prototype.adjustCornerBBoxWidth=function(){var t=this.layoutResult.colsHierarchy,e=this.spreadsheet.options.width,n=.5*e,r=null===t||void 0===t?void 0:t.width,i=e-this.originalWidth;if(this.originalWidth<=n||r<=i)return this.originalWidth;var o=0;return o=r<=e-n?this.originalWidth-(r-i):n,Math.floor(o)},e}(sL),cL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.calculateBBox=function(){this.originalWidth=this.facet.getRealWidth(),this.originalHeight=this.facet.getRealHeight();var t=this.facet.cornerBBox,e={x:Math.floor(t.maxX),y:Math.floor(t.maxY)},n=this.spreadsheet.theme.scrollBar.size,r=this.spreadsheet.options,i=r.width,o=r.height,a=Math.max(0,i-e.x),l=Math.max(0,o-e.y-n);this.x=e.x,this.y=e.y,this.width=a,this.height=l,this.viewportHeight=Math.abs(Math.floor(Math.min(l,this.originalHeight))),this.viewportWidth=Math.abs(Math.floor(Math.min(a,this.originalWidth))),this.maxX=e.x+this.viewportWidth,this.maxY=e.y+this.viewportHeight,this.minX=e.x,this.minY=e.y;var s=this.spreadsheet.options,u=s.frozenTrailingColCount,c=s.frozenTrailingRowCount;u>0&&(this.viewportWidth=this.width,this.maxX=e.x+this.width),c>0&&(this.viewportHeight=this.height,this.maxY=e.y+this.height)},e}(sL),hL=function(t){function e(e){var n=t.call(this,e)||this;return n.isHeaderCellInViewport=function(t,e,n,r){return t+e>=n&&n+r>=t},n.headerConfig=e,n}return ga(e,t),e.prototype.clearResizeAreaGroup=function(t){var e=this.get("parent"),n=null===e||void 0===e?void 0:e.findById(t);null===n||void 0===n||n.clear()},e.prototype.render=function(t){this.clearResizeAreaGroup(t),this.clear(),this.layout(),this.offset(),this.clip()},e.prototype.onScrollXY=function(t,e,n){this.headerConfig.scrollX=t,this.headerConfig.scrollY=e,this.render(n)},e.prototype.onRowScrollX=function(t,e){this.headerConfig.scrollX=t,this.render(e)},e.prototype.clear=function(){t.prototype.clear.call(this)},e}(bi),dL=function(t){function e(e){var n=t.call(this,e)||this;return n.scrollGroup=n.addGroup({name:"colScrollGroup",zIndex:3}),n}return ga(e,t),e.prototype.onColScroll=function(t,e){this.headerConfig.scrollX!==t&&(this.headerConfig.scrollX=t,this.render(e))},e.prototype.clip=function(){var t=this.headerConfig,e=t.width,n=t.height,r=t.scrollX,i=t.spreadsheet.isFrozenRowHeader();this.scrollGroup.setClip({type:"rect",attrs:{x:i?r:0,y:0,width:i?e:e+r,height:n}})},e.prototype.clear=function(){var t,e;null===(t=this.scrollGroup)||void 0===t||t.clear(),null===(e=this.background)||void 0===e||e.remove(!0)},e.prototype.getCellInstance=function(t,e,n){return new lS(t,e,n)},e.prototype.getCellGroup=function(t){return this.scrollGroup},e.prototype.isColCellInRect=function(t){var e=this.headerConfig,n=e.spreadsheet,r=e.cornerWidth,i=e.width,o=e.scrollX;return i+o>t.x&&o-(n.isFrozenRowHeader()?0:r)<t.x+t.width},e.prototype.layout=function(){var t=this,e=this.headerConfig,n=e.data,r=e.spreadsheet,i=r.options.colCell;Zf(n,(function(e){var n=e;if(t.isColCellInRect(n)){var o=(null===i||void 0===i?void 0:i(n,r,t.headerConfig))||t.getCellInstance(n,r,t.headerConfig);n.belongsCell=o,t.getCellGroup(n).add(o)}}))},e.prototype.offset=function(){var t=this.headerConfig,e=t.position,n=t.scrollX;kw(this.scrollGroup,e.x-n)},e}(hL),fL=function(t){function e(e){return t.call(this,e)||this}return ga(e,t),e.getCornerHeader=function(t,n,r,i,o,a){var l=t.width,s=t.height,u=n.originalWidth,c=n.originalHeight,h=n.width,d=n.height;return new e({data:this.getCornerNodes({x:n.x,y:n.y},u,c,i.rows,i.columns,o.rowsHierarchy,o.colsHierarchy,i.dataSet,r,a),position:{x:n.x,y:n.y},width:h,height:d,originalHeight:c,originalWidth:u,viewportWidth:l,viewportHe
2ight:s,hierarchyType:i.hierarchyType,hierarchyCollapse:i.hierarchyCollapse,rows:i.rows,columns:i.columns,seriesNumberWidth:r,spreadsheet:a})},e.getCornerNodes=function(t,e,n,r,i,o,a,l,s,u){var c,h,d,f,p=[];if(s&&(null===a||void 0===a?void 0:a.sampleNodeForLastLevel)){var v=new gw({id:"",key:"series-number-node",value:aw("\u5e8f\u53f7")});v.x=null===t||void 0===t?void 0:t.x,v.y=null===(c=null===a||void 0===a?void 0:a.sampleNodeForLastLevel)||void 0===c?void 0:c.y,v.width=s,v.height=null===(h=null===a||void 0===a?void 0:a.sampleNodeForLastLevel)||void 0===h?void 0:h.height,v.isPivotMode=!0,v.spreadsheet=u,v.cornerType=qw.Series,p.push(v)}if(null===a||void 0===a?void 0:a.sampleNodeForLastLevel)if(u.isHierarchyTreeType()){var g=u.store.get("drillDownFieldInLevel",[]).map((function(t){return t.drillField})),y=new gw({key:"",id:"",value:r.filter((function(t){return!Jp(g,t)})).map((function(t){return l.getFieldName(t)})).join("/")});y.x=t.x+s,y.y=null===(d=null===a||void 0===a?void 0:a.sampleNodeForLastLevel)||void 0===d?void 0:d.y,y.width=e-s,y.height=null===(f=null===a||void 0===a?void 0:a.sampleNodeForLastLevel)||void 0===f?void 0:f.height,y.seriesNumberWidth=s,y.isPivotMode=!0,y.spreadsheet=u,y.cornerType=qw.Row,p.push(y)}
2else o.sampleNodesForAllLevels.forEach((function(t){var e=r[t.level],n=new gw({key:e,id:"",value:l.getFieldName(e)});n.x=t.x+s,n.y=a.sampleNodeForLastLevel.y,n.width=t.width,n.height=a.sampleNodeForLastLevel.height,n.field=e,n.isPivotMode=!0,n.cornerType=qw.Row,n.spreadsheet=u,p.push(n)}));return a.sampleNodesForAllLevels.forEach((function(n){if(n.level<a.maxLevel){var r=i[n.level],o=new gw({key:r,id:"",value:l.getFieldName(r)});o.x=t.x,o.y=n.y,o.width=e,o.height=n.height,o.field=r,o.isPivotMode=!0,o.cornerType=qw.Col,o.spreadsheet=u,p.push(o)}})),p},e.prototype.onCorScroll=function(t,e){this.headerConfig.scrollX=t,this.render(e)},e.prototype.destroy=function(){t.prototype.destroy.call(this)},e.prototype.layout=function(){this.renderCells()},e.prototype.renderCells=function(){var t,e,n,r,i=this,o=this.headerConfig,a=o.data,l=o.spreadsheet,s=null===(e=null===(t=null===l||void 0===l?void 0:l.facet)||void 0===t?void 0:t.cfg)||void 0===e?void 0:e.cornerHeader,u=null===(r=null===(n=null===l||void 0===l?void 0:l.facet)||void 0===n?void 0:n.cfg)||void 0===r?void 0:r.cornerCell;s?s(this,l,this.headerConfig):a.forEach((function(t){var e;u&&(e=u(t,i.headerConfig.spreadsheet,i.headerConfig)),Iv(e)&&(e=new sS(t,i.headerConfig.spreadsheet,i.headerConfig)),i.add(e)}))},e.prototype.offset=function(){var t=this.headerConfig.scrollX;kw(this,-t)},e.prototype.clip=function(){var t=this.headerConfig,e=t.width,n=t.height,r=t.scrollX;this.setClip({type:"rect",attrs:{x:r,y:0,width:e,height:n}})},e}(hL),pL=function(t){function e(e){var n=t.call(this,e)||this;return n.render(),n}return ga(e,t),e.prototype.layout=function(){this.addCornerBottomBorder(),this.addCornerRightBorder(),this.addSplitLineShadow()},e.prototype.render=function(){this.clear(),this.layout()},e.prototype.onBorderScroll=function(t){this.cfg.scrollX=t;var e=this.cfg.position;Bw(this,e.x-t,0),this.render()},e.prototype.onChangeShadowVisibility=function(t,e){this.cfg.showViewportLeftShadow=t>0,this.cfg.showViewportRightShadow=Math.floor(t)<Math.floor(e),this.render()},e.prototype.addCornerRightBorder=function(){var t,e=this.cfg;if(e.isPivotMode){var n=e.width,r=e.height,i=e.viewportHeight,o=e.position,a=null===(t=e.spreadsheet.theme)||void 0===t?void 0:t.splitLine,l=o.x+n,s=o.y,u=o.y+r+i;this.addShape("line",{attrs:{x1:l,y1:s,x2:l,y2:u,stroke:a.verticalBorderColor,lineWidth:a.verticalBorderWidth,opacity:a.verticalBorderColorOpacity}})}},e.prototype.addCornerBottomBorder=function(){var t,e=this.cfg,n=e.width,r=e.height,i=e.viewportWidth,o=e.position,a=e.scrollX,l=e.scrollContainsRowHeader,s=null===(t=e.spreadsheet.theme)||void 0===t?void 0:t.splitLine,u=o.x,c=u+n+i+(l?a:0),h=o.y+r-1;this.addShape("line",{attrs:{x1:u,y1:h,x2:c,y2:h,stroke:s.horizontalBorderColor,lineWidth:s.horizontalBorderWidth,opacity:s.horizontalBorderColorOpacity}})},e.prototype.addSplitLineShadow=function(){var t,e=this.cfg,n=e.isPivotMode,r=e.spreadsheet,i=null===(t=r.theme)||void 0===t?void 0:t.splitLine;n&&i.showShadow&&r.isFrozenRowHeader()&&(this.addSplitLineLeftShadow(),this.addSplitLineRightShadow())},e.prototype.addSplitLineLeftShadow=function(){var t,e,n;if(this.cfg.showViewportLeftShadow){var r=this.cfg,i=r.width,o=r.height,a=r.viewportHeight,l=r.position,s=null===(t=r.spreadsheet.theme)||void 0===t?void 0:t.splitLine,u=l.x+i,c=l.y;this.addShape("rect",{attrs:{x:u,y:c,width:s.shadowWidth,height:a+o,fill:"l (0) 0:".concat(null===(e=s.shadowColors)||void 0===e?void 0:e.left," 1:").concat(null===(n=s.shadowColors)||void 0===n?void 0:n.right)}})}},e.prototype.addSplitLineRightShadow=function(){var t,e,n;if(this.cfg.showViewportRightShadow){var r=this.cfg,i=r.width,o=r.height,a=r.viewportHeight,l=r.viewportWidth,s=r.position,u=null===(t=r.spreadsheet.theme)||void 0===t?void 0:t.splitLine,c=s.x+i+l-u.shadowWidth,h=s.y;this.addShape("rect",{attrs:{x:c,y:h,width:u.shadowWidth,height:a+o,fill:"l (0) 0:".concat(null===(e=u.shadowColors)||void 0===e?void 0:e.right," 1:").concat(null===(n=u.shadowColors)||void 0===n?void 0:n.left)}})}},e}(bi),vL=function(t){function e(e){return t.call(this,e)||this}return ga(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.gm&&this.gm.destroy()},e.prototype.layout=function(){var t,e,n=this,r=this.headerConfig,i=r.data,o=r.spreadsheet,a=r.width,l=r.viewportHe
2ight,s=r.seriesNumberWidth,u=r.scrollY,c=r.scrollX,h=null===(e=null===(t=null===o||void 0===o?void 0:o.facet)||void 0===t?void 0:t.cfg)||void 0===e?void 0:e.rowCell;Zf(i,(function(t){if(function(t){return l+u>t.y&&u<t.y+t.height&&a-s+c>t.x&&c-s<t.x+t.width}(t)&&0!==t.height){var e=void 0;h&&(e=h(t,o,n.headerConfig)),Iv(e)&&o.isPivotMode()&&(e=new xS(t,o,n.headerConfig)),t.belongsCell=e,n.add(e)}}))},e.prototype.offset=function(){var t=this.headerConfig,e=t.scrollX,n=t.scrollY,r=t.position,i=t.seriesNumberWidth;Bw(this,r.x-e+i,r.y-n)},e.prototype.clip=function(){var t=this.headerConfig,e=t.width,n=t.viewportHeight,r=t.scrollX,i=t.scrollY,o=t.seriesNumberWidth;this.setClip({type:"rect",attrs:{x:r-o,y:i,width:e,height:n}})},e}(hL),gL=function(t){function e(e){return t.call(this,e)||this}return ga(e,t),e.getSeriesNumberHeader=function(t,n,r,i,o){var a=t.height,l=t.viewportHeight,s=[],u=i.isHierarchyTreeType();return r.forEach((function(t){if(!t.isTotals||u){var e=new gw({id:"",key:"",value:"".concat(s.length+1)});e.x=t.x,e.y=t.y,e.height=t.height,e.width=n,s.push(e)}})),new e({width:o,height:a,viewportWidth:o,viewportHeight:l,position:{x:0,y:t.y},data:s,spreadsheet:i})},e.prototype.clip=function(){var t=this.headerConfig,e=t.width,n=t.viewportHeight,r=t.scrollY;this.setClip({type:"rect",attrs:{x:0,y:r,width:e,height:n}})},e.prototype.layout=function(){var t=this,e=this.headerConfig,n=e.data,r=e.scrollY,i=e.viewportHeight;e.spreadsheet.isPivotMode&&this.addBackGround();var o=this.addGroup();Zf(n,(function(e){var n=e.y,a=e.height,l=e.isLeaf;if(t.isHeaderCellInViewport(n,a,r,i)){var s=t.addGroup();t.addText(s,e),t.add(s),l||t.addBorder(o,e)}}))},e.prototype.offset=function(){var t=this.headerConfig,e=t.scrollY,n=t.scrollX,r=t.position;Bw(this,r.x-n,r.y-e),this.backgroundShape&&this.backgroundShape.translate(r.x,r.y+e),this.leftBorderShape&&this.leftBorderShape.translate(r.x,r.y+e)},e.prototype.addBackGround=function(){var t=this.getStyle().cell,e=this.headerConfig,n=e.position,r=e.width,i=e.viewportHeight;this.backgroundShape=sx(this,{x:n.x,y:-n.y,width:r,height:i,fill:t.backgroundColor,stroke:"transparent",opacity:t.backgroundColorOpacity});var o=Tx(Yw.LEFT,{x:n.x,y:-n.y,width:r,height:i},t),a=o.position,l=o.style;this.leftBorderShape=hx(this,a,l)},e.prototype.addBorder=function(t,e){var n=this.getStyle().cell,r=Tx(Yw.BOTTOM,e,n);hx(t,r.position,r.style)},e.prototype.getStyle=function(){return this.headerConfig.spreadsheet.theme.rowCell},e.prototype.addText=function(t,e){var n=this.headerConfig,r=n.scrollY,i=n.viewportHeight,o=ya(ya({},this.getStyle().seriesText),{textBaseline:"top"}),a=e.label,l=e.x,s=e.y,u=e.width,c=e.height,h=this.getTextPadding(a,u),d=wS(s+h.top,c-h.top-h.bottom,r,i,o.fontSize);t.addShape("text",{attrs:ya(ya({x:l+h.left,y:d,text:a},o),{cursor:"pointer"})})},e.prototype.getTextPadding=function(t,e){var n=this.getStyle(),r=this.headerConfig.spreadsheet.measureTextWidth(t,n.seriesText),i=Math.max(Math.abs((e-r)/2),4);return ya(ya({},n.cell.padding),{left:i,right:i})},e}(hL),yL=function(){function t(t){var e=this;this.scrollFrameId=null,this.hideScrollBar=function(){var t,n,r;null===(t=e.hRowScrollBar)||void 0===t||t.hide(),null===(n=e.hScrollBar)||void 0===n||n.hide(),null===(r=e.vScrollBar)||void 0===r||r.hide()},this.delayHideScrollBar=Cf(this.hideScrollBar,1e3),this.delayHideScrollbarOnMobile=function(){fw()&&e.delayHideScrollBar()},this.showVerticalScrollBar=function(){var t;null===(t=e.vScrollBar)||void 0===t||t.show()},this.showHorizontalScrollBar=function(){var t,n;null===(t=e.hRowScrollBar)||void 0===t||t.show(),null===(n=e.hScrollBar)||void 0===n||n.show()},this.onContainerWheel=function(){e.onContainerWheelForPc(),e.onContainerWheelForMobile()},this.onContainerWheelForPc=function(){var t=e.spreadsheet.getCanvasElement();null===t||void 0===t||t.addEventListener("wheel",e.onWheel)},this.onContainerWheelForMobile=function(){e.mobileWheel=new CS(e.spreadsheet.container),e.mobileWheel.on("wheel",(function(t){e.spreadsheet.hideTooltip();var n=t.event,r=t.deltaX,i=t.deltaY,o=t.x,a=t.y;e.onWheel(ya(ya({},n),{deltaX:r,deltaY:i,offsetX:o,offsetY:a}))}))},this.bindEvents=function(){e.onContainerWheel(),e.emitPaginationEvent()},this.setScrollOffset=function(t){Object.keys(t).forEach((function(n){var r=t[n];Hv(r)||e.spreadsheet.store.set(n,Math.floor(r))}))}
2,this.getScrollOffset=function(){var t=e.spreadsheet.store;return{scrollX:t.get("scrollX",0),scrollY:t.get("scrollY",0),hRowScrollX:t.get("hRowScrollX",0)}},this.emitPaginationEvent=function(){var t=e.cfg.pagination;if(t){var n=t.current,r=void 0===n?1:n,i=t.pageSize,o=e.viewCellHeights.getTotalLength(),a=Math.floor((o-1)/i)+1;e.cfg.spreadsheet.emit(uo.LAYOUT_PAGINATION,{pageSize:i,pageCount:a,total:o,current:r})}},this.unbindEvents=function(){var t=e.spreadsheet.getCanvasElement();null===t||void 0===t||t.removeEventListener("wheel",e.onWheel),e.mobileWheel.destroy()},this.clipPanelGroup=function(){var t;e.foregroundGroup=e.spreadsheet.foregroundGroup,e.backgroundGroup=e.spreadsheet.backgroundGroup,e.panelGroup=e.spreadsheet.panelGroup;var n=e.panelBBox,r=n.width,i=n.height;null===(t=e.spreadsheet.panelScrollGroup)||void 0===t||t.setClip({type:"rect",attrs:{x:0,y:e.cornerBBox.height,width:r,height:i}})},this.calculateCellWidthHeight=function(){var t=Py(e.layoutResult.colLeafNodes,(function(t,e){return t.push(Gf(t)+e.width),t}),[0]);e.viewCellWidths=t,e.viewCellHeights=e.getViewCellHeights(e.layoutResult)},this.getRealScrollX=function(t,n){return void 0===n&&(n=0),e.cfg.spreadsheet.isScrollContainsRowHeader()?t:n},this.calculatePanelBBox=function(){e.panelBBox=new cL(e,!0)},this.getRealWidth=function(){return Gf(e.viewCellWidths)},this.getRealHeight=function(){var t=e.cfg.pagination,n=e.viewCellHeights;if(t){var r=e.getCellRange(),i=r.start,o=r.end;return n.getCellOffsetY(o+1)-n.getCellOffsetY(i)}return n.getTotalHeight()},this.clearAllGroup=function(){for(var t=e.panelGroup.getChildren()||[],n=t.length-1;n>=0;n--){var r=t[n];r instanceof bi?r.set("children",[]):t[n].remove()}e.foregroundGroup.set("children",[]),e.backgroundGroup.set("children",[])},this.scrollWithAnimation=function(t,n,r){var i,o;void 0===t&&(t={}),void 0===n&&(n=200);var a=e.getAdjustedScrollOffset({scrollX:(null===(i=t.offsetX)||void 0===i?void 0:i.value)||0,scrollY:(null===(o=t.offsetY)||void 0===o?void 0:o.value)||0}),l=a.scrollX,s=a.scrollY;e.timer&&e.timer.stop();var u=Object.values(e.getScrollOffset()),c=Qe(u,[void 0===l?u[0]:l,void 0===s?u[1]:s]);e.timer=he((function(t){var i=Math.min(t/n,1),o=wa(c(i),2),a=o[0],l=o[1];e.setScrollOffset({scrollX:a,scrollY:l}),e.startScroll(),t>n&&(e.timer.stop(),null===r||void 0===r||r())}))},this.scrollImmediately=function(t){var n,r;void 0===t&&(t={});var i=e.getAdjustedScrollOffset({scrollX:(null===(n=t.offsetX)||void 0===n?void 0:n.value)||0,scrollY:(null===(r=t.offsetY)||void 0===r?void 0:r.value)||0}),o=i.scrollX,a=i.scrollY;e.setScrollOffset({scrollX:o,scrollY:a}),e.startScroll()},this.startScroll=function(t){var n,r;void 0===t&&(t=!1);var i=e.getScrollOffset(),o=i.scrollX,a=i.scrollY;null===(n=e.hScrollBar)||void 0===n||n.onlyUpdateThumbOffset(e.getScrollBarOffset(o,e.hScrollBar)),null===(r=e.vScrollBar)||void 0===r||r.onlyUpdateThumbOffset(e.getScrollBarOffset(a,e.vScrollBar)),e.dynamicRenderCell(t)},this.getRendererHeight=function(){var t=e.getCellRange(),n=t.start,r=t.end;return e.viewCellHeights.getCellOffsetY(r+1)-e.viewCellHeights.getCellOffsetY(n)},this.getAdjustedScrollOffset=function(t){var n=t.scrollX,r=t.scrollY,i=t.hRowScrollX;
2return{scrollX:eL(n,e.layoutResult.colsHierarchy.width,e.panelBBox.width),scrollY:eL(r,e.getRendererHeight(),e.panelBBox.height),hRowScrollX:tL(i,e.cornerBBox)}},this.renderRowScrollBar=function(t){if(!e.cfg.spreadsheet.isScrollContainsRowHeader()&&e.cornerBBox.width<e.cornerBBox.originalWidth){var n=e.cornerBBox.originalWidth-e.cornerBBox.width,r=e.getScrollbarPosition().maxY,i=e.spreadsheet.theme,o=i.splitLine,a=i.scrollBar,l=Math.max(e.cornerBBox.width*e.cornerBBox.width/e.cornerBBox.originalWidth,null===a||void 0===a?void 0:a.thumbHorizontalMinSize),s=l-(null===o||void 0===o?void 0:o.verticalBorderWidth);e.hRowScrollBar=new $E({isHorizontal:!0,trackLen:e.cornerBBox.width,thumbLen:s,position:{x:e.cornerBBox.minX+e.scrollBarSize/2,y:r},thumbOffset:t*(e.cornerBBox.width-l)/n,theme:e.scrollBarTheme,scrollTargetMaxOffset:n}),e.hRowScrollBar.on(LE.ScrollChange,(function(t){var r,i,o=t.offset,a=e.getValidScrollBarOffset(o,n),l=Math.floor(a);e.setScrollOffset({hRowScrollX:l}),null===(r=e.rowHeader)||void 0===r||r.onRowScrollX(l,Eo),null===(i=e.rowIndexHeader)||void 0===i||i.onRowScrollX(l,Oo),e.cornerHeader.onRowScrollX(l,Io);var s=e.getScrollBarOffset(l,e.hRowScrollBar),u={scrollX:s,scrollY:0};e.hRowScrollBar.updateThumbOffset(s,!1),e.spreadsheet.emit(uo.ROW_CELL_SCROLL,u),e.spreadsheet.emit(uo.GLOBAL_SCROLL,u)})),e.foregroundGroup.add(e.hRowScrollBar)}},this.getValidScrollBarOffset=function(t,e){return Eh(t,0,e)}
2,this.renderHScrollBar=function(t,n,r){if(Math.floor(t)<Math.floor(n)){var i=e.scrollBarSize/2,o=e.getScrollbarPosition().maxY,a=t+(e.cfg.spreadsheet.isScrollContainsRowHeader()?e.cornerBBox.width:0),l={x:e.panelBBox.minX+(e.cfg.spreadsheet.isScrollContainsRowHeader()?-e.cornerBBox.width+i:i),y:o},s=n+(e.cfg.spreadsheet.isScrollContainsRowHeader()?e.cornerBBox.width:0),u=e.spreadsheet.theme.scrollBar,c=s-a,h=Math.max(a/s*a,null===u||void 0===u?void 0:u.thumbHorizontalMinSize);e.hScrollBar=new $E({isHorizontal:!0,trackLen:a,thumbLen:h,position:l,thumbOffset:r*(a-h)/c,theme:e.scrollBarTheme,scrollTargetMaxOffset:c}),e.hScrollBar.on(LE.ScrollChange,(function(t){var n=t.offset,r=t.updateThumbOffset,i=e.getValidScrollBarOffset(n,c);r&&e.hScrollBar.updateThumbOffset(e.getScrollBarOffset(i,e.hScrollBar),!1),e.setScrollOffset({scrollX:i}),e.dynamicRenderCell()})),e.foregroundGroup.add(e.hScrollBar)}},this.getScrollbarPosition=function(){var t=e.panelBBox,n=t.maxX,r=t.maxY,i=e.getCanvasHW(),o=i.width,a=i.height,l=e.spreadsheet.options.interaction.scrollbarPosition===aa.CONTENT;return{maxX:(l?n:o)-e.scrollBarSize,maxY:l?r:a-e.scrollBarSize}},this.renderVScrollBar=function(t,n,r){if(t<n){var i=e.spreadsheet.theme.scrollBar,o=Math.max(t/n*t,null===i||void 0===i?void 0:i.thumbVerticalMinSize),a=n-t,l=e.getScrollbarPosition().maxX;e.vScrollBar=new $E({isHorizontal:!1,trackLen:t,thumbLen:o,thumbOffset:r*(t-o)/a,position:{x:l,y:e.panelBBox.minY},theme:e.scrollBarTheme,scrollTargetMaxOffset:a}),e.vScrollBar.on(LE.ScrollChange,(function(t){var n=t.offset,r=t.updateThumbOffset,i=e.getValidScrollBarOffset(n,a);r&&e.vScrollBar.updateThumbOffset(e.getScrollBarOffset(i,e.vScrollBar),!1),e.setScrollOffset({scrollY:i}),e.dynamicRenderCell()})),e.foregroundGroup.add(e.vScrollBar)}},this.getScrollBarOffset=function(t,e){return t*(e.trackLen-e.thumbLen)/e.scrollTargetMaxOffset},this.isScrollOverThePanelArea=function(t){var n=t.offsetX,r=t.offsetY;return n>e.panelBBox.minX&&n<e.panelBBox.maxX&&r>e.panelBBox.minY&&r<e.panelBBox.maxY},this.isScrollOverTheCornerArea=function(t){var n=t.offsetX,r=t.offsetY;return n>e.cornerBBox.minX&&n<e.cornerBBox.maxX&&r>e.cornerBBox.minY&&r<e.cornerBBox.maxY+e.panelBBox.height},this.updateHorizontalRowScrollOffset=function(t){var n,r=t.offset,i=t.offsetX,o=t.offsetY;e.isScrollOverTheCornerArea({offsetX:i,offsetY:o})&&(null===(n=e.hRowScrollBar)||void 0===n||n.emitScrollChange(r))},this.updateHorizontalScrollOffset=function(t){var n,r=t.offset,i=t.offsetX,o=t.offsetY;e.hRowScrollBar&&!e.isScrollOverThePanelArea({offsetX:i,offsetY:o})||null===(n=e.hScrollBar)||void 0===n||n.emitScrollChange(r)},this.isScrollToLeft=function(t){var n=t.deltaX,r=t.offsetX,i=t.offsetY;if(!e.hScrollBar&&!e.hRowScrollBar)return!0;var o=!e.hRowScrollBar||e.isScrollOverThePanelArea({offsetY:i,offsetX:r})||e.hRowScrollBar.thumbOffset<=0,a=!e.hScrollBar||e.hScrollBar.thumbOffset<=0;return n<=0&&a&&o}
2,this.isScrollToRight=function(t){var n,r,i,o,a,l,s=t.deltaX,u=t.offsetX,c=t.offsetY;if(!e.hScrollBar&&!e.hRowScrollBar)return!0;var h=e.spreadsheet.isFrozenRowHeader()?null===(n=e.panelBBox)||void 0===n?void 0:n.width:null===(r=e.panelBBox)||void 0===r?void 0:r.maxX,d=!e.hRowScrollBar||e.isScrollOverThePanelArea({offsetY:c,offsetX:u})||(null===(i=e.hRowScrollBar)||void 0===i?void 0:i.thumbOffset)+(null===(o=e.hRowScrollBar)||void 0===o?void 0:o.thumbLen)>=e.cornerBBox.width,f=e.hRowScrollBar&&e.isScrollOverTheCornerArea({offsetX:u,offsetY:c})||(null===(a=e.hScrollBar)||void 0===a?void 0:a.thumbOffset)+(null===(l=e.hScrollBar)||void 0===l?void 0:l.thumbLen)>=h;return s>=0&&f&&d},this.isScrollToTop=function(t){var n;return!e.vScrollBar||t<=0&&(null===(n=e.vScrollBar)||void 0===n?void 0:n.thumbOffset)<=0},this.isScrollToBottom=function(t){var n,r,i;return!e.vScrollBar||t>=0&&(null===(n=e.vScrollBar)||void 0===n?void 0:n.thumbOffset)+(null===(r=e.vScrollBar)||void 0===r?void 0:r.thumbLen)>=(null===(i=e.panelBBox)||void 0===i?void 0:i.height)},this.isVerticalScrollOverTheViewport=function(t){return!e.isScrollToTop(t)&&!e.isScrollToBottom(t)},this.isHorizontalScrollOverTheViewport=function(t){return!e.isScrollToLeft(t)&&!e.isScrollToRight(t)},this.isScrollOverTheViewport=function(t){var n=t.deltaY,r=t.deltaX;return!(t.offsetY<=e.cornerBBox.maxY)&&(0!==n?e.isVerticalScrollOverTheViewport(n):0!==r&&e.isHorizontalScrollOverTheViewport(t))},this.cancelScrollFrame=function(){return(!fw()||!e.scrollFrameId)&&(cancelAnimationFrame(e.scrollFrameId),!0)},this.clearScrollFrameIdOnMobile=function(){fw()&&(e.scrollFrameId=null)},this.stopScrollChainingIfNeeded=function(t){"auto"!==e.spreadsheet.options.interaction.overscrollBehavior&&e.stopScrollChaining(t)},this.stopScrollChaining=function(t){var e,n,r;null===(e=null===t||void 0===t?void 0:t.preventDefault)||void 0===e||e.call(t),null===(r=null===(n=null===t||void 0===t?void 0:t.originalEvent)||void 0===n?void 0:n.preventDefault)||void 0===r||r.call(n)},this.onWheel=function(t){var n=e.spreadsheet.options.interaction,r=t.deltaX,i=t.deltaY,o=t.offsetX,a=t.offsetY;t.shiftKey&&(o=o-r+i,r=i,a-=i,i=0);var l=wa(function(t,e,n){var r=Math.abs(t/e),i=r>2?0:e;return[(r<=.5?0:t)*n.horizontal,i*n.vertical]}(r,i,n.scrollSpeedRatio),2),s=l[0],u=l[1];e.spreadsheet.hideTooltip(),e.spreadsheet.interaction.clearHoverTimer(),e.isScrollOverTheViewport({deltaX:s,deltaY:u,offsetX:o,offsetY:a})?(e.stopScrollChaining(t),e.spreadsheet.interaction.addIntercepts([na.HOVER]),e.cancelScrollFrame()&&(e.scrollFrameId=requestAnimationFrame((function(){var t,n=e.getScrollOffset(),r=n.scrollX,i=n.scrollY,l=n.hRowScrollX;0!==s&&(e.showHorizontalScrollBar(),e.updateHorizontalRowScrollOffset({offsetX:o,offsetY:a,offset:s+l}),e.updateHorizontalScrollOffset({offsetX:o,offsetY:a,offset:s+r})),0!==u&&(e.showVerticalScrollBar(),null===(t=e.vScrollBar)||void 0===t||t.emitScrollChange(u+i)),e.delayHideScrollbarOnMobile(),e.clearScrollFrameIdOnMobile()})))):e.stopScrollChainingIfNeeded(t)},this.addCell=function(t){var n=e.spreadsheet.panelScrollGroup;null===n||void 0===n||n.add(t)},this.realCellRender=function(t,n){var r=e.calculateXYIndexes(t,n);Ww.getInstance().logger("renderIndex:",e.preCellIndexes,r);var i=lL(e.preCellIndexes,r),o=i.add,a=i.remove;Ww.getInstance().debugCallback("Data Cell Render",(function(){Zf(o,(function(t){var n=wa(t,2),r=n[0],i=n[1],o=e.layoutResult.getCellMeta(i,r);if(o){var a=e.cfg.dataCell(o);a.set("name","".concat(r,"-").concat(i)),e.addCell(a)}}));var t=nL(e.panelGroup.getChildren(),Sb);Zf(a,(function(e){var n=wa(e,2),r=n[0],i=n[1],o=xp(t,(function(t){return t.get("name")==="".concat(r,"-").concat(i)}));null===o||void 0===o||o.remove(!0)})),Ww.getInstance().logger("Render Cell Panel: ".concat(null===t||void 0===t?void 0:t.length,", Add: ").concat(null===o||void 0===o?void 0:o.length,", Remove: ").concat(null===a||void 0===a?void 0:a.length))})),e.preCellIndexes=r,e.spreadsheet.emit(uo.LAYOUT_AFTER_REAL_DATA_CELL_RENDER,{add:o,remove:a,spreadsheet:e.spreadsheet})},this.getGridInfo=function(){var t=wa(e.preCellIndexes.center,4),n=t[0],r=t[1],i=t[2],o=t[3];
2return{cols:rL(n,r,e.layoutResult.colLeafNodes),rows:iL(i,o,e.viewCellHeights)}},this.onAfterScroll=Cf((function(){e.spreadsheet.interaction.isSelectedState()||e.spreadsheet.interaction.removeIntercepts([na.HOVER])}),300),this.cfg=t,this.spreadsheet=t.spreadsheet,this.init()}return Object.defineProperty(t.prototype,"scrollBarTheme",{get:function(){return this.spreadsheet.theme.scrollBar},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrollBarSize",{get:function(){return this.scrollBarTheme.size},enumerable:!1,configurable:!0}),t.prototype.getCellCustomWidth=function(t,e){return rl(e)?null===e||void 0===e?void 0:e(t):e},t.prototype.getCellDraggedWidth=function(t){var e=this.cfg.colCfg;return Uu(null===e||void 0===e?void 0:e.widthByFieldValue,"".concat(t.value))},t.prototype.render=function(){this.adjustScrollOffset(),this.renderHeaders(),this.renderScrollBars(),this.renderBackground(),this.dynamicRenderCell()},t.prototype.adjustScrollOffset=function(){var t=this.getAdjustedScrollOffset(this.getScrollOffset()),e=t.scrollX,n=t.scrollY,r=t.hRowScrollX;this.setScrollOffset({scrollX:e,scrollY:n,hRowScrollX:r})},t.prototype.getSeriesNumberWidth=function(){return this.cfg.showSeriesNumber?this.spreadsheet.theme.rowCell.seriesNumberWidth:0},t.prototype.getCanvasHW=function(){return{width:this.cfg.width,height:this.cfg.height}},t.prototype.getContentHeight=function(){var t=this.layoutResult,e=t.rowsHierarchy,n=t.colsHierarchy;return e.height+n.height},t.prototype.updateScrollOffset=function(t){var e,n,r,i;void 0===(null===(e=t.offsetX)||void 0===e?void 0:e.value)?void 0!==(null===(r=t.offsetY)||void 0===r?void 0:r.value)&&((null===(i=t.offsetY)||void 0===i?void 0:i.animate)?this.scrollWithAnimation(t):this.scrollImmediately(t)):(null===(n=t.offsetX)||void 0===n?void 0:n.animate)?this.scrollWithAnimation(t):this.scrollImmediately(t)},t.prototype.getPaginationScrollY=function(){var t=this.cfg.pagination;if(t){var e=t.current,n=void 0===e?1:e,r=t.pageSize,i=this.viewCellHeights,o=Math.max((n-1)*r,0);return i.getCellOffsetY(o)}return 0},t.prototype.destroy=function(){this.unbindEvents(),this.clearAllGroup(),this.preCellIndexes=null,cancelAnimationFrame(this.scrollFrameId)},t.prototype.calculateXYIndexes=function(t,e){var n=this.panelBBox,r=n.viewportHeight,i=n.viewportWidth;return{center:Aw(t,e,this.viewCellWidths,this.viewCellHeights,{width:i,height:r,x:0,y:0},this.getRealScrollX(this.cornerBBox.width))}},t.prototype.calculateCornerBBox=function(){this.cornerBBox=new uL(this,!0)},t.prototype.getCellRange=function(){var t=this.cfg.pagination;return function(t,e){var n=t,r=0,i=n.getTotalLength()-1;if(e){var o=e.current,a=void 0===o?1:o,l=e.pageSize;r=Math.max((a-1)*l,0),i=Math.min(a*l-1,n.getTotalLength()-1)}return{start:r,end:i}}(this.viewCellHeights,t)},t.prototype.clip=function(t,e){var n,r=this.spreadsheet.isFrozenRowHeader();null===(n=this.spreadsheet.panelScrollGroup)||void 0===n||n.setClip({type:"rect",attrs:{x:r?t:0,y:e,width:this.panelBBox.width+(r?0:t),height:this.panelBBox.height}})},t.prototype.translateRelatedGroups=function(t,e,n){var r,i;Bw(this.spreadsheet.panelScrollGroup,this.cornerBBox.width-t,this.cornerBBox.height-e),null===(r=this.rowHeader)||void 0===r||r.onScrollXY(this.getRealScrollX(t,n),e,Eo),null===(i=this.rowIndexHeader)||void 0===i||i.onScrollXY(this.getRealScrollX(t,n),e,Oo),this.cornerHeader.onCorScroll(this.getRealScrollX(t,n),Io),this.centerFrame.onChangeShadowVisibility(t,this.getRealWidth()-this.panelBBox.width),this.centerFrame.onBorderScroll(this.getRealScrollX(t)),this.columnHeader.onColScroll(t,Mo)},t.prototype.init=function(){var t=this;Ww.getInstance().debugCallback("Header Layout",(function(){t.layoutResult=t.doLayout(),t.saveInitColumnLeafNodes(t.layoutRe
2sult.colLeafNodes),t.spreadsheet.emit(uo.LAYOUT_AFTER_HEADER_LAYOUT,t.layoutResult)})),this.calculateCellWidthHeight(),this.calculateCornerBBox(),this.calculatePanelBBox(),this.clipPanelGroup(),this.bindEvents()},t.prototype.renderBackground=function(){var t=this.getCanvasHW(),e=t.width,n=t.height,r=this.spreadsheet.theme.background,i=r.color,o=r.opacity;this.backgroundGroup.addShape("rect",{attrs:{fill:i,opacity:o,x:0,y:0,width:e,height:n}})},t.prototype.renderScrollBars=function(){var t=this.getScrollOffset(),e=t.scrollX,n=t.scrollY,r=t.hRowScrollX,i=this.panelBBox,o=i.width,a=i.height,l=this.layoutResult.colsHierarchy.width,s=this.getRealHeight();this.renderRowScrollBar(r),this.renderHScrollBar(o,l,e),this.renderVScrollBar(a,s,n)},t.prototype.renderHeaders=function(){var t=this.getSeriesNumberWidth();this.rowHeader=this.getRowHeader(),this.columnHeader=this.getColHeader(),t>0&&!this.rowIndexHeader&&(this.rowIndexHeader=this.getSeriesNumberHeader()),this.cornerHeader=this.getCornerHeader(),this.centerFrame=this.getCenterFrame(),this.rowIndexHeader&&this.foregroundGroup.add(this.rowIndexHeader),this.rowHeader&&this.foregroundGroup.add(this.rowHeader),this.foregroundGroup.add(this.columnHeader),this.foregroundGroup.add(this.cornerHeader),this.foregroundGroup.add(this.centerFrame)},t.prototype.getRowHeader=function(){var t,e,n;if(!this.rowHeader){var r=this.panelBBox,i=r.y,o=r.viewportHeight,a=r.viewportWidth,l=r.height,s=this.getSeriesNumberWidth();return new vL({width:this.cornerBBox.width,height:l,viewportWidth:a,viewportHeight:o,position:{x:0,y:i},data:this.layoutResult.rowNodes,hierarchyType:this.cfg.hierarchyType,linkFields:null!==(n=null===(e=null===(t=this.cfg.spreadsheet.options)||void 0===t?void 0:t.interaction)||void 0===e?void 0:e.linkFields)&&void 0!==n?n:[],seriesNumberWidth:s,spreadsheet:this.spreadsheet})}return this.rowHeader},t.prototype.getColHeader=function(){if(!this.columnHeader){var t=this.panelBBox,e=t.x,n=t.width,r=t.viewportHeight,i=t.viewportWidth;return new dL({width:n,cornerWidth:this.cornerBBox.width,height:this.cornerBBox.height,viewportWidth:i,viewportHeight:r,position:{x:e,y:0},data:this.layoutResult.colNodes,scrollContainsRowHeader:this.cfg.spreadsheet.isScrollContainsRowHeader(),sortParam:this.cfg.spreadsheet.store.get("sortParam"),spreadsheet:this.spreadsheet})}return this.columnHeader},t.prototype.getCornerHeader=function(){return this.cornerHeader?this.cornerHeader:fL.getCornerHeader(this.panelBBox,this.cornerBBox,this.getSeriesNumberWidth(),this.cfg,this.layoutResult,this.spreadsheet)},t.prototype.getSeriesNumberHeader=function(){return gL.getSeriesNumberHeader(this.panelBBox,this.getSeriesNumberWidth(),this.layoutResult.rowsHierarchy.getNodes(0),this.spreadsheet,this.cornerBBox.width)},t.prototype.getCenterFrame=function(){var t;if(!this.centerFrame){var e=this.panelBBox,n=e.viewportWidth,r=e.viewportHeight,i=this.cornerBBox.width,o=this.cornerBBox.height,a=null===(t=this.cfg)||void 0===t?void 0:t.frame,l={position:{x:this.cornerBBox.x,y:this.cornerBBox.y},width:i,height:o,viewportWidth:n,viewportHeight:r,showViewportLeftShadow:!1,showViewportRightShadow:!1,scrollContainsRowHeader:this.cfg.spreadsheet.isScrollContainsRowHeader(),isPivotMode:this.cfg.spreadsheet.isPivotMode(),spreadsheet:this.cfg.spreadsheet};return a?a(l):new pL(l)}return this.centerFrame},t.prototype.updatePanelScrollGroup=function(){this.gridInfo=this.getGridInfo(),this.spreadsheet.panelScrollGroup.update(this.gridInfo)},t.prototype.dynamicRenderCell=function(t){var e=this.getScrollOffset(),n=e.scrollX,r=e.scrollY,i=e.hRowScrollX,o=r+this.getPaginationScrollY(),a=eL(o,this.viewCellHeights.getTotalHeight(),this.panelBBox.viewportHeight);this.spreadsheet.hideTooltip(),this.spreadsheet.interaction.clearHoverTimer(),this.realCellRender(n,a),this.updatePanelScrollGroup(),this.translateRelatedGroups(n,a,i),this.clip(n,a),t||this.emitScrollEvent({scrollX:n,scrollY:a}),this.onAfterScroll()},t.prototype.emitScrollEvent=function(t){this.spreadsheet.emit(uo.LAYOUT_CELL_SCROLL,t),this.spreadsheet.emit(uo.GLOBAL_SCROLL,t)},t.prototype.saveInitColumnLeafNodes=function(t){void 0===t&&(t=[]);var e=this.spreadsheet,n=e.store,r=e.options.interaction.hiddenColumnFields;t.length+r.length!==n.get("initColumnLeafNodes",[]).length&&n.set("initColumnLeafNodes",t)},t.prototype.getHiddenColumnsInfo=function(t){var e=this.spreadsheet.store.get("hiddenColumnsDetail",[]);return Iv(e)?null:e.find((function(e){return e.hideColumnNodes.some((function(e){return e.id===t.id}))}))},t}(),mL=function t(e){var n,r,i,o=e.facetCfg,a=e.customTreeItems,l=void 0===a?[]:a,s=e.level,u=e.parentNode,c=e.hierarchy,h=o.spreadsheet,d=o.collapsedRows,f=o.hierarchyCollapse;try{for(var p=Ca(l),v=p.next();!v.done;v=p.next()){var g=v.value,y=g.key,m=g.title,C=g.collapsed,w=g.children,x=ma(g,["key","title","collapsed","children"]),b=((i={})[po]=y,i),S=Ew(u.id,m),_=null!==C&&void 0!==C&&C,E=Uu(d,S),L=null!==E&&void 0!==E?E:f||_,T=new gw({id:S,key:y,label:m,value:m,level:s,parent:u,field:y,isTotals:!1,isCollapsed:L,hierarchy:c,query:b,spreadsheet:h,extra:x});s>c.maxLevel&&(c.maxLevel=s),Iv(w)&&(T.isLeaf=!0);var O=xw(o,u,T,c);Iv(w)||L||!O||t({facetCfg:o,parentNode:T,level:s+1,hierarchy:c,customTreeItems:w})}}catch(I){n={error:I}}finally{try{v&&!v.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}},CL=(ko+No).length,wL=function t(e){var n,r,i,o,a,l,s,u=e.parentNode,c=e.currentField,h=e.level,d=e.facetCfg,f=e.hierarchy,p=e.pivotMeta,v=d.spreadsheet,g=d.dataSet,y=d.collapsedRows,m=d.hierarchyCollapse,C=d.rowExpandDepth,w=u.query,x=u.id,b=(null===(o=v.dataCfg.fields.rows)||void 0===o?void 0:o.length)<=h,S=(null===(a=null===g||void 0===g?void 0:g.sortedDimensionValues)||void 0===a?void 0:a[c])||[],_=tx(Array.from(p.keys())),E=Jw(_,S,(function(t){return ko===x?t:Ew(x,t).slice(CL)})),L=ww(E,d,u,c),T=v.store.get("drillItemsNum");b&&T>0&&(L=L.slice(0,T)),0===h&&function(t,e,n){var r=t.getTotalsConfig(e);r.showGrandTotals&&n[r.reverseLayout?"unshift":"push"](new mw(r.label,!1,!0))}(v,c,L);try{for(var O=Ca(L),I=O.next();!I.done;I=O.next()){var M=I.value,R=M instanceof mw,A=R?null:p.get(M),B=void 0,k=w,N=!1,D=!1;if(R){var P=M;N=P.isGrandTotals,D=P.isSubTotals,B=aw(M.label),k=w}else B=M,k=ya(ya({},w),((i={})[c]=B,i));var z=Ew(x,B),F=null===y||void 0===y?void 0:y[z],H=Bv(C)?h>C:null,W=null!==(l=null!==F&&void 0!==F?F:H)&&void 0!==l?l:m,G=new gw({id:z,key:c,label:B,value:B,level:h,parent:u,field:c,isTotals:R,isGrandTotals:N,isSubTotals:D,isCollapsed:W,hierarchy:f,query:k,spreadsheet:v});h>f.maxLevel&&(f.maxLevel=h);var j=!(null===(s=null===A||void 0===A?void 0:A.children)||void 0===s?void 0:s.size);(j||R)&&(G.isLeaf=!0),j||(G.isTotals=!0);var U=xw(d,u,G,f);j||W||R||!U||t({level:h+1,currentField:A.childField,pivotMeta:A.children,facetCfg:d,parentNode:G,hierarchy:f})}}catch(V){n={error:V}}finally{try{I&&!I.done&&(r=O.return)&&r.call(O)}finally{if(n)throw n.error}}},xL=function(t){var e,n,r=t.isValueInCols,i=t.moreThanOneValue,o=t.rootNode,a=t.facetCfg,l=t.hierarchy,s=t.fields;t.isRowHeader?(e=!r&&i,n=!r&&!i):(e=r&&i,n=r&&!i),_w({addTotalMeasureInTotal:e,addMeasureInTotalQuery:n,parentNode:o,currentField:s[0],fields:s,facetCfg:a,hierarchy:l})},bL=function(t){var e=t.facetCfg,n=t.rootNode,r=t.hierarchy,i=e.dataSet.fields.customTreeItems;mL({customTreeItems:i,facetCfg:e,level:0,parentNode:n,hierarchy:r})},SL=function(t){t.spreadsheet.isHierarchyTreeType()?function(t){var e=t.facetCfg,n=t.rootNode,r=t.hierarchy,i=e.hierarchyType,o=e.rows,a=e.dataSet;"tree"===i?wL({level:0,currentField:o[0],pivotMeta:a.rowPivotMeta,facetCfg:e,parentNode:n,hierarchy:r}):bL(t)}(t):xL(t)},_L=function(t){var e=t.isRowHeader,n=t.facetCfg,r=n.spreadsheet,i=n.rows,o=void 0===i?[]:i,a=n.columns,l=void 0===a?[]:a,s=r.dataCfg.fields.valueInCols,u=r.
2isPivotMode(),c=n.dataSet.moreThanOneValue(),h=gw.rootNode(),d=new yw,f={isValueInCols:s,isPivotMode:u,moreThanOneValue:c,rootNode:h,hierarchy:d,spreadsheet:r,facetCfg:n,fields:e?o:l,isRowHeader:e};e?SL(f):function(t){var e=t.isPivotMode,n=t.hierarchy,r=t.rootNode,i=t.facetCfg;e?xL(t):Hw({parentNode:r,hierarchy:n,facetCfg:i})}(f);return{hierarchy:d,leafNodes:e&&r.isHierarchyTreeType()?d.getNodes():d.getLeaves()}},EL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),Object.defineProperty(e.prototype,"rowCellTheme",{get:function(){return this.spreadsheet.theme.rowCell.cell},enumerable:!1,configurable:!0}),e.prototype.doLayout=function(){var t=_L({isRowHeader:!0,facetCfg:this.cfg}),e=t.leafNodes,n=t.hierarchy,r=_L({isRowHeader:!1,facetCfg:this.cfg}),i=r.leafNodes,o=r.hierarchy;this.calculateNodesCoordinate(e,n,i,o);var a=this.cfg,l=a.dataSet,s=a.spreadsheet,u={colNodes:o.getNodes(),colsHierarchy:o,rowNodes:n.getNodes(),rowsHierarchy:n,rowLeafNodes:e,colLeafNodes:i,getCellMeta:function(t,n){var r,o,a,u=t||0,c=n||0,h=e[u],d=i[c];if(!h||!d)return null;var f,p=h.query,v=d.query,g=h.isTotals||h.isTotalMeasure||d.isTotals||d.isTotalMeasure,y=s.options.hierarchyType,m=null!==(o=Uu(s,"facet.cfg.colCfg.hideMeasureColumn"))&&void 0!==o&&o&&"customTree"!==y?((r={})[po]=null===(a=l.fields.values)||void 0===a?void 0:a[0],r):{},C=sg({},p,v,m),w=l.getCellData({query:C,rowNode:h,isTotals:g}),x=null;return Iv(w)?f=Uu(C,[po],""):(f=Uu(w,[po],""),x=Uu(w,[fo],null),g&&(f=Uu(C,[po],""),x=Uu(w,f,null))),{spreadsheet:s,x:d.x,y:h.y,width:d.width,height:h.height,data:w,rowIndex:u,colIndex:c,isTotals:g,valueField:f,fieldValue:x,rowQuery:p,colQuery:v,rowId:h.id,colId:d.id,id:wb(h.id,d.id)}},spreadsheet:s};return function(t,e){var n=null===t||void 0===t?void 0:t.layoutDataPosition;if(n){var r=e.getCellMeta,i=n(t.spreadsheet,r);return ya(ya({},e),{getCellMeta:i})}return e}(this.cfg,u)},e.prototype.calculateNodesCoordinate=function(t,e,n,r){this.calculateRowNodesCoordinate(t,e,n),this.calculateColNodesCoordinate(n,r,t,e.width)},e.prototype.calculateColNodesCoordinate=function(t,e,n,r){var i,o,a,l,s=this.cfg.spreadsheet,u=gw.blankNode(),c=e.getNodes();try{for(var h=Ca(e.sampleNodesForAllLevels),d=h.next();!d.done;d=h.next()){var f=d.value;f.height=this.getColNodeHeight(f),e.height+=f.height}}catch(m){i={error:m}}finally{try{d&&!d.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}for(var p=0,v=function(i){var o=c[i];if(o.isLeaf&&(o.colIndex=p,p+=1,o.x=u.x+u.width,o.width=g.calculateColLeafNodesWidth(o,t,n,r),e.width+=o.width,u=o),0===o.level)o.y=0;else{var l=e.sampleNodesForAllLevels.find((function(t){return t.level===o.level-1}));o.y=null!==(a=(null===l||void 0===l?void 0:l.y)+(null===l||void 0===l?void 0:l.height))&&void 0!==a?a:0}o.height=g.getColNodeHeight(o),bw(g.cfg,null,o)},g=this,y=0;y<c.length;y++)v(y);this.autoCalculateColNodeWidthAndX(t),Iv(null===(l=s.options.totals)||void 0===l?void 0:l.col)||(this.adjustTotalNodesCoordinate(e),this.adjustSubTotalNodesCoordinate(e))},e.prototype.autoCalculateColNodeWidthAndX=function(t){for(var e=null,n=t.slice(0);n.length;){var r=n.shift().parent;e!==r&&r&&(n.push(r),r.x=r.children[0].x,r.width=r.children.map((function(t){return t.width})).reduce((function(t,e){return t+e}),0),e=r)}},e.prototype.calculateColLeafNodesWidth=function(t,e,n,r){var i,o,a,l,s,u=this.cfg,c=u.colCfg,h=u.dataSet,d=u.filterDisplayDataItem,f=this.getCellDraggedWidth(t);if(Bv(f))return f;var p=this.getCellCustomWidth(t,null===c||void 0===c?void 0:c.width);if(Bv(p))return p;if(this.spreadsheet.getLayoutWidthType()===da.Compact){for(var v=this.spreadsheet.theme.colCell,g=v.bolderText,y=v.cell,m=v.icon,C=this.spreadsheet.dataSet.getFieldFormatter(t.field),w=null!==(i=null===C||void 0===C?void 0:C(t.value))&&void 0!==i?i:t.label,x=this.getExpectedCellIconWidth($o.COL_CELL,this.spreadsheet.isValueInCols()&&this.spreadsheet.options.showDefaultHeaderActionIcon,m),b=this.spreadsheet.measureTextWidthRoughly(w)+x,S=void 0,_=0,E=0;E<50;E++){var L=n[E];if(L){var T=h.getCellData({query:ya(ya({},t.query),L.query),rowNode:L,isTotals:t.isTotals||t.isTotalMeasure||L.isTotals||L.isTotalMeasure});if(T){var O=mb(T,d),I=null!==(a=null===(o=this.spreadsheet.dataSet.getFieldFormatter(T[po]))||void 0===o?void 0:o(O))&&void 0!==a?a:O,M="".concat(I
2),R=this.spreadsheet.measureTextWidthRoughly(M);R>_&&(S=M,_=R)}}}var A=b>_,B=A?w:S,k=A?x:0;return Ww.getInstance().logger("Max Label In Col:",t.field,B),this.spreadsheet.measureTextWidth(B,g)+(null===(l=y.padding)||void 0===l?void 0:l.left)+(null===(s=y.padding)||void 0===s?void 0:s.right)+k}return this.spreadsheet.isHierarchyTreeType()?this.getAdaptTreeColWidth(t,e,n):this.getAdaptGridColWidth(e,r)},e.prototype.getColNodeHeight=function(t){var e=this.cfg.colCfg,n=Uu(e,"heightByField.".concat(t.key));return null!==n&&void 0!==n?n:null===e||void 0===e?void 0:e.height},e.prototype.getExpectedCellIconWidth=function(t,e,n){var r,i=0;if(e)i=1;else{var o=Hb(Ip(this.spreadsheet.options.headerActionIcons,(function(t){return ya(ya({},t),{displayCondition:function(){return!0}})})),null,t);i=null!==(r=null===o||void 0===o?void 0:o.iconNames.length)&&void 0!==r?r:0}return i?i*(n.size+n.margin.left)+n.margin.right:0},e.prototype.calculateRowNodesCoordinate=function(t,e,n){var r,i,o,a,l,s,u,c,h,d,f=this.cfg,p=f.cellCfg,v=f.spreadsheet,g=v.isHierarchyTreeType(),y=Uu(v,"options.style.rowCfg.heightByField",{}),m=null!==(o=e.sampleNodesForAllLevels)&&void 0!==o?o:[];if(g)e.width=this.getTreeRowHeaderWidth();else try{for(var C=Ca(e.sampleNodesForAllLevels),w=C.next();!w.done;w=C.next()){var x=w.value;x.width=this.calculateGridRowNodesWidth(x,n),e.width+=x.width;var b=null!==(a=m[x.level-1])&&void 0!==a?a:{x:0,width:0};x.x=(null===b||void 0===b?void 0:b.x)+(null===b||void 0===b?void 0:b.width)}}catch(O){r={error:O}}finally{try{w&&!w.done&&(i=C.return)&&i.call(C)}finally{if(r)throw r.error}}for(var S=gw.blankNode(),_=e.getNodes(),E=0;E<_.length;E++){var L=_[E];if((g||!g&&L.isLeaf)&&(null!==(l=L.rowIndex)&&void 0!==l||(L.rowIndex=E),null!==(s=L.colIndex)&&void 0!==s||(L.colIndex=E),L.y=S.y+S.height,L.height=(null!==(u=null===y||void 0===y?void 0:y[L.id])&&void 0!==u?u:null===p||void 0===p?void 0:p.height)+(null===(c=this.rowCellTheme.padding)||void 0===c?void 0:c.top)+(null===(h=this.rowCellTheme.padding)||void 0===h?void 0:h.bottom),S=L,e.height+=L.height),g||0===L.level)L.x=0;else{b=m[L.level-1];L.x=(null===b||void 0===b?void 0:b.x)+(null===b||void 0===b?void 0:b.width)}if(g)L.width=this.getTreeRowHeaderWidth();else{var T=m[L.level];L.width=null===T||void 0===T?void 0:T.width}bw(this.cfg,L,null)}g||(this.autoCalculateRowNodeHeightAndY(t),Iv(null===(d=v.options.totals)||void 0===d?void 0:d.row)||(this.adjustTotalNodesCoordinate(e,!0),this.adjustSubTotalNodesCoordinate(e,!0)))},e.prototype.autoCalculateRowNodeHeightAndY=function(t){for(var e=null,n=t.slice(0);n.length;){var r=n.shift().parent;e!==r&&r&&(n.push(r),r.y=r.children[0].y,r.height=r.children.map((function(t){return t.height})).reduce((function(t,e){return t+e}),0),e=r)}},e.prototype.adjustTotalNodesCoordinate=function(t,e){var n,r,i,o=this.cfg.dataSet.moreThanOneValue(),a=t.maxLevel,l=xp(t.getNodes(0),(function(t){return t.isGrandTotals}));if(l instanceof gw){var s=l.children;if(e)l.width=t.width,Zf(s,(function(e){e.x=t.getNodes(a)[0].x}));else if(a>1||a<=1&&!o){var u=null!==(r=null===(n=null===s||void 0===s?void 0:s[0])||void 0===n?void 0:n.height)&&void 0!==r?r:0;l.height=t.height-u;var c=null===(i=xp(t.getNodes(a),(function(t){return!t.isTotalMeasure})))||void 0===i?void 0:i.y;Zf(s,(function(t){t.y=c}))}}},e.prototype.adjustSubTotalNodesCoordinate=function(t,e){var n=t.getNodes().filter((function(t){return t.isSubTotals}));if(!Iv(n)){var r=t.maxLevel;Zf(n,(function(n){var i,o,a,l=n.children;if(e)n.width=QE(t.sampleNodesForAllLevels,n.level,"width"),Zf(l,(function(e){e.x=t.getNodes(r)[0].x}));else{var s=QE(t.sampleNodesForAllLevels,n.level,"height"),u=null!==(o=null===(i=null===l||void 0===l?void 0:l[0])||void 0===i?void 0:i.height)&&void 0!==o?o:0;n.height=s-u,Zf(l,(function(e){e.y=t.getNodes(r)[0].y}));var c=null===(a=xp(t.getNodes(r),(function(t){return!t.isTotalMeasure})))||void 0===a?void 0:a.y;Zf(l,(function(t){t.y=c}))}}))}},e.prototype.calculateGridRowNodesWidth=function(t,e){var n=this.cfg,r=n.rowCfg,i=n.spreadsheet,o=Uu(r,"widthByField.".concat(t.key));if(Bv(o))return o;var a=this.getCellCustomWidth(t,null===r||void 0===r?void 0:r.width);return Bv(a)?a:i.getLayoutWidthType()!==da.Adaptive?this.getCompactGridRowWidth(t):this.getAdaptGridColWidth(e)},e.prototype.getAdaptTreeColWidth=function(t,e,n){var r=this.getCanvasHW().width-this.getSeriesNumberWidth(),i=Math.min(r/2,this.getTreeRowHeaderWidth()),o=Math.max(1,e.length),a=this.cfg.cellCfg;return Math.max(Nx(a,this.getColLabelLength(t,n)),(r-i)/o)},e.prototype.getColLabelLength=function(t,e){var n,r=Dx(null===t||void 0===t?void 0:t.value);if(Pa(r))return r.length;for(var i=1,o=0;o<50;o++){var a=e[o];if(!a)return i;for(var l=this.cfg.dataSet.getCellData({query:ya(ya({},t.query),a.query),rowNode:a,isTotals:t.isTotals||t.isTotalMeasure||a.isTotals||a.isTotalMeasure}),s=uu(l),u=0;u<s.length;u++){var c=l[s[u]],h=$y(null===(n=null===c||void 0===c?void 0:c.values)||void 0===n?void 0:n[0]);h>i&&(i=h)}}return i},e.prototype.getAdaptGridColWidth=function(t,e){var n=this.cfg,r=n.rows,i=n.cellCfg,o=r.length,a=t.length,l=this.getCanvasHW().width-this.getSeriesNumberWidth(),s=Math.max(1,o+a);return e?Math.max(Nx(i),(l-e)/a):Math.max(Nx(i),l/s)},e.prototype.getTreeRowHeaderWidth=function(){var t,e,n,r,i=this.cfg,o=i.rows,a=i.dataSet,l=i.rowCfg,s=i.treeRowsWidth,u=null!==s&&void 0!==s?s:null===l||void 0===l?void 0:l.treeRowsWidth;
2if(u)return u;var c=this.getCellCustomWidth(null,null===l||void 0===l?void 0:l.width);if(c)return c;var h=o.map((function(t){return a.getFieldName(t)})).join("/"),d=this.spreadsheet.theme.cornerCell,f=d.bolderText,p=d.icon,v=this.spreadsheet.measureTextWidth(h,f)+2*p.size+(null===(t=p.margin)||void 0===t?void 0:t.left)+(null===(e=p.margin)||void 0===e?void 0:e.right)+(null===(n=this.rowCellTheme.padding)||void 0===n?void 0:n.left)+(null===(r=this.rowCellTheme.padding)||void 0===r?void 0:r.right);return Math.max(null!==u&&void 0!==u?u:120,v)},e.prototype.getCompactGridRowWidth=function(t){var e,n=this,r=this.cfg,i=r.dataSet,o=r.spreadsheet,a=o.theme.rowCell,l=a.bolderText,s=a.icon,u=a.cell,c=o.theme.cornerCell,h=c.bolderText,d=c.icon,f=c.cell,p=t.field,v=t.isLeaf,g=this.getExpectedCellIconWidth($o.ROW_CELL,!o.isValueInCols()&&v&&o.options.showDefaultHeaderActionIcon,s),y=null===(e=i.getDimensionValues(p))||void 0===e?void 0:e.slice(0,50).map((function(t){var e,r;return null!==(r=null===(e=n.spreadsheet.dataSet.getFieldFormatter(p))||void 0===e?void 0:e(t))&&void 0!==r?r:t})),m=ig(y,(function(t){return"".concat(t).length})),C=o.measureTextWidth(m,l)+g+u.padding.left+u.padding.right,w=i.getFieldName(p),x=this.getExpectedCellIconWidth($o.CORNER_CELL,!1,d),b=o.measureTextWidth(w,h)+x+f.padding.left+f.padding.right;return Ww.getInstance().logger("Max Label In Row:",p,C>b?m:w),Math.max(C,b)},e.prototype.getViewCellHeights=function(t){var e=Py(t.rowLeafNodes,(function(t,e){return t.push(Gf(t)+e.height),t}),[0]);return{getTotalHeight:function(){return Gf(e)},getCellOffsetY:function(t){return e[t]},getTotalLength:function(){return e.length-1},getIndexRange:function(t,n){return JE(e,t,n)}}},e}(yL),LL=function(t){function e(e){var n,r=this;(r=t.call(this,e)||this).getScrollGroupClipBBox=function(){var t,e=r.headerConfig,n=e.width,i=e.height,o=e.scrollX,a=e.spreadsheet,l=a.options;if(!l.frozenColCount&&!l.frozenTrailingColCount)return{x:o,y:0,width:n,height:i};for(var s=null===(t=a.facet)||void 0===t?void 0:t.layoutResult.colLeafNodes,u=lx(a.options,s.length),c=u.frozenColCount,h=u.frozenTrailingColCount,d=0,f=0,p=0;p<c;p++)d+=s[p].width;for(p=0;p<h;p++)f+=s[s.length-1-p].width;return{x:o+d,y:0,width:n-d-f,height:i}};var i=null===(n=r.headerConfig.spreadsheet)||void 0===n?void 0:n.options,o=i.frozenColCount,a=i.frozenTrailingColCount;return o&&(r.frozenColGroup=r.addGroup({name:"colFrozenGroup",zIndex:4})),a&&(r.frozenTrailingColGroup=r.addGroup({name:"colFrozenTrailingGroup",zIndex:4})),r}return ga(e,t),e.prototype.isFrozenCell=function(t){var e=this.headerConfig.spreadsheet,n=null===e||void 0===e?void 0:e.options,r=n.frozenColCount,i=n.frozenTrailingColCount,o=t.colIndex,a=null===e||void 0===e?void 0:e.facet.layoutResult.colLeafNodes;return Ow(o,r)||Iw(o,i,a.length)},e.prototype.clear=function(){var e,n,r=this.headerConfig.spreadsheet;t.prototype.clear.call(this),null===(e=this.frozenTrailingColGroup)||void 0===e||e.clear(),null===(n=this.frozenColGroup)||void 0===n||n.clear();var i=null===r||void 0===r?void 0:r.foregroundGroup.findById(Ro);null===i||void 0===i||i.clear()},e.prototype.getCellInstance=function(t,e,n){return t.field===yo?new ES(t,e,n):new _S(t,e,n)},e.prototype.getCellGroup=function(t){var e,n,r=this.headerConfig.spreadsheet,i=null===r||void 0===r?void 0:r.options,o=i.frozenColCount,a=i.frozenTrailingColCount,l=null===(e=null===r||void 0===r?void 0:r.facet)||void 0===e?void 0:e.layoutResult.colNodes.filter((function(t){return Pw(t)})),s=Nw(l,o,a),u=s.colCount,c=s.trailingColCount;return Ow(Fw(t).colIndex,u)?this.frozenColGroup:Iw(Fw(t).colIndex,c,null===(n=null===r||void 0===r?void 0:r.facet)||void 0===n?void 0:n.layoutResult.colLeafNodes.length)?this.frozenTrailingColGroup:this.scrollGroup},e.prototype.isColCellInRect=function(e){var n,r,i=this.headerConfig.spreadsheet,o=null===i||void 0===i?void 0:i.options,a=o.frozenColCount,l=o.frozenTrailingColCount,s=null===(n=null===i||void 0===i?void 0:i.facet)||void 0===n?void 0:n.layoutResult.colLeafNodes.length,u=null===(r=null===i||void 0===i?void 0:i.facet)||void 0===r?void 0:r.layoutRe
2sult.colNodes.filter((function(t){return Pw(t)})),c=Nw(u,a,l),h=c.colCount,d=c.trailingColCount;return!(!Ow(Fw(e).colIndex,h)&&!Iw(Fw(e).colIndex,d,s))||t.prototype.isColCellInRect.call(this,e)},e.prototype.clip=function(){this.scrollGroup.setClip({type:"rect",attrs:this.getScrollGroupClipBBox()})},e}(dL),TL=function(t){function e(e){var n,r=t.call(this,e)||this;r.frozenGroupInfo=((n={})[Ho.FROZEN_COL]={width:0},n[Ho.FROZEN_ROW]={height:0},n[Ho.FROZEN_TRAILING_ROW]={height:0},n[Ho.FROZEN_TRAILING_COL]={width:0},n),r.panelScrollGroupIndexes=[],r.onSortHandler=function(t){var e=r.spreadsheet,n=t;Array.isArray(t)||(n=[t]);var i=e.dataCfg.sortParams||[];n=n.map((function(t){var e,n,r=ya(ya({},t),{sortFieldId:null!==(e=t.sortKey)&&void 0!==e?e:t.sortFieldId}),o=null!==(n=i.find((function(t){return t.sortFieldId===r.sortFieldId})))&&void 0!==n?n:{};return ya(ya({},o),r)}));var o=i.filter((function(t){return!n.find((function(e){return e.sortFieldId===t.sortFieldId}))}));qy(e.dataCfg,"sortParams",xa(xa([],wa(o),!1),wa(n),!1)),e.setDataCfg(e.dataCfg),e.render(!0),e.emit(uo.RANGE_SORTED,e.dataSet.getDisplayDataSet())},r.onFilterHandler=function(t){var e=r.spreadsheet,n=!t.filteredValues||0===t.filteredValues.length,i=e.dataCfg.filterParams||[],o=i.findIndex((function(e){return e.filterKey===t.filterKey}));-1!==o?n?i.splice(o):i[o]=t:i.push(t),qy(e.dataCfg,"filterParams",i),e.render(!0),e.emit(uo.RANGE_FILTERED,e.dataSet.getDisplayDataSet())},r.initFrozenGroupPosition=function(){var t=r.getScrollOffset(),e=t.scrollY,n=t.scrollX,i=r.getPaginationScrollY();Bw(r.spreadsheet.frozenRowGroup,r.cornerBBox.width-n,r.cornerBBox.height-i),Bw(r.spreadsheet.frozenColGroup,r.cornerBBox.width,r.cornerBBox.height-e-i),Bw(r.spreadsheet.frozenTrailingColGroup,r.cornerBBox.width,r.cornerBBox.height-e-i),Bw(r.spreadsheet.frozenTopGroup,r.cornerBBox.width,r.cornerBBox.height-i)},r.getTotalHeightForRange=function(t,e){if(t<0||e<0)return 0;if(r.rowOffsets)return r.rowOffsets[e+1]-r.rowOffsets[t];for(var n=0,i=t;i<e+1;i++){n+=r.getDefaultCellHeight()}return n},r.getShadowFill=function(t){var e,n,i=Uu(r.cfg,"spreadsheet.theme.splitLine");return"l (".concat(t,") 0:").concat(null===(e=i.shadowColors)||void 0===e?void 0:e.left," 1:").concat(null===(n=i.shadowColors)||void 0===n?void 0:n.right)},r.renderFrozenGroupSplitLine=function(t,e){var n,i=r.panelBBox,o=i.width,a=i.height,l=i.viewportWidth,s=i.viewportHeight,u=r.cornerBBox.height,c=r.layoutResult.colNodes.filter((function(t){return Pw(t)})),h=r.getCellRange(),d=h.end-h.start,f=lx(r.spreadsheet.options,c.length,d),p=f.frozenRowCount,v=f.frozenColCount,g=f.frozenTrailingColCount,y=f.frozenTrailingRowCount,m=Math.floor(e-r.getPaginationScrollY()),C=Math.max(0,Gf(r.viewCellWidths)-l),w=Math.max(0,r.viewCellHeights.getCellOffsetY(h.end+1)-r.viewCellHeights.getCellOffsetY(h.start)-s);null===(n=r.foregroundGroup.findById(To))||void 0===n||n.remove();var x,b,S,_,E=Uu(r.cfg,"spreadsheet.theme.splitLine"),L=r.foregroundGroup.addGroup({id:To,zIndex:4}),T={lineWidth:null===E||void 0===E?void 0:E.verticalBorderWidth,stroke:null===E||void 0===E?void 0:E.verticalBorderColor,opacity:null===E||void 0===E?void 0:E.verticalBorderColorOpacity},O={lineWidth:null===E||void 0===E?void 0:E.horizontalBorderWidth,stroke:null===E||void 0===E?void 0:E.horizontalBorderColor,opacity:null===E||void 0===E?void 0:E.horizontalBorderColorOpacity};v>0&&(hx(L,{x1:x=c.reduce((function(t,e,n){return n<v?t+e.width:t}),0),x2:x,y1:u,y2:u+(b=y>0?a:s)},ya({},T)),E.showShadow&&t>0&&L.addShape("rect",{attrs:{x:x,y:u,width:E.shadowWidth,height:b,fill:r.getShadowFill(0)}}));p>0&&(hx(L,{x1:0,x2:_=g>0?o:l,y1:S=u+r.getTotalHeightForRange(h.start,h.start+p-1),y2:S},ya({},O)),E.showShadow&&m>0&&L.addShape("rect",{attrs:{x:0,y:S,width:_,height:E.shadowWidth,fill:r.getShadowFill(90)}}));g>0&&(hx(L,{x1:x=c[c.length-g].x,x2:x,y1:u,y2:u+(b=y?a:s)},ya({},T)),E.showShadow&&Math.floor(t)<Math.floor(C)&&L.addShape("rect",{attrs:{x:x-E.shadowWidth,y:u,width:E.shadowWidth,height:b,fill:r.getShadowFill(180)}}));y>0&&(hx(L,{x1:0,x2:_=g>0?o:l,y1:S=r.panelBBox.maxY-r.getTotalHeightForRange(h.end-y+1,h.end),y2:S},ya({},O)),E.showShadow&&m<Math.floor(w)&&L.addShape("rect",{attrs:{x:0,y:S-E.shadowWidth,width:_,height:E.shadowWidth,fill:r.getShadowFill(270)}}));r.foregroundGroup.sort()}
2,r.renderFrozenPanelCornerGroup=function(){var t=r.layoutResult.colNodes.filter((function(t){return Pw(t)})),e=r.getCellRange(),n=lx(r.spreadsheet.options,t.length,e.end-e.start+1),i=n.frozenRowCount,o=n.frozenColCount,a=n.frozenTrailingRowCount,l=n.frozenTrailingColCount,s=Nw(t,o,l),u=function(t,e,n){for(var r,i=t.frozenColCount,o=t.frozenRowCount,a=t.frozenTrailingColCount,l=t.frozenTrailingRowCount,s=((r={})[Fo.TOP]=[],r[Fo.BOTTOM]=[],r),u=0;u<i;u++){for(var c=n.start;c<n.start+o;c++)s[Fo.TOP].push({x:u,y:c});if(l>0)for(c=0;c<l;c++){var h=n.end-c;s[Fo.BOTTOM].push({x:u,y:h})}}for(u=0;u<a;u++){var d=e-1-u;for(c=n.start;c<n.start+o;c++)s[Fo.TOP].push({x:d,y:c});if(l>0)for(c=0;c<l;c++)h=n.end-c,s[Fo.BOTTOM].push({x:d,y:h})}return s}({frozenRowCount:i,frozenColCount:s.colCount,frozenTrailingRowCount:a,frozenTrailingColCount:s.trailingColCount},r.layoutResult.colLeafNodes.length,e);Object.keys(u).forEach((function(t){var e=u[t],n=r.spreadsheet[Qo[t]];n&&e.forEach((function(t){r.addFrozenCell(t.x,t.y,n)}))}))},r.addFrozenCell=function(t,e,n){var i=r.layoutResult.getCellMeta(e,t);if(i.isFrozenCorner=!0,i){var o=r.cfg.dataCell(i);n.add(o)}},r.getRealFrozenColumns=function(t,e){var n,i=t,o=e;if(t||e){var a=r.layoutResult.colsHierarchy.getNodes();a=a.filter((function(t){return Pw(t)})),i=(n=Nw(a,t,e)).colCount,o=n.trailingColCount}return{colCount:i,trailingColCount:o}},r.addCell=function(t){var e=r.spreadsheet.options,n=e.frozenRowCount,i=e.frozenColCount,o=e.frozenTrailingRowCount,a=e.frozenTrailingColCount,l=r.layoutResult.colsHierarchy.getLeaves().length,s=r.getCellRange(),u=r.getRealFrozenColumns(i,a),c=u.colCount,h=u.trailingColCount,d=function(t,e,n,r){var i=e.frozenColCount,o=e.frozenRowCount,a=e.frozenTrailingColCount,l=e.frozenTrailingRowCount,s=t.colIndex,u=t.rowIndex;return Mw(u,r.start,o)?Fo.ROW:Rw(u,r.end,l)?Fo.TRAILING_ROW:Ow(s,i)?Fo.COL:Iw(s,a,n)?Fo.TRAILING_COL:Fo.SCROLL}(t.getMeta(),{frozenRowCount:n,frozenColCount:c,frozenTrailingRowCount:o,frozenTrailingColCount:h},l,s),f=Qo[d];f&&r.spreadsheet[f].add(t)}
2,r.getFrozenOptions=function(){var t=r.layoutResult.colLeafNodes.length,e=r.getCellRange();return lx(r.cfg,t,e.end-e.start+1)};var i=r.spreadsheet;return i.on(uo.RANGE_SORT,r.onSortHandler),i.on(uo.RANGE_FILTER,r.onFilterHandler),r}return ga(e,t),Object.defineProperty(e.prototype,"dataCellTheme",{get:function(){return this.spreadsheet.theme.dataCell.cell},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){var e=this.spreadsheet;e.off(uo.RANGE_SORT,this.onSortHandler),e.off(uo.RANGE_FILTER,this.onFilterHandler),t.prototype.destroy.call(this)},e.prototype.calculateCornerBBox=function(){var t=this.layoutResult.colsHierarchy,e=Math.floor(t.height);this.cornerBBox=new uL(this),this.cornerBBox.height=e,this.cornerBBox.maxY=e},e.prototype.doLayout=function(){var t=this,e=this.cfg,n=e.dataSet,r=e.spreadsheet,i=new yw,o=_L({isRowHeader:!1,facetCfg:this.cfg}),a=o.leafNodes,l=o.hierarchy;this.calculateColNodesCoordinate(a,l);var s={colNodes:l.getNodes(),colsHierarchy:l,rowNodes:i.getNodes(),rowsHierarchy:i,rowLeafNodes:i.getLeaves(),colLeafNodes:a,getCellMeta:function(e,i){var o,l,s=t.cfg.showSeriesNumber,u=a[i],c=t.getCellHeight(e),h=t.getCellRange(),d=lx(t.cfg,a.length,h.end-h.start+1).frozenTrailingRowCount,f=u.x,p=t.viewCellHeights.getCellOffsetY(e);return Rw(e,h.end,d)&&(p=t.panelBBox.maxY-t.getTotalHeightForRange(e,h.end)),l=s&&u.field===yo?e+1:n.getCellData({query:{col:u.field,rowIndex:e}}),{spreadsheet:r,x:f,y:p,width:u.width,height:c,data:(o={},o[u.field]=l,o),rowIndex:e,colIndex:i,isTotals:!1,colId:u.id,rowId:String(e),valueField:u.field,fieldValue:l,id:wb(String(e),u.id)}},spreadsheet:r};return s},e.prototype.getAdaptiveColWidth=function(t){var e=this.cfg.cellCfg,n=this.cfg.showSeriesNumber;if(this.spreadsheet.getLayoutWidthType()!==da.Compact){var r=this.getSeriesNumberWidth(),i=t.length-(n?1:0),o=this.getCanvasHW().width-r;return Math.max(null===e||void 0===e?void 0:e.width,o/Math.max(1,i))}return null===e||void 0===e?void 0:e.width},e.prototype.getColNodeHeight=function(t,e){var n=this.cfg.colCfg,r=$p(null===n||void 0===n?void 0:n.heightByField)[0]||(null===n||void 0===n?void 0:n.height);if(!e)return r;if(t.children&&t.children.length)return r;for(;t.parent;)e-=Pw(t)?0:r,t=t.parent;return e},e.prototype.calculateColNodesCoordinate=function(t,e){var n,r,i,o,a,l,s=gw.blankNode(),u=e.getNodes();try{for(var c=Ca(e.sampleNodesForAllLevels),h=c.next();!h.done;h=c.next()){var d=h.value;d.height=this.getColNodeHeight(d),e.height+=d.height}}catch(b){n={error:b}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}for(var f=this.getAdaptiveColWidth(t),p=0,v=0;v<u.length;v++){(x=u[v]).isLeaf&&(x.colIndex=p,p+=1,x.x=s.x+s.width,x.width=this.calculateColLeafNodesWidth(x,f),bw(this.cfg,null,x),e.width+=x.width,s=x),0===x.level?x.y=0:x.y=null!==(a=(null===(i=x.parent)||void 0===i?void 0:i.y)+(null===(o=x.parent)||void 0===o?void 0:o.height))&&void 0!==a?a:0,x.height=this.getColNodeHeight(x,e.height)}var g=u.filter((function(t){return Pw(t)})),y=lx(null===(l=this.spreadsheet)||void 0===l?void 0:l.options,g.length).frozenTrailingColCount;s=gw.blankNode();var m=this.getCanvasHW().width;if(y>0){var C=Nw(g,0,y).trailingColCount,w=u.filter((function(t){return t.isLeaf}));for(v=1;v<=C;v++){var x;(x=w[w.length-v]).x=1===v?m-x.width:s.x-x.width,s=x}}this.autoCalculateColNodeWidthAndX(t)},e.prototype.autoCalculateColNodeWidthAndX=function(t){for(var e=null,n=t.slice(0);n.length;){var r=n.shift().parent;e!==r&&r&&(n.push(r),r.x=r.children[0].x,r.width=r.children.map((function(t){return t.width})).reduce((function(t,e){return t+e}),0),e=r)}},e.prototype.calculateColLeafNodesWidth=function(t,e){var n=this.cfg,r=n.colCfg,i=n.dataSet,o=n.spreadsheet,a=this.spreadsheet.getLayoutWidthType(),l=this.getCellDraggedWidth(t);if(Bv(l))return l;var s,u=this.getCellCustomWidth(t,null===r||void 0===r?void 0:r.width);if(Bv(u))return u;if(a===da.Compact){var c=i.getDisplayDataSet(),h=i.getFieldFormatter(t.field),d=ig(null===c||void 0===c?void 0:c.slice(0,50).map((function(e){var n;return"".concat(null!==(n=null===h||void 0===h?void 0:h(e[t.field]))&&void 0!==n?n:e[t.field])})),(function(t){return o.measureTextWidthRoughly(t)}));Ww.getInstance().logger("Max Label In Col:",t.field,d);var f=o.theme.colCell.bolderText,p=o.theme.dataCell,v=p.text,g=p.cell,y=o.measureTextWidth(d,v)+g.padding.left+g.padding.right+1,m=o.measureTextWidth(t.label,f)+SS(this.spreadsheet,t,o.theme.colCell);s=Math.max(m,y)}else s=e;return t.field===yo&&(s=this.getSeriesNumberWidth()),s},e.prototype.getDefaultCellHeight=function(){var t=this.cfg.cellCfg;return null===t||void 0===t?void 0:t.height},e.prototype.getCellHeight=function(t){if(this.rowOffsets){var e=Uu(this.spreadsheet,"options.style.rowCfg.heightByField",{}),n=null===e||void 0===e?void 0:e[String(t)];if(Bv(n))return n}return this.getDefaultCellHeight()},e.prototype.initRowOffsets=function(){var t=this,e=this.cfg.dataSet,n=Uu(this.spreadsheet,"options.style.rowCfg.heightByField",{});if(Object.keys(n).length){var r=e.getDisplayDataSet();this.rowOffsets=[0];var i=0;r.forEach((function(e,r){var o,a=null!==(o=null===n||void 0===n?void 0:n[String(r)])&&void 0!==o?o:t.getDefaultCellHeight(),l=i+a;t.rowOffsets.push(l),i=l}))}},e.prototype.getViewCellHeights=function(){var t=this,e=this.cfg.dataSet;this.initRowOffsets();var n=this.getDefaultCellHeight();return{getTotalHeight:function(){return t.rowOffsets?Gf(t.rowOffsets):n*e.getDisplayDataSet().length},getCellOffsetY:function(e){if(e<=0)return 0;if(t.rowOffsets)return t.rowOffsets[e];for(var r=0,i=0;i<e;i++)r+=n;return r},getTotalLength:function(){return e.getDisplayDataSet().length},getIndexRange:function(e,r){if(t.rowOffsets)return JE(t.rowOffsets,e,r);var i=Math.floor(e/n),o=r%n===0?r/n-1:Math.floor(r/n);return{start:Math.max(0,i),end:Math.max(0,o)}}}},e.prototype.init=function(){t.prototype.init.call(this);var e=this.panelBBox,n=e.width,r=e.height;this.spreadsheet.panelGroup.setClip({type:"rect",attrs:{x:0,y:this.cornerBBox.height,width:n,height:r}})},e.prototype.getColHeader=function(){if(!this.columnHeader){var t=this.panelBBox,e=t.x,n=t.width,r=t.viewportHe
2ight,i=t.viewportWidth;return new LL({width:n,height:this.cornerBBox.height,viewportWidth:i,viewportHeight:r,cornerWidth:this.cornerBBox.width,position:{x:e,y:0},data:this.layoutResult.colNodes,scrollContainsRowHeader:this.cfg.spreadsheet.isScrollContainsRowHeader(),sortParam:this.cfg.spreadsheet.store.get("sortParam"),spreadsheet:this.spreadsheet})}return this.columnHeader},e.prototype.updateRowResizeArea=function(){var t=this.spreadsheet,e=t.foregroundGroup,n=Uu(t.options,"interaction.resize");if(Ev(n)?n:null===n||void 0===n?void 0:n.rowCellVertical){var r=e.findById(Eo),i=e.findById(Lo);r&&r.set("children",[]),i&&i.set("children",[]),nL(this.panelGroup.getChildren(),LS).filter((function(t){return t.shouldDrawResizeArea()})).forEach((function(t){t.drawResizeArea()}))}},e.prototype.render=function(){this.calculateFrozenGroupInfo(),this.renderFrozenPanelCornerGroup(),t.prototype.render.call(this),this.initFrozenGroupPosition()},e.prototype.calculateFrozenGroupInfo=function(){var t=this.getFrozenOptions(),e=t.frozenColCount,n=t.frozenRowCount,r=t.frozenTrailingColCount,i=t.frozenTrailingRowCount,o=this.layoutResult.colNodes.filter((function(t){return Pw(t)})),a=this.viewCellHeights,l=this.getCellRange(),s=this.frozenGroupInfo,u=s.frozenCol,c=s.frozenTrailingCol,h=s.frozenRow,d=s.frozenTrailingRow;e>0&&(u.width=o[e-1].x+o[e-1].width-0,u.range=[0,e-1]),n>0&&(h.height=a.getCellOffsetY(l.start+n)-a.getCellOffsetY(l.start),h.range=[l.start,l.start+n-1]),r>0&&(c.width=o[o.length-1].x-o[o.length-r].x+o[o.length-1].width,c.range=[o.length-r,o.length-1]),i>0&&(d.height=a.getCellOffsetY(l.end+1)-a.getCellOffsetY(l.end+1-i),d.range=[l.end-i+1,l.end])},e.prototype.getRowHeader=function(){return null},e.prototype.getSeriesNumberHeader=function(){return null},e.prototype.translateRelatedGroups=function(e,n,r){var i=this,o=this.spreadsheet,a=o.frozenColGroup,l=o.frozenTrailingColGroup;[o.frozenRowGroup,o.frozenTrailingRowGroup].forEach((function(t){kw(t,i.cornerBBox.width-e)})),[a,l].forEach((function(t){!function(t,e){var n,r=null===t||void 0===t?void 0:t.getMatrix(),i=null!==(n=null===r||void 0===r?void 0:r[7])&&void 0!==n?n:0;null===t||void 0===t||t.translate(0,e-i)}(t,i.cornerBBox.height-n)})),t.prototype.translateRelatedGroups.call(this,e,n,r),this.updateRowResizeArea(),this.renderFrozenGroupSplitLine(e,n)},e.prototype.calculateXYIndexes=function(t,e){var n=this.layoutResult.colLeafNodes.length,r=this.getCellRange(),i=this.panelBBox,o=i.viewportHeight,a=i.viewportWidth,l=this.getFrozenOptions(),s=l.frozenColCount,u=l.frozenRowCount,c=l.frozenTrailingColCount,h=l.frozenTrailingRowCount,d={width:a,height:o,x:0,y:0};if(c>0||s>0){var f=this.frozenGroupInfo,p=f.frozenTrailingCol,v=f.frozenCol;d.width-=p.width+v.width,d.x+=v.width}if(h>0||u>0){var g=this.frozenGroupInfo,y=g.frozenRow,m=g.frozenTrailingRow;d.height<y.height+m.height?(d.height=0,d.y=0):(d.height-=y.height+m.height,d.y+=y.height)}var C=Aw(t,e,this.viewCellWidths,this.viewCellHeights,d,this.getRealScrollX(this.cornerBBox.width));this.panelScrollGroupIndexes=C;var w=this.getRealFrozenColumns(s,c);return function(t,e,n,r){var i=e.frozenColCount,o=e.frozenRowCount,a=e.frozenTrailingColCount,l=e.frozenTrailingRowCount,s=xa([],wa(t),!1);Ow(s[0],i)&&(s[0]=i),Iw(s[1],a,n)&&(s[1]=n-a-1),Mw(s[2],r.start,o)&&(s[2]=r.start+o),Rw(s[3],r.end,l)&&(s[3]=r.end-l);var u=xa([],wa(s),!1);u[2]=r.start,u[3]=r.start+o-1;var c=xa([],wa(s),!1);c[0]=0,c[1]=i-1;var h=xa([],wa(s),!1);h[2]=r.end+1-l,h[3]=r.end;var d=xa([],wa(s),!1);return d[0]=n-a,d[1]=n-1,{center:s,frozenRow:u,frozenCol:c,frozenTrailingCol:d,frozenTrailingRow:h}}(C,{frozenColCount:w.colCount,frozenRowCount:u,frozenTrailingColCount:w.trailingColCount,frozenTrailingRowCount:h},n,r)},e.prototype.clip=function(t,e){var n,r,i=this.layoutResult.colLeafNodes,o=this.getPaginationScrollY(),a=this.spreadsheet,l=a.frozenRowGroup,s=a.frozenColGroup,u=a.frozenTrailingColGroup,c=a.frozenTrailingRowGroup,h=a.panelScrollGroup,d=s.getBBox().width,f=l.getBBox().height,p=u.getBBox(),v=c.getBBox().height,g=this.panelBBox.width-d-u.getBBox().width,y=this.panelBBox.height-f-v;
2h.setClip({type:"rect",attrs:{x:t+d,y:e+f,width:g,height:y}}),l.setClip({type:"rect",attrs:{x:t+d,y:o,width:g,height:f}}),c.setClip({type:"rect",attrs:{x:t+d,y:c.getBBox().minY,width:g,height:v}});var m={y:e+f,height:y};s.setClip({type:"rect",attrs:ya(ya({},m),{x:0,width:d})}),u.setClip({type:"rect",attrs:ya(ya({},m),{x:p.minX,width:p.width})});var C=this.spreadsheet.foregroundGroup.findById(Eo);C&&C.setClip({type:"rect",attrs:{x:0,y:f+this.cornerBBox.height,width:null!==(r=null===(n=null===i||void 0===i?void 0:i[0])||void 0===n?void 0:n.width)&&void 0!==r?r:0,height:y}})},e.prototype.updatePanelScrollGroup=function(){var e=this;t.prototype.updatePanelScrollGroup.call(this),[Ho.FROZEN_COL,Ho.FROZEN_ROW,Ho.FROZEN_TRAILING_COL,Ho.FROZEN_TRAILING_ROW].forEach((function(t){if(e.frozenGroupInfo[t].range){var n=[],r=[];if(t.toLowerCase().includes("row")){var i=wa(e.frozenGroupInfo[t].range,2),o=i[0],a=i[1];if(n=e.gridInfo.cols,r=iL(o,a,e.viewCellHeights),t===Ho.FROZEN_TRAILING_ROW){var l=e.spreadsheet.frozenTrailingRowGroup.getBBox().minY;r=function(t,e,n,r){var i=iL(t,e,r),o=r.getCellOffsetY(t);return i.map((function(t){return t-o+n}))}(o,a,Math.ceil(l),e.viewCellHeights)}}else{var s=wa(e.frozenGroupInfo[t].range,2),u=s[0],c=s[1],h=e.layoutResult.colNodes.filter((function(t){return Pw(t)}));n=rL(u,c,h),r=e.gridInfo.rows}e.spreadsheet["".concat(t,"Group")].updateGrid({cols:n,rows:r},"".concat(t,"Group"))}}))},e}(yL),OL=function(t){function e(e){var n=t.call(this,e)||this;return n.gridInfo={cols:[],rows:[]},n.updateGrid=function(t,e){void 0===e&&(e=Ao);var r=n.getBBox(),i=n.s2,o=i.theme,a=i.isTableMode,l=o.dataCell.cell,s=a()&&(e===Ao||e===wo);n.gridGroup&&n.findById(e)||(n.gridGroup=n.addGroup({id:e})),n.gridGroup.clear(),n.gridInfo=t,s&&n.gridInfo.cols.unshift(0);var u=l.verticalBorderWidth,c=l.verticalBorderWidth/2;n.gridInfo.cols.forEach((function(t){hx(n.gridGroup,{x1:t,x2:t,y1:Math.ceil(r.minY+c),y2:Math.floor(r.maxY-c)},{stroke:l.verticalBorderColor,strokeOpacity:l.verticalBorderColorOpacity,lineWidth:u,lineCap:Wo})}));var h=l.horizontalBorderWidth,d=l.horizontalBorderWidth/2;n.gridInfo.rows.forEach((function(t){hx(n.gridGroup,{x1:Math.ceil(r.minX+d),x2:Math.floor(r.maxX-d),y1:t,y2:t},{stroke:l.horizontalBorderColor,strokeOpacity:l.horizontalBorderColorOpacity,lineWidth:h,lineCap:Wo})})),n.gridGroup.toFront()},n.s2=e.s2,n}return ga(e,t),e}(bi),IL=function(t){function e(e){var n=t.call(this,e)||this;return n.initMergedCellsGroup(),n}return ga(e,t),e.prototype.initMergedCellsGroup=function(){this.mergedCellsGroup&&this.findById(mo)||(this.mergedCellsGroup=this.addGroup({id:mo}))},e.prototype.updateMergedCells=function(){this.initMergedCellsGroup(),Rb(this.s2,this.mergedCellsGroup),this.mergedCellsGroup.toFront()},e.prototype.addMergeCell=function(t){var e;null===(e=this.mergedCellsGroup)||void 0===e||e.add(t)},e.prototype.update=function(t){this.updateGrid(t),this.updateMergedCells()},e}(OL),ML=function(){function t(t){var e=this;this.isLinkFieldText=function(t){var n=e.getCellAppendInfo(t);return null===n||void 0===n?void 0:n.isLinkFieldText},this.spreadsheet=t,this.bindEvents()}return t.prototype.getCellAppendInfo=function(t){var e,n;return(null===(e=null===t||void 0===t?void 0:t.attr)||void 0===e?void 0:e.call(t,"appendInfo"))||(null===(n=null===t||void 0===t?void 0:t.attrs)||void 0===n?void 0:n.appendInfo)||{}},t.prototype.reset=function(){},t}(),RL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.bindEvents=function(){this.bindDataCellClick()},e.prototype.bindDataCellClick=function(){var t=this;this.spreadsheet.on(uo.DATA_CELL_CLICK,(function(e){var n;e.stopPropagation();var r=t.spreadsheet.interaction;if(r.clearHoverTimer(),!r.hasIntercepts([na.CLICK]))if(t.isLinkFieldText(e.target))t.emitLinkFieldClickEvent(e);else{var i=t.spreadsheet.getCell(e.target),o=i.getMeta();o&&(r.addIntercepts([na.HOVER]),r.isSelectedCell(i)?1===(null===(n=e.originalEvent)||void 0===n?void 0:n.detail)&&r.reset():(r.changeState({cells:NS(IS(i),t.spreadsheet),stateName:Zo.SELECTED,onUpdateCells:PS}),t.spreadsheet.emit(uo.GLOBAL_SELECTED,[i]),t.showTooltip(e,o)))}}))},e.prototype.getTooltipOperator=function(t,e){var n=this,r={key:"trend",text:aw("\u8d8b\u52bf"),icon:"Trend"},i=this.spreadsheet.getCell(t.target),o=UE(this.spreadsheet,t).operation,a=o.trend&&ya(ya({},r),{onClick:function(){n.spreadsheet.emit(uo.DATA_CELL_TREND_ICON_CLICK,ya(ya({},e),{record:n.spreadsheet.isTableMode()?n.spreadsheet.dataSet.getCellData({query:{rowIndex:e.rowIndex}}):void 0})),n.spreadsheet.hideTooltip()}});return VE(o,{defaultMenus:[a],cell:i})},e.prototype.showTooltip=function(t,e){var n=e.data,r=e.isTotals,i=void 0!==r&&r,o=e.value,a=e.fieldValue,l=e.field,s=e.valueField,u=n,c=this.spreadsheet.isTableMode(),h=[(c?ya(ya({},u),{value:o||a,valueField:l||s}):u)||ya(ya({},e.rowQuery),e.colQuery)],d=this.getTooltipOperator(t,e);this.spreadsheet.showTooltipWithInfo(t,h,{isTotals:i,operator:d,enterable:!0,hideSummary:!0,showSingleTips:c})},e.prototype.emitLinkFieldClickEvent=function(t){var e=this.getCellAppendInfo(t.target).cellData,n=e.valueField,r=e.data;this.spreadsheet.emit(uo.GLOBAL_LINK_FIELD_JUMP,{key:n,cellData:e,record:Object.assign({rowIndex:e.rowIndex},r)})},e}(ML),AL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.bindEvents=function(){this.bindDataCellClick()},e.prototype.bindDataCellClick=function(){var t=this;this.spreadsheet.on(uo.MERGED_CELLS_CLICK,(function(e){e.stopPropagation();var n=t.spreadsheet.interaction;n.hasIntercepts([na.CLICK])||n.addIntercepts([na.HOVER])}))},e}(ML),BL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isMultiSelection=!1,e.handleRowColClick=function(t){if(t.stopPropagation(),!e.isLinkFieldText(t.target)){var n=e.spreadsheet,r=n.interaction,i=n.options,o=e.spreadsheet.getCell(t.target),a=!(!i.interaction.multiSelection||!e.isMultiSelection);r.selectHeaderCell({cell:o,isMultiSelection:a})&&e.showTooltip(t)}},e.getHideColumnField=function(t){return e.spreadsheet.isTableMode()?t.field:t.id},e}return ga(e,t),e.prototype.bindEvents=function(){this.bindKeyboardDown(),this.bindKeyboardUp(),this.bindColCellClick(),this.bindRowCellClick(),this.bindTableColExpand()},e.prototype.bindKeyboardDown=function(){var t=this;this.spreadsheet.on(uo.GLOBAL_KEYBOARD_DOWN,(function(e){OS(e)&&(t.isMultiSelection=!0)}))},e.prototype.bindKeyboardUp=function(){var t=this;this.spreadsheet.on(uo.GLOBAL_KEYBOARD_UP,(function(e){OS(e)&&(t.isMultiSelection=!1,t.spreadsheet.interaction.removeIntercepts([na.CLICK]))}
2))},e.prototype.bindRowCellClick=function(){var t=this;this.spreadsheet.on(uo.ROW_CELL_CLICK,(function(e){t.handleRowColClick(e)}))},e.prototype.bindColCellClick=function(){var t=this;this.spreadsheet.on(uo.COL_CELL_CLICK,(function(e){t.handleRowColClick(e)}))},e.prototype.showTooltip=function(t){var e=UE(this.spreadsheet,t),n=e.operation;if(e.showTooltip){var r=this.spreadsheet.interaction,i=r.isSelectedState()?Ip(r.getActiveCells(),(function(t){var e=t.getMeta();return du({},e.query||{},fy(e,["colIndex","rowIndex"]))})):[],o=this.getTooltipOperator(t,n);this.spreadsheet.showTooltipWithInfo(t,i,{showSingleTips:!0,operator:o})}},e.prototype.getTooltipOperator=function(t,e){var n=this,r=this.spreadsheet.getCell(t.target),i=r.getMeta(),o=r.cellType===$o.COL_CELL,a=1===this.spreadsheet.getColumnLeafNodes().length,l={key:"hiddenColumns",text:aw("\u9690\u85cf"),icon:"EyeOutlined"},s=o&&!a&&i.isLeaf&&e.hiddenColumns&&ya(ya({},l),{onClick:function(){n.hideSelectedColumns()}});return VE(e,{defaultMenus:[s],cell:r})},e.prototype.bindTableColExpand=function(){var t=this;this.spreadsheet.on(uo.LAYOUT_COLS_EXPANDED,(function(e){t.handleExpandIconClick(e)}))},e.prototype.hideSelectedColumns=function(){var t=this.spreadsheet.interaction.getActiveCells().map((function(t){return t.getMeta()})).map(this.getHideColumnField);Nb(this.spreadsheet,t,!0)},e.prototype.handleExpandIconClick=function(t){var e=this.spreadsheet.store.get("hiddenColumnsDetail",[]),n=(e.find((function(e){var n=e.displaySiblingNode;return Db(n,t.id)}))||{}).hideColumnNodes,r=void 0===n?[]:n,i=this.spreadsheet.options.interaction.hiddenColumnFields,o=r.map(this.getHideColumnField),a=Wf(i,o),l=e.filter((function(e){var n=e.displaySiblingNode;return!Db(n,t.id)}));this.spreadsheet.setOptions({interaction:{hiddenColumnFields:a}}),this.spreadsheet.store.set("hiddenColumnsDetail",l),this.spreadsheet.interaction.reset(),this.spreadsheet.render(!1)},e}(ML),kL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.getRowData=function(t){var n,r=t.getHeadLeafChild(),i=e.spreadsheet.dataSet.getMultiData(null===r||void 0===r?void 0:r.query,null===r||void 0===r?void 0:r.isTotals,!0)[0];return ya(ya({},i),{rowIndex:null!==(n=t.rowIndex)&&void 0!==n?n:r.rowIndex})},e}return ga(e,t),e.prototype.bindEvents=function(){this.bindRowCellClick()},e.prototype.bindRowCellClick=function(){var t=this;this.spreadsheet.on(uo.ROW_CELL_CLICK,(function(e){if(!t.spreadsheet.interaction.hasIntercepts([na.CLICK])&&t.isLinkFieldText(e.target)){var n=t.getCellAppendInfo(e.target).cellData,r=n.key,i=t.getRowData(n);t.spreadsheet.emit(uo.GLOBAL_LINK_FIELD_JUMP,{key:r,cellData:n,record:i})}}))},e}(ML),NL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.bindEvents=function(){this.bindCornerCellClick()},e.prototype.bindCornerCellClick=function(){var t=this;this.spreadsheet.on(uo.CORNER_CELL_CLICK,(function(){var e=t.spreadsheet,n=e.interaction,r=e.tooltip;n.reset(),n.addIntercepts([na.HOVER]),setTimeout((function(){r.visible||n.removeIntercepts([na.HOVER])}))}))},e}(ML),DL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.bindEvents=function(){this.bindCornerCellHover(),this.bindDataCellHover(),this.bindRowCellHover(),this.bindColCellHover()},e.prototype.updateRowColCells=function(t){var e=t.rowId,n=t.colId,r=this.spreadsheet.interaction;(vb(n,r.getAllColHeaderCells(),Zo.HOVER),e)&&Zf(pb(e,r.getAllRowHeaderCells(),this.spreadsheet.isHierarchyTreeType()),(function(t){t.updateByState(Zo.HOVER)}))},e.prototype.changeStateToHoverFocus=function(t,e,n){var r,i=this,o=this.spreadsheet.interaction,a=this.spreadsheet.options.interaction,l=a.hoverFocus;o.clearHoverTimer();var s=function(){if(!o.hasIntercepts([na.HOVER])){o.changeState({cells:[IS(t)],stateName:Zo.HOVER_FOCUS});var r=i.spreadsheet.isTableMode(),l={isTotals:n.isTotals,enterable:!0,hideSummary:!0,showSingleTips:r};a.hoverHighlight&&i.updateRowColCells(n);var s=i.getCellData(n,r);i.spreadsheet.showTooltipWithInfo(e,s,l)}},u=800;if(Ev(l)||(u=null!==(r=null===l||void 0===l?void 0:l.duration)&&void 0!==r?r:800),0===u)s();else{var c=window.setTimeout((function(){return s()}),u);o.setHoverTimer(c)}},e.prototype.handleHeaderHover=function(t){var e=this.spreadsheet.getCell(t.target);if(!Iv(e)){var n=this.spreadsheet.interaction;n.clearHoverTimer(),n.isActiveCell(e)||(n.changeState({cells:[IS(e)],stateName:Zo.HOVER}
2),e.update(),this.showEllipsisTooltip(t,e))}},e.prototype.showEllipsisTooltip=function(t,e){if(e&&e.getActualText()!==e.getFieldValue()){var n=e.getMeta(),r={isTotals:n.isTotals,enterable:!0,hideSummary:!0,showSingleTips:true,enableFormat:this.spreadsheet.isPivotMode()},i=this.getCellData(n,true);this.spreadsheet.showTooltipWithInfo(t,i,r)}},e.prototype.getCellData=function(t,e){void 0===t&&(t={});var n=t.data,r=t.query,i=t.value,o=t.field,a=t.fieldValue,l=t.valueField,s=t.rowQuery,u=t.colQuery,c=n;return e?[ya(ya({},r),{value:i||a,valueField:o||l})]:[c||ya(ya({},s),u)]},e.prototype.bindDataCellHover=function(){var t=this;this.spreadsheet.on(uo.DATA_CELL_HOVER,(function(e){var n=t.spreadsheet.getCell(e.target);if(!Iv(n)){var r=t.spreadsheet,i=r.interaction,o=r.options.interaction,a=null===n||void 0===n?void 0:n.getMeta();i.isActiveCell(n)||(i.changeState({cells:[IS(n)],stateName:Zo.HOVER}),o.hoverHighlight&&t.updateRowColCells(a),o.hoverFocus&&t.changeStateToHoverFocus(n,e,a))}}))},e.prototype.bindRowCellHover=function(){var t=this;this.spreadsheet.on(uo.ROW_CELL_HOVER,(function(e){t.handleHeaderHover(e)}))},e.prototype.bindColCellHover=function(){var t=this;this.spreadsheet.on(uo.COL_CELL_HOVER,(function(e){t.handleHeaderHover(e)}))},e.prototype.bindCornerCellHover=function(){var t=this;this.spreadsheet.on(uo.CORNER_CELL_HOVER,(function(e){var n=t.spreadsheet.getCell(e.target);t.showEllipsisTooltip(e,n)}))},e}(ML),PL=function(){function t(t){var e=this;this.canvasEventHandlers=[],this.s2EventHandlers=[],this.domEventListeners=[],this.isCanvasEffect=!1,this.isGuiIconShape=function(t){return t instanceof Ai&&t.attrs.type===$w.type},this.onCanvasMousedown=function(t){if(e.target=t.target,e.spreadsheet.interaction.clearHoverTimer(),e.isResizeArea(t)){e.spreadsheet.emit(uo.LAYOUT_RESIZE_MOUSE_DOWN,t);var n=function(n){if(!e.spreadsheet.getCanvasElement())return!1;e.spreadsheet.getCanvasElement()!==n.target&&(t.clientX=n.clientX,t.clientY=n.clientY,t.originalEvent=n,e.spreadsheet.emit(uo.LAYOUT_RESIZE_MOUSE_MOVE,t))};return window.addEventListener("mousemove",n),void window.addEventListener("mouseup",(function(){window.removeEventListener("mousemove",n)}),{once:!0})}switch(e.spreadsheet.getCellType(t.target)){case $o.DATA_CELL:e.spreadsheet.emit(uo.DATA_CELL_MOUSE_DOWN,t);break;case $o.ROW_CELL:e.spreadsheet.emit(uo.ROW_CELL_MOUSE_DOWN,t);break;case $o.COL_CELL:e.spreadsheet.emit(uo.COL_CELL_MOUSE_DOWN,t);break;case $o.CORNER_CELL:e.spreadsheet.emit(uo.CORNER_CELL_MOUSE_DOWN,t);break;case $o.MERGED_CELL:e.spreadsheet.emit(uo.MERGED_CELLS_MOUSE_DOWN,t)}},this.onCanvasMousemove=function(t){if(e.isResizeArea(t))return e.activeResizeArea(t),void e.spreadsheet.emit(uo.LAYOUT_RESIZE_MOUSE_MOVE,t);e.resetResizeArea();var n=e.spreadsheet.getCell(t.target);if(n){var r=n.cellType;switch(r){case $o.DATA_CELL:e.spreadsheet.emit(uo.DATA_CELL_MOUSE_MOVE,t);break;case $o.ROW_CELL:e.spreadsheet.emit(uo.ROW_CELL_MOUSE_MOVE,t);break;case $o.COL_CELL:e.spreadsheet.emit(uo.COL_CELL_MOUSE_MOVE,t);break;case $o.CORNER_CELL:e.spreadsheet.emit(uo.CORNER_CELL_MOUSE_MOVE,t);break;case $o.MERGED_CELL:e.spreadsheet.emit(uo.MERGED_CELLS_MOUSE_MOVE,t)}if(!e.hasBrushSelectionIntercepts())switch(e.spreadsheet.emit(uo.GLOBAL_HOVER,t),r){case $o.DATA_CELL:e.spreadsheet.emit(uo.DATA_CELL_HOVER,t);break;case $o.ROW_CELL:e.spreadsheet.emit(uo.ROW_CELL_HOVER,t);break;case $o.COL_CELL:e.spreadsheet.emit(uo.COL_CELL_HOVER,t);break;case $o.CORNER_CELL:e.spreadsheet.emit(uo.CORNER_CELL_HOVER,t);break;case $o.MERGED_CELL:e.spreadsheet.emit(uo.MERGED_CELLS_HOVER,t)}}},this.onCanvasMouseup=function(t){if(e.isResizeArea(t))e.spreadsheet.emit(uo.LAYOUT_RESIZE_MOUSE_UP,t);else{var n=e.spreadsheet.getCell(t.target);if(n){var r=n.cellType;if(e.target===t.target){var i=e.isGuiIconShape(t.target);switch(r){case $o.DATA_CELL:e.spreadsheet.emit(uo.DATA_CELL_CLICK,t);break;case $o.ROW_CELL:if(i)break;e.spreadsheet.emit(uo.ROW_CELL_CLICK,t);break;case $o.COL_CELL:if(i)break;e.spreadsheet.emit(uo.COL_CELL_CLICK,t);break;case $o.CORNER_CELL:if(i)break;e.spreadsheet.emit(uo.CORNER_CELL_CLICK,t);break;case $o.MERGED_CELL:e.spreadsheet.emit(uo.MERGED_CELLS_CLICK,t)}}switch(r){case $o.DATA_CELL:e.spreadsheet.emit(uo.DATA_CELL_MOUSE_UP,t);break;case $o.ROW_CELL:e.spreadsheet.emit(uo.ROW_CELL_MOUSE_UP,t);break;case $o.COL_CELL:e.spreadsheet.emit(uo.COL_CELL_MOUSE_UP,t);break;case $o.CORNER_CELL:e.spreadsheet.emit(uo.CORNER_CELL_MOUSE_UP,t);break;case $o.MERGED_CELL:e.spreadsheet.emit(uo.MERGED_CELLS_MOUSE_UP,t)}}}},this.onCanvasClick=function(t){e.spreadsheet.emit(uo.GLOBAL_CLICK,t)},this.onCanvasDoubleClick=function(t){var n=e.spreadsheet;if(e.isResizeArea(t))n.emit(uo.LAYOUT_RESIZE_MOUSE_UP,t);else{n.emit(uo.GLOBAL_DOUBLE_CLICK,t);var r=n.getCell(t.target);if(r){var i=r.cellType;
2if(e.target===t.target)switch(i){case $o.DATA_CELL:n.emit(uo.DATA_CELL_DOUBLE_CLICK,t);break;case $o.ROW_CELL:n.emit(uo.ROW_CELL_DOUBLE_CLICK,t);break;case $o.COL_CELL:n.emit(uo.COL_CELL_DOUBLE_CLICK,t);break;case $o.CORNER_CELL:n.emit(uo.CORNER_CELL_DOUBLE_CLICK,t);break;case $o.MERGED_CELL:n.emit(uo.MERGED_CELLS_DOUBLE_CLICK,t)}}}},this.onCanvasMouseout=function(t){if(e.isAutoResetSheetStyle&&!(null===t||void 0===t?void 0:t.shape)){var n=e.spreadsheet.interaction;n.isSelectedState()||n.intercepts.size>0||n.reset()}},this.onCanvasContextMenu=function(t){var n=e.spreadsheet;if(e.isResizeArea(t))n.emit(uo.LAYOUT_RESIZE_MOUSE_UP,t);else switch(n.emit(uo.GLOBAL_CONTEXT_MENU,t),e.spreadsheet.getCellType(t.target)){case $o.DATA_CELL:e.spreadsheet.emit(uo.DATA_CELL_CONTEXT_MENU,t);break;case $o.ROW_CELL:e.spreadsheet.emit(uo.ROW_CELL_CONTEXT_MENU,t);break;case $o.COL_CELL:e.spreadsheet.emit(uo.COL_CELL_CONTEXT_MENU,t);break;case $o.CORNER_CELL:e.spreadsheet.emit(uo.CORNER_CELL_CONTEXT_MENU,t);break;case $o.MERGED_CELL:e.spreadsheet.emit(uo.MERGED_CELLS_CONTEXT_MENU,t)}},this.spreadsheet=t,this.bindEvents()}return Object.defineProperty(t.prototype,"canvasContainer",{get:function(){return this.spreadsheet.container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAutoResetSheetStyle",{get:function(){return this.spreadsheet.options.interaction.autoResetSheetStyle},enumerable:!1,configurable:!0}),t.prototype.bindEvents=function(){var t=this;this.clearAllEvents(),this.addCanvasEvent(so.CLICK,this.onCanvasClick),this.addCanvasEvent(so.MOUSE_DOWN,this.onCanvasMousedown),this.addCanvasEvent(so.MOUSE_MOVE,this.onCanvasMousemove),this.addCanvasEvent(so.MOUSE_OUT,this.onCanvasMouseout),this.addCanvasEvent(so.MOUSE_UP,this.onCanvasMouseup),this.addCanvasEvent(so.DOUBLE_CLICK,this.onCanvasDoubleClick),this.addCanvasEvent(so.CONTEXT_MENU,this.onCanvasContextMenu),this.addS2Event(uo.GLOBAL_ACTION_ICON_CLICK,(function(){t.spreadsheet.interaction.addIntercepts([na.HOVER]),t.spreadsheet.interaction.clearState()})),this.addDomEventListener(window,so.CLICK,(function(e){t.resetSheetStyle(e),t.isCanvasEffect=t.isMouseOnTheCanvasContainer(e)})),this.addDomEventListener(window,so.KEY_DOWN,(function(e){t.onKeyboardCopy(e),t.onKeyboardEsc(e),t.spreadsheet.emit(uo.GLOBAL_KEYBOARD_DOWN,e)})),this.addDomEventListener(window,so.KEY_UP,(function(e){t.spreadsheet.emit(uo.GLOBAL_KEYBOARD_UP,e)})),this.addDomEventListener(window,so.MOUSE_UP,(function(e){t.spreadsheet.emit(uo.GLOBAL_MOUSE_UP,e)})),this.addDomEventListener(window,so.MOUSE_MOVE,(function(e){t.spreadsheet.emit(uo.GLOBAL_MOUSE_MOVE,e)}))},t.prototype.onKeyboardCopy=function(t){if(this.isCanvasEffect&&this.spreadsheet.options.interaction.enableCopy&&Px(t.key,ta.COPY)&&(t.metaKey||t.ctrlKey)){var e=function(t){var e,n,r=t.interaction,i=r.getState().cells||[],o=null!==(e=r.getInteractedCells())&&void 0!==e?e:[];return(n=!Iv(o)&&pp(o,(function(t){return t.cellType===$o.ROW_CELL||t.cellType===$o.COL_CELL}))?Jx(o):eb(t,i))&&ib(n),Vx(n,zx.PLAIN)}(this.spreadsheet);Dv(e)||this.spreadsheet.emit(uo.GLOBAL_COPIED,e)}},t.prototype.onKeyboardEsc=function(t){this.isCanvasEffect&&Px(t.key,ta.ESC)&&this.resetSheetStyle(t)},t.prototype.resetSheetStyle=function(t){if(this.isAutoResetSheetStyle&&this.spreadsheet){var e=this.spreadsheet.interaction;e.hasIntercepts([na.BRUSH_SELECTION,na.COL_BRUSH_SELECTION,na.ROW_BRUSH_SELECTION])?e.removeIntercepts([na.BRUSH_SELECTION,na.ROW_BRUSH_SELECTION,na.COL_BRUSH_SELECTION]):this.isMouseOnTheTooltip(t)||this.isMouseOnTheCanvasContainer(t)||(this.spreadsheet.emit(uo.GLOBAL_RESET,t),e.reset())}},t.prototype.isMouseOnTheCanvasContainer=function(t){if(t instanceof MouseEvent){var e=this.spreadsheet.getCanvasElement();if(!e)return!1;var n=e.getBoundingClientRect()||{},r=n.x,i=n.y,o=this.getContainerRect(),a=o.width,l=o.height;return e.contains(t.target)&&t.clientX<=r+a&&t.clientY<=i+l}return!1},t.prototype.getContainerRect=function(){var t,e=(null===(t=this.spreadsheet.facet)||void 0===t?void 0:t.panelBBox)||{},n=e.maxX,r=e.maxY,i=this.spreadsheet.options,o=i.width,a=i.height;return{width:Math.min(o,n),height:Math.min(a,r)}},t.prototype.isMouseOnTheTooltip=function(t){var e,n,r,i;if(!UE(this.spreadsheet,t).showTooltip)return!1;var o=(null===(r=null===(n=null===(e=this.spreadsheet.tooltip)||void 0===e?void 0:e.container)||void 0===n?void 0:n.getBoundingClientRect)||void 0===r?void 0:r.call(n))||{},a=o.x,l=o.y,s=o.width,u=o.height;return t.target instanceof Node&&this.spreadsheet.tooltip.visible?function(t,e){for(var n=!1,r=e;r&&r!==document.body;){if(t===r){n=!0;break}r=r.parentElement}return n}(null===(i=this.spreadsheet.tooltip)||void 0===i?void 0:i.container,t.target):t instanceof MouseEvent&&(t.clientX>=a&&t.clientX<=a+s&&t.clientY>
2=l&&t.clientY<=l+u)},t.prototype.isResizeArea=function(t){var e=Uu(t.target,"attrs.appendInfo");return null===e||void 0===e?void 0:e.isResizeArea},t.prototype.activeResizeArea=function(t){this.resetResizeArea();var e=t.target;this.spreadsheet.store.set("activeResizeArea",e),e.attr(ra.backgroundOpacity,this.spreadsheet.theme.resizeArea.interactionState.hover.backgroundOpacity)},t.prototype.resetResizeArea=function(){var t=this.spreadsheet.store.get("activeResizeArea");Iv(t)||t.attr(ra.backgroundOpacity,this.spreadsheet.theme.resizeArea.backgroundOpacity),this.spreadsheet.store.set("activeResizeArea",t)},t.prototype.hasBrushSelectionIntercepts=function(){return this.spreadsheet.interaction.hasIntercepts([na.HOVER,na.BRUSH_SELECTION,na.ROW_BRUSH_SELECTION,na.COL_BRUSH_SELECTION])},t.prototype.clear=function(){this.unbindEvents()},t.prototype.unbindEvents=function(){this.clearAllEvents()},t.prototype.addCanvasEvent=function(t,e){var n;null===(n=this.canvasContainer)||void 0===n||n.on(t,e),this.canvasEventHandlers.push({type:t,handler:e})},t.prototype.addS2Event=function(t,e){this.spreadsheet.on(t,e),this.s2EventHandlers.push({type:t,handler:e})},t.prototype.addDomEventListener=function(t,e,n){if(t.addEventListener){var r=this.spreadsheet.options.interaction.eventListenerOptions;t.addEventListener(e,n,r),this.domEventListeners.push({target:t,type:e,handler:n,options:r})}else console.error("Please make sure ".concat(t," has addEventListener function"))},t.prototype.clearAllEvents=function(){var t=this;Zf(this.canvasEventHandlers,(function(e){var n,r=e.type,i=e.handler;null===(n=t.canvasContainer)||void 0===n||n.off(r,i)})),Zf(this.s2EventHandlers,(function(e){var n=e.type,r=e.handler;t.spreadsheet.off(n,r)})),Zf(this.domEventListeners,(function(t){t.target.removeEventListener(t.type,t.handler,t.options)})),this.canvasEventHandlers=[],this.s2EventHandlers=[],this.domEventListeners=[]},t}(),zL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRangeSelection=!1,e.handleColClick=function(t){t.stopPropagation();var n=e.spreadsheet.interaction,r=e.spreadsheet.getCell(t.target),i=null===r||void 0===r?void 0:r.getMeta();if(!Dv(null===i||void 0===i?void 0:i.x)){n.addIntercepts([na.HOVER]);var o=[IS(r)],a=e.spreadsheet.store.get("lastClickedCell");if(e.isRangeSelection&&a&&a.cellType===r.cellType&&a.getMeta().level===r.getMeta().level){var l=wa([e.spreadsheet.facet.layoutResult.rowsHierarchy.maxLevel,e.spreadsheet.facet.layoutResult.colsHierarchy.maxLevel],2),s=l[0],u=l[1],c=MS(a.getMeta(),r.getMeta()),h=c.start,d=c.end;r instanceof Sb?o=e.handleSeriesNumberRowSelected(h.rowIndex,d.rowIndex,r):r.cellType===$o.ROW_CELL&&r.getMeta().level===s?o=e.handleRowSelected(h.rowIndex,d.rowIndex,r):r.cellType===$o.COL_CELL&&r.getMeta().level===u&&(o=e.handleColSelected(h.colIndex,d.colIndex,r)),n.changeState({cells:o,stateName:Zo.SELECTED})}else e.spreadsheet.store.set("lastClickedCell",r);var f=o.map((function(t){return t.id}));n.updateCells(n.getRowColActiveCells(f)),e.spreadsheet.emit(uo.GLOBAL_SELECTED,n.getActiveCells())}},e}return ga(e,t),e.prototype.bindEvents=function(){this.bindKeyboardDown(),this.bindDataCellClick(),this.bindColCellClick(),this.bindKeyboardUp()},e.prototype.reset=function(){this.isRangeSelection=!1,this.spreadsheet.interaction.removeIntercepts([na.CLICK])},e.prototype.bindKeyboardDown=function(){var t=this;this.spreadsheet.on(uo.GLOBAL_KEYBOARD_DOWN,(function(e){e.key===ta.SHIFT&&(t.isRangeSelection=!0,t.spreadsheet.interaction.addIntercepts([na.CLICK]))}))},e.prototype.bindKeyboardUp=function(){var t=this;this.spreadsheet.on(uo.GLOBAL_KEYBOARD_UP,(function(e){e.key===ta.SHIFT&&t.reset()}))},e.prototype.bindColCellClick=function(){var t=this;this.spreadsheet.isTableMode()&&this.spreadsheet.on(uo.ROW_CELL_CLICK,(function(e){t.handleColClick(e)})),this.spreadsheet.on(uo.COL_CELL_CLICK,(function(e){t.handleColClick(e)}))},e.prototype.bindDataCellClick=function(){var t=this;this.spreadsheet.on(uo.DATA_CELL_CLICK,(function(e){e.stopPropagation();var n=t.spreadsheet.getCell(e.target),r=n.getMeta(),i=t.spreadsheet.interaction;if(r){var o=t.spreadsheet.store.get("lastClickedCell");if(t.isRangeSelection&&(null===o||void 0===o?void 0:o.cellType)===n.cellType){var a=MS(o.getMeta(),n.getMeta()),l=a.start,s=a.end,u=Ay(l.colIndex,s.colIndex+1).flatMap((function(e){var r=t.spreadsheet.facet.layoutRe
2sult.colLeafNodes[e].id;return Ay(l.rowIndex,s.rowIndex+1).map((function(i){return{id:(t.spreadsheet.facet.getSeriesNumberWidth()||t.spreadsheet.isTableMode()?String(i):t.spreadsheet.facet.layoutResult.rowLeafNodes[i].id)+"-"+r,colIndex:e,rowIndex:i,type:n.cellType}}))}));i.addIntercepts([na.CLICK,na.HOVER]),i.changeState({cells:u,stateName:Zo.SELECTED}),t.spreadsheet.showTooltipWithInfo(e,jE(t.spreadsheet)),t.spreadsheet.emit(uo.GLOBAL_SELECTED,i.getActiveCells())}else t.spreadsheet.store.set("lastClickedCell",n)}}))},e.prototype.handleSeriesNumberRowSelected=function(t,e,n){var r=this.spreadsheet.facet.layoutResult.colLeafNodes[0].id;return Ay(t,e+1).map((function(t){return{id:String(t)+"-"+r,colIndex:0,rowIndex:t,type:n.cellType}}))},e.prototype.handleRowSelected=function(t,e,n){return this.spreadsheet.facet.layoutResult.rowNodes.filter((function(n){return qp(n.rowIndex,t,e+1)})).map((function(t){return{id:t.id,colIndex:t.colIndex,rowIndex:t.rowIndex,type:n.cellType}}))},e.prototype.handleColSelected=function(t,e,n){return this.spreadsheet.facet.layoutResult.colLeafNodes.filter((function(n){return qp(n.colIndex,t,e+1)})).map((function(t){return{id:t.id,colIndex:t.colIndex,rowIndex:t.rowIndex,type:n.cellType}}))},e}(ML),FL=[ta.ARROW_LEFT,ta.ARROW_RIGHT,ta.ARROW_UP,ta.ARROW_DOWN],HL=function(t){function e(e){return t.call(this,e)||this}return ga(e,t),e.prototype.isCanvasEffect=function(){return this.spreadsheet.interaction.eventController.isCanvasEffect},e.prototype.bindEvents=function(){var t=this;this.spreadsheet.on(uo.GLOBAL_KEYBOARD_DOWN,(function(e){if(t.isCanvasEffect()){var n=e.shiftKey,r=e.metaKey,i=!1,o=!1,a=!1;FL.includes(e.key)&&(r&&n?(i=!1,o=!0,a=!1):r?(i=!0,o=!0,a=!0):n?(i=!1,o=!1,a=!1):(i=!0,o=!1,a=!0),t.handleMove({event:e,changeStartCell:i,isJumpMode:o,isSingleSelection:a}))}})),this.spreadsheet.on(uo.DATA_CELL_CLICK,(function(e){var n=t.spreadsheet.getCell(e.target).getMeta();n&&(t.startCell=t.getCellMetaFromViewMeta(n),t.endCell=t.startCell)}))},e.prototype.getCellMetaFromViewMeta=function(t){return{rowIndex:t.rowIndex,colIndex:t.colIndex,id:t.id,type:$o.DATA_CELL}},e.prototype.handleMove=function(t){var e=t.event,n=t.changeStartCell,r=t.isJumpMode,i=t.isSingleSelection,o=this,a=o.spreadsheet,l=o.startCell,s=o.endCell,u=n?l:s,c=this.getMoveInfo(e.key,u,r);if(c){var h=wa([c.row,c.col],2),d=h[0],f=h[1];this.scrollToActiveCell(a,d,f);var p=this.generateCellMeta(a,d,f),v=i?[p]:this.getRangeCells(a,l,p);!function(t,e){var n=t.interaction;n.changeState({stateName:Zo.SELECTED,cells:e}),t.emit(uo.GLOBAL_SELECTED,n.getActiveCells())}(a,v),n&&(this.startCell=p),this.endCell=p,this.spreadsheet.emit(uo.DATA_CELL_SELECT_MOVE,v)}},e.prototype.generateCellMeta=function(t,e,n){var r=t.isTableMode,i=t.facet.layoutResult,o=i.colLeafNodes,a=i.rowLeafNodes,l=r()?String(e):a[e].id,s=o[n].id;return{rowIndex:e,colIndex:n,id:wb(l,s),type:$o.DATA_CELL}},e.prototype.getRangeCells=function(t,e,n){for(var r=MS(e,n),i=r.start,o=i.rowIndex,a=i.colIndex,l=r.end,s=l.rowIndex,u=l.colIndex,c=[],h=o;h<=s;h++)for(var d=a;d<=u;d++)c.push(this.generateCellMeta(t,h,d));return c},e.prototype.getMoveInfo=function(t,e,n){var r=this.spreadsheet,i=r.options,o=i.frozenColCount,a=void 0===o?0:o,l=i.frozenRowCount,s=void 0===l?0:l,u=i.frozenTrailingColCount,c=void 0===u?0:u,h=i.frozenTrailingRowCount,d=void 0===h?0:h,f=r.facet.layoutResult,p=f.rowLeafNodes,v=wa([0+a,f.colLeafNodes.length-c-1],2),g=v[0],y=v[1],m=wa([0+s,(r.isTableMode()?r.dataSet.getDisplayDataSet().length:p.length)-d-1],2),C=m[0],w=m[1];if(e)switch(t){case ta.ARROW_RIGHT:if(e.colIndex+1>y)return;return{row:e.rowIndex,col:n?y:e.colIndex+1};case ta.ARROW_LEFT:if(e.colIndex-1<g)return;return{row:e.rowIndex,col:n?g:e.colIndex-1};case ta.ARROW_UP:if(e.rowIndex-1<C)return;return{row:n?C:e.rowIndex-1,col:e.colIndex};case ta.ARROW_DOWN:if(e.rowIndex+1>w)return;return{row:n?w:e.rowIndex+1,col:e.colIndex}}},e.prototype.calculateOffset=function(t,e,n){var r=t.options,i=r.frozenRowCount,o=void 0===i?0:i,a=r.frozenTrailingRowCount,l=void 0===a?0:a,s=t.facet,u=t.frozenColGroup,c=t.frozenTrailingColGroup,h=t.frozenRowGroup,d=t.frozenTrailingRowGroup,f=s.layoutRe
2sult.colLeafNodes,p=s.getScrollOffset(),v=p.scrollX,g=p.scrollY,y=s.panelBBox,m=y.viewportHeight,C=y.viewportWidth,w=Uu(t,"theme.splitLine"),x=u?Math.floor(u.getBBox().width-w.verticalBorderWidth/2):0,b=c?Math.floor(c.getBBox().width):0,S=h?Math.floor(h.getBBox().height-w.horizontalBorderWidth/2):0,_=d?Math.floor(d.getBBox().height):0,E=Aw(v,g,s.viewCellWidths,s.viewCellHeights,{width:C-x-b,height:m-S-_,x:x,y:S},s.getRealScrollX(s.cornerBBox.width)),L=-1,T=-1,O=f.find((function(t){return t.colIndex===n}));if(n<=E[0]?L=O.x-x:n>=E[1]&&n<f.length-l&&(L=O.x+O.width-C+b),e<=E[2])T=s.viewCellHeights.getCellOffsetY(e-o);else if(e>=E[3]){T=s.viewCellHeights.getCellOffsetY(e+1)+_-m}return{offsetX:L,offsetY:T}},e.prototype.scrollToActiveCell=function(t,e,n){var r=this.calculateOffset(t,e,n),i=r.offsetX,o=r.offsetY,a=t.facet,l=t.facet.getScrollOffset(),s=l.scrollX,u=l.scrollY;a.scrollWithAnimation({offsetX:{value:i>-1?i:s},offsetY:{value:o>-1?o:u}})},e}(ML),WL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.displayedCells=[],e.brushRangeCells=[],e.brushSelectionStage=Jo.UN_DRAGGED,e.brushSelectionMinimumMoveDistance=5,e.scrollAnimationComplete=!0,e.mouseMoveDistanceFromCanvas=0,e.setMoveDistanceFromCanvas=function(t,n,r){var i=0;if(n&&(i=t.x),r){var o=t.y;i=n?Math.max(o,i):o}e.mouseMoveDistanceFromCanvas=i},e.formatBrushPointForScroll=function(t){var n,r,i,o,a=t.x,l=t.y,s=e.spreadsheet.facet,u=s.panelBBox,c=u.minX,h=u.minY,d=u.maxX,f=u.maxY,p=(null===(n=e.endBrushPoint)||void 0===n?void 0:n.x)+a,v=(null===(r=e.endBrushPoint)||void 0===r?void 0:r.y)+l,g=!0,y=!0,m=null===(o=null===(i=s.vScrollBar)||void 0===i?void 0:i.getBBox())||void 0===o?void 0:o.width;return p>d?p=d-m-2:p<c?p=c+2:g=!1,v>f?v=f-2:v<=h?v=h+2:y=!1,{x:{value:p,needScroll:g},y:{value:v,needScroll:y}}},e.rectanglesIntersect=function(t,e){return t.maxX>e.minX&&t.minX<e.maxX&&t.minY<e.maxY&&t.maxY>e.minY},e.autoScrollIntervalId=null,e.autoScrollConfig=_d(sa),e.validateYIndex=function(t){var n,r,i=e.spreadsheet.facet,o=i.frozenGroupInfo,a=0,l=null===(n=null===o||void 0===o?void 0:o.frozenRow)||void 0===n?void 0:n.range;if(l&&(a=l[1]+1),t<a)return null;var s=i.getCellRange().end,u=null===(r=null===o||void 0===o?void 0:o.frozenTrailingRow)||void 0===r?void 0:r.range;return u&&(s=u[0]-1),t>s?null:t},e.validateXIndex=function(t){var n,r,i=e.spreadsheet.facet,o=i.frozenGroupInfo,a=0,l=null===(n=null===o||void 0===o?void 0:o.frozenCol)||void 0===n?void 0:n.range;if(l&&(a=l[1]+1),t<a)return null;var s=i.layoutResult.colLeafNodes.length-1,u=null===(r=null===o||void 0===o?void 0:o.frozenTrailingCol)||void 0===r?void 0:r.range;return u&&(s=u[0]-1),t>s?null:t},e.adjustNextColIndexWithFrozen=function(t,n){var r=e.spreadsheet,i=r.facet,o=r.dataSet,a=r.options,l=o.getDisplayDataSet().length,s=i.layoutResult.colLeafNodes.length,u=lx(a,s,l),c=u.frozenTrailingColCount,h=u.frozenColCount,d=i.panelScrollGroupIndexes;return c>0&&n===la.TRAILING&&Iw(t,c,s)?d[1]:h>0&&n===la.LEADING&&Ow(t,h)?d[0]:t},e.adjustNextRowIndexWithFrozen=function(t,n){var r=e.spreadsheet,i=r.facet,o=r.dataSet,a=r.options,l=o.getDisplayDataSet().length,s=i.layoutResult.colLeafNodes.length,u=i.getCellRange(),c=lx(a,s,l),h=c.frozenTrailingRowCount,d=c.frozenRowCount,f=i.panelScrollGroupIndexes;return h>0&&n===la.TRAILING&&Rw(t,u.end,h)?f[3]:d>0&&n===la.LEADING&&Mw(t,u.start,d)?f[2]:t},e.getNextScrollDelta=function(t){var n=e.spreadsheet.facet.getScrollOffset(),r=n.scrollX,i=n.scrollY,o=0,a=0;if(t.y.scroll){var l=t.y.value>0?la.TRAILING:la.LEADING,s=e.adjustNextRowIndexWithFrozen(e.endBrushPoint.rowIndex,l);a=Dv(u=e.validateYIndex(s+(t.y.value>0?1:-1)))?0:HS(u,l,e.spreadsheet)-i}if(t.x.scroll){l=t.x.value>0?la.TRAILING:la.LEADING;var u,c=e.adjustNextColIndexWithFrozen(e.endBrushPoint.colIndex,l);o=Dv(u=e.validateXIndex(c+(t.x.value>0?1:-1)))?0:FS(u,l,e.spreadsheet)-r}return{x:o,y:a}},e.onScrollAnimationComplete=function(){e.scrollAnimationComplete=!0,e.brushSelectionStage!==Jo.UN_DRAGGED&&e.renderPrepareSelected(e.endBrushPoint)},e.autoScroll=function(){if(e.brushSelectionStage!==Jo.UN_DRAGGED&&e.scrollAnimationComplete){var t=e.autoScrollConfig,n=e.spreadsheet.facet.getScrollOffset(),r={offsetX:{value:n.scrollX,animate:!0},offsetY:{value:n.scrollY,animate:!0}},i=e.getNextScrollDelta(t),o=i.x,a=i.y;if(0!==a||0!==o){t.y.scroll&&(r.offsetY.value+=a),t.x.scroll&&(r.offsetX.value+=o,r.offsetX.value<0&&(r.offsetX.value=0)),e.scrollAnimationComplete=!1;var l=3;t.x.scroll&&(l=1),e.spreadsheet.facet.scrollWithAnimation(r,Math.max(16,300-e.mouseMoveDistanceFromCanvas*l),e.onScrollAnimationComplete)}else e.clearAutoScroll()}},e.handleScroll=Im((function(t,n){if(e.brushSelectionStage!==Jo.UN_DRAGGED){var r=e.formatBrushPointForScroll({x:t,y:n}),i=r.x,o=i.value,a=i.needScroll,l=r.y,s=l.value,u=l.needScroll,c=e.autoScrollConfig;u&&(c.y.value=n,c.y.scroll=!0),a&&(c.x.value=t,c.x.scroll=!0),e.setMoveDistanceFromCanvas({x:t,y:n},a,u),e.renderPrepareSelected({x:o,y:s}
2),(u||a)&&(e.clearAutoScroll(),e.autoScroll(),e.autoScrollIntervalId=setInterval(e.autoScroll,16))}}),30),e.clearAutoScroll=function(){e.autoScrollIntervalId&&(clearInterval(e.autoScrollIntervalId),e.autoScrollIntervalId=null,e.resetScrollDelta())},e.onUpdateCells=function(t,e){return e()},e.showPrepareSelectedCells=function(){e.brushRangeCells=e.getBrushRangeCells(),e.spreadsheet.interaction.changeState({cells:Ip(e.brushRangeCells,(function(t){return IS(t)})),stateName:Zo.PREPARE_SELECT,force:!0,onUpdateCells:e.onUpdateCells})},e.renderPrepareSelected=function(t){var n=t.x,r=t.y,i=e.spreadsheet.container.getShape(n,r),o=e.spreadsheet.getCell(i);if(o&&(o instanceof Sb||o instanceof xS||o instanceof lS)){var a=o.getMeta(),l=a.rowIndex,s=a.colIndex;e.endBrushPoint={x:n,y:r,rowIndex:l,colIndex:s};var u=e.spreadsheet.interaction;u.addIntercepts([na.HOVER]),u.clearStyleIndependent(),e.isValidBrushSelection()&&(e.showPrepareSelectedCells(),e.updatePrepareSelectMask())}},e.getSelectedCellMetas=function(t){},e}return ga(e,t),e.prototype.bindEvents=function(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()},e.prototype.getPrepareSelectMaskTheme=function(){var t;return null===(t=this.spreadsheet.theme)||void 0===t?void 0:t.prepareSelectMask},e.prototype.initPrepareSelectMaskShape=function(){var t=this.spreadsheet.foregroundGroup;if(t){t.removeChild(this.prepareSelectMaskShape);var e=this.getPrepareSelectMaskTheme();this.prepareSelectMaskShape=t.addShape("rect",{visible:!1,attrs:{width:0,height:0,x:0,y:0,fill:null===e||void 0===e?void 0:e.backgroundColor,fillOpacity:null===e||void 0===e?void 0:e.backgroundOpacity,zIndex:5},capture:!1})}},e.prototype.setBrushSelectionStage=function(t){this.brushSelectionStage=t},e.prototype.isPointInCanvas=function(t){var e=this.spreadsheet.facet.getCanvasHW(),n=e.height,r=e.width,i=this.spreadsheet.facet.panelBBox,o=i.minX,a=i.minY;return t.x>o&&t.x<r&&t.y>a&&t.y<n},e.prototype.resetDrag=function(){this.hidePrepareSelectMaskShape(),this.setBrushSelectionStage(Jo.UN_DRAGGED)},e.prototype.isValidBrushSelection=function(){var t=this.getBrushRange(),e=t.start,n=t.end;return n.x-e.x>this.brushSelectionMinimumMoveDistance||n.y-e.y>this.brushSelectionMinimumMoveDistance},e.prototype.setDisplayedCells=function(){this.displayedCells=this.spreadsheet.interaction.getPanelGroupAllDataCells()},e.prototype.updatePrepareSelectMask=function(){var t=this.getBrushRange();this.prepareSelectMaskShape.attr({x:t.start.x,y:t.start.y,width:t.width,height:t.height}),this.prepareSelectMaskShape.show()},e.prototype.hidePrepareSelectMaskShape=function(){var t;null===(t=this.prepareSelectMaskShape)||void 0===t||t.hide()},e.prototype.resetScrollDelta=function(){this.autoScrollConfig=_d(sa)},e.prototype.getBrushPoint=function(t){var e=this.spreadsheet.facet.getScrollOffset(),n=e.scrollY,r=e.scrollX,i={x:null===t||void 0===t?void 0:t.x,y:null===t||void 0===t?void 0:t.y},o=this.spreadsheet.getCell(t.target).getMeta(),a=o.colIndex,l=o.rowIndex;return ya(ya({},i),{rowIndex:l,colIndex:a,scrollY:n,scrollX:r})},e.prototype.getBrushRange=function(){var t,e,n,r,i,o,a,l,s=this.spreadsheet.facet.getScrollOffset(),u=s.scrollX,c=s.scrollY,h=Math.min(this.startBrushPoint.rowIndex,null===(t=this.endBrushPoint)||void 0===t?void 0:t.rowIndex),d=Math.max(this.startBrushPoint.rowIndex,null===(e=this.endBrushPoint)||void 0===e?void 0:e.rowIndex),f=Math.min(this.startBrushPoint.colIndex,null===(n=this.endBrushPoint)||void 0===n?void 0:n.colIndex),p=Math.max(this.startBrushPoint.colIndex,null===(r=this.endBrushPoint)||void 0===r?void 0:r.colIndex),v=this.startBrushPoint.x+this.startBrushPoint.scrollX-u,g=this.startBrushPoint.y+this.startBrushPoint.scrollY-c,y=Math.min(v,null===(i=this.endBrushPoint)||void 0===i?void 0:i.x),m=Math.max(v,null===(o=this.endBrushPoint)||void 0===o?void 0:o.x),C=Math.min(g,null===(a=this.endBrushPoint)||void 0===a?void 0:a.y),w=Math.max(g,null===(l=this.endBrushPoint)||void 0===l?void 0:l.y);return{start:{rowIndex:h,colIndex:f,x:y,y:C},end:{rowIndex:d,colIndex:p,x:m,y:w},width:m-y,height:w-C}},e.prototype.getBrushRangeCells=function(){var t=this;return this.setDisplayedCells(),this.displayedCells.filter((function(e){var n=e.getMeta();return t.isInBrushRange(n)}))},e.prototype.mouseDown=function(t){var e;null===(e=null===t||void 0===t?void 0:t.preventDefault)||void 0===e||e.call(t),this.spreadsheet.interaction.hasIntercepts([na.CLICK])||(this.setBrushSelectionStage(Jo.CLICK),this.initPrepareSelectMaskShape(),this.setDisplayedCells(),this.startBrushPoint=this.getBrushPoint(t))},e.prototype.addBrushIntercepts=function(){this.spreadsheet.interaction.addIntercepts([na.BRUSH_SELECTION])},e.prototype.bindMouseUp=function(t){var e=this;void 0===t&&(t=!1),this.spreadsheet.on(uo.GLOBAL_MOUSE_UP,(function(n){if(e.brushSelectionStage===Jo.DRAGGED){if(t&&e.clearAutoScroll(),e.isValidBrushSelection()){e.addBrushIntercepts(),e.updateSelectedCells();var r=jE(e.spreadsheet);e.spreadsheet.showTooltipWithInfo(n,r)}e.spreadsheet.interaction.getCurrentStateName()===Zo.PREPARE_SELECT&&e.spreadsheet.interaction.reset(),e.resetDrag()}else e.resetDrag()})),this.spreadsheet.on(uo.GLOBAL_CONTEXT_MENU,(function(){e.brushSelectionStage!==Jo.UN_DRAGGED&&(e.spreadsheet.interaction.removeIntercepts([na.HOVER]),e.resetDrag())}))},e.prototype.isInBrushRange=function(t){return!1},e.prototype.bindMouseDown=function(){},e.prototype.bindMouseMove=function(){},e.prototype.updateSelectedCells=function(){},e}(ML),GL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.displayedCells=[],e.brushRangeCells=[],e.getSelectedCellMetas=function(t){var n=[],r=e.spreadsheet.facet.layoutRe
2sult,i=r.rowLeafNodes,o=void 0===i?[]:i,a=r.colLeafNodes,l=void 0===a?[]:a,s=Ay(t.start.rowIndex,t.end.rowIndex+1),u=Ay(t.start.colIndex,t.end.colIndex+1);return s.forEach((function(t){u.forEach((function(r){var i=String(l[r].id),a=Iv(o)?String(t):String(o[t].id);n.push({colIndex:r,rowIndex:t,id:"".concat(a,"-").concat(i),type:$o.DATA_CELL,rowId:a,colId:i,spreadsheet:e.spreadsheet})}))})),n},e}return ga(e,t),e.prototype.bindMouseDown=function(){var e=this;this.spreadsheet.on(uo.DATA_CELL_MOUSE_DOWN,(function(n){t.prototype.mouseDown.call(e,n),e.resetScrollDelta()}))},e.prototype.bindMouseMove=function(){var t=this;this.spreadsheet.on(uo.GLOBAL_MOUSE_MOVE,(function(e){if(t.brushSelectionStage!==Jo.UN_DRAGGED){t.setBrushSelectionStage(Jo.DRAGGED);var n=t.spreadsheet.container.getPointByEvent(e);if(t.clearAutoScroll(),t.isPointInCanvas(n))t.renderPrepareSelected(n);else{var r=n.x-t.endBrushPoint.x,i=n.y-t.endBrushPoint.y;t.handleScroll(r,i)}}}))},e.prototype.isInBrushRange=function(t){var e=this.getBrushRange(),n=e.start,r=e.end,i=t.rowIndex,o=t.colIndex;return i>=n.rowIndex&&i<=r.rowIndex&&o>=n.colIndex&&o<=r.colIndex},e.prototype.updateSelectedCells=function(){var t=this.spreadsheet,e=t.interaction;t.options;var n=this.getBrushRange(),r=this.getSelectedCellMetas(n);e.changeState({cells:DS(r,this.spreadsheet),stateName:Zo.SELECTED,onUpdateCells:PS});var i=this.getScrollBrushRangeCells(r);this.spreadsheet.emit(uo.DATA_CELL_BRUSH_SELECTION,i),this.spreadsheet.emit(uo.GLOBAL_SELECTED,i),Iv(this.brushRangeCells)&&e.removeIntercepts([na.HOVER])},e.prototype.getScrollBrushRangeCells=function(t){var e=this;return t.map((function(t){var n=e.brushRangeCells.find((function(e){var n=e.getMeta();return(null===n||void 0===n?void 0:n.id)===t.id}));if(n)return n;var r=e.spreadsheet.facet.layoutResult.getCellMeta(t.rowIndex,t.colIndex);return new Sb(r,e.spreadsheet)}))},e.prototype.bindMouseUp=function(){t.prototype.bindMouseUp.call(this,!0)},e}(WL),jL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.displayedCells=[],e.brushRangeCells=[],e.onUpdateCells=function(t){return t.updateCells(t.getAllColHeaderCells())},e}return ga(e,t),e.prototype.bindEvents=function(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()},e.prototype.bindMouseDown=function(){var e=this;[uo.COL_CELL_MOUSE_DOWN].forEach((function(n){e.spreadsheet.on(n,(function(n){t.prototype.mouseDown.call(e,n)}))}))},e.prototype.isPointInCanvas=function(t){var e=this.spreadsheet.facet.getCanvasHW().width,n=this.spreadsheet.facet.cornerBBox,r=n.width,i=n.minY,o=n.maxY;return t.x>=r&&t.x<=e&&t.y>=i&&t.y<=o},e.prototype.bindMouseMove=function(){var t=this;this.spreadsheet.on(uo.COL_CELL_MOUSE_MOVE,(function(e){if(t.brushSelectionStage!==Jo.UN_DRAGGED){t.setBrushSelectionStage(Jo.DRAGGED);var n=t.spreadsheet.container.getPointByEvent(e.originalEvent);t.isPointInCanvas(n)&&t.renderPrepareSelected(n)}}))},e.prototype.setDisplayedCells=function(){this.displayedCells=this.spreadsheet.interaction.getAllColHeaderCells()},e.prototype.isInBrushRange=function(t){var e=this.getBrushRange(),n=e.start,r=e.end,i=this.spreadsheet.facet.getScrollOffset().scrollX,o=this.spreadsheet.facet.cornerBBox,a=t.x,l=void 0===a?0:a,s=t.y,u=void 0===s?0:s,c=t.width,h=void 0===c?0:c,d=t.height,f=void 0===d?0:d;return this.rectanglesIntersect({minX:n.x-o.width+i,minY:n.y,maxX:r.x-o.width+i,maxY:r.y},{minX:l,maxX:l+h,minY:u,maxY:u+f})},e.prototype.updateSelectedCells=function(){var t=this.spreadsheet.interaction;t.changeState({cells:Ip(this.brushRangeCells,IS),stateName:Zo.SELECTED,onUpdateCells:function(t){t.updateCells(t.getAllColHeaderCells())}}),this.spreadsheet.emit(uo.COL_CELL_BRUSH_SELECTION,this.brushRangeCells),this.spreadsheet.emit(uo.GLOBAL_SELECTED,this.brushRangeCells),Iv(this.brushRangeCells)&&t.removeIntercepts([na.HOVER])},e.prototype.addBrushIntercepts=function(){this.spreadsheet.interaction.addIntercepts([na.COL_BRUSH_SELECTION])},e}(WL),UL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.displayedCells=[],e.brushRangeCells=[],e.isInBrushRange=function(t){var n=e.getBrushRange(),r=n.start,i=n.end,o=e.spreadsheet.facet.getScrollOffset(),a=o.scrollY,l=o.hRowScrollX,s=e.spreadsheet.facet.cornerBBox,u=t.x,c=void 0===u?0:u,h=t.y,d=void 0===h?0:h,f=t.width,p=void 0===f?0:f,v=t.height,g=void 0===v?0:v;return e.rectanglesIntersect({minX:r.x+l,minY:r.y-s.height+a,maxX:i.x+l,maxY:i.y-s.height+a},{minX:c,maxX:c+p,minY:d,maxY:d+g})},e.onUpdateCells=function(t){return t.updateCells(t.getAllRowHeaderCells())},e}return ga(e,t),e.prototype.bindMouseDown=function(){var e=this;
2[uo.ROW_CELL_MOUSE_DOWN].forEach((function(n){e.spreadsheet.on(n,(function(n){t.prototype.mouseDown.call(e,n)}))}))},e.prototype.isPointInCanvas=function(t){var e=this.spreadsheet.facet.getCanvasHW().height,n=this.spreadsheet.facet.cornerBBox,r=n.minX,i=n.height,o=n.maxX;return t.x>=r&&t.x<=o&&t.y>=i&&t.y<=e},e.prototype.bindMouseMove=function(){var t=this;this.spreadsheet.on(uo.ROW_CELL_MOUSE_MOVE,(function(e){if(t.brushSelectionStage!==Jo.UN_DRAGGED){t.setBrushSelectionStage(Jo.DRAGGED);var n=t.spreadsheet.container.getPointByEvent(e.originalEvent);t.isPointInCanvas(n)&&t.renderPrepareSelected(n)}}))},e.prototype.setDisplayedCells=function(){this.displayedCells=this.spreadsheet.interaction.getAllRowHeaderCells()},e.prototype.updateSelectedCells=function(){var t=this.spreadsheet.interaction;t.changeState({cells:Ip(this.brushRangeCells,IS),stateName:Zo.SELECTED,onUpdateCells:function(t){t.updateCells(t.getAllRowHeaderCells())}}),this.spreadsheet.emit(uo.ROW_CELL_BRUSH_SELECTION,this.brushRangeCells),this.spreadsheet.emit(uo.GLOBAL_SELECTED,this.brushRangeCells),Iv(this.brushRangeCells)&&t.removeIntercepts([na.HOVER])},e.prototype.addBrushIntercepts=function(){this.spreadsheet.interaction.addIntercepts([na.ROW_BRUSH_SELECTION])},e}(WL),VL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isMultiSelection=!1,e}return ga(e,t),e.prototype.bindEvents=function(){this.bindKeyboardDown(),this.bindDataCellClick(),this.bindKeyboardUp()},e.prototype.reset=function(){this.isMultiSelection=!1,this.spreadsheet.interaction.removeIntercepts([na.CLICK])},e.prototype.bindKeyboardDown=function(){var t=this;this.spreadsheet.on(uo.GLOBAL_KEYBOARD_DOWN,(function(e){OS(e)&&(t.isMultiSelection=!0,t.spreadsheet.interaction.addIntercepts([na.CLICK]))}))},e.prototype.bindKeyboardUp=function(){var t=this;this.spreadsheet.on(uo.GLOBAL_KEYBOARD_UP,(function(e){OS(e)&&t.reset()}))},e.prototype.getSelectedCells=function(t){var e=t.getMeta().id,n=this.spreadsheet.interaction,r=n.getCells([$o.DATA_CELL]);return n.getCurrentStateName()!==Zo.SELECTED&&(r=[]),r.find((function(t){return t.id===e}))?r.filter((function(t){return t.id!==e})):xa(xa([],wa(r),!1),[IS(t)],!1)},e.prototype.bindDataCellClick=function(){var t=this;this.spreadsheet.on(uo.DATA_CELL_CLICK,(function(e){e.stopPropagation();var n=t.spreadsheet.getCell(e.target),r=n.getMeta(),i=t.spreadsheet,o=i.interaction;if(i.options,t.isMultiSelection&&r){var a=t.getSelectedCells(n);if(Iv(a))return o.clearState(),void t.spreadsheet.hideTooltip();o.addIntercepts([na.CLICK,na.HOVER]),t.spreadsheet.hideTooltip(),o.changeState({cells:DS(a,t.spreadsheet),stateName:Zo.SELECTED,onUpdateCells:PS}),t.spreadsheet.emit(uo.GLOBAL_SELECTED,o.getActiveCells()),t.spreadsheet.showTooltipWithInfo(e,jE(t.spreadsheet))}}))},e}(ML),YL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.resizeStartPosition={},e.resizeMouseMove=function(t){var n,r;if(null===(n=e.resizeReferenceGroup)||void 0===n?void 0:n.get("visible")){null===(r=null===t||void 0===t?void 0:t.preventDefault)||void 0===r||r.call(t);var i=t.originalEvent,o=e.getResizeInfo(),a=e.resizeReferenceGroup.getChildren()||[];if(!Iv(a)){var l=wa(a,2)[1],s=wa(Sd(l.attr("path")),2),u=s[0],c=s[1];o.type===ua.Horizontal?e.updateHorizontalResizingEndGuideLinePosition(i,o,u,c):e.updateVerticalResizingEndGuideLinePosition(i,o,u,c),e.updateResizeGuideLineTheme(l),l.attr("path",[u,c])}}},e}return ga(e,t),e.prototype.bindEvents=function(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()},e.prototype.initResizeGroup=function(){if(!this.resizeReferenceGroup){this.resizeReferenceGroup=this.spreadsheet.foregroundGroup.addGroup();var t=this.spreadsheet.options,e=t.width,n=t.height,r=this.getResizeAreaTheme(),i=r.guideLineColor,o={path:"",lineDash:r.guideLineDash,stroke:i,lineWidth:r.size};this.resizeReferenceGroup.addShape("path",{id:"RESIZE_START_GUIDE_LINE",attrs:o}),this.resizeReferenceGroup.addShape("path",{id:"RESIZE_END_GUIDE_LINE",attrs:o}),this.resizeReferenceGroup.addShape("rect",{id:"RESIZE_MASK",attrs:{appendInfo:{isResizeArea:!0}
2,x:0,y:0,width:e,height:n,fill:"transparent"}})}},e.prototype.getResizeAreaTheme=function(){return this.spreadsheet.theme.resizeArea},e.prototype.setResizeTarget=function(t){this.resizeTarget=t},e.prototype.getGuideLineWidthAndHeight=function(){var t=this.spreadsheet.options,e=t.width,n=t.height,r=this.spreadsheet.facet.panelBBox,i=r.maxY,o=r.maxX;return{width:Math.min(o,e),height:Math.min(i,n)}},e.prototype.getResizeShapes=function(){var t;return(null===(t=this.resizeReferenceGroup)||void 0===t?void 0:t.get("children"))||[]},e.prototype.setResizeMaskCursor=function(t){var e=wa(this.getResizeShapes(),3)[2];null===e||void 0===e||e.attr("cursor",t)},e.prototype.updateResizeGuideLinePosition=function(t,e){var n=this.getResizeShapes();if(!Iv(n)){var r=wa(n,2),i=r[0],o=r[1],a=e.type,l=e.offsetX,s=e.offsetY,u=e.width,c=e.height,h=this.getGuideLineWidthAndHeight(),d=h.width,f=h.height;if(this.setResizeMaskCursor("".concat(a,"-resize")),a===ua.Horizontal)return i.attr("path",[["M",l,s],["L",l,f]]),o.attr("path",[["M",l+u,s],["L",l+u,f]]),void(this.resizeStartPosition.offsetX=t.offsetX);i.attr("path",[["M",l,s],["L",d,s]]),o.attr("path",[["M",l,s+c],["L",d,s+c]]),this.resizeStartPosition.offsetY=t.offsetY}},e.prototype.bindMouseDown=function(){var t=this;this.spreadsheet.on(uo.LAYOUT_RESIZE_MOUSE_DOWN,(function(e){var n=e.target,r=e.originalEvent,i=t.getCellAppendInfo(e.target);t.spreadsheet.store.set("resized",!1),(null===i||void 0===i?void 0:i.isResizeArea)&&(t.spreadsheet.interaction.reset(),t.spreadsheet.interaction.addIntercepts([na.RESIZE]),t.setResizeTarget(n),t.showResizeGroup(),t.updateResizeGuideLinePosition(r,i))}))},e.prototype.bindMouseMove=function(){var t=this;this.spreadsheet.on(uo.LAYOUT_RESIZE_MOUSE_MOVE,(function(e){Im(t.resizeMouseMove,33)(e)}))},e.prototype.getResizeGuideLinePosition=function(){var t=wa(this.resizeReferenceGroup.getChildren()||[],2),e=t[0],n=t[1],r=(null===e||void 0===e?void 0:e.attr("path"))||[],i=(null===n||void 0===n?void 0:n.attr("path"))||[],o=wa(r[0]||[],3),a=o[1],l=void 0===a?0:a,s=o[2],u=void 0===s?0:s,c=wa(i[0]||[],3),h=c[1],d=void 0===h?0:h,f=c[2];return{start:{x:l,y:u},end:{x:d,y:void 0===f?0:f}}},e.prototype.getDisAllowResizeInfo=function(){var t,e=this.getResizeInfo(),n=this.spreadsheet.options.interaction.resize,r=e.width,i=e.height,o=e.resizedWidth,a=e.resizedHeight,l=null===(t=null===n||void 0===n?void 0:n.disable)||void 0===t?void 0:t.call(n,e);return{displayWidth:l?r:o,displayHeight:l?i:a,isDisabled:l}}
2,e.prototype.getResizeWidthDetail=function(){var t,e,n=this.getResizeInfo(),r=this.getDisAllowResizeInfo().displayWidth;switch(n.effect){case ca.Field:return{eventType:uo.LAYOUT_RESIZE_ROW_WIDTH,style:{rowCfg:{widthByField:(t={},t[n.id]=r,t)}}};case ca.Tree:return{eventType:uo.LAYOUT_RESIZE_TREE_WIDTH,style:{treeRowsWidth:r,rowCfg:{treeRowsWidth:r}}};case ca.Cell:return{eventType:uo.LAYOUT_RESIZE_COL_WIDTH,style:{colCfg:{widthByFieldValue:(e={},e[n.id]=r,e)}}};case ca.Series:return{eventType:uo.LAYOUT_RESIZE_SERIES_WIDTH,seriesNumberWidth:r};default:return null}},e.prototype.getResizeHeightDetail=function(){var t,e,n,r=this.spreadsheet.options,i=r.interaction.resize,o=r.style.rowCfg.heightByField,a=this.spreadsheet.theme.rowCell.cell.padding,l=this.getResizeInfo(),s=this.getDisAllowResizeInfo().displayHeight,u=s-a.top-a.bottom;switch(l.effect){case ca.Field:return{eventType:uo.LAYOUT_RESIZE_COL_HEIGHT,style:{colCfg:{heightByField:(t={},t[l.id]=s,t)}}};case ca.Cell:return n=(null===o||void 0===o?void 0:o[String(l.id)])||(null===i||void 0===i?void 0:i.rowResizeType)===ha.CURRENT?{rowCfg:{heightByField:(e={},e[l.id]=u,e)}}:{cellCfg:{height:u}},{eventType:uo.LAYOUT_RESIZE_ROW_HEIGHT,style:n};default:return null}},e.prototype.getResizeDetail=function(){return this.getResizeInfo().type===ua.Horizontal?this.getResizeWidthDetail():this.getResizeHeightDetail()},e.prototype.showResizeGroup=function(){this.initResizeGroup(),this.resizeReferenceGroup.set("visible",!0)},e.prototype.hideResizeGroup=function(){this.resizeReferenceGroup.set("visible",!1)},e.prototype.bindMouseUp=function(){var t=this;this.spreadsheet.on(uo.GLOBAL_MOUSE_UP,(function(){var e;t.setResizeMaskCursor("default"),t.resizeReferenceGroup&&!Iv(null===(e=t.resizeReferenceGroup)||void 0===e?void 0:e.getChildren())&&(t.hideResizeGroup(),t.renderResizedResult())}))},e.prototype.updateResizeGuideLineTheme=function(t){var e=this.getResizeAreaTheme(),n=e.guideLineColor,r=e.guideLineDisableColor,i=this.getDisAllowResizeInfo().isDisabled;t.attr("stroke",i?r:n),this.setResizeMaskCursor(i?"no-drop":"default")},e.prototype.updateHorizontalResizingEndGuideLinePosition=function(t,e,n,r){var i=t.offsetX-this.resizeStartPosition.offsetX;e.width+i<28&&(i=-(e.width-28));var o=e.offsetX+e.width+i;n[1]=o,r[1]=o,this.resizeTarget.attr({x:o-e.size/2})},e.prototype.updateVerticalResizingEndGuideLinePosition=function(t,e,n,r){var i=t.offsetY-this.resizeStartPosition.offsetY;e.height+i<16&&(i=-(e.height-16));var o=e.offsetY+e.height+i;n[2]=o,r[2]=o,this.resizeTarget.attr({y:o-e.size/2})},e.prototype.renderResizedResult=function(){var t=this.getResizeInfo(),e=this.getResizeDetail()||{},n=e.style,r=e.seriesNumberWidth,i=e.eventType,o={info:t,style:n};this.spreadsheet.emit(uo.LAYOUT_RESIZE,o),this.spreadsheet.emit(i,o),n&&this.spreadsheet.setOptions({style:n}),r&&this.spreadsheet.setTheme({rowCell:{seriesNumberWidth:r}}),this.spreadsheet.store.set("resized",!0),this.render()},e.prototype.getResizeInfo=function(){var t=this.getCellAppendInfo(this.resizeTarget),e=this.getResizeGuideLinePosition(),n=e.start,r=e.end,i=Math.floor(r.x-n.x),o=Math.floor(r.y-n.y);return ya(ya({},t),{resizedWidth:i,resizedHeight:o})},e.prototype.render=function(){this.resizeStartPosition={},this.resizeTarget=null,this.resizeReferenceGroup=null,this.spreadsheet.render(!1)},e}(ML),XL=function(){function t(t){var e=this;this.interactions=new Map,this.intercepts=new Set,this.hoverTimer=null,this.defaultState={cells:[],force:!1},this.onTriggerInteractionsResetEffect=function(){e.interactions.forEach((function(t){t.reset()}))},this.selectAll=function(){e.changeState({stateName:Zo.ALL_SELECTED})},this.getCellChildrenNodes=function(t){var n,r=null===(n=null===t||void 0===t?void 0:t.getMeta)||void 0===n?void 0:n.call(t),i=(null===t||void 0===t?void 0:t.cellType)===$o.ROW_CELL;return e.spreadsheet.isHierarchyTreeType()&&i?gw.getAllLeaveNodes(r).filter((function(t){return t.rowIndex===r.rowIndex})):gw.getAllChildrenNodes(r)},this.selectHeaderCell=function(t){var n;void 0===t&&(t={});var r=t.cell;if(!Iv(r)){var i=null===(n=null===r||void 0===r?void 0:r.getMeta)||void 0===n?void 0:n.call(r);if(i&&!Dv(null===i||void 0===i?void 0:i.x)){e.addIntercepts([na.HOVER]);var o=e.spreadsheet.isHierarchyTreeType(),a=(null===r||void 0===r?void 0:r.cellType)===$o.COL_CELL,l=e.getState(),s=e.isSelectedCell(r),u=(null===t||void 0===t?void 0:t.isMultiSelection)&&e.isSelectedState(),c=s?[]:e.getCellChildrenNodes(r),h=s?[]:[IS(r)];if(u&&(h=Ld(null===l||void 0===l?void 0:l.cells,h),c=Ld(null===l||void 0===l?void 0:l.nodes,c),s&&(h=h.filter((function(t){return t.id!==i.id})),c=c.filter((function(t){return!(null===t||void 0===t?void 0:t.id.includes(i.id))})))),Iv(h))return e.reset(),void e.spreadsheet.emit(uo.GLOBAL_SELECTED,e.getActiveCells());var d=c.filter((function(t){return null===t||void 0===t?void 0:t.isLeaf}));e.changeState({cells:h,nodes:d,stateName:Zo.SELECTED});var f=h.map((function(t){return t.id}));return e.updateCells(e.getRowColActiveCells(f)),o&&!a||e.highlightNodes(c),e.spreadsheet.emit(uo.GLOBAL_SELECTED,e.getActiveCells()),!0}}},this.highlightNodes=function(t){void 0===t&&(t=[]),t.forEach((function(t){var e;null===(e=null===t||void 0===t?void 0:t.belongsCell)||void 0===e||e.updateByState(Zo.SELECTED,t.belongsCell)}))},this.mergeCells=function(t,n){Ob(e.spreadsheet,t,n)},this.unmergeCell=function(t){Ib(e.spreadsheet,t)},this.spreadsheet=t,this.registerEventController(),this.registerInteractions(),window.addEventListener("visibilitychange",this.onTriggerInteractionsResetEffect)}return t.prototype.destroy=function(){this.interactions.clear(),this.intercepts.clear(),this.eventController.clear(),this.clearHoverTimer(),this.resetState(),window.removeEventListener("visibilitychange",this.onTriggerInteractionsResetEffect)},t.prototype.reset=function(){this.clearState(),this.clearHoverTimer(),this.intercepts.clear(),this.spreadsheet.hideTooltip()},t.prototype.setState=function(t){!function(t,e){var n=null===e||void 0===e?void 0:e.stateName;t.interaction.isEqualStateName(n)||(zS(t),t.hideTooltip(),t.store.set(oa,e))}(this.spreadsheet,t)},t.prototype.getState=function(){return this.spreadsheet.store.get(oa)||this.defaultState},t.prototype.setInteractedCells=function(t){var e=this.getInteractedCells().concat([t]),n=this.getState();n.interactedCells=e,this.setState(n)},t.prototype.getInteractedCells=function(){var t=this.getState();return(null===t||void 0===t?void 0:t.interactedCells)||[]},t.prototype.resetState=function(){this.spreadsheet.store.set(oa,this.defaultState)}
2,t.prototype.getCurrentStateName=function(){return this.getState().stateName},t.prototype.isEqualStateName=function(t){return this.getCurrentStateName()===t},t.prototype.isStateOf=function(t){var e=this.getState();return(null===e||void 0===e?void 0:e.stateName)===t},t.prototype.isSelectedState=function(){return this.isStateOf(Zo.SELECTED)},t.prototype.isAllSelectedState=function(){return this.isStateOf(Zo.ALL_SELECTED)},t.prototype.isHoverFocusState=function(){return this.isStateOf(Zo.HOVER_FOCUS)},t.prototype.isHoverState=function(){return this.isStateOf(Zo.HOVER)},t.prototype.isActiveCell=function(t){return!!this.getCells().find((function(e){return t.getMeta().id===e.id}))},t.prototype.isSelectedCell=function(t){return this.isSelectedState()&&this.isActiveCell(t)},t.prototype.getCells=function(t){var e=this.getState(),n=(null===e||void 0===e?void 0:e.cells)||[];return Dv(t)?n:n.filter((function(e){return t.includes(e.type)}))},t.prototype.getActiveCells=function(){var t=this.getCells().map((function(t){return t.id})),e=this.getAllCells();return Ip(t,(function(t){return xp(e,(function(e){var n;return(null===(n=null===e||void 0===e?void 0:e.getMeta())||void 0===n?void 0:n.id)===t}))})).filter((function(t){return t}))},t.prototype.clearStyleIndependent=function(){(this.isSelectedState()||this.isHoverState()||this.isAllSelectedState())&&this.getPanelGroupAllDataCells().forEac
2h((function(t){t.hideInteractionShape()}))},t.prototype.getPanelGroupAllUnSelectedDataCells=function(){var t=this;return this.getPanelGroupAllDataCells().filter((function(e){return!t.isActiveCell(e)}))},t.prototype.getPanelGroupAllDataCells=function(){var t;return nL(null===(t=this.spreadsheet.panelGroup)||void 0===t?void 0:t.getChildren(),Sb)},t.prototype.getAllRowHeaderCells=function(){var t,e,n=((null===(t=this.spreadsheet.foregroundGroup)||void 0===t?void 0:t.getChildren())||[]).find((function(t){return t instanceof vL})),r=(null===(e=null===n||void 0===n?void 0:n.cfg)||void 0===e?void 0:e.children)||[];return nL(r,xS).filter((function(t){return t.cellType===$o.ROW_CELL}))},t.prototype.getAllColHeaderCells=function(){var t,e,n=((null===(t=this.spreadsheet.foregroundGroup)||void 0===t?void 0:t.getChildren())||[]).find((function(t){return t instanceof dL})),r=(null===(e=null===n||void 0===n?void 0:n.cfg)||void 0===e?void 0:e.children)||[];return nL(r,lS).filter((function(t){return t.cellType===$o.COL_CELL}))},t.prototype.getRowColActiveCells=function(t){return Ld(this.getAllRowHeaderCells(),this.getAllColHeaderCells()).filter((function(e){return t.includes(e.getMeta().id)}))},t.prototype.getAllCells=function(){return Ld(this.getPanelGroupAllDataCells(),this.getAllRowHeaderCells(),this.getAllColHeaderCells())},t.prototype.hideColumns=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=!0),Nb(this.spreadsheet,t,e)},t.prototype.getBrushSelectionInfo=function(t){var e,n,r;return Ev(t)?{dataBrushSelection:t,rowBrushSelection:t,colBrushSelection:t}:{dataBrushSelection:null!==(e=null===t||void 0===t?void 0:t.data)&&void 0!==e&&e,rowBrushSelection:null!==(n=null===t||void 0===t?void 0:t.row)&&void 0!==n&&n,colBrushSelection:null!==(r=null===t||void 0===t?void 0:t.col)&&void 0!==r&&r}},t.prototype.getDefaultInteractions=function(){var t=this.spreadsheet.options.interaction,e=t.resize,n=t.brushSelection,r=t.multiSelection,i=t.rangeSelection,o=t.selectedCellMove,a=this.getBrushSelectionInfo(n),l=a.dataBrushSelection,s=a.rowBrushSelection,u=a.colBrushSelection;return[{key:Ko.CORNER_CELL_CLICK,interaction:NL},{key:Ko.DATA_CELL_CLICK,interaction:RL},{key:Ko.ROW_COLUMN_CLICK,interaction:BL},{key:Ko.ROW_TEXT_CLICK,interaction:kL},{key:Ko.MERGED_CELLS_CLICK,interaction:AL},{key:Ko.HOVER,interaction:DL,enable:!fw()},{key:Ko.BRUSH_SELECTION,interaction:GL,enable:!fw()&&l},{key:Ko.ROW_BRUSH_SELECTION,interaction:UL,enable:!fw()&&s},{key:Ko.COL_BRUSH_SELECTION,interaction:jL,enable:!fw()&&u},{key:Ko.COL_ROW_RESIZE,interaction:YL,enable:!fw()&&e},{key:Ko.DATA_CELL_MULTI_SELECTION,interaction:VL,enable:!fw()&&r},{key:Ko.RANGE_SELECTION,interaction:zL,enable:!fw()&&i},{key:Ko.SELECTED_CELL_MOVE,interaction:HL,enable:!fw()&&o}]},t.prototype.registerInteractions=function(){var t=this,e=this.spreadsheet.options.interaction.customInteractions;this.interactions.clear(),this.getDefaultInteractions().forEach((function(e){var n=e.key,r=e.interaction;!1!==e.enable&&t.interactions.set(n,new r(t.spreadsheet))})),Iv(e)||Zf(e,(function(e){var n=e.interaction;t.interactions.set(e.key,new n(t.spreadsheet))}))},t.prototype.registerEventController=function(){this.eventController=new PL(this.spreadsheet)},t.prototype.draw=function(){this.spreadsheet.container.draw()},t.prototype.clearState=function(){zS(this.spreadsheet)&&this.draw()},t.prototype.changeState=function(t){var e=this,n=this.spreadsheet.interaction,r=t.cells,i=void 0===r?[]:r,o=t.force,a=t.stateName,l=t.onUpdateCells;if(Iv(i)&&a===Zo.SELECTED)o&&n.changeState({cells:[],stateName:Zo.UNSELECTED});else{this.getCurrentStateName()===Zo.ALL_SELECTED&&this.clearStyleIndependent(),this.clearState(),this.setState(t);var s=function(){e.updatePanelGroupAllDataCells()};l?l(this,s):s(),this.draw()}},t.prototype.updatePanelGroupAllDataCells=function(){this.updateCells(this.getPanelGroupAllDataCells())},t.prototype.updateCells=function(t){void 0===t&&(t=[]),t.forEach((function(t){t.update()}))},t.prototype.addIntercepts=function(t){var e=this;void 0===t&&(t=[]),t.forEach((function(t){e.intercepts.add(t)}))},t.prototype.hasIntercepts=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.intercepts.has(t)}))},t.prototype.removeIntercepts=function(t){var e=this;void 0===t&&(t=[]),t.forEach((function(t){e.intercepts.delete(t)}))},t.prototype.clearHoverTimer=function(){clearTimeout(this.hoverTimer)},t.prototype.setHoverTimer=function(t){this.hoverTimer=t},t.prototype.getHoverTimer=function(){return this.hoverTimer},t.prototype.getSelectedCellHighlight=function(){var t=this.spreadsheet.options.interaction.selectedCellHighlight;if(Ev(t))return{rowHeader:t,colHeader:t,rowCells:!1,colCells:!1};var e=null!==t&&void 0!==t?t:{},n=e.rowHeader,r=void 0!==n&&n,i=e.colHeader,o=void 0!==i&&i,a=e.rowCells,l=void 0!==a&&a,s=e.colCells;return{rowHeader:r,colHeader:o,rowCells:l,colCells:void 0!==s&&s}},t}(),qL=function(){function t(t){var e=this;this.viewport=window,this.init=function(){e.initDevicePixelRatioListener(),e.initDeviceZoomListener()},this.destroy=function(){e.removeDevicePixelRatioListener(),e.removeDeviceZoomListener()},this.removeDevicePixelRatioListener=function(){var t;(null===(t=e.devicePixelRatioMedia)||void 0===t?void 0:t.removeEventListener)?e.devicePixelRatioMedia.removeEventListener("change",e.renderByDevicePixelRatioChanged):e.devicePixelRatioMedia.removeListener(e.renderByDevicePixelRatioChanged)},this.initDeviceZoomListener=function(){var t,n;fw()||null===(n=null===(t=e.viewport)||void 0===t?void 0:t.visualVie
2wport)||void 0===n||n.addEventListener("resize",e.renderByZoomScale)},this.removeDeviceZoomListener=function(){var t,n;fw()||null===(n=null===(t=e.viewport)||void 0===t?void 0:t.visualViewport)||void 0===n||n.removeEventListener("resize",e.renderByZoomScale)},this.renderByDevicePixelRatioChanged=function(){e.renderByDevicePixelRatio()},this.renderByDevicePixelRatio=function(t){void 0===t&&(t=window.devicePixelRatio);var n=e.spreadsheet,r=n.container,i=n.options,o=i.width,a=i.height,l=i.devicePixelRatio,s=e.spreadsheet.getCanvasElement();if(r.get("pixelRatio")!==t&&s){var u=Math.max(t,l,1);r.set("pixelRatio",u),r.changeSize(o,a),e.spreadsheet.render(!1)}},this.renderByZoomScale=Cf((function(t){var n=Math.ceil(t.target.scale);n>=1&&e.renderByDevicePixelRatio(n)}),350),this.spreadsheet=t}return t.prototype.initDevicePixelRatioListener=function(){var t;this.devicePixelRatioMedia=window.matchMedia("(resolution: ".concat(window.devicePixelRatio,"dppx)")),(null===(t=this.devicePixelRatioMedia)||void 0===t?void 0:t.addEventListener)?this.devicePixelRatioMedia.addEventListener("change",this.renderByDevicePixelRatioChanged):this.devicePixelRatioMedia.addListener(this.renderByDevicePixelRatioChanged)},t}(),KL=function(){function t(t){this.visible=!1,this.position={x:0,y:0},this.spreadsheet=t}return t.prototype.show=function(t){var e,n,r,i=t.position,o=t.options,a=t.content,l=t.event,s=AE(o).enterable,u=this.spreadsheet.options.tooltip||{},c=u.autoAdjustBoundary,h=u.adjustPosition;this.visible=!0,this.options=t;var d=this.getContainer();this.renderContent(a);var f=function(t){var e=t.spreadsheet,n=t.position,r=t.tooltipContainer,i=t.autoAdjustBoundary,o=e.getCanvasElement(),a=n.x+hw,l=n.y+dw;if(!i||!o)return{x:a,y:l};var s="body"===i,u=e.facet.panelBBox,c=u.maxX,h=u.maxY,d=e.options,f=d.width,p=d.height,v=o.getBoundingClientRect(),g=v.top,y=v.left,m=r.getBoundingClientRect(),C=m.width,w=m.height,x=document.body.getBoundingClientRect(),b=x.width,S=x.height,_=s?b:Math.min(f,c)+y,E=s?S:Math.min(p,h)+g;return a+C>=_&&(a=_-C),l+w>=E&&(l=E-w),{x:a,y:l}}({spreadsheet:this.spreadsheet,position:i,tooltipContainer:d,autoAdjustBoundary:c}),p=f.x,v=f.y;this.position=null!==(e=null===h||void 0===h?void 0:h({position:{x:p,y:v},event:l}))&&void 0!==e?e:{x:p,y:v},kE(d,{style:{left:"".concat(null===(n=this.position)||void 0===n?void 0:n.x,"px"),top:"".concat(null===(r=this.position)||void 0===r?void 0:r.y,"px"),pointerEvents:s?"all":"none"},visible:!0})},t.prototype.hide=function(){this.visible=!1,this.container&&(kE(this.container,{style:{pointerEvents:"none"},visible:!1}),this.resetPosition())},t.prototype.destroy=function(){var t,e;this.visible=!1,this.container&&(this.resetPosition(),null===(e=(t=this.container).remove)||void 0===e||e.call(t),this.container=null)},t.prototype.renderContent=function(t){if(this.container){this.clearContent();var e=(this.spreadsheet.options.tooltip||{}).content,n=null!==t&&void 0!==t?t:e;Dv(n)||("string"!==typeof n?n instanceof Element&&this.container.appendChild(n):this.container.innerHTML=n)}},t.prototype.clearContent=function(){this.container&&(this.container.innerHTML="")},t.prototype.disablePointerEvent=function(){this.container&&"none"!==this.container.style.pointerEvents&&kE(this.container,{style:{pointerEvents:"none"}})},t.prototype.resetPosition=function(){this.position={x:0,y:0}},t.prototype.getContainer=function(){var t;if(!this.container){var e=this.spreadsheet.options.tooltip,n=(null===(t=e.getContainer)||void 0===t?void 0:t.call(e))||document.body,r=document.createElement("div");return kE(r,{style:e.style,className:[sw].concat(e.className)}),n.appendChild(r),this.container=r,this.container}return this.container},t}(),ZL=function(t){function e(e,n,r){var i=t.call(this)||this;return i.store=new Qw,i.untypedOn=i.on,i.untypedEmit=i.emit,i.on=function(t,e){return i.untypedOn(t,e)},i.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return i.untypedEmit.apply(i,xa([t],wa(e),!1))},i.initHiddenColumnsDetail=function(){var t=i.options.interaction.hiddenColumnFields,e=i.store.get("hiddenColumnsDetail");Iv(t)&&Iv(e)||Nb(i,t,!0)},i.measureText=Nu((function(t,e){var n;if(void 0===t&&(t=""),!e)return null;var r=null===(n=i.getCanvasElement())||void 0===n?void 0:n.getContext("2d"),o=e,a=o.fontSize,l=o.fontFamily,s=o.fontWeight,u=o.fontStyle,c=o.fontVariant;return r.font=[u,c,s,"".concat(a,"px"),l].join(" ").trim(),r.measureText(String(t))}),(function(t,e){return xa([t],wa($p(e)),!1).join("")})),i.measureTextWidth=function(t,e){void 0===t&&(t="");var n=i.measureText(t,e);return(null===n||void 0===n?void 0:n.width)||0},i.measureTextHeight=function(t,e){void 0===t&&(t="");var n=i.measureText(t,e);return n?n.actualBoundingBoxAscent+n.actualBoundingBoxDescent:0},i.measureTextWidthRoughly=function(t,e){var n,r;void 0===e&&(e={});var o=i.measureTextWidth("a",e),a=i.measureTextWidth("\u8682",e),l=0;if(!t)return l;try{for(var s=Ca(t),u=s.next();!u.done;u=s.next()){var c=u.value.charCodeAt(0);l+=c>=0&&c<=255?o:a}}catch(h){n={error:h}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return l},i.dataCfg=jS(n),i.options=US(r),i.dataSet=i.getDataSet(i.options),i.setDebug(),i.initTooltip(),i.initGroups(e),i.bindEvents(),i.initInteraction(),i.initTheme(),i.initHdAdapter(),i.registerIcons(),i.setOverscrollBehavior(),i}return ga(e,t),e.prototype.setOverscrollBehavior=function(){var t=this.options.interaction.overscrollBehavior,e=window.getComputedStyle(document.body).getPropertyValue("overscroll-behavior");e&&"auto"!==e?this.store.set("initOverscrollBehavior",e):t&&(document.body.style.overscrollBehavior=t)},e.prototype.restoreOverscrollBehavior=function(){document.body.style.overscrollBehavior=this.store.get("initOverscrollBehavior")||""},e.prototype.setDebug=function(){Ww.getInstance().setDebug(this.options.debug)},e.prototype.initTheme=function(){this.setThemeCfg({name:"default"})},e.prototype.getMountContainer=function(t){var e=Kp(t)?document.querySelector(t):t;if(!e)throw new Error("Target mount container is not a DOM element");return e},e.prototype.initHdAdapter=function(){this.options.hdAdapter&&(this.hdAdapter=new qL(this),this.hdAdapter.init())},e.prototype.initInteraction=function(){this.interaction=new XL(this)},e.prototype.initTooltip=function(){var t,e;this.tooltip=this.renderTooltip(),this.tooltip instanceof KL||console.warn("[Custom Tooltip]: ".concat(null===(e=null===(t=this.tooltip)||void 0===t?void 0:t.constructor)||void 0===e?void 0:e.toString()," should be extends from BaseTooltip"))},e.prototype.renderTooltip=function(){var t,e;return(null===(e=null===(t=this.options.tooltip)||void 0===t?void 0:t.renderTooltip)||void 0===e?void 0:e.call(t,this))||new KL(this)},e.prototype.showTooltip=function(t){var e,n,r=t.content,i=t.event,o=this.getCell(null===i||void 0===i?void 0:i.target),a=rl(r)?r(o,t):r;null===(n=(e=this.tooltip).show)||void 0===n||n.call(e,ya(ya({},t),{content:a}))},e.prototype.showTooltipWithInfo=function(t,e,n){var r=UE(this,t),i=r.showTooltip,o=r.content;if(i){var a=this.getCell(null===t||void 0===t?void 0:t.target),l=GE({spreadsheet:this,cellInfos:e,targetCell:a,options:ya({enableFormat:!0},n)});this.showTooltip({data:l,position:{x:t.clientX,y:t.clientY},options:ya({enterable:!0},n),event:t,content:o})}},e.prototype.hideTooltip=function(){var t,e;null===(e=(t=this.tooltip).hide)||void 0===e||e.call(t)},e.prototype.destroyTooltip=function(){var t,e;null===(e=(t=this.tooltip).destroy)||void 0===e||e.call(t)},e.prototype.registerIcons=function(){var t=this.options.customSVGIcons;Iv(t)||Zf(t,(function(t){Uw(t.name,t.svg)}))},e.prototype.setDataCfg=function(t,e){this.store.set("originalDataCfg",t),this.dataCfg=e?jS(t):jS(this.dataCfg,t),this.store.set(Uo,Vo)},e.prototype.setOptions=function(t,e){this.hideTooltip(),this.options=e?US(t):WS(this.options,t),this.registerIcons()},e.prototype.render=function(t,e){if(void 0===t&&(t=!0),void 0===e&&(e={}),this.getCanvasElement()){var n=e.reBuildDataSet,r=void 0!==n&&n,i=e.reBuildHiddenColumnsDetail,o=void 0===i||i;
2this.emit(uo.LAYOUT_BEFORE_RENDER),r&&(this.dataSet=this.getDataSet(this.options)),t&&(this.clearDrillDownData("",!0),this.dataSet.setDataCfg(this.dataCfg)),this.buildFacet(),o&&this.initHiddenColumnsDetail(),this.emit(uo.LAYOUT_AFTER_RENDER)}},e.prototype.destroy=function(){var t,e,n,r,i;this.restoreOverscrollBehavior(),this.emit(uo.LAYOUT_DESTROY),null===(t=this.facet)||void 0===t||t.destroy(),null===(e=this.hdAdapter)||void 0===e||e.destroy(),null===(n=this.interaction)||void 0===n||n.destroy(),null===(r=this.store)||void 0===r||r.clear(),this.destroyTooltip(),this.clearCanvasEvent(),null===(i=this.container)||void 0===i||i.destroy(),function(){var t;null===(t=document.getElementById(vx))||void 0===t||t.remove()}()},e.prototype.setThemeCfg=function(t){void 0===t&&(t={});var e=(null===t||void 0===t?void 0:t.theme)||{},n=vw(ya(ya({},t),{spreadsheet:this}));this.theme=WS(n,e)},e.prototype.setTheme=function(t){this.theme=WS(this.theme,t)},e.prototype.updatePagination=function(t){this.options=WS(this.options,{pagination:t}),this.store.set("scrollX",0),this.store.set("scrollY",0)},e.prototype.getContentHeight=function(){return this.facet.getContentHeight()},e.prototype.changeSize=function(t,e){void 0===t&&(t=this.options.width),void 0===e&&(e=this.options.height),this.changeSheetSize(t,e)},e.prototype.changeSheetSize=function(t,e){void 0===t&&(t=this.options.width),void 0===e&&(e=this.options.height);var n=this.getCanvasElement(),r=this.container.get("width"),i=this.container.get("height");(t!==r||e!==i)&&n&&(this.options=WS(this.options,{width:t,height:e}),this.container.changeSize(t,e))},e.prototype.getCanvasElement=function(){return this.container.get("el")},e.prototype.getLayoutWidthType=function(){return this.options.style.layoutWidthType},e.prototype.getRowNodes=function(t){return void 0===t&&(t=-1),-1===t?this.facet.layoutResult.rowNodes:this.facet.layoutResult.rowNodes.filter((function(e){return e.level===t}))},e.prototype.getRowLeafNodes=function(){var t;return(null===(t=this.facet)||void 0===t?void 0:t.layoutResult.rowLeafNodes)||[]},e.prototype.getColumnNodes=function(t){var e;void 0===t&&(t=-1);var n=(null===(e=this.facet)||void 0===e?void 0:e.layoutResult.colNodes)||[];return-1===t?n:n.filter((function(e){return e.level===t}))},e.prototype.getColumnLeafNodes=function(){var t;return(null===(t=this.facet)||void 0===t?void 0:t.layoutResult.colLeafNodes)||[]},e.prototype.updateScrollOffset=function(t){this.facet.updateScrollOffset(WS({offsetX:{value:void 0,animate:!1},offsetY:{value:void 0,animate:!1}},t))},e.prototype.getTooltipDataItemMappingCallback=function(){var t;return null===(t=this.options)||void 0===t?void 0:t.mappingDisplayDataItem},e.prototype.getCell=function(t){for(var e,n=t;n&&!(n instanceof co);){if(n instanceof yb)return n;n=null===(e=n.get)||void 0===e?void 0:e.call(n,"parent")}return null},e.prototype.getCellType=function(t){var e=this.getCell(t);return null===e||void 0===e?void 0:e.cellType},e.prototype.getTotalsConfig=function(t){var e=Uu(this.options.totals,Jp(this.dataSet.fields.rows,t)?"row":"col",{});return{showSubTotals:!(!e.showSubTotals||!Jp(e.subTotalsDimensions,t))&&e.showSubTotals,showGrandTotals:e.showGrandTotals,reverseLayout:e.reverseLayout,reverseSubLayout:e.reverseSubLayout,label:e.label||aw("\u603b\u8ba1"),subLabel:e.subLabel||aw("\u5c0f\u8ba1")}},e.prototype.initGroups=function(t){var e=this.options,n=e.width,r=e.height,i=e.supportCSSTransform,o=e.devicePixelRatio;this.container=new co({container:this.getMountContainer(t),width:n,height:r,localRefresh:!1,supportCSSTransform:i,pixelRatio:Math.max(o,1)}),this.backgroundGroup=this.container.addGroup({name:"backGroundGroup",zIndex:0}),this.panelGroup=this.container.addGroup({name:"panelGroup",zIndex:1}),this.foregroundGroup=this.container.addGroup({name:"foreGroundGroup",zIndex:3}),this.initPanelGroupChildren(),this.updateContainerStyle()},e.prototype.updateContainerStyle=function(){var t=this.getCanvasElement();t&&(t.style.display="block")},e.prototype.initPanelGroupChildren=function(){this.panelScrollGroup=new IL({name:"panelScrollGroup",zIndex:1,s2:this}),this.panelGroup.add(this.panelScrollGroup)},e.prototype.getInitColumnLeafNodes=function(){return this.store.get("initColumnLeafNodes",[])},e.prototype.clearColumnLeafNodes=function(){this.store.set("initColumnLeafNodes",void 0)},e.prototype.clearCanvasEvent=function(){var t=this;kp(this.getEvents(),(function(e,n){t.off(n)}))},e.prototype.updateSortMethodMap=function(t,e,n){var r;void 0===n&&(n=!1);var i=n?null:this.store.get("sortMethodMap");this.store.set("sortMethodMap",ya(ya({},i),((r={})[t]=e,r)))},e.prototype.getMenuDefaultSelectedKeys=function(t){var e=Uu(this.store.get("sortMethodMap"),t);return e?[e]:[]},e}(ft),$L=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e.prototype.getDataSet=function(t){var e=t.dataSet,n=t.hierarchyType;return e?e(this):"customTree"===n?new ZE(this):new qE(this)},e.prototype.isPivotMode=function(){return!0},e.prototype.isTableMode=function(){return!1},e.prototype.isHierarchyTreeType=function(){var t=this.options.hierarchyType;return"tree"===t||"customTree"===t},e.prototype.isScrollContainsRowHeader=function(){return!this.isFrozenRowHeader()},e.prototype.isFrozenRowHeader=function(){var t;return null===(t=this.options)||void 0===t?void 0:t.frozenRowHeader},e.prototype.isValueInCols=function(){return this.dataSet.fields.valueInCols},e.prototype.clearDrillDownData=function(t,e){this.dataSet instanceof qE&&(this.dataSet.clearDrillDownData(t),e||(this.interaction.reset(),this.render(!1)))},e.prototype.getFacetCfgFromDataSetAndOptions=function(){var t=this,e=this.dataSet,n=e.f
2ields,r=e.meta,i=this.options,o=i.style,a=i.dataCell;return ya(ya(ya(ya({},this.options),n),o),{meta:r,spreadsheet:this,dataSet:this.dataSet,dataCell:null!==a&&void 0!==a?a:function(e){return new Sb(e,t)}})},e.prototype.buildFacet=function(){var t,e=this.getFacetCfgFromDataSetAndOptions();null===(t=this.facet)||void 0===t||t.destroy(),this.facet=new EL(e),this.facet.render()},e.prototype.bindEvents=function(){this.off(uo.ROW_CELL_COLLAPSE_TREE_ROWS),this.off(uo.LAYOUT_TREE_ROWS_COLLAPSE_ALL),this.on(uo.ROW_CELL_COLLAPSE_TREE_ROWS,this.handleRowCellCollapseTreeRows),this.on(uo.LAYOUT_TREE_ROWS_COLLAPSE_ALL,this.handleTreeRowsCollapseAll)},e.prototype.handleRowCellCollapseTreeRows=function(t){var e,n=t.id,r=t.isCollapsed,i={style:{collapsedRows:(e={},e[n]=r,e)}};this.emit(uo.LAYOUT_COLLAPSE_ROWS,{collapsedRows:i.style.collapsedRows,meta:null===t||void 0===t?void 0:t.node}),this.setOptions(i),this.render(!1),this.emit(uo.LAYOUT_AFTER_COLLAPSE_ROWS,{collapsedRows:i.style.collapsedRows,meta:null===t||void 0===t?void 0:t.node})},e.prototype.handleTreeRowsCollapseAll=function(t){var e={style:{hierarchyCollapse:!t,collapsedRows:null,rowExpandDepth:null}};this.setOptions(e),this.render(!1)},e.prototype.groupSortByMethod=function(t,e){var n=this.dataCfg.fields,r=n.rows,i=n.columns,o=this.options.style.colCfg.hideMeasureColumn,a=this.isValueInCols()?Gf(r):Gf(i),l=e.query,s=e.value,u=Sd(l),c=s;o&&this.isValueInCols()&&(c=this.dataSet.fields.values[0],u[po]=c);var h={sortFieldId:a,sortMethod:t,sortByMeasure:c,query:u},d=this.dataCfg.sortParams.filter((function(t){return(null===t||void 0===t?void 0:t.sortFieldId)!==a}));this.updateSortMethodMap(e.id,t,!0);var f=xa(xa([],wa(d),!1),[h],!1);this.emit(uo.RANGE_SORT,f),this.setDataCfg(ya(ya({},this.dataCfg),{sortParams:f})),this.render()},e.prototype.handleGroupSort=function(t,e){var n=this;t.stopPropagation(),this.interaction.addIntercepts([na.HOVER]);var r=this.getMenuDefaultSelectedKeys(null===e||void 0===e?void 0:e.id),i={onClick:function(r){var i=r.key;n.groupSortByMethod(i,e),n.emit(uo.RANGE_SORTED,t)},menus:[{key:"asc",icon:"groupAsc",text:aw("\u7ec4\u5185\u5347\u5e8f")},{key:"desc",icon:"groupDesc",text:aw("\u7ec4\u5185\u964d\u5e8f")},{key:"none",text:aw("\u4e0d\u6392\u5e8f")}],defaultSelectedKeys:r};this.showTooltipWithInfo(t,[],{operator:i,onlyMenu:!0,forceRender:!0})},e}(ZL),QL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ga(e,t),e}(OL),JL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onSortTooltipClick=function(t,n){var r=t.key,i={sortFieldId:n.field,sortMethod:r};e.updateSortMethodMap(n.id,r),e.emit(uo.RANGE_SORT,[i])},e}return ga(e,t),e.prototype.getDataSet=function(t){var e=t.dataSet;return e?e(this):new KE(this)},e.prototype.isPivotMode=function(){return!1},e.prototype.isTableMode=function(){return!0},e.prototype.isHierarchyTreeType=function(){return!1},e.prototype.isScrollContainsRowHeader=function(){return!1},e.prototype.isFrozenRowHeader=function(){return!1},e.prototype.clearDrillDownData=function(){},e.prototype.isValueInCols=function(){return!1},e.prototype.bindEvents=function(){},e.prototype.initPanelGroupChildren=function(){var e,n=this;t.prototype.initPanelGroupChildren.call(this);var r={zIndex:2,s2:this};e=wa([Co,wo,xo,bo,So,_o].map((function(t){var e=new QL(ya({name:t},r));return n.panelGroup.add(e),e})),6),this.frozenRowGroup=e[0],this.frozenColGroup=e[1],this.frozenTrailingRowGroup=e[2],this.frozenTrailingColGroup=e[3],this.frozenTopGroup=e[4],this.frozenBottomGroup=e[5]},e.prototype.getFacetCfgFromDataSetAndOptions=function(){var t=this,e=this.dataSet,n=e.fields,r=e.meta,i=this.options,o=i.style,a=i.dataCell;return ya(ya(ya(ya({},this.options),n),o),{meta:r,spreadsheet:this,dataSet:this.dataSet,dataCell:null!==a&&void 0!==a?a:function(e){return t.options.showSeriesNumber&&0===e.colIndex?new TS(e,t):new LS(e,t)}})},e.prototype.buildFacet=function(){var t,e=this.getFacetCfgFromDataSetAndOptions();null===(t=this.facet)||void 0===t||t.destroy(),this.facet=new TL(e),this.facet.render()},e.prototype.clearFrozenGroups=function(){this.frozenRowGroup.set("children",[]),this.frozenColGroup.set("children",[]),this.frozenTrailingRowGroup.set("children",[]),this.frozenTrailingColGroup.set("children",[]),this.frozenTopGroup.set("children",[]),this.frozenBottomGroup.set("children",[])},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.clearFrozenGroups(),this.off(uo.RANGE_SORT),this.off(uo.RANGE_FILTER)},e.prototype.handleGroupSort=function(t,e){var n=this;t.stopPropagation(),this.interaction.addIntercepts([na.HOVER]);var r=this.getMenuDefaultSelectedKeys(null===e||void 0===e?void 0:e.id),i={onClick:function(t){var r=t.key;n.onSortTooltipClick({key:r},e)},menus:[{key:"asc",icon:"groupAsc",text:aw("\u5347\u5e8f")},{key:"desc",icon:"groupDesc",text:aw("\u964d\u5e8f")},{key:"none",text:aw("\u4e0d\u6392\u5e8f")}],defaultSelectedKeys:r};this.showTooltipWithInfo(t,[],{operator:i,onlyMenu:!0,forceRender:!0})},e}(ZL)},45005:function(t,e,n){e.Z=void 0;var r=n(25713).Col;e.Z=r},44379:function(t,e,n){var r=n(64836).default,i=n(75263).default;
2Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n(72791)),a=r(n(30064)),l=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};var s=o.forwardRef((function(t,e){var n=t.style,r=t.height,i=l(t,["style","height"]);return o.createElement(a.default,Object.assign({ref:e},i,{type:"drag",style:Object.assign(Object.assign({},n),{height:r})}))}));e.default=s},30064:function(t,e,n){var r=n(38416).default,i=n(17061).default,o=n(27424).default,a=n(75263).default,l=n(64836).default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LIST_IGNORE=void 0;var s=l(n(861)),u=l(n(81694)),c=l(n(65250)),h=l(n(92097)),d=a(n(72791)),f=n(54164),p=n(55049),v=l(n(69741)),g=l(n(21247)),y=l(n(13564)),m=(l(n(12317)),l(n(97116))),C=n(29776),w=l(n(35682)),x=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(e){o(e)}}function l(t){try{s(r.throw(t))}catch(e){o(e)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}s((r=r.apply(t,e||[])).next())}))},b="__LIST_IGNORE_".concat(Date.now(),"__");e.LIST_IGNORE=b;var S=function(t,e){var n=t.fileList,a=t.defaultFileList,l=t.onRemove,S=t.showUploadList,_=void 0===S||S,E=t.listType,L=void 0===E?"text":E,T=t.onPreview,O=t.onDownload,I=t.onChange,M=t.onDrop,R=t.previewFile,A=t.disabled,B=t.locale,k=t.iconRender,N=t.isImageUrl,D=t.progress,P=t.prefixCls,z=t.className,F=t.type,H=void 0===F?"select":F,W=t.children,G=t.style,j=t.itemRender,U=t.maxCount,V=t.data,Y=void 0===V?{}:V,X=t.multiple,q=void 0!==X&&X,K=t.action,Z=void 0===K?"":K,$=t.accept,Q=void 0===$?"":$,J=t.
2supportServerRender,tt=void 0===J||J,et=d.useContext(v.default),nt=null!==A&&void 0!==A?A:et,rt=(0,h.default)(a||[],{value:n,postState:function(t){return null!==t&&void 0!==t?t:[]}}),it=o(rt,2),ot=it[0],at=it[1],lt=d.useState("drop"),st=o(lt,2),ut=st[0],ct=st[1],ht=d.useRef(null);d.useMemo((function(){var t=Date.now();(n||[]).forEach((function(e,n){e.uid||Object.isFrozen(e)||(e.uid="__AUTO__".concat(t,"_").concat(n,"__"))}))}),[n]);var dt=function(t,e,n){var r=(0,s.default)(e);1===U?r=r.slice(-1):U&&(r=r.slice(0,U)),(0,f.flushSync)((function(){at(r)}));var i={file:t,fileList:r};n&&(i.event=n),null===I||void 0===I||I(i)},ft=function(t){var e=t.filter((function(t){return!t.file[b]}));if(e.length){var n=e.map((function(t){return(0,C.file2Obj)(t.file)})),r=(0,s.default)(ot);n.forEach((function(t){r=(0,C.updateFileList)(t,r)})),n.forEach((function(t,n){var i=t;if(e[n].parsedFile)t.status="uploading";else{var o,a=t.originFileObj;try{o=new File([a],a.name,{type:a.type})}catch(l){(o=new Blob([a],{type:a.type})).name=a.name,o.lastModifiedDate=new Date,o.lastModified=(new Date).getTime()}o.uid=t.uid,i=o}dt(i,r)}))}},pt=function(t,e,n){try{"string"===typeof t&&(t=JSON.parse(t))}catch(o){}if((0,C.getFileItem)(e,ot)){var r=(0,C.file2Obj)(e);r.status="done",r.percent=100,r.response=t,r.xhr=n;var i=(0,C.updateFileList)(r,ot);dt(r,i)}},vt=function(t,e){if((0,C.getFileItem)(e,ot)){var n=(0,C.file2Obj)(e);n.status="uploading",n.percent=t.percent;var r=(0,C.updateFileList)(n,ot);dt(n,r,t)}},gt=function(t,e,n){if((0,C.getFileItem)(n,ot)){var r=(0,C.file2Obj)(n);r.error=t,r.response=e,r.status="error";var i=(0,C.updateFileList)(r,ot);dt(r,i)}},yt=function(t){var e;Promise.resolve("function"===typeof l?l(t):l).then((function(n){var r;if(!1!==n){var i=(0,C.removeFileItem)(t,ot);i&&(e=Object.assign(Object.assign({},t),{status:"removed"}),null===ot||void 0===ot||ot.forEach((function(t){var n=void 0!==e.uid?"uid":"name";t[n]!==e[n]||Object.isFrozen(t)||(t.status="removed")})),null===(r=ht.current)||void 0===r||r.abort(e),dt(e,i))}}))},mt=function(t){ct(t.type),"drop"===t.type&&(null===M||void 0===M||M(t))};d.useImperativeHandle(e,(function(){return{onBatchStart:ft,onSuccess:pt,onProgress:vt,onError:gt,fileList:ot,upload:ht.current}}));var Ct=d.useContext(p.ConfigContext),wt=Ct.getPrefixCls,xt=Ct.direction,bt=wt("upload",P),St=Object.assign(Object.assign({onBatchStart:ft,onError:gt,onProgress:vt,onSuccess:pt},t),{data:Y,multiple:q,action:Z,accept:Q,supportServerRender:tt,prefixCls:bt,disabled:nt,beforeUpload:function(e,n){return x(void 0,void 0,void 0,i().mark((function r(){var o,a,l,s;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=t.beforeUpload,a=t.transformFile,l=e,!o){r.next=13;break}return r.next=5,o(e,n);case 5:if(!1!==(s=r.sent)){r.next=8;break}return r.abrupt("return",!1);case 8:if(delete e[b],s!==b){r.next=12;break}return Object.defineProperty(e,b,{value:!0,configurable:!0}),r.abrupt("return",!1);case 12:"object"===typeof s&&s&&(l=s);case 13:if(!a){r.next=17;break}return r.next=16,a(l);case 16:l=r.sent;case 17:return r.abrupt("return",l);case 18:case"end":return r.stop()}}),r)})))},onChange:void 0});delete St.className,delete St.style,W&&!nt||delete St.id;var _t=(0,w.default)(bt),Et=o(_t,2),Lt=Et[0],Tt=Et[1],Ot=function(t,e){return _?d.createElement(g.default,{componentName:"Upload",defaultLocale:y.default.Upload},(function(n){var r="boolean"===typeof _?{}:_,i=r.showRemoveIcon,o=r.showPreviewIcon,a=r.showDownloadIcon,l=r.removeIcon,s=r.previewIcon,u=r.downloadIcon;return d.createElement(m.default,{prefixCls:bt,listType:L,items:ot,previewFile:R,onPreview:T,onDownload:O,onRemove:yt,showRemoveIcon:!nt&&i,showPreviewIcon:o,showDownloadIcon:a,removeIcon:l,previewIcon:s,downloadIcon:u,iconRender:k,locale:Object.assign(Object.assign({},n),B),isImageUrl:N,progress:D,appendAction:t,appendActionVisible:e,itemRender:j})})):t},It=r({},"".concat(bt,"-rtl"),"rtl"===xt);if("drag"===H){var Mt,Rt=(0,u.default)(bt,(r(Mt={},"".concat(bt,"-drag"),!0),r(Mt,"".concat(bt,"-drag-uploading"),ot.some((function(t){return"uploading"===t.status}))),r(Mt,"".concat(bt,"-drag-hover"),"dragover"===ut),r(Mt,"".concat(bt,"-disabled"),nt),r(
2Mt,"".concat(bt,"-rtl"),"rtl"===xt),Mt),Tt);return Lt(d.createElement("span",{className:(0,u.default)("".concat(bt,"-wrapper"),It,z,Tt)},d.createElement("div",{className:Rt,onDrop:mt,onDragOver:mt,onDragLeave:mt,style:G},d.createElement(c.default,Object.assign({},St,{ref:ht,className:"".concat(bt,"-btn")}),d.createElement("div",{className:"".concat(bt,"-drag-container")},W))),Ot()))}var At,Bt=(0,u.default)(bt,"".concat(bt,"-select"),r({},"".concat(bt,"-disabled"),nt)),kt=(At=W?void 0:{display:"none"},d.createElement("div",{className:Bt,style:At},d.createElement(c.default,Object.assign({},St,{ref:ht}))));return Lt("picture-card"===L?d.createElement("span",{className:(0,u.default)("".concat(bt,"-wrapper"),"".concat(bt,"-picture-card-wrapper"),It,z,Tt)},Ot(kt,!!W)):d.createElement("span",{className:(0,u.default)("".concat(bt,"-wrapper"),It,z,Tt)},kt,Ot()))};var _=d.forwardRef(S);e.default=_},39786:function(t,e,n){var r=n(38416).default,i=n(27424).default,o=n(75263).default,a=n(64836).default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=a(n(7177)),s=a(n(77567)),u=a(n(45319)),c=a(n(81694)),h=a(n(15207)),d=o(n(72791)),f=n(55049),p=a(n(47203)),v=a(n(23195)),g=d.forwardRef((function(t,e){var n,o,a=t.prefixCls,g=t.className,y=t.style,m=t.locale,C=t.listType,w=t.file,x=t.items,b=t.progress,S=t.iconRender,_=t.actionIconRender,E=t.itemRender,L=t.isImgUrl,T=t.showPreviewIcon,O=t.showRemoveIcon,I=t.showDownloadIcon,M=t.previewIcon,R=t.removeIcon,A=t.downloadIcon,B=t.onPreview,k=t.onDownload,N=t.onClose,D=w.status,P=d.useState(D),z=i(P,2),F=z[0],H=z[1];d.useEffect((function(){"removed"!==D&&H(D)}),[D]);var W=d.useState(!1),G=i(W,2),j=G[0],U=G[1],V=d.useRef(null);d.useEffect((function(){return V.current=setTimeout((function(){U(!0)}),300),function(){V.current&&clearTimeout(V.current)}}),[]);var Y=S(w),X=d.createElement("div",{className:"".concat(a,"-icon")},Y);if("picture"===C||"picture-card"===C)if("uploading"===F||!w.thumbUrl&&!w.url){var q,K=(0,c.default)((r(q={},"".concat(a,"-list-item-thumbnail"),!0),r(q,"".concat(a,"-list-item-file"),"uploading"!==F),q));X=d.createElement("div",{className:K},Y)}else{var Z,$=(null===L||void 0===L?void 0:L(w))?d.createElement("img",{src:w.thumbUrl||w.url,alt:w.name,className:"".concat(a,"-list-item-image"),crossOrigin:w.crossOrigin}):Y,Q=(0,c.default)((r(Z={},"".concat(a,"-list-item-thumbnail"),!0),r(Z,"".concat(a,"-list-item-file"),L&&!L(w)),Z));X=d.createElement("a",{className:Q,onClick:function(t){return B(w,t)},href:w.url||w.thumbUrl,target:"_blank",rel:"noopener noreferrer"},$)}var J=(0,c.default)("".concat(a,"-list-item"),"".concat(a,"-list-item-").concat(F)),tt="string"===typeof w.linkProps?JSON.parse(w.linkProps):w.linkProps,et=O?_(("function"===typeof R?R(w):R)||d.createElement(l.default,null),(function(){return N(w)}),a,m.removeFile):null,nt=I&&"done"===F?_(("function"===typeof A?A(w):A)||d.createElement(s.default,null),(function(){return k(w)}),a,m.downloadFile):null,rt="picture-card"!==C&&d.createElement("span",{key:"download-delete",className:(0,c.default)("".concat(a,"-list-item-actions"),{picture:"picture"===C})},nt,et),it=(0,c.default)("".concat(a,"-list-item-name")),ot=w.url?[d.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:it,title:w.name},tt,{href:w.url,onClick:function(t){return B(w,t)}}),w.name),rt]:[d.createElement("span",{key:"view",className:it,onClick:function(t){return B(w,t)},title:w.name},w.name),rt],at=T?d.createElement("a",{href:w.url||w.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:w.url||w.thumbUrl?void 0:{pointerEvents:"none",opacity:.5},onClick:function(t){return B(w,t)},title:m.previewFile},"function"===typeof M?M(w):M||d.createElement(u.default,null)):null,lt="picture-card"===C&&"uploading"!==F&&d.createElement("span",{className:"".concat(a,"-list-item-actions")},at,"done"===F&&nt,et),st=(0,d.useContext(f.ConfigContext).getPrefixCls)(),ut=d.createElement("div",{className:J},X,ot,lt,j&&d.createElement(h.default,{motionName:"".concat(st,"-fade"),visible:"uploading"===F,motionDeadline:2e3},(function(t){var e=t.className,n="percent"in w?d.createElement(p.default,Object.assign({},b,{type:"line",percent:w.percent})):null;
2return d.createElement("div",{className:(0,c.default)("".concat(a,"-list-item-progress"),e)},n)}))),ct=w.response&&"string"===typeof w.response?w.response:(null===(n=w.error)||void 0===n?void 0:n.statusText)||(null===(o=w.error)||void 0===o?void 0:o.message)||m.uploadError,ht="error"===F?d.createElement(v.default,{title:ct,getPopupContainer:function(t){return t.parentNode}},ut):ut;return d.createElement("div",{className:(0,c.default)("".concat(a,"-list-item-container"),g),style:y,ref:e},E?E(ht,w,x,{download:k.bind(null,w),preview:B.bind(null,w),remove:N.bind(null,w)}):ht)}));e.default=g},97116:function(t,e,n){var r=n(38416).default,i=n(27424).default,o=n(75263).default,a=n(64836).default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=a(n(861)),s=a(n(90672)),u=a(n(78600)),c=a(n(47046)),h=a(n(68652)),d=a(n(81694)),f=o(n(15207)),p=o(n(72791)),v=a(n(59235)),g=n(55049),y=a(n(72290)),m=a(n(44179)),C=n(8656),w=n(29776),x=a(n(39786)),b=function(t,e){var n,o=t.listType,a=void 0===o?"text":o,b=t.previewFile,S=void 0===b?w.previewImage:b,_=t.onPreview,E=t.onDownload,L=t.onRemove,T=t.locale,O=t.iconRender,I=t.isImageUrl,M=void 0===I?w.isImageUrl:I,R=t.prefixCls,A=t.items,B=void 0===A?[]:A,k=t.showPreviewIcon,N=void 0===k||k,D=t.showRemoveIcon,P=void 0===D||D,z=t.showDownloadIcon,F=void 0!==z&&z,H=t.removeIcon,W=t.previewIcon,G=t.downloadIcon,j=t.progress,U=void 0===j?{strokeWidth:2,showInfo:!1}:j,V=t.appendAction,Y=t.appendActionVisible,X=void 0===Y||Y,q=t.itemRender,K=(0,y.default)(),Z=p.useState(!1),$=i(Z,2),Q=$[0],J=$[1];p.useEffect((function(){"picture"!==a&&"picture-card"!==a||(B||[]).forEach((function(t){"undefined"!==typeof document&&"undefined"!==typeof window&&window.FileReader&&window.File&&(t.originFileObj instanceof File||t.originFileObj instanceof Blob)&&void 0===t.thumbUrl&&(t.thumbUrl="",S&&S(t.originFileObj).then((function(e){t.thumbUrl=e||"",K()})))}))}),[a,B,S]),p.useEffect((function(){J(!0)}),[]);var tt=function(t,e){if(_)return null===e||void 0===e||e.preventDefault(),_(t)}
2,et=function(t){"function"===typeof E?E(t):t.url&&window.open(t.url)},nt=function(t){null===L||void 0===L||L(t)},rt=function(t){if(O)return O(t,a);var e="uploading"===t.status,n=M&&M(t)?p.createElement(h.default,null):p.createElement(s.default,null),r=e?p.createElement(u.default,null):p.createElement(c.default,null);return"picture"===a?r=e?p.createElement(u.default,null):n:"picture-card"===a&&(r=e?T.uploading:n),r},it=function(t,e,n,r){var i={type:"text",size:"small",title:r,onClick:function(n){e(),(0,C.isValidElement)(t)&&t.props.onClick&&t.props.onClick(n)},className:"".concat(n,"-list-item-action")};if((0,C.isValidElement)(t)){var o=(0,C.cloneElement)(t,Object.assign(Object.assign({},t.props),{onClick:function(){}}));return p.createElement(v.default,Object.assign({},i,{icon:o}))}return p.createElement(v.default,Object.assign({},i),p.createElement("span",null,t))};p.useImperativeHandle(e,(function(){return{handlePreview:tt,handleDownload:et}}));var ot=p.useContext(g.ConfigContext).getPrefixCls,at=ot("upload",R),lt=ot(),st=(0,d.default)((r(n={},"".concat(at,"-list"),!0),r(n,"".concat(at,"-list-").concat(a),!0),n)),ut=(0,l.default)(B.map((function(t){return{key:t.uid,file:t}}))),ct="picture-card"===a?"animate-inline":"animate",ht={motionDeadline:2e3,motionName:"".concat(at,"-").concat(ct),keys:ut,motionAppear:Q},dt=(0,p.useMemo)((function(){var t=Object.assign({},(0,m.default)(lt));return delete t.onAppearEnd,delete t.onEnterEnd,delete t.onLeaveEnd,t}),[lt]);return"picture-card"!==a&&(ht=Object.assign(Object.assign({},dt),ht)),p.createElement("div",{className:st},p.createElement(f.CSSMotionList,Object.assign({},ht,{component:!1}),(function(t){var e=t.key,n=t.file,r=t.className,i=t.style;return p.createElement(x.default,{key:e,locale:T,prefixCls:at,className:r,style:i,file:n,items:B,progress:U,listType:a,isImgUrl:M,showPreviewIcon:N,showRemoveIcon:P,showDownloadIcon:F,removeIcon:H,previewIcon:W,downloadIcon:G,iconRender:rt,actionIconRender:it,itemRender:q,onPreview:tt,onDownload:et,onClose:nt})})),V&&p.createElement(f.default,Object.assign({},ht,{visible:X,forceRender:!0}),(function(t){var e=t.className,n=t.style;return(0,C.cloneElement)(V,(function(t){return{className:(0,d.default)(t.className,e),style:Object.assign(Object.assign(Object.assign({},n),{pointerEvents:e?"none":void 0}),t.style)}}))})))};var S=p.forwardRef(b);e.default=S},51414:function(t,e,n){var r=n(75263).default,i=n(64836).default;e.Z=void 0;var o=i(n(44379)),a=r(n(30064)),l=a.default;l.Dragger=o.default,l.LIST_IGNORE=a.LIST_IGNORE;var s=l;e.Z=s},72339:function(t,e,n){var r=n(38416).default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t){var e,n=t.componentCls,i=t.iconCls;return r({},"".concat(n,"-wrapper"),r({},"".concat(n,"-drag"),(e={position:"relative",width:"100%",height:"100%",textAlign:"center",background:t.colorFillAlter,border:"".concat(t.lineWidth,"px dashed ").concat(t.colorBorder),borderRadius:t.borderRadiusLG,cursor:"pointer",transition:"border-color ".concat(t.motionDurationSlow)},r(e,n,{padding:"".concat(t.padding,"px 0")}),r(e,"".concat(n,"-btn"),{display:"table",width:"100%",height:"100%",outline:"none"}),r(e,"".concat(n,"-drag-container"),{display:"table-cell",verticalAlign:"middle"}),r(e,"&:not(".concat(n,"-disabled):hover"),{borderColor:t.colorPrimaryHover}),r(e,"p".concat(n,"-drag-icon"),r({marginBottom:t.margin},i,{color:t.colorPrimary,fontSize:t.uploadThumbnailSize})),r(e,"p".concat(n,"-text"),{margin:"0 0 ".concat(t.marginXXS,"px"),color:t.colorTextHeading,fontSize:t.fontSizeLG}),r(e,"p".concat(n,"-hint"),{color:t.colorTextDescription,fontSize:t.fontSize}),r(e,"&".concat(n,"-disabled"),r({cursor:"not-allowed"},"p".concat(n,"-drag-icon ").concat(i,",\n p").concat(n,"-text,\n p").concat(n,"-hint\n "),{color:t.colorTextDisabled})),e)))};e.default=i},35682:function(t,e,n){var r=n(38416).default,i=n(64836).default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(42959),a=i(n(72339)),l=i(n(44070)),s=i(n(23047)),u=n(55338),c=i(n(93940)),h=n(57223),d=n(50253),f=function(t){var e,n=t.componentCls,i=t.colorTextDisabled;return r({},"".concat(n,"-wrapper"),Object.assign(Object.assign({},(0,h.resetComponent)(t)),(r(e={},n,{outline:0,"input[type='file']":{cursor:"pointer"}}),r(e,"".concat(n,"-select"),{display:"inline-block"}),r(e,"".concat(n,"-disabled"),{color:i,cursor:"not-allowed"}),e)))},p=(0,o.genComponentStyleHook)("Upload",(function(t){var e=t.fontSizeHeading3,n=t.fontSize,r=t.lineHeight,i=t.lineWidth,h=t.controlHeightLG,p=Math.round(n*r),v=(0,o.mergeToken)(t,{uploadThumbnailSize:2*e,uploadProgressOffset:p/2+i,uploadPicCardSize:2.55*h});return[f(v),(0,a.default)(v),(0,u.genPictureStyle)(v),(0,u.genPictureCardStyle)(v),(0,l.default)(v),(0,s.default)(v),(0,c.default)(v),(0,d.genCollapseMotion)(v)]}));e.default=p},44070:function(t,e,n){var r=n(38416).default;
2Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(57223),o=function(t){var e,n,o,a,l,s=t.componentCls,u=t.antCls,c=t.iconCls,h=t.fontSize,d=t.lineHeight,f="".concat(s,"-list-item"),p="".concat(f,"-actions"),v="".concat(f,"-action"),g=Math.round(h*d);return r({},"".concat(s,"-wrapper"),r({},"".concat(s,"-list"),Object.assign(Object.assign({},(0,i.clearFix)()),(l={lineHeight:t.lineHeight},r(l,f,(n={position:"relative",height:t.lineHeight*h,marginTop:t.marginXS,fontSize:h,display:"flex",alignItems:"center",transition:"background-color ".concat(t.motionDurationSlow),"&:hover":{backgroundColor:t.controlItemBgHover}},r(n,"".concat(f,"-name"),Object.assign(Object.assign({},i.textEllipsis),{padding:"0 ".concat(t.paddingXS,"px"),lineHeight:d,flex:"auto",transition:"all ".concat(t.motionDurationSlow)})),r(n,p,(r(e={},v,{opacity:0}),r(e,"".concat(v).concat(u,"-btn-sm"),{height:g,border:0,lineHeight:1,"> span":{transform:"scale(1)"}}),r(e,"\n ".concat(v,":focus,\n &.picture ").concat(v,"\n "),{opacity:1}),r(e,c,{color:t.colorTextDescription,transition:"all ".concat(t.motionDurationSlow)}),r(e,"&:hover ".concat(c),{color:t.colorText}),e)),r(n,"".concat(s,"-icon ").concat(c),{color:t.colorTextDescription,fontSize:h}),r(n,"".concat(f,"-progress"),{position:"absolute",bottom:-t.uploadProgressOffset,width:"100%",paddingInlineStart:h+t.paddingXS,fontSize:h,lineHeight:0,pointerEvents:"none","> div":{margin:0}}),n)),r(l,"".concat(f,":hover ").concat(v),{opacity:1,color:t.colorText}),r(l,"".concat(f,"-error"),(a={color:t.colorError},r(a,"".concat(f,"-name, ").concat(s,"-icon ").concat(c),{color:t.colorError}),r(a,p,(r(o={},"".concat(c,", ").concat(c,":hover"),{color:t.colorError}),r(o,v,{opacity:1}),o)),a)),r(l,"".concat(s,"-list-item-container"),{transition:"opacity ".concat(t.motionDurationSlow,", height ").concat(t.motionDurationSlow),"&::before":{display:"table",width:0,height:0,content:'""'}}),l))))};e.default=o},23047:function(t,e,n){var r=n(38416).default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(74706),o=new i.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),a=new i.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),l=function(t){var e,n=t.componentCls,i="".concat(n,"-animate-inline");return[r({},"".concat(n,"-wrapper"),(e={},r(e,"".concat(i,"-appear, ").concat(i,"-enter, ").concat(i,"-leave"),{animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseInOutCirc,animationFillMode:"forwards"}),r(e,"".concat(i,"-appear, ").concat(i,"-enter"),{animationName:o}),r(e,"".concat(i,"-leave"),{animationName:a}),e)),o,a]};e.default=l},55338:function(t,e,n){var r=n(38416).default;Object.defineProperty(e,"__esModule",{value:!0}),e.genPictureStyle=e.genPictureCardStyle=void 0;var i=n(13495),o=n(57223);e.genPictureStyle=function(t){var e,n,i,a,l=t.componentCls,s=t.iconCls,u=t.uploadThumbnailSize,c=t.uploadProgressOffset,h="".concat(l,"-list"),d="".concat(h,"-item");return r({},"".concat(l,"-wrapper"),r({},"".concat(h).concat(h,"-picture, ").concat(h).concat(h,"-picture-card"),(r(a={},d,(n={position:"relative",height:u+2*t.lineWidth+2*t.paddingXS,padding:t.paddingXS,border:"".concat(t.lineWidth,"px ").concat(t.lineType," ").concat(t.colorBorder),borderRadius:t.borderRadiusLG,"&:hover":{background:"transparent"}},r(n,"".concat(d,"-thumbnail"),Object.assign(Object.assign({},o.textEllipsis),(e={width:u,height:u,lineHeight:"".concat(u+t.paddingSM,"px"),textAlign:"center",flex:"none"},r(e,s,{fontSize:t.fontSizeHeading2,color:t.colorPrimary}),r(e,"img",{display:"block",width:"100%",height:"100%",overflow:"hidden"}),e))),r(n,"".concat(d,"-progress"),{bottom:c,width:"calc(100% - ".concat(2*t.paddingSM,"px)"),marginTop:0,paddingInlineStart:u+t.paddingXS}),n)),r(a,"".concat(d,"-error"),r({borderColor:t.colorError},"".concat(d,"-thumbnail ").concat(s),(r(i={},"svg path[fill='#e6f7ff']",{fill:t.colorErrorBg}),r(i,"svg path[fill='#1890ff']",{fill:t.colorError}),i))),r(a,"".concat(d,"-uploading"),r({borderStyle:"dashed"},"".concat(d,"-name"),{marginBottom:c})),a)))};e.genPictureCardStyle=function(t){var e,n,a,l,s=t.componentCls,u=t.iconCls,c=t.fontSizeLG,h=t.colorTextLightSolid,d="".concat(s,"-list"),f="".concat(d,"-item"),p=t.uploadPicCardSize;return r({},"".concat(s,"-wrapper").concat(s,"-picture-card-wrapper"),Object.assign(Object.assign({},(0,o.clearFix)()),(r(l={display:"inline-block",width:"100%"},"".concat(s).concat(s,"-select"),(e={width:p,height:p,marginInlineEnd:t.marginXS,marginBottom:t.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:t.colorFillAlter,border:"".concat(t.lineWidth,"px dashed ").concat(t.colorBorder),borderRadius:t.borderRadiusLG,cursor:"pointer",transition:"border-color ".concat(t.motionDurationSlow)},r(e,"> ".concat(s),{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"}),r(e,"&:not(".concat(s,"-disabled):hover"),{borderColor:t.colorPrimary}
2),e)),r(l,"".concat(d).concat(d,"-picture-card"),(r(a={},"".concat(d,"-item-container"),{display:"inline-block",width:p,height:p,marginBlock:"0 ".concat(t.marginXS,"px"),marginInline:"0 ".concat(t.marginXS,"px"),verticalAlign:"top"}),r(a,"&::after",{display:"none"}),r(a,f,{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:"calc(100% - ".concat(2*t.paddingXS,"px)"),height:"calc(100% - ".concat(2*t.paddingXS,"px)"),backgroundColor:t.colorBgMask,opacity:0,transition:"all ".concat(t.motionDurationSlow),content:'" "'}}),r(a,"".concat(f,":hover"),r({},"&::before, ".concat(f,"-actions"),{opacity:1})),r(a,"".concat(f,"-actions"),r({position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:"all ".concat(t.motionDurationSlow)},"".concat(u,"-eye, ").concat(u,"-download, ").concat(u,"-delete"),{zIndex:10,width:c,margin:"0 ".concat(t.marginXXS,"px"),fontSize:c,cursor:"pointer",transition:"all ".concat(t.motionDurationSlow)})),r(a,"".concat(f,"-actions, ").concat(f,"-actions:hover"),r({},"".concat(u,"-eye, ").concat(u,"-download, ").concat(u,"-delete"),{color:new i.TinyColor(h).setAlpha(.65).toRgbString(),"&:hover":{color:h}})),r(a,"".concat(f,"-thumbnail, ").concat(f,"-thumbnail img"),{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"}),r(a,"".concat(f,"-name"),{display:"none",textAlign:"center"}),r(a,"".concat(f,"-file + ").concat(f,"-name"),{position:"absolute",bottom:t.margin,display:"block",width:"calc(100% - ".concat(2*t.paddingXS,"px)")}),r(a,"".concat(f,"-uploading"),(r(n={},"&".concat(f),{backgroundColor:t.colorFillAlter}),r(n,"&::before, ".concat(u,"-eye, ").concat(u,"-download, ").concat(u,"-delete"),{display:"none"}),n)),r(a,"".concat(f,"-progress"),{bottom:t.marginXL,width:"calc(100% - ".concat(2*t.paddingXS,"px)"),paddingInlineStart:0}),a)),l)))}},93940:function(t,e,n){var r=n(38416).default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t){var e=t.componentCls;return r({},"".concat(e,"-rtl"),{direction:"rtl"})};e.default=i},29776:function(t,e,n){var r=n(64836).default;Object.defineProperty(e,"__esModule",{value:!0}),e.file2Obj=function(t){return Object.assign(Object.assign({},t),{lastModified:t.lastModified,lastModifiedDate:t.lastModifiedDate,name:t.name,size:t.size,type:t.type,uid:t.uid,percent:0,originFileObj:t})},e.getFileItem=function(t,e){var n=void 0!==t.uid?"uid":"name";return e.filter((function(e){return e[n]===t[n]}))[0]},e.isImageUrl=void 0,e.previewImage=function(t){return new Promise((function(e){if(t.type&&o(t.type)){var n=document.createElement("canvas");n.width=a,n.height=a,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(a,"px; height: ").concat(a,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),i=new Image;if(i.onload=function(){var t=i.width,o=i.height,l=a,s=a,u=0,c=0;t>o?c=-((s=o*(a/t))-l)/2:u=-((l=t*(a/o))-s)/2,r.drawImage(i,u,c,l,s);var h=n.toDataURL();document.body.removeChild(n),e(h)},i.crossOrigin="anonymous",t.type.startsWith("image/svg+xml")){var l=new FileReader;l.addEventListener("load",(function(){l.result&&(i.src=l.result)})),l.readAsDataURL(t)}else i.src=window.URL.createObjectURL(t)}else e("")}))},e.removeFileItem=function(t,e){var n=void 0!==t.uid?"uid":"name",r=e.filter((function(e){return e[n]!==t[n]}));if(r.length===e.length)return null;return r},e.updateFileList=function(t,e){var n=(0,i.default)(e),r=n.findIndex((function(e){return e.uid===t.uid}));-1===r?n.push(t):n[r]=t;return n};var i=r(n(861));var o=function(t){return 0===t.indexOf("image/")};e.isImageUrl=function(t){if(t.type&&!t.thumbUrl)return o(t.type);var e=t.thumbUrl||t.url||"",n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t.split("/"),n=e[e.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]}(e);return!(!/^data:image\//.test(e)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n))||!/^data:/.test(e)&&!n};var a=200},65250:function(t,e,n){n.r(e),n.d(e,{default:function(){return R}});var r=n(87462),i=n(15671),o=n(43144),a=n(60136),l=n(54062),s=n(72791),u=n(4942),c=n(45987),h=n(74165),d=n(71002),f=n(15861),p=n(93433),v=n(81694),g=n.n(v),y=n(54170);function m(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch(n){return e}}function C(t){var e=new XMLHttpRequest;t.onProgress&&e.upload&&(e.upload.onprogress=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.onProgress(e)});var n=new FormData;
2t.data&&Object.keys(t.data).forEach((function(e){var r=t.data[e];Array.isArray(r)?r.forEach((function(t){n.append("".concat(e,"[]"),t)})):n.append(e,r)})),t.file instanceof Blob?n.append(t.filename,t.file,t.file.name):n.append(t.filename,t.file),e.onerror=function(e){t.onError(e)},e.onload=function(){return e.status<200||e.status>=300?t.onError(function(t,e){var n="cannot ".concat(t.method," ").concat(t.action," ").concat(e.status,"'"),r=new Error(n);return r.status=e.status,r.method=t.method,r.url=t.action,r}(t,e),m(e)):t.onSuccess(m(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var r=t.headers||{};return null!==r["X-Requested-With"]&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(t){null!==r[t]&&e.setRequestHeader(t,r[t])})),e.send(n),{abort:function(){e.abort()}}}var w=+new Date,x=0;function b(){return"rc-upload-".concat(w,"-").concat(++x)}var S=n(60632),_=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",i=t.type||"",o=i.replace(/\/.*$/,"");return n.some((function(t){var e=t.trim();if(/^\*(\/\*)?$/.test(t))return!0;if("."===e.charAt(0)){var n=r.toLowerCase(),a=e.toLowerCase(),l=[a];return".jpg"!==a&&".jpeg"!==a||(l=[".jpg",".jpeg"]),l.some((function(t){return n.endsWith(t)}))}return/\/\*$/.test(e)?o===e.replace(/\/.*$/,""):i===e||!!/^\w+$/.test(e)&&((0,S.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(e,"'.Skip for check.")),!0)}))}return!0};var E=function(t,e,n){var r=function t(r,i){r.path=i||"",r.isFile?r.file((function(t){n(t)&&(r.fullPath&&!t.webkitRelativePath&&(Object.defineProperties(t,{webkitRelativePath:{writable:!0}}),t.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(t,{webkitRelativePath:{writable:!1}})),e([t]))})):r.isDirectory&&function(t,e){var n=t.createReader(),r=[];!function t(){n.readEntries((function(n){var i=Array.prototype.slice.apply(n);r=r.concat(i),i.length?t():e(r)}))}()}(r,(function(e){e.forEach((function(e){t(e,"".concat(i).concat(r.name,"/"))}))}))};t.forEach((function(t){r(t.webkitGetAsEntry())}))},L=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],T=function(t){(0,a.Z)(n,t);var e=(0,l.Z)(n);function n(){var t;(0,i.Z)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(t=e.call.apply(e,[this].concat(o))).state={uid:b()},t.reqs={},t.fileInput=void 0,t._isMounted=void 0,t.onChange=function(e){var n=t.props,r=n.accept,i=n.directory,o=e.target.files,a=(0,p.Z)(o).filter((function(t){return!i||_(t,r)}));t.uploadFiles(a),t.reset()},t.onClick=function(e){var n=t.fileInput;if(n){var r=t.props,i=r.children,o=r.onClick;if(i&&"button"===i.type){var a=n.parentNode;a.focus(),a.querySelector("button").blur()}n.click(),o&&o(e)}},t.onKeyDown=function(e){"Enter"===e.key&&t.onClick(e)},t.onFileDrop=function(e){var n=t.props.multiple;if(e.preventDefault(),"dragover"!==e.type)if(t.props.directory)E(Array.prototype.slice.call(e.dataTransfer.items),t.uploadFiles,(function(e){return _(e,t.props.accept)}));else{var r=(0,p.Z)(e.dataTransfer.files).filter((function(e){return _(e,t.props.accept)}));!1===n&&(r=r.slice(0,1)),t.uploadFiles(r)}},t.uploadFiles=function(e){var n=(0,p.Z)(e),r=n.map((function(e){return e.uid=b(),t.processFile(e,n)}));Promise.all(r).then((function(e){var n=t.props.onBatchStart;null===n||void 0===n||n(e.map((function(t){return{file:t.origin,parsedFile:t.parsedFile}}))),e.filter((function(t){return null!==t.parsedFile})).forEach((function(e){t.post(e)}))}))},t.processFile=function(){var e=(0,f.Z)((0,h.Z)().mark((function e(n,r){var i,o,a,l,s,u,c,f,p;return(0,h.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.props.beforeUpload,o=n,!i){e.next=14;break}return e.prev=3,e.next=6,i(n,r);case 6:o=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),o=!1;case 12:if(!1!==o){e.next=14;break}return e.abrupt("return",{origin:n,parsedFile:null,action:null,data:null});
2case 14:if("function"!==typeof(a=t.props.action)){e.next=21;break}return e.next=18,a(n);case 18:l=e.sent,e.next=22;break;case 21:l=a;case 22:if("function"!==typeof(s=t.props.data)){e.next=29;break}return e.next=26,s(n);case 26:u=e.sent,e.next=30;break;case 29:u=s;case 30:return c="object"!==(0,d.Z)(o)&&"string"!==typeof o||!o?n:o,f=c instanceof File?c:new File([c],n.name,{type:n.type}),(p=f).uid=n.uid,e.abrupt("return",{origin:n,data:u,parsedFile:p,action:l});case 35:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,n){return e.apply(this,arguments)}}(),t.saveFileInput=function(e){t.fileInput=e},t}return(0,o.Z)(n,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(t){var e=this,n=t.data,r=t.origin,i=t.action,o=t.parsedFile;if(this._isMounted){var a=this.props,l=a.onStart,s=a.customRequest,u=a.name,c=a.headers,h=a.withCredentials,d=a.method,f=r.uid,p=s||C,v={action:i,filename:u,data:n,file:o,headers:c,withCredentials:h,method:d||"post",onProgress:function(t){var n=e.props.onProgress;null===n||void 0===n||n(t,o)},onSuccess:function(t,n){var r=e.props.onSuccess;null===r||void 0===r||r(t,o,n),delete e.reqs[f]},onError:function(t,n){var r=e.props.onError;null===r||void 0===r||r(t,n,o),delete e.reqs[f]}};l(r),this.reqs[f]=p(v)}}},{key:"reset",value:function(){this.setState({uid:b()})}},{key:"abort",value:function(t){var e=this.reqs;if(t){var n=t.uid?t.uid:t;e[n]&&e[n].abort&&e[n].abort(),delete e[n]}else Object.keys(e).forEach((function(t){e[t]&&e[t].abort&&e[t].abort(),delete e[t]}))}},{key:"render",value:function(){var t,e=this.props,n=e.component,i=e.prefixCls,o=e.className,a=e.disabled,l=e.id,h=e.style,d=e.multiple,f=e.accept,p=e.capture,v=e.children,m=e.directory,C=e.openFileDialogOnClick,w=e.onMouseEnter,x=e.onMouseLeave,b=(0,c.Z)(e,L),S=g()((t={},(0,u.Z)(t,i,!0),(0,u.Z)(t,"".concat(i,"-disabled"),a),(0,u.Z)(t,o,o),t)),_=m?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},E=a?{}:{onClick:C?this.onClick:function(){},onKeyDown:C?this.onKeyDown:function(){},onMouseEnter:w,onMouseLeave:x,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return s.createElement(n,(0,r.Z)({},E,{className:S,role:"button",style:h}),s.createElement("input",(0,r.Z)({},(0,y.Z)(b,{aria:!0,data:!0}),{id:l,type:"file",ref:this.saveFileInput,onClick:function(t){return t.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:f},_,{multiple:d,onChange:this.onChange},null!=p?{capture:p}:{})),v)}}]),n}(s.Component),O=T;function I(){}var M=function(t){(0,a.Z)(n,t);var e=(0,l.Z)(n);function n(){var t;(0,i.Z)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(t=e.call.apply(e,[this].concat(o))).uploader=void 0,t.saveUploader=function(e){t.uploader=e},t}return(0,o.Z)(n,[{key:"abort",value:function(t){this.uploader.abort(t)}},{key:"render",value:function(){return s.createElement(O,(0,r.Z)({},this.props,{ref:this.saveUploader}))}}]),n}(s.Component);M.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:I,onError:I,onSuccess:I,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var R=M}}]); 3//# sourceMappingURL=880.64333554.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.