@kyoofus/kyoflow 0.0.1
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.
- package/LICENSE +21 -0
- package/dist/.env.example +4 -0
- package/dist/backend/pyproject.toml +19 -0
- package/dist/backend/requirements.txt +2 -0
- package/dist/backend/src/kyoflow/__init__.py +12 -0
- package/dist/backend/src/kyoflow/__main__.py +88 -0
- package/dist/backend/src/kyoflow/__pycache__/__init__.cpython-314.pyc +0 -0
- package/dist/backend/src/kyoflow/__pycache__/__main__.cpython-314.pyc +0 -0
- package/dist/backend/src/kyoflow/__pycache__/main.cpython-314.pyc +0 -0
- package/dist/backend/src/kyoflow/main.py +63 -0
- package/dist/cli.js +178 -0
- package/dist/cli.js.map +1 -0
- package/dist/postinstall.js +18 -0
- package/dist/postinstall.js.map +1 -0
- package/dist/server.js +31 -0
- package/dist/server.js.map +1 -0
- package/dist/web/client/_app/immutable/assets/0.BrmKgNLm.css +1 -0
- package/dist/web/client/_app/immutable/assets/0.BrmKgNLm.css.br +0 -0
- package/dist/web/client/_app/immutable/assets/0.BrmKgNLm.css.gz +0 -0
- package/dist/web/client/_app/immutable/assets/3.DVH1XF8v.css +1 -0
- package/dist/web/client/_app/immutable/assets/3.DVH1XF8v.css.br +0 -0
- package/dist/web/client/_app/immutable/assets/3.DVH1XF8v.css.gz +0 -0
- package/dist/web/client/_app/immutable/assets/4.zbKoyNjI.css +1 -0
- package/dist/web/client/_app/immutable/assets/4.zbKoyNjI.css.br +0 -0
- package/dist/web/client/_app/immutable/assets/4.zbKoyNjI.css.gz +0 -0
- package/dist/web/client/_app/immutable/assets/5.CHnq1Bst.css +1 -0
- package/dist/web/client/_app/immutable/assets/5.CHnq1Bst.css.br +0 -0
- package/dist/web/client/_app/immutable/assets/5.CHnq1Bst.css.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/44EpIQ4d.js +1 -0
- package/dist/web/client/_app/immutable/chunks/44EpIQ4d.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/44EpIQ4d.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/B09fC2bi.js +1 -0
- package/dist/web/client/_app/immutable/chunks/B09fC2bi.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/B09fC2bi.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/BJ-VzAMM.js +1 -0
- package/dist/web/client/_app/immutable/chunks/BJ-VzAMM.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/BJ-VzAMM.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/B_AmmRQN.js +1 -0
- package/dist/web/client/_app/immutable/chunks/B_AmmRQN.js.br +2 -0
- package/dist/web/client/_app/immutable/chunks/B_AmmRQN.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/C63Z97y6.js +1 -0
- package/dist/web/client/_app/immutable/chunks/C63Z97y6.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/C63Z97y6.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/C_EPgsy6.js +1 -0
- package/dist/web/client/_app/immutable/chunks/C_EPgsy6.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/C_EPgsy6.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/Ck1fWG4n.js +1 -0
- package/dist/web/client/_app/immutable/chunks/Ck1fWG4n.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/Ck1fWG4n.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/D8fmz15L.js +1 -0
- package/dist/web/client/_app/immutable/chunks/D8fmz15L.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/D8fmz15L.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/DDNuMsfB.js +1 -0
- package/dist/web/client/_app/immutable/chunks/DDNuMsfB.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/DDNuMsfB.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/Da9oKyxb.js +1 -0
- package/dist/web/client/_app/immutable/chunks/Da9oKyxb.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/Da9oKyxb.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/DtmuEK64.js +1 -0
- package/dist/web/client/_app/immutable/chunks/DtmuEK64.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/DtmuEK64.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/EmrU7Abi.js +298 -0
- package/dist/web/client/_app/immutable/chunks/EmrU7Abi.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/EmrU7Abi.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/PPVm8Dsz.js +1 -0
- package/dist/web/client/_app/immutable/chunks/PPVm8Dsz.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/PPVm8Dsz.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/ZW9ZwxRj.js +2 -0
- package/dist/web/client/_app/immutable/chunks/ZW9ZwxRj.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/ZW9ZwxRj.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/b2dyOoG8.js +1 -0
- package/dist/web/client/_app/immutable/chunks/b2dyOoG8.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/b2dyOoG8.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/dKdRdI5_.js +2 -0
- package/dist/web/client/_app/immutable/chunks/dKdRdI5_.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/dKdRdI5_.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/z6vZsXi_.js +1 -0
- package/dist/web/client/_app/immutable/chunks/z6vZsXi_.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/z6vZsXi_.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/app.CY5BI3xj.js +2 -0
- package/dist/web/client/_app/immutable/entry/app.CY5BI3xj.js.br +0 -0
- package/dist/web/client/_app/immutable/entry/app.CY5BI3xj.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/start.DtRSN8RT.js +1 -0
- package/dist/web/client/_app/immutable/entry/start.DtRSN8RT.js.br +2 -0
- package/dist/web/client/_app/immutable/entry/start.DtRSN8RT.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/0.D-FNblRd.js +1 -0
- package/dist/web/client/_app/immutable/nodes/0.D-FNblRd.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/0.D-FNblRd.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/1.D4Y_4dgV.js +1 -0
- package/dist/web/client/_app/immutable/nodes/1.D4Y_4dgV.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/1.D4Y_4dgV.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/2.B5eVU3OO.js +1 -0
- package/dist/web/client/_app/immutable/nodes/2.B5eVU3OO.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/2.B5eVU3OO.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/3.CLx1_dgI.js +1 -0
- package/dist/web/client/_app/immutable/nodes/3.CLx1_dgI.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/3.CLx1_dgI.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/4.B2lLNz3B.js +61 -0
- package/dist/web/client/_app/immutable/nodes/4.B2lLNz3B.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/4.B2lLNz3B.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/5.DVjHkNQz.js +1 -0
- package/dist/web/client/_app/immutable/nodes/5.DVjHkNQz.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/5.DVjHkNQz.js.gz +0 -0
- package/dist/web/client/_app/version.json +1 -0
- package/dist/web/client/_app/version.json.br +0 -0
- package/dist/web/client/_app/version.json.gz +0 -0
- package/dist/web/client/robots.txt +3 -0
- package/dist/web/env.js +94 -0
- package/dist/web/handler.js +1435 -0
- package/dist/web/index.js +345 -0
- package/dist/web/kyoflow.mjs +21 -0
- package/dist/web/scripts/ecosystem.config.cjs +54 -0
- package/dist/web/scripts/run-node.mjs +158 -0
- package/dist/web/scripts/startDev.mjs +64 -0
- package/dist/web/server/chunks/0-CyAFthPc.js +9 -0
- package/dist/web/server/chunks/0-CyAFthPc.js.map +1 -0
- package/dist/web/server/chunks/1-DYCRQF-y.js +9 -0
- package/dist/web/server/chunks/1-DYCRQF-y.js.map +1 -0
- package/dist/web/server/chunks/2-BMUiKlN4.js +9 -0
- package/dist/web/server/chunks/2-BMUiKlN4.js.map +1 -0
- package/dist/web/server/chunks/3-BHJbC3kl.js +9 -0
- package/dist/web/server/chunks/3-BHJbC3kl.js.map +1 -0
- package/dist/web/server/chunks/4-kguK6pdz.js +9 -0
- package/dist/web/server/chunks/4-kguK6pdz.js.map +1 -0
- package/dist/web/server/chunks/5-Cg1lR31m.js +9 -0
- package/dist/web/server/chunks/5-Cg1lR31m.js.map +1 -0
- package/dist/web/server/chunks/_layout.svelte-Dk-_4d6Q.js +15 -0
- package/dist/web/server/chunks/_layout.svelte-Dk-_4d6Q.js.map +1 -0
- package/dist/web/server/chunks/_page.svelte-Clor3HA3.js +19 -0
- package/dist/web/server/chunks/_page.svelte-Clor3HA3.js.map +1 -0
- package/dist/web/server/chunks/_page.svelte-D5WvBH3m.js +6 -0
- package/dist/web/server/chunks/_page.svelte-D5WvBH3m.js.map +1 -0
- package/dist/web/server/chunks/_page.svelte-D7hhqLhW.js +90 -0
- package/dist/web/server/chunks/_page.svelte-D7hhqLhW.js.map +1 -0
- package/dist/web/server/chunks/_page.svelte-DDxnQ3X4.js +71 -0
- package/dist/web/server/chunks/_page.svelte-DDxnQ3X4.js.map +1 -0
- package/dist/web/server/chunks/context-CKR25gbz.js +90 -0
- package/dist/web/server/chunks/context-CKR25gbz.js.map +1 -0
- package/dist/web/server/chunks/error.svelte-BLEcYUzd.js +12 -0
- package/dist/web/server/chunks/error.svelte-BLEcYUzd.js.map +1 -0
- package/dist/web/server/chunks/exports-k9UzK37u.js +303 -0
- package/dist/web/server/chunks/exports-k9UzK37u.js.map +1 -0
- package/dist/web/server/chunks/index-DjKos2HY.js +1362 -0
- package/dist/web/server/chunks/index-DjKos2HY.js.map +1 -0
- package/dist/web/server/chunks/index2-CxBujh0K.js +43 -0
- package/dist/web/server/chunks/index2-CxBujh0K.js.map +1 -0
- package/dist/web/server/index.js +7832 -0
- package/dist/web/server/index.js.map +1 -0
- package/dist/web/server/manifest.js +70 -0
- package/dist/web/server/manifest.js.map +1 -0
- package/dist/web/shims.js +32 -0
- package/package.json +37 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const p="modulepreload",y=function(u,i){return new URL(u,i).href},v={},w=function(i,a,f){let d=Promise.resolve();if(a&&a.length>0){let E=function(e){return Promise.all(e.map(o=>Promise.resolve(o).then(s=>({status:"fulfilled",value:s}),s=>({status:"rejected",reason:s}))))};const r=document.getElementsByTagName("link"),t=document.querySelector("meta[property=csp-nonce]"),m=t?.nonce||t?.getAttribute("nonce");d=E(a.map(e=>{if(e=y(e,f),e in v)return;v[e]=!0;const o=e.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(f)for(let c=r.length-1;c>=0;c--){const l=r[c];if(l.href===e&&(!o||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${s}`))return;const n=document.createElement("link");if(n.rel=o?"stylesheet":p,o||(n.as="script"),n.crossOrigin="",n.href=e,m&&n.setAttribute("nonce",m),document.head.appendChild(n),o)return new Promise((c,l)=>{n.addEventListener("load",c),n.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${e}`)))})}))}function h(r){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=r,window.dispatchEvent(t),!t.defaultPrevented)throw r}return d.then(r=>{for(const t of r||[])t.status==="rejected"&&h(t.reason);return i().catch(h)})};export{w as _};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{aa as J,m as P,R as K,j as Q,ab as C,q as b,ac as W,M as d,h as _,a3 as w,x as X,y as Z,U as B,H as tt,K as c,ad as N,I as k,J as j,ae as et,af as R,ag as S,ah as I,ai as st,aj as U,e as $,O as it,ak as Y,al as rt,am as H,an as nt,ao as at,G as x,B as A,n as ht,A as ot,ap as V,aq as ft,E as lt,ar as ut,as as ct,at as dt,au as _t,av as pt,aw as gt,ax as O,W as vt,ay as yt,V as Et,az as F,C as T,aA as bt,aB as wt,aC as mt,aD as Tt,p as Rt,aE as St,aF as At,a as Dt}from"./DtmuEK64.js";import{b as Nt}from"./D8fmz15L.js";function kt(e){let t=0,i=W(0),r;return()=>{J()&&(P(i),K(()=>(t===0&&(r=Q(()=>e(()=>C(i)))),t+=1,()=>{b(()=>{t-=1,t===0&&(r?.(),r=void 0,C(i))})})))}}var xt=lt|ut|ct;function Ot(e,t,i){new Ft(e,t,i)}class Ft{parent;is_pending=!1;#e;#y=_?d:null;#i;#l;#r;#s=null;#t=null;#n=null;#a=null;#f=null;#u=0;#h=0;#d=!1;#c=!1;#_=new Set;#p=new Set;#o=null;#w=kt(()=>(this.#o=W(this.#u),()=>{this.#o=null}));constructor(t,i,r){this.#e=t,this.#i=i,this.#l=r,this.parent=w.b,this.is_pending=!!this.#i.pending,this.#r=X(()=>{if(w.b=this,_){const s=this.#y;Z(),s.nodeType===B&&s.data===tt?this.#T():(this.#m(),this.#h===0&&(this.is_pending=!1))}else{var n=this.#E();try{this.#s=c(()=>r(n))}catch(s){this.error(s)}this.#h>0?this.#v():this.is_pending=!1}return()=>{this.#f?.remove()}},xt),_&&(this.#e=d)}#m(){try{this.#s=c(()=>this.#l(this.#e))}catch(t){this.error(t)}}#T(){const t=this.#i.pending;t&&(this.#t=c(()=>t(this.#e)),b(()=>{var i=this.#E();this.#s=this.#g(()=>(N.ensure(),c(()=>this.#l(i)))),this.#h>0?this.#v():(k(this.#t,()=>{this.#t=null}),this.is_pending=!1)}))}#E(){var t=this.#e;return this.is_pending&&(this.#f=j(),this.#e.before(this.#f),t=this.#f),t}defer_effect(t){et(t,this.#_,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#i.pending}#g(t){var i=w,r=U,n=$;R(this.#r),S(this.#r),I(this.#r.ctx);try{return t()}catch(s){return st(s),null}finally{R(i),S(r),I(n)}}#v(){const t=this.#i.pending;this.#s!==null&&(this.#a=document.createDocumentFragment(),this.#a.append(this.#f),it(this.#s,this.#a)),this.#t===null&&(this.#t=c(()=>t(this.#e)))}#b(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t);return}if(this.#h+=t,this.#h===0){this.is_pending=!1;for(const i of this.#_)Y(i,rt),H(i);for(const i of this.#p)Y(i,nt),H(i);this.#_.clear(),this.#p.clear(),this.#t&&k(this.#t,()=>{this.#t=null}),this.#a&&(this.#e.before(this.#a),this.#a=null)}}update_pending_count(t){this.#b(t),this.#u+=t,!(!this.#o||this.#d)&&(this.#d=!0,b(()=>{this.#d=!1,this.#o&&at(this.#o,this.#u)}))}get_effect_pending(){return this.#w(),P(this.#o)}error(t){var i=this.#i.onerror;let r=this.#i.failed;if(this.#c||!i&&!r)throw t;this.#s&&(x(this.#s),this.#s=null),this.#t&&(x(this.#t),this.#t=null),this.#n&&(x(this.#n),this.#n=null),_&&(A(this.#y),ht(),A(ot()));var n=!1,s=!1;const a=()=>{if(n){dt();return}n=!0,s&&ft(),N.ensure(),this.#u=0,this.#n!==null&&k(this.#n,()=>{this.#n=null}),this.is_pending=this.has_pending_snippet(),this.#s=this.#g(()=>(this.#c=!1,c(()=>this.#l(this.#e)))),this.#h>0?this.#v():this.is_pending=!1};b(()=>{try{s=!0,i?.(t,a),s=!1}catch(f){V(f,this.#r&&this.#r.parent)}r&&(this.#n=this.#g(()=>{N.ensure(),this.#c=!0;try{return c(()=>{r(this.#e,()=>t,()=>a)})}catch(f){return V(f,this.#r.parent),null}finally{this.#c=!1}}))})}}const Lt=["touchstart","touchmove"];function Mt(e){return Lt.includes(e)}const z=new Set,L=new Set;function Bt(e,t,i,r={}){function n(s){if(r.capture||E.call(t,s),!s.cancelBubble)return pt(()=>i?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?b(()=>{t.addEventListener(e,n,r)}):t.addEventListener(e,n,r),n}function Ht(e,t,i,r,n){var s={capture:r,passive:n},a=Bt(e,t,i,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&_t(()=>{t.removeEventListener(e,a,s)})}function Vt(e){for(var t=0;t<e.length;t++)z.add(e[t]);for(var i of L)i(e)}let q=null;function E(e){var t=this,i=t.ownerDocument,r=e.type,n=e.composedPath?.()||[],s=n[0]||e.target;q=e;var a=0,f=q===e&&e.__root;if(f){var u=n.indexOf(f);if(u!==-1&&(t===document||t===window)){e.__root=t;return}var p=n.indexOf(t);if(p===-1)return;u<=p&&(a=u)}if(s=n[a]||e.target,s!==t){gt(e,"currentTarget",{configurable:!0,get(){return s||i}});var D=U,l=w;S(null),R(null);try{for(var h,o=[];s!==null;){var g=s.assignedSlot||s.parentNode||s.host||null;try{var y=s["__"+r];y!=null&&(!s.disabled||e.target===s)&&y.call(s,e)}catch(m){h?o.push(m):h=m}if(e.cancelBubble||g===t||g===null)break;s=g}if(h){for(let m of o)queueMicrotask(()=>{throw m});throw h}}finally{e.__root=t,delete e.currentTarget,S(D),R(l)}}}function qt(e,t){var i=t==null?"":typeof t=="object"?t+"":t;i!==(e.__t??=e.nodeValue)&&(e.__t=i,e.nodeValue=i+"")}function Ct(e,t){return G(e,t)}function Pt(e,t){O(),t.intro=t.intro??!1;const i=t.target,r=_,n=d;try{for(var s=vt(i);s&&(s.nodeType!==B||s.data!==yt);)s=Et(s);if(!s)throw F;T(!0),A(s);const a=G(e,{...t,anchor:s});return T(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
+
`).some(f=>f.startsWith("https://svelte.dev/e/")))throw a;return a!==F&&console.warn("Failed to hydrate: ",a),t.recover===!1&&bt(),O(),wt(i),T(!1),Ct(e,t)}finally{T(r),A(n)}}const v=new Map;function G(e,{target:t,anchor:i,props:r={},events:n,context:s,intro:a=!0}){O();var f=new Set,u=l=>{for(var h=0;h<l.length;h++){var o=l[h];if(!f.has(o)){f.add(o);var g=Mt(o);t.addEventListener(o,E,{passive:g});var y=v.get(o);y===void 0?(document.addEventListener(o,E,{passive:g}),v.set(o,1)):v.set(o,y+1)}}};u(mt(z)),L.add(u);var p=void 0,D=Tt(()=>{var l=i??t.appendChild(j());return Ot(l,{pending:()=>{}},h=>{Rt({});var o=$;if(s&&(o.c=s),n&&(r.$$events=n),_&&Nt(h,null),p=e(h,r)||{},_&&(w.nodes.end=d,d===null||d.nodeType!==B||d.data!==St))throw At(),F;Dt()}),()=>{for(var h of f){t.removeEventListener(h,E);var o=v.get(h);--o===0?(document.removeEventListener(h,E),v.delete(h)):v.set(h,o)}L.delete(u),l!==i&&l.parentNode?.removeChild(l)}});return M.set(p,D),p}let M=new WeakMap;function Wt(e,t){const i=M.get(e);return i?(M.delete(e),i(t)):Promise.resolve()}export{Vt as d,Ht as e,Pt as h,Ct as m,qt as s,Wt as u};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Q as t,R as S,j as b,q as h,S as k}from"./DtmuEK64.js";function u(r,i){return r===i||r?.[k]===i}function c(r={},i,a,q){return t(()=>{var f,s;return S(()=>{f=s,s=[],b(()=>{r!==a(...s)&&(i(r,...s),f&&u(a(...f),r)&&i(null,...f))})}),()=>{h(()=>{s&&u(a(...s),r)&&i(null,...s)})}}),r}export{c as b};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h as b,Y as g,Z as S,j as m,R as A,D as c,_ as E}from"./DtmuEK64.js";const s=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function N(r,l,i){var a=r==null?"":""+r;if(l&&(a=a?a+" "+l:l),i){for(var f in i)if(i[f])a=a?a+" "+f:f;else if(a.length)for(var e=f.length,u=0;(u=a.indexOf(f,u))>=0;){var v=u+e;(u===0||s.includes(a[u-1]))&&(v===a.length||s.includes(a[v]))?a=(u===0?"":a.substring(0,u))+a.substring(v+1):u=v}}return a===""?null:a}function h(r,l=!1){var i=l?" !important;":";",a="";for(var f in r){var e=r[f];e!=null&&e!==""&&(a+=" "+f+": "+e+i)}return a}function j(r,l){if(l){var i="",a,f;return Array.isArray(l)?(a=l[0],f=l[1]):a=l,a&&(i+=h(a)),f&&(i+=h(f,!0)),i=i.trim(),i===""?null:i}return String(r)}function D(r,l,i,a,f,e){var u=r.__className;if(b||u!==i||u===void 0){var v=N(i,a,e);(!b||v!==r.getAttribute("class"))&&(v==null?r.removeAttribute("class"):r.className=v),r.__className=i}else if(e&&f!==e)for(var t in e){var n=!!e[t];(f==null||n!==!!f[t])&&r.classList.toggle(t,n)}return e}function L(r,l,i=l){var a=new WeakSet;g(r,"input",async f=>{var e=f?r.defaultValue:r.value;if(e=o(r)?d(e):e,i(e),c!==null&&a.add(c),await S(),e!==(e=l())){var u=r.selectionStart,v=r.selectionEnd,t=r.value.length;if(r.value=e??"",v!==null){var n=r.value.length;u===v&&v===t&&n>t?(r.selectionStart=n,r.selectionEnd=n):(r.selectionStart=u,r.selectionEnd=Math.min(v,n))}}}),(b&&r.defaultValue!==r.value||m(l)==null&&r.value)&&(i(o(r)?d(r.value):r.value),c!==null&&a.add(c)),A(()=>{var f=l();if(r===document.activeElement){var e=E??c;if(a.has(e))return}o(r)&&f===d(r.value)||r.type==="date"&&!f&&!r.value||f!==r.value&&(r.value=f??"")})}function o(r){var l=r.type;return l==="number"||l==="range"}function d(r){return r===""?null:+r}export{L as b,D as s,j as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e,p as r}from"./B09fC2bi.js";const t={get error(){return r.error},get status(){return r.status},get url(){return r.url}};e.updated.check;const a=t;export{a as p};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.D-FNblRd.js","../chunks/D8fmz15L.js","../chunks/DtmuEK64.js","../chunks/Da9oKyxb.js","../chunks/BJ-VzAMM.js","../chunks/C63Z97y6.js","../assets/0.BrmKgNLm.css","../nodes/1.D4Y_4dgV.js","../chunks/B_AmmRQN.js","../chunks/ZW9ZwxRj.js","../chunks/44EpIQ4d.js","../chunks/z6vZsXi_.js","../chunks/B09fC2bi.js","../chunks/DDNuMsfB.js","../nodes/2.B5eVU3OO.js","../nodes/3.CLx1_dgI.js","../chunks/Ck1fWG4n.js","../chunks/dKdRdI5_.js","../assets/3.DVH1XF8v.css","../nodes/4.B2lLNz3B.js","../chunks/b2dyOoG8.js","../assets/4.zbKoyNjI.css","../nodes/5.DVjHkNQz.js","../chunks/PPVm8Dsz.js","../assets/5.CHnq1Bst.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as E}from"../chunks/PPVm8Dsz.js";import{h as p,y as q,x as z,E as G,aZ as X,a_ as H,a$ as J,m as _,aY as K,a0 as O,b0 as Q,a3 as W,b1 as $,b2 as ee,j as te,X as re,b3 as ae,b4 as se,v as ne,aR as ie,b5 as oe,S as ue,b6 as C,b7 as ce,aw as fe,aO as _e,p as de,u as le,i as me,Z as ve,f as I,s as he,a as ge,a1 as x,c as be,r as Ee,t as Pe,a2 as L}from"../chunks/DtmuEK64.js";import{h as ye,m as Re,u as Oe,s as Se}from"../chunks/ZW9ZwxRj.js";import{a as P,c as D,f as N,t as Ie}from"../chunks/D8fmz15L.js";import{o as Ae}from"../chunks/DDNuMsfB.js";import{i as w}from"../chunks/Ck1fWG4n.js";import{B as Te}from"../chunks/Da9oKyxb.js";import{b as j}from"../chunks/b2dyOoG8.js";function B(r,e,s){p&&q();var o=new Te(r);z(()=>{var i=e()??null;o.ensure(i,i&&(t=>s(t,i)))},G)}let A=!1;function xe(r){var e=A;try{return A=!1,[r(),A]}finally{A=e}}function M(r,e,s,o){var i=!re||(s&ae)!==0,t=(s&ee)!==0,n=(s&oe)!==0,u=o,y=!0,R=()=>(y&&(y=!1,u=n?te(o):o),u),m;if(t){var T=ue in r||C in r;m=X(r,e)?.set??(T&&e in r?a=>r[e]=a:void 0)}var g,S=!1;t?[g,S]=xe(()=>r[e]):g=r[e],g===void 0&&o!==void 0&&(g=R(),m&&(i&&H(),m(g)));var v;if(i?v=()=>{var a=r[e];return a===void 0?R():(y=!0,a)}:v=()=>{var a=r[e];return a!==void 0&&(u=void 0),a===void 0?u:a},i&&(s&J)===0)return v;if(m){var c=r.$$legacy;return(function(a,l){return arguments.length>0?((!i||!l||c||S)&&m(l?v():a),a):v()})}var d=!1,f=((s&se)!==0?ne:ie)(()=>(d=!1,v()));t&&_(f);var b=W;return(function(a,l){if(arguments.length>0){const h=l?_(f):i&&t?K(a):a;return O(f,h),d=!0,u!==void 0&&(u=h),a}return Q&&d||(b.f&$)!==0?f.v:_(f)})}function Le(r){return class extends De{constructor(e){super({component:r,...e})}}}class De{#t;#e;constructor(e){var s=new Map,o=(t,n)=>{var u=_e(n,!1,!1);return s.set(t,u),u};const i=new Proxy({...e.props||{},$$events:{}},{get(t,n){return _(s.get(n)??o(n,Reflect.get(t,n)))},has(t,n){return n===C?!0:(_(s.get(n)??o(n,Reflect.get(t,n))),Reflect.has(t,n))},set(t,n,u){return O(s.get(n)??o(n,u),u),Reflect.set(t,n,u)}});this.#e=(e.hydrate?ye:Re)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&ce(),this.#t=i.$$events;for(const t of Object.keys(this.#e))t==="$set"||t==="$destroy"||t==="$on"||fe(this,t,{get(){return this.#e[t]},set(n){this.#e[t]=n},enumerable:!0});this.#e.$set=t=>{Object.assign(i,t)},this.#e.$destroy=()=>{Oe(this.#e)}}$set(e){this.#e.$set(e)}$on(e,s){this.#t[e]=this.#t[e]||[];const o=(...i)=>s.call(this,...i);return this.#t[e].push(o),()=>{this.#t[e]=this.#t[e].filter(i=>i!==o)}}$destroy(){this.#e.$destroy()}}const qe={};var we=N('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),je=N("<!> <!>",1);function Be(r,e){de(e,!0);let s=M(e,"components",23,()=>[]),o=M(e,"data_0",3,null),i=M(e,"data_1",3,null);le(()=>e.stores.page.set(e.page)),me(()=>{e.stores,e.page,e.constructors,s(),e.form,o(),i(),e.stores.page.notify()});let t=x(!1),n=x(!1),u=x(null);Ae(()=>{const c=e.stores.page.subscribe(()=>{_(t)&&(O(n,!0),ve().then(()=>{O(u,document.title||"untitled page",!0)}))});return O(t,!0),c});const y=L(()=>e.constructors[1]);var R=je(),m=I(R);{var T=c=>{const d=L(()=>e.constructors[0]);var f=D(),b=I(f);B(b,()=>_(d),(a,l)=>{j(l(a,{get data(){return o()},get form(){return e.form},get params(){return e.page.params},children:(h,Ve)=>{var V=D(),U=I(V);B(U,()=>_(y),(Z,F)=>{j(F(Z,{get data(){return i()},get form(){return e.form},get params(){return e.page.params}}),k=>s()[1]=k,()=>s()?.[1])}),P(h,V)},$$slots:{default:!0}}),h=>s()[0]=h,()=>s()?.[0])}),P(c,f)},g=c=>{const d=L(()=>e.constructors[0]);var f=D(),b=I(f);B(b,()=>_(d),(a,l)=>{j(l(a,{get data(){return o()},get form(){return e.form},get params(){return e.page.params}}),h=>s()[0]=h,()=>s()?.[0])}),P(c,f)};w(m,c=>{e.constructors[1]?c(T):c(g,!1)})}var S=he(m,2);{var v=c=>{var d=we(),f=be(d);{var b=a=>{var l=Ie();Pe(()=>Se(l,_(u))),P(a,l)};w(f,a=>{_(n)&&a(b)})}Ee(d),P(c,d)};w(S,c=>{_(t)&&c(v)})}P(r,R),ge()}const ze=Le(Be),Ge=[()=>E(()=>import("../nodes/0.D-FNblRd.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),()=>E(()=>import("../nodes/1.D4Y_4dgV.js"),__vite__mapDeps([7,1,2,8,9,10,11,12,13]),import.meta.url),()=>E(()=>import("../nodes/2.B5eVU3OO.js"),__vite__mapDeps([14,1,2,8]),import.meta.url),()=>E(()=>import("../nodes/3.CLx1_dgI.js"),__vite__mapDeps([15,1,2,8,4,13,9,16,3,5,17,10,18]),import.meta.url),()=>E(()=>import("../nodes/4.B2lLNz3B.js"),__vite__mapDeps([19,1,2,9,16,3,4,17,20,21]),import.meta.url),()=>E(()=>import("../nodes/5.DVjHkNQz.js"),__vite__mapDeps([22,23,1,2,13,4,20,11,12,24]),import.meta.url)],Xe=[],He={"/":[2],"/google":[3],"/llm":[4],"/swagger-ui":[5]},Y={handleError:(({error:r})=>{console.error(r)}),reroute:(()=>{}),transport:{}},Me=Object.fromEntries(Object.entries(Y.transport).map(([r,e])=>[r,e.decode])),Je=Object.fromEntries(Object.entries(Y.transport).map(([r,e])=>[r,e.encode])),Ke=!1,Qe=(r,e)=>Me[r](e);export{Qe as decode,Me as decoders,He as dictionary,Je as encoders,Ke as hash,Y as hooks,qe as matchers,Ge as nodes,ze as root,Xe as server_loads};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,a as r}from"../chunks/B09fC2bi.js";export{o as load_css,r as start};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as n,a as s,f as i}from"../chunks/D8fmz15L.js";import{x as f,E as c,f as m,t as p}from"../chunks/DtmuEK64.js";import{B as h}from"../chunks/Da9oKyxb.js";import{h as v}from"../chunks/BJ-VzAMM.js";import{s as g}from"../chunks/C63Z97y6.js";function d(l,o,...t){var r=new h(l);f(()=>{const a=o()??null;r.ensure(a,a&&(e=>a(e,...t)))},c)}const w="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='107'%20height='128'%20viewBox='0%200%20107%20128'%3e%3ctitle%3esvelte-logo%3c/title%3e%3cpath%20d='M94.157%2022.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282%2029.608A29.92%2029.92%200%200%200%208.764%2049.65a31.5%2031.5%200%200%200%203.108%2020.231%2030%2030%200%200%200-4.477%2011.183%2031.9%2031.9%200%200%200%205.448%2024.116c10.402%2014.887%2030.942%2019.297%2045.791%209.835l26.083-16.624A29.92%2029.92%200%200%200%2098.235%2078.35a31.53%2031.53%200%200%200-3.105-20.232%2030%2030%200%200%200%204.474-11.182%2031.88%2031.88%200%200%200-5.447-24.116'%20style='fill:%23ff3e00'/%3e%3cpath%20d='M45.817%20106.582a20.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.503%2018%2018%200%200%201%20.624-2.435l.49-1.498%201.337.981a33.6%2033.6%200%200%200%2010.203%205.098l.97.294-.09.968a5.85%205.85%200%200%200%201.052%203.878%206.24%206.24%200%200%200%206.695%202.485%205.8%205.8%200%200%200%201.603-.704L69.27%2076.28a5.43%205.43%200%200%200%202.45-3.631%205.8%205.8%200%200%200-.987-4.371%206.24%206.24%200%200%200-6.698-2.487%205.7%205.7%200%200%200-1.6.704l-9.953%206.345a19%2019%200%200%201-5.296%202.326%2020.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.502%2017.99%2017.99%200%200%201%208.13-12.052l26.081-16.623a19%2019%200%200%201%205.3-2.329%2020.72%2020.72%200%200%201%2022.237%208.243%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-.624%202.435l-.49%201.498-1.337-.98a33.6%2033.6%200%200%200-10.203-5.1l-.97-.294.09-.968a5.86%205.86%200%200%200-1.052-3.878%206.24%206.24%200%200%200-6.696-2.485%205.8%205.8%200%200%200-1.602.704L37.73%2051.72a5.42%205.42%200%200%200-2.449%203.63%205.79%205.79%200%200%200%20.986%204.372%206.24%206.24%200%200%200%206.698%202.486%205.8%205.8%200%200%200%201.602-.704l9.952-6.342a19%2019%200%200%201%205.295-2.328%2020.72%2020.72%200%200%201%2022.237%208.242%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-8.13%2012.053l-26.081%2016.622a19%2019%200%200%201-5.3%202.328'%20style='fill:%23fff'/%3e%3c/svg%3e";var _=i('<link rel="icon"/>');function b(l,o){var t=n();v("12qhfyh",a=>{var e=_();p(()=>g(e,"href",w)),s(a,e)});var r=m(t);d(r,()=>o.children),s(l,t)}export{b as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as h,f as c}from"../chunks/D8fmz15L.js";import"../chunks/B_AmmRQN.js";import{p as l,f as v,t as u,a as _,c as s,r as e,s as g}from"../chunks/DtmuEK64.js";import{s as o}from"../chunks/ZW9ZwxRj.js";import{i as x}from"../chunks/44EpIQ4d.js";import{p}from"../chunks/z6vZsXi_.js";var d=c("<h1> </h1> <p> </p>",1);function y(m,i){l(i,!1),x();var t=d(),r=v(t),f=s(r,!0);e(r);var a=g(r,2),n=s(a,!0);e(a),u(()=>{o(f,p.status),o(n,p.error?.message)}),h(m,t),_()}export{y as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,f as a}from"../chunks/D8fmz15L.js";import"../chunks/B_AmmRQN.js";import{n as r}from"../chunks/DtmuEK64.js";var m=a('<h1>Welcome to SvelteKit</h1> <p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>',1);function s(t){var e=m();r(2),o(t,e)}export{s as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as P,f as k}from"../chunks/D8fmz15L.js";import"../chunks/B_AmmRQN.js";import{h as le,Y as ge,Q as ne,au as ye,aG as we,aH as xe,aI as Se,D as Q,_ as Te,p as ze,aJ as Ae,aK as Pe,t as w,m as a,a as ke,s as l,c as n,a0 as o,r as v,aL as U,aM as Me,j as $e,aN as S,aO as b,$ as qe}from"../chunks/DtmuEK64.js";import{h as Le}from"../chunks/BJ-VzAMM.js";import{o as Ce}from"../chunks/DDNuMsfB.js";import{e as Ie,s as A}from"../chunks/ZW9ZwxRj.js";import{i as se}from"../chunks/Ck1fWG4n.js";import{r as Re}from"../chunks/C63Z97y6.js";import{t as De,b as oe,s as Oe}from"../chunks/dKdRdI5_.js";import{i as Be}from"../chunks/44EpIQ4d.js";function Y(e,i={},u,t){for(var d in u){var s=u[d];i[d]!==s&&(u[d]==null?e.style.removeProperty(d):e.style.setProperty(d,s,t))}}function Ee(e,i,u,t){var d=e.__style;if(le||d!==i){var s=De(i,t);(!le||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=i}else t&&(Array.isArray(t)?(Y(e,u?.[0],t[0]),Y(e,u?.[1],t[1],"important")):Y(e,u,t));return t}function ve(e,i,u=!1){if(e.multiple){if(i==null)return;if(!we(i))return xe();for(var t of e.options)t.selected=i.includes(T(t));return}for(t of e.options){var d=T(t);if(Se(d,i)){t.selected=!0;return}}(!u||i!==void 0)&&(e.selectedIndex=-1)}function Fe(e){var i=new MutationObserver(()=>{ve(e,e.__value)});i.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ye(()=>{i.disconnect()})}function V(e,i,u=i){var t=new WeakSet,d=!0;ge(e,"change",s=>{var h=s?"[selected]":":checked",c;if(e.multiple)c=[].map.call(e.querySelectorAll(h),T);else{var y=e.querySelector(h)??e.querySelector("option:not([disabled])");c=y&&T(y)}u(c),Q!==null&&t.add(Q)}),ne(()=>{var s=i();if(e===document.activeElement){var h=Te??Q;if(t.has(h))return}if(ve(e,s,d),d&&s===void 0){var c=e.querySelector(":checked");c!==null&&(s=T(c),u(s))}e.__value=s,d=!1}),Fe(e)}function T(e){return"__value"in e?e.__value:e.value}var Ge=k('<div class="progress-bar svelte-1h2iha8"><div class="fill svelte-1h2iha8"></div></div>'),He=k('<div class="result-area svelte-1h2iha8"><label class="svelte-1h2iha8">Result</label> <div class="output-display svelte-1h2iha8"> </div></div>'),Ke=k('<div class="ai-container svelte-1h2iha8"><header class="svelte-1h2iha8"><h2 class="svelte-1h2iha8">Chrome Built-in Summarizer</h2> <div> </div></header> <section class="controls svelte-1h2iha8"><div class="field svelte-1h2iha8"><label for="type" class="svelte-1h2iha8">Type</label> <select id="type" class="svelte-1h2iha8"><option>TL;DR</option><option>Key Points</option><option>Teaser</option><option>Headline</option></select></div> <div class="field svelte-1h2iha8"><label for="format" class="svelte-1h2iha8">Format</label> <select id="format" class="svelte-1h2iha8"><option>Markdown</option><option>Plain Text</option></select></div> <div class="field svelte-1h2iha8"><label for="length" class="svelte-1h2iha8">Length</label> <select id="length" class="svelte-1h2iha8"><option>Short</option><option>Medium</option><option>Long</option></select></div></section> <div class="input-area svelte-1h2iha8"><label for="context" class="svelte-1h2iha8">Context (Optional 배경 정보)</label> <input id="context" type="text" placeholder="예: 이 글은 기술 블로그 포스트입니다." class="svelte-1h2iha8"/> <label for="input" class="svelte-1h2iha8">Target Text</label> <textarea id="input" placeholder="요약할 내용을 입력하세요..." class="svelte-1h2iha8"></textarea></div> <div class="action-row svelte-1h2iha8"><button class="run-btn svelte-1h2iha8"> </button> <div class="status-box svelte-1h2iha8"><span class="msg svelte-1h2iha8"> </span> <!></div></div> <!></div>');function We(e,i){ze(i,!1);const u=b();let t=b(""),d=b(""),s=b(""),h=b(""),c=b("no"),y=b(!1),_=b({loaded:0,total:0,active:!1}),p=b({type:"tl;dr",format:"markdown",length:"medium"});Ce(async()=>{await ue()});async function ue(){const r=globalThis.ai;if(!r?.summarizer){o(h,"Summarizer API가 브라우저에서 지원되지 않습니다. chrome://flags 설정을 확인하세요."),o(c,"no");return}try{const f=await r.summarizer.capabilities();o(c,f.available),a(c)==="no"?o(h,"이 기기에서는 Summarizer API를 사용할 수 없습니다."):a(c)==="after-download"?o(h,"사용을 위해 모델 다운로드가 필요합니다."):o(h,"Summarizer 준비 완료")}catch(f){o(h,"가용성 확인 중 오류 발생"),console.error(f)}}async function de(){if(!a(t).trim())return;const r=globalThis.ai;o(y,!0),o(s,""),S(_,a(_).active=!1);let f=null;try{f=await r.summarizer.create({...a(p),monitor(g){g.addEventListener("downloadprogress",z=>{o(_,{loaded:z.loaded,total:z.total,active:!0}),o(h,`모델 다운로드 중... (${Math.round(z.loaded/z.total*100)}%)`)})}}),o(h,"요약 생성 중..."),S(_,a(_).active=!1);const m=f.summarizeStreaming(a(t),{context:a(d).trim()||void 0});for await(const g of m)o(s,g);o(h,"요약 완료")}catch(m){o(h,`오류: ${m.message}`),console.error(m)}finally{f?.destroy(),o(y,!1)}}Ae(()=>a(_),()=>{o(u,a(_).total?Math.round(a(_).loaded/a(_).total*100):0)}),Pe(),Be();var M=Ke(),$=n(M),q=l(n($),2);let X;var ce=n(q,!0);v(q),v($);var L=l($,2),C=n(L),I=l(n(C),2);w(()=>{a(p),U(()=>{})});var R=n(I);R.value=R.__value="tl;dr";var D=l(R);D.value=D.__value="key-points";var O=l(D);O.value=O.__value="teaser";var Z=l(O);Z.value=Z.__value="headline",v(I),v(C);var B=l(C,2),E=l(n(B),2);w(()=>{a(p),U(()=>{})});var F=n(E);F.value=F.__value="markdown";var ee=l(F);ee.value=ee.__value="plain-text",v(E),v(B);var ae=l(B,2),G=l(n(ae),2);w(()=>{a(p),U(()=>{})});var H=n(G);H.value=H.__value="short";var K=l(H);K.value=K.__value="medium";var te=l(K);te.value=te.__value="long",v(G),v(ae),v(L);var W=l(L,2),j=l(n(W),2);Re(j);var ie=l(j,4);Me(ie),v(W);var J=l(W,2),x=n(J),he=n(x,!0);v(x);var re=l(x,2),N=n(re),fe=n(N,!0);v(N);var pe=l(N,2);{var _e=r=>{var f=Ge(),m=n(f);let g;v(f),w(()=>g=Ee(m,"",g,{width:`${a(u)??""}%`})),P(r,f)};se(pe,r=>{a(_),$e(()=>a(_).active)&&r(_e)})}v(re),v(J);var me=l(J,2);{var be=r=>{var f=He(),m=l(n(f),2),g=n(m,!0);v(m),v(f),w(()=>A(g,a(s))),P(r,f)};se(me,r=>{a(s)&&r(be)})}v(M),w(()=>{X=Oe(q,1,"badge svelte-1h2iha8",null,X,{available:a(c)==="readily",warning:a(c)==="after-download"}),A(ce,a(c)==="readily"?"Ready":a(c)==="after-download"?"Download Required":"Unsupported"),x.disabled=a(y)||a(c)==="no",A(he,a(y)?"Processing...":"Summarize"),A(fe,a(h))}),V(I,()=>a(p).type,r=>S(p,a(p).type=r)),V(E,()=>a(p).format,r=>S(p,a(p).format=r)),V(G,()=>a(p).length,r=>S(p,a(p).length=r)),oe(j,()=>a(d),r=>o(d,r)),oe(ie,()=>a(t),r=>o(t,r)),Ie("click",x,de),P(e,M),ke()}var je=k('<div class="page-container svelte-1e4332c"><!></div>');function ta(e){var i=je();Le("1e4332c",t=>{ne(()=>{qe.title="Google Chrome AI - Wendy"})});var u=n(i);We(u,{}),v(i),P(e,i)}export{ta as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import{b as Sn,d as yr,a as ee,f as ye,c as Rn,e as Qn}from"../chunks/D8fmz15L.js";import{J as Mt,x as Sr,h as ke,B as mt,W as Ke,y as Wt,m as _,z as Rr,H as Ir,A as In,C as Pt,M as Me,U as Jn,aE as Lr,ao as Ln,D as Cr,aP as be,K as qt,aQ as Or,P as Dr,aR as Nr,aG as Mr,aC as Jt,aS as Pr,aT as zr,aO as $r,ac as Cn,aU as Ur,F as er,I as tr,aV as zt,aW as Fr,aB as Hr,G as Br,V as nr,t as kt,a3 as Gr,aX as Wr,aF as qr,az as Yr,p as Zr,a1 as Fe,aY as Xr,a as jr,a0 as fe,c as Q,s as He,Z as Vr,n as On,r as K,aM as Kr,f as Dn}from"../chunks/DtmuEK64.js";import{d as Qr,s as Nn}from"../chunks/ZW9ZwxRj.js";import{i as Be}from"../chunks/Ck1fWG4n.js";import{h as Jr}from"../chunks/BJ-VzAMM.js";import{b as es,s as Mn}from"../chunks/dKdRdI5_.js";import{b as Pn}from"../chunks/b2dyOoG8.js";function ts(t,e){return e}function ns(t,e,r){for(var s=[],n=e.length,l,a=e.length,c=0;c<n;c++){let g=e[c];tr(g,()=>{if(l){if(l.pending.delete(g),l.done.add(g),l.pending.size===0){var k=t.outrogroups;Yt(Jt(l.done)),k.delete(l),k.size===0&&(t.outrogroups=null)}}else a-=1},!1)}if(a===0){var o=s.length===0&&r!==null;if(o){var p=r,h=p.parentNode;Hr(h),h.append(p),t.items.clear()}Yt(e,!o)}else l={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(l)}function Yt(t,e=!0){for(var r=0;r<t.length;r++)Br(t[r],e)}var zn;function rs(t,e,r,s,n,l=null){var a=t,c=new Map;{var o=t;a=ke?mt(Ke(o)):o.appendChild(Mt())}ke&&Wt();var p=null,h=Nr(()=>{var O=r();return Mr(O)?O:O==null?[]:Jt(O)}),g,k=!0;function v(){E.fallback=p,ss(E,g,a,e,s),p!==null&&(g.length===0?(p.f&be)===0?er(p):(p.f^=be,Qe(p,null,a)):tr(p,()=>{p=null}))}var f=Sr(()=>{g=_(h);var O=g.length;let F=!1;if(ke){var P=Rr(a)===Ir;P!==(O===0)&&(a=In(),mt(a),Pt(!1),F=!0)}for(var $=new Set,A=Cr,z=Dr(),L=0;L<O;L+=1){ke&&Me.nodeType===Jn&&Me.data===Lr&&(a=Me,F=!0,Pt(!1));var H=g[L],b=s(H,L),R=k?null:c.get(b);R?(R.v&&Ln(R.v,H),R.i&&Ln(R.i,L),z&&A.unskip_effect(R.e)):(R=is(c,k?a:zn??=Mt(),H,b,L,n,e,r),k||(R.e.f|=be),c.set(b,R)),$.add(b)}if(O===0&&l&&!p&&(k?p=qt(()=>l(a)):(p=qt(()=>l(zn??=Mt())),p.f|=be)),O>$.size&&Or(),ke&&O>0&&mt(In()),!k)if(z){for(const[B,S]of c)$.has(B)||A.skip_effect(S.e);A.oncommit(v),A.ondiscard(()=>{})}else v();F&&Pt(!0),_(h)}),E={effect:f,items:c,outrogroups:null,fallback:p};k=!1,ke&&(a=Me)}function Ge(t){for(;t!==null&&(t.f&Fr)===0;)t=t.next;return t}function ss(t,e,r,s,n){var l=e.length,a=t.items,c=Ge(t.effect.first),o,p=null,h=[],g=[],k,v,f,E;for(E=0;E<l;E+=1){if(k=e[E],v=n(k,E),f=a.get(v).e,t.outrogroups!==null)for(const b of t.outrogroups)b.pending.delete(f),b.done.delete(f);if((f.f&be)!==0)if(f.f^=be,f===c)Qe(f,null,r);else{var O=p?p.next:c;f===t.effect.last&&(t.effect.last=f.prev),f.prev&&(f.prev.next=f.next),f.next&&(f.next.prev=f.prev),me(t,p,f),me(t,f,O),Qe(f,O,r),p=f,h=[],g=[],c=Ge(p.next);continue}if((f.f&zt)!==0&&er(f),f!==c){if(o!==void 0&&o.has(f)){if(h.length<g.length){var F=g[0],P;p=F.prev;var $=h[0],A=h[h.length-1];for(P=0;P<h.length;P+=1)Qe(h[P],F,r);for(P=0;P<g.length;P+=1)o.delete(g[P]);me(t,$.prev,A.next),me(t,p,$),me(t,A,F),c=F,p=A,E-=1,h=[],g=[]}else o.delete(f),Qe(f,c,r),me(t,f.prev,f.next),me(t,f,p===null?t.effect.first:p.next),me(t,p,f),p=f;continue}for(h=[],g=[];c!==null&&c!==f;)(o??=new Set).add(c),g.push(c),c=Ge(c.next);if(c===null)continue}(f.f&be)===0&&h.push(f),p=f,c=Ge(f.next)}if(t.outrogroups!==null){for(const b of t.outrogroups)b.pending.size===0&&(Yt(Jt(b.done)),t.outrogroups?.delete(b));t.outrogroups.size===0&&(t.outrogroups=null)}if(c!==null||o!==void 0){var z=[];if(o!==void 0)for(f of o)(f.f&zt)===0&&z.push(f);for(;c!==null;)(c.f&zt)===0&&c!==t.fallback&&z.push(c),c=Ge(c.next);var L=z.length;if(L>0){var H=l===0?r:null;ns(t,z,H)}}}function is(t,e,r,s,n,l,a,c){var o=(a&Pr)!==0?(a&zr)===0?$r(r,!1,!1):Cn(r):null,p=(a&Ur)!==0?Cn(n):null;return{v:o,i:p,e:qt(()=>(l(e,o??r,p??n,c),()=>{t.delete(s)}))}}function Qe(t,e,r){if(t.nodes)for(var s=t.nodes.start,n=t.nodes.end,l=e&&(e.f&be)===0?e.nodes.start:r;s!==null;){var a=nr(s);if(l.before(s),s===n)return;s=a}}function me(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function as(t,e,r=!1,s=!1,n=!1){var l=t,a="";kt(()=>{var c=Gr;if(a===(a=e()??"")){ke&&Wt();return}if(c.nodes!==null&&(Wr(c.nodes.start,c.nodes.end),c.nodes=null),a!==""){if(ke){Me.data;for(var o=Wt(),p=o;o!==null&&(o.nodeType!==Jn||o.data!=="");)p=o,o=nr(o);if(o===null)throw qr(),Yr;Sn(Me,p),l=mt(o);return}var h=a+"";r?h=`<svg>${h}</svg>`:s&&(h=`<math>${h}</math>`);var g=yr(h);if((r||s)&&(g=Ke(g)),Sn(Ke(g),g.lastChild),r||s)for(;Ke(g);)l.before(Ke(g));else l.before(g)}})}const{entries:rr,setPrototypeOf:$n,isFrozen:ls,getPrototypeOf:os,getOwnPropertyDescriptor:cs}=Object;let{freeze:Y,seal:J,create:Zt}=Object,{apply:Xt,construct:jt}=typeof Reflect<"u"&&Reflect;Y||(Y=function(e){return e});J||(J=function(e){return e});Xt||(Xt=function(e,r){for(var s=arguments.length,n=new Array(s>2?s-2:0),l=2;l<s;l++)n[l-2]=arguments[l];return e.apply(r,n)});jt||(jt=function(e){for(var r=arguments.length,s=new Array(r>1?r-1:0),n=1;n<r;n++)s[n-1]=arguments[n];return new e(...s)});const ft=Z(Array.prototype.forEach),us=Z(Array.prototype.lastIndexOf),Un=Z(Array.prototype.pop),We=Z(Array.prototype.push),ps=Z(Array.prototype.splice),bt=Z(String.prototype.toLowerCase),$t=Z(String.prototype.toString),Ut=Z(String.prototype.match),qe=Z(String.prototype.replace),hs=Z(String.prototype.indexOf),fs=Z(String.prototype.trim),te=Z(Object.prototype.hasOwnProperty),W=Z(RegExp.prototype.test),Ye=ds(TypeError);function Z(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,s=new Array(r>1?r-1:0),n=1;n<r;n++)s[n-1]=arguments[n];return Xt(t,e,s)}}function ds(t){return function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return jt(t,r)}}function x(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bt;$n&&$n(t,null);let s=e.length;for(;s--;){let n=e[s];if(typeof n=="string"){const l=r(n);l!==n&&(ls(e)||(e[s]=l),n=l)}t[n]=!0}return t}function gs(t){for(let e=0;e<t.length;e++)te(t,e)||(t[e]=null);return t}function le(t){const e=Zt(null);for(const[r,s]of rr(t))te(t,r)&&(Array.isArray(s)?e[r]=gs(s):s&&typeof s=="object"&&s.constructor===Object?e[r]=le(s):e[r]=s);return e}function Ze(t,e){for(;t!==null;){const s=cs(t,e);if(s){if(s.get)return Z(s.get);if(typeof s.value=="function")return Z(s.value)}t=os(t)}function r(){return null}return r}const Fn=Y(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ft=Y(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ht=Y(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ms=Y(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Bt=Y(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ks=Y(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Hn=Y(["#text"]),Bn=Y(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Gt=Y(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Gn=Y(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),dt=Y(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bs=J(/\{\{[\w\W]*|[\w\W]*\}\}/gm),xs=J(/<%[\w\W]*|[\w\W]*%>/gm),_s=J(/\$\{[\w\W]*/gm),Ts=J(/^data-[\-\w.\u00B7-\uFFFF]+$/),ws=J(/^aria-[\-\w]+$/),sr=J(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vs=J(/^(?:\w+script|data):/i),As=J(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ir=J(/^html$/i),Es=J(/^[a-z][.\w]*(-[.\w]+)+$/i);var Wn=Object.freeze({__proto__:null,ARIA_ATTR:ws,ATTR_WHITESPACE:As,CUSTOM_ELEMENT:Es,DATA_ATTR:Ts,DOCTYPE_NAME:ir,ERB_EXPR:xs,IS_ALLOWED_URI:sr,IS_SCRIPT_OR_DATA:vs,MUSTACHE_EXPR:bs,TMPLIT_EXPR:_s});const Xe={element:1,text:3,progressingInstruction:7,comment:8,document:9},ys=function(){return typeof window>"u"?null:window},Ss=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let s=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(s=r.getAttribute(n));const l="dompurify"+(s?"#"+s:"");try{return e.createPolicy(l,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},qn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ar(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ys();const e=m=>ar(m);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==Xe.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const s=r,n=s.currentScript,{DocumentFragment:l,HTMLTemplateElement:a,Node:c,Element:o,NodeFilter:p,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:g,DOMParser:k,trustedTypes:v}=t,f=o.prototype,E=Ze(f,"cloneNode"),O=Ze(f,"remove"),F=Ze(f,"nextSibling"),P=Ze(f,"childNodes"),$=Ze(f,"parentNode");if(typeof a=="function"){const m=r.createElement("template");m.content&&m.content.ownerDocument&&(r=m.content.ownerDocument)}let A,z="";const{implementation:L,createNodeIterator:H,createDocumentFragment:b,getElementsByTagName:R}=r,{importNode:B}=s;let S=qn();e.isSupported=typeof rr=="function"&&typeof $=="function"&&L&&L.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:de,ERB_EXPR:se,TMPLIT_EXPR:xe,DATA_ATTR:Pe,ARIA_ATTR:_e,IS_SCRIPT_OR_DATA:nt,ATTR_WHITESPACE:Re,CUSTOM_ELEMENT:At}=Wn;let{IS_ALLOWED_URI:rt}=Wn,D=null;const st=x({},[...Fn,...Ft,...Ht,...Bt,...Hn]);let w=null;const j=x({},[...Bn,...Gt,...Gn,...dt]);let I=Object.seal(Zt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,ze=null;const V=Object.seal(Zt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ce=!0,we=!0,it=!1,Ie=!0,ge=!1,at=!0,ve=!1,Et=!1,yt=!1,Le=!1,lt=!1,ot=!1,un=!0,pn=!1;const br="user-content-";let St=!0,$e=!1,Ce={},ie=null;const Rt=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let hn=null;const fn=x({},["audio","video","img","source","image","track"]);let It=null;const dn=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ct="http://www.w3.org/1998/Math/MathML",ut="http://www.w3.org/2000/svg",ue="http://www.w3.org/1999/xhtml";let Oe=ue,Lt=!1,Ct=null;const xr=x({},[ct,ut,ue],$t);let pt=x({},["mi","mo","mn","ms","mtext"]),ht=x({},["annotation-xml"]);const _r=x({},["title","style","font","a","script"]);let Ue=null;const Tr=["application/xhtml+xml","text/html"],wr="text/html";let M=null,De=null;const vr=r.createElement("form"),gn=function(i){return i instanceof RegExp||i instanceof Function},Ot=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(De&&De===i)){if((!i||typeof i!="object")&&(i={}),i=le(i),Ue=Tr.indexOf(i.PARSER_MEDIA_TYPE)===-1?wr:i.PARSER_MEDIA_TYPE,M=Ue==="application/xhtml+xml"?$t:bt,D=te(i,"ALLOWED_TAGS")?x({},i.ALLOWED_TAGS,M):st,w=te(i,"ALLOWED_ATTR")?x({},i.ALLOWED_ATTR,M):j,Ct=te(i,"ALLOWED_NAMESPACES")?x({},i.ALLOWED_NAMESPACES,$t):xr,It=te(i,"ADD_URI_SAFE_ATTR")?x(le(dn),i.ADD_URI_SAFE_ATTR,M):dn,hn=te(i,"ADD_DATA_URI_TAGS")?x(le(fn),i.ADD_DATA_URI_TAGS,M):fn,ie=te(i,"FORBID_CONTENTS")?x({},i.FORBID_CONTENTS,M):Rt,Te=te(i,"FORBID_TAGS")?x({},i.FORBID_TAGS,M):le({}),ze=te(i,"FORBID_ATTR")?x({},i.FORBID_ATTR,M):le({}),Ce=te(i,"USE_PROFILES")?i.USE_PROFILES:!1,ce=i.ALLOW_ARIA_ATTR!==!1,we=i.ALLOW_DATA_ATTR!==!1,it=i.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ge=i.SAFE_FOR_TEMPLATES||!1,at=i.SAFE_FOR_XML!==!1,ve=i.WHOLE_DOCUMENT||!1,Le=i.RETURN_DOM||!1,lt=i.RETURN_DOM_FRAGMENT||!1,ot=i.RETURN_TRUSTED_TYPE||!1,yt=i.FORCE_BODY||!1,un=i.SANITIZE_DOM!==!1,pn=i.SANITIZE_NAMED_PROPS||!1,St=i.KEEP_CONTENT!==!1,$e=i.IN_PLACE||!1,rt=i.ALLOWED_URI_REGEXP||sr,Oe=i.NAMESPACE||ue,pt=i.MATHML_TEXT_INTEGRATION_POINTS||pt,ht=i.HTML_INTEGRATION_POINTS||ht,I=i.CUSTOM_ELEMENT_HANDLING||{},i.CUSTOM_ELEMENT_HANDLING&&gn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(I.tagNameCheck=i.CUSTOM_ELEMENT_HANDLING.tagNameCheck),i.CUSTOM_ELEMENT_HANDLING&&gn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(I.attributeNameCheck=i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(I.allowCustomizedBuiltInElements=i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ge&&(we=!1),lt&&(Le=!0),Ce&&(D=x({},Hn),w=[],Ce.html===!0&&(x(D,Fn),x(w,Bn)),Ce.svg===!0&&(x(D,Ft),x(w,Gt),x(w,dt)),Ce.svgFilters===!0&&(x(D,Ht),x(w,Gt),x(w,dt)),Ce.mathMl===!0&&(x(D,Bt),x(w,Gn),x(w,dt))),i.ADD_TAGS&&(typeof i.ADD_TAGS=="function"?V.tagCheck=i.ADD_TAGS:(D===st&&(D=le(D)),x(D,i.ADD_TAGS,M))),i.ADD_ATTR&&(typeof i.ADD_ATTR=="function"?V.attributeCheck=i.ADD_ATTR:(w===j&&(w=le(w)),x(w,i.ADD_ATTR,M))),i.ADD_URI_SAFE_ATTR&&x(It,i.ADD_URI_SAFE_ATTR,M),i.FORBID_CONTENTS&&(ie===Rt&&(ie=le(ie)),x(ie,i.FORBID_CONTENTS,M)),i.ADD_FORBID_CONTENTS&&(ie===Rt&&(ie=le(ie)),x(ie,i.ADD_FORBID_CONTENTS,M)),St&&(D["#text"]=!0),ve&&x(D,["html","head","body"]),D.table&&(x(D,["tbody"]),delete Te.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ye('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ye('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=i.TRUSTED_TYPES_POLICY,z=A.createHTML("")}else A===void 0&&(A=Ss(v,n)),A!==null&&typeof z=="string"&&(z=A.createHTML(""));Y&&Y(i),De=i}},mn=x({},[...Ft,...Ht,...ms]),kn=x({},[...Bt,...ks]),Ar=function(i){let u=$(i);(!u||!u.tagName)&&(u={namespaceURI:Oe,tagName:"template"});const d=bt(i.tagName),C=bt(u.tagName);return Ct[i.namespaceURI]?i.namespaceURI===ut?u.namespaceURI===ue?d==="svg":u.namespaceURI===ct?d==="svg"&&(C==="annotation-xml"||pt[C]):!!mn[d]:i.namespaceURI===ct?u.namespaceURI===ue?d==="math":u.namespaceURI===ut?d==="math"&&ht[C]:!!kn[d]:i.namespaceURI===ue?u.namespaceURI===ut&&!ht[C]||u.namespaceURI===ct&&!pt[C]?!1:!kn[d]&&(_r[d]||!mn[d]):!!(Ue==="application/xhtml+xml"&&Ct[i.namespaceURI]):!1},ae=function(i){We(e.removed,{element:i});try{$(i).removeChild(i)}catch{O(i)}},Ae=function(i,u){try{We(e.removed,{attribute:u.getAttributeNode(i),from:u})}catch{We(e.removed,{attribute:null,from:u})}if(u.removeAttribute(i),i==="is")if(Le||lt)try{ae(u)}catch{}else try{u.setAttribute(i,"")}catch{}},bn=function(i){let u=null,d=null;if(yt)i="<remove></remove>"+i;else{const N=Ut(i,/^[\r\n\t ]+/);d=N&&N[0]}Ue==="application/xhtml+xml"&&Oe===ue&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");const C=A?A.createHTML(i):i;if(Oe===ue)try{u=new k().parseFromString(C,Ue)}catch{}if(!u||!u.documentElement){u=L.createDocument(Oe,"template",null);try{u.documentElement.innerHTML=Lt?z:C}catch{}}const G=u.body||u.documentElement;return i&&d&&G.insertBefore(r.createTextNode(d),G.childNodes[0]||null),Oe===ue?R.call(u,ve?"html":"body")[0]:ve?u.documentElement:G},xn=function(i){return H.call(i.ownerDocument||i,i,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},Dt=function(i){return i instanceof g&&(typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||!(i.attributes instanceof h)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function")},_n=function(i){return typeof c=="function"&&i instanceof c};function pe(m,i,u){ft(m,d=>{d.call(e,i,u,De)})}const Tn=function(i){let u=null;if(pe(S.beforeSanitizeElements,i,null),Dt(i))return ae(i),!0;const d=M(i.nodeName);if(pe(S.uponSanitizeElement,i,{tagName:d,allowedTags:D}),at&&i.hasChildNodes()&&!_n(i.firstElementChild)&&W(/<[/\w!]/g,i.innerHTML)&&W(/<[/\w!]/g,i.textContent)||i.nodeType===Xe.progressingInstruction||at&&i.nodeType===Xe.comment&&W(/<[/\w]/g,i.data))return ae(i),!0;if(!(V.tagCheck instanceof Function&&V.tagCheck(d))&&(!D[d]||Te[d])){if(!Te[d]&&vn(d)&&(I.tagNameCheck instanceof RegExp&&W(I.tagNameCheck,d)||I.tagNameCheck instanceof Function&&I.tagNameCheck(d)))return!1;if(St&&!ie[d]){const C=$(i)||i.parentNode,G=P(i)||i.childNodes;if(G&&C){const N=G.length;for(let X=N-1;X>=0;--X){const he=E(G[X],!0);he.__removalCount=(i.__removalCount||0)+1,C.insertBefore(he,F(i))}}}return ae(i),!0}return i instanceof o&&!Ar(i)||(d==="noscript"||d==="noembed"||d==="noframes")&&W(/<\/no(script|embed|frames)/i,i.innerHTML)?(ae(i),!0):(ge&&i.nodeType===Xe.text&&(u=i.textContent,ft([de,se,xe],C=>{u=qe(u,C," ")}),i.textContent!==u&&(We(e.removed,{element:i.cloneNode()}),i.textContent=u)),pe(S.afterSanitizeElements,i,null),!1)},wn=function(i,u,d){if(un&&(u==="id"||u==="name")&&(d in r||d in vr))return!1;if(!(we&&!ze[u]&&W(Pe,u))){if(!(ce&&W(_e,u))){if(!(V.attributeCheck instanceof Function&&V.attributeCheck(u,i))){if(!w[u]||ze[u]){if(!(vn(i)&&(I.tagNameCheck instanceof RegExp&&W(I.tagNameCheck,i)||I.tagNameCheck instanceof Function&&I.tagNameCheck(i))&&(I.attributeNameCheck instanceof RegExp&&W(I.attributeNameCheck,u)||I.attributeNameCheck instanceof Function&&I.attributeNameCheck(u,i))||u==="is"&&I.allowCustomizedBuiltInElements&&(I.tagNameCheck instanceof RegExp&&W(I.tagNameCheck,d)||I.tagNameCheck instanceof Function&&I.tagNameCheck(d))))return!1}else if(!It[u]){if(!W(rt,qe(d,Re,""))){if(!((u==="src"||u==="xlink:href"||u==="href")&&i!=="script"&&hs(d,"data:")===0&&hn[i])){if(!(it&&!W(nt,qe(d,Re,"")))){if(d)return!1}}}}}}}return!0},vn=function(i){return i!=="annotation-xml"&&Ut(i,At)},An=function(i){pe(S.beforeSanitizeAttributes,i,null);const{attributes:u}=i;if(!u||Dt(i))return;const d={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:w,forceKeepAttr:void 0};let C=u.length;for(;C--;){const G=u[C],{name:N,namespaceURI:X,value:he}=G,Ne=M(N),Nt=he;let U=N==="value"?Nt:fs(Nt);if(d.attrName=Ne,d.attrValue=U,d.keepAttr=!0,d.forceKeepAttr=void 0,pe(S.uponSanitizeAttribute,i,d),U=d.attrValue,pn&&(Ne==="id"||Ne==="name")&&(Ae(N,i),U=br+U),at&&W(/((--!?|])>)|<\/(style|title|textarea)/i,U)){Ae(N,i);continue}if(Ne==="attributename"&&Ut(U,"href")){Ae(N,i);continue}if(d.forceKeepAttr)continue;if(!d.keepAttr){Ae(N,i);continue}if(!Ie&&W(/\/>/i,U)){Ae(N,i);continue}ge&&ft([de,se,xe],yn=>{U=qe(U,yn," ")});const En=M(i.nodeName);if(!wn(En,Ne,U)){Ae(N,i);continue}if(A&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!X)switch(v.getAttributeType(En,Ne)){case"TrustedHTML":{U=A.createHTML(U);break}case"TrustedScriptURL":{U=A.createScriptURL(U);break}}if(U!==Nt)try{X?i.setAttributeNS(X,N,U):i.setAttribute(N,U),Dt(i)?ae(i):Un(e.removed)}catch{Ae(N,i)}}pe(S.afterSanitizeAttributes,i,null)},Er=function m(i){let u=null;const d=xn(i);for(pe(S.beforeSanitizeShadowDOM,i,null);u=d.nextNode();)pe(S.uponSanitizeShadowNode,u,null),Tn(u),An(u),u.content instanceof l&&m(u.content);pe(S.afterSanitizeShadowDOM,i,null)};return e.sanitize=function(m){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=null,d=null,C=null,G=null;if(Lt=!m,Lt&&(m="<!-->"),typeof m!="string"&&!_n(m))if(typeof m.toString=="function"){if(m=m.toString(),typeof m!="string")throw Ye("dirty is not a string, aborting")}else throw Ye("toString is not a function");if(!e.isSupported)return m;if(Et||Ot(i),e.removed=[],typeof m=="string"&&($e=!1),$e){if(m.nodeName){const he=M(m.nodeName);if(!D[he]||Te[he])throw Ye("root node is forbidden and cannot be sanitized in-place")}}else if(m instanceof c)u=bn("<!---->"),d=u.ownerDocument.importNode(m,!0),d.nodeType===Xe.element&&d.nodeName==="BODY"||d.nodeName==="HTML"?u=d:u.appendChild(d);else{if(!Le&&!ge&&!ve&&m.indexOf("<")===-1)return A&&ot?A.createHTML(m):m;if(u=bn(m),!u)return Le?null:ot?z:""}u&&yt&&ae(u.firstChild);const N=xn($e?m:u);for(;C=N.nextNode();)Tn(C),An(C),C.content instanceof l&&Er(C.content);if($e)return m;if(Le){if(lt)for(G=b.call(u.ownerDocument);u.firstChild;)G.appendChild(u.firstChild);else G=u;return(w.shadowroot||w.shadowrootmode)&&(G=B.call(s,G,!0)),G}let X=ve?u.outerHTML:u.innerHTML;return ve&&D["!doctype"]&&u.ownerDocument&&u.ownerDocument.doctype&&u.ownerDocument.doctype.name&&W(ir,u.ownerDocument.doctype.name)&&(X="<!DOCTYPE "+u.ownerDocument.doctype.name+`>
|
|
2
|
+
`+X),ge&&ft([de,se,xe],he=>{X=qe(X,he," ")}),A&&ot?A.createHTML(X):X},e.setConfig=function(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ot(m),Et=!0},e.clearConfig=function(){De=null,Et=!1},e.isValidAttribute=function(m,i,u){De||Ot({});const d=M(m),C=M(i);return wn(d,C,u)},e.addHook=function(m,i){typeof i=="function"&&We(S[m],i)},e.removeHook=function(m,i){if(i!==void 0){const u=us(S[m],i);return u===-1?void 0:ps(S[m],u,1)[0]}return Un(S[m])},e.removeHooks=function(m){S[m]=[]},e.removeAllHooks=function(){S=qn()},e}var Rs=ar();function en(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Se=en();function lr(t){Se=t}var et={exec:()=>null};function T(t,e=""){let r=typeof t=="string"?t:t.source,s={replace:(n,l)=>{let a=typeof l=="string"?l:l.source;return a=a.replace(q.caret,"$1"),r=r.replace(n,a),s},getRegex:()=>new RegExp(r,e)};return s}var Is=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),q={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Ls=/^(?:[ \t]*(?:\n|$))+/,Cs=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Os=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,tt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ds=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tn=/(?:[*+-]|\d{1,9}[.)])/,or=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,cr=T(or).replace(/bull/g,tn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ns=T(or).replace(/bull/g,tn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),nn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ms=/^[^\n]+/,rn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ps=T(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zs=T(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tn).getRegex(),wt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",sn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$s=T("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",sn).replace("tag",wt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ur=T(nn).replace("hr",tt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wt).getRegex(),Us=T(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ur).getRegex(),an={blockquote:Us,code:Cs,def:Ps,fences:Os,heading:Ds,hr:tt,html:$s,lheading:cr,list:zs,newline:Ls,paragraph:ur,table:et,text:Ms},Yn=T("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",tt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wt).getRegex(),Fs={...an,lheading:Ns,table:Yn,paragraph:T(nn).replace("hr",tt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Yn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wt).getRegex()},Hs={...an,html:T(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",sn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:et,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:T(nn).replace("hr",tt).replace("heading",` *#{1,6} *[^
|
|
3
|
+
]`).replace("lheading",cr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Bs=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Gs=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pr=/^( {2,}|\\)\n(?!\s*$)/,Ws=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vt=/[\p{P}\p{S}]/u,ln=/[\s\p{P}\p{S}]/u,hr=/[^\s\p{P}\p{S}]/u,qs=T(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ln).getRegex(),fr=/(?!~)[\p{P}\p{S}]/u,Ys=/(?!~)[\s\p{P}\p{S}]/u,Zs=/(?:[^\s\p{P}\p{S}]|~)/u,Xs=T(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Is?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),dr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,js=T(dr,"u").replace(/punct/g,vt).getRegex(),Vs=T(dr,"u").replace(/punct/g,fr).getRegex(),gr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ks=T(gr,"gu").replace(/notPunctSpace/g,hr).replace(/punctSpace/g,ln).replace(/punct/g,vt).getRegex(),Qs=T(gr,"gu").replace(/notPunctSpace/g,Zs).replace(/punctSpace/g,Ys).replace(/punct/g,fr).getRegex(),Js=T("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hr).replace(/punctSpace/g,ln).replace(/punct/g,vt).getRegex(),ei=T(/\\(punct)/,"gu").replace(/punct/g,vt).getRegex(),ti=T(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ni=T(sn).replace("(?:-->|$)","-->").getRegex(),ri=T("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ni).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),xt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,si=T(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",xt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mr=T(/^!?\[(label)\]\[(ref)\]/).replace("label",xt).replace("ref",rn).getRegex(),kr=T(/^!?\[(ref)\](?:\[\])?/).replace("ref",rn).getRegex(),ii=T("reflink|nolink(?!\\()","g").replace("reflink",mr).replace("nolink",kr).getRegex(),Zn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,on={_backpedal:et,anyPunctuation:ei,autolink:ti,blockSkip:Xs,br:pr,code:Gs,del:et,emStrongLDelim:js,emStrongRDelimAst:Ks,emStrongRDelimUnd:Js,escape:Bs,link:si,nolink:kr,punctuation:qs,reflink:mr,reflinkSearch:ii,tag:ri,text:Ws,url:et},ai={...on,link:T(/^!?\[(label)\]\((.*?)\)/).replace("label",xt).getRegex(),reflink:T(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",xt).getRegex()},Vt={...on,emStrongRDelimAst:Qs,emStrongLDelim:Vs,url:T(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Zn).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:T(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Zn).getRegex()},li={...Vt,br:T(pr).replace("{2,}","*").getRegex(),text:T(Vt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},gt={normal:an,gfm:Fs,pedantic:Hs},je={normal:on,gfm:Vt,breaks:li,pedantic:ai},oi={"&":"&","<":"<",">":">",'"':""","'":"'"},Xn=t=>oi[t];function oe(t,e){if(e){if(q.escapeTest.test(t))return t.replace(q.escapeReplace,Xn)}else if(q.escapeTestNoEncode.test(t))return t.replace(q.escapeReplaceNoEncode,Xn);return t}function jn(t){try{t=encodeURI(t).replace(q.percentDecode,"%")}catch{return null}return t}function Vn(t,e){let r=t.replace(q.findPipe,(l,a,c)=>{let o=!1,p=a;for(;--p>=0&&c[p]==="\\";)o=!o;return o?"|":" |"}),s=r.split(q.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(q.slashPipe,"|");return s}function Ve(t,e,r){let s=t.length;if(s===0)return"";let n=0;for(;n<s&&t.charAt(s-n-1)===e;)n++;return t.slice(0,s-n)}function ci(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])r++;else if(t[s]===e[1]&&(r--,r<0))return s;return r>0?-2:-1}function Kn(t,e,r,s,n){let l=e.href,a=e.title||null,c=t[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:a,text:c,tokens:s.inlineTokens(c)};return s.state.inLink=!1,o}function ui(t,e,r){let s=t.match(r.other.indentCodeCompensation);if(s===null)return e;let n=s[1];return e.split(`
|
|
4
|
+
`).map(l=>{let a=l.match(r.other.beginningSpace);if(a===null)return l;let[c]=a;return c.length>=n.length?l.slice(n.length):l}).join(`
|
|
5
|
+
`)}var _t=class{options;rules;lexer;constructor(t){this.options=t||Se}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Ve(r,`
|
|
6
|
+
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],s=ui(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let s=Ve(r,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(r=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Ve(e[0],`
|
|
7
|
+
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=Ve(e[0],`
|
|
8
|
+
`).split(`
|
|
9
|
+
`),s="",n="",l=[];for(;r.length>0;){let a=!1,c=[],o;for(o=0;o<r.length;o++)if(this.rules.other.blockquoteStart.test(r[o]))c.push(r[o]),a=!0;else if(!a)c.push(r[o]);else break;r=r.slice(o);let p=c.join(`
|
|
10
|
+
`),h=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
11
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
12
|
+
${p}`:p,n=n?`${n}
|
|
13
|
+
${h}`:h;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,l,!0),this.lexer.state.top=g,r.length===0)break;let k=l.at(-1);if(k?.type==="code")break;if(k?.type==="blockquote"){let v=k,f=v.raw+`
|
|
14
|
+
`+r.join(`
|
|
15
|
+
`),E=this.blockquote(f);l[l.length-1]=E,s=s.substring(0,s.length-v.raw.length)+E.raw,n=n.substring(0,n.length-v.text.length)+E.text;break}else if(k?.type==="list"){let v=k,f=v.raw+`
|
|
16
|
+
`+r.join(`
|
|
17
|
+
`),E=this.list(f);l[l.length-1]=E,s=s.substring(0,s.length-k.raw.length)+E.raw,n=n.substring(0,n.length-v.raw.length)+E.raw,r=f.substring(l.at(-1).raw.length).split(`
|
|
18
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:l,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),s=r.length>1,n={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");let l=this.rules.other.listItemRegex(r),a=!1;for(;t;){let o=!1,p="",h="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;p=e[0],t=t.substring(p.length);let g=e[2].split(`
|
|
19
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,F=>" ".repeat(3*F.length)),k=t.split(`
|
|
20
|
+
`,1)[0],v=!g.trim(),f=0;if(this.options.pedantic?(f=2,h=g.trimStart()):v?f=e[1].length+1:(f=e[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,h=g.slice(f),f+=e[1].length),v&&this.rules.other.blankLine.test(k)&&(p+=k+`
|
|
21
|
+
`,t=t.substring(k.length+1),o=!0),!o){let F=this.rules.other.nextBulletRegex(f),P=this.rules.other.hrRegex(f),$=this.rules.other.fencesBeginRegex(f),A=this.rules.other.headingBeginRegex(f),z=this.rules.other.htmlBeginRegex(f);for(;t;){let L=t.split(`
|
|
22
|
+
`,1)[0],H;if(k=L,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),H=k):H=k.replace(this.rules.other.tabCharGlobal," "),$.test(k)||A.test(k)||z.test(k)||F.test(k)||P.test(k))break;if(H.search(this.rules.other.nonSpaceChar)>=f||!k.trim())h+=`
|
|
23
|
+
`+H.slice(f);else{if(v||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||$.test(g)||A.test(g)||P.test(g))break;h+=`
|
|
24
|
+
`+k}!v&&!k.trim()&&(v=!0),p+=L+`
|
|
25
|
+
`,t=t.substring(L.length+1),g=H.slice(f)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(a=!0));let E=null,O;this.options.gfm&&(E=this.rules.other.listIsTask.exec(h),E&&(O=E[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:p,task:!!E,checked:O,loose:!1,text:h,tokens:[]}),n.raw+=p}let c=n.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let o=0;o<n.items.length;o++)if(this.lexer.state.top=!1,n.items[o].tokens=this.lexer.blockTokens(n.items[o].text,[]),!n.loose){let p=n.items[o].tokens.filter(g=>g.type==="space"),h=p.length>0&&p.some(g=>this.rules.other.anyLine.test(g.raw));n.loose=h}if(n.loose)for(let o=0;o<n.items.length;o++)n.items[o].loose=!0;return n}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:s,title:n}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=Vn(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
26
|
+
`):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?l.align.push("right"):this.rules.other.tableAlignCenter.test(a)?l.align.push("center"):this.rules.other.tableAlignLeft.test(a)?l.align.push("left"):l.align.push(null);for(let a=0;a<r.length;a++)l.header.push({text:r[a],tokens:this.lexer.inline(r[a]),header:!0,align:l.align[a]});for(let a of n)l.rows.push(Vn(a,l.header.length).map((c,o)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:l.align[o]})));return l}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
|
|
27
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let l=Ve(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{let l=ci(e[2],"()");if(l===-2)return;if(l>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],n="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],n=l[3])}else n=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?s=s.slice(1):s=s.slice(1,-1)),Kn(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let s=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[s.toLowerCase()];if(!n){let l=r[0].charAt(0);return{type:"text",raw:l,text:l}}return Kn(r,n,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!r||this.rules.inline.punctuation.exec(r))){let n=[...s[0]].length-1,l,a,c=n,o=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*t.length+n);(s=p.exec(e))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(a=[...l].length,s[3]||s[4]){c+=a;continue}else if((s[5]||s[6])&&n%3&&!((n+a)%3)){o+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+o);let h=[...s[0]][0].length,g=t.slice(0,n+s.index+h+a);if(Math.min(n,a)%2){let v=g.slice(1,-1);return{type:"em",raw:g,text:v,tokens:this.lexer.inlineTokens(v)}}let k=g.slice(2,-2);return{type:"strong",raw:g,text:k,tokens:this.lexer.inlineTokens(k)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return s&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,s;return e[2]==="@"?(r=e[1],s="mailto:"+r):(r=e[1],s=r),{type:"link",raw:e[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,s;if(e[2]==="@")r=e[0],s="mailto:"+r;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);r=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},ne=class Kt{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Se,this.options.tokenizer=this.options.tokenizer||new _t,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:q,block:gt.normal,inline:je.normal};this.options.pedantic?(r.block=gt.pedantic,r.inline=je.pedantic):this.options.gfm&&(r.block=gt.gfm,this.options.breaks?r.inline=je.breaks:r.inline=je.gfm),this.tokenizer.rules=r}static get rules(){return{block:gt,inline:je}}static lex(e,r){return new Kt(r).lex(e)}static lexInline(e,r){return new Kt(r).inlineTokens(e)}lex(e){e=e.replace(q.carriageReturn,`
|
|
28
|
+
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let s=this.inlineQueue[r];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],s=!1){for(this.options.pedantic&&(e=e.replace(q.tabCharGlobal," ").replace(q.spaceLine,""));e;){let n;if(this.options.extensions?.block?.some(a=>(n=a.call({lexer:this},e,r))?(e=e.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let a=r.at(-1);n.raw.length===1&&a!==void 0?a.raw+=`
|
|
29
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
30
|
+
`)?"":`
|
|
31
|
+
`)+n.raw,a.text+=`
|
|
32
|
+
`+n.text,this.inlineQueue.at(-1).src=a.text):r.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
33
|
+
`)?"":`
|
|
34
|
+
`)+n.raw,a.text+=`
|
|
35
|
+
`+n.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),r.push(n);continue}let l=e;if(this.options.extensions?.startBlock){let a=1/0,c=e.slice(1),o;this.options.extensions.startBlock.forEach(p=>{o=p.call({lexer:this},c),typeof o=="number"&&o>=0&&(a=Math.min(a,o))}),a<1/0&&a>=0&&(l=e.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let a=r.at(-1);s&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
36
|
+
`)?"":`
|
|
37
|
+
`)+n.raw,a.text+=`
|
|
38
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(n),s=l.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
39
|
+
`)?"":`
|
|
40
|
+
`)+n.raw,a.text+=`
|
|
41
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(n);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let s=e,n=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)o.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)l=n[2]?n[2].length:0,s=s.slice(0,n.index+l)+"["+"a".repeat(n[0].length-l-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let a=!1,c="";for(;e;){a||(c=""),a=!1;let o;if(this.options.extensions?.inline?.some(h=>(o=h.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let h=r.at(-1);o.type==="text"&&h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):r.push(o);continue}if(o=this.tokenizer.emStrong(e,s,c)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),r.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),r.push(o);continue}let p=e;if(this.options.extensions?.startInline){let h=1/0,g=e.slice(1),k;this.options.extensions.startInline.forEach(v=>{k=v.call({lexer:this},g),typeof k=="number"&&k>=0&&(h=Math.min(h,k))}),h<1/0&&h>=0&&(p=e.substring(0,h+1))}if(o=this.tokenizer.inlineText(p)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(c=o.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):r.push(o);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},Tt=class{options;parser;constructor(t){this.options=t||Se}space(t){return""}code({text:t,lang:e,escaped:r}){let s=(e||"").match(q.notSpaceStart)?.[0],n=t.replace(q.endingNewline,"")+`
|
|
42
|
+
`;return s?'<pre><code class="language-'+oe(s)+'">'+(r?n:oe(n,!0))+`</code></pre>
|
|
43
|
+
`:"<pre><code>"+(r?n:oe(n,!0))+`</code></pre>
|
|
44
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
45
|
+
${this.parser.parse(t)}</blockquote>
|
|
46
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
47
|
+
`}hr(t){return`<hr>
|
|
48
|
+
`}list(t){let e=t.ordered,r=t.start,s="";for(let a=0;a<t.items.length;a++){let c=t.items[a];s+=this.listitem(c)}let n=e?"ol":"ul",l=e&&r!==1?' start="'+r+'"':"";return"<"+n+l+`>
|
|
49
|
+
`+s+"</"+n+`>
|
|
50
|
+
`}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+oe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
|
|
51
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
52
|
+
`}table(t){let e="",r="";for(let n=0;n<t.header.length;n++)r+=this.tablecell(t.header[n]);e+=this.tablerow({text:r});let s="";for(let n=0;n<t.rows.length;n++){let l=t.rows[n];r="";for(let a=0;a<l.length;a++)r+=this.tablecell(l[a]);s+=this.tablerow({text:r})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
53
|
+
<thead>
|
|
54
|
+
`+e+`</thead>
|
|
55
|
+
`+s+`</table>
|
|
56
|
+
`}tablerow({text:t}){return`<tr>
|
|
57
|
+
${t}</tr>
|
|
58
|
+
`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
|
|
59
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${oe(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let s=this.parser.parseInline(r),n=jn(t);if(n===null)return s;t=n;let l='<a href="'+t+'"';return e&&(l+=' title="'+oe(e)+'"'),l+=">"+s+"</a>",l}image({href:t,title:e,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));let n=jn(t);if(n===null)return oe(r);t=n;let l=`<img src="${t}" alt="${r}"`;return e&&(l+=` title="${oe(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:oe(t.text)}},cn=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},re=class Qt{options;renderer;textRenderer;constructor(e){this.options=e||Se,this.options.renderer=this.options.renderer||new Tt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new cn}static parse(e,r){return new Qt(r).parse(e)}static parseInline(e,r){return new Qt(r).parseInline(e)}parse(e,r=!0){let s="";for(let n=0;n<e.length;n++){let l=e[n];if(this.options.extensions?.renderers?.[l.type]){let c=l,o=this.options.extensions.renderers[c.type].call({parser:this},c);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){s+=o||"";continue}}let a=l;switch(a.type){case"space":{s+=this.renderer.space(a);continue}case"hr":{s+=this.renderer.hr(a);continue}case"heading":{s+=this.renderer.heading(a);continue}case"code":{s+=this.renderer.code(a);continue}case"table":{s+=this.renderer.table(a);continue}case"blockquote":{s+=this.renderer.blockquote(a);continue}case"list":{s+=this.renderer.list(a);continue}case"html":{s+=this.renderer.html(a);continue}case"def":{s+=this.renderer.def(a);continue}case"paragraph":{s+=this.renderer.paragraph(a);continue}case"text":{let c=a,o=this.renderer.text(c);for(;n+1<e.length&&e[n+1].type==="text";)c=e[++n],o+=`
|
|
60
|
+
`+this.renderer.text(c);r?s+=this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):s+=o;continue}default:{let c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return s}parseInline(e,r=this.renderer){let s="";for(let n=0;n<e.length;n++){let l=e[n];if(this.options.extensions?.renderers?.[l.type]){let c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=c||"";continue}}let a=l;switch(a.type){case"escape":{s+=r.text(a);break}case"html":{s+=r.html(a);break}case"link":{s+=r.link(a);break}case"image":{s+=r.image(a);break}case"strong":{s+=r.strong(a);break}case"em":{s+=r.em(a);break}case"codespan":{s+=r.codespan(a);break}case"br":{s+=r.br(a);break}case"del":{s+=r.del(a);break}case"text":{s+=r.text(a);break}default:{let c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return s}},Je=class{options;block;constructor(t){this.options=t||Se}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ne.lex:ne.lexInline}provideParser(){return this.block?re.parse:re.parseInline}},pi=class{defaults=en();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=re;Renderer=Tt;TextRenderer=cn;Lexer=ne;Tokenizer=_t;Hooks=Je;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let s of t)switch(r=r.concat(e.call(this,s)),s.type){case"table":{let n=s;for(let l of n.header)r=r.concat(this.walkTokens(l.tokens,e));for(let l of n.rows)for(let a of l)r=r.concat(this.walkTokens(a.tokens,e));break}case"list":{let n=s;r=r.concat(this.walkTokens(n.items,e));break}default:{let n=s;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let a=n[l].flat(1/0);r=r.concat(this.walkTokens(a,e))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let l=e.renderers[n.name];l?e.renderers[n.name]=function(...a){let c=n.renderer.apply(this,a);return c===!1&&(c=l.apply(this,a)),c}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[n.level];l?l.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),r.renderer){let n=this.defaults.renderer||new Tt(this.defaults);for(let l in r.renderer){if(!(l in n))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let a=l,c=r.renderer[a],o=n[a];n[a]=(...p)=>{let h=c.apply(n,p);return h===!1&&(h=o.apply(n,p)),h||""}}s.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new _t(this.defaults);for(let l in r.tokenizer){if(!(l in n))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let a=l,c=r.tokenizer[a],o=n[a];n[a]=(...p)=>{let h=c.apply(n,p);return h===!1&&(h=o.apply(n,p)),h}}s.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new Je;for(let l in r.hooks){if(!(l in n))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let a=l,c=r.hooks[a],o=n[a];Je.passThroughHooks.has(l)?n[a]=p=>{if(this.defaults.async&&Je.passThroughHooksRespectAsync.has(l))return(async()=>{let g=await c.call(n,p);return o.call(n,g)})();let h=c.call(n,p);return o.call(n,h)}:n[a]=(...p)=>{if(this.defaults.async)return(async()=>{let g=await c.apply(n,p);return g===!1&&(g=await o.apply(n,p)),g})();let h=c.apply(n,p);return h===!1&&(h=o.apply(n,p)),h}}s.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,l=r.walkTokens;s.walkTokens=function(a){let c=[];return c.push(l.call(this,a)),n&&(c=c.concat(n.call(this,a))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return ne.lex(t,e??this.defaults)}parser(t,e){return re.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let s={...r},n={...this.defaults,...s},l=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(e):e,c=await(n.hooks?await n.hooks.provideLexer():t?ne.lex:ne.lexInline)(a,n),o=n.hooks?await n.hooks.processAllTokens(c):c;n.walkTokens&&await Promise.all(this.walkTokens(o,n.walkTokens));let p=await(n.hooks?await n.hooks.provideParser():t?re.parse:re.parseInline)(o,n);return n.hooks?await n.hooks.postprocess(p):p})().catch(l);try{n.hooks&&(e=n.hooks.preprocess(e));let a=(n.hooks?n.hooks.provideLexer():t?ne.lex:ne.lexInline)(e,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let c=(n.hooks?n.hooks.provideParser():t?re.parse:re.parseInline)(a,n);return n.hooks&&(c=n.hooks.postprocess(c)),c}catch(a){return l(a)}}}onError(t,e){return r=>{if(r.message+=`
|
|
61
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+oe(r.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(r);throw r}}},Ee=new pi;function y(t,e){return Ee.parse(t,e)}y.options=y.setOptions=function(t){return Ee.setOptions(t),y.defaults=Ee.defaults,lr(y.defaults),y};y.getDefaults=en;y.defaults=Se;y.use=function(...t){return Ee.use(...t),y.defaults=Ee.defaults,lr(y.defaults),y};y.walkTokens=function(t,e){return Ee.walkTokens(t,e)};y.parseInline=Ee.parseInline;y.Parser=re;y.parser=re.parse;y.Renderer=Tt;y.TextRenderer=cn;y.Lexer=ne;y.lexer=ne.lex;y.Tokenizer=_t;y.Hooks=Je;y.parse=y;y.options;y.setOptions;y.use;y.walkTokens;y.parseInline;re.parse;ne.lex;var hi=ye('<link rel="preconnect" href="https://fonts.googleapis.com" class="svelte-ohdcd4"/> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous" class="svelte-ohdcd4"/> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" class="svelte-ohdcd4"/>',1),fi=ye('<div class="empty-state svelte-ohdcd4"><div class="empty-icon svelte-ohdcd4"><svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-ohdcd4"><path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313-12.454z" class="svelte-ohdcd4"></path><path d="M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2" class="svelte-ohdcd4"></path><path d="M19 11h2m-1 -1v2" class="svelte-ohdcd4"></path></svg></div> <h2 class="empty-title svelte-ohdcd4">Kyoflow Chat</h2> <p class="empty-subtitle svelte-ohdcd4">무엇이든 물어보세요</p></div>'),di=Qn('<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-ohdcd4"><path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313-12.454z" class="svelte-ohdcd4"></path><path d="M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2" class="svelte-ohdcd4"></path></svg>'),gi=Qn('<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-ohdcd4"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" class="svelte-ohdcd4"></path><circle cx="12" cy="7" r="4" class="svelte-ohdcd4"></circle></svg>'),mi=ye('<div class="markdown-body svelte-ohdcd4"><!></div>'),ki=ye('<div class="typing-indicator svelte-ohdcd4"><span class="dot svelte-ohdcd4"></span> <span class="dot svelte-ohdcd4"></span> <span class="dot svelte-ohdcd4"></span></div>'),bi=ye('<div class="plain-text svelte-ohdcd4"> </div>'),xi=ye('<div><div class="message-inner svelte-ohdcd4"><div><!></div> <div class="message-content svelte-ohdcd4"><span class="message-role svelte-ohdcd4"> </span> <!></div></div></div>'),_i=ye('<div class="chat-app svelte-ohdcd4"><main class="messages-viewport svelte-ohdcd4"><!> <div class="messages-list svelte-ohdcd4"></div></main> <footer class="input-area svelte-ohdcd4"><div class="input-container svelte-ohdcd4"><div class="input-wrapper svelte-ohdcd4"><textarea placeholder="메시지를 입력하세요..." rows="1" class="svelte-ohdcd4"></textarea> <button class="send-btn svelte-ohdcd4" aria-label="전송"><svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" class="svelte-ohdcd4"><path d="M3.478 2.405a.75.75 0 0 0-.926.94l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.405Z" class="svelte-ohdcd4"></path></svg></button></div> <p class="disclaimer svelte-ohdcd4">Kyoflow는 실수를 할 수 있습니다. 중요한 정보는 직접 확인해 주세요.</p></div></footer></div>');function Ri(t,e){Zr(e,!0);const r="http://localhost:8000/llm/stream";let s=Fe(""),n=Fe(Xr([])),l=Fe(!1),a=Fe(void 0),c=Fe(void 0);function o(b){return Rs.sanitize(y.parse(b,{breaks:!0}))}async function p(){await Vr(),_(a)&&_(a).scrollTo({top:_(a).scrollHeight,behavior:"smooth"})}function h(){_(c)&&(_(c).style.height="auto",_(c).style.height=Math.min(_(c).scrollHeight,200)+"px")}async function g(){const b=_(s).trim();if(!b||_(l))return;const R=_(n).map(B=>({role:B.role,content:B.content}));fe(n,[..._(n),{role:"user",content:b},{role:"assistant",content:""}],!0),fe(s,""),fe(l,!0),_(c)&&(_(c).style.height="auto"),await p();try{const B=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:b,history:R})});if(!B.ok)throw new Error(`HTTP ${B.status}`);if(!B.body)throw new Error("No response stream");const S=B.body.getReader(),de=new TextDecoder;for(;;){const{value:se,done:xe}=await S.read();if(xe)break;const Pe=de.decode(se,{stream:!0}),_e=_(n).at(-1);_e&&_e.role==="assistant"&&(_e.content+=Pe,fe(n,[..._(n)],!0)),p()}}catch(B){const S=_(n).at(-1);S&&S.role==="assistant"&&(S.content=`오류가 발생했습니다: ${B instanceof Error?B.message:"unknown error"}`,fe(n,[..._(n)],!0))}finally{fe(l,!1),p()}}function k(b){b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),g())}function v(){h()}var f=_i();Jr("ohdcd4",b=>{var R=hi();On(4),ee(b,R)});var E=Q(f),O=Q(E);{var F=b=>{var R=fi();ee(b,R)};Be(O,b=>{_(n).length===0&&b(F)})}var P=He(O,2);rs(P,21,()=>_(n),ts,(b,R,B)=>{var S=xi(),de=Q(S),se=Q(de),xe=Q(se);{var Pe=w=>{var j=di();ee(w,j)},_e=w=>{var j=gi();ee(w,j)};Be(xe,w=>{_(R).role==="assistant"?w(Pe):w(_e,!1)})}K(se);var nt=He(se,2),Re=Q(nt),At=Q(Re,!0);K(Re);var rt=He(Re,2);{var D=w=>{var j=Rn(),I=Dn(j);{var Te=V=>{var ce=mi(),we=Q(ce);as(we,()=>o(_(R).content)),K(ce),ee(V,ce)},ze=V=>{var ce=Rn(),we=Dn(ce);{var it=Ie=>{var ge=ki();ee(Ie,ge)};Be(we,Ie=>{_(l)&&B===_(n).length-1&&Ie(it)},!0)}ee(V,ce)};Be(I,V=>{_(R).content?V(Te):V(ze,!1)})}ee(w,j)},st=w=>{var j=bi(),I=Q(j,!0);K(j),kt(()=>Nn(I,_(R).content)),ee(w,j)};Be(rt,w=>{_(R).role==="assistant"?w(D):w(st,!1)})}K(nt),K(de),K(S),kt(()=>{Mn(S,1,`message-row ${_(R).role??""}`,"svelte-ohdcd4"),Mn(se,1,`avatar ${_(R).role??""}`,"svelte-ohdcd4"),Nn(At,_(R).role==="assistant"?"Kyoflow":"나")}),ee(b,S)}),K(P),K(E),Pn(E,b=>fe(a,b),()=>_(a));var $=He(E,2),A=Q($),z=Q(A),L=Q(z);Kr(L),L.__input=v,L.__keydown=k,Pn(L,b=>fe(c,b),()=>_(c));var H=He(L,2);H.__click=g,K(z),On(2),K(A),K($),K(f),kt(b=>{L.disabled=_(l),H.disabled=b},[()=>_(l)||!_(s).trim()]),es(L,()=>_(s),b=>fe(s,b)),ee(t,f),jr()}Qr(["input","keydown","click"]);export{Ri as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as n}from"../chunks/PPVm8Dsz.js";import{a as h,f as I}from"../chunks/D8fmz15L.js";import{o as S}from"../chunks/DDNuMsfB.js";import{p as P,a as y,Q as U,c as A,$ as E,m as e,a0 as o,r as $,a1 as p,a2 as c}from"../chunks/DtmuEK64.js";import{h as D}from"../chunks/BJ-VzAMM.js";import{b as K}from"../chunks/b2dyOoG8.js";import{p as L}from"../chunks/z6vZsXi_.js";var O=I('<div class="swagger-container svelte-ngaoqu"><div id="swagger-ui-container"></div></div>');function T(l,u){P(u,!0);let i=p(void 0),t=p(void 0),d=c(()=>L.url.origin),m=c(()=>e(t)?{...e(t),servers:[{url:e(d),description:"Production server"}]}:null);async function g(){if(e(i))try{try{const a=await n(()=>import("../chunks/C_EPgsy6.js"),[],import.meta.url);o(t,a?.default??a,!0)}catch{try{const a=await fetch("/openapi-spec.json");a.ok?o(t,await a.json(),!0):o(t,{openapi:"3.0.0",info:{title:"Kyoflow API",version:"0.0.1"},paths:{}},!0)}catch{o(t,{openapi:"3.0.0",info:{title:"Kyoflow API",version:"0.0.1"},paths:{}},!0)}}const{SwaggerUIBundle:r,SwaggerUIStandalonePreset:v}=await n(async()=>{const{SwaggerUIBundle:a,SwaggerUIStandalonePreset:_}=await import("../chunks/EmrU7Abi.js").then(w=>w.i);return{SwaggerUIBundle:a,SwaggerUIStandalonePreset:_}},[],import.meta.url);r({spec:e(m)??e(t),domNode:e(i),deepLinking:!0,presets:[r.presets.apis,v]})}catch(r){console.error("Failed to initialize Swagger UI:",r)}}S(()=>{g()});var s=O();D("ngaoqu",r=>{U(()=>{E.title="API Documentation - Kyoflow"})});var f=A(s);K(f,r=>o(i,r),()=>e(i)),$(s),h(l,s),y()}export{T as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"1772089139616"}
|
|
Binary file
|
|
Binary file
|
package/dist/web/env.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import process from 'node:process';
|
|
2
|
+
|
|
3
|
+
/* global "" */
|
|
4
|
+
|
|
5
|
+
const expected = new Set([
|
|
6
|
+
'SOCKET_PATH',
|
|
7
|
+
'HOST',
|
|
8
|
+
'PORT',
|
|
9
|
+
'ORIGIN',
|
|
10
|
+
'XFF_DEPTH',
|
|
11
|
+
'ADDRESS_HEADER',
|
|
12
|
+
'PROTOCOL_HEADER',
|
|
13
|
+
'HOST_HEADER',
|
|
14
|
+
'PORT_HEADER',
|
|
15
|
+
'BODY_SIZE_LIMIT',
|
|
16
|
+
'SHUTDOWN_TIMEOUT',
|
|
17
|
+
'IDLE_TIMEOUT',
|
|
18
|
+
'KEEP_ALIVE_TIMEOUT',
|
|
19
|
+
'HEADERS_TIMEOUT'
|
|
20
|
+
]);
|
|
21
|
+
|
|
22
|
+
const expected_unprefixed = new Set(['LISTEN_PID', 'LISTEN_FDS']);
|
|
23
|
+
|
|
24
|
+
if ("") {
|
|
25
|
+
for (const name in process.env) {
|
|
26
|
+
if (name.startsWith("")) {
|
|
27
|
+
const unprefixed = name.slice("".length);
|
|
28
|
+
if (!expected.has(unprefixed)) {
|
|
29
|
+
throw new Error(
|
|
30
|
+
`You should change envPrefix (${""}) to avoid conflicts with existing environment variables — unexpectedly saw ${name}`
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @param {string} name
|
|
39
|
+
* @param {any} fallback
|
|
40
|
+
*/
|
|
41
|
+
function env(name, fallback) {
|
|
42
|
+
const prefix = expected_unprefixed.has(name) ? '' : "";
|
|
43
|
+
const prefixed = prefix + name;
|
|
44
|
+
return prefixed in process.env ? process.env[prefixed] : fallback;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const integer_regexp = /^\d+$/;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Throw a consistently-structured parsing error for environment variables.
|
|
51
|
+
* @param {string} name
|
|
52
|
+
* @param {any} value
|
|
53
|
+
* @param {string} description
|
|
54
|
+
* @returns {never}
|
|
55
|
+
*/
|
|
56
|
+
function parsing_error(name, value, description) {
|
|
57
|
+
throw new Error(
|
|
58
|
+
`Invalid value for environment variable ${name}: ${JSON.stringify(value)} (${description})`
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check the environment for a timeout value (non-negative integer) in seconds.
|
|
64
|
+
* @param {string} name
|
|
65
|
+
* @param {number} [fallback]
|
|
66
|
+
* @returns {number | undefined}
|
|
67
|
+
*/
|
|
68
|
+
function timeout_env(name, fallback) {
|
|
69
|
+
const raw = env(name, fallback);
|
|
70
|
+
if (!raw) {
|
|
71
|
+
return fallback;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (!integer_regexp.test(raw)) {
|
|
75
|
+
parsing_error(name, raw, 'should be a non-negative integer');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const parsed = Number.parseInt(raw, 10);
|
|
79
|
+
|
|
80
|
+
// We don't technically need to check `Number.isNaN` because the value already passed the regexp test.
|
|
81
|
+
// However, just in case there's some new codepath introduced somewhere down the line, it's probably good
|
|
82
|
+
// to stick this in here.
|
|
83
|
+
if (Number.isNaN(parsed)) {
|
|
84
|
+
parsing_error(name, raw, 'should be a non-negative integer');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (parsed < 0) {
|
|
88
|
+
parsing_error(name, raw, 'should be a non-negative integer');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return parsed;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { env, timeout_env };
|