@lark-apaas/miaoda-coding-sdk 0.0.14 → 0.0.15-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -761,7 +761,7 @@ var MiaodaRuntime = (() => {
761
761
  __name(initCreativePvTracking, "initCreativePvTracking");
762
762
 
763
763
  // src/design-runtime.ts
764
- var version = "0.0.14";
764
+ var version = "0.0.15-beta.0";
765
765
  var name = "@lark-apaas/miaoda-coding-sdk";
766
766
  if (!window.__CREATIVITY_RUNTIME__) {
767
767
  window.__CREATIVITY_RUNTIME__ = true;
@@ -761,7 +761,7 @@ var MiaodaRuntime = (() => {
761
761
  __name(initCreativePvTracking, "initCreativePvTracking");
762
762
 
763
763
  // src/design-runtime.ts
764
- var version = "0.0.14";
764
+ var version = "0.0.15-beta.0";
765
765
  var name = "@lark-apaas/miaoda-coding-sdk";
766
766
  if (!window.__CREATIVITY_RUNTIME__) {
767
767
  window.__CREATIVITY_RUNTIME__ = true;
@@ -1 +1 @@
1
- "use strict";var MiaodaRuntime=(()=>{var y=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var i=(t,e)=>y(t,"name",{value:e,configurable:!0});var H=(t,e)=>{for(var r in e)y(t,r,{get:e[r],enumerable:!0})},K=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of V(e))!j.call(t,o)&&o!==r&&y(t,o,{get:()=>e[o],enumerable:!(n=U(e,o))||n.enumerable});return t};var X=t=>K(y({},"__esModule",{value:!0}),t);var _e={};H(_e,{name:()=>me,version:()=>he});var J=new Set(["text/babel","text/jsx"]),z=3e3,Y=15e3,q=1e3,G=20,P=!1;function A(){P||(P=!0,document.addEventListener("DOMContentLoaded",Q,{once:!0}))}i(A,"initCreativeBabelStages");function Q(){let t=W();if(!t.length)return;let e={fetchDur:0,transformDur:0,evalDur:0,externalCount:t.filter(o=>o.src).length},r={sent:!1,scriptsDone:!1,scriptsDoneAt:null,totalStart:null,renderStart:null,renderDur:null,takeover:!1,retries:0,hardTimer:null},n=window.Babel;if(!n||typeof n.transform!="function"||typeof n.disableScriptTags!="function"||e.externalCount>0&&typeof fetch!="function"){r.scriptsDone=!0,m(e,r);return}try{n.disableScriptTags()}catch{r.scriptsDone=!0,m(e,r);return}r.takeover=!0,r.totalStart=performance.now(),r.hardTimer=setTimeout(()=>m(e,r),Y),te(e,r),ee(n,t,e,r)}i(Q,"onDomContentLoaded");function W(){let t=document.getElementsByTagName("script"),e=[];for(let r=0;r<t.length;r++){let n=t[r];J.has((n.type||"").split(";")[0])&&e.push(n)}return e}i(W,"collectBabelScripts");function E(t,e){let r=t.getAttribute(e);return r===""?[]:r?r.split(",").map(n=>n.trim()):null}i(E,"attrList");function Z(t,e){var o,a,c;let r=t.getAttribute("data-type"),n={browsers:(o=E(t,"data-targets"))!=null?o:void 0};return r==="module"&&(n.esmodules="intersect"),{filename:e,presets:(a=E(t,"data-presets"))!=null?a:r==="module"?["react",["env",{modules:!1}]]:["react","env"],plugins:(c=E(t,"data-plugins"))!=null?c:["transform-class-properties","transform-object-rest-spread","transform-flow-strip-types"],sourceMaps:"inline",sourceFileName:e,targets:n}}i(Z,"buildOptions");function ee(t,e,r,n){let o=0,a=i((l,d)=>{var h;let p;if(l.src)p=l.src;else{let f=l.getAttribute("data-module");f?p=f:(o++,p=o===1?"Inline Babel script":`Inline Babel script (${o})`)}try{let f=performance.now(),v=t.transform(d,Z(l,p)),b=performance.now(),g=document.createElement("script"),w=l.getAttribute("data-type");w&&g.setAttribute("type",w),l.nonce&&(g.nonce=l.nonce),g.text=(h=v==null?void 0:v.code)!=null?h:"",document.head.appendChild(g),r.transformDur+=b-f,r.evalDur+=performance.now()-b}catch(f){console.error("[creative-babel-stages] script failed:",p,f)}},"runOne"),c=0;for(;c<e.length&&!e[c].src;)a(e[c],e[c].innerHTML),c++;if(c>=e.length){D(r,n);return}let u=e.slice(c),s=u.map(l=>{if(!l.src)return Promise.resolve(l.innerHTML);let d=performance.now();return fetch(l.src).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.text()}).then(p=>(r.fetchDur+=performance.now()-d,p))});(async()=>{for(let l=0;l<u.length;l++){let d=null;try{d=await s[l]}catch(p){console.error("[creative-babel-stages] load failed:",u[l].src,p);continue}a(u[l],d)}D(r,n)})()}i(ee,"runScripts");function te(t,e){let r=window.ReactDOM;if(!r)return;let n=i(c=>{if(e.renderStart===null){e.renderStart=performance.now();try{let u=new MutationObserver(()=>{u.disconnect(),e.renderDur=performance.now()-e.renderStart,e.scriptsDone&&m(t,e)});u.observe(c,{childList:!0,subtree:!0})}catch{}}},"observeCommit"),o=r.createRoot;typeof o=="function"&&(r.createRoot=(c,u)=>{let s=o.call(r,c,u),l=s.render.bind(s);return s.render=d=>(n(c),l(d)),s});let a=r.render;typeof a=="function"&&(r.render=(c,u,s)=>(n(u),a.call(r,c,u,s)))}i(te,"instrumentRender");function D(t,e){e.scriptsDone=!0,e.scriptsDoneAt=performance.now(),e.renderStart===null||e.renderDur!==null?m(t,e):setTimeout(()=>m(t,e),z)}i(D,"onScriptsDone");function m(t,e){var a;if(e.sent)return;let r=window.Slardar;if(!r){e.retries++<G&&setTimeout(()=>m(t,e),q);return}e.sent=!0,e.hardTimer!==null&&clearTimeout(e.hardTimer);let n=e.renderDur!==null&&e.renderStart!==null?e.renderStart+e.renderDur:(a=e.scriptsDoneAt)!=null?a:performance.now(),o=e.totalStart===null?0:Math.max(0,n-e.totalStart);r("sendEvent",{name:"creative_babel_stages",metrics:{babel_total_dur:Math.round(o),babel_fetch_dur:Math.round(t.fetchDur),babel_transform_dur:Math.round(t.transformDur),babel_eval_dur:Math.round(t.evalDur)},categories:{takeover:String(e.takeover),external:String(t.externalCount>0),render_observed:String(e.renderDur!==null)}})}i(m,"trySend");var re="https://lf3-short.ibytedapm.com/slardar/fe/sdk-web/browser.cn.js",R=!1;function M(){if(R)return;if(R=!0,window.Slardar){x();return}let t=document.createElement("script");t.src=re,t.onload=()=>{window.Slardar&&x()},t.onerror=()=>{},document.head.appendChild(t)}i(M,"initCreativePerf");function x(){var o,a,c;let t=window.Slardar;if(!t)return;let e=null;t("context.merge",{app_id:(o=window.__appId__)!=null?o:"",creative_type:(a=window.__creativeType__)!=null?a:"unknown",is_public:String((c=window.__isExternallyVisible__)!=null?c:!1)}),t("init",{bid:"apaas_miaoda",env:window.ENVIRONMENT||"online"}),t("start");try{new PerformanceObserver(u=>{for(let s of u.getEntries())if(s.name==="first-contentful-paint"){e=s.startTime,t("context.merge",{has_painted:"true"});break}}).observe({type:"paint",buffered:!0})}catch{}let r=!1,n=i(()=>{if(r||!window.Slardar)return;r=!0;let u=performance.getEntriesByType("resource"),s=performance.getEntriesByType("navigation")[0],l=e!=null?e:ne(),d={transfer_size:u.reduce((p,h)=>{var f;return p+((f=h.transferSize)!=null?f:0)},0)};s&&s.domContentLoadedEventEnd>=s.responseStart&&(d.ttfb_to_dom_ready_dur=Math.round(s.domContentLoadedEventEnd-s.responseStart)),s&&l!==null&&l>=s.domContentLoadedEventEnd&&(d.render_to_fcp_dur=Math.round(l-s.domContentLoadedEventEnd)),window.Slardar("sendEvent",{name:"creative_perf",metrics:d})},"send");window.addEventListener("load",()=>setTimeout(n,500)),setTimeout(n,15e3)}i(x,"bootstrap");function ne(){var r;let e=performance.getEntriesByType("paint").find(n=>n.name==="first-contentful-paint");return(r=e==null?void 0:e.startTime)!=null?r:null}i(ne,"getBufferedFcpStartTime");function k(){let t="inspector-id";document.addEventListener("DOMContentLoaded",()=>{let e=window.Babel;if(!e||!e.registerPlugin)return;let r=null,n=i(()=>{let a={},c=0;return document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach(u=>{let s=u.getAttribute("src");if(s){let l=s.split("?")[0],d=l.split("/").pop()||l;a[d]=d in a?"":l}else{c++;let l=c===1?"Inline Babel script":`Inline Babel script (${c})`;a[l]=u.getAttribute("data-filename")||`inline-${c-1}`}}),a},"buildFileMap");e.availablePlugins&&delete e.availablePlugins[t],e.registerPlugin(t,({types:a})=>({visitor:{JSXOpeningElement(c,u){let s=c.node;if(s.name&&s.name.type==="JSXMemberExpression")return;for(let S=0;S<s.attributes.length;S++){let T=s.attributes[S];if(T.type==="JSXAttribute"&&T.name&&T.name.name==="data-inspector-id")return}let l=u.file&&u.file.opts&&u.file.opts.filename||"?";r===null&&(r=n());let d=l.split("?")[0],p=d.split("/").pop()||d,h=r[l]||r[p]||d.replace(/^\/?[a-z][a-z0-9+.-]*:\/{1,2}[^/]+/i,"").replace(/^\/+/,"")||l,f=s.loc&&s.loc.start,v=f?f.line:0,b=f?f.column+1:0,g=s.name&&s.name.type==="JSXIdentifier"?s.name.name:h,w=`jsx:${h}:${g}:${v}:${b}`;s.attributes.push(a.jsxAttribute(a.jsxIdentifier("data-inspector-id"),a.stringLiteral(w)))}}}));let o="";try{let a=document.getElementById("__srcmap");if(a&&a.textContent){let c=JSON.parse(a.textContent),u=c==null?void 0:c.file;typeof u=="string"&&(o=u)}}catch{}document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach((a,c)=>{let u=a.getAttribute("data-plugins")||"";if(u.indexOf(t)<0&&a.setAttribute("data-plugins",u?`${u},${t}`:t),!a.hasAttribute("data-filename")){let s=o?`${o}#inline-${c}`:`inline-${c}`;a.setAttribute("data-filename",a.getAttribute("src")||s)}})})}i(k,"registerInspectorIdPlugin");function C(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}let t="";for(let e=0;e<16;e++)t+=Math.floor(Math.random()*16).toString(16);return t}i(C,"generateUUID");var L="x_sdk_device_id";function ie(){try{let t=localStorage.getItem(L);return t||(t=C(),localStorage.setItem(L,t)),t}catch{return C()}}i(ie,"getDeviceId");function oe(){let t=typeof navigator!="undefined"?navigator.userAgent:"";return t&&(/Android/i.test(t)&&/Mobile/i.test(t)||/iPhone|iPod/i.test(t)||/BlackBerry|IEMobile|Opera Mini/i.test(t))?"mobile":"desktop"}i(oe,"getDeviceType");var se="pageSessionID";function ae(){try{return new URLSearchParams(window.location.search).get(se)||""}catch{return""}}i(ae,"getPvId");function ce(t={}){let e=t.pvId||ae();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:ie(),module:"app_web",app_env:"runtime",source_type:"user",device_type:oe(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(ce,"getDefaultAttributes");function N(t){let e=Math.round(t);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${t}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(N,"toNanoString");var le="1.0.2";function ue(t,e){let r=ce(e),n=N(Date.now());return{metricsData:{resource:{attributes:{sdk_version:le,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:t.map(o=>({attributes:{...r,url:o.url,path:o.path,referrer:o.referrer},startTimeUnixNano:N(o.timestampMs),timeUnixNano:n,asDouble:1}))}}]}}}i(ue,"buildPayload");function de(t,e,r={},n){if(e.length===0)return;let o;try{o=JSON.stringify(ue(e,n))}catch{return}try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...r},body:o,keepalive:!0}).catch(()=>{})}catch{}}i(de,"sendPvData");var I="__APAAS_PV_TRACKER_STARTED__";function pe(){try{let t=window;return t[I]?!1:(t[I]=!0,!0)}catch{return!0}}i(pe,"claimPvReporting");function B(){try{window[I]=!1}catch{}}i(B,"releasePvReporting");var _,fe=(_=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new _),this._instance}start(e){var r;if(!this.started&&pe()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let n=(r=e.flushIntervalMs)!=null?r:1e4;this.flushTimer=setInterval(()=>this.flush(),n)}catch(n){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,B(),n}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,B())}pageKey(){let{origin:e,pathname:r,search:n}=window.location;return`${e}${r}${n}`}scheduleFirstFlush(){var e;let r=(e=this.config)==null?void 0:e.firstFlushDelayMs;r==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),r))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);de(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let r=history[e],n=i(()=>this.recordPv(),"recordPv");history[e]=function(...o){let a=r.apply(this,o);return n(),a},this.disposers.push(()=>{history[e]=r})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let r=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",r),this.disposers.push(()=>window.removeEventListener("pagehide",r))}},i(_,"_PvTracker"),_),O=fe.instance;function $(){return window.appId||null}i($,"getAppId");function F(){var e;let t=(e=$())!=null?e:"";O.start({collectorUrl:`/app/${t}/__runtime__/api/v1/observability/metrics/collect`,firstFlushDelayMs:1e3})}i(F,"initCreativePvTracking");var he="0.0.14",me="@lark-apaas/miaoda-coding-sdk";window.__CREATIVITY_RUNTIME__||(window.__CREATIVITY_RUNTIME__=!0,k(),M(),F(),A());return X(_e);})();
1
+ "use strict";var MiaodaRuntime=(()=>{var y=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var j=Object.prototype.hasOwnProperty;var i=(t,e)=>y(t,"name",{value:e,configurable:!0});var H=(t,e)=>{for(var r in e)y(t,r,{get:e[r],enumerable:!0})},K=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of V(e))!j.call(t,o)&&o!==r&&y(t,o,{get:()=>e[o],enumerable:!(n=U(e,o))||n.enumerable});return t};var X=t=>K(y({},"__esModule",{value:!0}),t);var _e={};H(_e,{name:()=>me,version:()=>he});var J=new Set(["text/babel","text/jsx"]),z=3e3,Y=15e3,q=1e3,G=20,P=!1;function A(){P||(P=!0,document.addEventListener("DOMContentLoaded",Q,{once:!0}))}i(A,"initCreativeBabelStages");function Q(){let t=W();if(!t.length)return;let e={fetchDur:0,transformDur:0,evalDur:0,externalCount:t.filter(o=>o.src).length},r={sent:!1,scriptsDone:!1,scriptsDoneAt:null,totalStart:null,renderStart:null,renderDur:null,takeover:!1,retries:0,hardTimer:null},n=window.Babel;if(!n||typeof n.transform!="function"||typeof n.disableScriptTags!="function"||e.externalCount>0&&typeof fetch!="function"){r.scriptsDone=!0,m(e,r);return}try{n.disableScriptTags()}catch{r.scriptsDone=!0,m(e,r);return}r.takeover=!0,r.totalStart=performance.now(),r.hardTimer=setTimeout(()=>m(e,r),Y),te(e,r),ee(n,t,e,r)}i(Q,"onDomContentLoaded");function W(){let t=document.getElementsByTagName("script"),e=[];for(let r=0;r<t.length;r++){let n=t[r];J.has((n.type||"").split(";")[0])&&e.push(n)}return e}i(W,"collectBabelScripts");function E(t,e){let r=t.getAttribute(e);return r===""?[]:r?r.split(",").map(n=>n.trim()):null}i(E,"attrList");function Z(t,e){var o,a,c;let r=t.getAttribute("data-type"),n={browsers:(o=E(t,"data-targets"))!=null?o:void 0};return r==="module"&&(n.esmodules="intersect"),{filename:e,presets:(a=E(t,"data-presets"))!=null?a:r==="module"?["react",["env",{modules:!1}]]:["react","env"],plugins:(c=E(t,"data-plugins"))!=null?c:["transform-class-properties","transform-object-rest-spread","transform-flow-strip-types"],sourceMaps:"inline",sourceFileName:e,targets:n}}i(Z,"buildOptions");function ee(t,e,r,n){let o=0,a=i((l,d)=>{var h;let p;if(l.src)p=l.src;else{let f=l.getAttribute("data-module");f?p=f:(o++,p=o===1?"Inline Babel script":`Inline Babel script (${o})`)}try{let f=performance.now(),v=t.transform(d,Z(l,p)),b=performance.now(),g=document.createElement("script"),w=l.getAttribute("data-type");w&&g.setAttribute("type",w),l.nonce&&(g.nonce=l.nonce),g.text=(h=v==null?void 0:v.code)!=null?h:"",document.head.appendChild(g),r.transformDur+=b-f,r.evalDur+=performance.now()-b}catch(f){console.error("[creative-babel-stages] script failed:",p,f)}},"runOne"),c=0;for(;c<e.length&&!e[c].src;)a(e[c],e[c].innerHTML),c++;if(c>=e.length){D(r,n);return}let u=e.slice(c),s=u.map(l=>{if(!l.src)return Promise.resolve(l.innerHTML);let d=performance.now();return fetch(l.src).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.text()}).then(p=>(r.fetchDur+=performance.now()-d,p))});(async()=>{for(let l=0;l<u.length;l++){let d=null;try{d=await s[l]}catch(p){console.error("[creative-babel-stages] load failed:",u[l].src,p);continue}a(u[l],d)}D(r,n)})()}i(ee,"runScripts");function te(t,e){let r=window.ReactDOM;if(!r)return;let n=i(c=>{if(e.renderStart===null){e.renderStart=performance.now();try{let u=new MutationObserver(()=>{u.disconnect(),e.renderDur=performance.now()-e.renderStart,e.scriptsDone&&m(t,e)});u.observe(c,{childList:!0,subtree:!0})}catch{}}},"observeCommit"),o=r.createRoot;typeof o=="function"&&(r.createRoot=(c,u)=>{let s=o.call(r,c,u),l=s.render.bind(s);return s.render=d=>(n(c),l(d)),s});let a=r.render;typeof a=="function"&&(r.render=(c,u,s)=>(n(u),a.call(r,c,u,s)))}i(te,"instrumentRender");function D(t,e){e.scriptsDone=!0,e.scriptsDoneAt=performance.now(),e.renderStart===null||e.renderDur!==null?m(t,e):setTimeout(()=>m(t,e),z)}i(D,"onScriptsDone");function m(t,e){var a;if(e.sent)return;let r=window.Slardar;if(!r){e.retries++<G&&setTimeout(()=>m(t,e),q);return}e.sent=!0,e.hardTimer!==null&&clearTimeout(e.hardTimer);let n=e.renderDur!==null&&e.renderStart!==null?e.renderStart+e.renderDur:(a=e.scriptsDoneAt)!=null?a:performance.now(),o=e.totalStart===null?0:Math.max(0,n-e.totalStart);r("sendEvent",{name:"creative_babel_stages",metrics:{babel_total_dur:Math.round(o),babel_fetch_dur:Math.round(t.fetchDur),babel_transform_dur:Math.round(t.transformDur),babel_eval_dur:Math.round(t.evalDur)},categories:{takeover:String(e.takeover),external:String(t.externalCount>0),render_observed:String(e.renderDur!==null)}})}i(m,"trySend");var re="https://lf3-short.ibytedapm.com/slardar/fe/sdk-web/browser.cn.js",R=!1;function M(){if(R)return;if(R=!0,window.Slardar){x();return}let t=document.createElement("script");t.src=re,t.onload=()=>{window.Slardar&&x()},t.onerror=()=>{},document.head.appendChild(t)}i(M,"initCreativePerf");function x(){var o,a,c;let t=window.Slardar;if(!t)return;let e=null;t("context.merge",{app_id:(o=window.__appId__)!=null?o:"",creative_type:(a=window.__creativeType__)!=null?a:"unknown",is_public:String((c=window.__isExternallyVisible__)!=null?c:!1)}),t("init",{bid:"apaas_miaoda",env:window.ENVIRONMENT||"online"}),t("start");try{new PerformanceObserver(u=>{for(let s of u.getEntries())if(s.name==="first-contentful-paint"){e=s.startTime,t("context.merge",{has_painted:"true"});break}}).observe({type:"paint",buffered:!0})}catch{}let r=!1,n=i(()=>{if(r||!window.Slardar)return;r=!0;let u=performance.getEntriesByType("resource"),s=performance.getEntriesByType("navigation")[0],l=e!=null?e:ne(),d={transfer_size:u.reduce((p,h)=>{var f;return p+((f=h.transferSize)!=null?f:0)},0)};s&&s.domContentLoadedEventEnd>=s.responseStart&&(d.ttfb_to_dom_ready_dur=Math.round(s.domContentLoadedEventEnd-s.responseStart)),s&&l!==null&&l>=s.domContentLoadedEventEnd&&(d.render_to_fcp_dur=Math.round(l-s.domContentLoadedEventEnd)),window.Slardar("sendEvent",{name:"creative_perf",metrics:d})},"send");window.addEventListener("load",()=>setTimeout(n,500)),setTimeout(n,15e3)}i(x,"bootstrap");function ne(){var r;let e=performance.getEntriesByType("paint").find(n=>n.name==="first-contentful-paint");return(r=e==null?void 0:e.startTime)!=null?r:null}i(ne,"getBufferedFcpStartTime");function k(){let t="inspector-id";document.addEventListener("DOMContentLoaded",()=>{let e=window.Babel;if(!e||!e.registerPlugin)return;let r=null,n=i(()=>{let a={},c=0;return document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach(u=>{let s=u.getAttribute("src");if(s){let l=s.split("?")[0],d=l.split("/").pop()||l;a[d]=d in a?"":l}else{c++;let l=c===1?"Inline Babel script":`Inline Babel script (${c})`;a[l]=u.getAttribute("data-filename")||`inline-${c-1}`}}),a},"buildFileMap");e.availablePlugins&&delete e.availablePlugins[t],e.registerPlugin(t,({types:a})=>({visitor:{JSXOpeningElement(c,u){let s=c.node;if(s.name&&s.name.type==="JSXMemberExpression")return;for(let S=0;S<s.attributes.length;S++){let T=s.attributes[S];if(T.type==="JSXAttribute"&&T.name&&T.name.name==="data-inspector-id")return}let l=u.file&&u.file.opts&&u.file.opts.filename||"?";r===null&&(r=n());let d=l.split("?")[0],p=d.split("/").pop()||d,h=r[l]||r[p]||d.replace(/^\/?[a-z][a-z0-9+.-]*:\/{1,2}[^/]+/i,"").replace(/^\/+/,"")||l,f=s.loc&&s.loc.start,v=f?f.line:0,b=f?f.column+1:0,g=s.name&&s.name.type==="JSXIdentifier"?s.name.name:h,w=`jsx:${h}:${g}:${v}:${b}`;s.attributes.push(a.jsxAttribute(a.jsxIdentifier("data-inspector-id"),a.stringLiteral(w)))}}}));let o="";try{let a=document.getElementById("__srcmap");if(a&&a.textContent){let c=JSON.parse(a.textContent),u=c==null?void 0:c.file;typeof u=="string"&&(o=u)}}catch{}document.querySelectorAll('script[type="text/babel"],script[type="text/jsx"]').forEach((a,c)=>{let u=a.getAttribute("data-plugins")||"";if(u.indexOf(t)<0&&a.setAttribute("data-plugins",u?`${u},${t}`:t),!a.hasAttribute("data-filename")){let s=o?`${o}#inline-${c}`:`inline-${c}`;a.setAttribute("data-filename",a.getAttribute("src")||s)}})})}i(k,"registerInspectorIdPlugin");function C(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("")}let t="";for(let e=0;e<16;e++)t+=Math.floor(Math.random()*16).toString(16);return t}i(C,"generateUUID");var L="x_sdk_device_id";function ie(){try{let t=localStorage.getItem(L);return t||(t=C(),localStorage.setItem(L,t)),t}catch{return C()}}i(ie,"getDeviceId");function oe(){let t=typeof navigator!="undefined"?navigator.userAgent:"";return t&&(/Android/i.test(t)&&/Mobile/i.test(t)||/iPhone|iPod/i.test(t)||/BlackBerry|IEMobile|Opera Mini/i.test(t))?"mobile":"desktop"}i(oe,"getDeviceType");var se="pageSessionID";function ae(){try{return new URLSearchParams(window.location.search).get(se)||""}catch{return""}}i(ae,"getPvId");function ce(t={}){let e=t.pvId||ae();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:ie(),module:"app_web",app_env:"runtime",source_type:"user",device_type:oe(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(ce,"getDefaultAttributes");function N(t){let e=Math.round(t);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${t}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(N,"toNanoString");var le="1.0.2";function ue(t,e){let r=ce(e),n=N(Date.now());return{metricsData:{resource:{attributes:{sdk_version:le,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:t.map(o=>({attributes:{...r,url:o.url,path:o.path,referrer:o.referrer},startTimeUnixNano:N(o.timestampMs),timeUnixNano:n,asDouble:1}))}}]}}}i(ue,"buildPayload");function de(t,e,r={},n){if(e.length===0)return;let o;try{o=JSON.stringify(ue(e,n))}catch{return}try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...r},body:o,keepalive:!0}).catch(()=>{})}catch{}}i(de,"sendPvData");var I="__APAAS_PV_TRACKER_STARTED__";function pe(){try{let t=window;return t[I]?!1:(t[I]=!0,!0)}catch{return!0}}i(pe,"claimPvReporting");function B(){try{window[I]=!1}catch{}}i(B,"releasePvReporting");var _,fe=(_=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new _),this._instance}start(e){var r;if(!this.started&&pe()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let n=(r=e.flushIntervalMs)!=null?r:1e4;this.flushTimer=setInterval(()=>this.flush(),n)}catch(n){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,B(),n}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,B())}pageKey(){let{origin:e,pathname:r,search:n}=window.location;return`${e}${r}${n}`}scheduleFirstFlush(){var e;let r=(e=this.config)==null?void 0:e.firstFlushDelayMs;r==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),r))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);de(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let r=history[e],n=i(()=>this.recordPv(),"recordPv");history[e]=function(...o){let a=r.apply(this,o);return n(),a},this.disposers.push(()=>{history[e]=r})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let r=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",r),this.disposers.push(()=>window.removeEventListener("pagehide",r))}},i(_,"_PvTracker"),_),O=fe.instance;function $(){return window.appId||null}i($,"getAppId");function F(){var e;let t=(e=$())!=null?e:"";O.start({collectorUrl:`/app/${t}/__runtime__/api/v1/observability/metrics/collect`,firstFlushDelayMs:1e3})}i(F,"initCreativePvTracking");var he="0.0.15-beta.0",me="@lark-apaas/miaoda-coding-sdk";window.__CREATIVITY_RUNTIME__||(window.__CREATIVITY_RUNTIME__=!0,k(),M(),F(),A());return X(_e);})();
@@ -1421,6 +1421,92 @@ var MiaodaRuntime = (() => {
1421
1421
  }
1422
1422
  __name(initPvTracking, "initPvTracking");
1423
1423
 
1424
+ // src/runtime/feishu-feed-jsbridge.ts
1425
+ var LARK_UA_RE = /\bLark\//i;
1426
+ function isFeishuClient() {
1427
+ var _a2, _b, _c, _d;
1428
+ const w = window;
1429
+ if (typeof ((_c = (_b = (_a2 = w.webkit) == null ? void 0 : _a2.messageHandlers) == null ? void 0 : _b.invokeNative) == null ? void 0 : _c.postMessage) === "function") return true;
1430
+ if (typeof ((_d = w.Lark_Bridge) == null ? void 0 : _d.invokeNative) === "function") return true;
1431
+ return LARK_UA_RE.test(navigator.userAgent);
1432
+ }
1433
+ __name(isFeishuClient, "isFeishuClient");
1434
+ function markMiaodaFeedMessagesRead({ messageIds, token, docType = 113 }) {
1435
+ var _a2, _b;
1436
+ if (messageIds.length === 0 || !token) return false;
1437
+ const payload = {
1438
+ apiName: "markMiaodaFeedMessagesRead",
1439
+ data: {
1440
+ __v2__: true,
1441
+ messageIds: messageIds.map(String),
1442
+ token,
1443
+ docType
1444
+ }
1445
+ };
1446
+ const w = window;
1447
+ const iosBridge = (_b = (_a2 = w.webkit) == null ? void 0 : _a2.messageHandlers) == null ? void 0 : _b.invokeNative;
1448
+ if (iosBridge == null ? void 0 : iosBridge.postMessage) {
1449
+ iosBridge.postMessage(payload);
1450
+ return true;
1451
+ }
1452
+ const androidBridge = w.Lark_Bridge;
1453
+ if (androidBridge == null ? void 0 : androidBridge.invokeNative) {
1454
+ androidBridge.invokeNative(JSON.stringify(payload));
1455
+ return true;
1456
+ }
1457
+ return false;
1458
+ }
1459
+ __name(markMiaodaFeedMessagesRead, "markMiaodaFeedMessagesRead");
1460
+
1461
+ // src/runtime/mark-feed-read.ts
1462
+ var DOC_TYPE = 113;
1463
+ var API_PATH_PREFIX = "/app/";
1464
+ var API_PATH_SUFFIX = "/__runtime__/api/v1/devops/read_lark_messages";
1465
+ function extractMessageIds(payload) {
1466
+ if (!payload || typeof payload !== "object") return [];
1467
+ const { data } = payload;
1468
+ if (Array.isArray(data)) return data.map(String);
1469
+ if (data && Array.isArray(data.message_ids)) {
1470
+ return data.message_ids.map(String);
1471
+ }
1472
+ return [];
1473
+ }
1474
+ __name(extractMessageIds, "extractMessageIds");
1475
+ var markedOnce = false;
1476
+ async function fetchFeedMessageIds(appId) {
1477
+ var _a2;
1478
+ const response = await fetch(`${API_PATH_PREFIX}${appId}${API_PATH_SUFFIX}`, {
1479
+ method: "POST",
1480
+ credentials: "same-origin",
1481
+ headers: {
1482
+ "Content-Type": "application/json",
1483
+ "X-Suda-Csrf-Token": (_a2 = getCsrfToken()) != null ? _a2 : ""
1484
+ }
1485
+ });
1486
+ if (!response.ok) return [];
1487
+ const json = await response.json();
1488
+ return extractMessageIds(json);
1489
+ }
1490
+ __name(fetchFeedMessageIds, "fetchFeedMessageIds");
1491
+ async function markFeedReadOnce() {
1492
+ if (markedOnce) return;
1493
+ if (!isFeishuClient()) return;
1494
+ markedOnce = true;
1495
+ const appId = getAppId();
1496
+ if (!appId) return;
1497
+ try {
1498
+ const ids = await fetchFeedMessageIds(appId);
1499
+ if (!ids.length) return;
1500
+ markMiaodaFeedMessagesRead({
1501
+ messageIds: ids,
1502
+ token: appId,
1503
+ docType: DOC_TYPE
1504
+ });
1505
+ } catch {
1506
+ }
1507
+ }
1508
+ __name(markFeedReadOnce, "markFeedReadOnce");
1509
+
1424
1510
  // src/runtime/watermark.ts
1425
1511
  var CDN = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp";
1426
1512
  var DOUBAO_LOGO_SRC = `${CDN}/miaoda-ui/doubao.svg`;
@@ -1827,12 +1913,13 @@ var MiaodaRuntime = (() => {
1827
1913
  __name(mountDoubaoWatermark, "mountDoubaoWatermark");
1828
1914
 
1829
1915
  // src/doubao-runtime.ts
1830
- var version = "0.0.14";
1916
+ var version = "0.0.15-beta.0";
1831
1917
  var name = "@lark-apaas/miaoda-coding-sdk";
1832
1918
  if (isOnlineEnv()) {
1833
1919
  reportPageView();
1834
1920
  initPvTracking();
1835
1921
  }
1836
1922
  mountDoubaoWatermark();
1923
+ void markFeedReadOnce();
1837
1924
  return __toCommonJS(doubao_runtime_exports);
1838
1925
  })();
@@ -1421,6 +1421,92 @@ var MiaodaRuntime = (() => {
1421
1421
  }
1422
1422
  __name(initPvTracking, "initPvTracking");
1423
1423
 
1424
+ // src/runtime/feishu-feed-jsbridge.ts
1425
+ var LARK_UA_RE = /\bLark\//i;
1426
+ function isFeishuClient() {
1427
+ var _a2, _b, _c, _d;
1428
+ const w = window;
1429
+ if (typeof ((_c = (_b = (_a2 = w.webkit) == null ? void 0 : _a2.messageHandlers) == null ? void 0 : _b.invokeNative) == null ? void 0 : _c.postMessage) === "function") return true;
1430
+ if (typeof ((_d = w.Lark_Bridge) == null ? void 0 : _d.invokeNative) === "function") return true;
1431
+ return LARK_UA_RE.test(navigator.userAgent);
1432
+ }
1433
+ __name(isFeishuClient, "isFeishuClient");
1434
+ function markMiaodaFeedMessagesRead({ messageIds, token, docType = 113 }) {
1435
+ var _a2, _b;
1436
+ if (messageIds.length === 0 || !token) return false;
1437
+ const payload = {
1438
+ apiName: "markMiaodaFeedMessagesRead",
1439
+ data: {
1440
+ __v2__: true,
1441
+ messageIds: messageIds.map(String),
1442
+ token,
1443
+ docType
1444
+ }
1445
+ };
1446
+ const w = window;
1447
+ const iosBridge = (_b = (_a2 = w.webkit) == null ? void 0 : _a2.messageHandlers) == null ? void 0 : _b.invokeNative;
1448
+ if (iosBridge == null ? void 0 : iosBridge.postMessage) {
1449
+ iosBridge.postMessage(payload);
1450
+ return true;
1451
+ }
1452
+ const androidBridge = w.Lark_Bridge;
1453
+ if (androidBridge == null ? void 0 : androidBridge.invokeNative) {
1454
+ androidBridge.invokeNative(JSON.stringify(payload));
1455
+ return true;
1456
+ }
1457
+ return false;
1458
+ }
1459
+ __name(markMiaodaFeedMessagesRead, "markMiaodaFeedMessagesRead");
1460
+
1461
+ // src/runtime/mark-feed-read.ts
1462
+ var DOC_TYPE = 113;
1463
+ var API_PATH_PREFIX = "/app/";
1464
+ var API_PATH_SUFFIX = "/__runtime__/api/v1/devops/read_lark_messages";
1465
+ function extractMessageIds(payload) {
1466
+ if (!payload || typeof payload !== "object") return [];
1467
+ const { data } = payload;
1468
+ if (Array.isArray(data)) return data.map(String);
1469
+ if (data && Array.isArray(data.message_ids)) {
1470
+ return data.message_ids.map(String);
1471
+ }
1472
+ return [];
1473
+ }
1474
+ __name(extractMessageIds, "extractMessageIds");
1475
+ var markedOnce = false;
1476
+ async function fetchFeedMessageIds(appId) {
1477
+ var _a2;
1478
+ const response = await fetch(`${API_PATH_PREFIX}${appId}${API_PATH_SUFFIX}`, {
1479
+ method: "POST",
1480
+ credentials: "same-origin",
1481
+ headers: {
1482
+ "Content-Type": "application/json",
1483
+ "X-Suda-Csrf-Token": (_a2 = getCsrfToken()) != null ? _a2 : ""
1484
+ }
1485
+ });
1486
+ if (!response.ok) return [];
1487
+ const json = await response.json();
1488
+ return extractMessageIds(json);
1489
+ }
1490
+ __name(fetchFeedMessageIds, "fetchFeedMessageIds");
1491
+ async function markFeedReadOnce() {
1492
+ if (markedOnce) return;
1493
+ if (!isFeishuClient()) return;
1494
+ markedOnce = true;
1495
+ const appId = getAppId();
1496
+ if (!appId) return;
1497
+ try {
1498
+ const ids = await fetchFeedMessageIds(appId);
1499
+ if (!ids.length) return;
1500
+ markMiaodaFeedMessagesRead({
1501
+ messageIds: ids,
1502
+ token: appId,
1503
+ docType: DOC_TYPE
1504
+ });
1505
+ } catch {
1506
+ }
1507
+ }
1508
+ __name(markFeedReadOnce, "markFeedReadOnce");
1509
+
1424
1510
  // src/runtime/watermark.ts
1425
1511
  var CDN = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp";
1426
1512
  var DOUBAO_LOGO_SRC = `${CDN}/miaoda-ui/doubao.svg`;
@@ -1827,12 +1913,13 @@ var MiaodaRuntime = (() => {
1827
1913
  __name(mountDoubaoWatermark, "mountDoubaoWatermark");
1828
1914
 
1829
1915
  // src/doubao-runtime.ts
1830
- var version = "0.0.14";
1916
+ var version = "0.0.15-beta.0";
1831
1917
  var name = "@lark-apaas/miaoda-coding-sdk";
1832
1918
  if (isOnlineEnv()) {
1833
1919
  reportPageView();
1834
1920
  initPvTracking();
1835
1921
  }
1836
1922
  mountDoubaoWatermark();
1923
+ void markFeedReadOnce();
1837
1924
  return __toCommonJS(doubao_runtime_exports);
1838
1925
  })();
@@ -1,4 +1,4 @@
1
- "use strict";var MiaodaRuntime=(()=>{var Te=Object.create;var H=Object.defineProperty;var Ae=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Be=Object.getPrototypeOf,Oe=Object.prototype.hasOwnProperty;var i=(n,e)=>H(n,"name",{value:e,configurable:!0});var U=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Me=(n,e)=>{for(var o in e)H(n,o,{get:e[o],enumerable:!0})},q=(n,e,o,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of Pe(e))!Oe.call(n,p)&&p!==o&&H(n,p,{get:()=>e[p],enumerable:!(u=Ae(e,p))||u.enumerable});return n};var X=(n,e,o)=>(o=n!=null?Te(Be(n)):{},q(e||!n||!n.__esModule?H(o,"default",{value:n,enumerable:!0}):o,n)),He=n=>q(H({},"__esModule",{value:!0}),n);var Q=U((Y,D)=>{"use strict";(function(n){"use strict";function e(t,h){var r=(t&65535)+(h&65535),y=(t>>16)+(h>>16)+(r>>16);return y<<16|r&65535}i(e,"safeAdd");function o(t,h){return t<<h|t>>>32-h}i(o,"bitRotateLeft");function u(t,h,r,y,C,S){return e(o(e(e(h,t),e(y,S)),C),r)}i(u,"md5cmn");function p(t,h,r,y,C,S,A){return u(h&r|~h&y,t,h,C,S,A)}i(p,"md5ff");function m(t,h,r,y,C,S,A){return u(h&y|r&~y,t,h,C,S,A)}i(m,"md5gg");function g(t,h,r,y,C,S,A){return u(h^r^y,t,h,C,S,A)}i(g,"md5hh");function v(t,h,r,y,C,S,A){return u(r^(h|~y),t,h,C,S,A)}i(v,"md5ii");function w(t,h){t[h>>5]|=128<<h%32,t[(h+64>>>9<<4)+14]=h;var r,y,C,S,A,a=1732584193,s=-271733879,c=-1732584194,l=271733878;for(r=0;r<t.length;r+=16)y=a,C=s,S=c,A=l,a=p(a,s,c,l,t[r],7,-680876936),l=p(l,a,s,c,t[r+1],12,-389564586),c=p(c,l,a,s,t[r+2],17,606105819),s=p(s,c,l,a,t[r+3],22,-1044525330),a=p(a,s,c,l,t[r+4],7,-176418897),l=p(l,a,s,c,t[r+5],12,1200080426),c=p(c,l,a,s,t[r+6],17,-1473231341),s=p(s,c,l,a,t[r+7],22,-45705983),a=p(a,s,c,l,t[r+8],7,1770035416),l=p(l,a,s,c,t[r+9],12,-1958414417),c=p(c,l,a,s,t[r+10],17,-42063),s=p(s,c,l,a,t[r+11],22,-1990404162),a=p(a,s,c,l,t[r+12],7,1804603682),l=p(l,a,s,c,t[r+13],12,-40341101),c=p(c,l,a,s,t[r+14],17,-1502002290),s=p(s,c,l,a,t[r+15],22,1236535329),a=m(a,s,c,l,t[r+1],5,-165796510),l=m(l,a,s,c,t[r+6],9,-1069501632),c=m(c,l,a,s,t[r+11],14,643717713),s=m(s,c,l,a,t[r],20,-373897302),a=m(a,s,c,l,t[r+5],5,-701558691),l=m(l,a,s,c,t[r+10],9,38016083),c=m(c,l,a,s,t[r+15],14,-660478335),s=m(s,c,l,a,t[r+4],20,-405537848),a=m(a,s,c,l,t[r+9],5,568446438),l=m(l,a,s,c,t[r+14],9,-1019803690),c=m(c,l,a,s,t[r+3],14,-187363961),s=m(s,c,l,a,t[r+8],20,1163531501),a=m(a,s,c,l,t[r+13],5,-1444681467),l=m(l,a,s,c,t[r+2],9,-51403784),c=m(c,l,a,s,t[r+7],14,1735328473),s=m(s,c,l,a,t[r+12],20,-1926607734),a=g(a,s,c,l,t[r+5],4,-378558),l=g(l,a,s,c,t[r+8],11,-2022574463),c=g(c,l,a,s,t[r+11],16,1839030562),s=g(s,c,l,a,t[r+14],23,-35309556),a=g(a,s,c,l,t[r+1],4,-1530992060),l=g(l,a,s,c,t[r+4],11,1272893353),c=g(c,l,a,s,t[r+7],16,-155497632),s=g(s,c,l,a,t[r+10],23,-1094730640),a=g(a,s,c,l,t[r+13],4,681279174),l=g(l,a,s,c,t[r],11,-358537222),c=g(c,l,a,s,t[r+3],16,-722521979),s=g(s,c,l,a,t[r+6],23,76029189),a=g(a,s,c,l,t[r+9],4,-640364487),l=g(l,a,s,c,t[r+12],11,-421815835),c=g(c,l,a,s,t[r+15],16,530742520),s=g(s,c,l,a,t[r+2],23,-995338651),a=v(a,s,c,l,t[r],6,-198630844),l=v(l,a,s,c,t[r+7],10,1126891415),c=v(c,l,a,s,t[r+14],15,-1416354905),s=v(s,c,l,a,t[r+5],21,-57434055),a=v(a,s,c,l,t[r+12],6,1700485571),l=v(l,a,s,c,t[r+3],10,-1894986606),c=v(c,l,a,s,t[r+10],15,-1051523),s=v(s,c,l,a,t[r+1],21,-2054922799),a=v(a,s,c,l,t[r+8],6,1873313359),l=v(l,a,s,c,t[r+15],10,-30611744),c=v(c,l,a,s,t[r+6],15,-1560198380),s=v(s,c,l,a,t[r+13],21,1309151649),a=v(a,s,c,l,t[r+4],6,-145523070),l=v(l,a,s,c,t[r+11],10,-1120210379),c=v(c,l,a,s,t[r+2],15,718787259),s=v(s,c,l,a,t[r+9],21,-343485551),a=e(a,y),s=e(s,C),c=e(c,S),l=e(l,A);return[a,s,c,l]}i(w,"binlMD5");function T(t){var h,r="",y=t.length*32;for(h=0;h<y;h+=8)r+=String.fromCharCode(t[h>>5]>>>h%32&255);return r}i(T,"binl2rstr");function x(t){var h,r=[];for(r[(t.length>>2)-1]=void 0,h=0;h<r.length;h+=1)r[h]=0;var y=t.length*8;for(h=0;h<y;h+=8)r[h>>5]|=(t.charCodeAt(h/8)&255)<<h%32;return r}i(x,"rstr2binl");function L(t){return T(w(x(t),t.length*8))}i(L,"rstrMD5");function E(t,h){var r,y=x(t),C=[],S=[],A;for(C[15]=S[15]=void 0,y.length>16&&(y=w(y,t.length*8)),r=0;r<16;r+=1)C[r]=y[r]^909522486,S[r]=y[r]^1549556828;return A=w(C.concat(x(h)),512+h.length*8),T(w(S.concat(A),640))}i(E,"rstrHMACMD5");function P(t){var h="0123456789abcdef",r="",y,C;for(C=0;C<t.length;C+=1)y=t.charCodeAt(C),r+=h.charAt(y>>>4&15)+h.charAt(y&15);return r}i(P,"rstr2hex");function I(t){return unescape(encodeURIComponent(t))}i(I,"str2rstrUTF8");function d(t){return L(I(t))}i(d,"rawMD5");function f(t){return P(d(t))}i(f,"hexMD5");function _(t,h){return E(I(t),I(h))}i(_,"rawHMACMD5");function b(t,h){return P(_(t,h))}i(b,"hexHMACMD5");function k(t,h,r){return h?r?_(h,t):b(h,t):r?d(t):f(t)}i(k,"md5"),typeof define=="function"&&define.amd?define(function(){return k}):typeof D=="object"&&D.exports?D.exports=k:n.md5=k})(Y)});var te=U((R,ee)=>{"use strict";(function(n,e){typeof R=="object"?ee.exports=R=e():typeof define=="function"&&define.amd?define([],e):n.CryptoJS=e()})(R,function(){var n=n||(function(e,o){var u=Object.create||(function(){function d(){}return i(d,"F"),function(f){var _;return d.prototype=f,_=new d,d.prototype=null,_}})(),p={},m=p.lib={},g=m.Base=(function(){return{extend:i(function(d){var f=u(this);return d&&f.mixIn(d),(!f.hasOwnProperty("init")||this.init===f.init)&&(f.init=function(){f.$super.init.apply(this,arguments)}),f.init.prototype=f,f.$super=this,f},"extend"),create:i(function(){var d=this.extend();return d.init.apply(d,arguments),d},"create"),init:i(function(){},"init"),mixIn:i(function(d){for(var f in d)d.hasOwnProperty(f)&&(this[f]=d[f]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},"mixIn"),clone:i(function(){return this.init.prototype.extend(this)},"clone")}})(),v=m.WordArray=g.extend({init:i(function(d,f){d=this.words=d||[],f!=o?this.sigBytes=f:this.sigBytes=d.length*4},"init"),toString:i(function(d){return(d||T).stringify(this)},"toString"),concat:i(function(d){var f=this.words,_=d.words,b=this.sigBytes,k=d.sigBytes;if(this.clamp(),b%4)for(var t=0;t<k;t++){var h=_[t>>>2]>>>24-t%4*8&255;f[b+t>>>2]|=h<<24-(b+t)%4*8}else for(var t=0;t<k;t+=4)f[b+t>>>2]=_[t>>>2];return this.sigBytes+=k,this},"concat"),clamp:i(function(){var d=this.words,f=this.sigBytes;d[f>>>2]&=4294967295<<32-f%4*8,d.length=e.ceil(f/4)},"clamp"),clone:i(function(){var d=g.clone.call(this);return d.words=this.words.slice(0),d},"clone"),random:i(function(d){for(var f=[],_=i(function(r){var r=r,y=987654321,C=4294967295;return function(){y=36969*(y&65535)+(y>>16)&C,r=18e3*(r&65535)+(r>>16)&C;var S=(y<<16)+r&C;return S/=4294967296,S+=.5,S*(e.random()>.5?1:-1)}},"r"),b=0,k;b<d;b+=4){var t=_((k||e.random())*4294967296);k=t()*987654071,f.push(t()*4294967296|0)}return new v.init(f,d)},"random")}),w=p.enc={},T=w.Hex={stringify:i(function(d){for(var f=d.words,_=d.sigBytes,b=[],k=0;k<_;k++){var t=f[k>>>2]>>>24-k%4*8&255;b.push((t>>>4).toString(16)),b.push((t&15).toString(16))}return b.join("")},"stringify"),parse:i(function(d){for(var f=d.length,_=[],b=0;b<f;b+=2)_[b>>>3]|=parseInt(d.substr(b,2),16)<<24-b%8*4;return new v.init(_,f/2)},"parse")},x=w.Latin1={stringify:i(function(d){for(var f=d.words,_=d.sigBytes,b=[],k=0;k<_;k++){var t=f[k>>>2]>>>24-k%4*8&255;b.push(String.fromCharCode(t))}return b.join("")},"stringify"),parse:i(function(d){for(var f=d.length,_=[],b=0;b<f;b++)_[b>>>2]|=(d.charCodeAt(b)&255)<<24-b%4*8;return new v.init(_,f)},"parse")},L=w.Utf8={stringify:i(function(d){try{return decodeURIComponent(escape(x.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:i(function(d){return x.parse(unescape(encodeURIComponent(d)))},"parse")},E=m.BufferedBlockAlgorithm=g.extend({reset:i(function(){this._data=new v.init,this._nDataBytes=0},"reset"),_append:i(function(d){typeof d=="string"&&(d=L.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},"_append"),_process:i(function(d){var f=this._data,_=f.words,b=f.sigBytes,k=this.blockSize,t=k*4,h=b/t;d?h=e.ceil(h):h=e.max((h|0)-this._minBufferSize,0);var r=h*k,y=e.min(r*4,b);if(r){for(var C=0;C<r;C+=k)this._doProcessBlock(_,C);var S=_.splice(0,r);f.sigBytes-=y}return new v.init(S,y)},"_process"),clone:i(function(){var d=g.clone.call(this);return d._data=this._data.clone(),d},"clone"),_minBufferSize:0}),P=m.Hasher=E.extend({cfg:g.extend(),init:i(function(d){this.cfg=this.cfg.extend(d),this.reset()},"init"),reset:i(function(){E.reset.call(this),this._doReset()},"reset"),update:i(function(d){return this._append(d),this._process(),this},"update"),finalize:i(function(d){d&&this._append(d);var f=this._doFinalize();return f},"finalize"),blockSize:512/32,_createHelper:i(function(d){return function(f,_){return new d.init(_).finalize(f)}},"_createHelper"),_createHmacHelper:i(function(d){return function(f,_){return new I.HMAC.init(d,_).finalize(f)}},"_createHmacHelper")}),I=p.algo={};return p})(Math);return n})});var re=U((F,ne)=>{"use strict";(function(n,e){typeof F=="object"?ne.exports=F=e(te()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(F,function(n){return(function(){var e=n,o=e.lib,u=o.WordArray,p=o.Hasher,m=e.algo,g=[],v=m.SHA1=p.extend({_doReset:i(function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:i(function(w,T){for(var x=this._hash.words,L=x[0],E=x[1],P=x[2],I=x[3],d=x[4],f=0;f<80;f++){if(f<16)g[f]=w[T+f]|0;else{var _=g[f-3]^g[f-8]^g[f-14]^g[f-16];g[f]=_<<1|_>>>31}var b=(L<<5|L>>>27)+d+g[f];f<20?b+=(E&P|~E&I)+1518500249:f<40?b+=(E^P^I)+1859775393:f<60?b+=(E&P|E&I|P&I)-1894007588:b+=(E^P^I)-899497514,d=I,I=P,P=E<<30|E>>>2,E=L,L=b}x[0]=x[0]+L|0,x[1]=x[1]+E|0,x[2]=x[2]+P|0,x[3]=x[3]+I|0,x[4]=x[4]+d|0},"_doProcessBlock"),_doFinalize:i(function(){var w=this._data,T=w.words,x=this._nDataBytes*8,L=w.sigBytes*8;return T[L>>>5]|=128<<24-L%32,T[(L+64>>>9<<4)+14]=Math.floor(x/4294967296),T[(L+64>>>9<<4)+15]=x,w.sigBytes=T.length*4,this._process(),this._hash},"_doFinalize"),clone:i(function(){var w=p.clone.call(this);return w._hash=this._hash.clone(),w},"clone")});e.SHA1=p._createHelper(v),e.HmacSHA1=p._createHmacHelper(v)})(),n.SHA1})});var ut={};Me(ut,{TrackKey:()=>z,name:()=>dt,reportTeaEvent:()=>G,version:()=>lt});var le=X(Q(),1),de=X(re(),1);function B(){return window.appId||null}i(B,"getAppId");function ie(){var o;let n="suda-csrf-token",e=document.cookie.split("; ");for(let u of e){let[p,m]=u.split("=");if(p===n)return decodeURIComponent(m)}return(o=window.csrfToken)!=null?o:null}i(ie,"getCsrfToken");function N(){let n=globalThis.CLIENT_BASE_PATH||"/";return/^\/app\/[^/]/.test(n)}i(N,"isNewPathEnabled");function $(){switch(globalThis.ENVIRONMENT){case"gray":return"PRE";case"online":return"ONLINE";default:return"BOE"}}i($,"getEnv");function oe(){return window.appEnv!=null?window.appEnv==="runtime":!0}i(oe,"isOnlineEnv");function W(){let n=navigator.userAgent,e=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(n),o=/iPad|Tab|Tablet/i.test(n)&&navigator.maxTouchPoints>1;return e||o}i(W,"isMobile");async function ae(){var n,e,o;try{let u=B();if(!u)return!0;let p=N()?`/app/${u}/__runtime__/api/v1/studio/get_published`:`/spark/b/${u}/get_published`,g=await(await fetch(p,{headers:{"X-Suda-Csrf-Token":(n=ie())!=null?n:""}})).json();if(g.code===0||g.status_code==="0")return((o=(e=g.data)==null?void 0:e.app_info)==null?void 0:o.show_badge)!==!1}catch{}return!0}i(ae,"fetchShowBadge");async function se(){var u;let n=B();if(!n)return{code:1,msg:"appId is required",data:{}};let e=N()?`/app/${n}/__runtime__/api/v1/studio/lark/user_info`:`/spark/b/${n}/lark/user_info`;return await(await fetch(e,{headers:{"X-Suda-Csrf-Token":(u=ie())!=null?u:""}})).json()}i(se,"getLarkUserInfo");var z={VIEW:"aily_agent_artifact_page_view"},De="08a441",Re="42b91e";function ce(n){let e=String(n);return(0,de.default)(De+(0,le.default)(e+Re)).toString()}i(ce,"encryptTea");var V=!1;async function Fe(){var m,g,v,w;let{data:n}=await se(),{tenantID:e,userID:o}=n||{},u=o&&o!=="0"?ce(o):void 0,p=e&&e!=="0"?ce(e):void 0;(m=window.collectEvent)==null||m.call(window,"init",{app_id:788827,channel:"cn",disable_auto_pv:!1,enable_ab_test:!1,enable_debug:!1,enable_stay_duration:!0,reportTime:1e3}),(v=window.collectEvent)==null||v.call(window,"config",{user_unique_id:u,device_type:W()?"mobile":"pc",evtParams:{open_from:(g=new URLSearchParams(window.location.search).get("open-from"))!=null?g:void 0,env:$(),user_id:u,tenant_id:p}}),V=!0,(w=window.collectEvent)==null||w.call(window,"start")}i(Fe,"createTracker");async function G({trackKey:n,trackParams:e={}}){var o;try{V||(V=!0,await Fe()),(o=window.collectEvent)==null||o.call(window,n,e)}catch(u){console.error(u)}}i(G,"reportTeaEvent");function ue(){return G({trackKey:z.VIEW,trackParams:{artifact_uid:B(),agent_id:"agent_miaoda",url:window.location.href}})}i(ue,"reportPageView");function fe(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join("")}let n="";for(let e=0;e<16;e++)n+=Math.floor(Math.random()*16).toString(16);return n}i(fe,"generateUUID");var pe="x_sdk_device_id";function Ne(){try{let n=localStorage.getItem(pe);return n||(n=fe(),localStorage.setItem(pe,n)),n}catch{return fe()}}i(Ne,"getDeviceId");function $e(){let n=typeof navigator!="undefined"?navigator.userAgent:"";return n&&(/Android/i.test(n)&&/Mobile/i.test(n)||/iPhone|iPod/i.test(n)||/BlackBerry|IEMobile|Opera Mini/i.test(n))?"mobile":"desktop"}i($e,"getDeviceType");var We="pageSessionID";function je(){try{return new URLSearchParams(window.location.search).get(We)||""}catch{return""}}i(je,"getPvId");function Ue(n={}){let e=n.pvId||je();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:Ne(),module:"app_web",app_env:"runtime",source_type:"user",device_type:$e(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(Ue,"getDefaultAttributes");function he(n){let e=Math.round(n);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${n}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(he,"toNanoString");var Ve="1.0.2";function ze(n,e){let o=Ue(e),u=he(Date.now());return{metricsData:{resource:{attributes:{sdk_version:Ve,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:n.map(p=>({attributes:{...o,url:p.url,path:p.path,referrer:p.referrer},startTimeUnixNano:he(p.timestampMs),timeUnixNano:u,asDouble:1}))}}]}}}i(ze,"buildPayload");function Ge(n,e,o={},u){if(e.length===0)return;let p;try{p=JSON.stringify(ze(e,u))}catch{return}try{fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...o},body:p,keepalive:!0}).catch(()=>{})}catch{}}i(Ge,"sendPvData");var K="__APAAS_PV_TRACKER_STARTED__";function Ke(){try{let n=window;return n[K]?!1:(n[K]=!0,!0)}catch{return!0}}i(Ke,"claimPvReporting");function me(){try{window[K]=!1}catch{}}i(me,"releasePvReporting");var O,Ze=(O=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new O),this._instance}start(e){var o;if(!this.started&&Ke()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let u=(o=e.flushIntervalMs)!=null?o:1e4;this.flushTimer=setInterval(()=>this.flush(),u)}catch(u){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,me(),u}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,me())}pageKey(){let{origin:e,pathname:o,search:u}=window.location;return`${e}${o}${u}`}scheduleFirstFlush(){var e;let o=(e=this.config)==null?void 0:e.firstFlushDelayMs;o==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),o))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);Ge(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let o=history[e],u=i(()=>this.recordPv(),"recordPv");history[e]=function(...p){let m=o.apply(this,p);return u(),m},this.disposers.push(()=>{history[e]=o})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let o=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",o),this.disposers.push(()=>window.removeEventListener("pagehide",o))}},i(O,"_PvTracker"),O),ge=Ze.instance;function ve(){var o;let n=(o=B())!=null?o:"",e=N()?`/app/${n}/__runtime__/api/v1/observability/metrics/collect`:`/spark/app/${n}/runtime/api/v1/observability/metrics/collect`;ge.start({collectorUrl:e})}i(ve,"initPvTracking");var ye="https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp",Je=`${ye}/miaoda-ui/doubao.svg`,qe=`${ye}/logo/miaodalogo.svg`,we='<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>',Xe='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>',Ye='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.9922 1.99221C12.5445 1.98895 12.9958 2.43407 12.999 2.98634L13.0762 16.1943L14.6387 14.6328L17.8926 11.3789C18.2831 10.9884 18.9171 10.9885 19.3076 11.3789C19.6977 11.7695 19.6979 12.4026 19.3076 12.793L16.0527 16.0479L12.7979 19.3018C12.7111 19.3884 12.6098 19.4566 12.5 19.5059H20.375C20.9271 19.5059 21.3748 19.9538 21.375 20.5059C21.375 21.0581 20.9273 21.5059 20.375 21.5059H3.625C3.07272 21.5059 2.625 21.0581 2.625 20.5059C2.62523 19.9538 3.07286 19.5059 3.625 19.5059H11.6816C11.572 19.4566 11.4704 19.3884 11.3838 19.3018L4.87402 12.793C4.48372 12.4026 4.4839 11.7694 4.87402 11.3789C5.26452 10.9884 5.89756 10.9885 6.28809 11.3789L11.0762 16.166L10.999 2.99806C10.9958 2.44603 11.4402 1.99582 11.9922 1.99221Z" fill="currentColor"/></svg>',Qe='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.0754 7.57153C2.23188 9.44922 3.49231 11.053 5.27982 11.6488C5.31351 11.6601 5.33994 11.6865 5.35117 11.7202L5.72076 12.8289C5.88752 13.3292 6.3557 13.6667 6.88304 13.6667H9.11696C9.6443 13.6667 10.1125 13.3292 10.2792 12.8289L10.6488 11.7202C10.6601 11.6865 10.6865 11.6601 10.7202 11.6488C12.5077 11.053 13.7681 9.44922 13.9246 7.57153L14 6.66667C14 3.35296 11.3137 0.666668 8 0.666668C4.68629 0.666668 2 3.35296 2 6.66667L2.0754 7.57153ZM9.38392 11.2985L9.03899 12.3333H6.96101L6.61608 11.2985C6.47214 10.8667 6.13328 10.5279 5.70146 10.3839C4.41995 9.95675 3.51631 8.80696 3.40413 7.4608L3.33362 6.61462C3.36152 4.06127 5.44004 2 8 2C10.56 2 12.6385 4.06127 12.6664 6.61462L12.5959 7.4608C12.4837 8.80696 11.5801 9.95675 10.2985 10.3839C9.86672 10.5279 9.52786 10.8667 9.38392 11.2985Z" fill="currentColor"/><path d="M6.66667 14.3333C6.29848 14.3333 6 14.6318 6 15C6 15.3682 6.29848 15.6667 6.66667 15.6667H9.33333C9.70152 15.6667 10 15.3682 10 15C10 14.6318 9.70152 14.3333 9.33333 14.3333H6.66667Z" fill="currentColor"/><path d="M8.00864 4.13208L5.44578 6.94049C5.20258 7.18228 5.37835 7.56531 5.74361 7.58951L7.2181 7.6872L7.21814 9.60852C7.21814 9.96788 7.72139 10.1366 7.99168 9.86792C8.26197 9.59921 10.5545 7.05951 10.5545 7.05951C10.7977 6.81772 10.622 6.43469 10.2567 6.41049L8.78222 6.3128L8.78219 4.39148C8.78218 4.03212 8.27893 3.86336 8.00864 4.13208Z" fill="currentColor"/></svg>',_e=!0,et="0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)",tt="0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)",J="'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",j={doubao:{brandText:"\u8C46\u5305\u5DE5\u4F5C\u751F\u6210",logoSrc:Je,downloadUrl:"https://ugapk.com/FCtLH"},miaoda:{brandText:"\u5999\u642D\u751F\u6210",logoSrc:qe,landingUrl:"https://miaoda.feishu.cn/landing"}},nt={BOE:"tns.feishu-boe.cn",PRE:"tns.feishu-pre.cn",ONLINE:"tns.feishu.cn"};function Ce(){var o;let n=JSON.stringify({scene:"miaoda_app_report",entity_id:(o=B())!=null?o:"",entity_type:"miaoda_app",extra:""}),e=`https://${nt[$()]}/cust/lark_report/?type=common&params=${encodeURIComponent(n)}&lang=zh-CN`;window.open(e,"_blank","noopener,noreferrer")}i(Ce,"openReport");var rt={feedback:Xe,close:we,download:Ye,efficiency:Qe};function xe(n){let e=document.createElement("span");Object.assign(e.style,{display:"inline-flex",width:`${n}px`,height:`${n}px`,flexShrink:"0"}),e.innerHTML=we;let o=e.firstElementChild;return o&&(o.setAttribute("width",String(n)),o.setAttribute("height",String(n)),o.style.display="block"),e}i(xe,"makeCloseIcon");function it(n,e=16){if(n==="close")return xe(e);let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:`${e}px`,height:`${e}px`,flexShrink:"0"}),o.innerHTML=rt[n];let u=o.firstElementChild;return u&&(u.style.display="block"),o}i(it,"makeIcon");function ot(n,e){let o=document.createElement("img");return o.src=n,o.width=e,o.height=e,o.alt="",Object.assign(o.style,{width:`${e}px`,height:`${e}px`,maxWidth:"none",maxHeight:"none",borderRadius:"100px",flexShrink:"0",display:"block"}),o}i(ot,"makeLogo");function ke(n,e,o){let u=e==="desktop",p=j[n],m=document.createElement("div");Object.assign(m.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:"4px",padding:u?"6px 12px 6px 8px":"5px 12px 5px 8px",background:"#363636",border:"0.5px solid rgba(255,255,255,0.1)",borderRadius:"100px",boxShadow:et,cursor:"pointer"});let g=ot(p.logoSrc,16),v=document.createElement("span");if(v.textContent=p.brandText,Object.assign(v.style,{fontFamily:J,fontSize:u?"12px":"14px",lineHeight:u?"18px":"22px",color:"rgba(255,255,255,0.85)",whiteSpace:"nowrap"}),m.append(g,v),u&&o){let w=document.createElement("span");w.setAttribute("role","button"),w.setAttribute("aria-label","\u5173\u95ED"),w.setAttribute("data-watermark-close",""),Object.assign(w.style,{display:"none",alignItems:"center",cursor:"pointer",flexShrink:"0",color:"rgba(255,255,255,0.5)"}),w.appendChild(xe(10)),w.addEventListener("click",T=>{T.stopPropagation(),o()}),m.appendChild(w)}return m}i(ke,"buildPill");function M(n){let e=document.createElement("div");e.setAttribute("role","menuitem"),e.setAttribute("data-label",n.label),Object.assign(e.style,{boxSizing:"border-box",display:"flex",alignItems:"center",gap:"8px",minHeight:"38px",padding:"4px 10px",borderRadius:"6px",cursor:"pointer",color:"#000000"});let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:"16px",height:"16px",flexShrink:"0",color:"#000000"}),o.appendChild(it(n.icon));let u=document.createElement("span");return u.textContent=n.label,Object.assign(u.style,{fontFamily:J,fontSize:`${n.fontSize}px`,lineHeight:`${n.fontSize+8}px`,color:"#000000",whiteSpace:"nowrap"}),e.append(o,u),e.addEventListener("mouseenter",()=>{e.style.background="rgba(0,0,0,0.04)"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"}),e.addEventListener("click",n.onClick),e}i(M,"buildMenuRow");function at(){let n=document.createElement("div");return Object.assign(n.style,{height:"1px",background:"rgba(0,0,0,0.08)",margin:"0 10px"}),n}i(at,"buildDivider");function Se(n){var o;let e=document.createElement("div");if(Object.assign(e.style,{boxSizing:"border-box",display:"flex",flexDirection:"column",minWidth:`${n.minWidth}px`,background:"#ffffff",border:"0.5px solid rgba(0,0,0,0.1)",borderRadius:"10px",boxShadow:tt,overflow:"hidden",outline:"none"}),n.items.length){let u=document.createElement("div");Object.assign(u.style,{boxSizing:"border-box",padding:"4px",display:"flex",flexDirection:"column",gap:`${(o=n.itemGap)!=null?o:0}px`}),n.items.forEach(p=>u.appendChild(p)),e.appendChild(u)}if(n.extraItems&&n.extraItems.length){e.appendChild(at());let u=document.createElement("div");Object.assign(u.style,{boxSizing:"border-box",padding:"4px"}),n.extraItems.forEach(p=>u.appendChild(p)),e.appendChild(u)}return e}i(Se,"buildMenuCard");function Ee(n,e=!1){let o=document.createElement("div");o.setAttribute("data-custom-element",`${n}-watermark${e?"-mobile":""}`);let u=o.attachShadow({mode:"open"}),p=document.createElement("style");p.textContent=`
1
+ "use strict";var MiaodaRuntime=(()=>{var Oe=Object.create;var B=Object.defineProperty;var Re=Object.getOwnPropertyDescriptor;var Be=Object.getOwnPropertyNames;var He=Object.getPrototypeOf,Fe=Object.prototype.hasOwnProperty;var i=(t,e)=>B(t,"name",{value:e,configurable:!0});var V=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),De=(t,e)=>{for(var o in e)B(t,o,{get:e[o],enumerable:!0})},q=(t,e,o,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of Be(e))!Fe.call(t,f)&&f!==o&&B(t,f,{get:()=>e[f],enumerable:!(u=Re(e,f))||u.enumerable});return t};var Y=(t,e,o)=>(o=t!=null?Oe(He(t)):{},q(e||!t||!t.__esModule?B(o,"default",{value:t,enumerable:!0}):o,t)),Ne=t=>q(B({},"__esModule",{value:!0}),t);var ee=V((Q,H)=>{"use strict";(function(t){"use strict";function e(n,h){var r=(n&65535)+(h&65535),b=(n>>16)+(h>>16)+(r>>16);return b<<16|r&65535}i(e,"safeAdd");function o(n,h){return n<<h|n>>>32-h}i(o,"bitRotateLeft");function u(n,h,r,b,C,S){return e(o(e(e(h,n),e(b,S)),C),r)}i(u,"md5cmn");function f(n,h,r,b,C,S,A){return u(h&r|~h&b,n,h,C,S,A)}i(f,"md5ff");function m(n,h,r,b,C,S,A){return u(h&b|r&~b,n,h,C,S,A)}i(m,"md5gg");function g(n,h,r,b,C,S,A){return u(h^r^b,n,h,C,S,A)}i(g,"md5hh");function v(n,h,r,b,C,S,A){return u(r^(h|~b),n,h,C,S,A)}i(v,"md5ii");function y(n,h){n[h>>5]|=128<<h%32,n[(h+64>>>9<<4)+14]=h;var r,b,C,S,A,a=1732584193,s=-271733879,c=-1732584194,l=271733878;for(r=0;r<n.length;r+=16)b=a,C=s,S=c,A=l,a=f(a,s,c,l,n[r],7,-680876936),l=f(l,a,s,c,n[r+1],12,-389564586),c=f(c,l,a,s,n[r+2],17,606105819),s=f(s,c,l,a,n[r+3],22,-1044525330),a=f(a,s,c,l,n[r+4],7,-176418897),l=f(l,a,s,c,n[r+5],12,1200080426),c=f(c,l,a,s,n[r+6],17,-1473231341),s=f(s,c,l,a,n[r+7],22,-45705983),a=f(a,s,c,l,n[r+8],7,1770035416),l=f(l,a,s,c,n[r+9],12,-1958414417),c=f(c,l,a,s,n[r+10],17,-42063),s=f(s,c,l,a,n[r+11],22,-1990404162),a=f(a,s,c,l,n[r+12],7,1804603682),l=f(l,a,s,c,n[r+13],12,-40341101),c=f(c,l,a,s,n[r+14],17,-1502002290),s=f(s,c,l,a,n[r+15],22,1236535329),a=m(a,s,c,l,n[r+1],5,-165796510),l=m(l,a,s,c,n[r+6],9,-1069501632),c=m(c,l,a,s,n[r+11],14,643717713),s=m(s,c,l,a,n[r],20,-373897302),a=m(a,s,c,l,n[r+5],5,-701558691),l=m(l,a,s,c,n[r+10],9,38016083),c=m(c,l,a,s,n[r+15],14,-660478335),s=m(s,c,l,a,n[r+4],20,-405537848),a=m(a,s,c,l,n[r+9],5,568446438),l=m(l,a,s,c,n[r+14],9,-1019803690),c=m(c,l,a,s,n[r+3],14,-187363961),s=m(s,c,l,a,n[r+8],20,1163531501),a=m(a,s,c,l,n[r+13],5,-1444681467),l=m(l,a,s,c,n[r+2],9,-51403784),c=m(c,l,a,s,n[r+7],14,1735328473),s=m(s,c,l,a,n[r+12],20,-1926607734),a=g(a,s,c,l,n[r+5],4,-378558),l=g(l,a,s,c,n[r+8],11,-2022574463),c=g(c,l,a,s,n[r+11],16,1839030562),s=g(s,c,l,a,n[r+14],23,-35309556),a=g(a,s,c,l,n[r+1],4,-1530992060),l=g(l,a,s,c,n[r+4],11,1272893353),c=g(c,l,a,s,n[r+7],16,-155497632),s=g(s,c,l,a,n[r+10],23,-1094730640),a=g(a,s,c,l,n[r+13],4,681279174),l=g(l,a,s,c,n[r],11,-358537222),c=g(c,l,a,s,n[r+3],16,-722521979),s=g(s,c,l,a,n[r+6],23,76029189),a=g(a,s,c,l,n[r+9],4,-640364487),l=g(l,a,s,c,n[r+12],11,-421815835),c=g(c,l,a,s,n[r+15],16,530742520),s=g(s,c,l,a,n[r+2],23,-995338651),a=v(a,s,c,l,n[r],6,-198630844),l=v(l,a,s,c,n[r+7],10,1126891415),c=v(c,l,a,s,n[r+14],15,-1416354905),s=v(s,c,l,a,n[r+5],21,-57434055),a=v(a,s,c,l,n[r+12],6,1700485571),l=v(l,a,s,c,n[r+3],10,-1894986606),c=v(c,l,a,s,n[r+10],15,-1051523),s=v(s,c,l,a,n[r+1],21,-2054922799),a=v(a,s,c,l,n[r+8],6,1873313359),l=v(l,a,s,c,n[r+15],10,-30611744),c=v(c,l,a,s,n[r+6],15,-1560198380),s=v(s,c,l,a,n[r+13],21,1309151649),a=v(a,s,c,l,n[r+4],6,-145523070),l=v(l,a,s,c,n[r+11],10,-1120210379),c=v(c,l,a,s,n[r+2],15,718787259),s=v(s,c,l,a,n[r+9],21,-343485551),a=e(a,b),s=e(s,C),c=e(c,S),l=e(l,A);return[a,s,c,l]}i(y,"binlMD5");function T(n){var h,r="",b=n.length*32;for(h=0;h<b;h+=8)r+=String.fromCharCode(n[h>>5]>>>h%32&255);return r}i(T,"binl2rstr");function x(n){var h,r=[];for(r[(n.length>>2)-1]=void 0,h=0;h<r.length;h+=1)r[h]=0;var b=n.length*8;for(h=0;h<b;h+=8)r[h>>5]|=(n.charCodeAt(h/8)&255)<<h%32;return r}i(x,"rstr2binl");function I(n){return T(y(x(n),n.length*8))}i(I,"rstrMD5");function E(n,h){var r,b=x(n),C=[],S=[],A;for(C[15]=S[15]=void 0,b.length>16&&(b=y(b,n.length*8)),r=0;r<16;r+=1)C[r]=b[r]^909522486,S[r]=b[r]^1549556828;return A=y(C.concat(x(h)),512+h.length*8),T(y(S.concat(A),640))}i(E,"rstrHMACMD5");function P(n){var h="0123456789abcdef",r="",b,C;for(C=0;C<n.length;C+=1)b=n.charCodeAt(C),r+=h.charAt(b>>>4&15)+h.charAt(b&15);return r}i(P,"rstr2hex");function L(n){return unescape(encodeURIComponent(n))}i(L,"str2rstrUTF8");function d(n){return I(L(n))}i(d,"rawMD5");function p(n){return P(d(n))}i(p,"hexMD5");function w(n,h){return E(L(n),L(h))}i(w,"rawHMACMD5");function _(n,h){return P(w(n,h))}i(_,"hexHMACMD5");function k(n,h,r){return h?r?w(h,n):_(h,n):r?d(n):p(n)}i(k,"md5"),typeof define=="function"&&define.amd?define(function(){return k}):typeof H=="object"&&H.exports?H.exports=k:t.md5=k})(Q)});var ne=V((F,te)=>{"use strict";(function(t,e){typeof F=="object"?te.exports=F=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(F,function(){var t=t||(function(e,o){var u=Object.create||(function(){function d(){}return i(d,"F"),function(p){var w;return d.prototype=p,w=new d,d.prototype=null,w}})(),f={},m=f.lib={},g=m.Base=(function(){return{extend:i(function(d){var p=u(this);return d&&p.mixIn(d),(!p.hasOwnProperty("init")||this.init===p.init)&&(p.init=function(){p.$super.init.apply(this,arguments)}),p.init.prototype=p,p.$super=this,p},"extend"),create:i(function(){var d=this.extend();return d.init.apply(d,arguments),d},"create"),init:i(function(){},"init"),mixIn:i(function(d){for(var p in d)d.hasOwnProperty(p)&&(this[p]=d[p]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},"mixIn"),clone:i(function(){return this.init.prototype.extend(this)},"clone")}})(),v=m.WordArray=g.extend({init:i(function(d,p){d=this.words=d||[],p!=o?this.sigBytes=p:this.sigBytes=d.length*4},"init"),toString:i(function(d){return(d||T).stringify(this)},"toString"),concat:i(function(d){var p=this.words,w=d.words,_=this.sigBytes,k=d.sigBytes;if(this.clamp(),_%4)for(var n=0;n<k;n++){var h=w[n>>>2]>>>24-n%4*8&255;p[_+n>>>2]|=h<<24-(_+n)%4*8}else for(var n=0;n<k;n+=4)p[_+n>>>2]=w[n>>>2];return this.sigBytes+=k,this},"concat"),clamp:i(function(){var d=this.words,p=this.sigBytes;d[p>>>2]&=4294967295<<32-p%4*8,d.length=e.ceil(p/4)},"clamp"),clone:i(function(){var d=g.clone.call(this);return d.words=this.words.slice(0),d},"clone"),random:i(function(d){for(var p=[],w=i(function(r){var r=r,b=987654321,C=4294967295;return function(){b=36969*(b&65535)+(b>>16)&C,r=18e3*(r&65535)+(r>>16)&C;var S=(b<<16)+r&C;return S/=4294967296,S+=.5,S*(e.random()>.5?1:-1)}},"r"),_=0,k;_<d;_+=4){var n=w((k||e.random())*4294967296);k=n()*987654071,p.push(n()*4294967296|0)}return new v.init(p,d)},"random")}),y=f.enc={},T=y.Hex={stringify:i(function(d){for(var p=d.words,w=d.sigBytes,_=[],k=0;k<w;k++){var n=p[k>>>2]>>>24-k%4*8&255;_.push((n>>>4).toString(16)),_.push((n&15).toString(16))}return _.join("")},"stringify"),parse:i(function(d){for(var p=d.length,w=[],_=0;_<p;_+=2)w[_>>>3]|=parseInt(d.substr(_,2),16)<<24-_%8*4;return new v.init(w,p/2)},"parse")},x=y.Latin1={stringify:i(function(d){for(var p=d.words,w=d.sigBytes,_=[],k=0;k<w;k++){var n=p[k>>>2]>>>24-k%4*8&255;_.push(String.fromCharCode(n))}return _.join("")},"stringify"),parse:i(function(d){for(var p=d.length,w=[],_=0;_<p;_++)w[_>>>2]|=(d.charCodeAt(_)&255)<<24-_%4*8;return new v.init(w,p)},"parse")},I=y.Utf8={stringify:i(function(d){try{return decodeURIComponent(escape(x.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},"stringify"),parse:i(function(d){return x.parse(unescape(encodeURIComponent(d)))},"parse")},E=m.BufferedBlockAlgorithm=g.extend({reset:i(function(){this._data=new v.init,this._nDataBytes=0},"reset"),_append:i(function(d){typeof d=="string"&&(d=I.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},"_append"),_process:i(function(d){var p=this._data,w=p.words,_=p.sigBytes,k=this.blockSize,n=k*4,h=_/n;d?h=e.ceil(h):h=e.max((h|0)-this._minBufferSize,0);var r=h*k,b=e.min(r*4,_);if(r){for(var C=0;C<r;C+=k)this._doProcessBlock(w,C);var S=w.splice(0,r);p.sigBytes-=b}return new v.init(S,b)},"_process"),clone:i(function(){var d=g.clone.call(this);return d._data=this._data.clone(),d},"clone"),_minBufferSize:0}),P=m.Hasher=E.extend({cfg:g.extend(),init:i(function(d){this.cfg=this.cfg.extend(d),this.reset()},"init"),reset:i(function(){E.reset.call(this),this._doReset()},"reset"),update:i(function(d){return this._append(d),this._process(),this},"update"),finalize:i(function(d){d&&this._append(d);var p=this._doFinalize();return p},"finalize"),blockSize:512/32,_createHelper:i(function(d){return function(p,w){return new d.init(w).finalize(p)}},"_createHelper"),_createHmacHelper:i(function(d){return function(p,w){return new L.HMAC.init(d,w).finalize(p)}},"_createHmacHelper")}),L=f.algo={};return f})(Math);return t})});var ie=V((D,re)=>{"use strict";(function(t,e){typeof D=="object"?re.exports=D=e(ne()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(D,function(t){return(function(){var e=t,o=e.lib,u=o.WordArray,f=o.Hasher,m=e.algo,g=[],v=m.SHA1=f.extend({_doReset:i(function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878,3285377520])},"_doReset"),_doProcessBlock:i(function(y,T){for(var x=this._hash.words,I=x[0],E=x[1],P=x[2],L=x[3],d=x[4],p=0;p<80;p++){if(p<16)g[p]=y[T+p]|0;else{var w=g[p-3]^g[p-8]^g[p-14]^g[p-16];g[p]=w<<1|w>>>31}var _=(I<<5|I>>>27)+d+g[p];p<20?_+=(E&P|~E&L)+1518500249:p<40?_+=(E^P^L)+1859775393:p<60?_+=(E&P|E&L|P&L)-1894007588:_+=(E^P^L)-899497514,d=L,L=P,P=E<<30|E>>>2,E=I,I=_}x[0]=x[0]+I|0,x[1]=x[1]+E|0,x[2]=x[2]+P|0,x[3]=x[3]+L|0,x[4]=x[4]+d|0},"_doProcessBlock"),_doFinalize:i(function(){var y=this._data,T=y.words,x=this._nDataBytes*8,I=y.sigBytes*8;return T[I>>>5]|=128<<24-I%32,T[(I+64>>>9<<4)+14]=Math.floor(x/4294967296),T[(I+64>>>9<<4)+15]=x,y.sigBytes=T.length*4,this._process(),this._hash},"_doFinalize"),clone:i(function(){var y=f.clone.call(this);return y._hash=this._hash.clone(),y},"clone")});e.SHA1=f._createHelper(v),e.HmacSHA1=f._createHmacHelper(v)})(),t.SHA1})});var wt={};De(wt,{TrackKey:()=>G,name:()=>yt,reportTeaEvent:()=>K,version:()=>bt});var le=Y(ee(),1),de=Y(ie(),1);function M(){return window.appId||null}i(M,"getAppId");function N(){var o;let t="suda-csrf-token",e=document.cookie.split("; ");for(let u of e){let[f,m]=u.split("=");if(f===t)return decodeURIComponent(m)}return(o=window.csrfToken)!=null?o:null}i(N,"getCsrfToken");function $(){let t=globalThis.CLIENT_BASE_PATH||"/";return/^\/app\/[^/]/.test(t)}i($,"isNewPathEnabled");function j(){switch(globalThis.ENVIRONMENT){case"gray":return"PRE";case"online":return"ONLINE";default:return"BOE"}}i(j,"getEnv");function oe(){return window.appEnv!=null?window.appEnv==="runtime":!0}i(oe,"isOnlineEnv");function W(){let t=navigator.userAgent,e=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(t),o=/iPad|Tab|Tablet/i.test(t)&&navigator.maxTouchPoints>1;return e||o}i(W,"isMobile");async function ae(){var t,e,o;try{let u=M();if(!u)return!0;let f=$()?`/app/${u}/__runtime__/api/v1/studio/get_published`:`/spark/b/${u}/get_published`,g=await(await fetch(f,{headers:{"X-Suda-Csrf-Token":(t=N())!=null?t:""}})).json();if(g.code===0||g.status_code==="0")return((o=(e=g.data)==null?void 0:e.app_info)==null?void 0:o.show_badge)!==!1}catch{}return!0}i(ae,"fetchShowBadge");async function se(){var u;let t=M();if(!t)return{code:1,msg:"appId is required",data:{}};let e=$()?`/app/${t}/__runtime__/api/v1/studio/lark/user_info`:`/spark/b/${t}/lark/user_info`;return await(await fetch(e,{headers:{"X-Suda-Csrf-Token":(u=N())!=null?u:""}})).json()}i(se,"getLarkUserInfo");var G={VIEW:"aily_agent_artifact_page_view"},$e="08a441",je="42b91e";function ce(t){let e=String(t);return(0,de.default)($e+(0,le.default)(e+je)).toString()}i(ce,"encryptTea");var z=!1;async function We(){var m,g,v,y;let{data:t}=await se(),{tenantID:e,userID:o}=t||{},u=o&&o!=="0"?ce(o):void 0,f=e&&e!=="0"?ce(e):void 0;(m=window.collectEvent)==null||m.call(window,"init",{app_id:788827,channel:"cn",disable_auto_pv:!1,enable_ab_test:!1,enable_debug:!1,enable_stay_duration:!0,reportTime:1e3}),(v=window.collectEvent)==null||v.call(window,"config",{user_unique_id:u,device_type:W()?"mobile":"pc",evtParams:{open_from:(g=new URLSearchParams(window.location.search).get("open-from"))!=null?g:void 0,env:j(),user_id:u,tenant_id:f}}),z=!0,(y=window.collectEvent)==null||y.call(window,"start")}i(We,"createTracker");async function K({trackKey:t,trackParams:e={}}){var o;try{z||(z=!0,await We()),(o=window.collectEvent)==null||o.call(window,t,e)}catch(u){console.error(u)}}i(K,"reportTeaEvent");function ue(){return K({trackKey:G.VIEW,trackParams:{artifact_uid:M(),agent_id:"agent_miaoda",url:window.location.href}})}i(ue,"reportPageView");function fe(){if(typeof crypto!="undefined"&&crypto.getRandomValues){let e=new Uint8Array(8);return crypto.getRandomValues(e),Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join("")}let t="";for(let e=0;e<16;e++)t+=Math.floor(Math.random()*16).toString(16);return t}i(fe,"generateUUID");var pe="x_sdk_device_id";function Ue(){try{let t=localStorage.getItem(pe);return t||(t=fe(),localStorage.setItem(pe,t)),t}catch{return fe()}}i(Ue,"getDeviceId");function Ve(){let t=typeof navigator!="undefined"?navigator.userAgent:"";return t&&(/Android/i.test(t)&&/Mobile/i.test(t)||/iPhone|iPod/i.test(t)||/BlackBerry|IEMobile|Opera Mini/i.test(t))?"mobile":"desktop"}i(Ve,"getDeviceType");var ze="pageSessionID";function Ge(){try{return new URLSearchParams(window.location.search).get(ze)||""}catch{return""}}i(Ge,"getPvId");function Ke(t={}){let e=t.pvId||Ge();return{app_id:window.appId||"",tenant_id:window.tenantId||"",user_id:window.userId||"",did:Ue(),module:"app_web",app_env:"runtime",source_type:"user",device_type:Ve(),release_commit_id:window.__RELEASE_COMMIT_ID__||"",...e?{pv_id:e}:{}}}i(Ke,"getDefaultAttributes");function he(t){let e=Math.round(t);if(!Number.isFinite(e))throw new RangeError(`toNanoString: \u975E\u6CD5\u65F6\u95F4\u6233 ${t}`);return typeof BigInt!="function"?e===0?"0":`${e}000000`:String(BigInt(e)*BigInt(1e6))}i(he,"toNanoString");var Ze="1.0.2";function Je(t,e){let o=Ke(e),u=he(Date.now());return{metricsData:{resource:{attributes:{sdk_version:Ze,sdk_lang:"javascript",sdk_type:"client-frontend"}},metrics:[{name:"apaas_internal_metrics_pv_uv",description:"Count of page views",unit:"",scopeName:"apaas_internal_metrics_pv_uv",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:t.map(f=>({attributes:{...o,url:f.url,path:f.path,referrer:f.referrer},startTimeUnixNano:he(f.timestampMs),timeUnixNano:u,asDouble:1}))}}]}}}i(Je,"buildPayload");function Xe(t,e,o={},u){if(e.length===0)return;let f;try{f=JSON.stringify(Je(e,u))}catch{return}try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":window.csrfToken||"",...o},body:f,keepalive:!0}).catch(()=>{})}catch{}}i(Xe,"sendPvData");var Z="__APAAS_PV_TRACKER_STARTED__";function qe(){try{let t=window;return t[Z]?!1:(t[Z]=!0,!0)}catch{return!0}}i(qe,"claimPvReporting");function me(){try{window[Z]=!1}catch{}}i(me,"releasePvReporting");var O,Ye=(O=class{constructor(){this.started=!1,this.disposers=[],this.holdsPvReporting=!1,this.buffer=[]}static get instance(){return this._instance||(this._instance=new O),this._instance}start(e){var o;if(!this.started&&qe()){this.holdsPvReporting=!0,this.config=e,this.started=!0;try{this.listenRouteChanges(),this.registerLifecycleListeners();let u=(o=e.flushIntervalMs)!=null?o:1e4;this.flushTimer=setInterval(()=>this.flush(),u)}catch(u){throw this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.holdsPvReporting=!1,me(),u}}}shutdown(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=void 0),this.firstFlushTimer&&(clearTimeout(this.firstFlushTimer),this.firstFlushTimer=void 0),this.started=!1;for(let e of this.disposers.splice(0))try{e()}catch{}this.holdsPvReporting&&(this.holdsPvReporting=!1,me())}pageKey(){let{origin:e,pathname:o,search:u}=window.location;return`${e}${o}${u}`}scheduleFirstFlush(){var e;let o=(e=this.config)==null?void 0:e.firstFlushDelayMs;o==null||this.firstFlushTimer||(this.firstFlushTimer=setTimeout(()=>this.flush(),o))}recordPv(){let e=this.pageKey();this.lastKey!==e&&(this.lastKey=e,this.buffer.push({url:window.location.href,path:window.location.pathname,referrer:document.referrer,timestampMs:Date.now()}),this.scheduleFirstFlush())}flush(){if(!this.config||this.buffer.length===0)return;let e=this.buffer.splice(0);Xe(this.config.collectorUrl,e,this.config.headers,{pvId:this.config.pvId})}listenRouteChanges(){this.recordPv();let e=i(()=>this.recordPv(),"onPopState");window.addEventListener("popstate",e),this.disposers.push(()=>window.removeEventListener("popstate",e)),this.patchHistory("pushState"),this.patchHistory("replaceState")}patchHistory(e){let o=history[e],u=i(()=>this.recordPv(),"recordPv");history[e]=function(...f){let m=o.apply(this,f);return u(),m},this.disposers.push(()=>{history[e]=o})}registerLifecycleListeners(){let e=i(()=>{document.visibilityState==="hidden"&&this.flush()},"onVisibilityChange");document.addEventListener("visibilitychange",e),this.disposers.push(()=>document.removeEventListener("visibilitychange",e));let o=i(()=>this.flush(),"onPageHide");window.addEventListener("pagehide",o),this.disposers.push(()=>window.removeEventListener("pagehide",o))}},i(O,"_PvTracker"),O),ge=Ye.instance;function ve(){var o;let t=(o=M())!=null?o:"",e=$()?`/app/${t}/__runtime__/api/v1/observability/metrics/collect`:`/spark/app/${t}/runtime/api/v1/observability/metrics/collect`;ge.start({collectorUrl:e})}i(ve,"initPvTracking");var Qe=/\bLark\//i;function _e(){var e,o,u,f;let t=window;return typeof((u=(o=(e=t.webkit)==null?void 0:e.messageHandlers)==null?void 0:o.invokeNative)==null?void 0:u.postMessage)=="function"||typeof((f=t.Lark_Bridge)==null?void 0:f.invokeNative)=="function"?!0:Qe.test(navigator.userAgent)}i(_e,"isFeishuClient");function be({messageIds:t,token:e,docType:o=113}){var v,y;if(t.length===0||!e)return!1;let u={apiName:"markMiaodaFeedMessagesRead",data:{__v2__:!0,messageIds:t.map(String),token:e,docType:o}},f=window,m=(y=(v=f.webkit)==null?void 0:v.messageHandlers)==null?void 0:y.invokeNative;if(m!=null&&m.postMessage)return m.postMessage(u),!0;let g=f.Lark_Bridge;return g!=null&&g.invokeNative?(g.invokeNative(JSON.stringify(u)),!0):!1}i(be,"markMiaodaFeedMessagesRead");var et=113,tt="/app/",nt="/__runtime__/api/v1/devops/read_lark_messages";function rt(t){if(!t||typeof t!="object")return[];let{data:e}=t;return Array.isArray(e)?e.map(String):e&&Array.isArray(e.message_ids)?e.message_ids.map(String):[]}i(rt,"extractMessageIds");var ye=!1;async function it(t){var u;let e=await fetch(`${tt}${t}${nt}`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-Suda-Csrf-Token":(u=N())!=null?u:""}});if(!e.ok)return[];let o=await e.json();return rt(o)}i(it,"fetchFeedMessageIds");async function we(){if(ye||!_e())return;ye=!0;let t=M();if(t)try{let e=await it(t);if(!e.length)return;be({messageIds:e,token:t,docType:et})}catch{}}i(we,"markFeedReadOnce");var xe="https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp",ot=`${xe}/miaoda-ui/doubao.svg`,at=`${xe}/logo/miaodalogo.svg`,ke='<svg viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.08312 8.08298C8.2384 7.92769 8.23953 7.67705 8.08424 7.52176L5.3625 4.80002L8.08422 2.07829C8.23951 1.92301 8.23839 1.67236 8.0831 1.51708C7.92781 1.36179 7.67717 1.36066 7.52188 1.51595C7.36659 1.67124 4.80016 4.23767 4.80016 4.23767L2.07841 1.51593C1.92313 1.36064 1.67248 1.36177 1.5172 1.51705C1.36191 1.67234 1.36078 1.92298 1.51607 2.07827L4.23782 4.80002L1.51605 7.52178C1.36076 7.67707 1.36189 7.92771 1.51718 8.083C1.67246 8.23829 1.92311 8.23941 2.07839 8.08412L4.80016 5.36236L7.5219 8.0841C7.67719 8.23939 7.92783 8.23826 8.08312 8.08298Z" fill="currentColor"/></svg>',st='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.6667 2H3.33333V14H6.66667V15.3334H3.33333C2.59695 15.3334 2 14.7364 2 14V2C2 1.26364 2.59695 0.666687 3.33333 0.666687H12.6667C13.403 0.666687 14 1.26364 14 2V7.33335H12.6667V2Z" fill="currentColor"/><path d="M5.33333 4.66669C4.96514 4.66669 4.66667 4.96516 4.66667 5.33335C4.66667 5.70154 4.96514 6 5.33333 6H10.6667C11.0349 6 11.3333 5.70154 11.3333 5.33335C11.3333 4.96516 11.0349 4.66669 10.6667 4.66669H5.33333Z" fill="currentColor"/><path d="M4.66667 8.33335C4.66667 7.96516 4.96514 7.66669 5.33333 7.66669H8C8.36819 7.66669 8.66667 7.96516 8.66667 8.33335C8.66667 8.70154 8.36819 9 8 9H5.33333C4.96514 9 4.66667 8.70154 4.66667 8.33335Z" fill="currentColor"/><path d="M13.5523 8.70017C13.9428 8.30964 14.576 8.30964 14.9665 8.70017C15.357 9.09069 15.357 9.72386 14.9665 10.1144L14.2594 10.8215L12.8452 9.40728L13.5523 8.70017Z" fill="currentColor"/><path d="M12.1381 10.1144L13.5523 11.5286L10.2309 14.85C10.0916 14.9892 9.91229 15.0815 9.71798 15.1138L8.45737 15.3234C8.42136 15.3294 8.38467 15.3177 8.35885 15.2918C8.33271 15.2657 8.32099 15.2284 8.32749 15.192L8.55128 13.9374C8.58465 13.7502 8.6746 13.5779 8.80901 13.4435L12.1381 10.1144Z" fill="currentColor"/></svg>',ct='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.9922 1.99221C12.5445 1.98895 12.9958 2.43407 12.999 2.98634L13.0762 16.1943L14.6387 14.6328L17.8926 11.3789C18.2831 10.9884 18.9171 10.9885 19.3076 11.3789C19.6977 11.7695 19.6979 12.4026 19.3076 12.793L16.0527 16.0479L12.7979 19.3018C12.7111 19.3884 12.6098 19.4566 12.5 19.5059H20.375C20.9271 19.5059 21.3748 19.9538 21.375 20.5059C21.375 21.0581 20.9273 21.5059 20.375 21.5059H3.625C3.07272 21.5059 2.625 21.0581 2.625 20.5059C2.62523 19.9538 3.07286 19.5059 3.625 19.5059H11.6816C11.572 19.4566 11.4704 19.3884 11.3838 19.3018L4.87402 12.793C4.48372 12.4026 4.4839 11.7694 4.87402 11.3789C5.26452 10.9884 5.89756 10.9885 6.28809 11.3789L11.0762 16.166L10.999 2.99806C10.9958 2.44603 11.4402 1.99582 11.9922 1.99221Z" fill="currentColor"/></svg>',lt='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.0754 7.57153C2.23188 9.44922 3.49231 11.053 5.27982 11.6488C5.31351 11.6601 5.33994 11.6865 5.35117 11.7202L5.72076 12.8289C5.88752 13.3292 6.3557 13.6667 6.88304 13.6667H9.11696C9.6443 13.6667 10.1125 13.3292 10.2792 12.8289L10.6488 11.7202C10.6601 11.6865 10.6865 11.6601 10.7202 11.6488C12.5077 11.053 13.7681 9.44922 13.9246 7.57153L14 6.66667C14 3.35296 11.3137 0.666668 8 0.666668C4.68629 0.666668 2 3.35296 2 6.66667L2.0754 7.57153ZM9.38392 11.2985L9.03899 12.3333H6.96101L6.61608 11.2985C6.47214 10.8667 6.13328 10.5279 5.70146 10.3839C4.41995 9.95675 3.51631 8.80696 3.40413 7.4608L3.33362 6.61462C3.36152 4.06127 5.44004 2 8 2C10.56 2 12.6385 4.06127 12.6664 6.61462L12.5959 7.4608C12.4837 8.80696 11.5801 9.95675 10.2985 10.3839C9.86672 10.5279 9.52786 10.8667 9.38392 11.2985Z" fill="currentColor"/><path d="M6.66667 14.3333C6.29848 14.3333 6 14.6318 6 15C6 15.3682 6.29848 15.6667 6.66667 15.6667H9.33333C9.70152 15.6667 10 15.3682 10 15C10 14.6318 9.70152 14.3333 9.33333 14.3333H6.66667Z" fill="currentColor"/><path d="M8.00864 4.13208L5.44578 6.94049C5.20258 7.18228 5.37835 7.56531 5.74361 7.58951L7.2181 7.6872L7.21814 9.60852C7.21814 9.96788 7.72139 10.1366 7.99168 9.86792C8.26197 9.59921 10.5545 7.05951 10.5545 7.05951C10.7977 6.81772 10.622 6.43469 10.2567 6.41049L8.78222 6.3128L8.78219 4.39148C8.78218 4.03212 8.27893 3.86336 8.00864 4.13208Z" fill="currentColor"/></svg>',Se=!0,dt="0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)",ut="0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)",X="'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif",U={doubao:{brandText:"\u8C46\u5305\u5DE5\u4F5C\u751F\u6210",logoSrc:ot,downloadUrl:"https://ugapk.com/FCtLH"},miaoda:{brandText:"\u5999\u642D\u751F\u6210",logoSrc:at,landingUrl:"https://miaoda.feishu.cn/landing"}},ft={BOE:"tns.feishu-boe.cn",PRE:"tns.feishu-pre.cn",ONLINE:"tns.feishu.cn"};function Ee(){var o;let t=JSON.stringify({scene:"miaoda_app_report",entity_id:(o=M())!=null?o:"",entity_type:"miaoda_app",extra:""}),e=`https://${ft[j()]}/cust/lark_report/?type=common&params=${encodeURIComponent(t)}&lang=zh-CN`;window.open(e,"_blank","noopener,noreferrer")}i(Ee,"openReport");var pt={feedback:st,close:ke,download:ct,efficiency:lt};function Ie(t){let e=document.createElement("span");Object.assign(e.style,{display:"inline-flex",width:`${t}px`,height:`${t}px`,flexShrink:"0"}),e.innerHTML=ke;let o=e.firstElementChild;return o&&(o.setAttribute("width",String(t)),o.setAttribute("height",String(t)),o.style.display="block"),e}i(Ie,"makeCloseIcon");function ht(t,e=16){if(t==="close")return Ie(e);let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:`${e}px`,height:`${e}px`,flexShrink:"0"}),o.innerHTML=pt[t];let u=o.firstElementChild;return u&&(u.style.display="block"),o}i(ht,"makeIcon");function mt(t,e){let o=document.createElement("img");return o.src=t,o.width=e,o.height=e,o.alt="",Object.assign(o.style,{width:`${e}px`,height:`${e}px`,maxWidth:"none",maxHeight:"none",borderRadius:"100px",flexShrink:"0",display:"block"}),o}i(mt,"makeLogo");function Le(t,e,o){let u=e==="desktop",f=U[t],m=document.createElement("div");Object.assign(m.style,{boxSizing:"border-box",display:"inline-flex",alignItems:"center",gap:"4px",padding:u?"6px 12px 6px 8px":"5px 12px 5px 8px",background:"#363636",border:"0.5px solid rgba(255,255,255,0.1)",borderRadius:"100px",boxShadow:dt,cursor:"pointer"});let g=mt(f.logoSrc,16),v=document.createElement("span");if(v.textContent=f.brandText,Object.assign(v.style,{fontFamily:X,fontSize:u?"12px":"14px",lineHeight:u?"18px":"22px",color:"rgba(255,255,255,0.85)",whiteSpace:"nowrap"}),m.append(g,v),u&&o){let y=document.createElement("span");y.setAttribute("role","button"),y.setAttribute("aria-label","\u5173\u95ED"),y.setAttribute("data-watermark-close",""),Object.assign(y.style,{display:"none",alignItems:"center",cursor:"pointer",flexShrink:"0",color:"rgba(255,255,255,0.5)"}),y.appendChild(Ie(10)),y.addEventListener("click",T=>{T.stopPropagation(),o()}),m.appendChild(y)}return m}i(Le,"buildPill");function R(t){let e=document.createElement("div");e.setAttribute("role","menuitem"),e.setAttribute("data-label",t.label),Object.assign(e.style,{boxSizing:"border-box",display:"flex",alignItems:"center",gap:"8px",minHeight:"38px",padding:"4px 10px",borderRadius:"6px",cursor:"pointer",color:"#000000"});let o=document.createElement("span");Object.assign(o.style,{display:"inline-flex",width:"16px",height:"16px",flexShrink:"0",color:"#000000"}),o.appendChild(ht(t.icon));let u=document.createElement("span");return u.textContent=t.label,Object.assign(u.style,{fontFamily:X,fontSize:`${t.fontSize}px`,lineHeight:`${t.fontSize+8}px`,color:"#000000",whiteSpace:"nowrap"}),e.append(o,u),e.addEventListener("mouseenter",()=>{e.style.background="rgba(0,0,0,0.04)"}),e.addEventListener("mouseleave",()=>{e.style.background="transparent"}),e.addEventListener("click",t.onClick),e}i(R,"buildMenuRow");function gt(){let t=document.createElement("div");return Object.assign(t.style,{height:"1px",background:"rgba(0,0,0,0.08)",margin:"0 10px"}),t}i(gt,"buildDivider");function Te(t){var o;let e=document.createElement("div");if(Object.assign(e.style,{boxSizing:"border-box",display:"flex",flexDirection:"column",minWidth:`${t.minWidth}px`,background:"#ffffff",border:"0.5px solid rgba(0,0,0,0.1)",borderRadius:"10px",boxShadow:ut,overflow:"hidden",outline:"none"}),t.items.length){let u=document.createElement("div");Object.assign(u.style,{boxSizing:"border-box",padding:"4px",display:"flex",flexDirection:"column",gap:`${(o=t.itemGap)!=null?o:0}px`}),t.items.forEach(f=>u.appendChild(f)),e.appendChild(u)}if(t.extraItems&&t.extraItems.length){e.appendChild(gt());let u=document.createElement("div");Object.assign(u.style,{boxSizing:"border-box",padding:"4px"}),t.extraItems.forEach(f=>u.appendChild(f)),e.appendChild(u)}return e}i(Te,"buildMenuCard");function Ae(t,e=!1){let o=document.createElement("div");o.setAttribute("data-custom-element",`${t}-watermark${e?"-mobile":""}`);let u=o.attachShadow({mode:"open"}),f=document.createElement("style");f.textContent=`
2
2
  :host {
3
3
  all: initial !important;
4
4
  display: block !important;
@@ -14,10 +14,10 @@
14
14
  all: initial;
15
15
  direction: ltr;
16
16
  unicode-bidi: isolate;
17
- font-family: ${J};
17
+ font-family: ${X};
18
18
  display: flex;
19
19
  flex-direction: column;
20
20
  align-items: flex-end;
21
21
  gap: 8px;
22
22
  }
23
- `;let m=document.createElement("div");return m.className="watermark-root",u.append(p,m),{host:o,container:m}}i(Ee,"createWatermarkRoot");function st(n){let{host:e,container:o}=Ee(n),u=[];n==="doubao"?u.push(M({icon:"download",label:"\u4E0B\u8F7D\u8C46\u5305\u5DE5\u4F5C",fontSize:14,onClick:i(()=>window.open(j.doubao.downloadUrl,"_blank","noopener,noreferrer"),"onClick")})):u.push(M({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:14,onClick:i(()=>window.open(j.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),_e&&u.push(M({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:14,onClick:Ce}));let p=Se({items:u,minWidth:160,itemGap:8});p.style.display="none";let m=ke(n,"desktop",()=>e.remove()),g=m.querySelector("[data-watermark-close]");o.append(p,m);let v=null;return o.addEventListener("mouseenter",()=>{v&&clearTimeout(v),p.style.display="flex",g&&(g.style.display="inline-flex")}),o.addEventListener("mouseleave",()=>{v=setTimeout(()=>{p.style.display="none",g&&(g.style.display="none")},100)}),e}i(st,"buildDesktopWatermark");function ct(n){let{host:e,container:o}=Ee(n,!0);o.style.cursor="pointer";let u=[];n==="miaoda"&&u.push(M({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:16,onClick:i(()=>window.open(j.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),_e&&u.push(M({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:16,onClick:Ce}));let p=[M({icon:"close",label:"\u4E0D\u518D\u5C55\u793A",fontSize:16,onClick:i(w=>{w.stopPropagation(),document.removeEventListener("click",v),e.remove()},"onClick")})],m=Se({items:u,extraItems:p,minWidth:160});m.style.display="none";let g=ke(n,"mobile");o.append(m,g),o.addEventListener("click",w=>{w.stopPropagation(),m.style.display=m.style.display==="none"?"flex":"none"});let v=i(()=>{m.style.display="none"},"onOutsideClick");return document.addEventListener("click",v),e}i(ct,"buildMobileWatermark");var be=!1,Z=!1;async function Le(n){if(be||Z||typeof document=="undefined")return;if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",()=>Le(n),{once:!0});return}Z=!0;let e=await ae();if(be=!0,Z=!1,!e)return;let o=W()?ct(n):st(n);document.body.appendChild(o)}i(Le,"mountWatermark");function Ie(){return Le("doubao")}i(Ie,"mountDoubaoWatermark");var lt="0.0.14",dt="@lark-apaas/miaoda-coding-sdk";oe()&&(ue(),ve());Ie();return He(ut);})();
23
+ `;let m=document.createElement("div");return m.className="watermark-root",u.append(f,m),{host:o,container:m}}i(Ae,"createWatermarkRoot");function vt(t){let{host:e,container:o}=Ae(t),u=[];t==="doubao"?u.push(R({icon:"download",label:"\u4E0B\u8F7D\u8C46\u5305\u5DE5\u4F5C",fontSize:14,onClick:i(()=>window.open(U.doubao.downloadUrl,"_blank","noopener,noreferrer"),"onClick")})):u.push(R({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:14,onClick:i(()=>window.open(U.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),Se&&u.push(R({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:14,onClick:Ee}));let f=Te({items:u,minWidth:160,itemGap:8});f.style.display="none";let m=Le(t,"desktop",()=>e.remove()),g=m.querySelector("[data-watermark-close]");o.append(f,m);let v=null;return o.addEventListener("mouseenter",()=>{v&&clearTimeout(v),f.style.display="flex",g&&(g.style.display="inline-flex")}),o.addEventListener("mouseleave",()=>{v=setTimeout(()=>{f.style.display="none",g&&(g.style.display="none")},100)}),e}i(vt,"buildDesktopWatermark");function _t(t){let{host:e,container:o}=Ae(t,!0);o.style.cursor="pointer";let u=[];t==="miaoda"&&u.push(R({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:16,onClick:i(()=>window.open(U.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),Se&&u.push(R({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:16,onClick:Ee}));let f=[R({icon:"close",label:"\u4E0D\u518D\u5C55\u793A",fontSize:16,onClick:i(y=>{y.stopPropagation(),document.removeEventListener("click",v),e.remove()},"onClick")})],m=Te({items:u,extraItems:f,minWidth:160});m.style.display="none";let g=Le(t,"mobile");o.append(m,g),o.addEventListener("click",y=>{y.stopPropagation(),m.style.display=m.style.display==="none"?"flex":"none"});let v=i(()=>{m.style.display="none"},"onOutsideClick");return document.addEventListener("click",v),e}i(_t,"buildMobileWatermark");var Ce=!1,J=!1;async function Pe(t){if(Ce||J||typeof document=="undefined")return;if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",()=>Pe(t),{once:!0});return}J=!0;let e=await ae();if(Ce=!0,J=!1,!e)return;let o=W()?_t(t):vt(t);document.body.appendChild(o)}i(Pe,"mountWatermark");function Me(){return Pe("doubao")}i(Me,"mountDoubaoWatermark");var bt="0.0.15-beta.0",yt="@lark-apaas/miaoda-coding-sdk";oe()&&(ue(),ve());Me();we();return Ne(wt);})();
@@ -1827,7 +1827,7 @@ var MiaodaRuntime = (() => {
1827
1827
  __name(mountMiaodaWatermark, "mountMiaodaWatermark");
1828
1828
 
1829
1829
  // src/runtime.ts
1830
- var version = "0.0.14";
1830
+ var version = "0.0.15-beta.0";
1831
1831
  var name = "@lark-apaas/miaoda-coding-sdk";
1832
1832
  if (isOnlineEnv()) {
1833
1833
  reportPageView();
package/dist/runtime.js CHANGED
@@ -1827,7 +1827,7 @@ var MiaodaRuntime = (() => {
1827
1827
  __name(mountMiaodaWatermark, "mountMiaodaWatermark");
1828
1828
 
1829
1829
  // src/runtime.ts
1830
- var version = "0.0.14";
1830
+ var version = "0.0.15-beta.0";
1831
1831
  var name = "@lark-apaas/miaoda-coding-sdk";
1832
1832
  if (isOnlineEnv()) {
1833
1833
  reportPageView();
@@ -20,4 +20,4 @@
20
20
  align-items: flex-end;
21
21
  gap: 8px;
22
22
  }
23
- `;let m=document.createElement("div");return m.className="watermark-root",u.append(p,m),{host:o,container:m}}i(Ee,"createWatermarkRoot");function st(n){let{host:e,container:o}=Ee(n),u=[];n==="doubao"?u.push(M({icon:"download",label:"\u4E0B\u8F7D\u8C46\u5305\u5DE5\u4F5C",fontSize:14,onClick:i(()=>window.open(j.doubao.downloadUrl,"_blank","noopener,noreferrer"),"onClick")})):u.push(M({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:14,onClick:i(()=>window.open(j.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),_e&&u.push(M({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:14,onClick:Ce}));let p=Se({items:u,minWidth:160,itemGap:8});p.style.display="none";let m=ke(n,"desktop",()=>e.remove()),g=m.querySelector("[data-watermark-close]");o.append(p,m);let v=null;return o.addEventListener("mouseenter",()=>{v&&clearTimeout(v),p.style.display="flex",g&&(g.style.display="inline-flex")}),o.addEventListener("mouseleave",()=>{v=setTimeout(()=>{p.style.display="none",g&&(g.style.display="none")},100)}),e}i(st,"buildDesktopWatermark");function ct(n){let{host:e,container:o}=Ee(n,!0);o.style.cursor="pointer";let u=[];n==="miaoda"&&u.push(M({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:16,onClick:i(()=>window.open(j.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),_e&&u.push(M({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:16,onClick:Ce}));let p=[M({icon:"close",label:"\u4E0D\u518D\u5C55\u793A",fontSize:16,onClick:i(w=>{w.stopPropagation(),document.removeEventListener("click",v),e.remove()},"onClick")})],m=Se({items:u,extraItems:p,minWidth:160});m.style.display="none";let g=ke(n,"mobile");o.append(m,g),o.addEventListener("click",w=>{w.stopPropagation(),m.style.display=m.style.display==="none"?"flex":"none"});let v=i(()=>{m.style.display="none"},"onOutsideClick");return document.addEventListener("click",v),e}i(ct,"buildMobileWatermark");var be=!1,Z=!1;async function Le(n){if(be||Z||typeof document=="undefined")return;if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",()=>Le(n),{once:!0});return}Z=!0;let e=await ae();if(be=!0,Z=!1,!e)return;let o=W()?ct(n):st(n);document.body.appendChild(o)}i(Le,"mountWatermark");function Ie(){return Le("miaoda")}i(Ie,"mountMiaodaWatermark");var lt="0.0.14",dt="@lark-apaas/miaoda-coding-sdk";oe()&&(ue(),ve());Ie();return He(ut);})();
23
+ `;let m=document.createElement("div");return m.className="watermark-root",u.append(p,m),{host:o,container:m}}i(Ee,"createWatermarkRoot");function st(n){let{host:e,container:o}=Ee(n),u=[];n==="doubao"?u.push(M({icon:"download",label:"\u4E0B\u8F7D\u8C46\u5305\u5DE5\u4F5C",fontSize:14,onClick:i(()=>window.open(j.doubao.downloadUrl,"_blank","noopener,noreferrer"),"onClick")})):u.push(M({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:14,onClick:i(()=>window.open(j.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),_e&&u.push(M({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:14,onClick:Ce}));let p=Se({items:u,minWidth:160,itemGap:8});p.style.display="none";let m=ke(n,"desktop",()=>e.remove()),g=m.querySelector("[data-watermark-close]");o.append(p,m);let v=null;return o.addEventListener("mouseenter",()=>{v&&clearTimeout(v),p.style.display="flex",g&&(g.style.display="inline-flex")}),o.addEventListener("mouseleave",()=>{v=setTimeout(()=>{p.style.display="none",g&&(g.style.display="none")},100)}),e}i(st,"buildDesktopWatermark");function ct(n){let{host:e,container:o}=Ee(n,!0);o.style.cursor="pointer";let u=[];n==="miaoda"&&u.push(M({icon:"efficiency",label:"\u4E86\u89E3\u5999\u642D",fontSize:16,onClick:i(()=>window.open(j.miaoda.landingUrl,"_blank","noopener,noreferrer"),"onClick")})),_e&&u.push(M({icon:"feedback",label:"\u6295\u8BC9\u4E0E\u4E3E\u62A5",fontSize:16,onClick:Ce}));let p=[M({icon:"close",label:"\u4E0D\u518D\u5C55\u793A",fontSize:16,onClick:i(w=>{w.stopPropagation(),document.removeEventListener("click",v),e.remove()},"onClick")})],m=Se({items:u,extraItems:p,minWidth:160});m.style.display="none";let g=ke(n,"mobile");o.append(m,g),o.addEventListener("click",w=>{w.stopPropagation(),m.style.display=m.style.display==="none"?"flex":"none"});let v=i(()=>{m.style.display="none"},"onOutsideClick");return document.addEventListener("click",v),e}i(ct,"buildMobileWatermark");var be=!1,Z=!1;async function Le(n){if(be||Z||typeof document=="undefined")return;if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",()=>Le(n),{once:!0});return}Z=!0;let e=await ae();if(be=!0,Z=!1,!e)return;let o=W()?ct(n):st(n);document.body.appendChild(o)}i(Le,"mountWatermark");function Ie(){return Le("miaoda")}i(Ie,"mountMiaodaWatermark");var lt="0.0.15-beta.0",dt="@lark-apaas/miaoda-coding-sdk";oe()&&(ue(),ve());Ie();return He(ut);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/miaoda-coding-sdk",
3
- "version": "0.0.14",
3
+ "version": "0.0.15-beta.0",
4
4
  "description": "CDN distribution of aPaaS Web SDK for no-build HTML — self-contained IIFE entries consumed via <script src>",
5
5
  "license": "MIT",
6
6
  "type": "module",