56 lines
19 KiB
Go
56 lines
19 KiB
Go
// Code generated by templ - DO NOT EDIT.
|
|
|
|
// templ: version: v0.3.924
|
|
// templui component popover - version: main installed by templui v0.71.0
|
|
|
|
package popover
|
|
|
|
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
|
|
|
import "github.com/a-h/templ"
|
|
import templruntime "github.com/a-h/templ/runtime"
|
|
|
|
// https://cdn.jsdelivr.net/npm/@floating-ui/dom@1.7.0
|
|
func FloatingUIDom() templ.Component {
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
return templ_7745c5c3_CtxErr
|
|
}
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
if !templ_7745c5c3_IsBuffer {
|
|
defer func() {
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
if templ_7745c5c3_Err == nil {
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
}
|
|
}()
|
|
}
|
|
ctx = templ.InitializeContext(ctx)
|
|
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
|
if templ_7745c5c3_Var1 == nil {
|
|
templ_7745c5c3_Var1 = templ.NopComponent
|
|
}
|
|
ctx = templ.ClearChildren(ctx)
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<script nonce=\"")
|
|
if templ_7745c5c3_Err != nil {
|
|
return templ_7745c5c3_Err
|
|
}
|
|
var templ_7745c5c3_Var2 string
|
|
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
|
|
if templ_7745c5c3_Err != nil {
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `server/web/templui/components/popover/floating_ui_dom.templ`, Line: 6, Col: 36}
|
|
}
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
|
if templ_7745c5c3_Err != nil {
|
|
return templ_7745c5c3_Err
|
|
}
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\">\n\t\t!(function (t, e) {\n\t\t\"object\" == typeof exports && \"undefined\" != typeof module\n\t\t\t? e(exports, require(\"@floating-ui/core\"))\n\t\t\t: \"function\" == typeof define && define.amd\n\t\t\t? define([\"exports\", \"@floating-ui/core\"], e)\n\t\t\t: e(\n\t\t\t\t((t =\n\t\t\t\t\"undefined\" != typeof globalThis\n\t\t\t\t\t? globalThis\n\t\t\t\t\t: t || self).FloatingUIDOM = {}),\n\t\t\t\tt.FloatingUICore\n\t\t\t);\n\t\t})(this, function (t, e) {\n\t\t\"use strict\";\n\t\tconst n = Math.min,\n\t\t\to = Math.max,\n\t\t\ti = Math.round,\n\t\t\tr = Math.floor,\n\t\t\tc = (t) => ({ x: t, y: t });\n\t\tfunction l() {\n\t\t\treturn \"undefined\" != typeof window;\n\t\t}\n\t\tfunction s(t) {\n\t\t\treturn a(t) ? (t.nodeName || \"\").toLowerCase() : \"#document\";\n\t\t}\n\t\tfunction f(t) {\n\t\t\tvar e;\n\t\t\treturn (\n\t\t\t(null == t || null == (e = t.ownerDocument) ? void 0 : e.defaultView) ||\n\t\t\twindow\n\t\t\t);\n\t\t}\n\t\tfunction u(t) {\n\t\t\tvar e;\n\t\t\treturn null ==\n\t\t\t(e = (a(t) ? t.ownerDocument : t.document) || window.document)\n\t\t\t? void 0\n\t\t\t: e.documentElement;\n\t\t}\n\t\tfunction a(t) {\n\t\t\treturn !!l() && (t instanceof Node || t instanceof f(t).Node);\n\t\t}\n\t\tfunction d(t) {\n\t\t\treturn !!l() && (t instanceof Element || t instanceof f(t).Element);\n\t\t}\n\t\tfunction h(t) {\n\t\t\treturn !!l() && (t instanceof HTMLElement || t instanceof f(t).HTMLElement);\n\t\t}\n\t\tfunction p(t) {\n\t\t\treturn (\n\t\t\t!(!l() || \"undefined\" == typeof ShadowRoot) &&\n\t\t\t(t instanceof ShadowRoot || t instanceof f(t).ShadowRoot)\n\t\t\t);\n\t\t}\n\t\tfunction g(t) {\n\t\t\tconst { overflow: e, overflowX: n, overflowY: o, display: i } = b(t);\n\t\t\treturn (\n\t\t\t/auto|scroll|overlay|hidden|clip/.test(e + o + n) &&\n\t\t\t![\"inline\", \"contents\"].includes(i)\n\t\t\t);\n\t\t}\n\t\tfunction m(t) {\n\t\t\treturn [\"table\", \"td\", \"th\"].includes(s(t));\n\t\t}\n\t\tfunction y(t) {\n\t\t\treturn [\":popover-open\", \":modal\"].some((e) => {\n\t\t\ttry {\n\t\t\t\treturn t.matches(e);\n\t\t\t} catch (t) {\n\t\t\t\treturn !1;\n\t\t\t}\n\t\t\t});\n\t\t}\n\t\tfunction w(t) {\n\t\t\tconst e = x(),\n\t\t\tn = d(t) ? b(t) : t;\n\t\t\treturn (\n\t\t\t[\"transform\", \"translate\", \"scale\", \"rotate\", \"perspective\"].some(\n\t\t\t\t(t) => !!n[t] && \"none\" !== n[t]\n\t\t\t) ||\n\t\t\t(!!n.containerType && \"normal\" !== n.containerType) ||\n\t\t\t(!e && !!n.backdropFilter && \"none\" !== n.backdropFilter) ||\n\t\t\t(!e && !!n.filter && \"none\" !== n.filter) ||\n\t\t\t[\n\t\t\t\t\"transform\",\n\t\t\t\t\"translate\",\n\t\t\t\t\"scale\",\n\t\t\t\t\"rotate\",\n\t\t\t\t\"perspective\",\n\t\t\t\t\"filter\",\n\t\t\t].some((t) => (n.willChange || \"\").includes(t)) ||\n\t\t\t[\"paint\", \"layout\", \"strict\", \"content\"].some((t) =>\n\t\t\t\t(n.contain || \"\").includes(t)\n\t\t\t)\n\t\t\t);\n\t\t}\n\t\tfunction x() {\n\t\t\treturn (\n\t\t\t!(\"undefined\" == typeof CSS || !CSS.supports) &&\n\t\t\tCSS.supports(\"-webkit-backdrop-filter\", \"none\")\n\t\t\t);\n\t\t}\n\t\tfunction v(t) {\n\t\t\treturn [\"html\", \"body\", \"#document\"].includes(s(t));\n\t\t}\n\t\tfunction b(t) {\n\t\t\treturn f(t).getComputedStyle(t);\n\t\t}\n\t\tfunction T(t) {\n\t\t\treturn d(t)\n\t\t\t? { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop }\n\t\t\t: { scrollLeft: t.scrollX, scrollTop: t.scrollY };\n\t\t}\n\t\tfunction L(t) {\n\t\t\tif (\"html\" === s(t)) return t;\n\t\t\tconst e = t.assignedSlot || t.parentNode || (p(t) && t.host) || u(t);\n\t\t\treturn p(e) ? e.host : e;\n\t\t}\n\t\tfunction R(t) {\n\t\t\tconst e = L(t);\n\t\t\treturn v(e)\n\t\t\t? t.ownerDocument\n\t\t\t\t? t.ownerDocument.body\n\t\t\t\t: t.body\n\t\t\t: h(e) && g(e)\n\t\t\t? e\n\t\t\t: R(e);\n\t\t}\n\t\tfunction C(t, e, n) {\n\t\t\tvar o;\n\t\t\tvoid 0 === e && (e = []), void 0 === n && (n = !0);\n\t\t\tconst i = R(t),\n\t\t\tr = i === (null == (o = t.ownerDocument) ? void 0 : o.body),\n\t\t\tc = f(i);\n\t\t\tif (r) {\n\t\t\tconst t = E(c);\n\t\t\treturn e.concat(\n\t\t\t\tc,\n\t\t\t\tc.visualViewport || [],\n\t\t\t\tg(i) ? i : [],\n\t\t\t\tt && n ? C(t) : []\n\t\t\t);\n\t\t\t}\n\t\t\treturn e.concat(i, C(i, [], n));\n\t\t}\n\t\tfunction E(t) {\n\t\t\treturn t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;\n\t\t}\n\t\tfunction S(t) {\n\t\t\tconst e = b(t);\n\t\t\tlet n = parseFloat(e.width) || 0,\n\t\t\to = parseFloat(e.height) || 0;\n\t\t\tconst r = h(t),\n\t\t\tc = r ? t.offsetWidth : n,\n\t\t\tl = r ? t.offsetHeight : o,\n\t\t\ts = i(n) !== c || i(o) !== l;\n\t\t\treturn s && ((n = c), (o = l)), { width: n, height: o, $: s };\n\t\t}\n\t\tfunction F(t) {\n\t\t\treturn d(t) ? t : t.contextElement;\n\t\t}\n\t\tfunction O(t) {\n\t\t\tconst e = F(t);\n\t\t\tif (!h(e)) return c(1);\n\t\t\tconst n = e.getBoundingClientRect(),\n\t\t\t{ width: o, height: r, $: l } = S(e);\n\t\t\tlet s = (l ? i(n.width) : n.width) / o,\n\t\t\tf = (l ? i(n.height) : n.height) / r;\n\t\t\treturn (\n\t\t\t(s && Number.isFinite(s)) || (s = 1),\n\t\t\t(f && Number.isFinite(f)) || (f = 1),\n\t\t\t{ x: s, y: f }\n\t\t\t);\n\t\t}\n\t\tconst D = c(0);\n\t\tfunction H(t) {\n\t\t\tconst e = f(t);\n\t\t\treturn x() && e.visualViewport\n\t\t\t? { x: e.visualViewport.offsetLeft, y: e.visualViewport.offsetTop }\n\t\t\t: D;\n\t\t}\n\t\tfunction P(t, n, o, i) {\n\t\t\tvoid 0 === n && (n = !1), void 0 === o && (o = !1);\n\t\t\tconst r = t.getBoundingClientRect(),\n\t\t\tl = F(t);\n\t\t\tlet s = c(1);\n\t\t\tn && (i ? d(i) && (s = O(i)) : (s = O(t)));\n\t\t\tconst u = (function (t, e, n) {\n\t\t\treturn void 0 === e && (e = !1), !(!n || (e && n !== f(t))) && e;\n\t\t\t})(l, o, i)\n\t\t\t? H(l)\n\t\t\t: c(0);\n\t\t\tlet a = (r.left + u.x) / s.x,\n\t\t\th = (r.top + u.y) / s.y,\n\t\t\tp = r.width / s.x,\n\t\t\tg = r.height / s.y;\n\t\t\tif (l) {\n\t\t\tconst t = f(l),\n\t\t\t\te = i && d(i) ? f(i) : i;\n\t\t\tlet n = t,\n\t\t\t\to = E(n);\n\t\t\tfor (; o && i && e !== n; ) {\n\t\t\t\tconst t = O(o),\n\t\t\t\te = o.getBoundingClientRect(),\n\t\t\t\ti = b(o),\n\t\t\t\tr = e.left + (o.clientLeft + parseFloat(i.paddingLeft)) * t.x,\n\t\t\t\tc = e.top + (o.clientTop + parseFloat(i.paddingTop)) * t.y;\n\t\t\t\t(a *= t.x),\n\t\t\t\t(h *= t.y),\n\t\t\t\t(p *= t.x),\n\t\t\t\t(g *= t.y),\n\t\t\t\t(a += r),\n\t\t\t\t(h += c),\n\t\t\t\t(n = f(o)),\n\t\t\t\t(o = E(n));\n\t\t\t}\n\t\t\t}\n\t\t\treturn e.rectToClientRect({ width: p, height: g, x: a, y: h });\n\t\t}\n\t\tfunction W(t, e) {\n\t\t\tconst n = T(t).scrollLeft;\n\t\t\treturn e ? e.left + n : P(u(t)).left + n;\n\t\t}\n\t\tfunction M(t, e, n) {\n\t\t\tvoid 0 === n && (n = !1);\n\t\t\tconst o = t.getBoundingClientRect();\n\t\t\treturn {\n\t\t\tx: o.left + e.scrollLeft - (n ? 0 : W(t, o)),\n\t\t\ty: o.top + e.scrollTop,\n\t\t\t};\n\t\t}\n\t\tfunction z(t, n, i) {\n\t\t\tlet r;\n\t\t\tif (\"viewport\" === n)\n\t\t\tr = (function (t, e) {\n\t\t\t\tconst n = f(t),\n\t\t\t\to = u(t),\n\t\t\t\ti = n.visualViewport;\n\t\t\t\tlet r = o.clientWidth,\n\t\t\t\tc = o.clientHeight,\n\t\t\t\tl = 0,\n\t\t\t\ts = 0;\n\t\t\t\tif (i) {\n\t\t\t\t(r = i.width), (c = i.height);\n\t\t\t\tconst t = x();\n\t\t\t\t(!t || (t && \"fixed\" === e)) &&\n\t\t\t\t\t((l = i.offsetLeft), (s = i.offsetTop));\n\t\t\t\t}\n\t\t\t\treturn { width: r, height: c, x: l, y: s };\n\t\t\t})(t, i);\n\t\t\telse if (\"document\" === n)\n\t\t\tr = (function (t) {\n\t\t\t\tconst e = u(t),\n\t\t\t\tn = T(t),\n\t\t\t\ti = t.ownerDocument.body,\n\t\t\t\tr = o(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth),\n\t\t\t\tc = o(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);\n\t\t\t\tlet l = -n.scrollLeft + W(t);\n\t\t\t\tconst s = -n.scrollTop;\n\t\t\t\treturn (\n\t\t\t\t\"rtl\" === b(i).direction &&\n\t\t\t\t\t(l += o(e.clientWidth, i.clientWidth) - r),\n\t\t\t\t{ width: r, height: c, x: l, y: s }\n\t\t\t\t);\n\t\t\t})(u(t));\n\t\t\telse if (d(n))\n\t\t\tr = (function (t, e) {\n\t\t\t\tconst n = P(t, !0, \"fixed\" === e),\n\t\t\t\to = n.top + t.clientTop,\n\t\t\t\ti = n.left + t.clientLeft,\n\t\t\t\tr = h(t) ? O(t) : c(1);\n\t\t\t\treturn {\n\t\t\t\twidth: t.clientWidth * r.x,\n\t\t\t\theight: t.clientHeight * r.y,\n\t\t\t\tx: i * r.x,\n\t\t\t\ty: o * r.y,\n\t\t\t\t};\n\t\t\t})(n, i);\n\t\t\telse {\n\t\t\tconst e = H(t);\n\t\t\tr = { x: n.x - e.x, y: n.y - e.y, width: n.width, height: n.height };\n\t\t\t}\n\t\t\treturn e.rectToClientRect(r);\n\t\t}\n\t\tfunction A(t, e) {\n\t\t\tconst n = L(t);\n\t\t\treturn (\n\t\t\t!(n === e || !d(n) || v(n)) && (\"fixed\" === b(n).position || A(n, e))\n\t\t\t);\n\t\t}\n\t\tfunction B(t, e, n) {\n\t\t\tconst o = h(e),\n\t\t\ti = u(e),\n\t\t\tr = \"fixed\" === n,\n\t\t\tl = P(t, !0, r, e);\n\t\t\tlet f = { scrollLeft: 0, scrollTop: 0 };\n\t\t\tconst a = c(0);\n\t\t\tfunction d() {\n\t\t\ta.x = W(i);\n\t\t\t}\n\t\t\tif (o || (!o && !r))\n\t\t\tif (((\"body\" !== s(e) || g(i)) && (f = T(e)), o)) {\n\t\t\t\tconst t = P(e, !0, r, e);\n\t\t\t\t(a.x = t.x + e.clientLeft), (a.y = t.y + e.clientTop);\n\t\t\t} else i && d();\n\t\t\tr && !o && i && d();\n\t\t\tconst p = !i || o || r ? c(0) : M(i, f);\n\t\t\treturn {\n\t\t\tx: l.left + f.scrollLeft - a.x - p.x,\n\t\t\ty: l.top + f.scrollTop - a.y - p.y,\n\t\t\twidth: l.width,\n\t\t\theight: l.height,\n\t\t\t};\n\t\t}\n\t\tfunction V(t) {\n\t\t\treturn \"static\" === b(t).position;\n\t\t}\n\t\tfunction N(t, e) {\n\t\t\tif (!h(t) || \"fixed\" === b(t).position) return null;\n\t\t\tif (e) return e(t);\n\t\t\tlet n = t.offsetParent;\n\t\t\treturn u(t) === n && (n = n.ownerDocument.body), n;\n\t\t}\n\t\tfunction I(t, e) {\n\t\t\tconst n = f(t);\n\t\t\tif (y(t)) return n;\n\t\t\tif (!h(t)) {\n\t\t\tlet e = L(t);\n\t\t\tfor (; e && !v(e); ) {\n\t\t\t\tif (d(e) && !V(e)) return e;\n\t\t\t\te = L(e);\n\t\t\t}\n\t\t\treturn n;\n\t\t\t}\n\t\t\tlet o = N(t, e);\n\t\t\tfor (; o && m(o) && V(o); ) o = N(o, e);\n\t\t\treturn o && v(o) && V(o) && !w(o)\n\t\t\t? n\n\t\t\t: o ||\n\t\t\t\t(function (t) {\n\t\t\t\t\tlet e = L(t);\n\t\t\t\t\tfor (; h(e) && !v(e); ) {\n\t\t\t\t\tif (w(e)) return e;\n\t\t\t\t\tif (y(e)) return null;\n\t\t\t\t\te = L(e);\n\t\t\t\t\t}\n\t\t\t\t\treturn null;\n\t\t\t\t})(t) ||\n\t\t\t\tn;\n\t\t}\n\t\tconst k = {\n\t\t\tconvertOffsetParentRelativeRectToViewportRelativeRect: function (t) {\n\t\t\tlet { elements: e, rect: n, offsetParent: o, strategy: i } = t;\n\t\t\tconst r = \"fixed\" === i,\n\t\t\t\tl = u(o),\n\t\t\t\tf = !!e && y(e.floating);\n\t\t\tif (o === l || (f && r)) return n;\n\t\t\tlet a = { scrollLeft: 0, scrollTop: 0 },\n\t\t\t\td = c(1);\n\t\t\tconst p = c(0),\n\t\t\t\tm = h(o);\n\t\t\tif (\n\t\t\t\t(m || (!m && !r)) &&\n\t\t\t\t((\"body\" !== s(o) || g(l)) && (a = T(o)), h(o))\n\t\t\t) {\n\t\t\t\tconst t = P(o);\n\t\t\t\t(d = O(o)), (p.x = t.x + o.clientLeft), (p.y = t.y + o.clientTop);\n\t\t\t}\n\t\t\tconst w = !l || m || r ? c(0) : M(l, a, !0);\n\t\t\treturn {\n\t\t\t\twidth: n.width * d.x,\n\t\t\t\theight: n.height * d.y,\n\t\t\t\tx: n.x * d.x - a.scrollLeft * d.x + p.x + w.x,\n\t\t\t\ty: n.y * d.y - a.scrollTop * d.y + p.y + w.y,\n\t\t\t};\n\t\t\t},\n\t\t\tgetDocumentElement: u,\n\t\t\tgetClippingRect: function (t) {\n\t\t\tlet { element: e, boundary: i, rootBoundary: r, strategy: c } = t;\n\t\t\tconst l = [\n\t\t\t\t...(\"clippingAncestors\" === i\n\t\t\t\t\t? y(e)\n\t\t\t\t\t? []\n\t\t\t\t\t: (function (t, e) {\n\t\t\t\t\t\tconst n = e.get(t);\n\t\t\t\t\t\tif (n) return n;\n\t\t\t\t\t\tlet o = C(t, [], !1).filter((t) => d(t) && \"body\" !== s(t)),\n\t\t\t\t\t\t\ti = null;\n\t\t\t\t\t\tconst r = \"fixed\" === b(t).position;\n\t\t\t\t\t\tlet c = r ? L(t) : t;\n\t\t\t\t\t\tfor (; d(c) && !v(c); ) {\n\t\t\t\t\t\t\tconst e = b(c),\n\t\t\t\t\t\t\tn = w(c);\n\t\t\t\t\t\t\tn || \"fixed\" !== e.position || (i = null),\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tr\n\t\t\t\t\t\t\t\t? !n && !i\n\t\t\t\t\t\t\t\t: (!n &&\n\t\t\t\t\t\t\t\t\t\"static\" === e.position &&\n\t\t\t\t\t\t\t\t\ti &&\n\t\t\t\t\t\t\t\t\t[\"absolute\", \"fixed\"].includes(i.position)) ||\n\t\t\t\t\t\t\t\t\t(g(c) && !n && A(t, c))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t? (o = o.filter((t) => t !== c))\n\t\t\t\t\t\t\t\t: (i = e),\n\t\t\t\t\t\t\t(c = L(c));\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn e.set(t, o), o;\n\t\t\t\t\t\t})(e, this._c)\n\t\t\t\t\t: [].concat(i)),\n\t\t\t\tr,\n\t\t\t\t],\n\t\t\t\tf = l[0],\n\t\t\t\tu = l.reduce((t, i) => {\n\t\t\t\tconst r = z(e, i, c);\n\t\t\t\treturn (\n\t\t\t\t\t(t.top = o(r.top, t.top)),\n\t\t\t\t\t(t.right = n(r.right, t.right)),\n\t\t\t\t\t(t.bottom = n(r.bottom, t.bottom)),\n\t\t\t\t\t(t.left = o(r.left, t.left)),\n\t\t\t\t\tt\n\t\t\t\t);\n\t\t\t\t}, z(e, f, c));\n\t\t\treturn {\n\t\t\t\twidth: u.right - u.left,\n\t\t\t\theight: u.bottom - u.top,\n\t\t\t\tx: u.left,\n\t\t\t\ty: u.top,\n\t\t\t};\n\t\t\t},\n\t\t\tgetOffsetParent: I,\n\t\t\tgetElementRects: async function (t) {\n\t\t\tconst e = this.getOffsetParent || I,\n\t\t\t\tn = this.getDimensions,\n\t\t\t\to = await n(t.floating);\n\t\t\treturn {\n\t\t\t\treference: B(t.reference, await e(t.floating), t.strategy),\n\t\t\t\tfloating: { x: 0, y: 0, width: o.width, height: o.height },\n\t\t\t};\n\t\t\t},\n\t\t\tgetClientRects: function (t) {\n\t\t\treturn Array.from(t.getClientRects());\n\t\t\t},\n\t\t\tgetDimensions: function (t) {\n\t\t\tconst { width: e, height: n } = S(t);\n\t\t\treturn { width: e, height: n };\n\t\t\t},\n\t\t\tgetScale: O,\n\t\t\tisElement: d,\n\t\t\tisRTL: function (t) {\n\t\t\treturn \"rtl\" === b(t).direction;\n\t\t\t},\n\t\t};\n\t\tfunction q(t, e) {\n\t\t\treturn (\n\t\t\tt.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height\n\t\t\t);\n\t\t}\n\t\tconst U = e.detectOverflow,\n\t\t\tj = e.offset,\n\t\t\tX = e.autoPlacement,\n\t\t\tY = e.shift,\n\t\t\t$ = e.flip,\n\t\t\t_ = e.size,\n\t\t\tG = e.hide,\n\t\t\tJ = e.arrow,\n\t\t\tK = e.inline,\n\t\t\tQ = e.limitShift;\n\t\t(t.arrow = J),\n\t\t\t(t.autoPlacement = X),\n\t\t\t(t.autoUpdate = function (t, e, i, c) {\n\t\t\tvoid 0 === c && (c = {});\n\t\t\tconst {\n\t\t\t\tancestorScroll: l = !0,\n\t\t\t\tancestorResize: s = !0,\n\t\t\t\telementResize: f = \"function\" == typeof ResizeObserver,\n\t\t\t\tlayoutShift: a = \"function\" == typeof IntersectionObserver,\n\t\t\t\tanimationFrame: d = !1,\n\t\t\t\t} = c,\n\t\t\t\th = F(t),\n\t\t\t\tp = l || s ? [...(h ? C(h) : []), ...C(e)] : [];\n\t\t\tp.forEach((t) => {\n\t\t\t\tl && t.addEventListener(\"scroll\", i, { passive: !0 }),\n\t\t\t\ts && t.addEventListener(\"resize\", i);\n\t\t\t});\n\t\t\tconst g =\n\t\t\t\th && a\n\t\t\t\t? (function (t, e) {\n\t\t\t\t\tlet i,\n\t\t\t\t\t\tc = null;\n\t\t\t\t\tconst l = u(t);\n\t\t\t\t\tfunction s() {\n\t\t\t\t\t\tvar t;\n\t\t\t\t\t\tclearTimeout(i), null == (t = c) || t.disconnect(), (c = null);\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t(function f(u, a) {\n\t\t\t\t\t\tvoid 0 === u && (u = !1), void 0 === a && (a = 1), s();\n\t\t\t\t\t\tconst d = t.getBoundingClientRect(),\n\t\t\t\t\t\t\t{ left: h, top: p, width: g, height: m } = d;\n\t\t\t\t\t\tif ((u || e(), !g || !m)) return;\n\t\t\t\t\t\tconst y = {\n\t\t\t\t\t\t\trootMargin:\n\t\t\t\t\t\t\t-r(p) +\n\t\t\t\t\t\t\t\"px \" +\n\t\t\t\t\t\t\t-r(l.clientWidth - (h + g)) +\n\t\t\t\t\t\t\t\"px \" +\n\t\t\t\t\t\t\t-r(l.clientHeight - (p + m)) +\n\t\t\t\t\t\t\t\"px \" +\n\t\t\t\t\t\t\t-r(h) +\n\t\t\t\t\t\t\t\"px\",\n\t\t\t\t\t\t\tthreshold: o(0, n(1, a)) || 1,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tlet w = !0;\n\t\t\t\t\t\tfunction x(e) {\n\t\t\t\t\t\t\tconst n = e[0].intersectionRatio;\n\t\t\t\t\t\t\tif (n !== a) {\n\t\t\t\t\t\t\tif (!w) return f();\n\t\t\t\t\t\t\tn\n\t\t\t\t\t\t\t\t? f(!1, n)\n\t\t\t\t\t\t\t\t: (i = setTimeout(() => {\n\t\t\t\t\t\t\t\t\tf(!1, 1e-7);\n\t\t\t\t\t\t\t\t}, 1e3));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t1 !== n || q(d, t.getBoundingClientRect()) || f(), (w = !1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tc = new IntersectionObserver(x, {\n\t\t\t\t\t\t\t...y,\n\t\t\t\t\t\t\troot: l.ownerDocument,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (t) {\n\t\t\t\t\t\t\tc = new IntersectionObserver(x, y);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc.observe(t);\n\t\t\t\t\t\t})(!0),\n\t\t\t\t\t\ts\n\t\t\t\t\t);\n\t\t\t\t\t})(h, i)\n\t\t\t\t: null;\n\t\t\tlet m,\n\t\t\t\ty = -1,\n\t\t\t\tw = null;\n\t\t\tf &&\n\t\t\t\t((w = new ResizeObserver((t) => {\n\t\t\t\tlet [n] = t;\n\t\t\t\tn &&\n\t\t\t\t\tn.target === h &&\n\t\t\t\t\tw &&\n\t\t\t\t\t(w.unobserve(e),\n\t\t\t\t\tcancelAnimationFrame(y),\n\t\t\t\t\t(y = requestAnimationFrame(() => {\n\t\t\t\t\tvar t;\n\t\t\t\t\tnull == (t = w) || t.observe(e);\n\t\t\t\t\t}))),\n\t\t\t\t\ti();\n\t\t\t\t})),\n\t\t\t\th && !d && w.observe(h),\n\t\t\t\tw.observe(e));\n\t\t\tlet x = d ? P(t) : null;\n\t\t\treturn (\n\t\t\t\td &&\n\t\t\t\t(function e() {\n\t\t\t\t\tconst n = P(t);\n\t\t\t\t\tx && !q(x, n) && i();\n\t\t\t\t\t(x = n), (m = requestAnimationFrame(e));\n\t\t\t\t})(),\n\t\t\t\ti(),\n\t\t\t\t() => {\n\t\t\t\tvar t;\n\t\t\t\tp.forEach((t) => {\n\t\t\t\t\tl && t.removeEventListener(\"scroll\", i),\n\t\t\t\t\ts && t.removeEventListener(\"resize\", i);\n\t\t\t\t}),\n\t\t\t\t\tnull == g || g(),\n\t\t\t\t\tnull == (t = w) || t.disconnect(),\n\t\t\t\t\t(w = null),\n\t\t\t\t\td && cancelAnimationFrame(m);\n\t\t\t\t}\n\t\t\t);\n\t\t\t}),\n\t\t\t(t.computePosition = (t, n, o) => {\n\t\t\tconst i = new Map(),\n\t\t\t\tr = { platform: k, ...o },\n\t\t\t\tc = { ...r.platform, _c: i };\n\t\t\treturn e.computePosition(t, n, { ...r, platform: c });\n\t\t\t}),\n\t\t\t(t.detectOverflow = U),\n\t\t\t(t.flip = $),\n\t\t\t(t.getOverflowAncestors = C),\n\t\t\t(t.hide = G),\n\t\t\t(t.inline = K),\n\t\t\t(t.limitShift = Q),\n\t\t\t(t.offset = j),\n\t\t\t(t.platform = k),\n\t\t\t(t.shift = Y),\n\t\t\t(t.size = _);\n\t\t});\n\t</script>")
|
|
if templ_7745c5c3_Err != nil {
|
|
return templ_7745c5c3_Err
|
|
}
|
|
return nil
|
|
})
|
|
}
|
|
|
|
var _ = templruntime.GeneratedTemplate
|