@learnpack/learnpack 5.0.142 → 5.0.144

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.
@@ -393,6 +393,9 @@
393
393
  .top-2 {
394
394
  top: calc(var(--spacing) * 2);
395
395
  }
396
+ .right-0 {
397
+ right: calc(var(--spacing) * 0);
398
+ }
396
399
  .right-2 {
397
400
  right: calc(var(--spacing) * 2);
398
401
  }
@@ -704,6 +707,9 @@
704
707
  .gap-3 {
705
708
  gap: calc(var(--spacing) * 3);
706
709
  }
710
+ .gap-4 {
711
+ gap: calc(var(--spacing) * 4);
712
+ }
707
713
  :where(.space-y-2 > :not(:last-child)) {
708
714
  --tw-space-y-reverse: 0;
709
715
  margin-block-start: calc(
@@ -10,10 +10,15 @@
10
10
  />
11
11
 
12
12
  <title>Learnpack Creator: Craft tutorials in seconds!</title>
13
- <script type="module" crossorigin src="/creator/assets/index-BLd63KeV.js"></script>
14
- <link rel="stylesheet" crossorigin href="/creator/assets/index-Cz25oPGo.css">
13
+ <script type="module" crossorigin src="/creator/assets/index-CzMCewx6.js"></script>
14
+ <link rel="stylesheet" crossorigin href="/creator/assets/index-DSOj0E0h.css">
15
15
  </head>
16
16
  <body>
17
17
  <div id="root"></div>
18
+ <script
19
+ src="https://challenges.cloudflare.com/turnstile/v0/api.js"
20
+ async
21
+ defer
22
+ ></script>
18
23
  </body>
19
24
  </html>
@@ -327,7 +327,7 @@ to {
327
327
  `+t.slice(s+1):l+=t.slice(a),l.slice(1)}function sOe(t){for(var e="",r,n,a,i=0;i<t.length;i++){if(r=t.charCodeAt(i),r>=55296&&r<=56319&&(n=t.charCodeAt(i+1),n>=56320&&n<=57343)){e+=uK((r-55296)*1024+n-56320+65536),i++;continue}a=Bi[r],e+=!a&&i0(r)?t[i]:a||uK(r)}return e}function oOe(t,e,r){var n="",a=t.tag,i,s;for(i=0,s=r.length;i<s;i+=1)Af(t,e,r[i],!1,!1)&&(i!==0&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=a,t.dump="["+n+"]"}function lOe(t,e,r,n){var a="",i=t.tag,s,o;for(s=0,o=r.length;s<o;s+=1)Af(t,e+1,r[s],!0,!0)&&((!n||s!==0)&&(a+=$T(t,e)),t.dump&&By===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=i,t.dump=a||"[]"}function cOe(t,e,r){var n="",a=t.tag,i=Object.keys(r),s,o,l,u,d;for(s=0,o=i.length;s<o;s+=1)d="",s!==0&&(d+=", "),t.condenseFlow&&(d+='"'),l=i[s],u=r[l],Af(t,e,l,!1,!1)&&(t.dump.length>1024&&(d+="? "),d+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Af(t,e,u,!1,!1)&&(d+=t.dump,n+=d));t.tag=a,t.dump="{"+n+"}"}function uOe(t,e,r,n){var a="",i=t.tag,s=Object.keys(r),o,l,u,d,h,f;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new Fy("sortKeys must be a boolean or a function");for(o=0,l=s.length;o<l;o+=1)f="",(!n||o!==0)&&(f+=$T(t,e)),u=s[o],d=r[u],Af(t,e+1,u,!0,!0,!0)&&(h=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,h&&(t.dump&&By===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,h&&(f+=$T(t,e)),Af(t,e+1,d,!0,h)&&(t.dump&&By===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,a+=f));t.tag=i,t.dump=a||"{}"}function xK(t,e,r){var n,a,i,s,o,l;for(a=r?t.explicitTypes:t.implicitTypes,i=0,s=a.length;i<s;i+=1)if(o=a[i],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof e=="object"&&e instanceof o.instanceOf)&&(!o.predicate||o.predicate(e))){if(t.tag=r?o.tag:"?",o.represent){if(l=t.styleMap[o.tag]||o.defaultStyle,tK.call(o.represent)==="[object Function]")n=o.represent(e,l);else if(rK.call(o.represent,l))n=o.represent[l](e,l);else throw new Fy("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}function Af(t,e,r,n,a,i){t.tag=null,t.dump=r,xK(t,r,!1)||xK(t,r,!0);var s=tK.call(t.dump);n&&(n=t.flowLevel<0||t.flowLevel>e);var o=s==="[object Object]"||s==="[object Array]",l,u;if(o&&(l=t.duplicates.indexOf(r),u=l!==-1),(t.tag!==null&&t.tag!=="?"||u||t.indent!==2&&e>0)&&(a=!1),u&&t.usedDuplicates[l])t.dump="*ref_"+l;else{if(o&&u&&!t.usedDuplicates[l]&&(t.usedDuplicates[l]=!0),s==="[object Object]")n&&Object.keys(t.dump).length!==0?(uOe(t,e,t.dump,a),u&&(t.dump="&ref_"+l+t.dump)):(cOe(t,e,t.dump),u&&(t.dump="&ref_"+l+" "+t.dump));else if(s==="[object Array]"){var d=t.noArrayIndent&&e>0?e-1:e;n&&t.dump.length!==0?(lOe(t,d,t.dump,a),u&&(t.dump="&ref_"+l+t.dump)):(oOe(t,d,t.dump),u&&(t.dump="&ref_"+l+" "+t.dump))}else if(s==="[object String]")t.tag!=="?"&&aOe(t,t.dump,e,i);else{if(t.skipInvalid)return!1;throw new Fy("unacceptable kind of an object to dump "+s)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function dOe(t,e){var r=[],n=[],a,i;for(UT(t,r,n),a=0,i=n.length;a<i;a+=1)e.duplicates.push(r[n[a]]);e.usedDuplicates=new Array(i)}function UT(t,e,r){var n,a,i;if(t!==null&&typeof t=="object")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,i=t.length;a<i;a+=1)UT(t[a],e,r);else for(n=Object.keys(t),a=0,i=n.length;a<i;a+=1)UT(t[n[a]],e,r)}function kK(t,e){e=e||{};var r=new JIe(e);return r.noRefs||dOe(t,r),Af(r,0,t,!0,!0)?r.dump+`
328
328
  `:""}function hOe(t,e){return kK(t,Py.extend({schema:DIe},e))}BT.dump=kK,BT.safeDump=hOe;var Ix=Iy,_K=BT;function Ox(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}Qn.Type=ti,Qn.Schema=e0,Qn.FAILSAFE_SCHEMA=OT,Qn.JSON_SCHEMA=NX,Qn.CORE_SCHEMA=IX,Qn.DEFAULT_SAFE_SCHEMA=My,Qn.DEFAULT_FULL_SCHEMA=Cx,Qn.load=Ix.load,Qn.loadAll=Ix.loadAll,Qn.safeLoad=Ix.safeLoad,Qn.safeLoadAll=Ix.safeLoadAll,Qn.dump=_K.dump,Qn.safeDump=_K.safeDump,Qn.YAMLException=Dy,Qn.MINIMAL_SCHEMA=OT,Qn.SAFE_SCHEMA=My,Qn.DEFAULT_SCHEMA=Cx,Qn.scan=Ox("scan"),Qn.parse=Ox("parse"),Qn.compose=Ox("compose"),Qn.addConstructor=Ox("addConstructor");var fOe=Qn,pOe=fOe,EK=pOe,gOe="\\ufeff?",mOe=typeof process<"u"?process.platform:"",yOe="^("+gOe+"(= yaml =|---)$([\\s\\S]*?)^(?:\\2|\\.\\.\\.)\\s*$"+(mOe==="win32"?"\\r?":"")+"(?:\\n)?)",SK=new RegExp(yOe,"m");RT.exports=vOe,RT.exports.test=xOe;function vOe(t,e){t=t||"";var r={allowUnsafe:!1};e=e instanceof Object?{...r,...e}:r,e.allowUnsafe=!!e.allowUnsafe;var n=t.split(/(\r?\n)/);return n[0]&&/= yaml =|---/.test(n[0])?wOe(t,e.allowUnsafe):{attributes:{},body:t,bodyBegin:1}}function bOe(t,e){for(var r=1,n=e.indexOf(`
329
329
  `),a=t.index+t[0].length;n!==-1;){if(n>=a)return r;r++,n=e.indexOf(`
330
- `,n+1)}return r}function wOe(t,e){var r=SK.exec(t);if(!r)return{attributes:{},body:t,bodyBegin:1};var n=e?EK.load:EK.safeLoad,a=r[r.length-1].replace(/^\s+|\s+$/g,""),i=n(a)||{},s=t.replace(r[0],""),o=bOe(r,t);return{attributes:i,body:s,bodyBegin:o,frontmatter:a}}function xOe(t){return t=t||"",SK.test(t)}var kOe=RT.exports;const _Oe=Kn(kOe),Jn={get:(t,e=!0)=>{const r=localStorage.getItem(t);return r?e?JSON.parse(r):r:null},set:(t,e)=>{localStorage.setItem(t,JSON.stringify(e))},remove:t=>{localStorage.removeItem(t)},clear:()=>{localStorage.clear()},getEditorTabs:t=>Jn.get(`editorTabs_${t}`)||[],setEditorTabs:(t,e)=>{Jn.set(`editorTabs_${t}`,e)}},EOe=1;class SOe{calculateStepIndicator(e,r){return r.status!=="skipped"&&r.status!=="unread"?Math.min(r.time_spent/3600*100,100):0}calculateGlobalIndicator(e,r){const n={total_time:.3,num_sessions:.2,completion_rate:.3,interactions:.2},a=Math.min(r.total_time_on_platform/36e3,1)*100,i=Math.min(r.num_sessions/5,1)*100,s=r.completion_rate,o=Math.min(r.total_interactions/100,1)*100;return(a*n.total_time+i*n.num_sessions+s*n.completion_rate+o*n.interactions)/100*100}}class COe{calculateStepIndicator(e,r){return r.status==="completed"?Math.min((r.comp_struggles+r.test_struggles)/20*100,100):r.status==="attempted"?Math.min(r.time_spent/1800*100,100):r.status==="skipped"?25:0}calculateGlobalIndicator(e,r){const n={steps_not_completed:.3,time_on_incomplete:.2,avg_comp_struggles:.2,avg_test_struggles:.2,skipped_steps:.1},a=r.total_steps>0?r.steps_not_completed/r.total_steps*100:0,i=Math.min(r.time_on_incomplete/18e3,1)*100,s=Math.min(r.avg_comp_struggles/10,1)*100,o=Math.min(r.avg_test_struggles/10,1)*100,l=r.total_steps>0?r.skipped_steps/r.total_steps*100:0;return(a*n.steps_not_completed+i*n.time_on_incomplete+s*n.avg_comp_struggles+o*n.avg_test_struggles+l*n.skipped_steps)/100*100}}function CK(t){var o,l,u,d;let e=t.completed_at?"completed":t.opened_at?"attempted":"unread";const r=t.completed_at&&t.opened_at?(t.completed_at-t.opened_at)/1e3:0,n=((o=t.compilations)==null?void 0:o.filter(h=>h.exit_code!==0).length)||0,a=((l=t.tests)==null?void 0:l.filter(h=>h.exit_code!==0).length)||0;let i=0,s=0;for(let h=((u=t.compilations)==null?void 0:u.length)-1;h>=0&&t.compilations[h].exit_code!==0;h--)i++;for(let h=((d=t.tests)==null?void 0:d.length)-1;h>=0&&t.tests[h].exit_code!==0;h--)s++;return{status:e,time_spent:r,comp_struggles:n,test_struggles:a,streak_comp_struggles:i,streak_test_struggle:s}}function TOe(t){const e=t.length,r=t.map(CK),n=r.filter(p=>p.status==="completed").length,a=r.filter(p=>p.status==="attempted").length,i=r.filter(p=>p.status==="skipped").length,s=e?n/e*100:0,o=t.reduce((p,g)=>{var m,y;return p+(((m=g.compilations)==null?void 0:m.length)||0)+(((y=g.tests)==null?void 0:y.length)||0)},0),l=r.reduce((p,g)=>p+g.time_spent,0),u=a+i,d=e?r.reduce((p,g)=>p+g.comp_struggles,0)/e:0,h=e?r.reduce((p,g)=>p+g.test_struggles,0)/e:0;let f=0;for(const p of t){let g=0;for(const m of p.tests||[])m.exit_code===0?g++:g=0,f=Math.max(f,g)}return{total_time_on_platform:l,num_sessions:1,completion_rate:s,total_interactions:o,steps_not_completed:u,time_on_incomplete:l,avg_comp_struggles:d,avg_test_struggles:h,skipped_steps:i,total_steps:e,global_test_success_streak:f}}function TK(t){const e=[new SOe,new COe],r=t.steps.map(s=>CK(s)),n=TOe(t.steps),a=t.steps.map((s,o)=>{const l=r[o],u={};return e.forEach(d=>{u[d.constructor.name]=d.calculateStepIndicator(s,l)}),{slug:s.slug,metrics:l,indicators:u}}),i={};return e.forEach(s=>{i[s.constructor.name]=s.calculateGlobalIndicator(a.map(o=>o.indicators[s.constructor.name]),n)}),{algo_version:EOe,global:{metrics:n,indicators:i},steps:a}}const AK={name:"learnpack-ai",private:!0,version:"5.0.164",scripts:{dev:"node src/utils/development.js --turn on && vite",build:"node src/utils/development.js --turn off && tsc && vite build && node src/utils/uploadLearnpack.js && node bin/publish.js && node src/utils/createVersionsFile.js ","dev-build":"node src/utils/development.js --turn on && tsc && vite build",lint:"eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",preview:"vite preview","compile-command":"tsc src/utils/development.ts && node src/utils/development.js --turn on"},dependencies:{"@monaco-editor/react":"^4.6.0",axios:"^1.7.7","front-matter":"^4.0.2","highlight.js":"^11.11.1",i18next:"^23.10.1","js-yaml":"^4.1.0",mermaid:"^11.6.0","monaco-editor":"^0.50.0",react:"^18.2.0","react-dom":"^18.2.0","react-draggable":"^4.4.6","react-gtm-module":"^2.0.11","react-hot-toast":"^2.4.1","react-i18next":"^14.1.0","react-markdown":"^9.0.1","react-monaco-editor":"^0.56.1","react-router-dom":"^6.27.0","react-syntax-highlighter":"^15.6.1","rehype-katex":"^7.0.1","remark-emoji":"^5.0.1","remark-gfm":"^4.0.0","remark-math":"^6.0.0","socket.io":"^4.7.2","socket.io-client":"^4.7.2",uuid:"^10.0.0",zustand:"^4.4.1"},devDependencies:{"@aws-sdk/client-s3":"^3.709.0","@types/js-yaml":"^4.0.9","@types/markdown-it":"^14.1.2","@types/react":"^18.2.15","@types/react-dom":"^18.2.7","@types/react-gtm-module":"^2.0.3","@types/react-syntax-highlighter":"^15.5.13","@types/remarkable":"^2.0.3","@types/uuid":"^10.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","@vitejs/plugin-react-swc":"^3.3.2",archiver:"^6.0.1",dotenv:"^16.4.7",eslint:"^8.45.0","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.3",inquirer:"^9.2.12",typescript:"^5.0.2",vite:"^4.5.13"}};function LK(t,e){return function(){return t.apply(e,arguments)}}const{toString:AOe}=Object.prototype,{getPrototypeOf:jT}=Object,Dx=(t=>e=>{const r=AOe.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bl=t=>(t=t.toLowerCase(),e=>Dx(e)===t),Mx=t=>e=>typeof e===t,{isArray:s0}=Array,$y=Mx("undefined");function LOe(t){return t!==null&&!$y(t)&&t.constructor!==null&&!$y(t.constructor)&&bo(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const RK=Bl("ArrayBuffer");function ROe(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&RK(t.buffer),e}const NOe=Mx("string"),bo=Mx("function"),NK=Mx("number"),Px=t=>t!==null&&typeof t=="object",IOe=t=>t===!0||t===!1,Fx=t=>{if(Dx(t)!=="object")return!1;const e=jT(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},OOe=Bl("Date"),DOe=Bl("File"),MOe=Bl("Blob"),POe=Bl("FileList"),FOe=t=>Px(t)&&bo(t.pipe),BOe=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||bo(t.append)&&((e=Dx(t))==="formdata"||e==="object"&&bo(t.toString)&&t.toString()==="[object FormData]"))},$Oe=Bl("URLSearchParams"),[zOe,UOe,jOe,HOe]=["ReadableStream","Request","Response","Headers"].map(Bl),qOe=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zy(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,a;if(typeof t!="object"&&(t=[t]),s0(t))for(n=0,a=t.length;n<a;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let o;for(n=0;n<s;n++)o=i[n],e.call(null,t[o],o,t)}}function IK(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,a;for(;n-- >0;)if(a=r[n],e===a.toLowerCase())return a;return null}const Lf=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),OK=t=>!$y(t)&&t!==Lf;function HT(){const{caseless:t}=OK(this)&&this||{},e={},r=(n,a)=>{const i=t&&IK(e,a)||a;Fx(e[i])&&Fx(n)?e[i]=HT(e[i],n):Fx(n)?e[i]=HT({},n):s0(n)?e[i]=n.slice():e[i]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&zy(arguments[n],r);return e}const VOe=(t,e,r,{allOwnKeys:n}={})=>(zy(e,(a,i)=>{r&&bo(a)?t[i]=LK(a,r):t[i]=a},{allOwnKeys:n}),t),GOe=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),WOe=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},YOe=(t,e,r,n)=>{let a,i,s;const o={};if(e=e||{},t==null)return e;do{for(a=Object.getOwnPropertyNames(t),i=a.length;i-- >0;)s=a[i],(!n||n(s,t,e))&&!o[s]&&(e[s]=t[s],o[s]=!0);t=r!==!1&&jT(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},XOe=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},KOe=t=>{if(!t)return null;if(s0(t))return t;let e=t.length;if(!NK(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},ZOe=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&jT(Uint8Array)),QOe=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let a;for(;(a=n.next())&&!a.done;){const i=a.value;e.call(t,i[0],i[1])}},JOe=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},eDe=Bl("HTMLFormElement"),tDe=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),DK=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),rDe=Bl("RegExp"),MK=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};zy(r,(a,i)=>{let s;(s=e(a,i,t))!==!1&&(n[i]=s||a)}),Object.defineProperties(t,n)},nDe=t=>{MK(t,(e,r)=>{if(bo(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(bo(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},aDe=(t,e)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return s0(t)?n(t):n(String(t).split(e)),r},iDe=()=>{},sDe=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,qT="abcdefghijklmnopqrstuvwxyz",PK="0123456789",FK={DIGIT:PK,ALPHA:qT,ALPHA_DIGIT:qT+qT.toUpperCase()+PK},oDe=(t=16,e=FK.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function lDe(t){return!!(t&&bo(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const cDe=t=>{const e=new Array(10),r=(n,a)=>{if(Px(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[a]=n;const i=s0(n)?[]:{};return zy(n,(s,o)=>{const l=r(s,a+1);!$y(l)&&(i[o]=l)}),e[a]=void 0,i}}return n};return r(t,0)},uDe=Bl("AsyncFunction"),dDe=t=>t&&(Px(t)||bo(t))&&bo(t.then)&&bo(t.catch),BK=((t,e)=>t?setImmediate:e?((r,n)=>(Lf.addEventListener("message",({source:a,data:i})=>{a===Lf&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Lf.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",bo(Lf.postMessage)),hDe=typeof queueMicrotask<"u"?queueMicrotask.bind(Lf):typeof process<"u"&&process.nextTick||BK,rt={isArray:s0,isArrayBuffer:RK,isBuffer:LOe,isFormData:BOe,isArrayBufferView:ROe,isString:NOe,isNumber:NK,isBoolean:IOe,isObject:Px,isPlainObject:Fx,isReadableStream:zOe,isRequest:UOe,isResponse:jOe,isHeaders:HOe,isUndefined:$y,isDate:OOe,isFile:DOe,isBlob:MOe,isRegExp:rDe,isFunction:bo,isStream:FOe,isURLSearchParams:$Oe,isTypedArray:ZOe,isFileList:POe,forEach:zy,merge:HT,extend:VOe,trim:qOe,stripBOM:GOe,inherits:WOe,toFlatObject:YOe,kindOf:Dx,kindOfTest:Bl,endsWith:XOe,toArray:KOe,forEachEntry:QOe,matchAll:JOe,isHTMLForm:eDe,hasOwnProperty:DK,hasOwnProp:DK,reduceDescriptors:MK,freezeMethods:nDe,toObjectSet:aDe,toCamelCase:tDe,noop:iDe,toFiniteNumber:sDe,findKey:IK,global:Lf,isContextDefined:OK,ALPHABET:FK,generateString:oDe,isSpecCompliantForm:lDe,toJSONObject:cDe,isAsyncFn:uDe,isThenable:dDe,setImmediate:BK,asap:hDe};function xr(t,e,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}rt.inherits(xr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:rt.toJSONObject(this.config),code:this.code,status:this.status}}});const $K=xr.prototype,zK={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{zK[t]={value:t}}),Object.defineProperties(xr,zK),Object.defineProperty($K,"isAxiosError",{value:!0}),xr.from=(t,e,r,n,a,i)=>{const s=Object.create($K);return rt.toFlatObject(t,s,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),xr.call(s,t.message,e,r,n,a),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const fDe=null;function VT(t){return rt.isPlainObject(t)||rt.isArray(t)}function UK(t){return rt.endsWith(t,"[]")?t.slice(0,-2):t}function jK(t,e,r){return t?t.concat(e).map(function(a,i){return a=UK(a),!r&&i?"["+a+"]":a}).join(r?".":""):e}function pDe(t){return rt.isArray(t)&&!t.some(VT)}const gDe=rt.toFlatObject(rt,{},null,function(e){return/^is[A-Z]/.test(e)});function Bx(t,e,r){if(!rt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=rt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!rt.isUndefined(y[m])});const n=r.metaTokens,a=r.visitor||d,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&rt.isSpecCompliantForm(e);if(!rt.isFunction(a))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(rt.isDate(g))return g.toISOString();if(!l&&rt.isBlob(g))throw new xr("Blob is not supported. Use a Buffer instead.");return rt.isArrayBuffer(g)||rt.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,m,y){let v=g;if(g&&!y&&typeof g=="object"){if(rt.endsWith(m,"{}"))m=n?m:m.slice(0,-2),g=JSON.stringify(g);else if(rt.isArray(g)&&pDe(g)||(rt.isFileList(g)||rt.endsWith(m,"[]"))&&(v=rt.toArray(g)))return m=UK(m),v.forEach(function(x,k){!(rt.isUndefined(x)||x===null)&&e.append(s===!0?jK([m],k,i):s===null?m:m+"[]",u(x))}),!1}return VT(g)?!0:(e.append(jK(y,m,i),u(g)),!1)}const h=[],f=Object.assign(gDe,{defaultVisitor:d,convertValue:u,isVisitable:VT});function p(g,m){if(!rt.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(g),rt.forEach(g,function(v,b){(!(rt.isUndefined(v)||v===null)&&a.call(e,v,rt.isString(b)?b.trim():b,m,f))===!0&&p(v,m?m.concat(b):[b])}),h.pop()}}if(!rt.isObject(t))throw new TypeError("data must be an object");return p(t),e}function HK(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function GT(t,e){this._pairs=[],t&&Bx(t,this,e)}const qK=GT.prototype;qK.append=function(e,r){this._pairs.push([e,r])},qK.toString=function(e){const r=e?function(n){return e.call(this,n,HK)}:HK;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function mDe(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function VK(t,e,r){if(!e)return t;const n=r&&r.encode||mDe,a=r&&r.serialize;let i;if(a?i=a(e,r):i=rt.isURLSearchParams(e)?e.toString():new GT(e,r).toString(n),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class yDe{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){rt.forEach(this.handlers,function(n){n!==null&&e(n)})}}const GK=yDe,WK={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vDe={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:GT,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},WT=typeof window<"u"&&typeof document<"u",YT=typeof navigator=="object"&&navigator||void 0,bDe=WT&&(!YT||["ReactNative","NativeScript","NS"].indexOf(YT.product)<0),wDe=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),xDe=WT&&window.location.href||"http://localhost",Fs={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:WT,hasStandardBrowserEnv:bDe,hasStandardBrowserWebWorkerEnv:wDe,navigator:YT,origin:xDe},Symbol.toStringTag,{value:"Module"})),...vDe};function kDe(t,e){return Bx(t,new Fs.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return Fs.isNode&&rt.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function _De(t){return rt.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function EDe(t){const e={},r=Object.keys(t);let n;const a=r.length;let i;for(n=0;n<a;n++)i=r[n],e[i]=t[i];return e}function YK(t){function e(r,n,a,i){let s=r[i++];if(s==="__proto__")return!0;const o=Number.isFinite(+s),l=i>=r.length;return s=!s&&rt.isArray(a)?a.length:s,l?(rt.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!o):((!a[s]||!rt.isObject(a[s]))&&(a[s]=[]),e(r,n,a[s],i)&&rt.isArray(a[s])&&(a[s]=EDe(a[s])),!o)}if(rt.isFormData(t)&&rt.isFunction(t.entries)){const r={};return rt.forEachEntry(t,(n,a)=>{e(_De(n),a,r,0)}),r}return null}function SDe(t,e,r){if(rt.isString(t))try{return(e||JSON.parse)(t),rt.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const XT={transitional:WK,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=rt.isObject(e);if(i&&rt.isHTMLForm(e)&&(e=new FormData(e)),rt.isFormData(e))return a?JSON.stringify(YK(e)):e;if(rt.isArrayBuffer(e)||rt.isBuffer(e)||rt.isStream(e)||rt.isFile(e)||rt.isBlob(e)||rt.isReadableStream(e))return e;if(rt.isArrayBufferView(e))return e.buffer;if(rt.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return kDe(e,this.formSerializer).toString();if((o=rt.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Bx(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),SDe(e)):e}],transformResponse:[function(e){const r=this.transitional||XT.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(rt.isResponse(e)||rt.isReadableStream(e))return e;if(e&&rt.isString(e)&&(n&&!this.responseType||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?xr.from(o,xr.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fs.classes.FormData,Blob:Fs.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};rt.forEach(["delete","get","head","post","put","patch"],t=>{XT.headers[t]={}});const KT=XT,CDe=rt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),TDe=t=>{const e={};let r,n,a;return t&&t.split(`
330
+ `,n+1)}return r}function wOe(t,e){var r=SK.exec(t);if(!r)return{attributes:{},body:t,bodyBegin:1};var n=e?EK.load:EK.safeLoad,a=r[r.length-1].replace(/^\s+|\s+$/g,""),i=n(a)||{},s=t.replace(r[0],""),o=bOe(r,t);return{attributes:i,body:s,bodyBegin:o,frontmatter:a}}function xOe(t){return t=t||"",SK.test(t)}var kOe=RT.exports;const _Oe=Kn(kOe),Jn={get:(t,e=!0)=>{const r=localStorage.getItem(t);return r?e?JSON.parse(r):r:null},set:(t,e)=>{localStorage.setItem(t,JSON.stringify(e))},remove:t=>{localStorage.removeItem(t)},clear:()=>{localStorage.clear()},getEditorTabs:t=>Jn.get(`editorTabs_${t}`)||[],setEditorTabs:(t,e)=>{Jn.set(`editorTabs_${t}`,e)}},EOe=1;class SOe{calculateStepIndicator(e,r){return r.status!=="skipped"&&r.status!=="unread"?Math.min(r.time_spent/3600*100,100):0}calculateGlobalIndicator(e,r){const n={total_time:.3,num_sessions:.2,completion_rate:.3,interactions:.2},a=Math.min(r.total_time_on_platform/36e3,1)*100,i=Math.min(r.num_sessions/5,1)*100,s=r.completion_rate,o=Math.min(r.total_interactions/100,1)*100;return(a*n.total_time+i*n.num_sessions+s*n.completion_rate+o*n.interactions)/100*100}}class COe{calculateStepIndicator(e,r){return r.status==="completed"?Math.min((r.comp_struggles+r.test_struggles)/20*100,100):r.status==="attempted"?Math.min(r.time_spent/1800*100,100):r.status==="skipped"?25:0}calculateGlobalIndicator(e,r){const n={steps_not_completed:.3,time_on_incomplete:.2,avg_comp_struggles:.2,avg_test_struggles:.2,skipped_steps:.1},a=r.total_steps>0?r.steps_not_completed/r.total_steps*100:0,i=Math.min(r.time_on_incomplete/18e3,1)*100,s=Math.min(r.avg_comp_struggles/10,1)*100,o=Math.min(r.avg_test_struggles/10,1)*100,l=r.total_steps>0?r.skipped_steps/r.total_steps*100:0;return(a*n.steps_not_completed+i*n.time_on_incomplete+s*n.avg_comp_struggles+o*n.avg_test_struggles+l*n.skipped_steps)/100*100}}function CK(t){var o,l,u,d;let e=t.completed_at?"completed":t.opened_at?"attempted":"unread";const r=t.completed_at&&t.opened_at?(t.completed_at-t.opened_at)/1e3:0,n=((o=t.compilations)==null?void 0:o.filter(h=>h.exit_code!==0).length)||0,a=((l=t.tests)==null?void 0:l.filter(h=>h.exit_code!==0).length)||0;let i=0,s=0;for(let h=((u=t.compilations)==null?void 0:u.length)-1;h>=0&&t.compilations[h].exit_code!==0;h--)i++;for(let h=((d=t.tests)==null?void 0:d.length)-1;h>=0&&t.tests[h].exit_code!==0;h--)s++;return{status:e,time_spent:r,comp_struggles:n,test_struggles:a,streak_comp_struggles:i,streak_test_struggle:s}}function TOe(t){const e=t.length,r=t.map(CK),n=r.filter(p=>p.status==="completed").length,a=r.filter(p=>p.status==="attempted").length,i=r.filter(p=>p.status==="skipped").length,s=e?n/e*100:0,o=t.reduce((p,g)=>{var m,y;return p+(((m=g.compilations)==null?void 0:m.length)||0)+(((y=g.tests)==null?void 0:y.length)||0)},0),l=r.reduce((p,g)=>p+g.time_spent,0),u=a+i,d=e?r.reduce((p,g)=>p+g.comp_struggles,0)/e:0,h=e?r.reduce((p,g)=>p+g.test_struggles,0)/e:0;let f=0;for(const p of t){let g=0;for(const m of p.tests||[])m.exit_code===0?g++:g=0,f=Math.max(f,g)}return{total_time_on_platform:l,num_sessions:1,completion_rate:s,total_interactions:o,steps_not_completed:u,time_on_incomplete:l,avg_comp_struggles:d,avg_test_struggles:h,skipped_steps:i,total_steps:e,global_test_success_streak:f}}function TK(t){const e=[new SOe,new COe],r=t.steps.map(s=>CK(s)),n=TOe(t.steps),a=t.steps.map((s,o)=>{const l=r[o],u={};return e.forEach(d=>{u[d.constructor.name]=d.calculateStepIndicator(s,l)}),{slug:s.slug,metrics:l,indicators:u}}),i={};return e.forEach(s=>{i[s.constructor.name]=s.calculateGlobalIndicator(a.map(o=>o.indicators[s.constructor.name]),n)}),{algo_version:EOe,global:{metrics:n,indicators:i},steps:a}}const AK={name:"learnpack-ai",private:!0,version:"5.0.165",scripts:{dev:"node src/utils/development.js --turn on && vite",build:"node src/utils/development.js --turn off && tsc && vite build && node src/utils/uploadLearnpack.js && node bin/publish.js && node src/utils/createVersionsFile.js ","dev-build":"node src/utils/development.js --turn on && tsc && vite build",lint:"eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",preview:"vite preview","compile-command":"tsc src/utils/development.ts && node src/utils/development.js --turn on"},dependencies:{"@monaco-editor/react":"^4.6.0",axios:"^1.7.7","front-matter":"^4.0.2","highlight.js":"^11.11.1",i18next:"^23.10.1","js-yaml":"^4.1.0",mermaid:"^11.6.0","monaco-editor":"^0.50.0",react:"^18.2.0","react-dom":"^18.2.0","react-draggable":"^4.4.6","react-gtm-module":"^2.0.11","react-hot-toast":"^2.4.1","react-i18next":"^14.1.0","react-markdown":"^9.0.1","react-monaco-editor":"^0.56.1","react-router-dom":"^6.27.0","react-syntax-highlighter":"^15.6.1","rehype-katex":"^7.0.1","remark-emoji":"^5.0.1","remark-gfm":"^4.0.0","remark-math":"^6.0.0","socket.io":"^4.7.2","socket.io-client":"^4.7.2",uuid:"^10.0.0",zustand:"^4.4.1"},devDependencies:{"@aws-sdk/client-s3":"^3.709.0","@types/js-yaml":"^4.0.9","@types/markdown-it":"^14.1.2","@types/react":"^18.2.15","@types/react-dom":"^18.2.7","@types/react-gtm-module":"^2.0.3","@types/react-syntax-highlighter":"^15.5.13","@types/remarkable":"^2.0.3","@types/uuid":"^10.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","@vitejs/plugin-react-swc":"^3.3.2",archiver:"^6.0.1",dotenv:"^16.4.7",eslint:"^8.45.0","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.3",inquirer:"^9.2.12",typescript:"^5.0.2",vite:"^4.5.13"}};function LK(t,e){return function(){return t.apply(e,arguments)}}const{toString:AOe}=Object.prototype,{getPrototypeOf:jT}=Object,Dx=(t=>e=>{const r=AOe.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bl=t=>(t=t.toLowerCase(),e=>Dx(e)===t),Mx=t=>e=>typeof e===t,{isArray:s0}=Array,$y=Mx("undefined");function LOe(t){return t!==null&&!$y(t)&&t.constructor!==null&&!$y(t.constructor)&&bo(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const RK=Bl("ArrayBuffer");function ROe(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&RK(t.buffer),e}const NOe=Mx("string"),bo=Mx("function"),NK=Mx("number"),Px=t=>t!==null&&typeof t=="object",IOe=t=>t===!0||t===!1,Fx=t=>{if(Dx(t)!=="object")return!1;const e=jT(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},OOe=Bl("Date"),DOe=Bl("File"),MOe=Bl("Blob"),POe=Bl("FileList"),FOe=t=>Px(t)&&bo(t.pipe),BOe=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||bo(t.append)&&((e=Dx(t))==="formdata"||e==="object"&&bo(t.toString)&&t.toString()==="[object FormData]"))},$Oe=Bl("URLSearchParams"),[zOe,UOe,jOe,HOe]=["ReadableStream","Request","Response","Headers"].map(Bl),qOe=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zy(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,a;if(typeof t!="object"&&(t=[t]),s0(t))for(n=0,a=t.length;n<a;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let o;for(n=0;n<s;n++)o=i[n],e.call(null,t[o],o,t)}}function IK(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,a;for(;n-- >0;)if(a=r[n],e===a.toLowerCase())return a;return null}const Lf=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),OK=t=>!$y(t)&&t!==Lf;function HT(){const{caseless:t}=OK(this)&&this||{},e={},r=(n,a)=>{const i=t&&IK(e,a)||a;Fx(e[i])&&Fx(n)?e[i]=HT(e[i],n):Fx(n)?e[i]=HT({},n):s0(n)?e[i]=n.slice():e[i]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&zy(arguments[n],r);return e}const VOe=(t,e,r,{allOwnKeys:n}={})=>(zy(e,(a,i)=>{r&&bo(a)?t[i]=LK(a,r):t[i]=a},{allOwnKeys:n}),t),GOe=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),WOe=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},YOe=(t,e,r,n)=>{let a,i,s;const o={};if(e=e||{},t==null)return e;do{for(a=Object.getOwnPropertyNames(t),i=a.length;i-- >0;)s=a[i],(!n||n(s,t,e))&&!o[s]&&(e[s]=t[s],o[s]=!0);t=r!==!1&&jT(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},XOe=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},KOe=t=>{if(!t)return null;if(s0(t))return t;let e=t.length;if(!NK(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},ZOe=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&jT(Uint8Array)),QOe=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let a;for(;(a=n.next())&&!a.done;){const i=a.value;e.call(t,i[0],i[1])}},JOe=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},eDe=Bl("HTMLFormElement"),tDe=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),DK=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),rDe=Bl("RegExp"),MK=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};zy(r,(a,i)=>{let s;(s=e(a,i,t))!==!1&&(n[i]=s||a)}),Object.defineProperties(t,n)},nDe=t=>{MK(t,(e,r)=>{if(bo(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(bo(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},aDe=(t,e)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return s0(t)?n(t):n(String(t).split(e)),r},iDe=()=>{},sDe=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,qT="abcdefghijklmnopqrstuvwxyz",PK="0123456789",FK={DIGIT:PK,ALPHA:qT,ALPHA_DIGIT:qT+qT.toUpperCase()+PK},oDe=(t=16,e=FK.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function lDe(t){return!!(t&&bo(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const cDe=t=>{const e=new Array(10),r=(n,a)=>{if(Px(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[a]=n;const i=s0(n)?[]:{};return zy(n,(s,o)=>{const l=r(s,a+1);!$y(l)&&(i[o]=l)}),e[a]=void 0,i}}return n};return r(t,0)},uDe=Bl("AsyncFunction"),dDe=t=>t&&(Px(t)||bo(t))&&bo(t.then)&&bo(t.catch),BK=((t,e)=>t?setImmediate:e?((r,n)=>(Lf.addEventListener("message",({source:a,data:i})=>{a===Lf&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Lf.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",bo(Lf.postMessage)),hDe=typeof queueMicrotask<"u"?queueMicrotask.bind(Lf):typeof process<"u"&&process.nextTick||BK,rt={isArray:s0,isArrayBuffer:RK,isBuffer:LOe,isFormData:BOe,isArrayBufferView:ROe,isString:NOe,isNumber:NK,isBoolean:IOe,isObject:Px,isPlainObject:Fx,isReadableStream:zOe,isRequest:UOe,isResponse:jOe,isHeaders:HOe,isUndefined:$y,isDate:OOe,isFile:DOe,isBlob:MOe,isRegExp:rDe,isFunction:bo,isStream:FOe,isURLSearchParams:$Oe,isTypedArray:ZOe,isFileList:POe,forEach:zy,merge:HT,extend:VOe,trim:qOe,stripBOM:GOe,inherits:WOe,toFlatObject:YOe,kindOf:Dx,kindOfTest:Bl,endsWith:XOe,toArray:KOe,forEachEntry:QOe,matchAll:JOe,isHTMLForm:eDe,hasOwnProperty:DK,hasOwnProp:DK,reduceDescriptors:MK,freezeMethods:nDe,toObjectSet:aDe,toCamelCase:tDe,noop:iDe,toFiniteNumber:sDe,findKey:IK,global:Lf,isContextDefined:OK,ALPHABET:FK,generateString:oDe,isSpecCompliantForm:lDe,toJSONObject:cDe,isAsyncFn:uDe,isThenable:dDe,setImmediate:BK,asap:hDe};function xr(t,e,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}rt.inherits(xr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:rt.toJSONObject(this.config),code:this.code,status:this.status}}});const $K=xr.prototype,zK={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{zK[t]={value:t}}),Object.defineProperties(xr,zK),Object.defineProperty($K,"isAxiosError",{value:!0}),xr.from=(t,e,r,n,a,i)=>{const s=Object.create($K);return rt.toFlatObject(t,s,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),xr.call(s,t.message,e,r,n,a),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const fDe=null;function VT(t){return rt.isPlainObject(t)||rt.isArray(t)}function UK(t){return rt.endsWith(t,"[]")?t.slice(0,-2):t}function jK(t,e,r){return t?t.concat(e).map(function(a,i){return a=UK(a),!r&&i?"["+a+"]":a}).join(r?".":""):e}function pDe(t){return rt.isArray(t)&&!t.some(VT)}const gDe=rt.toFlatObject(rt,{},null,function(e){return/^is[A-Z]/.test(e)});function Bx(t,e,r){if(!rt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=rt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!rt.isUndefined(y[m])});const n=r.metaTokens,a=r.visitor||d,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&rt.isSpecCompliantForm(e);if(!rt.isFunction(a))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(rt.isDate(g))return g.toISOString();if(!l&&rt.isBlob(g))throw new xr("Blob is not supported. Use a Buffer instead.");return rt.isArrayBuffer(g)||rt.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,m,y){let v=g;if(g&&!y&&typeof g=="object"){if(rt.endsWith(m,"{}"))m=n?m:m.slice(0,-2),g=JSON.stringify(g);else if(rt.isArray(g)&&pDe(g)||(rt.isFileList(g)||rt.endsWith(m,"[]"))&&(v=rt.toArray(g)))return m=UK(m),v.forEach(function(x,k){!(rt.isUndefined(x)||x===null)&&e.append(s===!0?jK([m],k,i):s===null?m:m+"[]",u(x))}),!1}return VT(g)?!0:(e.append(jK(y,m,i),u(g)),!1)}const h=[],f=Object.assign(gDe,{defaultVisitor:d,convertValue:u,isVisitable:VT});function p(g,m){if(!rt.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(g),rt.forEach(g,function(v,b){(!(rt.isUndefined(v)||v===null)&&a.call(e,v,rt.isString(b)?b.trim():b,m,f))===!0&&p(v,m?m.concat(b):[b])}),h.pop()}}if(!rt.isObject(t))throw new TypeError("data must be an object");return p(t),e}function HK(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function GT(t,e){this._pairs=[],t&&Bx(t,this,e)}const qK=GT.prototype;qK.append=function(e,r){this._pairs.push([e,r])},qK.toString=function(e){const r=e?function(n){return e.call(this,n,HK)}:HK;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function mDe(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function VK(t,e,r){if(!e)return t;const n=r&&r.encode||mDe,a=r&&r.serialize;let i;if(a?i=a(e,r):i=rt.isURLSearchParams(e)?e.toString():new GT(e,r).toString(n),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class yDe{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){rt.forEach(this.handlers,function(n){n!==null&&e(n)})}}const GK=yDe,WK={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vDe={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:GT,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},WT=typeof window<"u"&&typeof document<"u",YT=typeof navigator=="object"&&navigator||void 0,bDe=WT&&(!YT||["ReactNative","NativeScript","NS"].indexOf(YT.product)<0),wDe=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),xDe=WT&&window.location.href||"http://localhost",Fs={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:WT,hasStandardBrowserEnv:bDe,hasStandardBrowserWebWorkerEnv:wDe,navigator:YT,origin:xDe},Symbol.toStringTag,{value:"Module"})),...vDe};function kDe(t,e){return Bx(t,new Fs.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return Fs.isNode&&rt.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function _De(t){return rt.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function EDe(t){const e={},r=Object.keys(t);let n;const a=r.length;let i;for(n=0;n<a;n++)i=r[n],e[i]=t[i];return e}function YK(t){function e(r,n,a,i){let s=r[i++];if(s==="__proto__")return!0;const o=Number.isFinite(+s),l=i>=r.length;return s=!s&&rt.isArray(a)?a.length:s,l?(rt.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!o):((!a[s]||!rt.isObject(a[s]))&&(a[s]=[]),e(r,n,a[s],i)&&rt.isArray(a[s])&&(a[s]=EDe(a[s])),!o)}if(rt.isFormData(t)&&rt.isFunction(t.entries)){const r={};return rt.forEachEntry(t,(n,a)=>{e(_De(n),a,r,0)}),r}return null}function SDe(t,e,r){if(rt.isString(t))try{return(e||JSON.parse)(t),rt.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const XT={transitional:WK,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=rt.isObject(e);if(i&&rt.isHTMLForm(e)&&(e=new FormData(e)),rt.isFormData(e))return a?JSON.stringify(YK(e)):e;if(rt.isArrayBuffer(e)||rt.isBuffer(e)||rt.isStream(e)||rt.isFile(e)||rt.isBlob(e)||rt.isReadableStream(e))return e;if(rt.isArrayBufferView(e))return e.buffer;if(rt.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return kDe(e,this.formSerializer).toString();if((o=rt.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Bx(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),SDe(e)):e}],transformResponse:[function(e){const r=this.transitional||XT.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(rt.isResponse(e)||rt.isReadableStream(e))return e;if(e&&rt.isString(e)&&(n&&!this.responseType||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?xr.from(o,xr.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fs.classes.FormData,Blob:Fs.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};rt.forEach(["delete","get","head","post","put","patch"],t=>{XT.headers[t]={}});const KT=XT,CDe=rt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),TDe=t=>{const e={};let r,n,a;return t&&t.split(`
331
331
  `).forEach(function(s){a=s.indexOf(":"),r=s.substring(0,a).trim().toLowerCase(),n=s.substring(a+1).trim(),!(!r||e[r]&&CDe[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},XK=Symbol("internals");function Uy(t){return t&&String(t).trim().toLowerCase()}function $x(t){return t===!1||t==null?t:rt.isArray(t)?t.map($x):String(t)}function ADe(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const LDe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ZT(t,e,r,n,a){if(rt.isFunction(n))return n.call(this,e,r);if(a&&(e=r),!!rt.isString(e)){if(rt.isString(n))return e.indexOf(n)!==-1;if(rt.isRegExp(n))return n.test(e)}}function RDe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function NDe(t,e){const r=rt.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(a,i,s){return this[n].call(this,e,a,i,s)},configurable:!0})})}class zx{constructor(e){e&&this.set(e)}set(e,r,n){const a=this;function i(o,l,u){const d=Uy(l);if(!d)throw new Error("header name must be a non-empty string");const h=rt.findKey(a,d);(!h||a[h]===void 0||u===!0||u===void 0&&a[h]!==!1)&&(a[h||l]=$x(o))}const s=(o,l)=>rt.forEach(o,(u,d)=>i(u,d,l));if(rt.isPlainObject(e)||e instanceof this.constructor)s(e,r);else if(rt.isString(e)&&(e=e.trim())&&!LDe(e))s(TDe(e),r);else if(rt.isHeaders(e))for(const[o,l]of e.entries())i(l,o,n);else e!=null&&i(r,e,n);return this}get(e,r){if(e=Uy(e),e){const n=rt.findKey(this,e);if(n){const a=this[n];if(!r)return a;if(r===!0)return ADe(a);if(rt.isFunction(r))return r.call(this,a,n);if(rt.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Uy(e),e){const n=rt.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||ZT(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let a=!1;function i(s){if(s=Uy(s),s){const o=rt.findKey(n,s);o&&(!r||ZT(n,n[o],o,r))&&(delete n[o],a=!0)}}return rt.isArray(e)?e.forEach(i):i(e),a}clear(e){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!e||ZT(this,this[i],i,e,!0))&&(delete this[i],a=!0)}return a}normalize(e){const r=this,n={};return rt.forEach(this,(a,i)=>{const s=rt.findKey(n,i);if(s){r[s]=$x(a),delete r[i];return}const o=e?RDe(i):String(i).trim();o!==i&&delete r[i],r[o]=$x(a),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return rt.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=e&&rt.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
332
332
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(a=>n.set(a)),n}static accessor(e){const n=(this[XK]=this[XK]={accessors:{}}).accessors,a=this.prototype;function i(s){const o=Uy(s);n[o]||(NDe(a,s),n[o]=!0)}return rt.isArray(e)?e.forEach(i):i(e),this}}zx.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),rt.reduceDescriptors(zx.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}}),rt.freezeMethods(zx);const $l=zx;function QT(t,e){const r=this||KT,n=e||r,a=$l.from(n.headers);let i=n.data;return rt.forEach(t,function(o){i=o.call(r,i,a.normalize(),e?e.status:void 0)}),a.normalize(),i}function KK(t){return!!(t&&t.__CANCEL__)}function o0(t,e,r){xr.call(this,t??"canceled",xr.ERR_CANCELED,e,r),this.name="CanceledError"}rt.inherits(o0,xr,{__CANCEL__:!0});function ZK(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new xr("Request failed with status code "+r.status,[xr.ERR_BAD_REQUEST,xr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function IDe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ODe(t,e){t=t||10;const r=new Array(t),n=new Array(t);let a=0,i=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),d=n[i];s||(s=u),r[a]=l,n[a]=u;let h=i,f=0;for(;h!==a;)f+=r[h++],h=h%t;if(a=(a+1)%t,a===i&&(i=(i+1)%t),u-s<e)return;const p=d&&u-d;return p?Math.round(f*1e3/p):void 0}}function DDe(t,e){let r=0,n=1e3/e,a,i;const s=(u,d=Date.now())=>{r=d,a=null,i&&(clearTimeout(i),i=null),t.apply(null,u)};return[(...u)=>{const d=Date.now(),h=d-r;h>=n?s(u,d):(a=u,i||(i=setTimeout(()=>{i=null,s(a)},n-h)))},()=>a&&s(a)]}const Ux=(t,e,r=3)=>{let n=0;const a=ODe(50,250);return DDe(i=>{const s=i.loaded,o=i.lengthComputable?i.total:void 0,l=s-n,u=a(l),d=s<=o;n=s;const h={loaded:s,total:o,progress:o?s/o:void 0,bytes:l,rate:u||void 0,estimated:u&&o&&d?(o-s)/u:void 0,event:i,lengthComputable:o!=null,[e?"download":"upload"]:!0};t(h)},r)},QK=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},JK=t=>(...e)=>rt.asap(()=>t(...e)),MDe=Fs.hasStandardBrowserEnv?function(){const e=Fs.navigator&&/(msie|trident)/i.test(Fs.navigator.userAgent),r=document.createElement("a");let n;function a(i){let s=i;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(s){const o=rt.isString(s)?a(s):s;return o.protocol===n.protocol&&o.host===n.host}}():function(){return function(){return!0}}(),PDe=Fs.hasStandardBrowserEnv?{write(t,e,r,n,a,i){const s=[t+"="+encodeURIComponent(e)];rt.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),rt.isString(n)&&s.push("path="+n),rt.isString(a)&&s.push("domain="+a),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function FDe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function BDe(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function eZ(t,e){return t&&!FDe(e)?BDe(t,e):e}const tZ=t=>t instanceof $l?{...t}:t;function Rf(t,e){e=e||{};const r={};function n(u,d,h){return rt.isPlainObject(u)&&rt.isPlainObject(d)?rt.merge.call({caseless:h},u,d):rt.isPlainObject(d)?rt.merge({},d):rt.isArray(d)?d.slice():d}function a(u,d,h){if(rt.isUndefined(d)){if(!rt.isUndefined(u))return n(void 0,u,h)}else return n(u,d,h)}function i(u,d){if(!rt.isUndefined(d))return n(void 0,d)}function s(u,d){if(rt.isUndefined(d)){if(!rt.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function o(u,d,h){if(h in e)return n(u,d);if(h in t)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(u,d)=>a(tZ(u),tZ(d),!0)};return rt.forEach(Object.keys(Object.assign({},t,e)),function(d){const h=l[d]||a,f=h(t[d],e[d],d);rt.isUndefined(f)&&h!==o||(r[d]=f)}),r}const rZ=t=>{const e=Rf({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:s,auth:o}=e;e.headers=s=$l.from(s),e.url=VK(eZ(e.baseURL,e.url),t.params,t.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(rt.isFormData(r)){if(Fs.hasStandardBrowserEnv||Fs.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...d]=l?l.split(";").map(h=>h.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Fs.hasStandardBrowserEnv&&(n&&rt.isFunction(n)&&(n=n(e)),n||n!==!1&&MDe(e.url))){const u=a&&i&&PDe.read(i);u&&s.set(a,u)}return e},$De=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,n){const a=rZ(t);let i=a.data;const s=$l.from(a.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:u}=a,d,h,f,p,g;function m(){p&&p(),g&&g(),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function v(){if(!y)return;const x=$l.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),_={data:!o||o==="text"||o==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:x,config:t,request:y};ZK(function(S){r(S),m()},function(S){n(S),m()},_),y=null}"onloadend"in y?y.onloadend=v:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(v)},y.onabort=function(){y&&(n(new xr("Request aborted",xr.ECONNABORTED,t,y)),y=null)},y.onerror=function(){n(new xr("Network Error",xr.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let k=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const _=a.transitional||WK;a.timeoutErrorMessage&&(k=a.timeoutErrorMessage),n(new xr(k,_.clarifyTimeoutError?xr.ETIMEDOUT:xr.ECONNABORTED,t,y)),y=null},i===void 0&&s.setContentType(null),"setRequestHeader"in y&&rt.forEach(s.toJSON(),function(k,_){y.setRequestHeader(_,k)}),rt.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),o&&o!=="json"&&(y.responseType=a.responseType),u&&([f,g]=Ux(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([h,p]=Ux(l),y.upload.addEventListener("progress",h),y.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(d=x=>{y&&(n(!x||x.type?new o0(null,t,y):x),y.abort(),y=null)},a.cancelToken&&a.cancelToken.subscribe(d),a.signal&&(a.signal.aborted?d():a.signal.addEventListener("abort",d)));const b=IDe(a.url);if(b&&Fs.protocols.indexOf(b)===-1){n(new xr("Unsupported protocol "+b+":",xr.ERR_BAD_REQUEST,t));return}y.send(i||null)})},zDe=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,a;const i=function(u){if(!a){a=!0,o();const d=u instanceof Error?u:this.reason;n.abort(d instanceof xr?d:new o0(d instanceof Error?d.message:d))}};let s=e&&setTimeout(()=>{s=null,i(new xr(`timeout ${e} of ms exceeded`,xr.ETIMEDOUT))},e);const o=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>rt.asap(o),l}},UDe=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let n=0,a;for(;n<r;)a=n+e,yield t.slice(n,a),n=a},jDe=async function*(t,e){for await(const r of HDe(t))yield*UDe(r,e)},HDe=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},nZ=(t,e,r,n)=>{const a=jDe(t,e);let i=0,s,o=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await a.next();if(u){o(),l.close();return}let h=d.byteLength;if(r){let f=i+=h;r(f)}l.enqueue(new Uint8Array(d))}catch(u){throw o(u),u}},cancel(l){return o(l),a.return()}},{highWaterMark:2})},jx=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",aZ=jx&&typeof ReadableStream=="function",qDe=jx&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),iZ=(t,...e)=>{try{return!!t(...e)}catch{return!1}},VDe=aZ&&iZ(()=>{let t=!1;const e=new Request(Fs.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),sZ=64*1024,JT=aZ&&iZ(()=>rt.isReadableStream(new Response("").body)),Hx={stream:JT&&(t=>t.body)};jx&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Hx[e]&&(Hx[e]=rt.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new xr(`Response type '${e}' is not supported`,xr.ERR_NOT_SUPPORT,n)})})})(new Response);const GDe=async t=>{if(t==null)return 0;if(rt.isBlob(t))return t.size;if(rt.isSpecCompliantForm(t))return(await new Request(Fs.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(rt.isArrayBufferView(t)||rt.isArrayBuffer(t))return t.byteLength;if(rt.isURLSearchParams(t)&&(t=t+""),rt.isString(t))return(await qDe(t)).byteLength},WDe=async(t,e)=>{const r=rt.toFiniteNumber(t.getContentLength());return r??GDe(e)},e9={http:fDe,xhr:$De,fetch:jx&&(async t=>{let{url:e,method:r,data:n,signal:a,cancelToken:i,timeout:s,onDownloadProgress:o,onUploadProgress:l,responseType:u,headers:d,withCredentials:h="same-origin",fetchOptions:f}=rZ(t);u=u?(u+"").toLowerCase():"text";let p=zDe([a,i&&i.toAbortSignal()],s),g;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&VDe&&r!=="get"&&r!=="head"&&(y=await WDe(d,n))!==0){let _=new Request(e,{method:"POST",body:n,duplex:"half"}),w;if(rt.isFormData(n)&&(w=_.headers.get("content-type"))&&d.setContentType(w),_.body){const[S,C]=QK(y,Ux(JK(l)));n=nZ(_.body,sZ,S,C)}}rt.isString(h)||(h=h?"include":"omit");const v="credentials"in Request.prototype;g=new Request(e,{...f,signal:p,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:v?h:void 0});let b=await fetch(g);const x=JT&&(u==="stream"||u==="response");if(JT&&(o||x&&m)){const _={};["status","statusText","headers"].forEach(T=>{_[T]=b[T]});const w=rt.toFiniteNumber(b.headers.get("content-length")),[S,C]=o&&QK(w,Ux(JK(o),!0))||[];b=new Response(nZ(b.body,sZ,S,()=>{C&&C(),m&&m()}),_)}u=u||"text";let k=await Hx[rt.findKey(Hx,u)||"text"](b,t);return!x&&m&&m(),await new Promise((_,w)=>{ZK(_,w,{data:k,headers:$l.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:g})})}catch(v){throw m&&m(),v&&v.name==="TypeError"&&/fetch/i.test(v.message)?Object.assign(new xr("Network Error",xr.ERR_NETWORK,t,g),{cause:v.cause||v}):xr.from(v,v&&v.code,t,g)}})};rt.forEach(e9,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const oZ=t=>`- ${t}`,YDe=t=>rt.isFunction(t)||t===null||t===!1,lZ={getAdapter:t=>{t=rt.isArray(t)?t:[t];const{length:e}=t;let r,n;const a={};for(let i=0;i<e;i++){r=t[i];let s;if(n=r,!YDe(r)&&(n=e9[(s=String(r)).toLowerCase()],n===void 0))throw new xr(`Unknown adapter '${s}'`);if(n)break;a[s||"#"+i]=n}if(!n){const i=Object.entries(a).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since :
333
333
  `+i.map(oZ).join(`
Binary file
package/src/ui/app.tar.gz CHANGED
Binary file