@logan-jun/cd1-rag-chat 0.5.7 → 0.5.8
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/dist/assets/{arc-EBYBLgkV.js → arc-Bx5cdrMs.js} +1 -1
- package/dist/assets/{architectureDiagram-3BPJPVTR-Bt_aciP6.js → architectureDiagram-3BPJPVTR-C_MIcWV0.js} +1 -1
- package/dist/assets/{blockDiagram-GPEHLZMM-CdMoqdMu.js → blockDiagram-GPEHLZMM-BhQ0vTPT.js} +1 -1
- package/dist/assets/{c4Diagram-AAUBKEIU-CjsUBpdn.js → c4Diagram-AAUBKEIU-BPQvQuW5.js} +1 -1
- package/dist/assets/channel-CYG9pi3E.js +1 -0
- package/dist/assets/{chunk-2J33WTMH-C-R6BrL7.js → chunk-2J33WTMH-CZB8lj2w.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-BQYaZzOk.js → chunk-4BX2VUAB-0jQpH6NL.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DL-UTVBQ.js → chunk-55IACEB6-B8gWcQ4l.js} +1 -1
- package/dist/assets/{chunk-727SXJPM-C_a0ukkz.js → chunk-727SXJPM-CT0Vso36.js} +1 -1
- package/dist/assets/{chunk-AQP2D5EJ-DqH6ynrJ.js → chunk-AQP2D5EJ-D2NmYhcx.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DJEmr8Lq.js → chunk-FMBD7UC4-B_B1Wb1T.js} +1 -1
- package/dist/assets/{chunk-ND2GUHAM-F__ZXA5p.js → chunk-ND2GUHAM-ByS8N5Mv.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-7radV-Ho.js → chunk-QZHKN3VN-8iwqRDtj.js} +1 -1
- package/dist/assets/classDiagram-4FO5ZUOK-BTC9tmEK.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-BTC9tmEK.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DKhBN3ui.js → cose-bilkent-S5V4N54A-BYQ_pM1K.js} +1 -1
- package/dist/assets/{dagre-BM42HDAG-B3Zff0af.js → dagre-BM42HDAG-BakB12m4.js} +1 -1
- package/dist/assets/{diagram-2AECGRRQ-BgHOTN1m.js → diagram-2AECGRRQ-CEY-LgRo.js} +1 -1
- package/dist/assets/{diagram-5GNKFQAL-DWTw9ZXq.js → diagram-5GNKFQAL-Cr_jd-iK.js} +1 -1
- package/dist/assets/{diagram-KO2AKTUF-CbSrQwtf.js → diagram-KO2AKTUF-CJBhKSAM.js} +1 -1
- package/dist/assets/{diagram-LMA3HP47-BkNhIGY9.js → diagram-LMA3HP47-DwbFCpTx.js} +1 -1
- package/dist/assets/{diagram-OG6HWLK6-ByB23eN7.js → diagram-OG6HWLK6-DZpRWaDz.js} +1 -1
- package/dist/assets/{erDiagram-TEJ5UH35-CQqblANd.js → erDiagram-TEJ5UH35-BCwL7izU.js} +1 -1
- package/dist/assets/{flowDiagram-I6XJVG4X-Bbbd0NpK.js → flowDiagram-I6XJVG4X-DkJQUZug.js} +1 -1
- package/dist/assets/{ganttDiagram-6RSMTGT7-Dkz3iDju.js → ganttDiagram-6RSMTGT7-BkX_39FG.js} +1 -1
- package/dist/assets/{gitGraphDiagram-PVQCEYII-C7UAO-16.js → gitGraphDiagram-PVQCEYII-BhoLO1cM.js} +1 -1
- package/dist/assets/{index-BsF6ULCZ.js → index-BPhAybEr.js} +2 -2
- package/dist/assets/{infoDiagram-5YYISTIA-ChOyV6ja.js → infoDiagram-5YYISTIA-CNN3SZHO.js} +1 -1
- package/dist/assets/{ishikawaDiagram-YF4QCWOH-BOKb6v_h.js → ishikawaDiagram-YF4QCWOH-DCwPbnec.js} +1 -1
- package/dist/assets/{journeyDiagram-JHISSGLW-7b2c0jD5.js → journeyDiagram-JHISSGLW-D_bc-Ui0.js} +1 -1
- package/dist/assets/{kanban-definition-UN3LZRKU-bFSQdGFh.js → kanban-definition-UN3LZRKU-BYNis2H_.js} +1 -1
- package/dist/assets/{linear-CBA_jCTw.js → linear-C0Gv_Ndt.js} +1 -1
- package/dist/assets/{mermaid.core-BygniTH5.js → mermaid.core-DMuT20ap.js} +4 -4
- package/dist/assets/{mindmap-definition-RKZ34NQL-DVKet-tI.js → mindmap-definition-RKZ34NQL-C16RlcPz.js} +1 -1
- package/dist/assets/{pieDiagram-4H26LBE5-C290Ffgw.js → pieDiagram-4H26LBE5-Din2AYEf.js} +1 -1
- package/dist/assets/{quadrantDiagram-W4KKPZXB-Bd-PzkkO.js → quadrantDiagram-W4KKPZXB-BM4DmnfJ.js} +1 -1
- package/dist/assets/{requirementDiagram-4Y6WPE33-BuJKSkBV.js → requirementDiagram-4Y6WPE33-CcPZye_Q.js} +1 -1
- package/dist/assets/{sankeyDiagram-5OEKKPKP-3HiTvsLA.js → sankeyDiagram-5OEKKPKP-Wt4wwMEP.js} +1 -1
- package/dist/assets/{sequenceDiagram-3UESZ5HK-DKdpXbaH.js → sequenceDiagram-3UESZ5HK-BKObUu5c.js} +1 -1
- package/dist/assets/{stateDiagram-AJRCARHV-B35Sjnic.js → stateDiagram-AJRCARHV-BrFFnVCY.js} +1 -1
- package/dist/assets/stateDiagram-v2-BHNVJYJU-CiAE9u0c.js +1 -0
- package/dist/assets/{timeline-definition-PNZ67QCA-BbBU5TlY.js → timeline-definition-PNZ67QCA-DFzOTewI.js} +1 -1
- package/dist/assets/{vennDiagram-CIIHVFJN-eQV2sU4V.js → vennDiagram-CIIHVFJN-CxeE7CpJ.js} +1 -1
- package/dist/assets/{wardley-L42UT6IY-RiH7LldW.js → wardley-L42UT6IY-BrvnVw8d.js} +1 -1
- package/dist/assets/{wardleyDiagram-YWT4CUSO-B6puTDqk.js → wardleyDiagram-YWT4CUSO-CzdN-OjS.js} +1 -1
- package/dist/assets/{xychartDiagram-2RQKCTM6-JTw3npns.js → xychartDiagram-2RQKCTM6-D6H-1b4L.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/channel-DLi-8sgP.js +0 -1
- package/dist/assets/classDiagram-4FO5ZUOK-BYF6Qkz6.js +0 -1
- package/dist/assets/classDiagram-v2-Q7XG4LA2-BYF6Qkz6.js +0 -1
- package/dist/assets/stateDiagram-v2-BHNVJYJU-B7tF3JGY.js +0 -1
|
@@ -60,7 +60,7 @@ ${t}</tr>
|
|
|
60
60
|
Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+be(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}}const yt=new fp;function W(e,t){return yt.parse(e,t)}W.options=W.setOptions=function(e){return yt.setOptions(e),W.defaults=yt.defaults,$a(W.defaults),W};W.getDefaults=Ri;W.defaults=kt;W.use=function(...e){return yt.use(...e),W.defaults=yt.defaults,$a(W.defaults),W};W.walkTokens=function(e,t){return yt.walkTokens(e,t)};W.parseInline=yt.parseInline;W.Parser=Ee;W.parser=Ee.parse;W.Renderer=ir;W.TextRenderer=Ni;W.Lexer=Ae;W.lexer=Ae.lex;W.Tokenizer=nr;W.Hooks=sn;W.parse=W;W.options;W.setOptions;W.use;W.walkTokens;W.parseInline;Ee.parse;Ae.lex;/*! @license DOMPurify 3.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.5/LICENSE */function co(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pp(e){if(Array.isArray(e))return e}function dp(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(f){u=!0,i=f}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function hp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
61
61
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mp(e,t){return pp(e)||dp(e,t)||gp(e,t)||hp()}function gp(e,t){if(e){if(typeof e=="string")return co(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?co(e,t):void 0}}const Fa=Object.entries,uo=Object.setPrototypeOf,vp=Object.isFrozen,_p=Object.getPrototypeOf,yp=Object.getOwnPropertyDescriptor;let me=Object.freeze,Re=Object.seal,It=Object.create,Ha=typeof Reflect!="undefined"&&Reflect,li=Ha.apply,ci=Ha.construct;me||(me=function(t){return t});Re||(Re=function(t){return t});li||(li=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];return t.apply(n,i)});ci||(ci=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new t(...r)});const At=oe(Array.prototype.forEach),bp=oe(Array.prototype.lastIndexOf),fo=oe(Array.prototype.pop),Et=oe(Array.prototype.push),wp=oe(Array.prototype.splice),pe=Array.isArray,tn=oe(String.prototype.toLowerCase),Ir=oe(String.prototype.toString),po=oe(String.prototype.match),Ot=oe(String.prototype.replace),ho=oe(String.prototype.indexOf),kp=oe(String.prototype.trim),xp=oe(Number.prototype.toString),Tp=oe(Boolean.prototype.toString),mo=typeof BigInt=="undefined"?null:oe(BigInt.prototype.toString),go=typeof Symbol=="undefined"?null:oe(Symbol.prototype.toString),te=oe(Object.prototype.hasOwnProperty),Jt=oe(Object.prototype.toString),ue=oe(RegExp.prototype.test),Mn=Cp(TypeError);function oe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return li(e,t,r)}}function Cp(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ci(e,n)}}function L(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tn;if(uo&&uo(e,null),!pe(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=n(i);s!==i&&(vp(t)||(t[r]=s),i=s)}e[i]=!0}return e}function Sp(e){for(let t=0;t<e.length;t++)te(e,t)||(e[t]=null);return e}function ve(e){const t=It(null);for(const r of Fa(e)){var n=mp(r,2);const i=n[0],s=n[1];te(e,i)&&(pe(s)?t[i]=Sp(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=ve(s):t[i]=s)}return t}function Ap(e){switch(typeof e){case"string":return e;case"number":return xp(e);case"boolean":return Tp(e);case"bigint":return mo?mo(e):"0";case"symbol":return go?go(e):"Symbol()";case"undefined":return Jt(e);case"function":case"object":{if(e===null)return Jt(e);const t=e,n=ft(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Jt(r)}return Jt(e)}default:return Jt(e)}}function ft(e,t){for(;e!==null;){const r=yp(e,t);if(r){if(r.get)return oe(r.get);if(typeof r.value=="function")return oe(r.value)}e=_p(e)}function n(){return null}return n}function Ep(e){try{return ue(e,""),!0}catch{return!1}}const vo=me(["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"]),Dr=me(["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"]),Lr=me(["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"]),Op=me(["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"]),Pr=me(["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"]),$p=me(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_o=me(["#text"]),yo=me(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),Mr=me(["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"]),bo=me(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),Nn=me(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Rp=Re(/{{[\w\W]*|^[\w\W]*}}/g),Ip=Re(/<%[\w\W]*|^[\w\W]*%>/g),Dp=Re(/\${[\w\W]*/g),Lp=Re(/^data-[\-\w.\u00B7-\uFFFF]+$/),Pp=Re(/^aria-[\-\w]+$/),wo=Re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Mp=Re(/^(?:\w+script|data):/i),Np=Re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zp=Re(/^html$/i),Bp=Re(/^[a-z][.\w]*(-[.\w]+)+$/i),$t={element:1,text:3,progressingInstruction:7,comment:8,document:9},Fp=function(){return typeof window=="undefined"?null:window},Hp=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},ko=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ua(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fp();const t=E=>Ua(E);if(t.version="3.4.5",t.removed=[],!e||!e.document||e.document.nodeType!==$t.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,i=r.currentScript,s=e.DocumentFragment,o=e.HTMLTemplateElement,a=e.Node,l=e.Element,u=e.NodeFilter,f=e.NamedNodeMap,g=f===void 0?e.NamedNodeMap||e.MozNamedAttrMap:f,y=e.HTMLFormElement,_=e.DOMParser,w=e.trustedTypes,O=l.prototype,A=ft(O,"cloneNode"),B=ft(O,"remove"),I=ft(O,"nextSibling"),P=ft(O,"childNodes"),D=ft(O,"parentNode"),K=a&&a.prototype?ft(a.prototype,"nodeType"):null;if(typeof o=="function"){const E=n.createElement("template");E.content&&E.content.ownerDocument&&(n=E.content.ownerDocument)}let N,j="";const re=n,ce=re.implementation,Ue=re.createNodeIterator,Me=re.createDocumentFragment,d=re.getElementsByTagName,p=r.importNode;let m=ko();t.isSupported=typeof Fa=="function"&&typeof D=="function"&&ce&&ce.createHTMLDocument!==void 0;const T=Rp,b=Ip,k=Dp,S=Lp,C=Pp,R=Mp,F=Np,H=Bp;let ee=wo,U=null;const Ne=L({},[...vo,...Dr,...Lr,...Pr,..._o]);let J=null;const ze=L({},[...yo,...Mr,...bo,...Nn]);let G=Object.seal(It(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}})),je=null,bn=null;const Je=Object.seal(It(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Bi=!0,ur=!0,Fi=!1,Hi=!0,Qe=!1,jt=!0,lt=!1,fr=!1,pr=!1,xt=!1,wn=!1,kn=!1,Ui=!0,ji=!1;const Wi="user-content-";let dr=!0,Wt=!1,Tt={},Be=null;const hr=L({},["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 Gi=null;const qi=L({},["audio","video","img","source","image","track"]);let mr=null;const Zi=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xn="http://www.w3.org/1998/Math/MathML",Tn="http://www.w3.org/2000/svg",Fe="http://www.w3.org/1999/xhtml";let Ct=Fe,gr=!1,vr=null;const Ka=L({},[xn,Tn,Fe],Ir);let _r=L({},["mi","mo","mn","ms","mtext"]),yr=L({},["annotation-xml"]);const Ja=L({},["title","style","font","a","script"]);let Gt=null;const Qa=["application/xhtml+xml","text/html"],Va="text/html";let ae=null,St=null;const el=n.createElement("form"),Yi=function(c){return c instanceof RegExp||c instanceof Function},br=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(St&&St===c)return;(!c||typeof c!="object")&&(c={}),c=ve(c),Gt=Qa.indexOf(c.PARSER_MEDIA_TYPE)===-1?Va:c.PARSER_MEDIA_TYPE,ae=Gt==="application/xhtml+xml"?Ir:tn,U=te(c,"ALLOWED_TAGS")&&pe(c.ALLOWED_TAGS)?L({},c.ALLOWED_TAGS,ae):Ne,J=te(c,"ALLOWED_ATTR")&&pe(c.ALLOWED_ATTR)?L({},c.ALLOWED_ATTR,ae):ze,vr=te(c,"ALLOWED_NAMESPACES")&&pe(c.ALLOWED_NAMESPACES)?L({},c.ALLOWED_NAMESPACES,Ir):Ka,mr=te(c,"ADD_URI_SAFE_ATTR")&&pe(c.ADD_URI_SAFE_ATTR)?L(ve(Zi),c.ADD_URI_SAFE_ATTR,ae):Zi,Gi=te(c,"ADD_DATA_URI_TAGS")&&pe(c.ADD_DATA_URI_TAGS)?L(ve(qi),c.ADD_DATA_URI_TAGS,ae):qi,Be=te(c,"FORBID_CONTENTS")&&pe(c.FORBID_CONTENTS)?L({},c.FORBID_CONTENTS,ae):hr,je=te(c,"FORBID_TAGS")&&pe(c.FORBID_TAGS)?L({},c.FORBID_TAGS,ae):ve({}),bn=te(c,"FORBID_ATTR")&&pe(c.FORBID_ATTR)?L({},c.FORBID_ATTR,ae):ve({}),Tt=te(c,"USE_PROFILES")?c.USE_PROFILES&&typeof c.USE_PROFILES=="object"?ve(c.USE_PROFILES):c.USE_PROFILES:!1,Bi=c.ALLOW_ARIA_ATTR!==!1,ur=c.ALLOW_DATA_ATTR!==!1,Fi=c.ALLOW_UNKNOWN_PROTOCOLS||!1,Hi=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qe=c.SAFE_FOR_TEMPLATES||!1,jt=c.SAFE_FOR_XML!==!1,lt=c.WHOLE_DOCUMENT||!1,xt=c.RETURN_DOM||!1,wn=c.RETURN_DOM_FRAGMENT||!1,kn=c.RETURN_TRUSTED_TYPE||!1,pr=c.FORCE_BODY||!1,Ui=c.SANITIZE_DOM!==!1,ji=c.SANITIZE_NAMED_PROPS||!1,dr=c.KEEP_CONTENT!==!1,Wt=c.IN_PLACE||!1,ee=Ep(c.ALLOWED_URI_REGEXP)?c.ALLOWED_URI_REGEXP:wo,Ct=typeof c.NAMESPACE=="string"?c.NAMESPACE:Fe,_r=te(c,"MATHML_TEXT_INTEGRATION_POINTS")&&c.MATHML_TEXT_INTEGRATION_POINTS&&typeof c.MATHML_TEXT_INTEGRATION_POINTS=="object"?ve(c.MATHML_TEXT_INTEGRATION_POINTS):L({},["mi","mo","mn","ms","mtext"]),yr=te(c,"HTML_INTEGRATION_POINTS")&&c.HTML_INTEGRATION_POINTS&&typeof c.HTML_INTEGRATION_POINTS=="object"?ve(c.HTML_INTEGRATION_POINTS):L({},["annotation-xml"]);const v=te(c,"CUSTOM_ELEMENT_HANDLING")&&c.CUSTOM_ELEMENT_HANDLING&&typeof c.CUSTOM_ELEMENT_HANDLING=="object"?ve(c.CUSTOM_ELEMENT_HANDLING):It(null);if(G=It(null),te(v,"tagNameCheck")&&Yi(v.tagNameCheck)&&(G.tagNameCheck=v.tagNameCheck),te(v,"attributeNameCheck")&&Yi(v.attributeNameCheck)&&(G.attributeNameCheck=v.attributeNameCheck),te(v,"allowCustomizedBuiltInElements")&&typeof v.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=v.allowCustomizedBuiltInElements),Qe&&(ur=!1),wn&&(xt=!0),Tt&&(U=L({},_o),J=It(null),Tt.html===!0&&(L(U,vo),L(J,yo)),Tt.svg===!0&&(L(U,Dr),L(J,Mr),L(J,Nn)),Tt.svgFilters===!0&&(L(U,Lr),L(J,Mr),L(J,Nn)),Tt.mathMl===!0&&(L(U,Pr),L(J,bo),L(J,Nn))),Je.tagCheck=null,Je.attributeCheck=null,te(c,"ADD_TAGS")&&(typeof c.ADD_TAGS=="function"?Je.tagCheck=c.ADD_TAGS:pe(c.ADD_TAGS)&&(U===Ne&&(U=ve(U)),L(U,c.ADD_TAGS,ae))),te(c,"ADD_ATTR")&&(typeof c.ADD_ATTR=="function"?Je.attributeCheck=c.ADD_ATTR:pe(c.ADD_ATTR)&&(J===ze&&(J=ve(J)),L(J,c.ADD_ATTR,ae))),te(c,"ADD_URI_SAFE_ATTR")&&pe(c.ADD_URI_SAFE_ATTR)&&L(mr,c.ADD_URI_SAFE_ATTR,ae),te(c,"FORBID_CONTENTS")&&pe(c.FORBID_CONTENTS)&&(Be===hr&&(Be=ve(Be)),L(Be,c.FORBID_CONTENTS,ae)),te(c,"ADD_FORBID_CONTENTS")&&pe(c.ADD_FORBID_CONTENTS)&&(Be===hr&&(Be=ve(Be)),L(Be,c.ADD_FORBID_CONTENTS,ae)),dr&&(U["#text"]=!0),lt&&L(U,["html","head","body"]),U.table&&(L(U,["tbody"]),delete je.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw Mn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Mn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=c.TRUSTED_TYPES_POLICY,j=N.createHTML("")}else N===void 0&&(N=Hp(w,i)),N!==null&&typeof j=="string"&&(j=N.createHTML(""));me&&me(c),St=c},Xi=L({},[...Dr,...Lr,...Op]),Ki=L({},[...Pr,...$p]),tl=function(c){let v=D(c);(!v||!v.tagName)&&(v={namespaceURI:Ct,tagName:"template"});const x=tn(c.tagName),z=tn(v.tagName);return vr[c.namespaceURI]?c.namespaceURI===Tn?v.namespaceURI===Fe?x==="svg":v.namespaceURI===xn?x==="svg"&&(z==="annotation-xml"||_r[z]):!!Xi[x]:c.namespaceURI===xn?v.namespaceURI===Fe?x==="math":v.namespaceURI===Tn?x==="math"&&yr[z]:!!Ki[x]:c.namespaceURI===Fe?v.namespaceURI===Tn&&!yr[z]||v.namespaceURI===xn&&!_r[z]?!1:!Ki[x]&&(Ja[x]||!Xi[x]):!!(Gt==="application/xhtml+xml"&&vr[c.namespaceURI]):!1},Ie=function(c){Et(t.removed,{element:c});try{D(c).removeChild(c)}catch{B(c)}},ct=function(c,v){try{Et(t.removed,{attribute:v.getAttributeNode(c),from:v})}catch{Et(t.removed,{attribute:null,from:v})}if(v.removeAttribute(c),c==="is")if(xt||wn)try{Ie(v)}catch{}else try{v.setAttribute(c,"")}catch{}},Ji=function(c){let v=null,x=null;if(pr)c="<remove></remove>"+c;else{const se=po(c,/^[\r\n\t ]+/);x=se&&se[0]}Gt==="application/xhtml+xml"&&Ct===Fe&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");const z=N?N.createHTML(c):c;if(Ct===Fe)try{v=new _().parseFromString(z,Gt)}catch{}if(!v||!v.documentElement){v=ce.createDocument(Ct,"template",null);try{v.documentElement.innerHTML=gr?j:z}catch{}}const ie=v.body||v.documentElement;return c&&x&&ie.insertBefore(n.createTextNode(x),ie.childNodes[0]||null),Ct===Fe?d.call(v,lt?"html":"body")[0]:lt?v.documentElement:ie},Qi=function(c){return Ue.call(c.ownerDocument||c,c,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Vi=function(c){c.normalize();const v=Ue.call(c.ownerDocument||c,c,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let x=v.nextNode();for(;x;){let z=x.data;At([T,b,k],ie=>{z=Ot(z,ie," ")}),x.data=z,x=v.nextNode()}},wr=function(c){return c instanceof y&&(typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||!(c.attributes instanceof g)||typeof c.removeAttribute!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function")},Cn=function(c){if(!K||typeof c!="object"||c===null)return!1;try{return typeof K(c)=="number"}catch{return!1}};function We(E,c,v){At(E,x=>{x.call(t,c,v,St)})}const es=function(c){let v=null;if(We(m.beforeSanitizeElements,c,null),wr(c))return Ie(c),!0;const x=ae(c.nodeName);if(We(m.uponSanitizeElement,c,{tagName:x,allowedTags:U}),jt&&c.hasChildNodes()&&!Cn(c.firstElementChild)&&ue(/<[/\w!]/g,c.innerHTML)&&ue(/<[/\w!]/g,c.textContent)||jt&&c.namespaceURI===Fe&&x==="style"&&Cn(c.firstElementChild)||c.nodeType===$t.progressingInstruction||jt&&c.nodeType===$t.comment&&ue(/<[/\w]/g,c.data))return Ie(c),!0;if(je[x]||!(Je.tagCheck instanceof Function&&Je.tagCheck(x))&&!U[x]){if(!je[x]&&ns(x)&&(G.tagNameCheck instanceof RegExp&&ue(G.tagNameCheck,x)||G.tagNameCheck instanceof Function&&G.tagNameCheck(x)))return!1;if(dr&&!Be[x]){const z=D(c)||c.parentNode,ie=P(c)||c.childNodes;if(ie&&z){const se=ie.length;for(let ge=se-1;ge>=0;--ge){const Ve=A(ie[ge],!0);z.insertBefore(Ve,I(c))}}}return Ie(c),!0}return c instanceof l&&!tl(c)||(x==="noscript"||x==="noembed"||x==="noframes")&&ue(/<\/no(script|embed|frames)/i,c.innerHTML)?(Ie(c),!0):(Qe&&c.nodeType===$t.text&&(v=c.textContent,At([T,b,k],z=>{v=Ot(v,z," ")}),c.textContent!==v&&(Et(t.removed,{element:c.cloneNode()}),c.textContent=v)),We(m.afterSanitizeElements,c,null),!1)},ts=function(c,v,x){if(bn[v]||Ui&&(v==="id"||v==="name")&&(x in n||x in el))return!1;const z=J[v]||Je.attributeCheck instanceof Function&&Je.attributeCheck(v,c);if(!(ur&&!bn[v]&&ue(S,v))){if(!(Bi&&ue(C,v))){if(!z||bn[v]){if(!(ns(c)&&(G.tagNameCheck instanceof RegExp&&ue(G.tagNameCheck,c)||G.tagNameCheck instanceof Function&&G.tagNameCheck(c))&&(G.attributeNameCheck instanceof RegExp&&ue(G.attributeNameCheck,v)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(v,c))||v==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&ue(G.tagNameCheck,x)||G.tagNameCheck instanceof Function&&G.tagNameCheck(x))))return!1}else if(!mr[v]){if(!ue(ee,Ot(x,F,""))){if(!((v==="src"||v==="xlink:href"||v==="href")&&c!=="script"&&ho(x,"data:")===0&&Gi[c])){if(!(Fi&&!ue(R,Ot(x,F,"")))){if(x)return!1}}}}}}return!0},nl=L({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ns=function(c){return!nl[tn(c)]&&ue(H,c)},rs=function(c){We(m.beforeSanitizeAttributes,c,null);const v=c.attributes;if(!v||wr(c))return;const x={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:J,forceKeepAttr:void 0};let z=v.length;for(;z--;){const ie=v[z],se=ie.name,ge=ie.namespaceURI,Ve=ie.value,Ge=ae(se),xr=Ve;let le=se==="value"?xr:kp(xr);if(x.attrName=Ge,x.attrValue=le,x.keepAttr=!0,x.forceKeepAttr=void 0,We(m.uponSanitizeAttribute,c,x),le=x.attrValue,ji&&(Ge==="id"||Ge==="name")&&ho(le,Wi)!==0&&(ct(se,c),le=Wi+le),jt&&ue(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,le)){ct(se,c);continue}if(Ge==="attributename"&&po(le,"href")){ct(se,c);continue}if(x.forceKeepAttr)continue;if(!x.keepAttr){ct(se,c);continue}if(!Hi&&ue(/\/>/i,le)){ct(se,c);continue}Qe&&At([T,b,k],ss=>{le=Ot(le,ss," ")});const is=ae(c.nodeName);if(!ts(is,Ge,le)){ct(se,c);continue}if(N&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!ge)switch(w.getAttributeType(is,Ge)){case"TrustedHTML":{le=N.createHTML(le);break}case"TrustedScriptURL":{le=N.createScriptURL(le);break}}if(le!==xr)try{ge?c.setAttributeNS(ge,se,le):c.setAttribute(se,le),wr(c)?Ie(c):fo(t.removed)}catch{ct(se,c)}}We(m.afterSanitizeAttributes,c,null)},kr=function(c){let v=null;const x=Qi(c);for(We(m.beforeSanitizeShadowDOM,c,null);v=x.nextNode();)We(m.uponSanitizeShadowNode,v,null),es(v),rs(v),v.content instanceof s&&kr(v.content);We(m.afterSanitizeShadowDOM,c,null)},Sn=function(c){if(c.nodeType===$t.element&&c.shadowRoot instanceof s){const z=c.shadowRoot;Sn(z),kr(z)}const v=c.childNodes;if(!v)return;const x=[];At(v,z=>{Et(x,z)});for(const z of x)Sn(z)};return t.sanitize=function(E){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=null,x=null,z=null,ie=null;if(gr=!E,gr&&(E="<!-->"),typeof E!="string"&&!Cn(E)&&(E=Ap(E),typeof E!="string"))throw Mn("dirty is not a string, aborting");if(!t.isSupported)return E;if(fr||br(c),t.removed=[],typeof E=="string"&&(Wt=!1),Wt){const Ve=E.nodeName;if(typeof Ve=="string"){const Ge=ae(Ve);if(!U[Ge]||je[Ge])throw Mn("root node is forbidden and cannot be sanitized in-place")}Sn(E)}else if(Cn(E))v=Ji("<!---->"),x=v.ownerDocument.importNode(E,!0),x.nodeType===$t.element&&x.nodeName==="BODY"||x.nodeName==="HTML"?v=x:v.appendChild(x),Sn(x);else{if(!xt&&!Qe&&!lt&&E.indexOf("<")===-1)return N&&kn?N.createHTML(E):E;if(v=Ji(E),!v)return xt?null:kn?j:""}v&&pr&&Ie(v.firstChild);const se=Qi(Wt?E:v);for(;z=se.nextNode();)es(z),rs(z),z.content instanceof s&&kr(z.content);if(Wt)return Qe&&Vi(E),E;if(xt){if(Qe&&Vi(v),wn)for(ie=Me.call(v.ownerDocument);v.firstChild;)ie.appendChild(v.firstChild);else ie=v;return(J.shadowroot||J.shadowrootmode)&&(ie=p.call(r,ie,!0)),ie}let ge=lt?v.outerHTML:v.innerHTML;return lt&&U["!doctype"]&&v.ownerDocument&&v.ownerDocument.doctype&&v.ownerDocument.doctype.name&&ue(zp,v.ownerDocument.doctype.name)&&(ge="<!DOCTYPE "+v.ownerDocument.doctype.name+`>
|
|
62
62
|
`+ge),Qe&&At([T,b,k],Ve=>{ge=Ot(ge,Ve," ")}),N&&kn?N.createHTML(ge):ge},t.setConfig=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};br(E),fr=!0},t.clearConfig=function(){St=null,fr=!1},t.isValidAttribute=function(E,c,v){St||br({});const x=ae(E),z=ae(c);return ts(x,z,v)},t.addHook=function(E,c){typeof c=="function"&&Et(m[E],c)},t.removeHook=function(E,c){if(c!==void 0){const v=bp(m[E],c);return v===-1?void 0:wp(m[E],v,1)[0]}return fo(m[E])},t.removeHooks=function(E){m[E]=[]},t.removeAllHooks=function(){m=ko()},t}var Up=Ua();function jp(e){return btoa(unescape(encodeURIComponent(e)))}function zn(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}W.use({gfm:!0,breaks:!0,renderer:{code(e){var o,a;const t=(o=e.text)!=null?o:"",r=((a=e.lang)!=null?a:"").trim()||"text";if(r==="mermaid")return`<div class="mermaid">${zn(t)}</div>`;const i=zn(t),s=jp(t);return`<div class="code-card"><div class="code-head"><span class="code-lang">${zn(r)}</span><button type="button" class="code-copy" data-code="${s}" aria-label="코드 복사"><svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/></svg><span class="code-copy-label">복사</span></button></div><pre class="code-body"><code class="language-${zn(r)}">${i}</code></pre></div>`}}});function Wp(e){const t=(e.match(/```/g)||[]).length,n=e.replace(/```[\s\S]*?```/g,""),r=n.replace(/`[^`\n]*`/g,"");return{hasUnclosedCodeBlock:t%2===1,hasUnclosedInlineCode:(n.match(/`/g)||[]).length%2===1,hasUnclosedBoldStar:(r.match(/\*\*/g)||[]).length%2===1,hasUnclosedBoldUnderscore:(r.match(/__/g)||[]).length%2===1}}function Gp(e,t=!1){let n=e;if(t){const i=Wp(e);i.hasUnclosedCodeBlock&&(n+="\n```"),i.hasUnclosedInlineCode&&(n+="`"),i.hasUnclosedBoldStar&&(n+="**"),i.hasUnclosedBoldUnderscore&&(n+="__")}const r=W.parse(n);return Up.sanitize(r,{ADD_ATTR:["target","rel","data-code"],ADD_TAGS:["svg","path","g","foreignObject","marker","defs","pattern"]})}async function qp(e){const t=e.closest(".code-copy");if(!t)return!1;const n=t.getAttribute("data-code")||"";if(!n)return!1;let r="";try{r=decodeURIComponent(escape(atob(n)))}catch{r=atob(n)}try{return await navigator.clipboard.writeText(r),xo(t),!0}catch{const i=document.createElement("textarea");i.value=r,document.body.appendChild(i),i.select();try{document.execCommand("copy")}catch{}return i.remove(),xo(t),!0}}function xo(e){const t=e.querySelector(".code-copy-label"),n=t==null?void 0:t.textContent;t&&(t.textContent="복사됨"),e.classList.add("is-copied"),setTimeout(()=>{t&&n&&(t.textContent=n),e.classList.remove("is-copied")},1400)}function To(e){return e.replace(/"/g,""").replace(/\[/g,"(").replace(/\]/g,")")}function Zp(e){const t=[];let n=0;for(;n<e.length;)if(e[n]==="["&&n>0&&/\w/.test(e[n-1])){if(e[n+1]==="["){t.push(e[n],e[n+1]),n+=2;let i=1;for(;n<e.length&&i>0;){if(e[n]==="["&&e[n+1]==="["){i++,t.push(e[n],e[n+1]),n+=2;continue}if(e[n]==="]"&&e[n+1]==="]"){if(i--,i===0){t.push("]","]"),n+=2;break}t.push("]","]"),n+=2;continue}t.push(e[n]),n++}continue}t.push("["),n++;let r=1;for(;n<e.length&&r>0;){if(e[n]==="["){r++,t.push("("),n++;continue}if(e[n]==="]"){if(r--,r===0){t.push("]"),n++;break}t.push(")"),n++;continue}if(e[n]===`
|
|
63
|
-
`){t.push(e[n]),n++;break}t.push(e[n]),n++}}else t.push(e[n]),n++;return t.join("")}function Yp(e){return e.replace(/```mermaid\s*\n([\s\S]*?)```/g,(t,n)=>{let r=n;return r=r.replace(/%%.*$/gm,""),r=r.replace(/^(\s*)end(\s*)$/gm,"$1__END_PH__$2"),r=r.replace(/^(\s*(?:class|style|click|classDef|linkStyle)\b.*)$/gm,i=>i.replace(/\bend\b/g,"__END_PH__")),r=r.replace(/\bend\b/g,"end_node"),r=r.replace(/__END_PH__/g,"end"),r=r.replace(/\\"/g,"""),r=r.replace(/(\s)->([\s\w])/g,"$1-->$2"),r=r.replace(/(\s)-\.(\s)/g,"$1-.->$2"),r=r.replace(/^(.*)$/gm,i=>{const s=[];let o=0;for(;o<i.length;)if(o>0&&/\w/.test(i[o-1])&&i[o]==="["&&i[o+1]!=="["&&i[o+1]!=="("&&i[o+1]!=="/"&&i[o+1]!=="\\"){let a=1,l=o+1;for(;l<i.length&&a>0;)i[l]==="["?a++:i[l]==="]"&&a--,a>0&&l++;if(a===0){let u=i.slice(o+1,l);if(u.startsWith('"')&&u.endsWith('"')?u=u.slice(1,-1):u.startsWith('"')&&(u=u.replace(/"/g,"")),/[\[\]"]/.test(u)){const f=u.replace(/\[/g,"[").replace(/\]/g,"]").replace(/"/g,""");s.push(`["${f}"]`)}else s.push(i.slice(o,l+1));o=l+1}else s.push(i[o]),o++}else s.push(i[o]),o++;return s.join("")}),r=Zp(r),r=r.replace(/(\b\w+)\[\[([^\]\n]*)\]\]/g,(i,s,o)=>o.startsWith('"')&&o.endsWith('"')?i:`${s}[["${To(o)}"]]`),r=r.replace(/(\b\w+)\[(?!\[|\()([^\]\n]*)\]/g,(i,s,o)=>o.startsWith('"')&&o.endsWith('"')?i:`${s}["${To(o)}"]`),r=r.replace(/\|([^|]*)\|/g,(i,s)=>/[\[\]]/.test(s)?`|${s.replace(/\[/g,"[").replace(/\]/g,"]")}|`:i),r=r.replace(/^(\s*subgraph\s+)(?!")([^\n]*[ \t][^\n]*)$/gm,(i,s,o)=>/^\w+\s*\[/.test(o)?i:`${s}"${o.replace(/"/g,""")}"`),r=r.replace(/(\b\w+)\[""\]/g,"$1"),r=r.replace(/^(\s*direction\s+)(?!TB|BT|LR|RL|TD)(\w+)/gm,"$1TD"),"```mermaid\n"+r+"```"})}function Xp(e){const t="```mermaid\n"+e+"```";return Yp(t).replace(/^```mermaid\s*\n/,"").replace(/```\s*$/,"")}let Co=!1,Qt=null;async function Kp(){if(!Qt){const e=await If(()=>import("./mermaid.core-BygniTH5.js").then(t=>t.aI),[],import.meta.url);Qt=e.default||e}return!Co&&Qt&&(Qt.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",fontFamily:"inherit"}),Co=!0),Qt}async function Jp(e){const t=e.querySelectorAll(".mermaid");if(t.length)try{const n=await Kp(),r=Array.from(t).filter(s=>!s.getAttribute("data-processed"));if(!r.length)return;for(const s of r){const o=s.textContent||"";if(o){const a=Xp(o);a!==o&&(s.textContent=a)}}await n.run({nodes:r,suppressErrors:!0});const i=e.querySelectorAll(".mermaid[data-processed]");for(const s of Array.from(i)){if(s.querySelector(".mermaid-capture"))continue;s.style.position="relative";const o=document.createElement("button");o.className="mermaid-capture",o.type="button",o.title="PNG 로 저장",o.setAttribute("aria-label","PNG 로 저장"),o.innerHTML='<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>',o.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),Qp(s,o)}),s.appendChild(o)}}catch(n){console.warn("[mermaid] render failed:",n)}}async function Qp(e,t){console.log("[mermaid-capture] click",e);const n=e.querySelector("svg");if(!n){console.warn("[mermaid-capture] no svg found in container");return}const r=t.title;t.title="저장 중...",t.classList.add("is-busy");try{const i=n.getBoundingClientRect();let s=Math.ceil(i.width||n.clientWidth||0),o=Math.ceil(i.height||n.clientHeight||0);if(!s||!o){const O=n.getAttribute("viewBox");if(O){const[,,A,B]=O.split(/\s+/).map(Number);A&&B&&(s=Math.ceil(A),o=Math.ceil(B))}}s||(s=800),o||(o=600);const a=2,l=n.cloneNode(!0);l.getAttribute("xmlns")||l.setAttribute("xmlns","http://www.w3.org/2000/svg"),l.getAttribute("xmlns:xlink")||l.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),l.setAttribute("width",String(s)),l.setAttribute("height",String(o));const u=new XMLSerializer().serializeToString(l);console.log("[mermaid-capture] svg size",s,"x",o,"len=",u.length);const f="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(u),g=new Image;await new Promise((O,A)=>{g.onload=()=>{console.log("[mermaid-capture] img loaded",g.naturalWidth,g.naturalHeight),O()},g.onerror=B=>{console.error("[mermaid-capture] img load failed",B),A(new Error("image load failed"))},g.src=f});const y=document.createElement("canvas");y.width=s*a,y.height=o*a;const _=y.getContext("2d");_.fillStyle="#ffffff",_.fillRect(0,0,y.width,y.height),_.scale(a,a),_.drawImage(g,0,0,s,o);const w=O=>{const A=document.createElement("a");A.href=O;const B=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19);A.download=`mermaid-${B}.png`,A.style.display="none",document.body.appendChild(A),A.click(),setTimeout(()=>A.remove(),0)};try{await new Promise(O=>{y.toBlob(A=>{if(A){const B=URL.createObjectURL(A);w(B),setTimeout(()=>URL.revokeObjectURL(B),1500)}else w(y.toDataURL("image/png"));O()},"image/png")})}catch{w(y.toDataURL("image/png"))}console.log("[mermaid-capture] download triggered"),t.classList.add("is-success"),setTimeout(()=>t.classList.remove("is-success"),1200)}catch(i){console.warn("[mermaid-capture] failed:",i),t.classList.add("is-error"),setTimeout(()=>t.classList.remove("is-error"),1500)}finally{t.title=r,t.classList.remove("is-busy")}}const Vp={name:"StreamingMarkdown",props:{content:{type:String,required:!0},isStreaming:{type:Boolean,default:!1}},setup(e){const t=de(null),n=El(()=>Gp(e.content,e.isStreaming));function r(s){const o=s.target;o&&qp(o)}async function i(){e.isStreaming||(await wt(),t.value&&await Jp(t.value))}return ta(i),cn(()=>[e.content,e.isStreaming],i),{root:t,rendered:n,onClick:r}}};function Ut(e,t,n,r,i,s,o,a){var l=typeof e=="function"?e.options:e;return t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),s&&(l._scopeId="data-v-"+s),{exports:e,options:l}}var ed=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"root",staticClass:"sm-root",domProps:{innerHTML:t._s(t.rendered)},on:{click:t.onClick}})},td=[],nd=Ut(Vp,ed,td,!1,null,null);const rd=nd.exports,id={name:"StatusHistory",props:{items:{type:Array,default:()=>[]}}};var sd=function(){var t=this,n=t._self._c;return t._self._setupProxy,t.items&&t.items.length?n("div",{staticClass:"sh-root"},t._l(t.items,function(r,i){return n("div",{key:i,class:["sh-line",r.fade&&"sh-fade"]},[r.icon?n("span",{staticClass:"sh-icon"},[r.icon==="search"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("circle",{attrs:{cx:"11",cy:"11",r:"7"}}),n("line",{attrs:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}})]):r.icon==="summarize"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round"}},[n("line",{attrs:{x1:"4",y1:"6",x2:"20",y2:"6"}}),n("line",{attrs:{x1:"4",y1:"11",x2:"20",y2:"11"}}),n("line",{attrs:{x1:"4",y1:"16",x2:"13",y2:"16"}})]):r.icon==="warning"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("path",{attrs:{d:"M12 3 L22 20 L2 20 Z"}}),n("line",{attrs:{x1:"12",y1:"10",x2:"12",y2:"14"}}),n("circle",{attrs:{cx:"12",cy:"17",r:"0.6",fill:"currentColor"}})]):r.icon==="database"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("ellipse",{attrs:{cx:"12",cy:"5",rx:"8",ry:"2.5"}}),n("path",{attrs:{d:"M4 5 V12 C4 13.4 7.6 14.5 12 14.5 C16.4 14.5 20 13.4 20 12 V5"}}),n("path",{attrs:{d:"M4 12 V19 C4 20.4 7.6 21.5 12 21.5 C16.4 21.5 20 20.4 20 19 V12"}})]):r.icon==="workflow"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("rect",{attrs:{x:"3",y:"3",width:"8",height:"8",rx:"2"}}),n("path",{attrs:{d:"M7 11v4a2 2 0 0 0 2 2h4"}}),n("rect",{attrs:{x:"13",y:"13",width:"8",height:"8",rx:"2"}})]):r.icon==="analyze"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("path",{attrs:{d:"M12 3 L13.8 9.2 L20 11 L13.8 12.8 L12 19 L10.2 12.8 L4 11 L10.2 9.2 Z"}})]):n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("circle",{attrs:{cx:"12",cy:"12",r:"9"}})])]):n("span",{staticClass:"sh-dot"}),n("span",{staticClass:"sh-text"},[t._v(t._s(r.text))]),r.loading&&!r.fade?n("span",{staticClass:"sh-spin",attrs:{"aria-hidden":"true"}},[n("span"),n("span"),n("span")]):t._e()])}),0):t._e()},od=[],ad=Ut(id,sd,od,!1,null,"46864bc9");const ld=ad.exports,cd={name:"MessageItem",components:{StreamingMarkdown:rd,StatusHistory:ld},props:{message:{type:Object,required:!0}},setup(){return{expanded:de(!1)}}};var ud=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:["mi-row","mi-"+t.message.role]},[t.message.role==="assistant"?[n("div",{staticClass:"mi-avatar mi-avatar-assistant",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[n("path",{attrs:{d:"M12 2 L14.2 9.8 L22 12 L14.2 14.2 L12 22 L9.8 14.2 L2 12 L9.8 9.8 Z",fill:"currentColor"}}),n("circle",{attrs:{cx:"19",cy:"5",r:"1.6",fill:"currentColor",opacity:"0.85"}}),n("circle",{attrs:{cx:"5",cy:"19",r:"1.1",fill:"currentColor",opacity:"0.7"}})])]),n("div",{staticClass:"mi-body"},[n("div",{staticClass:"mi-role"},[t._v("BDP Agent")]),n("StatusHistory",{attrs:{items:t.message.statusHistory||[]}}),t.message.content?n("StreamingMarkdown",{attrs:{content:t.message.content,"is-streaming":!!t.message.isStreaming}}):t.message.isStreaming&&(!t.message.statusHistory||!t.message.statusHistory.length)?n("div",{staticClass:"mi-typing"},[n("span"),n("span"),n("span")]):t._e(),t.message.error?n("div",{staticClass:"mi-error"},[t._v("⚠️ "+t._s(t.message.error))]):t._e()],1)]:[n("div",{staticClass:"mi-body mi-body-user"},[n("div",{staticClass:"mi-user-wrap"},[t.message.promptMarker?n("div",{staticClass:"mi-prompt-folded"},[n("button",{staticClass:"mi-prompt-chip",attrs:{type:"button"},on:{click:function(r){t.expanded=!t.expanded}}},[n("svg",{staticClass:"mi-prompt-lead",attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"currentColor","aria-hidden":"true"}},[n("polygon",{attrs:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}})]),n("span",{staticClass:"mi-prompt-path"},[t._v(t._s(t.message.promptMarker))]),n("svg",{staticClass:"mi-prompt-toggle",class:{open:t.expanded},attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[n("polyline",{attrs:{points:"6 9 12 15 18 9"}})])]),t.expanded?n("pre",{staticClass:"mi-prompt-body"},[t._v(t._s(t.message.content))]):t._e()]):n("div",{staticClass:"mi-bubble-user"},[t._v(t._s(t.message.content))]),t.message.maskedTypes&&t.message.maskedTypes.length?n("div",{staticClass:"mi-pii-mask-strip"},[n("span",{staticClass:"mi-pii-mask-icon",attrs:{"aria-hidden":"true"}},[t._v("ⓘ")]),n("span",{staticClass:"mi-pii-mask-text"},[t._v(t._s(t.message.maskedTypes.join("·"))+" 자동 마스킹됨")])]):t._e()])])]],2)},fd=[],pd=Ut(cd,ud,fd,!1,null,"f131a032");const dd=pd.exports,hd={name:"ChatInput",props:{busy:{type:Boolean,default:!1},placeholder:{type:String,default:"질문을 입력하세요..."},prefillText:{type:String,default:""},isWidget:{type:Boolean,default:!1}},emits:["submit","cancel","prefill-consumed","reset"],setup(e,{emit:t}){const n=de(""),r=de(null);cn(()=>e.busy,(a,l)=>{l&&!a&&wt(()=>{var u;return(u=r.value)==null?void 0:u.focus()})}),cn(()=>e.prefillText,a=>{a&&(n.value=a,t("prefill-consumed"))});function i(){const a=n.value.trim();a&&(t("submit",a),n.value="")}function s(){t("cancel")}function o(a){a.key==="Enter"&&(a.isComposing||a.keyCode===229||a.shiftKey||(a.preventDefault(),i()))}return{text:n,ta:r,submit:i,onCancel:s,onKeyDown:o}}};var md=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{staticClass:"ci-root",class:{"ci-widget":t.isWidget}},[t.isWidget?n("button",{staticClass:"ci-reset",attrs:{type:"button","aria-label":"새 대화",title:"새 대화"},on:{click:function(r){return t.$emit("reset")}}},[n("svg",{attrs:{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("path",{attrs:{d:"M12 20h9"}}),n("path",{attrs:{d:"M16.5 3.5a2.121 2.121 0 1 1 3 3L7 19l-4 1 1-4 12.5-12.5z"}})])]):t._e(),n("div",{staticClass:"ci-box"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.text,expression:"text"}],ref:"ta",attrs:{placeholder:t.placeholder,disabled:t.busy,rows:"2"},domProps:{value:t.text},on:{keydown:t.onKeyDown,input:function(r){r.target.composing||(t.text=r.target.value)}}}),t._v(" "),t.busy?n("button",{staticClass:"ci-cancel",attrs:{type:"button",title:"요청 취소"},on:{click:t.onCancel}},[n("svg",{attrs:{viewBox:"0 0 24 24",width:"12",height:"12",fill:"currentColor","aria-hidden":"true"}},[n("rect",{attrs:{x:"6",y:"6",width:"12",height:"12",rx:"1.5"}})]),n("span",[t._v("취소")])]):n("button",{staticClass:"ci-send",attrs:{disabled:!t.text.trim(),type:"button"},on:{click:t.submit}},[t._v("전송")])])])},gd=[],vd=Ut(hd,md,gd,!1,null,"d54144de");const _d=vd.exports,yd={name:"HistoryPanel",props:{items:{type:Array,required:!0},activeId:{type:String,default:null}},emits:["select","delete","clear"],setup(e,{emit:t}){function n(o){const a=new Date(o),l=new Date;return a.getFullYear()===l.getFullYear()&&a.getMonth()===l.getMonth()&&a.getDate()===l.getDate()?`${r(a.getHours())}:${r(a.getMinutes())}`:`${a.getMonth()+1}/${a.getDate()}`}function r(o){return o<10?"0"+o:""+o}function i(o){return`${o.messages.filter(l=>l.role==="user").length}개 질문`}function s(){confirm("모든 대화 이력을 삭제할까요?")&&t("clear")}return{formatTime:n,messageCount:i,onClearAll:s}}};var bd=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("aside",{staticClass:"hp-root"},[n("div",{staticClass:"hp-head"},[n("span",{staticClass:"hp-title"},[t._v("대화 이력")]),t.items.length?n("button",{staticClass:"hp-clear",attrs:{type:"button"},on:{click:t.onClearAll}},[t._v("전체 삭제")]):t._e()]),t.items.length?n("ul",{staticClass:"hp-list"},t._l(t.items,function(r){return n("li",{key:r.id,class:["hp-item",r.id===t.activeId&&"hp-item-active"],on:{click:function(i){return t.$emit("select",r.id)}}},[n("div",{staticClass:"hp-item-title"},[t._v(t._s(r.title))]),n("div",{staticClass:"hp-item-meta"},[n("span",[t._v(t._s(t.formatTime(r.updatedAt)))]),n("span",[t._v("·")]),n("span",[t._v(t._s(t.messageCount(r)))])]),n("button",{staticClass:"hp-del",attrs:{type:"button","aria-label":"대화 삭제"},on:{click:function(i){return i.stopPropagation(),t.$emit("delete",r.id)}}},[t._v("×")])])}),0):n("div",{staticClass:"hp-empty"},[t._v(" 아직 대화가 없습니다. ")])])},wd=[],kd=Ut(yd,bd,wd,!1,null,"3db415ee");const xd=kd.exports,Td=/^https:\/\/([a-z0-9-]+\.)*hyundaicard\.com$/;function ja(e){return e?Td.test(e):!1}function Cd(){try{if(!document.referrer)return null;const e=new URL(document.referrer).origin;return ja(e)?e:null}catch{return null}}let ui=null,fi=null,on=[];function Sd(e){fi=e}const we=Sl({token:null,baseUrl:null,user:null,hostRoute:null});function sr(e){if(!window.parent||window.parent===window)return;const t=ui||Cd();t&&window.parent.postMessage(e,t)}function Ad(){window.addEventListener("message",t=>{var r,i,s,o,a;if(!ja(t.origin))return;const n=t.data;if(!(!n||typeof n!="object"))switch(ui||(ui=t.origin),n.type){case"init":we.token=(r=n.token)!=null?r:null,we.baseUrl=(i=n.baseUrl)!=null?i:null,we.user=(s=n.user)!=null?s:null;break;case"token":we.token=(o=n.token)!=null?o:null,on.forEach(l=>l(we.token)),on=[];break;case"route":we.hostRoute=(a=n.path)!=null?a:null;break;case"prompt":fi&&typeof n.prompt=="string"&&n.prompt.trim()&&fi({prompt:n.prompt,autoSend:n.autoSend,newConversation:n.newConversation,mode:n.mode,meta:n.meta});break}}),new ResizeObserver(()=>{const t=document.documentElement.scrollHeight;sr({type:"height",value:t})}).observe(document.documentElement),sr({type:"ready"})}function Ed(){return sr({type:"request-token"}),new Promise(e=>{on.push(e),setTimeout(()=>{const t=on.indexOf(e);t>=0&&(on.splice(t,1),e(null))},5e3)})}function Od(e){sr({type:"busy",meta:e})}cn(()=>({...we}),e=>console.debug("[sample-feature] session updated",e),{deep:!0});const Nr={},Wa=(Nr==null?void 0:Nr.VITE_USE_MOCK)==="true",$d="https://bdp-agent-api.hyundaicard.com",Rd="https://bdp-agent-api-dev.hyundaicard.com";function Id(){if(typeof window=="undefined")return"";const e=window.location.hostname||"";return e==="localhost"||e==="127.0.0.1"||e.startsWith("192.168.")?"":/(^|[.-])dev([.-]|$)/i.test(e)?Rd:$d}function Ga(e){return we.baseUrl?we.baseUrl+e:Id()+e}async function qa(e,t){let n=await fetch(e,t);if(n.status===401){const r=await Ed();if(r){const i=new Headers(t.headers);i.set("Authorization",`Bearer ${r}`),n=await fetch(e,{...t,headers:i})}}return n}async function Dd(e,t,n){if(Wa)return Md(e,t,n);const r=Ga("/agents/hdsp_rag/chat/stream"),i={"Content-Type":"application/json",Accept:"text/event-stream"};we.token&&(i.Authorization=`Bearer ${we.token}`);const s=await qa(r,{method:"POST",headers:i,body:JSON.stringify(e),signal:n});if(s.status===401)throw new Error("401 unauthorized — 토큰 갱신 후에도 거부됨");if(!s.ok){const u=await s.text();throw new Error(`backend ${s.status}: ${u.slice(0,300)}`)}if(!s.body)throw new Error("no response body");const o=s.body.getReader(),a=new TextDecoder;let l="";for(;;){const{value:u,done:f}=await o.read();if(f)break;l+=a.decode(u,{stream:!0});let g;for(;(g=l.indexOf(`
|
|
63
|
+
`){t.push(e[n]),n++;break}t.push(e[n]),n++}}else t.push(e[n]),n++;return t.join("")}function Yp(e){return e.replace(/```mermaid\s*\n([\s\S]*?)```/g,(t,n)=>{let r=n;return r=r.replace(/%%.*$/gm,""),r=r.replace(/^(\s*)end(\s*)$/gm,"$1__END_PH__$2"),r=r.replace(/^(\s*(?:class|style|click|classDef|linkStyle)\b.*)$/gm,i=>i.replace(/\bend\b/g,"__END_PH__")),r=r.replace(/\bend\b/g,"end_node"),r=r.replace(/__END_PH__/g,"end"),r=r.replace(/\\"/g,"""),r=r.replace(/(\s)->([\s\w])/g,"$1-->$2"),r=r.replace(/(\s)-\.(\s)/g,"$1-.->$2"),r=r.replace(/^(.*)$/gm,i=>{const s=[];let o=0;for(;o<i.length;)if(o>0&&/\w/.test(i[o-1])&&i[o]==="["&&i[o+1]!=="["&&i[o+1]!=="("&&i[o+1]!=="/"&&i[o+1]!=="\\"){let a=1,l=o+1;for(;l<i.length&&a>0;)i[l]==="["?a++:i[l]==="]"&&a--,a>0&&l++;if(a===0){let u=i.slice(o+1,l);if(u.startsWith('"')&&u.endsWith('"')?u=u.slice(1,-1):u.startsWith('"')&&(u=u.replace(/"/g,"")),/[\[\]"]/.test(u)){const f=u.replace(/\[/g,"[").replace(/\]/g,"]").replace(/"/g,""");s.push(`["${f}"]`)}else s.push(i.slice(o,l+1));o=l+1}else s.push(i[o]),o++}else s.push(i[o]),o++;return s.join("")}),r=Zp(r),r=r.replace(/(\b\w+)\[\[([^\]\n]*)\]\]/g,(i,s,o)=>o.startsWith('"')&&o.endsWith('"')?i:`${s}[["${To(o)}"]]`),r=r.replace(/(\b\w+)\[(?!\[|\()([^\]\n]*)\]/g,(i,s,o)=>o.startsWith('"')&&o.endsWith('"')?i:`${s}["${To(o)}"]`),r=r.replace(/\|([^|]*)\|/g,(i,s)=>/[\[\]]/.test(s)?`|${s.replace(/\[/g,"[").replace(/\]/g,"]")}|`:i),r=r.replace(/^(\s*subgraph\s+)(?!")([^\n]*[ \t][^\n]*)$/gm,(i,s,o)=>/^\w+\s*\[/.test(o)?i:`${s}"${o.replace(/"/g,""")}"`),r=r.replace(/(\b\w+)\[""\]/g,"$1"),r=r.replace(/^(\s*direction\s+)(?!TB|BT|LR|RL|TD)(\w+)/gm,"$1TD"),"```mermaid\n"+r+"```"})}function Xp(e){const t="```mermaid\n"+e+"```";return Yp(t).replace(/^```mermaid\s*\n/,"").replace(/```\s*$/,"")}let Co=!1,Qt=null;async function Kp(){if(!Qt){const e=await If(()=>import("./mermaid.core-DMuT20ap.js").then(t=>t.aI),[],import.meta.url);Qt=e.default||e}return!Co&&Qt&&(Qt.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",fontFamily:"inherit"}),Co=!0),Qt}async function Jp(e){const t=e.querySelectorAll(".mermaid");if(t.length)try{const n=await Kp(),r=Array.from(t).filter(s=>!s.getAttribute("data-processed"));if(!r.length)return;for(const s of r){const o=s.textContent||"";if(o){const a=Xp(o);a!==o&&(s.textContent=a)}}await n.run({nodes:r,suppressErrors:!0});const i=e.querySelectorAll(".mermaid[data-processed]");for(const s of Array.from(i)){if(s.querySelector(".mermaid-capture"))continue;s.style.position="relative";const o=document.createElement("button");o.className="mermaid-capture",o.type="button",o.title="PNG 로 저장",o.setAttribute("aria-label","PNG 로 저장"),o.innerHTML='<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>',o.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),Qp(s,o)}),s.appendChild(o)}}catch(n){console.warn("[mermaid] render failed:",n)}}async function Qp(e,t){console.log("[mermaid-capture] click",e);const n=e.querySelector("svg");if(!n){console.warn("[mermaid-capture] no svg found in container");return}const r=t.title;t.title="저장 중...",t.classList.add("is-busy");try{const i=n.getBoundingClientRect();let s=Math.ceil(i.width||n.clientWidth||0),o=Math.ceil(i.height||n.clientHeight||0);if(!s||!o){const O=n.getAttribute("viewBox");if(O){const[,,A,B]=O.split(/\s+/).map(Number);A&&B&&(s=Math.ceil(A),o=Math.ceil(B))}}s||(s=800),o||(o=600);const a=2,l=n.cloneNode(!0);l.getAttribute("xmlns")||l.setAttribute("xmlns","http://www.w3.org/2000/svg"),l.getAttribute("xmlns:xlink")||l.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),l.setAttribute("width",String(s)),l.setAttribute("height",String(o));const u=new XMLSerializer().serializeToString(l);console.log("[mermaid-capture] svg size",s,"x",o,"len=",u.length);const f="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(u),g=new Image;await new Promise((O,A)=>{g.onload=()=>{console.log("[mermaid-capture] img loaded",g.naturalWidth,g.naturalHeight),O()},g.onerror=B=>{console.error("[mermaid-capture] img load failed",B),A(new Error("image load failed"))},g.src=f});const y=document.createElement("canvas");y.width=s*a,y.height=o*a;const _=y.getContext("2d");_.fillStyle="#ffffff",_.fillRect(0,0,y.width,y.height),_.scale(a,a),_.drawImage(g,0,0,s,o);const w=O=>{const A=document.createElement("a");A.href=O;const B=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19);A.download=`mermaid-${B}.png`,A.style.display="none",document.body.appendChild(A),A.click(),setTimeout(()=>A.remove(),0)};try{await new Promise(O=>{y.toBlob(A=>{if(A){const B=URL.createObjectURL(A);w(B),setTimeout(()=>URL.revokeObjectURL(B),1500)}else w(y.toDataURL("image/png"));O()},"image/png")})}catch{w(y.toDataURL("image/png"))}console.log("[mermaid-capture] download triggered"),t.classList.add("is-success"),setTimeout(()=>t.classList.remove("is-success"),1200)}catch(i){console.warn("[mermaid-capture] failed:",i),t.classList.add("is-error"),setTimeout(()=>t.classList.remove("is-error"),1500)}finally{t.title=r,t.classList.remove("is-busy")}}const Vp={name:"StreamingMarkdown",props:{content:{type:String,required:!0},isStreaming:{type:Boolean,default:!1}},setup(e){const t=de(null),n=El(()=>Gp(e.content,e.isStreaming));function r(s){const o=s.target;o&&qp(o)}async function i(){e.isStreaming||(await wt(),t.value&&await Jp(t.value))}return ta(i),cn(()=>[e.content,e.isStreaming],i),{root:t,rendered:n,onClick:r}}};function Ut(e,t,n,r,i,s,o,a){var l=typeof e=="function"?e.options:e;return t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),s&&(l._scopeId="data-v-"+s),{exports:e,options:l}}var ed=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{ref:"root",staticClass:"sm-root",domProps:{innerHTML:t._s(t.rendered)},on:{click:t.onClick}})},td=[],nd=Ut(Vp,ed,td,!1,null,null);const rd=nd.exports,id={name:"StatusHistory",props:{items:{type:Array,default:()=>[]}}};var sd=function(){var t=this,n=t._self._c;return t._self._setupProxy,t.items&&t.items.length?n("div",{staticClass:"sh-root"},t._l(t.items,function(r,i){return n("div",{key:i,class:["sh-line",r.fade&&"sh-fade"]},[r.icon?n("span",{staticClass:"sh-icon"},[r.icon==="search"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("circle",{attrs:{cx:"11",cy:"11",r:"7"}}),n("line",{attrs:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}})]):r.icon==="summarize"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round"}},[n("line",{attrs:{x1:"4",y1:"6",x2:"20",y2:"6"}}),n("line",{attrs:{x1:"4",y1:"11",x2:"20",y2:"11"}}),n("line",{attrs:{x1:"4",y1:"16",x2:"13",y2:"16"}})]):r.icon==="warning"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("path",{attrs:{d:"M12 3 L22 20 L2 20 Z"}}),n("line",{attrs:{x1:"12",y1:"10",x2:"12",y2:"14"}}),n("circle",{attrs:{cx:"12",cy:"17",r:"0.6",fill:"currentColor"}})]):r.icon==="database"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("ellipse",{attrs:{cx:"12",cy:"5",rx:"8",ry:"2.5"}}),n("path",{attrs:{d:"M4 5 V12 C4 13.4 7.6 14.5 12 14.5 C16.4 14.5 20 13.4 20 12 V5"}}),n("path",{attrs:{d:"M4 12 V19 C4 20.4 7.6 21.5 12 21.5 C16.4 21.5 20 20.4 20 19 V12"}})]):r.icon==="workflow"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("rect",{attrs:{x:"3",y:"3",width:"8",height:"8",rx:"2"}}),n("path",{attrs:{d:"M7 11v4a2 2 0 0 0 2 2h4"}}),n("rect",{attrs:{x:"13",y:"13",width:"8",height:"8",rx:"2"}})]):r.icon==="analyze"?n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("path",{attrs:{d:"M12 3 L13.8 9.2 L20 11 L13.8 12.8 L12 19 L10.2 12.8 L4 11 L10.2 9.2 Z"}})]):n("svg",{attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("circle",{attrs:{cx:"12",cy:"12",r:"9"}})])]):n("span",{staticClass:"sh-dot"}),n("span",{staticClass:"sh-text"},[t._v(t._s(r.text))]),r.loading&&!r.fade?n("span",{staticClass:"sh-spin",attrs:{"aria-hidden":"true"}},[n("span"),n("span"),n("span")]):t._e()])}),0):t._e()},od=[],ad=Ut(id,sd,od,!1,null,"46864bc9");const ld=ad.exports,cd={name:"MessageItem",components:{StreamingMarkdown:rd,StatusHistory:ld},props:{message:{type:Object,required:!0}},setup(){return{expanded:de(!1)}}};var ud=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:["mi-row","mi-"+t.message.role]},[t.message.role==="assistant"?[n("div",{staticClass:"mi-avatar mi-avatar-assistant",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[n("path",{attrs:{d:"M12 2 L14.2 9.8 L22 12 L14.2 14.2 L12 22 L9.8 14.2 L2 12 L9.8 9.8 Z",fill:"currentColor"}}),n("circle",{attrs:{cx:"19",cy:"5",r:"1.6",fill:"currentColor",opacity:"0.85"}}),n("circle",{attrs:{cx:"5",cy:"19",r:"1.1",fill:"currentColor",opacity:"0.7"}})])]),n("div",{staticClass:"mi-body"},[n("div",{staticClass:"mi-role"},[t._v("BDP Agent")]),n("StatusHistory",{attrs:{items:t.message.statusHistory||[]}}),t.message.content?n("StreamingMarkdown",{attrs:{content:t.message.content,"is-streaming":!!t.message.isStreaming}}):t.message.isStreaming&&(!t.message.statusHistory||!t.message.statusHistory.length)?n("div",{staticClass:"mi-typing"},[n("span"),n("span"),n("span")]):t._e(),t.message.error?n("div",{staticClass:"mi-error"},[t._v("⚠️ "+t._s(t.message.error))]):t._e()],1)]:[n("div",{staticClass:"mi-body mi-body-user"},[n("div",{staticClass:"mi-user-wrap"},[t.message.promptMarker?n("div",{staticClass:"mi-prompt-folded"},[n("button",{staticClass:"mi-prompt-chip",attrs:{type:"button"},on:{click:function(r){t.expanded=!t.expanded}}},[n("svg",{staticClass:"mi-prompt-lead",attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"currentColor","aria-hidden":"true"}},[n("polygon",{attrs:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}})]),n("span",{staticClass:"mi-prompt-path"},[t._v(t._s(t.message.promptMarker))]),n("svg",{staticClass:"mi-prompt-toggle",class:{open:t.expanded},attrs:{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}},[n("polyline",{attrs:{points:"6 9 12 15 18 9"}})])]),t.expanded?n("pre",{staticClass:"mi-prompt-body"},[t._v(t._s(t.message.content))]):t._e()]):n("div",{staticClass:"mi-bubble-user"},[t._v(t._s(t.message.content))]),t.message.maskedTypes&&t.message.maskedTypes.length?n("div",{staticClass:"mi-pii-mask-strip"},[n("span",{staticClass:"mi-pii-mask-icon",attrs:{"aria-hidden":"true"}},[t._v("ⓘ")]),n("span",{staticClass:"mi-pii-mask-text"},[t._v(t._s(t.message.maskedTypes.join("·"))+" 자동 마스킹됨")])]):t._e()])])]],2)},fd=[],pd=Ut(cd,ud,fd,!1,null,"f131a032");const dd=pd.exports,hd={name:"ChatInput",props:{busy:{type:Boolean,default:!1},placeholder:{type:String,default:"질문을 입력하세요..."},prefillText:{type:String,default:""},isWidget:{type:Boolean,default:!1}},emits:["submit","cancel","prefill-consumed","reset"],setup(e,{emit:t}){const n=de(""),r=de(null);cn(()=>e.busy,(a,l)=>{l&&!a&&wt(()=>{var u;return(u=r.value)==null?void 0:u.focus()})}),cn(()=>e.prefillText,a=>{a&&(n.value=a,t("prefill-consumed"))});function i(){const a=n.value.trim();a&&(t("submit",a),n.value="")}function s(){t("cancel")}function o(a){a.key==="Enter"&&(a.isComposing||a.keyCode===229||a.shiftKey||(a.preventDefault(),i()))}return{text:n,ta:r,submit:i,onCancel:s,onKeyDown:o}}};var md=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{staticClass:"ci-root",class:{"ci-widget":t.isWidget}},[t.isWidget?n("button",{staticClass:"ci-reset",attrs:{type:"button","aria-label":"새 대화",title:"새 대화"},on:{click:function(r){return t.$emit("reset")}}},[n("svg",{attrs:{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("path",{attrs:{d:"M12 20h9"}}),n("path",{attrs:{d:"M16.5 3.5a2.121 2.121 0 1 1 3 3L7 19l-4 1 1-4 12.5-12.5z"}})])]):t._e(),n("div",{staticClass:"ci-box"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.text,expression:"text"}],ref:"ta",attrs:{placeholder:t.placeholder,disabled:t.busy,rows:"2"},domProps:{value:t.text},on:{keydown:t.onKeyDown,input:function(r){r.target.composing||(t.text=r.target.value)}}}),t._v(" "),t.busy?n("button",{staticClass:"ci-cancel",attrs:{type:"button",title:"요청 취소"},on:{click:t.onCancel}},[n("svg",{attrs:{viewBox:"0 0 24 24",width:"12",height:"12",fill:"currentColor","aria-hidden":"true"}},[n("rect",{attrs:{x:"6",y:"6",width:"12",height:"12",rx:"1.5"}})]),n("span",[t._v("취소")])]):n("button",{staticClass:"ci-send",attrs:{disabled:!t.text.trim(),type:"button"},on:{click:t.submit}},[t._v("전송")])])])},gd=[],vd=Ut(hd,md,gd,!1,null,"d54144de");const _d=vd.exports,yd={name:"HistoryPanel",props:{items:{type:Array,required:!0},activeId:{type:String,default:null}},emits:["select","delete","clear"],setup(e,{emit:t}){function n(o){const a=new Date(o),l=new Date;return a.getFullYear()===l.getFullYear()&&a.getMonth()===l.getMonth()&&a.getDate()===l.getDate()?`${r(a.getHours())}:${r(a.getMinutes())}`:`${a.getMonth()+1}/${a.getDate()}`}function r(o){return o<10?"0"+o:""+o}function i(o){return`${o.messages.filter(l=>l.role==="user").length}개 질문`}function s(){confirm("모든 대화 이력을 삭제할까요?")&&t("clear")}return{formatTime:n,messageCount:i,onClearAll:s}}};var bd=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("aside",{staticClass:"hp-root"},[n("div",{staticClass:"hp-head"},[n("span",{staticClass:"hp-title"},[t._v("대화 이력")]),t.items.length?n("button",{staticClass:"hp-clear",attrs:{type:"button"},on:{click:t.onClearAll}},[t._v("전체 삭제")]):t._e()]),t.items.length?n("ul",{staticClass:"hp-list"},t._l(t.items,function(r){return n("li",{key:r.id,class:["hp-item",r.id===t.activeId&&"hp-item-active"],on:{click:function(i){return t.$emit("select",r.id)}}},[n("div",{staticClass:"hp-item-title"},[t._v(t._s(r.title))]),n("div",{staticClass:"hp-item-meta"},[n("span",[t._v(t._s(t.formatTime(r.updatedAt)))]),n("span",[t._v("·")]),n("span",[t._v(t._s(t.messageCount(r)))])]),n("button",{staticClass:"hp-del",attrs:{type:"button","aria-label":"대화 삭제"},on:{click:function(i){return i.stopPropagation(),t.$emit("delete",r.id)}}},[t._v("×")])])}),0):n("div",{staticClass:"hp-empty"},[t._v(" 아직 대화가 없습니다. ")])])},wd=[],kd=Ut(yd,bd,wd,!1,null,"3db415ee");const xd=kd.exports,Td=/^https:\/\/([a-z0-9-]+\.)*hyundaicard\.com$/;function ja(e){return e?Td.test(e):!1}function Cd(){try{if(!document.referrer)return null;const e=new URL(document.referrer).origin;return ja(e)?e:null}catch{return null}}let ui=null,fi=null,on=[];function Sd(e){fi=e}const we=Sl({token:null,baseUrl:null,user:null,hostRoute:null});function sr(e){if(!window.parent||window.parent===window)return;const t=ui||Cd();t&&window.parent.postMessage(e,t)}function Ad(){window.addEventListener("message",t=>{var r,i,s,o,a;if(!ja(t.origin))return;const n=t.data;if(!(!n||typeof n!="object"))switch(ui||(ui=t.origin),n.type){case"init":we.token=(r=n.token)!=null?r:null,we.baseUrl=(i=n.baseUrl)!=null?i:null,we.user=(s=n.user)!=null?s:null;break;case"token":we.token=(o=n.token)!=null?o:null,on.forEach(l=>l(we.token)),on=[];break;case"route":we.hostRoute=(a=n.path)!=null?a:null;break;case"prompt":fi&&typeof n.prompt=="string"&&n.prompt.trim()&&fi({prompt:n.prompt,autoSend:n.autoSend,newConversation:n.newConversation,mode:n.mode,meta:n.meta});break}}),new ResizeObserver(()=>{const t=document.documentElement.scrollHeight;sr({type:"height",value:t})}).observe(document.documentElement),sr({type:"ready"})}function Ed(){return sr({type:"request-token"}),new Promise(e=>{on.push(e),setTimeout(()=>{const t=on.indexOf(e);t>=0&&(on.splice(t,1),e(null))},5e3)})}function Od(e){sr({type:"busy",meta:e})}cn(()=>({...we}),e=>console.debug("[sample-feature] session updated",e),{deep:!0});const Nr={},Wa=(Nr==null?void 0:Nr.VITE_USE_MOCK)==="true",$d="https://bdp-agent-api.hyundaicard.com",Rd="https://bdp-agent-api-dev.hyundaicard.com";function Id(){if(typeof window=="undefined")return"";const e=window.location.hostname||"";return e==="localhost"||e==="127.0.0.1"||e.startsWith("192.168.")?"":/(^|[.-])dev([.-]|$)/i.test(e)?Rd:$d}function Ga(e){return we.baseUrl?we.baseUrl+e:Id()+e}async function qa(e,t){let n=await fetch(e,t);if(n.status===401){const r=await Ed();if(r){const i=new Headers(t.headers);i.set("Authorization",`Bearer ${r}`),n=await fetch(e,{...t,headers:i})}}return n}async function Dd(e,t,n){if(Wa)return Md(e,t,n);const r=Ga("/agents/hdsp_rag/chat/stream"),i={"Content-Type":"application/json",Accept:"text/event-stream"};we.token&&(i.Authorization=`Bearer ${we.token}`);const s=await qa(r,{method:"POST",headers:i,body:JSON.stringify(e),signal:n});if(s.status===401)throw new Error("401 unauthorized — 토큰 갱신 후에도 거부됨");if(!s.ok){const u=await s.text();throw new Error(`backend ${s.status}: ${u.slice(0,300)}`)}if(!s.body)throw new Error("no response body");const o=s.body.getReader(),a=new TextDecoder;let l="";for(;;){const{value:u,done:f}=await o.read();if(f)break;l+=a.decode(u,{stream:!0});let g;for(;(g=l.indexOf(`
|
|
64
64
|
|
|
65
65
|
`))!==-1;){const y=l.slice(0,g);l=l.slice(g+2);const _=Pd(y);_&&t(_)}}}async function Ld(e,t){if(Wa)return await new Promise(s=>setTimeout(s,600)),{summary:`## 세션 목표
|
|
66
66
|
사용자는 이전 대화 맥락을 유지하면서 추가 질문을 이어가려 합니다.
|
|
@@ -91,4 +91,4 @@ spark-submit \\
|
|
|
91
91
|
| Executor | 4g ~ 8g |
|
|
92
92
|
|
|
93
93
|
executor 메모리는 노드 메모리의 80% 이내로 두는 것을 권장합니다.`}function Vt(e,t){return new Promise((n,r)=>{if(t!=null&&t.aborted)return r(new Error("aborted"));const i=setTimeout(n,e);t==null||t.addEventListener("abort",()=>{clearTimeout(i),r(new Error("aborted"))})})}const zi="bdp-agent-conversations-v1",Za=50;function So(){try{const e=localStorage.getItem(zi);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function zr(e){try{localStorage.setItem(zi,JSON.stringify(e.slice(0,Za)))}catch{}}function Ya(e){const t=e.trim().replace(/\s+/g," ");return t.length>36?t.slice(0,36)+"…":t}function zd(){const e=de(So());function t(){e.value=So()}function n(o){const a=e.value.filter(l=>l.id!==o.id);a.unshift(o),e.value=a.slice(0,Za),zr(e.value)}function r(o){e.value=e.value.filter(a=>a.id!==o),zr(e.value)}function i(){e.value=[],zr([])}function s(o){return e.value.find(a=>a.id===o)}return typeof window!="undefined"&&window.addEventListener("storage",o=>{o.key===zi&&t()}),{items:e,refresh:t,upsert:n,remove:r,clearAll:i,get:s,shortTitle:Ya}}let Bd=0;function Ao(){return`m-${Date.now()}-${++Bd}`}function Fd(e){return/401|unauthorized|토큰/i.test(e)?"로그인 세션이 만료되었습니다. 페이지를 새로고침한 뒤 다시 시도해 주십시오.":/Failed to fetch|NetworkError|fetch|ECONN|timeout/i.test(e)?"네트워크 연결이 불안정합니다. 연결 상태를 확인한 뒤 다시 시도해 주십시오.":/\b50\d\b|backend|summarize|Internal/i.test(e)?"일시적으로 답변을 받지 못했습니다. 잠시 후 다시 시도해 주십시오.":"답변 처리 중 문제가 발생했습니다. 잠시 후 다시 시도해 주십시오."}const Hd=1.5,Ud=6e4,jd=e=>Math.ceil(e*Hd);function Wd(){const e=de([]),t=de("knowledge"),n=de(!1),r=de(null),i=de(null),s=de(""),o=de(null),a=de(0);let l=null,u=0;const f=zd();function g(){if(!r.value||e.value.length===0)return;const P=e.value.find(N=>N.role==="user"),D=P?Ya(P.content):"(빈 대화)",K={id:r.value,title:D,messages:[...e.value],createdAt:u||Date.now(),updatedAt:Date.now(),summary:o.value||void 0,summarizedThrough:a.value||void 0};f.upsert(K)}function y(P,D,K,N=!1){const j=P.statusHistory||(P.statusHistory=[]);N&&j.forEach(re=>re.fade=!0),j.push({text:D,icon:K,fade:!1})}async function _(P){var T;if(n.value)return;i.value=null,u||(u=Date.now());let D=P,K;const N=P.match(/^\[([^\]\n]+)\]\s*\n([\s\S]+)$/);N&&(K=N[1],D=N[2]),e.value.push({id:Ao(),role:"user",content:D,promptMarker:K});const j={id:Ao(),role:"assistant",content:"",isStreaming:!0,statusHistory:[]};e.value.push(j),n.value=!0,l=new AbortController;const re=e.value.slice(0,-2),ce=[];for(const b of re.slice(a.value))if(!(b.error||!b.content)){if(b.role==="user")ce.push({role:"user",content:b.content});else if(b.role==="assistant"){for(const k of b.toolMemory||[])ce.push({role:"tool",name:k.name,content:JSON.stringify(k.result)});ce.push({role:"assistant",content:b.content})}}const Ue=(((T=o.value)==null?void 0:T.length)||0)+ce.reduce((b,k)=>b+k.content.length,0)+D.length,Me=jd(Ue);let d=o.value,p=ce;if(Me>Ud&&ce.length>0){y(j,"이전 대화 요약 중...","summarize");try{const b=await Ld({messages:ce,previous_summary:o.value||null},l.signal);d=b.summary,o.value=b.summary,a.value=re.length,p=[],y(j,`이전 대화 ${b.message_count}건 요약 완료`,"summarize",!0)}catch(b){const k=b instanceof Error?b.message:String(b);console.warn("summarize failed, falling back to raw history",k),y(j,"요약 실패 — 원문으로 진행","warning",!0)}}const m=[];d&&(m.push({role:"user",content:`[이전 대화 요약 — 참고용 컨텍스트]
|
|
94
|
-
${d}`}),m.push({role:"assistant",content:"이전 대화 요약을 확인했습니다. 이어서 답변하겠습니다."})),m.push(...p);try{await Dd({message:D,conversation_id:r.value,history_messages:m,mode:t.value},b=>{const k=e.value[e.value.length-1];if(b.event==="ready"){r.value=b.data.conversationId;return}const S=b.data||{};if(S.type==="input_masked"){for(let C=e.value.length-1;C>=0;C--){const R=e.value[C];if(R.role==="user"){e.value.splice(C,1,{...R,content:S.masked_text,maskedTypes:S.detected_types||[]});break}}return}if(S.tool_memory){(k.toolMemory||(k.toolMemory=[])).push(S.tool_memory);return}if(typeof S.content=="string"&&S.content&&(k.content+=S.content,k.statusHistory&&k.statusHistory.forEach(C=>{C.loading&&(C.icon==="analyze"&&(C.text="분석 완료"),C.loading=!1,C.fade=!0)})),S.status){const C={text:S.status,icon:S.icon,loading:S.loading,fade:!1},R=k.statusHistory||(k.statusHistory=[]);S.fade_previous&&R.forEach(F=>F.fade=!0),R.push(C)}if(S.tool_processing){const C=k.statusHistory||(k.statusHistory=[]);C.forEach(R=>R.fade=!0),C.push({text:"분석 중",icon:"analyze",loading:!0,fade:!1})}S.done&&(k.isStreaming=!1,k.statusHistory&&k.statusHistory.length&&k.statusHistory.forEach(C=>C.fade=!0),S.error&&(k.error="답변 처리 중 문제가 발생했습니다. 잠시 후 다시 시도해 주십시오."))},l.signal)}catch(b){const k=e.value[e.value.length-1],S=(b==null?void 0:b.name)==="AbortError"||b instanceof Error&&/abort/i.test(b.message);if(k.isStreaming=!1,k.statusHistory&&k.statusHistory.length&&k.statusHistory.forEach(C=>C.fade=!0),S)k.content||(k.content="_(취소되었습니다)_");else{const C=b instanceof Error?b.message:String(b);console.warn("[chat] error:",C),k.error=Fd(C),i.value=k.error}}finally{n.value=!1,l=null;const b=e.value[e.value.length-1];b&&(b.isStreaming=!1),g()}await wt()}function w(){e.value=[],r.value=null,i.value=null,u=0,o.value=null,a.value=0}function O(P){const D=f.get(P);D&&(e.value=D.messages.map(K=>({...K,isStreaming:!1,statusHistory:(K.statusHistory||[]).map(N=>({...N,fade:!0}))})),r.value=D.id,u=D.createdAt,i.value=null,o.value=D.summary||null,a.value=D.summarizedThrough||0)}function A(P){f.remove(P),r.value===P&&w()}function B(){l==null||l.abort()}function I(P){if(n.value){Od(P.meta);return}const D=(P.prompt||"").trim();D&&(P.newConversation!==!1&&w(),P.mode&&(t.value=P.mode),P.autoSend!==!1?_(D):s.value=D)}return{messages:e,mode:t,busy:n,convId:r,error:i,pendingInput:s,send:_,reset:w,stop:B,runPrompt:I,historyItems:f.items,clearHistory:f.clearAll,loadConversation:O,deleteConversation:A}}const Xa={"/report/usage":["Report - Usage 페이지에서 확인할 수 있는 정보는 뭐야?"],"/report/request":["Report - Request 화면에 대해 설명해줘"],"/catalog/catalog":["카탈로그 페이지에 검색되는 각 테이블 유형에 대해 알려줘"],"/workspace/project":["BDP에서 프로젝트의 용도를 알려줘"],"/workspace/dashboard/usagecosts":["Usage/Cost 화면에 보이는 정보에 대해 알려줘"],"/workspace/eda/editor":["Athena 쿼리 실행 비용을 최적화하는 방법을 알려줘"],"/workspace/eda/history":["History 화면에서 검색 필터링 하는 방법을 알려줘"],"/workspace/eda/saved-query":["Saved query를 workflow 에서 활용하는 방법을 알려줘"],"/workspace/ml/sagemaker":["BDPC에서 aws, on-prem, gcp 각 노트북 접속 링크 차이점이 뭐야?"],"/workspace/ml/model":["BDPC에서 모델을 등록하는 방법에 대해 알려줘"],"/workspace/ml/docker":["커스텀 도커 이미지 신청 방법에 대해 알려줘"],"/workspace/ml/pipeline":["Pipeline을 배포하는 방법을 알려줘"],"/workspace/workflow/workflow-write":["Workflow 의 각 Task 타입에 대해 설명해줘","Query Task 의 사용방법을 알려줘","Trigger의 선행작업설정에 대해 알려줘"],"/workspace/workflow":["Workflow의 각 상태값에 대해 알려줘"],"/workspace/budget":["예산 배분을 어떻게 하는지 가이드해줘"]};function Eo(e){const t=Object.keys(Xa).sort((n,r)=>r.length-n.length);for(const n of t)if(e.includes(n))return n;return""}function Gd(){const e=new URLSearchParams(window.location.search).get("menu");if(e)return Eo(e);try{
|
|
94
|
+
${d}`}),m.push({role:"assistant",content:"이전 대화 요약을 확인했습니다. 이어서 답변하겠습니다."})),m.push(...p);try{await Dd({message:D,conversation_id:r.value,history_messages:m,mode:t.value},b=>{const k=e.value[e.value.length-1];if(b.event==="ready"){r.value=b.data.conversationId;return}const S=b.data||{};if(S.type==="input_masked"){for(let C=e.value.length-1;C>=0;C--){const R=e.value[C];if(R.role==="user"){e.value.splice(C,1,{...R,content:S.masked_text,maskedTypes:S.detected_types||[]});break}}return}if(S.tool_memory){(k.toolMemory||(k.toolMemory=[])).push(S.tool_memory);return}if(typeof S.content=="string"&&S.content&&(k.content+=S.content,k.statusHistory&&k.statusHistory.forEach(C=>{C.loading&&(C.icon==="analyze"&&(C.text="분석 완료"),C.loading=!1,C.fade=!0)})),S.status){const C={text:S.status,icon:S.icon,loading:S.loading,fade:!1},R=k.statusHistory||(k.statusHistory=[]);S.fade_previous&&R.forEach(F=>F.fade=!0),R.push(C)}if(S.tool_processing){const C=k.statusHistory||(k.statusHistory=[]);C.forEach(R=>R.fade=!0),C.push({text:"분석 중",icon:"analyze",loading:!0,fade:!1})}S.done&&(k.isStreaming=!1,k.statusHistory&&k.statusHistory.length&&k.statusHistory.forEach(C=>C.fade=!0),S.error&&(k.error="답변 처리 중 문제가 발생했습니다. 잠시 후 다시 시도해 주십시오."))},l.signal)}catch(b){const k=e.value[e.value.length-1],S=(b==null?void 0:b.name)==="AbortError"||b instanceof Error&&/abort/i.test(b.message);if(k.isStreaming=!1,k.statusHistory&&k.statusHistory.length&&k.statusHistory.forEach(C=>C.fade=!0),S)k.content||(k.content="_(취소되었습니다)_");else{const C=b instanceof Error?b.message:String(b);console.warn("[chat] error:",C),k.error=Fd(C),i.value=k.error}}finally{n.value=!1,l=null;const b=e.value[e.value.length-1];b&&(b.isStreaming=!1),g()}await wt()}function w(){e.value=[],r.value=null,i.value=null,u=0,o.value=null,a.value=0}function O(P){const D=f.get(P);D&&(e.value=D.messages.map(K=>({...K,isStreaming:!1,statusHistory:(K.statusHistory||[]).map(N=>({...N,fade:!0}))})),r.value=D.id,u=D.createdAt,i.value=null,o.value=D.summary||null,a.value=D.summarizedThrough||0)}function A(P){f.remove(P),r.value===P&&w()}function B(){l==null||l.abort()}function I(P){if(n.value){Od(P.meta);return}const D=(P.prompt||"").trim();D&&(P.newConversation!==!1&&w(),P.mode&&(t.value=P.mode),P.autoSend!==!1?_(D):s.value=D)}return{messages:e,mode:t,busy:n,convId:r,error:i,pendingInput:s,send:_,reset:w,stop:B,runPrompt:I,historyItems:f.items,clearHistory:f.clearAll,loadConversation:O,deleteConversation:A}}const Xa={"/report/usage":["Report - Usage 페이지에서 확인할 수 있는 정보는 뭐야?"],"/report/request":["Report - Request 화면에 대해 설명해줘"],"/catalog/catalog":["카탈로그 페이지에 검색되는 각 테이블 유형에 대해 알려줘"],"/workspace/project":["BDP에서 프로젝트의 용도를 알려줘"],"/workspace/dashboard/usagecosts":["Usage/Cost 화면에 보이는 정보에 대해 알려줘"],"/workspace/eda/editor":["Athena 쿼리 실행 비용을 최적화하는 방법을 알려줘"],"/workspace/eda/history":["History 화면에서 검색 필터링 하는 방법을 알려줘"],"/workspace/eda/saved-query":["Saved query를 workflow 에서 활용하는 방법을 알려줘"],"/workspace/ml/sagemaker":["BDPC에서 aws, on-prem, gcp 각 노트북 접속 링크 차이점이 뭐야?"],"/workspace/ml/model":["BDPC에서 모델을 등록하는 방법에 대해 알려줘"],"/workspace/ml/docker":["커스텀 도커 이미지 신청 방법에 대해 알려줘"],"/workspace/ml/pipeline":["Pipeline을 배포하는 방법을 알려줘"],"/workspace/workflow/workflow-write":["Workflow 의 각 Task 타입에 대해 설명해줘","Query Task 의 사용방법을 알려줘","Trigger의 선행작업설정에 대해 알려줘"],"/workspace/workflow":["Workflow의 각 상태값에 대해 알려줘"],"/workspace/budget":["예산 배분을 어떻게 하는지 가이드해줘"]};function Eo(e){const t=Object.keys(Xa).sort((n,r)=>r.length-n.length);for(const n of t)if(e.includes(n))return n;return""}function Gd(){const e=new URLSearchParams(window.location.search).get("menu");if(e)return Eo(e);let t="";try{const r=window.parent.location;t=r.pathname+r.search+r.hash}catch{try{if(document.referrer){const r=new URL(document.referrer);t=r.pathname+r.search+r.hash}}catch{}}const n=Eo(t);return typeof console!="undefined"&&console.debug("[rag-chat] host menu resolve:",JSON.stringify({target:t,key:n})),n}const qd={name:"App",components:{MessageItem:dd,ChatInput:_d,HistoryPanel:xd},setup(){const e=Wd(),t=de(null),n=de(!1),r=["BDP Cloud의 전체 구조 설명","Workflow의 최근 수행상태","카드매출 테이블 최근 적재 이력","카드매출 테이블 스키마 정보"];function i(){const u=t.value;u&&(u.scrollTop=u.scrollHeight)}ta(()=>{i(),Sd(e.runPrompt)}),uc(i),cn(e.messages,()=>void wt(i),{deep:!0});function s(){e.pendingInput.value=""}const o=typeof window!="undefined"&&new URLSearchParams(window.location.search).get("widget")==="1",a=Xa[Gd()]||[],l=a.length?a:o?[]:r;return{...e,scrollEl:t,suggestions:l,historyOpen:n,onPrefillConsumed:s,isWidget:o}}};var Zd=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{staticClass:"cp-root",class:{"cp-widget":t.isWidget}},[n("div",{staticClass:"cp-body"},[n("section",{staticClass:"cp-chat"},[t.isWidget?t._e():n("div",{staticClass:"cp-actions"},[n("button",{staticClass:"cp-icon-btn",attrs:{type:"button","aria-label":"새 대화",title:"새 대화"},on:{click:t.reset}},[n("svg",{attrs:{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("path",{attrs:{d:"M12 20h9"}}),n("path",{attrs:{d:"M16.5 3.5a2.121 2.121 0 1 1 3 3L7 19l-4 1 1-4 12.5-12.5z"}})])]),t.isWidget?t._e():n("button",{staticClass:"cp-icon-btn",attrs:{type:"button","aria-pressed":t.historyOpen,"aria-label":t.historyOpen?"이력 닫기":"이력 열기",title:t.historyOpen?"이력 닫기":"이력 열기"},on:{click:function(r){t.historyOpen=!t.historyOpen}}},[n("svg",{attrs:{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[n("path",{attrs:{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}}),n("path",{attrs:{d:"M3 3v5h5"}}),n("path",{attrs:{d:"M12 7v5l3 2"}})])])]),n("main",{ref:"scrollEl",staticClass:"cp-main"},[t.messages.length?n("div",{staticClass:"cp-list"},t._l(t.messages,function(r){return n("MessageItem",{key:r.id,attrs:{message:r}})}),1):n("div",{staticClass:"cp-empty"},[n("div",{staticClass:"cp-empty-head"},[n("div",{staticClass:"cp-empty-ico",attrs:{"aria-hidden":"true"}},[n("svg",{attrs:{viewBox:"0 0 24 24",fill:"none"}},[n("path",{attrs:{d:"M12 2 L14.2 9.8 L22 12 L14.2 14.2 L12 22 L9.8 14.2 L2 12 L9.8 9.8 Z",fill:"currentColor"}}),n("circle",{attrs:{cx:"19",cy:"5",r:"1.6",fill:"currentColor",opacity:"0.85"}}),n("circle",{attrs:{cx:"5",cy:"19",r:"1.1",fill:"currentColor",opacity:"0.7"}})])]),n("div",{staticClass:"cp-empty-title"},[t._v("무엇을 도와드릴까요?")])]),n("p",{staticClass:"cp-empty-sub"},[t._v("BDP 가이드·테이블 메타데이터를 검색해서 답해드립니다.")]),t.suggestions.length?n("div",{staticClass:"cp-sug-area"},[n("div",{staticClass:"cp-suggestions"},t._l(t.suggestions,function(r){return n("button",{key:r,staticClass:"cp-sug",attrs:{disabled:t.busy,type:"button"},on:{click:function(i){return t.send(r)}}},[n("span",{staticClass:"cp-sug-txt"},[t._v(t._s(r))])])}),0)]):t._e()])]),n("ChatInput",{attrs:{busy:t.busy,"prefill-text":t.pendingInput,"is-widget":t.isWidget},on:{submit:t.send,cancel:t.stop,"prefill-consumed":t.onPrefillConsumed,reset:t.reset}})],1),t.historyOpen&&!t.isWidget?n("HistoryPanel",{staticClass:"cp-history",attrs:{items:t.historyItems,"active-id":t.convId},on:{select:t.loadConversation,delete:t.deleteConversation,clear:t.clearHistory}}):t._e()],1)])},Yd=[],Xd=Ut(qd,Zd,Yd,!1,null,null);const Kd=Xd.exports;ne.config.productionTip=!1;new ne({render:e=>e(Kd)}).$mount("#app");Ad();export{If as _,Up as p};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as e,aE as s,b0 as o,F as i}from"./mermaid.core-
|
|
1
|
+
import{b as e,aE as s,b0 as o,F as i}from"./mermaid.core-DMuT20ap.js";import{p as g}from"./wardley-L42UT6IY-BrvnVw8d.js";import"./index-BPhAybEr.js";var p={parse:e(async r=>{const a=await g("info",r);s.debug(a)},"parse")},v={version:"11.15.0"},d=e(()=>v.version,"getVersion"),m={getVersion:d},c=e((r,a,n)=>{s.debug(`rendering info diagram
|
|
2
2
|
`+r);const t=o(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),f={draw:c},_={parser:p,db:m,renderer:f};export{_ as diagram};
|
package/dist/assets/{ishikawaDiagram-YF4QCWOH-BOKb6v_h.js → ishikawaDiagram-YF4QCWOH-DCwPbnec.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as l,a4 as ot,aN as ut,b0 as dt,l as yt,t as ft,z as pt,b4 as it,a2 as gt,b2 as kt,a1 as mt,b1 as wt,a6 as _t,F as bt}from"./mermaid.core-
|
|
1
|
+
import{b as l,a4 as ot,aN as ut,b0 as dt,l as yt,t as ft,z as pt,b4 as it,a2 as gt,b2 as kt,a1 as mt,b1 as wt,a6 as _t,F as bt}from"./mermaid.core-DMuT20ap.js";import"./index-BPhAybEr.js";var tt=function(){var e=l(function(T,t,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=t);return s},"o"),o=[1,4],a=[1,14],n=[1,12],r=[1,13],y=[6,7,8],f=[1,20],u=[1,18],w=[1,19],h=[6,7,11],x=[1,6,13,14],k=[1,23],g=[1,24],S=[1,6,7,11,13,14],O={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:l(function(t,s,i,d,p,c,$){var b=c.length-1;switch(p){case 6:case 7:return d;case 15:d.addNode(c[b-1].length,c[b].trim());break;case 16:d.addNode(0,c[b].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:o},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:o},{6:a,7:[1,10],9:9,12:11,13:n,14:r},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:a,12:15,13:n,14:r},{6:a,9:16,12:11,13:n,14:r},{6:f,7:u,10:17,11:w},e(h,[2,18],{14:[1,21]}),e(h,[2,16]),e(h,[2,17]),{6:f,7:u,10:22,11:w},{1:[2,7],6:a,12:15,13:n,14:r},e(x,[2,14],{7:k,11:g}),e(S,[2,8]),e(S,[2,9]),e(S,[2,10]),e(h,[2,15]),e(x,[2,13],{7:k,11:g}),e(S,[2,11]),e(S,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:l(function(t){var s=this,i=[0],d=[],p=[null],c=[],$=this.table,b="",v=0,M=0,E=2,L=1,N=c.slice.call(arguments,1),m=Object.create(this.lexer),V={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(V.yy[z]=this.yy[z]);m.setInput(t,V.yy),V.yy.lexer=m,V.yy.parser=this,typeof m.yylloc=="undefined"&&(m.yylloc={});var j=m.yylloc;c.push(j);var X=m.options&&m.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(B){i.length=i.length-2*B,p.length=p.length-B,c.length=c.length-B}l(Y,"popStack");function Z(){var B;return B=d.pop()||m.lex()||L,typeof B!="number"&&(B instanceof Array&&(d=B,B=d.pop()),B=s.symbols_[B]||B),B}l(Z,"lex");for(var A,F,_,P,D={},W,C,et,K;;){if(F=i[i.length-1],this.defaultActions[F]?_=this.defaultActions[F]:((A===null||typeof A=="undefined")&&(A=Z()),_=$[F]&&$[F][A]),typeof _=="undefined"||!_.length||!_[0]){var Q="";K=[];for(W in $[F])this.terminals_[W]&&W>E&&K.push("'"+this.terminals_[W]+"'");m.showPosition?Q="Parse error on line "+(v+1)+`:
|
|
2
2
|
`+m.showPosition()+`
|
|
3
3
|
Expecting `+K.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Q="Parse error on line "+(v+1)+": Unexpected "+(A==L?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(Q,{text:m.match,token:this.terminals_[A]||A,line:m.yylineno,loc:j,expected:K})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+A);switch(_[0]){case 1:i.push(A),p.push(m.yytext),c.push(m.yylloc),i.push(_[1]),A=null,M=m.yyleng,b=m.yytext,v=m.yylineno,j=m.yylloc;break;case 2:if(C=this.productions_[_[1]][1],D.$=p[p.length-C],D._$={first_line:c[c.length-(C||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(C||1)].first_column,last_column:c[c.length-1].last_column},X&&(D._$.range=[c[c.length-(C||1)].range[0],c[c.length-1].range[1]]),P=this.performAction.apply(D,[b,M,v,V.yy,_[1],p,c].concat(N)),typeof P!="undefined")return P;C&&(i=i.slice(0,-1*C*2),p=p.slice(0,-1*C),c=c.slice(0,-1*C)),i.push(this.productions_[_[1]][0]),p.push(D.$),c.push(D._$),et=$[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},R=function(){var T={EOF:1,parseError:l(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:l(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:l(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===d.length?this.yylloc.first_column:0)+d[d.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(t){this.unput(this.match.slice(t))},"less"),pastInput:l(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
package/dist/assets/{journeyDiagram-JHISSGLW-7b2c0jD5.js → journeyDiagram-JHISSGLW-D_bc-Ui0.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as gt}from"./chunk-FMBD7UC4-
|
|
1
|
+
import{g as gt}from"./chunk-FMBD7UC4-B_B1Wb1T.js";import{d as mt,g as lt,f as xt,e as kt}from"./chunk-ND2GUHAM-ByS8N5Mv.js";import{a1 as _t,b1 as vt,a2 as bt,b2 as wt,a6 as Tt,b4 as St,b as s,a4 as R,a$ as G,F as $t,t as Mt}from"./mermaid.core-DMuT20ap.js";import{d as it}from"./arc-Bx5cdrMs.js";import"./index-BPhAybEr.js";var U=function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],y=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,u,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:u.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:y,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:y,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],u=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc=="undefined"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=u.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(u=w,w=u.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b=="undefined")&&(b=tt()),T=v[A]&&v[A][b]),typeof T=="undefined"||!T.length||!T[0]){var X="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?X="Parse error on line "+(C+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(X,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q!="undefined")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===u.length?this.yylloc.first_column:0)+u[u.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as c,aE as ne,a4 as z,b0 as fe,al as ye,ao as be,aR as me,b7 as Ee,T as J,aZ as G,aD as ke,J as _e,av as Se,aA as le,M as ce}from"./mermaid.core-
|
|
1
|
+
import{b as c,aE as ne,a4 as z,b0 as fe,al as ye,ao as be,aR as me,b7 as Ee,T as J,aZ as G,aD as ke,J as _e,av as Se,aA as le,M as ce}from"./mermaid.core-DMuT20ap.js";import{g as Ne}from"./chunk-FMBD7UC4-B_B1Wb1T.js";import"./index-BPhAybEr.js";var ee=function(){var e=c(function(d,s,t,a){for(t=t||{},a=d.length;a--;t[d[a]]=s);return t},"o"),p=[1,4],f=[1,13],r=[1,12],m=[1,15],_=[1,16],u=[1,20],y=[1,19],D=[6,7,8],g=[1,26],O=[1,24],L=[1,25],E=[6,7,11],I=[1,31],i=[6,7,11,24],V=[1,6,13,16,17,20,23],M=[1,35],U=[1,36],w=[1,6,7,11,13,16,17,20,23],j=[1,38],B={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,t,a,l,h,n,T){var o=n.length-1;switch(h){case 6:case 7:return l;case 8:l.getLogger().trace("Stop NL ");break;case 9:l.getLogger().trace("Stop EOF ");break;case 11:l.getLogger().trace("Stop NL2 ");break;case 12:l.getLogger().trace("Stop EOF2 ");break;case 15:l.getLogger().info("Node: ",n[o-1].id),l.addNode(n[o-2].length,n[o-1].id,n[o-1].descr,n[o-1].type,n[o]);break;case 16:l.getLogger().info("Node: ",n[o].id),l.addNode(n[o-1].length,n[o].id,n[o].descr,n[o].type);break;case 17:l.getLogger().trace("Icon: ",n[o]),l.decorateNode({icon:n[o]});break;case 18:case 23:l.decorateNode({class:n[o]});break;case 19:l.getLogger().trace("SPACELIST");break;case 20:l.getLogger().trace("Node: ",n[o-1].id),l.addNode(0,n[o-1].id,n[o-1].descr,n[o-1].type,n[o]);break;case 21:l.getLogger().trace("Node: ",n[o].id),l.addNode(0,n[o].id,n[o].descr,n[o].type);break;case 22:l.decorateNode({icon:n[o]});break;case 27:l.getLogger().trace("node found ..",n[o-2]),this.$={id:n[o-1],descr:n[o-1],type:l.getType(n[o-2],n[o])};break;case 28:this.$={id:n[o],descr:n[o],type:0};break;case 29:l.getLogger().trace("node found ..",n[o-3]),this.$={id:n[o-3],descr:n[o-1],type:l.getType(n[o-2],n[o])};break;case 30:this.$=n[o-1]+n[o];break;case 31:this.$=n[o];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:p},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:p},{6:f,7:[1,10],9:9,12:11,13:r,14:14,16:m,17:_,18:17,19:18,20:u,23:y},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:f,12:21,13:r,14:14,16:m,17:_,18:17,19:18,20:u,23:y},{6:f,9:22,12:11,13:r,14:14,16:m,17:_,18:17,19:18,20:u,23:y},{6:g,7:O,10:23,11:L},e(E,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:u,23:y}),e(E,[2,19]),e(E,[2,21],{15:30,24:I}),e(E,[2,22]),e(E,[2,23]),e(i,[2,25]),e(i,[2,26]),e(i,[2,28],{20:[1,32]}),{21:[1,33]},{6:g,7:O,10:34,11:L},{1:[2,7],6:f,12:21,13:r,14:14,16:m,17:_,18:17,19:18,20:u,23:y},e(V,[2,14],{7:M,11:U}),e(w,[2,8]),e(w,[2,9]),e(w,[2,10]),e(E,[2,16],{15:37,24:I}),e(E,[2,17]),e(E,[2,18]),e(E,[2,20],{24:j}),e(i,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:M,11:U}),e(w,[2,11]),e(w,[2,12]),e(E,[2,15],{24:j}),e(i,[2,30]),{22:[1,41]},e(i,[2,27]),e(i,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,t){if(t.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=t,a}},"parseError"),parse:c(function(s){var t=this,a=[0],l=[],h=[null],n=[],T=this.table,o="",H=0,W=0,ue=2,re=1,ge=n.slice.call(arguments,1),k=Object.create(this.lexer),R={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(R.yy[Z]=this.yy[Z]);k.setInput(s,R.yy),R.yy.lexer=k,R.yy.parser=this,typeof k.yylloc=="undefined"&&(k.yylloc={});var q=k.yylloc;n.push(q);var de=k.options&&k.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(N){a.length=a.length-2*N,h.length=h.length-N,n.length=n.length-N}c(pe,"popStack");function ae(){var N;return N=l.pop()||k.lex()||re,typeof N!="number"&&(N instanceof Array&&(l=N,N=l.pop()),N=t.symbols_[N]||N),N}c(ae,"lex");for(var S,P,x,Q,F={},K,C,oe,Y;;){if(P=a[a.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((S===null||typeof S=="undefined")&&(S=ae()),x=T[P]&&T[P][S]),typeof x=="undefined"||!x.length||!x[0]){var $="";Y=[];for(K in T[P])this.terminals_[K]&&K>ue&&Y.push("'"+this.terminals_[K]+"'");k.showPosition?$="Parse error on line "+(H+1)+`:
|
|
2
2
|
`+k.showPosition()+`
|
|
3
3
|
Expecting `+Y.join(", ")+", got '"+(this.terminals_[S]||S)+"'":$="Parse error on line "+(H+1)+": Unexpected "+(S==re?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError($,{text:k.match,token:this.terminals_[S]||S,line:k.yylineno,loc:q,expected:Y})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+S);switch(x[0]){case 1:a.push(S),h.push(k.yytext),n.push(k.yylloc),a.push(x[1]),S=null,W=k.yyleng,o=k.yytext,H=k.yylineno,q=k.yylloc;break;case 2:if(C=this.productions_[x[1]][1],F.$=h[h.length-C],F._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},de&&(F._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),Q=this.performAction.apply(F,[o,W,H,R.yy,x[1],h,n].concat(ge)),typeof Q!="undefined")return Q;C&&(a=a.slice(0,-1*C*2),h=h.slice(0,-1*C),n=n.slice(0,-1*C)),a.push(this.productions_[x[1]][0]),h.push(F.$),n.push(F._$),oe=T[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},X=function(){var d={EOF:1,parseError:c(function(t,a){if(this.yy.parser)this.yy.parser.parseError(t,a);else throw new Error(t)},"parseError"),setInput:c(function(s,t){return this.yy=t||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var t=s.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var t=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===l.length?this.yylloc.first_column:0)+l[l.length-a.length].length-a[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),t=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as j,as as p,x as w,at as k,au as q}from"./mermaid.core-
|
|
1
|
+
import{H as j,as as p,x as w,at as k,au as q}from"./mermaid.core-DMuT20ap.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,b as F,a as x,f as z}from"./defaultLocale-CrowFXzY.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function B(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===B?n:I,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function I(){return 0}function P(n){return n===null?NaN:+n}const V=R(M),$=V.right;R(P).center;const H=Math.sqrt(50),O=Math.sqrt(10),T=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=H?10:f>=O?5:f>=T?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function C(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function E(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function G(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=d(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=d(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function d(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?G:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function N(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=N(u,e),f=t(a,f)):(e=N(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=N(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=$(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=d,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=E(n,r,t),f;switch(e=F(e==null?",f":e),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),x(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return z(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return C(e[0],e[e.length-1],t==null?10:t)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t==null?10:t,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,E as t};
|