@sy-design/svelte 1.0.8 → 1.0.9

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/index.es.js CHANGED
@@ -122,7 +122,7 @@ function r(s, e, t) {
122
122
  function Ci(s) {
123
123
  return Array.from(s.childNodes);
124
124
  }
125
- function De(s, e) {
125
+ function Ne(s, e) {
126
126
  e = "" + e, s.data !== e && (s.data = /** @type {string} */
127
127
  e);
128
128
  }
@@ -212,7 +212,7 @@ function Rn() {
212
212
  function In() {
213
213
  st.r || Ee(st.c), st = st.p;
214
214
  }
215
- function Ne(s, e) {
215
+ function Pe(s, e) {
216
216
  s && s.i && (Yt.delete(s), s.i(e));
217
217
  }
218
218
  function Ke(s, e, t, n) {
@@ -241,7 +241,7 @@ function Qs(s, e, t, n, i, o, l, a, c, u, h, p) {
241
241
  }
242
242
  const k = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set();
243
243
  function A(T) {
244
- Ne(T, 1), T.m(a, h), l.set(T.key, T), h = T.first, g--;
244
+ Pe(T, 1), T.m(a, h), l.set(T.key, T), h = T.first, g--;
245
245
  }
246
246
  for (; d && g; ) {
247
247
  const T = C[g - 1], z = s[d - 1], R = T.key, P = z.key;
@@ -306,7 +306,7 @@ function Cn(s, e, t, n, i, o, l = null, a = [-1]) {
306
306
  u.fragment && u.fragment.l(p), p.forEach(j);
307
307
  } else
308
308
  u.fragment && u.fragment.c();
309
- e.intro && Ne(s.$$.fragment), $t(s, e.target, e.anchor), Xs();
309
+ e.intro && Pe(s.$$.fragment), $t(s, e.target, e.anchor), Xs();
310
310
  }
311
311
  Rt(c);
312
312
  }
@@ -2007,7 +2007,7 @@ const {
2007
2007
  } = Object;
2008
2008
  let {
2009
2009
  freeze: Ie,
2010
- seal: Pe,
2010
+ seal: Fe,
2011
2011
  create: ci
2012
2012
  } = Object, {
2013
2013
  apply: vn,
@@ -2016,7 +2016,7 @@ let {
2016
2016
  Ie || (Ie = function(e) {
2017
2017
  return e;
2018
2018
  });
2019
- Pe || (Pe = function(e) {
2019
+ Fe || (Fe = function(e) {
2020
2020
  return e;
2021
2021
  });
2022
2022
  vn || (vn = function(e, t, n) {
@@ -2025,7 +2025,7 @@ vn || (vn = function(e, t, n) {
2025
2025
  En || (En = function(e, t) {
2026
2026
  return new e(...t);
2027
2027
  });
2028
- const Wt = Oe(Array.prototype.forEach), ps = Oe(Array.prototype.pop), vt = Oe(Array.prototype.push), Zt = Oe(String.prototype.toLowerCase), un = Oe(String.prototype.toString), ds = Oe(String.prototype.match), Et = Oe(String.prototype.replace), Do = Oe(String.prototype.indexOf), No = Oe(String.prototype.trim), Be = Oe(Object.prototype.hasOwnProperty), Re = Oe(RegExp.prototype.test), St = Po(TypeError);
2028
+ const Wt = Oe(Array.prototype.forEach), ps = Oe(Array.prototype.pop), vt = Oe(Array.prototype.push), Zt = Oe(String.prototype.toLowerCase), un = Oe(String.prototype.toString), ds = Oe(String.prototype.match), Et = Oe(String.prototype.replace), Do = Oe(String.prototype.indexOf), No = Oe(String.prototype.trim), Ue = Oe(Object.prototype.hasOwnProperty), Re = Oe(RegExp.prototype.test), St = Po(TypeError);
2029
2029
  function Oe(s) {
2030
2030
  return function(e) {
2031
2031
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
@@ -2056,13 +2056,13 @@ function Y(s, e) {
2056
2056
  }
2057
2057
  function Fo(s) {
2058
2058
  for (let e = 0; e < s.length; e++)
2059
- Be(s, e) || (s[e] = null);
2059
+ Ue(s, e) || (s[e] = null);
2060
2060
  return s;
2061
2061
  }
2062
2062
  function nt(s) {
2063
2063
  const e = ci(null);
2064
2064
  for (const [t, n] of ai(s))
2065
- Be(s, t) && (Array.isArray(n) ? e[t] = Fo(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = nt(n) : e[t] = n);
2065
+ Ue(s, t) && (Array.isArray(n) ? e[t] = Fo(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = nt(n) : e[t] = n);
2066
2066
  return e;
2067
2067
  }
2068
2068
  function At(s, e) {
@@ -2081,13 +2081,13 @@ function At(s, e) {
2081
2081
  }
2082
2082
  return t;
2083
2083
  }
2084
- const gs = Ie(["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", "section", "select", "shadow", "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"]), fn = Ie(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), hn = Ie(["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"]), Ho = Ie(["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"]), pn = Ie(["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"]), Bo = Ie(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ms = Ie(["#text"]), ws = Ie(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "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", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), dn = Ie(["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", "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"]), ks = Ie(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), qt = Ie(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Uo = Pe(/\{\{[\w\W]*|[\w\W]*\}\}/gm), jo = Pe(/<%[\w\W]*|[\w\W]*%>/gm), Wo = Pe(/\$\{[\w\W]*}/gm), qo = Pe(/^data-[\-\w.\u00B7-\uFFFF]+$/), Go = Pe(/^aria-[\-\w]+$/), ui = Pe(
2084
+ const gs = Ie(["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", "section", "select", "shadow", "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"]), fn = Ie(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), hn = Ie(["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"]), Ho = Ie(["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"]), pn = Ie(["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"]), Bo = Ie(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ms = Ie(["#text"]), ws = Ie(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "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", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), dn = Ie(["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", "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"]), ks = Ie(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), qt = Ie(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Uo = Fe(/\{\{[\w\W]*|[\w\W]*\}\}/gm), jo = Fe(/<%[\w\W]*|[\w\W]*%>/gm), Wo = Fe(/\$\{[\w\W]*}/gm), qo = Fe(/^data-[\-\w.\u00B7-\uFFFF]+$/), Go = Fe(/^aria-[\-\w]+$/), ui = Fe(
2085
2085
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
2086
2086
  // eslint-disable-line no-useless-escape
2087
- ), Yo = Pe(/^(?:\w+script|data):/i), Zo = Pe(
2087
+ ), Yo = Fe(/^(?:\w+script|data):/i), Zo = Fe(
2088
2088
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
2089
2089
  // eslint-disable-line no-control-regex
2090
- ), fi = Pe(/^html$/i), Xo = Pe(/^[a-z][.\w]*(-[.\w]+)+$/i);
2090
+ ), fi = Fe(/^html$/i), Xo = Fe(/^[a-z][.\w]*(-[.\w]+)+$/i);
2091
2091
  var bs = /* @__PURE__ */ Object.freeze({
2092
2092
  __proto__: null,
2093
2093
  ARIA_ATTR: Go,
@@ -2192,11 +2192,11 @@ function hi() {
2192
2192
  DATA_ATTR: oe,
2193
2193
  ARIA_ATTR: he,
2194
2194
  IS_SCRIPT_OR_DATA: fe,
2195
- ATTR_WHITESPACE: Fe,
2195
+ ATTR_WHITESPACE: He,
2196
2196
  CUSTOM_ELEMENT: re
2197
2197
  } = bs;
2198
2198
  let {
2199
- IS_ALLOWED_URI: Ue
2199
+ IS_ALLOWED_URI: je
2200
2200
  } = bs, le = null;
2201
2201
  const Xe = Y({}, [...gs, ...fn, ...hn, ...pn, ...ms]);
2202
2202
  let ie = null;
@@ -2220,16 +2220,16 @@ function hi() {
2220
2220
  enumerable: !0,
2221
2221
  value: !1
2222
2222
  }
2223
- })), ze = null, be = null, Ve = !0, O = !0, ne = !1, N = !0, G = !1, _e = !0, ye = !1, He = !1, je = !1, $e = !1, rt = !1, at = !1, Ot = !0, Dt = !1;
2223
+ })), ze = null, be = null, Ve = !0, O = !0, ne = !1, N = !0, G = !1, _e = !0, ye = !1, Be = !1, We = !1, $e = !1, rt = !1, at = !1, Ot = !0, Dt = !1;
2224
2224
  const nn = "user-content-";
2225
2225
  let bt = !0, tt = !1, et = {}, _ = null;
2226
2226
  const H = Y({}, ["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"]);
2227
2227
  let V = null;
2228
2228
  const ce = Y({}, ["audio", "video", "img", "source", "image", "track"]);
2229
2229
  let ue = null;
2230
- const We = Y({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), de = "http://www.w3.org/1998/Math/MathML", Nt = "http://www.w3.org/2000/svg", Qe = "http://www.w3.org/1999/xhtml";
2230
+ const De = Y({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), pe = "http://www.w3.org/1998/Math/MathML", Nt = "http://www.w3.org/2000/svg", Qe = "http://www.w3.org/1999/xhtml";
2231
2231
  let ct = Qe, sn = !1, on = null;
2232
- const di = Y({}, [de, Nt, Qe], un);
2232
+ const di = Y({}, [pe, Nt, Qe], un);
2233
2233
  let Pt = Y({}, ["mi", "mo", "mn", "ms", "mtext"]), Ft = Y({}, ["annotation-xml"]);
2234
2234
  const gi = Y({}, ["title", "style", "font", "a", "script"]);
2235
2235
  let _t = null;
@@ -2241,7 +2241,7 @@ function hi() {
2241
2241
  let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2242
2242
  if (!(ut && ut === f)) {
2243
2243
  if ((!f || typeof f != "object") && (f = {}), f = nt(f), _t = // eslint-disable-next-line unicorn/prefer-includes
2244
- mi.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? wi : f.PARSER_MEDIA_TYPE, ge = _t === "application/xhtml+xml" ? un : Zt, le = Be(f, "ALLOWED_TAGS") ? Y({}, f.ALLOWED_TAGS, ge) : Xe, ie = Be(f, "ALLOWED_ATTR") ? Y({}, f.ALLOWED_ATTR, ge) : Se, on = Be(f, "ALLOWED_NAMESPACES") ? Y({}, f.ALLOWED_NAMESPACES, un) : di, ue = Be(f, "ADD_URI_SAFE_ATTR") ? Y(nt(We), f.ADD_URI_SAFE_ATTR, ge) : We, V = Be(f, "ADD_DATA_URI_TAGS") ? Y(nt(ce), f.ADD_DATA_URI_TAGS, ge) : ce, _ = Be(f, "FORBID_CONTENTS") ? Y({}, f.FORBID_CONTENTS, ge) : H, ze = Be(f, "FORBID_TAGS") ? Y({}, f.FORBID_TAGS, ge) : {}, be = Be(f, "FORBID_ATTR") ? Y({}, f.FORBID_ATTR, ge) : {}, et = Be(f, "USE_PROFILES") ? f.USE_PROFILES : !1, Ve = f.ALLOW_ARIA_ATTR !== !1, O = f.ALLOW_DATA_ATTR !== !1, ne = f.ALLOW_UNKNOWN_PROTOCOLS || !1, N = f.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = f.SAFE_FOR_TEMPLATES || !1, _e = f.SAFE_FOR_XML !== !1, ye = f.WHOLE_DOCUMENT || !1, $e = f.RETURN_DOM || !1, rt = f.RETURN_DOM_FRAGMENT || !1, at = f.RETURN_TRUSTED_TYPE || !1, je = f.FORCE_BODY || !1, Ot = f.SANITIZE_DOM !== !1, Dt = f.SANITIZE_NAMED_PROPS || !1, bt = f.KEEP_CONTENT !== !1, tt = f.IN_PLACE || !1, Ue = f.ALLOWED_URI_REGEXP || ui, ct = f.NAMESPACE || Qe, Pt = f.MATHML_TEXT_INTEGRATION_POINTS || Pt, Ft = f.HTML_INTEGRATION_POINTS || Ft, $ = f.CUSTOM_ELEMENT_HANDLING || {}, f.CUSTOM_ELEMENT_HANDLING && Bn(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && ($.tagNameCheck = f.CUSTOM_ELEMENT_HANDLING.tagNameCheck), f.CUSTOM_ELEMENT_HANDLING && Bn(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && ($.attributeNameCheck = f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), f.CUSTOM_ELEMENT_HANDLING && typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), G && (O = !1), rt && ($e = !0), et && (le = Y({}, ms), ie = [], et.html === !0 && (Y(le, gs), Y(ie, ws)), et.svg === !0 && (Y(le, fn), Y(ie, dn), Y(ie, qt)), et.svgFilters === !0 && (Y(le, hn), Y(ie, dn), Y(ie, qt)), et.mathMl === !0 && (Y(le, pn), Y(ie, ks), Y(ie, qt))), f.ADD_TAGS && (le === Xe && (le = nt(le)), Y(le, f.ADD_TAGS, ge)), f.ADD_ATTR && (ie === Se && (ie = nt(ie)), Y(ie, f.ADD_ATTR, ge)), f.ADD_URI_SAFE_ATTR && Y(ue, f.ADD_URI_SAFE_ATTR, ge), f.FORBID_CONTENTS && (_ === H && (_ = nt(_)), Y(_, f.FORBID_CONTENTS, ge)), bt && (le["#text"] = !0), ye && Y(le, ["html", "head", "body"]), le.table && (Y(le, ["tbody"]), delete ze.tbody), f.TRUSTED_TYPES_POLICY) {
2244
+ mi.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? wi : f.PARSER_MEDIA_TYPE, ge = _t === "application/xhtml+xml" ? un : Zt, le = Ue(f, "ALLOWED_TAGS") ? Y({}, f.ALLOWED_TAGS, ge) : Xe, ie = Ue(f, "ALLOWED_ATTR") ? Y({}, f.ALLOWED_ATTR, ge) : Se, on = Ue(f, "ALLOWED_NAMESPACES") ? Y({}, f.ALLOWED_NAMESPACES, un) : di, ue = Ue(f, "ADD_URI_SAFE_ATTR") ? Y(nt(De), f.ADD_URI_SAFE_ATTR, ge) : De, V = Ue(f, "ADD_DATA_URI_TAGS") ? Y(nt(ce), f.ADD_DATA_URI_TAGS, ge) : ce, _ = Ue(f, "FORBID_CONTENTS") ? Y({}, f.FORBID_CONTENTS, ge) : H, ze = Ue(f, "FORBID_TAGS") ? Y({}, f.FORBID_TAGS, ge) : {}, be = Ue(f, "FORBID_ATTR") ? Y({}, f.FORBID_ATTR, ge) : {}, et = Ue(f, "USE_PROFILES") ? f.USE_PROFILES : !1, Ve = f.ALLOW_ARIA_ATTR !== !1, O = f.ALLOW_DATA_ATTR !== !1, ne = f.ALLOW_UNKNOWN_PROTOCOLS || !1, N = f.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = f.SAFE_FOR_TEMPLATES || !1, _e = f.SAFE_FOR_XML !== !1, ye = f.WHOLE_DOCUMENT || !1, $e = f.RETURN_DOM || !1, rt = f.RETURN_DOM_FRAGMENT || !1, at = f.RETURN_TRUSTED_TYPE || !1, We = f.FORCE_BODY || !1, Ot = f.SANITIZE_DOM !== !1, Dt = f.SANITIZE_NAMED_PROPS || !1, bt = f.KEEP_CONTENT !== !1, tt = f.IN_PLACE || !1, je = f.ALLOWED_URI_REGEXP || ui, ct = f.NAMESPACE || Qe, Pt = f.MATHML_TEXT_INTEGRATION_POINTS || Pt, Ft = f.HTML_INTEGRATION_POINTS || Ft, $ = f.CUSTOM_ELEMENT_HANDLING || {}, f.CUSTOM_ELEMENT_HANDLING && Bn(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && ($.tagNameCheck = f.CUSTOM_ELEMENT_HANDLING.tagNameCheck), f.CUSTOM_ELEMENT_HANDLING && Bn(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && ($.attributeNameCheck = f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), f.CUSTOM_ELEMENT_HANDLING && typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), G && (O = !1), rt && ($e = !0), et && (le = Y({}, ms), ie = [], et.html === !0 && (Y(le, gs), Y(ie, ws)), et.svg === !0 && (Y(le, fn), Y(ie, dn), Y(ie, qt)), et.svgFilters === !0 && (Y(le, hn), Y(ie, dn), Y(ie, qt)), et.mathMl === !0 && (Y(le, pn), Y(ie, ks), Y(ie, qt))), f.ADD_TAGS && (le === Xe && (le = nt(le)), Y(le, f.ADD_TAGS, ge)), f.ADD_ATTR && (ie === Se && (ie = nt(ie)), Y(ie, f.ADD_ATTR, ge)), f.ADD_URI_SAFE_ATTR && Y(ue, f.ADD_URI_SAFE_ATTR, ge), f.FORBID_CONTENTS && (_ === H && (_ = nt(_)), Y(_, f.FORBID_CONTENTS, ge)), bt && (le["#text"] = !0), ye && Y(le, ["html", "head", "body"]), le.table && (Y(le, ["tbody"]), delete ze.tbody), f.TRUSTED_TYPES_POLICY) {
2245
2245
  if (typeof f.TRUSTED_TYPES_POLICY.createHTML != "function")
2246
2246
  throw St('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2247
2247
  if (typeof f.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -2258,7 +2258,7 @@ function hi() {
2258
2258
  tagName: "template"
2259
2259
  });
2260
2260
  const L = Zt(f.tagName), ae = Zt(E.tagName);
2261
- return on[f.namespaceURI] ? f.namespaceURI === Nt ? E.namespaceURI === Qe ? L === "svg" : E.namespaceURI === de ? L === "svg" && (ae === "annotation-xml" || Pt[ae]) : !!Un[L] : f.namespaceURI === de ? E.namespaceURI === Qe ? L === "math" : E.namespaceURI === Nt ? L === "math" && Ft[ae] : !!jn[L] : f.namespaceURI === Qe ? E.namespaceURI === Nt && !Ft[ae] || E.namespaceURI === de && !Pt[ae] ? !1 : !jn[L] && (gi[L] || !Un[L]) : !!(_t === "application/xhtml+xml" && on[f.namespaceURI]) : !1;
2261
+ return on[f.namespaceURI] ? f.namespaceURI === Nt ? E.namespaceURI === Qe ? L === "svg" : E.namespaceURI === pe ? L === "svg" && (ae === "annotation-xml" || Pt[ae]) : !!Un[L] : f.namespaceURI === pe ? E.namespaceURI === Qe ? L === "math" : E.namespaceURI === Nt ? L === "math" && Ft[ae] : !!jn[L] : f.namespaceURI === Qe ? E.namespaceURI === Nt && !Ft[ae] || E.namespaceURI === pe && !Pt[ae] ? !1 : !jn[L] && (gi[L] || !Un[L]) : !!(_t === "application/xhtml+xml" && on[f.namespaceURI]) : !1;
2262
2262
  }, qe = function(f) {
2263
2263
  vt(e.removed, {
2264
2264
  element: f
@@ -2293,7 +2293,7 @@ function hi() {
2293
2293
  }
2294
2294
  }, Wn = function(f) {
2295
2295
  let E = null, L = null;
2296
- if (je)
2296
+ if (We)
2297
2297
  f = "<remove></remove>" + f;
2298
2298
  else {
2299
2299
  const we = ds(f, /^[\r\n\t ]+/);
@@ -2378,9 +2378,9 @@ function hi() {
2378
2378
  E === "is" && $.allowCustomizedBuiltInElements && ($.tagNameCheck instanceof RegExp && Re($.tagNameCheck, L) || $.tagNameCheck instanceof Function && $.tagNameCheck(L)))
2379
2379
  ) return !1;
2380
2380
  } else if (!ue[E]) {
2381
- if (!Re(Ue, Et(L, Fe, ""))) {
2381
+ if (!Re(je, Et(L, He, ""))) {
2382
2382
  if (!((E === "src" || E === "xlink:href" || E === "href") && f !== "script" && Do(L, "data:") === 0 && V[f])) {
2383
- if (!(ne && !Re(fe, Et(L, Fe, "")))) {
2383
+ if (!(ne && !Re(fe, Et(L, He, "")))) {
2384
2384
  if (L)
2385
2385
  return !1;
2386
2386
  }
@@ -2464,7 +2464,7 @@ function hi() {
2464
2464
  throw St("toString is not a function");
2465
2465
  if (!e.isSupported)
2466
2466
  return D;
2467
- if (He || ln(f), e.removed = [], typeof D == "string" && (tt = !1), tt) {
2467
+ if (Be || ln(f), e.removed = [], typeof D == "string" && (tt = !1), tt) {
2468
2468
  if (D.nodeName) {
2469
2469
  const Ge = ge(D.nodeName);
2470
2470
  if (!le[Ge] || ze[Ge])
@@ -2479,7 +2479,7 @@ function hi() {
2479
2479
  if (E = Wn(D), !E)
2480
2480
  return $e ? null : at ? y : "";
2481
2481
  }
2482
- E && je && qe(E.firstChild);
2482
+ E && We && qe(E.firstChild);
2483
2483
  const we = qn(tt ? D : E);
2484
2484
  for (; ae = we.nextNode(); )
2485
2485
  Yn(ae), Vn(ae), ae.content instanceof o && _i(ae.content);
@@ -2500,9 +2500,9 @@ function hi() {
2500
2500
  }), k && at ? k.createHTML(Ce) : Ce;
2501
2501
  }, e.setConfig = function() {
2502
2502
  let D = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2503
- ln(D), He = !0;
2503
+ ln(D), Be = !0;
2504
2504
  }, e.clearConfig = function() {
2505
- ut = null, He = !1;
2505
+ ut = null, Be = !1;
2506
2506
  }, e.isValidAttribute = function(D, f, E) {
2507
2507
  ut || ln({});
2508
2508
  const L = ge(D), ae = ge(f);
@@ -2574,7 +2574,7 @@ function Es(s) {
2574
2574
  p(i, o) {
2575
2575
  o & /*buttonTooltip*/
2576
2576
  512 && t !== (t = /*buttonTooltip*/
2577
- i[9].text + "") && De(n, t), o & /*buttonTooltip*/
2577
+ i[9].text + "") && Ne(n, t), o & /*buttonTooltip*/
2578
2578
  512 && F(
2579
2579
  e,
2580
2580
  "left",
@@ -2664,7 +2664,7 @@ function Ko(s) {
2664
2664
  i[4] ? "未找到相关会话" : (
2665
2665
  /*isLoading*/
2666
2666
  i[5] ? "加载中..." : "暂无历史会话"
2667
- )) && De(n, t);
2667
+ )) && Ne(n, t);
2668
2668
  },
2669
2669
  d(i) {
2670
2670
  i && j(e);
@@ -2721,11 +2721,11 @@ function Ss(s, e) {
2721
2721
  p(z, R) {
2722
2722
  e = z, R & /*sessions*/
2723
2723
  1 && l !== (l = /*session*/
2724
- e[24].title + "") && De(a, l), R & /*sessions*/
2724
+ e[24].title + "") && Ne(a, l), R & /*sessions*/
2725
2725
  1 && h !== (h = Rs(
2726
2726
  /*session*/
2727
2727
  e[24].timestamp
2728
- ) + "") && De(p, h), R & /*deletingSessionId, sessions*/
2728
+ ) + "") && Ne(p, h), R & /*deletingSessionId, sessions*/
2729
2729
  65 && v !== (v = /*deletingSessionId*/
2730
2730
  e[6] === /*session*/
2731
2731
  e[24].sessionId) && (g.disabled = v), R & /*sessions*/
@@ -3143,7 +3143,7 @@ function nl(s) {
3143
3143
  n[0]), e.$set(o);
3144
3144
  },
3145
3145
  i(n) {
3146
- t || (Ne(e.$$.fragment, n), t = !0);
3146
+ t || (Pe(e.$$.fragment, n), t = !0);
3147
3147
  },
3148
3148
  o(n) {
3149
3149
  Ke(e.$$.fragment, n), t = !1;
@@ -3416,11 +3416,11 @@ function Os(s) {
3416
3416
  8 && h !== (h = Gt(
3417
3417
  /*attachment*/
3418
3418
  s[63].content_title
3419
- ).name + "") && De(p, h), Z[0] & /*messages*/
3419
+ ).name + "") && Ne(p, h), Z[0] & /*messages*/
3420
3420
  8 && w !== (w = Gt(
3421
3421
  /*attachment*/
3422
3422
  s[63].content_title
3423
- ).ext + "") && De(S, w), Z[0] & /*messages*/
3423
+ ).ext + "") && Ne(S, w), Z[0] & /*messages*/
3424
3424
  8 && C !== (C = /*attachment*/
3425
3425
  s[63].content_title) && r(c, "title", C), /*attachment*/
3426
3426
  s[63].tips ? R ? R.p(s, Z) : (R = Ls(s), R.c(), R.m(v, b)) : R && (R.d(1), R = null), /*tooltipContent*/
@@ -3793,7 +3793,7 @@ function Ps(s, e) {
3793
3793
  8 && h !== (h = new Date(
3794
3794
  /*msg*/
3795
3795
  e[60].timestamp
3796
- ).toLocaleTimeString() + "") && De(p, h), A[0] & /*messages*/
3796
+ ).toLocaleTimeString() + "") && Ne(p, h), A[0] & /*messages*/
3797
3797
  8 && J(
3798
3798
  t,
3799
3799
  "user",
@@ -3909,7 +3909,7 @@ function Fs(s) {
3909
3909
  /*message*/
3910
3910
  R[1]
3911
3911
  ), P[0] & /*messageLength*/
3912
- 4 && De(
3912
+ 4 && Ne(
3913
3913
  w,
3914
3914
  /*messageLength*/
3915
3915
  R[2]
@@ -3954,7 +3954,7 @@ function Hs(s) {
3954
3954
  p(i, o) {
3955
3955
  o[0] & /*buttonTooltip*/
3956
3956
  16384 && t !== (t = /*buttonTooltip*/
3957
- i[14].text + "") && De(n, t), o[0] & /*buttonTooltip*/
3957
+ i[14].text + "") && Ne(n, t), o[0] & /*buttonTooltip*/
3958
3958
  16384 && F(
3959
3959
  e,
3960
3960
  "left",
@@ -4004,7 +4004,7 @@ function cl(s) {
4004
4004
  let S = t;
4005
4005
  t = h(g), t === S ? u[t].p(g, w) : (Rn(), Ke(u[S], 1, 1, () => {
4006
4006
  u[S] = null;
4007
- }), In(), n = u[t], n ? n.p(g, w) : (n = u[t] = c[t](g), n.c()), Ne(n, 1), n.m(e, i)), /*showHistory*/
4007
+ }), In(), n = u[t], n ? n.p(g, w) : (n = u[t] = c[t](g), n.c()), Pe(n, 1), n.m(e, i)), /*showHistory*/
4008
4008
  g[15] ? p && (p.d(1), p = null) : p ? p.p(g, w) : (p = Fs(g), p.c(), p.m(e, null)), (!a || w[0] & /*zIndex*/
4009
4009
  1) && F(
4010
4010
  e,
@@ -4015,7 +4015,7 @@ function cl(s) {
4015
4015
  g[14] ? d ? d.p(g, w) : (d = Hs(g), d.c(), d.m(l.parentNode, l)) : d && (d.d(1), d = null);
4016
4016
  },
4017
4017
  i(g) {
4018
- a || (Ne(n), a = !0);
4018
+ a || (Pe(n), a = !0);
4019
4019
  },
4020
4020
  o(g) {
4021
4021
  Ke(n), a = !1;
@@ -4026,6 +4026,10 @@ function cl(s) {
4026
4026
  };
4027
4027
  }
4028
4028
  let Sn = 500;
4029
+ function ul(s) {
4030
+ const e = s.match(/source#\[(.*)\]#source/);
4031
+ return e ? s.replace(`source#[${e[1]}]#source`, "") : s;
4032
+ }
4029
4033
  function Bs(s) {
4030
4034
  const e = s.match(/source#\[(.*)\]#source/);
4031
4035
  if (e)
@@ -4047,7 +4051,7 @@ function Gt(s) {
4047
4051
  }
4048
4052
  return { name: s, ext: "" };
4049
4053
  }
4050
- function ul(s, e, t) {
4054
+ function fl(s, e, t) {
4051
4055
  let n, i, o = "", l = [
4052
4056
  {
4053
4057
  id: "-1",
@@ -4136,8 +4140,8 @@ function ul(s, e, t) {
4136
4140
  try {
4137
4141
  const ue = ce.data;
4138
4142
  if (ue) {
4139
- const We = Bs(ue);
4140
- We ? (t(3, l = l.map((de) => de.id === V ? ke(ee({}, de), { attachments: We }) : de)), S(!0)) : (a += ue, t(3, l = l.map((de) => de.id === V ? ke(ee({}, de), { content: a }) : de)), S(!1));
4143
+ const De = Bs(ue);
4144
+ De ? (t(3, l = l.map((pe) => pe.id === V ? ke(ee({}, pe), { attachments: De }) : pe)), S(!0)) : (a += ue, t(3, l = l.map((pe) => pe.id === V ? ke(ee({}, pe), { content: a }) : pe)), S(!1));
4141
4145
  }
4142
4146
  } catch (ue) {
4143
4147
  console.error("Failed to process SSE message:", ue);
@@ -4156,11 +4160,11 @@ function ul(s, e, t) {
4156
4160
  });
4157
4161
  }
4158
4162
  function v(_, H, V) {
4159
- const ce = V.getBoundingClientRect(), ue = w.getBoundingClientRect(), We = ce.left < ue.width / 2;
4163
+ const ce = V.getBoundingClientRect(), ue = w.getBoundingClientRect(), De = ce.left < ue.width / 2;
4160
4164
  t(4, u = H), t(5, h = {
4161
4165
  x: ce.left,
4162
4166
  y: ce.top + ce.height / 2,
4163
- alignRight: We
4167
+ alignRight: De
4164
4168
  });
4165
4169
  }
4166
4170
  function b() {
@@ -4188,8 +4192,8 @@ function ul(s, e, t) {
4188
4192
  });
4189
4193
  if (!V.ok)
4190
4194
  throw new Error("Download failed");
4191
- const ce = V.headers.get("content-type") || "application/octet-stream", ue = yield V.blob(), We = window.URL.createObjectURL(ue), de = document.createElement("a");
4192
- de.href = We, de.download = _, document.body.appendChild(de), de.click(), window.URL.revokeObjectURL(We), document.body.removeChild(de);
4195
+ const ce = V.headers.get("content-type") || "application/octet-stream", ue = yield V.blob(), De = window.URL.createObjectURL(ue), pe = document.createElement("a");
4196
+ pe.href = De, pe.download = _, document.body.appendChild(pe), pe.click(), window.URL.revokeObjectURL(De), document.body.removeChild(pe);
4193
4197
  } catch (V) {
4194
4198
  console.error("Failed to download file:", V);
4195
4199
  }
@@ -4295,8 +4299,8 @@ function ul(s, e, t) {
4295
4299
  function he() {
4296
4300
  t(14, Q = null);
4297
4301
  }
4298
- let fe = !1, Fe = [], re = Date.now().toString();
4299
- function Ue() {
4302
+ let fe = !1, He = [], re = Date.now().toString();
4303
+ function je() {
4300
4304
  he(), t(15, fe = !0);
4301
4305
  }
4302
4306
  function le() {
@@ -4321,23 +4325,26 @@ function ul(s, e, t) {
4321
4325
  const V = yield H.json();
4322
4326
  if (V.code === 0) {
4323
4327
  re = _, t(15, fe = !1);
4324
- const ce = V.data.map((ue) => [
4325
- {
4326
- sessionId: ue.sessionId,
4327
- requestId: ue.requestId,
4328
- type: "user",
4329
- content: ue.keyword,
4330
- timestamp: new Date(ue.createDate).getTime()
4331
- },
4332
- {
4333
- sessionId: ue.sessionId,
4334
- requestId: ue.requestId,
4335
- type: "assistant",
4336
- content: ue.answer,
4337
- attachments: Bs(ue.answer),
4338
- timestamp: new Date(ue.createDate).getTime()
4339
- }
4340
- ]);
4328
+ const ce = V.data.map((ue) => {
4329
+ const De = Bs(ue.answer), pe = ul(ue.answer);
4330
+ return [
4331
+ {
4332
+ sessionId: ue.sessionId,
4333
+ requestId: ue.requestId,
4334
+ type: "user",
4335
+ content: ue.keyword,
4336
+ timestamp: new Date(ue.createDate).getTime()
4337
+ },
4338
+ {
4339
+ sessionId: ue.sessionId,
4340
+ requestId: ue.requestId,
4341
+ type: "assistant",
4342
+ content: pe,
4343
+ attachments: De,
4344
+ timestamp: new Date(ue.createDate).getTime()
4345
+ }
4346
+ ];
4347
+ });
4341
4348
  t(3, l = ce.flat());
4342
4349
  }
4343
4350
  } catch (H) {
@@ -4392,8 +4399,8 @@ function ul(s, e, t) {
4392
4399
  p && (clearTimeout(p), t(6, p = null));
4393
4400
  }, O = () => {
4394
4401
  t(4, u = null);
4395
- }, ne = (_) => A(_.id, _.content), N = (_, H) => oe(H, y[_.id] ? "已复制" : "复制内容"), G = (_) => P(_.id, "like"), _e = (_, H) => oe(H, T[_.id] === "like" ? "取消点赞" : "点赞"), ye = (_, H) => Z(H, _.id), He = (_, H) => oe(H, T[_.id] === "dislike" ? "取消点踩" : "点踩");
4396
- function je(_) {
4402
+ }, ne = (_) => A(_.id, _.content), N = (_, H) => oe(H, y[_.id] ? "已复制" : "复制内容"), G = (_) => P(_.id, "like"), _e = (_, H) => oe(H, T[_.id] === "like" ? "取消点赞" : "点赞"), ye = (_, H) => Z(H, _.id), Be = (_, H) => oe(H, T[_.id] === "dislike" ? "取消点踩" : "点踩");
4403
+ function We(_) {
4397
4404
  z[_.id] = this.value, t(11, z);
4398
4405
  }
4399
4406
  const $e = (_) => {
@@ -4449,8 +4456,8 @@ function ul(s, e, t) {
4449
4456
  Z,
4450
4457
  oe,
4451
4458
  he,
4452
- Fe,
4453
- Ue,
4459
+ He,
4460
+ je,
4454
4461
  le,
4455
4462
  Xe,
4456
4463
  ie,
@@ -4464,8 +4471,8 @@ function ul(s, e, t) {
4464
4471
  G,
4465
4472
  _e,
4466
4473
  ye,
4467
- He,
4468
- je,
4474
+ Be,
4475
+ We,
4469
4476
  $e,
4470
4477
  rt,
4471
4478
  at,
@@ -4477,9 +4484,9 @@ function ul(s, e, t) {
4477
4484
  et
4478
4485
  ];
4479
4486
  }
4480
- class fl extends Ln {
4487
+ class hl extends Ln {
4481
4488
  constructor(e) {
4482
- super(), Cn(this, e, ul, cl, Jt, { sessionId: 33, zIndex: 0 }, null, [-1, -1, -1]);
4489
+ super(), Cn(this, e, fl, cl, Jt, { sessionId: 33, zIndex: 0 }, null, [-1, -1, -1]);
4483
4490
  }
4484
4491
  }
4485
4492
  function Us(s) {
@@ -4492,23 +4499,23 @@ function Us(s) {
4492
4499
  ), C, M, v, b, k, y, A, T, z = (
4493
4500
  /*isSnapped*/
4494
4501
  s[7] ? "取消吸附" : "吸附到边缘"
4495
- ), R, P, I, U, Z, Q, oe, he, fe, Fe = `${/*mergedOptions*/
4496
- s[3].height}px`, re, Ue, le;
4502
+ ), R, P, I, U, Z, Q, oe, he, fe, He = `${/*mergedOptions*/
4503
+ s[3].height}px`, re, je, le;
4497
4504
  function Xe(N, G) {
4498
4505
  return (
4499
4506
  /*isFullscreen*/
4500
- N[2] ? pl : hl
4507
+ N[2] ? dl : pl
4501
4508
  );
4502
4509
  }
4503
4510
  let ie = Xe(s), Se = ie(s);
4504
4511
  function $(N, G) {
4505
4512
  return (
4506
4513
  /*isSnapped*/
4507
- N[7] ? gl : dl
4514
+ N[7] ? ml : gl
4508
4515
  );
4509
4516
  }
4510
4517
  let ze = $(s), be = ze(s);
4511
- const Ve = [wl, ml], O = [];
4518
+ const Ve = [kl, wl], O = [];
4512
4519
  function ne(N, G) {
4513
4520
  return (
4514
4521
  /*showHistory*/
@@ -4549,10 +4556,10 @@ function Us(s) {
4549
4556
  "fullscreen",
4550
4557
  /*isFullscreen*/
4551
4558
  s[2]
4552
- ), F(e, "height", Fe);
4559
+ ), F(e, "height", He);
4553
4560
  },
4554
4561
  m(N, G) {
4555
- q(N, e, G), m(e, t), m(t, n), m(n, i), m(i, l), m(n, a), m(n, c), m(c, u), m(u, h), m(h, p), Se.m(p, null), m(u, g), m(u, w), m(w, C), m(c, M), m(c, v), m(v, b), m(b, k), be.m(k, null), m(v, A), m(v, T), m(T, R), m(c, P), m(c, I), m(I, U), m(I, Z), m(I, Q), m(t, oe), O[he].m(t, null), re = !0, Ue || (le = [
4562
+ q(N, e, G), m(e, t), m(t, n), m(n, i), m(i, l), m(n, a), m(n, c), m(c, u), m(u, h), m(h, p), Se.m(p, null), m(u, g), m(u, w), m(w, C), m(c, M), m(c, v), m(v, b), m(b, k), be.m(k, null), m(v, A), m(v, T), m(T, R), m(c, P), m(c, I), m(I, U), m(I, Z), m(I, Q), m(t, oe), O[he].m(t, null), re = !0, je || (le = [
4556
4563
  B(
4557
4564
  h,
4558
4565
  "click",
@@ -4575,12 +4582,12 @@ function Us(s) {
4575
4582
  /*handleDragStartWhenNotFullscreen*/
4576
4583
  s[17]
4577
4584
  ))
4578
- ], Ue = !0);
4585
+ ], je = !0);
4579
4586
  },
4580
4587
  p(N, G) {
4581
4588
  (!re || G[0] & /*mergedOptions*/
4582
4589
  8) && o !== (o = /*mergedOptions*/
4583
- N[3].title + "") && De(l, o), ie !== (ie = Xe(N)) && (Se.d(1), Se = ie(N), Se && (Se.c(), Se.m(p, null))), (!re || G[0] & /*isFullscreen*/
4590
+ N[3].title + "") && Ne(l, o), ie !== (ie = Xe(N)) && (Se.d(1), Se = ie(N), Se && (Se.c(), Se.m(p, null))), (!re || G[0] & /*isFullscreen*/
4584
4591
  4 && d !== (d = /*isFullscreen*/
4585
4592
  N[2] ? "退出全屏" : "全屏显示")) && r(h, "aria-label", d), (!re || G[0] & /*isFullscreen*/
4586
4593
  4) && J(
@@ -4590,7 +4597,7 @@ function Us(s) {
4590
4597
  N[2]
4591
4598
  ), (!re || G[0] & /*isFullscreen*/
4592
4599
  4) && S !== (S = /*isFullscreen*/
4593
- N[2] ? "退出全屏" : "全屏显示") && De(C, S), ze !== (ze = $(N)) && (be.d(1), be = ze(N), be && (be.c(), be.m(k, null))), (!re || G[0] & /*isSnapped*/
4600
+ N[2] ? "退出全屏" : "全屏显示") && Ne(C, S), ze !== (ze = $(N)) && (be.d(1), be = ze(N), be && (be.c(), be.m(k, null))), (!re || G[0] & /*isSnapped*/
4594
4601
  128 && y !== (y = /*isSnapped*/
4595
4602
  N[7] ? "取消吸附" : "吸附到边缘")) && r(b, "aria-label", y), (!re || G[0] & /*isSnapped*/
4596
4603
  128) && J(
@@ -4600,7 +4607,7 @@ function Us(s) {
4600
4607
  N[7]
4601
4608
  ), (!re || G[0] & /*isSnapped*/
4602
4609
  128) && z !== (z = /*isSnapped*/
4603
- N[7] ? "取消吸附" : "吸附到边缘") && De(R, z), (!re || G[0] & /*isDragging*/
4610
+ N[7] ? "取消吸附" : "吸附到边缘") && Ne(R, z), (!re || G[0] & /*isDragging*/
4604
4611
  64) && J(
4605
4612
  n,
4606
4613
  "dragging",
@@ -4622,28 +4629,28 @@ function Us(s) {
4622
4629
  let _e = he;
4623
4630
  he = ne(N), he === _e ? O[he].p(N, G) : (Rn(), Ke(O[_e], 1, 1, () => {
4624
4631
  O[_e] = null;
4625
- }), In(), fe = O[he], fe ? fe.p(N, G) : (fe = O[he] = Ve[he](N), fe.c()), Ne(fe, 1), fe.m(t, null)), (!re || G[0] & /*isFullscreen*/
4632
+ }), In(), fe = O[he], fe ? fe.p(N, G) : (fe = O[he] = Ve[he](N), fe.c()), Pe(fe, 1), fe.m(t, null)), (!re || G[0] & /*isFullscreen*/
4626
4633
  4) && J(
4627
4634
  e,
4628
4635
  "fullscreen",
4629
4636
  /*isFullscreen*/
4630
4637
  N[2]
4631
4638
  ), G[0] & /*mergedOptions*/
4632
- 8 && Fe !== (Fe = `${/*mergedOptions*/
4633
- N[3].height}px`) && F(e, "height", Fe);
4639
+ 8 && He !== (He = `${/*mergedOptions*/
4640
+ N[3].height}px`) && F(e, "height", He);
4634
4641
  },
4635
4642
  i(N) {
4636
- re || (Ne(fe), re = !0);
4643
+ re || (Pe(fe), re = !0);
4637
4644
  },
4638
4645
  o(N) {
4639
4646
  Ke(fe), re = !1;
4640
4647
  },
4641
4648
  d(N) {
4642
- N && j(e), Se.d(), be.d(), O[he].d(), Ue = !1, Ee(le);
4649
+ N && j(e), Se.d(), be.d(), O[he].d(), je = !1, Ee(le);
4643
4650
  }
4644
4651
  };
4645
4652
  }
4646
- function hl(s) {
4653
+ function pl(s) {
4647
4654
  let e;
4648
4655
  return {
4649
4656
  c() {
@@ -4657,7 +4664,7 @@ function hl(s) {
4657
4664
  }
4658
4665
  };
4659
4666
  }
4660
- function pl(s) {
4667
+ function dl(s) {
4661
4668
  let e;
4662
4669
  return {
4663
4670
  c() {
@@ -4671,7 +4678,7 @@ function pl(s) {
4671
4678
  }
4672
4679
  };
4673
4680
  }
4674
- function dl(s) {
4681
+ function gl(s) {
4675
4682
  let e, t;
4676
4683
  return {
4677
4684
  c() {
@@ -4685,7 +4692,7 @@ function dl(s) {
4685
4692
  }
4686
4693
  };
4687
4694
  }
4688
- function gl(s) {
4695
+ function ml(s) {
4689
4696
  let e, t;
4690
4697
  return {
4691
4698
  c() {
@@ -4699,10 +4706,10 @@ function gl(s) {
4699
4706
  }
4700
4707
  };
4701
4708
  }
4702
- function ml(s) {
4709
+ function wl(s) {
4703
4710
  var n;
4704
4711
  let e, t;
4705
- return e = new fl({
4712
+ return e = new hl({
4706
4713
  props: {
4707
4714
  zIndex: (
4708
4715
  /*mergedOptions*/
@@ -4730,7 +4737,7 @@ function ml(s) {
4730
4737
  i[9]), e.$set(l);
4731
4738
  },
4732
4739
  i(i) {
4733
- t || (Ne(e.$$.fragment, i), t = !0);
4740
+ t || (Pe(e.$$.fragment, i), t = !0);
4734
4741
  },
4735
4742
  o(i) {
4736
4743
  Ke(e.$$.fragment, i), t = !1;
@@ -4740,7 +4747,7 @@ function ml(s) {
4740
4747
  }
4741
4748
  };
4742
4749
  }
4743
- function wl(s) {
4750
+ function kl(s) {
4744
4751
  var n;
4745
4752
  let e, t;
4746
4753
  return e = new pi({
@@ -4779,7 +4786,7 @@ function wl(s) {
4779
4786
  (a = i[3].zIndex) != null ? a : 1e3), e.$set(l);
4780
4787
  },
4781
4788
  i(i) {
4782
- t || (Ne(e.$$.fragment, i), t = !0);
4789
+ t || (Pe(e.$$.fragment, i), t = !0);
4783
4790
  },
4784
4791
  o(i) {
4785
4792
  Ke(e.$$.fragment, i), t = !1;
@@ -4789,7 +4796,7 @@ function wl(s) {
4789
4796
  }
4790
4797
  };
4791
4798
  }
4792
- function kl(s) {
4799
+ function bl(s) {
4793
4800
  let e, t, n = `${/*$drawerWidth*/
4794
4801
  s[12]}px`, i, o, l, a, c, u, h, p, d, g, w, S, C, M, v = (
4795
4802
  /*$drawerWidth*/
@@ -4868,7 +4875,7 @@ function kl(s) {
4868
4875
  var y, A;
4869
4876
  /*$drawerWidth*/
4870
4877
  b[12] > 0 ? v ? (v.p(b, k), k[0] & /*$drawerWidth*/
4871
- 4096 && Ne(v, 1)) : (v = Us(b), v.c(), Ne(v, 1), v.m(t, null)) : v && (Rn(), Ke(v, 1, 1, () => {
4878
+ 4096 && Pe(v, 1)) : (v = Us(b), v.c(), Pe(v, 1), v.m(t, null)) : v && (Rn(), Ke(v, 1, 1, () => {
4872
4879
  v = null;
4873
4880
  }), In()), (!S || k[0] & /*isFullscreen*/
4874
4881
  4) && J(
@@ -4935,7 +4942,7 @@ function kl(s) {
4935
4942
  );
4936
4943
  },
4937
4944
  i(b) {
4938
- S || (Ne(v), S = !0);
4945
+ S || (Pe(v), S = !0);
4939
4946
  },
4940
4947
  o(b) {
4941
4948
  Ke(v), S = !1;
@@ -4945,8 +4952,8 @@ function kl(s) {
4945
4952
  }
4946
4953
  };
4947
4954
  }
4948
- const mn = 48, pe = 20;
4949
- function bl(s, e, t) {
4955
+ const mn = 48, de = 20;
4956
+ function _l(s, e, t) {
4950
4957
  let n, i, o, l, a = Le, c = () => (a(), a = Ri(i, (O) => t(12, l = O)), i);
4951
4958
  s.$$.on_destroy.push(() => a());
4952
4959
  const u = {
@@ -4955,14 +4962,14 @@ function bl(s, e, t) {
4955
4962
  height: 600,
4956
4963
  title: "智慧运维助手",
4957
4964
  initialState: "default",
4958
- defaultPosition: { right: pe, bottom: pe },
4965
+ defaultPosition: { right: de, bottom: de },
4959
4966
  snappedWidth: 480,
4960
4967
  // 设置默认吸附抽屉宽度
4961
4968
  drawerWidth: 480,
4962
4969
  // 设置默认抽屉宽度
4963
4970
  zIndex: 1e3
4964
4971
  };
4965
- let { target: h = "body" } = e, { options: p = {} } = e, d, g = null, w = !1, S, C = !1, M = 0, v = 0, b = pe, k = 20, y = b, A = k, T = !1, z = pe, R = 50, P = !1, I = { width: 0, height: 0, right: 0, bottom: 0 }, U = !1, Z = !1, Q = [], oe = null;
4972
+ let { target: h = "body" } = e, { options: p = {} } = e, d, g = null, w = !1, S, C = !1, M = 0, v = 0, b = de, k = 20, y = b, A = k, T = !1, z = de, R = 50, P = !1, I = { width: 0, height: 0, right: 0, bottom: 0 }, U = !1, Z = !1, Q = [], oe = null;
4966
4973
  function he() {
4967
4974
  return xe(this, null, function* () {
4968
4975
  try {
@@ -4988,19 +4995,19 @@ function bl(s, e, t) {
4988
4995
  function fe(O, ne = !1) {
4989
4996
  ne ? t(23, T = !0) : t(6, C = !0), M = O.clientX, v = O.clientY, b = ne ? z : y, k = ne ? R : A, O.preventDefault();
4990
4997
  }
4991
- function Fe(O) {
4998
+ function He(O) {
4992
4999
  if (!C && !T) return;
4993
5000
  const ne = M - O.clientX, N = v - O.clientY;
4994
5001
  if (T) {
4995
5002
  const G = b + ne, _e = O.clientY;
4996
- t(24, z = Math.max(pe, Math.min(window.innerWidth - mn - pe, G)));
4997
- const ye = window.innerHeight - mn - pe, je = Math.max(pe, Math.min(ye, _e));
4998
- t(25, R = (window.innerHeight - je - mn) / window.innerHeight * 100);
5003
+ t(24, z = Math.max(de, Math.min(window.innerWidth - mn - de, G)));
5004
+ const ye = window.innerHeight - mn - de, We = Math.max(de, Math.min(ye, _e));
5005
+ t(25, R = (window.innerHeight - We - mn) / window.innerHeight * 100);
4999
5006
  } else {
5000
5007
  const G = n.width || 0, _e = n.height || 0, ye = b + ne;
5001
- t(0, y = Math.max(pe, Math.min(window.innerWidth - G - pe, ye)));
5002
- const He = k + N;
5003
- t(1, A = Math.max(pe, Math.min(window.innerHeight - _e - pe, He)));
5008
+ t(0, y = Math.max(de, Math.min(window.innerWidth - G - de, ye)));
5009
+ const Be = k + N;
5010
+ t(1, A = Math.max(de, Math.min(window.innerHeight - _e - de, Be)));
5004
5011
  }
5005
5012
  }
5006
5013
  function re() {
@@ -5008,7 +5015,7 @@ function bl(s, e, t) {
5008
5015
  }
5009
5016
  Zs(() => {
5010
5017
  typeof h == "string" ? g = document.querySelector(h) || document.body : g = h || document.body;
5011
- const O = (N) => Fe(N), ne = () => re();
5018
+ const O = (N) => He(N), ne = () => re();
5012
5019
  return document.addEventListener("mousemove", O), document.addEventListener("mouseup", ne), d && g && g.appendChild(d), S && S.getBoundingClientRect().left, t(7, U = n.initialState === "snapped"), t(2, P = n.initialState === "fullscreen"), n.initialState === "snapped" ? (t(0, y = 0), t(1, A = 0), t(3, n = ke(ee({}, n), {
5013
5020
  height: typeof window != "undefined" ? window.innerHeight : n.height,
5014
5021
  width: n.snappedWidth || n.width
@@ -5019,18 +5026,18 @@ function bl(s, e, t) {
5019
5026
  document.removeEventListener("mousemove", O), document.removeEventListener("mouseup", ne), g && d && g.removeChild(d);
5020
5027
  };
5021
5028
  });
5022
- function Ue() {
5029
+ function je() {
5023
5030
  return xe(this, null, function* () {
5024
5031
  w || (yield he()), t(22, w = !w);
5025
5032
  });
5026
5033
  }
5027
5034
  function le() {
5028
- var O, ne, N, G, _e, ye, He, je;
5035
+ var O, ne, N, G, _e, ye, Be, We;
5029
5036
  t(2, P = !P), P ? (I.width || (I = {
5030
5037
  width: u.width,
5031
5038
  height: u.height,
5032
- right: (ne = (O = u.defaultPosition) == null ? void 0 : O.right) != null ? ne : pe,
5033
- bottom: (G = (N = u.defaultPosition) == null ? void 0 : N.bottom) != null ? G : pe
5039
+ right: (ne = (O = u.defaultPosition) == null ? void 0 : O.right) != null ? ne : de,
5040
+ bottom: (G = (N = u.defaultPosition) == null ? void 0 : N.bottom) != null ? G : de
5034
5041
  }), U && t(7, U = !1), t(20, p = ke(ee({}, n), {
5035
5042
  width: window.innerWidth,
5036
5043
  height: window.innerHeight,
@@ -5039,7 +5046,7 @@ function bl(s, e, t) {
5039
5046
  width: u.width,
5040
5047
  height: u.height,
5041
5048
  drawerWidth: u.drawerWidth
5042
- })), t(0, y = (ye = (_e = u.defaultPosition) == null ? void 0 : _e.right) != null ? ye : pe), t(1, A = (je = (He = u.defaultPosition) == null ? void 0 : He.bottom) != null ? je : pe));
5049
+ })), t(0, y = (ye = (_e = u.defaultPosition) == null ? void 0 : _e.right) != null ? ye : de), t(1, A = (We = (Be = u.defaultPosition) == null ? void 0 : Be.bottom) != null ? We : de));
5043
5050
  }
5044
5051
  function Xe(O) {
5045
5052
  P || fe(O);
@@ -5058,7 +5065,7 @@ function bl(s, e, t) {
5058
5065
  width: u.width,
5059
5066
  height: u.height,
5060
5067
  drawerWidth: u.drawerWidth
5061
- })), t(0, y = (ne = (O = u.defaultPosition) == null ? void 0 : O.right) != null ? ne : pe), t(1, A = (G = (N = u.defaultPosition) == null ? void 0 : N.bottom) != null ? G : pe));
5068
+ })), t(0, y = (ne = (O = u.defaultPosition) == null ? void 0 : O.right) != null ? ne : de), t(1, A = (G = (N = u.defaultPosition) == null ? void 0 : N.bottom) != null ? G : de));
5062
5069
  }
5063
5070
  function Se(O) {
5064
5071
  t(8, Z = !1);
@@ -5086,7 +5093,7 @@ function bl(s, e, t) {
5086
5093
  w ? P ? window.innerWidth : n.drawerWidth : 0,
5087
5094
  { stiffness: 0.1, damping: 0.6 }
5088
5095
  ))), s.$$.dirty[0] & /*mergedOptions, right, bottom*/
5089
- 11 && typeof window != "undefined" && (t(0, y = Math.max(pe, Math.min(window.innerWidth - (n.width || 0), y))), t(1, A = Math.max(pe, Math.min(window.innerHeight - (n.height || 0), A)))), s.$$.dirty[0] & /*isOpen, buttonRight, buttonBottom, isButtonDragging*/
5096
+ 11 && typeof window != "undefined" && (t(0, y = Math.max(de, Math.min(window.innerWidth - (n.width || 0), y))), t(1, A = Math.max(de, Math.min(window.innerHeight - (n.height || 0), A)))), s.$$.dirty[0] & /*isOpen, buttonRight, buttonBottom, isButtonDragging*/
5090
5097
  62914560 && t(10, o = w ? "display: none;" : `position: fixed; right: ${z}px; bottom: ${R}%; transform: none; cursor: ${T ? "grabbing" : "grab"};`);
5091
5098
  }, [
5092
5099
  y,
@@ -5104,7 +5111,7 @@ function bl(s, e, t) {
5104
5111
  l,
5105
5112
  Q,
5106
5113
  fe,
5107
- Ue,
5114
+ je,
5108
5115
  le,
5109
5116
  Xe,
5110
5117
  ie,
@@ -5121,11 +5128,11 @@ function bl(s, e, t) {
5121
5128
  Ve
5122
5129
  ];
5123
5130
  }
5124
- class yl extends Ln {
5131
+ class Tl extends Ln {
5125
5132
  constructor(e) {
5126
- super(), Cn(this, e, bl, kl, Jt, { target: 21, options: 20 }, null, [-1, -1]);
5133
+ super(), Cn(this, e, _l, bl, Jt, { target: 21, options: 20 }, null, [-1, -1]);
5127
5134
  }
5128
5135
  }
5129
5136
  export {
5130
- yl as SyAssistant
5137
+ Tl as SyAssistant
5131
5138
  };