@guihz/trading-vue-editor-tes 0.1.111 → 0.1.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9985,7 +9985,8 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
9985
9985
  OKX: "B",
9986
9986
  xm: "X",
9987
9987
  ex: "E",
9988
- binance: "B"
9988
+ binance: "B",
9989
+ FX: "X"
9989
9990
  };
9990
9991
  Io.init();
9991
9992
  const Jp = DD.create({
@@ -19119,7 +19119,7 @@ function E7() {
19119
19119
  }
19120
19120
  const UA = new Worker(new URL(
19121
19121
  /* @vite-ignore */
19122
- "" + new URL("assets/scriptsRunWorker-DRRnxNqg.js", import.meta.url).href,
19122
+ "" + new URL("assets/scriptsRunWorker-DHrzcn1j.js", import.meta.url).href,
19123
19123
  import.meta.url
19124
19124
  ), { type: "module", name: "Run MineScript Server" });
19125
19125
  UA.onerror = (M) => {
@@ -104,7 +104,7 @@ function print() { __p += __j.call(arguments, '') }
104
104
  * @license
105
105
  * Copyright 2019 Google LLC
106
106
  * SPDX-License-Identifier: Apache-2.0
107
- */const wu=Symbol("Comlink.proxy"),Kh=Symbol("Comlink.endpoint"),Uh=Symbol("Comlink.releaseProxy"),al=Symbol("Comlink.finalizer"),yo=Symbol("Comlink.thrown"),Au=e=>typeof e=="object"&&e!==null||typeof e=="function",Hh={canHandle:e=>Au(e)&&e[wu],serialize(e){const{port1:t,port2:s}=new MessageChannel;return Tu(e,t),[s,[s]]},deserialize(e){return e.start(),nl(e)}},jh={canHandle:e=>Au(e)&&yo in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},vu=new Map([["proxy",Hh],["throw",jh]]);function $h(e,t){for(const s of e)if(t===s||s==="*"||s instanceof RegExp&&s.test(t))return!0;return!1}function Tu(e,t=globalThis,s=["*"]){t.addEventListener("message",function a(o){if(!o||!o.data)return;if(!$h(s,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}const{id:i,type:c,path:p}=Object.assign({path:[]},o.data),d=(o.data.argumentList||[]).map(qa);let u;try{const m=p.slice(0,-1).reduce((b,z)=>b[z],e),_=p.reduce((b,z)=>b[z],e);switch(c){case"GET":u=_;break;case"SET":m[p.slice(-1)[0]]=qa(o.data.value),u=!0;break;case"APPLY":u=_.apply(m,d);break;case"CONSTRUCT":{const b=new _(...d);u=il(b)}break;case"ENDPOINT":{const{port1:b,port2:z}=new MessageChannel;Tu(e,z),u=Zh(b,[b])}break;case"RELEASE":u=void 0;break;default:return}}catch(m){u={value:m,[yo]:0}}Promise.resolve(u).catch(m=>({value:m,[yo]:0})).then(m=>{const[_,b]=go(m);t.postMessage(Object.assign(Object.assign({},_),{id:i}),b),c==="RELEASE"&&(t.removeEventListener("message",a),qu(t),al in e&&typeof e[al]=="function"&&e[al]())}).catch(m=>{const[_,b]=go({value:new TypeError("Unserializable return value"),[yo]:0});t.postMessage(Object.assign(Object.assign({},_),{id:i}),b)})}),t.start&&t.start()}function Gh(e){return e.constructor.name==="MessagePort"}function qu(e){Gh(e)&&e.close()}function nl(e,t){const s=new Map;return e.addEventListener("message",function(o){const{data:i}=o;if(!i||!i.id)return;const c=s.get(i.id);if(c)try{c(i)}finally{s.delete(i.id)}}),ol(e,s,[],t)}function bo(e){if(e)throw new Error("Proxy has been released and is not useable")}function Wu(e){return o0(e,new Map,{type:"RELEASE"}).then(()=>{qu(e)})}const _o=new WeakMap,fo="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(_o.get(e)||0)-1;_o.set(e,t),t===0&&Wu(e)});function Yh(e,t){const s=(_o.get(t)||0)+1;_o.set(t,s),fo&&fo.register(e,t,e)}function Vh(e){fo&&fo.unregister(e)}function ol(e,t,s=[],a=function(){}){let o=!1;const i=new Proxy(a,{get(c,p){if(bo(o),p===Uh)return()=>{Vh(i),Wu(e),t.clear(),o=!0};if(p==="then"){if(s.length===0)return{then:()=>i};const d=o0(e,t,{type:"GET",path:s.map(u=>u.toString())}).then(qa);return d.then.bind(d)}return ol(e,t,[...s,p])},set(c,p,d){bo(o);const[u,m]=go(d);return o0(e,t,{type:"SET",path:[...s,p].map(_=>_.toString()),value:u},m).then(qa)},apply(c,p,d){bo(o);const u=s[s.length-1];if(u===Kh)return o0(e,t,{type:"ENDPOINT"}).then(qa);if(u==="bind")return ol(e,t,s.slice(0,-1));const[m,_]=ku(d);return o0(e,t,{type:"APPLY",path:s.map(b=>b.toString()),argumentList:m},_).then(qa)},construct(c,p){bo(o);const[d,u]=ku(p);return o0(e,t,{type:"CONSTRUCT",path:s.map(m=>m.toString()),argumentList:d},u).then(qa)}});return Yh(i,e),i}function Qh(e){return Array.prototype.concat.apply([],e)}function ku(e){const t=e.map(go);return[t.map(s=>s[0]),Qh(t.map(s=>s[1]))]}const Du=new WeakMap;function Zh(e,t){return Du.set(e,t),e}function il(e){return Object.assign(e,{[wu]:!0})}function go(e){for(const[t,s]of vu)if(s.canHandle(e)){const[a,o]=s.serialize(e);return[{type:"HANDLER",name:t,value:a},o]}return[{type:"RAW",value:e},Du.get(e)||[]]}function qa(e){switch(e.type){case"HANDLER":return vu.get(e.name).deserialize(e.value);case"RAW":return e.value}}function o0(e,t,s,a){return new Promise(o=>{const i=Jh();t.set(i,o),e.start&&e.start(),e.postMessage(Object.assign({id:i},s),a)})}function Jh(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const Iu=new Worker(new URL(""+(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-DRRnxNqg.js").href:new URL("assets/scriptsRunWorker-DRRnxNqg.js",typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:ys&&ys.tagName.toUpperCase()==="SCRIPT"&&ys.src||new URL("trading-vue-editor.umd.packages.mjs",document.baseURI).href),{type:"module",name:"Run MineScript Server"});Iu.onerror=e=>{console.error(e)};function Ru(e){return Ze(this,null,function*(){return yield po.setInlayHints(e)})}const Lu=nl(Iu),Nu=nl(new Worker(new URL(""+(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-kPX0V29u.js").href:new URL("assets/parserTccWorker-kPX0V29u.js",typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:ys&&ys.tagName.toUpperCase()==="SCRIPT"&&ys.src||new URL("trading-vue-editor.umd.packages.mjs",document.baseURI).href),{type:"module",name:"Parser MineScript Server"}));function Bu(a){return Ze(this,arguments,function*(e,t=!1,s=lr){var _;const o=(_=e.match(/\s*\/\/\s*@version\s*=\s*([0-9])/))==null?void 0:_[1];o&&(s=parseInt(o),s=s<3?3:s>6?6:s);const i=yield Vr(s);if(!i)return;const{functions:c,types:p,constants:d,variables:u,methods:m}=i.KEY_MAP_LIST;return yield Nu.parseTcc(e,t,il(Ru),{functions:Object.fromEntries(c),methods:Object.fromEntries(m),types:Object.fromEntries(p),constants:Object.fromEntries(d),variables:Object.fromEntries(u)},s)})}function e3(e,t){return Ze(this,null,function*(){var m;const s=(m=e.match(/\s*\/\/\s*@version\s*=\s*([0-9])/))==null?void 0:m[1];let a=6;s&&(a=parseInt(s),a=a<5?5:a>6?6:a);const o=yield Vr(a);if(!o)return;const{functions:i,types:c,constants:p,variables:d,methods:u}=o.KEY_MAP_LIST;return yield Nu.parseLibraryCode(e,t,il(Ru),{functions:Object.fromEntries(i),methods:Object.fromEntries(u),types:Object.fromEntries(c),constants:Object.fromEntries(p),variables:Object.fromEntries(d)},a)})}function t3(o,i){return Ze(this,arguments,function*(e,t,s=!0,a=lr){return yield Lu.runScript(e,t,s,a)})}function s3(e){return Ze(this,null,function*(){return yield Lu.removeScript(e)})}function r3(e){return new Worker(""+(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-i61BMNLo.js").href:new URL("assets/editor.worker-i61BMNLo.js",typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),{type:"module",name:e==null?void 0:e.name})}const{slice:a3,forEach:n3}=[];function o3(e){return n3.call(a3.call(arguments,1),t=>{if(t)for(const s in t)e[s]===void 0&&(e[s]=t[s])}),e}function i3(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(s=>s.test(e))}const Cu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,l3=function(e,t){const a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(a.maxAge>0){const c=a.maxAge-0;if(Number.isNaN(c))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(c)}`}if(a.domain){if(!Cu.test(a.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${a.domain}`}if(a.path){if(!Cu.test(a.path))throw new TypeError("option path is invalid");i+=`; Path=${a.path}`}if(a.expires){if(typeof a.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${a.expires.toUTCString()}`}if(a.httpOnly&&(i+="; HttpOnly"),a.secure&&(i+="; Secure"),a.sameSite)switch(typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a.partitioned&&(i+="; Partitioned"),i},Eu={create(e,t,s,a){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};s&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+s*60*1e3)),a&&(o.domain=a),document.cookie=l3(e,t,o)},read(e){const t=`${e}=`,s=document.cookie.split(";");for(let a=0;a<s.length;a++){let o=s[a];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var c3={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document!="undefined")return Eu.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:s,cookieMinutes:a,cookieDomain:o,cookieOptions:i}=t;s&&typeof document!="undefined"&&Eu.create(s,e,a,o,i)}},p3={name:"querystring",lookup(e){var a;let{lookupQuerystring:t}=e,s;if(typeof window!="undefined"){let{search:o}=window.location;!window.location.search&&((a=window.location.hash)==null?void 0:a.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const c=o.substring(1).split("&");for(let p=0;p<c.length;p++){const d=c[p].indexOf("=");d>0&&c[p].substring(0,d)===t&&(s=c[p].substring(d+1))}}return s}},d3={name:"hash",lookup(e){var o;let{lookupHash:t,lookupFromHashIndex:s}=e,a;if(typeof window!="undefined"){const{hash:i}=window.location;if(i&&i.length>2){const c=i.substring(1);if(t){const p=c.split("&");for(let d=0;d<p.length;d++){const u=p[d].indexOf("=");u>0&&p[d].substring(0,u)===t&&(a=p[d].substring(u+1))}}if(a)return a;if(!a&&s>-1){const p=i.match(/\/([a-zA-Z-]*)/g);return Array.isArray(p)?(o=p[typeof s=="number"?s:0])==null?void 0:o.replace("/",""):void 0}}}return a}};let i0=null;const Su=()=>{if(i0!==null)return i0;try{if(i0=typeof window!="undefined"&&window.localStorage!==null,!i0)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){i0=!1}return i0};var u3={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Su())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:s}=t;s&&Su()&&window.localStorage.setItem(s,e)}};let l0=null;const Xu=()=>{if(l0!==null)return l0;try{if(l0=typeof window!="undefined"&&window.sessionStorage!==null,!l0)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){l0=!1}return l0};var m3={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Xu())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:s}=t;s&&Xu()&&window.sessionStorage.setItem(s,e)}},y3={name:"navigator",lookup(e){const t=[];if(typeof navigator!="undefined"){const{languages:s,userLanguage:a,language:o}=navigator;if(s)for(let i=0;i<s.length;i++)t.push(s[i]);a&&t.push(a),o&&t.push(o)}return t.length>0?t:void 0}},b3={name:"htmlTag",lookup(e){let{htmlTag:t}=e,s;const a=t||(typeof document!="undefined"?document.documentElement:null);return a&&typeof a.getAttribute=="function"&&(s=a.getAttribute("lang")),s}},_3={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window=="undefined")return;const s=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?(o=s[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},f3={name:"subdomain",lookup(e){var o,i;let{lookupFromSubdomainIndex:t}=e;const s=typeof t=="number"?t+1:1,a=typeof window!="undefined"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(a)return a[s]}};let Fu=!1;try{document.cookie,Fu=!0}catch(e){}const Pu=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Fu||Pu.splice(1,1);const g3=()=>({order:Pu,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Ku{constructor(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,s)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=o3(s,this.options||{},g3()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(c3),this.addDetector(p3),this.addDetector(u3),this.addDetector(m3),this.addDetector(y3),this.addDetector(b3),this.addDetector(_3),this.addDetector(f3),this.addDetector(d3)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,s=[];return t.forEach(a=>{if(this.detectors[a]){let o=this.detectors[a].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(s=s.concat(o))}}),s=s.filter(a=>a!=null&&!i3(a)).map(a=>this.options.convertDetectedLanguage(a)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?s:s.length>0?s[0]:null}cacheUserLanguage(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;s&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||s.forEach(a=>{this.detectors[a]&&this.detectors[a].cacheUserLanguage(t,this.options)}))}}Ku.type="languageDetector";const M3=(e,t,s,a)=>{var i,c,p,d;const o=[s,be({code:t},a||{})];if((c=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&c.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);Wa(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),(d=(p=e==null?void 0:e.services)==null?void 0:p.logger)!=null&&d.warn?e.services.logger.warn(...o):console!=null&&console.warn&&console.warn(...o)},Uu={},ll=(e,t,s,a)=>{Wa(s)&&Uu[s]||(Wa(s)&&(Uu[s]=new Date),M3(e,t,s,a))},Hu=(e,t)=>()=>{if(e.isInitialized)t();else{const s=()=>{setTimeout(()=>{e.off("initialized",s)},0),t()};e.on("initialized",s)}},cl=(e,t,s)=>{e.loadNamespaces(t,Hu(e,s))},ju=(e,t,s,a)=>{if(Wa(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(t)>-1)return cl(e,s,a);s.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,Hu(e,a))},z3=(e,t,s={})=>!t.languages||!t.languages.length?(ll(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:s.lng,precheck:(a,o)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!o(a.isLanguageChangingTo,e))return!1}}),Wa=e=>typeof e=="string",x3=e=>typeof e=="object"&&e!==null,h3=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,O3={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},w3=e=>O3[e];let pl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(h3,w3)};const A3=(e={})=>{pl=be(be({},pl),e)},v3=()=>pl;let $u;const T3=e=>{$u=e},q3=()=>$u,W3={type:"3rdParty",init(e){A3(e.options.react),T3(e)}},k3=X.createContext();class D3{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const I3=(e,t)=>{const s=X.useRef();return X.useEffect(()=>{s.current=e},[e,t]),s.current},Gu=(e,t,s,a)=>e.getFixedT(t,s,a),R3=(e,t,s,a)=>X.useCallback(Gu(e,t,s,a),[e,t,s,a]),c0=(e,t={})=>{var v,L,R,T;const{i18n:s}=t,{i18n:a,defaultNS:o}=X.useContext(k3)||{},i=s||a||q3();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new D3),!i){ll(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const W=(q,k)=>Wa(k)?k:x3(k)&&Wa(k.defaultValue)?k.defaultValue:Array.isArray(q)?q[q.length-1]:q,K=[W,{},!1];return K.t=W,K.i18n={},K.ready=!1,K}(v=i.options.react)!=null&&v.wait&&ll(i,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const c=be(be(be({},v3()),i.options.react),t),{useSuspense:p,keyPrefix:d}=c;let u=o||((L=i.options)==null?void 0:L.defaultNS);u=Wa(u)?[u]:u||["translation"],(T=(R=i.reportNamespaces).addUsedNamespaces)==null||T.call(R,u);const m=(i.isInitialized||i.initializedStoreOnce)&&u.every(W=>z3(W,i,c)),_=R3(i,t.lng||null,c.nsMode==="fallback"?u:u[0],d),b=()=>_,z=()=>Gu(i,t.lng||null,c.nsMode==="fallback"?u:u[0],d),[M,h]=X.useState(b);let w=u.join();t.lng&&(w=`${t.lng}${w}`);const I=I3(w),g=X.useRef(!0);X.useEffect(()=>{const{bindI18n:W,bindI18nStore:K}=c;g.current=!0,!m&&!p&&(t.lng?ju(i,t.lng,u,()=>{g.current&&h(z)}):cl(i,u,()=>{g.current&&h(z)})),m&&I&&I!==w&&g.current&&h(z);const q=()=>{g.current&&h(z)};return W&&(i==null||i.on(W,q)),K&&(i==null||i.store.on(K,q)),()=>{g.current=!1,i&&W&&(W==null||W.split(" ").forEach(k=>i.off(k,q))),K&&i&&K.split(" ").forEach(k=>i.store.off(k,q))}},[i,w]),X.useEffect(()=>{g.current&&m&&h(b)},[i,d,m]);const A=[M,i,m];if(A.t=M,A.i18n=i,A.ready=m,m||!m&&!p)return A;throw new Promise(W=>{t.lng?ju(i,t.lng,u,()=>W()):cl(i,u,()=>W())})},L3={type:"type",syntax:"syntax",overloads:"overloads",arguments:"arguments",fields:"fields",example:"example",returns:"returns",remarks:"remarks","see also":"see also","Copy code":"Copy code","Copy link":"Copy link",Copied:"Copied","Link copied":"Link copied",variables:"Variables",constants:"Constants",functions:"Functions",keywords:"Keywords",types:"Types",operators:"Operators",annotations:"Annotations",search:"Search","Mine Script® v1 Reference Manual":"Mine Script® v{{version}} Reference Manual","This script is read-only. It cannot be edited.":"This script is read-only. It cannot be edited.","save script":"Save script","open script":"Open script","find/replace":"Find/Replace","toggle console":"Toggle console","open editor in new tab":"Open editor in new tab","open editor in new window":"Open editor in new window",keyword:"keyword","built-in function":"built-in function","built-in variable":"built-in variable","built-in method":"built-in method","built-in type":"built-in type",annotation:"annotation","built-in constant":"built-in constant",namespace:"namespace","user-defined variable":"user-defined variable","user-defined type":"user-defined type",field:"field",enum:"enum","user-defined method":"user-defined method","user-defined function":"user-defined function",parameter:"parameter","**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.":"**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Mine functions, variables, and methods.","to trigger parameters hint":"to trigger parameters hint",library:"library","enum member":"enum member",Returns:"Returns",Syntax:"Syntax",Remarks:"Remarks",Fields:"Fields",Description:"Description",Example:"Example","Enum members":"Enum members",statement:"statement",loop:"loop","`click` on keyword for more help":"`click` on keyword for more help","new indicator":"New Indicator","new strategy":"New Strategy"},N3={type:"类型",syntax:"语法",overloads:"重载",arguments:"参数",fields:"字段",example:"例子",returns:"返回值",remarks:"备注","see also":"另见","Copy code":"复制代码","Copy link":"复制链接",Copied:"已复制","Link copied":"链接已复制",variables:"内置变量",constants:"常量",functions:"函数",keywords:"关键词",types:"类型",operators:"运算符",annotations:"注释",search:"搜索","Mine Script® v1 Reference Manual":"Mine Script™ v{{version}} 参考手册","This script is read-only. It cannot be edited.":"该脚本是只读的。它无法被编辑。","save script":"保存脚本","open script":"打开脚本","find/replace":"寻找/替换","toggle console":"切换控制台","open editor in new tab":"在新标签页中打开","open editor in new window":"在新窗口中打开",keyword:"关键词","built-in function":"内置函数","built-in variable":"内置变量","built-in method":"内置方法","built-in type":"内置类型",annotation:"注释","built-in constant":"内置常量",namespace:"命名空间","user-defined variable":"用户自定义变量","user-defined type":"用户自定义类型",field:"字段",enum:"枚举","user-defined method":"用户自定义方法","user-defined function":"用户自定义函数",parameter:"参数","**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.":"命名空间是不可变的术语,充当标识符组的前缀。在命名Mine函数、变量和方法时,点和另一个术语始终遵循命名空间。","to trigger parameters hint":"触发参数提示",library:"脚本库","enum member":"枚举成员",Returns:"返回值",Syntax:"语法",Remarks:"备注",Fields:"字段",Description:"描述",Example:"例子","Enum members":"枚举成员",statement:"声明",loop:"循环","`click` on keyword for more help":"“点击”关键词以获得更多帮助","new indicator":"新建指标","new strategy":"新建策略"};_t.use(Ku).use(W3).init({debug:!1,fallbackLng:"zh",interpolation:{escapeValue:!1},resources:{en:{translation:L3},zh:{translation:N3}}}),self.MonacoEnvironment={getWorker(){return new r3({name:"Editor Worker"})}},_i.config({paths:{vs:"https://www.tradingvue.com/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});const B3=(e,t)=>{const{height:s,width:a,theme:o,options:i,hasDiff:c,readOnly:p,defaultValue:d,language:u,onChange:m,onLinkOpen:_,onCursorPositionChange:b,onActionTrigger:z,onEditorDidMount:M,onVersionChange:h}=e,{t:w,i18n:I}=c0(),g=X.useRef(null),A=X.useRef(null),v=X.useRef(!1),L=X.useRef(!1);X.useImperativeHandle(t,()=>({setOriginalScript(k){var H;(H=g.current)==null||H.setOriginalScript(k)},setScript(k){var H;(H=g.current)==null||H.setValue(k)},gotoLine(){var k;(k=g.current)==null||k.gotoLine()},getEditorLayout(){var k;return(k=g.current)==null?void 0:k.getEditorLayout()},setPosition(k,H){var $;($=g.current)==null||$.setPosition({column:k,lineNumber:H})},setModelMarkers(k){var H;L.current=!0,(H=g.current)==null||H.setModelMarkers(k),setTimeout(()=>{L.current=!1},2e3)},focus(){var k;(k=g.current)==null||k.focus()}})),X.useEffect(()=>{var k,H;c?(H=g.current)==null||H.addDiffDecorations():(k=g.current)==null||k.removeDiffDecorations()},[c]),X.useEffect(()=>{o&&we.editor.setTheme(o)},[o]),X.useEffect(()=>{u&&I.changeLanguage(u)},[u]),X.useEffect(()=>{var k;(k=g.current)==null||k.updateActionTrigger(z)},[z]),X.useEffect(()=>{var k;_&&((k=g.current)==null||k.addLinkOpenFunc(_))},[_]);function R(k,H){var G,V;po.setEditor(k,H),g.current=new Ph(k,H,z),_&&((G=g.current)==null||G.addLinkOpenFunc(_)),c&&((V=g.current)==null||V.addDiffDecorations()),Xx(k),requestAnimationFrame(q);const $=k.getValue();g.current.onChangeCursorPosition(b),m&&m($),!p&&T($),M&&M()}const T=X.useCallback(k=>Ze(this,null,function*(){var xe,gt;const H=(xe=g.current)==null?void 0:xe.getVersion();h&&h(H||lr),v.current=!1;const{errors:$,functions:G,methods:V,types:Z,variables:ge,overloadsFuncs:de,imports:Q,enums:ue}=yield Bu(k,!1,H),S=new Map(Object.entries(G)),j=new Map(Object.entries(V)),J=new Map(Object.entries(Z)),Y=new Map(Object.entries(ge)),De=new Map(Object.entries(Q)),Ie=new Map(Object.entries(ue));Qr.setUserDefined({functions:S,methods:j,types:J,variables:Y,imports:De,enums:Ie},de),Ys.setUserDefind(S,J,Y,j,Ie);const Te=$.map(Rt=>nt(be({},Rt),{severity:Rt.type||we.MarkerSeverity.Error}));p||!v.current&&!L.current&&Te.length&&((gt=g.current)==null||gt.setModelMarkers(Te))}),[p]),W=X.useMemo(()=>qx.debounce(T,1500),[T]);function K(k){var H;if(p){T(k||"");return}v.current=!0,po.clearInlayHints(),(H=g.current)==null||H.setModelMarkers([]),k!==void 0&&(m&&m(k),W(k))}const q=X.useCallback(()=>{var H,$;const k=(H=A.current)==null?void 0:H.getBoundingClientRect();($=g.current)==null||$.setEditorLayout((k==null?void 0:k.height)||0,k==null?void 0:k.width)},[]);return X.useEffect(()=>{const k=()=>{window.requestAnimationFrame(q)},H=new ResizeObserver(k);return A.current&&H.observe(A.current),()=>{var $;A.current&&H.unobserve(A.current),H.disconnect(),($=g.current)==null||$.dispose()}},[]),E.jsx("div",{ref:A,children:E.jsx(cf,{height:s,width:a||"100%",defaultLanguage:It,defaultValue:d||`//@version=6
107
+ */const wu=Symbol("Comlink.proxy"),Kh=Symbol("Comlink.endpoint"),Uh=Symbol("Comlink.releaseProxy"),al=Symbol("Comlink.finalizer"),yo=Symbol("Comlink.thrown"),Au=e=>typeof e=="object"&&e!==null||typeof e=="function",Hh={canHandle:e=>Au(e)&&e[wu],serialize(e){const{port1:t,port2:s}=new MessageChannel;return Tu(e,t),[s,[s]]},deserialize(e){return e.start(),nl(e)}},jh={canHandle:e=>Au(e)&&yo in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},vu=new Map([["proxy",Hh],["throw",jh]]);function $h(e,t){for(const s of e)if(t===s||s==="*"||s instanceof RegExp&&s.test(t))return!0;return!1}function Tu(e,t=globalThis,s=["*"]){t.addEventListener("message",function a(o){if(!o||!o.data)return;if(!$h(s,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}const{id:i,type:c,path:p}=Object.assign({path:[]},o.data),d=(o.data.argumentList||[]).map(qa);let u;try{const m=p.slice(0,-1).reduce((b,z)=>b[z],e),_=p.reduce((b,z)=>b[z],e);switch(c){case"GET":u=_;break;case"SET":m[p.slice(-1)[0]]=qa(o.data.value),u=!0;break;case"APPLY":u=_.apply(m,d);break;case"CONSTRUCT":{const b=new _(...d);u=il(b)}break;case"ENDPOINT":{const{port1:b,port2:z}=new MessageChannel;Tu(e,z),u=Zh(b,[b])}break;case"RELEASE":u=void 0;break;default:return}}catch(m){u={value:m,[yo]:0}}Promise.resolve(u).catch(m=>({value:m,[yo]:0})).then(m=>{const[_,b]=go(m);t.postMessage(Object.assign(Object.assign({},_),{id:i}),b),c==="RELEASE"&&(t.removeEventListener("message",a),qu(t),al in e&&typeof e[al]=="function"&&e[al]())}).catch(m=>{const[_,b]=go({value:new TypeError("Unserializable return value"),[yo]:0});t.postMessage(Object.assign(Object.assign({},_),{id:i}),b)})}),t.start&&t.start()}function Gh(e){return e.constructor.name==="MessagePort"}function qu(e){Gh(e)&&e.close()}function nl(e,t){const s=new Map;return e.addEventListener("message",function(o){const{data:i}=o;if(!i||!i.id)return;const c=s.get(i.id);if(c)try{c(i)}finally{s.delete(i.id)}}),ol(e,s,[],t)}function bo(e){if(e)throw new Error("Proxy has been released and is not useable")}function Wu(e){return o0(e,new Map,{type:"RELEASE"}).then(()=>{qu(e)})}const _o=new WeakMap,fo="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(_o.get(e)||0)-1;_o.set(e,t),t===0&&Wu(e)});function Yh(e,t){const s=(_o.get(t)||0)+1;_o.set(t,s),fo&&fo.register(e,t,e)}function Vh(e){fo&&fo.unregister(e)}function ol(e,t,s=[],a=function(){}){let o=!1;const i=new Proxy(a,{get(c,p){if(bo(o),p===Uh)return()=>{Vh(i),Wu(e),t.clear(),o=!0};if(p==="then"){if(s.length===0)return{then:()=>i};const d=o0(e,t,{type:"GET",path:s.map(u=>u.toString())}).then(qa);return d.then.bind(d)}return ol(e,t,[...s,p])},set(c,p,d){bo(o);const[u,m]=go(d);return o0(e,t,{type:"SET",path:[...s,p].map(_=>_.toString()),value:u},m).then(qa)},apply(c,p,d){bo(o);const u=s[s.length-1];if(u===Kh)return o0(e,t,{type:"ENDPOINT"}).then(qa);if(u==="bind")return ol(e,t,s.slice(0,-1));const[m,_]=ku(d);return o0(e,t,{type:"APPLY",path:s.map(b=>b.toString()),argumentList:m},_).then(qa)},construct(c,p){bo(o);const[d,u]=ku(p);return o0(e,t,{type:"CONSTRUCT",path:s.map(m=>m.toString()),argumentList:d},u).then(qa)}});return Yh(i,e),i}function Qh(e){return Array.prototype.concat.apply([],e)}function ku(e){const t=e.map(go);return[t.map(s=>s[0]),Qh(t.map(s=>s[1]))]}const Du=new WeakMap;function Zh(e,t){return Du.set(e,t),e}function il(e){return Object.assign(e,{[wu]:!0})}function go(e){for(const[t,s]of vu)if(s.canHandle(e)){const[a,o]=s.serialize(e);return[{type:"HANDLER",name:t,value:a},o]}return[{type:"RAW",value:e},Du.get(e)||[]]}function qa(e){switch(e.type){case"HANDLER":return vu.get(e.name).deserialize(e.value);case"RAW":return e.value}}function o0(e,t,s,a){return new Promise(o=>{const i=Jh();t.set(i,o),e.start&&e.start(),e.postMessage(Object.assign({id:i},s),a)})}function Jh(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const Iu=new Worker(new URL(""+(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-DHrzcn1j.js").href:new URL("assets/scriptsRunWorker-DHrzcn1j.js",typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:ys&&ys.tagName.toUpperCase()==="SCRIPT"&&ys.src||new URL("trading-vue-editor.umd.packages.mjs",document.baseURI).href),{type:"module",name:"Run MineScript Server"});Iu.onerror=e=>{console.error(e)};function Ru(e){return Ze(this,null,function*(){return yield po.setInlayHints(e)})}const Lu=nl(Iu),Nu=nl(new Worker(new URL(""+(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-kPX0V29u.js").href:new URL("assets/parserTccWorker-kPX0V29u.js",typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:ys&&ys.tagName.toUpperCase()==="SCRIPT"&&ys.src||new URL("trading-vue-editor.umd.packages.mjs",document.baseURI).href),{type:"module",name:"Parser MineScript Server"}));function Bu(a){return Ze(this,arguments,function*(e,t=!1,s=lr){var _;const o=(_=e.match(/\s*\/\/\s*@version\s*=\s*([0-9])/))==null?void 0:_[1];o&&(s=parseInt(o),s=s<3?3:s>6?6:s);const i=yield Vr(s);if(!i)return;const{functions:c,types:p,constants:d,variables:u,methods:m}=i.KEY_MAP_LIST;return yield Nu.parseTcc(e,t,il(Ru),{functions:Object.fromEntries(c),methods:Object.fromEntries(m),types:Object.fromEntries(p),constants:Object.fromEntries(d),variables:Object.fromEntries(u)},s)})}function e3(e,t){return Ze(this,null,function*(){var m;const s=(m=e.match(/\s*\/\/\s*@version\s*=\s*([0-9])/))==null?void 0:m[1];let a=6;s&&(a=parseInt(s),a=a<5?5:a>6?6:a);const o=yield Vr(a);if(!o)return;const{functions:i,types:c,constants:p,variables:d,methods:u}=o.KEY_MAP_LIST;return yield Nu.parseLibraryCode(e,t,il(Ru),{functions:Object.fromEntries(i),methods:Object.fromEntries(u),types:Object.fromEntries(c),constants:Object.fromEntries(p),variables:Object.fromEntries(d)},a)})}function t3(o,i){return Ze(this,arguments,function*(e,t,s=!0,a=lr){return yield Lu.runScript(e,t,s,a)})}function s3(e){return Ze(this,null,function*(){return yield Lu.removeScript(e)})}function r3(e){return new Worker(""+(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-i61BMNLo.js").href:new URL("assets/editor.worker-i61BMNLo.js",typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),{type:"module",name:e==null?void 0:e.name})}const{slice:a3,forEach:n3}=[];function o3(e){return n3.call(a3.call(arguments,1),t=>{if(t)for(const s in t)e[s]===void 0&&(e[s]=t[s])}),e}function i3(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(s=>s.test(e))}const Cu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,l3=function(e,t){const a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let i=`${e}=${o}`;if(a.maxAge>0){const c=a.maxAge-0;if(Number.isNaN(c))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(c)}`}if(a.domain){if(!Cu.test(a.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${a.domain}`}if(a.path){if(!Cu.test(a.path))throw new TypeError("option path is invalid");i+=`; Path=${a.path}`}if(a.expires){if(typeof a.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${a.expires.toUTCString()}`}if(a.httpOnly&&(i+="; HttpOnly"),a.secure&&(i+="; Secure"),a.sameSite)switch(typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a.partitioned&&(i+="; Partitioned"),i},Eu={create(e,t,s,a){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};s&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+s*60*1e3)),a&&(o.domain=a),document.cookie=l3(e,t,o)},read(e){const t=`${e}=`,s=document.cookie.split(";");for(let a=0;a<s.length;a++){let o=s[a];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var c3={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document!="undefined")return Eu.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:s,cookieMinutes:a,cookieDomain:o,cookieOptions:i}=t;s&&typeof document!="undefined"&&Eu.create(s,e,a,o,i)}},p3={name:"querystring",lookup(e){var a;let{lookupQuerystring:t}=e,s;if(typeof window!="undefined"){let{search:o}=window.location;!window.location.search&&((a=window.location.hash)==null?void 0:a.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const c=o.substring(1).split("&");for(let p=0;p<c.length;p++){const d=c[p].indexOf("=");d>0&&c[p].substring(0,d)===t&&(s=c[p].substring(d+1))}}return s}},d3={name:"hash",lookup(e){var o;let{lookupHash:t,lookupFromHashIndex:s}=e,a;if(typeof window!="undefined"){const{hash:i}=window.location;if(i&&i.length>2){const c=i.substring(1);if(t){const p=c.split("&");for(let d=0;d<p.length;d++){const u=p[d].indexOf("=");u>0&&p[d].substring(0,u)===t&&(a=p[d].substring(u+1))}}if(a)return a;if(!a&&s>-1){const p=i.match(/\/([a-zA-Z-]*)/g);return Array.isArray(p)?(o=p[typeof s=="number"?s:0])==null?void 0:o.replace("/",""):void 0}}}return a}};let i0=null;const Su=()=>{if(i0!==null)return i0;try{if(i0=typeof window!="undefined"&&window.localStorage!==null,!i0)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){i0=!1}return i0};var u3={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Su())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:s}=t;s&&Su()&&window.localStorage.setItem(s,e)}};let l0=null;const Xu=()=>{if(l0!==null)return l0;try{if(l0=typeof window!="undefined"&&window.sessionStorage!==null,!l0)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){l0=!1}return l0};var m3={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Xu())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:s}=t;s&&Xu()&&window.sessionStorage.setItem(s,e)}},y3={name:"navigator",lookup(e){const t=[];if(typeof navigator!="undefined"){const{languages:s,userLanguage:a,language:o}=navigator;if(s)for(let i=0;i<s.length;i++)t.push(s[i]);a&&t.push(a),o&&t.push(o)}return t.length>0?t:void 0}},b3={name:"htmlTag",lookup(e){let{htmlTag:t}=e,s;const a=t||(typeof document!="undefined"?document.documentElement:null);return a&&typeof a.getAttribute=="function"&&(s=a.getAttribute("lang")),s}},_3={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window=="undefined")return;const s=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?(o=s[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},f3={name:"subdomain",lookup(e){var o,i;let{lookupFromSubdomainIndex:t}=e;const s=typeof t=="number"?t+1:1,a=typeof window!="undefined"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(a)return a[s]}};let Fu=!1;try{document.cookie,Fu=!0}catch(e){}const Pu=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Fu||Pu.splice(1,1);const g3=()=>({order:Pu,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Ku{constructor(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,s)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=o3(s,this.options||{},g3()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(c3),this.addDetector(p3),this.addDetector(u3),this.addDetector(m3),this.addDetector(y3),this.addDetector(b3),this.addDetector(_3),this.addDetector(f3),this.addDetector(d3)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,s=[];return t.forEach(a=>{if(this.detectors[a]){let o=this.detectors[a].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(s=s.concat(o))}}),s=s.filter(a=>a!=null&&!i3(a)).map(a=>this.options.convertDetectedLanguage(a)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?s:s.length>0?s[0]:null}cacheUserLanguage(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;s&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||s.forEach(a=>{this.detectors[a]&&this.detectors[a].cacheUserLanguage(t,this.options)}))}}Ku.type="languageDetector";const M3=(e,t,s,a)=>{var i,c,p,d;const o=[s,be({code:t},a||{})];if((c=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&c.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);Wa(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),(d=(p=e==null?void 0:e.services)==null?void 0:p.logger)!=null&&d.warn?e.services.logger.warn(...o):console!=null&&console.warn&&console.warn(...o)},Uu={},ll=(e,t,s,a)=>{Wa(s)&&Uu[s]||(Wa(s)&&(Uu[s]=new Date),M3(e,t,s,a))},Hu=(e,t)=>()=>{if(e.isInitialized)t();else{const s=()=>{setTimeout(()=>{e.off("initialized",s)},0),t()};e.on("initialized",s)}},cl=(e,t,s)=>{e.loadNamespaces(t,Hu(e,s))},ju=(e,t,s,a)=>{if(Wa(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(t)>-1)return cl(e,s,a);s.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,Hu(e,a))},z3=(e,t,s={})=>!t.languages||!t.languages.length?(ll(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:s.lng,precheck:(a,o)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!o(a.isLanguageChangingTo,e))return!1}}),Wa=e=>typeof e=="string",x3=e=>typeof e=="object"&&e!==null,h3=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,O3={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},w3=e=>O3[e];let pl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(h3,w3)};const A3=(e={})=>{pl=be(be({},pl),e)},v3=()=>pl;let $u;const T3=e=>{$u=e},q3=()=>$u,W3={type:"3rdParty",init(e){A3(e.options.react),T3(e)}},k3=X.createContext();class D3{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const I3=(e,t)=>{const s=X.useRef();return X.useEffect(()=>{s.current=e},[e,t]),s.current},Gu=(e,t,s,a)=>e.getFixedT(t,s,a),R3=(e,t,s,a)=>X.useCallback(Gu(e,t,s,a),[e,t,s,a]),c0=(e,t={})=>{var v,L,R,T;const{i18n:s}=t,{i18n:a,defaultNS:o}=X.useContext(k3)||{},i=s||a||q3();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new D3),!i){ll(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const W=(q,k)=>Wa(k)?k:x3(k)&&Wa(k.defaultValue)?k.defaultValue:Array.isArray(q)?q[q.length-1]:q,K=[W,{},!1];return K.t=W,K.i18n={},K.ready=!1,K}(v=i.options.react)!=null&&v.wait&&ll(i,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const c=be(be(be({},v3()),i.options.react),t),{useSuspense:p,keyPrefix:d}=c;let u=o||((L=i.options)==null?void 0:L.defaultNS);u=Wa(u)?[u]:u||["translation"],(T=(R=i.reportNamespaces).addUsedNamespaces)==null||T.call(R,u);const m=(i.isInitialized||i.initializedStoreOnce)&&u.every(W=>z3(W,i,c)),_=R3(i,t.lng||null,c.nsMode==="fallback"?u:u[0],d),b=()=>_,z=()=>Gu(i,t.lng||null,c.nsMode==="fallback"?u:u[0],d),[M,h]=X.useState(b);let w=u.join();t.lng&&(w=`${t.lng}${w}`);const I=I3(w),g=X.useRef(!0);X.useEffect(()=>{const{bindI18n:W,bindI18nStore:K}=c;g.current=!0,!m&&!p&&(t.lng?ju(i,t.lng,u,()=>{g.current&&h(z)}):cl(i,u,()=>{g.current&&h(z)})),m&&I&&I!==w&&g.current&&h(z);const q=()=>{g.current&&h(z)};return W&&(i==null||i.on(W,q)),K&&(i==null||i.store.on(K,q)),()=>{g.current=!1,i&&W&&(W==null||W.split(" ").forEach(k=>i.off(k,q))),K&&i&&K.split(" ").forEach(k=>i.store.off(k,q))}},[i,w]),X.useEffect(()=>{g.current&&m&&h(b)},[i,d,m]);const A=[M,i,m];if(A.t=M,A.i18n=i,A.ready=m,m||!m&&!p)return A;throw new Promise(W=>{t.lng?ju(i,t.lng,u,()=>W()):cl(i,u,()=>W())})},L3={type:"type",syntax:"syntax",overloads:"overloads",arguments:"arguments",fields:"fields",example:"example",returns:"returns",remarks:"remarks","see also":"see also","Copy code":"Copy code","Copy link":"Copy link",Copied:"Copied","Link copied":"Link copied",variables:"Variables",constants:"Constants",functions:"Functions",keywords:"Keywords",types:"Types",operators:"Operators",annotations:"Annotations",search:"Search","Mine Script® v1 Reference Manual":"Mine Script® v{{version}} Reference Manual","This script is read-only. It cannot be edited.":"This script is read-only. It cannot be edited.","save script":"Save script","open script":"Open script","find/replace":"Find/Replace","toggle console":"Toggle console","open editor in new tab":"Open editor in new tab","open editor in new window":"Open editor in new window",keyword:"keyword","built-in function":"built-in function","built-in variable":"built-in variable","built-in method":"built-in method","built-in type":"built-in type",annotation:"annotation","built-in constant":"built-in constant",namespace:"namespace","user-defined variable":"user-defined variable","user-defined type":"user-defined type",field:"field",enum:"enum","user-defined method":"user-defined method","user-defined function":"user-defined function",parameter:"parameter","**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.":"**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Mine functions, variables, and methods.","to trigger parameters hint":"to trigger parameters hint",library:"library","enum member":"enum member",Returns:"Returns",Syntax:"Syntax",Remarks:"Remarks",Fields:"Fields",Description:"Description",Example:"Example","Enum members":"Enum members",statement:"statement",loop:"loop","`click` on keyword for more help":"`click` on keyword for more help","new indicator":"New Indicator","new strategy":"New Strategy"},N3={type:"类型",syntax:"语法",overloads:"重载",arguments:"参数",fields:"字段",example:"例子",returns:"返回值",remarks:"备注","see also":"另见","Copy code":"复制代码","Copy link":"复制链接",Copied:"已复制","Link copied":"链接已复制",variables:"内置变量",constants:"常量",functions:"函数",keywords:"关键词",types:"类型",operators:"运算符",annotations:"注释",search:"搜索","Mine Script® v1 Reference Manual":"Mine Script™ v{{version}} 参考手册","This script is read-only. It cannot be edited.":"该脚本是只读的。它无法被编辑。","save script":"保存脚本","open script":"打开脚本","find/replace":"寻找/替换","toggle console":"切换控制台","open editor in new tab":"在新标签页中打开","open editor in new window":"在新窗口中打开",keyword:"关键词","built-in function":"内置函数","built-in variable":"内置变量","built-in method":"内置方法","built-in type":"内置类型",annotation:"注释","built-in constant":"内置常量",namespace:"命名空间","user-defined variable":"用户自定义变量","user-defined type":"用户自定义类型",field:"字段",enum:"枚举","user-defined method":"用户自定义方法","user-defined function":"用户自定义函数",parameter:"参数","**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.":"命名空间是不可变的术语,充当标识符组的前缀。在命名Mine函数、变量和方法时,点和另一个术语始终遵循命名空间。","to trigger parameters hint":"触发参数提示",library:"脚本库","enum member":"枚举成员",Returns:"返回值",Syntax:"语法",Remarks:"备注",Fields:"字段",Description:"描述",Example:"例子","Enum members":"枚举成员",statement:"声明",loop:"循环","`click` on keyword for more help":"“点击”关键词以获得更多帮助","new indicator":"新建指标","new strategy":"新建策略"};_t.use(Ku).use(W3).init({debug:!1,fallbackLng:"zh",interpolation:{escapeValue:!1},resources:{en:{translation:L3},zh:{translation:N3}}}),self.MonacoEnvironment={getWorker(){return new r3({name:"Editor Worker"})}},_i.config({paths:{vs:"https://www.tradingvue.com/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});const B3=(e,t)=>{const{height:s,width:a,theme:o,options:i,hasDiff:c,readOnly:p,defaultValue:d,language:u,onChange:m,onLinkOpen:_,onCursorPositionChange:b,onActionTrigger:z,onEditorDidMount:M,onVersionChange:h}=e,{t:w,i18n:I}=c0(),g=X.useRef(null),A=X.useRef(null),v=X.useRef(!1),L=X.useRef(!1);X.useImperativeHandle(t,()=>({setOriginalScript(k){var H;(H=g.current)==null||H.setOriginalScript(k)},setScript(k){var H;(H=g.current)==null||H.setValue(k)},gotoLine(){var k;(k=g.current)==null||k.gotoLine()},getEditorLayout(){var k;return(k=g.current)==null?void 0:k.getEditorLayout()},setPosition(k,H){var $;($=g.current)==null||$.setPosition({column:k,lineNumber:H})},setModelMarkers(k){var H;L.current=!0,(H=g.current)==null||H.setModelMarkers(k),setTimeout(()=>{L.current=!1},2e3)},focus(){var k;(k=g.current)==null||k.focus()}})),X.useEffect(()=>{var k,H;c?(H=g.current)==null||H.addDiffDecorations():(k=g.current)==null||k.removeDiffDecorations()},[c]),X.useEffect(()=>{o&&we.editor.setTheme(o)},[o]),X.useEffect(()=>{u&&I.changeLanguage(u)},[u]),X.useEffect(()=>{var k;(k=g.current)==null||k.updateActionTrigger(z)},[z]),X.useEffect(()=>{var k;_&&((k=g.current)==null||k.addLinkOpenFunc(_))},[_]);function R(k,H){var G,V;po.setEditor(k,H),g.current=new Ph(k,H,z),_&&((G=g.current)==null||G.addLinkOpenFunc(_)),c&&((V=g.current)==null||V.addDiffDecorations()),Xx(k),requestAnimationFrame(q);const $=k.getValue();g.current.onChangeCursorPosition(b),m&&m($),!p&&T($),M&&M()}const T=X.useCallback(k=>Ze(this,null,function*(){var xe,gt;const H=(xe=g.current)==null?void 0:xe.getVersion();h&&h(H||lr),v.current=!1;const{errors:$,functions:G,methods:V,types:Z,variables:ge,overloadsFuncs:de,imports:Q,enums:ue}=yield Bu(k,!1,H),S=new Map(Object.entries(G)),j=new Map(Object.entries(V)),J=new Map(Object.entries(Z)),Y=new Map(Object.entries(ge)),De=new Map(Object.entries(Q)),Ie=new Map(Object.entries(ue));Qr.setUserDefined({functions:S,methods:j,types:J,variables:Y,imports:De,enums:Ie},de),Ys.setUserDefind(S,J,Y,j,Ie);const Te=$.map(Rt=>nt(be({},Rt),{severity:Rt.type||we.MarkerSeverity.Error}));p||!v.current&&!L.current&&Te.length&&((gt=g.current)==null||gt.setModelMarkers(Te))}),[p]),W=X.useMemo(()=>qx.debounce(T,1500),[T]);function K(k){var H;if(p){T(k||"");return}v.current=!0,po.clearInlayHints(),(H=g.current)==null||H.setModelMarkers([]),k!==void 0&&(m&&m(k),W(k))}const q=X.useCallback(()=>{var H,$;const k=(H=A.current)==null?void 0:H.getBoundingClientRect();($=g.current)==null||$.setEditorLayout((k==null?void 0:k.height)||0,k==null?void 0:k.width)},[]);return X.useEffect(()=>{const k=()=>{window.requestAnimationFrame(q)},H=new ResizeObserver(k);return A.current&&H.observe(A.current),()=>{var $;A.current&&H.unobserve(A.current),H.disconnect(),($=g.current)==null||$.dispose()}},[]),E.jsx("div",{ref:A,children:E.jsx(cf,{height:s,width:a||"100%",defaultLanguage:It,defaultValue:d||`//@version=6
108
108
  indicator("我的脚本")
109
109
  plot(close)
110
110
  `,theme:o||"vs-dark",className:`tvue-script ${o||"vs-dark"}`,options:be(nt(be({colorDecorators:!0,useShadowDOM:!1,matchOnWordStartOnly:!0,automaticLayout:!1,unicodeHighlight:{allowedCharacters:{" ":!0}},suggest:{filterGraceful:!0},stickyScroll:{enabled:!1},fontSize:13},p?df:{}),{readOnlyMessage:{value:w("This script is read-only. It cannot be edited.")}}),i),onMount:R,onChange:K})})},C3=X.forwardRef(B3),E3=e=>{const{theme:t,modified:s,original:a,height:o,width:i,renderSideBySide:c=!0,version:p=lr,onDidLayoutChange:d}=e,u=X.useCallback((m,_)=>Ze(this,null,function*(){_.languages.register({id:It}),_.editor.defineTheme("vs-dark",_1),_.editor.defineTheme("vs",b1);const b=yield io(p);b&&(_.languages.setMonarchTokensProvider(It,b.LANGUAGE_MONARCH_TOKENS),_.languages.setLanguageConfiguration(It,b.CONFIGURATION)),d&&m.getModifiedEditor().onDidLayoutChange(z=>{d(z,m.getOriginalEditor().getLayoutInfo())})}),[p]);return E.jsx(rf,{height:o||"90vh",width:i||"100%",theme:t||"vs-dark",options:{readOnly:!0,renderSideBySide:c,scrollBeyondLastLine:!1,renderSideBySideInlineBreakpoint:600,stickyScroll:{enabled:!1}},language:It,modified:s,original:a,onMount:u})};var Mo={},S3=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,s=[],a=0;a<e.rangeCount;a++)s.push(e.getRangeAt(a));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||s.forEach(function(o){e.addRange(o)}),t&&t.focus()}},X3=S3,Yu={"text/plain":"Text","text/html":"Url",default:"Text"},F3="Copy to clipboard: #{key}, Enter";function P3(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function K3(e,t){var s,a,o,i,c,p,d=!1;t||(t={}),s=t.debug||!1;try{o=X3(),i=document.createRange(),c=document.getSelection(),p=document.createElement("span"),p.textContent=e,p.ariaHidden="true",p.style.all="unset",p.style.position="fixed",p.style.top=0,p.style.clip="rect(0, 0, 0, 0)",p.style.whiteSpace="pre",p.style.webkitUserSelect="text",p.style.MozUserSelect="text",p.style.msUserSelect="text",p.style.userSelect="text",p.addEventListener("copy",function(m){if(m.stopPropagation(),t.format)if(m.preventDefault(),typeof m.clipboardData=="undefined"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var _=Yu[t.format]||Yu.default;window.clipboardData.setData(_,e)}else m.clipboardData.clearData(),m.clipboardData.setData(t.format,e);t.onCopy&&(m.preventDefault(),t.onCopy(m.clipboardData))}),document.body.appendChild(p),i.selectNodeContents(p),c.addRange(i);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");d=!0}catch(m){s&&console.error("unable to copy using execCommand: ",m),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),d=!0}catch(_){s&&console.error("unable to copy using clipboardData: ",_),s&&console.error("falling back to prompt"),a=P3("message"in t?t.message:F3),window.prompt(a,e)}}finally{c&&(typeof c.removeRange=="function"?c.removeRange(i):c.removeAllRanges()),p&&document.body.removeChild(p),o()}return d}var U3=K3;Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.CopyToClipboard=void 0;var H3=Vu(U3),zo=Vu(X),j3=["text","onCopy","options","children"];function Vu(e){return e&&e.__esModule?e:{default:e}}function p0(e){"@babel/helpers - typeof";return p0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p0(e)}function Qu(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),s.push.apply(s,a)}return s}function Zu(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Qu(Object(s),!0).forEach(function(a){ul(e,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Qu(Object(s)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(s,a))})}return e}function $3(e,t){if(e==null)return{};var s,a,o=G3(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],t.indexOf(s)===-1&&{}.propertyIsEnumerable.call(e,s)&&(o[s]=e[s])}return o}function G3(e,t){if(e==null)return{};var s={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;s[a]=e[a]}return s}function Y3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V3(e,t){for(var s=0;s<t.length;s++){var a=t[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,em(a.key),a)}}function Q3(e,t,s){return t&&V3(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z3(e,t,s){return t=xo(t),J3(e,Ju()?Reflect.construct(t,s||[],xo(e).constructor):t.apply(e,s))}function J3(e,t){if(t&&(p0(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eO(e)}function eO(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ju(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ju=function(){return!!e})()}function xo(e){return xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xo(e)}function tO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dl(e,t)}function dl(e,t){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},dl(e,t)}function ul(e,t,s){return(t=em(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function em(e){var t=sO(e,"string");return p0(t)=="symbol"?t:t+""}function sO(e,t){if(p0(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var a=s.call(e,t);if(p0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rO=Mo.CopyToClipboard=function(e){function t(){var s;Y3(this,t);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return s=Z3(this,t,[].concat(o)),ul(s,"onClick",function(c){var p=s.props,d=p.text,u=p.onCopy,m=p.children,_=p.options,b=zo.default.Children.only(m),z=(0,H3.default)(d,_);u&&u(d,z),b!=null&&b.props&&typeof b.props.onClick=="function"&&b.props.onClick(c)}),s}return tO(t,e),Q3(t,[{key:"render",value:function(){var a=this.props;a.text,a.onCopy,a.options;var o=a.children,i=$3(a,j3),c=zo.default.Children.only(o);return zo.default.cloneElement(c,Zu(Zu({},i),{},{onClick:this.onClick}))}}])}(zo.default.PureComponent);ul(rO,"defaultProps",{onCopy:void 0,options:void 0});var aO=Mo,ml=aO.CopyToClipboard;ml.CopyToClipboard=ml;var nO=ml;const d0=Ks(nO);we.languages.register({id:It}),we.editor.defineTheme("vs-dark",_1),we.editor.defineTheme("vs",b1);const tm=[{label:"版本 v3",version:3},{label:"版本 v4",version:4},{label:"版本 v5",version:5},{label:"版本 v6",version:6}];function yl(e){return Ze(this,null,function*(){const t=yield io(e);t&&(we.languages.setMonarchTokensProvider(It,t.LANGUAGE_MONARCH_TOKENS),we.languages.setLanguageConfiguration(It,t.CONFIGURATION))})}function sm(e,t,s){return Ze(this,null,function*(){return t&&we.editor.setTheme(t.includes("dark")?"vs-dark":"light"),s&&(yield yl(s)),yield we.editor.colorize(e,It,{tabSize:4})})}function bl(e,t=0){return Ze(this,null,function*(){const s=e[t];if(!s)return;const{name:a,args:o,type:i,desc:c,examples:p,remarks:d,seeAlso:u,syntax:m,detailedDesc:_,fields:b,returns:z}=s,M={name:a,orirginalName:a};if(e.length>1&&(M.overloads=`${e.length} ${_t.t("overloads")}`),i&&(M.type=i),o&&(M.name=`${a}()`,M.args=o.map(h=>{const{name:w,desc:I,displayType:g}=h;return{label:`${w} (${g})`,desc:I&&ka(I)}})),c&&(M.desc=c.map(h=>ka(h))),p&&(M.originalExample=p.join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guihz/trading-vue-editor-tes",
3
- "version": "0.1.111",
3
+ "version": "0.1.112",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "lib"