@guihz/trading-vue-editor-tes 0.0.142 → 0.0.144
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/assets/{scriptsRunWorker-BZF14FNK.js → scriptsRunWorker-gOaiI2Kb.js} +1 -1
- package/lib/components/editor/index.d.ts +1 -0
- package/lib/components/editor/utils/initEditor.d.ts +1 -0
- package/lib/trading-vue-editor.js +174 -165
- package/lib/trading-vue-editor.umd.cjs +27 -27
- package/package.json +1 -1
@@ -16,18 +16,18 @@
|
|
16
16
|
*
|
17
17
|
* This source code is licensed under the MIT license found in the
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
19
|
-
*/var $i;function dp(){return $i||($i=1,process.env.NODE_ENV!=="production"&&function(){var a=R,n=Symbol.for("react.element"),s=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),_=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),K=Symbol.for("react.offscreen"),F=Symbol.iterator,
|
20
|
-
`+ys+g}}var Wt=!1,Mr;{var Pr=typeof WeakMap=="function"?WeakMap:Map;Mr=new Pr}function hr(g,M){if(!g||Wt)return"";{var $=Mr.get(g);if($!==void 0)return $}var ee;Wt=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var we;we=je.current,je.current=null,
|
19
|
+
*/var $i;function dp(){return $i||($i=1,process.env.NODE_ENV!=="production"&&function(){var a=R,n=Symbol.for("react.element"),s=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),_=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),K=Symbol.for("react.offscreen"),F=Symbol.iterator,N="@@iterator";function H(g){if(g===null||typeof g!="object")return null;var M=F&&g[F]||g[N];return typeof M=="function"?M:null}var V=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function G(g){{for(var M=arguments.length,$=new Array(M>1?M-1:0),ee=1;ee<M;ee++)$[ee-1]=arguments[ee];B("error",g,$)}}function B(g,M,$){{var ee=V.ReactDebugCurrentFrame,_e=ee.getStackAddendum();_e!==""&&(M+="%s",$=$.concat([_e]));var we=$.map(function(me){return String(me)});we.unshift("Warning: "+M),Function.prototype.apply.call(console[g],console,we)}}var k=!1,P=!1,S=!1,U=!1,te=!1,fe;fe=Symbol.for("react.module.reference");function le(g){return!!(typeof g=="string"||typeof g=="function"||g===o||g===l||te||g===c||g===b||g===h||U||g===K||k||P||S||typeof g=="object"&&g!==null&&(g.$$typeof===O||g.$$typeof===T||g.$$typeof===m||g.$$typeof===_||g.$$typeof===f||g.$$typeof===fe||g.getModuleId!==void 0))}function ht(g,M,$){var ee=g.displayName;if(ee)return ee;var _e=M.displayName||M.name||"";return _e!==""?$+"("+_e+")":$}function Et(g){return g.displayName||"Context"}function Ue(g){if(g==null)return null;if(typeof g.tag=="number"&&G("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case o:return"Fragment";case s:return"Portal";case l:return"Profiler";case c:return"StrictMode";case b:return"Suspense";case h:return"SuspenseList"}if(typeof g=="object")switch(g.$$typeof){case _:var M=g;return Et(M)+".Consumer";case m:var $=g;return Et($._context)+".Provider";case f:return ht(g,g.render,"ForwardRef");case T:var ee=g.displayName||null;return ee!==null?ee:Ue(g.type)||"Memo";case O:{var _e=g,we=_e._payload,me=_e._init;try{return Ue(me(we))}catch{return null}}}return null}var Ke=Object.assign,Y=0,be,Ee,Me,pt,wt,re,xe;function Re(){}Re.__reactDisabledLog=!0;function Nt(){{if(Y===0){be=console.log,Ee=console.info,Me=console.warn,pt=console.error,wt=console.group,re=console.groupCollapsed,xe=console.groupEnd;var g={configurable:!0,enumerable:!0,value:Re,writable:!0};Object.defineProperties(console,{info:g,log:g,warn:g,error:g,group:g,groupCollapsed:g,groupEnd:g})}Y++}}function $e(){{if(Y--,Y===0){var g={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ke({},g,{value:be}),info:Ke({},g,{value:Ee}),warn:Ke({},g,{value:Me}),error:Ke({},g,{value:pt}),group:Ke({},g,{value:wt}),groupCollapsed:Ke({},g,{value:re}),groupEnd:Ke({},g,{value:xe})})}Y<0&&G("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var je=V.ReactCurrentDispatcher,ys;function Ut(g,M,$){{if(ys===void 0)try{throw Error()}catch(_e){var ee=_e.stack.trim().match(/\n( *(at )?)/);ys=ee&&ee[1]||""}return`
|
20
|
+
`+ys+g}}var Wt=!1,Mr;{var Pr=typeof WeakMap=="function"?WeakMap:Map;Mr=new Pr}function hr(g,M){if(!g||Wt)return"";{var $=Mr.get(g);if($!==void 0)return $}var ee;Wt=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var we;we=je.current,je.current=null,Nt();try{if(M){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(st){ee=st}Reflect.construct(g,[],me)}else{try{me.call()}catch(st){ee=st}g.call(me.prototype)}}else{try{throw Error()}catch(st){ee=st}g()}}catch(st){if(st&&ee&&typeof st.stack=="string"){for(var pe=st.stack.split(`
|
21
21
|
`),We=ee.stack.split(`
|
22
|
-
`),Ce=pe.length-1,
|
23
|
-
`+pe[Ce].replace(" at new "," at ");return g.displayName&&rt.includes("<anonymous>")&&(rt=rt.replace("<anonymous>",g.displayName)),typeof g=="function"&&Mr.set(g,rt),rt}while(Ce>=1&&
|
22
|
+
`),Ce=pe.length-1,Ne=We.length-1;Ce>=1&&Ne>=0&&pe[Ce]!==We[Ne];)Ne--;for(;Ce>=1&&Ne>=0;Ce--,Ne--)if(pe[Ce]!==We[Ne]){if(Ce!==1||Ne!==1)do if(Ce--,Ne--,Ne<0||pe[Ce]!==We[Ne]){var rt=`
|
23
|
+
`+pe[Ce].replace(" at new "," at ");return g.displayName&&rt.includes("<anonymous>")&&(rt=rt.replace("<anonymous>",g.displayName)),typeof g=="function"&&Mr.set(g,rt),rt}while(Ce>=1&&Ne>=0);break}}}finally{Wt=!1,je.current=we,$e(),Error.prepareStackTrace=_e}var Mt=g?g.displayName||g.name:"",ua=Mt?Ut(Mt):"";return typeof g=="function"&&Mr.set(g,ua),ua}function aa(g,M,$){return hr(g,!1)}function dt(g){var M=g.prototype;return!!(M&&M.isReactComponent)}function Kt(g,M,$){if(g==null)return"";if(typeof g=="function")return hr(g,dt(g));if(typeof g=="string")return Ut(g);switch(g){case b:return Ut("Suspense");case h:return Ut("SuspenseList")}if(typeof g=="object")switch(g.$$typeof){case f:return aa(g.render);case T:return Kt(g.type,M,$);case O:{var ee=g,_e=ee._payload,we=ee._init;try{return Kt(we(_e),M,$)}catch{}}}return""}var Or=Object.prototype.hasOwnProperty,vt={},_s=V.ReactDebugCurrentFrame;function Rr(g){if(g){var M=g._owner,$=Kt(g.type,g._source,M?M.type:null);_s.setExtraStackFrame($)}else _s.setExtraStackFrame(null)}function wr(g,M,$,ee,_e){{var we=Function.call.bind(Or);for(var me in g)if(we(g,me)){var pe=void 0;try{if(typeof g[me]!="function"){var We=Error((ee||"React class")+": "+$+" type `"+me+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof g[me]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw We.name="Invariant Violation",We}pe=g[me](M,me,ee,$,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ce){pe=Ce}pe&&!(pe instanceof Error)&&(Rr(_e),G("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ee||"React class",$,me,typeof pe),Rr(null)),pe instanceof Error&&!(pe.message in vt)&&(vt[pe.message]=!0,Rr(_e),G("Failed %s type: %s",$,pe.message),Rr(null))}}}var mt=Array.isArray;function Gt(g){return mt(g)}function Fr(g){{var M=typeof Symbol=="function"&&Symbol.toStringTag,$=M&&g[Symbol.toStringTag]||g.constructor.name||"Object";return $}}function Tn(g){try{return ir(g),!1}catch{return!0}}function ir(g){return""+g}function na(g){if(Tn(g))return G("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Fr(g)),ir(g)}var Lt=V.ReactCurrentOwner,or={key:!0,ref:!0,__self:!0,__source:!0},Br,Ur,vr;vr={};function fs(g){if(Or.call(g,"ref")){var M=Object.getOwnPropertyDescriptor(g,"ref").get;if(M&&M.isReactWarning)return!1}return g.ref!==void 0}function gs(g){if(Or.call(g,"key")){var M=Object.getOwnPropertyDescriptor(g,"key").get;if(M&&M.isReactWarning)return!1}return g.key!==void 0}function bs(g,M){if(typeof g.ref=="string"&&Lt.current&&M&&Lt.current.stateNode!==M){var $=Ue(Lt.current.type);vr[$]||(G('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Ue(Lt.current.type),g.ref),vr[$]=!0)}}function xs(g,M){{var $=function(){Br||(Br=!0,G("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",M))};$.isReactWarning=!0,Object.defineProperty(g,"key",{get:$,configurable:!0})}}function hs(g,M){{var $=function(){Ur||(Ur=!0,G("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",M))};$.isReactWarning=!0,Object.defineProperty(g,"ref",{get:$,configurable:!0})}}var ws=function(g,M,$,ee,_e,we,me){var pe={$$typeof:n,type:g,key:M,ref:$,props:me,_owner:we};return pe._store={},Object.defineProperty(pe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(pe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.defineProperty(pe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:_e}),Object.freeze&&(Object.freeze(pe.props),Object.freeze(pe)),pe};function Dn(g,M,$,ee,_e){{var we,me={},pe=null,We=null;$!==void 0&&(na($),pe=""+$),gs(M)&&(na(M.key),pe=""+M.key),fs(M)&&(We=M.ref,bs(M,_e));for(we in M)Or.call(M,we)&&!or.hasOwnProperty(we)&&(me[we]=M[we]);if(g&&g.defaultProps){var Ce=g.defaultProps;for(we in Ce)me[we]===void 0&&(me[we]=Ce[we])}if(pe||We){var Ne=typeof g=="function"?g.displayName||g.name||"Unknown":g;pe&&xs(me,Ne),We&&hs(me,Ne)}return ws(g,pe,We,_e,ee,Lt.current,me)}}var vs=V.ReactCurrentOwner,ia=V.ReactDebugCurrentFrame;function Xt(g){if(g){var M=g._owner,$=Kt(g.type,g._source,M?M.type:null);ia.setExtraStackFrame($)}else ia.setExtraStackFrame(null)}var Kr;Kr=!1;function Ts(g){return typeof g=="object"&&g!==null&&g.$$typeof===n}function oa(){{if(vs.current){var g=Ue(vs.current.type);if(g)return`
|
24
24
|
|
25
25
|
Check the render method of \``+g+"`."}return""}}function kn(g){{if(g!==void 0){var M=g.fileName.replace(/^.*[\\\/]/,""),$=g.lineNumber;return`
|
26
26
|
|
27
27
|
Check your code at `+M+":"+$+"."}return""}}var la={};function ca(g){{var M=oa();if(!M){var $=typeof g=="string"?g:g.displayName||g.name;$&&(M=`
|
28
28
|
|
29
|
-
Check the top-level render call using <`+$+">.")}return M}}function pa(g,M){{if(!g._store||g._store.validated||g.key!=null)return;g._store.validated=!0;var $=ca(M);if(la[$])return;la[$]=!0;var ee="";g&&g._owner&&g._owner!==vs.current&&(ee=" It was passed a child from "+Ue(g._owner.type)+"."),Xt(g),G('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$,ee),Xt(null)}}function da(g,M){{if(typeof g!="object")return;if(Gt(g))for(var $=0;$<g.length;$++){var ee=g[$];Ts(ee)&&pa(ee,M)}else if(Ts(g))g._store&&(g._store.validated=!0);else if(g){var _e=H(g);if(typeof _e=="function"&&_e!==g.entries)for(var we=_e.call(g),me;!(me=we.next()).done;)Ts(me.value)&&pa(me.value,M)}}}function In(g){{var M=g.type;if(M==null||typeof M=="string")return;var $;if(typeof M=="function")$=M.propTypes;else if(typeof M=="object"&&(M.$$typeof===f||M.$$typeof===T))$=M.propTypes;else return;if($){var ee=Ue(M);wr($,g.props,"prop",ee,g)}else if(M.PropTypes!==void 0&&!Kr){Kr=!0;var _e=Ue(M);G("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"Unknown")}typeof M.getDefaultProps=="function"&&!M.getDefaultProps.isReactClassApproved&&G("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ds(g){{for(var M=Object.keys(g.props),$=0;$<M.length;$++){var ee=M[$];if(ee!=="children"&&ee!=="key"){Xt(g),G("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ee),Xt(null);break}}g.ref!==null&&(Xt(g),G("Invalid attribute `ref` supplied to `React.Fragment`."),Xt(null))}}function ma(g,M,$,ee,_e,we){{var me=le(g);if(!me){var pe="";(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(pe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var We=kn(_e);We?pe+=We:pe+=oa();var Ce;g===null?Ce="null":Gt(g)?Ce="array":g!==void 0&&g.$$typeof===n?(Ce="<"+(Ue(g.type)||"Unknown")+" />",pe=" Did you accidentally export a JSX literal instead of a component?"):Ce=typeof g,G("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ce,pe)}var
|
30
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hp(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}function Gi(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Xi(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Gi(Object(s),!0).forEach(function(o){hp(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Gi(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function wp(){for(var a=arguments.length,n=new Array(a),s=0;s<a;s++)n[s]=arguments[s];return function(o){return n.reduceRight(function(c,l){return l(c)},o)}}function is(a){return function n(){for(var s=this,o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];return c.length>=a.length?a.apply(this,c):function(){for(var m=arguments.length,_=new Array(m),f=0;f<m;f++)_[f]=arguments[f];return n.apply(s,[].concat(c,_))}}}function Ks(a){return{}.toString.call(a).includes("Object")}function vp(a){return!Object.keys(a).length}function os(a){return typeof a=="function"}function Tp(a,n){return Object.prototype.hasOwnProperty.call(a,n)}function Dp(a,n){return Ks(n)||ar("changeType"),Object.keys(n).some(function(s){return!Tp(a,s)})&&ar("changeField"),n}function kp(a){os(a)||ar("selectorType")}function Ip(a){os(a)||Ks(a)||ar("handlerType"),Ks(a)&&Object.values(a).some(function(n){return!os(n)})&&ar("handlersType")}function Ap(a){a||ar("initialIsRequired"),Ks(a)||ar("initialType"),vp(a)&&ar("initialContent")}function qp(a,n){throw new Error(a[n]||a.default)}var Cp={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},ar=is(qp)(Cp),$s={changes:Dp,selector:kp,handler:Ip,initial:Ap};function zp(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$s.initial(a),$s.handler(n);var s={current:a},o=is(
|
29
|
+
Check the top-level render call using <`+$+">.")}return M}}function pa(g,M){{if(!g._store||g._store.validated||g.key!=null)return;g._store.validated=!0;var $=ca(M);if(la[$])return;la[$]=!0;var ee="";g&&g._owner&&g._owner!==vs.current&&(ee=" It was passed a child from "+Ue(g._owner.type)+"."),Xt(g),G('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$,ee),Xt(null)}}function da(g,M){{if(typeof g!="object")return;if(Gt(g))for(var $=0;$<g.length;$++){var ee=g[$];Ts(ee)&&pa(ee,M)}else if(Ts(g))g._store&&(g._store.validated=!0);else if(g){var _e=H(g);if(typeof _e=="function"&&_e!==g.entries)for(var we=_e.call(g),me;!(me=we.next()).done;)Ts(me.value)&&pa(me.value,M)}}}function In(g){{var M=g.type;if(M==null||typeof M=="string")return;var $;if(typeof M=="function")$=M.propTypes;else if(typeof M=="object"&&(M.$$typeof===f||M.$$typeof===T))$=M.propTypes;else return;if($){var ee=Ue(M);wr($,g.props,"prop",ee,g)}else if(M.PropTypes!==void 0&&!Kr){Kr=!0;var _e=Ue(M);G("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"Unknown")}typeof M.getDefaultProps=="function"&&!M.getDefaultProps.isReactClassApproved&&G("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ds(g){{for(var M=Object.keys(g.props),$=0;$<M.length;$++){var ee=M[$];if(ee!=="children"&&ee!=="key"){Xt(g),G("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ee),Xt(null);break}}g.ref!==null&&(Xt(g),G("Invalid attribute `ref` supplied to `React.Fragment`."),Xt(null))}}function ma(g,M,$,ee,_e,we){{var me=le(g);if(!me){var pe="";(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(pe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var We=kn(_e);We?pe+=We:pe+=oa();var Ce;g===null?Ce="null":Gt(g)?Ce="array":g!==void 0&&g.$$typeof===n?(Ce="<"+(Ue(g.type)||"Unknown")+" />",pe=" Did you accidentally export a JSX literal instead of a component?"):Ce=typeof g,G("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ce,pe)}var Ne=Dn(g,M,$,_e,we);if(Ne==null)return Ne;if(me){var rt=M.children;if(rt!==void 0)if(ee)if(Gt(rt)){for(var Mt=0;Mt<rt.length;Mt++)da(rt[Mt],g);Object.freeze&&Object.freeze(rt)}else G("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else da(rt,g)}return g===o?Ds(Ne):In(Ne),Ne}}function ks(g,M,$){return ma(g,M,$,!0)}function An(g,M,$){return ma(g,M,$,!1)}var qn=An,Cn=ks;ns.Fragment=o,ns.jsx=qn,ns.jsxs=Cn}()),ns}process.env.NODE_ENV==="production"?en.exports=pp():en.exports=dp();var L=en.exports;function mp(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}function ji(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Hi(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?ji(Object(s),!0).forEach(function(o){mp(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):ji(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function up(a,n){if(a==null)return{};var s={},o=Object.keys(a),c,l;for(l=0;l<o.length;l++)c=o[l],!(n.indexOf(c)>=0)&&(s[c]=a[c]);return s}function yp(a,n){if(a==null)return{};var s=up(a,n),o,c;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(c=0;c<l.length;c++)o=l[c],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function _p(a,n){return fp(a)||gp(a,n)||bp(a,n)||xp()}function fp(a){if(Array.isArray(a))return a}function gp(a,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(a)))){var s=[],o=!0,c=!1,l=void 0;try{for(var m=a[Symbol.iterator](),_;!(o=(_=m.next()).done)&&(s.push(_.value),!(n&&s.length===n));o=!0);}catch(f){c=!0,l=f}finally{try{!o&&m.return!=null&&m.return()}finally{if(c)throw l}}return s}}function bp(a,n){if(a){if(typeof a=="string")return Wi(a,n);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(a);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Wi(a,n)}}function Wi(a,n){(n==null||n>a.length)&&(n=a.length);for(var s=0,o=new Array(n);s<n;s++)o[s]=a[s];return o}function xp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
30
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hp(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}function Gi(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function Xi(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Gi(Object(s),!0).forEach(function(o){hp(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Gi(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function wp(){for(var a=arguments.length,n=new Array(a),s=0;s<a;s++)n[s]=arguments[s];return function(o){return n.reduceRight(function(c,l){return l(c)},o)}}function is(a){return function n(){for(var s=this,o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];return c.length>=a.length?a.apply(this,c):function(){for(var m=arguments.length,_=new Array(m),f=0;f<m;f++)_[f]=arguments[f];return n.apply(s,[].concat(c,_))}}}function Ks(a){return{}.toString.call(a).includes("Object")}function vp(a){return!Object.keys(a).length}function os(a){return typeof a=="function"}function Tp(a,n){return Object.prototype.hasOwnProperty.call(a,n)}function Dp(a,n){return Ks(n)||ar("changeType"),Object.keys(n).some(function(s){return!Tp(a,s)})&&ar("changeField"),n}function kp(a){os(a)||ar("selectorType")}function Ip(a){os(a)||Ks(a)||ar("handlerType"),Ks(a)&&Object.values(a).some(function(n){return!os(n)})&&ar("handlersType")}function Ap(a){a||ar("initialIsRequired"),Ks(a)||ar("initialType"),vp(a)&&ar("initialContent")}function qp(a,n){throw new Error(a[n]||a.default)}var Cp={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},ar=is(qp)(Cp),$s={changes:Dp,selector:kp,handler:Ip,initial:Ap};function zp(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$s.initial(a),$s.handler(n);var s={current:a},o=is(Np)(s,n),c=is(Ep)(s),l=is($s.changes)(a),m=is(Sp)(s);function _(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(h){return h};return $s.selector(b),b(s.current)}function f(b){wp(o,c,l,m)(b)}return[_,f]}function Sp(a,n){return os(n)?n(a.current):n}function Ep(a,n){return a.current=Xi(Xi({},a.current),n),n}function Np(a,n,s){return os(n)?n(a.current):Object.keys(s).forEach(function(o){var c;return(c=n[o])===null||c===void 0?void 0:c.call(n,a.current[o])}),s}var Lp={create:zp},Mp={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function Pp(a){return function n(){for(var s=this,o=arguments.length,c=new Array(o),l=0;l<o;l++)c[l]=arguments[l];return c.length>=a.length?a.apply(this,c):function(){for(var m=arguments.length,_=new Array(m),f=0;f<m;f++)_[f]=arguments[f];return n.apply(s,[].concat(c,_))}}}function Op(a){return{}.toString.call(a).includes("Object")}function Rp(a){return a||Yi("configIsRequired"),Op(a)||Yi("configType"),a.urls?(Fp(),{paths:{vs:a.urls.monacoBase}}):a}function Fp(){console.warn(Vi.deprecation)}function Bp(a,n){throw new Error(a[n]||a.default)}var Vi={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
31
31
|
You are using deprecated way of configuration.
|
32
32
|
|
33
33
|
Instead of using
|
@@ -36,7 +36,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
36
36
|
monaco.config({ paths: { vs: '...' } })
|
37
37
|
|
38
38
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
39
|
-
`},Yi=Pp(Bp)(Vi),Up={config:Rp},Kp=function(){for(var n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];return function(c){return s.reduceRight(function(l,m){return m(l)},c)}};function Qi(a,n){return Object.keys(n).forEach(function(s){n[s]instanceof Object&&a[s]&&Object.assign(n[s],Qi(a[s],n[s]))}),Hi(Hi({},a),n)}var $p={type:"cancelation",msg:"operation is manually canceled"};function tn(a){var n=!1,s=new Promise(function(o,c){a.then(function(l){return n?c($p):o(l)}),a.catch(c)});return s.cancel=function(){return n=!0},s}var jp=Lp.create({config:Mp,isInitialized:!1,resolve:null,reject:null,monaco:null}),Zi=_p(jp,2),ls=Zi[0],js=Zi[1];function Hp(a){var n=Up.config(a),s=n.monaco,o=yp(n,["monaco"]);js(function(c){return{config:Qi(c.config,o),monaco:s}})}function Wp(){var a=ls(function(n){var s=n.monaco,o=n.isInitialized,c=n.resolve;return{monaco:s,isInitialized:o,resolve:c}});if(!a.isInitialized){if(js({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),tn(rn);if(window.monaco&&window.monaco.editor)return Ji(window.monaco),a.resolve(window.monaco),tn(rn);Kp(Gp,Vp)(Yp)}return tn(rn)}function Gp(a){return document.body.appendChild(a)}function Xp(a){var n=document.createElement("script");return a&&(n.src=a),n}function Vp(a){var n=ls(function(o){var c=o.config,l=o.reject;return{config:c,reject:l}}),s=Xp("".concat(n.config.paths.vs,"/loader.js"));return s.onload=function(){return a()},s.onerror=n.reject,s}function Yp(){var a=ls(function(s){var o=s.config,c=s.resolve,l=s.reject;return{config:o,resolve:c,reject:l}}),n=window.require;n.config(a.config),n(["vs/editor/editor.main"],function(s){Ji(s),a.resolve(s)},function(s){a.reject(s)})}function Ji(a){ls().monaco||js({monaco:a})}function Qp(){return ls(function(a){var n=a.monaco;return n})}var rn=new Promise(function(a,n){return js({resolve:a,reject:n})}),sn={config:Hp,init:Wp,__getMonacoInstance:Qp},Zp={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},an=Zp,Jp={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},ed=Jp;function td({children:a}){return R.createElement("div",{style:ed.container},a)}var rd=td,sd=rd;function ad({width:a,height:n,isEditorReady:s,loading:o,_ref:c,className:l,wrapperProps:m}){return R.createElement("section",{style:{...an.wrapper,width:a,height:n},...m},!s&&R.createElement(sd,null,o),R.createElement("div",{ref:c,style:{...an.fullWidth,...!s&&an.hide},className:l}))}var nd=ad,eo=R.memo(nd);function id(a){R.useEffect(a,[])}var to=id;function od(a,n,s=!0){let o=R.useRef(!0);R.useEffect(o.current||!s?()=>{o.current=!1}:a,n)}var lt=od;function cs(){}function
|
39
|
+
`},Yi=Pp(Bp)(Vi),Up={config:Rp},Kp=function(){for(var n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];return function(c){return s.reduceRight(function(l,m){return m(l)},c)}};function Qi(a,n){return Object.keys(n).forEach(function(s){n[s]instanceof Object&&a[s]&&Object.assign(n[s],Qi(a[s],n[s]))}),Hi(Hi({},a),n)}var $p={type:"cancelation",msg:"operation is manually canceled"};function tn(a){var n=!1,s=new Promise(function(o,c){a.then(function(l){return n?c($p):o(l)}),a.catch(c)});return s.cancel=function(){return n=!0},s}var jp=Lp.create({config:Mp,isInitialized:!1,resolve:null,reject:null,monaco:null}),Zi=_p(jp,2),ls=Zi[0],js=Zi[1];function Hp(a){var n=Up.config(a),s=n.monaco,o=yp(n,["monaco"]);js(function(c){return{config:Qi(c.config,o),monaco:s}})}function Wp(){var a=ls(function(n){var s=n.monaco,o=n.isInitialized,c=n.resolve;return{monaco:s,isInitialized:o,resolve:c}});if(!a.isInitialized){if(js({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),tn(rn);if(window.monaco&&window.monaco.editor)return Ji(window.monaco),a.resolve(window.monaco),tn(rn);Kp(Gp,Vp)(Yp)}return tn(rn)}function Gp(a){return document.body.appendChild(a)}function Xp(a){var n=document.createElement("script");return a&&(n.src=a),n}function Vp(a){var n=ls(function(o){var c=o.config,l=o.reject;return{config:c,reject:l}}),s=Xp("".concat(n.config.paths.vs,"/loader.js"));return s.onload=function(){return a()},s.onerror=n.reject,s}function Yp(){var a=ls(function(s){var o=s.config,c=s.resolve,l=s.reject;return{config:o,resolve:c,reject:l}}),n=window.require;n.config(a.config),n(["vs/editor/editor.main"],function(s){Ji(s),a.resolve(s)},function(s){a.reject(s)})}function Ji(a){ls().monaco||js({monaco:a})}function Qp(){return ls(function(a){var n=a.monaco;return n})}var rn=new Promise(function(a,n){return js({resolve:a,reject:n})}),sn={config:Hp,init:Wp,__getMonacoInstance:Qp},Zp={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},an=Zp,Jp={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},ed=Jp;function td({children:a}){return R.createElement("div",{style:ed.container},a)}var rd=td,sd=rd;function ad({width:a,height:n,isEditorReady:s,loading:o,_ref:c,className:l,wrapperProps:m}){return R.createElement("section",{style:{...an.wrapper,width:a,height:n},...m},!s&&R.createElement(sd,null,o),R.createElement("div",{ref:c,style:{...an.fullWidth,...!s&&an.hide},className:l}))}var nd=ad,eo=R.memo(nd);function id(a){R.useEffect(a,[])}var to=id;function od(a,n,s=!0){let o=R.useRef(!0);R.useEffect(o.current||!s?()=>{o.current=!1}:a,n)}var lt=od;function cs(){}function Er(a,n,s,o){return ld(a,o)||cd(a,n,s,o)}function ld(a,n){return a.editor.getModel(ro(a,n))}function cd(a,n,s,o){return a.editor.createModel(n,s,o?ro(a,o):void 0)}function ro(a,n){return a.Uri.parse(n)}function pd({original:a,modified:n,language:s,originalLanguage:o,modifiedLanguage:c,originalModelPath:l,modifiedModelPath:m,keepCurrentOriginalModel:_=!1,keepCurrentModifiedModel:f=!1,theme:b="light",loading:h="Loading...",options:T={},height:O="100%",width:K="100%",className:F,wrapperProps:N={},beforeMount:H=cs,onMount:V=cs}){let[G,B]=R.useState(!1),[k,P]=R.useState(!0),S=R.useRef(null),U=R.useRef(null),te=R.useRef(null),fe=R.useRef(V),le=R.useRef(H),ht=R.useRef(!1);to(()=>{let Y=sn.init();return Y.then(be=>(U.current=be)&&P(!1)).catch(be=>(be==null?void 0:be.type)!=="cancelation"&&console.error("Monaco initialization: error:",be)),()=>S.current?Ke():Y.cancel()}),lt(()=>{if(S.current&&U.current){let Y=S.current.getOriginalEditor(),be=Er(U.current,a||"",o||s||"text",l||"");be!==Y.getModel()&&Y.setModel(be)}},[l],G),lt(()=>{if(S.current&&U.current){let Y=S.current.getModifiedEditor(),be=Er(U.current,n||"",c||s||"text",m||"");be!==Y.getModel()&&Y.setModel(be)}},[m],G),lt(()=>{let Y=S.current.getModifiedEditor();Y.getOption(U.current.editor.EditorOption.readOnly)?Y.setValue(n||""):n!==Y.getValue()&&(Y.executeEdits("",[{range:Y.getModel().getFullModelRange(),text:n||"",forceMoveMarkers:!0}]),Y.pushUndoStop())},[n],G),lt(()=>{var Y,be;(be=(Y=S.current)==null?void 0:Y.getModel())==null||be.original.setValue(a||"")},[a],G),lt(()=>{let{original:Y,modified:be}=S.current.getModel();U.current.editor.setModelLanguage(Y,o||s||"text"),U.current.editor.setModelLanguage(be,c||s||"text")},[s,o,c],G),lt(()=>{var Y;(Y=U.current)==null||Y.editor.setTheme(b)},[b],G),lt(()=>{var Y;(Y=S.current)==null||Y.updateOptions(T)},[T],G);let Et=R.useCallback(()=>{var Ee;if(!U.current)return;le.current(U.current);let Y=Er(U.current,a||"",o||s||"text",l||""),be=Er(U.current,n||"",c||s||"text",m||"");(Ee=S.current)==null||Ee.setModel({original:Y,modified:be})},[s,n,c,a,o,l,m]),Ue=R.useCallback(()=>{var Y;!ht.current&&te.current&&(S.current=U.current.editor.createDiffEditor(te.current,{automaticLayout:!0,...T}),Et(),(Y=U.current)==null||Y.editor.setTheme(b),B(!0),ht.current=!0)},[T,b,Et]);R.useEffect(()=>{G&&fe.current(S.current,U.current)},[G]),R.useEffect(()=>{!k&&!G&&Ue()},[k,G,Ue]);function Ke(){var be,Ee,Me,pt;let Y=(be=S.current)==null?void 0:be.getModel();_||((Ee=Y==null?void 0:Y.original)==null||Ee.dispose()),f||((Me=Y==null?void 0:Y.modified)==null||Me.dispose()),(pt=S.current)==null||pt.dispose()}return R.createElement(eo,{width:K,height:O,isEditorReady:G,loading:h,_ref:te,className:F,wrapperProps:N})}var dd=pd,md=R.memo(dd);function ud(a){let n=R.useRef();return R.useEffect(()=>{n.current=a},[a]),n.current}var yd=ud,Hs=new Map;function _d({defaultValue:a,defaultLanguage:n,defaultPath:s,value:o,language:c,path:l,theme:m="light",line:_,loading:f="Loading...",options:b={},overrideServices:h={},saveViewState:T=!0,keepCurrentModel:O=!1,width:K="100%",height:F="100%",className:N,wrapperProps:H={},beforeMount:V=cs,onMount:G=cs,onChange:B,onValidate:k=cs}){let[P,S]=R.useState(!1),[U,te]=R.useState(!0),fe=R.useRef(null),le=R.useRef(null),ht=R.useRef(null),Et=R.useRef(G),Ue=R.useRef(V),Ke=R.useRef(),Y=R.useRef(o),be=yd(l),Ee=R.useRef(!1),Me=R.useRef(!1);to(()=>{let re=sn.init();return re.then(xe=>(fe.current=xe)&&te(!1)).catch(xe=>(xe==null?void 0:xe.type)!=="cancelation"&&console.error("Monaco initialization: error:",xe)),()=>le.current?wt():re.cancel()}),lt(()=>{var xe,Re,Nt,$e;let re=Er(fe.current,a||o||"",n||c||"",l||s||"");re!==((xe=le.current)==null?void 0:xe.getModel())&&(T&&Hs.set(be,(Re=le.current)==null?void 0:Re.saveViewState()),(Nt=le.current)==null||Nt.setModel(re),T&&(($e=le.current)==null||$e.restoreViewState(Hs.get(l))))},[l],P),lt(()=>{var re;(re=le.current)==null||re.updateOptions(b)},[b],P),lt(()=>{!le.current||o===void 0||(le.current.getOption(fe.current.editor.EditorOption.readOnly)?le.current.setValue(o):o!==le.current.getValue()&&(Me.current=!0,le.current.executeEdits("",[{range:le.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),le.current.pushUndoStop(),Me.current=!1))},[o],P),lt(()=>{var xe,Re;let re=(xe=le.current)==null?void 0:xe.getModel();re&&c&&((Re=fe.current)==null||Re.editor.setModelLanguage(re,c))},[c],P),lt(()=>{var re;_!==void 0&&((re=le.current)==null||re.revealLine(_))},[_],P),lt(()=>{var re;(re=fe.current)==null||re.editor.setTheme(m)},[m],P);let pt=R.useCallback(()=>{var re;if(!(!ht.current||!fe.current)&&!Ee.current){Ue.current(fe.current);let xe=l||s,Re=Er(fe.current,o||a||"",n||c||"",xe||"");le.current=(re=fe.current)==null?void 0:re.editor.create(ht.current,{model:Re,automaticLayout:!0,...b},h),T&&le.current.restoreViewState(Hs.get(xe)),fe.current.editor.setTheme(m),_!==void 0&&le.current.revealLine(_),S(!0),Ee.current=!0}},[a,n,s,o,c,l,b,h,T,m,_]);R.useEffect(()=>{P&&Et.current(le.current,fe.current)},[P]),R.useEffect(()=>{!U&&!P&&pt()},[U,P,pt]),Y.current=o,R.useEffect(()=>{var re,xe;P&&B&&((re=Ke.current)==null||re.dispose(),Ke.current=(xe=le.current)==null?void 0:xe.onDidChangeModelContent(Re=>{Me.current||B(le.current.getValue(),Re)}))},[P,B]),R.useEffect(()=>{if(P){let re=fe.current.editor.onDidChangeMarkers(xe=>{var Nt;let Re=(Nt=le.current.getModel())==null?void 0:Nt.uri;if(Re&&xe.find($e=>$e.path===Re.path)){let $e=fe.current.editor.getModelMarkers({resource:Re});k==null||k($e)}});return()=>{re==null||re.dispose()}}return()=>{}},[P,k]);function wt(){var re,xe;(re=Ke.current)==null||re.dispose(),O?T&&Hs.set(l,le.current.saveViewState()):(xe=le.current.getModel())==null||xe.dispose(),le.current.dispose()}return R.createElement(eo,{width:K,height:F,isEditorReady:P,loading:f,_ref:ht,className:N,wrapperProps:H})}var fd=_d,gd=R.memo(fd);const so={keywords:[{name:"or",desc:["逻辑 OR。适用于布尔表达式。"],syntax:["expr1 or expr2"],returns:["布尔值,或一系列布尔值。"]},{name:"and",desc:["逻辑 AND。适用于布尔表达式。"],syntax:["expr1 and expr2"],returns:["布尔值,或一系列布尔值。"]},{name:"not",desc:["逻辑求反(NOT)。 适用于布尔表达式。"],syntax:["not expr1"],returns:["布尔值,或一系列布尔值。"]},{name:"if",desc:["If语句定义了在满足表达式条件时必须执行的语句块。","要访问和使用if语句,应在代码的第一行中指定>= 2的Pine Script®语言版本,例如://@version=5","Pine Script®语言的第四版允许您使用“else if”语法。","通用编码来自:"],syntax:[`var_declarationX = if condition
|
40
40
|
var_decl_then0
|
41
41
|
var_decl_then1
|
42
42
|
…
|
@@ -108,44 +108,44 @@ else
|
|
108
108
|
|
109
109
|
`}bold(n){return`**${n}**`}italic(n){return`*${n.replace(">",">").replace("<","<")}*`}pineCode(n){return`\`\`\`
|
110
110
|
${n}
|
111
|
-
\`\`\``}code(n){return`\`${n}\``}paragraph(...n){return[this.paragraphBreak,...n,this.paragraphBreak].join(this.lineBreak)}link(n,s){return`[${n}](${s.href})`}}const ie=new Td;function Dd(a){const{name:n,libraryName:s,desc:o}=a,c=[`${ie.bold(n||s)} (library)`];return c.push(ie.delimiter),o&&c.push(ie.paragraph(ie.bold(tt.Description),ie.lineBreak,o)),c.join(c.length===2?" ":ie.lineBreak)}function kd(a,n=0,s=!0){const o=a[n];if(!o)return"";if(o.isEnumMember)return`${ie.bold(o.name)} (enum member)${o.value===void 0?"":` = ${o.value}`}`;const c=/(Mac|iPhone|iPod|iPad)/i.test(window.navigator.userAgent),{name:l,title:m,desc:_,type:f,syntax:b,returns:h,remarks:T,fields:O,members:K}=o,F=[`${ie.bold(l)} (${m})`];if(a.length>1&&F.push(ie.italic(`+${a.length-1} overloads`)),F.push(ie.delimiter),_&&F.push(ie.paragraph(Array.isArray(_)?_.join(ie.lineBreak):_||"")),f&&F.push(ie.paragraph(ie.bold(tt.Type),ie.italic(f))),b&&b.length&&F.push(ie.paragraph(ie.bold(tt.Syntax),ie.pineCode(b.join(ie.lineBreak)))),h&&F.push(ie.paragraph(ie.bold(tt.Returns),ie.lineBreak,h.join(ie.lineBreak))),T&&T.length&&a.length<=1){let E="";typeof T=="string"?E=T:E=T.join(ie.lineBreak)||"",E.length<200&&F.push(ie.paragraph(ie.bold(tt.Remarks),ie.lineBreak,E))}if(O){const E=[];for(const H of O){const V=H.desc?` - ${H.desc}`:"";E.push(`${H.name} (${H.type})${V}`)}F.push(ie.paragraph(ie.bold(tt.Fields),ie.lineBreak,E.join(ie.paragraphBreak)))}if(K){const E=[];for(const H of K){const V=H.desc?` - ${H.desc}`:"";E.push(`${H.name}${H.value?` (${H.value})`:""}${V}`)}F.push(ie.paragraph(ie.bold(tt.EnumMembers),ie.lineBreak,E.join(ie.paragraphBreak)))}return s&&F.push(ie.italic(`${ie.code(c?"⌘":"Ctrl")} + ${xd.clickOnKeywordForMoreHelp}`)),F.join(F.length===2?" ":ie.lineBreak)}const nn="tcc_cursor_position",Id=["submenuitem.EditorContextPeek","editor.action.peekDefinition"];function Ad(a){return a.replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2").replace(/\w[\w.\d]*\[\]/,"array")}function qd(a){const n=a.getContribution("editor.contrib.contextmenu"),s=n==null?void 0:n._getMenuActions;n._getMenuActions=function(){return s.apply(n,arguments).filter(function(c){return!Id.includes(c.id)})}}class Cd{constructor(){Object.defineProperty(this,"bracketsPostfix",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_builtinSubtreeCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_namespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_suggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_outermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userSuggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFuncArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userOutermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nextIsBracket",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.bracketsPostfix="(${0})",this._builtinSubtreeCache={},this._formatter=ie,this._namespaceCache=new Map,this._suggestions=[],this._outermostNsItems=new Map,this._funcArgsCache=new Map,this._userSuggestions=[],this._userFuncArgsCache=new Map,this._userNamespaceCache=new Map,this._userOutermostNsItems=new Map,this._methodNamespaceCache=new Map,this._userMethods=new Map,this._userTypes=new Map,this._methodFuncs=new Map,this._userFunctions=new Map,this._userEnums=new Map,this._nextIsBracket=!1}get methodFuncs(){return this._methodFuncs}get userFuncs(){return this._userFunctions}get userEnums(){return this._userEnums}set nextIsBracket(n){this._nextIsBracket=n}get nextIsBracket(){return this._nextIsBracket}get annotationSuggestions(){return this._getAnnotationCompletionItems(this._builtinSubtreeCache.annotations)}initBuiltinsTrees(){this._getBuiltinsCacheFragment(),this._suggestions=this._getAllCompletionItems(),this._getFuncArgumentsCompletionItemsToCache(this._builtinSubtreeCache.functions)}getArgSuggestions(n){return this._funcArgsCache.get(n)||this._userFuncArgsCache.get(n)}getSuggestions(n){return n?this._namespaceCache.get(n)||this._userNamespaceCache.get(n):this._suggestions.concat(this._userSuggestions)}_initUserDefind(){this._userFuncArgsCache.clear(),this._userNamespaceCache.clear(),this._userOutermostNsItems.clear(),this._methodNamespaceCache.clear(),this._methodFuncs.clear()}setUserDefind(n,s,o,c,l){this._initUserDefind();const m=this._mergeTreeSlices(this._generateTreeSlice(ct.methods,"method"),this._generateTreeSlice(c,"method"));this._getMethodNamespaceCache(m),this._userMethods=c,this._userTypes=s,this._userFunctions=n,this._userEnums=l;const _=this._generateTreeSlice(n,"fun");this._userSuggestions=this._getAllUserCompletionItems(_,this._generateTreeSlice(s,"type"),this._generateTreeSlice(o,"var"),this._generateTreeSlice(l,"enum")),this._getUserFuncArgumentsCompletionItemsToCache(_)}_getAllUserCompletionItems(n,s,o,c){const l=this._getEnumCompletionItems(c),m=this._getUserVariableCompletionItems(o),_=this._getTypeCompletionItems(s,!0),f=this._getFunctionCompletionItems(n,void 0,!0);return[..._,...f,...m,...l,...this._userOutermostNsItems.values()]}_getAllCompletionItems(){const{variables:n,keywords:s,types:o,functions:c}=this._builtinSubtreeCache,l=this._getVariableCompletionItems(n),m=this._getKeywordCompletionItems(s),_=this._getTypeCompletionItems(o),f=this._getFunctionCompletionItems(c),b=this._getSnippetsCompletionsList();return[...l,...m,..._,...f,...this._outermostNsItems.values(),...b]}_getNodeKey(n,s){return`${s}_${n}`}_mergeTreeSlices(...n){const s=new Map;for(const o of n)for(const[c,l]of o){const m=s.get(c);m?s.set(c,{...m,children:this._mergeTreeSlices(l.children,m.children)}):s.set(c,l)}return s}_mergeCompletions(n,s){const o=this._namespaceCache.get(n);o?this._namespaceCache.set(n,[...o,...s]):this._namespaceCache.set(n,s)}_mergeUserCompletions(n,s){const o=this._userNamespaceCache.get(n);o?this._userNamespaceCache.set(n,[...o,...s]):this._userNamespaceCache.set(n,s)}_generateTreeSlice(n,s){const o=new Map;for(const[c,l]of n){const[m,..._]=c.split("."),f=_.length>0,b=o.get(this._getNodeKey(m,f?"ns":s));let h=new Map,T=l.map(K=>({...K,name:c})),O=this._getNodeKey(c,s);if(f&&s!=="type"){const K=new Map([[_.join("."),l]]);T=[{name:m,title:ge.namespace}],O=this._getNodeKey(m,"ns"),h=this._generateTreeSlice(K,s)}b&&(T=[{name:m,title:ge.namespace}],h=this._mergeTreeSlices(b.children,h)),o.set(O,{value:T,children:h})}return o}_getBuiltinsCacheFragment(){const{keywords:n,variables:s,constants:o,types:c,functions:l,annotations:m}=ct,_=this._generateTreeSlice(m,"an");return _.delete("an_@version="),this._builtinSubtreeCache={keywords:this._generateTreeSlice(n,"key"),variables:this._mergeTreeSlices(this._generateTreeSlice(s,"var"),this._generateTreeSlice(o,"var")),types:this._generateTreeSlice(c,"type"),functions:this._generateTreeSlice(l,"fun"),annotations:_},this._builtinSubtreeCache}_getVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:_,children:f}=m;if(l.startsWith("ns")){const b=this._getNamespaceCompletionItem(_[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getVariableCompletionItems(f,b.label);s||this._outermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(_[0],s?3:2);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeCompletions(s,c),o}_setUserVariableSubItems(n,s){var b,h,T,O;let o=[];const c=Ad(n.type||""),l=this._methodNamespaceCache.get(c),m=s?`${s}.${n.name}`:n.name;l&&(o=l.filter(K=>{var V;const F=`${c}.${K.label}`,E=ct.methods.get(F)||this._userMethods.get(F),H=E==null?void 0:E.some(G=>!G.thisType||G.thisType[0].includes("<>")||G.thisType.includes(n.type||""));if(H&&E){const G=this._getNamedArgumentsCompletionList(((V=E[0])==null?void 0:V.args)||[]),B=`${m}.${K.label}`;this._userFuncArgsCache.set(B,G),this._methodFuncs.set(B,E)}return H}));const{types:_}=ct,f=((h=(b=this._userTypes.get(c))==null?void 0:b[0])==null?void 0:h.fields)||((O=(T=_.get(c))==null?void 0:T[0])==null?void 0:O.fields);if(f)for(const K of f){const F=K.name,E=K.type,H=this._getInstanceTypeCompletionItemProp({name:F,type:E,desc:K.desc?[K.desc]:void 0});this._setUserVariableSubItems({name:F,type:E},n.name),o.push({...H})}o.length&&this._mergeUserCompletions(m,o)}_getUserVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:_,children:f}=m;if(this._setUserVariableSubItems(_[0]),l.startsWith("ns")){const b=this._getNamespaceCompletionItem(_[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getUserVariableCompletionItems(f,b.label);s||this._userOutermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(_[0],s?2:1,!1);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeUserCompletions(s,c),o}_getTypeCompletionItems(n,s=!1){const o=[];for(const[,c]of n){const{value:l}=c,m=s?this._getCustomTypeCompletionItem(l[0]):this._getTypeCompletionItem(l[0]);o.push(m)}return o}_getEnumCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getEnumCompletionItem(c[0]);s.push(l);const m=c[0].members;m!=null&&m.length&&this._getEnumMemberCompletionItems(c[0].name,m)}return s}_getEnumMemberCompletionItems(n,s){const o=[];for(const c of s){const{name:l,desc:m,value:_}=c,f=this._getEnumMemberCompletionItem({name:l,desc:m?[m]:void 0,value:_});o.push(f)}o.length&&this._mergeUserCompletions(n,o)}_getAnnotationCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getAnnotationCompletionItem(c[0]);s.push(l)}return s}_getKeywordCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getKeywordCompletionItem(c[0]);s.push(l)}return s}_getMethodNamespaceCache(n,s){const o=[];for(const[c,l]of n){const{value:m,children:_}=l;if(c.startsWith("ns")){const f=this._getNamespaceCompletionItem(m[0]);if(s){o.push({...f});const b=`${s}.${f.label}`;f.label=b,f.insertText=b}this._getMethodNamespaceCache(_,f.label)}else{const f=this._getFunctionCompletionItem(m[0],s?3:2);if(m.length>1&&(f.detail=`${f.detail} (+${m.length-1} overloads)`),s){o.push({...f});const{label:b}=f;f.label=`${s}.${b}`,f.insertText=`${s}.${f.insertText}`,f.originInsertText=`${s}.${f.originInsertText}`,f.filterText=`${b}\r`}}}s&&this._methodNamespaceCache.set(s,o)}_getFunctionCompletionItems(n,s,o=!1){const c=[],l=[];for(const[m,_]of n){const{value:f,children:b}=_;if(m.startsWith("ns")){const h=this._getNamespaceCompletionItem(f[0]);if(s){l.push({...h});const O=`${s}.${h.label}`;h.label=O,h.insertText=O}const T=this._getFunctionCompletionItems(b,h.label,o);s||(o?this._userOutermostNsItems.set(m,h):this._outermostNsItems.set(m,h)),c.push(...T)}else{const h=this._getFunctionCompletionItem(f[0],s?3:2,!o);if(f.length>1&&(h.detail=`${h.detail} (+${f.length-1} overloads)`),s){l.push({...h});const{label:T}=h;h.label=`${s}.${T}`,h.insertText=`${s}.${h.insertText}`,h.originInsertText=`${s}.${h.originInsertText}`,h.filterText=`${T}\r`}c.push(h)}}return l.length&&s&&(o?this._mergeUserCompletions(s,l):this._mergeCompletions(s,l)),c}_getSnippetsCompletionsList(){return bd.map(n=>{const{label:s,kind:o,insertText:c}=n,l=s.charAt(0).toUpperCase()+s.substring(1),m={value:this._formatter.pineCode(c.replace(/\${\d:([^}]+)}|\${\d}/g,"$1"))};return{label:s,detail:`(${l} ${o})`,insertText:c,insertTextRules:Ie.languages.CompletionItemInsertTextRule.InsertAsSnippet,sortText:`2_${s}`,kind:Ie.languages.CompletionItemKind.Snippet,documentation:m}})}_getFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(O=>{b.set(O.name,O)}),b},m);const _=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._funcArgsCache.set(f,_)}}}_getUserFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getUserFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(O=>{b.set(O.name,O)}),b},m);const _=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._userFuncArgsCache.set(f,_)}}}_getNamedArgumentsCompletionList(n){return n.map(s=>{const{name:o,desc:c,displayType:l}=s,m=`${o} = `,_=Array.isArray(c)?c.join(this._formatter.delimiter):c||"";return{label:m,documentation:{value:this._formatter.paragraph(this._formatter.bold(ge.Description),this._formatter.lineBreak,_)},insertText:m,detail:`(${ge.parameter}) ${ge.types} ${l}`,kind:Ie.languages.CompletionItemKind.Text,sortText:`0_${m}`}})}_getVariableCompletionItem(n,s=2,o=!0){const c=this._extractExamples(n),l=this._extractDescription(n),m=[this._createDescriptionSection(l)];c.length?m.push(this._createExampleSection(c)):n.syntax&&n.syntax.length&&m.push(this._createSyntaxSection(n.syntax));const _={value:m.join(this._formatter.lineBreak)},f=o?ge.variables:ge.userDefinedVariable;return{documentation:_,label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Variable,sortText:`${s}_${n.name}`,detail:`(${f}) ${n.type}`}}_getKeywordCompletionItem(n,s=2){const o=this._extractExamples(n),c=this._extractDescription(n),l=[this._createDescriptionSection(c)];return o.length?l.push(this._createExampleSection(o)):n.syntax&&n.syntax.length&&l.push(this._createSyntaxSection(n.syntax)),{documentation:{value:l.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Keyword,sortText:`${s}_${n.name}`,detail:`(${ge.keywords})`}}_getTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Keyword,sortText:`1_${n.name}`,detail:`(${ge.types})`}}_getCustomTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Keyword,sortText:`2_${n.name}`,detail:`(${ge.userDefinedType})`}}_getEnumCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Enum,sortText:`2_${n.name}`,detail:`(${ge.enum})`}}_getEnumMemberCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.EnumMember,sortText:`2_${n.name}`,detail:`(enum member) ${n.value?`${n.name} = ${n.value}`:`${n.name}`}`}}_getInstanceTypeCompletionItemProp(n){const s=this._extractDescription(n),o=[];return s&&o.push(this._formatter.paragraph(this._formatter.bold(tt.Description),this._formatter.lineBreak,s)),{documentation:{value:o.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Field,sortText:`2_${n.name}`,detail:`(${ge.field}) ${n.type}`}}_getFunctionCompletionItem(n,s=2,o=!0){var K;const c=n.returnedTypes&&n.returnedTypes[0]||n.syntax&&n.syntax[0]&&((K=n.syntax[0].split("→").pop())==null?void 0:K.trim()),l=this._extractExamples(n),m=this._extractDescription(n),_=[this._createDescriptionSection(m)];l.length?_.push(this._createExampleSection(l)):n.syntax&&n.syntax.length&&_.push(this._createSyntaxSection(n.syntax)),n.returns&&n.returns.length&&_.push(this._createReturnSection(n.returns));const f={value:_.join(this._formatter.lineBreak)},b=n.name,h=o?ge.functions:ge.userDefinedFunction,T=n.template,O=T?`${vd(b)}<\${1}>`:b;return{documentation:f,label:T?`${b.replace(/<.+>/,"")}<type>`:b,kind:Ie.languages.CompletionItemKind.Function,sortText:`${s}_${b}`,insertTextRules:Ie.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:O+this.bracketsPostfix,originInsertText:O,detail:`(${h}) ${ge.returns} ${c}`,command:{id:"tcc.editor.function",title:"",arguments:[T?"editor.action.triggerSuggest":"editor.action.triggerParameterHints"]}}}_getAnnotationCompletionItem(n){const s=this._extractDescription(n),o=this._extractExamples(n),c=[this._createDescriptionSection(s)];return o.length&&c.push(this._createExampleSection(o)),{documentation:{value:c.join(this._formatter.lineBreak)},label:n.name,insertText:n.name.replace("@",""),kind:Ie.languages.CompletionItemKind.Keyword,detail:`(${ge.annotations})`}}_getNamespaceCompletionItem(n,s=2){const o=[this._createDescriptionSection(ge.namespaceDesc)];return{label:n.name,documentation:{value:o.join(this._formatter.lineBreak)},detail:`(${ge.namespace}) ${n.name}`,insertText:n.name,sortText:`${s}_${n.name}`,kind:Ie.languages.CompletionItemKind.Module}}_extractExamples(n){let s;return n.examples||n.detailedDesc&&((s=n.detailedDesc[0])===null||s===void 0?void 0:s.examples)||[]}_extractDescription(n){return Array.isArray(n.desc)?n.desc.join(this._formatter.lineBreak):n.desc||""}_createExampleSection(n){return this._formatter.paragraph(this._formatter.bold(tt.Example),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createSyntaxSection(n){return this._formatter.paragraph(this._formatter.bold(tt.Syntax),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createReturnSection(n){return this._formatter.paragraph(this._formatter.bold(tt.Returns),this._formatter.lineBreak,n.join(this._formatter.lineBreak))}_createDescriptionSection(n){return!n||n.trim().length===0?"":this._formatter.paragraph(this._formatter.bold(tt.Description),this._formatter.lineBreak,n)}}const St=new Cd;class zd{constructor(){Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_imports",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_overloadsFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._userFunctions=new Map,this._userVariables=new Map,this._userTypes=new Map,this._userMethods=new Map,this._imports=new Map,this._userEnums=new Map,this._overloadsFuncs=[]}get overloadsFuncs(){return this._overloadsFuncs}setUserDefined(n,s){const{functions:o,variables:c,types:l,methods:m,imports:_,enums:f}=n;o&&(this._userFunctions=o),c&&(this._userVariables=c),l&&(this._userTypes=l),m&&(this._userMethods=m),_&&(this._imports=_),f&&(this._userEnums=f),this._overloadsFuncs=s}parseLineContentFuncVar(n,s,o,c){let l=(o==null?void 0:o.getLineContent(s))||"";const m=l.indexOf("//");if(this._removeString(l).indexOf("//")!==-1&&m<=n)return;l=l+" ";const _=this._getVariablesDocVal(l,n,s);if(_){if(_.isBuildIn){const h=o==null?void 0:o.getWordAtPosition(c||new Ie.Position(s,n));if(((o==null?void 0:o.getValueInRange({startLineNumber:s,startColumn:(h==null?void 0:h.endColumn)||0,endLineNumber:s,endColumn:((h==null?void 0:h.endColumn)||0)+2}))||"").trim().startsWith("="))return null}return _}const f=this._getFuncsDocVal(l,n,s);if(f)return f;const b=l.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*<)/g);if(b){const h=this._matchContent(b,l,n);if(h){const T=this._getBuildInOther(h.name);if(T)return{docValue:T,isBuildIn:!0,index:0};{const O=this._getBuildInFunc(`${h.name}<type>`);if(O)return{docValue:O,isBuildIn:!0,index:0}}}}return this._getImportDocVal(l,n,s)}_getImportDocVal(n,s,o){const c=new RegExp("(?<=(import(\\s+)))([a-zA-Z\\d\\$_\\-\\.\\u00a1-\\uffff\\/]+)","g"),l=new RegExp("(?<=(as\\b)(\\s+))([a-zA-Z\\d\\_\\u00a1\\uffff\\/]+)","g"),m=n.match(c);if(m){const _=this._matchContent(m,n,s);if(_){const b=this._imports.get(_.name);if(b)return b}const f=n.match(l);if(f){const b=this._matchContent(f,n,s);if(b){for(const[h,T]of this._imports)if(T.name===b.name)return T}}}return null}_getBuildInFunc(n){return ct.functions.get(n)}_getBuildInMethod(n){return ct.methods.get(n)}_getBuildInOther(n){const{keywords:s,variables:o,constants:c,types:l}=ct;return s.get(n)||o.get(n)||c.get(n)||l.get(n)}parseCurrentInputFunc(n,s=!1,o=!1){let c=n.length-1,l=0,m=s,_=o;for(;c>=0;){const f=n.charAt(c);if(c-=1,/['"]/.test(f)){const b=f;if(f==="'"){if(m){m=!1;continue}}else if(_){_=!1;continue}for(;c>=0;){const h=n.charAt(c);if(c-=1,h===b)break}}if(!(m||_)&&(/\)/.test(f)&&(l+=1),/\(/.test(f))){if(l>0){l-=1;continue}let b="";for(;c>=0;){const h=n.charAt(c);if(!(/\s/.test(h)&&!b)){if(/[^\w.]/.test(h))break;c-=1,b=h+b}}if(b)return{funcName:b,startIndex:c+1}}}}parseCurrentInputFuncAndArg(n,s=!1,o=!1){const{funcName:c,startIndex:l}=this.parseCurrentInputFunc(n,s,o)||{};if(c&&typeof l=="number"){let m=n.slice(l+c.length).trim().slice(1),_=-1;if(s&&(_=m.lastIndexOf("'")),o){const h=m.lastIndexOf('"');(h!==-1&&h<_||_===-1)&&(_=h)}_!==-1&&(m=m.substring(0,_));const b=m.replace(/[\w.]+\(.*\)/g,"").split(",").map(h=>{const T=h.trim().split("=");return T.length<=1?"":T[0].trim()});return{startIndex:l,funcName:c,args:b}}}_removeString(n){return n.replace(/\\"|\\'/g,"").replace(/"[^"]*"|'[^']*'/g,"")}_getVariablesDocVal(n,s,o){const c=this._removeString(n).replace(/\/\/.*/g,"").match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*[^(a-zA-Z_0-9."'<])/g);if(c){const l=this._matchContent(c,n,s);if(l){const m={docValue:void 0,isBuildIn:!0,index:0},_=this._getBuildInOther(l.name);if(_)return m.docValue=_,m;const f=this._getUserVariablesDocVal(l.name,s,o);if(f)return Object.assign(m,{docValue:[f],isBuildIn:!1});const b=this._getUserTypesDocVal(l.name);if(b)return Object.assign(m,{docValue:b,isBuildIn:!1});const h=this._getTypesAndFileds(n,l.name,s,o);if(h&&typeof h!="string")return Object.assign(m,{docValue:[h],isBuildIn:!1});const T=this._getUserEnumsDocVal(l,s);if(T)return Object.assign(m,{docValue:T,isBuildIn:!1})}}}_getUserVariablesDocVal(n,s,o){const m=[...this._userVariables.get(n)||[]].sort((_,f)=>(f.scope||0)-(_.scope||0)).find(_=>{const f=_.range;return((f==null?void 0:f.startColumn)||0)<=s&&((f==null?void 0:f.startLineNumber)||0)<=o&&((f==null?void 0:f.endLineNumber)||0)>=o});if(m)return m.title=ge.userDefinedVariable,m.type=this._arrayTypeTransform(m.type),m}_getUserTypesDocVal(n){const s=this._userTypes.get(n);if(s)return s[0].title=ge.userDefinedType,s}_getUserEnumsDocVal(n,s){var f;const{endIndex:o,name:c}=n,l=c.split(".");let m=l[0];l.length>2&&(m=l.slice(0,2).join("."));const _=this._userEnums.get(m);if(_&&_.length){_[0].title=ge.enum;const b=l[l.length-1],h=(f=_[0].members)==null?void 0:f.find(T=>T.name===b);if(!h||s<o-b.length)return _;if(s>o-b.length)return[h]}}_getTypesAndFileds(n,s,o,c){var l,m;if(s.includes(".")){const _=s.split(".");let f=_[0],b,h=null,T=n.indexOf(s,o-s.length)+1,O=T+f.length-1;for(const K of _.slice(1)){if(!h){const F=T<=o&&O>=o,E=this._getUserVariablesDocVal(f,o,c);if(F&&E)return E;h=E==null?void 0:E.type}if(h){b=h,T=O+2,O=O+K.length+1;const F=this._userTypes.get(h)||ct.types.get(h),E=(m=(l=F==null?void 0:F[0])==null?void 0:l.fields)==null?void 0:m.find(H=>H.name===K);if(E&&T<=o&&O>=o)return{name:`${h}.${K}`,desc:E.desc,type:this._arrayTypeTransform(E.type),title:ge.field};h=E==null?void 0:E.type}else f=`${f}.${K}`,O=O+K.length+1}return b}}_getFuncsDocVal(n,s,o){const c=n.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*\()/g);if(c){const l=this._matchContent(c,n,s);if(l){const m={docValue:void 0,isBuildIn:!0,endIndex:l.endIndex,index:0},_=this._getBuildInFunc(l.name);if(_)return m.index=this._getOverloadsFuncIndex(_,s,l.name,o),Object.assign(m,{docValue:_});const f=this._getUserFuncsDocVal(l.name);if(f)return m.index=this._getOverloadsFuncIndex(f,s,l.name,o),Object.assign(m,{docValue:f,isBuildIn:!1});const b=this._getUserVarFuncsDocVal(n,l.name,s,o);if(b)return Object.assign(m,{docValue:[b],isBuildIn:!1})}}}_getOverloadsFuncIndex(n,s,o,c){if(n.length>1){const l=this._overloadsFuncs.find(m=>m.name===o&&m.line===c&&m.startColumn<=s&&m.endColumn>=s);if(l)return l.index}return 0}_getUserFuncsDocVal(n){const s=this._userFunctions.get(n);if(s){for(const o of s)o.title=ge.userDefinedFunction;return s}}_getUserMethodsDocVal(n){const s=this._userMethods.get(n);if(s){for(const o of s)o.title=ge.userDefinedFunction;return s}}_getUserVarFuncsDocVal(n,s,o,c){var l;if(s.includes(".")){const m=s.split("."),_=this._getTypesAndFileds(n,s,o,c);if(typeof _=="string"){const b=`${this._arrayTypeTransform(_).replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2")}.${m.pop()}`,h=this._getBuildInMethod(b);if(h){const T=this._getOverloadsFuncIndex(h,o,b,c);return{...h[0],name:b,index:T}}return(l=this._getUserMethodsDocVal(b))==null?void 0:l[0]}else return _}}_arrayTypeTransform(n=""){return n.includes("[]")?`array<${n.replace("[]","")}>`:n}_matchContent(n,s,o){let c=0;for(const l of n){c=o-l.length;const m=s.indexOf(l,c);if(c=m+l.length,this._judgeVal(s,m,c)&&m+1<=o&&c>=o)return{name:l,endIndex:c}}}_judgeVal(n,s,o){const c=n.charAt(s-1),l=/[\w\d."'/]/;if(l.test(c))return!1;const m=n.charAt(o);return!l.test(m)}}const gr=new zd;var Ws={exports:{}};/**
|
111
|
+
\`\`\``}code(n){return`\`${n}\``}paragraph(...n){return[this.paragraphBreak,...n,this.paragraphBreak].join(this.lineBreak)}link(n,s){return`[${n}](${s.href})`}}const ie=new Td;function Dd(a){const{name:n,libraryName:s,desc:o}=a,c=[`${ie.bold(n||s)} (library)`];return c.push(ie.delimiter),o&&c.push(ie.paragraph(ie.bold(tt.Description),ie.lineBreak,o)),c.join(c.length===2?" ":ie.lineBreak)}function kd(a,n=0,s=!0){const o=a[n];if(!o)return"";if(o.isEnumMember)return`${ie.bold(o.name)} (enum member)${o.value===void 0?"":` = ${o.value}`}`;const c=/(Mac|iPhone|iPod|iPad)/i.test(window.navigator.userAgent),{name:l,title:m,desc:_,type:f,syntax:b,returns:h,remarks:T,fields:O,members:K}=o,F=[`${ie.bold(l)} (${m})`];if(a.length>1&&F.push(ie.italic(`+${a.length-1} overloads`)),F.push(ie.delimiter),_&&F.push(ie.paragraph(Array.isArray(_)?_.join(ie.lineBreak):_||"")),f&&F.push(ie.paragraph(ie.bold(tt.Type),ie.italic(f))),b&&b.length&&F.push(ie.paragraph(ie.bold(tt.Syntax),ie.pineCode(b.join(ie.lineBreak)))),h&&F.push(ie.paragraph(ie.bold(tt.Returns),ie.lineBreak,h.join(ie.lineBreak))),T&&T.length&&a.length<=1){let N="";typeof T=="string"?N=T:N=T.join(ie.lineBreak)||"",N.length<200&&F.push(ie.paragraph(ie.bold(tt.Remarks),ie.lineBreak,N))}if(O){const N=[];for(const H of O){const V=H.desc?` - ${H.desc}`:"";N.push(`${H.name} (${H.type})${V}`)}F.push(ie.paragraph(ie.bold(tt.Fields),ie.lineBreak,N.join(ie.paragraphBreak)))}if(K){const N=[];for(const H of K){const V=H.desc?` - ${H.desc}`:"";N.push(`${H.name}${H.value?` (${H.value})`:""}${V}`)}F.push(ie.paragraph(ie.bold(tt.EnumMembers),ie.lineBreak,N.join(ie.paragraphBreak)))}return s&&F.push(ie.italic(`${ie.code(c?"⌘":"Ctrl")} + ${xd.clickOnKeywordForMoreHelp}`)),F.join(F.length===2?" ":ie.lineBreak)}const nn="tcc_cursor_position",Id=["submenuitem.EditorContextPeek","editor.action.peekDefinition"];function Ad(a){return a.replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2").replace(/\w[\w.\d]*\[\]/,"array")}function qd(a){const n=a.getContribution("editor.contrib.contextmenu"),s=n==null?void 0:n._getMenuActions;n._getMenuActions=function(){return s.apply(n,arguments).filter(function(c){return!Id.includes(c.id)})}}class Cd{constructor(){Object.defineProperty(this,"bracketsPostfix",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_builtinSubtreeCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_namespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_suggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_outermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userSuggestions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFuncArgsCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userOutermostNsItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodNamespaceCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_methodFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nextIsBracket",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.bracketsPostfix="(${0})",this._builtinSubtreeCache={},this._formatter=ie,this._namespaceCache=new Map,this._suggestions=[],this._outermostNsItems=new Map,this._funcArgsCache=new Map,this._userSuggestions=[],this._userFuncArgsCache=new Map,this._userNamespaceCache=new Map,this._userOutermostNsItems=new Map,this._methodNamespaceCache=new Map,this._userMethods=new Map,this._userTypes=new Map,this._methodFuncs=new Map,this._userFunctions=new Map,this._userEnums=new Map,this._nextIsBracket=!1}get methodFuncs(){return this._methodFuncs}get userFuncs(){return this._userFunctions}get userEnums(){return this._userEnums}set nextIsBracket(n){this._nextIsBracket=n}get nextIsBracket(){return this._nextIsBracket}get annotationSuggestions(){return this._getAnnotationCompletionItems(this._builtinSubtreeCache.annotations)}initBuiltinsTrees(){this._getBuiltinsCacheFragment(),this._suggestions=this._getAllCompletionItems(),this._getFuncArgumentsCompletionItemsToCache(this._builtinSubtreeCache.functions)}getArgSuggestions(n){return this._funcArgsCache.get(n)||this._userFuncArgsCache.get(n)}getSuggestions(n){return n?this._namespaceCache.get(n)||this._userNamespaceCache.get(n):this._suggestions.concat(this._userSuggestions)}_initUserDefind(){this._userFuncArgsCache.clear(),this._userNamespaceCache.clear(),this._userOutermostNsItems.clear(),this._methodNamespaceCache.clear(),this._methodFuncs.clear()}setUserDefind(n,s,o,c,l){this._initUserDefind();const m=this._mergeTreeSlices(this._generateTreeSlice(ct.methods,"method"),this._generateTreeSlice(c,"method"));this._getMethodNamespaceCache(m),this._userMethods=c,this._userTypes=s,this._userFunctions=n,this._userEnums=l;const _=this._generateTreeSlice(n,"fun");this._userSuggestions=this._getAllUserCompletionItems(_,this._generateTreeSlice(s,"type"),this._generateTreeSlice(o,"var"),this._generateTreeSlice(l,"enum")),this._getUserFuncArgumentsCompletionItemsToCache(_)}_getAllUserCompletionItems(n,s,o,c){const l=this._getEnumCompletionItems(c),m=this._getUserVariableCompletionItems(o),_=this._getTypeCompletionItems(s,!0),f=this._getFunctionCompletionItems(n,void 0,!0);return[..._,...f,...m,...l,...this._userOutermostNsItems.values()]}_getAllCompletionItems(){const{variables:n,keywords:s,types:o,functions:c}=this._builtinSubtreeCache,l=this._getVariableCompletionItems(n),m=this._getKeywordCompletionItems(s),_=this._getTypeCompletionItems(o),f=this._getFunctionCompletionItems(c),b=this._getSnippetsCompletionsList();return[...l,...m,..._,...f,...this._outermostNsItems.values(),...b]}_getNodeKey(n,s){return`${s}_${n}`}_mergeTreeSlices(...n){const s=new Map;for(const o of n)for(const[c,l]of o){const m=s.get(c);m?s.set(c,{...m,children:this._mergeTreeSlices(l.children,m.children)}):s.set(c,l)}return s}_mergeCompletions(n,s){const o=this._namespaceCache.get(n);o?this._namespaceCache.set(n,[...o,...s]):this._namespaceCache.set(n,s)}_mergeUserCompletions(n,s){const o=this._userNamespaceCache.get(n);o?this._userNamespaceCache.set(n,[...o,...s]):this._userNamespaceCache.set(n,s)}_generateTreeSlice(n,s){const o=new Map;for(const[c,l]of n){const[m,..._]=c.split("."),f=_.length>0,b=o.get(this._getNodeKey(m,f?"ns":s));let h=new Map,T=l.map(K=>({...K,name:c})),O=this._getNodeKey(c,s);if(f&&s!=="type"){const K=new Map([[_.join("."),l]]);T=[{name:m,title:ge.namespace}],O=this._getNodeKey(m,"ns"),h=this._generateTreeSlice(K,s)}b&&(T=[{name:m,title:ge.namespace}],h=this._mergeTreeSlices(b.children,h)),o.set(O,{value:T,children:h})}return o}_getBuiltinsCacheFragment(){const{keywords:n,variables:s,constants:o,types:c,functions:l,annotations:m}=ct,_=this._generateTreeSlice(m,"an");return _.delete("an_@version="),this._builtinSubtreeCache={keywords:this._generateTreeSlice(n,"key"),variables:this._mergeTreeSlices(this._generateTreeSlice(s,"var"),this._generateTreeSlice(o,"var")),types:this._generateTreeSlice(c,"type"),functions:this._generateTreeSlice(l,"fun"),annotations:_},this._builtinSubtreeCache}_getVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:_,children:f}=m;if(l.startsWith("ns")){const b=this._getNamespaceCompletionItem(_[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getVariableCompletionItems(f,b.label);s||this._outermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(_[0],s?3:2);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeCompletions(s,c),o}_setUserVariableSubItems(n,s){var b,h,T,O;let o=[];const c=Ad(n.type||""),l=this._methodNamespaceCache.get(c),m=s?`${s}.${n.name}`:n.name;l&&(o=l.filter(K=>{var V;const F=`${c}.${K.label}`,N=ct.methods.get(F)||this._userMethods.get(F),H=N==null?void 0:N.some(G=>!G.thisType||G.thisType[0].includes("<>")||G.thisType.includes(n.type||""));if(H&&N){const G=this._getNamedArgumentsCompletionList(((V=N[0])==null?void 0:V.args)||[]),B=`${m}.${K.label}`;this._userFuncArgsCache.set(B,G),this._methodFuncs.set(B,N)}return H}));const{types:_}=ct,f=((h=(b=this._userTypes.get(c))==null?void 0:b[0])==null?void 0:h.fields)||((O=(T=_.get(c))==null?void 0:T[0])==null?void 0:O.fields);if(f)for(const K of f){const F=K.name,N=K.type,H=this._getInstanceTypeCompletionItemProp({name:F,type:N,desc:K.desc?[K.desc]:void 0});this._setUserVariableSubItems({name:F,type:N},n.name),o.push({...H})}o.length&&this._mergeUserCompletions(m,o)}_getUserVariableCompletionItems(n,s){const o=[],c=[];for(const[l,m]of n){const{value:_,children:f}=m;if(this._setUserVariableSubItems(_[0]),l.startsWith("ns")){const b=this._getNamespaceCompletionItem(_[0]);if(s){c.push({...b});const T=`${s}.${b.label}`;b.label=T,b.insertText=T}const h=this._getUserVariableCompletionItems(f,b.label);s||this._userOutermostNsItems.set(l,b),o.push(...h)}else{const b=this._getVariableCompletionItem(_[0],s?2:1,!1);if(s){c.push({...b});const{label:h}=b;b.label=`${s}.${h}`,b.insertText=`${s}.${b.insertText}`,b.filterText=`${h}\r`}o.push(b)}}return c.length&&s&&this._mergeUserCompletions(s,c),o}_getTypeCompletionItems(n,s=!1){const o=[];for(const[,c]of n){const{value:l}=c,m=s?this._getCustomTypeCompletionItem(l[0]):this._getTypeCompletionItem(l[0]);o.push(m)}return o}_getEnumCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getEnumCompletionItem(c[0]);s.push(l);const m=c[0].members;m!=null&&m.length&&this._getEnumMemberCompletionItems(c[0].name,m)}return s}_getEnumMemberCompletionItems(n,s){const o=[];for(const c of s){const{name:l,desc:m,value:_}=c,f=this._getEnumMemberCompletionItem({name:l,desc:m?[m]:void 0,value:_});o.push(f)}o.length&&this._mergeUserCompletions(n,o)}_getAnnotationCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getAnnotationCompletionItem(c[0]);s.push(l)}return s}_getKeywordCompletionItems(n){const s=[];for(const[,o]of n){const{value:c}=o,l=this._getKeywordCompletionItem(c[0]);s.push(l)}return s}_getMethodNamespaceCache(n,s){const o=[];for(const[c,l]of n){const{value:m,children:_}=l;if(c.startsWith("ns")){const f=this._getNamespaceCompletionItem(m[0]);if(s){o.push({...f});const b=`${s}.${f.label}`;f.label=b,f.insertText=b}this._getMethodNamespaceCache(_,f.label)}else{const f=this._getFunctionCompletionItem(m[0],s?3:2);if(m.length>1&&(f.detail=`${f.detail} (+${m.length-1} overloads)`),s){o.push({...f});const{label:b}=f;f.label=`${s}.${b}`,f.insertText=`${s}.${f.insertText}`,f.originInsertText=`${s}.${f.originInsertText}`,f.filterText=`${b}\r`}}}s&&this._methodNamespaceCache.set(s,o)}_getFunctionCompletionItems(n,s,o=!1){const c=[],l=[];for(const[m,_]of n){const{value:f,children:b}=_;if(m.startsWith("ns")){const h=this._getNamespaceCompletionItem(f[0]);if(s){l.push({...h});const O=`${s}.${h.label}`;h.label=O,h.insertText=O}const T=this._getFunctionCompletionItems(b,h.label,o);s||(o?this._userOutermostNsItems.set(m,h):this._outermostNsItems.set(m,h)),c.push(...T)}else{const h=this._getFunctionCompletionItem(f[0],s?3:2,!o);if(f.length>1&&(h.detail=`${h.detail} (+${f.length-1} overloads)`),s){l.push({...h});const{label:T}=h;h.label=`${s}.${T}`,h.insertText=`${s}.${h.insertText}`,h.originInsertText=`${s}.${h.originInsertText}`,h.filterText=`${T}\r`}c.push(h)}}return l.length&&s&&(o?this._mergeUserCompletions(s,l):this._mergeCompletions(s,l)),c}_getSnippetsCompletionsList(){return bd.map(n=>{const{label:s,kind:o,insertText:c}=n,l=s.charAt(0).toUpperCase()+s.substring(1),m={value:this._formatter.pineCode(c.replace(/\${\d:([^}]+)}|\${\d}/g,"$1"))};return{label:s,detail:`(${l} ${o})`,insertText:c,insertTextRules:Ie.languages.CompletionItemInsertTextRule.InsertAsSnippet,sortText:`2_${s}`,kind:Ie.languages.CompletionItemKind.Snippet,documentation:m}})}_getFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(O=>{b.set(O.name,O)}),b},m);const _=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._funcArgsCache.set(f,_)}}}_getUserFuncArgumentsCompletionItemsToCache(n,s){for(const[o,c]of n){const{name:l}=c.value[0];if(o.startsWith("ns"))this._getUserFuncArgumentsCompletionItemsToCache(c.children,s?`${s}.${l}`:l);else{const m=new Map;c.value.reduce((b,h)=>{const T=h.args;return T&&T.length&&T.forEach(O=>{b.set(O.name,O)}),b},m);const _=this._getNamedArgumentsCompletionList([...m.values()]),f=s?`${s}.${l}`:l;this._userFuncArgsCache.set(f,_)}}}_getNamedArgumentsCompletionList(n){return n.map(s=>{const{name:o,desc:c,displayType:l}=s,m=`${o} = `,_=Array.isArray(c)?c.join(this._formatter.delimiter):c||"";return{label:m,documentation:{value:this._formatter.paragraph(this._formatter.bold(ge.Description),this._formatter.lineBreak,_)},insertText:m,detail:`(${ge.parameter}) ${ge.types} ${l}`,kind:Ie.languages.CompletionItemKind.Text,sortText:`0_${m}`}})}_getVariableCompletionItem(n,s=2,o=!0){const c=this._extractExamples(n),l=this._extractDescription(n),m=[this._createDescriptionSection(l)];c.length?m.push(this._createExampleSection(c)):n.syntax&&n.syntax.length&&m.push(this._createSyntaxSection(n.syntax));const _={value:m.join(this._formatter.lineBreak)},f=o?ge.variables:ge.userDefinedVariable;return{documentation:_,label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Variable,sortText:`${s}_${n.name}`,detail:`(${f}) ${n.type}`}}_getKeywordCompletionItem(n,s=2){const o=this._extractExamples(n),c=this._extractDescription(n),l=[this._createDescriptionSection(c)];return o.length?l.push(this._createExampleSection(o)):n.syntax&&n.syntax.length&&l.push(this._createSyntaxSection(n.syntax)),{documentation:{value:l.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Keyword,sortText:`${s}_${n.name}`,detail:`(${ge.keywords})`}}_getTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Keyword,sortText:`1_${n.name}`,detail:`(${ge.types})`}}_getCustomTypeCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Keyword,sortText:`2_${n.name}`,detail:`(${ge.userDefinedType})`}}_getEnumCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Enum,sortText:`2_${n.name}`,detail:`(${ge.enum})`}}_getEnumMemberCompletionItem(n){const s=this._extractDescription(n);return{documentation:{value:this._createDescriptionSection(s)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.EnumMember,sortText:`2_${n.name}`,detail:`(enum member) ${n.value?`${n.name} = ${n.value}`:`${n.name}`}`}}_getInstanceTypeCompletionItemProp(n){const s=this._extractDescription(n),o=[];return s&&o.push(this._formatter.paragraph(this._formatter.bold(tt.Description),this._formatter.lineBreak,s)),{documentation:{value:o.join(this._formatter.lineBreak)},label:n.name,insertText:n.name,kind:Ie.languages.CompletionItemKind.Field,sortText:`2_${n.name}`,detail:`(${ge.field}) ${n.type}`}}_getFunctionCompletionItem(n,s=2,o=!0){var K;const c=n.returnedTypes&&n.returnedTypes[0]||n.syntax&&n.syntax[0]&&((K=n.syntax[0].split("→").pop())==null?void 0:K.trim()),l=this._extractExamples(n),m=this._extractDescription(n),_=[this._createDescriptionSection(m)];l.length?_.push(this._createExampleSection(l)):n.syntax&&n.syntax.length&&_.push(this._createSyntaxSection(n.syntax)),n.returns&&n.returns.length&&_.push(this._createReturnSection(n.returns));const f={value:_.join(this._formatter.lineBreak)},b=n.name,h=o?ge.functions:ge.userDefinedFunction,T=n.template,O=T?`${vd(b)}<\${1}>`:b;return{documentation:f,label:T?`${b.replace(/<.+>/,"")}<type>`:b,kind:Ie.languages.CompletionItemKind.Function,sortText:`${s}_${b}`,insertTextRules:Ie.languages.CompletionItemInsertTextRule.InsertAsSnippet,insertText:O+this.bracketsPostfix,originInsertText:O,detail:`(${h}) ${ge.returns} ${c}`,command:{id:"tcc.editor.function",title:"",arguments:[T?"editor.action.triggerSuggest":"editor.action.triggerParameterHints"]}}}_getAnnotationCompletionItem(n){const s=this._extractDescription(n),o=this._extractExamples(n),c=[this._createDescriptionSection(s)];return o.length&&c.push(this._createExampleSection(o)),{documentation:{value:c.join(this._formatter.lineBreak)},label:n.name,insertText:n.name.replace("@",""),kind:Ie.languages.CompletionItemKind.Keyword,detail:`(${ge.annotations})`}}_getNamespaceCompletionItem(n,s=2){const o=[this._createDescriptionSection(ge.namespaceDesc)];return{label:n.name,documentation:{value:o.join(this._formatter.lineBreak)},detail:`(${ge.namespace}) ${n.name}`,insertText:n.name,sortText:`${s}_${n.name}`,kind:Ie.languages.CompletionItemKind.Module}}_extractExamples(n){let s;return n.examples||n.detailedDesc&&((s=n.detailedDesc[0])===null||s===void 0?void 0:s.examples)||[]}_extractDescription(n){return Array.isArray(n.desc)?n.desc.join(this._formatter.lineBreak):n.desc||""}_createExampleSection(n){return this._formatter.paragraph(this._formatter.bold(tt.Example),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createSyntaxSection(n){return this._formatter.paragraph(this._formatter.bold(tt.Syntax),this._formatter.pineCode(n.join(this._formatter.lineBreak)))}_createReturnSection(n){return this._formatter.paragraph(this._formatter.bold(tt.Returns),this._formatter.lineBreak,n.join(this._formatter.lineBreak))}_createDescriptionSection(n){return!n||n.trim().length===0?"":this._formatter.paragraph(this._formatter.bold(tt.Description),this._formatter.lineBreak,n)}}const St=new Cd;class zd{constructor(){Object.defineProperty(this,"_userFunctions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userMethods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userEnums",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_imports",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_overloadsFuncs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._userFunctions=new Map,this._userVariables=new Map,this._userTypes=new Map,this._userMethods=new Map,this._imports=new Map,this._userEnums=new Map,this._overloadsFuncs=[]}get overloadsFuncs(){return this._overloadsFuncs}setUserDefined(n,s){const{functions:o,variables:c,types:l,methods:m,imports:_,enums:f}=n;o&&(this._userFunctions=o),c&&(this._userVariables=c),l&&(this._userTypes=l),m&&(this._userMethods=m),_&&(this._imports=_),f&&(this._userEnums=f),this._overloadsFuncs=s}parseLineContentFuncVar(n,s,o,c){let l=(o==null?void 0:o.getLineContent(s))||"";const m=l.indexOf("//");if(this._removeString(l).indexOf("//")!==-1&&m<=n)return;l=l+" ";const _=this._getVariablesDocVal(l,n,s);if(_){if(_.isBuildIn){const h=o==null?void 0:o.getWordAtPosition(c||new Ie.Position(s,n));if(((o==null?void 0:o.getValueInRange({startLineNumber:s,startColumn:(h==null?void 0:h.endColumn)||0,endLineNumber:s,endColumn:((h==null?void 0:h.endColumn)||0)+2}))||"").trim().startsWith("="))return null}return _}const f=this._getFuncsDocVal(l,n,s);if(f)return f;const b=l.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*<)/g);if(b){const h=this._matchContent(b,l,n);if(h){const T=this._getBuildInOther(h.name);if(T)return{docValue:T,isBuildIn:!0,index:0};{const O=this._getBuildInFunc(`${h.name}<type>`);if(O)return{docValue:O,isBuildIn:!0,index:0}}}}return this._getImportDocVal(l,n,s)}_getImportDocVal(n,s,o){const c=new RegExp("(?<=(import(\\s+)))([a-zA-Z\\d\\$_\\-\\.\\u00a1-\\uffff\\/]+)","g"),l=new RegExp("(?<=(as\\b)(\\s+))([a-zA-Z\\d\\_\\u00a1\\uffff\\/]+)","g"),m=n.match(c);if(m){const _=this._matchContent(m,n,s);if(_){const b=this._imports.get(_.name);if(b)return b}const f=n.match(l);if(f){const b=this._matchContent(f,n,s);if(b){for(const[h,T]of this._imports)if(T.name===b.name)return T}}}return null}_getBuildInFunc(n){return ct.functions.get(n)}_getBuildInMethod(n){return ct.methods.get(n)}_getBuildInOther(n){const{keywords:s,variables:o,constants:c,types:l}=ct;return s.get(n)||o.get(n)||c.get(n)||l.get(n)}parseCurrentInputFunc(n,s=!1,o=!1){let c=n.length-1,l=0,m=s,_=o;for(;c>=0;){const f=n.charAt(c);if(c-=1,/['"]/.test(f)){const b=f;if(f==="'"){if(m){m=!1;continue}}else if(_){_=!1;continue}for(;c>=0;){const h=n.charAt(c);if(c-=1,h===b)break}}if(!(m||_)&&(/\)/.test(f)&&(l+=1),/\(/.test(f))){if(l>0){l-=1;continue}let b="";for(;c>=0;){const h=n.charAt(c);if(!(/\s/.test(h)&&!b)){if(/[^\w.]/.test(h))break;c-=1,b=h+b}}if(b)return{funcName:b,startIndex:c+1}}}}parseCurrentInputFuncAndArg(n,s=!1,o=!1){const{funcName:c,startIndex:l}=this.parseCurrentInputFunc(n,s,o)||{};if(c&&typeof l=="number"){let m=n.slice(l+c.length).trim().slice(1),_=-1;if(s&&(_=m.lastIndexOf("'")),o){const h=m.lastIndexOf('"');(h!==-1&&h<_||_===-1)&&(_=h)}_!==-1&&(m=m.substring(0,_));const b=m.replace(/[\w.]+\(.*\)/g,"").split(",").map(h=>{const T=h.trim().split("=");return T.length<=1?"":T[0].trim()});return{startIndex:l,funcName:c,args:b}}}_removeString(n){return n.replace(/\\"|\\'/g,"").replace(/"[^"]*"|'[^']*'/g,"")}_getVariablesDocVal(n,s,o){const c=this._removeString(n).replace(/\/\/.*/g,"").match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*[^(a-zA-Z_0-9."'<])/g);if(c){const l=this._matchContent(c,n,s);if(l){const m={docValue:void 0,isBuildIn:!0,index:0},_=this._getBuildInOther(l.name);if(_)return m.docValue=_,m;const f=this._getUserVariablesDocVal(l.name,s,o);if(f)return Object.assign(m,{docValue:[f],isBuildIn:!1});const b=this._getUserTypesDocVal(l.name);if(b)return Object.assign(m,{docValue:b,isBuildIn:!1});const h=this._getTypesAndFileds(n,l.name,s,o);if(h&&typeof h!="string")return Object.assign(m,{docValue:[h],isBuildIn:!1});const T=this._getUserEnumsDocVal(l,s);if(T)return Object.assign(m,{docValue:T,isBuildIn:!1})}}}_getUserVariablesDocVal(n,s,o){const m=[...this._userVariables.get(n)||[]].sort((_,f)=>(f.scope||0)-(_.scope||0)).find(_=>{const f=_.range;return((f==null?void 0:f.startColumn)||0)<=s&&((f==null?void 0:f.startLineNumber)||0)<=o&&((f==null?void 0:f.endLineNumber)||0)>=o});if(m)return m.title=ge.userDefinedVariable,m.type=this._arrayTypeTransform(m.type),m}_getUserTypesDocVal(n){const s=this._userTypes.get(n);if(s)return s[0].title=ge.userDefinedType,s}_getUserEnumsDocVal(n,s){var f;const{endIndex:o,name:c}=n,l=c.split(".");let m=l[0];l.length>2&&(m=l.slice(0,2).join("."));const _=this._userEnums.get(m);if(_&&_.length){_[0].title=ge.enum;const b=l[l.length-1],h=(f=_[0].members)==null?void 0:f.find(T=>T.name===b);if(!h||s<o-b.length)return _;if(s>o-b.length)return[h]}}_getTypesAndFileds(n,s,o,c){var l,m;if(s.includes(".")){const _=s.split(".");let f=_[0],b,h=null,T=n.indexOf(s,o-s.length)+1,O=T+f.length-1;for(const K of _.slice(1)){if(!h){const F=T<=o&&O>=o,N=this._getUserVariablesDocVal(f,o,c);if(F&&N)return N;h=N==null?void 0:N.type}if(h){b=h,T=O+2,O=O+K.length+1;const F=this._userTypes.get(h)||ct.types.get(h),N=(m=(l=F==null?void 0:F[0])==null?void 0:l.fields)==null?void 0:m.find(H=>H.name===K);if(N&&T<=o&&O>=o)return{name:`${h}.${K}`,desc:N.desc,type:this._arrayTypeTransform(N.type),title:ge.field};h=N==null?void 0:N.type}else f=`${f}.${K}`,O=O+K.length+1}return b}}_getFuncsDocVal(n,s,o){const c=n.match(/[a-zA-Z_][a-zA-Z_0-9]*(\s*\.\s*[a-zA-Z_][a-zA-Z_0-9]*)*(?=\s*\()/g);if(c){const l=this._matchContent(c,n,s);if(l){const m={docValue:void 0,isBuildIn:!0,endIndex:l.endIndex,index:0},_=this._getBuildInFunc(l.name);if(_)return m.index=this._getOverloadsFuncIndex(_,s,l.name,o),Object.assign(m,{docValue:_});const f=this._getUserFuncsDocVal(l.name);if(f)return m.index=this._getOverloadsFuncIndex(f,s,l.name,o),Object.assign(m,{docValue:f,isBuildIn:!1});const b=this._getUserVarFuncsDocVal(n,l.name,s,o);if(b)return Object.assign(m,{docValue:[b],isBuildIn:!1})}}}_getOverloadsFuncIndex(n,s,o,c){if(n.length>1){const l=this._overloadsFuncs.find(m=>m.name===o&&m.line===c&&m.startColumn<=s&&m.endColumn>=s);if(l)return l.index}return 0}_getUserFuncsDocVal(n){const s=this._userFunctions.get(n);if(s){for(const o of s)o.title=ge.userDefinedFunction;return s}}_getUserMethodsDocVal(n){const s=this._userMethods.get(n);if(s){for(const o of s)o.title=ge.userDefinedFunction;return s}}_getUserVarFuncsDocVal(n,s,o,c){var l;if(s.includes(".")){const m=s.split("."),_=this._getTypesAndFileds(n,s,o,c);if(typeof _=="string"){const b=`${this._arrayTypeTransform(_).replace(/<[^<>]+>/,"").replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2")}.${m.pop()}`,h=this._getBuildInMethod(b);if(h){const T=this._getOverloadsFuncIndex(h,o,b,c);return{...h[0],name:b,index:T}}return(l=this._getUserMethodsDocVal(b))==null?void 0:l[0]}else return _}}_arrayTypeTransform(n=""){return n.includes("[]")?`array<${n.replace("[]","")}>`:n}_matchContent(n,s,o){let c=0;for(const l of n){c=o-l.length;const m=s.indexOf(l,c);if(c=m+l.length,this._judgeVal(s,m,c)&&m+1<=o&&c>=o)return{name:l,endIndex:c}}}_judgeVal(n,s,o){const c=n.charAt(s-1),l=/[\w\d."'/]/;if(l.test(c))return!1;const m=n.charAt(o);return!l.test(m)}}const gr=new zd;var Ws={exports:{}};/**
|
112
112
|
* @license
|
113
113
|
* Lodash <https://lodash.com/>
|
114
114
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
115
115
|
* Released under MIT license <https://lodash.com/license>
|
116
116
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
117
117
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
118
|
-
*/Ws.exports,function(a,n){(function(){var s,o="4.17.21",c=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",_="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",b=500,h="__lodash_placeholder__",T=1,O=2,K=4,F=1,E=2,H=1,V=2,G=4,B=8,k=16,P=32,N=64,U=128,te=256,fe=512,le=30,ht="...",Nt=800,Ue=16,Ke=1,Y=2,be=3,Ne=1/0,Me=9007199254740991,pt=17976931348623157e292,wt=NaN,re=4294967295,xe=re-1,Re=re>>>1,Et=[["ary",U],["bind",H],["bindKey",V],["curry",B],["curryRight",k],["flip",fe],["partial",P],["partialRight",N],["rearg",te]],$e="[object Arguments]",je="[object Array]",ys="[object AsyncFunction]",Ut="[object Boolean]",Wt="[object Date]",Mr="[object DOMException]",Pr="[object Error]",hr="[object Function]",aa="[object GeneratorFunction]",dt="[object Map]",Kt="[object Number]",Or="[object Null]",vt="[object Object]",_s="[object Promise]",Rr="[object Proxy]",wr="[object RegExp]",mt="[object Set]",Gt="[object String]",Fr="[object Symbol]",Tn="[object Undefined]",ir="[object WeakMap]",na="[object WeakSet]",Lt="[object ArrayBuffer]",or="[object DataView]",Br="[object Float32Array]",Ur="[object Float64Array]",vr="[object Int8Array]",fs="[object Int16Array]",gs="[object Int32Array]",bs="[object Uint8Array]",xs="[object Uint8ClampedArray]",hs="[object Uint16Array]",ws="[object Uint32Array]",Dn=/\b__p \+= '';/g,vs=/\b(__p \+=) '' \+/g,ia=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Xt=/&(?:amp|lt|gt|quot|#39);/g,Kr=/[&<>"']/g,Ts=RegExp(Xt.source),oa=RegExp(Kr.source),kn=/<%-([\s\S]+?)%>/g,la=/<%([\s\S]+?)%>/g,ca=/<%=([\s\S]+?)%>/g,pa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,da=/^\w*$/,In=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ds=/[\\^$.*+?()[\]{}|]/g,ma=RegExp(Ds.source),ks=/^\s+/,An=/\s/,qn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Cn=/\{\n\/\* \[wrapped with (.+)\] \*/,g=/,? & /,M=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$=/[()=,{}\[\]\/\s]/,ee=/\\(\\)?/g,_e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,we=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,Ce=/^0o[0-7]+$/i,Ee=/^(?:0|[1-9]\d*)$/,rt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mt=/($^)/,ua=/['\n\r\u2028\u2029\\]/g,st="\\ud800-\\udfff",$m="\\u0300-\\u036f",jm="\\ufe20-\\ufe2f",Hm="\\u20d0-\\u20ff",Oo=$m+jm+Hm,Ro="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",Wm="\\xac\\xb1\\xd7\\xf7",Gm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Xm="\\u2000-\\u206f",Vm=" \\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",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",Uo="\\ufe0e\\ufe0f",Ko=Wm+Gm+Xm+Vm,zn="['’]",Ym="["+st+"]",$o="["+Ko+"]",ya="["+Oo+"]",jo="\\d+",Qm="["+Ro+"]",Ho="["+Fo+"]",Wo="[^"+st+Ko+jo+Ro+Fo+Bo+"]",Sn="\\ud83c[\\udffb-\\udfff]",Zm="(?:"+ya+"|"+Sn+")",Go="[^"+st+"]",Nn="(?:\\ud83c[\\udde6-\\uddff]){2}",En="[\\ud800-\\udbff][\\udc00-\\udfff]",$r="["+Bo+"]",Xo="\\u200d",Vo="(?:"+Ho+"|"+Wo+")",Jm="(?:"+$r+"|"+Wo+")",Yo="(?:"+zn+"(?:d|ll|m|re|s|t|ve))?",Qo="(?:"+zn+"(?:D|LL|M|RE|S|T|VE))?",Zo=Zm+"?",Jo="["+Uo+"]?",eu="(?:"+Xo+"(?:"+[Go,Nn,En].join("|")+")"+Jo+Zo+")*",tu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ru="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",el=Jo+Zo+eu,su="(?:"+[Qm,Nn,En].join("|")+")"+el,au="(?:"+[Go+ya+"?",ya,Nn,En,Ym].join("|")+")",nu=RegExp(zn,"g"),iu=RegExp(ya,"g"),Ln=RegExp(Sn+"(?="+Sn+")|"+au+el,"g"),ou=RegExp([$r+"?"+Ho+"+"+Yo+"(?="+[$o,$r,"$"].join("|")+")",Jm+"+"+Qo+"(?="+[$o,$r+Vo,"$"].join("|")+")",$r+"?"+Vo+"+"+Yo,$r+"+"+Qo,ru,tu,jo,su].join("|"),"g"),lu=RegExp("["+Xo+st+Oo+Uo+"]"),cu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],du=-1,Ae={};Ae[Br]=Ae[Ur]=Ae[vr]=Ae[fs]=Ae[gs]=Ae[bs]=Ae[xs]=Ae[hs]=Ae[ws]=!0,Ae[$e]=Ae[je]=Ae[Lt]=Ae[Ut]=Ae[or]=Ae[Wt]=Ae[Pr]=Ae[hr]=Ae[dt]=Ae[Kt]=Ae[vt]=Ae[wr]=Ae[mt]=Ae[Gt]=Ae[ir]=!1;var ke={};ke[$e]=ke[je]=ke[Lt]=ke[or]=ke[Ut]=ke[Wt]=ke[Br]=ke[Ur]=ke[vr]=ke[fs]=ke[gs]=ke[dt]=ke[Kt]=ke[vt]=ke[wr]=ke[mt]=ke[Gt]=ke[Fr]=ke[bs]=ke[xs]=ke[hs]=ke[ws]=!0,ke[Pr]=ke[hr]=ke[ir]=!1;var mu={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},uu={"&":"&","<":"<",">":">",'"':""","'":"'"},yu={"&":"&","<":"<",">":">",""":'"',"'":"'"},_u={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fu=parseFloat,gu=parseInt,tl=typeof ss=="object"&&ss&&ss.Object===Object&&ss,bu=typeof self=="object"&&self&&self.Object===Object&&self,Ge=tl||bu||Function("return this")(),Mn=n&&!n.nodeType&&n,Tr=Mn&&!0&&a&&!a.nodeType&&a,rl=Tr&&Tr.exports===Mn,Pn=rl&&tl.process,Tt=function(){try{var w=Tr&&Tr.require&&Tr.require("util").types;return w||Pn&&Pn.binding&&Pn.binding("util")}catch{}}(),sl=Tt&&Tt.isArrayBuffer,al=Tt&&Tt.isDate,nl=Tt&&Tt.isMap,il=Tt&&Tt.isRegExp,ol=Tt&&Tt.isSet,ll=Tt&&Tt.isTypedArray;function ut(w,q,D){switch(D.length){case 0:return w.call(q);case 1:return w.call(q,D[0]);case 2:return w.call(q,D[0],D[1]);case 3:return w.call(q,D[0],D[1],D[2])}return w.apply(q,D)}function xu(w,q,D,W){for(var se=-1,he=w==null?0:w.length;++se<he;){var Fe=w[se];q(W,Fe,D(Fe),w)}return W}function Dt(w,q){for(var D=-1,W=w==null?0:w.length;++D<W&&q(w[D],D,w)!==!1;);return w}function hu(w,q){for(var D=w==null?0:w.length;D--&&q(w[D],D,w)!==!1;);return w}function cl(w,q){for(var D=-1,W=w==null?0:w.length;++D<W;)if(!q(w[D],D,w))return!1;return!0}function lr(w,q){for(var D=-1,W=w==null?0:w.length,se=0,he=[];++D<W;){var Fe=w[D];q(Fe,D,w)&&(he[se++]=Fe)}return he}function _a(w,q){var D=w==null?0:w.length;return!!D&&jr(w,q,0)>-1}function On(w,q,D){for(var W=-1,se=w==null?0:w.length;++W<se;)if(D(q,w[W]))return!0;return!1}function qe(w,q){for(var D=-1,W=w==null?0:w.length,se=Array(W);++D<W;)se[D]=q(w[D],D,w);return se}function cr(w,q){for(var D=-1,W=q.length,se=w.length;++D<W;)w[se+D]=q[D];return w}function Rn(w,q,D,W){var se=-1,he=w==null?0:w.length;for(W&&he&&(D=w[++se]);++se<he;)D=q(D,w[se],se,w);return D}function wu(w,q,D,W){var se=w==null?0:w.length;for(W&&se&&(D=w[--se]);se--;)D=q(D,w[se],se,w);return D}function Fn(w,q){for(var D=-1,W=w==null?0:w.length;++D<W;)if(q(w[D],D,w))return!0;return!1}var vu=Bn("length");function Tu(w){return w.split("")}function Du(w){return w.match(M)||[]}function pl(w,q,D){var W;return D(w,function(se,he,Fe){if(q(se,he,Fe))return W=he,!1}),W}function fa(w,q,D,W){for(var se=w.length,he=D+(W?1:-1);W?he--:++he<se;)if(q(w[he],he,w))return he;return-1}function jr(w,q,D){return q===q?Pu(w,q,D):fa(w,dl,D)}function ku(w,q,D,W){for(var se=D-1,he=w.length;++se<he;)if(W(w[se],q))return se;return-1}function dl(w){return w!==w}function ml(w,q){var D=w==null?0:w.length;return D?Kn(w,q)/D:wt}function Bn(w){return function(q){return q==null?s:q[w]}}function Un(w){return function(q){return w==null?s:w[q]}}function ul(w,q,D,W,se){return se(w,function(he,Fe,De){D=W?(W=!1,he):q(D,he,Fe,De)}),D}function Iu(w,q){var D=w.length;for(w.sort(q);D--;)w[D]=w[D].value;return w}function Kn(w,q){for(var D,W=-1,se=w.length;++W<se;){var he=q(w[W]);he!==s&&(D=D===s?he:D+he)}return D}function $n(w,q){for(var D=-1,W=Array(w);++D<w;)W[D]=q(D);return W}function Au(w,q){return qe(q,function(D){return[D,w[D]]})}function yl(w){return w&&w.slice(0,bl(w)+1).replace(ks,"")}function yt(w){return function(q){return w(q)}}function jn(w,q){return qe(q,function(D){return w[D]})}function Is(w,q){return w.has(q)}function _l(w,q){for(var D=-1,W=w.length;++D<W&&jr(q,w[D],0)>-1;);return D}function fl(w,q){for(var D=w.length;D--&&jr(q,w[D],0)>-1;);return D}function qu(w,q){for(var D=w.length,W=0;D--;)w[D]===q&&++W;return W}var Cu=Un(mu),zu=Un(uu);function Su(w){return"\\"+_u[w]}function Nu(w,q){return w==null?s:w[q]}function Hr(w){return lu.test(w)}function Eu(w){return cu.test(w)}function Lu(w){for(var q,D=[];!(q=w.next()).done;)D.push(q.value);return D}function Hn(w){var q=-1,D=Array(w.size);return w.forEach(function(W,se){D[++q]=[se,W]}),D}function gl(w,q){return function(D){return w(q(D))}}function pr(w,q){for(var D=-1,W=w.length,se=0,he=[];++D<W;){var Fe=w[D];(Fe===q||Fe===h)&&(w[D]=h,he[se++]=D)}return he}function ga(w){var q=-1,D=Array(w.size);return w.forEach(function(W){D[++q]=W}),D}function Mu(w){var q=-1,D=Array(w.size);return w.forEach(function(W){D[++q]=[W,W]}),D}function Pu(w,q,D){for(var W=D-1,se=w.length;++W<se;)if(w[W]===q)return W;return-1}function Ou(w,q,D){for(var W=D+1;W--;)if(w[W]===q)return W;return W}function Wr(w){return Hr(w)?Fu(w):vu(w)}function Pt(w){return Hr(w)?Bu(w):Tu(w)}function bl(w){for(var q=w.length;q--&&An.test(w.charAt(q)););return q}var Ru=Un(yu);function Fu(w){for(var q=Ln.lastIndex=0;Ln.test(w);)++q;return q}function Bu(w){return w.match(Ln)||[]}function Uu(w){return w.match(ou)||[]}var Ku=function w(q){q=q==null?Ge:Gr.defaults(Ge.Object(),q,Gr.pick(Ge,pu));var D=q.Array,W=q.Date,se=q.Error,he=q.Function,Fe=q.Math,De=q.Object,Wn=q.RegExp,$u=q.String,kt=q.TypeError,ba=D.prototype,ju=he.prototype,Xr=De.prototype,xa=q["__core-js_shared__"],ha=ju.toString,Te=Xr.hasOwnProperty,Hu=0,xl=function(){var e=/[^.]+$/.exec(xa&&xa.keys&&xa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),wa=Xr.toString,Wu=ha.call(De),Gu=Ge._,Xu=Wn("^"+ha.call(Te).replace(Ds,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),va=rl?q.Buffer:s,dr=q.Symbol,Ta=q.Uint8Array,hl=va?va.allocUnsafe:s,Da=gl(De.getPrototypeOf,De),wl=De.create,vl=Xr.propertyIsEnumerable,ka=ba.splice,Tl=dr?dr.isConcatSpreadable:s,As=dr?dr.iterator:s,Dr=dr?dr.toStringTag:s,Ia=function(){try{var e=Cr(De,"defineProperty");return e({},"",{}),e}catch{}}(),Vu=q.clearTimeout!==Ge.clearTimeout&&q.clearTimeout,Yu=W&&W.now!==Ge.Date.now&&W.now,Qu=q.setTimeout!==Ge.setTimeout&&q.setTimeout,Aa=Fe.ceil,qa=Fe.floor,Gn=De.getOwnPropertySymbols,Zu=va?va.isBuffer:s,Dl=q.isFinite,Ju=ba.join,ey=gl(De.keys,De),Be=Fe.max,Ye=Fe.min,ty=W.now,ry=q.parseInt,kl=Fe.random,sy=ba.reverse,Xn=Cr(q,"DataView"),qs=Cr(q,"Map"),Vn=Cr(q,"Promise"),Vr=Cr(q,"Set"),Cs=Cr(q,"WeakMap"),zs=Cr(De,"create"),Ca=Cs&&new Cs,Yr={},ay=zr(Xn),ny=zr(qs),iy=zr(Vn),oy=zr(Vr),ly=zr(Cs),za=dr?dr.prototype:s,Ss=za?za.valueOf:s,Il=za?za.toString:s;function d(e){if(Le(e)&&!ae(e)&&!(e instanceof ue)){if(e instanceof It)return e;if(Te.call(e,"__wrapped__"))return Ac(e)}return new It(e)}var Qr=function(){function e(){}return function(t){if(!ze(t))return{};if(wl)return wl(t);e.prototype=t;var r=new e;return e.prototype=s,r}}();function Sa(){}function It(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=s}d.templateSettings={escape:kn,evaluate:la,interpolate:ca,variable:"",imports:{_:d}},d.prototype=Sa.prototype,d.prototype.constructor=d,It.prototype=Qr(Sa.prototype),It.prototype.constructor=It;function ue(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=re,this.__views__=[]}function cy(){var e=new ue(this.__wrapped__);return e.__actions__=at(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=at(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=at(this.__views__),e}function py(){if(this.__filtered__){var e=new ue(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function dy(){var e=this.__wrapped__.value(),t=this.__dir__,r=ae(e),i=t<0,p=r?e.length:0,u=T_(0,p,this.__views__),y=u.start,x=u.end,v=x-y,C=i?x:y-1,z=this.__iteratees__,S=z.length,j=0,X=Ye(v,this.__takeCount__);if(!r||!i&&p==v&&X==v)return Yl(e,this.__actions__);var Z=[];e:for(;v--&&j<X;){C+=t;for(var oe=-1,J=e[C];++oe<S;){var de=z[oe],ye=de.iteratee,gt=de.type,et=ye(J);if(gt==Y)J=et;else if(!et){if(gt==Ke)continue e;break e}}Z[j++]=J}return Z}ue.prototype=Qr(Sa.prototype),ue.prototype.constructor=ue;function kr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function my(){this.__data__=zs?zs(null):{},this.size=0}function uy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function yy(e){var t=this.__data__;if(zs){var r=t[e];return r===f?s:r}return Te.call(t,e)?t[e]:s}function _y(e){var t=this.__data__;return zs?t[e]!==s:Te.call(t,e)}function fy(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=zs&&t===s?f:t,this}kr.prototype.clear=my,kr.prototype.delete=uy,kr.prototype.get=yy,kr.prototype.has=_y,kr.prototype.set=fy;function Vt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function gy(){this.__data__=[],this.size=0}function by(e){var t=this.__data__,r=Na(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():ka.call(t,r,1),--this.size,!0}function xy(e){var t=this.__data__,r=Na(t,e);return r<0?s:t[r][1]}function hy(e){return Na(this.__data__,e)>-1}function wy(e,t){var r=this.__data__,i=Na(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}Vt.prototype.clear=gy,Vt.prototype.delete=by,Vt.prototype.get=xy,Vt.prototype.has=hy,Vt.prototype.set=wy;function Yt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function vy(){this.size=0,this.__data__={hash:new kr,map:new(qs||Vt),string:new kr}}function Ty(e){var t=ja(this,e).delete(e);return this.size-=t?1:0,t}function Dy(e){return ja(this,e).get(e)}function ky(e){return ja(this,e).has(e)}function Iy(e,t){var r=ja(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}Yt.prototype.clear=vy,Yt.prototype.delete=Ty,Yt.prototype.get=Dy,Yt.prototype.has=ky,Yt.prototype.set=Iy;function Ir(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Yt;++t<r;)this.add(e[t])}function Ay(e){return this.__data__.set(e,f),this}function qy(e){return this.__data__.has(e)}Ir.prototype.add=Ir.prototype.push=Ay,Ir.prototype.has=qy;function Ot(e){var t=this.__data__=new Vt(e);this.size=t.size}function Cy(){this.__data__=new Vt,this.size=0}function zy(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Sy(e){return this.__data__.get(e)}function Ny(e){return this.__data__.has(e)}function Ey(e,t){var r=this.__data__;if(r instanceof Vt){var i=r.__data__;if(!qs||i.length<c-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yt(i)}return r.set(e,t),this.size=r.size,this}Ot.prototype.clear=Cy,Ot.prototype.delete=zy,Ot.prototype.get=Sy,Ot.prototype.has=Ny,Ot.prototype.set=Ey;function Al(e,t){var r=ae(e),i=!r&&Sr(e),p=!r&&!i&&fr(e),u=!r&&!i&&!p&&ts(e),y=r||i||p||u,x=y?$n(e.length,$u):[],v=x.length;for(var C in e)(t||Te.call(e,C))&&!(y&&(C=="length"||p&&(C=="offset"||C=="parent")||u&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||er(C,v)))&&x.push(C);return x}function ql(e){var t=e.length;return t?e[ii(0,t-1)]:s}function Ly(e,t){return Ha(at(e),Ar(t,0,e.length))}function My(e){return Ha(at(e))}function Yn(e,t,r){(r!==s&&!Rt(e[t],r)||r===s&&!(t in e))&&Qt(e,t,r)}function Ns(e,t,r){var i=e[t];(!(Te.call(e,t)&&Rt(i,r))||r===s&&!(t in e))&&Qt(e,t,r)}function Na(e,t){for(var r=e.length;r--;)if(Rt(e[r][0],t))return r;return-1}function Py(e,t,r,i){return mr(e,function(p,u,y){t(i,p,r(p),y)}),i}function Cl(e,t){return e&&jt(t,He(t),e)}function Oy(e,t){return e&&jt(t,it(t),e)}function Qt(e,t,r){t=="__proto__"&&Ia?Ia(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Qn(e,t){for(var r=-1,i=t.length,p=D(i),u=e==null;++r<i;)p[r]=u?s:Si(e,t[r]);return p}function Ar(e,t,r){return e===e&&(r!==s&&(e=e<=r?e:r),t!==s&&(e=e>=t?e:t)),e}function At(e,t,r,i,p,u){var y,x=t&T,v=t&O,C=t&K;if(r&&(y=p?r(e,i,p,u):r(e)),y!==s)return y;if(!ze(e))return e;var z=ae(e);if(z){if(y=k_(e),!x)return at(e,y)}else{var S=Qe(e),j=S==hr||S==aa;if(fr(e))return Jl(e,x);if(S==vt||S==$e||j&&!p){if(y=v||j?{}:bc(e),!x)return v?y_(e,Oy(y,e)):u_(e,Cl(y,e))}else{if(!ke[S])return p?e:{};y=I_(e,S,x)}}u||(u=new Ot);var X=u.get(e);if(X)return X;u.set(e,y),Gc(e)?e.forEach(function(J){y.add(At(J,t,r,J,e,u))}):Hc(e)&&e.forEach(function(J,de){y.set(de,At(J,t,r,de,e,u))});var Z=C?v?gi:fi:v?it:He,oe=z?s:Z(e);return Dt(oe||e,function(J,de){oe&&(de=J,J=e[de]),Ns(y,de,At(J,t,r,de,e,u))}),y}function Ry(e){var t=He(e);return function(r){return zl(r,e,t)}}function zl(e,t,r){var i=r.length;if(e==null)return!i;for(e=De(e);i--;){var p=r[i],u=t[p],y=e[p];if(y===s&&!(p in e)||!u(y))return!1}return!0}function Sl(e,t,r){if(typeof e!="function")throw new kt(m);return Fs(function(){e.apply(s,r)},t)}function Es(e,t,r,i){var p=-1,u=_a,y=!0,x=e.length,v=[],C=t.length;if(!x)return v;r&&(t=qe(t,yt(r))),i?(u=On,y=!1):t.length>=c&&(u=Is,y=!1,t=new Ir(t));e:for(;++p<x;){var z=e[p],S=r==null?z:r(z);if(z=i||z!==0?z:0,y&&S===S){for(var j=C;j--;)if(t[j]===S)continue e;v.push(z)}else u(t,S,i)||v.push(z)}return v}var mr=ac($t),Nl=ac(Jn,!0);function Fy(e,t){var r=!0;return mr(e,function(i,p,u){return r=!!t(i,p,u),r}),r}function Ea(e,t,r){for(var i=-1,p=e.length;++i<p;){var u=e[i],y=t(u);if(y!=null&&(x===s?y===y&&!ft(y):r(y,x)))var x=y,v=u}return v}function By(e,t,r,i){var p=e.length;for(r=ne(r),r<0&&(r=-r>p?0:p+r),i=i===s||i>p?p:ne(i),i<0&&(i+=p),i=r>i?0:Vc(i);r<i;)e[r++]=t;return e}function El(e,t){var r=[];return mr(e,function(i,p,u){t(i,p,u)&&r.push(i)}),r}function Xe(e,t,r,i,p){var u=-1,y=e.length;for(r||(r=q_),p||(p=[]);++u<y;){var x=e[u];t>0&&r(x)?t>1?Xe(x,t-1,r,i,p):cr(p,x):i||(p[p.length]=x)}return p}var Zn=nc(),Ll=nc(!0);function $t(e,t){return e&&Zn(e,t,He)}function Jn(e,t){return e&&Ll(e,t,He)}function La(e,t){return lr(t,function(r){return tr(e[r])})}function qr(e,t){t=yr(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Ht(t[r++])];return r&&r==i?e:s}function Ml(e,t,r){var i=t(e);return ae(e)?i:cr(i,r(e))}function Ze(e){return e==null?e===s?Tn:Or:Dr&&Dr in De(e)?v_(e):M_(e)}function ei(e,t){return e>t}function Uy(e,t){return e!=null&&Te.call(e,t)}function Ky(e,t){return e!=null&&t in De(e)}function $y(e,t,r){return e>=Ye(t,r)&&e<Be(t,r)}function ti(e,t,r){for(var i=r?On:_a,p=e[0].length,u=e.length,y=u,x=D(u),v=1/0,C=[];y--;){var z=e[y];y&&t&&(z=qe(z,yt(t))),v=Ye(z.length,v),x[y]=!r&&(t||p>=120&&z.length>=120)?new Ir(y&&z):s}z=e[0];var S=-1,j=x[0];e:for(;++S<p&&C.length<v;){var X=z[S],Z=t?t(X):X;if(X=r||X!==0?X:0,!(j?Is(j,Z):i(C,Z,r))){for(y=u;--y;){var oe=x[y];if(!(oe?Is(oe,Z):i(e[y],Z,r)))continue e}j&&j.push(Z),C.push(X)}}return C}function jy(e,t,r,i){return $t(e,function(p,u,y){t(i,r(p),u,y)}),i}function Ls(e,t,r){t=yr(t,e),e=vc(e,t);var i=e==null?e:e[Ht(Ct(t))];return i==null?s:ut(i,e,r)}function Pl(e){return Le(e)&&Ze(e)==$e}function Hy(e){return Le(e)&&Ze(e)==Lt}function Wy(e){return Le(e)&&Ze(e)==Wt}function Ms(e,t,r,i,p){return e===t?!0:e==null||t==null||!Le(e)&&!Le(t)?e!==e&&t!==t:Gy(e,t,r,i,Ms,p)}function Gy(e,t,r,i,p,u){var y=ae(e),x=ae(t),v=y?je:Qe(e),C=x?je:Qe(t);v=v==$e?vt:v,C=C==$e?vt:C;var z=v==vt,S=C==vt,j=v==C;if(j&&fr(e)){if(!fr(t))return!1;y=!0,z=!1}if(j&&!z)return u||(u=new Ot),y||ts(e)?_c(e,t,r,i,p,u):h_(e,t,v,r,i,p,u);if(!(r&F)){var X=z&&Te.call(e,"__wrapped__"),Z=S&&Te.call(t,"__wrapped__");if(X||Z){var oe=X?e.value():e,J=Z?t.value():t;return u||(u=new Ot),p(oe,J,r,i,u)}}return j?(u||(u=new Ot),w_(e,t,r,i,p,u)):!1}function Xy(e){return Le(e)&&Qe(e)==dt}function ri(e,t,r,i){var p=r.length,u=p,y=!i;if(e==null)return!u;for(e=De(e);p--;){var x=r[p];if(y&&x[2]?x[1]!==e[x[0]]:!(x[0]in e))return!1}for(;++p<u;){x=r[p];var v=x[0],C=e[v],z=x[1];if(y&&x[2]){if(C===s&&!(v in e))return!1}else{var S=new Ot;if(i)var j=i(C,z,v,e,t,S);if(!(j===s?Ms(z,C,F|E,i,S):j))return!1}}return!0}function Ol(e){if(!ze(e)||z_(e))return!1;var t=tr(e)?Xu:We;return t.test(zr(e))}function Vy(e){return Le(e)&&Ze(e)==wr}function Yy(e){return Le(e)&&Qe(e)==mt}function Qy(e){return Le(e)&&Qa(e.length)&&!!Ae[Ze(e)]}function Rl(e){return typeof e=="function"?e:e==null?ot:typeof e=="object"?ae(e)?Ul(e[0],e[1]):Bl(e):ip(e)}function si(e){if(!Rs(e))return ey(e);var t=[];for(var r in De(e))Te.call(e,r)&&r!="constructor"&&t.push(r);return t}function Zy(e){if(!ze(e))return L_(e);var t=Rs(e),r=[];for(var i in e)i=="constructor"&&(t||!Te.call(e,i))||r.push(i);return r}function ai(e,t){return e<t}function Fl(e,t){var r=-1,i=nt(e)?D(e.length):[];return mr(e,function(p,u,y){i[++r]=t(p,u,y)}),i}function Bl(e){var t=xi(e);return t.length==1&&t[0][2]?hc(t[0][0],t[0][1]):function(r){return r===e||ri(r,e,t)}}function Ul(e,t){return wi(e)&&xc(t)?hc(Ht(e),t):function(r){var i=Si(r,e);return i===s&&i===t?Ni(r,e):Ms(t,i,F|E)}}function Ma(e,t,r,i,p){e!==t&&Zn(t,function(u,y){if(p||(p=new Ot),ze(u))Jy(e,t,y,r,Ma,i,p);else{var x=i?i(Ti(e,y),u,y+"",e,t,p):s;x===s&&(x=u),Yn(e,y,x)}},it)}function Jy(e,t,r,i,p,u,y){var x=Ti(e,r),v=Ti(t,r),C=y.get(v);if(C){Yn(e,r,C);return}var z=u?u(x,v,r+"",e,t,y):s,S=z===s;if(S){var j=ae(v),X=!j&&fr(v),Z=!j&&!X&&ts(v);z=v,j||X||Z?ae(x)?z=x:Pe(x)?z=at(x):X?(S=!1,z=Jl(v,!0)):Z?(S=!1,z=ec(v,!0)):z=[]:Bs(v)||Sr(v)?(z=x,Sr(x)?z=Yc(x):(!ze(x)||tr(x))&&(z=bc(v))):S=!1}S&&(y.set(v,z),p(z,v,i,u,y),y.delete(v)),Yn(e,r,z)}function Kl(e,t){var r=e.length;if(r)return t+=t<0?r:0,er(t,r)?e[t]:s}function $l(e,t,r){t.length?t=qe(t,function(u){return ae(u)?function(y){return qr(y,u.length===1?u[0]:u)}:u}):t=[ot];var i=-1;t=qe(t,yt(Q()));var p=Fl(e,function(u,y,x){var v=qe(t,function(C){return C(u)});return{criteria:v,index:++i,value:u}});return Iu(p,function(u,y){return m_(u,y,r)})}function e_(e,t){return jl(e,t,function(r,i){return Ni(e,i)})}function jl(e,t,r){for(var i=-1,p=t.length,u={};++i<p;){var y=t[i],x=qr(e,y);r(x,y)&&Ps(u,yr(y,e),x)}return u}function t_(e){return function(t){return qr(t,e)}}function ni(e,t,r,i){var p=i?ku:jr,u=-1,y=t.length,x=e;for(e===t&&(t=at(t)),r&&(x=qe(e,yt(r)));++u<y;)for(var v=0,C=t[u],z=r?r(C):C;(v=p(x,z,v,i))>-1;)x!==e&&ka.call(x,v,1),ka.call(e,v,1);return e}function Hl(e,t){for(var r=e?t.length:0,i=r-1;r--;){var p=t[r];if(r==i||p!==u){var u=p;er(p)?ka.call(e,p,1):ci(e,p)}}return e}function ii(e,t){return e+qa(kl()*(t-e+1))}function r_(e,t,r,i){for(var p=-1,u=Be(Aa((t-e)/(r||1)),0),y=D(u);u--;)y[i?u:++p]=e,e+=r;return y}function oi(e,t){var r="";if(!e||t<1||t>Me)return r;do t%2&&(r+=e),t=qa(t/2),t&&(e+=e);while(t);return r}function ce(e,t){return Di(wc(e,t,ot),e+"")}function s_(e){return ql(rs(e))}function a_(e,t){var r=rs(e);return Ha(r,Ar(t,0,r.length))}function Ps(e,t,r,i){if(!ze(e))return e;t=yr(t,e);for(var p=-1,u=t.length,y=u-1,x=e;x!=null&&++p<u;){var v=Ht(t[p]),C=r;if(v==="__proto__"||v==="constructor"||v==="prototype")return e;if(p!=y){var z=x[v];C=i?i(z,v,x):s,C===s&&(C=ze(z)?z:er(t[p+1])?[]:{})}Ns(x,v,C),x=x[v]}return e}var Wl=Ca?function(e,t){return Ca.set(e,t),e}:ot,n_=Ia?function(e,t){return Ia(e,"toString",{configurable:!0,enumerable:!1,value:Li(t),writable:!0})}:ot;function i_(e){return Ha(rs(e))}function qt(e,t,r){var i=-1,p=e.length;t<0&&(t=-t>p?0:p+t),r=r>p?p:r,r<0&&(r+=p),p=t>r?0:r-t>>>0,t>>>=0;for(var u=D(p);++i<p;)u[i]=e[i+t];return u}function o_(e,t){var r;return mr(e,function(i,p,u){return r=t(i,p,u),!r}),!!r}function Pa(e,t,r){var i=0,p=e==null?i:e.length;if(typeof t=="number"&&t===t&&p<=Re){for(;i<p;){var u=i+p>>>1,y=e[u];y!==null&&!ft(y)&&(r?y<=t:y<t)?i=u+1:p=u}return p}return li(e,t,ot,r)}function li(e,t,r,i){var p=0,u=e==null?0:e.length;if(u===0)return 0;t=r(t);for(var y=t!==t,x=t===null,v=ft(t),C=t===s;p<u;){var z=qa((p+u)/2),S=r(e[z]),j=S!==s,X=S===null,Z=S===S,oe=ft(S);if(y)var J=i||Z;else C?J=Z&&(i||j):x?J=Z&&j&&(i||!X):v?J=Z&&j&&!X&&(i||!oe):X||oe?J=!1:J=i?S<=t:S<t;J?p=z+1:u=z}return Ye(u,xe)}function Gl(e,t){for(var r=-1,i=e.length,p=0,u=[];++r<i;){var y=e[r],x=t?t(y):y;if(!r||!Rt(x,v)){var v=x;u[p++]=y===0?0:y}}return u}function Xl(e){return typeof e=="number"?e:ft(e)?wt:+e}function _t(e){if(typeof e=="string")return e;if(ae(e))return qe(e,_t)+"";if(ft(e))return Il?Il.call(e):"";var t=e+"";return t=="0"&&1/e==-Ne?"-0":t}function ur(e,t,r){var i=-1,p=_a,u=e.length,y=!0,x=[],v=x;if(r)y=!1,p=On;else if(u>=c){var C=t?null:b_(e);if(C)return ga(C);y=!1,p=Is,v=new Ir}else v=t?[]:x;e:for(;++i<u;){var z=e[i],S=t?t(z):z;if(z=r||z!==0?z:0,y&&S===S){for(var j=v.length;j--;)if(v[j]===S)continue e;t&&v.push(S),x.push(z)}else p(v,S,r)||(v!==x&&v.push(S),x.push(z))}return x}function ci(e,t){return t=yr(t,e),e=vc(e,t),e==null||delete e[Ht(Ct(t))]}function Vl(e,t,r,i){return Ps(e,t,r(qr(e,t)),i)}function Oa(e,t,r,i){for(var p=e.length,u=i?p:-1;(i?u--:++u<p)&&t(e[u],u,e););return r?qt(e,i?0:u,i?u+1:p):qt(e,i?u+1:0,i?p:u)}function Yl(e,t){var r=e;return r instanceof ue&&(r=r.value()),Rn(t,function(i,p){return p.func.apply(p.thisArg,cr([i],p.args))},r)}function pi(e,t,r){var i=e.length;if(i<2)return i?ur(e[0]):[];for(var p=-1,u=D(i);++p<i;)for(var y=e[p],x=-1;++x<i;)x!=p&&(u[p]=Es(u[p]||y,e[x],t,r));return ur(Xe(u,1),t,r)}function Ql(e,t,r){for(var i=-1,p=e.length,u=t.length,y={};++i<p;){var x=i<u?t[i]:s;r(y,e[i],x)}return y}function di(e){return Pe(e)?e:[]}function mi(e){return typeof e=="function"?e:ot}function yr(e,t){return ae(e)?e:wi(e,t)?[e]:Ic(ve(e))}var l_=ce;function _r(e,t,r){var i=e.length;return r=r===s?i:r,!t&&r>=i?e:qt(e,t,r)}var Zl=Vu||function(e){return Ge.clearTimeout(e)};function Jl(e,t){if(t)return e.slice();var r=e.length,i=hl?hl(r):new e.constructor(r);return e.copy(i),i}function ui(e){var t=new e.constructor(e.byteLength);return new Ta(t).set(new Ta(e)),t}function c_(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function p_(e){var t=new e.constructor(e.source,we.exec(e));return t.lastIndex=e.lastIndex,t}function d_(e){return Ss?De(Ss.call(e)):{}}function ec(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function tc(e,t){if(e!==t){var r=e!==s,i=e===null,p=e===e,u=ft(e),y=t!==s,x=t===null,v=t===t,C=ft(t);if(!x&&!C&&!u&&e>t||u&&y&&v&&!x&&!C||i&&y&&v||!r&&v||!p)return 1;if(!i&&!u&&!C&&e<t||C&&r&&p&&!i&&!u||x&&r&&p||!y&&p||!v)return-1}return 0}function m_(e,t,r){for(var i=-1,p=e.criteria,u=t.criteria,y=p.length,x=r.length;++i<y;){var v=tc(p[i],u[i]);if(v){if(i>=x)return v;var C=r[i];return v*(C=="desc"?-1:1)}}return e.index-t.index}function rc(e,t,r,i){for(var p=-1,u=e.length,y=r.length,x=-1,v=t.length,C=Be(u-y,0),z=D(v+C),S=!i;++x<v;)z[x]=t[x];for(;++p<y;)(S||p<u)&&(z[r[p]]=e[p]);for(;C--;)z[x++]=e[p++];return z}function sc(e,t,r,i){for(var p=-1,u=e.length,y=-1,x=r.length,v=-1,C=t.length,z=Be(u-x,0),S=D(z+C),j=!i;++p<z;)S[p]=e[p];for(var X=p;++v<C;)S[X+v]=t[v];for(;++y<x;)(j||p<u)&&(S[X+r[y]]=e[p++]);return S}function at(e,t){var r=-1,i=e.length;for(t||(t=D(i));++r<i;)t[r]=e[r];return t}function jt(e,t,r,i){var p=!r;r||(r={});for(var u=-1,y=t.length;++u<y;){var x=t[u],v=i?i(r[x],e[x],x,r,e):s;v===s&&(v=e[x]),p?Qt(r,x,v):Ns(r,x,v)}return r}function u_(e,t){return jt(e,hi(e),t)}function y_(e,t){return jt(e,fc(e),t)}function Ra(e,t){return function(r,i){var p=ae(r)?xu:Py,u=t?t():{};return p(r,e,Q(i,2),u)}}function Zr(e){return ce(function(t,r){var i=-1,p=r.length,u=p>1?r[p-1]:s,y=p>2?r[2]:s;for(u=e.length>3&&typeof u=="function"?(p--,u):s,y&&Je(r[0],r[1],y)&&(u=p<3?s:u,p=1),t=De(t);++i<p;){var x=r[i];x&&e(t,x,i,u)}return t})}function ac(e,t){return function(r,i){if(r==null)return r;if(!nt(r))return e(r,i);for(var p=r.length,u=t?p:-1,y=De(r);(t?u--:++u<p)&&i(y[u],u,y)!==!1;);return r}}function nc(e){return function(t,r,i){for(var p=-1,u=De(t),y=i(t),x=y.length;x--;){var v=y[e?x:++p];if(r(u[v],v,u)===!1)break}return t}}function __(e,t,r){var i=t&H,p=Os(e);function u(){var y=this&&this!==Ge&&this instanceof u?p:e;return y.apply(i?r:this,arguments)}return u}function ic(e){return function(t){t=ve(t);var r=Hr(t)?Pt(t):s,i=r?r[0]:t.charAt(0),p=r?_r(r,1).join(""):t.slice(1);return i[e]()+p}}function Jr(e){return function(t){return Rn(ap(sp(t).replace(nu,"")),e,"")}}function Os(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Qr(e.prototype),i=e.apply(r,t);return ze(i)?i:r}}function f_(e,t,r){var i=Os(e);function p(){for(var u=arguments.length,y=D(u),x=u,v=es(p);x--;)y[x]=arguments[x];var C=u<3&&y[0]!==v&&y[u-1]!==v?[]:pr(y,v);if(u-=C.length,u<r)return dc(e,t,Fa,p.placeholder,s,y,C,s,s,r-u);var z=this&&this!==Ge&&this instanceof p?i:e;return ut(z,this,y)}return p}function oc(e){return function(t,r,i){var p=De(t);if(!nt(t)){var u=Q(r,3);t=He(t),r=function(x){return u(p[x],x,p)}}var y=e(t,r,i);return y>-1?p[u?t[y]:y]:s}}function lc(e){return Jt(function(t){var r=t.length,i=r,p=It.prototype.thru;for(e&&t.reverse();i--;){var u=t[i];if(typeof u!="function")throw new kt(m);if(p&&!y&&$a(u)=="wrapper")var y=new It([],!0)}for(i=y?i:r;++i<r;){u=t[i];var x=$a(u),v=x=="wrapper"?bi(u):s;v&&vi(v[0])&&v[1]==(U|B|P|te)&&!v[4].length&&v[9]==1?y=y[$a(v[0])].apply(y,v[3]):y=u.length==1&&vi(u)?y[x]():y.thru(u)}return function(){var C=arguments,z=C[0];if(y&&C.length==1&&ae(z))return y.plant(z).value();for(var S=0,j=r?t[S].apply(this,C):z;++S<r;)j=t[S].call(this,j);return j}})}function Fa(e,t,r,i,p,u,y,x,v,C){var z=t&U,S=t&H,j=t&V,X=t&(B|k),Z=t&fe,oe=j?s:Os(e);function J(){for(var de=arguments.length,ye=D(de),gt=de;gt--;)ye[gt]=arguments[gt];if(X)var et=es(J),bt=qu(ye,et);if(i&&(ye=rc(ye,i,p,X)),u&&(ye=sc(ye,u,y,X)),de-=bt,X&&de<C){var Oe=pr(ye,et);return dc(e,t,Fa,J.placeholder,r,ye,Oe,x,v,C-de)}var Ft=S?r:this,sr=j?Ft[e]:e;return de=ye.length,x?ye=P_(ye,x):Z&&de>1&&ye.reverse(),z&&v<de&&(ye.length=v),this&&this!==Ge&&this instanceof J&&(sr=oe||Os(sr)),sr.apply(Ft,ye)}return J}function cc(e,t){return function(r,i){return jy(r,e,t(i),{})}}function Ba(e,t){return function(r,i){var p;if(r===s&&i===s)return t;if(r!==s&&(p=r),i!==s){if(p===s)return i;typeof r=="string"||typeof i=="string"?(r=_t(r),i=_t(i)):(r=Xl(r),i=Xl(i)),p=e(r,i)}return p}}function yi(e){return Jt(function(t){return t=qe(t,yt(Q())),ce(function(r){var i=this;return e(t,function(p){return ut(p,i,r)})})})}function Ua(e,t){t=t===s?" ":_t(t);var r=t.length;if(r<2)return r?oi(t,e):t;var i=oi(t,Aa(e/Wr(t)));return Hr(t)?_r(Pt(i),0,e).join(""):i.slice(0,e)}function g_(e,t,r,i){var p=t&H,u=Os(e);function y(){for(var x=-1,v=arguments.length,C=-1,z=i.length,S=D(z+v),j=this&&this!==Ge&&this instanceof y?u:e;++C<z;)S[C]=i[C];for(;v--;)S[C++]=arguments[++x];return ut(j,p?r:this,S)}return y}function pc(e){return function(t,r,i){return i&&typeof i!="number"&&Je(t,r,i)&&(r=i=s),t=rr(t),r===s?(r=t,t=0):r=rr(r),i=i===s?t<r?1:-1:rr(i),r_(t,r,i,e)}}function Ka(e){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=zt(t),r=zt(r)),e(t,r)}}function dc(e,t,r,i,p,u,y,x,v,C){var z=t&B,S=z?y:s,j=z?s:y,X=z?u:s,Z=z?s:u;t|=z?P:N,t&=~(z?N:P),t&G||(t&=~(H|V));var oe=[e,t,p,X,S,Z,j,x,v,C],J=r.apply(s,oe);return vi(e)&&Tc(J,oe),J.placeholder=i,Dc(J,e,t)}function _i(e){var t=Fe[e];return function(r,i){if(r=zt(r),i=i==null?0:Ye(ne(i),292),i&&Dl(r)){var p=(ve(r)+"e").split("e"),u=t(p[0]+"e"+(+p[1]+i));return p=(ve(u)+"e").split("e"),+(p[0]+"e"+(+p[1]-i))}return t(r)}}var b_=Vr&&1/ga(new Vr([,-0]))[1]==Ne?function(e){return new Vr(e)}:Oi;function mc(e){return function(t){var r=Qe(t);return r==dt?Hn(t):r==mt?Mu(t):Au(t,e(t))}}function Zt(e,t,r,i,p,u,y,x){var v=t&V;if(!v&&typeof e!="function")throw new kt(m);var C=i?i.length:0;if(C||(t&=~(P|N),i=p=s),y=y===s?y:Be(ne(y),0),x=x===s?x:ne(x),C-=p?p.length:0,t&N){var z=i,S=p;i=p=s}var j=v?s:bi(e),X=[e,t,r,i,p,z,S,u,y,x];if(j&&E_(X,j),e=X[0],t=X[1],r=X[2],i=X[3],p=X[4],x=X[9]=X[9]===s?v?0:e.length:Be(X[9]-C,0),!x&&t&(B|k)&&(t&=~(B|k)),!t||t==H)var Z=__(e,t,r);else t==B||t==k?Z=f_(e,t,x):(t==P||t==(H|P))&&!p.length?Z=g_(e,t,r,i):Z=Fa.apply(s,X);var oe=j?Wl:Tc;return Dc(oe(Z,X),e,t)}function uc(e,t,r,i){return e===s||Rt(e,Xr[r])&&!Te.call(i,r)?t:e}function yc(e,t,r,i,p,u){return ze(e)&&ze(t)&&(u.set(t,e),Ma(e,t,s,yc,u),u.delete(t)),e}function x_(e){return Bs(e)?s:e}function _c(e,t,r,i,p,u){var y=r&F,x=e.length,v=t.length;if(x!=v&&!(y&&v>x))return!1;var C=u.get(e),z=u.get(t);if(C&&z)return C==t&&z==e;var S=-1,j=!0,X=r&E?new Ir:s;for(u.set(e,t),u.set(t,e);++S<x;){var Z=e[S],oe=t[S];if(i)var J=y?i(oe,Z,S,t,e,u):i(Z,oe,S,e,t,u);if(J!==s){if(J)continue;j=!1;break}if(X){if(!Fn(t,function(de,ye){if(!Is(X,ye)&&(Z===de||p(Z,de,r,i,u)))return X.push(ye)})){j=!1;break}}else if(!(Z===oe||p(Z,oe,r,i,u))){j=!1;break}}return u.delete(e),u.delete(t),j}function h_(e,t,r,i,p,u,y){switch(r){case or:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Lt:return!(e.byteLength!=t.byteLength||!u(new Ta(e),new Ta(t)));case Ut:case Wt:case Kt:return Rt(+e,+t);case Pr:return e.name==t.name&&e.message==t.message;case wr:case Gt:return e==t+"";case dt:var x=Hn;case mt:var v=i&F;if(x||(x=ga),e.size!=t.size&&!v)return!1;var C=y.get(e);if(C)return C==t;i|=E,y.set(e,t);var z=_c(x(e),x(t),i,p,u,y);return y.delete(e),z;case Fr:if(Ss)return Ss.call(e)==Ss.call(t)}return!1}function w_(e,t,r,i,p,u){var y=r&F,x=fi(e),v=x.length,C=fi(t),z=C.length;if(v!=z&&!y)return!1;for(var S=v;S--;){var j=x[S];if(!(y?j in t:Te.call(t,j)))return!1}var X=u.get(e),Z=u.get(t);if(X&&Z)return X==t&&Z==e;var oe=!0;u.set(e,t),u.set(t,e);for(var J=y;++S<v;){j=x[S];var de=e[j],ye=t[j];if(i)var gt=y?i(ye,de,j,t,e,u):i(de,ye,j,e,t,u);if(!(gt===s?de===ye||p(de,ye,r,i,u):gt)){oe=!1;break}J||(J=j=="constructor")}if(oe&&!J){var et=e.constructor,bt=t.constructor;et!=bt&&"constructor"in e&&"constructor"in t&&!(typeof et=="function"&&et instanceof et&&typeof bt=="function"&&bt instanceof bt)&&(oe=!1)}return u.delete(e),u.delete(t),oe}function Jt(e){return Di(wc(e,s,zc),e+"")}function fi(e){return Ml(e,He,hi)}function gi(e){return Ml(e,it,fc)}var bi=Ca?function(e){return Ca.get(e)}:Oi;function $a(e){for(var t=e.name+"",r=Yr[t],i=Te.call(Yr,t)?r.length:0;i--;){var p=r[i],u=p.func;if(u==null||u==e)return p.name}return t}function es(e){var t=Te.call(d,"placeholder")?d:e;return t.placeholder}function Q(){var e=d.iteratee||Mi;return e=e===Mi?Rl:e,arguments.length?e(arguments[0],arguments[1]):e}function ja(e,t){var r=e.__data__;return C_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function xi(e){for(var t=He(e),r=t.length;r--;){var i=t[r],p=e[i];t[r]=[i,p,xc(p)]}return t}function Cr(e,t){var r=Nu(e,t);return Ol(r)?r:s}function v_(e){var t=Te.call(e,Dr),r=e[Dr];try{e[Dr]=s;var i=!0}catch{}var p=wa.call(e);return i&&(t?e[Dr]=r:delete e[Dr]),p}var hi=Gn?function(e){return e==null?[]:(e=De(e),lr(Gn(e),function(t){return vl.call(e,t)}))}:Ri,fc=Gn?function(e){for(var t=[];e;)cr(t,hi(e)),e=Da(e);return t}:Ri,Qe=Ze;(Xn&&Qe(new Xn(new ArrayBuffer(1)))!=or||qs&&Qe(new qs)!=dt||Vn&&Qe(Vn.resolve())!=_s||Vr&&Qe(new Vr)!=mt||Cs&&Qe(new Cs)!=ir)&&(Qe=function(e){var t=Ze(e),r=t==vt?e.constructor:s,i=r?zr(r):"";if(i)switch(i){case ay:return or;case ny:return dt;case iy:return _s;case oy:return mt;case ly:return ir}return t});function T_(e,t,r){for(var i=-1,p=r.length;++i<p;){var u=r[i],y=u.size;switch(u.type){case"drop":e+=y;break;case"dropRight":t-=y;break;case"take":t=Ye(t,e+y);break;case"takeRight":e=Be(e,t-y);break}}return{start:e,end:t}}function D_(e){var t=e.match(Cn);return t?t[1].split(g):[]}function gc(e,t,r){t=yr(t,e);for(var i=-1,p=t.length,u=!1;++i<p;){var y=Ht(t[i]);if(!(u=e!=null&&r(e,y)))break;e=e[y]}return u||++i!=p?u:(p=e==null?0:e.length,!!p&&Qa(p)&&er(y,p)&&(ae(e)||Sr(e)))}function k_(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function bc(e){return typeof e.constructor=="function"&&!Rs(e)?Qr(Da(e)):{}}function I_(e,t,r){var i=e.constructor;switch(t){case Lt:return ui(e);case Ut:case Wt:return new i(+e);case or:return c_(e,r);case Br:case Ur:case vr:case fs:case gs:case bs:case xs:case hs:case ws:return ec(e,r);case dt:return new i;case Kt:case Gt:return new i(e);case wr:return p_(e);case mt:return new i;case Fr:return d_(e)}}function A_(e,t){var r=t.length;if(!r)return e;var i=r-1;return t[i]=(r>1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(qn,`{
|
118
|
+
*/Ws.exports,function(a,n){(function(){var s,o="4.17.21",c=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",_="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",b=500,h="__lodash_placeholder__",T=1,O=2,K=4,F=1,N=2,H=1,V=2,G=4,B=8,k=16,P=32,S=64,U=128,te=256,fe=512,le=30,ht="...",Et=800,Ue=16,Ke=1,Y=2,be=3,Ee=1/0,Me=9007199254740991,pt=17976931348623157e292,wt=NaN,re=4294967295,xe=re-1,Re=re>>>1,Nt=[["ary",U],["bind",H],["bindKey",V],["curry",B],["curryRight",k],["flip",fe],["partial",P],["partialRight",S],["rearg",te]],$e="[object Arguments]",je="[object Array]",ys="[object AsyncFunction]",Ut="[object Boolean]",Wt="[object Date]",Mr="[object DOMException]",Pr="[object Error]",hr="[object Function]",aa="[object GeneratorFunction]",dt="[object Map]",Kt="[object Number]",Or="[object Null]",vt="[object Object]",_s="[object Promise]",Rr="[object Proxy]",wr="[object RegExp]",mt="[object Set]",Gt="[object String]",Fr="[object Symbol]",Tn="[object Undefined]",ir="[object WeakMap]",na="[object WeakSet]",Lt="[object ArrayBuffer]",or="[object DataView]",Br="[object Float32Array]",Ur="[object Float64Array]",vr="[object Int8Array]",fs="[object Int16Array]",gs="[object Int32Array]",bs="[object Uint8Array]",xs="[object Uint8ClampedArray]",hs="[object Uint16Array]",ws="[object Uint32Array]",Dn=/\b__p \+= '';/g,vs=/\b(__p \+=) '' \+/g,ia=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Xt=/&(?:amp|lt|gt|quot|#39);/g,Kr=/[&<>"']/g,Ts=RegExp(Xt.source),oa=RegExp(Kr.source),kn=/<%-([\s\S]+?)%>/g,la=/<%([\s\S]+?)%>/g,ca=/<%=([\s\S]+?)%>/g,pa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,da=/^\w*$/,In=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ds=/[\\^$.*+?()[\]{}|]/g,ma=RegExp(Ds.source),ks=/^\s+/,An=/\s/,qn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Cn=/\{\n\/\* \[wrapped with (.+)\] \*/,g=/,? & /,M=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$=/[()=,{}\[\]\/\s]/,ee=/\\(\\)?/g,_e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,we=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,Ce=/^0o[0-7]+$/i,Ne=/^(?:0|[1-9]\d*)$/,rt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mt=/($^)/,ua=/['\n\r\u2028\u2029\\]/g,st="\\ud800-\\udfff",$m="\\u0300-\\u036f",jm="\\ufe20-\\ufe2f",Hm="\\u20d0-\\u20ff",Oo=$m+jm+Hm,Ro="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",Wm="\\xac\\xb1\\xd7\\xf7",Gm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Xm="\\u2000-\\u206f",Vm=" \\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",Bo="A-Z\\xc0-\\xd6\\xd8-\\xde",Uo="\\ufe0e\\ufe0f",Ko=Wm+Gm+Xm+Vm,zn="['’]",Ym="["+st+"]",$o="["+Ko+"]",ya="["+Oo+"]",jo="\\d+",Qm="["+Ro+"]",Ho="["+Fo+"]",Wo="[^"+st+Ko+jo+Ro+Fo+Bo+"]",Sn="\\ud83c[\\udffb-\\udfff]",Zm="(?:"+ya+"|"+Sn+")",Go="[^"+st+"]",En="(?:\\ud83c[\\udde6-\\uddff]){2}",Nn="[\\ud800-\\udbff][\\udc00-\\udfff]",$r="["+Bo+"]",Xo="\\u200d",Vo="(?:"+Ho+"|"+Wo+")",Jm="(?:"+$r+"|"+Wo+")",Yo="(?:"+zn+"(?:d|ll|m|re|s|t|ve))?",Qo="(?:"+zn+"(?:D|LL|M|RE|S|T|VE))?",Zo=Zm+"?",Jo="["+Uo+"]?",eu="(?:"+Xo+"(?:"+[Go,En,Nn].join("|")+")"+Jo+Zo+")*",tu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ru="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",el=Jo+Zo+eu,su="(?:"+[Qm,En,Nn].join("|")+")"+el,au="(?:"+[Go+ya+"?",ya,En,Nn,Ym].join("|")+")",nu=RegExp(zn,"g"),iu=RegExp(ya,"g"),Ln=RegExp(Sn+"(?="+Sn+")|"+au+el,"g"),ou=RegExp([$r+"?"+Ho+"+"+Yo+"(?="+[$o,$r,"$"].join("|")+")",Jm+"+"+Qo+"(?="+[$o,$r+Vo,"$"].join("|")+")",$r+"?"+Vo+"+"+Yo,$r+"+"+Qo,ru,tu,jo,su].join("|"),"g"),lu=RegExp("["+Xo+st+Oo+Uo+"]"),cu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],du=-1,Ae={};Ae[Br]=Ae[Ur]=Ae[vr]=Ae[fs]=Ae[gs]=Ae[bs]=Ae[xs]=Ae[hs]=Ae[ws]=!0,Ae[$e]=Ae[je]=Ae[Lt]=Ae[Ut]=Ae[or]=Ae[Wt]=Ae[Pr]=Ae[hr]=Ae[dt]=Ae[Kt]=Ae[vt]=Ae[wr]=Ae[mt]=Ae[Gt]=Ae[ir]=!1;var ke={};ke[$e]=ke[je]=ke[Lt]=ke[or]=ke[Ut]=ke[Wt]=ke[Br]=ke[Ur]=ke[vr]=ke[fs]=ke[gs]=ke[dt]=ke[Kt]=ke[vt]=ke[wr]=ke[mt]=ke[Gt]=ke[Fr]=ke[bs]=ke[xs]=ke[hs]=ke[ws]=!0,ke[Pr]=ke[hr]=ke[ir]=!1;var mu={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},uu={"&":"&","<":"<",">":">",'"':""","'":"'"},yu={"&":"&","<":"<",">":">",""":'"',"'":"'"},_u={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fu=parseFloat,gu=parseInt,tl=typeof ss=="object"&&ss&&ss.Object===Object&&ss,bu=typeof self=="object"&&self&&self.Object===Object&&self,Ge=tl||bu||Function("return this")(),Mn=n&&!n.nodeType&&n,Tr=Mn&&!0&&a&&!a.nodeType&&a,rl=Tr&&Tr.exports===Mn,Pn=rl&&tl.process,Tt=function(){try{var w=Tr&&Tr.require&&Tr.require("util").types;return w||Pn&&Pn.binding&&Pn.binding("util")}catch{}}(),sl=Tt&&Tt.isArrayBuffer,al=Tt&&Tt.isDate,nl=Tt&&Tt.isMap,il=Tt&&Tt.isRegExp,ol=Tt&&Tt.isSet,ll=Tt&&Tt.isTypedArray;function ut(w,q,D){switch(D.length){case 0:return w.call(q);case 1:return w.call(q,D[0]);case 2:return w.call(q,D[0],D[1]);case 3:return w.call(q,D[0],D[1],D[2])}return w.apply(q,D)}function xu(w,q,D,W){for(var se=-1,he=w==null?0:w.length;++se<he;){var Fe=w[se];q(W,Fe,D(Fe),w)}return W}function Dt(w,q){for(var D=-1,W=w==null?0:w.length;++D<W&&q(w[D],D,w)!==!1;);return w}function hu(w,q){for(var D=w==null?0:w.length;D--&&q(w[D],D,w)!==!1;);return w}function cl(w,q){for(var D=-1,W=w==null?0:w.length;++D<W;)if(!q(w[D],D,w))return!1;return!0}function lr(w,q){for(var D=-1,W=w==null?0:w.length,se=0,he=[];++D<W;){var Fe=w[D];q(Fe,D,w)&&(he[se++]=Fe)}return he}function _a(w,q){var D=w==null?0:w.length;return!!D&&jr(w,q,0)>-1}function On(w,q,D){for(var W=-1,se=w==null?0:w.length;++W<se;)if(D(q,w[W]))return!0;return!1}function qe(w,q){for(var D=-1,W=w==null?0:w.length,se=Array(W);++D<W;)se[D]=q(w[D],D,w);return se}function cr(w,q){for(var D=-1,W=q.length,se=w.length;++D<W;)w[se+D]=q[D];return w}function Rn(w,q,D,W){var se=-1,he=w==null?0:w.length;for(W&&he&&(D=w[++se]);++se<he;)D=q(D,w[se],se,w);return D}function wu(w,q,D,W){var se=w==null?0:w.length;for(W&&se&&(D=w[--se]);se--;)D=q(D,w[se],se,w);return D}function Fn(w,q){for(var D=-1,W=w==null?0:w.length;++D<W;)if(q(w[D],D,w))return!0;return!1}var vu=Bn("length");function Tu(w){return w.split("")}function Du(w){return w.match(M)||[]}function pl(w,q,D){var W;return D(w,function(se,he,Fe){if(q(se,he,Fe))return W=he,!1}),W}function fa(w,q,D,W){for(var se=w.length,he=D+(W?1:-1);W?he--:++he<se;)if(q(w[he],he,w))return he;return-1}function jr(w,q,D){return q===q?Pu(w,q,D):fa(w,dl,D)}function ku(w,q,D,W){for(var se=D-1,he=w.length;++se<he;)if(W(w[se],q))return se;return-1}function dl(w){return w!==w}function ml(w,q){var D=w==null?0:w.length;return D?Kn(w,q)/D:wt}function Bn(w){return function(q){return q==null?s:q[w]}}function Un(w){return function(q){return w==null?s:w[q]}}function ul(w,q,D,W,se){return se(w,function(he,Fe,De){D=W?(W=!1,he):q(D,he,Fe,De)}),D}function Iu(w,q){var D=w.length;for(w.sort(q);D--;)w[D]=w[D].value;return w}function Kn(w,q){for(var D,W=-1,se=w.length;++W<se;){var he=q(w[W]);he!==s&&(D=D===s?he:D+he)}return D}function $n(w,q){for(var D=-1,W=Array(w);++D<w;)W[D]=q(D);return W}function Au(w,q){return qe(q,function(D){return[D,w[D]]})}function yl(w){return w&&w.slice(0,bl(w)+1).replace(ks,"")}function yt(w){return function(q){return w(q)}}function jn(w,q){return qe(q,function(D){return w[D]})}function Is(w,q){return w.has(q)}function _l(w,q){for(var D=-1,W=w.length;++D<W&&jr(q,w[D],0)>-1;);return D}function fl(w,q){for(var D=w.length;D--&&jr(q,w[D],0)>-1;);return D}function qu(w,q){for(var D=w.length,W=0;D--;)w[D]===q&&++W;return W}var Cu=Un(mu),zu=Un(uu);function Su(w){return"\\"+_u[w]}function Eu(w,q){return w==null?s:w[q]}function Hr(w){return lu.test(w)}function Nu(w){return cu.test(w)}function Lu(w){for(var q,D=[];!(q=w.next()).done;)D.push(q.value);return D}function Hn(w){var q=-1,D=Array(w.size);return w.forEach(function(W,se){D[++q]=[se,W]}),D}function gl(w,q){return function(D){return w(q(D))}}function pr(w,q){for(var D=-1,W=w.length,se=0,he=[];++D<W;){var Fe=w[D];(Fe===q||Fe===h)&&(w[D]=h,he[se++]=D)}return he}function ga(w){var q=-1,D=Array(w.size);return w.forEach(function(W){D[++q]=W}),D}function Mu(w){var q=-1,D=Array(w.size);return w.forEach(function(W){D[++q]=[W,W]}),D}function Pu(w,q,D){for(var W=D-1,se=w.length;++W<se;)if(w[W]===q)return W;return-1}function Ou(w,q,D){for(var W=D+1;W--;)if(w[W]===q)return W;return W}function Wr(w){return Hr(w)?Fu(w):vu(w)}function Pt(w){return Hr(w)?Bu(w):Tu(w)}function bl(w){for(var q=w.length;q--&&An.test(w.charAt(q)););return q}var Ru=Un(yu);function Fu(w){for(var q=Ln.lastIndex=0;Ln.test(w);)++q;return q}function Bu(w){return w.match(Ln)||[]}function Uu(w){return w.match(ou)||[]}var Ku=function w(q){q=q==null?Ge:Gr.defaults(Ge.Object(),q,Gr.pick(Ge,pu));var D=q.Array,W=q.Date,se=q.Error,he=q.Function,Fe=q.Math,De=q.Object,Wn=q.RegExp,$u=q.String,kt=q.TypeError,ba=D.prototype,ju=he.prototype,Xr=De.prototype,xa=q["__core-js_shared__"],ha=ju.toString,Te=Xr.hasOwnProperty,Hu=0,xl=function(){var e=/[^.]+$/.exec(xa&&xa.keys&&xa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),wa=Xr.toString,Wu=ha.call(De),Gu=Ge._,Xu=Wn("^"+ha.call(Te).replace(Ds,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),va=rl?q.Buffer:s,dr=q.Symbol,Ta=q.Uint8Array,hl=va?va.allocUnsafe:s,Da=gl(De.getPrototypeOf,De),wl=De.create,vl=Xr.propertyIsEnumerable,ka=ba.splice,Tl=dr?dr.isConcatSpreadable:s,As=dr?dr.iterator:s,Dr=dr?dr.toStringTag:s,Ia=function(){try{var e=Cr(De,"defineProperty");return e({},"",{}),e}catch{}}(),Vu=q.clearTimeout!==Ge.clearTimeout&&q.clearTimeout,Yu=W&&W.now!==Ge.Date.now&&W.now,Qu=q.setTimeout!==Ge.setTimeout&&q.setTimeout,Aa=Fe.ceil,qa=Fe.floor,Gn=De.getOwnPropertySymbols,Zu=va?va.isBuffer:s,Dl=q.isFinite,Ju=ba.join,ey=gl(De.keys,De),Be=Fe.max,Ye=Fe.min,ty=W.now,ry=q.parseInt,kl=Fe.random,sy=ba.reverse,Xn=Cr(q,"DataView"),qs=Cr(q,"Map"),Vn=Cr(q,"Promise"),Vr=Cr(q,"Set"),Cs=Cr(q,"WeakMap"),zs=Cr(De,"create"),Ca=Cs&&new Cs,Yr={},ay=zr(Xn),ny=zr(qs),iy=zr(Vn),oy=zr(Vr),ly=zr(Cs),za=dr?dr.prototype:s,Ss=za?za.valueOf:s,Il=za?za.toString:s;function d(e){if(Le(e)&&!ae(e)&&!(e instanceof ue)){if(e instanceof It)return e;if(Te.call(e,"__wrapped__"))return Ac(e)}return new It(e)}var Qr=function(){function e(){}return function(t){if(!ze(t))return{};if(wl)return wl(t);e.prototype=t;var r=new e;return e.prototype=s,r}}();function Sa(){}function It(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=s}d.templateSettings={escape:kn,evaluate:la,interpolate:ca,variable:"",imports:{_:d}},d.prototype=Sa.prototype,d.prototype.constructor=d,It.prototype=Qr(Sa.prototype),It.prototype.constructor=It;function ue(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=re,this.__views__=[]}function cy(){var e=new ue(this.__wrapped__);return e.__actions__=at(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=at(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=at(this.__views__),e}function py(){if(this.__filtered__){var e=new ue(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function dy(){var e=this.__wrapped__.value(),t=this.__dir__,r=ae(e),i=t<0,p=r?e.length:0,u=T_(0,p,this.__views__),y=u.start,x=u.end,v=x-y,C=i?x:y-1,z=this.__iteratees__,E=z.length,j=0,X=Ye(v,this.__takeCount__);if(!r||!i&&p==v&&X==v)return Yl(e,this.__actions__);var Z=[];e:for(;v--&&j<X;){C+=t;for(var oe=-1,J=e[C];++oe<E;){var de=z[oe],ye=de.iteratee,gt=de.type,et=ye(J);if(gt==Y)J=et;else if(!et){if(gt==Ke)continue e;break e}}Z[j++]=J}return Z}ue.prototype=Qr(Sa.prototype),ue.prototype.constructor=ue;function kr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function my(){this.__data__=zs?zs(null):{},this.size=0}function uy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function yy(e){var t=this.__data__;if(zs){var r=t[e];return r===f?s:r}return Te.call(t,e)?t[e]:s}function _y(e){var t=this.__data__;return zs?t[e]!==s:Te.call(t,e)}function fy(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=zs&&t===s?f:t,this}kr.prototype.clear=my,kr.prototype.delete=uy,kr.prototype.get=yy,kr.prototype.has=_y,kr.prototype.set=fy;function Vt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function gy(){this.__data__=[],this.size=0}function by(e){var t=this.__data__,r=Ea(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():ka.call(t,r,1),--this.size,!0}function xy(e){var t=this.__data__,r=Ea(t,e);return r<0?s:t[r][1]}function hy(e){return Ea(this.__data__,e)>-1}function wy(e,t){var r=this.__data__,i=Ea(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}Vt.prototype.clear=gy,Vt.prototype.delete=by,Vt.prototype.get=xy,Vt.prototype.has=hy,Vt.prototype.set=wy;function Yt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}function vy(){this.size=0,this.__data__={hash:new kr,map:new(qs||Vt),string:new kr}}function Ty(e){var t=ja(this,e).delete(e);return this.size-=t?1:0,t}function Dy(e){return ja(this,e).get(e)}function ky(e){return ja(this,e).has(e)}function Iy(e,t){var r=ja(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}Yt.prototype.clear=vy,Yt.prototype.delete=Ty,Yt.prototype.get=Dy,Yt.prototype.has=ky,Yt.prototype.set=Iy;function Ir(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Yt;++t<r;)this.add(e[t])}function Ay(e){return this.__data__.set(e,f),this}function qy(e){return this.__data__.has(e)}Ir.prototype.add=Ir.prototype.push=Ay,Ir.prototype.has=qy;function Ot(e){var t=this.__data__=new Vt(e);this.size=t.size}function Cy(){this.__data__=new Vt,this.size=0}function zy(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Sy(e){return this.__data__.get(e)}function Ey(e){return this.__data__.has(e)}function Ny(e,t){var r=this.__data__;if(r instanceof Vt){var i=r.__data__;if(!qs||i.length<c-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yt(i)}return r.set(e,t),this.size=r.size,this}Ot.prototype.clear=Cy,Ot.prototype.delete=zy,Ot.prototype.get=Sy,Ot.prototype.has=Ey,Ot.prototype.set=Ny;function Al(e,t){var r=ae(e),i=!r&&Sr(e),p=!r&&!i&&fr(e),u=!r&&!i&&!p&&ts(e),y=r||i||p||u,x=y?$n(e.length,$u):[],v=x.length;for(var C in e)(t||Te.call(e,C))&&!(y&&(C=="length"||p&&(C=="offset"||C=="parent")||u&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||er(C,v)))&&x.push(C);return x}function ql(e){var t=e.length;return t?e[ii(0,t-1)]:s}function Ly(e,t){return Ha(at(e),Ar(t,0,e.length))}function My(e){return Ha(at(e))}function Yn(e,t,r){(r!==s&&!Rt(e[t],r)||r===s&&!(t in e))&&Qt(e,t,r)}function Es(e,t,r){var i=e[t];(!(Te.call(e,t)&&Rt(i,r))||r===s&&!(t in e))&&Qt(e,t,r)}function Ea(e,t){for(var r=e.length;r--;)if(Rt(e[r][0],t))return r;return-1}function Py(e,t,r,i){return mr(e,function(p,u,y){t(i,p,r(p),y)}),i}function Cl(e,t){return e&&jt(t,He(t),e)}function Oy(e,t){return e&&jt(t,it(t),e)}function Qt(e,t,r){t=="__proto__"&&Ia?Ia(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Qn(e,t){for(var r=-1,i=t.length,p=D(i),u=e==null;++r<i;)p[r]=u?s:Si(e,t[r]);return p}function Ar(e,t,r){return e===e&&(r!==s&&(e=e<=r?e:r),t!==s&&(e=e>=t?e:t)),e}function At(e,t,r,i,p,u){var y,x=t&T,v=t&O,C=t&K;if(r&&(y=p?r(e,i,p,u):r(e)),y!==s)return y;if(!ze(e))return e;var z=ae(e);if(z){if(y=k_(e),!x)return at(e,y)}else{var E=Qe(e),j=E==hr||E==aa;if(fr(e))return Jl(e,x);if(E==vt||E==$e||j&&!p){if(y=v||j?{}:bc(e),!x)return v?y_(e,Oy(y,e)):u_(e,Cl(y,e))}else{if(!ke[E])return p?e:{};y=I_(e,E,x)}}u||(u=new Ot);var X=u.get(e);if(X)return X;u.set(e,y),Gc(e)?e.forEach(function(J){y.add(At(J,t,r,J,e,u))}):Hc(e)&&e.forEach(function(J,de){y.set(de,At(J,t,r,de,e,u))});var Z=C?v?gi:fi:v?it:He,oe=z?s:Z(e);return Dt(oe||e,function(J,de){oe&&(de=J,J=e[de]),Es(y,de,At(J,t,r,de,e,u))}),y}function Ry(e){var t=He(e);return function(r){return zl(r,e,t)}}function zl(e,t,r){var i=r.length;if(e==null)return!i;for(e=De(e);i--;){var p=r[i],u=t[p],y=e[p];if(y===s&&!(p in e)||!u(y))return!1}return!0}function Sl(e,t,r){if(typeof e!="function")throw new kt(m);return Fs(function(){e.apply(s,r)},t)}function Ns(e,t,r,i){var p=-1,u=_a,y=!0,x=e.length,v=[],C=t.length;if(!x)return v;r&&(t=qe(t,yt(r))),i?(u=On,y=!1):t.length>=c&&(u=Is,y=!1,t=new Ir(t));e:for(;++p<x;){var z=e[p],E=r==null?z:r(z);if(z=i||z!==0?z:0,y&&E===E){for(var j=C;j--;)if(t[j]===E)continue e;v.push(z)}else u(t,E,i)||v.push(z)}return v}var mr=ac($t),El=ac(Jn,!0);function Fy(e,t){var r=!0;return mr(e,function(i,p,u){return r=!!t(i,p,u),r}),r}function Na(e,t,r){for(var i=-1,p=e.length;++i<p;){var u=e[i],y=t(u);if(y!=null&&(x===s?y===y&&!ft(y):r(y,x)))var x=y,v=u}return v}function By(e,t,r,i){var p=e.length;for(r=ne(r),r<0&&(r=-r>p?0:p+r),i=i===s||i>p?p:ne(i),i<0&&(i+=p),i=r>i?0:Vc(i);r<i;)e[r++]=t;return e}function Nl(e,t){var r=[];return mr(e,function(i,p,u){t(i,p,u)&&r.push(i)}),r}function Xe(e,t,r,i,p){var u=-1,y=e.length;for(r||(r=q_),p||(p=[]);++u<y;){var x=e[u];t>0&&r(x)?t>1?Xe(x,t-1,r,i,p):cr(p,x):i||(p[p.length]=x)}return p}var Zn=nc(),Ll=nc(!0);function $t(e,t){return e&&Zn(e,t,He)}function Jn(e,t){return e&&Ll(e,t,He)}function La(e,t){return lr(t,function(r){return tr(e[r])})}function qr(e,t){t=yr(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Ht(t[r++])];return r&&r==i?e:s}function Ml(e,t,r){var i=t(e);return ae(e)?i:cr(i,r(e))}function Ze(e){return e==null?e===s?Tn:Or:Dr&&Dr in De(e)?v_(e):M_(e)}function ei(e,t){return e>t}function Uy(e,t){return e!=null&&Te.call(e,t)}function Ky(e,t){return e!=null&&t in De(e)}function $y(e,t,r){return e>=Ye(t,r)&&e<Be(t,r)}function ti(e,t,r){for(var i=r?On:_a,p=e[0].length,u=e.length,y=u,x=D(u),v=1/0,C=[];y--;){var z=e[y];y&&t&&(z=qe(z,yt(t))),v=Ye(z.length,v),x[y]=!r&&(t||p>=120&&z.length>=120)?new Ir(y&&z):s}z=e[0];var E=-1,j=x[0];e:for(;++E<p&&C.length<v;){var X=z[E],Z=t?t(X):X;if(X=r||X!==0?X:0,!(j?Is(j,Z):i(C,Z,r))){for(y=u;--y;){var oe=x[y];if(!(oe?Is(oe,Z):i(e[y],Z,r)))continue e}j&&j.push(Z),C.push(X)}}return C}function jy(e,t,r,i){return $t(e,function(p,u,y){t(i,r(p),u,y)}),i}function Ls(e,t,r){t=yr(t,e),e=vc(e,t);var i=e==null?e:e[Ht(Ct(t))];return i==null?s:ut(i,e,r)}function Pl(e){return Le(e)&&Ze(e)==$e}function Hy(e){return Le(e)&&Ze(e)==Lt}function Wy(e){return Le(e)&&Ze(e)==Wt}function Ms(e,t,r,i,p){return e===t?!0:e==null||t==null||!Le(e)&&!Le(t)?e!==e&&t!==t:Gy(e,t,r,i,Ms,p)}function Gy(e,t,r,i,p,u){var y=ae(e),x=ae(t),v=y?je:Qe(e),C=x?je:Qe(t);v=v==$e?vt:v,C=C==$e?vt:C;var z=v==vt,E=C==vt,j=v==C;if(j&&fr(e)){if(!fr(t))return!1;y=!0,z=!1}if(j&&!z)return u||(u=new Ot),y||ts(e)?_c(e,t,r,i,p,u):h_(e,t,v,r,i,p,u);if(!(r&F)){var X=z&&Te.call(e,"__wrapped__"),Z=E&&Te.call(t,"__wrapped__");if(X||Z){var oe=X?e.value():e,J=Z?t.value():t;return u||(u=new Ot),p(oe,J,r,i,u)}}return j?(u||(u=new Ot),w_(e,t,r,i,p,u)):!1}function Xy(e){return Le(e)&&Qe(e)==dt}function ri(e,t,r,i){var p=r.length,u=p,y=!i;if(e==null)return!u;for(e=De(e);p--;){var x=r[p];if(y&&x[2]?x[1]!==e[x[0]]:!(x[0]in e))return!1}for(;++p<u;){x=r[p];var v=x[0],C=e[v],z=x[1];if(y&&x[2]){if(C===s&&!(v in e))return!1}else{var E=new Ot;if(i)var j=i(C,z,v,e,t,E);if(!(j===s?Ms(z,C,F|N,i,E):j))return!1}}return!0}function Ol(e){if(!ze(e)||z_(e))return!1;var t=tr(e)?Xu:We;return t.test(zr(e))}function Vy(e){return Le(e)&&Ze(e)==wr}function Yy(e){return Le(e)&&Qe(e)==mt}function Qy(e){return Le(e)&&Qa(e.length)&&!!Ae[Ze(e)]}function Rl(e){return typeof e=="function"?e:e==null?ot:typeof e=="object"?ae(e)?Ul(e[0],e[1]):Bl(e):ip(e)}function si(e){if(!Rs(e))return ey(e);var t=[];for(var r in De(e))Te.call(e,r)&&r!="constructor"&&t.push(r);return t}function Zy(e){if(!ze(e))return L_(e);var t=Rs(e),r=[];for(var i in e)i=="constructor"&&(t||!Te.call(e,i))||r.push(i);return r}function ai(e,t){return e<t}function Fl(e,t){var r=-1,i=nt(e)?D(e.length):[];return mr(e,function(p,u,y){i[++r]=t(p,u,y)}),i}function Bl(e){var t=xi(e);return t.length==1&&t[0][2]?hc(t[0][0],t[0][1]):function(r){return r===e||ri(r,e,t)}}function Ul(e,t){return wi(e)&&xc(t)?hc(Ht(e),t):function(r){var i=Si(r,e);return i===s&&i===t?Ei(r,e):Ms(t,i,F|N)}}function Ma(e,t,r,i,p){e!==t&&Zn(t,function(u,y){if(p||(p=new Ot),ze(u))Jy(e,t,y,r,Ma,i,p);else{var x=i?i(Ti(e,y),u,y+"",e,t,p):s;x===s&&(x=u),Yn(e,y,x)}},it)}function Jy(e,t,r,i,p,u,y){var x=Ti(e,r),v=Ti(t,r),C=y.get(v);if(C){Yn(e,r,C);return}var z=u?u(x,v,r+"",e,t,y):s,E=z===s;if(E){var j=ae(v),X=!j&&fr(v),Z=!j&&!X&&ts(v);z=v,j||X||Z?ae(x)?z=x:Pe(x)?z=at(x):X?(E=!1,z=Jl(v,!0)):Z?(E=!1,z=ec(v,!0)):z=[]:Bs(v)||Sr(v)?(z=x,Sr(x)?z=Yc(x):(!ze(x)||tr(x))&&(z=bc(v))):E=!1}E&&(y.set(v,z),p(z,v,i,u,y),y.delete(v)),Yn(e,r,z)}function Kl(e,t){var r=e.length;if(r)return t+=t<0?r:0,er(t,r)?e[t]:s}function $l(e,t,r){t.length?t=qe(t,function(u){return ae(u)?function(y){return qr(y,u.length===1?u[0]:u)}:u}):t=[ot];var i=-1;t=qe(t,yt(Q()));var p=Fl(e,function(u,y,x){var v=qe(t,function(C){return C(u)});return{criteria:v,index:++i,value:u}});return Iu(p,function(u,y){return m_(u,y,r)})}function e_(e,t){return jl(e,t,function(r,i){return Ei(e,i)})}function jl(e,t,r){for(var i=-1,p=t.length,u={};++i<p;){var y=t[i],x=qr(e,y);r(x,y)&&Ps(u,yr(y,e),x)}return u}function t_(e){return function(t){return qr(t,e)}}function ni(e,t,r,i){var p=i?ku:jr,u=-1,y=t.length,x=e;for(e===t&&(t=at(t)),r&&(x=qe(e,yt(r)));++u<y;)for(var v=0,C=t[u],z=r?r(C):C;(v=p(x,z,v,i))>-1;)x!==e&&ka.call(x,v,1),ka.call(e,v,1);return e}function Hl(e,t){for(var r=e?t.length:0,i=r-1;r--;){var p=t[r];if(r==i||p!==u){var u=p;er(p)?ka.call(e,p,1):ci(e,p)}}return e}function ii(e,t){return e+qa(kl()*(t-e+1))}function r_(e,t,r,i){for(var p=-1,u=Be(Aa((t-e)/(r||1)),0),y=D(u);u--;)y[i?u:++p]=e,e+=r;return y}function oi(e,t){var r="";if(!e||t<1||t>Me)return r;do t%2&&(r+=e),t=qa(t/2),t&&(e+=e);while(t);return r}function ce(e,t){return Di(wc(e,t,ot),e+"")}function s_(e){return ql(rs(e))}function a_(e,t){var r=rs(e);return Ha(r,Ar(t,0,r.length))}function Ps(e,t,r,i){if(!ze(e))return e;t=yr(t,e);for(var p=-1,u=t.length,y=u-1,x=e;x!=null&&++p<u;){var v=Ht(t[p]),C=r;if(v==="__proto__"||v==="constructor"||v==="prototype")return e;if(p!=y){var z=x[v];C=i?i(z,v,x):s,C===s&&(C=ze(z)?z:er(t[p+1])?[]:{})}Es(x,v,C),x=x[v]}return e}var Wl=Ca?function(e,t){return Ca.set(e,t),e}:ot,n_=Ia?function(e,t){return Ia(e,"toString",{configurable:!0,enumerable:!1,value:Li(t),writable:!0})}:ot;function i_(e){return Ha(rs(e))}function qt(e,t,r){var i=-1,p=e.length;t<0&&(t=-t>p?0:p+t),r=r>p?p:r,r<0&&(r+=p),p=t>r?0:r-t>>>0,t>>>=0;for(var u=D(p);++i<p;)u[i]=e[i+t];return u}function o_(e,t){var r;return mr(e,function(i,p,u){return r=t(i,p,u),!r}),!!r}function Pa(e,t,r){var i=0,p=e==null?i:e.length;if(typeof t=="number"&&t===t&&p<=Re){for(;i<p;){var u=i+p>>>1,y=e[u];y!==null&&!ft(y)&&(r?y<=t:y<t)?i=u+1:p=u}return p}return li(e,t,ot,r)}function li(e,t,r,i){var p=0,u=e==null?0:e.length;if(u===0)return 0;t=r(t);for(var y=t!==t,x=t===null,v=ft(t),C=t===s;p<u;){var z=qa((p+u)/2),E=r(e[z]),j=E!==s,X=E===null,Z=E===E,oe=ft(E);if(y)var J=i||Z;else C?J=Z&&(i||j):x?J=Z&&j&&(i||!X):v?J=Z&&j&&!X&&(i||!oe):X||oe?J=!1:J=i?E<=t:E<t;J?p=z+1:u=z}return Ye(u,xe)}function Gl(e,t){for(var r=-1,i=e.length,p=0,u=[];++r<i;){var y=e[r],x=t?t(y):y;if(!r||!Rt(x,v)){var v=x;u[p++]=y===0?0:y}}return u}function Xl(e){return typeof e=="number"?e:ft(e)?wt:+e}function _t(e){if(typeof e=="string")return e;if(ae(e))return qe(e,_t)+"";if(ft(e))return Il?Il.call(e):"";var t=e+"";return t=="0"&&1/e==-Ee?"-0":t}function ur(e,t,r){var i=-1,p=_a,u=e.length,y=!0,x=[],v=x;if(r)y=!1,p=On;else if(u>=c){var C=t?null:b_(e);if(C)return ga(C);y=!1,p=Is,v=new Ir}else v=t?[]:x;e:for(;++i<u;){var z=e[i],E=t?t(z):z;if(z=r||z!==0?z:0,y&&E===E){for(var j=v.length;j--;)if(v[j]===E)continue e;t&&v.push(E),x.push(z)}else p(v,E,r)||(v!==x&&v.push(E),x.push(z))}return x}function ci(e,t){return t=yr(t,e),e=vc(e,t),e==null||delete e[Ht(Ct(t))]}function Vl(e,t,r,i){return Ps(e,t,r(qr(e,t)),i)}function Oa(e,t,r,i){for(var p=e.length,u=i?p:-1;(i?u--:++u<p)&&t(e[u],u,e););return r?qt(e,i?0:u,i?u+1:p):qt(e,i?u+1:0,i?p:u)}function Yl(e,t){var r=e;return r instanceof ue&&(r=r.value()),Rn(t,function(i,p){return p.func.apply(p.thisArg,cr([i],p.args))},r)}function pi(e,t,r){var i=e.length;if(i<2)return i?ur(e[0]):[];for(var p=-1,u=D(i);++p<i;)for(var y=e[p],x=-1;++x<i;)x!=p&&(u[p]=Ns(u[p]||y,e[x],t,r));return ur(Xe(u,1),t,r)}function Ql(e,t,r){for(var i=-1,p=e.length,u=t.length,y={};++i<p;){var x=i<u?t[i]:s;r(y,e[i],x)}return y}function di(e){return Pe(e)?e:[]}function mi(e){return typeof e=="function"?e:ot}function yr(e,t){return ae(e)?e:wi(e,t)?[e]:Ic(ve(e))}var l_=ce;function _r(e,t,r){var i=e.length;return r=r===s?i:r,!t&&r>=i?e:qt(e,t,r)}var Zl=Vu||function(e){return Ge.clearTimeout(e)};function Jl(e,t){if(t)return e.slice();var r=e.length,i=hl?hl(r):new e.constructor(r);return e.copy(i),i}function ui(e){var t=new e.constructor(e.byteLength);return new Ta(t).set(new Ta(e)),t}function c_(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function p_(e){var t=new e.constructor(e.source,we.exec(e));return t.lastIndex=e.lastIndex,t}function d_(e){return Ss?De(Ss.call(e)):{}}function ec(e,t){var r=t?ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function tc(e,t){if(e!==t){var r=e!==s,i=e===null,p=e===e,u=ft(e),y=t!==s,x=t===null,v=t===t,C=ft(t);if(!x&&!C&&!u&&e>t||u&&y&&v&&!x&&!C||i&&y&&v||!r&&v||!p)return 1;if(!i&&!u&&!C&&e<t||C&&r&&p&&!i&&!u||x&&r&&p||!y&&p||!v)return-1}return 0}function m_(e,t,r){for(var i=-1,p=e.criteria,u=t.criteria,y=p.length,x=r.length;++i<y;){var v=tc(p[i],u[i]);if(v){if(i>=x)return v;var C=r[i];return v*(C=="desc"?-1:1)}}return e.index-t.index}function rc(e,t,r,i){for(var p=-1,u=e.length,y=r.length,x=-1,v=t.length,C=Be(u-y,0),z=D(v+C),E=!i;++x<v;)z[x]=t[x];for(;++p<y;)(E||p<u)&&(z[r[p]]=e[p]);for(;C--;)z[x++]=e[p++];return z}function sc(e,t,r,i){for(var p=-1,u=e.length,y=-1,x=r.length,v=-1,C=t.length,z=Be(u-x,0),E=D(z+C),j=!i;++p<z;)E[p]=e[p];for(var X=p;++v<C;)E[X+v]=t[v];for(;++y<x;)(j||p<u)&&(E[X+r[y]]=e[p++]);return E}function at(e,t){var r=-1,i=e.length;for(t||(t=D(i));++r<i;)t[r]=e[r];return t}function jt(e,t,r,i){var p=!r;r||(r={});for(var u=-1,y=t.length;++u<y;){var x=t[u],v=i?i(r[x],e[x],x,r,e):s;v===s&&(v=e[x]),p?Qt(r,x,v):Es(r,x,v)}return r}function u_(e,t){return jt(e,hi(e),t)}function y_(e,t){return jt(e,fc(e),t)}function Ra(e,t){return function(r,i){var p=ae(r)?xu:Py,u=t?t():{};return p(r,e,Q(i,2),u)}}function Zr(e){return ce(function(t,r){var i=-1,p=r.length,u=p>1?r[p-1]:s,y=p>2?r[2]:s;for(u=e.length>3&&typeof u=="function"?(p--,u):s,y&&Je(r[0],r[1],y)&&(u=p<3?s:u,p=1),t=De(t);++i<p;){var x=r[i];x&&e(t,x,i,u)}return t})}function ac(e,t){return function(r,i){if(r==null)return r;if(!nt(r))return e(r,i);for(var p=r.length,u=t?p:-1,y=De(r);(t?u--:++u<p)&&i(y[u],u,y)!==!1;);return r}}function nc(e){return function(t,r,i){for(var p=-1,u=De(t),y=i(t),x=y.length;x--;){var v=y[e?x:++p];if(r(u[v],v,u)===!1)break}return t}}function __(e,t,r){var i=t&H,p=Os(e);function u(){var y=this&&this!==Ge&&this instanceof u?p:e;return y.apply(i?r:this,arguments)}return u}function ic(e){return function(t){t=ve(t);var r=Hr(t)?Pt(t):s,i=r?r[0]:t.charAt(0),p=r?_r(r,1).join(""):t.slice(1);return i[e]()+p}}function Jr(e){return function(t){return Rn(ap(sp(t).replace(nu,"")),e,"")}}function Os(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Qr(e.prototype),i=e.apply(r,t);return ze(i)?i:r}}function f_(e,t,r){var i=Os(e);function p(){for(var u=arguments.length,y=D(u),x=u,v=es(p);x--;)y[x]=arguments[x];var C=u<3&&y[0]!==v&&y[u-1]!==v?[]:pr(y,v);if(u-=C.length,u<r)return dc(e,t,Fa,p.placeholder,s,y,C,s,s,r-u);var z=this&&this!==Ge&&this instanceof p?i:e;return ut(z,this,y)}return p}function oc(e){return function(t,r,i){var p=De(t);if(!nt(t)){var u=Q(r,3);t=He(t),r=function(x){return u(p[x],x,p)}}var y=e(t,r,i);return y>-1?p[u?t[y]:y]:s}}function lc(e){return Jt(function(t){var r=t.length,i=r,p=It.prototype.thru;for(e&&t.reverse();i--;){var u=t[i];if(typeof u!="function")throw new kt(m);if(p&&!y&&$a(u)=="wrapper")var y=new It([],!0)}for(i=y?i:r;++i<r;){u=t[i];var x=$a(u),v=x=="wrapper"?bi(u):s;v&&vi(v[0])&&v[1]==(U|B|P|te)&&!v[4].length&&v[9]==1?y=y[$a(v[0])].apply(y,v[3]):y=u.length==1&&vi(u)?y[x]():y.thru(u)}return function(){var C=arguments,z=C[0];if(y&&C.length==1&&ae(z))return y.plant(z).value();for(var E=0,j=r?t[E].apply(this,C):z;++E<r;)j=t[E].call(this,j);return j}})}function Fa(e,t,r,i,p,u,y,x,v,C){var z=t&U,E=t&H,j=t&V,X=t&(B|k),Z=t&fe,oe=j?s:Os(e);function J(){for(var de=arguments.length,ye=D(de),gt=de;gt--;)ye[gt]=arguments[gt];if(X)var et=es(J),bt=qu(ye,et);if(i&&(ye=rc(ye,i,p,X)),u&&(ye=sc(ye,u,y,X)),de-=bt,X&&de<C){var Oe=pr(ye,et);return dc(e,t,Fa,J.placeholder,r,ye,Oe,x,v,C-de)}var Ft=E?r:this,sr=j?Ft[e]:e;return de=ye.length,x?ye=P_(ye,x):Z&&de>1&&ye.reverse(),z&&v<de&&(ye.length=v),this&&this!==Ge&&this instanceof J&&(sr=oe||Os(sr)),sr.apply(Ft,ye)}return J}function cc(e,t){return function(r,i){return jy(r,e,t(i),{})}}function Ba(e,t){return function(r,i){var p;if(r===s&&i===s)return t;if(r!==s&&(p=r),i!==s){if(p===s)return i;typeof r=="string"||typeof i=="string"?(r=_t(r),i=_t(i)):(r=Xl(r),i=Xl(i)),p=e(r,i)}return p}}function yi(e){return Jt(function(t){return t=qe(t,yt(Q())),ce(function(r){var i=this;return e(t,function(p){return ut(p,i,r)})})})}function Ua(e,t){t=t===s?" ":_t(t);var r=t.length;if(r<2)return r?oi(t,e):t;var i=oi(t,Aa(e/Wr(t)));return Hr(t)?_r(Pt(i),0,e).join(""):i.slice(0,e)}function g_(e,t,r,i){var p=t&H,u=Os(e);function y(){for(var x=-1,v=arguments.length,C=-1,z=i.length,E=D(z+v),j=this&&this!==Ge&&this instanceof y?u:e;++C<z;)E[C]=i[C];for(;v--;)E[C++]=arguments[++x];return ut(j,p?r:this,E)}return y}function pc(e){return function(t,r,i){return i&&typeof i!="number"&&Je(t,r,i)&&(r=i=s),t=rr(t),r===s?(r=t,t=0):r=rr(r),i=i===s?t<r?1:-1:rr(i),r_(t,r,i,e)}}function Ka(e){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=zt(t),r=zt(r)),e(t,r)}}function dc(e,t,r,i,p,u,y,x,v,C){var z=t&B,E=z?y:s,j=z?s:y,X=z?u:s,Z=z?s:u;t|=z?P:S,t&=~(z?S:P),t&G||(t&=~(H|V));var oe=[e,t,p,X,E,Z,j,x,v,C],J=r.apply(s,oe);return vi(e)&&Tc(J,oe),J.placeholder=i,Dc(J,e,t)}function _i(e){var t=Fe[e];return function(r,i){if(r=zt(r),i=i==null?0:Ye(ne(i),292),i&&Dl(r)){var p=(ve(r)+"e").split("e"),u=t(p[0]+"e"+(+p[1]+i));return p=(ve(u)+"e").split("e"),+(p[0]+"e"+(+p[1]-i))}return t(r)}}var b_=Vr&&1/ga(new Vr([,-0]))[1]==Ee?function(e){return new Vr(e)}:Oi;function mc(e){return function(t){var r=Qe(t);return r==dt?Hn(t):r==mt?Mu(t):Au(t,e(t))}}function Zt(e,t,r,i,p,u,y,x){var v=t&V;if(!v&&typeof e!="function")throw new kt(m);var C=i?i.length:0;if(C||(t&=~(P|S),i=p=s),y=y===s?y:Be(ne(y),0),x=x===s?x:ne(x),C-=p?p.length:0,t&S){var z=i,E=p;i=p=s}var j=v?s:bi(e),X=[e,t,r,i,p,z,E,u,y,x];if(j&&N_(X,j),e=X[0],t=X[1],r=X[2],i=X[3],p=X[4],x=X[9]=X[9]===s?v?0:e.length:Be(X[9]-C,0),!x&&t&(B|k)&&(t&=~(B|k)),!t||t==H)var Z=__(e,t,r);else t==B||t==k?Z=f_(e,t,x):(t==P||t==(H|P))&&!p.length?Z=g_(e,t,r,i):Z=Fa.apply(s,X);var oe=j?Wl:Tc;return Dc(oe(Z,X),e,t)}function uc(e,t,r,i){return e===s||Rt(e,Xr[r])&&!Te.call(i,r)?t:e}function yc(e,t,r,i,p,u){return ze(e)&&ze(t)&&(u.set(t,e),Ma(e,t,s,yc,u),u.delete(t)),e}function x_(e){return Bs(e)?s:e}function _c(e,t,r,i,p,u){var y=r&F,x=e.length,v=t.length;if(x!=v&&!(y&&v>x))return!1;var C=u.get(e),z=u.get(t);if(C&&z)return C==t&&z==e;var E=-1,j=!0,X=r&N?new Ir:s;for(u.set(e,t),u.set(t,e);++E<x;){var Z=e[E],oe=t[E];if(i)var J=y?i(oe,Z,E,t,e,u):i(Z,oe,E,e,t,u);if(J!==s){if(J)continue;j=!1;break}if(X){if(!Fn(t,function(de,ye){if(!Is(X,ye)&&(Z===de||p(Z,de,r,i,u)))return X.push(ye)})){j=!1;break}}else if(!(Z===oe||p(Z,oe,r,i,u))){j=!1;break}}return u.delete(e),u.delete(t),j}function h_(e,t,r,i,p,u,y){switch(r){case or:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Lt:return!(e.byteLength!=t.byteLength||!u(new Ta(e),new Ta(t)));case Ut:case Wt:case Kt:return Rt(+e,+t);case Pr:return e.name==t.name&&e.message==t.message;case wr:case Gt:return e==t+"";case dt:var x=Hn;case mt:var v=i&F;if(x||(x=ga),e.size!=t.size&&!v)return!1;var C=y.get(e);if(C)return C==t;i|=N,y.set(e,t);var z=_c(x(e),x(t),i,p,u,y);return y.delete(e),z;case Fr:if(Ss)return Ss.call(e)==Ss.call(t)}return!1}function w_(e,t,r,i,p,u){var y=r&F,x=fi(e),v=x.length,C=fi(t),z=C.length;if(v!=z&&!y)return!1;for(var E=v;E--;){var j=x[E];if(!(y?j in t:Te.call(t,j)))return!1}var X=u.get(e),Z=u.get(t);if(X&&Z)return X==t&&Z==e;var oe=!0;u.set(e,t),u.set(t,e);for(var J=y;++E<v;){j=x[E];var de=e[j],ye=t[j];if(i)var gt=y?i(ye,de,j,t,e,u):i(de,ye,j,e,t,u);if(!(gt===s?de===ye||p(de,ye,r,i,u):gt)){oe=!1;break}J||(J=j=="constructor")}if(oe&&!J){var et=e.constructor,bt=t.constructor;et!=bt&&"constructor"in e&&"constructor"in t&&!(typeof et=="function"&&et instanceof et&&typeof bt=="function"&&bt instanceof bt)&&(oe=!1)}return u.delete(e),u.delete(t),oe}function Jt(e){return Di(wc(e,s,zc),e+"")}function fi(e){return Ml(e,He,hi)}function gi(e){return Ml(e,it,fc)}var bi=Ca?function(e){return Ca.get(e)}:Oi;function $a(e){for(var t=e.name+"",r=Yr[t],i=Te.call(Yr,t)?r.length:0;i--;){var p=r[i],u=p.func;if(u==null||u==e)return p.name}return t}function es(e){var t=Te.call(d,"placeholder")?d:e;return t.placeholder}function Q(){var e=d.iteratee||Mi;return e=e===Mi?Rl:e,arguments.length?e(arguments[0],arguments[1]):e}function ja(e,t){var r=e.__data__;return C_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function xi(e){for(var t=He(e),r=t.length;r--;){var i=t[r],p=e[i];t[r]=[i,p,xc(p)]}return t}function Cr(e,t){var r=Eu(e,t);return Ol(r)?r:s}function v_(e){var t=Te.call(e,Dr),r=e[Dr];try{e[Dr]=s;var i=!0}catch{}var p=wa.call(e);return i&&(t?e[Dr]=r:delete e[Dr]),p}var hi=Gn?function(e){return e==null?[]:(e=De(e),lr(Gn(e),function(t){return vl.call(e,t)}))}:Ri,fc=Gn?function(e){for(var t=[];e;)cr(t,hi(e)),e=Da(e);return t}:Ri,Qe=Ze;(Xn&&Qe(new Xn(new ArrayBuffer(1)))!=or||qs&&Qe(new qs)!=dt||Vn&&Qe(Vn.resolve())!=_s||Vr&&Qe(new Vr)!=mt||Cs&&Qe(new Cs)!=ir)&&(Qe=function(e){var t=Ze(e),r=t==vt?e.constructor:s,i=r?zr(r):"";if(i)switch(i){case ay:return or;case ny:return dt;case iy:return _s;case oy:return mt;case ly:return ir}return t});function T_(e,t,r){for(var i=-1,p=r.length;++i<p;){var u=r[i],y=u.size;switch(u.type){case"drop":e+=y;break;case"dropRight":t-=y;break;case"take":t=Ye(t,e+y);break;case"takeRight":e=Be(e,t-y);break}}return{start:e,end:t}}function D_(e){var t=e.match(Cn);return t?t[1].split(g):[]}function gc(e,t,r){t=yr(t,e);for(var i=-1,p=t.length,u=!1;++i<p;){var y=Ht(t[i]);if(!(u=e!=null&&r(e,y)))break;e=e[y]}return u||++i!=p?u:(p=e==null?0:e.length,!!p&&Qa(p)&&er(y,p)&&(ae(e)||Sr(e)))}function k_(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function bc(e){return typeof e.constructor=="function"&&!Rs(e)?Qr(Da(e)):{}}function I_(e,t,r){var i=e.constructor;switch(t){case Lt:return ui(e);case Ut:case Wt:return new i(+e);case or:return c_(e,r);case Br:case Ur:case vr:case fs:case gs:case bs:case xs:case hs:case ws:return ec(e,r);case dt:return new i;case Kt:case Gt:return new i(e);case wr:return p_(e);case mt:return new i;case Fr:return d_(e)}}function A_(e,t){var r=t.length;if(!r)return e;var i=r-1;return t[i]=(r>1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(qn,`{
|
119
119
|
/* [wrapped with `+t+`] */
|
120
|
-
`)}function q_(e){return ae(e)||Sr(e)||!!(Tl&&e&&e[Tl])}function er(e,t){var r=typeof e;return t=t??Me,!!t&&(r=="number"||r!="symbol"&&Ee.test(e))&&e>-1&&e%1==0&&e<t}function Je(e,t,r){if(!ze(r))return!1;var i=typeof t;return(i=="number"?nt(r)&&er(t,r.length):i=="string"&&t in r)?Rt(r[t],e):!1}function wi(e,t){if(ae(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ft(e)?!0:da.test(e)||!pa.test(e)||t!=null&&e in De(t)}function C_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function vi(e){var t=$a(e),r=d[t];if(typeof r!="function"||!(t in ue.prototype))return!1;if(e===r)return!0;var i=bi(r);return!!i&&e===i[0]}function z_(e){return!!xl&&xl in e}var S_=xa?tr:Fi;function Rs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Xr;return e===r}function xc(e){return e===e&&!ze(e)}function hc(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==s||e in De(r))}}function N_(e){var t=Va(e,function(i){return r.size===b&&r.clear(),i}),r=t.cache;return t}function E_(e,t){var r=e[1],i=t[1],p=r|i,u=p<(H|V|U),y=i==U&&r==B||i==U&&r==te&&e[7].length<=t[8]||i==(U|te)&&t[7].length<=t[8]&&r==B;if(!(u||y))return e;i&H&&(e[2]=t[2],p|=r&H?0:G);var x=t[3];if(x){var v=e[3];e[3]=v?rc(v,x,t[4]):x,e[4]=v?pr(e[3],h):t[4]}return x=t[5],x&&(v=e[5],e[5]=v?sc(v,x,t[6]):x,e[6]=v?pr(e[5],h):t[6]),x=t[7],x&&(e[7]=x),i&U&&(e[8]=e[8]==null?t[8]:Ye(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=p,e}function L_(e){var t=[];if(e!=null)for(var r in De(e))t.push(r);return t}function M_(e){return wa.call(e)}function wc(e,t,r){return t=Be(t===s?e.length-1:t,0),function(){for(var i=arguments,p=-1,u=Be(i.length-t,0),y=D(u);++p<u;)y[p]=i[t+p];p=-1;for(var x=D(t+1);++p<t;)x[p]=i[p];return x[t]=r(y),ut(e,this,x)}}function vc(e,t){return t.length<2?e:qr(e,qt(t,0,-1))}function P_(e,t){for(var r=e.length,i=Ye(t.length,r),p=at(e);i--;){var u=t[i];e[i]=er(u,r)?p[u]:s}return e}function Ti(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Tc=kc(Wl),Fs=Qu||function(e,t){return Ge.setTimeout(e,t)},Di=kc(n_);function Dc(e,t,r){var i=t+"";return Di(e,A_(i,O_(D_(i),r)))}function kc(e){var t=0,r=0;return function(){var i=ty(),p=Ue-(i-r);if(r=i,p>0){if(++t>=Nt)return arguments[0]}else t=0;return e.apply(s,arguments)}}function Ha(e,t){var r=-1,i=e.length,p=i-1;for(t=t===s?i:t;++r<t;){var u=ii(r,p),y=e[u];e[u]=e[r],e[r]=y}return e.length=t,e}var Ic=N_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(In,function(r,i,p,u){t.push(p?u.replace(ee,"$1"):i||r)}),t});function Ht(e){if(typeof e=="string"||ft(e))return e;var t=e+"";return t=="0"&&1/e==-Ne?"-0":t}function zr(e){if(e!=null){try{return ha.call(e)}catch{}try{return e+""}catch{}}return""}function O_(e,t){return Dt(Et,function(r){var i="_."+r[0];t&r[1]&&!_a(e,i)&&e.push(i)}),e.sort()}function Ac(e){if(e instanceof ue)return e.clone();var t=new It(e.__wrapped__,e.__chain__);return t.__actions__=at(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function R_(e,t,r){(r?Je(e,t,r):t===s)?t=1:t=Be(ne(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var p=0,u=0,y=D(Aa(i/t));p<i;)y[u++]=qt(e,p,p+=t);return y}function F_(e){for(var t=-1,r=e==null?0:e.length,i=0,p=[];++t<r;){var u=e[t];u&&(p[i++]=u)}return p}function B_(){var e=arguments.length;if(!e)return[];for(var t=D(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return cr(ae(r)?at(r):[r],Xe(t,1))}var U_=ce(function(e,t){return Pe(e)?Es(e,Xe(t,1,Pe,!0)):[]}),K_=ce(function(e,t){var r=Ct(t);return Pe(r)&&(r=s),Pe(e)?Es(e,Xe(t,1,Pe,!0),Q(r,2)):[]}),$_=ce(function(e,t){var r=Ct(t);return Pe(r)&&(r=s),Pe(e)?Es(e,Xe(t,1,Pe,!0),s,r):[]});function j_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ne(t),qt(e,t<0?0:t,i)):[]}function H_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ne(t),t=i-t,qt(e,0,t<0?0:t)):[]}function W_(e,t){return e&&e.length?Oa(e,Q(t,3),!0,!0):[]}function G_(e,t){return e&&e.length?Oa(e,Q(t,3),!0):[]}function X_(e,t,r,i){var p=e==null?0:e.length;return p?(r&&typeof r!="number"&&Je(e,t,r)&&(r=0,i=p),By(e,t,r,i)):[]}function qc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:ne(r);return p<0&&(p=Be(i+p,0)),fa(e,Q(t,3),p)}function Cc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i-1;return r!==s&&(p=ne(r),p=r<0?Be(i+p,0):Ye(p,i-1)),fa(e,Q(t,3),p,!0)}function zc(e){var t=e==null?0:e.length;return t?Xe(e,1):[]}function V_(e){var t=e==null?0:e.length;return t?Xe(e,Ne):[]}function Y_(e,t){var r=e==null?0:e.length;return r?(t=t===s?1:ne(t),Xe(e,t)):[]}function Q_(e){for(var t=-1,r=e==null?0:e.length,i={};++t<r;){var p=e[t];i[p[0]]=p[1]}return i}function Sc(e){return e&&e.length?e[0]:s}function Z_(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:ne(r);return p<0&&(p=Be(i+p,0)),jr(e,t,p)}function J_(e){var t=e==null?0:e.length;return t?qt(e,0,-1):[]}var ef=ce(function(e){var t=qe(e,di);return t.length&&t[0]===e[0]?ti(t):[]}),tf=ce(function(e){var t=Ct(e),r=qe(e,di);return t===Ct(r)?t=s:r.pop(),r.length&&r[0]===e[0]?ti(r,Q(t,2)):[]}),rf=ce(function(e){var t=Ct(e),r=qe(e,di);return t=typeof t=="function"?t:s,t&&r.pop(),r.length&&r[0]===e[0]?ti(r,s,t):[]});function sf(e,t){return e==null?"":Ju.call(e,t)}function Ct(e){var t=e==null?0:e.length;return t?e[t-1]:s}function af(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i;return r!==s&&(p=ne(r),p=p<0?Be(i+p,0):Ye(p,i-1)),t===t?Ou(e,t,p):fa(e,dl,p,!0)}function nf(e,t){return e&&e.length?Kl(e,ne(t)):s}var of=ce(Nc);function Nc(e,t){return e&&e.length&&t&&t.length?ni(e,t):e}function lf(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,Q(r,2)):e}function cf(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,s,r):e}var pf=Jt(function(e,t){var r=e==null?0:e.length,i=Qn(e,t);return Hl(e,qe(t,function(p){return er(p,r)?+p:p}).sort(tc)),i});function df(e,t){var r=[];if(!(e&&e.length))return r;var i=-1,p=[],u=e.length;for(t=Q(t,3);++i<u;){var y=e[i];t(y,i,e)&&(r.push(y),p.push(i))}return Hl(e,p),r}function ki(e){return e==null?e:sy.call(e)}function mf(e,t,r){var i=e==null?0:e.length;return i?(r&&typeof r!="number"&&Je(e,t,r)?(t=0,r=i):(t=t==null?0:ne(t),r=r===s?i:ne(r)),qt(e,t,r)):[]}function uf(e,t){return Pa(e,t)}function yf(e,t,r){return li(e,t,Q(r,2))}function _f(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t);if(i<r&&Rt(e[i],t))return i}return-1}function ff(e,t){return Pa(e,t,!0)}function gf(e,t,r){return li(e,t,Q(r,2),!0)}function bf(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t,!0)-1;if(Rt(e[i],t))return i}return-1}function xf(e){return e&&e.length?Gl(e):[]}function hf(e,t){return e&&e.length?Gl(e,Q(t,2)):[]}function wf(e){var t=e==null?0:e.length;return t?qt(e,1,t):[]}function vf(e,t,r){return e&&e.length?(t=r||t===s?1:ne(t),qt(e,0,t<0?0:t)):[]}function Tf(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ne(t),t=i-t,qt(e,t<0?0:t,i)):[]}function Df(e,t){return e&&e.length?Oa(e,Q(t,3),!1,!0):[]}function kf(e,t){return e&&e.length?Oa(e,Q(t,3)):[]}var If=ce(function(e){return ur(Xe(e,1,Pe,!0))}),Af=ce(function(e){var t=Ct(e);return Pe(t)&&(t=s),ur(Xe(e,1,Pe,!0),Q(t,2))}),qf=ce(function(e){var t=Ct(e);return t=typeof t=="function"?t:s,ur(Xe(e,1,Pe,!0),s,t)});function Cf(e){return e&&e.length?ur(e):[]}function zf(e,t){return e&&e.length?ur(e,Q(t,2)):[]}function Sf(e,t){return t=typeof t=="function"?t:s,e&&e.length?ur(e,s,t):[]}function Ii(e){if(!(e&&e.length))return[];var t=0;return e=lr(e,function(r){if(Pe(r))return t=Be(r.length,t),!0}),$n(t,function(r){return qe(e,Bn(r))})}function Ec(e,t){if(!(e&&e.length))return[];var r=Ii(e);return t==null?r:qe(r,function(i){return ut(t,s,i)})}var Nf=ce(function(e,t){return Pe(e)?Es(e,t):[]}),Ef=ce(function(e){return pi(lr(e,Pe))}),Lf=ce(function(e){var t=Ct(e);return Pe(t)&&(t=s),pi(lr(e,Pe),Q(t,2))}),Mf=ce(function(e){var t=Ct(e);return t=typeof t=="function"?t:s,pi(lr(e,Pe),s,t)}),Pf=ce(Ii);function Of(e,t){return Ql(e||[],t||[],Ns)}function Rf(e,t){return Ql(e||[],t||[],Ps)}var Ff=ce(function(e){var t=e.length,r=t>1?e[t-1]:s;return r=typeof r=="function"?(e.pop(),r):s,Ec(e,r)});function Lc(e){var t=d(e);return t.__chain__=!0,t}function Bf(e,t){return t(e),e}function Wa(e,t){return t(e)}var Uf=Jt(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,p=function(u){return Qn(u,e)};return t>1||this.__actions__.length||!(i instanceof ue)||!er(r)?this.thru(p):(i=i.slice(r,+r+(t?1:0)),i.__actions__.push({func:Wa,args:[p],thisArg:s}),new It(i,this.__chain__).thru(function(u){return t&&!u.length&&u.push(s),u}))});function Kf(){return Lc(this)}function $f(){return new It(this.value(),this.__chain__)}function jf(){this.__values__===s&&(this.__values__=Xc(this.value()));var e=this.__index__>=this.__values__.length,t=e?s:this.__values__[this.__index__++];return{done:e,value:t}}function Hf(){return this}function Wf(e){for(var t,r=this;r instanceof Sa;){var i=Ac(r);i.__index__=0,i.__values__=s,t?p.__wrapped__=i:t=i;var p=i;r=r.__wrapped__}return p.__wrapped__=e,t}function Gf(){var e=this.__wrapped__;if(e instanceof ue){var t=e;return this.__actions__.length&&(t=new ue(this)),t=t.reverse(),t.__actions__.push({func:Wa,args:[ki],thisArg:s}),new It(t,this.__chain__)}return this.thru(ki)}function Xf(){return Yl(this.__wrapped__,this.__actions__)}var Vf=Ra(function(e,t,r){Te.call(e,r)?++e[r]:Qt(e,r,1)});function Yf(e,t,r){var i=ae(e)?cl:Fy;return r&&Je(e,t,r)&&(t=s),i(e,Q(t,3))}function Qf(e,t){var r=ae(e)?lr:El;return r(e,Q(t,3))}var Zf=oc(qc),Jf=oc(Cc);function eg(e,t){return Xe(Ga(e,t),1)}function tg(e,t){return Xe(Ga(e,t),Ne)}function rg(e,t,r){return r=r===s?1:ne(r),Xe(Ga(e,t),r)}function Mc(e,t){var r=ae(e)?Dt:mr;return r(e,Q(t,3))}function Pc(e,t){var r=ae(e)?hu:Nl;return r(e,Q(t,3))}var sg=Ra(function(e,t,r){Te.call(e,r)?e[r].push(t):Qt(e,r,[t])});function ag(e,t,r,i){e=nt(e)?e:rs(e),r=r&&!i?ne(r):0;var p=e.length;return r<0&&(r=Be(p+r,0)),Za(e)?r<=p&&e.indexOf(t,r)>-1:!!p&&jr(e,t,r)>-1}var ng=ce(function(e,t,r){var i=-1,p=typeof t=="function",u=nt(e)?D(e.length):[];return mr(e,function(y){u[++i]=p?ut(t,y,r):Ls(y,t,r)}),u}),ig=Ra(function(e,t,r){Qt(e,r,t)});function Ga(e,t){var r=ae(e)?qe:Fl;return r(e,Q(t,3))}function og(e,t,r,i){return e==null?[]:(ae(t)||(t=t==null?[]:[t]),r=i?s:r,ae(r)||(r=r==null?[]:[r]),$l(e,t,r))}var lg=Ra(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});function cg(e,t,r){var i=ae(e)?Rn:ul,p=arguments.length<3;return i(e,Q(t,4),r,p,mr)}function pg(e,t,r){var i=ae(e)?wu:ul,p=arguments.length<3;return i(e,Q(t,4),r,p,Nl)}function dg(e,t){var r=ae(e)?lr:El;return r(e,Ya(Q(t,3)))}function mg(e){var t=ae(e)?ql:s_;return t(e)}function ug(e,t,r){(r?Je(e,t,r):t===s)?t=1:t=ne(t);var i=ae(e)?Ly:a_;return i(e,t)}function yg(e){var t=ae(e)?My:i_;return t(e)}function _g(e){if(e==null)return 0;if(nt(e))return Za(e)?Wr(e):e.length;var t=Qe(e);return t==dt||t==mt?e.size:si(e).length}function fg(e,t,r){var i=ae(e)?Fn:o_;return r&&Je(e,t,r)&&(t=s),i(e,Q(t,3))}var gg=ce(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Je(e,t[0],t[1])?t=[]:r>2&&Je(t[0],t[1],t[2])&&(t=[t[0]]),$l(e,Xe(t,1),[])}),Xa=Yu||function(){return Ge.Date.now()};function bg(e,t){if(typeof t!="function")throw new kt(m);return e=ne(e),function(){if(--e<1)return t.apply(this,arguments)}}function Oc(e,t,r){return t=r?s:t,t=e&&t==null?e.length:t,Zt(e,U,s,s,s,s,t)}function Rc(e,t){var r;if(typeof t!="function")throw new kt(m);return e=ne(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=s),r}}var Ai=ce(function(e,t,r){var i=H;if(r.length){var p=pr(r,es(Ai));i|=P}return Zt(e,i,t,r,p)}),Fc=ce(function(e,t,r){var i=H|V;if(r.length){var p=pr(r,es(Fc));i|=P}return Zt(t,i,e,r,p)});function Bc(e,t,r){t=r?s:t;var i=Zt(e,B,s,s,s,s,s,t);return i.placeholder=Bc.placeholder,i}function Uc(e,t,r){t=r?s:t;var i=Zt(e,k,s,s,s,s,s,t);return i.placeholder=Uc.placeholder,i}function Kc(e,t,r){var i,p,u,y,x,v,C=0,z=!1,S=!1,j=!0;if(typeof e!="function")throw new kt(m);t=zt(t)||0,ze(r)&&(z=!!r.leading,S="maxWait"in r,u=S?Be(zt(r.maxWait)||0,t):u,j="trailing"in r?!!r.trailing:j);function X(Oe){var Ft=i,sr=p;return i=p=s,C=Oe,y=e.apply(sr,Ft),y}function Z(Oe){return C=Oe,x=Fs(de,t),z?X(Oe):y}function oe(Oe){var Ft=Oe-v,sr=Oe-C,op=t-Ft;return S?Ye(op,u-sr):op}function J(Oe){var Ft=Oe-v,sr=Oe-C;return v===s||Ft>=t||Ft<0||S&&sr>=u}function de(){var Oe=Xa();if(J(Oe))return ye(Oe);x=Fs(de,oe(Oe))}function ye(Oe){return x=s,j&&i?X(Oe):(i=p=s,y)}function gt(){x!==s&&Zl(x),C=0,i=v=p=x=s}function et(){return x===s?y:ye(Xa())}function bt(){var Oe=Xa(),Ft=J(Oe);if(i=arguments,p=this,v=Oe,Ft){if(x===s)return Z(v);if(S)return Zl(x),x=Fs(de,t),X(v)}return x===s&&(x=Fs(de,t)),y}return bt.cancel=gt,bt.flush=et,bt}var xg=ce(function(e,t){return Sl(e,1,t)}),hg=ce(function(e,t,r){return Sl(e,zt(t)||0,r)});function wg(e){return Zt(e,fe)}function Va(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new kt(m);var r=function(){var i=arguments,p=t?t.apply(this,i):i[0],u=r.cache;if(u.has(p))return u.get(p);var y=e.apply(this,i);return r.cache=u.set(p,y)||u,y};return r.cache=new(Va.Cache||Yt),r}Va.Cache=Yt;function Ya(e){if(typeof e!="function")throw new kt(m);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function vg(e){return Rc(2,e)}var Tg=l_(function(e,t){t=t.length==1&&ae(t[0])?qe(t[0],yt(Q())):qe(Xe(t,1),yt(Q()));var r=t.length;return ce(function(i){for(var p=-1,u=Ye(i.length,r);++p<u;)i[p]=t[p].call(this,i[p]);return ut(e,this,i)})}),qi=ce(function(e,t){var r=pr(t,es(qi));return Zt(e,P,s,t,r)}),$c=ce(function(e,t){var r=pr(t,es($c));return Zt(e,N,s,t,r)}),Dg=Jt(function(e,t){return Zt(e,te,s,s,s,t)});function kg(e,t){if(typeof e!="function")throw new kt(m);return t=t===s?t:ne(t),ce(e,t)}function Ig(e,t){if(typeof e!="function")throw new kt(m);return t=t==null?0:Be(ne(t),0),ce(function(r){var i=r[t],p=_r(r,0,t);return i&&cr(p,i),ut(e,this,p)})}function Ag(e,t,r){var i=!0,p=!0;if(typeof e!="function")throw new kt(m);return ze(r)&&(i="leading"in r?!!r.leading:i,p="trailing"in r?!!r.trailing:p),Kc(e,t,{leading:i,maxWait:t,trailing:p})}function qg(e){return Oc(e,1)}function Cg(e,t){return qi(mi(t),e)}function zg(){if(!arguments.length)return[];var e=arguments[0];return ae(e)?e:[e]}function Sg(e){return At(e,K)}function Ng(e,t){return t=typeof t=="function"?t:s,At(e,K,t)}function Eg(e){return At(e,T|K)}function Lg(e,t){return t=typeof t=="function"?t:s,At(e,T|K,t)}function Mg(e,t){return t==null||zl(e,t,He(t))}function Rt(e,t){return e===t||e!==e&&t!==t}var Pg=Ka(ei),Og=Ka(function(e,t){return e>=t}),Sr=Pl(function(){return arguments}())?Pl:function(e){return Le(e)&&Te.call(e,"callee")&&!vl.call(e,"callee")},ae=D.isArray,Rg=sl?yt(sl):Hy;function nt(e){return e!=null&&Qa(e.length)&&!tr(e)}function Pe(e){return Le(e)&&nt(e)}function Fg(e){return e===!0||e===!1||Le(e)&&Ze(e)==Ut}var fr=Zu||Fi,Bg=al?yt(al):Wy;function Ug(e){return Le(e)&&e.nodeType===1&&!Bs(e)}function Kg(e){if(e==null)return!0;if(nt(e)&&(ae(e)||typeof e=="string"||typeof e.splice=="function"||fr(e)||ts(e)||Sr(e)))return!e.length;var t=Qe(e);if(t==dt||t==mt)return!e.size;if(Rs(e))return!si(e).length;for(var r in e)if(Te.call(e,r))return!1;return!0}function $g(e,t){return Ms(e,t)}function jg(e,t,r){r=typeof r=="function"?r:s;var i=r?r(e,t):s;return i===s?Ms(e,t,s,r):!!i}function Ci(e){if(!Le(e))return!1;var t=Ze(e);return t==Pr||t==Mr||typeof e.message=="string"&&typeof e.name=="string"&&!Bs(e)}function Hg(e){return typeof e=="number"&&Dl(e)}function tr(e){if(!ze(e))return!1;var t=Ze(e);return t==hr||t==aa||t==ys||t==Rr}function jc(e){return typeof e=="number"&&e==ne(e)}function Qa(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Me}function ze(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Le(e){return e!=null&&typeof e=="object"}var Hc=nl?yt(nl):Xy;function Wg(e,t){return e===t||ri(e,t,xi(t))}function Gg(e,t,r){return r=typeof r=="function"?r:s,ri(e,t,xi(t),r)}function Xg(e){return Wc(e)&&e!=+e}function Vg(e){if(S_(e))throw new se(l);return Ol(e)}function Yg(e){return e===null}function Qg(e){return e==null}function Wc(e){return typeof e=="number"||Le(e)&&Ze(e)==Kt}function Bs(e){if(!Le(e)||Ze(e)!=vt)return!1;var t=Da(e);if(t===null)return!0;var r=Te.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ha.call(r)==Wu}var zi=il?yt(il):Vy;function Zg(e){return jc(e)&&e>=-Me&&e<=Me}var Gc=ol?yt(ol):Yy;function Za(e){return typeof e=="string"||!ae(e)&&Le(e)&&Ze(e)==Gt}function ft(e){return typeof e=="symbol"||Le(e)&&Ze(e)==Fr}var ts=ll?yt(ll):Qy;function Jg(e){return e===s}function eb(e){return Le(e)&&Qe(e)==ir}function tb(e){return Le(e)&&Ze(e)==na}var rb=Ka(ai),sb=Ka(function(e,t){return e<=t});function Xc(e){if(!e)return[];if(nt(e))return Za(e)?Pt(e):at(e);if(As&&e[As])return Lu(e[As]());var t=Qe(e),r=t==dt?Hn:t==mt?ga:rs;return r(e)}function rr(e){if(!e)return e===0?e:0;if(e=zt(e),e===Ne||e===-Ne){var t=e<0?-1:1;return t*pt}return e===e?e:0}function ne(e){var t=rr(e),r=t%1;return t===t?r?t-r:t:0}function Vc(e){return e?Ar(ne(e),0,re):0}function zt(e){if(typeof e=="number")return e;if(ft(e))return wt;if(ze(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ze(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=yl(e);var r=pe.test(e);return r||Ce.test(e)?gu(e.slice(2),r?2:8):me.test(e)?wt:+e}function Yc(e){return jt(e,it(e))}function ab(e){return e?Ar(ne(e),-Me,Me):e===0?e:0}function ve(e){return e==null?"":_t(e)}var nb=Zr(function(e,t){if(Rs(t)||nt(t)){jt(t,He(t),e);return}for(var r in t)Te.call(t,r)&&Ns(e,r,t[r])}),Qc=Zr(function(e,t){jt(t,it(t),e)}),Ja=Zr(function(e,t,r,i){jt(t,it(t),e,i)}),ib=Zr(function(e,t,r,i){jt(t,He(t),e,i)}),ob=Jt(Qn);function lb(e,t){var r=Qr(e);return t==null?r:Cl(r,t)}var cb=ce(function(e,t){e=De(e);var r=-1,i=t.length,p=i>2?t[2]:s;for(p&&Je(t[0],t[1],p)&&(i=1);++r<i;)for(var u=t[r],y=it(u),x=-1,v=y.length;++x<v;){var C=y[x],z=e[C];(z===s||Rt(z,Xr[C])&&!Te.call(e,C))&&(e[C]=u[C])}return e}),pb=ce(function(e){return e.push(s,yc),ut(Zc,s,e)});function db(e,t){return pl(e,Q(t,3),$t)}function mb(e,t){return pl(e,Q(t,3),Jn)}function ub(e,t){return e==null?e:Zn(e,Q(t,3),it)}function yb(e,t){return e==null?e:Ll(e,Q(t,3),it)}function _b(e,t){return e&&$t(e,Q(t,3))}function fb(e,t){return e&&Jn(e,Q(t,3))}function gb(e){return e==null?[]:La(e,He(e))}function bb(e){return e==null?[]:La(e,it(e))}function Si(e,t,r){var i=e==null?s:qr(e,t);return i===s?r:i}function xb(e,t){return e!=null&&gc(e,t,Uy)}function Ni(e,t){return e!=null&&gc(e,t,Ky)}var hb=cc(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),e[t]=r},Li(ot)),wb=cc(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),Te.call(e,t)?e[t].push(r):e[t]=[r]},Q),vb=ce(Ls);function He(e){return nt(e)?Al(e):si(e)}function it(e){return nt(e)?Al(e,!0):Zy(e)}function Tb(e,t){var r={};return t=Q(t,3),$t(e,function(i,p,u){Qt(r,t(i,p,u),i)}),r}function Db(e,t){var r={};return t=Q(t,3),$t(e,function(i,p,u){Qt(r,p,t(i,p,u))}),r}var kb=Zr(function(e,t,r){Ma(e,t,r)}),Zc=Zr(function(e,t,r,i){Ma(e,t,r,i)}),Ib=Jt(function(e,t){var r={};if(e==null)return r;var i=!1;t=qe(t,function(u){return u=yr(u,e),i||(i=u.length>1),u}),jt(e,gi(e),r),i&&(r=At(r,T|O|K,x_));for(var p=t.length;p--;)ci(r,t[p]);return r});function Ab(e,t){return Jc(e,Ya(Q(t)))}var qb=Jt(function(e,t){return e==null?{}:e_(e,t)});function Jc(e,t){if(e==null)return{};var r=qe(gi(e),function(i){return[i]});return t=Q(t),jl(e,r,function(i,p){return t(i,p[0])})}function Cb(e,t,r){t=yr(t,e);var i=-1,p=t.length;for(p||(p=1,e=s);++i<p;){var u=e==null?s:e[Ht(t[i])];u===s&&(i=p,u=r),e=tr(u)?u.call(e):u}return e}function zb(e,t,r){return e==null?e:Ps(e,t,r)}function Sb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Ps(e,t,r,i)}var ep=mc(He),tp=mc(it);function Nb(e,t,r){var i=ae(e),p=i||fr(e)||ts(e);if(t=Q(t,4),r==null){var u=e&&e.constructor;p?r=i?new u:[]:ze(e)?r=tr(u)?Qr(Da(e)):{}:r={}}return(p?Dt:$t)(e,function(y,x,v){return t(r,y,x,v)}),r}function Eb(e,t){return e==null?!0:ci(e,t)}function Lb(e,t,r){return e==null?e:Vl(e,t,mi(r))}function Mb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Vl(e,t,mi(r),i)}function rs(e){return e==null?[]:jn(e,He(e))}function Pb(e){return e==null?[]:jn(e,it(e))}function Ob(e,t,r){return r===s&&(r=t,t=s),r!==s&&(r=zt(r),r=r===r?r:0),t!==s&&(t=zt(t),t=t===t?t:0),Ar(zt(e),t,r)}function Rb(e,t,r){return t=rr(t),r===s?(r=t,t=0):r=rr(r),e=zt(e),$y(e,t,r)}function Fb(e,t,r){if(r&&typeof r!="boolean"&&Je(e,t,r)&&(t=r=s),r===s&&(typeof t=="boolean"?(r=t,t=s):typeof e=="boolean"&&(r=e,e=s)),e===s&&t===s?(e=0,t=1):(e=rr(e),t===s?(t=e,e=0):t=rr(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var p=kl();return Ye(e+p*(t-e+fu("1e-"+((p+"").length-1))),t)}return ii(e,t)}var Bb=Jr(function(e,t,r){return t=t.toLowerCase(),e+(r?rp(t):t)});function rp(e){return Ei(ve(e).toLowerCase())}function sp(e){return e=ve(e),e&&e.replace(rt,Cu).replace(iu,"")}function Ub(e,t,r){e=ve(e),t=_t(t);var i=e.length;r=r===s?i:Ar(ne(r),0,i);var p=r;return r-=t.length,r>=0&&e.slice(r,p)==t}function Kb(e){return e=ve(e),e&&oa.test(e)?e.replace(Kr,zu):e}function $b(e){return e=ve(e),e&&ma.test(e)?e.replace(Ds,"\\$&"):e}var jb=Jr(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),Hb=Jr(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),Wb=ic("toLowerCase");function Gb(e,t,r){e=ve(e),t=ne(t);var i=t?Wr(e):0;if(!t||i>=t)return e;var p=(t-i)/2;return Ua(qa(p),r)+e+Ua(Aa(p),r)}function Xb(e,t,r){e=ve(e),t=ne(t);var i=t?Wr(e):0;return t&&i<t?e+Ua(t-i,r):e}function Vb(e,t,r){e=ve(e),t=ne(t);var i=t?Wr(e):0;return t&&i<t?Ua(t-i,r)+e:e}function Yb(e,t,r){return r||t==null?t=0:t&&(t=+t),ry(ve(e).replace(ks,""),t||0)}function Qb(e,t,r){return(r?Je(e,t,r):t===s)?t=1:t=ne(t),oi(ve(e),t)}function Zb(){var e=arguments,t=ve(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Jb=Jr(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});function ex(e,t,r){return r&&typeof r!="number"&&Je(e,t,r)&&(t=r=s),r=r===s?re:r>>>0,r?(e=ve(e),e&&(typeof t=="string"||t!=null&&!zi(t))&&(t=_t(t),!t&&Hr(e))?_r(Pt(e),0,r):e.split(t,r)):[]}var tx=Jr(function(e,t,r){return e+(r?" ":"")+Ei(t)});function rx(e,t,r){return e=ve(e),r=r==null?0:Ar(ne(r),0,e.length),t=_t(t),e.slice(r,r+t.length)==t}function sx(e,t,r){var i=d.templateSettings;r&&Je(e,t,r)&&(t=s),e=ve(e),t=Ja({},t,i,uc);var p=Ja({},t.imports,i.imports,uc),u=He(p),y=jn(p,u),x,v,C=0,z=t.interpolate||Mt,S="__p += '",j=Wn((t.escape||Mt).source+"|"+z.source+"|"+(z===ca?_e:Mt).source+"|"+(t.evaluate||Mt).source+"|$","g"),X="//# sourceURL="+(Te.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++du+"]")+`
|
121
|
-
`;e.replace(j,function(J,de,ye,gt,et,bt){return ye||(ye=gt),
|
120
|
+
`)}function q_(e){return ae(e)||Sr(e)||!!(Tl&&e&&e[Tl])}function er(e,t){var r=typeof e;return t=t??Me,!!t&&(r=="number"||r!="symbol"&&Ne.test(e))&&e>-1&&e%1==0&&e<t}function Je(e,t,r){if(!ze(r))return!1;var i=typeof t;return(i=="number"?nt(r)&&er(t,r.length):i=="string"&&t in r)?Rt(r[t],e):!1}function wi(e,t){if(ae(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ft(e)?!0:da.test(e)||!pa.test(e)||t!=null&&e in De(t)}function C_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function vi(e){var t=$a(e),r=d[t];if(typeof r!="function"||!(t in ue.prototype))return!1;if(e===r)return!0;var i=bi(r);return!!i&&e===i[0]}function z_(e){return!!xl&&xl in e}var S_=xa?tr:Fi;function Rs(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Xr;return e===r}function xc(e){return e===e&&!ze(e)}function hc(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==s||e in De(r))}}function E_(e){var t=Va(e,function(i){return r.size===b&&r.clear(),i}),r=t.cache;return t}function N_(e,t){var r=e[1],i=t[1],p=r|i,u=p<(H|V|U),y=i==U&&r==B||i==U&&r==te&&e[7].length<=t[8]||i==(U|te)&&t[7].length<=t[8]&&r==B;if(!(u||y))return e;i&H&&(e[2]=t[2],p|=r&H?0:G);var x=t[3];if(x){var v=e[3];e[3]=v?rc(v,x,t[4]):x,e[4]=v?pr(e[3],h):t[4]}return x=t[5],x&&(v=e[5],e[5]=v?sc(v,x,t[6]):x,e[6]=v?pr(e[5],h):t[6]),x=t[7],x&&(e[7]=x),i&U&&(e[8]=e[8]==null?t[8]:Ye(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=p,e}function L_(e){var t=[];if(e!=null)for(var r in De(e))t.push(r);return t}function M_(e){return wa.call(e)}function wc(e,t,r){return t=Be(t===s?e.length-1:t,0),function(){for(var i=arguments,p=-1,u=Be(i.length-t,0),y=D(u);++p<u;)y[p]=i[t+p];p=-1;for(var x=D(t+1);++p<t;)x[p]=i[p];return x[t]=r(y),ut(e,this,x)}}function vc(e,t){return t.length<2?e:qr(e,qt(t,0,-1))}function P_(e,t){for(var r=e.length,i=Ye(t.length,r),p=at(e);i--;){var u=t[i];e[i]=er(u,r)?p[u]:s}return e}function Ti(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Tc=kc(Wl),Fs=Qu||function(e,t){return Ge.setTimeout(e,t)},Di=kc(n_);function Dc(e,t,r){var i=t+"";return Di(e,A_(i,O_(D_(i),r)))}function kc(e){var t=0,r=0;return function(){var i=ty(),p=Ue-(i-r);if(r=i,p>0){if(++t>=Et)return arguments[0]}else t=0;return e.apply(s,arguments)}}function Ha(e,t){var r=-1,i=e.length,p=i-1;for(t=t===s?i:t;++r<t;){var u=ii(r,p),y=e[u];e[u]=e[r],e[r]=y}return e.length=t,e}var Ic=E_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(In,function(r,i,p,u){t.push(p?u.replace(ee,"$1"):i||r)}),t});function Ht(e){if(typeof e=="string"||ft(e))return e;var t=e+"";return t=="0"&&1/e==-Ee?"-0":t}function zr(e){if(e!=null){try{return ha.call(e)}catch{}try{return e+""}catch{}}return""}function O_(e,t){return Dt(Nt,function(r){var i="_."+r[0];t&r[1]&&!_a(e,i)&&e.push(i)}),e.sort()}function Ac(e){if(e instanceof ue)return e.clone();var t=new It(e.__wrapped__,e.__chain__);return t.__actions__=at(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function R_(e,t,r){(r?Je(e,t,r):t===s)?t=1:t=Be(ne(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var p=0,u=0,y=D(Aa(i/t));p<i;)y[u++]=qt(e,p,p+=t);return y}function F_(e){for(var t=-1,r=e==null?0:e.length,i=0,p=[];++t<r;){var u=e[t];u&&(p[i++]=u)}return p}function B_(){var e=arguments.length;if(!e)return[];for(var t=D(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return cr(ae(r)?at(r):[r],Xe(t,1))}var U_=ce(function(e,t){return Pe(e)?Ns(e,Xe(t,1,Pe,!0)):[]}),K_=ce(function(e,t){var r=Ct(t);return Pe(r)&&(r=s),Pe(e)?Ns(e,Xe(t,1,Pe,!0),Q(r,2)):[]}),$_=ce(function(e,t){var r=Ct(t);return Pe(r)&&(r=s),Pe(e)?Ns(e,Xe(t,1,Pe,!0),s,r):[]});function j_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ne(t),qt(e,t<0?0:t,i)):[]}function H_(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ne(t),t=i-t,qt(e,0,t<0?0:t)):[]}function W_(e,t){return e&&e.length?Oa(e,Q(t,3),!0,!0):[]}function G_(e,t){return e&&e.length?Oa(e,Q(t,3),!0):[]}function X_(e,t,r,i){var p=e==null?0:e.length;return p?(r&&typeof r!="number"&&Je(e,t,r)&&(r=0,i=p),By(e,t,r,i)):[]}function qc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:ne(r);return p<0&&(p=Be(i+p,0)),fa(e,Q(t,3),p)}function Cc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i-1;return r!==s&&(p=ne(r),p=r<0?Be(i+p,0):Ye(p,i-1)),fa(e,Q(t,3),p,!0)}function zc(e){var t=e==null?0:e.length;return t?Xe(e,1):[]}function V_(e){var t=e==null?0:e.length;return t?Xe(e,Ee):[]}function Y_(e,t){var r=e==null?0:e.length;return r?(t=t===s?1:ne(t),Xe(e,t)):[]}function Q_(e){for(var t=-1,r=e==null?0:e.length,i={};++t<r;){var p=e[t];i[p[0]]=p[1]}return i}function Sc(e){return e&&e.length?e[0]:s}function Z_(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=r==null?0:ne(r);return p<0&&(p=Be(i+p,0)),jr(e,t,p)}function J_(e){var t=e==null?0:e.length;return t?qt(e,0,-1):[]}var ef=ce(function(e){var t=qe(e,di);return t.length&&t[0]===e[0]?ti(t):[]}),tf=ce(function(e){var t=Ct(e),r=qe(e,di);return t===Ct(r)?t=s:r.pop(),r.length&&r[0]===e[0]?ti(r,Q(t,2)):[]}),rf=ce(function(e){var t=Ct(e),r=qe(e,di);return t=typeof t=="function"?t:s,t&&r.pop(),r.length&&r[0]===e[0]?ti(r,s,t):[]});function sf(e,t){return e==null?"":Ju.call(e,t)}function Ct(e){var t=e==null?0:e.length;return t?e[t-1]:s}function af(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var p=i;return r!==s&&(p=ne(r),p=p<0?Be(i+p,0):Ye(p,i-1)),t===t?Ou(e,t,p):fa(e,dl,p,!0)}function nf(e,t){return e&&e.length?Kl(e,ne(t)):s}var of=ce(Ec);function Ec(e,t){return e&&e.length&&t&&t.length?ni(e,t):e}function lf(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,Q(r,2)):e}function cf(e,t,r){return e&&e.length&&t&&t.length?ni(e,t,s,r):e}var pf=Jt(function(e,t){var r=e==null?0:e.length,i=Qn(e,t);return Hl(e,qe(t,function(p){return er(p,r)?+p:p}).sort(tc)),i});function df(e,t){var r=[];if(!(e&&e.length))return r;var i=-1,p=[],u=e.length;for(t=Q(t,3);++i<u;){var y=e[i];t(y,i,e)&&(r.push(y),p.push(i))}return Hl(e,p),r}function ki(e){return e==null?e:sy.call(e)}function mf(e,t,r){var i=e==null?0:e.length;return i?(r&&typeof r!="number"&&Je(e,t,r)?(t=0,r=i):(t=t==null?0:ne(t),r=r===s?i:ne(r)),qt(e,t,r)):[]}function uf(e,t){return Pa(e,t)}function yf(e,t,r){return li(e,t,Q(r,2))}function _f(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t);if(i<r&&Rt(e[i],t))return i}return-1}function ff(e,t){return Pa(e,t,!0)}function gf(e,t,r){return li(e,t,Q(r,2),!0)}function bf(e,t){var r=e==null?0:e.length;if(r){var i=Pa(e,t,!0)-1;if(Rt(e[i],t))return i}return-1}function xf(e){return e&&e.length?Gl(e):[]}function hf(e,t){return e&&e.length?Gl(e,Q(t,2)):[]}function wf(e){var t=e==null?0:e.length;return t?qt(e,1,t):[]}function vf(e,t,r){return e&&e.length?(t=r||t===s?1:ne(t),qt(e,0,t<0?0:t)):[]}function Tf(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===s?1:ne(t),t=i-t,qt(e,t<0?0:t,i)):[]}function Df(e,t){return e&&e.length?Oa(e,Q(t,3),!1,!0):[]}function kf(e,t){return e&&e.length?Oa(e,Q(t,3)):[]}var If=ce(function(e){return ur(Xe(e,1,Pe,!0))}),Af=ce(function(e){var t=Ct(e);return Pe(t)&&(t=s),ur(Xe(e,1,Pe,!0),Q(t,2))}),qf=ce(function(e){var t=Ct(e);return t=typeof t=="function"?t:s,ur(Xe(e,1,Pe,!0),s,t)});function Cf(e){return e&&e.length?ur(e):[]}function zf(e,t){return e&&e.length?ur(e,Q(t,2)):[]}function Sf(e,t){return t=typeof t=="function"?t:s,e&&e.length?ur(e,s,t):[]}function Ii(e){if(!(e&&e.length))return[];var t=0;return e=lr(e,function(r){if(Pe(r))return t=Be(r.length,t),!0}),$n(t,function(r){return qe(e,Bn(r))})}function Nc(e,t){if(!(e&&e.length))return[];var r=Ii(e);return t==null?r:qe(r,function(i){return ut(t,s,i)})}var Ef=ce(function(e,t){return Pe(e)?Ns(e,t):[]}),Nf=ce(function(e){return pi(lr(e,Pe))}),Lf=ce(function(e){var t=Ct(e);return Pe(t)&&(t=s),pi(lr(e,Pe),Q(t,2))}),Mf=ce(function(e){var t=Ct(e);return t=typeof t=="function"?t:s,pi(lr(e,Pe),s,t)}),Pf=ce(Ii);function Of(e,t){return Ql(e||[],t||[],Es)}function Rf(e,t){return Ql(e||[],t||[],Ps)}var Ff=ce(function(e){var t=e.length,r=t>1?e[t-1]:s;return r=typeof r=="function"?(e.pop(),r):s,Nc(e,r)});function Lc(e){var t=d(e);return t.__chain__=!0,t}function Bf(e,t){return t(e),e}function Wa(e,t){return t(e)}var Uf=Jt(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,p=function(u){return Qn(u,e)};return t>1||this.__actions__.length||!(i instanceof ue)||!er(r)?this.thru(p):(i=i.slice(r,+r+(t?1:0)),i.__actions__.push({func:Wa,args:[p],thisArg:s}),new It(i,this.__chain__).thru(function(u){return t&&!u.length&&u.push(s),u}))});function Kf(){return Lc(this)}function $f(){return new It(this.value(),this.__chain__)}function jf(){this.__values__===s&&(this.__values__=Xc(this.value()));var e=this.__index__>=this.__values__.length,t=e?s:this.__values__[this.__index__++];return{done:e,value:t}}function Hf(){return this}function Wf(e){for(var t,r=this;r instanceof Sa;){var i=Ac(r);i.__index__=0,i.__values__=s,t?p.__wrapped__=i:t=i;var p=i;r=r.__wrapped__}return p.__wrapped__=e,t}function Gf(){var e=this.__wrapped__;if(e instanceof ue){var t=e;return this.__actions__.length&&(t=new ue(this)),t=t.reverse(),t.__actions__.push({func:Wa,args:[ki],thisArg:s}),new It(t,this.__chain__)}return this.thru(ki)}function Xf(){return Yl(this.__wrapped__,this.__actions__)}var Vf=Ra(function(e,t,r){Te.call(e,r)?++e[r]:Qt(e,r,1)});function Yf(e,t,r){var i=ae(e)?cl:Fy;return r&&Je(e,t,r)&&(t=s),i(e,Q(t,3))}function Qf(e,t){var r=ae(e)?lr:Nl;return r(e,Q(t,3))}var Zf=oc(qc),Jf=oc(Cc);function eg(e,t){return Xe(Ga(e,t),1)}function tg(e,t){return Xe(Ga(e,t),Ee)}function rg(e,t,r){return r=r===s?1:ne(r),Xe(Ga(e,t),r)}function Mc(e,t){var r=ae(e)?Dt:mr;return r(e,Q(t,3))}function Pc(e,t){var r=ae(e)?hu:El;return r(e,Q(t,3))}var sg=Ra(function(e,t,r){Te.call(e,r)?e[r].push(t):Qt(e,r,[t])});function ag(e,t,r,i){e=nt(e)?e:rs(e),r=r&&!i?ne(r):0;var p=e.length;return r<0&&(r=Be(p+r,0)),Za(e)?r<=p&&e.indexOf(t,r)>-1:!!p&&jr(e,t,r)>-1}var ng=ce(function(e,t,r){var i=-1,p=typeof t=="function",u=nt(e)?D(e.length):[];return mr(e,function(y){u[++i]=p?ut(t,y,r):Ls(y,t,r)}),u}),ig=Ra(function(e,t,r){Qt(e,r,t)});function Ga(e,t){var r=ae(e)?qe:Fl;return r(e,Q(t,3))}function og(e,t,r,i){return e==null?[]:(ae(t)||(t=t==null?[]:[t]),r=i?s:r,ae(r)||(r=r==null?[]:[r]),$l(e,t,r))}var lg=Ra(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});function cg(e,t,r){var i=ae(e)?Rn:ul,p=arguments.length<3;return i(e,Q(t,4),r,p,mr)}function pg(e,t,r){var i=ae(e)?wu:ul,p=arguments.length<3;return i(e,Q(t,4),r,p,El)}function dg(e,t){var r=ae(e)?lr:Nl;return r(e,Ya(Q(t,3)))}function mg(e){var t=ae(e)?ql:s_;return t(e)}function ug(e,t,r){(r?Je(e,t,r):t===s)?t=1:t=ne(t);var i=ae(e)?Ly:a_;return i(e,t)}function yg(e){var t=ae(e)?My:i_;return t(e)}function _g(e){if(e==null)return 0;if(nt(e))return Za(e)?Wr(e):e.length;var t=Qe(e);return t==dt||t==mt?e.size:si(e).length}function fg(e,t,r){var i=ae(e)?Fn:o_;return r&&Je(e,t,r)&&(t=s),i(e,Q(t,3))}var gg=ce(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Je(e,t[0],t[1])?t=[]:r>2&&Je(t[0],t[1],t[2])&&(t=[t[0]]),$l(e,Xe(t,1),[])}),Xa=Yu||function(){return Ge.Date.now()};function bg(e,t){if(typeof t!="function")throw new kt(m);return e=ne(e),function(){if(--e<1)return t.apply(this,arguments)}}function Oc(e,t,r){return t=r?s:t,t=e&&t==null?e.length:t,Zt(e,U,s,s,s,s,t)}function Rc(e,t){var r;if(typeof t!="function")throw new kt(m);return e=ne(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=s),r}}var Ai=ce(function(e,t,r){var i=H;if(r.length){var p=pr(r,es(Ai));i|=P}return Zt(e,i,t,r,p)}),Fc=ce(function(e,t,r){var i=H|V;if(r.length){var p=pr(r,es(Fc));i|=P}return Zt(t,i,e,r,p)});function Bc(e,t,r){t=r?s:t;var i=Zt(e,B,s,s,s,s,s,t);return i.placeholder=Bc.placeholder,i}function Uc(e,t,r){t=r?s:t;var i=Zt(e,k,s,s,s,s,s,t);return i.placeholder=Uc.placeholder,i}function Kc(e,t,r){var i,p,u,y,x,v,C=0,z=!1,E=!1,j=!0;if(typeof e!="function")throw new kt(m);t=zt(t)||0,ze(r)&&(z=!!r.leading,E="maxWait"in r,u=E?Be(zt(r.maxWait)||0,t):u,j="trailing"in r?!!r.trailing:j);function X(Oe){var Ft=i,sr=p;return i=p=s,C=Oe,y=e.apply(sr,Ft),y}function Z(Oe){return C=Oe,x=Fs(de,t),z?X(Oe):y}function oe(Oe){var Ft=Oe-v,sr=Oe-C,op=t-Ft;return E?Ye(op,u-sr):op}function J(Oe){var Ft=Oe-v,sr=Oe-C;return v===s||Ft>=t||Ft<0||E&&sr>=u}function de(){var Oe=Xa();if(J(Oe))return ye(Oe);x=Fs(de,oe(Oe))}function ye(Oe){return x=s,j&&i?X(Oe):(i=p=s,y)}function gt(){x!==s&&Zl(x),C=0,i=v=p=x=s}function et(){return x===s?y:ye(Xa())}function bt(){var Oe=Xa(),Ft=J(Oe);if(i=arguments,p=this,v=Oe,Ft){if(x===s)return Z(v);if(E)return Zl(x),x=Fs(de,t),X(v)}return x===s&&(x=Fs(de,t)),y}return bt.cancel=gt,bt.flush=et,bt}var xg=ce(function(e,t){return Sl(e,1,t)}),hg=ce(function(e,t,r){return Sl(e,zt(t)||0,r)});function wg(e){return Zt(e,fe)}function Va(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new kt(m);var r=function(){var i=arguments,p=t?t.apply(this,i):i[0],u=r.cache;if(u.has(p))return u.get(p);var y=e.apply(this,i);return r.cache=u.set(p,y)||u,y};return r.cache=new(Va.Cache||Yt),r}Va.Cache=Yt;function Ya(e){if(typeof e!="function")throw new kt(m);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function vg(e){return Rc(2,e)}var Tg=l_(function(e,t){t=t.length==1&&ae(t[0])?qe(t[0],yt(Q())):qe(Xe(t,1),yt(Q()));var r=t.length;return ce(function(i){for(var p=-1,u=Ye(i.length,r);++p<u;)i[p]=t[p].call(this,i[p]);return ut(e,this,i)})}),qi=ce(function(e,t){var r=pr(t,es(qi));return Zt(e,P,s,t,r)}),$c=ce(function(e,t){var r=pr(t,es($c));return Zt(e,S,s,t,r)}),Dg=Jt(function(e,t){return Zt(e,te,s,s,s,t)});function kg(e,t){if(typeof e!="function")throw new kt(m);return t=t===s?t:ne(t),ce(e,t)}function Ig(e,t){if(typeof e!="function")throw new kt(m);return t=t==null?0:Be(ne(t),0),ce(function(r){var i=r[t],p=_r(r,0,t);return i&&cr(p,i),ut(e,this,p)})}function Ag(e,t,r){var i=!0,p=!0;if(typeof e!="function")throw new kt(m);return ze(r)&&(i="leading"in r?!!r.leading:i,p="trailing"in r?!!r.trailing:p),Kc(e,t,{leading:i,maxWait:t,trailing:p})}function qg(e){return Oc(e,1)}function Cg(e,t){return qi(mi(t),e)}function zg(){if(!arguments.length)return[];var e=arguments[0];return ae(e)?e:[e]}function Sg(e){return At(e,K)}function Eg(e,t){return t=typeof t=="function"?t:s,At(e,K,t)}function Ng(e){return At(e,T|K)}function Lg(e,t){return t=typeof t=="function"?t:s,At(e,T|K,t)}function Mg(e,t){return t==null||zl(e,t,He(t))}function Rt(e,t){return e===t||e!==e&&t!==t}var Pg=Ka(ei),Og=Ka(function(e,t){return e>=t}),Sr=Pl(function(){return arguments}())?Pl:function(e){return Le(e)&&Te.call(e,"callee")&&!vl.call(e,"callee")},ae=D.isArray,Rg=sl?yt(sl):Hy;function nt(e){return e!=null&&Qa(e.length)&&!tr(e)}function Pe(e){return Le(e)&&nt(e)}function Fg(e){return e===!0||e===!1||Le(e)&&Ze(e)==Ut}var fr=Zu||Fi,Bg=al?yt(al):Wy;function Ug(e){return Le(e)&&e.nodeType===1&&!Bs(e)}function Kg(e){if(e==null)return!0;if(nt(e)&&(ae(e)||typeof e=="string"||typeof e.splice=="function"||fr(e)||ts(e)||Sr(e)))return!e.length;var t=Qe(e);if(t==dt||t==mt)return!e.size;if(Rs(e))return!si(e).length;for(var r in e)if(Te.call(e,r))return!1;return!0}function $g(e,t){return Ms(e,t)}function jg(e,t,r){r=typeof r=="function"?r:s;var i=r?r(e,t):s;return i===s?Ms(e,t,s,r):!!i}function Ci(e){if(!Le(e))return!1;var t=Ze(e);return t==Pr||t==Mr||typeof e.message=="string"&&typeof e.name=="string"&&!Bs(e)}function Hg(e){return typeof e=="number"&&Dl(e)}function tr(e){if(!ze(e))return!1;var t=Ze(e);return t==hr||t==aa||t==ys||t==Rr}function jc(e){return typeof e=="number"&&e==ne(e)}function Qa(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Me}function ze(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Le(e){return e!=null&&typeof e=="object"}var Hc=nl?yt(nl):Xy;function Wg(e,t){return e===t||ri(e,t,xi(t))}function Gg(e,t,r){return r=typeof r=="function"?r:s,ri(e,t,xi(t),r)}function Xg(e){return Wc(e)&&e!=+e}function Vg(e){if(S_(e))throw new se(l);return Ol(e)}function Yg(e){return e===null}function Qg(e){return e==null}function Wc(e){return typeof e=="number"||Le(e)&&Ze(e)==Kt}function Bs(e){if(!Le(e)||Ze(e)!=vt)return!1;var t=Da(e);if(t===null)return!0;var r=Te.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ha.call(r)==Wu}var zi=il?yt(il):Vy;function Zg(e){return jc(e)&&e>=-Me&&e<=Me}var Gc=ol?yt(ol):Yy;function Za(e){return typeof e=="string"||!ae(e)&&Le(e)&&Ze(e)==Gt}function ft(e){return typeof e=="symbol"||Le(e)&&Ze(e)==Fr}var ts=ll?yt(ll):Qy;function Jg(e){return e===s}function eb(e){return Le(e)&&Qe(e)==ir}function tb(e){return Le(e)&&Ze(e)==na}var rb=Ka(ai),sb=Ka(function(e,t){return e<=t});function Xc(e){if(!e)return[];if(nt(e))return Za(e)?Pt(e):at(e);if(As&&e[As])return Lu(e[As]());var t=Qe(e),r=t==dt?Hn:t==mt?ga:rs;return r(e)}function rr(e){if(!e)return e===0?e:0;if(e=zt(e),e===Ee||e===-Ee){var t=e<0?-1:1;return t*pt}return e===e?e:0}function ne(e){var t=rr(e),r=t%1;return t===t?r?t-r:t:0}function Vc(e){return e?Ar(ne(e),0,re):0}function zt(e){if(typeof e=="number")return e;if(ft(e))return wt;if(ze(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ze(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=yl(e);var r=pe.test(e);return r||Ce.test(e)?gu(e.slice(2),r?2:8):me.test(e)?wt:+e}function Yc(e){return jt(e,it(e))}function ab(e){return e?Ar(ne(e),-Me,Me):e===0?e:0}function ve(e){return e==null?"":_t(e)}var nb=Zr(function(e,t){if(Rs(t)||nt(t)){jt(t,He(t),e);return}for(var r in t)Te.call(t,r)&&Es(e,r,t[r])}),Qc=Zr(function(e,t){jt(t,it(t),e)}),Ja=Zr(function(e,t,r,i){jt(t,it(t),e,i)}),ib=Zr(function(e,t,r,i){jt(t,He(t),e,i)}),ob=Jt(Qn);function lb(e,t){var r=Qr(e);return t==null?r:Cl(r,t)}var cb=ce(function(e,t){e=De(e);var r=-1,i=t.length,p=i>2?t[2]:s;for(p&&Je(t[0],t[1],p)&&(i=1);++r<i;)for(var u=t[r],y=it(u),x=-1,v=y.length;++x<v;){var C=y[x],z=e[C];(z===s||Rt(z,Xr[C])&&!Te.call(e,C))&&(e[C]=u[C])}return e}),pb=ce(function(e){return e.push(s,yc),ut(Zc,s,e)});function db(e,t){return pl(e,Q(t,3),$t)}function mb(e,t){return pl(e,Q(t,3),Jn)}function ub(e,t){return e==null?e:Zn(e,Q(t,3),it)}function yb(e,t){return e==null?e:Ll(e,Q(t,3),it)}function _b(e,t){return e&&$t(e,Q(t,3))}function fb(e,t){return e&&Jn(e,Q(t,3))}function gb(e){return e==null?[]:La(e,He(e))}function bb(e){return e==null?[]:La(e,it(e))}function Si(e,t,r){var i=e==null?s:qr(e,t);return i===s?r:i}function xb(e,t){return e!=null&&gc(e,t,Uy)}function Ei(e,t){return e!=null&&gc(e,t,Ky)}var hb=cc(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),e[t]=r},Li(ot)),wb=cc(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=wa.call(t)),Te.call(e,t)?e[t].push(r):e[t]=[r]},Q),vb=ce(Ls);function He(e){return nt(e)?Al(e):si(e)}function it(e){return nt(e)?Al(e,!0):Zy(e)}function Tb(e,t){var r={};return t=Q(t,3),$t(e,function(i,p,u){Qt(r,t(i,p,u),i)}),r}function Db(e,t){var r={};return t=Q(t,3),$t(e,function(i,p,u){Qt(r,p,t(i,p,u))}),r}var kb=Zr(function(e,t,r){Ma(e,t,r)}),Zc=Zr(function(e,t,r,i){Ma(e,t,r,i)}),Ib=Jt(function(e,t){var r={};if(e==null)return r;var i=!1;t=qe(t,function(u){return u=yr(u,e),i||(i=u.length>1),u}),jt(e,gi(e),r),i&&(r=At(r,T|O|K,x_));for(var p=t.length;p--;)ci(r,t[p]);return r});function Ab(e,t){return Jc(e,Ya(Q(t)))}var qb=Jt(function(e,t){return e==null?{}:e_(e,t)});function Jc(e,t){if(e==null)return{};var r=qe(gi(e),function(i){return[i]});return t=Q(t),jl(e,r,function(i,p){return t(i,p[0])})}function Cb(e,t,r){t=yr(t,e);var i=-1,p=t.length;for(p||(p=1,e=s);++i<p;){var u=e==null?s:e[Ht(t[i])];u===s&&(i=p,u=r),e=tr(u)?u.call(e):u}return e}function zb(e,t,r){return e==null?e:Ps(e,t,r)}function Sb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Ps(e,t,r,i)}var ep=mc(He),tp=mc(it);function Eb(e,t,r){var i=ae(e),p=i||fr(e)||ts(e);if(t=Q(t,4),r==null){var u=e&&e.constructor;p?r=i?new u:[]:ze(e)?r=tr(u)?Qr(Da(e)):{}:r={}}return(p?Dt:$t)(e,function(y,x,v){return t(r,y,x,v)}),r}function Nb(e,t){return e==null?!0:ci(e,t)}function Lb(e,t,r){return e==null?e:Vl(e,t,mi(r))}function Mb(e,t,r,i){return i=typeof i=="function"?i:s,e==null?e:Vl(e,t,mi(r),i)}function rs(e){return e==null?[]:jn(e,He(e))}function Pb(e){return e==null?[]:jn(e,it(e))}function Ob(e,t,r){return r===s&&(r=t,t=s),r!==s&&(r=zt(r),r=r===r?r:0),t!==s&&(t=zt(t),t=t===t?t:0),Ar(zt(e),t,r)}function Rb(e,t,r){return t=rr(t),r===s?(r=t,t=0):r=rr(r),e=zt(e),$y(e,t,r)}function Fb(e,t,r){if(r&&typeof r!="boolean"&&Je(e,t,r)&&(t=r=s),r===s&&(typeof t=="boolean"?(r=t,t=s):typeof e=="boolean"&&(r=e,e=s)),e===s&&t===s?(e=0,t=1):(e=rr(e),t===s?(t=e,e=0):t=rr(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var p=kl();return Ye(e+p*(t-e+fu("1e-"+((p+"").length-1))),t)}return ii(e,t)}var Bb=Jr(function(e,t,r){return t=t.toLowerCase(),e+(r?rp(t):t)});function rp(e){return Ni(ve(e).toLowerCase())}function sp(e){return e=ve(e),e&&e.replace(rt,Cu).replace(iu,"")}function Ub(e,t,r){e=ve(e),t=_t(t);var i=e.length;r=r===s?i:Ar(ne(r),0,i);var p=r;return r-=t.length,r>=0&&e.slice(r,p)==t}function Kb(e){return e=ve(e),e&&oa.test(e)?e.replace(Kr,zu):e}function $b(e){return e=ve(e),e&&ma.test(e)?e.replace(Ds,"\\$&"):e}var jb=Jr(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),Hb=Jr(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),Wb=ic("toLowerCase");function Gb(e,t,r){e=ve(e),t=ne(t);var i=t?Wr(e):0;if(!t||i>=t)return e;var p=(t-i)/2;return Ua(qa(p),r)+e+Ua(Aa(p),r)}function Xb(e,t,r){e=ve(e),t=ne(t);var i=t?Wr(e):0;return t&&i<t?e+Ua(t-i,r):e}function Vb(e,t,r){e=ve(e),t=ne(t);var i=t?Wr(e):0;return t&&i<t?Ua(t-i,r)+e:e}function Yb(e,t,r){return r||t==null?t=0:t&&(t=+t),ry(ve(e).replace(ks,""),t||0)}function Qb(e,t,r){return(r?Je(e,t,r):t===s)?t=1:t=ne(t),oi(ve(e),t)}function Zb(){var e=arguments,t=ve(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Jb=Jr(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});function ex(e,t,r){return r&&typeof r!="number"&&Je(e,t,r)&&(t=r=s),r=r===s?re:r>>>0,r?(e=ve(e),e&&(typeof t=="string"||t!=null&&!zi(t))&&(t=_t(t),!t&&Hr(e))?_r(Pt(e),0,r):e.split(t,r)):[]}var tx=Jr(function(e,t,r){return e+(r?" ":"")+Ni(t)});function rx(e,t,r){return e=ve(e),r=r==null?0:Ar(ne(r),0,e.length),t=_t(t),e.slice(r,r+t.length)==t}function sx(e,t,r){var i=d.templateSettings;r&&Je(e,t,r)&&(t=s),e=ve(e),t=Ja({},t,i,uc);var p=Ja({},t.imports,i.imports,uc),u=He(p),y=jn(p,u),x,v,C=0,z=t.interpolate||Mt,E="__p += '",j=Wn((t.escape||Mt).source+"|"+z.source+"|"+(z===ca?_e:Mt).source+"|"+(t.evaluate||Mt).source+"|$","g"),X="//# sourceURL="+(Te.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++du+"]")+`
|
121
|
+
`;e.replace(j,function(J,de,ye,gt,et,bt){return ye||(ye=gt),E+=e.slice(C,bt).replace(ua,Su),de&&(x=!0,E+=`' +
|
122
122
|
__e(`+de+`) +
|
123
|
-
'`),et&&(v=!0,
|
123
|
+
'`),et&&(v=!0,E+=`';
|
124
124
|
`+et+`;
|
125
|
-
__p += '`),ye&&(
|
125
|
+
__p += '`),ye&&(E+=`' +
|
126
126
|
((__t = (`+ye+`)) == null ? '' : __t) +
|
127
|
-
'`),C=bt+J.length,J}),
|
128
|
-
`;var Z=Te.call(t,"variable")&&t.variable;if(!Z)
|
129
|
-
`+
|
127
|
+
'`),C=bt+J.length,J}),E+=`';
|
128
|
+
`;var Z=Te.call(t,"variable")&&t.variable;if(!Z)E=`with (obj) {
|
129
|
+
`+E+`
|
130
130
|
}
|
131
|
-
`;else if($.test(Z))throw new se(_);
|
131
|
+
`;else if($.test(Z))throw new se(_);E=(v?E.replace(Dn,""):E).replace(vs,"$1").replace(ia,"$1;"),E="function("+(Z||"obj")+`) {
|
132
132
|
`+(Z?"":`obj || (obj = {});
|
133
133
|
`)+"var __t, __p = ''"+(x?", __e = _.escape":"")+(v?`, __j = Array.prototype.join;
|
134
134
|
function print() { __p += __j.call(arguments, '') }
|
135
135
|
`:`;
|
136
|
-
`)+
|
137
|
-
}`;var oe=np(function(){return he(u,X+"return "+S).apply(s,y)});if(oe.source=S,Ci(oe))throw oe;return oe}function ax(e){return ve(e).toLowerCase()}function nx(e){return ve(e).toUpperCase()}function ix(e,t,r){if(e=ve(e),e&&(r||t===s))return yl(e);if(!e||!(t=_t(t)))return e;var i=Pt(e),p=Pt(t),u=_l(i,p),y=fl(i,p)+1;return _r(i,u,y).join("")}function ox(e,t,r){if(e=ve(e),e&&(r||t===s))return e.slice(0,bl(e)+1);if(!e||!(t=_t(t)))return e;var i=Pt(e),p=fl(i,Pt(t))+1;return _r(i,0,p).join("")}function lx(e,t,r){if(e=ve(e),e&&(r||t===s))return e.replace(ks,"");if(!e||!(t=_t(t)))return e;var i=Pt(e),p=_l(i,Pt(t));return _r(i,p).join("")}function cx(e,t){var r=le,i=ht;if(ze(t)){var p="separator"in t?t.separator:p;r="length"in t?ne(t.length):r,i="omission"in t?_t(t.omission):i}e=ve(e);var u=e.length;if(Hr(e)){var y=Pt(e);u=y.length}if(r>=u)return e;var x=r-Wr(i);if(x<1)return i;var v=y?_r(y,0,x).join(""):e.slice(0,x);if(p===s)return v+i;if(y&&(x+=v.length-x),zi(p)){if(e.slice(x).search(p)){var C,z=v;for(p.global||(p=Wn(p.source,ve(we.exec(p))+"g")),p.lastIndex=0;C=p.exec(z);)var S=C.index;v=v.slice(0,S===s?x:S)}}else if(e.indexOf(_t(p),x)!=x){var j=v.lastIndexOf(p);j>-1&&(v=v.slice(0,j))}return v+i}function px(e){return e=ve(e),e&&Ts.test(e)?e.replace(Xt,Ru):e}var dx=Jr(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Ei=ic("toUpperCase");function ap(e,t,r){return e=ve(e),t=r?s:t,t===s?Eu(e)?Uu(e):Du(e):e.match(t)||[]}var np=ce(function(e,t){try{return ut(e,s,t)}catch(r){return Ci(r)?r:new se(r)}}),mx=Jt(function(e,t){return Dt(t,function(r){r=Ht(r),Qt(e,r,Ai(e[r],e))}),e});function ux(e){var t=e==null?0:e.length,r=Q();return e=t?qe(e,function(i){if(typeof i[1]!="function")throw new kt(m);return[r(i[0]),i[1]]}):[],ce(function(i){for(var p=-1;++p<t;){var u=e[p];if(ut(u[0],this,i))return ut(u[1],this,i)}})}function yx(e){return Ry(At(e,T))}function Li(e){return function(){return e}}function _x(e,t){return e==null||e!==e?t:e}var fx=lc(),gx=lc(!0);function ot(e){return e}function Mi(e){return Rl(typeof e=="function"?e:At(e,T))}function bx(e){return Bl(At(e,T))}function xx(e,t){return Ul(e,At(t,T))}var hx=ce(function(e,t){return function(r){return Ls(r,e,t)}}),wx=ce(function(e,t){return function(r){return Ls(e,r,t)}});function Pi(e,t,r){var i=He(t),p=La(t,i);r==null&&!(ze(t)&&(p.length||!i.length))&&(r=t,t=e,e=this,p=La(t,He(t)));var u=!(ze(r)&&"chain"in r)||!!r.chain,y=tr(e);return Dt(p,function(x){var v=t[x];e[x]=v,y&&(e.prototype[x]=function(){var C=this.__chain__;if(u||C){var z=e(this.__wrapped__),S=z.__actions__=at(this.__actions__);return S.push({func:v,args:arguments,thisArg:e}),z.__chain__=C,z}return v.apply(e,cr([this.value()],arguments))})}),e}function vx(){return Ge._===this&&(Ge._=Gu),this}function Oi(){}function Tx(e){return e=ne(e),ce(function(t){return Kl(t,e)})}var Dx=yi(qe),kx=yi(cl),Ix=yi(Fn);function ip(e){return wi(e)?Bn(Ht(e)):t_(e)}function Ax(e){return function(t){return e==null?s:qr(e,t)}}var qx=pc(),Cx=pc(!0);function Ri(){return[]}function Fi(){return!1}function zx(){return{}}function Sx(){return""}function Nx(){return!0}function Ex(e,t){if(e=ne(e),e<1||e>Me)return[];var r=re,i=Ye(e,re);t=Q(t),e-=re;for(var p=$n(i,t);++r<e;)t(r);return p}function Lx(e){return ae(e)?qe(e,Ht):ft(e)?[e]:at(Ic(ve(e)))}function Mx(e){var t=++Hu;return ve(e)+t}var Px=Ba(function(e,t){return e+t},0),Ox=_i("ceil"),Rx=Ba(function(e,t){return e/t},1),Fx=_i("floor");function Bx(e){return e&&e.length?Ea(e,ot,ei):s}function Ux(e,t){return e&&e.length?Ea(e,Q(t,2),ei):s}function Kx(e){return ml(e,ot)}function $x(e,t){return ml(e,Q(t,2))}function jx(e){return e&&e.length?Ea(e,ot,ai):s}function Hx(e,t){return e&&e.length?Ea(e,Q(t,2),ai):s}var Wx=Ba(function(e,t){return e*t},1),Gx=_i("round"),Xx=Ba(function(e,t){return e-t},0);function Vx(e){return e&&e.length?Kn(e,ot):0}function Yx(e,t){return e&&e.length?Kn(e,Q(t,2)):0}return d.after=bg,d.ary=Oc,d.assign=nb,d.assignIn=Qc,d.assignInWith=Ja,d.assignWith=ib,d.at=ob,d.before=Rc,d.bind=Ai,d.bindAll=mx,d.bindKey=Fc,d.castArray=zg,d.chain=Lc,d.chunk=R_,d.compact=F_,d.concat=B_,d.cond=ux,d.conforms=yx,d.constant=Li,d.countBy=Vf,d.create=lb,d.curry=Bc,d.curryRight=Uc,d.debounce=Kc,d.defaults=cb,d.defaultsDeep=pb,d.defer=xg,d.delay=hg,d.difference=U_,d.differenceBy=K_,d.differenceWith=$_,d.drop=j_,d.dropRight=H_,d.dropRightWhile=W_,d.dropWhile=G_,d.fill=X_,d.filter=Qf,d.flatMap=eg,d.flatMapDeep=tg,d.flatMapDepth=rg,d.flatten=zc,d.flattenDeep=V_,d.flattenDepth=Y_,d.flip=wg,d.flow=fx,d.flowRight=gx,d.fromPairs=Q_,d.functions=gb,d.functionsIn=bb,d.groupBy=sg,d.initial=J_,d.intersection=ef,d.intersectionBy=tf,d.intersectionWith=rf,d.invert=hb,d.invertBy=wb,d.invokeMap=ng,d.iteratee=Mi,d.keyBy=ig,d.keys=He,d.keysIn=it,d.map=Ga,d.mapKeys=Tb,d.mapValues=Db,d.matches=bx,d.matchesProperty=xx,d.memoize=Va,d.merge=kb,d.mergeWith=Zc,d.method=hx,d.methodOf=wx,d.mixin=Pi,d.negate=Ya,d.nthArg=Tx,d.omit=Ib,d.omitBy=Ab,d.once=vg,d.orderBy=og,d.over=Dx,d.overArgs=Tg,d.overEvery=kx,d.overSome=Ix,d.partial=qi,d.partialRight=$c,d.partition=lg,d.pick=qb,d.pickBy=Jc,d.property=ip,d.propertyOf=Ax,d.pull=of,d.pullAll=Nc,d.pullAllBy=lf,d.pullAllWith=cf,d.pullAt=pf,d.range=qx,d.rangeRight=Cx,d.rearg=Dg,d.reject=dg,d.remove=df,d.rest=kg,d.reverse=ki,d.sampleSize=ug,d.set=zb,d.setWith=Sb,d.shuffle=yg,d.slice=mf,d.sortBy=gg,d.sortedUniq=xf,d.sortedUniqBy=hf,d.split=ex,d.spread=Ig,d.tail=wf,d.take=vf,d.takeRight=Tf,d.takeRightWhile=Df,d.takeWhile=kf,d.tap=Bf,d.throttle=Ag,d.thru=Wa,d.toArray=Xc,d.toPairs=ep,d.toPairsIn=tp,d.toPath=Lx,d.toPlainObject=Yc,d.transform=Nb,d.unary=qg,d.union=If,d.unionBy=Af,d.unionWith=qf,d.uniq=Cf,d.uniqBy=zf,d.uniqWith=Sf,d.unset=Eb,d.unzip=Ii,d.unzipWith=Ec,d.update=Lb,d.updateWith=Mb,d.values=rs,d.valuesIn=Pb,d.without=Nf,d.words=ap,d.wrap=Cg,d.xor=Ef,d.xorBy=Lf,d.xorWith=Mf,d.zip=Pf,d.zipObject=Of,d.zipObjectDeep=Rf,d.zipWith=Ff,d.entries=ep,d.entriesIn=tp,d.extend=Qc,d.extendWith=Ja,Pi(d,d),d.add=Px,d.attempt=np,d.camelCase=Bb,d.capitalize=rp,d.ceil=Ox,d.clamp=Ob,d.clone=Sg,d.cloneDeep=Eg,d.cloneDeepWith=Lg,d.cloneWith=Ng,d.conformsTo=Mg,d.deburr=sp,d.defaultTo=_x,d.divide=Rx,d.endsWith=Ub,d.eq=Rt,d.escape=Kb,d.escapeRegExp=$b,d.every=Yf,d.find=Zf,d.findIndex=qc,d.findKey=db,d.findLast=Jf,d.findLastIndex=Cc,d.findLastKey=mb,d.floor=Fx,d.forEach=Mc,d.forEachRight=Pc,d.forIn=ub,d.forInRight=yb,d.forOwn=_b,d.forOwnRight=fb,d.get=Si,d.gt=Pg,d.gte=Og,d.has=xb,d.hasIn=Ni,d.head=Sc,d.identity=ot,d.includes=ag,d.indexOf=Z_,d.inRange=Rb,d.invoke=vb,d.isArguments=Sr,d.isArray=ae,d.isArrayBuffer=Rg,d.isArrayLike=nt,d.isArrayLikeObject=Pe,d.isBoolean=Fg,d.isBuffer=fr,d.isDate=Bg,d.isElement=Ug,d.isEmpty=Kg,d.isEqual=$g,d.isEqualWith=jg,d.isError=Ci,d.isFinite=Hg,d.isFunction=tr,d.isInteger=jc,d.isLength=Qa,d.isMap=Hc,d.isMatch=Wg,d.isMatchWith=Gg,d.isNaN=Xg,d.isNative=Vg,d.isNil=Qg,d.isNull=Yg,d.isNumber=Wc,d.isObject=ze,d.isObjectLike=Le,d.isPlainObject=Bs,d.isRegExp=zi,d.isSafeInteger=Zg,d.isSet=Gc,d.isString=Za,d.isSymbol=ft,d.isTypedArray=ts,d.isUndefined=Jg,d.isWeakMap=eb,d.isWeakSet=tb,d.join=sf,d.kebabCase=jb,d.last=Ct,d.lastIndexOf=af,d.lowerCase=Hb,d.lowerFirst=Wb,d.lt=rb,d.lte=sb,d.max=Bx,d.maxBy=Ux,d.mean=Kx,d.meanBy=$x,d.min=jx,d.minBy=Hx,d.stubArray=Ri,d.stubFalse=Fi,d.stubObject=zx,d.stubString=Sx,d.stubTrue=Nx,d.multiply=Wx,d.nth=nf,d.noConflict=vx,d.noop=Oi,d.now=Xa,d.pad=Gb,d.padEnd=Xb,d.padStart=Vb,d.parseInt=Yb,d.random=Fb,d.reduce=cg,d.reduceRight=pg,d.repeat=Qb,d.replace=Zb,d.result=Cb,d.round=Gx,d.runInContext=w,d.sample=mg,d.size=_g,d.snakeCase=Jb,d.some=fg,d.sortedIndex=uf,d.sortedIndexBy=yf,d.sortedIndexOf=_f,d.sortedLastIndex=ff,d.sortedLastIndexBy=gf,d.sortedLastIndexOf=bf,d.startCase=tx,d.startsWith=rx,d.subtract=Xx,d.sum=Vx,d.sumBy=Yx,d.template=sx,d.times=Ex,d.toFinite=rr,d.toInteger=ne,d.toLength=Vc,d.toLower=ax,d.toNumber=zt,d.toSafeInteger=ab,d.toString=ve,d.toUpper=nx,d.trim=ix,d.trimEnd=ox,d.trimStart=lx,d.truncate=cx,d.unescape=px,d.uniqueId=Mx,d.upperCase=dx,d.upperFirst=Ei,d.each=Mc,d.eachRight=Pc,d.first=Sc,Pi(d,function(){var e={};return $t(d,function(t,r){Te.call(d.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),d.VERSION=o,Dt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Dt(["drop","take"],function(e,t){ue.prototype[e]=function(r){r=r===s?1:Be(ne(r),0);var i=this.__filtered__&&!t?new ue(this):this.clone();return i.__filtered__?i.__takeCount__=Ye(r,i.__takeCount__):i.__views__.push({size:Ye(r,re),type:e+(i.__dir__<0?"Right":"")}),i},ue.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),Dt(["filter","map","takeWhile"],function(e,t){var r=t+1,i=r==Ke||r==be;ue.prototype[e]=function(p){var u=this.clone();return u.__iteratees__.push({iteratee:Q(p,3),type:r}),u.__filtered__=u.__filtered__||i,u}}),Dt(["head","last"],function(e,t){var r="take"+(t?"Right":"");ue.prototype[e]=function(){return this[r](1).value()[0]}}),Dt(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");ue.prototype[e]=function(){return this.__filtered__?new ue(this):this[r](1)}}),ue.prototype.compact=function(){return this.filter(ot)},ue.prototype.find=function(e){return this.filter(e).head()},ue.prototype.findLast=function(e){return this.reverse().find(e)},ue.prototype.invokeMap=ce(function(e,t){return typeof e=="function"?new ue(this):this.map(function(r){return Ls(r,e,t)})}),ue.prototype.reject=function(e){return this.filter(Ya(Q(e)))},ue.prototype.slice=function(e,t){e=ne(e);var r=this;return r.__filtered__&&(e>0||t<0)?new ue(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==s&&(t=ne(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},ue.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ue.prototype.toArray=function(){return this.take(re)},$t(ue.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),p=d[i?"take"+(t=="last"?"Right":""):t],u=i||/^find/.test(t);p&&(d.prototype[t]=function(){var y=this.__wrapped__,x=i?[1]:arguments,v=y instanceof ue,C=x[0],z=v||ae(y),S=function(de){var ye=p.apply(d,cr([de],x));return i&&j?ye[0]:ye};z&&r&&typeof C=="function"&&C.length!=1&&(v=z=!1);var j=this.__chain__,X=!!this.__actions__.length,Z=u&&!j,oe=v&&!X;if(!u&&z){y=oe?y:new ue(this);var J=e.apply(y,x);return J.__actions__.push({func:Wa,args:[S],thisArg:s}),new It(J,j)}return Z&&oe?e.apply(this,x):(J=this.thru(S),Z?i?J.value()[0]:J.value():J)})}),Dt(["pop","push","shift","sort","splice","unshift"],function(e){var t=ba[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var p=arguments;if(i&&!this.__chain__){var u=this.value();return t.apply(ae(u)?u:[],p)}return this[r](function(y){return t.apply(ae(y)?y:[],p)})}}),$t(ue.prototype,function(e,t){var r=d[t];if(r){var i=r.name+"";Te.call(Yr,i)||(Yr[i]=[]),Yr[i].push({name:t,func:r})}}),Yr[Fa(s,V).name]=[{name:"wrapper",func:s}],ue.prototype.clone=cy,ue.prototype.reverse=py,ue.prototype.value=dy,d.prototype.at=Uf,d.prototype.chain=Kf,d.prototype.commit=$f,d.prototype.next=jf,d.prototype.plant=Wf,d.prototype.reverse=Gf,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=Xf,d.prototype.first=d.prototype.head,As&&(d.prototype[As]=Hf),d},Gr=Ku();Tr?((Tr.exports=Gr)._=Gr,Mn._=Gr):Ge._=Gr}).call(ss)}(Ws,Ws.exports);var io=Ws.exports;const Se="tccScript",Er={builtinFunctions:/strategy\.closedtrades\.max_drawdown_percent|strategy\.opentrades\.max_drawdown_percent|strategy\.risk\.max_intraday_filled_orders|strategy\.closedtrades\.max_runup_percent|array\.percentile_linear_interpolation|strategy\.closedtrades\.entry_bar_index|strategy\.opentrades\.max_runup_percent|strategy\.closedtrades\.exit_bar_index|strategy\.closedtrades\.profit_percent|strategy\.closedtrades\.entry_comment|strategy\.opentrades\.entry_bar_index|strategy\.closedtrades\.exit_comment|strategy\.closedtrades\.max_drawdown|strategy\.opentrades\.profit_percent|ta\.percentile_linear_interpolation|strategy\.closedtrades\.entry_price|strategy\.opentrades\.entry_comment|strategy\.closedtrades\.commission|strategy\.closedtrades\.entry_time|strategy\.closedtrades\.exit_price|strategy\.opentrades\.max_drawdown|strategy\.risk\.max_cons_loss_days|strategy\.closedtrades\.exit_time|strategy\.closedtrades\.max_runup|strategy\.opentrades\.entry_price|strategy\.risk\.max_intraday_loss|strategy\.risk\.max_position_size|table\.cell_set_text_font_family|strategy\.closedtrades\.entry_id|strategy\.opentrades\.commission|strategy\.opentrades\.entry_time|array\.binary_search_rightmost|array\.percentile_nearest_rank|strategy\.closedtrades\.exit_id|strategy\.opentrades\.max_runup|array\.binary_search_leftmost|strategy\.closedtrades\.profit|strategy\.opentrades\.entry_id|strategy\.risk\.allow_entry_in|strategy\.convert_to_account|box\.set_bottom_right_point|label\.set_text_font_family|strategy\.closedtrades\.size|strategy\.convert_to_symbol|strategy\.default_entry_qty|strategy\.opentrades\.profit|strategy\.risk\.max_drawdown|ta\.percentile_nearest_rank|table\.cell_set_text_halign|table\.cell_set_text_valign|request\.security_lower_tf|table\.cell_set_text_color|box\.set_text_font_family|strategy\.opentrades\.size|table\.cell_set_text_size|matrix\.is_antisymmetric|box\.set_top_left_point|chart\.point\.from_index|matrix\.is_antidiagonal|table\.cell_set_bgcolor|table\.cell_set_tooltip|table\.set_border_color|table\.set_border_width|timeframe\.from_seconds|chart\.point\.from_time|line\.set_second_point|math\.round_to_mintick|matrix\.elements_count|request\.currency_rate|ta\.pivot_point_levels|table\.cell_set_height|table\.set_frame_color|table\.set_frame_width|box\.set_border_color|box\.set_border_style|box\.set_border_width|line\.set_first_point|matrix\.is_stochastic|matrix\.is_triangular|table\.cell_set_width|timeframe\.in_seconds|array\.binary_search|box\.set_rightbottom|box\.set_text_halign|box\.set_text_valign|color\.from_gradient|label\.set_textalign|label\.set_textcolor|matrix\.eigenvectors|matrix\.is_symmetric|matrix\.swap_columns|strategy\.cancel_all|table\.cell_set_text|array\.new_linefill|array\.sort_indices|box\.set_text_color|linefill\.get_line1|linefill\.get_line2|linefill\.set_color|matrix\.eigenvalues|matrix\.is_diagonal|matrix\.is_identity|strategy\.close_all|table\.set_position|ticker\.pointfigure|array\.lastindexof|array\.percentrank|array\.standardize|box\.set_text_size|box\.set_text_wrap|label\.set_tooltip|matrix\.remove_col|matrix\.remove_row|request\.dividends|request\.financial|table\.merge_cells|table\.set_bgcolor|ticker\.heikinashi|array\.covariance|array\.new_string|chart\.point\.copy|matrix\.is_binary|matrix\.is_square|matrix\.submatrix|matrix\.swap_rows|matrix\.transpose|request\.earnings|request\.economic|request\.security|ticker\.linebreak|timeframe\.change|array\.new_color|array\.new_float|array\.new_label|array\.new_table|box\.set_bgcolor|box\.set_lefttop|chart\.point\.new|chart\.point\.now|input\.text_area|input\.timeframe|label\.set_color|label\.set_point|label\.set_style|line\.set_extend|linefill\.delete|polyline\.delete|str\.format_time|str\.replace_all|strategy\.cancel|ticker\.standard|alertcondition|array\.includes|array\.new_bool|array\.new_line|array\.variance|box\.get_bottom|box\.set_bottom|box\.set_extend|label\.get_text|label\.set_size|label\.set_text|label\.set_xloc|label\.set_yloc|line\.get_price|line\.set_color|line\.set_style|line\.set_width|math\.todegrees|math\.toradians|matrix\.add_col|matrix\.add_row|matrix\.columns|matrix\.is_zero|matrix\.reshape|matrix\.reverse|request\.quandl|request\.splits|str\.startswith|strategy\.close|strategy\.entry|strategy\.order|syminfo\.prefix|syminfo\.ticker|ta\.correlation|ta\.highestbars|ta\.percentrank|ticker\.inherit|array\.indexof|array\.new_box|array\.new_int|array\.reverse|array\.unshift|box\.get_right|box\.set_right|input\.session|line\.set_xloc|matrix\.concat|matrix\.median|max_bars_back|runtime\.error|str\.substring|strategy\.exit|ta\.crossunder|ta\.lowestbars|ta\.supertrend|ticker\.modify|array\.concat|array\.insert|array\.median|array\.remove|box\.get_left|box\.set_left|box\.set_text|input\.source|input\.string|input\.symbol|label\.delete|label\.set_xy|line\.set_xy1|line\.set_xy2|linefill\.new|map\.contains|matrix\.trace|polyline\.new|request\.seed|str\.contains|str\.endswith|str\.tonumber|str\.tostring|ta\.barssince|ta\.crossover|ta\.pivothigh|ta\.valuewhen|table\.delete|ticker\.renko|array\.clear|array\.every|array\.first|array\.range|array\.shift|array\.slice|array\.stdev|box\.get_top|box\.set_top|input\.color|input\.float|input\.price|label\.get_x|label\.get_y|label\.set_x|label\.set_y|line\.delete|line\.get_x1|line\.get_x2|line\.get_y1|line\.get_y2|line\.set_x1|line\.set_x2|line\.set_y1|line\.set_y2|log\.warning|map\.put_all|math\.random|matrix\.copy|matrix\.diff|matrix\.fill|matrix\.kron|matrix\.mode|matrix\.mult|matrix\.pinv|matrix\.rank|matrix\.rows|matrix\.sort|str\.replace|ta\.pivotlow|ta\.variance|table\.clear|ticker\.kagi|array\.copy|array\.fill|array\.from|array\.join|array\.last|array\.mode|array\.push|array\.size|array\.some|array\.sort|box\.delete|dayofmonth|input\.bool|input\.time|label\.copy|map\.remove|map\.values|math\.floor|math\.log10|math\.round|matrix\.avg|matrix\.col|matrix\.det|matrix\.get|matrix\.inv|matrix\.max|matrix\.min|matrix\.new|matrix\.pow|matrix\.row|matrix\.set|matrix\.sum|plotcandle|str\.format|str\.length|ta\.falling|ta\.highest|table\.cell|ticker\.new|time_close|weekofyear|array\.abs|array\.avg|array\.get|array\.max|array\.min|array\.new|array\.pop|array\.set|array\.sum|color\.new|color\.rgb|dayofweek|indicator|input\.int|label\.new|line\.copy|log\.error|map\.clear|math\.acos|math\.asin|math\.atan|input\.enum|math\.ceil|math\.sign|math\.sqrt|plotarrow|plotshape|str\.lower|str\.match|str\.split|str\.upper|ta\.change|ta\.linreg|ta\.lowest|ta\.median|ta\.rising|table\.new|timestamp|barcolor|box\.copy|line\.new|linefill|log\.info|map\.copy|map\.keys|map\.size|math\.abs|math\.avg|math\.cos|math\.exp|math\.log|math\.max|math\.min|math\.pow|math\.sin|math\.sum|math\.tan|plotchar|strategy|ta\.cross|ta\.range|ta\.stdev|ta\.stoch|bgcolor|box\.new|color\.b|color\.g|color\.r|color\.t|library|map\.get|map\.new|map\.put|plotbar|str\.pos|ta\.alma|ta\.macd|ta\.mode|ta\.swma|ta\.vwap|ta\.vwma|fixnan|minute|second|string|ta\.atr|ta\.bbw|ta\.cci|ta\.cmo|ta\.cog|ta\.cum|ta\.dev|ta\.dmi|ta\.ema|ta\.hma|ta\.kcw|ta\.max|ta\.mfi|ta\.min|ta\.mom|ta\.rma|ta\.roc|ta\.rsi|ta\.sar|ta\.sma|ta\.tsi|ta\.wma|ta\.wpr|alert|color|float|hline|input|label|month|ta\.bb|ta\.kc|ta\.tr|table|bool|fill|hour|line|plot|time|year|box|int|na|nz/,keywords:/continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to/,tokenizer:{root:[[/\/\/\s*(?=@)/,"comment","@comments"],[/\/\/.*(?!@).*/,"comment"],[/\'([^\'\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/\"/,{token:"string",bracket:"@open",next:"@stringDouble"}],[/(type|enum)\s+[a-zA-Z]\w*/,"entity.name.type"],[/'/,{token:"string",bracket:"@open",next:"@stringSingle"}],[/(@builtinFunctions)(?=\s*\(|\s*<.*>)/,{token:"support.function",next:"@template"}],[/@punctuation/,{token:"punctuation.operator",next:"@property"}],[/(varip|var)\b(\s+)((?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)/,[{token:"keyword"},{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"}]],[/\b(?:@builtinTypes)(?=(\s*)[\[|<|(]|(?=\s+(?=[^.=][\w\(]*))|\s*$)/,{token:"support.type",next:"@template"}],[/^(\s*)\b(?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)([\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)(\s+)(\=)/,[{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"},{token:"source"},{token:"keyword.equals"}]],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/import(?=\s+@importName)/,{token:"keyword",next:"@import"}],[/import(?=\s+[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+)/,"keyword"],[/[+-]?\d+\.\d*([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/[+-]?\.\d+([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/([+-]?(\d+))(?!\w+)(?!\w+)/,"constant.numeric.integer"],[/(?:true|false)\b/,"constant.other.boolean"],[/#[0-9a-fA-F]{6,8}\b/,"constant.other.color"],[/\+=|\-=|\*=|\/=|%=|[\/%*+\-]|==|!=|<=|>=|=>|<|>|\?|\:=|\:|\,/,"keyword.operator"],[/\b(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b/,"keyword"],[/^[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,"entity.name.function"],[/[0-9]+\b/,"constant.numeric.integer"],[/=/,"keyword.equals"],[/\b(?:strategy\.commission\.cash_per_contract|strategy\.avg_winning_trade_percent|strategy\.avg_winning_trade|strategy\.avg_losing_trade_percent|strategy\.avg_losing_trade|syminfo\.recommendations_sell_strong|syminfo\.recommendations_buy_strong|strategy\.commission\.cash_per_order|strategy\.margin_liquidation_price|strategy\.max_contracts_held_short|strategy\.max_contracts_held_long|syminfo\.shares_outstanding_float|syminfo\.shares_outstanding_total|barstate\.islastconfirmedhistory|earnings\.future_period_end_time|strategy\.max_contracts_held_all|syminfo\.target_price_estimates|strategy\.max_drawdown_percent|syminfo\.recommendations_total|alert\.freq_once_per_bar_close|label\.style_label_lower_right|label\.style_label_upper_right|chart\.right_visible_bar_time|strategy\.grossprofit_percent|strategy\.position_entry_name|syminfo\.recommendations_date|syminfo\.recommendations_hold|syminfo\.recommendations_sell|syminfo\.target_price_average|label\.style_label_lower_left|label\.style_label_upper_left|chart\.left_visible_bar_time|strategy\.openprofit_percent|strategy\.position_avg_price|syminfo\.recommendations_buy|syminfo\.target_price_median|plot\.style_stepline_diamond|strategy\.commission\.percent|session\.isfirstbar_regular|strategy\.grossloss_percent|strategy\.max_runup_percent|strategy\.netprofit_percent|strategy\.percent_of_equity|session\.islastbar_regular|strategy\.account_currency|syminfo\.target_price_date|syminfo\.target_price_high|dividends\.future_pay_date|strategy\.initial_capital|syminfo\.target_price_low|dividends\.future_ex_date|label\.style_label_center|label\.style_text_outline|label\.style_triangledown|strategy\.direction\.short|earnings\.future_revenue|alert\.freq_once_per_bar|dividends\.future_amount|label\.style_label_right|strategy\.direction\.long|strategy\.position_size|barmerge\.lookahead_off|label\.style_label_down|label\.style_label_left|label\.style_triangleup|line\.style_arrow_right|position\.bottom_center|position\.middle_center|strategy\.direction\.all|strategy\.closedtrades|strategy\.max_drawdown|barmerge\.lookahead_on|earnings\.standardized|font\.family_monospace|label\.style_arrowdown|line\.style_arrow_both|line\.style_arrow_left|plot\.style_steplinebr|position\.bottom_right|position\.middle_right|barstate\.isconfirmed|earnings\.future_time|session\.ispostmarket|strategy\.grossprofit|syminfo\.basecurrency|syminfo\.shareholders|timeframe\.isintraday|timeframe\.multiplier|adjustment\.dividends|label\.style_label_up|plot\.style_histogram|position\.bottom_left|position\.middle_left|barstate\.isrealtime|chart\.is_heikinashi|earnings\.future_eps|session\.ispremarket|strategy\.eventrades|strategy\.losstrades|strategy\.openprofit|strategy\.opentrades\.capital_held|strategy\.opentrades|syminfo\.description|timeframe\.isminutes|timeframe\.ismonthly|timeframe\.isseconds|dayofweek\.wednesday|display\.data_window|display\.price_scale|display\.status_line|font\.family_default|label\.style_arrowup|label\.style_diamond|plot\.style_stepline|position\.top_center|strategy\.oca\.cancel|strategy\.oca\.reduce|barstate\.ishistory|chart\.is_linebreak|session\.isfirstbar|strategy\.grossloss|strategy\.max_runup|strategy\.netprofit|strategy\.wintrades|syminfo\.pointvalue|syminfo\.pricescale|syminfo\.volumetype|timeframe\.isweekly|dayofweek\.saturday|dayofweek\.thursday|hline\.style_dashed|hline\.style_dotted|label\.style_circle|label\.style_square|label\.style_xcross|plot\.style_circles|plot\.style_columns|position\.top_right|shape\.triangledown|splits\.denominator|chart\.is_standard|session\.islastbar|syminfo\.employees|timeframe\.isdaily|adjustment\.splits|barmerge\.gaps_off|dayofweek\.tuesday|earnings\.estimate|hline\.style_solid|label\.style_cross|line\.style_dashed|line\.style_dotted|location\.abovebar|location\.absolute|location\.belowbar|plot\.style_areabr|plot\.style_linebr|position\.top_left|strategy\.oca\.none|text\.align_bottom|text\.align_center|barstate\.isfirst|session\.ismarket|syminfo\.currency|syminfo\.industry|syminfo\.tickerid|syminfo\.timezone|timeframe\.period|barmerge\.gaps_on|dayofweek\.friday|dayofweek\.monday|dayofweek\.sunday|label\.style_flag|label\.style_none|line\.style_solid|order\.descending|plot\.style_cross|session\.extended|shape\.triangleup|splits\.numerator|text\.align_right|barstate\.islast|strategy\.equity|syminfo\.country|syminfo\.minmove|syminfo\.mintick|syminfo\.session|time_tradingday|timeframe\.isdwm|adjustment\.none|dividends\.gross|earnings\.actual|location\.bottom|order\.ascending|plot\.style_area|plot\.style_line|session\.regular|shape\.arrowdown|shape\.labeldown|text\.align_left|barstate\.isnew|chart\.bg_color|chart\.fg_color|chart\.is_range|chart\.is_renko|last_bar_index|strategy\.short|syminfo\.prefix|syminfo\.sector|syminfo\.ticker|alert\.freq_all|format\.inherit|format\.mintick|format\.percent|strategy\.fixed|text\.align_top|text\.wrap_auto|text\.wrap_none|xloc\.bar_index|chart\.is_kagi|last_bar_time|strategy\.long|color\.fuchsia|currency\.NONE|currency\.USDT|dividends\.net|format\.volume|shape\.arrowup|shape\.diamond|shape\.labelup|strategy\.cash|xloc\.bar_time|yloc\.abovebar|yloc\.belowbar|chart\.is_pnf|linefill\.all|polyline\.all|syminfo\.root|syminfo\.type|color\.maroon|color\.orange|color\.purple|color\.silver|color\.yellow|currency\.AUD|currency\.BTC|currency\.CAD|currency\.CHF|currency\.ETH|currency\.EUR|currency\.GBP|currency\.HKD|currency\.INR|currency\.JPY|currency\.KRW|currency\.MYR|currency\.NOK|currency\.NZD|currency\.RUB|currency\.SEK|currency\.SGD|currency\.TRY|currency\.USD|currency\.ZAR|display\.none|display\.pane|extend\.right|format\.price|location\.top|shape\.circle|shape\.square|shape\.xcross|color\.black|color\.green|color\.olive|color\.white|display\.all|extend\.both|extend\.left|extend\.none|scale\.right|shape\.cross|size\.normal|dayofmonth|ta\.accdist|time_close|weekofyear|color\.aqua|color\.blue|color\.gray|color\.lime|color\.navy|color\.teal|scale\.left|scale\.none|shape\.flag|size\.large|size\.small|yloc\.price|bar_index|dayofweek|label\.all|table\.all|color\.red|math\.rphi|size\.auto|size\.huge|size\.tiny|line\.all|math\.phi|box\.all|ta\.vwap|ta\.wvad|timenow|math\.pi|minute|second|ta\.iii|ta\.nvi|ta\.obv|ta\.pvi|ta\.pvt|ta\.wad|volume|math\.e|close|hlcc4|month|ohlc4|ta\.tr|false|high|hlc3|hour|open|time|year|true|hl2|low|na)\b(?!\s*=\s*\w+)/,"support.variable"],[/[(|)|\[|\]]/,"paren"],[/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/,{token:"entity.name.method"}],[/\w+\b/,"variable.other"]],comments:[[/@[A-Za-z]+(\s*=\s*)?$/,{token:"comment.annotation",next:"@pop"}],[/@[A-Za-z]+(\s*=\s*)?/,{token:"comment.annotation"}],[/(?!\s*@[A-Za-z]+).+$/,{token:"comment",next:"@pop"}]],stringDouble:[[/[^\\\"]+/,"string"],[/\\./,"string.invalid"],[/\"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/\\./,"string.invalid"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],template:[[/(@builtinTypes)/,{token:"support.type"}],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/\(|\)|\[|\]|\=|\>/,{token:"paren",next:"@pop"}],[/(\,)(\s+)/,["keyword.operator","source"]],[/(\,)/,{token:"keyword.operator"}],[/([\w.\d$]+)/,{token:"entity.name.type"}],[/(<|>)/,{token:"paren"}],[/\s(?=\w)|$/,{token:"source",next:"@pop"}]],property:[[/@punctuation/,{token:"punctuation.operator"}],[/(@builtinTypes)(?=\s*[(])/,{token:"support.method",next:"@pop"}],[/[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,{token:"entity.name.method",next:"@pop"}],[/[a-zA-Z0-9_]+/,{token:"variable.other.property",next:"@pop"}],[/@empty/,{token:"source",next:"@pop"}]],import:[[/\s+/,{token:"source"}],[/(@importName)(\s+)(as\b)(\s+)(@importAlias)/,[{token:"entity.name.module"},{token:"source"},{token:"keyword"},{token:"source"},{token:"entity.name.module.name",next:"@pop"}]],[/@importName/,{token:"entity.name.module",next:"@pop"}]]},builtinTypes:/chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map/,punctuation:/[.](?![.])/,importName:/[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+/,importAlias:/[a-zA-Z\d\_\u00a1\uffff\/]+/,empty:/^$/};var xt;(function(a){a[a.None=0]="None",a[a.Indent=1]="Indent",a[a.IndentOutdent=2]="IndentOutdent",a[a.Outdent=3]="Outdent"})(xt||(xt={}));const on={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["(",")"],["[","]"]],folding:{markers:{start:/(\/\/#region)|(\/\/.*{($|\s))/,end:/(\/\/#endregion)|(\/\/.*}($|\s))/}},autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:/\)\s*=>\s*$/,action:{indentAction:xt.Indent}},{beforeText:/if\s+.*\s*$/,action:{indentAction:xt.Indent}},{beforeText:/else/,action:{indentAction:xt.Indent}},{beforeText:/for\s+\S+\s*=\s*\S+\s+to\s+\S+(?:\s+by\s+\S+)?\s*$/,action:{indentAction:xt.Indent}},{beforeText:/for\s+(?:\[\S+\s+\S+]|\S+)\s+in\s+\S+\s*$/,action:{indentAction:xt.Indent}},{beforeText:/switch\s+.*\s*$/,action:{indentAction:xt.Indent}},{beforeText:/while\s+.*\s*$/,action:{indentAction:xt.Indent}},{beforeText:/type\s+\w+/,action:{indentAction:xt.Indent}},{beforeText:/enum\s+\w+/,action:{indentAction:xt.Indent}},{beforeText:/^\s*$/,action:{indentAction:xt.Outdent}}]},I={"color-white":"#ffffff","color-black":"#000000","color-transparent":"#00000000","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEC","color-ripe-red-100":"#FCCBCD","color-ripe-red-200":"#FAA1A4","color-ripe-red-300":"#F77C80","color-ripe-red-400":"#F7525F","color-ripe-red-500":"#F23645","color-ripe-red-600":"#CC2F3C","color-ripe-red-700":"#B22833","color-ripe-red-800":"#991F29","color-ripe-red-900":"#801922","color-ripe-red-a100":"#FF8080","color-ripe-red-a200":"#FF5252","color-ripe-red-a400":"#FF3333","color-ripe-red-a600":"#CC2929","color-ripe-red-a700":"#802028","color-ripe-red-a800":"#4D191D","color-ripe-red-a900":"#331F20","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#FF9100","color-tan-orange-a600":"#CC7014","color-tan-orange-a700":"#8C541C","color-tan-orange-a800":"#593A1B","color-tan-orange-a900":"#33261A","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-800":"#2E7D32","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#EEDA01","color-tv-blue-50":"#E3EFFD","color-tv-blue-100":"#BBD9FB","color-tv-blue-200":"#90BFF9","color-tv-blue-300":"#5B9CF6","color-tv-blue-400":"#3179F5","color-tv-blue-500":"#2962FF","color-tv-blue-600":"#1E53E5","color-tv-blue-700":"#1848CC","color-tv-blue-800":"#143EB3","color-tv-blue-900":"#0C3299","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#143A87","color-tv-blue-a800":"#142E61","color-tv-blue-a900":"#132042","color-deep-blue-50":"#EDE7F6","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a200":"#7C4DFF","color-deep-blue-a400":"#651FFF","color-deep-blue-a700":"#6200EA","color-minty-green-50":"#DAF2EE","color-minty-green-100":"#ACE5DC","color-minty-green-200":"#70CCBD","color-minty-green-300":"#42BDA8","color-minty-green-400":"#22AB94","color-minty-green-500":"#089981","color-minty-green-600":"#06806B","color-minty-green-700":"#056656","color-minty-green-800":"#004D40","color-minty-green-900":"#00332A","color-minty-green-a400":"#2BD9BC","color-minty-green-a600":"#24B29B","color-minty-green-a700":"#1B7667","color-minty-green-a800":"#10443B","color-minty-green-a900":"#082621","color-grapes-purple-50":"#F3E5F5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a100":"#EA80FC","color-grapes-purple-a200":"#E040FB","color-grapes-purple-a400":"#D500F9","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-800":"#AD1457","color-berry-pink-900":"#880E4F","color-berry-pink-a100":"#ff80ab","color-berry-pink-a200":"#ff4081","color-berry-pink-a400":"#f50057","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-forest-green-50":"#DAF2E6","color-forest-green-100":"#ACE5C9","color-forest-green-200":"#70CC9E","color-forest-green-300":"#42BD7F","color-forest-green-400":"#22AB67","color-forest-green-500":"#089950","color-forest-green-600":"#068043","color-forest-green-700":"#056636","color-forest-green-800":"#004D27","color-forest-green-900":"#1A3326","color-facebook":"#1877F2","color-deep-facebook":"#1564CA","color-twitter":"#1DA1F2","color-deep-twitter":"#188CD3","color-youtube":"#FF0000","color-linkedin":"#007BB5","color-seeking-alpha-brand":"#ff7200"};function Bt(a,n=1){return a+Math.round(255*Math.min(Math.max(n,0),1)).toString(16).toUpperCase().padStart(2,"0")}const ln={base:"vs",inherit:!0,rules:[{token:"comment",foreground:I["color-cold-gray-400"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:I["color-cold-gray-900"]},{token:"string",foreground:I["color-iguana-green-700"]},{token:"constant.numeric",foreground:I["color-banana-yellow-900"]},{token:"constant.language",foreground:I["color-ripe-red-a600"]},{token:"constant.other.color",foreground:I["color-ripe-red-a600"]},{token:"constant.other",foreground:I["color-ripe-red-a600"]},{token:"support.variable",foreground:I["color-ripe-red-a600"]},{token:"support.function",foreground:I["color-tv-blue-a600"]},{token:"support.type",foreground:I["color-minty-green-400"],fontStyle:"bold"},{token:"entity.name.type",foreground:I["color-minty-green-400"],fontStyle:"bold"},{token:"support.method",foreground:I["color-tv-blue-a600"]},{token:"keyword.equals",foreground:I["color-minty-green-400"]},{token:"keyword.operator",foreground:I["color-minty-green-400"]},{token:"keyword.other",foreground:I["color-minty-green-400"]},{token:"keyword",foreground:I["color-minty-green-400"]},{token:"variable.other",foreground:I["color-cold-gray-800"]},{token:"variable.other.property",foreground:I["color-cold-gray-800"]},{token:"paren",foreground:I["color-black"]},{token:"entity.name.function",foreground:I["color-tv-blue-900"]},{token:"entity.name.method",foreground:I["color-tv-blue-900"]},{token:"meta.function-call",foreground:I["color-grapes-purple-600"]},{token:"entity.name.module.name",foreground:I["color-grapes-purple-600"]},{token:"entity.name.module",foreground:I["color-tv-blue-a600"]},{token:"",background:I["color-white"]}],colors:{"editor.foreground":I["color-cold-gray-900"],"editor.background":"#00000000","editorLineNumber.foreground":I["color-cold-gray-400"],"editorLineNumber.activeForeground":I["color-cold-gray-700"],"editorHoverWidget.background":I["color-white"],"editorHoverWidget.statusBarBackground":I["color-cold-gray-150"],"editorHoverWidget.foreground":I["color-cold-gray-900"],"editorWidget.background":I["color-white"],"editorWidget.foreground":I["color-cold-gray-900"],"editorGutter.background":"#00000000","editor.foldBackground":Bt(I["color-cold-gray-200"],.5),"editor.lineHighlightBackground":I["color-tv-blue-50"],"editor.lineHighlightBorder":I["color-tv-blue-50"],"editor.rangeHighlightBackground":I["color-tv-blue-a800"],"editorBracketMatch.background":I["color-cold-gray-150"],"editor.selectionBackground":I["color-tv-blue-100"],"editor.selectionHighlightBackground":I["color-tv-blue-50"],"editor.findMatchBackground":I["color-tan-orange-100"],"editor.findMatchHighlightBackground":I["color-tan-orange-100"],"editor.findMatchBorder":I["color-tan-orange-500"],"list.foreground":I["color-cold-gray-900"],"list.hoverForeground":I["color-cold-gray-900"],"list.activeSelectionBackground":I["color-tv-blue-500"],"list.hoverBackground":I["color-tv-blue-50"],"list.focusHighlightForeground":I["color-tv-blue-100"],"list.inactiveSelectionBackground":I["color-tv-blue-500"],"keybindingLabel.background":I["color-white"],"keybindingLabel.foreground":I["color-cold-gray-900"],"keybindingLabel.border":I["color-cold-gray-150"],"input.foreground":I["color-cold-gray-900"],"textLink.foreground":I["color-tv-blue-500"],"textLink.activeForeground":I["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":I["color-tan-orange-100"],"peekViewResult.lineForeground":I["color-cold-gray-900"],"editorMarkerNavigationWarning.background":I["color-banana-yellow-800"],"inputValidation.warningBackground":I["color-banana-yellow-800"],"diffEditor.insertedTextBackground":Bt(I["color-forest-green-500"],.3),"diffEditor.insertedLineBackground":Bt(I["color-forest-green-500"],.15),"diffEditor.removedTextBackground":Bt(I["color-ripe-red-500"],.3),"diffEditor.removedLineBackground":Bt(I["color-ripe-red-500"],.15),"editorInlayHint.background":I["color-cold-gray-150"],"editorInlayHint.foreground":I["color-cold-gray-550"],"editorError.foreground":I["color-ripe-red-500"],"editorWarning.foreground":I["color-tan-orange-500"]}},cn={base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:I["color-cold-gray-500"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:I["color-white"]},{token:"string",foreground:I["color-iguana-green-700"]},{token:"constant.numeric",foreground:I["color-banana-yellow-900"]},{token:"constant.language",foreground:I["color-ripe-red-300"]},{token:"constant.other.color",foreground:I["color-ripe-red-300"]},{token:"constant.other",foreground:I["color-ripe-red-300"]},{token:"support.variable",foreground:I["color-ripe-red-300"]},{token:"support.function",foreground:I["color-tv-blue-300"]},{token:"support.method",foreground:I["color-tv-blue-300"]},{token:"support.type",foreground:I["color-minty-green-300"],fontStyle:"bold"},{token:"entity.name.type",foreground:I["color-minty-green-300"],fontStyle:"bold"},{token:"keyword.equals",foreground:I["color-minty-green-300"]},{token:"keyword.operator",foreground:I["color-minty-green-300"]},{token:"keyword.other",foreground:I["color-minty-green-300"]},{token:"keyword",foreground:I["color-minty-green-300"]},{token:"variable.other",foreground:I["color-cold-gray-200"]},{token:"variable.other.property",foreground:I["color-cold-gray-200"]},{token:"paren",foreground:I["color-white"]},{token:"entity.name.function",foreground:I["color-tv-blue-400"]},{token:"entity.name.method",foreground:I["color-tv-blue-400"]},{token:"meta.function-call",foreground:I["color-grapes-purple-300"]},{token:"entity.name.module.name",foreground:I["color-grapes-purple-300"]},{token:"entity.name.module",foreground:I["color-tv-blue-300"]},{token:"",background:I["color-cold-gray-900"]}],colors:{"editor.foreground":I["color-white"],"editor.background":I["color-cold-gray-900"],"editorLineNumber.foreground":I["color-cold-gray-500"],"editorLineNumber.activeForeground":I["color-cold-gray-300"],"editorWidget.background":I["color-cold-gray-850"],"editorHoverWidget.background":I["color-cold-gray-850"],"editorHoverWidget.foreground":I["color-cold-gray-300"],"editorHoverWidget.statusBarBackground":I["color-cold-gray-900"],"editorWidget.foreground":I["color-cold-gray-300"],"editorGutter.background":I["color-cold-gray-900"],"editor.foldBackground":Bt(I["color-cold-gray-700"],.5),"editor.lineHighlightBackground":I["color-tv-blue-a900"],"editor.lineHighlightBorder":I["color-tv-blue-a900"],"editor.rangeHighlightBackground":I["color-tv-blue-a800"],"editorBracketMatch.background":I["color-cold-gray-750"],"editor.selectionBackground":I["color-tv-blue-a800"],"editor.selectionHighlightBackground":I["color-cold-gray-800"],"list.foreground":I["color-cold-gray-350"],"list.hoverForeground":I["color-cold-gray-350"],"list.activeSelectionBackground":I["color-tv-blue-500"],"list.hoverBackground":I["color-tv-blue-900"],"list.focusHighlightForeground":I["color-tv-blue-300"],"list.inactiveSelectionBackground":I["color-tv-blue-500"],"keybindingLabel.background":I["color-cold-gray-800"],"keybindingLabel.foreground":I["color-cold-gray-300"],"keybindingLabel.border":I["color-cold-gray-700"],"input.foreground":I["color-cold-gray-350"],"textLink.foreground":I["color-tv-blue-500"],"textLink.activeForeground":I["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":I["color-tan-orange-a800"],"peekViewResult.lineForeground":I["color-cold-gray-350"],"diffEditor.insertedTextBackground":Bt(I["color-iguana-green-a700"],.3),"diffEditor.insertedLineBackground":Bt(I["color-iguana-green-a700"],.15),"diffEditor.removedTextBackground":Bt(I["color-ripe-red-a400"],.3),"diffEditor.removedLineBackground":Bt(I["color-ripe-red-a400"],.15),"editorInlayHint.background":I["color-cold-gray-800"],"editorInlayHint.foreground":I["color-cold-gray-400"],"editorError.foreground":I["color-ripe-red-500"],"editorWarning.foreground":I["color-tan-orange-700"]}},Sd=/(\\(?:[\\'"]))|(\\$)|("|$)|($)/g,Nd=/(\\(?:[\\'"]))|(\\$)|('|$)|($)/g,oo={"color.aqua":"#00BCD4","color.black":"#363A45","color.blue":"#2196F3","color.fuchsia":"#E040FB","color.gray":"#787B86","color.green":"#4CAF50","color.lime":"#00E676","color.maroon":"#880E4F","color.navy":"#311B92","color.olive":"#808000","color.orange":"#FF9800","color.purple":"#9C27B0","color.red":"#FF5252","color.silver":"#B2B5BE","color.teal":"#00897B","color.white":"#FFFFFF","color.yellow":"#FFEB3B"};class Ed{constructor(n){Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isMac",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_getSignatureParams",{enumerable:!0,configurable:!0,writable:!0,value:(s=[],o)=>{const c=new Map,l=o.indexOf("(");for(let m=l+1,_=l;m<o.length;m++)o[m]!==","&&o[m]!==")"||(_++,c.set(o.slice(_,m),_),_=m+1);return s.map(({name:m="",displayType:_,desc:f})=>{const b=[],h=c.get(m),T=h+m.length;return b.push(this._formatter.paragraph(this._formatter.bold(m),this._formatter.italic(_||""))),f&&b.push(Array.isArray(f)?f.join(this._formatter.lineBreak):f),{label:[h,T],documentation:{value:b.join(this._formatter.lineBreak)}}})}}),this._formatter=ie,this._isMac=/(Mac|iPhone|iPod|iPad)/i.test(n)}getSignatureHelpValues(n,s,o=0,c=0){var b;const l=this._getFuncItems(n);if(!(l!=null&&l.length))return null;const m=this._getSequentialSignatures(n,l),_=this._getActiveIndex(l,s),f=(b=gr.overloadsFuncs)==null?void 0:b.find(h=>h.name===n&&h.startColumn===o&&c===h.line);return f&&(_.activeSignature=Number(f.index)),{signatures:m,..._}}_getActiveIndex(n,s=[]){let o=0,c=-1;s.some(m=>!!m)||(c=s.length-1);const l=s.pop();if(l)for(const[m,_]of n.entries()){const{args:f}=_;if(f&&f.length){const b=f.findIndex(h=>h.name===l);if(b!=-1){c=b,o=m;break}}}return{activeParameter:c,activeSignature:o}}_getFuncItems(n){return ct.functions.get(n)||St.userFuncs.get(n)||St.methodFuncs.get(n)}_getSequentialSignatures(n,s){return s.map(o=>{const c=this._getSignatureLabel(n,o);return{label:c,documentation:this._getFormattedSignatureDocumentation(o),parameters:this._getSignatureParams(o.args,c)}})}_getSignatureLabel(n,s,o=!1){const c=[n];return o&&c.push("<type>"),s.args&&(c.push("("),c.push(s.args.map(({name:l})=>l).join(", ")),c.push(")")),c.join("")}_getFormattedSignatureDocumentation(n){const{desc:s}=n,o=[];s&&o.push(Array.isArray(s)?s.join(this._formatter.lineBreak):s);const c=`${this._formatter.code(this._isMac?"⌘":"Ctrl")} +
|
136
|
+
`)+E+`return __p
|
137
|
+
}`;var oe=np(function(){return he(u,X+"return "+E).apply(s,y)});if(oe.source=E,Ci(oe))throw oe;return oe}function ax(e){return ve(e).toLowerCase()}function nx(e){return ve(e).toUpperCase()}function ix(e,t,r){if(e=ve(e),e&&(r||t===s))return yl(e);if(!e||!(t=_t(t)))return e;var i=Pt(e),p=Pt(t),u=_l(i,p),y=fl(i,p)+1;return _r(i,u,y).join("")}function ox(e,t,r){if(e=ve(e),e&&(r||t===s))return e.slice(0,bl(e)+1);if(!e||!(t=_t(t)))return e;var i=Pt(e),p=fl(i,Pt(t))+1;return _r(i,0,p).join("")}function lx(e,t,r){if(e=ve(e),e&&(r||t===s))return e.replace(ks,"");if(!e||!(t=_t(t)))return e;var i=Pt(e),p=_l(i,Pt(t));return _r(i,p).join("")}function cx(e,t){var r=le,i=ht;if(ze(t)){var p="separator"in t?t.separator:p;r="length"in t?ne(t.length):r,i="omission"in t?_t(t.omission):i}e=ve(e);var u=e.length;if(Hr(e)){var y=Pt(e);u=y.length}if(r>=u)return e;var x=r-Wr(i);if(x<1)return i;var v=y?_r(y,0,x).join(""):e.slice(0,x);if(p===s)return v+i;if(y&&(x+=v.length-x),zi(p)){if(e.slice(x).search(p)){var C,z=v;for(p.global||(p=Wn(p.source,ve(we.exec(p))+"g")),p.lastIndex=0;C=p.exec(z);)var E=C.index;v=v.slice(0,E===s?x:E)}}else if(e.indexOf(_t(p),x)!=x){var j=v.lastIndexOf(p);j>-1&&(v=v.slice(0,j))}return v+i}function px(e){return e=ve(e),e&&Ts.test(e)?e.replace(Xt,Ru):e}var dx=Jr(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Ni=ic("toUpperCase");function ap(e,t,r){return e=ve(e),t=r?s:t,t===s?Nu(e)?Uu(e):Du(e):e.match(t)||[]}var np=ce(function(e,t){try{return ut(e,s,t)}catch(r){return Ci(r)?r:new se(r)}}),mx=Jt(function(e,t){return Dt(t,function(r){r=Ht(r),Qt(e,r,Ai(e[r],e))}),e});function ux(e){var t=e==null?0:e.length,r=Q();return e=t?qe(e,function(i){if(typeof i[1]!="function")throw new kt(m);return[r(i[0]),i[1]]}):[],ce(function(i){for(var p=-1;++p<t;){var u=e[p];if(ut(u[0],this,i))return ut(u[1],this,i)}})}function yx(e){return Ry(At(e,T))}function Li(e){return function(){return e}}function _x(e,t){return e==null||e!==e?t:e}var fx=lc(),gx=lc(!0);function ot(e){return e}function Mi(e){return Rl(typeof e=="function"?e:At(e,T))}function bx(e){return Bl(At(e,T))}function xx(e,t){return Ul(e,At(t,T))}var hx=ce(function(e,t){return function(r){return Ls(r,e,t)}}),wx=ce(function(e,t){return function(r){return Ls(e,r,t)}});function Pi(e,t,r){var i=He(t),p=La(t,i);r==null&&!(ze(t)&&(p.length||!i.length))&&(r=t,t=e,e=this,p=La(t,He(t)));var u=!(ze(r)&&"chain"in r)||!!r.chain,y=tr(e);return Dt(p,function(x){var v=t[x];e[x]=v,y&&(e.prototype[x]=function(){var C=this.__chain__;if(u||C){var z=e(this.__wrapped__),E=z.__actions__=at(this.__actions__);return E.push({func:v,args:arguments,thisArg:e}),z.__chain__=C,z}return v.apply(e,cr([this.value()],arguments))})}),e}function vx(){return Ge._===this&&(Ge._=Gu),this}function Oi(){}function Tx(e){return e=ne(e),ce(function(t){return Kl(t,e)})}var Dx=yi(qe),kx=yi(cl),Ix=yi(Fn);function ip(e){return wi(e)?Bn(Ht(e)):t_(e)}function Ax(e){return function(t){return e==null?s:qr(e,t)}}var qx=pc(),Cx=pc(!0);function Ri(){return[]}function Fi(){return!1}function zx(){return{}}function Sx(){return""}function Ex(){return!0}function Nx(e,t){if(e=ne(e),e<1||e>Me)return[];var r=re,i=Ye(e,re);t=Q(t),e-=re;for(var p=$n(i,t);++r<e;)t(r);return p}function Lx(e){return ae(e)?qe(e,Ht):ft(e)?[e]:at(Ic(ve(e)))}function Mx(e){var t=++Hu;return ve(e)+t}var Px=Ba(function(e,t){return e+t},0),Ox=_i("ceil"),Rx=Ba(function(e,t){return e/t},1),Fx=_i("floor");function Bx(e){return e&&e.length?Na(e,ot,ei):s}function Ux(e,t){return e&&e.length?Na(e,Q(t,2),ei):s}function Kx(e){return ml(e,ot)}function $x(e,t){return ml(e,Q(t,2))}function jx(e){return e&&e.length?Na(e,ot,ai):s}function Hx(e,t){return e&&e.length?Na(e,Q(t,2),ai):s}var Wx=Ba(function(e,t){return e*t},1),Gx=_i("round"),Xx=Ba(function(e,t){return e-t},0);function Vx(e){return e&&e.length?Kn(e,ot):0}function Yx(e,t){return e&&e.length?Kn(e,Q(t,2)):0}return d.after=bg,d.ary=Oc,d.assign=nb,d.assignIn=Qc,d.assignInWith=Ja,d.assignWith=ib,d.at=ob,d.before=Rc,d.bind=Ai,d.bindAll=mx,d.bindKey=Fc,d.castArray=zg,d.chain=Lc,d.chunk=R_,d.compact=F_,d.concat=B_,d.cond=ux,d.conforms=yx,d.constant=Li,d.countBy=Vf,d.create=lb,d.curry=Bc,d.curryRight=Uc,d.debounce=Kc,d.defaults=cb,d.defaultsDeep=pb,d.defer=xg,d.delay=hg,d.difference=U_,d.differenceBy=K_,d.differenceWith=$_,d.drop=j_,d.dropRight=H_,d.dropRightWhile=W_,d.dropWhile=G_,d.fill=X_,d.filter=Qf,d.flatMap=eg,d.flatMapDeep=tg,d.flatMapDepth=rg,d.flatten=zc,d.flattenDeep=V_,d.flattenDepth=Y_,d.flip=wg,d.flow=fx,d.flowRight=gx,d.fromPairs=Q_,d.functions=gb,d.functionsIn=bb,d.groupBy=sg,d.initial=J_,d.intersection=ef,d.intersectionBy=tf,d.intersectionWith=rf,d.invert=hb,d.invertBy=wb,d.invokeMap=ng,d.iteratee=Mi,d.keyBy=ig,d.keys=He,d.keysIn=it,d.map=Ga,d.mapKeys=Tb,d.mapValues=Db,d.matches=bx,d.matchesProperty=xx,d.memoize=Va,d.merge=kb,d.mergeWith=Zc,d.method=hx,d.methodOf=wx,d.mixin=Pi,d.negate=Ya,d.nthArg=Tx,d.omit=Ib,d.omitBy=Ab,d.once=vg,d.orderBy=og,d.over=Dx,d.overArgs=Tg,d.overEvery=kx,d.overSome=Ix,d.partial=qi,d.partialRight=$c,d.partition=lg,d.pick=qb,d.pickBy=Jc,d.property=ip,d.propertyOf=Ax,d.pull=of,d.pullAll=Ec,d.pullAllBy=lf,d.pullAllWith=cf,d.pullAt=pf,d.range=qx,d.rangeRight=Cx,d.rearg=Dg,d.reject=dg,d.remove=df,d.rest=kg,d.reverse=ki,d.sampleSize=ug,d.set=zb,d.setWith=Sb,d.shuffle=yg,d.slice=mf,d.sortBy=gg,d.sortedUniq=xf,d.sortedUniqBy=hf,d.split=ex,d.spread=Ig,d.tail=wf,d.take=vf,d.takeRight=Tf,d.takeRightWhile=Df,d.takeWhile=kf,d.tap=Bf,d.throttle=Ag,d.thru=Wa,d.toArray=Xc,d.toPairs=ep,d.toPairsIn=tp,d.toPath=Lx,d.toPlainObject=Yc,d.transform=Eb,d.unary=qg,d.union=If,d.unionBy=Af,d.unionWith=qf,d.uniq=Cf,d.uniqBy=zf,d.uniqWith=Sf,d.unset=Nb,d.unzip=Ii,d.unzipWith=Nc,d.update=Lb,d.updateWith=Mb,d.values=rs,d.valuesIn=Pb,d.without=Ef,d.words=ap,d.wrap=Cg,d.xor=Nf,d.xorBy=Lf,d.xorWith=Mf,d.zip=Pf,d.zipObject=Of,d.zipObjectDeep=Rf,d.zipWith=Ff,d.entries=ep,d.entriesIn=tp,d.extend=Qc,d.extendWith=Ja,Pi(d,d),d.add=Px,d.attempt=np,d.camelCase=Bb,d.capitalize=rp,d.ceil=Ox,d.clamp=Ob,d.clone=Sg,d.cloneDeep=Ng,d.cloneDeepWith=Lg,d.cloneWith=Eg,d.conformsTo=Mg,d.deburr=sp,d.defaultTo=_x,d.divide=Rx,d.endsWith=Ub,d.eq=Rt,d.escape=Kb,d.escapeRegExp=$b,d.every=Yf,d.find=Zf,d.findIndex=qc,d.findKey=db,d.findLast=Jf,d.findLastIndex=Cc,d.findLastKey=mb,d.floor=Fx,d.forEach=Mc,d.forEachRight=Pc,d.forIn=ub,d.forInRight=yb,d.forOwn=_b,d.forOwnRight=fb,d.get=Si,d.gt=Pg,d.gte=Og,d.has=xb,d.hasIn=Ei,d.head=Sc,d.identity=ot,d.includes=ag,d.indexOf=Z_,d.inRange=Rb,d.invoke=vb,d.isArguments=Sr,d.isArray=ae,d.isArrayBuffer=Rg,d.isArrayLike=nt,d.isArrayLikeObject=Pe,d.isBoolean=Fg,d.isBuffer=fr,d.isDate=Bg,d.isElement=Ug,d.isEmpty=Kg,d.isEqual=$g,d.isEqualWith=jg,d.isError=Ci,d.isFinite=Hg,d.isFunction=tr,d.isInteger=jc,d.isLength=Qa,d.isMap=Hc,d.isMatch=Wg,d.isMatchWith=Gg,d.isNaN=Xg,d.isNative=Vg,d.isNil=Qg,d.isNull=Yg,d.isNumber=Wc,d.isObject=ze,d.isObjectLike=Le,d.isPlainObject=Bs,d.isRegExp=zi,d.isSafeInteger=Zg,d.isSet=Gc,d.isString=Za,d.isSymbol=ft,d.isTypedArray=ts,d.isUndefined=Jg,d.isWeakMap=eb,d.isWeakSet=tb,d.join=sf,d.kebabCase=jb,d.last=Ct,d.lastIndexOf=af,d.lowerCase=Hb,d.lowerFirst=Wb,d.lt=rb,d.lte=sb,d.max=Bx,d.maxBy=Ux,d.mean=Kx,d.meanBy=$x,d.min=jx,d.minBy=Hx,d.stubArray=Ri,d.stubFalse=Fi,d.stubObject=zx,d.stubString=Sx,d.stubTrue=Ex,d.multiply=Wx,d.nth=nf,d.noConflict=vx,d.noop=Oi,d.now=Xa,d.pad=Gb,d.padEnd=Xb,d.padStart=Vb,d.parseInt=Yb,d.random=Fb,d.reduce=cg,d.reduceRight=pg,d.repeat=Qb,d.replace=Zb,d.result=Cb,d.round=Gx,d.runInContext=w,d.sample=mg,d.size=_g,d.snakeCase=Jb,d.some=fg,d.sortedIndex=uf,d.sortedIndexBy=yf,d.sortedIndexOf=_f,d.sortedLastIndex=ff,d.sortedLastIndexBy=gf,d.sortedLastIndexOf=bf,d.startCase=tx,d.startsWith=rx,d.subtract=Xx,d.sum=Vx,d.sumBy=Yx,d.template=sx,d.times=Nx,d.toFinite=rr,d.toInteger=ne,d.toLength=Vc,d.toLower=ax,d.toNumber=zt,d.toSafeInteger=ab,d.toString=ve,d.toUpper=nx,d.trim=ix,d.trimEnd=ox,d.trimStart=lx,d.truncate=cx,d.unescape=px,d.uniqueId=Mx,d.upperCase=dx,d.upperFirst=Ni,d.each=Mc,d.eachRight=Pc,d.first=Sc,Pi(d,function(){var e={};return $t(d,function(t,r){Te.call(d.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),d.VERSION=o,Dt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Dt(["drop","take"],function(e,t){ue.prototype[e]=function(r){r=r===s?1:Be(ne(r),0);var i=this.__filtered__&&!t?new ue(this):this.clone();return i.__filtered__?i.__takeCount__=Ye(r,i.__takeCount__):i.__views__.push({size:Ye(r,re),type:e+(i.__dir__<0?"Right":"")}),i},ue.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),Dt(["filter","map","takeWhile"],function(e,t){var r=t+1,i=r==Ke||r==be;ue.prototype[e]=function(p){var u=this.clone();return u.__iteratees__.push({iteratee:Q(p,3),type:r}),u.__filtered__=u.__filtered__||i,u}}),Dt(["head","last"],function(e,t){var r="take"+(t?"Right":"");ue.prototype[e]=function(){return this[r](1).value()[0]}}),Dt(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");ue.prototype[e]=function(){return this.__filtered__?new ue(this):this[r](1)}}),ue.prototype.compact=function(){return this.filter(ot)},ue.prototype.find=function(e){return this.filter(e).head()},ue.prototype.findLast=function(e){return this.reverse().find(e)},ue.prototype.invokeMap=ce(function(e,t){return typeof e=="function"?new ue(this):this.map(function(r){return Ls(r,e,t)})}),ue.prototype.reject=function(e){return this.filter(Ya(Q(e)))},ue.prototype.slice=function(e,t){e=ne(e);var r=this;return r.__filtered__&&(e>0||t<0)?new ue(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==s&&(t=ne(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},ue.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ue.prototype.toArray=function(){return this.take(re)},$t(ue.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),p=d[i?"take"+(t=="last"?"Right":""):t],u=i||/^find/.test(t);p&&(d.prototype[t]=function(){var y=this.__wrapped__,x=i?[1]:arguments,v=y instanceof ue,C=x[0],z=v||ae(y),E=function(de){var ye=p.apply(d,cr([de],x));return i&&j?ye[0]:ye};z&&r&&typeof C=="function"&&C.length!=1&&(v=z=!1);var j=this.__chain__,X=!!this.__actions__.length,Z=u&&!j,oe=v&&!X;if(!u&&z){y=oe?y:new ue(this);var J=e.apply(y,x);return J.__actions__.push({func:Wa,args:[E],thisArg:s}),new It(J,j)}return Z&&oe?e.apply(this,x):(J=this.thru(E),Z?i?J.value()[0]:J.value():J)})}),Dt(["pop","push","shift","sort","splice","unshift"],function(e){var t=ba[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var p=arguments;if(i&&!this.__chain__){var u=this.value();return t.apply(ae(u)?u:[],p)}return this[r](function(y){return t.apply(ae(y)?y:[],p)})}}),$t(ue.prototype,function(e,t){var r=d[t];if(r){var i=r.name+"";Te.call(Yr,i)||(Yr[i]=[]),Yr[i].push({name:t,func:r})}}),Yr[Fa(s,V).name]=[{name:"wrapper",func:s}],ue.prototype.clone=cy,ue.prototype.reverse=py,ue.prototype.value=dy,d.prototype.at=Uf,d.prototype.chain=Kf,d.prototype.commit=$f,d.prototype.next=jf,d.prototype.plant=Wf,d.prototype.reverse=Gf,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=Xf,d.prototype.first=d.prototype.head,As&&(d.prototype[As]=Hf),d},Gr=Ku();Tr?((Tr.exports=Gr)._=Gr,Mn._=Gr):Ge._=Gr}).call(ss)}(Ws,Ws.exports);var io=Ws.exports;const Se="tccScript",Nr={builtinFunctions:/strategy\.closedtrades\.max_drawdown_percent|strategy\.opentrades\.max_drawdown_percent|strategy\.risk\.max_intraday_filled_orders|strategy\.closedtrades\.max_runup_percent|array\.percentile_linear_interpolation|strategy\.closedtrades\.entry_bar_index|strategy\.opentrades\.max_runup_percent|strategy\.closedtrades\.exit_bar_index|strategy\.closedtrades\.profit_percent|strategy\.closedtrades\.entry_comment|strategy\.opentrades\.entry_bar_index|strategy\.closedtrades\.exit_comment|strategy\.closedtrades\.max_drawdown|strategy\.opentrades\.profit_percent|ta\.percentile_linear_interpolation|strategy\.closedtrades\.entry_price|strategy\.opentrades\.entry_comment|strategy\.closedtrades\.commission|strategy\.closedtrades\.entry_time|strategy\.closedtrades\.exit_price|strategy\.opentrades\.max_drawdown|strategy\.risk\.max_cons_loss_days|strategy\.closedtrades\.exit_time|strategy\.closedtrades\.max_runup|strategy\.opentrades\.entry_price|strategy\.risk\.max_intraday_loss|strategy\.risk\.max_position_size|table\.cell_set_text_font_family|strategy\.closedtrades\.entry_id|strategy\.opentrades\.commission|strategy\.opentrades\.entry_time|array\.binary_search_rightmost|array\.percentile_nearest_rank|strategy\.closedtrades\.exit_id|strategy\.opentrades\.max_runup|array\.binary_search_leftmost|strategy\.closedtrades\.profit|strategy\.opentrades\.entry_id|strategy\.risk\.allow_entry_in|strategy\.convert_to_account|box\.set_bottom_right_point|label\.set_text_font_family|strategy\.closedtrades\.size|strategy\.convert_to_symbol|strategy\.default_entry_qty|strategy\.opentrades\.profit|strategy\.risk\.max_drawdown|ta\.percentile_nearest_rank|table\.cell_set_text_halign|table\.cell_set_text_valign|request\.security_lower_tf|table\.cell_set_text_color|box\.set_text_font_family|strategy\.opentrades\.size|table\.cell_set_text_size|matrix\.is_antisymmetric|box\.set_top_left_point|chart\.point\.from_index|matrix\.is_antidiagonal|table\.cell_set_bgcolor|table\.cell_set_tooltip|table\.set_border_color|table\.set_border_width|timeframe\.from_seconds|chart\.point\.from_time|line\.set_second_point|math\.round_to_mintick|matrix\.elements_count|request\.currency_rate|ta\.pivot_point_levels|table\.cell_set_height|table\.set_frame_color|table\.set_frame_width|box\.set_border_color|box\.set_border_style|box\.set_border_width|line\.set_first_point|matrix\.is_stochastic|matrix\.is_triangular|table\.cell_set_width|timeframe\.in_seconds|array\.binary_search|box\.set_rightbottom|box\.set_text_halign|box\.set_text_valign|color\.from_gradient|label\.set_textalign|label\.set_textcolor|matrix\.eigenvectors|matrix\.is_symmetric|matrix\.swap_columns|strategy\.cancel_all|table\.cell_set_text|array\.new_linefill|array\.sort_indices|box\.set_text_color|linefill\.get_line1|linefill\.get_line2|linefill\.set_color|matrix\.eigenvalues|matrix\.is_diagonal|matrix\.is_identity|strategy\.close_all|table\.set_position|ticker\.pointfigure|array\.lastindexof|array\.percentrank|array\.standardize|box\.set_text_size|box\.set_text_wrap|label\.set_tooltip|matrix\.remove_col|matrix\.remove_row|request\.dividends|request\.financial|table\.merge_cells|table\.set_bgcolor|ticker\.heikinashi|array\.covariance|array\.new_string|chart\.point\.copy|matrix\.is_binary|matrix\.is_square|matrix\.submatrix|matrix\.swap_rows|matrix\.transpose|request\.earnings|request\.economic|request\.security|ticker\.linebreak|timeframe\.change|array\.new_color|array\.new_float|array\.new_label|array\.new_table|box\.set_bgcolor|box\.set_lefttop|chart\.point\.new|chart\.point\.now|input\.text_area|input\.timeframe|label\.set_color|label\.set_point|label\.set_style|line\.set_extend|linefill\.delete|polyline\.delete|str\.format_time|str\.replace_all|strategy\.cancel|ticker\.standard|alertcondition|array\.includes|array\.new_bool|array\.new_line|array\.variance|box\.get_bottom|box\.set_bottom|box\.set_extend|label\.get_text|label\.set_size|label\.set_text|label\.set_xloc|label\.set_yloc|line\.get_price|line\.set_color|line\.set_style|line\.set_width|math\.todegrees|math\.toradians|matrix\.add_col|matrix\.add_row|matrix\.columns|matrix\.is_zero|matrix\.reshape|matrix\.reverse|request\.quandl|request\.splits|str\.startswith|strategy\.close|strategy\.entry|strategy\.order|syminfo\.prefix|syminfo\.ticker|ta\.correlation|ta\.highestbars|ta\.percentrank|ticker\.inherit|array\.indexof|array\.new_box|array\.new_int|array\.reverse|array\.unshift|box\.get_right|box\.set_right|input\.session|line\.set_xloc|matrix\.concat|matrix\.median|max_bars_back|runtime\.error|str\.substring|strategy\.exit|ta\.crossunder|ta\.lowestbars|ta\.supertrend|ticker\.modify|array\.concat|array\.insert|array\.median|array\.remove|box\.get_left|box\.set_left|box\.set_text|input\.source|input\.string|input\.symbol|label\.delete|label\.set_xy|line\.set_xy1|line\.set_xy2|linefill\.new|map\.contains|matrix\.trace|polyline\.new|request\.seed|str\.contains|str\.endswith|str\.tonumber|str\.tostring|ta\.barssince|ta\.crossover|ta\.pivothigh|ta\.valuewhen|table\.delete|ticker\.renko|array\.clear|array\.every|array\.first|array\.range|array\.shift|array\.slice|array\.stdev|box\.get_top|box\.set_top|input\.color|input\.float|input\.price|label\.get_x|label\.get_y|label\.set_x|label\.set_y|line\.delete|line\.get_x1|line\.get_x2|line\.get_y1|line\.get_y2|line\.set_x1|line\.set_x2|line\.set_y1|line\.set_y2|log\.warning|map\.put_all|math\.random|matrix\.copy|matrix\.diff|matrix\.fill|matrix\.kron|matrix\.mode|matrix\.mult|matrix\.pinv|matrix\.rank|matrix\.rows|matrix\.sort|str\.replace|ta\.pivotlow|ta\.variance|table\.clear|ticker\.kagi|array\.copy|array\.fill|array\.from|array\.join|array\.last|array\.mode|array\.push|array\.size|array\.some|array\.sort|box\.delete|dayofmonth|input\.bool|input\.time|label\.copy|map\.remove|map\.values|math\.floor|math\.log10|math\.round|matrix\.avg|matrix\.col|matrix\.det|matrix\.get|matrix\.inv|matrix\.max|matrix\.min|matrix\.new|matrix\.pow|matrix\.row|matrix\.set|matrix\.sum|plotcandle|str\.format|str\.length|ta\.falling|ta\.highest|table\.cell|ticker\.new|time_close|weekofyear|array\.abs|array\.avg|array\.get|array\.max|array\.min|array\.new|array\.pop|array\.set|array\.sum|color\.new|color\.rgb|dayofweek|indicator|input\.int|label\.new|line\.copy|log\.error|map\.clear|math\.acos|math\.asin|math\.atan|input\.enum|math\.ceil|math\.sign|math\.sqrt|plotarrow|plotshape|str\.lower|str\.match|str\.split|str\.upper|ta\.change|ta\.linreg|ta\.lowest|ta\.median|ta\.rising|table\.new|timestamp|barcolor|box\.copy|line\.new|linefill|log\.info|map\.copy|map\.keys|map\.size|math\.abs|math\.avg|math\.cos|math\.exp|math\.log|math\.max|math\.min|math\.pow|math\.sin|math\.sum|math\.tan|plotchar|strategy|ta\.cross|ta\.range|ta\.stdev|ta\.stoch|bgcolor|box\.new|color\.b|color\.g|color\.r|color\.t|library|map\.get|map\.new|map\.put|plotbar|str\.pos|ta\.alma|ta\.macd|ta\.mode|ta\.swma|ta\.vwap|ta\.vwma|fixnan|minute|second|string|ta\.atr|ta\.bbw|ta\.cci|ta\.cmo|ta\.cog|ta\.cum|ta\.dev|ta\.dmi|ta\.ema|ta\.hma|ta\.kcw|ta\.max|ta\.mfi|ta\.min|ta\.mom|ta\.rma|ta\.roc|ta\.rsi|ta\.sar|ta\.sma|ta\.tsi|ta\.wma|ta\.wpr|alert|color|float|hline|input|label|month|ta\.bb|ta\.kc|ta\.tr|table|bool|fill|hour|line|plot|time|year|box|int|na|nz/,keywords:/continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to/,tokenizer:{root:[[/\/\/\s*(?=@)/,"comment","@comments"],[/\/\/.*(?!@).*/,"comment"],[/\'([^\'\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/\"/,{token:"string",bracket:"@open",next:"@stringDouble"}],[/(type|enum)\s+[a-zA-Z]\w*/,"entity.name.type"],[/'/,{token:"string",bracket:"@open",next:"@stringSingle"}],[/(@builtinFunctions)(?=\s*\(|\s*<.*>)/,{token:"support.function",next:"@template"}],[/@punctuation/,{token:"punctuation.operator",next:"@property"}],[/(varip|var)\b(\s+)((?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)/,[{token:"keyword"},{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"}]],[/\b(?:@builtinTypes)(?=(\s*)[\[|<|(]|(?=\s+(?=[^.=][\w\(]*))|\s*$)/,{token:"support.type",next:"@template"}],[/^(\s*)\b(?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)([\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)(\s+)(\=)/,[{token:"source"},{token:"entity.name.type"},{token:"paren"},{token:"source"},{token:"variable.other"},{token:"source"},{token:"keyword.equals"}]],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/import(?=\s+@importName)/,{token:"keyword",next:"@import"}],[/import(?=\s+[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+)/,"keyword"],[/[+-]?\d+\.\d*([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/[+-]?\.\d+([eE][\-+]?\d+)?(?!\w+)/,"constant.numeric.float"],[/([+-]?(\d+))(?!\w+)(?!\w+)/,"constant.numeric.integer"],[/(?:true|false)\b/,"constant.other.boolean"],[/#[0-9a-fA-F]{6,8}\b/,"constant.other.color"],[/\+=|\-=|\*=|\/=|%=|[\/%*+\-]|==|!=|<=|>=|=>|<|>|\?|\:=|\:|\,/,"keyword.operator"],[/\b(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b/,"keyword"],[/^[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,"entity.name.function"],[/[0-9]+\b/,"constant.numeric.integer"],[/=/,"keyword.equals"],[/\b(?:strategy\.commission\.cash_per_contract|strategy\.avg_winning_trade_percent|strategy\.avg_winning_trade|strategy\.avg_losing_trade_percent|strategy\.avg_losing_trade|syminfo\.recommendations_sell_strong|syminfo\.recommendations_buy_strong|strategy\.commission\.cash_per_order|strategy\.margin_liquidation_price|strategy\.max_contracts_held_short|strategy\.max_contracts_held_long|syminfo\.shares_outstanding_float|syminfo\.shares_outstanding_total|barstate\.islastconfirmedhistory|earnings\.future_period_end_time|strategy\.max_contracts_held_all|syminfo\.target_price_estimates|strategy\.max_drawdown_percent|syminfo\.recommendations_total|alert\.freq_once_per_bar_close|label\.style_label_lower_right|label\.style_label_upper_right|chart\.right_visible_bar_time|strategy\.grossprofit_percent|strategy\.position_entry_name|syminfo\.recommendations_date|syminfo\.recommendations_hold|syminfo\.recommendations_sell|syminfo\.target_price_average|label\.style_label_lower_left|label\.style_label_upper_left|chart\.left_visible_bar_time|strategy\.openprofit_percent|strategy\.position_avg_price|syminfo\.recommendations_buy|syminfo\.target_price_median|plot\.style_stepline_diamond|strategy\.commission\.percent|session\.isfirstbar_regular|strategy\.grossloss_percent|strategy\.max_runup_percent|strategy\.netprofit_percent|strategy\.percent_of_equity|session\.islastbar_regular|strategy\.account_currency|syminfo\.target_price_date|syminfo\.target_price_high|dividends\.future_pay_date|strategy\.initial_capital|syminfo\.target_price_low|dividends\.future_ex_date|label\.style_label_center|label\.style_text_outline|label\.style_triangledown|strategy\.direction\.short|earnings\.future_revenue|alert\.freq_once_per_bar|dividends\.future_amount|label\.style_label_right|strategy\.direction\.long|strategy\.position_size|barmerge\.lookahead_off|label\.style_label_down|label\.style_label_left|label\.style_triangleup|line\.style_arrow_right|position\.bottom_center|position\.middle_center|strategy\.direction\.all|strategy\.closedtrades|strategy\.max_drawdown|barmerge\.lookahead_on|earnings\.standardized|font\.family_monospace|label\.style_arrowdown|line\.style_arrow_both|line\.style_arrow_left|plot\.style_steplinebr|position\.bottom_right|position\.middle_right|barstate\.isconfirmed|earnings\.future_time|session\.ispostmarket|strategy\.grossprofit|syminfo\.basecurrency|syminfo\.shareholders|timeframe\.isintraday|timeframe\.multiplier|adjustment\.dividends|label\.style_label_up|plot\.style_histogram|position\.bottom_left|position\.middle_left|barstate\.isrealtime|chart\.is_heikinashi|earnings\.future_eps|session\.ispremarket|strategy\.eventrades|strategy\.losstrades|strategy\.openprofit|strategy\.opentrades\.capital_held|strategy\.opentrades|syminfo\.description|timeframe\.isminutes|timeframe\.ismonthly|timeframe\.isseconds|dayofweek\.wednesday|display\.data_window|display\.price_scale|display\.status_line|font\.family_default|label\.style_arrowup|label\.style_diamond|plot\.style_stepline|position\.top_center|strategy\.oca\.cancel|strategy\.oca\.reduce|barstate\.ishistory|chart\.is_linebreak|session\.isfirstbar|strategy\.grossloss|strategy\.max_runup|strategy\.netprofit|strategy\.wintrades|syminfo\.pointvalue|syminfo\.pricescale|syminfo\.volumetype|timeframe\.isweekly|dayofweek\.saturday|dayofweek\.thursday|hline\.style_dashed|hline\.style_dotted|label\.style_circle|label\.style_square|label\.style_xcross|plot\.style_circles|plot\.style_columns|position\.top_right|shape\.triangledown|splits\.denominator|chart\.is_standard|session\.islastbar|syminfo\.employees|timeframe\.isdaily|adjustment\.splits|barmerge\.gaps_off|dayofweek\.tuesday|earnings\.estimate|hline\.style_solid|label\.style_cross|line\.style_dashed|line\.style_dotted|location\.abovebar|location\.absolute|location\.belowbar|plot\.style_areabr|plot\.style_linebr|position\.top_left|strategy\.oca\.none|text\.align_bottom|text\.align_center|barstate\.isfirst|session\.ismarket|syminfo\.currency|syminfo\.industry|syminfo\.tickerid|syminfo\.timezone|timeframe\.period|barmerge\.gaps_on|dayofweek\.friday|dayofweek\.monday|dayofweek\.sunday|label\.style_flag|label\.style_none|line\.style_solid|order\.descending|plot\.style_cross|session\.extended|shape\.triangleup|splits\.numerator|text\.align_right|barstate\.islast|strategy\.equity|syminfo\.country|syminfo\.minmove|syminfo\.mintick|syminfo\.session|time_tradingday|timeframe\.isdwm|adjustment\.none|dividends\.gross|earnings\.actual|location\.bottom|order\.ascending|plot\.style_area|plot\.style_line|session\.regular|shape\.arrowdown|shape\.labeldown|text\.align_left|barstate\.isnew|chart\.bg_color|chart\.fg_color|chart\.is_range|chart\.is_renko|last_bar_index|strategy\.short|syminfo\.prefix|syminfo\.sector|syminfo\.ticker|alert\.freq_all|format\.inherit|format\.mintick|format\.percent|strategy\.fixed|text\.align_top|text\.wrap_auto|text\.wrap_none|xloc\.bar_index|chart\.is_kagi|last_bar_time|strategy\.long|color\.fuchsia|currency\.NONE|currency\.USDT|dividends\.net|format\.volume|shape\.arrowup|shape\.diamond|shape\.labelup|strategy\.cash|xloc\.bar_time|yloc\.abovebar|yloc\.belowbar|chart\.is_pnf|linefill\.all|polyline\.all|syminfo\.root|syminfo\.type|color\.maroon|color\.orange|color\.purple|color\.silver|color\.yellow|currency\.AUD|currency\.BTC|currency\.CAD|currency\.CHF|currency\.ETH|currency\.EUR|currency\.GBP|currency\.HKD|currency\.INR|currency\.JPY|currency\.KRW|currency\.MYR|currency\.NOK|currency\.NZD|currency\.RUB|currency\.SEK|currency\.SGD|currency\.TRY|currency\.USD|currency\.ZAR|display\.none|display\.pane|extend\.right|format\.price|location\.top|shape\.circle|shape\.square|shape\.xcross|color\.black|color\.green|color\.olive|color\.white|display\.all|extend\.both|extend\.left|extend\.none|scale\.right|shape\.cross|size\.normal|dayofmonth|ta\.accdist|time_close|weekofyear|color\.aqua|color\.blue|color\.gray|color\.lime|color\.navy|color\.teal|scale\.left|scale\.none|shape\.flag|size\.large|size\.small|yloc\.price|bar_index|dayofweek|label\.all|table\.all|color\.red|math\.rphi|size\.auto|size\.huge|size\.tiny|line\.all|math\.phi|box\.all|ta\.vwap|ta\.wvad|timenow|math\.pi|minute|second|ta\.iii|ta\.nvi|ta\.obv|ta\.pvi|ta\.pvt|ta\.wad|volume|math\.e|close|hlcc4|month|ohlc4|ta\.tr|false|high|hlc3|hour|open|time|year|true|hl2|low|na)\b(?!\s*=\s*\w+)/,"support.variable"],[/[(|)|\[|\]]/,"paren"],[/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/,{token:"entity.name.method"}],[/\w+\b/,"variable.other"]],comments:[[/@[A-Za-z]+(\s*=\s*)?$/,{token:"comment.annotation",next:"@pop"}],[/@[A-Za-z]+(\s*=\s*)?/,{token:"comment.annotation"}],[/(?!\s*@[A-Za-z]+).+$/,{token:"comment",next:"@pop"}]],stringDouble:[[/[^\\\"]+/,"string"],[/\\./,"string.invalid"],[/\"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/\\./,"string.invalid"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],template:[[/(@builtinTypes)/,{token:"support.type"}],[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/,"entity.name.type"],[/\(|\)|\[|\]|\=|\>/,{token:"paren",next:"@pop"}],[/(\,)(\s+)/,["keyword.operator","source"]],[/(\,)/,{token:"keyword.operator"}],[/([\w.\d$]+)/,{token:"entity.name.type"}],[/(<|>)/,{token:"paren"}],[/\s(?=\w)|$/,{token:"source",next:"@pop"}]],property:[[/@punctuation/,{token:"punctuation.operator"}],[/(@builtinTypes)(?=\s*[(])/,{token:"support.method",next:"@pop"}],[/[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/,{token:"entity.name.method",next:"@pop"}],[/[a-zA-Z0-9_]+/,{token:"variable.other.property",next:"@pop"}],[/@empty/,{token:"source",next:"@pop"}]],import:[[/\s+/,{token:"source"}],[/(@importName)(\s+)(as\b)(\s+)(@importAlias)/,[{token:"entity.name.module"},{token:"source"},{token:"keyword"},{token:"source"},{token:"entity.name.module.name",next:"@pop"}]],[/@importName/,{token:"entity.name.module",next:"@pop"}]]},builtinTypes:/chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map/,punctuation:/[.](?![.])/,importName:/[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+/,importAlias:/[a-zA-Z\d\_\u00a1\uffff\/]+/,empty:/^$/};var xt;(function(a){a[a.None=0]="None",a[a.Indent=1]="Indent",a[a.IndentOutdent=2]="IndentOutdent",a[a.Outdent=3]="Outdent"})(xt||(xt={}));const on={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["(",")"],["[","]"]],folding:{markers:{start:/(\/\/#region)|(\/\/.*{($|\s))/,end:/(\/\/#endregion)|(\/\/.*}($|\s))/}},autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:/\)\s*=>\s*$/,action:{indentAction:xt.Indent}},{beforeText:/if\s+.*\s*$/,action:{indentAction:xt.Indent}},{beforeText:/else/,action:{indentAction:xt.Indent}},{beforeText:/for\s+\S+\s*=\s*\S+\s+to\s+\S+(?:\s+by\s+\S+)?\s*$/,action:{indentAction:xt.Indent}},{beforeText:/for\s+(?:\[\S+\s+\S+]|\S+)\s+in\s+\S+\s*$/,action:{indentAction:xt.Indent}},{beforeText:/switch\s+.*\s*$/,action:{indentAction:xt.Indent}},{beforeText:/while\s+.*\s*$/,action:{indentAction:xt.Indent}},{beforeText:/type\s+\w+/,action:{indentAction:xt.Indent}},{beforeText:/enum\s+\w+/,action:{indentAction:xt.Indent}},{beforeText:/^\s*$/,action:{indentAction:xt.Outdent}}]},I={"color-white":"#ffffff","color-black":"#000000","color-transparent":"#00000000","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEC","color-ripe-red-100":"#FCCBCD","color-ripe-red-200":"#FAA1A4","color-ripe-red-300":"#F77C80","color-ripe-red-400":"#F7525F","color-ripe-red-500":"#F23645","color-ripe-red-600":"#CC2F3C","color-ripe-red-700":"#B22833","color-ripe-red-800":"#991F29","color-ripe-red-900":"#801922","color-ripe-red-a100":"#FF8080","color-ripe-red-a200":"#FF5252","color-ripe-red-a400":"#FF3333","color-ripe-red-a600":"#CC2929","color-ripe-red-a700":"#802028","color-ripe-red-a800":"#4D191D","color-ripe-red-a900":"#331F20","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#FF9100","color-tan-orange-a600":"#CC7014","color-tan-orange-a700":"#8C541C","color-tan-orange-a800":"#593A1B","color-tan-orange-a900":"#33261A","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-800":"#2E7D32","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#EEDA01","color-tv-blue-50":"#E3EFFD","color-tv-blue-100":"#BBD9FB","color-tv-blue-200":"#90BFF9","color-tv-blue-300":"#5B9CF6","color-tv-blue-400":"#3179F5","color-tv-blue-500":"#2962FF","color-tv-blue-600":"#1E53E5","color-tv-blue-700":"#1848CC","color-tv-blue-800":"#143EB3","color-tv-blue-900":"#0C3299","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#143A87","color-tv-blue-a800":"#142E61","color-tv-blue-a900":"#132042","color-deep-blue-50":"#EDE7F6","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a200":"#7C4DFF","color-deep-blue-a400":"#651FFF","color-deep-blue-a700":"#6200EA","color-minty-green-50":"#DAF2EE","color-minty-green-100":"#ACE5DC","color-minty-green-200":"#70CCBD","color-minty-green-300":"#42BDA8","color-minty-green-400":"#22AB94","color-minty-green-500":"#089981","color-minty-green-600":"#06806B","color-minty-green-700":"#056656","color-minty-green-800":"#004D40","color-minty-green-900":"#00332A","color-minty-green-a400":"#2BD9BC","color-minty-green-a600":"#24B29B","color-minty-green-a700":"#1B7667","color-minty-green-a800":"#10443B","color-minty-green-a900":"#082621","color-grapes-purple-50":"#F3E5F5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a100":"#EA80FC","color-grapes-purple-a200":"#E040FB","color-grapes-purple-a400":"#D500F9","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-800":"#AD1457","color-berry-pink-900":"#880E4F","color-berry-pink-a100":"#ff80ab","color-berry-pink-a200":"#ff4081","color-berry-pink-a400":"#f50057","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-forest-green-50":"#DAF2E6","color-forest-green-100":"#ACE5C9","color-forest-green-200":"#70CC9E","color-forest-green-300":"#42BD7F","color-forest-green-400":"#22AB67","color-forest-green-500":"#089950","color-forest-green-600":"#068043","color-forest-green-700":"#056636","color-forest-green-800":"#004D27","color-forest-green-900":"#1A3326","color-facebook":"#1877F2","color-deep-facebook":"#1564CA","color-twitter":"#1DA1F2","color-deep-twitter":"#188CD3","color-youtube":"#FF0000","color-linkedin":"#007BB5","color-seeking-alpha-brand":"#ff7200"};function Bt(a,n=1){return a+Math.round(255*Math.min(Math.max(n,0),1)).toString(16).toUpperCase().padStart(2,"0")}const ln={base:"vs",inherit:!0,rules:[{token:"comment",foreground:I["color-cold-gray-400"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:I["color-cold-gray-900"]},{token:"string",foreground:I["color-iguana-green-700"]},{token:"constant.numeric",foreground:I["color-banana-yellow-900"]},{token:"constant.language",foreground:I["color-ripe-red-a600"]},{token:"constant.other.color",foreground:I["color-ripe-red-a600"]},{token:"constant.other",foreground:I["color-ripe-red-a600"]},{token:"support.variable",foreground:I["color-ripe-red-a600"]},{token:"support.function",foreground:I["color-tv-blue-a600"]},{token:"support.type",foreground:I["color-minty-green-400"],fontStyle:"bold"},{token:"entity.name.type",foreground:I["color-minty-green-400"],fontStyle:"bold"},{token:"support.method",foreground:I["color-tv-blue-a600"]},{token:"keyword.equals",foreground:I["color-minty-green-400"]},{token:"keyword.operator",foreground:I["color-minty-green-400"]},{token:"keyword.other",foreground:I["color-minty-green-400"]},{token:"keyword",foreground:I["color-minty-green-400"]},{token:"variable.other",foreground:I["color-cold-gray-800"]},{token:"variable.other.property",foreground:I["color-cold-gray-800"]},{token:"paren",foreground:I["color-black"]},{token:"entity.name.function",foreground:I["color-tv-blue-900"]},{token:"entity.name.method",foreground:I["color-tv-blue-900"]},{token:"meta.function-call",foreground:I["color-grapes-purple-600"]},{token:"entity.name.module.name",foreground:I["color-grapes-purple-600"]},{token:"entity.name.module",foreground:I["color-tv-blue-a600"]},{token:"",background:I["color-white"]}],colors:{"editor.foreground":I["color-cold-gray-900"],"editor.background":"#00000000","editorLineNumber.foreground":I["color-cold-gray-400"],"editorLineNumber.activeForeground":I["color-cold-gray-700"],"editorHoverWidget.background":I["color-white"],"editorHoverWidget.statusBarBackground":I["color-cold-gray-150"],"editorHoverWidget.foreground":I["color-cold-gray-900"],"editorWidget.background":I["color-white"],"editorWidget.foreground":I["color-cold-gray-900"],"editorGutter.background":"#00000000","editor.foldBackground":Bt(I["color-cold-gray-200"],.5),"editor.lineHighlightBackground":I["color-tv-blue-50"],"editor.lineHighlightBorder":I["color-tv-blue-50"],"editor.rangeHighlightBackground":I["color-tv-blue-a800"],"editorBracketMatch.background":I["color-cold-gray-150"],"editor.selectionBackground":I["color-tv-blue-100"],"editor.selectionHighlightBackground":I["color-tv-blue-50"],"editor.findMatchBackground":I["color-tan-orange-100"],"editor.findMatchHighlightBackground":I["color-tan-orange-100"],"editor.findMatchBorder":I["color-tan-orange-500"],"list.foreground":I["color-cold-gray-900"],"list.hoverForeground":I["color-cold-gray-900"],"list.activeSelectionBackground":I["color-tv-blue-500"],"list.hoverBackground":I["color-tv-blue-50"],"list.focusHighlightForeground":I["color-tv-blue-100"],"list.inactiveSelectionBackground":I["color-tv-blue-500"],"keybindingLabel.background":I["color-white"],"keybindingLabel.foreground":I["color-cold-gray-900"],"keybindingLabel.border":I["color-cold-gray-150"],"input.foreground":I["color-cold-gray-900"],"textLink.foreground":I["color-tv-blue-500"],"textLink.activeForeground":I["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":I["color-tan-orange-100"],"peekViewResult.lineForeground":I["color-cold-gray-900"],"editorMarkerNavigationWarning.background":I["color-banana-yellow-800"],"inputValidation.warningBackground":I["color-banana-yellow-800"],"diffEditor.insertedTextBackground":Bt(I["color-forest-green-500"],.3),"diffEditor.insertedLineBackground":Bt(I["color-forest-green-500"],.15),"diffEditor.removedTextBackground":Bt(I["color-ripe-red-500"],.3),"diffEditor.removedLineBackground":Bt(I["color-ripe-red-500"],.15),"editorInlayHint.background":I["color-cold-gray-150"],"editorInlayHint.foreground":I["color-cold-gray-550"],"editorError.foreground":I["color-ripe-red-500"],"editorWarning.foreground":I["color-tan-orange-500"]}},cn={base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:I["color-cold-gray-500"]},{token:"comment.annotation",fontStyle:"bold"},{token:"text",foreground:I["color-white"]},{token:"string",foreground:I["color-iguana-green-700"]},{token:"constant.numeric",foreground:I["color-banana-yellow-900"]},{token:"constant.language",foreground:I["color-ripe-red-300"]},{token:"constant.other.color",foreground:I["color-ripe-red-300"]},{token:"constant.other",foreground:I["color-ripe-red-300"]},{token:"support.variable",foreground:I["color-ripe-red-300"]},{token:"support.function",foreground:I["color-tv-blue-300"]},{token:"support.method",foreground:I["color-tv-blue-300"]},{token:"support.type",foreground:I["color-minty-green-300"],fontStyle:"bold"},{token:"entity.name.type",foreground:I["color-minty-green-300"],fontStyle:"bold"},{token:"keyword.equals",foreground:I["color-minty-green-300"]},{token:"keyword.operator",foreground:I["color-minty-green-300"]},{token:"keyword.other",foreground:I["color-minty-green-300"]},{token:"keyword",foreground:I["color-minty-green-300"]},{token:"variable.other",foreground:I["color-cold-gray-200"]},{token:"variable.other.property",foreground:I["color-cold-gray-200"]},{token:"paren",foreground:I["color-white"]},{token:"entity.name.function",foreground:I["color-tv-blue-400"]},{token:"entity.name.method",foreground:I["color-tv-blue-400"]},{token:"meta.function-call",foreground:I["color-grapes-purple-300"]},{token:"entity.name.module.name",foreground:I["color-grapes-purple-300"]},{token:"entity.name.module",foreground:I["color-tv-blue-300"]},{token:"",background:I["color-cold-gray-900"]}],colors:{"editor.foreground":I["color-white"],"editor.background":I["color-cold-gray-900"],"editorLineNumber.foreground":I["color-cold-gray-500"],"editorLineNumber.activeForeground":I["color-cold-gray-300"],"editorWidget.background":I["color-cold-gray-850"],"editorHoverWidget.background":I["color-cold-gray-850"],"editorHoverWidget.foreground":I["color-cold-gray-300"],"editorHoverWidget.statusBarBackground":I["color-cold-gray-900"],"editorWidget.foreground":I["color-cold-gray-300"],"editorGutter.background":I["color-cold-gray-900"],"editor.foldBackground":Bt(I["color-cold-gray-700"],.5),"editor.lineHighlightBackground":I["color-tv-blue-a900"],"editor.lineHighlightBorder":I["color-tv-blue-a900"],"editor.rangeHighlightBackground":I["color-tv-blue-a800"],"editorBracketMatch.background":I["color-cold-gray-750"],"editor.selectionBackground":I["color-tv-blue-a800"],"editor.selectionHighlightBackground":I["color-cold-gray-800"],"list.foreground":I["color-cold-gray-350"],"list.hoverForeground":I["color-cold-gray-350"],"list.activeSelectionBackground":I["color-tv-blue-500"],"list.hoverBackground":I["color-tv-blue-900"],"list.focusHighlightForeground":I["color-tv-blue-300"],"list.inactiveSelectionBackground":I["color-tv-blue-500"],"keybindingLabel.background":I["color-cold-gray-800"],"keybindingLabel.foreground":I["color-cold-gray-300"],"keybindingLabel.border":I["color-cold-gray-700"],"input.foreground":I["color-cold-gray-350"],"textLink.foreground":I["color-tv-blue-500"],"textLink.activeForeground":I["color-tv-blue-600"],"peekViewEditor.matchHighlightBackground":I["color-tan-orange-a800"],"peekViewResult.lineForeground":I["color-cold-gray-350"],"diffEditor.insertedTextBackground":Bt(I["color-iguana-green-a700"],.3),"diffEditor.insertedLineBackground":Bt(I["color-iguana-green-a700"],.15),"diffEditor.removedTextBackground":Bt(I["color-ripe-red-a400"],.3),"diffEditor.removedLineBackground":Bt(I["color-ripe-red-a400"],.15),"editorInlayHint.background":I["color-cold-gray-800"],"editorInlayHint.foreground":I["color-cold-gray-400"],"editorError.foreground":I["color-ripe-red-500"],"editorWarning.foreground":I["color-tan-orange-700"]}},Sd=/(\\(?:[\\'"]))|(\\$)|("|$)|($)/g,Ed=/(\\(?:[\\'"]))|(\\$)|('|$)|($)/g,oo={"color.aqua":"#00BCD4","color.black":"#363A45","color.blue":"#2196F3","color.fuchsia":"#E040FB","color.gray":"#787B86","color.green":"#4CAF50","color.lime":"#00E676","color.maroon":"#880E4F","color.navy":"#311B92","color.olive":"#808000","color.orange":"#FF9800","color.purple":"#9C27B0","color.red":"#FF5252","color.silver":"#B2B5BE","color.teal":"#00897B","color.white":"#FFFFFF","color.yellow":"#FFEB3B"};class Nd{constructor(n){Object.defineProperty(this,"_formatter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isMac",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_getSignatureParams",{enumerable:!0,configurable:!0,writable:!0,value:(s=[],o)=>{const c=new Map,l=o.indexOf("(");for(let m=l+1,_=l;m<o.length;m++)o[m]!==","&&o[m]!==")"||(_++,c.set(o.slice(_,m),_),_=m+1);return s.map(({name:m="",displayType:_,desc:f})=>{const b=[],h=c.get(m),T=h+m.length;return b.push(this._formatter.paragraph(this._formatter.bold(m),this._formatter.italic(_||""))),f&&b.push(Array.isArray(f)?f.join(this._formatter.lineBreak):f),{label:[h,T],documentation:{value:b.join(this._formatter.lineBreak)}}})}}),this._formatter=ie,this._isMac=/(Mac|iPhone|iPod|iPad)/i.test(n)}getSignatureHelpValues(n,s,o=0,c=0){var b;const l=this._getFuncItems(n);if(!(l!=null&&l.length))return null;const m=this._getSequentialSignatures(n,l),_=this._getActiveIndex(l,s),f=(b=gr.overloadsFuncs)==null?void 0:b.find(h=>h.name===n&&h.startColumn===o&&c===h.line);return f&&(_.activeSignature=Number(f.index)),{signatures:m,..._}}_getActiveIndex(n,s=[]){let o=0,c=-1;s.some(m=>!!m)||(c=s.length-1);const l=s.pop();if(l)for(const[m,_]of n.entries()){const{args:f}=_;if(f&&f.length){const b=f.findIndex(h=>h.name===l);if(b!=-1){c=b,o=m;break}}}return{activeParameter:c,activeSignature:o}}_getFuncItems(n){return ct.functions.get(n)||St.userFuncs.get(n)||St.methodFuncs.get(n)}_getSequentialSignatures(n,s){return s.map(o=>{const c=this._getSignatureLabel(n,o);return{label:c,documentation:this._getFormattedSignatureDocumentation(o),parameters:this._getSignatureParams(o.args,c)}})}_getSignatureLabel(n,s,o=!1){const c=[n];return o&&c.push("<type>"),s.args&&(c.push("("),c.push(s.args.map(({name:l})=>l).join(", ")),c.push(")")),c.join("")}_getFormattedSignatureDocumentation(n){const{desc:s}=n,o=[];s&&o.push(Array.isArray(s)?s.join(this._formatter.lineBreak):s);const c=`${this._formatter.code(this._isMac?"⌘":"Ctrl")} +
|
138
138
|
${this._formatter.code("Shift")} +
|
139
|
-
${this._formatter.code("Space")}`;return o.push(this._formatter.lineBreak),o.push(this._formatter.italic(`${c} ${ge.toTriggerParameterHints}`)),{value:this._formatter.paragraph(...o)}}}const Ld=new Ed(window.navigator.userAgent);class Md{constructor(){Object.defineProperty(this,"_colors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._colors=oo}getDocumentColors(n){const s=[];return n.forEach(o=>{const{range:c}=o;let{matches:l}=o;l=l||[];const m=l[0]||"";let _=null;this._isHexToken(m)?_=this._hexToColor(m):this._isRgbColor(m)?_=this._rgbToColor(m):this._colors[m]?_=this._hexToColor(this._colors[m]):this._isColorExpression(m)&&l[1]&&l[6]&&(_=this._extractNewExpression(l[1],Number(l[6]))),_&&s.push({color:_,range:c})}),s}get _defultColorsRegStr(){return Object.keys(oo).reduce((n,s)=>`${n}|${s}`,"")}get colorMatchesRegStr(){const n=`#[0-9a-fA-F]{6,8}|(\\b(color.rgb\\s*\\((\\s*\\d+\\s*,\\s*){2}(\\s*\\d+\\s*,{0,1}){1,2}\\s*\\)${this._defultColorsRegStr}))`;return`color.new\\s*\\(\\s*(${n})\\s*,\\s*(\\d+)\\s*\\)|${n}`}getDocumentColorPresentations(n,{color:s,range:o}){const c=n.getValueInRange(o);if(this._isHexToken(c)||this._colors[c])return[{label:this._colorRgbRepresentation(s)},{label:this._colorHexRepresentation(s)}];if(this._isColorExpression(c)||this._isRgbColor(c)){const l=this._isColorExpression(c)?this._colorNewRepresentation(s):this._colorRgbRepresentation(s);if(!l)return[];const m=this._colorHexRepresentation(s);return[{label:l,textEdit:{text:l,range:o}},{label:m,textEdit:{text:m,range:o}}]}return null}_hexFromNumber(n){const s=this._denormalize(n).toString(16);return s.length===1?`0${s}`:s}_normalize(n){return n/255}_denormalize(n){return Math.round(255*n)}_normalizeAlpha(n){return(100-n)/100}_denormalizeAlpha(n){return 100-Math.round(100*n)}_extractNewExpression(n,s){let o=null;return this._isHexToken(n)?o=this._hexToColor(n):this._isRgbColor(n)?o=this._rgbToColor(n):this._colors[n]&&(o=this._hexToColor(this._colors[n])),o&&!Number.isNaN(s)?{...o,alpha:this._normalizeAlpha(s)}:null}_colorHexRepresentation(n){const s=this._hexFromNumber(n.red),o=this._hexFromNumber(n.green),c=this._hexFromNumber(n.blue),l=this._hexFromNumber(n.alpha);return`#${s}${o}${c}${n.alpha===1?"":l}`}_colorRgbRepresentation(n){const s=this._denormalize(n.red),o=this._denormalize(n.green),c=this._denormalize(n.blue),l=this._denormalizeAlpha(n.alpha),m=[s,o,c];return l>0&&m.push(l),`color.rgb(${m.join(", ")})`}_colorNewRepresentation(n){const s={...n,alpha:1};return`color.new(${this._colorHexRepresentation(s)}, ${this._denormalizeAlpha(n.alpha)})`}_hexToColor(n){const s=(n=this._isHexToken(n)?n.slice(1):n).length===3||n.length===4,o=s?`${n.slice(0,1)}${n.slice(0,1)}`:n.slice(0,2),c=s?`${n.slice(1,2)}${n.slice(1,2)}`:n.slice(2,4),l=s?`${n.slice(2,3)}${n.slice(2,3)}`:n.slice(4,6),m=(s?`${n.slice(3,4)}${n.slice(3,4)}`:n.slice(6,8))||"ff";return{red:this._normalize(parseInt(o,16)),green:this._normalize(parseInt(c,16)),blue:this._normalize(parseInt(l,16)),alpha:this._normalize(parseInt(m,16))}}_rgbToColor(n){const s=n.replace(/[^\d,]/g,"").split(","),o=this._normalize(Number(s[0])),c=this._normalize(Number(s[1])),l=this._normalize(Number(s[2])),m=this._normalizeAlpha(Number(s[3]))||1;return isNaN(o)||isNaN(c)||isNaN(l)?null:{red:o,green:c,blue:l,alpha:m}}_isHexToken(n){return n.charAt(0)==="#"}_isRgbColor(n){return n.startsWith("color.rgb")}_isColorExpression(n){return n.startsWith("color.new")}}const pn=new Md;A.VType=void 0,function(a){a.BOOL="bool",a.INT="int",a.FLOAT="float",a.ARRAY="array",a.BOX="box",a.CHART_POINT="chart.point",a.COLOR="color",a.CONST="const",a.LABEL="label",a.LINE="line",a.LINEFILL="linefill",a.MAP="map",a.MATRIX="matrix",a.POLYLINE="polyline",a.SERIES="series",a.SIMPLE="simple",a.STRING="string",a.TABLE="table",a.UNDETERMINED="undetermined type",a.INPUT="input",a.NA="na",a.VOID="void",a.ENUM="enum"}(A.VType||(A.VType={})),A.VRuleType=void 0,function(a){a.FlowStmt="FlowStmt",a.DeclareAssign="DeclareAssign",a.VarBlockStmt="VarBlockStmt",a.VarSingle="VarSingle",a.VarMultiple="VarMultiple",a.ParenthesizedExpression="ParenthesizedExpression",a.AdditiveExpression="AdditiveExpression",a.RelationalExpression="RelationalExpression",a.EqualityExpression="EqualityExpression",a.TernaryExpression="TernaryExpression",a.UnaryExpression="UnaryExpression",a.NotExpression="NotExpression",a.MemberIndexExpression="MemberIndexExpression",a.MethodExpression="MethodExpression",a.LogicalAndExpression="LogicalAndExpression",a.LogicalOrExpression="LogicalOrExpression",a.MultiplicativeExpression="MultiplicativeExpression",a.Brackethesized="Brackethesized",a.IfStatement="IfStatement",a.ForToStatement="ForToStatement",a.ForInStatement="ForInStatement",a.SwitchStatement="SwitchStatement",a.CaseClause="CaseClause",a.DefaultCaluse="DefaultCaluse",a.WhileStatement="WhileStatement",a.ImportElement="ImportElement",a.Literal="Literal",a.ArrowFunction="ArrowFunction",a.ArrowMethod="ArrowMethod",a.TypeStatement="TypeStatement",a.Name="Name",a.AgainAssign="AgainAssign",a.EnumStatement="EnumStatement"}(A.VRuleType||(A.VRuleType={})),A.VAdjustment=void 0,function(a){a.dividends="dividends",a.none="none",a.splits="splits"}(A.VAdjustment||(A.VAdjustment={})),A.VAlert=void 0,function(a){a.freqAll="freq_all",a.freqOncePerBar="freq_once_per_bar",a.freqOncePerBarClose="freq_once_per_bar_close"}(A.VAlert||(A.VAlert={})),A.VBarmergeGaps=void 0,function(a){a.gapsOff="gaps_off",a.gapsOn="gaps_on",a.lookaheadOff="lookahead_off",a.lookaheadOn="lookahead_on"}(A.VBarmergeGaps||(A.VBarmergeGaps={})),A.VPlotDisplay=void 0,function(a){a.all="all",a.dataWindow="data_window",a.none="none",a.pane="pane",a.priceScale="price_scale",a.statusLine="status_line"}(A.VPlotDisplay||(A.VPlotDisplay={})),A.VExtend=void 0,function(a){a.both="both",a.left="left",a.none="none",a.right="right"}(A.VExtend||(A.VExtend={})),A.VFormatType=void 0,function(a){a.inherit="inherit",a.mintick="mintick",a.percent="percent",a.price="price",a.volume="volume"}(A.VFormatType||(A.VFormatType={})),A.VHlineStyle=void 0,function(a){a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(A.VHlineStyle||(A.VHlineStyle={})),A.VLabelStyle=void 0,function(a){a.styleArrowdown="style_arrowdown",a.styleArrowup="style_arrowup",a.styleCircle="style_circle",a.styleCross="style_cross",a.styleDiamond="style_diamond",a.styleFlag="style_flag",a.styleLabelCenter="style_label_center",a.styleLabelDown="style_label_down",a.styleLabelLeft="style_label_left",a.styleLabelLowerLeft="style_label_lower_left",a.styleLabelLowerRight="style_label_lower_right",a.styleLabelRight="style_label_right",a.styleLabelUp="style_label_up",a.styleLabelUpperLeft="style_label_upper_left",a.styleLabelUpperRight="style_label_upper_right",a.styleNone="style_none",a.styleSquare="style_square",a.styleTextOutline="style_text_outline",a.styleTriangledown="style_triangledown",a.styleTriangleup="style_triangleup",a.styleXcross="style_xcross"}(A.VLabelStyle||(A.VLabelStyle={})),A.VLineStyle=void 0,function(a){a.styleArrowBoth="style_arrow_both",a.styleArrowLeft="style_arrow_left",a.styleArrowRight="style_arrow_right",a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(A.VLineStyle||(A.VLineStyle={})),A.VLocation=void 0,function(a){a.abovebar="abovebar",a.absolute="absolute",a.belowbar="belowbar",a.bottom="bottom",a.top="top"}(A.VLocation||(A.VLocation={})),A.VSortOrder=void 0,function(a){a.ascending="ascending",a.descending="descending"}(A.VSortOrder||(A.VSortOrder={})),A.VPlotStyle=void 0,function(a){a.styleArea="Area",a.styleAreabr="Area With Breaks",a.styleCircles="Circles",a.styleColumns="Columns",a.styleCross="Cross",a.styleHistogram="Histogram",a.styleLine="Line",a.styleLinebr="Line With Breaks",a.styleStepline="Step Line",a.styleSteplineDiamond="Step Line With Diamonds",a.styleSteplinebr="Step line with Breaks"}(A.VPlotStyle||(A.VPlotStyle={})),A.VPosition=void 0,function(a){a.bottomCenter="bottom_center",a.bottomLeft="bottom_left",a.bottomRight="bottom_right",a.middleCenter="middle_center",a.middleLeft="middle_left",a.middleRight="middle_right",a.topCenter="top_center",a.topLeft="top_left",a.topRight="top_right"}(A.VPosition||(A.VPosition={})),A.VScale=void 0,function(a){a.left="left",a.none="none",a.right="right"}(A.VScale||(A.VScale={})),A.VSession=void 0,function(a){a.extended="extended",a.regular="regular"}(A.VSession||(A.VSession={})),A.VShape=void 0,function(a){a.arrowdown="arrowdown",a.arrowup="arrowup",a.circle="circle",a.cross="cross",a.diamond="diamond",a.flag="flag",a.labeldown="labeldown",a.labelup="labelup",a.square="square",a.triangledown="triangledown",a.triangleup="triangleup",a.xcross="xcross"}(A.VShape||(A.VShape={})),A.VSize=void 0,function(a){a.auto="auto",a.huge="huge",a.large="large",a.normal="normal",a.small="small",a.tiny="tiny"}(A.VSize||(A.VSize={})),A.VFont=void 0,function(a){a.familyDefault="default",a.familyMonospace="monospace"}(A.VFont||(A.VFont={})),A.VStrategy=void 0,function(a){a.cash="cash",a.fixed="fixed",a.percentOfEquity="percent_of_equity"}(A.VStrategy||(A.VStrategy={})),A.VCommission=void 0,function(a){a.cashPerContract="cash_per_contract",a.cashPerOrder="cash_per_order",a.percent="percent"}(A.VCommission||(A.VCommission={})),A.VDirection=void 0,function(a){a.all="all",a.long="long",a.short="short"}(A.VDirection||(A.VDirection={})),A.VOca=void 0,function(a){a.cancel="cancel",a.none="none",a.reduce="reduce"}(A.VOca||(A.VOca={})),A.VText=void 0,function(a){a.alignBottom="align_bottom",a.alignCenter="align_center",a.alignLeft="align_left",a.alignRight="align_right",a.alignTop="align_top",a.wrapAuto="wrap_auto",a.wrapNone="wrap_none"}(A.VText||(A.VText={})),A.VXloc=void 0,function(a){a.bar_index="bar_index",a.bar_time="bar_time"}(A.VXloc||(A.VXloc={})),A.VYloc=void 0,function(a){a.abovebar="abovebar",a.belowbar="belowbar",a.price="price"}(A.VYloc||(A.VYloc={})),A.VEarnings=void 0,function(a){a.actual="actual",a.estimate="estimate",a.standardized="standardized"}(A.VEarnings||(A.VEarnings={})),A.VPivotType=void 0,function(a){a.traditional="Traditional",a.fibonacci="Fibonacci",a.woodie="Woodie",a.classic="Classic",a.dm="DM",a.camarilla="Camarilla"}(A.VPivotType||(A.VPivotType={})),A.VInputType=void 0,function(a){a.INT="int",a.BOOL="bool",a.TIME="time",a.COLOR="color",a.FLOAT="float",a.PRICE="price",a.SOURCE="source",a.STRING="string",a.SYMBOL="symbol",a.SESSION="session",a.TEXT_AREA="text_area",a.TIMEFRAME="timeframe",a.ENUM="enum"}(A.VInputType||(A.VInputType={}));var lo;(function(a){a.description="description",a.field="field",a.function="function",a.param="param",a.returns="returns",a.type="type",a.variable="variable",a.enum="enum"})(lo||(lo={})),A.VScriptType=void 0,function(a){a.library="library",a.indicator="indicator",a.strategy="strategy"}(A.VScriptType||(A.VScriptType={})),A.VType.SERIES,A.VType.SIMPLE,A.VType.INPUT,A.VType.CONST,A.VType.INT,A.VType.FLOAT,A.VType.BOOL,A.VType.COLOR,A.VType.STRING;const Pd={domReadOnly:!0,scrollBeyondLastLine:!1,readOnly:!0,minimap:{enabled:!1},scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1},contextmenu:!1},co={functions:[{name:"calcBB",desc:["Computes Bollinger Band values from an array of data."],args:[{name:"srcArray",desc:"(array<float>) The array where the queue is maintained.",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series float mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"srcArray",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series int mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],index:1},{name:"Scanner.new",args:[{name:"enabled",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"},{name:"ticker",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"},{name:"timeframe",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.new(series bool enabled, series string ticker, series string timeframe) → Scanner"]},{name:"Scanner.copy",args:[{name:"object",required:!0,allowedTypeIDs:["Scanner"],displayType:"Scanner"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},info:"The identifier of the object to be copied.",syntax:["Scanner.copy(Scanner object) → Scanner"]}],methods:[{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],desc:["Computes Bollinger Band values from an array of data."],originalName:"array.calcBB",syntax:["calcBB(series float mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},thisType:["float[]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],originalName:"array.calcBB",syntax:["calcBB(series int mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},thisType:["float[]"],index:1},{name:"Scanner.copy",args:[],returnedTypes:["Scanner"],thisType:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.copy() → Scanner"]}],types:[{fields:[{name:"enabled",type:"series bool"},{name:"ticker",type:"series string"},{name:"timeframe",type:"series string"}],name:"Scanner",pos:{lineNumber:30,column:12}}],description:"Provides a tool to quickly output a label on the chart.",codeStr:'const $name={calcBB:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_12","var")||$_var.setVarValue("mean",e+"_14_12",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_13","var")||$_var.setVarValue("dev",e+"_14_13",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_16_16")),v=a.avg(e+"_16_16"),$_var.setVarValue("mean",e+"_14_12",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_17_16")*r),s=a.stdev(e+"_17_16")*r,$_var.setVarValue("dev",e+"_14_13",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},calcBB$1:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_21","var")||$_var.setVarValue("mean",e+"_14_21",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_22","var")||$_var.setVarValue("dev",e+"_14_22",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_25_16")),v=a.avg(e+"_25_16"),$_var.setVarValue("mean",e+"_14_21",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_26_16")*r),s=a.stdev(e+"_26_16")*r,$_var.setVarValue("dev",e+"_14_22",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},Scanner:$_var.getTypeInstance({enabled:void 0,ticker:void 0,timeframe:void 0},[])};'};class Od{constructor(){Object.defineProperty(this,"_inlayHints",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_importCompleteLibrary",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._inlayHints=new Map,this._importCompleteLibrary=new Map,this._funcs=new Map}get inlayHints(){return[...this._inlayHints.values()]}setEditor(n){this._editor=n}async setInlayHints(n){const{endLine:s,endColumn:o,name:c,libraryId:l,libraryName:m}=n;if(this._importCompleteLibrary.has(l)){const _=this._funcs.get(l);return((_==null?void 0:_.name)!==c||!c&&!this._inlayHints.has(l))&&(this._updateFuncNames(c||m,l),this._inlayHintsHandle(n)),this._importCompleteLibrary.get(l)}return this._importCompleteLibrary.set(l,co),this._inlayHints.set(l,{label:"载入中...",position:{column:o,lineNumber:s},paddingLeft:!0}),this.triggerInlayHints(),this._updateFuncNames(c||m,l),setTimeout(()=>{this._inlayHints.has(l)&&this._inlayHintsHandle(n)},2e3),co}deleteInlayHints(n){this._inlayHints.delete(n)}clearInlayHints(){this._inlayHints.clear()}triggerInlayHints(){this._editor&&this._editor.updateOptions({inlayHints:{fontFamily:String(Date.now())}})}_updateFuncNames(n,s){const o=this._importCompleteLibrary.get(s);if(!o)return;const c=o.functions.map(l=>`${n}.${l.name}`);this._funcs.set(s,{name:n,funcs:c}),this._updateMonarchTokens()}_setNoNameInlayHints(n){const{endLine:s,endColumn:o,libraryId:c,libraryName:l}=n;this._inlayHints.set(c,{label:`as ${l}`,position:{column:o,lineNumber:s},paddingLeft:!0})}_inlayHintsHandle(n){const{name:s,libraryId:o}=n;s?this._inlayHints.delete(o):this._setNoNameInlayHints(n),this.triggerInlayHints()}_updateMonarchTokens(){const n=[...this._funcs.values()].map(c=>c.funcs.join("|")),s=new RegExp("\\b("+n.join("|")+")(?=\\s*\\()"),o=[...Er.tokenizer.root];o.splice(15,0,[s,"meta.function-call"]),Ie.languages.setMonarchTokensProvider(Se,{...Er,tokenizer:{...Er.tokenizer,root:o}})}}const Gs=new Od;function Rd(a,n,s){var K;const o={startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column},c=a.getValueInRange(o);if(/^\/\/\s*@/.test(c))return{suggestions:St.annotationSuggestions};if(s.triggerCharacter==="@")return{suggestions:[]};const l=c.match(/([\w.]+)$/)||[];if(!l.length)return{suggestions:[]};const m=(K=l[0])==null?void 0:K.match(/.*[^\w.]+([\w.]+)(?=\.)|([\w.]+)(?=\.)/),_=m?m[1]?m[1]:m[2]?m[2]:void 0:void 0,f=a.getWordUntilPosition(n),b=gr.parseCurrentInputFunc(c),h={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:f.startColumn,endColumn:f.endColumn},T=a.getValueInRange({...h,startColumn:f.endColumn,endColumn:f.endColumn+1});St.nextIsBracket=T==="(";let O=po(St.getSuggestions(_)||[],h);if(l[0]==="."&&(O=[]),b&&!_&&!/=\s*\w+$/.test(c)){const F=po(St.getArgSuggestions(b.funcName)||[],h);O=O.concat(F)}return{suggestions:O||[],dispose:()=>{}}}function Fd(a){if(a.kind!==1)return a;const{originInsertText:n}=a;return St.nextIsBracket?a.insertText=n:a.insertText=n+St.bracketsPostfix,a}function Bd(a,n){var o;const s=gr.parseLineContentFuncVar(n.column,n.lineNumber,a,n);if(s!=null&&s.libraryId)return{contents:[{value:Dd(s)}]};if((o=s==null?void 0:s.docValue)!=null&&o.length){const c=kd(s.docValue,s.index,s.isBuildIn);if(c)return{contents:[{value:c}]}}return{contents:[]}}function Ud(a,n){var T,O;const s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:1,endColumn:n.column},o=a.getValueInRange(s),c=a.findMatches(String(Sd),s,!0,!1,null,!0),l=a.findMatches(String(Nd),s,!0,!1,null,!0),m=(T=c.pop())==null?void 0:T.matches,_=(O=l.pop())==null?void 0:O.matches;let f=!1;c.length%2===0?m&&m[0]==='"'&&(f=!0):m&&!m[0]&&(f=!0);let b=!1;l.length%2===0?_&&_[0]==="'"&&(b=!0):_&&!_[0]&&(b=!0);const h=gr.parseCurrentInputFuncAndArg(o,b,f);if(h){const{funcName:K,args:F,startIndex:E}=h,H=Ld.getSignatureHelpValues(K,F,E+1,n.lineNumber);if(H)return{value:H,dispose:()=>{}}}return null}function Kd(a){let n=a.findMatches(pn.colorMatchesRegStr,!0,!0,!1,null,!0);return n=n.filter(o=>{const c=a.getValueInRange({...o.range,startColumn:0});return c.indexOf("//")===-1||c.indexOf("//")>o.range.endColumn}),pn.getDocumentColors(n)}function $d(a,n){return pn.getDocumentColorPresentations(a,n)||[]}function jd(a,n){const s=a.getModel(),o=gr.parseLineContentFuncVar(n.startColumn+1,n.startLineNumber,s);if(!o||o.isBuildIn||!o.docValue||!o.docValue[0].pos)return o!=null&&o.isBuildIn?o:void 0;const{lineNumber:c,column:l}=o.docValue[0].pos,m={startLineNumber:c,endLineNumber:c,startColumn:l,endColumn:l};a.revealRangeInCenterIfOutsideViewport(m),a.setSelection(m)}function Hd(a,n){return gr.parseLineContentFuncVar(n.column,n.lineNumber,a,n)?{uri:a.uri,range:{startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:n.column-1,endColumn:n.column-1}}:null}function po(a,n){return a.map(s=>(s.range=n,s))}function Wd(){return{hints:Gs.inlayHints,dispose:()=>{}}}var ds={},ms=lp;if(process.env.NODE_ENV==="production")ds.createRoot=ms.createRoot,ds.hydrateRoot=ms.hydrateRoot;else{var Xs=ms.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ds.createRoot=function(a,n){Xs.usingClientEntryPoint=!0;try{return ms.createRoot(a,n)}finally{Xs.usingClientEntryPoint=!1}},ds.hydrateRoot=function(a,n,s){Xs.usingClientEntryPoint=!0;try{return ms.hydrateRoot(a,n,s)}finally{Xs.usingClientEntryPoint=!1}}}var Ve;(function(a){a.added="added",a.removed="removed",a.modified="modified"})(Ve||(Ve={}));const Gd=(a,n)=>{const{close:s,retracement:o}=a,[c,l]=R.useState("modified");return R.useImperativeHandle(n,()=>({updateType(m){l(m)}})),L.jsxs("div",{className:`content-popup content-${c}-popup`,children:[L.jsx("div",{className:`triangle-popup triangle-${c}-popup`}),L.jsxs("div",{className:`header-popup header-${c}-popup`,children:[L.jsx("div",{className:"title-popup",children:"Local working changes"}),L.jsx("div",{className:"actions-popup",children:L.jsx("div",{onClick:s,"data-role":"button",className:"button-popup","data-name":"button-close-diff",children:L.jsx("span",{className:"icon-popup",role:"img",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:"12",height:"12",children:L.jsx("path",{stroke:"currentColor",strokeWidth:"1.2",d:"m1.5 1.5 9 9m0-9-9 9"})})})})})]}),L.jsx("div",{id:"diffEditorContainer",style:{height:"100%"}})]})},Xd=R.forwardRef(Gd);class Vd{constructor(n,s,o=!0){Object.defineProperty(this,"_domNode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_top",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._id=n,this._domNode=document.createElement("div"),this._domNode.style.display="none",this._domNode.style.width=o?"calc(100% - 134px)":"calc(100% - 14px)",this._domNode.style.height="200px",s==null||s.onDidScrollChange(this.scrollChangeHandler.bind(this)),ds.createRoot(this._domNode).render(L.jsx(Xd,{ref:c=>this._content=c,close:()=>this._close(),retracement:this._retracement})),this._top=0}_close(){this._domNode.style.display="none"}_retracement(){}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}show(n,s,o){var c;this._top=s,(c=this._content)==null||c.updateType(o),this._domNode.style.top=`${n}px`,this._domNode.style.display="block"}hide(){this._domNode.style.display="none"}scrollChangeHandler(n){const s=n.scrollTop;this._domNode.style.top=`${this._top-s}px`}}function nr(){}nr.prototype={diff:function(n,s){var o,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=c.callback;typeof c=="function"&&(l=c,c={}),this.options=c;var m=this;function _(k){return l?(setTimeout(function(){l(void 0,k)},0),!0):k}n=this.castInput(n),s=this.castInput(s),n=this.removeEmpty(this.tokenize(n)),s=this.removeEmpty(this.tokenize(s));var f=s.length,b=n.length,h=1,T=f+b;c.maxEditLength&&(T=Math.min(T,c.maxEditLength));var O=(o=c.timeout)!==null&&o!==void 0?o:1/0,K=Date.now()+O,F=[{oldPos:-1,lastComponent:void 0}],E=this.extractCommon(F[0],s,n,0);if(F[0].oldPos+1>=b&&E+1>=f)return _([{value:this.join(s),count:s.length}]);var H=-1/0,V=1/0;function G(){for(var k=Math.max(H,-h);k<=Math.min(V,h);k+=2){var P=void 0,N=F[k-1],U=F[k+1];N&&(F[k-1]=void 0);var te=!1;if(U){var fe=U.oldPos-k;te=U&&0<=fe&&fe<f}var le=N&&N.oldPos+1<b;if(!te&&!le){F[k]=void 0;continue}if(!le||te&&N.oldPos+1<U.oldPos?P=m.addToPath(U,!0,void 0,0):P=m.addToPath(N,void 0,!0,1),E=m.extractCommon(P,s,n,k),P.oldPos+1>=b&&E+1>=f)return _(Yd(m,P.lastComponent,s,n,m.useLongestToken));F[k]=P,P.oldPos+1>=b&&(V=Math.min(V,k-1)),E+1>=f&&(H=Math.max(H,k+1))}h++}if(l)(function k(){setTimeout(function(){if(h>T||Date.now()>K)return l();G()||k()},0)})();else for(;h<=T&&Date.now()<=K;){var B=G();if(B)return B}},addToPath:function(n,s,o,c){var l=n.lastComponent;return l&&l.added===s&&l.removed===o?{oldPos:n.oldPos+c,lastComponent:{count:l.count+1,added:s,removed:o,previousComponent:l.previousComponent}}:{oldPos:n.oldPos+c,lastComponent:{count:1,added:s,removed:o,previousComponent:l}}},extractCommon:function(n,s,o,c){for(var l=s.length,m=o.length,_=n.oldPos,f=_-c,b=0;f+1<l&&_+1<m&&this.equals(s[f+1],o[_+1]);)f++,_++,b++;return b&&(n.lastComponent={count:b,previousComponent:n.lastComponent}),n.oldPos=_,f},equals:function(n,s){return this.options.comparator?this.options.comparator(n,s):n===s||this.options.ignoreCase&&n.toLowerCase()===s.toLowerCase()},removeEmpty:function(n){for(var s=[],o=0;o<n.length;o++)n[o]&&s.push(n[o]);return s},castInput:function(n){return n},tokenize:function(n){return n.split("")},join:function(n){return n.join("")}};function Yd(a,n,s,o,c){for(var l=[],m;n;)l.push(n),m=n.previousComponent,delete n.previousComponent,n=m;l.reverse();for(var _=0,f=l.length,b=0,h=0;_<f;_++){var T=l[_];if(T.removed){if(T.value=a.join(o.slice(h,h+T.count)),h+=T.count,_&&l[_-1].added){var K=l[_-1];l[_-1]=l[_],l[_]=K}}else{if(!T.added&&c){var O=s.slice(b,b+T.count);O=O.map(function(E,H){var V=o[h+H];return V.length>E.length?V:E}),T.value=a.join(O)}else T.value=a.join(s.slice(b,b+T.count));b+=T.count,T.added||(h+=T.count)}}var F=l[f-1];return f>1&&typeof F.value=="string"&&(F.added||F.removed)&&a.equals("",F.value)&&(l[f-2].value+=F.value,l.pop()),l}var mo=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,uo=/\S/,yo=new nr;yo.equals=function(a,n){return this.options.ignoreCase&&(a=a.toLowerCase(),n=n.toLowerCase()),a===n||this.options.ignoreWhitespace&&!uo.test(a)&&!uo.test(n)},yo.tokenize=function(a){for(var n=a.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),s=0;s<n.length-1;s++)!n[s+1]&&n[s+2]&&mo.test(n[s])&&mo.test(n[s+2])&&(n[s]+=n[s+2],n.splice(s+1,2),s--);return n};var dn=new nr;dn.tokenize=function(a){this.options.stripTrailingCr&&(a=a.replace(/\r\n/g,`
|
140
|
-
`));var n=[],s=a.split(/(\n|\r\n)/);s[s.length-1]||s.pop();for(var o=0;o<s.length;o++){var c=s[o];o%2&&!this.options.newlineIsToken?n[n.length-1]+=c:(this.options.ignoreWhitespace&&(c=c.trim()),n.push(c))}return n};function Qd(a,n,s){return dn.diff(a,n,s)}var Zd=new nr;Zd.tokenize=function(a){return a.split(/(\S.+?[.!?])(?=\s+|$)/)};var Jd=new nr;Jd.tokenize=function(a){return a.split(/([{}:;,]|\s+)/)};function Vs(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(n){return typeof n}:Vs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vs(a)}var em=Object.prototype.toString,us=new nr;us.useLongestToken=!0,us.tokenize=dn.tokenize,us.castInput=function(a){var n=this.options,s=n.undefinedReplacement,o=n.stringifyReplacer,c=o===void 0?function(l,m){return typeof m>"u"?s:m}:o;return typeof a=="string"?a:JSON.stringify(mn(a,null,null,c),c," ")},us.equals=function(a,n){return nr.prototype.equals.call(us,a.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};function mn(a,n,s,o,c){n=n||[],s=s||[],o&&(a=o(c,a));var l;for(l=0;l<n.length;l+=1)if(n[l]===a)return s[l];var m;if(em.call(a)==="[object Array]"){for(n.push(a),m=new Array(a.length),s.push(m),l=0;l<a.length;l+=1)m[l]=mn(a[l],n,s,o,c);return n.pop(),s.pop(),m}if(a&&a.toJSON&&(a=a.toJSON()),Vs(a)==="object"&&a!==null){n.push(a),m={},s.push(m);var _=[],f;for(f in a)a.hasOwnProperty(f)&&_.push(f);for(_.sort(),l=0;l<_.length;l+=1)f=_[l],m[f]=mn(a[f],n,s,o,f);n.pop(),s.pop()}else m=a;return m}var un=new nr;un.tokenize=function(a){return a.slice()},un.join=un.removeEmpty=function(a){return a};class tm{constructor(n,s,o=""){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalModel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_oldDecorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffEditor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffPopupWidget",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_didChangeListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onMouseDownListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=n,this._monaco=s,this._originalModel=this._monaco.editor.createModel(o,Se),this._oldDecorations=[],this._init(),this._eventListening()}_init(){var n;this._changeEvent(),this._didChangeListener=(n=this._editor.getModel())==null?void 0:n.onDidChangeContent(()=>this._changeEvent())}update(n){var s,o;if(this._originalModel=this._monaco.editor.createModel(n,Se),n!==((s=this._editor.getModel())==null?void 0:s.getValue())){this._changeEvent();return}(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[]}dispose(){var n,s,o,c;this._diffPopupWidget&&(this._diffPopupWidget.hide(),this._editor.removeOverlayWidget(this._diffPopupWidget)),(n=this._didChangeListener)==null||n.dispose(),(s=this._onMouseDownListener)==null||s.dispose(),(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[],(c=this._diffEditor)==null||c.dispose(),this._diffEditor=void 0}_changesHandle(n){let s=0,o;const c=[];let l=0;for(const m of n){const{added:_,removed:f,count:b=1,value:h}=m;_?o&&o.removed?(s=this._changeHandle(c,s,l,b,Ve.modified),l=0,o=void 0):(o&&o.added&&(s=this._changeHandle(c,s,l,o.count||1,Ve.added),l=0),o=m):f?o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Ve.modified),l=0,o=void 0):(o&&o.removed&&this._addDecorationList(c,s,Ve.removed),o=m):/^\n+$/.test(h)?o&&(o.added||o.removed)?l=b:s+=b:(o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Ve.added),l=0,o=void 0):o&&o.removed&&(this._addDecorationList(c,s,Ve.removed),o=void 0),s+=b)}return o&&o.added?s=this._changeHandle(c,s,l,o.count||1,Ve.added):o&&o.removed&&this._addDecorationList(c,s,Ve.removed),c}_changeHandle(n,s,o,c,l){for(let m=1;m<=c;m++)this._addDecorationList(n,s+m,l);return s+=c+o,s}_addDecorationList(n,s,o){n.push({range:new this._monaco.Range(s,1,s,1),options:{isWholeLine:!0,linesDecorationsClassName:`line-${o} line-decoration_${o}`}})}_changeEvent(){var c,l;const n=Qd(this._originalModel.getValue(),((c=this._editor.getModel())==null?void 0:c.getValue())||""),s=this._changesHandle(n),o=((l=this._editor.getModel())==null?void 0:l.deltaDecorations(this._oldDecorations,s))||[];this._oldDecorations=o}_eventListening(){const n=new Vd("diff.popup.widget",this._editor);this._editor.addOverlayWidget(n),this._onMouseDownListener=this._editor.onMouseDown(s=>this._onMouseDownHandle(s)),this._diffPopupWidget=n}_onMouseDownHandle(n){var m,_,f,b,h,T;const s=(m=n.target.element)==null?void 0:m.classList,o=s==null?void 0:s.contains(`line-${Ve.added}`),c=s==null?void 0:s.contains(`line-${Ve.modified}`),l=s==null?void 0:s.contains(`line-${Ve.removed}`);if(o||c||l){const O=((f=(_=n==null?void 0:n.target)==null?void 0:_.position)==null?void 0:f.lineNumber)||0,K=((b=this._editor)==null?void 0:b.getTopForLineNumber(O+1))||0,F=((h=this._editor)==null?void 0:h.getScrollTop())||0,E=o?Ve.added:c?Ve.modified:Ve.removed;(T=this._diffPopupWidget)==null||T.show(K-F,K,E),this._diffEditor||(this._diffEditor=this._createDiffEditor()),this._diffEditor.setModel({original:this._originalModel,modified:this._editor.getModel()}),this._diffEditor.revealLineInCenter(O+1)}}_createDiffEditor(){return this._monaco.editor.createDiffEditor(document.getElementById("diffEditorContainer"),{renderSideBySide:!1,quickSuggestions:!1,suggestOnTriggerCharacters:!1,hover:{enabled:!1},parameterHints:{enabled:!1}})}}class rm{constructor(n,s,o){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_decorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_changPositionListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalScript",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onActionTrigger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onLinkOpen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=n,this._monaco=s,this._onActionTrigger=o,this._init()}addLinkOpenFunc(n){this._onLinkOpen=n}updateActionTrigger(n){this._onActionTrigger=n}setModelMarkers(n){this._monaco.editor.setModelMarkers(this._editor.getModel(),"owner",n)}addDiffDecorations(){this._decorations||(this._decorations=new tm(this._editor,this._monaco,this._originalScript))}removeDiffDecorations(){var n;(n=this._decorations)==null||n.dispose(),this._decorations=void 0}setValue(n){var s;this._editor.setValue(n),this._editor.setScrollTop(0),(s=this._editor)==null||s.focus()}setPosition(n){var s,o,c;(s=this._editor)==null||s.setPosition(n),(o=this._editor)==null||o.revealPositionInCenter(n),(c=this._editor)==null||c.focus()}setOriginalScript(n){var s;this._originalScript=n,(s=this._decorations)==null||s.update(n)}getEditorLayout(){var o;const n=this._editor.getContentHeight(),s=(o=this._editor.getModel())==null?void 0:o.getLineCount();return{contentHeight:n,lineCount:s}}setEditorLayout(n,s){var o,c;(c=this._editor)==null||c.layout({height:n,width:s||((o=this._editor)==null?void 0:o.getContainerDomNode().clientWidth)})}_init(){this._register(),this._setOptions(),this._addCommands(),this._addActions(),this._setCursorPosition(),this._onTabSizeChange()}_onTabSizeChange(){const n=this._editor.getModel();n==null||n.onDidChangeOptions(s=>{if(s.tabSize&&!s.indentSize){const o=(n==null?void 0:n.getOptions().tabSize)||4;n==null||n.updateOptions({indentSize:o})}})}_setCursorPosition(){const n=localStorage.getItem(nn);this._editor.setPosition(n?JSON.parse(n):{lineNumber:1,column:1}),this._editor.focus()}_register(){this._monaco.languages.register({id:Se}),this._monaco.languages.registerCompletionItemProvider(Se,{triggerCharacters:[".","@"],provideCompletionItems:Rd,resolveCompletionItem:Fd}),this._monaco.languages.registerHoverProvider(Se,{provideHover:Bd}),this._monaco.languages.registerSignatureHelpProvider(Se,{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:Ud}),this._monaco.languages.registerColorProvider(Se,{provideColorPresentations:$d,provideDocumentColors:Kd}),this._monaco.editor.registerEditorOpener({openCodeEditor:(n,s,o)=>{const c=jd(n,o);if(c){const{index:l,docValue:m}=c,{title:_,name:f}=m[l];let b="";switch(_){case ge.keywords:b="kw";break;case ge.functions:b="fun";break;case ge.variables:b="var";break;case ge.types:b="type";break;case ge.constants:b="const";break}this._onLinkOpen&&this._onLinkOpen(`${b}_${f}`,l)}return!0}}),this._monaco.editor.registerLinkOpener({open:n=>(this._onLinkOpen&&n.fragment&&this._onLinkOpen(n.fragment),!!n.fragment)}),this._monaco.languages.registerDefinitionProvider(Se,{provideDefinition:Hd}),this._monaco.languages.registerInlayHintsProvider(Se,{provideInlayHints:Wd})}_setOptions(){this._monaco.editor.defineTheme("vs-dark",cn),this._monaco.editor.defineTheme("vs",ln),this._monaco.languages.setMonarchTokensProvider(Se,Er),this._monaco.languages.setLanguageConfiguration(Se,on)}_addCommands(){this._monaco.editor.addCommand({id:"tcc.editor.function",run:(n,s)=>{var o;if(St.nextIsBracket){const c=this._editor.getPosition();c&&this._editor.setPosition(Object.assign(c,{column:c.column+1}))}(o=this._editor.getAction(s))==null||o.run()}})}_addActions(){this._editor.addAction({id:"tcc-save-script",label:"保存脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyS],contextMenuGroupId:"9_modification",contextMenuOrder:1,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.Save)}}),this._editor.addAction({id:"tcc-find-replace-line",label:"寻找/替换",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyF],contextMenuGroupId:"9_cutcopypaste",contextMenuOrder:5,run:()=>{this.openFind(),this._onActionTrigger&&this._onActionTrigger(A.Actions.Find)}}),this._editor.addAction({id:"tcc-trigger-console-script",label:"切换控制台",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Backquote],contextMenuGroupId:"z_commands",contextMenuOrder:0,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.TriggerConsole)}}),this._editor.addAction({id:"tcc-run-script",label:"运行脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Enter],run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.RunScript)}}),this._editor.addAction({id:"tcc-open-script",label:"打开脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyO],contextMenuGroupId:"9_modification",contextMenuOrder:2,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.Open)}}),this._editor.addAction({id:"tcc-new-window-script",label:"在新窗口中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyW],contextMenuGroupId:"9_modification",contextMenuOrder:3,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.NewWindow)}}),this._editor.addAction({id:"tcc-new-tab-script",label:"在新标签页中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyT],contextMenuGroupId:"9_modification",contextMenuOrder:4,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.NewTab)}})}openFind(){this._editor.focus(),this._editor.trigger("click","actions.find",null)}gotoLine(){this._editor.focus(),this._editor.trigger("click","editor.action.gotoLine",null)}onChangeCursorPosition(n){this._changPositionListener&&this._changPositionListener.dispose();const s=localStorage.getItem(nn);n&&n(s?JSON.parse(s):{lineNumber:1,column:1}),this._changPositionListener=this._editor.onDidChangeCursorPosition(o=>{localStorage.setItem(nn,JSON.stringify(o.position)),n&&n(o.position)})}}/**
|
139
|
+
${this._formatter.code("Space")}`;return o.push(this._formatter.lineBreak),o.push(this._formatter.italic(`${c} ${ge.toTriggerParameterHints}`)),{value:this._formatter.paragraph(...o)}}}const Ld=new Nd(window.navigator.userAgent);class Md{constructor(){Object.defineProperty(this,"_colors",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._colors=oo}getDocumentColors(n){const s=[];return n.forEach(o=>{const{range:c}=o;let{matches:l}=o;l=l||[];const m=l[0]||"";let _=null;this._isHexToken(m)?_=this._hexToColor(m):this._isRgbColor(m)?_=this._rgbToColor(m):this._colors[m]?_=this._hexToColor(this._colors[m]):this._isColorExpression(m)&&l[1]&&l[6]&&(_=this._extractNewExpression(l[1],Number(l[6]))),_&&s.push({color:_,range:c})}),s}get _defultColorsRegStr(){return Object.keys(oo).reduce((n,s)=>`${n}|${s}`,"")}get colorMatchesRegStr(){const n=`#[0-9a-fA-F]{6,8}|(\\b(color.rgb\\s*\\((\\s*\\d+\\s*,\\s*){2}(\\s*\\d+\\s*,{0,1}){1,2}\\s*\\)${this._defultColorsRegStr}))`;return`color.new\\s*\\(\\s*(${n})\\s*,\\s*(\\d+)\\s*\\)|${n}`}getDocumentColorPresentations(n,{color:s,range:o}){const c=n.getValueInRange(o);if(this._isHexToken(c)||this._colors[c])return[{label:this._colorRgbRepresentation(s)},{label:this._colorHexRepresentation(s)}];if(this._isColorExpression(c)||this._isRgbColor(c)){const l=this._isColorExpression(c)?this._colorNewRepresentation(s):this._colorRgbRepresentation(s);if(!l)return[];const m=this._colorHexRepresentation(s);return[{label:l,textEdit:{text:l,range:o}},{label:m,textEdit:{text:m,range:o}}]}return null}_hexFromNumber(n){const s=this._denormalize(n).toString(16);return s.length===1?`0${s}`:s}_normalize(n){return n/255}_denormalize(n){return Math.round(255*n)}_normalizeAlpha(n){return(100-n)/100}_denormalizeAlpha(n){return 100-Math.round(100*n)}_extractNewExpression(n,s){let o=null;return this._isHexToken(n)?o=this._hexToColor(n):this._isRgbColor(n)?o=this._rgbToColor(n):this._colors[n]&&(o=this._hexToColor(this._colors[n])),o&&!Number.isNaN(s)?{...o,alpha:this._normalizeAlpha(s)}:null}_colorHexRepresentation(n){const s=this._hexFromNumber(n.red),o=this._hexFromNumber(n.green),c=this._hexFromNumber(n.blue),l=this._hexFromNumber(n.alpha);return`#${s}${o}${c}${n.alpha===1?"":l}`}_colorRgbRepresentation(n){const s=this._denormalize(n.red),o=this._denormalize(n.green),c=this._denormalize(n.blue),l=this._denormalizeAlpha(n.alpha),m=[s,o,c];return l>0&&m.push(l),`color.rgb(${m.join(", ")})`}_colorNewRepresentation(n){const s={...n,alpha:1};return`color.new(${this._colorHexRepresentation(s)}, ${this._denormalizeAlpha(n.alpha)})`}_hexToColor(n){const s=(n=this._isHexToken(n)?n.slice(1):n).length===3||n.length===4,o=s?`${n.slice(0,1)}${n.slice(0,1)}`:n.slice(0,2),c=s?`${n.slice(1,2)}${n.slice(1,2)}`:n.slice(2,4),l=s?`${n.slice(2,3)}${n.slice(2,3)}`:n.slice(4,6),m=(s?`${n.slice(3,4)}${n.slice(3,4)}`:n.slice(6,8))||"ff";return{red:this._normalize(parseInt(o,16)),green:this._normalize(parseInt(c,16)),blue:this._normalize(parseInt(l,16)),alpha:this._normalize(parseInt(m,16))}}_rgbToColor(n){const s=n.replace(/[^\d,]/g,"").split(","),o=this._normalize(Number(s[0])),c=this._normalize(Number(s[1])),l=this._normalize(Number(s[2])),m=this._normalizeAlpha(Number(s[3]))||1;return isNaN(o)||isNaN(c)||isNaN(l)?null:{red:o,green:c,blue:l,alpha:m}}_isHexToken(n){return n.charAt(0)==="#"}_isRgbColor(n){return n.startsWith("color.rgb")}_isColorExpression(n){return n.startsWith("color.new")}}const pn=new Md;A.VType=void 0,function(a){a.BOOL="bool",a.INT="int",a.FLOAT="float",a.ARRAY="array",a.BOX="box",a.CHART_POINT="chart.point",a.COLOR="color",a.CONST="const",a.LABEL="label",a.LINE="line",a.LINEFILL="linefill",a.MAP="map",a.MATRIX="matrix",a.POLYLINE="polyline",a.SERIES="series",a.SIMPLE="simple",a.STRING="string",a.TABLE="table",a.UNDETERMINED="undetermined type",a.INPUT="input",a.NA="na",a.VOID="void",a.ENUM="enum"}(A.VType||(A.VType={})),A.VRuleType=void 0,function(a){a.FlowStmt="FlowStmt",a.DeclareAssign="DeclareAssign",a.VarBlockStmt="VarBlockStmt",a.VarSingle="VarSingle",a.VarMultiple="VarMultiple",a.ParenthesizedExpression="ParenthesizedExpression",a.AdditiveExpression="AdditiveExpression",a.RelationalExpression="RelationalExpression",a.EqualityExpression="EqualityExpression",a.TernaryExpression="TernaryExpression",a.UnaryExpression="UnaryExpression",a.NotExpression="NotExpression",a.MemberIndexExpression="MemberIndexExpression",a.MethodExpression="MethodExpression",a.LogicalAndExpression="LogicalAndExpression",a.LogicalOrExpression="LogicalOrExpression",a.MultiplicativeExpression="MultiplicativeExpression",a.Brackethesized="Brackethesized",a.IfStatement="IfStatement",a.ForToStatement="ForToStatement",a.ForInStatement="ForInStatement",a.SwitchStatement="SwitchStatement",a.CaseClause="CaseClause",a.DefaultCaluse="DefaultCaluse",a.WhileStatement="WhileStatement",a.ImportElement="ImportElement",a.Literal="Literal",a.ArrowFunction="ArrowFunction",a.ArrowMethod="ArrowMethod",a.TypeStatement="TypeStatement",a.Name="Name",a.AgainAssign="AgainAssign",a.EnumStatement="EnumStatement"}(A.VRuleType||(A.VRuleType={})),A.VAdjustment=void 0,function(a){a.dividends="dividends",a.none="none",a.splits="splits"}(A.VAdjustment||(A.VAdjustment={})),A.VAlert=void 0,function(a){a.freqAll="freq_all",a.freqOncePerBar="freq_once_per_bar",a.freqOncePerBarClose="freq_once_per_bar_close"}(A.VAlert||(A.VAlert={})),A.VBarmergeGaps=void 0,function(a){a.gapsOff="gaps_off",a.gapsOn="gaps_on",a.lookaheadOff="lookahead_off",a.lookaheadOn="lookahead_on"}(A.VBarmergeGaps||(A.VBarmergeGaps={})),A.VPlotDisplay=void 0,function(a){a.all="all",a.dataWindow="data_window",a.none="none",a.pane="pane",a.priceScale="price_scale",a.statusLine="status_line"}(A.VPlotDisplay||(A.VPlotDisplay={})),A.VExtend=void 0,function(a){a.both="both",a.left="left",a.none="none",a.right="right"}(A.VExtend||(A.VExtend={})),A.VFormatType=void 0,function(a){a.inherit="inherit",a.mintick="mintick",a.percent="percent",a.price="price",a.volume="volume"}(A.VFormatType||(A.VFormatType={})),A.VHlineStyle=void 0,function(a){a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(A.VHlineStyle||(A.VHlineStyle={})),A.VLabelStyle=void 0,function(a){a.styleArrowdown="style_arrowdown",a.styleArrowup="style_arrowup",a.styleCircle="style_circle",a.styleCross="style_cross",a.styleDiamond="style_diamond",a.styleFlag="style_flag",a.styleLabelCenter="style_label_center",a.styleLabelDown="style_label_down",a.styleLabelLeft="style_label_left",a.styleLabelLowerLeft="style_label_lower_left",a.styleLabelLowerRight="style_label_lower_right",a.styleLabelRight="style_label_right",a.styleLabelUp="style_label_up",a.styleLabelUpperLeft="style_label_upper_left",a.styleLabelUpperRight="style_label_upper_right",a.styleNone="style_none",a.styleSquare="style_square",a.styleTextOutline="style_text_outline",a.styleTriangledown="style_triangledown",a.styleTriangleup="style_triangleup",a.styleXcross="style_xcross"}(A.VLabelStyle||(A.VLabelStyle={})),A.VLineStyle=void 0,function(a){a.styleArrowBoth="style_arrow_both",a.styleArrowLeft="style_arrow_left",a.styleArrowRight="style_arrow_right",a.styleDashed="style_dashed",a.styleDotted="style_dotted",a.styleSolid="style_solid"}(A.VLineStyle||(A.VLineStyle={})),A.VLocation=void 0,function(a){a.abovebar="abovebar",a.absolute="absolute",a.belowbar="belowbar",a.bottom="bottom",a.top="top"}(A.VLocation||(A.VLocation={})),A.VSortOrder=void 0,function(a){a.ascending="ascending",a.descending="descending"}(A.VSortOrder||(A.VSortOrder={})),A.VPlotStyle=void 0,function(a){a.styleArea="Area",a.styleAreabr="Area With Breaks",a.styleCircles="Circles",a.styleColumns="Columns",a.styleCross="Cross",a.styleHistogram="Histogram",a.styleLine="Line",a.styleLinebr="Line With Breaks",a.styleStepline="Step Line",a.styleSteplineDiamond="Step Line With Diamonds",a.styleSteplinebr="Step line with Breaks"}(A.VPlotStyle||(A.VPlotStyle={})),A.VPosition=void 0,function(a){a.bottomCenter="bottom_center",a.bottomLeft="bottom_left",a.bottomRight="bottom_right",a.middleCenter="middle_center",a.middleLeft="middle_left",a.middleRight="middle_right",a.topCenter="top_center",a.topLeft="top_left",a.topRight="top_right"}(A.VPosition||(A.VPosition={})),A.VScale=void 0,function(a){a.left="left",a.none="none",a.right="right"}(A.VScale||(A.VScale={})),A.VSession=void 0,function(a){a.extended="extended",a.regular="regular"}(A.VSession||(A.VSession={})),A.VShape=void 0,function(a){a.arrowdown="arrowdown",a.arrowup="arrowup",a.circle="circle",a.cross="cross",a.diamond="diamond",a.flag="flag",a.labeldown="labeldown",a.labelup="labelup",a.square="square",a.triangledown="triangledown",a.triangleup="triangleup",a.xcross="xcross"}(A.VShape||(A.VShape={})),A.VSize=void 0,function(a){a.auto="auto",a.huge="huge",a.large="large",a.normal="normal",a.small="small",a.tiny="tiny"}(A.VSize||(A.VSize={})),A.VFont=void 0,function(a){a.familyDefault="default",a.familyMonospace="monospace"}(A.VFont||(A.VFont={})),A.VStrategy=void 0,function(a){a.cash="cash",a.fixed="fixed",a.percentOfEquity="percent_of_equity"}(A.VStrategy||(A.VStrategy={})),A.VCommission=void 0,function(a){a.cashPerContract="cash_per_contract",a.cashPerOrder="cash_per_order",a.percent="percent"}(A.VCommission||(A.VCommission={})),A.VDirection=void 0,function(a){a.all="all",a.long="long",a.short="short"}(A.VDirection||(A.VDirection={})),A.VOca=void 0,function(a){a.cancel="cancel",a.none="none",a.reduce="reduce"}(A.VOca||(A.VOca={})),A.VText=void 0,function(a){a.alignBottom="align_bottom",a.alignCenter="align_center",a.alignLeft="align_left",a.alignRight="align_right",a.alignTop="align_top",a.wrapAuto="wrap_auto",a.wrapNone="wrap_none"}(A.VText||(A.VText={})),A.VXloc=void 0,function(a){a.bar_index="bar_index",a.bar_time="bar_time"}(A.VXloc||(A.VXloc={})),A.VYloc=void 0,function(a){a.abovebar="abovebar",a.belowbar="belowbar",a.price="price"}(A.VYloc||(A.VYloc={})),A.VEarnings=void 0,function(a){a.actual="actual",a.estimate="estimate",a.standardized="standardized"}(A.VEarnings||(A.VEarnings={})),A.VPivotType=void 0,function(a){a.traditional="Traditional",a.fibonacci="Fibonacci",a.woodie="Woodie",a.classic="Classic",a.dm="DM",a.camarilla="Camarilla"}(A.VPivotType||(A.VPivotType={})),A.VInputType=void 0,function(a){a.INT="int",a.BOOL="bool",a.TIME="time",a.COLOR="color",a.FLOAT="float",a.PRICE="price",a.SOURCE="source",a.STRING="string",a.SYMBOL="symbol",a.SESSION="session",a.TEXT_AREA="text_area",a.TIMEFRAME="timeframe",a.ENUM="enum"}(A.VInputType||(A.VInputType={}));var lo;(function(a){a.description="description",a.field="field",a.function="function",a.param="param",a.returns="returns",a.type="type",a.variable="variable",a.enum="enum"})(lo||(lo={})),A.VScriptType=void 0,function(a){a.library="library",a.indicator="indicator",a.strategy="strategy"}(A.VScriptType||(A.VScriptType={})),A.VType.SERIES,A.VType.SIMPLE,A.VType.INPUT,A.VType.CONST,A.VType.INT,A.VType.FLOAT,A.VType.BOOL,A.VType.COLOR,A.VType.STRING;const Pd={domReadOnly:!0,scrollBeyondLastLine:!1,readOnly:!0,minimap:{enabled:!1},scrollbar:{vertical:"hidden",horizontal:"hidden",alwaysConsumeMouseWheel:!1},contextmenu:!1},co={functions:[{name:"calcBB",desc:["Computes Bollinger Band values from an array of data."],args:[{name:"srcArray",desc:"(array<float>) The array where the queue is maintained.",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series float mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"srcArray",required:!0,allowedTypeIDs:["float[]","int[]"],displayType:"float[]"},{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],syntax:["calcBB(float[] srcArray, series int mult, series bool calculate) → [series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},isUser:!0,returnedTypes:["[series float, series float, series float]"],index:1},{name:"Scanner.new",args:[{name:"enabled",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"},{name:"ticker",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"},{name:"timeframe",required:!1,allowedTypeIDs:["series string","simple string","input string","const string"],displayType:"series string"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.new(series bool enabled, series string ticker, series string timeframe) → Scanner"]},{name:"Scanner.copy",args:[{name:"object",required:!0,allowedTypeIDs:["Scanner"],displayType:"Scanner"}],returnedTypes:["Scanner"],pos:{lineNumber:30,column:12},info:"The identifier of the object to be copied.",syntax:["Scanner.copy(Scanner object) → Scanner"]}],methods:[{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","series float","simple int","simple float","input int","input float","const int","const float"],displayType:"series float"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],desc:["Computes Bollinger Band values from an array of data."],originalName:"array.calcBB",syntax:["calcBB(series float mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:10,column:14},thisType:["float[]"],returns:["A tuple containing the basis, upper band, and lower band respectively."]},{name:"calcBB",args:[{name:"mult",required:!0,allowedTypeIDs:["series int","simple int","input int","const int"],displayType:"series int"},{name:"calculate",required:!1,allowedTypeIDs:["series bool","simple bool","input bool","const bool"],displayType:"series bool"}],originalName:"array.calcBB",syntax:["calcBB(series int mult, series bool calculate) → [series float, series float, series float]"],returnedTypes:["[series float, series float, series float]"],hasMemberIndex:!1,pos:{lineNumber:19,column:14},thisType:["float[]"],index:1},{name:"Scanner.copy",args:[],returnedTypes:["Scanner"],thisType:["Scanner"],pos:{lineNumber:30,column:12},syntax:["Scanner.copy() → Scanner"]}],types:[{fields:[{name:"enabled",type:"series bool"},{name:"ticker",type:"series string"},{name:"timeframe",type:"series string"}],name:"Scanner",pos:{lineNumber:30,column:12}}],description:"Provides a tool to quickly output a label on the chart.",codeStr:'const $name={calcBB:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_12","var")||$_var.setVarValue("mean",e+"_14_12",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_13","var")||$_var.setVarValue("dev",e+"_14_13",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_16_16")),v=a.avg(e+"_16_16"),$_var.setVarValue("mean",e+"_14_12",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_17_16")*r),s=a.stdev(e+"_17_16")*r,$_var.setVarValue("dev",e+"_14_13",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},calcBB$1:({srcArray:a,mult:r,calculate:_=!0},e)=>{let v=$_var.getVarValue("mean",e+"_14_21","var")||$_var.setVarValue("mean",e+"_14_21",$_var.na,"var"),s=$_var.getVarValue("dev",e+"_14_22","var")||$_var.setVarValue("dev",e+"_14_22",$_var.na,"var");return _&&($_var.againAssignParse(v,a.avg(e+"_25_16")),v=a.avg(e+"_25_16"),$_var.setVarValue("mean",e+"_14_21",v,"var"),$_var.againAssignParse(s,a.stdev(e+"_26_16")*r),s=a.stdev(e+"_26_16")*r,$_var.setVarValue("dev",e+"_14_22",s,"var")),[v,$_var.add(v,s),$_var.sub(v,s)]},Scanner:$_var.getTypeInstance({enabled:void 0,ticker:void 0,timeframe:void 0},[])};'};class Od{constructor(){Object.defineProperty(this,"_inlayHints",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_importCompleteLibrary",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_funcs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._inlayHints=new Map,this._importCompleteLibrary=new Map,this._funcs=new Map}get inlayHints(){return[...this._inlayHints.values()]}setEditor(n){this._editor=n}async setInlayHints(n){const{endLine:s,endColumn:o,name:c,libraryId:l,libraryName:m}=n;if(this._importCompleteLibrary.has(l)){const _=this._funcs.get(l);return((_==null?void 0:_.name)!==c||!c&&!this._inlayHints.has(l))&&(this._updateFuncNames(c||m,l),this._inlayHintsHandle(n)),this._importCompleteLibrary.get(l)}return this._importCompleteLibrary.set(l,co),this._inlayHints.set(l,{label:"载入中...",position:{column:o,lineNumber:s},paddingLeft:!0}),this.triggerInlayHints(),this._updateFuncNames(c||m,l),setTimeout(()=>{this._inlayHints.has(l)&&this._inlayHintsHandle(n)},2e3),co}deleteInlayHints(n){this._inlayHints.delete(n)}clearInlayHints(){this._inlayHints.clear()}triggerInlayHints(){this._editor&&this._editor.updateOptions({inlayHints:{fontFamily:String(Date.now())}})}_updateFuncNames(n,s){const o=this._importCompleteLibrary.get(s);if(!o)return;const c=o.functions.map(l=>`${n}.${l.name}`);this._funcs.set(s,{name:n,funcs:c}),this._updateMonarchTokens()}_setNoNameInlayHints(n){const{endLine:s,endColumn:o,libraryId:c,libraryName:l}=n;this._inlayHints.set(c,{label:`as ${l}`,position:{column:o,lineNumber:s},paddingLeft:!0})}_inlayHintsHandle(n){const{name:s,libraryId:o}=n;s?this._inlayHints.delete(o):this._setNoNameInlayHints(n),this.triggerInlayHints()}_updateMonarchTokens(){const n=[...this._funcs.values()].map(c=>c.funcs.join("|")),s=new RegExp("\\b("+n.join("|")+")(?=\\s*\\()"),o=[...Nr.tokenizer.root];o.splice(15,0,[s,"meta.function-call"]),Ie.languages.setMonarchTokensProvider(Se,{...Nr,tokenizer:{...Nr.tokenizer,root:o}})}}const Gs=new Od;function Rd(a,n,s){var K;const o={startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column},c=a.getValueInRange(o);if(/^\/\/\s*@/.test(c))return{suggestions:St.annotationSuggestions};if(s.triggerCharacter==="@")return{suggestions:[]};const l=c.match(/([\w.]+)$/)||[];if(!l.length)return{suggestions:[]};const m=(K=l[0])==null?void 0:K.match(/.*[^\w.]+([\w.]+)(?=\.)|([\w.]+)(?=\.)/),_=m?m[1]?m[1]:m[2]?m[2]:void 0:void 0,f=a.getWordUntilPosition(n),b=gr.parseCurrentInputFunc(c),h={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:f.startColumn,endColumn:f.endColumn},T=a.getValueInRange({...h,startColumn:f.endColumn,endColumn:f.endColumn+1});St.nextIsBracket=T==="(";let O=po(St.getSuggestions(_)||[],h);if(l[0]==="."&&(O=[]),b&&!_&&!/=\s*\w+$/.test(c)){const F=po(St.getArgSuggestions(b.funcName)||[],h);O=O.concat(F)}return{suggestions:O||[],dispose:()=>{}}}function Fd(a){if(a.kind!==1)return a;const{originInsertText:n}=a;return St.nextIsBracket?a.insertText=n:a.insertText=n+St.bracketsPostfix,a}function Bd(a,n){var o;const s=gr.parseLineContentFuncVar(n.column,n.lineNumber,a,n);if(s!=null&&s.libraryId)return{contents:[{value:Dd(s)}]};if((o=s==null?void 0:s.docValue)!=null&&o.length){const c=kd(s.docValue,s.index,s.isBuildIn);if(c)return{contents:[{value:c}]}}return{contents:[]}}function Ud(a,n){var T,O;const s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:1,endColumn:n.column},o=a.getValueInRange(s),c=a.findMatches(String(Sd),s,!0,!1,null,!0),l=a.findMatches(String(Ed),s,!0,!1,null,!0),m=(T=c.pop())==null?void 0:T.matches,_=(O=l.pop())==null?void 0:O.matches;let f=!1;c.length%2===0?m&&m[0]==='"'&&(f=!0):m&&!m[0]&&(f=!0);let b=!1;l.length%2===0?_&&_[0]==="'"&&(b=!0):_&&!_[0]&&(b=!0);const h=gr.parseCurrentInputFuncAndArg(o,b,f);if(h){const{funcName:K,args:F,startIndex:N}=h,H=Ld.getSignatureHelpValues(K,F,N+1,n.lineNumber);if(H)return{value:H,dispose:()=>{}}}return null}function Kd(a){let n=a.findMatches(pn.colorMatchesRegStr,!0,!0,!1,null,!0);return n=n.filter(o=>{const c=a.getValueInRange({...o.range,startColumn:0});return c.indexOf("//")===-1||c.indexOf("//")>o.range.endColumn}),pn.getDocumentColors(n)}function $d(a,n){return pn.getDocumentColorPresentations(a,n)||[]}function jd(a,n){const s=a.getModel(),o=gr.parseLineContentFuncVar(n.startColumn+1,n.startLineNumber,s);if(!o||o.isBuildIn||!o.docValue||!o.docValue[0].pos)return o!=null&&o.isBuildIn?o:void 0;const{lineNumber:c,column:l}=o.docValue[0].pos,m={startLineNumber:c,endLineNumber:c,startColumn:l,endColumn:l};a.revealRangeInCenterIfOutsideViewport(m),a.setSelection(m)}function Hd(a,n){return gr.parseLineContentFuncVar(n.column,n.lineNumber,a,n)?{uri:a.uri,range:{startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:n.column-1,endColumn:n.column-1}}:null}function po(a,n){return a.map(s=>(s.range=n,s))}function Wd(){return{hints:Gs.inlayHints,dispose:()=>{}}}var ds={},ms=lp;if(process.env.NODE_ENV==="production")ds.createRoot=ms.createRoot,ds.hydrateRoot=ms.hydrateRoot;else{var Xs=ms.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ds.createRoot=function(a,n){Xs.usingClientEntryPoint=!0;try{return ms.createRoot(a,n)}finally{Xs.usingClientEntryPoint=!1}},ds.hydrateRoot=function(a,n,s){Xs.usingClientEntryPoint=!0;try{return ms.hydrateRoot(a,n,s)}finally{Xs.usingClientEntryPoint=!1}}}var Ve;(function(a){a.added="added",a.removed="removed",a.modified="modified"})(Ve||(Ve={}));const Gd=(a,n)=>{const{close:s,retracement:o}=a,[c,l]=R.useState("modified");return R.useImperativeHandle(n,()=>({updateType(m){l(m)}})),L.jsxs("div",{className:`content-popup content-${c}-popup`,children:[L.jsx("div",{className:`triangle-popup triangle-${c}-popup`}),L.jsxs("div",{className:`header-popup header-${c}-popup`,children:[L.jsx("div",{className:"title-popup",children:"Local working changes"}),L.jsx("div",{className:"actions-popup",children:L.jsx("div",{onClick:s,"data-role":"button",className:"button-popup","data-name":"button-close-diff",children:L.jsx("span",{className:"icon-popup",role:"img",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:"12",height:"12",children:L.jsx("path",{stroke:"currentColor",strokeWidth:"1.2",d:"m1.5 1.5 9 9m0-9-9 9"})})})})})]}),L.jsx("div",{id:"diffEditorContainer",style:{height:"100%"}})]})},Xd=R.forwardRef(Gd);class Vd{constructor(n,s,o=!0){Object.defineProperty(this,"_domNode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_top",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._id=n,this._domNode=document.createElement("div"),this._domNode.style.display="none",this._domNode.style.width=o?"calc(100% - 134px)":"calc(100% - 14px)",this._domNode.style.height="200px",s==null||s.onDidScrollChange(this.scrollChangeHandler.bind(this)),ds.createRoot(this._domNode).render(L.jsx(Xd,{ref:c=>this._content=c,close:()=>this._close(),retracement:this._retracement})),this._top=0}_close(){this._domNode.style.display="none"}_retracement(){}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}show(n,s,o){var c;this._top=s,(c=this._content)==null||c.updateType(o),this._domNode.style.top=`${n}px`,this._domNode.style.display="block"}hide(){this._domNode.style.display="none"}scrollChangeHandler(n){const s=n.scrollTop;this._domNode.style.top=`${this._top-s}px`}}function nr(){}nr.prototype={diff:function(n,s){var o,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=c.callback;typeof c=="function"&&(l=c,c={}),this.options=c;var m=this;function _(k){return l?(setTimeout(function(){l(void 0,k)},0),!0):k}n=this.castInput(n),s=this.castInput(s),n=this.removeEmpty(this.tokenize(n)),s=this.removeEmpty(this.tokenize(s));var f=s.length,b=n.length,h=1,T=f+b;c.maxEditLength&&(T=Math.min(T,c.maxEditLength));var O=(o=c.timeout)!==null&&o!==void 0?o:1/0,K=Date.now()+O,F=[{oldPos:-1,lastComponent:void 0}],N=this.extractCommon(F[0],s,n,0);if(F[0].oldPos+1>=b&&N+1>=f)return _([{value:this.join(s),count:s.length}]);var H=-1/0,V=1/0;function G(){for(var k=Math.max(H,-h);k<=Math.min(V,h);k+=2){var P=void 0,S=F[k-1],U=F[k+1];S&&(F[k-1]=void 0);var te=!1;if(U){var fe=U.oldPos-k;te=U&&0<=fe&&fe<f}var le=S&&S.oldPos+1<b;if(!te&&!le){F[k]=void 0;continue}if(!le||te&&S.oldPos+1<U.oldPos?P=m.addToPath(U,!0,void 0,0):P=m.addToPath(S,void 0,!0,1),N=m.extractCommon(P,s,n,k),P.oldPos+1>=b&&N+1>=f)return _(Yd(m,P.lastComponent,s,n,m.useLongestToken));F[k]=P,P.oldPos+1>=b&&(V=Math.min(V,k-1)),N+1>=f&&(H=Math.max(H,k+1))}h++}if(l)(function k(){setTimeout(function(){if(h>T||Date.now()>K)return l();G()||k()},0)})();else for(;h<=T&&Date.now()<=K;){var B=G();if(B)return B}},addToPath:function(n,s,o,c){var l=n.lastComponent;return l&&l.added===s&&l.removed===o?{oldPos:n.oldPos+c,lastComponent:{count:l.count+1,added:s,removed:o,previousComponent:l.previousComponent}}:{oldPos:n.oldPos+c,lastComponent:{count:1,added:s,removed:o,previousComponent:l}}},extractCommon:function(n,s,o,c){for(var l=s.length,m=o.length,_=n.oldPos,f=_-c,b=0;f+1<l&&_+1<m&&this.equals(s[f+1],o[_+1]);)f++,_++,b++;return b&&(n.lastComponent={count:b,previousComponent:n.lastComponent}),n.oldPos=_,f},equals:function(n,s){return this.options.comparator?this.options.comparator(n,s):n===s||this.options.ignoreCase&&n.toLowerCase()===s.toLowerCase()},removeEmpty:function(n){for(var s=[],o=0;o<n.length;o++)n[o]&&s.push(n[o]);return s},castInput:function(n){return n},tokenize:function(n){return n.split("")},join:function(n){return n.join("")}};function Yd(a,n,s,o,c){for(var l=[],m;n;)l.push(n),m=n.previousComponent,delete n.previousComponent,n=m;l.reverse();for(var _=0,f=l.length,b=0,h=0;_<f;_++){var T=l[_];if(T.removed){if(T.value=a.join(o.slice(h,h+T.count)),h+=T.count,_&&l[_-1].added){var K=l[_-1];l[_-1]=l[_],l[_]=K}}else{if(!T.added&&c){var O=s.slice(b,b+T.count);O=O.map(function(N,H){var V=o[h+H];return V.length>N.length?V:N}),T.value=a.join(O)}else T.value=a.join(s.slice(b,b+T.count));b+=T.count,T.added||(h+=T.count)}}var F=l[f-1];return f>1&&typeof F.value=="string"&&(F.added||F.removed)&&a.equals("",F.value)&&(l[f-2].value+=F.value,l.pop()),l}var mo=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,uo=/\S/,yo=new nr;yo.equals=function(a,n){return this.options.ignoreCase&&(a=a.toLowerCase(),n=n.toLowerCase()),a===n||this.options.ignoreWhitespace&&!uo.test(a)&&!uo.test(n)},yo.tokenize=function(a){for(var n=a.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),s=0;s<n.length-1;s++)!n[s+1]&&n[s+2]&&mo.test(n[s])&&mo.test(n[s+2])&&(n[s]+=n[s+2],n.splice(s+1,2),s--);return n};var dn=new nr;dn.tokenize=function(a){this.options.stripTrailingCr&&(a=a.replace(/\r\n/g,`
|
140
|
+
`));var n=[],s=a.split(/(\n|\r\n)/);s[s.length-1]||s.pop();for(var o=0;o<s.length;o++){var c=s[o];o%2&&!this.options.newlineIsToken?n[n.length-1]+=c:(this.options.ignoreWhitespace&&(c=c.trim()),n.push(c))}return n};function Qd(a,n,s){return dn.diff(a,n,s)}var Zd=new nr;Zd.tokenize=function(a){return a.split(/(\S.+?[.!?])(?=\s+|$)/)};var Jd=new nr;Jd.tokenize=function(a){return a.split(/([{}:;,]|\s+)/)};function Vs(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(n){return typeof n}:Vs=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vs(a)}var em=Object.prototype.toString,us=new nr;us.useLongestToken=!0,us.tokenize=dn.tokenize,us.castInput=function(a){var n=this.options,s=n.undefinedReplacement,o=n.stringifyReplacer,c=o===void 0?function(l,m){return typeof m>"u"?s:m}:o;return typeof a=="string"?a:JSON.stringify(mn(a,null,null,c),c," ")},us.equals=function(a,n){return nr.prototype.equals.call(us,a.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};function mn(a,n,s,o,c){n=n||[],s=s||[],o&&(a=o(c,a));var l;for(l=0;l<n.length;l+=1)if(n[l]===a)return s[l];var m;if(em.call(a)==="[object Array]"){for(n.push(a),m=new Array(a.length),s.push(m),l=0;l<a.length;l+=1)m[l]=mn(a[l],n,s,o,c);return n.pop(),s.pop(),m}if(a&&a.toJSON&&(a=a.toJSON()),Vs(a)==="object"&&a!==null){n.push(a),m={},s.push(m);var _=[],f;for(f in a)a.hasOwnProperty(f)&&_.push(f);for(_.sort(),l=0;l<_.length;l+=1)f=_[l],m[f]=mn(a[f],n,s,o,f);n.pop(),s.pop()}else m=a;return m}var un=new nr;un.tokenize=function(a){return a.slice()},un.join=un.removeEmpty=function(a){return a};class tm{constructor(n,s,o=""){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalModel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_oldDecorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffEditor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_diffPopupWidget",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_didChangeListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onMouseDownListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=n,this._monaco=s,this._originalModel=this._monaco.editor.createModel(o,Se),this._oldDecorations=[],this._init(),this._eventListening()}_init(){var n;this._changeEvent(),this._didChangeListener=(n=this._editor.getModel())==null?void 0:n.onDidChangeContent(()=>this._changeEvent())}update(n){var s,o;if(this._originalModel=this._monaco.editor.createModel(n,Se),n!==((s=this._editor.getModel())==null?void 0:s.getValue())){this._changeEvent();return}(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[]}dispose(){var n,s,o,c;this._diffPopupWidget&&(this._diffPopupWidget.hide(),this._editor.removeOverlayWidget(this._diffPopupWidget)),(n=this._didChangeListener)==null||n.dispose(),(s=this._onMouseDownListener)==null||s.dispose(),(o=this._editor.getModel())==null||o.deltaDecorations(this._oldDecorations,[]),this._oldDecorations=[],(c=this._diffEditor)==null||c.dispose(),this._diffEditor=void 0}_changesHandle(n){let s=0,o;const c=[];let l=0;for(const m of n){const{added:_,removed:f,count:b=1,value:h}=m;_?o&&o.removed?(s=this._changeHandle(c,s,l,b,Ve.modified),l=0,o=void 0):(o&&o.added&&(s=this._changeHandle(c,s,l,o.count||1,Ve.added),l=0),o=m):f?o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Ve.modified),l=0,o=void 0):(o&&o.removed&&this._addDecorationList(c,s,Ve.removed),o=m):/^\n+$/.test(h)?o&&(o.added||o.removed)?l=b:s+=b:(o&&o.added?(s=this._changeHandle(c,s,l,o.count||1,Ve.added),l=0,o=void 0):o&&o.removed&&(this._addDecorationList(c,s,Ve.removed),o=void 0),s+=b)}return o&&o.added?s=this._changeHandle(c,s,l,o.count||1,Ve.added):o&&o.removed&&this._addDecorationList(c,s,Ve.removed),c}_changeHandle(n,s,o,c,l){for(let m=1;m<=c;m++)this._addDecorationList(n,s+m,l);return s+=c+o,s}_addDecorationList(n,s,o){n.push({range:new this._monaco.Range(s,1,s,1),options:{isWholeLine:!0,linesDecorationsClassName:`line-${o} line-decoration_${o}`}})}_changeEvent(){var c,l;const n=Qd(this._originalModel.getValue(),((c=this._editor.getModel())==null?void 0:c.getValue())||""),s=this._changesHandle(n),o=((l=this._editor.getModel())==null?void 0:l.deltaDecorations(this._oldDecorations,s))||[];this._oldDecorations=o}_eventListening(){const n=new Vd("diff.popup.widget",this._editor);this._editor.addOverlayWidget(n),this._onMouseDownListener=this._editor.onMouseDown(s=>this._onMouseDownHandle(s)),this._diffPopupWidget=n}_onMouseDownHandle(n){var m,_,f,b,h,T;const s=(m=n.target.element)==null?void 0:m.classList,o=s==null?void 0:s.contains(`line-${Ve.added}`),c=s==null?void 0:s.contains(`line-${Ve.modified}`),l=s==null?void 0:s.contains(`line-${Ve.removed}`);if(o||c||l){const O=((f=(_=n==null?void 0:n.target)==null?void 0:_.position)==null?void 0:f.lineNumber)||0,K=((b=this._editor)==null?void 0:b.getTopForLineNumber(O+1))||0,F=((h=this._editor)==null?void 0:h.getScrollTop())||0,N=o?Ve.added:c?Ve.modified:Ve.removed;(T=this._diffPopupWidget)==null||T.show(K-F,K,N),this._diffEditor||(this._diffEditor=this._createDiffEditor()),this._diffEditor.setModel({original:this._originalModel,modified:this._editor.getModel()}),this._diffEditor.revealLineInCenter(O+1)}}_createDiffEditor(){return this._monaco.editor.createDiffEditor(document.getElementById("diffEditorContainer"),{renderSideBySide:!1,quickSuggestions:!1,suggestOnTriggerCharacters:!1,hover:{enabled:!1},parameterHints:{enabled:!1}})}}class rm{constructor(n,s,o){Object.defineProperty(this,"_editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_monaco",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_decorations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_changPositionListener",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_originalScript",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onActionTrigger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_onLinkOpen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._editor=n,this._monaco=s,this._onActionTrigger=o,this._init()}addLinkOpenFunc(n){this._onLinkOpen=n}updateActionTrigger(n){this._onActionTrigger=n}setModelMarkers(n){this._monaco.editor.setModelMarkers(this._editor.getModel(),"owner",n)}addDiffDecorations(){this._decorations||(this._decorations=new tm(this._editor,this._monaco,this._originalScript))}removeDiffDecorations(){var n;(n=this._decorations)==null||n.dispose(),this._decorations=void 0}setValue(n){this._editor.setValue(n),this._editor.setScrollTop(0),this.focus()}setPosition(n){var s,o;(s=this._editor)==null||s.setPosition(n),(o=this._editor)==null||o.revealPositionInCenter(n),this.focus()}focus(){var n;(n=this._editor)==null||n.focus()}setOriginalScript(n){var s;this._originalScript=n,(s=this._decorations)==null||s.update(n)}getEditorLayout(){var o;const n=this._editor.getContentHeight(),s=(o=this._editor.getModel())==null?void 0:o.getLineCount();return{contentHeight:n,lineCount:s}}setEditorLayout(n,s){var o,c;(c=this._editor)==null||c.layout({height:n,width:s||((o=this._editor)==null?void 0:o.getContainerDomNode().clientWidth)})}_init(){this._register(),this._setOptions(),this._addCommands(),this._addActions(),this._setCursorPosition(),this._onTabSizeChange()}_onTabSizeChange(){const n=this._editor.getModel();n==null||n.onDidChangeOptions(s=>{if(s.tabSize&&!s.indentSize){const o=(n==null?void 0:n.getOptions().tabSize)||4;n==null||n.updateOptions({indentSize:o})}})}_setCursorPosition(){const n=localStorage.getItem(nn);this._editor.setPosition(n?JSON.parse(n):{lineNumber:1,column:1}),this._editor.focus()}_register(){this._monaco.languages.register({id:Se}),this._monaco.languages.registerCompletionItemProvider(Se,{triggerCharacters:[".","@"],provideCompletionItems:Rd,resolveCompletionItem:Fd}),this._monaco.languages.registerHoverProvider(Se,{provideHover:Bd}),this._monaco.languages.registerSignatureHelpProvider(Se,{signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:Ud}),this._monaco.languages.registerColorProvider(Se,{provideColorPresentations:$d,provideDocumentColors:Kd}),this._monaco.editor.registerEditorOpener({openCodeEditor:(n,s,o)=>{const c=jd(n,o);if(c){const{index:l,docValue:m}=c,{title:_,name:f}=m[l];let b="";switch(_){case ge.keywords:b="kw";break;case ge.functions:b="fun";break;case ge.variables:b="var";break;case ge.types:b="type";break;case ge.constants:b="const";break}this._onLinkOpen&&this._onLinkOpen(`${b}_${f}`,l)}return!0}}),this._monaco.editor.registerLinkOpener({open:n=>(this._onLinkOpen&&n.fragment&&this._onLinkOpen(n.fragment),!!n.fragment)}),this._monaco.languages.registerDefinitionProvider(Se,{provideDefinition:Hd}),this._monaco.languages.registerInlayHintsProvider(Se,{provideInlayHints:Wd})}_setOptions(){this._monaco.editor.defineTheme("vs-dark",cn),this._monaco.editor.defineTheme("vs",ln),this._monaco.languages.setMonarchTokensProvider(Se,Nr),this._monaco.languages.setLanguageConfiguration(Se,on)}_addCommands(){this._monaco.editor.addCommand({id:"tcc.editor.function",run:(n,s)=>{var o;if(St.nextIsBracket){const c=this._editor.getPosition();c&&this._editor.setPosition(Object.assign(c,{column:c.column+1}))}(o=this._editor.getAction(s))==null||o.run()}})}_addActions(){this._editor.addAction({id:"tcc-save-script",label:"保存脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyS],contextMenuGroupId:"9_modification",contextMenuOrder:1,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.Save)}}),this._editor.addAction({id:"tcc-find-replace-line",label:"寻找/替换",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyF],contextMenuGroupId:"9_cutcopypaste",contextMenuOrder:5,run:()=>{this.openFind(),this._onActionTrigger&&this._onActionTrigger(A.Actions.Find)}}),this._editor.addAction({id:"tcc-trigger-console-script",label:"切换控制台",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Backquote],contextMenuGroupId:"z_commands",contextMenuOrder:0,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.TriggerConsole)}}),this._editor.addAction({id:"tcc-run-script",label:"运行脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.Enter],run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.RunScript)}}),this._editor.addAction({id:"tcc-open-script",label:"打开脚本",keybindings:[this._monaco.KeyMod.CtrlCmd|this._monaco.KeyCode.KeyO],contextMenuGroupId:"9_modification",contextMenuOrder:2,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.Open)}}),this._editor.addAction({id:"tcc-new-window-script",label:"在新窗口中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyW],contextMenuGroupId:"9_modification",contextMenuOrder:3,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.NewWindow)}}),this._editor.addAction({id:"tcc-new-tab-script",label:"在新标签页中打开",keybindings:[this._monaco.KeyMod.Shift|this._monaco.KeyMod.Alt|this._monaco.KeyCode.KeyT],contextMenuGroupId:"9_modification",contextMenuOrder:4,run:()=>{this._onActionTrigger&&this._onActionTrigger(A.Actions.NewTab)}})}openFind(){this.focus(),this._editor.trigger("click","actions.find",null)}gotoLine(){this.focus(),this._editor.trigger("click","editor.action.gotoLine",null)}onChangeCursorPosition(n){this._changPositionListener&&this._changPositionListener.dispose();const s=localStorage.getItem(nn);n&&n(s?JSON.parse(s):{lineNumber:1,column:1}),this._changPositionListener=this._editor.onDidChangeCursorPosition(o=>{localStorage.setItem(nn,JSON.stringify(o.position)),n&&n(o.position)})}}/**
|
141
141
|
* @license
|
142
142
|
* Copyright 2019 Google LLC
|
143
143
|
* SPDX-License-Identifier: Apache-2.0
|
144
|
-
*/const _o=Symbol("Comlink.proxy"),sm=Symbol("Comlink.endpoint"),am=Symbol("Comlink.releaseProxy"),yn=Symbol("Comlink.finalizer"),Ys=Symbol("Comlink.thrown"),fo=a=>typeof a=="object"&&a!==null||typeof a=="function",nm={canHandle:a=>fo(a)&&a[_o],serialize(a){const{port1:n,port2:s}=new MessageChannel;return bo(a,n),[s,[s]]},deserialize(a){return a.start(),_n(a)}},im={canHandle:a=>fo(a)&&Ys in a,serialize({value:a}){let n;return a instanceof Error?n={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:n={isError:!1,value:a},[n,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},go=new Map([["proxy",nm],["throw",im]]);function om(a,n){for(const s of a)if(n===s||s==="*"||s instanceof RegExp&&s.test(n))return!0;return!1}function bo(a,n=globalThis,s=["*"]){n.addEventListener("message",function o(c){if(!c||!c.data)return;if(!om(s,c.origin)){console.warn(`Invalid origin '${c.origin}' for comlink proxy`);return}const{id:l,type:m,path:_}=Object.assign({path:[]},c.data),f=(c.data.argumentList||[]).map(br);let b;try{const h=_.slice(0,-1).reduce((O,K)=>O[K],a),T=_.reduce((O,K)=>O[K],a);switch(m){case"GET":b=T;break;case"SET":h[_.slice(-1)[0]]=br(c.data.value),b=!0;break;case"APPLY":b=T.apply(h,f);break;case"CONSTRUCT":{const O=new T(...f);b=gn(O)}break;case"ENDPOINT":{const{port1:O,port2:K}=new MessageChannel;bo(a,K),b=mm(O,[O])}break;case"RELEASE":b=void 0;break;default:return}}catch(h){b={value:h,[Ys]:0}}Promise.resolve(b).catch(h=>({value:h,[Ys]:0})).then(h=>{const[T,O]=ea(h);n.postMessage(Object.assign(Object.assign({},T),{id:l}),O),m==="RELEASE"&&(n.removeEventListener("message",o),xo(n),yn in a&&typeof a[yn]=="function"&&a[yn]())}).catch(h=>{const[T,O]=ea({value:new TypeError("Unserializable return value"),[Ys]:0});n.postMessage(Object.assign(Object.assign({},T),{id:l}),O)})}),n.start&&n.start()}function lm(a){return a.constructor.name==="MessagePort"}function xo(a){lm(a)&&a.close()}function _n(a,n){return fn(a,[],n)}function Qs(a){if(a)throw new Error("Proxy has been released and is not useable")}function ho(a){return Lr(a,{type:"RELEASE"}).then(()=>{xo(a)})}const Zs=new WeakMap,Js="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const n=(Zs.get(a)||0)-1;Zs.set(a,n),n===0&&ho(a)});function cm(a,n){const s=(Zs.get(n)||0)+1;Zs.set(n,s),Js&&Js.register(a,n,a)}function pm(a){Js&&Js.unregister(a)}function fn(a,n=[],s=function(){}){let o=!1;const c=new Proxy(s,{get(l,m){if(Qs(o),m===am)return()=>{pm(c),ho(a),o=!0};if(m==="then"){if(n.length===0)return{then:()=>c};const _=Lr(a,{type:"GET",path:n.map(f=>f.toString())}).then(br);return _.then.bind(_)}return fn(a,[...n,m])},set(l,m,_){Qs(o);const[f,b]=ea(_);return Lr(a,{type:"SET",path:[...n,m].map(h=>h.toString()),value:f},b).then(br)},apply(l,m,_){Qs(o);const f=n[n.length-1];if(f===sm)return Lr(a,{type:"ENDPOINT"}).then(br);if(f==="bind")return fn(a,n.slice(0,-1));const[b,h]=wo(_);return Lr(a,{type:"APPLY",path:n.map(T=>T.toString()),argumentList:b},h).then(br)},construct(l,m){Qs(o);const[_,f]=wo(m);return Lr(a,{type:"CONSTRUCT",path:n.map(b=>b.toString()),argumentList:_},f).then(br)}});return cm(c,a),c}function dm(a){return Array.prototype.concat.apply([],a)}function wo(a){const n=a.map(ea);return[n.map(s=>s[0]),dm(n.map(s=>s[1]))]}const vo=new WeakMap;function mm(a,n){return vo.set(a,n),a}function gn(a){return Object.assign(a,{[_o]:!0})}function ea(a){for(const[n,s]of go)if(s.canHandle(a)){const[o,c]=s.serialize(a);return[{type:"HANDLER",name:n,value:o},c]}return[{type:"RAW",value:a},vo.get(a)||[]]}function br(a){switch(a.type){case"HANDLER":return go.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Lr(a,n,s){return new Promise(o=>{const c=um();a.addEventListener("message",function l(m){!m.data||!m.data.id||m.data.id!==c||(a.removeEventListener("message",l),o(m.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:c},n),s)})}function um(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const To=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-
|
144
|
+
*/const _o=Symbol("Comlink.proxy"),sm=Symbol("Comlink.endpoint"),am=Symbol("Comlink.releaseProxy"),yn=Symbol("Comlink.finalizer"),Ys=Symbol("Comlink.thrown"),fo=a=>typeof a=="object"&&a!==null||typeof a=="function",nm={canHandle:a=>fo(a)&&a[_o],serialize(a){const{port1:n,port2:s}=new MessageChannel;return bo(a,n),[s,[s]]},deserialize(a){return a.start(),_n(a)}},im={canHandle:a=>fo(a)&&Ys in a,serialize({value:a}){let n;return a instanceof Error?n={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:n={isError:!1,value:a},[n,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},go=new Map([["proxy",nm],["throw",im]]);function om(a,n){for(const s of a)if(n===s||s==="*"||s instanceof RegExp&&s.test(n))return!0;return!1}function bo(a,n=globalThis,s=["*"]){n.addEventListener("message",function o(c){if(!c||!c.data)return;if(!om(s,c.origin)){console.warn(`Invalid origin '${c.origin}' for comlink proxy`);return}const{id:l,type:m,path:_}=Object.assign({path:[]},c.data),f=(c.data.argumentList||[]).map(br);let b;try{const h=_.slice(0,-1).reduce((O,K)=>O[K],a),T=_.reduce((O,K)=>O[K],a);switch(m){case"GET":b=T;break;case"SET":h[_.slice(-1)[0]]=br(c.data.value),b=!0;break;case"APPLY":b=T.apply(h,f);break;case"CONSTRUCT":{const O=new T(...f);b=gn(O)}break;case"ENDPOINT":{const{port1:O,port2:K}=new MessageChannel;bo(a,K),b=mm(O,[O])}break;case"RELEASE":b=void 0;break;default:return}}catch(h){b={value:h,[Ys]:0}}Promise.resolve(b).catch(h=>({value:h,[Ys]:0})).then(h=>{const[T,O]=ea(h);n.postMessage(Object.assign(Object.assign({},T),{id:l}),O),m==="RELEASE"&&(n.removeEventListener("message",o),xo(n),yn in a&&typeof a[yn]=="function"&&a[yn]())}).catch(h=>{const[T,O]=ea({value:new TypeError("Unserializable return value"),[Ys]:0});n.postMessage(Object.assign(Object.assign({},T),{id:l}),O)})}),n.start&&n.start()}function lm(a){return a.constructor.name==="MessagePort"}function xo(a){lm(a)&&a.close()}function _n(a,n){return fn(a,[],n)}function Qs(a){if(a)throw new Error("Proxy has been released and is not useable")}function ho(a){return Lr(a,{type:"RELEASE"}).then(()=>{xo(a)})}const Zs=new WeakMap,Js="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const n=(Zs.get(a)||0)-1;Zs.set(a,n),n===0&&ho(a)});function cm(a,n){const s=(Zs.get(n)||0)+1;Zs.set(n,s),Js&&Js.register(a,n,a)}function pm(a){Js&&Js.unregister(a)}function fn(a,n=[],s=function(){}){let o=!1;const c=new Proxy(s,{get(l,m){if(Qs(o),m===am)return()=>{pm(c),ho(a),o=!0};if(m==="then"){if(n.length===0)return{then:()=>c};const _=Lr(a,{type:"GET",path:n.map(f=>f.toString())}).then(br);return _.then.bind(_)}return fn(a,[...n,m])},set(l,m,_){Qs(o);const[f,b]=ea(_);return Lr(a,{type:"SET",path:[...n,m].map(h=>h.toString()),value:f},b).then(br)},apply(l,m,_){Qs(o);const f=n[n.length-1];if(f===sm)return Lr(a,{type:"ENDPOINT"}).then(br);if(f==="bind")return fn(a,n.slice(0,-1));const[b,h]=wo(_);return Lr(a,{type:"APPLY",path:n.map(T=>T.toString()),argumentList:b},h).then(br)},construct(l,m){Qs(o);const[_,f]=wo(m);return Lr(a,{type:"CONSTRUCT",path:n.map(b=>b.toString()),argumentList:_},f).then(br)}});return cm(c,a),c}function dm(a){return Array.prototype.concat.apply([],a)}function wo(a){const n=a.map(ea);return[n.map(s=>s[0]),dm(n.map(s=>s[1]))]}const vo=new WeakMap;function mm(a,n){return vo.set(a,n),a}function gn(a){return Object.assign(a,{[_o]:!0})}function ea(a){for(const[n,s]of go)if(s.canHandle(a)){const[o,c]=s.serialize(a);return[{type:"HANDLER",name:n,value:o},c]}return[{type:"RAW",value:a},vo.get(a)||[]]}function br(a){switch(a.type){case"HANDLER":return go.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Lr(a,n,s){return new Promise(o=>{const c=um();a.addEventListener("message",function l(m){!m.data||!m.data.id||m.data.id!==c||(a.removeEventListener("message",l),o(m.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:c},n),s)})}function um(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const To=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-gOaiI2Kb.js").href:new URL("assets/scriptsRunWorker-gOaiI2Kb.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Run TccScript Server"});To.onerror=a=>{console.error(a)};async function Do(a){return await Gs.setInlayHints(a)}const ko=_n(To),Io=_n(new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-CILIfaWz.js").href:new URL("assets/parserTccWorker-CILIfaWz.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Us&&Us.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Parser TccScript Server"}));async function Ao(a,n=!1){const{functions:s,types:o,constants:c,variables:l,methods:m}=ct;return await Io.parseTcc(a,n,gn(Do),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(c),variables:Object.fromEntries(l)})}async function ym(a,n){const{functions:s,types:o,constants:c,variables:l,methods:m}=ct;return await Io.parseLibraryCode(a,n,gn(Do),{functions:Object.fromEntries(s),methods:Object.fromEntries(m),types:Object.fromEntries(o),constants:Object.fromEntries(c),variables:Object.fromEntries(l)})}async function qo(a,n,s=!0){return await ko.runScript(a,n,s)}async function _m(a){return await ko.removeScript(a)}function fm(a){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-CT5Cb1wO.js").href:new URL("assets/editor.worker-CT5Cb1wO.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),{name:a==null?void 0:a.name})}self.MonacoEnvironment={getWorker(){return new fm({name:"Editor Worker"})}},sn.config({paths:{vs:"https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.45.0/min/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});let Co={};const gm=(a,n)=>{const{height:s,width:o,theme:c,options:l,hasDiff:m,readOnly:_,defaultValue:f,onChange:b,onLinkOpen:h,onDeclareConfigChange:T,onCursorPositionChange:O,onActionTrigger:K,onEditorDidMount:F}=a,N=R.useRef(null),H=R.useRef(null);R.useImperativeHandle(n,()=>({setOriginalScript(S){var U;(U=N.current)==null||U.setOriginalScript(S)},setScript(S){var U;(U=N.current)==null||U.setValue(S)},gotoLine(){var S;(S=N.current)==null||S.gotoLine()},getEditorLayout(){var S;return(S=N.current)==null?void 0:S.getEditorLayout()},setPosition(S,U){var te;(te=N.current)==null||te.setPosition({column:S,lineNumber:U})},setModelMarkers(S){var U;(U=N.current)==null||U.setModelMarkers(S)},focus(){var S;(S=N.current)==null||S.focus()}})),R.useEffect(()=>{var S,U;m?(U=N.current)==null||U.addDiffDecorations():(S=N.current)==null||S.removeDiffDecorations()},[m]),R.useEffect(()=>{var S;(S=N.current)==null||S.updateActionTrigger(K)},[K]),R.useEffect(()=>{var S;h&&((S=N.current)==null||S.addLinkOpenFunc(h))},[h]);function V(S,U){var fe,le;St.initBuiltinsTrees(),Gs.setEditor(S),N.current=new rm(S,U,K),h&&((fe=N.current)==null||fe.addLinkOpenFunc(h)),m&&((le=N.current)==null||le.addDiffDecorations()),qd(S),requestAnimationFrame(P);const te=S.getValue();N.current.onChangeCursorPosition(O),b&&b(te),!_&&G(te),F&&F()}const G=R.useCallback(async S=>{var $e;const U=Date.now(),{errors:te,functions:fe,methods:le,types:ht,variables:Et,overloadsFuncs:Ue,imports:Ke,preParserCode:Y,enums:be}=await Ao(S),Ee=new Map(Object.entries(fe)),Me=new Map(Object.entries(le)),pt=new Map(Object.entries(ht)),wt=new Map(Object.entries(Et)),re=new Map(Object.entries(Ke)),xe=new Map(Object.entries(be));gr.setUserDefined({functions:Ee,methods:Me,types:pt,variables:wt,imports:re,enums:xe},Ue),St.setUserDefind(Ee,pt,wt,Me,xe);const Re=te.map(je=>({...je,severity:je.type||Ie.MarkerSeverity.Error}));if(_)return;try{if(!te.length&&Y){const je=await qo(Y,{isPreParser:!0});io.isEqual(je,Co)||(Co=je,T&&T(je))}}catch(je){console.log(je),te.push({message:je.message,startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:0})}($e=N.current)==null||$e.setModelMarkers(Re);const Nt=Date.now();console.log((Nt-U)/1e3)},[T,_]),B=R.useMemo(()=>io.debounce(G,1500),[G]);function k(S){var U;if(_){G(S||"");return}Gs.clearInlayHints(),(U=N.current)==null||U.setModelMarkers([]),S!==void 0&&(b&&b(S),B(S))}const P=R.useCallback(()=>{var U,te;const S=(U=H.current)==null?void 0:U.getBoundingClientRect();(te=N.current)==null||te.setEditorLayout((S==null?void 0:S.height)||0,S==null?void 0:S.width)},[]);return R.useEffect(()=>{const S=()=>{window.requestAnimationFrame(P)},U=new ResizeObserver(S);return H.current&&U.observe(H.current),()=>{H.current&&U.unobserve(H.current),U.disconnect()}},[]),L.jsx("div",{ref:H,children:L.jsx(gd,{height:s,width:o||"100%",defaultLanguage:Se,defaultValue:f||`indicator("我的脚本")
|
145
145
|
plot(close)
|
146
|
-
`,theme:c||"vs-dark",className:`tvue-script ${c||"vs-dark"}`,options:{colorDecorators:!0,useShadowDOM:!1,matchOnWordStartOnly:!0,automaticLayout:!1,suggest:{filterGraceful:!0},fontSize:13,..._?Pd:{},readOnlyMessage:{value:"该脚本是只读的。它无法被编辑。"},...l},onMount:V,onChange:k})})},bm=R.forwardRef(gm),xm=a=>{const{theme:n,modified:s,original:o,height:c,width:l,renderSideBySide:m=!0}=a,_=R.useCallback((f,b)=>{b.languages.register({id:Se}),b.editor.defineTheme("vs-dark",cn),b.editor.defineTheme("vs",ln),b.languages.setMonarchTokensProvider(Se,
|
147
|
-
`),F.examples=await Ie.editor.colorize(F.originalExample,Se,{tabSize:4})),T){F.detailedDesc=[];for(const
|
148
|
-
`),B=await Ie.editor.colorize(k,Se,{tabSize:4})),F.detailedDesc.push({desc:G,examples:B,originalExample:k})}}return K&&(F.returns=K.map(
|
149
|
-
`)).includes(a)){s.push(B);break}if(F){let k=!1;for(const P of F)if(P.includes(a)){s.push(B),k=!0;break}if(k)break}if(
|
146
|
+
`,theme:c||"vs-dark",className:`tvue-script ${c||"vs-dark"}`,options:{colorDecorators:!0,useShadowDOM:!1,matchOnWordStartOnly:!0,automaticLayout:!1,suggest:{filterGraceful:!0},fontSize:13,..._?Pd:{},readOnlyMessage:{value:"该脚本是只读的。它无法被编辑。"},...l},onMount:V,onChange:k})})},bm=R.forwardRef(gm),xm=a=>{const{theme:n,modified:s,original:o,height:c,width:l,renderSideBySide:m=!0}=a,_=R.useCallback((f,b)=>{b.languages.register({id:Se}),b.editor.defineTheme("vs-dark",cn),b.editor.defineTheme("vs",ln),b.languages.setMonarchTokensProvider(Se,Nr),b.languages.setLanguageConfiguration(Se,on)},[]);return L.jsx(md,{height:c||"90vh",width:l||"100%",theme:n||"vs-dark",options:{readOnly:!0,renderSideBySide:m,scrollBeyondLastLine:!1},language:Se,modified:s,original:o,onMount:_})};A.VMarkerSeverity=void 0,function(a){a[a.Hint=1]="Hint",a[a.Info=2]="Info",a[a.Warning=4]="Warning",a[a.Error=8]="Error"}(A.VMarkerSeverity||(A.VMarkerSeverity={}));var ta={},hm=function(){var a=document.getSelection();if(!a.rangeCount)return function(){};for(var n=document.activeElement,s=[],o=0;o<a.rangeCount;o++)s.push(a.getRangeAt(o));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null;break}return a.removeAllRanges(),function(){a.type==="Caret"&&a.removeAllRanges(),a.rangeCount||s.forEach(function(c){a.addRange(c)}),n&&n.focus()}},wm=hm,zo={"text/plain":"Text","text/html":"Url",default:"Text"},vm="Copy to clipboard: #{key}, Enter";function Tm(a){var n=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,n)}function Dm(a,n){var s,o,c,l,m,_,f=!1;n||(n={}),s=n.debug||!1;try{c=wm(),l=document.createRange(),m=document.getSelection(),_=document.createElement("span"),_.textContent=a,_.ariaHidden="true",_.style.all="unset",_.style.position="fixed",_.style.top=0,_.style.clip="rect(0, 0, 0, 0)",_.style.whiteSpace="pre",_.style.webkitUserSelect="text",_.style.MozUserSelect="text",_.style.msUserSelect="text",_.style.userSelect="text",_.addEventListener("copy",function(h){if(h.stopPropagation(),n.format)if(h.preventDefault(),typeof h.clipboardData>"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var T=zo[n.format]||zo.default;window.clipboardData.setData(T,a)}else h.clipboardData.clearData(),h.clipboardData.setData(n.format,a);n.onCopy&&(h.preventDefault(),n.onCopy(h.clipboardData))}),document.body.appendChild(_),l.selectNodeContents(_),m.addRange(l);var b=document.execCommand("copy");if(!b)throw new Error("copy command was unsuccessful");f=!0}catch(h){s&&console.error("unable to copy using execCommand: ",h),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",a),n.onCopy&&n.onCopy(window.clipboardData),f=!0}catch(T){s&&console.error("unable to copy using clipboardData: ",T),s&&console.error("falling back to prompt"),o=Tm("message"in n?n.message:vm),window.prompt(o,a)}}finally{m&&(typeof m.removeRange=="function"?m.removeRange(l):m.removeAllRanges()),_&&document.body.removeChild(_),c()}return f}var km=Dm;function bn(a){"@babel/helpers - typeof";return bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bn(a)}Object.defineProperty(ta,"__esModule",{value:!0}),ta.CopyToClipboard=void 0;var ra=So(R),Im=So(km),Am=["text","onCopy","options","children"];function So(a){return a&&a.__esModule?a:{default:a}}function Eo(a,n){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(a);n&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),s.push.apply(s,o)}return s}function No(a){for(var n=1;n<arguments.length;n++){var s=arguments[n]!=null?arguments[n]:{};n%2?Eo(Object(s),!0).forEach(function(o){hn(a,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(s)):Eo(Object(s)).forEach(function(o){Object.defineProperty(a,o,Object.getOwnPropertyDescriptor(s,o))})}return a}function qm(a,n){if(a==null)return{};var s=Cm(a,n),o,c;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(c=0;c<l.length;c++)o=l[c],!(n.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(a,o)&&(s[o]=a[o])}return s}function Cm(a,n){if(a==null)return{};var s={},o=Object.keys(a),c,l;for(l=0;l<o.length;l++)c=o[l],!(n.indexOf(c)>=0)&&(s[c]=a[c]);return s}function zm(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Lo(a,n){for(var s=0;s<n.length;s++){var o=n[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(a,o.key,o)}}function Sm(a,n,s){return n&&Lo(a.prototype,n),s&&Lo(a,s),Object.defineProperty(a,"prototype",{writable:!1}),a}function Em(a,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(n&&n.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),n&&xn(a,n)}function xn(a,n){return xn=Object.setPrototypeOf||function(o,c){return o.__proto__=c,o},xn(a,n)}function Nm(a){var n=Mm();return function(){var o=sa(a),c;if(n){var l=sa(this).constructor;c=Reflect.construct(o,arguments,l)}else c=o.apply(this,arguments);return Lm(this,c)}}function Lm(a,n){if(n&&(bn(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mo(a)}function Mo(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Mm(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sa(a){return sa=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},sa(a)}function hn(a,n,s){return n in a?Object.defineProperty(a,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[n]=s,a}var Po=function(a){Em(s,a);var n=Nm(s);function s(){var o;zm(this,s);for(var c=arguments.length,l=new Array(c),m=0;m<c;m++)l[m]=arguments[m];return o=n.call.apply(n,[this].concat(l)),hn(Mo(o),"onClick",function(_){var f=o.props,b=f.text,h=f.onCopy,T=f.children,O=f.options,K=ra.default.Children.only(T),F=(0,Im.default)(b,O);h&&h(b,F),K&&K.props&&typeof K.props.onClick=="function"&&K.props.onClick(_)}),o}return Sm(s,[{key:"render",value:function(){var c=this.props;c.text,c.onCopy,c.options;var l=c.children,m=qm(c,Am),_=ra.default.Children.only(l);return ra.default.cloneElement(_,No(No({},m),{},{onClick:this.onClick}))}}]),s}(ra.default.PureComponent);ta.CopyToClipboard=Po,hn(Po,"defaultProps",{onCopy:void 0,options:void 0});var Pm=ta,wn=Pm.CopyToClipboard;wn.CopyToClipboard=wn;var Om=wn;const vn=cp(Om);async function Rm(a,n=0){const s=a[n];if(!s)return;const{name:o,args:c,type:l,desc:m,examples:_,remarks:f,seeAlso:b,syntax:h,detailedDesc:T,fields:O,returns:K}=s,F={name:o};if(a.length>1&&(F.overloads=`${a.length} overloads`),l&&(F.type=l),c&&(F.name=`${o}()`,F.args=c.map(N=>{const{name:H,desc:V,displayType:G}=N;return{label:`${H} (${G})`,desc:V&&xr(V)}})),m&&(F.desc=m.map(N=>xr(N))),_&&(F.originalExample=_.join(`
|
147
|
+
`),F.examples=await Ie.editor.colorize(F.originalExample,Se,{tabSize:4})),T){F.detailedDesc=[];for(const N of T){const{desc:H,examples:V}=N;let G=H.map(P=>xr(P)),B,k;V&&(k=V.join(`
|
148
|
+
`),B=await Ie.editor.colorize(k,Se,{tabSize:4})),F.detailedDesc.push({desc:G,examples:B,originalExample:k})}}return K&&(F.returns=K.map(N=>xr(N))),f&&(F.remarks=typeof f=="string"?[xr(f)]:f.map(N=>xr(N))),h&&(F.syntax=a.map(N=>{var H;return(H=N.syntax)==null?void 0:H[0]})),O&&(F.fields=O.map(N=>{const{name:H,desc:V,type:G}=N;return{label:`${H} (${G})`,desc:V&&xr(V)}})),b&&(F.seeAlso=b.map(N=>Fm(N))),F}function Fm(a){const s=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g.exec(a);if(s){const[o,c,l]=s;return{name:c,link:l}}}function xr(a){const n=/\*\*([^\*]+)\*\*/g,s=/\`([^\`]+)\`/g,o=/\[([^\[\]]+)\]\(([^\(\)]+)\)/g;return a.replace(n,(c,l)=>`<strong>${l}</strong>`).replace(s,(c,l)=>`<code>${l}</code>`).replace(o,(c,l,m)=>`<a ${m.startsWith("#")?`data-name="${l}"`:'target="_blank"'} class="manual-content-text-link" href="${m}">${l}</a>`)}function Bm(a){var o;const n=[],s=[];for(const c of ps){for(let l of no[c.key].sort()){if(ao.includes(l))continue;let m=l;c.prefix==="fun"&&(m=`${l}()`),m.includes(a)&&(m.startsWith(a)?n.unshift({label:m,group:c,key:`${c.prefix}_${l}`}):n.push({label:m,group:c,key:`${c.prefix}_${l}`}))}for(const[l,m]of ct[c.key])for(const _ of m){const{name:f,args:b,type:h,desc:T,examples:O,remarks:K,seeAlso:F,syntax:N,detailedDesc:H,fields:V,returns:G}=_,B={label:f,group:c,key:`${c.prefix}_${f}`};if(c.prefix==="fun"&&(B.label=`${f}()`),B.label.includes(a))break;if(b){let k=!1;for(const P of b){const{name:S,desc:U,displayType:te}=P;if(S.includes(a)||U!=null&&U.includes(a)||te!=null&&te.includes(a)){s.push(B),k=!0;break}}if(k)break}if(h&&h.includes(a)){s.push(B);break}if(T){let k=!1;for(const P of T)if(P.includes(a)){s.push(B),k=!0;break}if(k)break}if(O){let k=!1;for(const P of O)if(P.includes(a)){s.push(B),k=!0;break}if(k)break}if(K&&(typeof K=="string"?K:K.join(`
|
149
|
+
`)).includes(a)){s.push(B);break}if(F){let k=!1;for(const P of F)if(P.includes(a)){s.push(B),k=!0;break}if(k)break}if(N){let k=!1;for(const P of N)if(P.includes(a)){s.push(B),k=!0;break}if(k)break}if(H){let k=!1;for(const P of H){const{desc:S,examples:U}=P;if(S.join(`
|
150
150
|
`).includes(a)){s.push(B),k=!0;break}if((o=U==null?void 0:U.join(`
|
151
|
-
`))!=null&&o.includes(a)){s.push(B),k=!0;break}}if(k)break}if(V){let k=!1;for(const P of V){const{name:N,desc:U,type:te}=P;if(N.includes(a)||U!=null&&U.includes(a)||te!=null&&te.includes(a)){s.push(B),k=!0;break}}if(k)break}if(G){let k=!1;for(const P of G)if(P.includes(a)){s.push(B),k=!0;break}if(k)break}}}return{labelList:n,contentList:s}}const Um=a=>{var G;const{group:n,itemKey:s,onItemClick:o,currentIndex:c}=a,[l,m]=R.useState(),[_,f]=R.useState(0),[b,h]=R.useState("Copy code"),[T,O]=R.useState("Copy link");R.useEffect(()=>{K(c)},[s]);const K=B=>{const k=s.replace(`${n==null?void 0:n.prefix}_`,""),P=ct[n==null?void 0:n.key].get(k);f(B),P&&Rm(P,B).then(N=>{m(N)})},F=B=>{K(B)},E=B=>{var k,P;if(B.target.localName==="a"&&B.target.hash&&((P=(k=B.target)==null?void 0:k.dataset)!=null&&P.name)){B.preventDefault();const{hash:N}=B.target;o(N.replace("#",""))}},H=()=>{h("Copied"),setTimeout(()=>{h("Copy code")},1e3)},V=()=>{O("Link copied"),setTimeout(()=>{O("Copy link")},3e3)};return L.jsx("div",{onClick:E,id:`#${s}`,children:L.jsxs("div",{className:"manual-content-wrapper",children:[L.jsxs("div",{className:"manual-content-header",children:[L.jsxs("div",{children:[L.jsx("h3",{className:"manual-content-header-title",children:l==null?void 0:l.name}),!!(l!=null&&l.overloads)&&L.jsx("span",{className:"manual-content-header-overloads",children:l==null?void 0:l.overloads})]}),L.jsx(vn,{text:(l==null?void 0:l.name)||"",onCopy:V,children:L.jsx("div",{"data-tooltip":T,className:"manual-content-btn",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",width:"28",height:"28",children:L.jsxs("g",{fill:"currentColor",children:[L.jsx("path",{fillRule:"nonzero",d:"M15.039 5.969l-.019-.019-2.828 2.828.707.707 2.474-2.474c1.367-1.367 3.582-1.367 4.949 0s1.367 3.582 0 4.949l-2.474 2.474.707.707 2.828-2.828-.019-.019c1.415-1.767 1.304-4.352-.334-5.99-1.638-1.638-4.224-1.749-5.99-.334zM5.97 15.038l-.019-.019 2.828-2.828.707.707-2.475 2.475c-1.367 1.367-1.367 3.582 0 4.949s3.582 1.367 4.949 0l2.474-2.474.707.707-2.828 2.828-.019-.019c-1.767 1.415-4.352 1.304-5.99-.334-1.638-1.638-1.749-4.224-.334-5.99z"}),L.jsx("path",{d:"M10.485 16.141l5.656-5.656.707.707-5.656 5.656z"})]})})})})]}),(G=l==null?void 0:l.desc)==null?void 0:G.map((B,k)=>L.jsx("div",{dangerouslySetInnerHTML:{__html:B},className:"manual-content-text"},k)),(l==null?void 0:l.type)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"type"}),L.jsx("div",{className:"manual-content-text",children:l.type})]}),(l==null?void 0:l.syntax)&&L.jsxs(R.Fragment,{children:[L.jsxs("div",{className:"manual-content-sub-title",children:["Syntax ",!!(l!=null&&l.overloads)&&"& Overloads"]}),l.syntax.map((B,k)=>{var P;return(((P=l.syntax)==null?void 0:P.length)||0)>1?L.jsx("div",{onClick:()=>F(k),children:L.jsx("pre",{className:`manual-content-syntax with-overloads ${k===_?"selected":""}`,children:B})},k):L.jsx("pre",{className:"manual-content-syntax",children:B},k)})]}),(l==null?void 0:l.args)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"arguments"}),l.args.map((B,k)=>L.jsxs("div",{className:"manual-content-text",children:[L.jsx("span",{className:"manual-content-args-label",children:B.label})," ",L.jsx("span",{dangerouslySetInnerHTML:{__html:B.desc||""}})]},k))]}),(l==null?void 0:l.fields)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"fields"}),l.fields.map((B,k)=>L.jsxs("div",{className:"manual-content-text",children:[L.jsx("span",{className:"manual-content-args-label",children:B.label})," ",L.jsx("span",{dangerouslySetInnerHTML:{__html:B.desc||""}})]},k))]}),(l==null?void 0:l.examples)&&L.jsxs(R.Fragment,{children:[L.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[L.jsx("div",{children:L.jsx("span",{children:"example"})}),L.jsx(vn,{text:l.originalExample||"",onCopy:H,children:L.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:L.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),L.jsx("pre",{className:"manual-content-example",children:L.jsx("code",{dangerouslySetInnerHTML:{__html:l.examples}})})]}),(l==null?void 0:l.detailedDesc)&&l.detailedDesc.map((B,k)=>L.jsxs(R.Fragment,{children:[B.desc.map((P,N)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:P}},N)),L.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[L.jsx("div",{children:L.jsx("span",{children:"example"})}),L.jsx(vn,{text:B.originalExample||"",onCopy:H,children:L.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:L.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),L.jsx("pre",{className:"manual-content-example",children:L.jsx("code",{dangerouslySetInnerHTML:{__html:B.examples||""}})})]},k)),(l==null?void 0:l.returns)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"returns"}),l.returns.map((B,k)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:B}},k))]}),(l==null?void 0:l.remarks)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"remarks"}),l.remarks.map((B,k)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:B}},k))]}),(l==null?void 0:l.seeAlso)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"see Also"}),L.jsx("div",{className:"manual-content-see_also",children:l.seeAlso.map((B,k)=>L.jsx("a",{className:"manual-content-see_also-tag","data-name":B==null?void 0:B.name,href:B==null?void 0:B.link,children:B==null?void 0:B.name},k))})]})]})})};Ie.languages.register({id:Se}),Ie.editor.defineTheme("vs-dark",cn),Ie.editor.defineTheme("vs",ln),Ie.languages.setMonarchTokensProvider(Se,Er),Ie.languages.setLanguageConfiguration(Se,on);const Km=({theme:a="vs-dark",currentValue:n})=>{const[s,o]=R.useState(ps[0]),[c,l]=R.useState(null),[m,_]=R.useState(0),[f,b]=R.useState(""),[h,T]=R.useState("var_bar_index"),O=R.useRef(null),K=R.useRef(null),F=k=>{k.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?o({...k,isHidden:!0}):o(k)};R.useEffect(()=>{Ie.editor.setTheme(a)},[a]),R.useEffect(()=>{if(n.value){const[k]=n.value.split("_"),P=ps.find(N=>k===N.prefix);P&&(_(n.index||0),G(P,n.value))}},[n]);const E=(k,P)=>{var N;k!==h&&(P&&o(P),_(0),T(k),(N=K.current)==null||N.scrollTo({top:0}))},H=k=>{if(k.target.value.trim()==="")V();else{b(k.target.value);const P=Bm(k.target.value);l(P)}},V=()=>{b(""),l(null),setTimeout(()=>{var k,P;(P=(k=O.current)==null?void 0:k.querySelector(`a[data-href="${h}"]`))==null||P.scrollIntoView(!0)},10)},G=(k,P)=>{var N;o(k),T(P),setTimeout(()=>{var U,te;(te=(U=O.current)==null?void 0:U.querySelector(`a[data-href="${P}"]`))==null||te.scrollIntoView(!0)},10),(N=K.current)==null||N.scrollTo({top:0})},B=k=>{const P=ps.find(N=>k.startsWith(N.prefix));P&&(_(0),G(P,k))};return L.jsxs("div",{className:`${a} manual-warpper`,children:[L.jsxs("div",{className:"manual-left",children:[L.jsxs("div",{className:"manual-search",children:[L.jsx("span",{className:"manual-search-icon",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:"18px",height:"18px",children:L.jsx("path",{fillRule:"evenodd",d:"M12.5 11h-.79l-.28-.27A6.47 6.47 0 0 0 13 6.5 6.5 6.5 0 1 0 6.5 13c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L17.49 16l-4.99-5zm-6 0C4.01 11 2 8.99 2 6.5S4.01 2 6.5 2 11 4.01 11 6.5 8.99 11 6.5 11z"})})}),L.jsx("input",{onChange:H,spellCheck:"false",value:f,className:"manual-search-input",autoComplete:"off",placeholder:"Search",type:"text"}),L.jsx("span",{onClick:V,className:`manual-search-clear ${f?"":"hide"}`,children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 95.939 95.939",width:"9",height:"9",children:L.jsx("path",{d:"M62.82 47.97l32.53-32.534a2 2 0 0 0 0-2.828L83.332.586a2 2 0 0 0-2.827 0L47.97 33.12 15.435.587c-.75-.75-2.078-.75-2.828 0L.587 12.607a2 2 0 0 0 0 2.83L33.12 47.97.588 80.504a2 2 0 0 0 0 2.828l12.02 12.02a1.997 1.997 0 0 0 2.83 0L47.97 62.818l32.535 32.535a2 2 0 0 0 2.827 0l12.02-12.02c.78-.783.78-2.05 0-2.83L62.82 47.97z"})})})]}),L.jsx("div",{className:`manual-group-search-list manual-scroll ${f?"":"hide"}`,children:L.jsxs("div",{children:[c==null?void 0:c.labelList.map(k=>L.jsx("a",{onClick:P=>{P.preventDefault(),E(k.key,k.group)},className:`manual-group-body-item ${k.key===h?"manual-group-body-item-selected":""}`,"data-href":k.key,href:`#${k.key}`,children:k.label},`search_${k.key}`)),L.jsx("div",{className:"manual-content-separator"}),c==null?void 0:c.contentList.map(k=>L.jsx("a",{onClick:P=>{P.preventDefault(),E(k.key,k.group)},className:`manual-group-body-item ${k.key===h?"manual-group-body-item-selected":""}`,"data-href":k.key,href:`#${k.key}`,children:k.label},`search_${k.key}`))]})}),L.jsx("div",{className:`manual-group-list manual-scroll ${f?"hide":""}`,ref:O,children:ps.map(k=>{var P,N;return L.jsxs(R.Fragment,{children:[L.jsx("div",{onClick:()=>F(k),className:`manual-group-title ${k.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?"active":""}`,children:k.title}),L.jsx("div",{className:`manual-group-body manual-scroll ${k.key!==(s==null?void 0:s.key)||s!=null&&s.isHidden?"hide":""}`,children:(N=(P=no[k.key])==null?void 0:P.sort().filter(U=>!ao.includes(U)))==null?void 0:N.map(U=>{const te=`${k.prefix}_${U}`;return L.jsx("a",{onClick:fe=>{fe.preventDefault(),E(te)},className:`manual-group-body-item ${te===h?"manual-group-body-item-selected":""}`,"data-href":te,href:`#${te}`,children:`${U}${k.prefix==="fun"?"()":""}`},te)})})]},k.key)})})]}),L.jsx("div",{ref:K,className:"manual-right manual-scroll",children:L.jsx(Um,{currentIndex:m,group:s,itemKey:h,onItemClick:B})})]})};A.ReferenceManual=Km,A.TradingVueDiffEditor=xm,A.TradingVueEditor=bm,A.parseLibrary=ym,A.parseTcc=Ao,A.removeScript=_m,A.scriptsRun=qo,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
151
|
+
`))!=null&&o.includes(a)){s.push(B),k=!0;break}}if(k)break}if(V){let k=!1;for(const P of V){const{name:S,desc:U,type:te}=P;if(S.includes(a)||U!=null&&U.includes(a)||te!=null&&te.includes(a)){s.push(B),k=!0;break}}if(k)break}if(G){let k=!1;for(const P of G)if(P.includes(a)){s.push(B),k=!0;break}if(k)break}}}return{labelList:n,contentList:s}}const Um=a=>{var G;const{group:n,itemKey:s,onItemClick:o,currentIndex:c}=a,[l,m]=R.useState(),[_,f]=R.useState(0),[b,h]=R.useState("Copy code"),[T,O]=R.useState("Copy link");R.useEffect(()=>{K(c)},[s]);const K=B=>{const k=s.replace(`${n==null?void 0:n.prefix}_`,""),P=ct[n==null?void 0:n.key].get(k);f(B),P&&Rm(P,B).then(S=>{m(S)})},F=B=>{K(B)},N=B=>{var k,P;if(B.target.localName==="a"&&B.target.hash&&((P=(k=B.target)==null?void 0:k.dataset)!=null&&P.name)){B.preventDefault();const{hash:S}=B.target;o(S.replace("#",""))}},H=()=>{h("Copied"),setTimeout(()=>{h("Copy code")},1e3)},V=()=>{O("Link copied"),setTimeout(()=>{O("Copy link")},3e3)};return L.jsx("div",{onClick:N,id:`#${s}`,children:L.jsxs("div",{className:"manual-content-wrapper",children:[L.jsxs("div",{className:"manual-content-header",children:[L.jsxs("div",{children:[L.jsx("h3",{className:"manual-content-header-title",children:l==null?void 0:l.name}),!!(l!=null&&l.overloads)&&L.jsx("span",{className:"manual-content-header-overloads",children:l==null?void 0:l.overloads})]}),L.jsx(vn,{text:(l==null?void 0:l.name)||"",onCopy:V,children:L.jsx("div",{"data-tooltip":T,className:"manual-content-btn",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",width:"28",height:"28",children:L.jsxs("g",{fill:"currentColor",children:[L.jsx("path",{fillRule:"nonzero",d:"M15.039 5.969l-.019-.019-2.828 2.828.707.707 2.474-2.474c1.367-1.367 3.582-1.367 4.949 0s1.367 3.582 0 4.949l-2.474 2.474.707.707 2.828-2.828-.019-.019c1.415-1.767 1.304-4.352-.334-5.99-1.638-1.638-4.224-1.749-5.99-.334zM5.97 15.038l-.019-.019 2.828-2.828.707.707-2.475 2.475c-1.367 1.367-1.367 3.582 0 4.949s3.582 1.367 4.949 0l2.474-2.474.707.707-2.828 2.828-.019-.019c-1.767 1.415-4.352 1.304-5.99-.334-1.638-1.638-1.749-4.224-.334-5.99z"}),L.jsx("path",{d:"M10.485 16.141l5.656-5.656.707.707-5.656 5.656z"})]})})})})]}),(G=l==null?void 0:l.desc)==null?void 0:G.map((B,k)=>L.jsx("div",{dangerouslySetInnerHTML:{__html:B},className:"manual-content-text"},k)),(l==null?void 0:l.type)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"type"}),L.jsx("div",{className:"manual-content-text",children:l.type})]}),(l==null?void 0:l.syntax)&&L.jsxs(R.Fragment,{children:[L.jsxs("div",{className:"manual-content-sub-title",children:["Syntax ",!!(l!=null&&l.overloads)&&"& Overloads"]}),l.syntax.map((B,k)=>{var P;return(((P=l.syntax)==null?void 0:P.length)||0)>1?L.jsx("div",{onClick:()=>F(k),children:L.jsx("pre",{className:`manual-content-syntax with-overloads ${k===_?"selected":""}`,children:B})},k):L.jsx("pre",{className:"manual-content-syntax",children:B},k)})]}),(l==null?void 0:l.args)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"arguments"}),l.args.map((B,k)=>L.jsxs("div",{className:"manual-content-text",children:[L.jsx("span",{className:"manual-content-args-label",children:B.label})," ",L.jsx("span",{dangerouslySetInnerHTML:{__html:B.desc||""}})]},k))]}),(l==null?void 0:l.fields)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"fields"}),l.fields.map((B,k)=>L.jsxs("div",{className:"manual-content-text",children:[L.jsx("span",{className:"manual-content-args-label",children:B.label})," ",L.jsx("span",{dangerouslySetInnerHTML:{__html:B.desc||""}})]},k))]}),(l==null?void 0:l.examples)&&L.jsxs(R.Fragment,{children:[L.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[L.jsx("div",{children:L.jsx("span",{children:"example"})}),L.jsx(vn,{text:l.originalExample||"",onCopy:H,children:L.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:L.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),L.jsx("pre",{className:"manual-content-example",children:L.jsx("code",{dangerouslySetInnerHTML:{__html:l.examples}})})]}),(l==null?void 0:l.detailedDesc)&&l.detailedDesc.map((B,k)=>L.jsxs(R.Fragment,{children:[B.desc.map((P,S)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:P}},S)),L.jsxs("div",{className:"manual-content-sub-title manual-content-example-header",children:[L.jsx("div",{children:L.jsx("span",{children:"example"})}),L.jsx(vn,{text:B.originalExample||"",onCopy:H,children:L.jsx("div",{"data-tooltip":b,className:"manual-content-btn manual-content-example-copy",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",children:L.jsx("path",{stroke:"currentColor",d:"M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"})})})})]}),L.jsx("pre",{className:"manual-content-example",children:L.jsx("code",{dangerouslySetInnerHTML:{__html:B.examples||""}})})]},k)),(l==null?void 0:l.returns)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"returns"}),l.returns.map((B,k)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:B}},k))]}),(l==null?void 0:l.remarks)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"remarks"}),l.remarks.map((B,k)=>L.jsx("div",{className:"manual-content-text",dangerouslySetInnerHTML:{__html:B}},k))]}),(l==null?void 0:l.seeAlso)&&L.jsxs(R.Fragment,{children:[L.jsx("div",{className:"manual-content-sub-title",children:"see Also"}),L.jsx("div",{className:"manual-content-see_also",children:l.seeAlso.map((B,k)=>L.jsx("a",{className:"manual-content-see_also-tag","data-name":B==null?void 0:B.name,href:B==null?void 0:B.link,children:B==null?void 0:B.name},k))})]})]})})};Ie.languages.register({id:Se}),Ie.editor.defineTheme("vs-dark",cn),Ie.editor.defineTheme("vs",ln),Ie.languages.setMonarchTokensProvider(Se,Nr),Ie.languages.setLanguageConfiguration(Se,on);const Km=({theme:a="vs-dark",currentValue:n})=>{const[s,o]=R.useState(ps[0]),[c,l]=R.useState(null),[m,_]=R.useState(0),[f,b]=R.useState(""),[h,T]=R.useState("var_bar_index"),O=R.useRef(null),K=R.useRef(null),F=k=>{k.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?o({...k,isHidden:!0}):o(k)};R.useEffect(()=>{Ie.editor.setTheme(a)},[a]),R.useEffect(()=>{if(n.value){const[k]=n.value.split("_"),P=ps.find(S=>k===S.prefix);P&&(_(n.index||0),G(P,n.value))}},[n]);const N=(k,P)=>{var S;k!==h&&(P&&o(P),_(0),T(k),(S=K.current)==null||S.scrollTo({top:0}))},H=k=>{if(k.target.value.trim()==="")V();else{b(k.target.value);const P=Bm(k.target.value);l(P)}},V=()=>{b(""),l(null),setTimeout(()=>{var k,P;(P=(k=O.current)==null?void 0:k.querySelector(`a[data-href="${h}"]`))==null||P.scrollIntoView(!0)},10)},G=(k,P)=>{var S;o(k),T(P),setTimeout(()=>{var U,te;(te=(U=O.current)==null?void 0:U.querySelector(`a[data-href="${P}"]`))==null||te.scrollIntoView(!0)},10),(S=K.current)==null||S.scrollTo({top:0})},B=k=>{const P=ps.find(S=>k.startsWith(S.prefix));P&&(_(0),G(P,k))};return L.jsxs("div",{className:`${a} manual-warpper`,children:[L.jsxs("div",{className:"manual-left",children:[L.jsxs("div",{className:"manual-search",children:[L.jsx("span",{className:"manual-search-icon",children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:"18px",height:"18px",children:L.jsx("path",{fillRule:"evenodd",d:"M12.5 11h-.79l-.28-.27A6.47 6.47 0 0 0 13 6.5 6.5 6.5 0 1 0 6.5 13c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L17.49 16l-4.99-5zm-6 0C4.01 11 2 8.99 2 6.5S4.01 2 6.5 2 11 4.01 11 6.5 8.99 11 6.5 11z"})})}),L.jsx("input",{onChange:H,spellCheck:"false",value:f,className:"manual-search-input",autoComplete:"off",placeholder:"Search",type:"text"}),L.jsx("span",{onClick:V,className:`manual-search-clear ${f?"":"hide"}`,children:L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 95.939 95.939",width:"9",height:"9",children:L.jsx("path",{d:"M62.82 47.97l32.53-32.534a2 2 0 0 0 0-2.828L83.332.586a2 2 0 0 0-2.827 0L47.97 33.12 15.435.587c-.75-.75-2.078-.75-2.828 0L.587 12.607a2 2 0 0 0 0 2.83L33.12 47.97.588 80.504a2 2 0 0 0 0 2.828l12.02 12.02a1.997 1.997 0 0 0 2.83 0L47.97 62.818l32.535 32.535a2 2 0 0 0 2.827 0l12.02-12.02c.78-.783.78-2.05 0-2.83L62.82 47.97z"})})})]}),L.jsx("div",{className:`manual-group-search-list manual-scroll ${f?"":"hide"}`,children:L.jsxs("div",{children:[c==null?void 0:c.labelList.map(k=>L.jsx("a",{onClick:P=>{P.preventDefault(),N(k.key,k.group)},className:`manual-group-body-item ${k.key===h?"manual-group-body-item-selected":""}`,"data-href":k.key,href:`#${k.key}`,children:k.label},`search_${k.key}`)),L.jsx("div",{className:"manual-content-separator"}),c==null?void 0:c.contentList.map(k=>L.jsx("a",{onClick:P=>{P.preventDefault(),N(k.key,k.group)},className:`manual-group-body-item ${k.key===h?"manual-group-body-item-selected":""}`,"data-href":k.key,href:`#${k.key}`,children:k.label},`search_${k.key}`))]})}),L.jsx("div",{className:`manual-group-list manual-scroll ${f?"hide":""}`,ref:O,children:ps.map(k=>{var P,S;return L.jsxs(R.Fragment,{children:[L.jsx("div",{onClick:()=>F(k),className:`manual-group-title ${k.key===(s==null?void 0:s.key)&&!(s!=null&&s.isHidden)?"active":""}`,children:k.title}),L.jsx("div",{className:`manual-group-body manual-scroll ${k.key!==(s==null?void 0:s.key)||s!=null&&s.isHidden?"hide":""}`,children:(S=(P=no[k.key])==null?void 0:P.sort().filter(U=>!ao.includes(U)))==null?void 0:S.map(U=>{const te=`${k.prefix}_${U}`;return L.jsx("a",{onClick:fe=>{fe.preventDefault(),N(te)},className:`manual-group-body-item ${te===h?"manual-group-body-item-selected":""}`,"data-href":te,href:`#${te}`,children:`${U}${k.prefix==="fun"?"()":""}`},te)})})]},k.key)})})]}),L.jsx("div",{ref:K,className:"manual-right manual-scroll",children:L.jsx(Um,{currentIndex:m,group:s,itemKey:h,onItemClick:B})})]})};A.ReferenceManual=Km,A.TradingVueDiffEditor=xm,A.TradingVueEditor=bm,A.parseLibrary=ym,A.parseTcc=Ao,A.removeScript=_m,A.scriptsRun=qo,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|