yuyeon 0.3.2-rc.3 → 0.3.2-rc.5

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/yuyeon.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var ur = Object.defineProperty;
2
2
  var cr = (e, t, n) => t in e ? ur(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var he = (e, t, n) => cr(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { getCurrentInstance as ne, capitalize as sr, inject as ue, computed as k, shallowRef as re, watchEffect as We, ref as I, provide as ce, h as se, watch as R, onScopeDispose as Ce, effectScope as hn, toRaw as dr, toRef as oe, onBeforeUnmount as Tt, reactive as Ee, onMounted as gn, nextTick as ye, resolveDynamicComponent as fr, toRefs as vr, createVNode as d, withDirectives as ze, mergeProps as W, resolveDirective as Et, unref as ve, readonly as Qt, onBeforeMount as ka, Fragment as X, createTextVNode as Ot, withKeys as yr, Transition as Mt, withModifiers as bn, Teleport as mr, vShow as wn, watchPostEffect as hr, defineComponent as pn, resolveComponent as gr, onBeforeUpdate as br, isVNode as It } from "vue";
4
+ import { getCurrentInstance as ne, capitalize as sr, inject as ue, computed as k, shallowRef as re, watchEffect as We, ref as I, provide as ce, h as se, watch as R, onScopeDispose as Ce, effectScope as hn, toRaw as dr, toRef as oe, onBeforeUnmount as Tt, reactive as Ee, onMounted as gn, nextTick as ye, resolveDynamicComponent as fr, createVNode as d, withDirectives as ze, mergeProps as W, resolveDirective as Et, unref as ve, readonly as Qt, onBeforeMount as ka, Fragment as X, createTextVNode as Ot, withKeys as vr, Transition as Mt, toRefs as yr, withModifiers as bn, Teleport as mr, vShow as wn, watchPostEffect as hr, defineComponent as pn, resolveComponent as gr, onBeforeUpdate as br, isVNode as It } from "vue";
5
5
  function Je(e, t) {
6
6
  return e ? Object.prototype.hasOwnProperty.call(e, t) : !1;
7
7
  }
@@ -574,2257 +574,2070 @@ const Pa = {
574
574
  Ba(e);
575
575
  }
576
576
  }, Nr = /rgb(a?)\((?<v>.*)\)/, Vr = /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/;
577
- function Cn(e, t = 0, n = {
578
- leading: !1,
579
- trailing: !0
580
- }) {
581
- let a, i, r = 0, l, o, c, s = 0, u = !1, h = !1, y = !0;
582
- if (typeof e != "function")
583
- throw new TypeError("NOT Function");
584
- t = +t || 0, wr(n) && (u = !!n.leading, h = "maxWait" in n, r = h ? Math.max(+((n == null ? void 0 : n.maxWait) || 0), t) : r, y = "trailing" in n ? !!n.trailing : y);
585
- function x(m) {
586
- const _ = a, M = i;
587
- return a = i = void 0, s = m, l = e.apply(M, _), l;
588
- }
589
- function C(m) {
590
- return s = m, o = window.setTimeout(f, t), u ? x(m) : l;
591
- }
592
- function S(m) {
593
- var _ = m - (c ?? 0), M = m - (s ?? 0), P = t - _;
594
- return h ? Math.min(P, (r ?? 0) - M) : P;
595
- }
596
- function v(m) {
597
- var _ = m - (c ?? 0), M = m - (s ?? 0);
598
- return c === void 0 || _ >= t || _ < 0 || h && M >= (r ?? 0);
599
- }
600
- function f() {
601
- const m = Date.now();
602
- if (v(m))
603
- return b(m);
604
- o = window.setTimeout(f, S(m));
605
- }
606
- function b(m) {
607
- return o = void 0, y && a ? x(m) : (a = i = void 0, l);
608
- }
609
- function p() {
610
- o !== void 0 && clearTimeout(o), s = 0, a = c = i = o = void 0;
611
- }
612
- function g() {
613
- return o === void 0 ? l : b(Date.now());
614
- }
615
- function w() {
616
- const m = Date.now(), _ = v(m);
617
- if (a = arguments, i = this, c = m, _) {
618
- if (o === void 0)
619
- return C(c);
620
- if (h)
621
- return clearTimeout(o), o = window.setTimeout(f, t), x(c);
577
+ function an(e) {
578
+ if (e && e[0] === "#") {
579
+ const t = e.substring(1, e.length), n = t.length, a = [];
580
+ if (n === 3 || n === 6) {
581
+ const i = n === 6 ? 2 : 1;
582
+ for (let r = 0; r < 3; r += 1) {
583
+ const l = t.substring(
584
+ r * i,
585
+ r * i + i
586
+ );
587
+ a.push(Number.parseInt(l, 16));
588
+ }
589
+ return a;
622
590
  }
623
- return o === void 0 && (o = window.setTimeout(f, t)), l;
624
591
  }
625
- return w.cancel = p, w.flush = g, w;
626
- }
627
- function kn(e) {
628
- const t = e.getRootNode();
629
- return t !== document && t.getRootNode({ composed: !0 }) !== document ? null : t;
630
- }
631
- function Lr(e, t, n) {
632
- if (!e)
633
- return !1;
634
- const a = kn(t);
635
- if (typeof ShadowRoot < "u" && a instanceof ShadowRoot && a.host === e.target)
636
- return !1;
637
- const i = [];
638
- return i.push(t), !i.some((r) => r == null ? void 0 : r.contains(e.target));
639
- }
640
- function Rr(e) {
641
- const t = e.getBoundingClientRect(), n = getComputedStyle(e), a = n.transform;
642
- if (a) {
643
- let i, r, l, o;
644
- if (a.startsWith("matrix3d(")) {
645
- const x = a.slice(9, -1).split(/, /);
646
- i = +x[0], r = +x[5], l = +x[12], o = +x[13];
647
- } else if (a.startsWith("matrix(")) {
648
- const x = a.slice(7, -1).split(/, /);
649
- i = +x[0], r = +x[3], l = +x[4], o = +x[5];
650
- } else
651
- return t;
652
- const c = n.transformOrigin, s = t.x - l - (1 - i) * parseFloat(c), u = t.y - o - (1 - r) * parseFloat(c.slice(c.indexOf(" ") + 1)), h = i ? t.width / i : e.offsetWidth, y = r ? t.height / r : e.offsetHeight;
653
- return {
654
- x: s,
655
- y: u,
656
- width: h,
657
- height: y,
658
- top: u,
659
- right: s + h,
660
- bottom: u + y,
661
- left: s
662
- };
663
- } else
664
- return t;
665
- }
666
- function Lt(e) {
667
- return Math.round(e * devicePixelRatio) / devicePixelRatio;
668
- }
669
- function Gn(e) {
670
- return Math.ceil(e * devicePixelRatio) / devicePixelRatio;
671
- }
672
- function z(e, t = "px") {
673
- if (e == null || e === "")
674
- return;
675
- let n = Number(e);
676
- return typeof e == "string" && isNaN(n) ? e : isFinite(n) ? `${n}${t}` : void 0;
677
592
  }
678
- class ct {
679
- constructor({
680
- x: t,
681
- y: n,
682
- width: a,
683
- height: i
684
- }) {
685
- he(this, "x");
686
- he(this, "y");
687
- he(this, "width");
688
- he(this, "height");
689
- this.x = t ?? 0, this.y = n ?? 0, this.width = a ?? 0, this.height = i ?? 0;
690
- }
691
- get top() {
692
- return this.y;
693
- }
694
- get bottom() {
695
- return this.y + this.height;
696
- }
697
- get left() {
698
- return this.x;
699
- }
700
- get right() {
701
- return this.x + this.width;
702
- }
593
+ function je(e) {
594
+ return Nr.test(e) || Vr.test(e);
703
595
  }
704
- function Xn(e, t) {
705
- return {
706
- x: {
707
- before: Math.max(0, t.left - e.left),
708
- after: Math.max(0, e.right - t.right)
709
- },
710
- y: {
711
- before: Math.max(0, t.top - e.top),
712
- after: Math.max(0, e.bottom - t.bottom)
596
+ function Lr(e) {
597
+ var n, a;
598
+ if (e != null && e.startsWith("#"))
599
+ return ((n = an(e)) == null ? void 0 : n.join(",")) || "";
600
+ const t = /rgb(a?)\((?<v>.*)\)/;
601
+ if (t.test(e)) {
602
+ const i = ((a = t.exec(e)) == null ? void 0 : a[2]) || "";
603
+ if (i) {
604
+ const r = i.trim().split(",");
605
+ return r.splice(3, 1), r.join(",");
713
606
  }
714
- };
715
- }
716
- const an = (e, t) => e.includes(t), $a = ["top", "bottom"], Fr = ["start", "end", "left", "right"];
717
- function Zn(e, t) {
718
- let [n, a] = e.split(" ");
719
- return a || (a = an($a, n) ? "start" : an(Fr, n) ? "top" : "center"), {
720
- side: Jn(n, t),
721
- align: Jn(a, t)
722
- };
723
- }
724
- function Jn(e, t) {
725
- return e === "start" ? t ? "right" : "left" : e === "end" ? t ? "left" : "right" : e;
726
- }
727
- function Rt(e) {
728
- return {
729
- side: {
730
- center: "center",
731
- top: "bottom",
732
- bottom: "top",
733
- left: "right",
734
- right: "left"
735
- }[e.side],
736
- align: e.align
737
- };
738
- }
739
- function Ft(e) {
740
- return {
741
- side: e.side,
742
- align: {
743
- center: "center",
744
- top: "bottom",
745
- bottom: "top",
746
- left: "right",
747
- right: "left"
748
- }[e.align]
749
- };
750
- }
751
- function Qn(e) {
752
- return {
753
- side: e.align,
754
- align: e.side
755
- };
756
- }
757
- function ea(e) {
758
- return an($a, e.side) ? "y" : "x";
759
- }
760
- function jr(e, t) {
761
- for (; e; ) {
762
- if (_n(e)) return e;
763
- e = e.parentElement;
764
607
  }
765
- return document.scrollingElement;
766
- }
767
- function wt(e, t, n) {
768
- const a = [];
769
- if (t && e && !t.contains(e)) return a;
770
- for (; e && (_n(e) && a.push(e), e !== t); )
771
- e = e.parentElement;
772
- return a;
773
- }
774
- function _n(e, t) {
775
- if (!e || e.nodeType !== Node.ELEMENT_NODE)
776
- return !1;
777
- const n = window.getComputedStyle(e);
778
- return n.overflowY === "scroll" || n.overflowY === "auto" && e.clientHeight < e.scrollHeight;
608
+ return "";
779
609
  }
780
- class Kr {
781
- constructor() {
782
- he(this, "clean", !0);
783
- he(this, "frames", []);
784
- he(this, "raf", -1);
785
- }
786
- run() {
787
- cancelAnimationFrame(this.raf), this.raf = requestAnimationFrame(() => {
788
- const t = this.frames.shift();
789
- t && t(), frames.length ? this.run() : this.clean = !0;
790
- });
791
- }
792
- requestNewFrame(t) {
793
- !this.clean || this.frames.length ? (this.frames.push(t), this.run()) : (this.clean = !1, t(), this.run());
610
+ const Rr = "YSpinnerRing", $a = /* @__PURE__ */ V({
611
+ name: Rr,
612
+ render() {
613
+ return d("svg", {
614
+ class: "y-spinner-ring",
615
+ width: "48",
616
+ height: "48",
617
+ viewBox: "0 0 48 48",
618
+ xmlns: "http://www.w3.org/2000/svg"
619
+ }, [d("circle", {
620
+ class: "y-spinner-ring__circle",
621
+ cx: "24",
622
+ cy: "24",
623
+ r: "18",
624
+ "stroke-width": "4",
625
+ "stroke-dasharray": "113.097",
626
+ "stroke-dashoffset": "113.097"
627
+ }, null)]);
794
628
  }
795
- }
796
- function Hr(e) {
797
- const t = Ee({}), n = k(e);
798
- return We(
799
- () => {
800
- for (const a in n.value)
801
- t[a] = n.value[a];
802
- },
803
- { flush: "sync" }
804
- ), vr(t);
805
- }
806
- const jt = {
807
- AD: 1,
808
- AE: 6,
809
- AF: 6,
810
- AG: 0,
811
- AI: 1,
812
- AL: 1,
813
- AM: 1,
814
- AN: 1,
815
- AR: 1,
816
- AS: 0,
817
- AT: 1,
818
- AU: 1,
819
- AX: 1,
820
- AZ: 1,
821
- BA: 1,
822
- BD: 0,
823
- BE: 1,
824
- BG: 1,
825
- BH: 6,
826
- BM: 1,
827
- BN: 1,
828
- BR: 0,
829
- BS: 0,
830
- BT: 0,
831
- BW: 0,
832
- BY: 1,
833
- BZ: 0,
834
- CA: 0,
835
- CH: 1,
836
- CL: 1,
837
- CM: 1,
838
- CN: 1,
839
- CO: 0,
840
- CR: 1,
841
- CY: 1,
842
- CZ: 1,
843
- DE: 1,
844
- DJ: 6,
845
- DK: 1,
846
- DM: 0,
847
- DO: 0,
848
- DZ: 6,
849
- EC: 1,
850
- EE: 1,
851
- EG: 6,
852
- ES: 1,
853
- ET: 0,
854
- FI: 1,
855
- FJ: 1,
856
- FO: 1,
857
- FR: 1,
858
- GB: 1,
859
- GE: 1,
860
- GF: 1,
861
- GP: 1,
862
- GR: 1,
863
- GT: 0,
864
- GU: 0,
865
- HK: 0,
866
- HN: 0,
867
- HR: 1,
868
- HU: 1,
869
- ID: 0,
870
- IE: 1,
871
- IL: 0,
872
- IN: 0,
873
- IQ: 6,
874
- IR: 6,
875
- IS: 1,
876
- IT: 1,
877
- JM: 0,
878
- JO: 6,
879
- JP: 0,
880
- KE: 0,
881
- KG: 1,
882
- KH: 0,
883
- KR: 0,
884
- KW: 6,
885
- KZ: 1,
886
- LA: 0,
887
- LB: 1,
888
- LI: 1,
889
- LK: 1,
890
- LT: 1,
891
- LU: 1,
892
- LV: 1,
893
- LY: 6,
894
- MC: 1,
895
- MD: 1,
896
- ME: 1,
897
- MH: 0,
898
- MK: 1,
899
- MM: 0,
900
- MN: 1,
901
- MO: 0,
902
- MQ: 1,
903
- MT: 0,
904
- MV: 5,
905
- MX: 0,
906
- MY: 1,
907
- MZ: 0,
908
- NI: 0,
909
- NL: 1,
910
- NO: 1,
911
- NP: 0,
912
- NZ: 1,
913
- OM: 6,
914
- PA: 0,
915
- PE: 0,
916
- PH: 0,
917
- PK: 0,
918
- PL: 1,
919
- PR: 0,
920
- PT: 0,
921
- PY: 0,
922
- QA: 6,
923
- RE: 1,
924
- RO: 1,
925
- RS: 1,
926
- RU: 1,
927
- SA: 0,
928
- SD: 6,
929
- SE: 1,
930
- SG: 0,
931
- SI: 1,
932
- SK: 1,
933
- SM: 1,
934
- SV: 0,
935
- SY: 6,
936
- TH: 0,
937
- TJ: 1,
938
- TM: 1,
939
- TR: 1,
940
- TT: 0,
941
- TW: 0,
942
- UA: 1,
943
- UM: 0,
944
- US: 0,
945
- UY: 1,
946
- UZ: 1,
947
- VA: 1,
948
- VE: 0,
949
- VI: 0,
950
- VN: 1,
951
- WS: 0,
952
- XK: 1,
953
- YE: 0,
954
- ZA: 0,
955
- ZW: 0
956
- }, Wr = 1e3 * 60 * 60 * 24, zr = /^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/, st = new Date(1970, 0, 4);
957
- class U {
958
- static date(t) {
959
- if (t == null) return /* @__PURE__ */ new Date();
960
- if (t instanceof Date)
961
- return t;
962
- let n;
963
- if (typeof t == "string") {
964
- if (zr.test(t))
965
- return U.parseLocalDate(t);
966
- if (n = Date.parse(t), !isNaN(n))
967
- return new Date(n);
629
+ }), Fr = Symbol.for("yuyeon.y-toggle-button"), de = "y-button", Bt = F({
630
+ loading: Boolean,
631
+ active: {
632
+ type: Boolean,
633
+ default: void 0
634
+ },
635
+ injectSymbol: {
636
+ type: null,
637
+ default: Fr
638
+ },
639
+ //
640
+ variation: {
641
+ type: String
642
+ },
643
+ small: Boolean,
644
+ icon: Boolean,
645
+ outlined: {
646
+ type: Boolean,
647
+ default: !1
648
+ },
649
+ rounded: {
650
+ type: Boolean,
651
+ default: !1
652
+ },
653
+ filled: {
654
+ type: Boolean,
655
+ default: !1
656
+ },
657
+ //
658
+ color: {
659
+ type: String
660
+ },
661
+ noWave: {
662
+ type: Boolean,
663
+ default: !1
664
+ },
665
+ ...Br(),
666
+ ...Tr()
667
+ }, "YButton"), Q = /* @__PURE__ */ V({
668
+ name: "YButton",
669
+ directives: {
670
+ PlateWave: Pa
671
+ },
672
+ props: Bt(),
673
+ emits: {
674
+ click: (e) => !0,
675
+ "choice:selected": (e) => !0
676
+ },
677
+ setup(e, {
678
+ attrs: t,
679
+ slots: n,
680
+ emit: a
681
+ }) {
682
+ const i = Er(e, e.injectSymbol, !1), r = Pr(e, t);
683
+ Yr(r, i == null ? void 0 : i.select);
684
+ const l = k(() => {
685
+ var y;
686
+ return e.active !== void 0 ? e.active : r.isLink.value ? (y = r.isActive) == null ? void 0 : y.value : i == null ? void 0 : i.isSelected.value;
687
+ }), o = k(() => {
688
+ const {
689
+ variation: y
690
+ } = e;
691
+ return typeof y == "string" ? y.split(",").map((x) => x.trim()) : [];
692
+ }), c = k(() => {
693
+ const {
694
+ outlined: y,
695
+ rounded: x,
696
+ filled: C,
697
+ small: S,
698
+ icon: v
699
+ } = e;
700
+ return {
701
+ [`${de}--outlined`]: o.value.includes("outlined") || y,
702
+ [`${de}--rounded`]: o.value.includes("rounded") || x,
703
+ [`${de}--filled`]: o.value.includes("filled") || C,
704
+ [`${de}--text`]: o.value.includes("text"),
705
+ [`${de}--small`]: o.value.includes("small") || S,
706
+ [`${de}--x-small`]: o.value.includes("x-small") || S,
707
+ [`${de}--icon`]: o.value.includes("icon") || v,
708
+ [`${de}--color`]: e.color,
709
+ [`${de}--loading`]: e.loading,
710
+ [`${de}--disabled`]: e.disabled,
711
+ [`${de}--active`]: l.value
712
+ };
713
+ }), s = k(() => {
714
+ let {
715
+ color: y
716
+ } = e, x;
717
+ return y && !je(y) && (y = `var(--y-theme-${y})`, x = `var(--y-theme-on-${e.color})`), {
718
+ "--y-button__color": y,
719
+ "--y-button__text-color": x
720
+ };
721
+ }), u = k(() => (i == null ? void 0 : i.disabled.value) || e.disabled);
722
+ function h(y) {
723
+ var x;
724
+ u.value || e.loading || r.isLink.value && (y.metaKey || y.altKey || y.ctrlKey || y.shiftKey || y.button !== 0 || t.target === "_blank") || (a("click", y), (x = r.navigate) == null || x.call(r, y), i == null || i.toggle());
968
725
  }
969
- return null;
726
+ return K(() => {
727
+ const y = r.isLink.value ? "a" : "button";
728
+ return ze(d(y, {
729
+ type: y === "a" ? void 0 : "button",
730
+ class: [`${de}`, i == null ? void 0 : i.selectedClass.value, {
731
+ ...c.value
732
+ }],
733
+ href: e.disabled ? void 0 : r.href.value,
734
+ style: s.value,
735
+ onClick: h,
736
+ disabled: e.disabled ? !0 : void 0
737
+ }, {
738
+ default: () => {
739
+ var x, C, S;
740
+ return [d("span", {
741
+ class: ["y-button__content"]
742
+ }, [e.loading && (n.loading ? (x = n.loading) == null ? void 0 : x.call(n) : d($a, W({
743
+ width: "24",
744
+ height: "24"
745
+ }), null)), (C = n.default) == null ? void 0 : C.call(n)]), (S = n.append) == null ? void 0 : S.call(n)];
746
+ }
747
+ }), [[Et("plate-wave"), !e.noWave && !e.loading]]);
748
+ }), {
749
+ link: r
750
+ };
970
751
  }
971
- static format(t, n, a, i) {
972
- const r = U.date(t) ?? /* @__PURE__ */ new Date(), l = i == null ? void 0 : i[n];
973
- if (typeof l == "function")
974
- return l(r, n, a);
975
- let o = {};
976
- switch (n) {
977
- case "fullDateWithWeekday":
978
- o = {
979
- weekday: "long",
980
- day: "numeric",
981
- month: "long",
982
- year: "numeric"
983
- };
984
- break;
985
- case "normalDateWithWeekday":
986
- o = { weekday: "short", day: "numeric", month: "short" };
987
- break;
988
- case "keyboardDate":
989
- o = { day: "2-digit", month: "2-digit", year: "numeric" };
990
- break;
991
- case "monthAndDate":
992
- o = { month: "long", day: "numeric" };
993
- break;
994
- case "monthAndYear":
995
- o = { month: "long", year: "numeric" };
996
- break;
997
- case "year":
998
- o = { year: "numeric" };
999
- break;
1000
- case "month":
1001
- o = { month: "long" };
1002
- break;
1003
- case "monthShort":
1004
- o = { month: "short" };
1005
- break;
1006
- case "dayOfMonth":
1007
- o = { day: "numeric" };
1008
- break;
1009
- case "shortDate":
1010
- o = { year: "2-digit", month: "numeric", day: "numeric" };
1011
- break;
1012
- default:
1013
- o = l ?? { timeZone: "UTC", timeZoneName: "short" };
1014
- }
1015
- return new Intl.DateTimeFormat(a, o).format(r);
752
+ }), jr = {
753
+ focused: Boolean,
754
+ "onUpdate:focused": Function
755
+ }, Kr = F(jr, "focus");
756
+ function Cn(e, t) {
757
+ const n = G(e, "focused");
758
+ function a() {
759
+ n.value = !0;
1016
760
  }
1017
- static parseLocalDate(t) {
1018
- const n = t.split("-").map(Number);
1019
- return new Date(n[0], n[1] - 1, n[2]);
761
+ function i() {
762
+ n.value = !1;
1020
763
  }
1021
- static parseISO(t) {
1022
- const [n, a, i] = t.split("-").map(Number);
1023
- return new Date(n, a - 1, i);
764
+ const r = k(() => ({
765
+ [`${t}--focused`]: n.value
766
+ }));
767
+ return {
768
+ focused: n,
769
+ whenFocus: a,
770
+ whenBlur: i,
771
+ focusedClasses: r
772
+ };
773
+ }
774
+ const Hr = (e, t, n) => {
775
+ function a(i) {
776
+ e.classList.forEach((r) => {
777
+ r.startsWith("y-theme--") && r !== i && e.classList.remove(r);
778
+ }), e.classList.add(i);
1024
779
  }
1025
- static toISO(t, n) {
1026
- const a = t.toJsDate(n), i = a.getFullYear(), r = a.getMonth() + 1 < 10 ? `0${a.getMonth() + 1}` : `${a.getMonth() + 1}`, l = a.getDate() < 10 ? `0${a.getDate()}` : `${a.getDate()}`;
1027
- return `${i}-${r}-${l}`;
780
+ We(
781
+ () => {
782
+ var o, c, s, u, h;
783
+ const i = ((c = (o = t.instance) == null ? void 0 : o.$yuyeon) == null ? void 0 : c.theme) ?? ((h = (u = (s = n == null ? void 0 : n.ctx) == null ? void 0 : s.root.appContext.config.globalProperties) == null ? void 0 : u.$yuyeon) == null ? void 0 : h.theme), r = t.value ?? ve(i.currentThemeKey) ?? "";
784
+ if (!r)
785
+ return;
786
+ const l = `y-theme--${r}`;
787
+ a(l);
788
+ },
789
+ { flush: "post" }
790
+ );
791
+ };
792
+ /** @preserve
793
+ ///// SAPC APCA - Advanced Perceptual Contrast Algorithm
794
+ ///// Beta 0.1.9 W3 • contrast function only
795
+ ///// DIST: W3 • Revision date: July 3, 2022
796
+ ///// Function to parse color values and determine Lc contrast
797
+ ///// Copyright © 2019-2022 by Andrew Somers. All Rights Reserved.
798
+ ///// LICENSE: W3 LICENSE
799
+ ///// CONTACT: Please use the ISSUES or DISCUSSIONS tab at:
800
+ ///// https://github.com/Myndex/SAPC-APCA/
801
+ /////
802
+ ///////////////////////////////////////////////////////////////////////////////
803
+ /////
804
+ ///// MINIMAL IMPORTS:
805
+ ///// import { APCAcontrast, sRGBtoY, displayP3toY,
806
+ ///// calcAPCA, fontLookupAPCA } from 'apca-w3';
807
+ ///// import { colorParsley } from 'colorparsley';
808
+ /////
809
+ ///// FORWARD CONTRAST USAGE:
810
+ ///// Lc = APCAcontrast( sRGBtoY( TEXTcolor ) , sRGBtoY( BACKGNDcolor ) );
811
+ ///// Where the colors are sent as an rgba array [255,255,255,1]
812
+ /////
813
+ ///// Retrieving an array of font sizes for the contrast:
814
+ ///// fontArray = fontLookupAPCA(Lc);
815
+ /////
816
+ ///// Live Demonstrator at https://www.myndex.com/APCA/
817
+ // */
818
+ const ee = {
819
+ mainTRC: 2.4,
820
+ // 2.4 exponent for emulating actual monitor perception
821
+ // For reverseAPCA
822
+ get mainTRCencode() {
823
+ return 1 / this.mainTRC;
824
+ },
825
+ // sRGB coefficients
826
+ sRco: 0.2126729,
827
+ sGco: 0.7151522,
828
+ sBco: 0.072175,
829
+ // G-4g constants for use with 2.4 exponent
830
+ normBG: 0.56,
831
+ normTXT: 0.57,
832
+ revTXT: 0.62,
833
+ revBG: 0.65,
834
+ // G-4g Clamps and Scalers
835
+ blkThrs: 0.022,
836
+ blkClmp: 1.414,
837
+ scaleBoW: 1.14,
838
+ scaleWoB: 1.14,
839
+ loBoWoffset: 0.027,
840
+ loWoBoffset: 0.027,
841
+ deltaYmin: 5e-4,
842
+ loClip: 0.1,
843
+ ///// MAGIC NUMBERS for UNCLAMP, for use with 0.022 & 1.414 /////
844
+ // Magic Numbers for reverseAPCA
845
+ mFactor: 1.9468554433171,
846
+ get mFactInv() {
847
+ return 1 / this.mFactor;
848
+ },
849
+ mOffsetIn: 0.0387393816571401,
850
+ mExpAdj: 0.283343396420869,
851
+ get mExp() {
852
+ return this.mExpAdj / this.blkClmp;
853
+ },
854
+ mOffsetOut: 0.312865795870758
855
+ };
856
+ function Lt(e = [0, 0, 0]) {
857
+ function t(n) {
858
+ return Math.pow(n / 255, ee.mainTRC);
1028
859
  }
1029
- static getWeekArray(t, n) {
1030
- const a = [];
1031
- let i = [];
1032
- const r = U.startOfMonth(t), l = U.endOfMonth(t), o = (r.getDay() - jt[n.slice(-2).toUpperCase()] + 7) % 7, c = (l.getDay() - jt[n.slice(-2).toUpperCase()] + 7) % 7;
1033
- for (let s = 0; s < o; s++) {
1034
- const u = new Date(r);
1035
- u.setDate(u.getDate() - (o - s)), i.push(u);
1036
- }
1037
- for (let s = 1; s <= l.getDate(); s++)
1038
- i.push(new Date(t.getFullYear(), t.getMonth(), s)), i.length === 7 && (a.push(i), i = []);
1039
- for (let s = 1; s < 7 - c; s++) {
1040
- const u = new Date(l);
1041
- u.setDate(u.getDate() + s), i.push(u);
860
+ return ee.sRco * t(e[0]) + ee.sGco * t(e[1]) + ee.sBco * t(e[2]);
861
+ }
862
+ function Gn(e, t, n = -1) {
863
+ const a = [0, 1.1];
864
+ if (isNaN(e) || isNaN(t) || Math.min(e, t) < a[0] || Math.max(e, t) > a[1])
865
+ return 0;
866
+ let i = 0, r = 0, l = "BoW";
867
+ return e = e > ee.blkThrs ? e : e + Math.pow(ee.blkThrs - e, ee.blkClmp), t = t > ee.blkThrs ? t : t + Math.pow(ee.blkThrs - t, ee.blkClmp), Math.abs(t - e) < ee.deltaYmin ? 0 : (t > e ? (i = (Math.pow(t, ee.normBG) - Math.pow(e, ee.normTXT)) * ee.scaleBoW, r = i < ee.loClip ? 0 : i - ee.loBoWoffset) : (l = "WoB", i = (Math.pow(t, ee.revBG) - Math.pow(e, ee.revTXT)) * ee.scaleWoB, r = i > -ee.loClip ? 0 : i + ee.loWoBoffset), n < 0 ? r * 100 : n == 0 ? Math.round(Math.abs(r) * 100) + "<sub>" + l + "</sub>" : Number.isInteger(n) ? (r * 100).toFixed(n) : 0);
868
+ }
869
+ function Wr(e) {
870
+ var n;
871
+ const t = {};
872
+ for (const [a, i] of Object.entries(e)) {
873
+ const r = t[a] = {
874
+ ...i,
875
+ colors: {
876
+ ...i.colors
877
+ },
878
+ variables: {
879
+ ...i.variables
880
+ }
881
+ };
882
+ for (const l of Object.keys(r.colors)) {
883
+ const o = r.colors[l];
884
+ if (/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})/i.test(o) && (r.colors[l] = o, r.colors[`${l}-rgb`] = (n = an(o)) == null ? void 0 : n.join(", ")), /^on-[a-z]/.test(l) || r.colors[`on-${l}`])
885
+ continue;
886
+ const c = `on-${l}`, s = Lt(an(o) ?? [0, 0, 0]), u = Math.abs(
887
+ Gn(Lt([0, 0, 0]), s)
888
+ ), h = Math.abs(
889
+ Gn(Lt([255, 255, 255]), s)
890
+ );
891
+ r.colors[c] = h > Math.min(u, 50) ? "#ffffff" : "#000000", r.colors[`${c}-rgb`] = h > Math.min(u, 50) ? "255, 255, 255" : "0, 0, 0";
1042
892
  }
1043
- return i.length > 0 && a.push(i), a;
1044
893
  }
1045
- static startOfMonth(t) {
1046
- return new Date(t.getFullYear(), t.getMonth(), 1);
1047
- }
1048
- static endOfMonth(t) {
1049
- return new Date(t.getFullYear(), t.getMonth() + 1, 0);
1050
- }
1051
- static startOfDay(t) {
1052
- return new Date(t.getFullYear(), t.getMonth(), t.getDate());
1053
- }
1054
- static startOfYear(t) {
1055
- return new Date(t.getFullYear(), 0, 1);
1056
- }
1057
- static endOfDay(t) {
1058
- return new Date(
1059
- t.getFullYear(),
1060
- t.getMonth(),
1061
- t.getDate(),
1062
- 23,
1063
- 59,
1064
- 59,
1065
- 999
1066
- );
1067
- }
1068
- static endOfYear(t) {
1069
- return new Date(t.getFullYear(), 11, 31);
1070
- }
1071
- static getYear(t) {
1072
- return t.getFullYear();
1073
- }
1074
- static getMonth(t) {
1075
- return t.getMonth();
1076
- }
1077
- static getDay(t) {
1078
- return t.getDate();
894
+ return t;
895
+ }
896
+ function zr(e) {
897
+ const t = {}, { scaleMethod: n, colors: a } = e;
898
+ for (const [i, r] of Object.entries(a))
899
+ typeof r == "string" && (t[i] = r);
900
+ return t;
901
+ }
902
+ function Ze(e, t) {
903
+ return [`${e} {
904
+ `, ...t.map((n) => ` ${n}
905
+ `), `}
906
+ `];
907
+ }
908
+ function ct(e, t = "") {
909
+ return Object.entries(e).map(([n, a]) => Ur(`${t}-${n}`, a));
910
+ }
911
+ function Ur(e, t) {
912
+ return `--y-${e}: ${t};`;
913
+ }
914
+ const Xn = {
915
+ light: "light",
916
+ dark: "dark"
917
+ }, qr = ["light", "dark", "auto"], Zn = {
918
+ scaleMethod: "tonal",
919
+ colors: {
920
+ primary: "#0062a1",
921
+ secondary: "#6251a6",
922
+ tertiary: "#3c691b",
923
+ neutral: "#5d5e61",
924
+ positive: "#009d61",
925
+ negative: "#ba1a1a",
926
+ warning: "#f69400",
927
+ info: "#0d62e6"
1079
928
  }
1080
- static getNextMonth(t) {
1081
- return new Date(t.getFullYear(), t.getMonth() + 1, 1);
1082
- }
1083
- static getWeekdays(t) {
1084
- const n = jt[t.slice(-2).toUpperCase()] ?? 0;
1085
- return [...Array(7).keys()].map((a) => {
1086
- const i = new Date(st);
1087
- return i.setDate(st.getDate() + n + a), new Intl.DateTimeFormat(t, { weekday: "narrow" }).format(
1088
- i
1089
- );
1090
- });
1091
- }
1092
- static getMeridians(t) {
1093
- const n = new Date(st).setHours(11), a = new Date(st).setHours(13), i = Intl.DateTimeFormat(t, {
1094
- minute: "numeric",
1095
- hour: "numeric",
1096
- hour12: !0
1097
- });
1098
- return [
1099
- i.format(n).replace(/\d+:\d+/, "").trim(),
1100
- i.format(a).replace(/\d+:\d+/, "").trim()
1101
- ];
1102
- }
1103
- static isAfter(t, n) {
1104
- return t.getTime() > n.getTime();
1105
- }
1106
- static isBefore(t, n) {
1107
- return t.getTime() < n.getTime();
1108
- }
1109
- static isEqual(t, n) {
1110
- return t.getTime() === n.getTime();
1111
- }
1112
- static isSameDay(t, n) {
1113
- return t.getDate() === n.getDate() && t.getMonth() === n.getMonth() && t.getFullYear() === n.getFullYear();
1114
- }
1115
- static isSameMonth(t, n) {
1116
- return !!(t.getMonth() === n.getMonth() && t.getFullYear() && n.getFullYear());
1117
- }
1118
- static isValid(t) {
1119
- const n = new Date(t);
1120
- return n instanceof Date && !isNaN(n.getTime());
1121
- }
1122
- static isWithinRange(t, n) {
1123
- return U.isAfter(t, n[0]) && U.isBefore(t, n[1]);
1124
- }
1125
- static addDays(t, n) {
1126
- const a = new Date(t);
1127
- return a.setDate(a.getDate() + n), a;
1128
- }
1129
- static addMonths(t, n) {
1130
- const a = new Date(t);
1131
- return a.setMonth(a.getMonth() + n), a;
1132
- }
1133
- static getDiff(t, n, a) {
1134
- const i = new Date(t), r = new Date(n);
1135
- return a === "month" ? i.getMonth() - r.getMonth() + (i.getFullYear() - r.getFullYear()) * 12 : Math.floor(i.getTime() - r.getTime()) / Wr;
1136
- }
1137
- static setMonth(t, n) {
1138
- const a = new Date(t);
1139
- return a.setMonth(n), a;
1140
- }
1141
- static setYear(t, n) {
1142
- const a = new Date(t);
1143
- return a.setFullYear(n), a;
1144
- }
1145
- static getHour(t) {
1146
- return t.getHours();
1147
- }
1148
- static setHour(t, n) {
1149
- const a = new Date(t);
1150
- return a.setHours(n), a;
1151
- }
1152
- static getMinute(t) {
1153
- return t.getMinutes();
1154
- }
1155
- static setMinute(t, n) {
1156
- const a = new Date(t);
1157
- return a.setMinutes(n), a;
929
+ }, Jn = {
930
+ light: {
931
+ isDark: !1,
932
+ colors: {
933
+ primary: "#0062a1",
934
+ secondary: "#6251a6",
935
+ tertiary: "#3c691b",
936
+ background: "#fdfbff",
937
+ "on-background": "#1a1c1e",
938
+ surface: "#fdfbff",
939
+ "on-surface": "#1a1c1e",
940
+ "surface-variant": "#dfe3eb",
941
+ "on-surface-variant": "#42474e",
942
+ outline: "#73777f",
943
+ "outline-variant": "#c2c7cf",
944
+ error: "#ba1a1a",
945
+ "on-error": "#ffffff",
946
+ warning: "#8a5100",
947
+ "on-warning": "#ffffff",
948
+ info: "#0056d0",
949
+ "on-info": "#ffffff",
950
+ success: "#006d42",
951
+ "on-success": "#ffffff",
952
+ shadow: "#000000",
953
+ highlighter: "#ffff00"
954
+ },
955
+ variables: {
956
+ "outline-opacity": 0.14,
957
+ "base-shadow-opacity": 0.14,
958
+ "base-font": "#141414"
959
+ }
960
+ },
961
+ dark: {
962
+ isDark: !0,
963
+ colors: {
964
+ primary: "#9ccaff",
965
+ "on-primary": "#003257",
966
+ secondary: "#cbbeff",
967
+ "on-secondary": "#332074",
968
+ tertiary: "#a1d57a",
969
+ "on-tertiary": "#173800",
970
+ background: "#1a1c1e",
971
+ "on-background": "#e2e2e6",
972
+ surface: "#1a1c1e",
973
+ "on-surface": "#e2e2e6",
974
+ "surface-variant": "#42474e",
975
+ "on-surface-variant": "#c2c7cf",
976
+ outline: "#8c9199",
977
+ "outline-variant": "#42474e",
978
+ error: "#ffb4ab",
979
+ "on-error": "#690005",
980
+ warning: "#ffb86e",
981
+ "on-warning": "#492900",
982
+ info: "#b1c5ff",
983
+ "on-info": "#002c72",
984
+ success: "#61dd9a",
985
+ "on-success": "#003920",
986
+ shadow: "#000000",
987
+ highlighter: "#51510d"
988
+ },
989
+ variables: {
990
+ "outline-opacity": 0.14,
991
+ "base-shadow-opacity": 0.14,
992
+ "base-font": "#f5f5f5"
993
+ }
1158
994
  }
995
+ };
996
+ function Gr(e) {
997
+ return e ? {
998
+ scheme: qr.includes(e.scheme) ? e.scheme : Xn.light,
999
+ theme: e.theme ?? ["light", "dark"],
1000
+ themes: { ...we(Jn, e.themes) },
1001
+ palette: { ...we(Zn, e.palette) },
1002
+ separation: e == null ? void 0 : e.separation
1003
+ } : {
1004
+ scheme: Xn.light,
1005
+ theme: ["light", "dark"],
1006
+ themes: { ...we(Jn) },
1007
+ palette: { ...we(Zn) }
1008
+ };
1159
1009
  }
1160
- class Ur {
1161
- constructor(t) {
1162
- he(this, "locale", "ko-kr");
1163
- he(this, "formats");
1164
- this.locale = t.locale, this.formats = t.formats;
1165
- }
1166
- getWeekArray(t) {
1167
- return U.getWeekArray(t, this.locale);
1168
- }
1169
- startOfMonth(t) {
1170
- return U.startOfMonth(t);
1171
- }
1172
- endOfMonth(t) {
1173
- return U.endOfMonth(t);
1174
- }
1175
- addDays(t, n) {
1176
- return U.addDays(t, n);
1177
- }
1178
- addMonths(t, n) {
1179
- return U.addMonths(t, n);
1180
- }
1181
- date(t) {
1182
- return U.date(t);
1183
- }
1184
- endOfDay(t) {
1185
- return U.endOfDay(t);
1186
- }
1187
- endOfYear(t) {
1188
- return U.endOfYear(t);
1189
- }
1190
- format(t, n) {
1191
- return U.format(t, n, this.locale, this.formats);
1010
+ const wt = Symbol.for("yuyeon.theme"), qe = F(
1011
+ {
1012
+ theme: String
1013
+ },
1014
+ "theme"
1015
+ );
1016
+ function Xr() {
1017
+ return window.matchMedia("(prefers-color-scheme)").media !== "not all";
1018
+ }
1019
+ function Zr(e) {
1020
+ const t = hn(), n = Ee(Gr(e)), a = I(n.scheme), i = I(n.theme), r = I(n.themes), l = I(n.palette), o = I(!0), c = I("");
1021
+ function s(p) {
1022
+ c.value = p.matches ? "dark" : "light";
1192
1023
  }
1193
- getDiff(t, n, a) {
1194
- return U.getDiff(t, n, a);
1024
+ const u = k(() => a.value === "auto" ? c.value : a.value === "dark" ? "dark" : "light"), h = k(() => {
1025
+ var p, g;
1026
+ return typeof i.value == "string" && i.value in x ? i.value : Array.isArray(i.value) ? u.value === "dark" ? ((p = i.value) == null ? void 0 : p[1]) ?? "dark" : ((g = i.value) == null ? void 0 : g[0]) ?? "light" : u.value;
1027
+ }), y = k(() => zr(l.value)), x = k(() => Wr(r.value)), C = k(() => {
1028
+ const p = n.separation ? `#${n.separation}` : "", g = [];
1029
+ g.push(
1030
+ ...Ze(":root", ct(y.value, "palette"))
1031
+ );
1032
+ for (const [w, m] of Object.entries(x.value)) {
1033
+ const { colors: _, variables: M, isDark: P } = m, O = {
1034
+ ..._,
1035
+ ...M
1036
+ }, A = P ? "dark" : "light";
1037
+ a.value === "auto" ? g.push(
1038
+ ...Ze(
1039
+ `@media (prefers-color-scheme: ${A})`,
1040
+ Ze(
1041
+ `${p}[data-theme-scheme='auto'][data-${A}-theme='${w}']`,
1042
+ ct(O, "theme")
1043
+ )
1044
+ )
1045
+ ) : g.push(
1046
+ ...Ze(
1047
+ `${p}[data-theme-scheme='${A}'][data-${A}-theme='${w}']`,
1048
+ ct(O, "theme")
1049
+ )
1050
+ ), g.push(
1051
+ ...Ze(
1052
+ `${p} .y-theme--${w}`,
1053
+ ct(O, "theme")
1054
+ )
1055
+ );
1056
+ }
1057
+ return g.join("");
1058
+ });
1059
+ function S(p) {
1060
+ p.directive("theme", Hr);
1061
+ let g = document.getElementById(
1062
+ `yuyeon-theme-palette${n.separation ? "__" + n.separation : ""}`
1063
+ );
1064
+ R(C, w, { immediate: !0 });
1065
+ function w() {
1066
+ if (typeof document < "u" && !g) {
1067
+ const m = document.createElement("style");
1068
+ m.type = "text/css", m.id = `yuyeon-theme-palette${n.separation ? "__" + n.separation : ""}`, e != null && e.cspNonce && m.setAttribute("nonce", e.cspNonce), g = m, document.head.appendChild(g);
1069
+ }
1070
+ g && (g.innerHTML = C.value);
1071
+ }
1195
1072
  }
1196
- getYear(t) {
1197
- return U.getYear(t);
1073
+ function v(p) {
1074
+ if (o.value = Xr(), o.value) {
1075
+ const g = window.matchMedia("(prefers-color-scheme: dark)");
1076
+ s(g), g.addEventListener("change", s);
1077
+ }
1078
+ R(
1079
+ i,
1080
+ (g) => {
1081
+ const [w, m] = g;
1082
+ p.root.dataset.lightTheme = w, p.root.dataset.darkTheme = m;
1083
+ },
1084
+ { immediate: !0 }
1085
+ ), R(
1086
+ a,
1087
+ (g) => {
1088
+ p.root.setAttribute(
1089
+ "data-theme-scheme",
1090
+ g === "auto" ? "auto" : u.value
1091
+ );
1092
+ },
1093
+ { immediate: !0 }
1094
+ );
1198
1095
  }
1199
- getMonth(t) {
1200
- return U.getMonth(t);
1201
- }
1202
- getDay(t) {
1203
- return U.getDay(t);
1204
- }
1205
- getNextMonth(t) {
1206
- return U.getNextMonth(t);
1207
- }
1208
- getWeekdays() {
1209
- return U.getWeekdays(this.locale);
1210
- }
1211
- isAfter(t, n) {
1212
- return U.isAfter(t, n);
1213
- }
1214
- isBefore(t, n) {
1215
- return U.isBefore(t, n);
1216
- }
1217
- isEqual(t, n) {
1218
- return U.isEqual(t, n);
1219
- }
1220
- isSameDay(t, n) {
1221
- return U.isSameDay(t, n);
1222
- }
1223
- isSameMonth(t, n) {
1224
- return U.isSameMonth(t, n);
1225
- }
1226
- isValid(t) {
1227
- return U.isValid(t);
1228
- }
1229
- isWithinRange(t, n) {
1230
- return U.isWithinRange(t, n);
1231
- }
1232
- parseISO(t) {
1233
- return U.parseISO(t);
1234
- }
1235
- setMonth(t, n) {
1236
- return U.setMonth(t, n);
1237
- }
1238
- setYear(t, n) {
1239
- return U.setYear(t, n);
1240
- }
1241
- startOfDay(t) {
1242
- return U.startOfDay(t);
1243
- }
1244
- startOfYear(t) {
1245
- return U.startOfYear(t);
1246
- }
1247
- toISO(t) {
1248
- return U.toISO(this, t);
1249
- }
1250
- toJsDate(t) {
1251
- return t;
1252
- }
1253
- getHour(t) {
1254
- return U.getHour(t);
1255
- }
1256
- getMinute(t) {
1257
- return U.getMinute(t);
1258
- }
1259
- setHour(t, n) {
1260
- return U.setHour(t, n);
1261
- }
1262
- setMinute(t, n) {
1263
- return U.setMinute(t, n);
1096
+ function f(p) {
1097
+ t.run(() => {
1098
+ v(p);
1099
+ });
1264
1100
  }
1101
+ const b = k(() => `y-theme--${h.value}`);
1102
+ return {
1103
+ install: S,
1104
+ init: f,
1105
+ scope: t,
1106
+ instance: {
1107
+ global: {
1108
+ scheme: a,
1109
+ theme: i
1110
+ },
1111
+ themes: r,
1112
+ scheme: a,
1113
+ theme: i,
1114
+ currentThemeKey: h,
1115
+ themeClasses: b,
1116
+ computedThemes: x,
1117
+ computedPalette: y,
1118
+ supportedAutoMode: Qt(o),
1119
+ preferColorScheme: Qt(c)
1120
+ }
1121
+ };
1265
1122
  }
1266
- function rn(e) {
1267
- if (e && e[0] === "#") {
1268
- const t = e.substring(1, e.length), n = t.length, a = [];
1269
- if (n === 3 || n === 6) {
1270
- const i = n === 6 ? 2 : 1;
1271
- for (let r = 0; r < 3; r += 1) {
1272
- const l = t.substring(
1273
- r * i,
1274
- r * i + i
1275
- );
1276
- a.push(Number.parseInt(l, 16));
1123
+ function Ge(e) {
1124
+ ne();
1125
+ const t = ue(
1126
+ wt,
1127
+ null
1128
+ );
1129
+ if (!t) throw new Error('Not found provided "ThemeModule"');
1130
+ t.computedPalette;
1131
+ const n = k(() => {
1132
+ if (e.theme) {
1133
+ const r = ve(t.theme);
1134
+ switch (e.theme) {
1135
+ case "light":
1136
+ return (r == null ? void 0 : r[0]) ?? "light";
1137
+ case "dark":
1138
+ return (r == null ? void 0 : r[1]) ?? "dark";
1139
+ default:
1140
+ return e.theme;
1277
1141
  }
1278
- return a;
1279
1142
  }
1280
- }
1143
+ return ve(t.currentThemeKey);
1144
+ }), a = k(() => `y-theme--${n.value}`), i = {
1145
+ ...t,
1146
+ currentThemeKey: n,
1147
+ themeClasses: a
1148
+ };
1149
+ return ce(wt, i), i;
1281
1150
  }
1282
- function je(e) {
1283
- return Nr.test(e) || Vr.test(e);
1151
+ function ec() {
1152
+ ne();
1153
+ const e = ue(wt, null);
1154
+ if (!e) throw new Error('【yuyeon】 Not found provided "ThemeModule"');
1155
+ return e;
1284
1156
  }
1285
- function qr(e) {
1286
- var n, a;
1287
- if (e != null && e.startsWith("#"))
1288
- return ((n = rn(e)) == null ? void 0 : n.join(",")) || "";
1289
- const t = /rgb(a?)\((?<v>.*)\)/;
1290
- if (t.test(e)) {
1291
- const i = ((a = t.exec(e)) == null ? void 0 : a[2]) || "";
1292
- if (i) {
1293
- const r = i.trim().split(",");
1294
- return r.splice(3, 1), r.join(",");
1157
+ const Na = Symbol.for("yuyeon.form"), Jr = F(
1158
+ {
1159
+ readonly: Boolean,
1160
+ disabled: Boolean,
1161
+ loading: Boolean,
1162
+ modelValue: {
1163
+ type: Boolean,
1164
+ default: null
1165
+ },
1166
+ validateOn: {
1167
+ type: String,
1168
+ default: "input"
1169
+ }
1170
+ },
1171
+ "form"
1172
+ );
1173
+ function Qr(e) {
1174
+ const t = G(e), n = re(!1), a = I([]), i = I([]), r = k(() => e.readonly), l = k(() => e.disabled), o = k(() => e.loading);
1175
+ async function c() {
1176
+ var S;
1177
+ const x = [];
1178
+ let C = !0;
1179
+ i.value = [], n.value = !0;
1180
+ for (const v of a.value) {
1181
+ const f = await v.validate();
1182
+ f.length > 0 && (C = !1, x.push({
1183
+ id: v.id,
1184
+ vnode: v.vnode,
1185
+ exposed: (S = v.vnode.component) == null ? void 0 : S.exposed,
1186
+ errors: f
1187
+ }));
1295
1188
  }
1189
+ return i.value = x, n.value = !1, { valid: C, errors: i.value };
1296
1190
  }
1297
- return "";
1298
- }
1299
- const Gr = "YSpinnerRing", Na = /* @__PURE__ */ V({
1300
- name: Gr,
1301
- render() {
1302
- return d("svg", {
1303
- class: "y-spinner-ring",
1304
- width: "48",
1305
- height: "48",
1306
- viewBox: "0 0 48 48",
1307
- xmlns: "http://www.w3.org/2000/svg"
1308
- }, [d("circle", {
1309
- class: "y-spinner-ring__circle",
1310
- cx: "24",
1311
- cy: "24",
1312
- r: "18",
1313
- "stroke-width": "4",
1314
- "stroke-dasharray": "113.097",
1315
- "stroke-dashoffset": "113.097"
1316
- }, null)]);
1191
+ function s(x) {
1192
+ const { id: C, validate: S, vnode: v } = x;
1193
+ a.value.push({
1194
+ id: C,
1195
+ validate: S,
1196
+ vnode: v,
1197
+ isError: null,
1198
+ errors: []
1199
+ });
1317
1200
  }
1318
- }), Xr = Symbol.for("yuyeon.y-toggle-button"), de = "y-button", Bt = F({
1319
- loading: Boolean,
1320
- active: {
1321
- type: Boolean,
1322
- default: void 0
1323
- },
1324
- injectSymbol: {
1325
- type: null,
1326
- default: Xr
1327
- },
1328
- //
1329
- variation: {
1330
- type: String
1331
- },
1332
- small: Boolean,
1333
- icon: Boolean,
1334
- outlined: {
1335
- type: Boolean,
1336
- default: !1
1201
+ function u(x) {
1202
+ a.value = a.value.filter((C) => C.id !== x);
1203
+ }
1204
+ function h(x, C, S) {
1205
+ const v = a.value.find((f) => f.id === x);
1206
+ v && (v.isError = C, v.errors = S);
1207
+ }
1208
+ const y = {
1209
+ inputs: a,
1210
+ isDisabled: l,
1211
+ isReadonly: r,
1212
+ isLoading: o,
1213
+ isValid: t,
1214
+ isValidating: n,
1215
+ register: s,
1216
+ unregister: u,
1217
+ update: h,
1218
+ validateOn: oe(e, "validateOn")
1219
+ };
1220
+ return ce(Na, y), {
1221
+ inputs: a,
1222
+ errors: i,
1223
+ isValid: t,
1224
+ isDisabled: l,
1225
+ isReadonly: r,
1226
+ isLoading: o,
1227
+ isValidating: n,
1228
+ validate: c
1229
+ };
1230
+ }
1231
+ function el() {
1232
+ return ue(Na, null);
1233
+ }
1234
+ const tl = F(
1235
+ {
1236
+ readonly: Boolean,
1237
+ disabled: Boolean,
1238
+ status: {
1239
+ type: String,
1240
+ validator(e) {
1241
+ return ["success", "warning", "error"].includes(e);
1242
+ }
1243
+ },
1244
+ helperText: String,
1245
+ validators: Array,
1246
+ validateOn: {
1247
+ type: String
1248
+ },
1249
+ validationValue: null,
1250
+ maxErrors: {
1251
+ type: [Number, String],
1252
+ default: 1
1253
+ }
1337
1254
  },
1338
- rounded: {
1339
- type: Boolean,
1340
- default: !1
1255
+ "validation"
1256
+ );
1257
+ function nl(e, t, n = Ue()) {
1258
+ const a = k(() => e.name ?? n), i = G(e, "modelValue"), r = k(
1259
+ () => e.validationValue === void 0 ? i.value : e.validationValue
1260
+ ), l = ne(), o = el(), c = I(!1), s = k(() => {
1261
+ let g = e.validateOn || "input";
1262
+ g === "lazy" && (g = "input,lazy");
1263
+ const w = new Set((g == null ? void 0 : g.split(",")) ?? []);
1264
+ return {
1265
+ blur: w.has("blur") || w.has("input"),
1266
+ input: w.has("input"),
1267
+ lazy: w.has("lazy"),
1268
+ submit: w.has("submit")
1269
+ };
1270
+ }), u = I(), h = I([]), y = k(() => e.readonly ?? (o == null ? void 0 : o.isReadonly.value)), x = k(() => e.disabled ?? (o == null ? void 0 : o.isDisabled.value)), C = k(() => e.loading ?? (o == null ? void 0 : o.isLoading.value)), S = k(() => e.status === "error" || h.value.length > 0), v = k(() => !S.value && e.status === "success");
1271
+ Sn(
1272
+ () => s.value.input,
1273
+ () => {
1274
+ R(r, () => {
1275
+ if (r.value != null)
1276
+ f();
1277
+ else if (e.focused) {
1278
+ const g = R(
1279
+ () => e.focused,
1280
+ (w) => {
1281
+ w || f(), g();
1282
+ }
1283
+ );
1284
+ }
1285
+ });
1286
+ }
1287
+ );
1288
+ async function f() {
1289
+ const g = [];
1290
+ if (c.value = !0, Array.isArray(e.validators))
1291
+ for (const w of e.validators) {
1292
+ if (g.length >= +(e.maxErrors ?? 1))
1293
+ break;
1294
+ const _ = await (typeof w == "function" ? w : () => w)(r.value);
1295
+ if (_ !== !0) {
1296
+ if (_ !== !1 && typeof _ != "string") {
1297
+ console.warn("Wrong validator return type");
1298
+ continue;
1299
+ }
1300
+ g.push(_ || "");
1301
+ }
1302
+ }
1303
+ return c.value = !1, h.value = g, u.value = g == null ? void 0 : g[0], g;
1304
+ }
1305
+ function b() {
1306
+ h.value = [], u.value = void 0;
1307
+ }
1308
+ async function p() {
1309
+ s.value.lazy ? b() : await f();
1310
+ }
1311
+ return ka(() => {
1312
+ o == null || o.register({
1313
+ id: a.value,
1314
+ vnode: l.vnode,
1315
+ resetValidation: p,
1316
+ validate: f
1317
+ });
1318
+ }), {
1319
+ invokeValidators: f,
1320
+ resetError: b,
1321
+ validating: c,
1322
+ validateOn: s,
1323
+ errorResult: u,
1324
+ errors: h,
1325
+ isReadonly: y,
1326
+ isDisabled: x,
1327
+ isLoading: C,
1328
+ isError: S,
1329
+ isSuccess: v
1330
+ };
1331
+ }
1332
+ function al(e) {
1333
+ const t = e.getBoundingClientRect(), n = getComputedStyle(e), a = n.transform;
1334
+ if (a) {
1335
+ let i, r, l, o;
1336
+ if (a.startsWith("matrix3d(")) {
1337
+ const x = a.slice(9, -1).split(/, /);
1338
+ i = +x[0], r = +x[5], l = +x[12], o = +x[13];
1339
+ } else if (a.startsWith("matrix(")) {
1340
+ const x = a.slice(7, -1).split(/, /);
1341
+ i = +x[0], r = +x[3], l = +x[4], o = +x[5];
1342
+ } else
1343
+ return t;
1344
+ const c = n.transformOrigin, s = t.x - l - (1 - i) * parseFloat(c), u = t.y - o - (1 - r) * parseFloat(c.slice(c.indexOf(" ") + 1)), h = i ? t.width / i : e.offsetWidth, y = r ? t.height / r : e.offsetHeight;
1345
+ return {
1346
+ x: s,
1347
+ y: u,
1348
+ width: h,
1349
+ height: y,
1350
+ top: u,
1351
+ right: s + h,
1352
+ bottom: u + y,
1353
+ left: s
1354
+ };
1355
+ } else
1356
+ return t;
1357
+ }
1358
+ function Rt(e) {
1359
+ return Math.round(e * devicePixelRatio) / devicePixelRatio;
1360
+ }
1361
+ function Qn(e) {
1362
+ return Math.ceil(e * devicePixelRatio) / devicePixelRatio;
1363
+ }
1364
+ function z(e, t = "px") {
1365
+ if (e == null || e === "")
1366
+ return;
1367
+ let n = Number(e);
1368
+ return typeof e == "string" && isNaN(n) ? e : isFinite(n) ? `${n}${t}` : void 0;
1369
+ }
1370
+ const ge = "y-input", lt = F({
1371
+ name: String,
1372
+ width: {
1373
+ type: [String, Number]
1341
1374
  },
1342
- filled: {
1343
- type: Boolean,
1344
- default: !1
1375
+ height: [Number, String],
1376
+ displayTag: {
1377
+ type: String,
1378
+ default: "div"
1345
1379
  },
1346
- //
1347
- color: {
1348
- type: String
1380
+ label: String,
1381
+ modelValue: {
1382
+ type: [String, Number, Array, Object]
1349
1383
  },
1350
- noWave: {
1384
+ autoSelect: {
1385
+ type: Boolean,
1386
+ default: !0
1387
+ },
1388
+ floating: {
1351
1389
  type: Boolean,
1352
1390
  default: !1
1353
1391
  },
1354
- ...Br(),
1355
- ...Tr()
1356
- }, "YButton"), Q = /* @__PURE__ */ V({
1357
- name: "YButton",
1358
- directives: {
1359
- PlateWave: Pa
1392
+ floated: {
1393
+ type: Boolean,
1394
+ default: () => !1
1360
1395
  },
1361
- props: Bt(),
1362
- emits: {
1363
- click: (e) => !0,
1364
- "choice:selected": (e) => !0
1396
+ placeholder: String,
1397
+ required: Boolean,
1398
+ loading: Boolean,
1399
+ // variations
1400
+ variation: String,
1401
+ outlined: Boolean,
1402
+ filled: Boolean,
1403
+ ceramic: Boolean,
1404
+ // validate
1405
+ ...tl(),
1406
+ ...Kr(),
1407
+ extended: Object
1408
+ }, "YInput"), Be = /* @__PURE__ */ V({
1409
+ name: "YInput",
1410
+ props: {
1411
+ ...qe(),
1412
+ ...lt()
1365
1413
  },
1414
+ emits: ["error", "click", "mousedown", "mouseup", "focus", "blur", "mousedown:display", "mouseup:display", "keydown:display", "click:leading", "update:modelValue", "update:focused"],
1415
+ slots: Object,
1366
1416
  setup(e, {
1367
- attrs: t,
1368
- slots: n,
1369
- emit: a
1417
+ slots: t,
1418
+ attrs: n,
1419
+ expose: a,
1420
+ emit: i
1370
1421
  }) {
1371
- const i = Er(e, e.injectSymbol, !1), r = Pr(e, t);
1372
- Yr(r, i == null ? void 0 : i.select);
1373
- const l = k(() => {
1374
- var y;
1375
- return e.active !== void 0 ? e.active : r.isLink.value ? (y = r.isActive) == null ? void 0 : y.value : i == null ? void 0 : i.isSelected.value;
1376
- }), o = k(() => {
1377
- const {
1378
- variation: y
1379
- } = e;
1380
- return typeof y == "string" ? y.split(",").map((x) => x.trim()) : [];
1381
- }), c = k(() => {
1382
- const {
1383
- outlined: y,
1384
- rounded: x,
1385
- filled: C,
1386
- small: S,
1387
- icon: v
1388
- } = e;
1389
- return {
1390
- [`${de}--outlined`]: o.value.includes("outlined") || y,
1391
- [`${de}--rounded`]: o.value.includes("rounded") || x,
1392
- [`${de}--filled`]: o.value.includes("filled") || C,
1393
- [`${de}--text`]: o.value.includes("text"),
1394
- [`${de}--small`]: o.value.includes("small") || S,
1395
- [`${de}--x-small`]: o.value.includes("x-small") || S,
1396
- [`${de}--icon`]: o.value.includes("icon") || v,
1397
- [`${de}--color`]: e.color,
1398
- [`${de}--loading`]: e.loading,
1399
- [`${de}--disabled`]: e.disabled,
1400
- [`${de}--active`]: l.value
1401
- };
1402
- }), s = k(() => {
1403
- let {
1404
- color: y
1405
- } = e, x;
1406
- return y && !je(y) && (y = `var(--y-theme-${y})`, x = `var(--y-theme-on-${e.color})`), {
1407
- "--y-button__color": y,
1408
- "--y-button__text-color": x
1409
- };
1410
- }), u = k(() => (i == null ? void 0 : i.disabled.value) || e.disabled);
1411
- function h(y) {
1412
- var x;
1413
- u.value || e.loading || r.isLink.value && (y.metaKey || y.altKey || y.ctrlKey || y.shiftKey || y.button !== 0 || t.target === "_blank") || (a("click", y), (x = r.navigate) == null || x.call(r, y), i == null || i.toggle());
1414
- }
1415
- return K(() => {
1416
- const y = r.isLink.value ? "a" : "button";
1417
- return ze(d(y, {
1418
- type: y === "a" ? void 0 : "button",
1419
- class: [`${de}`, i == null ? void 0 : i.selectedClass.value, {
1420
- ...c.value
1421
- }],
1422
- href: e.disabled ? void 0 : r.href.value,
1423
- style: s.value,
1424
- onClick: h,
1425
- disabled: e.disabled ? !0 : void 0
1426
- }, {
1427
- default: () => {
1428
- var x, C, S;
1429
- return [d("span", {
1430
- class: ["y-button__content"]
1431
- }, [e.loading && (n.loading ? (x = n.loading) == null ? void 0 : x.call(n) : d(Na, W({
1432
- width: "24",
1433
- height: "24"
1434
- }), null)), (C = n.default) == null ? void 0 : C.call(n)]), (S = n.append) == null ? void 0 : S.call(n)];
1435
- }
1436
- }), [[Et("plate-wave"), !e.noWave && !e.loading]]);
1437
- }), {
1438
- link: r
1439
- };
1440
- }
1441
- }), Zr = {
1442
- focused: Boolean,
1443
- "onUpdate:focused": Function
1444
- }, Jr = F(Zr, "focus");
1445
- function An(e, t) {
1446
- const n = G(e, "focused");
1447
- function a() {
1448
- n.value = !0;
1449
- }
1450
- function i() {
1451
- n.value = !1;
1452
- }
1453
- const r = k(() => ({
1454
- [`${t}--focused`]: n.value
1455
- }));
1456
- return {
1457
- focused: n,
1458
- whenFocus: a,
1459
- whenBlur: i,
1460
- focusedClasses: r
1461
- };
1462
- }
1463
- const Qr = (e, t, n) => {
1464
- function a(i) {
1465
- e.classList.forEach((r) => {
1466
- r.startsWith("y-theme--") && r !== i && e.classList.remove(r);
1467
- }), e.classList.add(i);
1422
+ const r = Ue(), {
1423
+ themeClasses: l
1424
+ } = Ge(e), {
1425
+ focused: o,
1426
+ focusedClasses: c,
1427
+ whenFocus: s,
1428
+ whenBlur: u
1429
+ } = Cn(e, "y-input"), {
1430
+ isDisabled: h,
1431
+ isReadonly: y,
1432
+ isLoading: x,
1433
+ invokeValidators: C,
1434
+ resetError: S,
1435
+ isError: v,
1436
+ isSuccess: f,
1437
+ errors: b,
1438
+ errorResult: p
1439
+ } = nl(e, ge, r), g = I(), w = I(), m = I();
1440
+ I();
1441
+ const _ = re(!1), M = k(() => e.variation ? e.variation.split(",").map((B) => B.trim()) : []), P = k(() => e.floated || !!e.placeholder || !e.placeholder && o.value || !!m.value), O = k(() => ({
1442
+ // Style
1443
+ [l.value]: !0,
1444
+ "y-input--ceramic": !!e.ceramic,
1445
+ "y-input--outlined": !e.ceramic && (M.value.includes("outlined") || !!e.outlined),
1446
+ "y-input--filled": M.value.includes("filled") || !!e.filled,
1447
+ // Value
1448
+ "y-input--loading": x.value,
1449
+ "y-input--has-value": !!m.value,
1450
+ "y-input--focused": o.value,
1451
+ "y-input--readonly": y.value,
1452
+ "y-input--disabled": h.value,
1453
+ "y-input--error": v.value,
1454
+ "y-input--success": f.value
1455
+ })), A = k(() => ({
1456
+ width: z(e.width),
1457
+ height: z(e.height)
1458
+ }));
1459
+ R(() => e.modelValue, (B) => {
1460
+ m.value = B;
1461
+ }), R(() => e.readonly, (B) => {
1462
+ B || (m.value = e.modelValue);
1463
+ }), R(m, (B) => {
1464
+ !y.value && !x.value && i("update:modelValue", B);
1465
+ }), R(v, (B) => {
1466
+ i("error", B, b.value);
1467
+ }), R(() => e.focused, (B) => {
1468
+ B || C();
1469
+ });
1470
+ function T(B) {
1471
+ i("click", B);
1472
+ }
1473
+ function D(B) {
1474
+ _.value = !0, i("mousedown:display", B);
1475
+ }
1476
+ function Y(B) {
1477
+ _.value = !1, i("mouseup:display", B);
1478
+ }
1479
+ function E(B) {
1480
+ i("keydown:display", B);
1481
+ }
1482
+ function $(B) {
1483
+ s(), i("focus", B);
1484
+ }
1485
+ function j(B) {
1486
+ u(), C(), i("blur", B);
1487
+ }
1488
+ function N(B) {
1489
+ i("click:leading", B);
1490
+ }
1491
+ function L() {
1492
+ if (e.label || t.label)
1493
+ return d("label", {
1494
+ class: [{
1495
+ [`${ge}__label`]: !0,
1496
+ "y-input__floating-label": e.floating,
1497
+ "y-input__floating-label--floated": e.floating && P.value
1498
+ }],
1499
+ for: `y-input--${r}`
1500
+ }, [t.label ? t.label() : e.label ? d(X, null, [e.label, e.required && d("span", {
1501
+ class: "y-input__required-mark"
1502
+ }, [Ot("*")])]) : e.placeholder && !m.value && e.placeholder]);
1503
+ }
1504
+ return a({
1505
+ ...e.extended ?? {},
1506
+ createLabel: L,
1507
+ invokeValidators: C,
1508
+ validate: C,
1509
+ resetError: S
1510
+ }), K(() => {
1511
+ var B, H;
1512
+ return d("div", {
1513
+ class: [`${ge}`, {
1514
+ ...O.value
1515
+ }]
1516
+ }, [t.prepend && d("div", {
1517
+ class: `${ge}__prepend`
1518
+ }, [t.prepend()]), d("div", {
1519
+ ref: g,
1520
+ class: [`${ge}__stack`]
1521
+ }, [!e.floating && L(), t["leading-out"] && t["leading-out"](), d("div", {
1522
+ ref: w,
1523
+ class: `${ge}__display`,
1524
+ style: [{
1525
+ ...A.value
1526
+ }],
1527
+ "data-base-parent": !0,
1528
+ onClick: T,
1529
+ onMousedown: D,
1530
+ onMouseup: Y,
1531
+ onKeydown: E
1532
+ }, [d("div", {
1533
+ class: `${ge}__plate`
1534
+ }, null), t.leading && d("div", {
1535
+ class: "y-input__leading",
1536
+ onClick: N
1537
+ }, [t.leading({
1538
+ error: v.value
1539
+ })]), t.default ? t.default({
1540
+ value: e.modelValue,
1541
+ loading: x.value,
1542
+ attrId: `y-input--${r}`,
1543
+ focused: o.value
1544
+ }) : d("div", {
1545
+ class: `${ge}__value`,
1546
+ "data-id": `y-input--${r}`,
1547
+ tabindex: 0,
1548
+ onFocus: $,
1549
+ onBlur: j
1550
+ }, [e.floating && L(), (B = e.modelValue) == null ? void 0 : B.toString()]), (H = t.trailing) == null ? void 0 : H.call(t)]), t["trailing-out"] && t["trailing-out"](), d("div", {
1551
+ class: `${ge}__helper-text`
1552
+ }, [t["helper-text"] ? d("span", null, [t["helper-text"]({
1553
+ error: v.value,
1554
+ errors: b.value,
1555
+ errorResult: p.value
1556
+ })]) : e.helperText ?? p.value])]), t.append && d("div", {
1557
+ class: `${ge}__append`
1558
+ }, [t.append()])]);
1559
+ }), {
1560
+ ...e.extended ?? {},
1561
+ themeClasses: l,
1562
+ isFocused: o,
1563
+ focusedClasses: c,
1564
+ whenFocus: s,
1565
+ whenBlur: u,
1566
+ createLabel: L,
1567
+ invokeValidators: C
1568
+ };
1468
1569
  }
1469
- We(
1470
- () => {
1471
- var o, c, s, u, h;
1472
- const i = ((c = (o = t.instance) == null ? void 0 : o.$yuyeon) == null ? void 0 : c.theme) ?? ((h = (u = (s = n == null ? void 0 : n.ctx) == null ? void 0 : s.root.appContext.config.globalProperties) == null ? void 0 : u.$yuyeon) == null ? void 0 : h.theme), r = t.value ?? ve(i.currentThemeKey) ?? "";
1473
- if (!r)
1474
- return;
1475
- const l = `y-theme--${r}`;
1476
- a(l);
1477
- },
1478
- { flush: "post" }
1479
- );
1480
- };
1481
- /** @preserve
1482
- ///// SAPC APCA - Advanced Perceptual Contrast Algorithm
1483
- ///// Beta 0.1.9 W3 • contrast function only
1484
- ///// DIST: W3 • Revision date: July 3, 2022
1485
- ///// Function to parse color values and determine Lc contrast
1486
- ///// Copyright © 2019-2022 by Andrew Somers. All Rights Reserved.
1487
- ///// LICENSE: W3 LICENSE
1488
- ///// CONTACT: Please use the ISSUES or DISCUSSIONS tab at:
1489
- ///// https://github.com/Myndex/SAPC-APCA/
1490
- /////
1491
- ///////////////////////////////////////////////////////////////////////////////
1492
- /////
1493
- ///// MINIMAL IMPORTS:
1494
- ///// import { APCAcontrast, sRGBtoY, displayP3toY,
1495
- ///// calcAPCA, fontLookupAPCA } from 'apca-w3';
1496
- ///// import { colorParsley } from 'colorparsley';
1497
- /////
1498
- ///// FORWARD CONTRAST USAGE:
1499
- ///// Lc = APCAcontrast( sRGBtoY( TEXTcolor ) , sRGBtoY( BACKGNDcolor ) );
1500
- ///// Where the colors are sent as an rgba array [255,255,255,1]
1501
- /////
1502
- ///// Retrieving an array of font sizes for the contrast:
1503
- ///// fontArray = fontLookupAPCA(Lc);
1504
- /////
1505
- ///// Live Demonstrator at https://www.myndex.com/APCA/
1506
- // */
1507
- const ee = {
1508
- mainTRC: 2.4,
1509
- // 2.4 exponent for emulating actual monitor perception
1510
- // For reverseAPCA
1511
- get mainTRCencode() {
1512
- return 1 / this.mainTRC;
1570
+ }), kn = /* @__PURE__ */ V({
1571
+ name: "YIconClear",
1572
+ setup() {
1573
+ return () => d("svg", {
1574
+ viewBox: "0 0 16 16",
1575
+ xmlns: "http://www.w3.org/2000/svg"
1576
+ }, [d("path", {
1577
+ d: "m8 1.5c-3.5839 0-6.5 2.9161-6.5 6.5 0 3.5839 2.9161 6.5 6.5 6.5 3.5839 0 6.5-2.9161 6.5-6.5 0-3.5839-2.9161-6.5-6.5-6.5zm-2 4a.5.5 0 01.35352.14648l1.6465 1.6465 1.6465-1.6465a.5.5 0 01.35352-.14648.5.5 0 01.35352.14648.5.5 0 010 .70703l-1.6465 1.6465 1.6465 1.6465a.5.5 0 010 .70703.5.5 0 01-.70703 0l-1.6465-1.6465-1.6465 1.6465a.5.5 0 01-.70703 0 .5.5 0 010-.70703l1.6465-1.6465-1.6465-1.6465a.5.5 0 010-.70703.5.5 0 01.35352-.14648z",
1578
+ fill: "currentColor",
1579
+ "stroke-miterlimit": "10"
1580
+ }, null)]);
1581
+ }
1582
+ }), st = "y-field-input", _n = F({
1583
+ enableClear: Boolean,
1584
+ inputAlign: String,
1585
+ inlineLabel: Boolean,
1586
+ displayText: [String, Function],
1587
+ whenInputValid: [Boolean, Number],
1588
+ tabindex: {
1589
+ type: String,
1590
+ default: "0"
1513
1591
  },
1514
- // sRGB coefficients
1515
- sRco: 0.2126729,
1516
- sGco: 0.7151522,
1517
- sBco: 0.072175,
1518
- // G-4g constants for use with 2.4 exponent
1519
- normBG: 0.56,
1520
- normTXT: 0.57,
1521
- revTXT: 0.62,
1522
- revBG: 0.65,
1523
- // G-4g Clamps and Scalers
1524
- blkThrs: 0.022,
1525
- blkClmp: 1.414,
1526
- scaleBoW: 1.14,
1527
- scaleWoB: 1.14,
1528
- loBoWoffset: 0.027,
1529
- loWoBoffset: 0.027,
1530
- deltaYmin: 5e-4,
1531
- loClip: 0.1,
1532
- ///// MAGIC NUMBERS for UNCLAMP, for use with 0.022 & 1.414 /////
1533
- // Magic Numbers for reverseAPCA
1534
- mFactor: 1.9468554433171,
1535
- get mFactInv() {
1536
- return 1 / this.mFactor;
1592
+ type: {
1593
+ type: String,
1594
+ default: "text"
1537
1595
  },
1538
- mOffsetIn: 0.0387393816571401,
1539
- mExpAdj: 0.283343396420869,
1540
- get mExp() {
1541
- return this.mExpAdj / this.blkClmp;
1596
+ ...lt({
1597
+ variation: "filled"
1598
+ })
1599
+ }, "YFieldInput"), pt = /* @__PURE__ */ V({
1600
+ name: "YFieldInput",
1601
+ props: {
1602
+ ..._n()
1542
1603
  },
1543
- mOffsetOut: 0.312865795870758
1544
- };
1545
- function Kt(e = [0, 0, 0]) {
1546
- function t(n) {
1547
- return Math.pow(n / 255, ee.mainTRC);
1548
- }
1549
- return ee.sRco * t(e[0]) + ee.sGco * t(e[1]) + ee.sBco * t(e[2]);
1550
- }
1551
- function ta(e, t, n = -1) {
1552
- const a = [0, 1.1];
1553
- if (isNaN(e) || isNaN(t) || Math.min(e, t) < a[0] || Math.max(e, t) > a[1])
1554
- return 0;
1555
- let i = 0, r = 0, l = "BoW";
1556
- return e = e > ee.blkThrs ? e : e + Math.pow(ee.blkThrs - e, ee.blkClmp), t = t > ee.blkThrs ? t : t + Math.pow(ee.blkThrs - t, ee.blkClmp), Math.abs(t - e) < ee.deltaYmin ? 0 : (t > e ? (i = (Math.pow(t, ee.normBG) - Math.pow(e, ee.normTXT)) * ee.scaleBoW, r = i < ee.loClip ? 0 : i - ee.loBoWoffset) : (l = "WoB", i = (Math.pow(t, ee.revBG) - Math.pow(e, ee.revTXT)) * ee.scaleWoB, r = i > -ee.loClip ? 0 : i + ee.loWoBoffset), n < 0 ? r * 100 : n == 0 ? Math.round(Math.abs(r) * 100) + "<sub>" + l + "</sub>" : Number.isInteger(n) ? (r * 100).toFixed(n) : 0);
1557
- }
1558
- function el(e) {
1559
- var n;
1560
- const t = {};
1561
- for (const [a, i] of Object.entries(e)) {
1562
- const r = t[a] = {
1563
- ...i,
1564
- colors: {
1565
- ...i.colors
1566
- },
1567
- variables: {
1568
- ...i.variables
1569
- }
1570
- };
1571
- for (const l of Object.keys(r.colors)) {
1572
- const o = r.colors[l];
1573
- if (/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})/i.test(o) && (r.colors[l] = o, r.colors[`${l}-rgb`] = (n = rn(o)) == null ? void 0 : n.join(", ")), /^on-[a-z]/.test(l) || r.colors[`on-${l}`])
1574
- continue;
1575
- const c = `on-${l}`, s = Kt(rn(o) ?? [0, 0, 0]), u = Math.abs(
1576
- ta(Kt([0, 0, 0]), s)
1577
- ), h = Math.abs(
1578
- ta(Kt([255, 255, 255]), s)
1579
- );
1580
- r.colors[c] = h > Math.min(u, 50) ? "#ffffff" : "#000000", r.colors[`${c}-rgb`] = h > Math.min(u, 50) ? "255, 255, 255" : "0, 0, 0";
1604
+ emits: ["update:modelValue", "update:focused", "input", "change", "click", "mousedown", "mouseup", "keydown", "keyup", "focus", "blur", "mousedown:display", "keydown:display", "click:clear"],
1605
+ slots: Object,
1606
+ setup(e, {
1607
+ attrs: t,
1608
+ expose: n,
1609
+ emit: a,
1610
+ slots: i
1611
+ }) {
1612
+ const r = I(), l = I(), {
1613
+ focused: o,
1614
+ whenFocus: c,
1615
+ whenBlur: s
1616
+ } = Cn(e, "y-field-input"), u = I(""), h = I(""), y = oe(e, "type"), x = k(() => ({
1617
+ [st]: !0,
1618
+ [`${st}--inline-label`]: !!e.inlineLabel
1619
+ }));
1620
+ function C(D) {
1621
+ a("click", D);
1581
1622
  }
1582
- }
1583
- return t;
1584
- }
1585
- function tl(e) {
1586
- const t = {}, { scaleMethod: n, colors: a } = e;
1587
- for (const [i, r] of Object.entries(a))
1588
- typeof r == "string" && (t[i] = r);
1589
- return t;
1590
- }
1591
- function Ze(e, t) {
1592
- return [`${e} {
1593
- `, ...t.map((n) => ` ${n}
1594
- `), `}
1595
- `];
1596
- }
1597
- function dt(e, t = "") {
1598
- return Object.entries(e).map(([n, a]) => nl(`${t}-${n}`, a));
1599
- }
1600
- function nl(e, t) {
1601
- return `--y-${e}: ${t};`;
1602
- }
1603
- const na = {
1604
- light: "light",
1605
- dark: "dark"
1606
- }, al = ["light", "dark", "auto"], aa = {
1607
- scaleMethod: "tonal",
1608
- colors: {
1609
- primary: "#0062a1",
1610
- secondary: "#6251a6",
1611
- tertiary: "#3c691b",
1612
- neutral: "#5d5e61",
1613
- positive: "#009d61",
1614
- negative: "#ba1a1a",
1615
- warning: "#f69400",
1616
- info: "#0d62e6"
1617
- }
1618
- }, ia = {
1619
- light: {
1620
- isDark: !1,
1621
- colors: {
1622
- primary: "#0062a1",
1623
- secondary: "#6251a6",
1624
- tertiary: "#3c691b",
1625
- background: "#fdfbff",
1626
- "on-background": "#1a1c1e",
1627
- surface: "#fdfbff",
1628
- "on-surface": "#1a1c1e",
1629
- "surface-variant": "#dfe3eb",
1630
- "on-surface-variant": "#42474e",
1631
- outline: "#73777f",
1632
- "outline-variant": "#c2c7cf",
1633
- error: "#ba1a1a",
1634
- "on-error": "#ffffff",
1635
- warning: "#8a5100",
1636
- "on-warning": "#ffffff",
1637
- info: "#0056d0",
1638
- "on-info": "#ffffff",
1639
- success: "#006d42",
1640
- "on-success": "#ffffff",
1641
- shadow: "#000000",
1642
- highlighter: "#ffff00"
1643
- },
1644
- variables: {
1645
- "outline-opacity": 0.14,
1646
- "base-shadow-opacity": 0.14,
1647
- "base-font": "#141414"
1623
+ function S(D) {
1624
+ c(), h.value = u.value, a("focus", D);
1648
1625
  }
1649
- },
1650
- dark: {
1651
- isDark: !0,
1652
- colors: {
1653
- primary: "#9ccaff",
1654
- "on-primary": "#003257",
1655
- secondary: "#cbbeff",
1656
- "on-secondary": "#332074",
1657
- tertiary: "#a1d57a",
1658
- "on-tertiary": "#173800",
1659
- background: "#1a1c1e",
1660
- "on-background": "#e2e2e6",
1661
- surface: "#1a1c1e",
1662
- "on-surface": "#e2e2e6",
1663
- "surface-variant": "#42474e",
1664
- "on-surface-variant": "#c2c7cf",
1665
- outline: "#8c9199",
1666
- "outline-variant": "#42474e",
1667
- error: "#ffb4ab",
1668
- "on-error": "#690005",
1669
- warning: "#ffb86e",
1670
- "on-warning": "#492900",
1671
- info: "#b1c5ff",
1672
- "on-info": "#002c72",
1673
- success: "#61dd9a",
1674
- "on-success": "#003920",
1675
- shadow: "#000000",
1676
- highlighter: "#51510d"
1677
- },
1678
- variables: {
1679
- "outline-opacity": 0.14,
1680
- "base-shadow-opacity": 0.14,
1681
- "base-font": "#f5f5f5"
1626
+ function v(D) {
1627
+ s(), a("blur", D), O();
1682
1628
  }
1683
- }
1684
- };
1685
- function il(e) {
1686
- return e ? {
1687
- scheme: al.includes(e.scheme) ? e.scheme : na.light,
1688
- theme: e.theme ?? ["light", "dark"],
1689
- themes: { ...we(ia, e.themes) },
1690
- palette: { ...we(aa, e.palette) },
1691
- separation: e == null ? void 0 : e.separation
1692
- } : {
1693
- scheme: na.light,
1694
- theme: ["light", "dark"],
1695
- themes: { ...we(ia) },
1696
- palette: { ...we(aa) }
1697
- };
1698
- }
1699
- const pt = Symbol.for("yuyeon.theme"), qe = F(
1700
- {
1701
- theme: String
1702
- },
1703
- "theme"
1704
- );
1705
- function rl() {
1706
- return window.matchMedia("(prefers-color-scheme)").media !== "not all";
1707
- }
1708
- function ll(e) {
1709
- const t = hn(), n = Ee(il(e)), a = I(n.scheme), i = I(n.theme), r = I(n.themes), l = I(n.palette), o = I(!0), c = I("");
1710
- function s(p) {
1711
- c.value = p.matches ? "dark" : "light";
1712
- }
1713
- const u = k(() => a.value === "auto" ? c.value : a.value === "dark" ? "dark" : "light"), h = k(() => {
1714
- var p, g;
1715
- return typeof i.value == "string" && i.value in x ? i.value : Array.isArray(i.value) ? u.value === "dark" ? ((p = i.value) == null ? void 0 : p[1]) ?? "dark" : ((g = i.value) == null ? void 0 : g[0]) ?? "light" : u.value;
1716
- }), y = k(() => tl(l.value)), x = k(() => el(r.value)), C = k(() => {
1717
- const p = n.separation ? `#${n.separation}` : "", g = [];
1718
- g.push(
1719
- ...Ze(":root", dt(y.value, "palette"))
1720
- );
1721
- for (const [w, m] of Object.entries(x.value)) {
1722
- const { colors: _, variables: M, isDark: P } = m, O = {
1723
- ..._,
1724
- ...M
1725
- }, A = P ? "dark" : "light";
1726
- a.value === "auto" ? g.push(
1727
- ...Ze(
1728
- `@media (prefers-color-scheme: ${A})`,
1729
- Ze(
1730
- `${p}[data-theme-scheme='auto'][data-${A}-theme='${w}']`,
1731
- dt(O, "theme")
1732
- )
1733
- )
1734
- ) : g.push(
1735
- ...Ze(
1736
- `${p}[data-theme-scheme='${A}'][data-${A}-theme='${w}']`,
1737
- dt(O, "theme")
1738
- )
1739
- ), g.push(
1740
- ...Ze(
1741
- `${p} .y-theme--${w}`,
1742
- dt(O, "theme")
1743
- )
1744
- );
1629
+ function f(D) {
1630
+ a("input", D);
1631
+ const Y = D.target;
1632
+ u.value = Y == null ? void 0 : Y.value, h.value = Y == null ? void 0 : Y.value;
1745
1633
  }
1746
- return g.join("");
1747
- });
1748
- function S(p) {
1749
- p.directive("theme", Qr);
1750
- let g = document.getElementById(
1751
- `yuyeon-theme-palette${n.separation ? "__" + n.separation : ""}`
1752
- );
1753
- R(C, w, { immediate: !0 });
1754
- function w() {
1755
- if (typeof document < "u" && !g) {
1756
- const m = document.createElement("style");
1757
- m.type = "text/css", m.id = `yuyeon-theme-palette${n.separation ? "__" + n.separation : ""}`, e != null && e.cspNonce && m.setAttribute("nonce", e.cspNonce), g = m, document.head.appendChild(g);
1758
- }
1759
- g && (g.innerHTML = C.value);
1634
+ function b(D) {
1635
+ a("change", u.value);
1760
1636
  }
1761
- }
1762
- function v(p) {
1763
- if (o.value = rl(), o.value) {
1764
- const g = window.matchMedia("(prefers-color-scheme: dark)");
1765
- s(g), g.addEventListener("change", s);
1637
+ function p(D) {
1638
+ a("keydown", D);
1766
1639
  }
1767
- R(
1768
- i,
1769
- (g) => {
1770
- const [w, m] = g;
1771
- p.root.dataset.lightTheme = w, p.root.dataset.darkTheme = m;
1772
- },
1773
- { immediate: !0 }
1774
- ), R(
1775
- a,
1776
- (g) => {
1777
- p.root.setAttribute(
1778
- "data-theme-scheme",
1779
- g === "auto" ? "auto" : u.value
1780
- );
1781
- },
1782
- { immediate: !0 }
1783
- );
1784
- }
1785
- function f(p) {
1786
- t.run(() => {
1787
- v(p);
1788
- });
1789
- }
1790
- const b = k(() => `y-theme--${h.value}`);
1791
- return {
1792
- install: S,
1793
- init: f,
1794
- scope: t,
1795
- instance: {
1796
- global: {
1797
- scheme: a,
1798
- theme: i
1799
- },
1800
- themes: r,
1801
- scheme: a,
1802
- theme: i,
1803
- currentThemeKey: h,
1804
- themeClasses: b,
1805
- computedThemes: x,
1806
- computedPalette: y,
1807
- supportedAutoMode: Qt(o),
1808
- preferColorScheme: Qt(c)
1640
+ function g(D) {
1641
+ a("keyup", D);
1809
1642
  }
1810
- };
1811
- }
1812
- function Ge(e) {
1813
- ne();
1814
- const t = ue(
1815
- pt,
1816
- null
1817
- );
1818
- if (!t) throw new Error('Not found provided "ThemeModule"');
1819
- t.computedPalette;
1820
- const n = k(() => {
1821
- if (e.theme) {
1822
- const r = ve(t.theme);
1823
- switch (e.theme) {
1824
- case "light":
1825
- return (r == null ? void 0 : r[0]) ?? "light";
1826
- case "dark":
1827
- return (r == null ? void 0 : r[1]) ?? "dark";
1828
- default:
1829
- return e.theme;
1830
- }
1643
+ function w(D) {
1644
+ a("click:clear", D), P();
1831
1645
  }
1832
- return ve(t.currentThemeKey);
1833
- }), a = k(() => `y-theme--${n.value}`), i = {
1834
- ...t,
1835
- currentThemeKey: n,
1836
- themeClasses: a
1837
- };
1838
- return ce(pt, i), i;
1839
- }
1840
- function ec() {
1841
- ne();
1842
- const e = ue(pt, null);
1843
- if (!e) throw new Error('【yuyeon】 Not found provided "ThemeModule"');
1844
- return e;
1845
- }
1846
- const Va = Symbol.for("yuyeon.form"), ol = F(
1847
- {
1848
- readonly: Boolean,
1849
- disabled: Boolean,
1850
- loading: Boolean,
1851
- modelValue: {
1852
- type: Boolean,
1853
- default: null
1854
- },
1855
- validateOn: {
1856
- type: String,
1857
- default: "input"
1646
+ function m(D) {
1647
+ (D.code === "Space" || D.code === "Enter") && P();
1858
1648
  }
1859
- },
1860
- "form"
1861
- );
1862
- function ul(e) {
1863
- const t = G(e), n = re(!1), a = I([]), i = I([]), r = k(() => e.readonly), l = k(() => e.disabled), o = k(() => e.loading);
1864
- async function c() {
1865
- var S;
1866
- const x = [];
1867
- let C = !0;
1868
- i.value = [], n.value = !0;
1869
- for (const v of a.value) {
1870
- const f = await v.validate();
1871
- f.length > 0 && (C = !1, x.push({
1872
- id: v.id,
1873
- vnode: v.vnode,
1874
- exposed: (S = v.vnode.component) == null ? void 0 : S.exposed,
1875
- errors: f
1876
- }));
1649
+ function _() {
1650
+ var D;
1651
+ (D = l.value) == null || D.focus();
1877
1652
  }
1878
- return i.value = x, n.value = !1, { valid: C, errors: i.value };
1879
- }
1880
- function s(x) {
1881
- const { id: C, validate: S, vnode: v } = x;
1882
- a.value.push({
1883
- id: C,
1884
- validate: S,
1885
- vnode: v,
1886
- isError: null,
1887
- errors: []
1888
- });
1889
- }
1890
- function u(x) {
1891
- a.value = a.value.filter((C) => C.id !== x);
1892
- }
1893
- function h(x, C, S) {
1894
- const v = a.value.find((f) => f.id === x);
1895
- v && (v.isError = C, v.errors = S);
1896
- }
1897
- const y = {
1898
- inputs: a,
1899
- isDisabled: l,
1900
- isReadonly: r,
1901
- isLoading: o,
1902
- isValid: t,
1903
- isValidating: n,
1904
- register: s,
1905
- unregister: u,
1906
- update: h,
1907
- validateOn: oe(e, "validateOn")
1908
- };
1909
- return ce(Va, y), {
1910
- inputs: a,
1911
- errors: i,
1912
- isValid: t,
1913
- isDisabled: l,
1914
- isReadonly: r,
1915
- isLoading: o,
1916
- isValidating: n,
1917
- validate: c
1918
- };
1919
- }
1920
- function cl() {
1921
- return ue(Va, null);
1922
- }
1923
- const sl = F(
1924
- {
1925
- readonly: Boolean,
1926
- disabled: Boolean,
1927
- status: {
1928
- type: String,
1929
- validator(e) {
1930
- return ["success", "warning", "error"].includes(e);
1653
+ function M() {
1654
+ var D;
1655
+ (D = l.value) == null || D.select();
1656
+ }
1657
+ function P() {
1658
+ u.value = "", h.value = "", a("update:modelValue", u.value), a("change", u.value);
1659
+ }
1660
+ function O() {
1661
+ const D = ne(), {
1662
+ displayText: Y
1663
+ } = e;
1664
+ if (Y !== void 0) {
1665
+ let E = u.value;
1666
+ typeof Y == "string" && (E = Y), Y && typeof Y == "function" && (E = Y.call(D, E)), ye(() => {
1667
+ h.value = E;
1668
+ });
1931
1669
  }
1932
- },
1933
- helperText: String,
1934
- validators: Array,
1935
- validateOn: {
1936
- type: String
1937
- },
1938
- validationValue: null,
1939
- maxErrors: {
1940
- type: [Number, String],
1941
- default: 1
1942
1670
  }
1943
- },
1944
- "validation"
1945
- );
1946
- function dl(e, t, n = Ue()) {
1947
- const a = k(() => e.name ?? n), i = G(e, "modelValue"), r = k(
1948
- () => e.validationValue === void 0 ? i.value : e.validationValue
1949
- ), l = ne(), o = cl(), c = I(!1), s = k(() => {
1950
- let g = e.validateOn || "input";
1951
- g === "lazy" && (g = "input,lazy");
1952
- const w = new Set((g == null ? void 0 : g.split(",")) ?? []);
1953
- return {
1954
- blur: w.has("blur") || w.has("input"),
1955
- input: w.has("input"),
1956
- lazy: w.has("lazy"),
1957
- submit: w.has("submit")
1671
+ R(() => e.modelValue, (D) => {
1672
+ u.value = D, h.value = D;
1673
+ }, {
1674
+ immediate: !0
1675
+ }), R(u, (D) => {
1676
+ o.value ? h.value = D : O();
1677
+ }, {
1678
+ immediate: !0
1679
+ });
1680
+ const A = {
1681
+ focus: _,
1682
+ select: M,
1683
+ clear: P
1958
1684
  };
1959
- }), u = I(), h = I([]), y = k(() => e.readonly ?? (o == null ? void 0 : o.isReadonly.value)), x = k(() => e.disabled ?? (o == null ? void 0 : o.isDisabled.value)), C = k(() => e.loading ?? (o == null ? void 0 : o.isLoading.value)), S = k(() => e.status === "error" || h.value.length > 0), v = k(() => !S.value && e.status === "success");
1960
- Sn(
1961
- () => s.value.input,
1962
- () => {
1963
- R(r, () => {
1964
- if (r.value != null)
1965
- f();
1966
- else if (e.focused) {
1967
- const g = R(
1968
- () => e.focused,
1969
- (w) => {
1970
- w || f(), g();
1971
- }
1972
- );
1973
- }
1974
- });
1975
- }
1976
- );
1977
- async function f() {
1978
- const g = [];
1979
- if (c.value = !0, Array.isArray(e.validators))
1980
- for (const w of e.validators) {
1981
- if (g.length >= +(e.maxErrors ?? 1))
1982
- break;
1983
- const _ = await (typeof w == "function" ? w : () => w)(r.value);
1984
- if (_ !== !0) {
1985
- if (_ !== !1 && typeof _ != "string") {
1986
- console.warn("Wrong validator return type");
1987
- continue;
1988
- }
1989
- g.push(_ || "");
1990
- }
1685
+ n({
1686
+ ...A,
1687
+ input$: l,
1688
+ validate: () => {
1689
+ var D;
1690
+ return (D = r.value) == null ? void 0 : D.invokeValidators();
1691
+ },
1692
+ resetError: () => {
1693
+ var D;
1694
+ return (D = r.value) == null ? void 0 : D.resetError();
1991
1695
  }
1992
- return c.value = !1, h.value = g, u.value = g == null ? void 0 : g[0], g;
1993
- }
1994
- function b() {
1995
- h.value = [], u.value = void 0;
1996
- }
1997
- async function p() {
1998
- s.value.lazy ? b() : await f();
1999
- }
2000
- return ka(() => {
2001
- o == null || o.register({
2002
- id: a.value,
2003
- vnode: l.vnode,
2004
- resetValidation: p,
2005
- validate: f
2006
1696
  });
2007
- }), {
2008
- invokeValidators: f,
2009
- resetError: b,
2010
- validating: c,
2011
- validateOn: s,
2012
- errorResult: u,
2013
- errors: h,
2014
- isReadonly: y,
2015
- isDisabled: x,
2016
- isLoading: C,
2017
- isError: S,
2018
- isSuccess: v
2019
- };
2020
- }
2021
- const ge = "y-input", lt = F({
2022
- name: String,
2023
- width: {
2024
- type: [String, Number]
2025
- },
2026
- height: [Number, String],
2027
- displayTag: {
2028
- type: String,
2029
- default: "div"
2030
- },
2031
- label: String,
2032
- modelValue: {
2033
- type: [String, Number, Array, Object]
2034
- },
2035
- autoSelect: {
2036
- type: Boolean,
2037
- default: !0
2038
- },
2039
- floating: {
2040
- type: Boolean,
2041
- default: !1
2042
- },
2043
- floated: {
2044
- type: Boolean,
2045
- default: () => !1
2046
- },
2047
- placeholder: String,
2048
- required: Boolean,
2049
- loading: Boolean,
2050
- // variations
2051
- variation: String,
2052
- outlined: Boolean,
2053
- filled: Boolean,
2054
- ceramic: Boolean,
2055
- // validate
2056
- ...sl(),
2057
- ...Jr(),
2058
- extended: Object
2059
- }, "YInput"), Be = /* @__PURE__ */ V({
2060
- name: "YInput",
2061
- props: {
2062
- ...qe(),
2063
- ...lt()
1697
+ function T(D) {
1698
+ a("update:modelValue", D);
1699
+ }
1700
+ return K(() => d(Be, W({
1701
+ class: x.value,
1702
+ ref: r
1703
+ }, te(e, Be.props), {
1704
+ modelValue: u.value,
1705
+ focused: o.value,
1706
+ extended: A,
1707
+ "onUpdate:modelValue": T,
1708
+ onClick: C,
1709
+ "onMousedown:display": (D) => a("mousedown:display", D),
1710
+ "onKeydown:display": (D) => a("keydown:display", D)
1711
+ }), {
1712
+ leading: i.leading ? (D) => {
1713
+ var $;
1714
+ const Y = [], E = ($ = i.leading) == null ? void 0 : $.call(i, D);
1715
+ if (E)
1716
+ Y.push(E);
1717
+ else
1718
+ return;
1719
+ return Y;
1720
+ } : void 0,
1721
+ default: (D) => {
1722
+ var Y, E, $;
1723
+ return d("div", {
1724
+ class: [`${st}__field`],
1725
+ "data-id": D.attrId,
1726
+ ref: "field"
1727
+ }, [e.floating ? (E = (Y = r.value) == null ? void 0 : Y.createLabel) == null ? void 0 : E.call(Y) : void 0, ($ = i.default) == null ? void 0 : $.call(i, {
1728
+ ...D,
1729
+ focused: o.value
1730
+ }), d("input", {
1731
+ ref: l,
1732
+ value: h.value,
1733
+ name: e.name,
1734
+ id: D.attrId,
1735
+ type: y.value,
1736
+ readonly: e.readonly || e.loading || D.loading,
1737
+ placeholder: e.placeholder,
1738
+ disabled: e.disabled,
1739
+ tabindex: e.tabindex || "0",
1740
+ autocomplete: t.autocomplete,
1741
+ maxlength: t.maxlength,
1742
+ min: t.min,
1743
+ max: t.max,
1744
+ style: [t == null ? void 0 : t.style, {
1745
+ textAlign: e.inputAlign
1746
+ }],
1747
+ size: t.size ?? 1,
1748
+ onInput: f,
1749
+ onFocus: S,
1750
+ onBlur: v,
1751
+ onChange: b,
1752
+ onKeydown: p,
1753
+ onKeyup: g
1754
+ }, null)]);
1755
+ },
1756
+ trailing: i.trailing || e.enableClear && u.value ? () => d(X, null, [e.enableClear && u.value && d("div", {
1757
+ class: ["y-input__trailing", "y-input__trailing--clear"]
1758
+ }, [d("button", {
1759
+ class: [`${st}__clear`],
1760
+ disabled: e.disabled,
1761
+ onClick: w,
1762
+ onKeydown: m,
1763
+ tabindex: 2
1764
+ }, [d(kn, null, null)])]), i.trailing && d("div", {
1765
+ class: ["y-input__trailing"]
1766
+ }, [i.trailing()])]) : void 0,
1767
+ label: i.label ? () => {
1768
+ var D;
1769
+ return (D = i.label) == null ? void 0 : D.call(i);
1770
+ } : void 0,
1771
+ prepend: i.prepend ? () => {
1772
+ var D;
1773
+ return (D = i.prepend) == null ? void 0 : D.call(i);
1774
+ } : void 0,
1775
+ append: i.append ? () => {
1776
+ var D;
1777
+ return (D = i.append) == null ? void 0 : D.call(i);
1778
+ } : void 0,
1779
+ "leading-out": i["leading-out"] ? () => {
1780
+ var D;
1781
+ return (D = i["leading-out"]) == null ? void 0 : D.call(i);
1782
+ } : void 0,
1783
+ "trailing-out": i["trailing-out"] ? () => {
1784
+ var D;
1785
+ return (D = i["trailing-out"]) == null ? void 0 : D.call(i);
1786
+ } : void 0,
1787
+ "helper-text": i["helper-text"] ? (D) => {
1788
+ var Y;
1789
+ return (Y = i["helper-text"]) == null ? void 0 : Y.call(i, D);
1790
+ } : void 0
1791
+ })), {
1792
+ focused: o,
1793
+ inValue: u
1794
+ };
1795
+ }
1796
+ }), Va = F({
1797
+ displayText: [String, Function],
1798
+ whenInputValid: [Boolean, Number],
1799
+ ...lt({
1800
+ variation: "filled"
1801
+ })
1802
+ }, "YTextarea"), ea = "y-textarea", il = /* @__PURE__ */ V({
1803
+ name: "YTextarea",
1804
+ props: Va(),
1805
+ emits: {
1806
+ "update:modelValue": (e) => !0,
1807
+ "update:focused": (e) => !0,
1808
+ "mousedown:display": (e) => !0,
1809
+ input: (e) => !0,
1810
+ change: (e, t) => !0,
1811
+ focus: (e) => !0,
1812
+ blur: (e) => !0,
1813
+ click: (e) => !0,
1814
+ keydown: (e) => !0,
1815
+ keyup: (e) => !0
2064
1816
  },
2065
- emits: ["error", "click", "mousedown", "mouseup", "focus", "blur", "mousedown:display", "mouseup:display", "keydown:display", "click:leading", "update:modelValue", "update:focused"],
2066
1817
  slots: Object,
2067
1818
  setup(e, {
2068
- slots: t,
2069
- attrs: n,
2070
- expose: a,
2071
- emit: i
1819
+ attrs: t,
1820
+ emit: n,
1821
+ slots: a,
1822
+ expose: i
2072
1823
  }) {
2073
- const r = Ue(), {
2074
- themeClasses: l
2075
- } = Ge(e), {
2076
- focused: o,
2077
- focusedClasses: c,
2078
- whenFocus: s,
2079
- whenBlur: u
2080
- } = An(e, "y-input"), {
2081
- isDisabled: h,
2082
- isReadonly: y,
2083
- isLoading: x,
2084
- invokeValidators: C,
2085
- resetError: S,
2086
- isError: v,
2087
- isSuccess: f,
2088
- errors: b,
2089
- errorResult: p
2090
- } = dl(e, ge, r), g = I(), w = I(), m = I();
2091
- I();
2092
- const _ = re(!1), M = k(() => e.variation ? e.variation.split(",").map((B) => B.trim()) : []), P = k(() => e.floated || !!e.placeholder || !e.placeholder && o.value || !!m.value), O = k(() => ({
2093
- // Style
2094
- [l.value]: !0,
2095
- "y-input--ceramic": !!e.ceramic,
2096
- "y-input--outlined": !e.ceramic && (M.value.includes("outlined") || !!e.outlined),
2097
- "y-input--filled": M.value.includes("filled") || !!e.filled,
2098
- // Value
2099
- "y-input--loading": x.value,
2100
- "y-input--has-value": !!m.value,
2101
- "y-input--focused": o.value,
2102
- "y-input--readonly": y.value,
2103
- "y-input--disabled": h.value,
2104
- "y-input--error": v.value,
2105
- "y-input--success": f.value
2106
- })), A = k(() => ({
2107
- width: z(e.width),
2108
- height: z(e.height)
2109
- }));
2110
- R(() => e.modelValue, (B) => {
2111
- m.value = B;
2112
- }), R(() => e.readonly, (B) => {
2113
- B || (m.value = e.modelValue);
2114
- }), R(m, (B) => {
2115
- !y.value && !x.value && i("update:modelValue", B);
2116
- }), R(v, (B) => {
2117
- i("error", B, b.value);
2118
- }), R(() => e.focused, (B) => {
2119
- B || C();
2120
- });
2121
- function T(B) {
2122
- i("click", B);
1824
+ const r = Ue(), l = I(), o = I(), c = I(""), s = I(""), {
1825
+ focused: u,
1826
+ whenFocus: h,
1827
+ whenBlur: y
1828
+ } = Cn(e, "y-field-input");
1829
+ function x(m) {
1830
+ n("update:modelValue", m);
2123
1831
  }
2124
- function D(B) {
2125
- _.value = !0, i("mousedown:display", B);
1832
+ function C() {
1833
+ const m = ne(), {
1834
+ displayText: _
1835
+ } = e;
1836
+ if (_ !== void 0) {
1837
+ let M = c.value;
1838
+ typeof _ == "string" && (M = _), _ && typeof _ == "function" && (M = _.call(m, M)), ye(() => {
1839
+ s.value = M;
1840
+ });
1841
+ }
2126
1842
  }
2127
- function Y(B) {
2128
- _.value = !1, i("mouseup:display", B);
1843
+ function S(m) {
1844
+ n("input", m);
1845
+ const _ = m.target;
1846
+ c.value = _ == null ? void 0 : _.value, s.value = _ == null ? void 0 : _.value;
2129
1847
  }
2130
- function E(B) {
2131
- i("keydown:display", B);
1848
+ function v(m) {
1849
+ n("change", c.value, m);
2132
1850
  }
2133
- function $(B) {
2134
- s(), i("focus", B);
1851
+ function f(m) {
1852
+ h(), s.value = c.value, n("focus", m);
2135
1853
  }
2136
- function j(B) {
2137
- u(), C(), i("blur", B);
1854
+ function b(m) {
1855
+ y(), n("blur", m), C();
2138
1856
  }
2139
- function N(B) {
2140
- i("click:leading", B);
1857
+ function p(m) {
1858
+ n("keydown", m);
2141
1859
  }
2142
- function L() {
2143
- if (e.label || t.label)
2144
- return d("label", {
2145
- class: [{
2146
- [`${ge}__label`]: !0,
2147
- "y-input__floating-label": e.floating,
2148
- "y-input__floating-label--floated": e.floating && P.value
2149
- }],
2150
- for: `y-input--${r}`
2151
- }, [t.label ? t.label() : e.label ? d(X, null, [e.label, e.required && d("span", {
2152
- class: "y-input__required-mark"
2153
- }, [Ot("*")])]) : e.placeholder && !m.value && e.placeholder]);
1860
+ function g(m) {
1861
+ n("keyup", m);
2154
1862
  }
2155
- return a({
2156
- ...e.extended ?? {},
2157
- createLabel: L,
2158
- invokeValidators: C,
2159
- validate: C,
2160
- resetError: S
2161
- }), K(() => {
2162
- var B, H;
2163
- return d("div", {
2164
- class: [`${ge}`, {
2165
- ...O.value
2166
- }]
2167
- }, [t.prepend && d("div", {
2168
- class: `${ge}__prepend`
2169
- }, [t.prepend()]), d("div", {
2170
- ref: g,
2171
- class: [`${ge}__stack`]
2172
- }, [!e.floating && L(), t["leading-out"] && t["leading-out"](), d("div", {
2173
- ref: w,
2174
- class: `${ge}__display`,
2175
- style: [{
2176
- ...A.value
2177
- }],
2178
- "data-base-parent": !0,
2179
- onClick: T,
2180
- onMousedown: D,
2181
- onMouseup: Y,
2182
- onKeydown: E
2183
- }, [d("div", {
2184
- class: `${ge}__plate`
2185
- }, null), t.leading && d("div", {
2186
- class: "y-input__leading",
2187
- onClick: N
2188
- }, [t.leading({
2189
- error: v.value
2190
- })]), t.default ? t.default({
2191
- value: e.modelValue,
2192
- loading: x.value,
2193
- attrId: `y-input--${r}`
2194
- }) : d("div", {
2195
- class: `${ge}__value`,
2196
- "data-id": `y-input--${r}`,
2197
- tabindex: 0,
2198
- onFocus: $,
2199
- onBlur: j
2200
- }, [e.floating && L(), (B = e.modelValue) == null ? void 0 : B.toString()]), (H = t.trailing) == null ? void 0 : H.call(t)]), t["trailing-out"] && t["trailing-out"](), d("div", {
2201
- class: `${ge}__helper-text`
2202
- }, [t["helper-text"] ? d("span", null, [t["helper-text"]({
2203
- error: v.value,
2204
- errors: b.value,
2205
- errorResult: p.value
2206
- })]) : e.helperText ?? p.value])]), t.append && d("div", {
2207
- class: `${ge}__append`
2208
- }, [t.append()])]);
1863
+ function w(m) {
1864
+ n("click", m);
1865
+ }
1866
+ return R(() => e.modelValue, (m) => {
1867
+ c.value = m, s.value = m;
1868
+ }, {
1869
+ immediate: !0
1870
+ }), R(c, (m) => {
1871
+ u.value ? s.value = m : C();
1872
+ }), i({
1873
+ el$: l,
1874
+ input$: o,
1875
+ validate: () => {
1876
+ var m;
1877
+ return (m = l.value) == null ? void 0 : m.invokeValidators();
1878
+ }
1879
+ }), K(() => {
1880
+ const m = te(e, Be.props);
1881
+ return d(Be, W({
1882
+ class: [ea]
1883
+ }, m, {
1884
+ modelValue: c.value,
1885
+ "onUpdate:modelValue": x,
1886
+ focused: u.value,
1887
+ onClick: w,
1888
+ "onMousedown:display": (_) => n("mousedown:display", _)
1889
+ }), {
1890
+ default: (_) => {
1891
+ var M, P;
1892
+ return d("div", {
1893
+ class: [`${ea}__field`],
1894
+ "data-id": _.attrId,
1895
+ ref: "field"
1896
+ }, [e.floating ? (P = (M = l.value) == null ? void 0 : M.createLabel) == null ? void 0 : P.call(M) : void 0, a.default ? () => a.default(_) : void 0, d("textarea", W({
1897
+ ref: o,
1898
+ value: s.value,
1899
+ id: `y-input--${r}`,
1900
+ disabled: e.disabled,
1901
+ placeholder: e.placeholder,
1902
+ readonly: e.readonly,
1903
+ required: e.required
1904
+ }, t, {
1905
+ onInput: S,
1906
+ onFocus: f,
1907
+ onBlur: b,
1908
+ onChange: v,
1909
+ onKeydown: p,
1910
+ onKeyup: g
1911
+ }), null)]);
1912
+ },
1913
+ label: a.label ? () => {
1914
+ var _;
1915
+ return (_ = a.label) == null ? void 0 : _.call(a);
1916
+ } : void 0,
1917
+ "helper-text": a["helper-text"] ? () => {
1918
+ var _;
1919
+ return (_ = a["helper-text"]) == null ? void 0 : _.call(a);
1920
+ } : void 0
1921
+ });
2209
1922
  }), {
2210
- ...e.extended ?? {},
2211
- themeClasses: l,
2212
- isFocused: o,
2213
- focusedClasses: c,
2214
- whenFocus: s,
2215
- whenBlur: u,
2216
- createLabel: L,
2217
- invokeValidators: C
1923
+ el$: l,
1924
+ input$: o
2218
1925
  };
2219
1926
  }
2220
- }), Dn = /* @__PURE__ */ V({
2221
- name: "YIconClear",
2222
- setup() {
2223
- return () => d("svg", {
2224
- viewBox: "0 0 16 16",
2225
- xmlns: "http://www.w3.org/2000/svg"
2226
- }, [d("path", {
2227
- d: "m8 1.5c-3.5839 0-6.5 2.9161-6.5 6.5 0 3.5839 2.9161 6.5 6.5 6.5 3.5839 0 6.5-2.9161 6.5-6.5 0-3.5839-2.9161-6.5-6.5-6.5zm-2 4a.5.5 0 01.35352.14648l1.6465 1.6465 1.6465-1.6465a.5.5 0 01.35352-.14648.5.5 0 01.35352.14648.5.5 0 010 .70703l-1.6465 1.6465 1.6465 1.6465a.5.5 0 010 .70703.5.5 0 01-.70703 0l-1.6465-1.6465-1.6465 1.6465a.5.5 0 01-.70703 0 .5.5 0 010-.70703l1.6465-1.6465-1.6465-1.6465a.5.5 0 010-.70703.5.5 0 01.35352-.14648z",
2228
- fill: "currentColor",
2229
- "stroke-miterlimit": "10"
2230
- }, null)]);
2231
- }
2232
- }), ft = "y-field-input", Tn = F({
2233
- enableClear: Boolean,
2234
- inputAlign: String,
2235
- inlineLabel: Boolean,
2236
- displayText: [String, Function],
2237
- whenInputValid: [Boolean, Number],
2238
- tabindex: {
2239
- type: String,
2240
- default: "0"
2241
- },
2242
- type: {
2243
- type: String,
2244
- default: "text"
2245
- },
2246
- ...lt({
2247
- variation: "filled"
2248
- })
2249
- }, "YFieldInput"), St = /* @__PURE__ */ V({
2250
- name: "YFieldInput",
1927
+ }), rl = "y-form", ll = /* @__PURE__ */ V({
1928
+ name: "YForm",
2251
1929
  props: {
2252
- ...Tn()
1930
+ ...Jr()
1931
+ },
1932
+ emits: {
1933
+ "update:modelValue": (e) => !0,
1934
+ submit: (e) => !0,
1935
+ "keydown.enter": (e) => !0
2253
1936
  },
2254
- emits: ["update:modelValue", "update:focused", "input", "change", "click", "mousedown", "mouseup", "keydown", "keyup", "focus", "blur", "mousedown:display", "keydown:display", "click:clear"],
2255
- slots: Object,
2256
1937
  setup(e, {
2257
- attrs: t,
2258
- expose: n,
2259
- emit: a,
2260
- slots: i
1938
+ emit: t,
1939
+ slots: n,
1940
+ expose: a
2261
1941
  }) {
2262
- const r = I(), l = I(), {
2263
- focused: o,
2264
- whenFocus: c,
2265
- whenBlur: s
2266
- } = An(e, "y-field-input"), u = I(""), h = I(""), y = oe(e, "type"), x = k(() => ({
2267
- [ft]: !0,
2268
- [`${ft}--inline-label`]: !!e.inlineLabel
2269
- }));
2270
- function C(D) {
2271
- a("click", D);
2272
- }
2273
- function S(D) {
2274
- c(), h.value = u.value, a("focus", D);
2275
- }
2276
- function v(D) {
2277
- s(), a("blur", D), O();
2278
- }
2279
- function f(D) {
2280
- a("input", D);
2281
- const Y = D.target;
2282
- u.value = Y == null ? void 0 : Y.value, h.value = Y == null ? void 0 : Y.value;
2283
- }
2284
- function b(D) {
2285
- a("change", u.value);
2286
- }
2287
- function p(D) {
2288
- a("keydown", D);
2289
- }
2290
- function g(D) {
2291
- a("keyup", D);
2292
- }
2293
- function w(D) {
2294
- a("click:clear", D), P();
2295
- }
2296
- function m(D) {
2297
- (D.code === "Space" || D.code === "Enter") && P();
2298
- }
2299
- function _() {
2300
- var D;
2301
- (D = l.value) == null || D.focus();
2302
- }
2303
- function M() {
2304
- var D;
2305
- (D = l.value) == null || D.select();
2306
- }
2307
- function P() {
2308
- u.value = "", h.value = "", a("update:modelValue", u.value), a("change", u.value);
1942
+ const i = Qr(e), r = I();
1943
+ I();
1944
+ function l(c) {
1945
+ const s = c, u = i.validate();
1946
+ s.then = u.then.bind(u), s.catch = u.catch.bind(u), s.finally = u.finally.bind(u), t("submit", s), s.defaultPrevented || u.then(({
1947
+ valid: h
1948
+ }) => {
1949
+ var y;
1950
+ h && ((y = r.value) == null || y.submit());
1951
+ }), s.preventDefault();
2309
1952
  }
2310
- function O() {
2311
- const D = ne(), {
2312
- displayText: Y
2313
- } = e;
2314
- if (Y !== void 0) {
2315
- let E = u.value;
2316
- typeof Y == "string" && (E = Y), Y && typeof Y == "function" && (E = Y.call(D, E)), ye(() => {
2317
- h.value = E;
2318
- });
2319
- }
1953
+ function o(c) {
1954
+ c.preventDefault(), c.stopImmediatePropagation(), t("keydown.enter", c);
2320
1955
  }
2321
- R(() => e.modelValue, (D) => {
2322
- u.value = D, h.value = D;
2323
- }, {
2324
- immediate: !0
2325
- }), R(u, (D) => {
2326
- o.value ? h.value = D : O();
2327
- }, {
2328
- immediate: !0
2329
- });
2330
- const A = {
2331
- focus: _,
2332
- select: M,
2333
- clear: P
2334
- };
2335
- n({
2336
- ...A,
2337
- input$: l,
2338
- validate: () => {
2339
- var D;
2340
- return (D = r.value) == null ? void 0 : D.invokeValidators();
2341
- },
2342
- resetError: () => {
2343
- var D;
2344
- return (D = r.value) == null ? void 0 : D.resetError();
2345
- }
1956
+ a({
1957
+ ...i
1958
+ }), K(() => {
1959
+ var c;
1960
+ return d("form", {
1961
+ ref: r,
1962
+ class: [rl],
1963
+ novalidate: !0,
1964
+ onSubmit: l,
1965
+ onKeydown: vr(o, ["enter"])
1966
+ }, [(c = n.default) == null ? void 0 : c.call(n)]);
2346
1967
  });
2347
- function T(D) {
2348
- a("update:modelValue", D);
2349
- }
2350
- return K(() => d(Be, W({
2351
- class: x.value,
2352
- ref: r
2353
- }, te(e, Be.props), {
2354
- modelValue: u.value,
2355
- focused: o.value,
2356
- extended: A,
2357
- "onUpdate:modelValue": T,
2358
- onClick: C,
2359
- "onMousedown:display": (D) => a("mousedown:display", D),
2360
- "onKeydown:display": (D) => a("keydown:display", D)
2361
- }), {
2362
- leading: i.leading ? (D) => {
2363
- var $;
2364
- const Y = [], E = ($ = i.leading) == null ? void 0 : $.call(i, D);
2365
- if (E)
2366
- Y.push(E);
2367
- else
2368
- return;
2369
- return Y;
2370
- } : void 0,
2371
- default: (D) => {
2372
- var Y, E, $;
2373
- return d("div", {
2374
- class: [`${ft}__field`],
2375
- "data-id": D.attrId,
2376
- ref: "field"
2377
- }, [e.floating ? (E = (Y = r.value) == null ? void 0 : Y.createLabel) == null ? void 0 : E.call(Y) : void 0, ($ = i.default) == null ? void 0 : $.call(i, D), d("input", {
2378
- ref: l,
2379
- value: h.value,
2380
- name: e.name,
2381
- id: D.attrId,
2382
- type: y.value,
2383
- readonly: e.readonly || e.loading || D.loading,
2384
- placeholder: e.placeholder,
2385
- disabled: e.disabled,
2386
- tabindex: e.tabindex || "0",
2387
- autocomplete: t.autocomplete,
2388
- maxlength: t.maxlength,
2389
- min: t.min,
2390
- max: t.max,
2391
- style: [t == null ? void 0 : t.style, {
2392
- textAlign: e.inputAlign
2393
- }],
2394
- size: t.size ?? 1,
2395
- onInput: f,
2396
- onFocus: S,
2397
- onBlur: v,
2398
- onChange: b,
2399
- onKeydown: p,
2400
- onKeyup: g
2401
- }, null)]);
2402
- },
2403
- trailing: i.trailing || e.enableClear && u.value ? () => d(X, null, [e.enableClear && u.value && d("div", {
2404
- class: ["y-input__trailing", "y-input__trailing--clear"]
2405
- }, [d("button", {
2406
- class: [`${ft}__clear`],
2407
- disabled: e.disabled,
2408
- onClick: w,
2409
- onKeydown: m,
2410
- tabindex: 2
2411
- }, [d(Dn, null, null)])]), i.trailing && d("div", {
2412
- class: ["y-input__trailing"]
2413
- }, [i.trailing()])]) : void 0,
2414
- label: i.label ? () => {
2415
- var D;
2416
- return (D = i.label) == null ? void 0 : D.call(i);
2417
- } : void 0,
2418
- prepend: i.prepend ? () => {
2419
- var D;
2420
- return (D = i.prepend) == null ? void 0 : D.call(i);
2421
- } : void 0,
2422
- append: i.append ? () => {
2423
- var D;
2424
- return (D = i.append) == null ? void 0 : D.call(i);
2425
- } : void 0,
2426
- "leading-out": i["leading-out"] ? () => {
2427
- var D;
2428
- return (D = i["leading-out"]) == null ? void 0 : D.call(i);
2429
- } : void 0,
2430
- "trailing-out": i["trailing-out"] ? () => {
2431
- var D;
2432
- return (D = i["trailing-out"]) == null ? void 0 : D.call(i);
2433
- } : void 0,
2434
- "helper-text": i["helper-text"] ? (D) => {
2435
- var Y;
2436
- return (Y = i["helper-text"]) == null ? void 0 : Y.call(i, D);
2437
- } : void 0
2438
- })), {
2439
- focused: o,
2440
- inValue: u
1968
+ }
1969
+ }), ol = {
1970
+ search: "search",
1971
+ noItems: "No Options",
1972
+ noData: "No Data"
1973
+ }, ta = "$yuyeon";
1974
+ function na(e, t) {
1975
+ return e.replace(/\{(\d+)\}/g, (n, a) => String(t[+a]));
1976
+ }
1977
+ function La(e, t, n) {
1978
+ function a(l, ...o) {
1979
+ if (!l.startsWith(ta))
1980
+ return na(l, o);
1981
+ const c = l.replace(ta, ""), s = e.value && n.value[e.value], u = t.value && n.value[t.value];
1982
+ let h = Z(s, c, null);
1983
+ return h || (h = Z(u, c, null)), h || (h = l), typeof h != "string" && (h = l), na(h, o);
1984
+ }
1985
+ function i(l, o) {
1986
+ return new Intl.NumberFormat(
1987
+ [e.value, t.value],
1988
+ o
1989
+ ).format(l);
1990
+ }
1991
+ function r(l) {
1992
+ const o = Vt(l, "locale", e), c = Vt(
1993
+ l,
1994
+ "fallbackLocale",
1995
+ t
1996
+ ), s = Vt(l, "messages", n), u = La(
1997
+ o,
1998
+ c,
1999
+ s
2000
+ );
2001
+ return {
2002
+ name: "yuyeon",
2003
+ locale: e,
2004
+ fallbackLocale: t,
2005
+ messages: n,
2006
+ t: u.translate,
2007
+ n: u.number,
2008
+ getContext: u.getContext
2441
2009
  };
2442
2010
  }
2443
- }), La = F({
2444
- displayText: [String, Function],
2445
- whenInputValid: [Boolean, Number],
2446
- ...lt({
2447
- variation: "filled"
2448
- })
2449
- }, "YTextarea"), ra = "y-textarea", fl = /* @__PURE__ */ V({
2450
- name: "YTextarea",
2451
- props: La(),
2452
- emits: {
2453
- "update:modelValue": (e) => !0,
2454
- "update:focused": (e) => !0,
2455
- "mousedown:display": (e) => !0,
2456
- input: (e) => !0,
2457
- change: (e, t) => !0,
2458
- focus: (e) => !0,
2459
- blur: (e) => !0,
2460
- click: (e) => !0,
2461
- keydown: (e) => !0,
2462
- keyup: (e) => !0
2463
- },
2464
- slots: Object,
2465
- setup(e, {
2466
- attrs: t,
2467
- emit: n,
2468
- slots: a,
2469
- expose: i
2470
- }) {
2471
- const r = Ue(), l = I(), o = I(), c = I(""), s = I(""), {
2472
- focused: u,
2473
- whenFocus: h,
2474
- whenBlur: y
2475
- } = An(e, "y-field-input");
2476
- function x(m) {
2477
- n("update:modelValue", m);
2478
- }
2479
- function C() {
2480
- const m = ne(), {
2481
- displayText: _
2482
- } = e;
2483
- if (_ !== void 0) {
2484
- let M = c.value;
2485
- typeof _ == "string" && (M = _), _ && typeof _ == "function" && (M = _.call(m, M)), ye(() => {
2486
- s.value = M;
2487
- });
2488
- }
2489
- }
2490
- function S(m) {
2491
- n("input", m);
2492
- const _ = m.target;
2493
- c.value = _ == null ? void 0 : _.value, s.value = _ == null ? void 0 : _.value;
2494
- }
2495
- function v(m) {
2496
- n("change", c.value, m);
2497
- }
2498
- function f(m) {
2499
- h(), s.value = c.value, n("focus", m);
2500
- }
2501
- function b(m) {
2502
- y(), n("blur", m), C();
2503
- }
2504
- function p(m) {
2505
- n("keydown", m);
2506
- }
2507
- function g(m) {
2508
- n("keyup", m);
2011
+ return {
2012
+ translate: a,
2013
+ number: i,
2014
+ getContext: r
2015
+ };
2016
+ }
2017
+ function ul(e) {
2018
+ const t = re((e == null ? void 0 : e.locale) ?? "en"), n = re((e == null ? void 0 : e.fallbackLocale) ?? "en"), a = I({
2019
+ en: ol,
2020
+ ...e == null ? void 0 : e.messages
2021
+ }), i = La(t, n, a);
2022
+ return {
2023
+ name: "yuyeon",
2024
+ locale: t,
2025
+ fallbackLocale: n,
2026
+ messages: a,
2027
+ t: i.translate,
2028
+ n: i.number,
2029
+ getContext: i.getContext
2030
+ };
2031
+ }
2032
+ function cl(e) {
2033
+ var t;
2034
+ return e != null && e.adapter && ((t = e.adapter) != null && t.name) ? e.adapter : ul(e);
2035
+ }
2036
+ const sl = {
2037
+ af: "af-ZA",
2038
+ bg: "bg-BG",
2039
+ ca: "ca-ES",
2040
+ cs: "cs-CZ",
2041
+ de: "de-DE",
2042
+ el: "el-GR",
2043
+ en: "en-US",
2044
+ et: "et-EE",
2045
+ fa: "fa-IR",
2046
+ fi: "fi-FI",
2047
+ hr: "hr-HR",
2048
+ hu: "hu-HU",
2049
+ he: "he-IL",
2050
+ id: "id-ID",
2051
+ it: "it-IT",
2052
+ ja: "ja-JP",
2053
+ ko: "ko-KR",
2054
+ lv: "lv-LV",
2055
+ lt: "lt-LT",
2056
+ nl: "nl-NL",
2057
+ no: "no-NO",
2058
+ pl: "pl-PL",
2059
+ pt: "pt-PT",
2060
+ ro: "ro-RO",
2061
+ ru: "ru-RU",
2062
+ sk: "sk-SK",
2063
+ sl: "sl-SI",
2064
+ srCyrl: "sr-SP",
2065
+ srLatn: "sr-SP",
2066
+ sv: "sv-SE",
2067
+ th: "th-TH",
2068
+ tr: "tr-TR",
2069
+ az: "az-AZ",
2070
+ uk: "uk-UA",
2071
+ vi: "vi-VN",
2072
+ zhHans: "zh-CN",
2073
+ zhHant: "zh-TW"
2074
+ }, dl = {
2075
+ af: !1,
2076
+ ar: !0,
2077
+ bg: !1,
2078
+ ca: !1,
2079
+ cs: !1,
2080
+ de: !1,
2081
+ el: !1,
2082
+ en: !1,
2083
+ es: !1,
2084
+ et: !1,
2085
+ fa: !0,
2086
+ fi: !1,
2087
+ fr: !1,
2088
+ hr: !1,
2089
+ hu: !1,
2090
+ he: !0,
2091
+ id: !1,
2092
+ it: !1,
2093
+ ja: !1,
2094
+ ko: !1,
2095
+ lv: !1,
2096
+ lt: !1,
2097
+ nl: !1,
2098
+ no: !1,
2099
+ pl: !1,
2100
+ pt: !1,
2101
+ ro: !1,
2102
+ ru: !1,
2103
+ sk: !1,
2104
+ sl: !1,
2105
+ srCyrl: !1,
2106
+ srLatn: !1,
2107
+ sv: !1,
2108
+ th: !1,
2109
+ tr: !1,
2110
+ az: !1,
2111
+ uk: !1,
2112
+ vi: !1,
2113
+ zhHans: !1,
2114
+ zhHant: !1
2115
+ }, Ra = Symbol.for("yuyeon.i18n");
2116
+ function fl(e, t) {
2117
+ const n = I(
2118
+ (t == null ? void 0 : t.rtlOptions) ?? dl
2119
+ ), a = k(() => n.value[e.locale.value] ?? !1), i = k(() => `y-i18n--${a.value ? "rtl" : "ltr"}`);
2120
+ return {
2121
+ rtlOptions: n,
2122
+ rtl: a,
2123
+ rtlClasses: i
2124
+ };
2125
+ }
2126
+ function vl(e) {
2127
+ const t = cl(e), n = fl(t, e);
2128
+ return {
2129
+ localeModule: t,
2130
+ rtlModule: n
2131
+ };
2132
+ }
2133
+ function ot() {
2134
+ const e = ue(Ra);
2135
+ if (!e) throw new Error('【yuyeon】 Not found provided "I18nModule"');
2136
+ return e;
2137
+ }
2138
+ function Fa(e, t) {
2139
+ const n = Ee(
2140
+ typeof e.adapter == "function" ? new e.adapter({
2141
+ locale: e.locale[t.locale.value] ?? t.locale.value,
2142
+ formats: e.formats
2143
+ }) : e.adapter
2144
+ );
2145
+ return R(t.locale, (a) => {
2146
+ n.locale = e.locale[a] ?? a ?? n.locale;
2147
+ }), n;
2148
+ }
2149
+ const Ft = {
2150
+ AD: 1,
2151
+ AE: 6,
2152
+ AF: 6,
2153
+ AG: 0,
2154
+ AI: 1,
2155
+ AL: 1,
2156
+ AM: 1,
2157
+ AN: 1,
2158
+ AR: 1,
2159
+ AS: 0,
2160
+ AT: 1,
2161
+ AU: 1,
2162
+ AX: 1,
2163
+ AZ: 1,
2164
+ BA: 1,
2165
+ BD: 0,
2166
+ BE: 1,
2167
+ BG: 1,
2168
+ BH: 6,
2169
+ BM: 1,
2170
+ BN: 1,
2171
+ BR: 0,
2172
+ BS: 0,
2173
+ BT: 0,
2174
+ BW: 0,
2175
+ BY: 1,
2176
+ BZ: 0,
2177
+ CA: 0,
2178
+ CH: 1,
2179
+ CL: 1,
2180
+ CM: 1,
2181
+ CN: 1,
2182
+ CO: 0,
2183
+ CR: 1,
2184
+ CY: 1,
2185
+ CZ: 1,
2186
+ DE: 1,
2187
+ DJ: 6,
2188
+ DK: 1,
2189
+ DM: 0,
2190
+ DO: 0,
2191
+ DZ: 6,
2192
+ EC: 1,
2193
+ EE: 1,
2194
+ EG: 6,
2195
+ ES: 1,
2196
+ ET: 0,
2197
+ FI: 1,
2198
+ FJ: 1,
2199
+ FO: 1,
2200
+ FR: 1,
2201
+ GB: 1,
2202
+ GE: 1,
2203
+ GF: 1,
2204
+ GP: 1,
2205
+ GR: 1,
2206
+ GT: 0,
2207
+ GU: 0,
2208
+ HK: 0,
2209
+ HN: 0,
2210
+ HR: 1,
2211
+ HU: 1,
2212
+ ID: 0,
2213
+ IE: 1,
2214
+ IL: 0,
2215
+ IN: 0,
2216
+ IQ: 6,
2217
+ IR: 6,
2218
+ IS: 1,
2219
+ IT: 1,
2220
+ JM: 0,
2221
+ JO: 6,
2222
+ JP: 0,
2223
+ KE: 0,
2224
+ KG: 1,
2225
+ KH: 0,
2226
+ KR: 0,
2227
+ KW: 6,
2228
+ KZ: 1,
2229
+ LA: 0,
2230
+ LB: 1,
2231
+ LI: 1,
2232
+ LK: 1,
2233
+ LT: 1,
2234
+ LU: 1,
2235
+ LV: 1,
2236
+ LY: 6,
2237
+ MC: 1,
2238
+ MD: 1,
2239
+ ME: 1,
2240
+ MH: 0,
2241
+ MK: 1,
2242
+ MM: 0,
2243
+ MN: 1,
2244
+ MO: 0,
2245
+ MQ: 1,
2246
+ MT: 0,
2247
+ MV: 5,
2248
+ MX: 0,
2249
+ MY: 1,
2250
+ MZ: 0,
2251
+ NI: 0,
2252
+ NL: 1,
2253
+ NO: 1,
2254
+ NP: 0,
2255
+ NZ: 1,
2256
+ OM: 6,
2257
+ PA: 0,
2258
+ PE: 0,
2259
+ PH: 0,
2260
+ PK: 0,
2261
+ PL: 1,
2262
+ PR: 0,
2263
+ PT: 0,
2264
+ PY: 0,
2265
+ QA: 6,
2266
+ RE: 1,
2267
+ RO: 1,
2268
+ RS: 1,
2269
+ RU: 1,
2270
+ SA: 0,
2271
+ SD: 6,
2272
+ SE: 1,
2273
+ SG: 0,
2274
+ SI: 1,
2275
+ SK: 1,
2276
+ SM: 1,
2277
+ SV: 0,
2278
+ SY: 6,
2279
+ TH: 0,
2280
+ TJ: 1,
2281
+ TM: 1,
2282
+ TR: 1,
2283
+ TT: 0,
2284
+ TW: 0,
2285
+ UA: 1,
2286
+ UM: 0,
2287
+ US: 0,
2288
+ UY: 1,
2289
+ UZ: 1,
2290
+ VA: 1,
2291
+ VE: 0,
2292
+ VI: 0,
2293
+ VN: 1,
2294
+ WS: 0,
2295
+ XK: 1,
2296
+ YE: 0,
2297
+ ZA: 0,
2298
+ ZW: 0
2299
+ }, yl = 1e3 * 60 * 60 * 24, ml = /^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/, dt = new Date(1970, 0, 4);
2300
+ class U {
2301
+ static date(t) {
2302
+ if (t == null) return /* @__PURE__ */ new Date();
2303
+ if (t instanceof Date)
2304
+ return t;
2305
+ let n;
2306
+ if (typeof t == "string") {
2307
+ if (ml.test(t))
2308
+ return U.parseLocalDate(t);
2309
+ if (n = Date.parse(t), !isNaN(n))
2310
+ return new Date(n);
2509
2311
  }
2510
- function w(m) {
2511
- n("click", m);
2312
+ return null;
2313
+ }
2314
+ static format(t, n, a, i) {
2315
+ const r = U.date(t) ?? /* @__PURE__ */ new Date(), l = i == null ? void 0 : i[n];
2316
+ if (typeof l == "function")
2317
+ return l(r, n, a);
2318
+ let o = {};
2319
+ switch (n) {
2320
+ case "fullDateWithWeekday":
2321
+ o = {
2322
+ weekday: "long",
2323
+ day: "numeric",
2324
+ month: "long",
2325
+ year: "numeric"
2326
+ };
2327
+ break;
2328
+ case "normalDateWithWeekday":
2329
+ o = { weekday: "short", day: "numeric", month: "short" };
2330
+ break;
2331
+ case "keyboardDate":
2332
+ o = { day: "2-digit", month: "2-digit", year: "numeric" };
2333
+ break;
2334
+ case "monthAndDate":
2335
+ o = { month: "long", day: "numeric" };
2336
+ break;
2337
+ case "monthAndYear":
2338
+ o = { month: "long", year: "numeric" };
2339
+ break;
2340
+ case "year":
2341
+ o = { year: "numeric" };
2342
+ break;
2343
+ case "month":
2344
+ o = { month: "long" };
2345
+ break;
2346
+ case "monthShort":
2347
+ o = { month: "short" };
2348
+ break;
2349
+ case "dayOfMonth":
2350
+ o = { day: "numeric" };
2351
+ break;
2352
+ case "shortDate":
2353
+ o = { year: "2-digit", month: "numeric", day: "numeric" };
2354
+ break;
2355
+ default:
2356
+ o = l ?? { timeZone: "UTC", timeZoneName: "short" };
2512
2357
  }
2513
- return R(() => e.modelValue, (m) => {
2514
- c.value = m, s.value = m;
2515
- }, {
2516
- immediate: !0
2517
- }), R(c, (m) => {
2518
- u.value ? s.value = m : C();
2519
- }), i({
2520
- el$: l,
2521
- input$: o,
2522
- validate: () => {
2523
- var m;
2524
- return (m = l.value) == null ? void 0 : m.invokeValidators();
2525
- }
2526
- }), K(() => {
2527
- const m = te(e, Be.props);
2528
- return d(Be, W({
2529
- class: [ra]
2530
- }, m, {
2531
- modelValue: c.value,
2532
- "onUpdate:modelValue": x,
2533
- focused: u.value,
2534
- onClick: w,
2535
- "onMousedown:display": (_) => n("mousedown:display", _)
2536
- }), {
2537
- default: (_) => {
2538
- var M, P;
2539
- return d("div", {
2540
- class: [`${ra}__field`],
2541
- "data-id": _.attrId,
2542
- ref: "field"
2543
- }, [e.floating ? (P = (M = l.value) == null ? void 0 : M.createLabel) == null ? void 0 : P.call(M) : void 0, a.default ? () => a.default(_) : void 0, d("textarea", W({
2544
- ref: o,
2545
- value: s.value,
2546
- id: `y-input--${r}`,
2547
- disabled: e.disabled,
2548
- placeholder: e.placeholder,
2549
- readonly: e.readonly,
2550
- required: e.required
2551
- }, t, {
2552
- onInput: S,
2553
- onFocus: f,
2554
- onBlur: b,
2555
- onChange: v,
2556
- onKeydown: p,
2557
- onKeyup: g
2558
- }), null)]);
2559
- },
2560
- label: a.label ? () => {
2561
- var _;
2562
- return (_ = a.label) == null ? void 0 : _.call(a);
2563
- } : void 0,
2564
- "helper-text": a["helper-text"] ? () => {
2565
- var _;
2566
- return (_ = a["helper-text"]) == null ? void 0 : _.call(a);
2567
- } : void 0
2568
- });
2569
- }), {
2570
- el$: l,
2571
- input$: o
2572
- };
2358
+ return new Intl.DateTimeFormat(a, o).format(r);
2573
2359
  }
2574
- }), vl = "y-form", yl = /* @__PURE__ */ V({
2575
- name: "YForm",
2576
- props: {
2577
- ...ol()
2578
- },
2579
- emits: {
2580
- "update:modelValue": (e) => !0,
2581
- submit: (e) => !0,
2582
- "keydown.enter": (e) => !0
2583
- },
2584
- setup(e, {
2585
- emit: t,
2586
- slots: n,
2587
- expose: a
2588
- }) {
2589
- const i = ul(e), r = I();
2590
- I();
2591
- function l(c) {
2592
- const s = c, u = i.validate();
2593
- s.then = u.then.bind(u), s.catch = u.catch.bind(u), s.finally = u.finally.bind(u), t("submit", s), s.defaultPrevented || u.then(({
2594
- valid: h
2595
- }) => {
2596
- var y;
2597
- h && ((y = r.value) == null || y.submit());
2598
- }), s.preventDefault();
2360
+ static parseLocalDate(t) {
2361
+ const n = t.split("-").map(Number);
2362
+ return new Date(n[0], n[1] - 1, n[2]);
2363
+ }
2364
+ static parseISO(t) {
2365
+ const [n, a, i] = t.split("-").map(Number);
2366
+ return new Date(n, a - 1, i);
2367
+ }
2368
+ static toISO(t, n) {
2369
+ const a = t.toJsDate(n), i = a.getFullYear(), r = a.getMonth() + 1 < 10 ? `0${a.getMonth() + 1}` : `${a.getMonth() + 1}`, l = a.getDate() < 10 ? `0${a.getDate()}` : `${a.getDate()}`;
2370
+ return `${i}-${r}-${l}`;
2371
+ }
2372
+ static getWeekArray(t, n) {
2373
+ const a = [];
2374
+ let i = [];
2375
+ const r = U.startOfMonth(t), l = U.endOfMonth(t), o = (r.getDay() - Ft[n.slice(-2).toUpperCase()] + 7) % 7, c = (l.getDay() - Ft[n.slice(-2).toUpperCase()] + 7) % 7;
2376
+ for (let s = 0; s < o; s++) {
2377
+ const u = new Date(r);
2378
+ u.setDate(u.getDate() - (o - s)), i.push(u);
2599
2379
  }
2600
- function o(c) {
2601
- c.preventDefault(), c.stopImmediatePropagation(), t("keydown.enter", c);
2380
+ for (let s = 1; s <= l.getDate(); s++)
2381
+ i.push(new Date(t.getFullYear(), t.getMonth(), s)), i.length === 7 && (a.push(i), i = []);
2382
+ for (let s = 1; s < 7 - c; s++) {
2383
+ const u = new Date(l);
2384
+ u.setDate(u.getDate() + s), i.push(u);
2602
2385
  }
2603
- a({
2604
- ...i
2605
- }), K(() => {
2606
- var c;
2607
- return d("form", {
2608
- ref: r,
2609
- class: [vl],
2610
- novalidate: !0,
2611
- onSubmit: l,
2612
- onKeydown: yr(o, ["enter"])
2613
- }, [(c = n.default) == null ? void 0 : c.call(n)]);
2386
+ return i.length > 0 && a.push(i), a;
2387
+ }
2388
+ static startOfMonth(t) {
2389
+ return new Date(t.getFullYear(), t.getMonth(), 1);
2390
+ }
2391
+ static endOfMonth(t) {
2392
+ return new Date(t.getFullYear(), t.getMonth() + 1, 0);
2393
+ }
2394
+ static startOfDay(t) {
2395
+ return new Date(t.getFullYear(), t.getMonth(), t.getDate());
2396
+ }
2397
+ static startOfYear(t) {
2398
+ return new Date(t.getFullYear(), 0, 1);
2399
+ }
2400
+ static endOfDay(t) {
2401
+ return new Date(
2402
+ t.getFullYear(),
2403
+ t.getMonth(),
2404
+ t.getDate(),
2405
+ 23,
2406
+ 59,
2407
+ 59,
2408
+ 999
2409
+ );
2410
+ }
2411
+ static endOfYear(t) {
2412
+ return new Date(t.getFullYear(), 11, 31);
2413
+ }
2414
+ static getYear(t) {
2415
+ return t.getFullYear();
2416
+ }
2417
+ static getMonth(t) {
2418
+ return t.getMonth();
2419
+ }
2420
+ static getDay(t) {
2421
+ return t.getDate();
2422
+ }
2423
+ static getNextMonth(t) {
2424
+ return new Date(t.getFullYear(), t.getMonth() + 1, 1);
2425
+ }
2426
+ static getWeekdays(t) {
2427
+ const n = Ft[t.slice(-2).toUpperCase()] ?? 0;
2428
+ return [...Array(7).keys()].map((a) => {
2429
+ const i = new Date(dt);
2430
+ return i.setDate(dt.getDate() + n + a), new Intl.DateTimeFormat(t, { weekday: "narrow" }).format(
2431
+ i
2432
+ );
2614
2433
  });
2615
2434
  }
2616
- }), ml = {
2617
- search: "search",
2618
- noItems: "No Options",
2619
- noData: "No Data"
2620
- }, la = "$yuyeon";
2621
- function oa(e, t) {
2622
- return e.replace(/\{(\d+)\}/g, (n, a) => String(t[+a]));
2623
- }
2624
- function Ra(e, t, n) {
2625
- function a(l, ...o) {
2626
- if (!l.startsWith(la))
2627
- return oa(l, o);
2628
- const c = l.replace(la, ""), s = e.value && n.value[e.value], u = t.value && n.value[t.value];
2629
- let h = Z(s, c, null);
2630
- return h || (h = Z(u, c, null)), h || (h = l), typeof h != "string" && (h = l), oa(h, o);
2435
+ static getMeridians(t) {
2436
+ const n = new Date(dt).setHours(11), a = new Date(dt).setHours(13), i = Intl.DateTimeFormat(t, {
2437
+ minute: "numeric",
2438
+ hour: "numeric",
2439
+ hour12: !0
2440
+ });
2441
+ return [
2442
+ i.format(n).replace(/\d+:\d+/, "").trim(),
2443
+ i.format(a).replace(/\d+:\d+/, "").trim()
2444
+ ];
2631
2445
  }
2632
- function i(l, o) {
2633
- return new Intl.NumberFormat(
2634
- [e.value, t.value],
2635
- o
2636
- ).format(l);
2446
+ static isAfter(t, n) {
2447
+ return t.getTime() > n.getTime();
2637
2448
  }
2638
- function r(l) {
2639
- const o = Vt(l, "locale", e), c = Vt(
2640
- l,
2641
- "fallbackLocale",
2642
- t
2643
- ), s = Vt(l, "messages", n), u = Ra(
2644
- o,
2645
- c,
2646
- s
2647
- );
2648
- return {
2649
- name: "yuyeon",
2650
- locale: e,
2651
- fallbackLocale: t,
2652
- messages: n,
2653
- t: u.translate,
2654
- n: u.number,
2655
- getContext: u.getContext
2656
- };
2449
+ static isBefore(t, n) {
2450
+ return t.getTime() < n.getTime();
2451
+ }
2452
+ static isEqual(t, n) {
2453
+ return t.getTime() === n.getTime();
2454
+ }
2455
+ static isSameDay(t, n) {
2456
+ return t.getDate() === n.getDate() && t.getMonth() === n.getMonth() && t.getFullYear() === n.getFullYear();
2457
+ }
2458
+ static isSameMonth(t, n) {
2459
+ return !!(t.getMonth() === n.getMonth() && t.getFullYear() && n.getFullYear());
2460
+ }
2461
+ static isValid(t) {
2462
+ const n = new Date(t);
2463
+ return n instanceof Date && !isNaN(n.getTime());
2464
+ }
2465
+ static isWithinRange(t, n) {
2466
+ return U.isAfter(t, n[0]) && U.isBefore(t, n[1]);
2467
+ }
2468
+ static addDays(t, n) {
2469
+ const a = new Date(t);
2470
+ return a.setDate(a.getDate() + n), a;
2471
+ }
2472
+ static addMonths(t, n) {
2473
+ const a = new Date(t);
2474
+ return a.setMonth(a.getMonth() + n), a;
2475
+ }
2476
+ static getDiff(t, n, a) {
2477
+ const i = new Date(t), r = new Date(n);
2478
+ return a === "month" ? i.getMonth() - r.getMonth() + (i.getFullYear() - r.getFullYear()) * 12 : Math.floor(i.getTime() - r.getTime()) / yl;
2479
+ }
2480
+ static setMonth(t, n) {
2481
+ const a = new Date(t);
2482
+ return a.setMonth(n), a;
2483
+ }
2484
+ static setYear(t, n) {
2485
+ const a = new Date(t);
2486
+ return a.setFullYear(n), a;
2487
+ }
2488
+ static getHour(t) {
2489
+ return t.getHours();
2490
+ }
2491
+ static setHour(t, n) {
2492
+ const a = new Date(t);
2493
+ return a.setHours(n), a;
2494
+ }
2495
+ static getMinute(t) {
2496
+ return t.getMinutes();
2497
+ }
2498
+ static setMinute(t, n) {
2499
+ const a = new Date(t);
2500
+ return a.setMinutes(n), a;
2657
2501
  }
2658
- return {
2659
- translate: a,
2660
- number: i,
2661
- getContext: r
2662
- };
2663
- }
2664
- function hl(e) {
2665
- const t = re((e == null ? void 0 : e.locale) ?? "en"), n = re((e == null ? void 0 : e.fallbackLocale) ?? "en"), a = I({
2666
- en: ml,
2667
- ...e == null ? void 0 : e.messages
2668
- }), i = Ra(t, n, a);
2669
- return {
2670
- name: "yuyeon",
2671
- locale: t,
2672
- fallbackLocale: n,
2673
- messages: a,
2674
- t: i.translate,
2675
- n: i.number,
2676
- getContext: i.getContext
2677
- };
2678
- }
2679
- function gl(e) {
2680
- var t;
2681
- return e != null && e.adapter && ((t = e.adapter) != null && t.name) ? e.adapter : hl(e);
2682
- }
2683
- const bl = {
2684
- af: "af-ZA",
2685
- bg: "bg-BG",
2686
- ca: "ca-ES",
2687
- cs: "cs-CZ",
2688
- de: "de-DE",
2689
- el: "el-GR",
2690
- en: "en-US",
2691
- et: "et-EE",
2692
- fa: "fa-IR",
2693
- fi: "fi-FI",
2694
- hr: "hr-HR",
2695
- hu: "hu-HU",
2696
- he: "he-IL",
2697
- id: "id-ID",
2698
- it: "it-IT",
2699
- ja: "ja-JP",
2700
- ko: "ko-KR",
2701
- lv: "lv-LV",
2702
- lt: "lt-LT",
2703
- nl: "nl-NL",
2704
- no: "no-NO",
2705
- pl: "pl-PL",
2706
- pt: "pt-PT",
2707
- ro: "ro-RO",
2708
- ru: "ru-RU",
2709
- sk: "sk-SK",
2710
- sl: "sl-SI",
2711
- srCyrl: "sr-SP",
2712
- srLatn: "sr-SP",
2713
- sv: "sv-SE",
2714
- th: "th-TH",
2715
- tr: "tr-TR",
2716
- az: "az-AZ",
2717
- uk: "uk-UA",
2718
- vi: "vi-VN",
2719
- zhHans: "zh-CN",
2720
- zhHant: "zh-TW"
2721
- }, wl = {
2722
- af: !1,
2723
- ar: !0,
2724
- bg: !1,
2725
- ca: !1,
2726
- cs: !1,
2727
- de: !1,
2728
- el: !1,
2729
- en: !1,
2730
- es: !1,
2731
- et: !1,
2732
- fa: !0,
2733
- fi: !1,
2734
- fr: !1,
2735
- hr: !1,
2736
- hu: !1,
2737
- he: !0,
2738
- id: !1,
2739
- it: !1,
2740
- ja: !1,
2741
- ko: !1,
2742
- lv: !1,
2743
- lt: !1,
2744
- nl: !1,
2745
- no: !1,
2746
- pl: !1,
2747
- pt: !1,
2748
- ro: !1,
2749
- ru: !1,
2750
- sk: !1,
2751
- sl: !1,
2752
- srCyrl: !1,
2753
- srLatn: !1,
2754
- sv: !1,
2755
- th: !1,
2756
- tr: !1,
2757
- az: !1,
2758
- uk: !1,
2759
- vi: !1,
2760
- zhHans: !1,
2761
- zhHant: !1
2762
- }, Fa = Symbol.for("yuyeon.i18n");
2763
- function pl(e, t) {
2764
- const n = I(
2765
- (t == null ? void 0 : t.rtlOptions) ?? wl
2766
- ), a = k(() => n.value[e.locale.value] ?? !1), i = k(() => `y-i18n--${a.value ? "rtl" : "ltr"}`);
2767
- return {
2768
- rtlOptions: n,
2769
- rtl: a,
2770
- rtlClasses: i
2771
- };
2772
- }
2773
- function Sl(e) {
2774
- const t = gl(e), n = pl(t, e);
2775
- return {
2776
- localeModule: t,
2777
- rtlModule: n
2778
- };
2779
- }
2780
- function ot() {
2781
- const e = ue(Fa);
2782
- if (!e) throw new Error('【yuyeon】 Not found provided "I18nModule"');
2783
- return e;
2784
2502
  }
2785
- function ja(e, t) {
2786
- const n = Ee(
2787
- typeof e.adapter == "function" ? new e.adapter({
2788
- locale: e.locale[t.locale.value] ?? t.locale.value,
2789
- formats: e.formats
2790
- }) : e.adapter
2791
- );
2792
- return R(t.locale, (a) => {
2793
- n.locale = e.locale[a] ?? a ?? n.locale;
2794
- }), n;
2503
+ class hl {
2504
+ constructor(t) {
2505
+ he(this, "locale", "ko-kr");
2506
+ he(this, "formats");
2507
+ this.locale = t.locale, this.formats = t.formats;
2508
+ }
2509
+ getWeekArray(t) {
2510
+ return U.getWeekArray(t, this.locale);
2511
+ }
2512
+ startOfMonth(t) {
2513
+ return U.startOfMonth(t);
2514
+ }
2515
+ endOfMonth(t) {
2516
+ return U.endOfMonth(t);
2517
+ }
2518
+ addDays(t, n) {
2519
+ return U.addDays(t, n);
2520
+ }
2521
+ addMonths(t, n) {
2522
+ return U.addMonths(t, n);
2523
+ }
2524
+ date(t) {
2525
+ return U.date(t);
2526
+ }
2527
+ endOfDay(t) {
2528
+ return U.endOfDay(t);
2529
+ }
2530
+ endOfYear(t) {
2531
+ return U.endOfYear(t);
2532
+ }
2533
+ format(t, n) {
2534
+ return U.format(t, n, this.locale, this.formats);
2535
+ }
2536
+ getDiff(t, n, a) {
2537
+ return U.getDiff(t, n, a);
2538
+ }
2539
+ getYear(t) {
2540
+ return U.getYear(t);
2541
+ }
2542
+ getMonth(t) {
2543
+ return U.getMonth(t);
2544
+ }
2545
+ getDay(t) {
2546
+ return U.getDay(t);
2547
+ }
2548
+ getNextMonth(t) {
2549
+ return U.getNextMonth(t);
2550
+ }
2551
+ getWeekdays() {
2552
+ return U.getWeekdays(this.locale);
2553
+ }
2554
+ isAfter(t, n) {
2555
+ return U.isAfter(t, n);
2556
+ }
2557
+ isBefore(t, n) {
2558
+ return U.isBefore(t, n);
2559
+ }
2560
+ isEqual(t, n) {
2561
+ return U.isEqual(t, n);
2562
+ }
2563
+ isSameDay(t, n) {
2564
+ return U.isSameDay(t, n);
2565
+ }
2566
+ isSameMonth(t, n) {
2567
+ return U.isSameMonth(t, n);
2568
+ }
2569
+ isValid(t) {
2570
+ return U.isValid(t);
2571
+ }
2572
+ isWithinRange(t, n) {
2573
+ return U.isWithinRange(t, n);
2574
+ }
2575
+ parseISO(t) {
2576
+ return U.parseISO(t);
2577
+ }
2578
+ setMonth(t, n) {
2579
+ return U.setMonth(t, n);
2580
+ }
2581
+ setYear(t, n) {
2582
+ return U.setYear(t, n);
2583
+ }
2584
+ startOfDay(t) {
2585
+ return U.startOfDay(t);
2586
+ }
2587
+ startOfYear(t) {
2588
+ return U.startOfYear(t);
2589
+ }
2590
+ toISO(t) {
2591
+ return U.toISO(this, t);
2592
+ }
2593
+ toJsDate(t) {
2594
+ return t;
2595
+ }
2596
+ getHour(t) {
2597
+ return U.getHour(t);
2598
+ }
2599
+ getMinute(t) {
2600
+ return U.getMinute(t);
2601
+ }
2602
+ setHour(t, n) {
2603
+ return U.setHour(t, n);
2604
+ }
2605
+ setMinute(t, n) {
2606
+ return U.setMinute(t, n);
2607
+ }
2795
2608
  }
2796
- function xl(e) {
2609
+ function gl(e) {
2797
2610
  return we(
2798
2611
  {
2799
- adapter: Ur,
2800
- locale: bl
2612
+ adapter: hl,
2613
+ locale: sl
2801
2614
  },
2802
2615
  e
2803
2616
  );
2804
2617
  }
2805
- const Cl = Symbol.for("yuyeon.date"), Ka = Symbol.for("yuyeon.date-options");
2806
- function kl(e, t) {
2807
- const n = xl(e);
2618
+ const bl = Symbol.for("yuyeon.date"), ja = Symbol.for("yuyeon.date-options");
2619
+ function wl(e, t) {
2620
+ const n = gl(e);
2808
2621
  return {
2809
2622
  options: n,
2810
- instance: ja(n, t)
2623
+ instance: Fa(n, t)
2811
2624
  };
2812
2625
  }
2813
2626
  function Pt() {
2814
- const e = ue(Ka);
2627
+ const e = ue(ja);
2815
2628
  if (!e)
2816
2629
  throw new Error('【yuyeon】 Not found provided "DateModule" for options');
2817
2630
  const t = ot();
2818
- return ja(e, t);
2631
+ return Fa(e, t);
2819
2632
  }
2820
- const Ht = typeof window < "u", _l = {
2821
- isBrowser: Ht,
2822
- canUseIntersectionObserver: Ht && "IntersectionObserver" in window,
2823
- canUseResizeObserver: Ht && "ResizeObserver" in window
2633
+ const jt = typeof window < "u", pl = {
2634
+ isBrowser: jt,
2635
+ canUseIntersectionObserver: jt && "IntersectionObserver" in window,
2636
+ canUseResizeObserver: jt && "ResizeObserver" in window
2824
2637
  };
2825
2638
  function Pe(e) {
2826
2639
  const t = I(), n = I();
2827
- if (_l.canUseResizeObserver) {
2640
+ if (pl.canUseResizeObserver) {
2828
2641
  const a = new ResizeObserver((i, r) => {
2829
2642
  e == null || e(i, r), i.length && (n.value = i[0].contentRect);
2830
2643
  });
@@ -2843,7 +2656,7 @@ function Pe(e) {
2843
2656
  contentRect: Qt(n)
2844
2657
  };
2845
2658
  }
2846
- function Al(e, t) {
2659
+ function Sl(e, t) {
2847
2660
  const n = I(!1), a = I();
2848
2661
  a.value = t.value;
2849
2662
  const i = k(() => e.value ? t.value : a.value);
@@ -2859,7 +2672,7 @@ function Al(e, t) {
2859
2672
  onAfterUpdate: r
2860
2673
  };
2861
2674
  }
2862
- function Dl(e, t, n) {
2675
+ function xl(e, t, n) {
2863
2676
  const { tickDuration: a } = {};
2864
2677
  let i = a ?? 100, r = -1;
2865
2678
  const l = I(0), o = I(ve(t)), c = I(!1);
@@ -2889,7 +2702,7 @@ function Dl(e, t, n) {
2889
2702
  isWork: c
2890
2703
  };
2891
2704
  }
2892
- function Tl(e, t) {
2705
+ function Cl(e, t) {
2893
2706
  const n = {};
2894
2707
  function a(l) {
2895
2708
  n[l] && window.clearTimeout(n[l]), delete n[l];
@@ -2922,7 +2735,7 @@ const $t = F(
2922
2735
  },
2923
2736
  "PolyTransition"
2924
2737
  );
2925
- function El(e) {
2738
+ function kl(e) {
2926
2739
  return {
2927
2740
  polyTransitionBindProps: k(() => {
2928
2741
  const { is: n, ...a } = typeof e.transition == "object" ? e.transition : { is: e.transition, name: e.transition };
@@ -2933,11 +2746,11 @@ function El(e) {
2933
2746
  })
2934
2747
  };
2935
2748
  }
2936
- const ln = (e, { slots: t }) => {
2749
+ const rn = (e, { slots: t }) => {
2937
2750
  const { is: n, transitionProps: a, ...i } = e, { component: r = Mt, ...l } = typeof n == "object" ? { component: n, ...a } : { name: n };
2938
2751
  return se(r, { ...l, ...a, ...i }, t);
2939
2752
  };
2940
- function Ha(e) {
2753
+ function Ka(e) {
2941
2754
  const t = re(0), n = k(() => {
2942
2755
  const { modelValue: a, value: i } = e, r = Number(a ?? i);
2943
2756
  return Number.isNaN(r) || r < 0 ? 0 : r > 100 ? 100 : r;
@@ -2949,7 +2762,7 @@ function Ha(e) {
2949
2762
  delta: t
2950
2763
  };
2951
2764
  }
2952
- const Wa = /* @__PURE__ */ V({
2765
+ const Ha = /* @__PURE__ */ V({
2953
2766
  name: "YProgressBar",
2954
2767
  props: {
2955
2768
  modelValue: {
@@ -2989,7 +2802,7 @@ const Wa = /* @__PURE__ */ V({
2989
2802
  const {
2990
2803
  numValue: n,
2991
2804
  delta: a
2992
- } = Ha(e), i = k(() => {
2805
+ } = Ka(e), i = k(() => {
2993
2806
  let o = !1;
2994
2807
  return e.noRewindTransition && a.value < 0 && (o = !0), {
2995
2808
  "y-progress--no-trans": o,
@@ -3043,7 +2856,199 @@ const Wa = /* @__PURE__ */ V({
3043
2856
  delta: a
3044
2857
  };
3045
2858
  }
3046
- }), Ol = /* @__PURE__ */ V({
2859
+ });
2860
+ function An(e, t = 0, n = {
2861
+ leading: !1,
2862
+ trailing: !0
2863
+ }) {
2864
+ let a, i, r = 0, l, o, c, s = 0, u = !1, h = !1, y = !0;
2865
+ if (typeof e != "function")
2866
+ throw new TypeError("NOT Function");
2867
+ t = +t || 0, wr(n) && (u = !!n.leading, h = "maxWait" in n, r = h ? Math.max(+((n == null ? void 0 : n.maxWait) || 0), t) : r, y = "trailing" in n ? !!n.trailing : y);
2868
+ function x(m) {
2869
+ const _ = a, M = i;
2870
+ return a = i = void 0, s = m, l = e.apply(M, _), l;
2871
+ }
2872
+ function C(m) {
2873
+ return s = m, o = window.setTimeout(f, t), u ? x(m) : l;
2874
+ }
2875
+ function S(m) {
2876
+ var _ = m - (c ?? 0), M = m - (s ?? 0), P = t - _;
2877
+ return h ? Math.min(P, (r ?? 0) - M) : P;
2878
+ }
2879
+ function v(m) {
2880
+ var _ = m - (c ?? 0), M = m - (s ?? 0);
2881
+ return c === void 0 || _ >= t || _ < 0 || h && M >= (r ?? 0);
2882
+ }
2883
+ function f() {
2884
+ const m = Date.now();
2885
+ if (v(m))
2886
+ return b(m);
2887
+ o = window.setTimeout(f, S(m));
2888
+ }
2889
+ function b(m) {
2890
+ return o = void 0, y && a ? x(m) : (a = i = void 0, l);
2891
+ }
2892
+ function p() {
2893
+ o !== void 0 && clearTimeout(o), s = 0, a = c = i = o = void 0;
2894
+ }
2895
+ function g() {
2896
+ return o === void 0 ? l : b(Date.now());
2897
+ }
2898
+ function w() {
2899
+ const m = Date.now(), _ = v(m);
2900
+ if (a = arguments, i = this, c = m, _) {
2901
+ if (o === void 0)
2902
+ return C(c);
2903
+ if (h)
2904
+ return clearTimeout(o), o = window.setTimeout(f, t), x(c);
2905
+ }
2906
+ return o === void 0 && (o = window.setTimeout(f, t)), l;
2907
+ }
2908
+ return w.cancel = p, w.flush = g, w;
2909
+ }
2910
+ function Dn(e) {
2911
+ const t = e.getRootNode();
2912
+ return t !== document && t.getRootNode({ composed: !0 }) !== document ? null : t;
2913
+ }
2914
+ function _l(e, t, n) {
2915
+ if (!e)
2916
+ return !1;
2917
+ const a = Dn(t);
2918
+ if (typeof ShadowRoot < "u" && a instanceof ShadowRoot && a.host === e.target)
2919
+ return !1;
2920
+ const i = [];
2921
+ return i.push(t), !i.some((r) => r == null ? void 0 : r.contains(e.target));
2922
+ }
2923
+ class ft {
2924
+ constructor({
2925
+ x: t,
2926
+ y: n,
2927
+ width: a,
2928
+ height: i
2929
+ }) {
2930
+ he(this, "x");
2931
+ he(this, "y");
2932
+ he(this, "width");
2933
+ he(this, "height");
2934
+ this.x = t ?? 0, this.y = n ?? 0, this.width = a ?? 0, this.height = i ?? 0;
2935
+ }
2936
+ get top() {
2937
+ return this.y;
2938
+ }
2939
+ get bottom() {
2940
+ return this.y + this.height;
2941
+ }
2942
+ get left() {
2943
+ return this.x;
2944
+ }
2945
+ get right() {
2946
+ return this.x + this.width;
2947
+ }
2948
+ }
2949
+ function aa(e, t) {
2950
+ return {
2951
+ x: {
2952
+ before: Math.max(0, t.left - e.left),
2953
+ after: Math.max(0, e.right - t.right)
2954
+ },
2955
+ y: {
2956
+ before: Math.max(0, t.top - e.top),
2957
+ after: Math.max(0, e.bottom - t.bottom)
2958
+ }
2959
+ };
2960
+ }
2961
+ const ln = (e, t) => e.includes(t), Wa = ["top", "bottom"], Al = ["start", "end", "left", "right"];
2962
+ function ia(e, t) {
2963
+ let [n, a] = e.split(" ");
2964
+ return a || (a = ln(Wa, n) ? "start" : ln(Al, n) ? "top" : "center"), {
2965
+ side: ra(n, t),
2966
+ align: ra(a, t)
2967
+ };
2968
+ }
2969
+ function ra(e, t) {
2970
+ return e === "start" ? t ? "right" : "left" : e === "end" ? t ? "left" : "right" : e;
2971
+ }
2972
+ function Kt(e) {
2973
+ return {
2974
+ side: {
2975
+ center: "center",
2976
+ top: "bottom",
2977
+ bottom: "top",
2978
+ left: "right",
2979
+ right: "left"
2980
+ }[e.side],
2981
+ align: e.align
2982
+ };
2983
+ }
2984
+ function Ht(e) {
2985
+ return {
2986
+ side: e.side,
2987
+ align: {
2988
+ center: "center",
2989
+ top: "bottom",
2990
+ bottom: "top",
2991
+ left: "right",
2992
+ right: "left"
2993
+ }[e.align]
2994
+ };
2995
+ }
2996
+ function la(e) {
2997
+ return {
2998
+ side: e.align,
2999
+ align: e.side
3000
+ };
3001
+ }
3002
+ function oa(e) {
3003
+ return ln(Wa, e.side) ? "y" : "x";
3004
+ }
3005
+ function Dl(e, t) {
3006
+ for (; e; ) {
3007
+ if (Tn(e)) return e;
3008
+ e = e.parentElement;
3009
+ }
3010
+ return document.scrollingElement;
3011
+ }
3012
+ function St(e, t, n) {
3013
+ const a = [];
3014
+ if (t && e && !t.contains(e)) return a;
3015
+ for (; e && (Tn(e) && a.push(e), e !== t); )
3016
+ e = e.parentElement;
3017
+ return a;
3018
+ }
3019
+ function Tn(e, t) {
3020
+ if (!e || e.nodeType !== Node.ELEMENT_NODE)
3021
+ return !1;
3022
+ const n = window.getComputedStyle(e);
3023
+ return n.overflowY === "scroll" || n.overflowY === "auto" && e.clientHeight < e.scrollHeight;
3024
+ }
3025
+ class Tl {
3026
+ constructor() {
3027
+ he(this, "clean", !0);
3028
+ he(this, "frames", []);
3029
+ he(this, "raf", -1);
3030
+ }
3031
+ run() {
3032
+ cancelAnimationFrame(this.raf), this.raf = requestAnimationFrame(() => {
3033
+ const t = this.frames.shift();
3034
+ t && t(), frames.length ? this.run() : this.clean = !0;
3035
+ });
3036
+ }
3037
+ requestNewFrame(t) {
3038
+ !this.clean || this.frames.length ? (this.frames.push(t), this.run()) : (this.clean = !1, t(), this.run());
3039
+ }
3040
+ }
3041
+ function El(e) {
3042
+ const t = Ee({}), n = k(e);
3043
+ return We(
3044
+ () => {
3045
+ for (const a in n.value)
3046
+ t[a] = n.value[a];
3047
+ },
3048
+ { flush: "sync" }
3049
+ ), yr(t);
3050
+ }
3051
+ const Ol = /* @__PURE__ */ V({
3047
3052
  name: "YProgressRing",
3048
3053
  props: {
3049
3054
  modelValue: {
@@ -3080,7 +3085,7 @@ const Wa = /* @__PURE__ */ V({
3080
3085
  const n = 2 * Math.PI * 24, {
3081
3086
  numValue: a,
3082
3087
  delta: i
3083
- } = Ha(e), r = k(() => {
3088
+ } = Ka(e), r = k(() => {
3084
3089
  let s = e.color ?? "";
3085
3090
  return je(s) || (s = `var(--y-theme-${s})`), s;
3086
3091
  }), l = k(() => {
@@ -3196,7 +3201,7 @@ function Ua(e, t) {
3196
3201
  return {
3197
3202
  colorVars: k(() => {
3198
3203
  let { color: a, background: i } = e;
3199
- return i || (i = a), a && !je(a) && (a = `var(--y-theme-${a})`), i && (je(i) ? i = `rgba(${qr(i)}, ${e.backgroundOpacity})` : i.startsWith("var(") || (i = `rgba(${`var(--y-theme-${i}-rgb)`}, ${e.backgroundOpacity})`)), {
3204
+ return i || (i = a), a && !je(a) && (a = `var(--y-theme-${a})`), i && (je(i) ? i = `rgba(${Lr(i)}, ${e.backgroundOpacity})` : i.startsWith("var(") || (i = `rgba(${`var(--y-theme-${i}-rgb)`}, ${e.backgroundOpacity})`)), {
3200
3205
  [`--y-${t}__color`]: a,
3201
3206
  [`--y-${t}__background`]: i
3202
3207
  };
@@ -3443,7 +3448,7 @@ function Vl(e, t, n, a) {
3443
3448
  S.disconnect();
3444
3449
  });
3445
3450
  function v(b) {
3446
- const p = Rr(b);
3451
+ const p = al(b);
3447
3452
  return p.x -= parseFloat(b.style.left || "0"), p.y -= parseFloat(b.style.top || "0"), p;
3448
3453
  }
3449
3454
  function f() {
@@ -3452,22 +3457,22 @@ function Vl(e, t, n, a) {
3452
3457
  if (requestAnimationFrame(() => {
3453
3458
  requestAnimationFrame(() => C = !0);
3454
3459
  }), !b || !p) return;
3455
- const g = Array.isArray(b) ? new ct({
3460
+ const g = Array.isArray(b) ? new ft({
3456
3461
  x: (b == null ? void 0 : b[0]) ?? 0,
3457
3462
  y: (b == null ? void 0 : b[1]) ?? 0,
3458
3463
  width: 0,
3459
3464
  height: 0
3460
- }) : b.getBoundingClientRect(), w = v(p), m = wt(p);
3465
+ }) : b.getBoundingClientRect(), w = v(p), m = St(p);
3461
3466
  m.length < 1 && m.push(document.documentElement);
3462
3467
  const _ = m.reduce(
3463
3468
  (N, L) => {
3464
- const B = L.getBoundingClientRect(), H = new ct({
3469
+ const B = L.getBoundingClientRect(), H = new ft({
3465
3470
  x: L === document.documentElement ? 0 : B.x,
3466
3471
  y: L === document.documentElement ? 0 : B.y,
3467
3472
  width: L.clientWidth,
3468
3473
  height: L.clientHeight
3469
3474
  });
3470
- return N ? new ct({
3475
+ return N ? new ft({
3471
3476
  x: Math.max(N.left, H.left),
3472
3477
  y: Math.max(N.top, H.top),
3473
3478
  width: Math.min(N.right, H.right) - Math.max(N.left, H.left),
@@ -3477,11 +3482,11 @@ function Vl(e, t, n, a) {
3477
3482
  void 0
3478
3483
  );
3479
3484
  _.x += x.value[0], _.y += x.value[1], _.width -= x.value[0] * 2, _.height -= x.value[1] * 2;
3480
- const { preferredAnchor: M, preferredOrigin: P } = Hr(() => {
3481
- const N = `${e.position} ${e.align}`, L = Zn(N, !1), B = e.origin === "overlap" ? L : e.origin === "auto" ? Rt(L) : Zn(e.origin, !1);
3482
- return L.side === B.side && L.align === Ft(B).align ? {
3483
- preferredAnchor: Qn(L),
3484
- preferredOrigin: Qn(B)
3485
+ const { preferredAnchor: M, preferredOrigin: P } = El(() => {
3486
+ const N = `${e.position} ${e.align}`, L = ia(N, !1), B = e.origin === "overlap" ? L : e.origin === "auto" ? Kt(L) : ia(e.origin, !1);
3487
+ return L.side === B.side && L.align === Ht(B).align ? {
3488
+ preferredAnchor: la(L),
3489
+ preferredOrigin: la(B)
3485
3490
  } : {
3486
3491
  preferredAnchor: L,
3487
3492
  preferredOrigin: B
@@ -3492,7 +3497,7 @@ function Vl(e, t, n, a) {
3492
3497
  origin: P.value
3493
3498
  };
3494
3499
  function A(N) {
3495
- const L = new ct(w), B = ua(N.anchor, g), H = ua(N.origin, L);
3500
+ const L = new ft(w), B = ua(N.anchor, g), H = ua(N.origin, L);
3496
3501
  let { x: q, y: ie } = Nl(B, H);
3497
3502
  switch (N.anchor.side) {
3498
3503
  case "top":
@@ -3522,7 +3527,7 @@ function Vl(e, t, n, a) {
3522
3527
  q += y.value[1];
3523
3528
  break;
3524
3529
  }
3525
- return L.x += q, L.y += ie, L.width = Math.min(L.width, u.value), L.height = Math.min(L.height, h.value), { overflows: Xn(L, _), x: q, y: ie };
3530
+ return L.x += q, L.y += ie, L.width = Math.min(L.width, u.value), L.height = Math.min(L.height, h.value), { overflows: aa(L, _), x: q, y: ie };
3526
3531
  }
3527
3532
  let T = 0, D = 0;
3528
3533
  const Y = { x: 0, y: 0 }, E = { x: !1, y: !1 };
@@ -3531,14 +3536,14 @@ function Vl(e, t, n, a) {
3531
3536
  const { x: N, y: L, overflows: B } = A(O);
3532
3537
  T += N, D += L, w.x += N, w.y += L;
3533
3538
  {
3534
- const H = ea(O.anchor), q = B.x.before || B.x.after, ie = B.y.before || B.y.after;
3539
+ const H = oa(O.anchor), q = B.x.before || B.x.after, ie = B.y.before || B.y.after;
3535
3540
  let le = !1;
3536
3541
  if (["x", "y"].forEach((ae) => {
3537
3542
  if (ae === "x" && q && !E.x || ae === "y" && ie && !E.y) {
3538
3543
  const J = {
3539
3544
  anchor: { ...O.anchor },
3540
3545
  origin: { ...O.origin }
3541
- }, ke = ae === "x" ? H === "y" ? Ft : Rt : H === "y" ? Rt : Ft;
3546
+ }, ke = ae === "x" ? H === "y" ? Ht : Kt : H === "y" ? Kt : Ht;
3542
3547
  J.anchor = ke(J.anchor), J.origin = ke(J.origin);
3543
3548
  const { overflows: Ye } = A(J);
3544
3549
  (Ye[ae].before <= B[ae].before && Ye[ae].after <= B[ae].after || Ye[ae].before + Ye[ae].after < (B[ae].before + B[ae].after) / 2) && (O = J, le = E[ae] = !0);
@@ -3547,23 +3552,23 @@ function Vl(e, t, n, a) {
3547
3552
  }
3548
3553
  B.x.before && (T += B.x.before, w.x += B.x.before), B.x.after && (T -= B.x.after, w.x -= B.x.after), B.y.before && (D += B.y.before, w.y += B.y.before), B.y.after && (D -= B.y.after, w.y -= B.y.after);
3549
3554
  {
3550
- const H = Xn(w, _);
3555
+ const H = aa(w, _);
3551
3556
  Y.x = _.width - H.x.before - H.x.after, Y.y = _.height - H.y.before - H.y.after, T += H.x.before, w.x += H.x.before, D += H.y.before, w.y += H.y.before;
3552
3557
  }
3553
3558
  break;
3554
3559
  }
3555
- const j = ea(O.anchor);
3560
+ const j = oa(O.anchor);
3556
3561
  return Object.assign(a.value, {
3557
3562
  "--y-levitation-anchor-origin": `${O.anchor.side} ${O.anchor.align}`,
3558
3563
  transformOrigin: `${O.origin.side} ${O.origin.align}`,
3559
- top: z(Lt(D)),
3560
- left: o.value ? void 0 : z(Lt(T)),
3561
- right: o.value ? z(Lt(-T)) : void 0,
3564
+ top: z(Rt(D)),
3565
+ left: o.value ? void 0 : z(Rt(T)),
3566
+ right: o.value ? z(Rt(-T)) : void 0,
3562
3567
  minWidth: z(
3563
3568
  j === "y" ? Math.min(c.value, g.width) : c.value
3564
3569
  ),
3565
3570
  maxWidth: z(
3566
- Gn(
3571
+ Qn(
3567
3572
  Ve(
3568
3573
  Y.x,
3569
3574
  c.value === 1 / 0 ? 0 : c.value,
@@ -3572,7 +3577,7 @@ function Vl(e, t, n, a) {
3572
3577
  )
3573
3578
  ),
3574
3579
  maxHeight: z(
3575
- Gn(
3580
+ Qn(
3576
3581
  Ve(
3577
3582
  Y.y,
3578
3583
  s.value === 1 / 0 ? 0 : s.value,
@@ -3754,7 +3759,7 @@ function zl(e, t, n) {
3754
3759
  function Xa(e, t, n) {
3755
3760
  if (!e || Za(e, n) === !1)
3756
3761
  return !1;
3757
- const a = kn(t);
3762
+ const a = Dn(t);
3758
3763
  if (typeof ShadowRoot < "u" && a instanceof ShadowRoot && a.host === e.target)
3759
3764
  return !1;
3760
3765
  const i = (typeof n.value == "object" && n.value.include || (() => []))();
@@ -3765,7 +3770,7 @@ function Za(e, t) {
3765
3770
  return a && (a == null ? void 0 : a(e));
3766
3771
  }
3767
3772
  function sa(e, t) {
3768
- const n = kn(e);
3773
+ const n = Dn(e);
3769
3774
  t(document), typeof ShadowRoot < "u" && n instanceof ShadowRoot && t(n);
3770
3775
  }
3771
3776
  const Ul = {
@@ -3872,7 +3877,7 @@ function Jl(e, t) {
3872
3877
  })
3873
3878
  };
3874
3879
  }
3875
- const Ql = new Kr(), ht = {
3880
+ const Ql = new Tl(), ht = {
3876
3881
  none: null,
3877
3882
  close: no,
3878
3883
  block: ao,
@@ -3909,16 +3914,16 @@ function ao(e, t) {
3909
3914
  var l;
3910
3915
  const n = (l = e.root.value) == null ? void 0 : l.offsetParent, a = [
3911
3916
  .../* @__PURE__ */ new Set([
3912
- ...wt(
3917
+ ...St(
3913
3918
  e.baseEl.value,
3914
3919
  t.contained ? n : void 0
3915
3920
  ),
3916
- ...wt(
3921
+ ...St(
3917
3922
  e.contentEl.value,
3918
3923
  t.contained ? n : void 0
3919
3924
  )
3920
3925
  ])
3921
- ].filter((o) => !o.classList.contains(da)), i = window.innerWidth - document.documentElement.offsetWidth, r = ((o) => _n(o) && o)(
3926
+ ].filter((o) => !o.classList.contains(da)), i = window.innerWidth - document.documentElement.offsetWidth, r = ((o) => Tn(o) && o)(
3922
3927
  n || document.documentElement
3923
3928
  );
3924
3929
  r && e.root.value.classList.add(zt), a.forEach((o, c) => {
@@ -3963,7 +3968,7 @@ function io(e, t, n) {
3963
3968
  });
3964
3969
  }
3965
3970
  function Ja(e, t) {
3966
- const n = [document, ...wt(e)];
3971
+ const n = [document, ...St(e)];
3967
3972
  n.forEach((a) => {
3968
3973
  a.addEventListener("scroll", t, { passive: !0 });
3969
3974
  }), Ce(() => {
@@ -4035,7 +4040,7 @@ const Xe = F({
4035
4040
  name: "YLayer",
4036
4041
  inheritAttrs: !1,
4037
4042
  components: {
4038
- PolyTransition: ln
4043
+ PolyTransition: rn
4039
4044
  },
4040
4045
  directives: {
4041
4046
  ComplementClick: Ul
@@ -4077,12 +4082,12 @@ const Xe = F({
4077
4082
  getActiveLayers: g
4078
4083
  } = Hl(e), {
4079
4084
  polyTransitionBindProps: w
4080
- } = El(e), {
4085
+ } = kl(e), {
4081
4086
  dimensionStyles: m
4082
4087
  } = Kl(e), {
4083
4088
  lazyValue: _,
4084
4089
  onAfterUpdate: M
4085
- } = Al(oe(e, "eager"), u), P = re(!1), O = I(!1);
4090
+ } = Sl(oe(e, "eager"), u), P = re(!1), O = I(!1);
4086
4091
  I(!1);
4087
4092
  const A = oe(e, "disabled");
4088
4093
  oe(e, "maximized");
@@ -4193,7 +4198,7 @@ const Xe = F({
4193
4198
  onClick: B,
4194
4199
  ref: "scrim$"
4195
4200
  }, null)]
4196
- }), d(ln, W({
4201
+ }), d(rn, W({
4197
4202
  onAfterEnter: N,
4198
4203
  onAfterLeave: L,
4199
4204
  appear: !0
@@ -4965,7 +4970,7 @@ const He = /* @__PURE__ */ V({
4965
4970
  start: u,
4966
4971
  stop: h,
4967
4972
  reset: y
4968
- } = Dl(s, r);
4973
+ } = xl(s, r);
4969
4974
  function x() {
4970
4975
  e.duration > 0 && u();
4971
4976
  }
@@ -5567,7 +5572,7 @@ const xe = /* @__PURE__ */ V({
5567
5572
  }), wi = {
5568
5573
  expand: rt,
5569
5574
  dropdown: nu,
5570
- clear: Dn,
5575
+ clear: kn,
5571
5576
  checkbox: xe,
5572
5577
  pageControl: pe,
5573
5578
  next: {
@@ -5889,6 +5894,10 @@ const pa = Bn(), ru = /* @__PURE__ */ pn({
5889
5894
  },
5890
5895
  multipleActive: Boolean,
5891
5896
  activeStrategy: {
5897
+ /**
5898
+ * cascade: only descendent leaves
5899
+ * relative: cascade after check parent (ancestor)
5900
+ */
5892
5901
  type: String,
5893
5902
  default: "independent"
5894
5903
  },
@@ -5916,7 +5925,7 @@ const pa = Bn(), ru = /* @__PURE__ */ pn({
5916
5925
  emit: n,
5917
5926
  expose: a
5918
5927
  }) {
5919
- const i = re(Cn(_, e.searchDebounceWait)), r = I([]), {
5928
+ const i = re(An(_, e.searchDebounceWait)), r = I([]), {
5920
5929
  nodes: l,
5921
5930
  expanded: o,
5922
5931
  active: c,
@@ -6029,7 +6038,7 @@ const pa = Bn(), ru = /* @__PURE__ */ pn({
6029
6038
  class: D.value,
6030
6039
  style: Y.value,
6031
6040
  role: "tree"
6032
- }, [x.value && d(Wa, {
6041
+ }, [x.value && d(Ha, {
6033
6042
  indeterminate: !0
6034
6043
  }, null), T.value.length > 0 ? T.value.slice().map((E) => d(Si, W({
6035
6044
  key: Z(E, e.itemKey)
@@ -6143,7 +6152,7 @@ const pa = Bn(), ru = /* @__PURE__ */ pn({
6143
6152
  }
6144
6153
  });
6145
6154
  function lu() {
6146
- const e = I(), t = I(), n = re(), a = re(), i = re(), r = Cn(o, 100), { resizeObservedRef: l } = Pe((c) => {
6155
+ const e = I(), t = I(), n = re(), a = re(), i = re(), r = An(o, 100), { resizeObservedRef: l } = Pe((c) => {
6147
6156
  r(c);
6148
6157
  });
6149
6158
  function o(c) {
@@ -7046,7 +7055,7 @@ const Pi = F({
7046
7055
  components: {
7047
7056
  YButton: Q,
7048
7057
  YIconExpand: rt,
7049
- YFieldInput: St,
7058
+ YFieldInput: pt,
7050
7059
  YIconPageControl: pe
7051
7060
  },
7052
7061
  props: Pi(),
@@ -7568,7 +7577,7 @@ const jn = F({
7568
7577
  } = Ti(e, {
7569
7578
  allItems: u,
7570
7579
  pageItems: u
7571
- }), w = I(), m = Cn(M, 100), {
7580
+ }), w = I(), m = An(M, 100), {
7572
7581
  resizeObservedRef: _
7573
7582
  } = Pe((O) => {
7574
7583
  m(O);
@@ -7732,7 +7741,7 @@ const Kn = {
7732
7741
  if (l.value) {
7733
7742
  s.value.length === 0 && (l.value = !1);
7734
7743
  const M = (m = u == null ? void 0 : u.$el.value) == null ? void 0 : m.content$, P = (_ = u == null ? void 0 : u.$el.value) == null ? void 0 : _.modal;
7735
- !(M && !Lr(w, M)) && !P && !e.preventCloseBubble && (u == null || u.clear());
7744
+ !(M && !_l(w, M)) && !P && !e.preventCloseBubble && (u == null || u.clear());
7736
7745
  }
7737
7746
  }
7738
7747
  }
@@ -8346,7 +8355,7 @@ const Xi = F({
8346
8355
  default: 200
8347
8356
  },
8348
8357
  ...Xi(),
8349
- ...Tn(),
8358
+ ..._n(),
8350
8359
  ...Oe(En({
8351
8360
  position: "bottom"
8352
8361
  }), ["coordinateStrategy"])
@@ -8455,7 +8464,7 @@ const Xi = F({
8455
8464
  if (E) {
8456
8465
  const N = E == null ? void 0 : E.querySelector(".y-list-item--active"), L = (j = ($ = l.value) == null ? void 0 : $.layer$) == null ? void 0 : j.content$;
8457
8466
  if (N && L) {
8458
- const B = jr(N);
8467
+ const B = Dl(N);
8459
8468
  B && (L.contains(B) || L.isSameNode(B)) && B.scrollTo({
8460
8469
  top: N.offsetTop,
8461
8470
  behavior: "smooth"
@@ -8464,8 +8473,8 @@ const Xi = F({
8464
8473
  }
8465
8474
  }
8466
8475
  return K(() => {
8467
- const E = te(e, St.props), $ = te(typeof e.dropdownIcon == "object" ? e.dropdownIcon : {}, Ie.props);
8468
- return d(St, W({
8476
+ const E = te(e, pt.props), $ = te(typeof e.dropdownIcon == "object" ? e.dropdownIcon : {}, Ie.props);
8477
+ return d(pt, W({
8469
8478
  ref: r
8470
8479
  }, E, {
8471
8480
  modelValue: v.value.map((j) => j.props.value).join(", "),
@@ -9244,7 +9253,7 @@ const lr = F({
9244
9253
  var c, s;
9245
9254
  return [d("div", {
9246
9255
  class: "y-badge__base"
9247
- }, [(c = t.default) == null ? void 0 : c.call(t), d(ln, {
9256
+ }, [(c = t.default) == null ? void 0 : c.call(t), d(rn, {
9248
9257
  is: e.transition,
9249
9258
  transitionProps: {
9250
9259
  name: e.transition
@@ -9529,7 +9538,7 @@ const lr = F({
9529
9538
  const a = G(e, "modelValue"), {
9530
9539
  startOpenDelay: i,
9531
9540
  startCloseDelay: r
9532
- } = Tl(e, (o) => {
9541
+ } = Cl(e, (o) => {
9533
9542
  !e.disabled && (a.value = o);
9534
9543
  }), l = I();
9535
9544
  R(a, (o) => {
@@ -9611,12 +9620,12 @@ const lr = F({
9611
9620
  YDropdown: Du,
9612
9621
  YExpandHTransition: Jo,
9613
9622
  YExpandVTransition: gi,
9614
- YFieldInput: St,
9615
- YForm: yl,
9623
+ YFieldInput: pt,
9624
+ YForm: ll,
9616
9625
  YHover: zu,
9617
9626
  YIcon: Ie,
9618
9627
  YIconCheckbox: xe,
9619
- YIconClear: Dn,
9628
+ YIconClear: kn,
9620
9629
  YIconExpand: rt,
9621
9630
  YIconPageControl: pe,
9622
9631
  YIconSort: Yn,
@@ -9630,18 +9639,18 @@ const lr = F({
9630
9639
  YMenuPropOptions: Kn,
9631
9640
  YMonthPicker: ir,
9632
9641
  YPagination: Ii,
9633
- YProgressBar: Wa,
9642
+ YProgressBar: Ha,
9634
9643
  YProgressRing: Ol,
9635
9644
  YSelect: Iu,
9636
9645
  YSnackbar: qo,
9637
- YSpinnerRing: Na,
9646
+ YSpinnerRing: $a,
9638
9647
  YSwitch: Pl,
9639
9648
  YTab: Qi,
9640
9649
  YTable: Re,
9641
9650
  YTabs: Yu,
9642
9651
  YTextEllipsis: Hu,
9643
9652
  YTextHighlighter: pi,
9644
- YTextarea: fl,
9653
+ YTextarea: il,
9645
9654
  YTi: Uu,
9646
9655
  YTooltip: Zo,
9647
9656
  YTreeView: ru,
@@ -9662,7 +9671,7 @@ const lr = F({
9662
9671
  pressYDialogPropsOptions: ei,
9663
9672
  pressYDividerPropsOptions: nr,
9664
9673
  pressYDropdownPropsOptions: Ui,
9665
- pressYFieldInputPropsOptions: Tn,
9674
+ pressYFieldInputPropsOptions: _n,
9666
9675
  pressYHoverPropsOptions: or,
9667
9676
  pressYIconPropsOptions: zi,
9668
9677
  pressYInputPropsOptions: lt,
@@ -9677,14 +9686,14 @@ const lr = F({
9677
9686
  pressYTabPropsOptions: Ji,
9678
9687
  pressYTableProps: Nn,
9679
9688
  pressYTabsPropOptions: er,
9680
- pressYTextareaPropsOptions: La,
9689
+ pressYTextareaPropsOptions: Va,
9681
9690
  pressYTooltipPropsOptions: mi,
9682
9691
  pressYTreeViewNodeProps: Bn
9683
9692
  }, Symbol.toStringTag, { value: "Module" })), Gu = ",--. ,--.,--.,--.,--. ,--.,---. ,---. ,--,--, \n \\ ' / | || | \\ ' /| .-. :| .-. || \\ \n \\ ' ' '' ' \\ ' \\ --.' '-' '| || | \n.-' / `----' .-' / `----' `---' `--''--' \n`---' `---' ", Xu = {
9684
9693
  credit: !0
9685
9694
  };
9686
9695
  function tc(e = Xu) {
9687
- const t = kr(e == null ? void 0 : e.defaults), n = ll(e == null ? void 0 : e.theme), a = Sl(e == null ? void 0 : e.i18n), i = kl(e == null ? void 0 : e.date, a.localeModule), r = Cu(e == null ? void 0 : e.icon), l = (e == null ? void 0 : e.components) ?? qu;
9696
+ const t = kr(e == null ? void 0 : e.defaults), n = Zr(e == null ? void 0 : e.theme), a = vl(e == null ? void 0 : e.i18n), i = wl(e == null ? void 0 : e.date, a.localeModule), r = Cu(e == null ? void 0 : e.icon), l = (e == null ? void 0 : e.components) ?? qu;
9688
9697
  return {
9689
9698
  install: (c) => {
9690
9699
  n.install(c);
@@ -9703,10 +9712,10 @@ function tc(e = Xu) {
9703
9712
  Object.keys(l).forEach((y) => {
9704
9713
  const x = l[y];
9705
9714
  typeof x == "object" && "name" in x && c.component(y, x);
9706
- }), c.directive("plate-wave", Pa), c.provide(bt, t), c.provide(pt, n.instance), c.provide(Wi, r), c.provide(Fa, {
9715
+ }), c.directive("plate-wave", Pa), c.provide(bt, t), c.provide(wt, n.instance), c.provide(Wi, r), c.provide(Ra, {
9707
9716
  ...a.localeModule,
9708
9717
  ...a.rtlModule
9709
- }), c.provide(Ka, i.options), c.provide(Cl, i.instance), c.config.globalProperties.$yuyeon = s, ye(() => {
9718
+ }), c.provide(ja, i.options), c.provide(bl, i.instance), c.config.globalProperties.$yuyeon = s, ye(() => {
9710
9719
  s.root = c._container, s.app = c._instance, s.root && (s.root.classList.add("y-root"), s.root.setAttribute("data-y-root", ""), n.init(s));
9711
9720
  }), e != null && e.credit && console.log(Gu);
9712
9721
  const { unmount: u, mount: h } = c;