@logan-jun/cd1-rag-chat 0.4.1 → 0.4.2
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-CEjm_TxR.js → arc-pCRNGa7W.js} +1 -1
- package/dist/assets/{architectureDiagram-3BPJPVTR-Cp2HDVpm.js → architectureDiagram-3BPJPVTR-BT3zjf2O.js} +1 -1
- package/dist/assets/{blockDiagram-GPEHLZMM-BQ00kwZS.js → blockDiagram-GPEHLZMM-DiCk9kRh.js} +1 -1
- package/dist/assets/{c4Diagram-AAUBKEIU-BisNzCoM.js → c4Diagram-AAUBKEIU-CLHkauF7.js} +1 -1
- package/dist/assets/channel-uh6PxTgh.js +1 -0
- package/dist/assets/{chunk-2J33WTMH-7IyosOxa.js → chunk-2J33WTMH-CXuH0ZJ2.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-DU7RqtVr.js → chunk-4BX2VUAB-JBWjMXmI.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-ShO3Sb5A.js → chunk-55IACEB6-DrdwYbrF.js} +1 -1
- package/dist/assets/{chunk-727SXJPM-V9W7Ke17.js → chunk-727SXJPM-EJreahwy.js} +1 -1
- package/dist/assets/{chunk-AQP2D5EJ-BAtFlD1X.js → chunk-AQP2D5EJ-BSuOE8Fl.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-q80IYdgk.js → chunk-FMBD7UC4-DytmfhVl.js} +1 -1
- package/dist/assets/{chunk-ND2GUHAM-BxUzbw-k.js → chunk-ND2GUHAM-34C1YW85.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CceniOhD.js → chunk-QZHKN3VN-CZc9G__T.js} +1 -1
- package/dist/assets/classDiagram-4FO5ZUOK-D7qIjrQs.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-D7qIjrQs.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DnjbZfMv.js → cose-bilkent-S5V4N54A-BnA4F643.js} +1 -1
- package/dist/assets/{dagre-BM42HDAG-Vrc6cQyG.js → dagre-BM42HDAG-C9p-bhyW.js} +1 -1
- package/dist/assets/{diagram-2AECGRRQ-lNhHRhuD.js → diagram-2AECGRRQ-B6FruBT9.js} +1 -1
- package/dist/assets/{diagram-5GNKFQAL-DH8NzNT1.js → diagram-5GNKFQAL-CC-X1vrW.js} +1 -1
- package/dist/assets/{diagram-KO2AKTUF-DQPWQ2wy.js → diagram-KO2AKTUF-5LSyCa2k.js} +1 -1
- package/dist/assets/{diagram-LMA3HP47-Bl01aqaJ.js → diagram-LMA3HP47-NCIkzHXK.js} +1 -1
- package/dist/assets/{diagram-OG6HWLK6-CN6tkRXI.js → diagram-OG6HWLK6-B2ml3GRH.js} +1 -1
- package/dist/assets/{erDiagram-TEJ5UH35-Dj9Ndw2F.js → erDiagram-TEJ5UH35-DPN3MDsL.js} +1 -1
- package/dist/assets/{flowDiagram-I6XJVG4X-CLJD1-kb.js → flowDiagram-I6XJVG4X-CRuJQi7u.js} +1 -1
- package/dist/assets/{ganttDiagram-6RSMTGT7-BB_i9I0Y.js → ganttDiagram-6RSMTGT7-D6D_Y_Y7.js} +1 -1
- package/dist/assets/{gitGraphDiagram-PVQCEYII-MO9maVdl.js → gitGraphDiagram-PVQCEYII-82gEHn57.js} +1 -1
- package/dist/assets/{index-jMWU4758.css → index-CNMccJ44.css} +1 -1
- package/dist/assets/{index-_zFISBb7.js → index-DS9nwwVz.js} +1 -1
- package/dist/assets/{infoDiagram-5YYISTIA-C_B7oRnK.js → infoDiagram-5YYISTIA-BARiYn_h.js} +1 -1
- package/dist/assets/{ishikawaDiagram-YF4QCWOH-DarTVWAu.js → ishikawaDiagram-YF4QCWOH-B_WSce8w.js} +1 -1
- package/dist/assets/{journeyDiagram-JHISSGLW-BgpyrCO4.js → journeyDiagram-JHISSGLW-CL3MtaGa.js} +1 -1
- package/dist/assets/{kanban-definition-UN3LZRKU-BcYBmdvA.js → kanban-definition-UN3LZRKU-Cksw8W8r.js} +1 -1
- package/dist/assets/{linear-D_Ntb4o6.js → linear-KbP41E8H.js} +1 -1
- package/dist/assets/{mermaid.core-NyHocDCX.js → mermaid.core-D_mFRtuY.js} +4 -4
- package/dist/assets/{mindmap-definition-RKZ34NQL-C6Sk83rn.js → mindmap-definition-RKZ34NQL-CvTMPwp2.js} +1 -1
- package/dist/assets/{pieDiagram-4H26LBE5-D2YGrcE9.js → pieDiagram-4H26LBE5-fBzvwZIV.js} +1 -1
- package/dist/assets/{quadrantDiagram-W4KKPZXB-MFs21wYG.js → quadrantDiagram-W4KKPZXB-DOq7H6qv.js} +1 -1
- package/dist/assets/{requirementDiagram-4Y6WPE33-BK6Jd7Or.js → requirementDiagram-4Y6WPE33-6dvh9aRE.js} +1 -1
- package/dist/assets/{sankeyDiagram-5OEKKPKP-Dv6QDqRj.js → sankeyDiagram-5OEKKPKP-BZRa0Yp5.js} +1 -1
- package/dist/assets/{sequenceDiagram-3UESZ5HK-DGvxyRnG.js → sequenceDiagram-3UESZ5HK-DoxI6gHW.js} +1 -1
- package/dist/assets/{stateDiagram-AJRCARHV-CZwz_oPu.js → stateDiagram-AJRCARHV-Dil73wf7.js} +1 -1
- package/dist/assets/stateDiagram-v2-BHNVJYJU-Cj5G8vUU.js +1 -0
- package/dist/assets/{timeline-definition-PNZ67QCA-BFlBr5uO.js → timeline-definition-PNZ67QCA-BybP4fDM.js} +1 -1
- package/dist/assets/{vennDiagram-CIIHVFJN-BjKRK01G.js → vennDiagram-CIIHVFJN-CIg8OwuQ.js} +1 -1
- package/dist/assets/{wardley-L42UT6IY-44Mdcee-.js → wardley-L42UT6IY-pXxmrIkF.js} +1 -1
- package/dist/assets/{wardleyDiagram-YWT4CUSO-DifoM5ez.js → wardleyDiagram-YWT4CUSO-DcjDNJ4g.js} +1 -1
- package/dist/assets/{xychartDiagram-2RQKCTM6-swy9ZKZN.js → xychartDiagram-2RQKCTM6-Y9DRV4WF.js} +1 -1
- package/dist/index.html +2 -2
- package/host-integration/HOST_INTEGRATION.md +123 -0
- package/host-integration/RemoteModule.vue +23 -1
- package/package.json +1 -1
- package/dist/assets/channel-BXznNZpQ.js +0 -1
- package/dist/assets/classDiagram-4FO5ZUOK-DVV0lX27.js +0 -1
- package/dist/assets/classDiagram-v2-Q7XG4LA2-DVV0lX27.js +0 -1
- package/dist/assets/stateDiagram-v2-BHNVJYJU-d31Ya4O3.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>"+we(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}}const yt=new lp;function j(e,t){return yt.parse(e,t)}j.options=j.setOptions=function(e){return yt.setOptions(e),j.defaults=yt.defaults,Ea(j.defaults),j};j.getDefaults=$i;j.defaults=wt;j.use=function(...e){return yt.use(...e),j.defaults=yt.defaults,Ea(j.defaults),j};j.walkTokens=function(e,t){return yt.walkTokens(e,t)};j.parseInline=yt.parseInline;j.Parser=Oe;j.parser=Oe.parse;j.Renderer=nr;j.TextRenderer=Ni;j.Lexer=Ee;j.lexer=Ee.lex;j.Tokenizer=er;j.Hooks=rn;j.parse=j;j.options;j.setOptions;j.use;j.walkTokens;j.parseInline;Oe.parse;Ee.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 lo(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 cp(e){if(Array.isArray(e))return e}function up(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 fp(){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 pp(e,t){return cp(e)||up(e,t)||hp(e,t)||fp()}function hp(e,t){if(e){if(typeof e=="string")return lo(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)?lo(e,t):void 0}}const za=Object.entries,co=Object.setPrototypeOf,dp=Object.isFrozen,mp=Object.getPrototypeOf,gp=Object.getOwnPropertyDescriptor;let he=Object.freeze,Ie=Object.seal,Rt=Object.create,Fa=typeof Reflect!="undefined"&&Reflect,ai=Fa.apply,li=Fa.construct;he||(he=function(t){return t});Ie||(Ie=function(t){return t});ai||(ai=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)});li||(li=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 St=se(Array.prototype.forEach),vp=se(Array.prototype.lastIndexOf),uo=se(Array.prototype.pop),At=se(Array.prototype.push),_p=se(Array.prototype.splice),fe=Array.isArray,en=se(String.prototype.toLowerCase),Rr=se(String.prototype.toString),fo=se(String.prototype.match),Et=se(String.prototype.replace),po=se(String.prototype.indexOf),yp=se(String.prototype.trim),bp=se(Number.prototype.toString),wp=se(Boolean.prototype.toString),ho=typeof BigInt=="undefined"?null:se(BigInt.prototype.toString),mo=typeof Symbol=="undefined"?null:se(Symbol.prototype.toString),te=se(Object.prototype.hasOwnProperty),Kt=se(Object.prototype.toString),ce=se(RegExp.prototype.test),Ln=xp(TypeError);function se(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 ai(e,t,r)}}function xp(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return li(e,n)}}function D(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:en;if(co&&co(e,null),!fe(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=n(i);s!==i&&(dp(t)||(t[r]=s),i=s)}e[i]=!0}return e}function kp(e){for(let t=0;t<e.length;t++)te(e,t)||(e[t]=null);return e}function me(e){const t=Rt(null);for(const r of za(e)){var n=pp(r,2);const i=n[0],s=n[1];te(e,i)&&(fe(s)?t[i]=kp(s):s&&typeof s=="object"&&s.constructor===Object?t[i]=me(s):t[i]=s)}return t}function Tp(e){switch(typeof e){case"string":return e;case"number":return bp(e);case"boolean":return wp(e);case"bigint":return ho?ho(e):"0";case"symbol":return mo?mo(e):"Symbol()";case"undefined":return Kt(e);case"function":case"object":{if(e===null)return Kt(e);const t=e,n=ft(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Kt(r)}return Kt(e)}default:return Kt(e)}}function ft(e,t){for(;e!==null;){const r=gp(e,t);if(r){if(r.get)return se(r.get);if(typeof r.value=="function")return se(r.value)}e=mp(e)}function n(){return null}return n}function Cp(e){try{return ce(e,""),!0}catch{return!1}}const go=he(["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"]),Ir=he(["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"]),Dr=he(["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"]),Sp=he(["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"]),Lr=he(["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"]),Ap=he(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),vo=he(["#text"]),_o=he(["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"]),Pr=he(["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"]),yo=he(["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"]),Pn=he(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ep=Ie(/{{[\w\W]*|^[\w\W]*}}/g),Op=Ie(/<%[\w\W]*|^[\w\W]*%>/g),$p=Ie(/\${[\w\W]*/g),Rp=Ie(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ip=Ie(/^aria-[\-\w]+$/),bo=Ie(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Dp=Ie(/^(?:\w+script|data):/i),Lp=Ie(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Pp=Ie(/^html$/i),Np=Ie(/^[a-z][.\w]*(-[.\w]+)+$/i),Ot={element:1,text:3,progressingInstruction:7,comment:8,document:9},Mp=function(){return typeof window=="undefined"?null:window},zp=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}},wo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ba(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Mp();const t=C=>Ba(C);if(t.version="3.4.5",t.removed=[],!e||!e.document||e.document.nodeType!==Ot.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,S=l.prototype,k=ft(S,"cloneNode"),F=ft(S,"remove"),$=ft(S,"nextSibling"),L=ft(S,"childNodes"),I=ft(S,"parentNode"),K=a&&a.prototype?ft(a.prototype,"nodeType"):null;if(typeof o=="function"){const C=n.createElement("template");C.content&&C.content.ownerDocument&&(n=C.content.ownerDocument)}let N,q="";const oe=n,_e=oe.implementation,Me=oe.createNodeIterator,ye=oe.createDocumentFragment,h=oe.getElementsByTagName,p=r.importNode;let d=wo();t.isSupported=typeof za=="function"&&typeof I=="function"&&_e&&_e.createHTMLDocument!==void 0;const b=Ep,T=Op,O=$p,A=Rp,R=Ip,z=Dp,B=Lp,H=Np;let ee=bo,U=null;const ze=D({},[...go,...Ir,...Dr,...Lr,...vo]);let J=null;const Fe=D({},[..._o,...Pr,...yo,...Pn]);let W=Object.seal(Rt(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,_n=null;const Je=Object.seal(Rt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let zi=!0,cr=!0,Fi=!1,Bi=!0,Qe=!1,Ut=!0,lt=!1,ur=!1,fr=!1,xt=!1,yn=!1,bn=!1,Hi=!0,Ui=!1;const ji="user-content-";let pr=!0,jt=!1,kt={},Be=null;const hr=D({},["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 Wi=null;const Gi=D({},["audio","video","img","source","image","track"]);let dr=null;const qi=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),wn="http://www.w3.org/1998/Math/MathML",xn="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml";let Tt=He,mr=!1,gr=null;const Za=D({},[wn,xn,He],Rr);let vr=D({},["mi","mo","mn","ms","mtext"]),_r=D({},["annotation-xml"]);const Ya=D({},["title","style","font","a","script"]);let Wt=null;const Xa=["application/xhtml+xml","text/html"],Ka="text/html";let ae=null,Ct=null;const Ja=n.createElement("form"),Zi=function(c){return c instanceof RegExp||c instanceof Function},yr=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ct&&Ct===c)return;(!c||typeof c!="object")&&(c={}),c=me(c),Wt=Xa.indexOf(c.PARSER_MEDIA_TYPE)===-1?Ka:c.PARSER_MEDIA_TYPE,ae=Wt==="application/xhtml+xml"?Rr:en,U=te(c,"ALLOWED_TAGS")&&fe(c.ALLOWED_TAGS)?D({},c.ALLOWED_TAGS,ae):ze,J=te(c,"ALLOWED_ATTR")&&fe(c.ALLOWED_ATTR)?D({},c.ALLOWED_ATTR,ae):Fe,gr=te(c,"ALLOWED_NAMESPACES")&&fe(c.ALLOWED_NAMESPACES)?D({},c.ALLOWED_NAMESPACES,Rr):Za,dr=te(c,"ADD_URI_SAFE_ATTR")&&fe(c.ADD_URI_SAFE_ATTR)?D(me(qi),c.ADD_URI_SAFE_ATTR,ae):qi,Wi=te(c,"ADD_DATA_URI_TAGS")&&fe(c.ADD_DATA_URI_TAGS)?D(me(Gi),c.ADD_DATA_URI_TAGS,ae):Gi,Be=te(c,"FORBID_CONTENTS")&&fe(c.FORBID_CONTENTS)?D({},c.FORBID_CONTENTS,ae):hr,je=te(c,"FORBID_TAGS")&&fe(c.FORBID_TAGS)?D({},c.FORBID_TAGS,ae):me({}),_n=te(c,"FORBID_ATTR")&&fe(c.FORBID_ATTR)?D({},c.FORBID_ATTR,ae):me({}),kt=te(c,"USE_PROFILES")?c.USE_PROFILES&&typeof c.USE_PROFILES=="object"?me(c.USE_PROFILES):c.USE_PROFILES:!1,zi=c.ALLOW_ARIA_ATTR!==!1,cr=c.ALLOW_DATA_ATTR!==!1,Fi=c.ALLOW_UNKNOWN_PROTOCOLS||!1,Bi=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qe=c.SAFE_FOR_TEMPLATES||!1,Ut=c.SAFE_FOR_XML!==!1,lt=c.WHOLE_DOCUMENT||!1,xt=c.RETURN_DOM||!1,yn=c.RETURN_DOM_FRAGMENT||!1,bn=c.RETURN_TRUSTED_TYPE||!1,fr=c.FORCE_BODY||!1,Hi=c.SANITIZE_DOM!==!1,Ui=c.SANITIZE_NAMED_PROPS||!1,pr=c.KEEP_CONTENT!==!1,jt=c.IN_PLACE||!1,ee=Cp(c.ALLOWED_URI_REGEXP)?c.ALLOWED_URI_REGEXP:bo,Tt=typeof c.NAMESPACE=="string"?c.NAMESPACE:He,vr=te(c,"MATHML_TEXT_INTEGRATION_POINTS")&&c.MATHML_TEXT_INTEGRATION_POINTS&&typeof c.MATHML_TEXT_INTEGRATION_POINTS=="object"?me(c.MATHML_TEXT_INTEGRATION_POINTS):D({},["mi","mo","mn","ms","mtext"]),_r=te(c,"HTML_INTEGRATION_POINTS")&&c.HTML_INTEGRATION_POINTS&&typeof c.HTML_INTEGRATION_POINTS=="object"?me(c.HTML_INTEGRATION_POINTS):D({},["annotation-xml"]);const v=te(c,"CUSTOM_ELEMENT_HANDLING")&&c.CUSTOM_ELEMENT_HANDLING&&typeof c.CUSTOM_ELEMENT_HANDLING=="object"?me(c.CUSTOM_ELEMENT_HANDLING):Rt(null);if(W=Rt(null),te(v,"tagNameCheck")&&Zi(v.tagNameCheck)&&(W.tagNameCheck=v.tagNameCheck),te(v,"attributeNameCheck")&&Zi(v.attributeNameCheck)&&(W.attributeNameCheck=v.attributeNameCheck),te(v,"allowCustomizedBuiltInElements")&&typeof v.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=v.allowCustomizedBuiltInElements),Qe&&(cr=!1),yn&&(xt=!0),kt&&(U=D({},vo),J=Rt(null),kt.html===!0&&(D(U,go),D(J,_o)),kt.svg===!0&&(D(U,Ir),D(J,Pr),D(J,Pn)),kt.svgFilters===!0&&(D(U,Dr),D(J,Pr),D(J,Pn)),kt.mathMl===!0&&(D(U,Lr),D(J,yo),D(J,Pn))),Je.tagCheck=null,Je.attributeCheck=null,te(c,"ADD_TAGS")&&(typeof c.ADD_TAGS=="function"?Je.tagCheck=c.ADD_TAGS:fe(c.ADD_TAGS)&&(U===ze&&(U=me(U)),D(U,c.ADD_TAGS,ae))),te(c,"ADD_ATTR")&&(typeof c.ADD_ATTR=="function"?Je.attributeCheck=c.ADD_ATTR:fe(c.ADD_ATTR)&&(J===Fe&&(J=me(J)),D(J,c.ADD_ATTR,ae))),te(c,"ADD_URI_SAFE_ATTR")&&fe(c.ADD_URI_SAFE_ATTR)&&D(dr,c.ADD_URI_SAFE_ATTR,ae),te(c,"FORBID_CONTENTS")&&fe(c.FORBID_CONTENTS)&&(Be===hr&&(Be=me(Be)),D(Be,c.FORBID_CONTENTS,ae)),te(c,"ADD_FORBID_CONTENTS")&&fe(c.ADD_FORBID_CONTENTS)&&(Be===hr&&(Be=me(Be)),D(Be,c.ADD_FORBID_CONTENTS,ae)),pr&&(U["#text"]=!0),lt&&D(U,["html","head","body"]),U.table&&(D(U,["tbody"]),delete je.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ln('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ln('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=c.TRUSTED_TYPES_POLICY,q=N.createHTML("")}else N===void 0&&(N=zp(w,i)),N!==null&&typeof q=="string"&&(q=N.createHTML(""));he&&he(c),Ct=c},Yi=D({},[...Ir,...Dr,...Sp]),Xi=D({},[...Lr,...Ap]),Qa=function(c){let v=I(c);(!v||!v.tagName)&&(v={namespaceURI:Tt,tagName:"template"});const x=en(c.tagName),M=en(v.tagName);return gr[c.namespaceURI]?c.namespaceURI===xn?v.namespaceURI===He?x==="svg":v.namespaceURI===wn?x==="svg"&&(M==="annotation-xml"||vr[M]):!!Yi[x]:c.namespaceURI===wn?v.namespaceURI===He?x==="math":v.namespaceURI===xn?x==="math"&&_r[M]:!!Xi[x]:c.namespaceURI===He?v.namespaceURI===xn&&!_r[M]||v.namespaceURI===wn&&!vr[M]?!1:!Xi[x]&&(Ya[x]||!Yi[x]):!!(Wt==="application/xhtml+xml"&&gr[c.namespaceURI]):!1},De=function(c){At(t.removed,{element:c});try{I(c).removeChild(c)}catch{F(c)}},ct=function(c,v){try{At(t.removed,{attribute:v.getAttributeNode(c),from:v})}catch{At(t.removed,{attribute:null,from:v})}if(v.removeAttribute(c),c==="is")if(xt||yn)try{De(v)}catch{}else try{v.setAttribute(c,"")}catch{}},Ki=function(c){let v=null,x=null;if(fr)c="<remove></remove>"+c;else{const ie=fo(c,/^[\r\n\t ]+/);x=ie&&ie[0]}Wt==="application/xhtml+xml"&&Tt===He&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");const M=N?N.createHTML(c):c;if(Tt===He)try{v=new _().parseFromString(M,Wt)}catch{}if(!v||!v.documentElement){v=_e.createDocument(Tt,"template",null);try{v.documentElement.innerHTML=mr?q:M}catch{}}const re=v.body||v.documentElement;return c&&x&&re.insertBefore(n.createTextNode(x),re.childNodes[0]||null),Tt===He?h.call(v,lt?"html":"body")[0]:lt?v.documentElement:re},Ji=function(c){return Me.call(c.ownerDocument||c,c,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Qi=function(c){c.normalize();const v=Me.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 M=x.data;St([b,T,O],re=>{M=Et(M,re," ")}),x.data=M,x=v.nextNode()}},br=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")},kn=function(c){if(!K||typeof c!="object"||c===null)return!1;try{return typeof K(c)=="number"}catch{return!1}};function We(C,c,v){St(C,x=>{x.call(t,c,v,Ct)})}const Vi=function(c){let v=null;if(We(d.beforeSanitizeElements,c,null),br(c))return De(c),!0;const x=ae(c.nodeName);if(We(d.uponSanitizeElement,c,{tagName:x,allowedTags:U}),Ut&&c.hasChildNodes()&&!kn(c.firstElementChild)&&ce(/<[/\w!]/g,c.innerHTML)&&ce(/<[/\w!]/g,c.textContent)||Ut&&c.namespaceURI===He&&x==="style"&&kn(c.firstElementChild)||c.nodeType===Ot.progressingInstruction||Ut&&c.nodeType===Ot.comment&&ce(/<[/\w]/g,c.data))return De(c),!0;if(je[x]||!(Je.tagCheck instanceof Function&&Je.tagCheck(x))&&!U[x]){if(!je[x]&&ts(x)&&(W.tagNameCheck instanceof RegExp&&ce(W.tagNameCheck,x)||W.tagNameCheck instanceof Function&&W.tagNameCheck(x)))return!1;if(pr&&!Be[x]){const M=I(c)||c.parentNode,re=L(c)||c.childNodes;if(re&&M){const ie=re.length;for(let de=ie-1;de>=0;--de){const Ve=k(re[de],!0);M.insertBefore(Ve,$(c))}}}return De(c),!0}return c instanceof l&&!Qa(c)||(x==="noscript"||x==="noembed"||x==="noframes")&&ce(/<\/no(script|embed|frames)/i,c.innerHTML)?(De(c),!0):(Qe&&c.nodeType===Ot.text&&(v=c.textContent,St([b,T,O],M=>{v=Et(v,M," ")}),c.textContent!==v&&(At(t.removed,{element:c.cloneNode()}),c.textContent=v)),We(d.afterSanitizeElements,c,null),!1)},es=function(c,v,x){if(_n[v]||Hi&&(v==="id"||v==="name")&&(x in n||x in Ja))return!1;const M=J[v]||Je.attributeCheck instanceof Function&&Je.attributeCheck(v,c);if(!(cr&&!_n[v]&&ce(A,v))){if(!(zi&&ce(R,v))){if(!M||_n[v]){if(!(ts(c)&&(W.tagNameCheck instanceof RegExp&&ce(W.tagNameCheck,c)||W.tagNameCheck instanceof Function&&W.tagNameCheck(c))&&(W.attributeNameCheck instanceof RegExp&&ce(W.attributeNameCheck,v)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(v,c))||v==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&ce(W.tagNameCheck,x)||W.tagNameCheck instanceof Function&&W.tagNameCheck(x))))return!1}else if(!dr[v]){if(!ce(ee,Et(x,B,""))){if(!((v==="src"||v==="xlink:href"||v==="href")&&c!=="script"&&po(x,"data:")===0&&Wi[c])){if(!(Fi&&!ce(z,Et(x,B,"")))){if(x)return!1}}}}}}return!0},Va=D({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ts=function(c){return!Va[en(c)]&&ce(H,c)},ns=function(c){We(d.beforeSanitizeAttributes,c,null);const v=c.attributes;if(!v||br(c))return;const x={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:J,forceKeepAttr:void 0};let M=v.length;for(;M--;){const re=v[M],ie=re.name,de=re.namespaceURI,Ve=re.value,Ge=ae(ie),xr=Ve;let le=ie==="value"?xr:yp(xr);if(x.attrName=Ge,x.attrValue=le,x.keepAttr=!0,x.forceKeepAttr=void 0,We(d.uponSanitizeAttribute,c,x),le=x.attrValue,Ui&&(Ge==="id"||Ge==="name")&&po(le,ji)!==0&&(ct(ie,c),le=ji+le),Ut&&ce(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,le)){ct(ie,c);continue}if(Ge==="attributename"&&fo(le,"href")){ct(ie,c);continue}if(x.forceKeepAttr)continue;if(!x.keepAttr){ct(ie,c);continue}if(!Bi&&ce(/\/>/i,le)){ct(ie,c);continue}Qe&&St([b,T,O],is=>{le=Et(le,is," ")});const rs=ae(c.nodeName);if(!es(rs,Ge,le)){ct(ie,c);continue}if(N&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!de)switch(w.getAttributeType(rs,Ge)){case"TrustedHTML":{le=N.createHTML(le);break}case"TrustedScriptURL":{le=N.createScriptURL(le);break}}if(le!==xr)try{de?c.setAttributeNS(de,ie,le):c.setAttribute(ie,le),br(c)?De(c):uo(t.removed)}catch{ct(ie,c)}}We(d.afterSanitizeAttributes,c,null)},wr=function(c){let v=null;const x=Ji(c);for(We(d.beforeSanitizeShadowDOM,c,null);v=x.nextNode();)We(d.uponSanitizeShadowNode,v,null),Vi(v),ns(v),v.content instanceof s&&wr(v.content);We(d.afterSanitizeShadowDOM,c,null)},Tn=function(c){if(c.nodeType===Ot.element&&c.shadowRoot instanceof s){const M=c.shadowRoot;Tn(M),wr(M)}const v=c.childNodes;if(!v)return;const x=[];St(v,M=>{At(x,M)});for(const M of x)Tn(M)};return t.sanitize=function(C){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=null,x=null,M=null,re=null;if(mr=!C,mr&&(C="<!-->"),typeof C!="string"&&!kn(C)&&(C=Tp(C),typeof C!="string"))throw Ln("dirty is not a string, aborting");if(!t.isSupported)return C;if(ur||yr(c),t.removed=[],typeof C=="string"&&(jt=!1),jt){const Ve=C.nodeName;if(typeof Ve=="string"){const Ge=ae(Ve);if(!U[Ge]||je[Ge])throw Ln("root node is forbidden and cannot be sanitized in-place")}Tn(C)}else if(kn(C))v=Ki("<!---->"),x=v.ownerDocument.importNode(C,!0),x.nodeType===Ot.element&&x.nodeName==="BODY"||x.nodeName==="HTML"?v=x:v.appendChild(x),Tn(x);else{if(!xt&&!Qe&&!lt&&C.indexOf("<")===-1)return N&&bn?N.createHTML(C):C;if(v=Ki(C),!v)return xt?null:bn?q:""}v&&fr&&De(v.firstChild);const ie=Ji(jt?C:v);for(;M=ie.nextNode();)Vi(M),ns(M),M.content instanceof s&&wr(M.content);if(jt)return Qe&&Qi(C),C;if(xt){if(Qe&&Qi(v),yn)for(re=ye.call(v.ownerDocument);v.firstChild;)re.appendChild(v.firstChild);else re=v;return(J.shadowroot||J.shadowrootmode)&&(re=p.call(r,re,!0)),re}let de=lt?v.outerHTML:v.innerHTML;return lt&&U["!doctype"]&&v.ownerDocument&&v.ownerDocument.doctype&&v.ownerDocument.doctype.name&&ce(Pp,v.ownerDocument.doctype.name)&&(de="<!DOCTYPE "+v.ownerDocument.doctype.name+`>
|
|
62
62
|
`+de),Qe&&St([b,T,O],Ve=>{de=Et(de,Ve," ")}),N&&bn?N.createHTML(de):de},t.setConfig=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yr(C),ur=!0},t.clearConfig=function(){Ct=null,ur=!1},t.isValidAttribute=function(C,c,v){Ct||yr({});const x=ae(C),M=ae(c);return es(x,M,v)},t.addHook=function(C,c){typeof c=="function"&&At(d[C],c)},t.removeHook=function(C,c){if(c!==void 0){const v=vp(d[C],c);return v===-1?void 0:_p(d[C],v,1)[0]}return uo(d[C])},t.removeHooks=function(C){d[C]=[]},t.removeAllHooks=function(){d=wo()},t}var Fp=Ba();function Bp(e){return btoa(unescape(encodeURIComponent(e)))}function Nn(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}j.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">${Nn(t)}</div>`;const i=Nn(t),s=Bp(t);return`<div class="code-card"><div class="code-head"><span class="code-lang">${Nn(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-${Nn(r)}">${i}</code></pre></div>`}}});function Hp(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 Up(e,t=!1){let n=e;if(t){const i=Hp(e);i.hasUnclosedCodeBlock&&(n+="\n```"),i.hasUnclosedInlineCode&&(n+="`"),i.hasUnclosedBoldStar&&(n+="**"),i.hasUnclosedBoldUnderscore&&(n+="__")}const r=j.parse(n);return Fp.sanitize(r,{ADD_ATTR:["target","rel","data-code"],ADD_TAGS:["svg","path","g","foreignObject","marker","defs","pattern"]})}async function jp(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 ko(e){return e.replace(/"/g,""").replace(/\[/g,"(").replace(/\]/g,")")}function Wp(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 Gp(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=Wp(r),r=r.replace(/(\b\w+)\[\[([^\]\n]*)\]\]/g,(i,s,o)=>o.startsWith('"')&&o.endsWith('"')?i:`${s}[["${ko(o)}"]]`),r=r.replace(/(\b\w+)\[(?!\[|\()([^\]\n]*)\]/g,(i,s,o)=>o.startsWith('"')&&o.endsWith('"')?i:`${s}["${ko(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 qp(e){const t="```mermaid\n"+e+"```";return Gp(t).replace(/^```mermaid\s*\n/,"").replace(/```\s*$/,"")}let To=!1,Jt=null;async function Zp(){if(!Jt){const e=await Of(()=>import("./mermaid.core-NyHocDCX.js").then(t=>t.aI),[],import.meta.url);Jt=e.default||e}return!To&&Jt&&(Jt.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",fontFamily:"inherit"}),To=!0),Jt}async function Yp(e){const t=e.querySelectorAll(".mermaid");if(t.length)try{const n=await Zp(),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=qp(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(),Xp(s,o)}),s.appendChild(o)}}catch(n){console.warn("[mermaid] render failed:",n)}}async function Xp(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 S=n.getAttribute("viewBox");if(S){const[,,k,F]=S.split(/\s+/).map(Number);k&&F&&(s=Math.ceil(k),o=Math.ceil(F))}}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((S,k)=>{g.onload=()=>{console.log("[mermaid-capture] img loaded",g.naturalWidth,g.naturalHeight),S()},g.onerror=F=>{console.error("[mermaid-capture] img load failed",F),k(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=S=>{const k=document.createElement("a");k.href=S;const F=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19);k.download=`mermaid-${F}.png`,k.style.display="none",document.body.appendChild(k),k.click(),setTimeout(()=>k.remove(),0)};try{await new Promise(S=>{y.toBlob(k=>{if(k){const F=URL.createObjectURL(k);w(F),setTimeout(()=>URL.revokeObjectURL(F),1500)}else w(y.toDataURL("image/png"));S()},"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 Kp={name:"StreamingMarkdown",props:{content:{type:String,required:!0},isStreaming:{type:Boolean,default:!1}},setup(e){const t=be(null),n=Cl(()=>Up(e.content,e.isStreaming));function r(s){const o=s.target;o&&jp(o)}async function i(){e.isStreaming||(await dn(),t.value&&await Yp(t.value))}return Vo(i),ar(()=>[e.content,e.isStreaming],i),{root:t,rendered:n,onClick:r}}};function Ht(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 Jp=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}})},Qp=[],Vp=Ht(Kp,Jp,Qp,!1,null,null);const eh=Vp.exports,th={name:"StatusHistory",props:{items:{type:Array,default:()=>[]}}};var nh=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"}})]):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))])])}),0):t._e()},rh=[],ih=Ht(th,nh,rh,!1,null,"f1233fd0");const sh=ih.exports,oh={name:"MessageItem",components:{StreamingMarkdown:eh,StatusHistory:sh},props:{message:{type:Object,required:!0}}};var ah=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.toolProcessing?n("div",{staticClass:"mi-tool-processing"},[n("span"),n("span"),n("span"),n("em",[t._v("분석 중...")])]):t._e(),t.message.content?n("StreamingMarkdown",{attrs:{content:t.message.content,"is-streaming":!!t.message.isStreaming}}):t.message.isStreaming&&!t.message.toolProcessing&&(!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-bubble-user"},[t._v(t._s(t.message.content))])])]],2)},lh=[],ch=Ht(oh,ah,lh,!1,null,"a9af1281");const uh=ch.exports,fh={name:"ChatInput",props:{busy:{type:Boolean,default:!1},placeholder:{type:String,default:"질문을 입력하세요..."},prefillText:{type:String,default:""}},emits:["submit","cancel","prefill-consumed"],setup(e,{emit:t}){const n=be("");ar(()=>e.prefillText,o=>{o&&(n.value=o,t("prefill-consumed"))});function r(){const o=n.value.trim();o&&(t("submit",o),n.value="")}function i(){t("cancel")}function s(o){o.key==="Enter"&&(o.isComposing||o.keyCode===229||o.shiftKey||(o.preventDefault(),r()))}return{text:n,submit:r,onCancel:i,onKeyDown:s}}};var ph=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{staticClass:"ci-root"},[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("전송")])])])},hh=[],dh=Ht(fh,ph,hh,!1,null,"ec0be156");const mh=dh.exports,gh={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 vh=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(" 아직 대화가 없습니다. ")])])},_h=[],yh=Ht(gh,vh,_h,!1,null,"3db415ee");const bh=yh.exports,wh=/^https:\/\/([a-z0-9-]+\.)*hyundaicard\.com$/;function Ha(e){return e?wh.test(e):!1}function xh(){try{if(!document.referrer)return null;const e=new URL(document.referrer).origin;return Ha(e)?e:null}catch{return null}}let ci=null,ui=null;function kh(e){ui=e}const Ae=kl({token:null,baseUrl:null,user:null,hostRoute:null});function rr(e){if(!window.parent||window.parent===window)return;const t=ci||xh();t&&window.parent.postMessage(e,t)}function Th(){window.addEventListener("message",t=>{var r,i,s,o,a;if(!Ha(t.origin))return;const n=t.data;if(!(!n||typeof n!="object"))switch(ci||(ci=t.origin),n.type){case"init":Ae.token=(r=n.token)!=null?r:null,Ae.baseUrl=(i=n.baseUrl)!=null?i:null,Ae.user=(s=n.user)!=null?s:null;break;case"token":Ae.token=(o=n.token)!=null?o:null;break;case"route":Ae.hostRoute=(a=n.path)!=null?a:null;break;case"prompt":ui&&typeof n.prompt=="string"&&n.prompt.trim()&&ui({prompt:n.prompt,autoSend:n.autoSend,newConversation:n.newConversation,mode:n.mode,meta:n.meta});break}}),new ResizeObserver(()=>{const t=document.documentElement.scrollHeight;rr({type:"height",value:t})}).observe(document.documentElement),rr({type:"ready"})}function Ua(){rr({type:"request-token"})}function Ch(e){rr({type:"busy",meta:e})}ar(()=>({...Ae}),e=>console.debug("[sample-feature] session updated",e),{deep:!0});const Nr={},ja=(Nr==null?void 0:Nr.VITE_USE_MOCK)==="true",Sh="https://bdp-agent.hyundaicard.com",Ah="https://bdp-agent-dev.hyundaicard.com";function Eh(){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)?Ah:Sh}function Wa(e){return Ae.baseUrl?Ae.baseUrl+e:Eh()+e}async function Oh(e,t,n){if(ja)return Ih(e,t,n);const r=Wa("/agents/hdsp_rag/chat/stream"),i={"Content-Type":"application/json",Accept:"text/event-stream"};Ae.token&&(i.Authorization=`Bearer ${Ae.token}`);const s=await fetch(r,{method:"POST",headers:i,body:JSON.stringify(e),signal:n});if(s.status===401)throw Ua(),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 Gp(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=Wp(r),r=r.replace(/(\b\w+)\[\[([^\]\n]*)\]\]/g,(i,s,o)=>o.startsWith('"')&&o.endsWith('"')?i:`${s}[["${ko(o)}"]]`),r=r.replace(/(\b\w+)\[(?!\[|\()([^\]\n]*)\]/g,(i,s,o)=>o.startsWith('"')&&o.endsWith('"')?i:`${s}["${ko(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 qp(e){const t="```mermaid\n"+e+"```";return Gp(t).replace(/^```mermaid\s*\n/,"").replace(/```\s*$/,"")}let To=!1,Jt=null;async function Zp(){if(!Jt){const e=await Of(()=>import("./mermaid.core-D_mFRtuY.js").then(t=>t.aI),[],import.meta.url);Jt=e.default||e}return!To&&Jt&&(Jt.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",fontFamily:"inherit"}),To=!0),Jt}async function Yp(e){const t=e.querySelectorAll(".mermaid");if(t.length)try{const n=await Zp(),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=qp(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(),Xp(s,o)}),s.appendChild(o)}}catch(n){console.warn("[mermaid] render failed:",n)}}async function Xp(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 S=n.getAttribute("viewBox");if(S){const[,,k,F]=S.split(/\s+/).map(Number);k&&F&&(s=Math.ceil(k),o=Math.ceil(F))}}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((S,k)=>{g.onload=()=>{console.log("[mermaid-capture] img loaded",g.naturalWidth,g.naturalHeight),S()},g.onerror=F=>{console.error("[mermaid-capture] img load failed",F),k(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=S=>{const k=document.createElement("a");k.href=S;const F=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19);k.download=`mermaid-${F}.png`,k.style.display="none",document.body.appendChild(k),k.click(),setTimeout(()=>k.remove(),0)};try{await new Promise(S=>{y.toBlob(k=>{if(k){const F=URL.createObjectURL(k);w(F),setTimeout(()=>URL.revokeObjectURL(F),1500)}else w(y.toDataURL("image/png"));S()},"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 Kp={name:"StreamingMarkdown",props:{content:{type:String,required:!0},isStreaming:{type:Boolean,default:!1}},setup(e){const t=be(null),n=Cl(()=>Up(e.content,e.isStreaming));function r(s){const o=s.target;o&&jp(o)}async function i(){e.isStreaming||(await dn(),t.value&&await Yp(t.value))}return Vo(i),ar(()=>[e.content,e.isStreaming],i),{root:t,rendered:n,onClick:r}}};function Ht(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 Jp=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}})},Qp=[],Vp=Ht(Kp,Jp,Qp,!1,null,null);const eh=Vp.exports,th={name:"StatusHistory",props:{items:{type:Array,default:()=>[]}}};var nh=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"}})]):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))])])}),0):t._e()},rh=[],ih=Ht(th,nh,rh,!1,null,"f1233fd0");const sh=ih.exports,oh={name:"MessageItem",components:{StreamingMarkdown:eh,StatusHistory:sh},props:{message:{type:Object,required:!0}}};var ah=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.toolProcessing?n("div",{staticClass:"mi-tool-processing"},[n("span"),n("span"),n("span"),n("em",[t._v("분석 중...")])]):t._e(),t.message.content?n("StreamingMarkdown",{attrs:{content:t.message.content,"is-streaming":!!t.message.isStreaming}}):t.message.isStreaming&&!t.message.toolProcessing&&(!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-bubble-user"},[t._v(t._s(t.message.content))])])]],2)},lh=[],ch=Ht(oh,ah,lh,!1,null,"a9af1281");const uh=ch.exports,fh={name:"ChatInput",props:{busy:{type:Boolean,default:!1},placeholder:{type:String,default:"질문을 입력하세요..."},prefillText:{type:String,default:""}},emits:["submit","cancel","prefill-consumed"],setup(e,{emit:t}){const n=be("");ar(()=>e.prefillText,o=>{o&&(n.value=o,t("prefill-consumed"))});function r(){const o=n.value.trim();o&&(t("submit",o),n.value="")}function i(){t("cancel")}function s(o){o.key==="Enter"&&(o.isComposing||o.keyCode===229||o.shiftKey||(o.preventDefault(),r()))}return{text:n,submit:r,onCancel:i,onKeyDown:s}}};var ph=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{staticClass:"ci-root"},[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("전송")])])])},hh=[],dh=Ht(fh,ph,hh,!1,null,"ec0be156");const mh=dh.exports,gh={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 vh=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(" 아직 대화가 없습니다. ")])])},_h=[],yh=Ht(gh,vh,_h,!1,null,"3db415ee");const bh=yh.exports,wh=/^https:\/\/([a-z0-9-]+\.)*hyundaicard\.com$/;function Ha(e){return e?wh.test(e):!1}function xh(){try{if(!document.referrer)return null;const e=new URL(document.referrer).origin;return Ha(e)?e:null}catch{return null}}let ci=null,ui=null;function kh(e){ui=e}const Ae=kl({token:null,baseUrl:null,user:null,hostRoute:null});function rr(e){if(!window.parent||window.parent===window)return;const t=ci||xh();t&&window.parent.postMessage(e,t)}function Th(){window.addEventListener("message",t=>{var r,i,s,o,a;if(!Ha(t.origin))return;const n=t.data;if(!(!n||typeof n!="object"))switch(ci||(ci=t.origin),n.type){case"init":Ae.token=(r=n.token)!=null?r:null,Ae.baseUrl=(i=n.baseUrl)!=null?i:null,Ae.user=(s=n.user)!=null?s:null;break;case"token":Ae.token=(o=n.token)!=null?o:null;break;case"route":Ae.hostRoute=(a=n.path)!=null?a:null;break;case"prompt":ui&&typeof n.prompt=="string"&&n.prompt.trim()&&ui({prompt:n.prompt,autoSend:n.autoSend,newConversation:n.newConversation,mode:n.mode,meta:n.meta});break}}),new ResizeObserver(()=>{const t=document.documentElement.scrollHeight;rr({type:"height",value:t})}).observe(document.documentElement),rr({type:"ready"})}function Ua(){rr({type:"request-token"})}function Ch(e){rr({type:"busy",meta:e})}ar(()=>({...Ae}),e=>console.debug("[sample-feature] session updated",e),{deep:!0});const Nr={},ja=(Nr==null?void 0:Nr.VITE_USE_MOCK)==="true",Sh="https://bdp-agent.hyundaicard.com",Ah="https://bdp-agent-dev.hyundaicard.com";function Eh(){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)?Ah:Sh}function Wa(e){return Ae.baseUrl?Ae.baseUrl+e:Eh()+e}async function Oh(e,t,n){if(ja)return Ih(e,t,n);const r=Wa("/agents/hdsp_rag/chat/stream"),i={"Content-Type":"application/json",Accept:"text/event-stream"};Ae.token&&(i.Authorization=`Bearer ${Ae.token}`);const s=await fetch(r,{method:"POST",headers:i,body:JSON.stringify(e),signal:n});if(s.status===401)throw Ua(),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 _=Rh(y);_&&t(_)}}}async function $h(e,t){if(ja)return await new Promise(s=>setTimeout(s,600)),{summary:`## 세션 목표
|
|
66
66
|
사용자는 이전 대화 맥락을 유지하면서 추가 질문을 이어가려 합니다.
|
|
@@ -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-D_mFRtuY.js";import{p as g}from"./wardley-L42UT6IY-pXxmrIkF.js";import"./index-DS9nwwVz.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-DarTVWAu.js → ishikawaDiagram-YF4QCWOH-B_WSce8w.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-D_mFRtuY.js";import"./index-DS9nwwVz.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-BgpyrCO4.js → journeyDiagram-JHISSGLW-CL3MtaGa.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as gt}from"./chunk-FMBD7UC4-
|
|
1
|
+
import{g as gt}from"./chunk-FMBD7UC4-DytmfhVl.js";import{d as mt,g as lt,f as xt,e as kt}from"./chunk-ND2GUHAM-34C1YW85.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-D_mFRtuY.js";import{d as it}from"./arc-pCRNGa7W.js";import"./index-DS9nwwVz.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-D_mFRtuY.js";import{g as Ne}from"./chunk-FMBD7UC4-DytmfhVl.js";import"./index-DS9nwwVz.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-D_mFRtuY.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};
|