@tamagui/collection 2.0.0-rc.4 → 2.0.0-rc.40

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.
@@ -2,114 +2,125 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: true
30
+ }) : target, mod));
31
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: true
33
+ }), mod);
32
34
  var Collection_exports = {};
33
35
  __export(Collection_exports, {
34
36
  createCollection: () => createCollection
35
37
  });
36
38
  module.exports = __toCommonJS(Collection_exports);
37
- var import_compose_refs = require("@tamagui/compose-refs"),
38
- import_constants = require("@tamagui/constants"),
39
- import_core = require("@tamagui/core"),
40
- import_react = __toESM(require("react"), 1),
41
- import_jsx_runtime = require("react/jsx-runtime");
39
+ var import_compose_refs = require("@tamagui/compose-refs");
40
+ var import_constants = require("@tamagui/constants");
41
+ var import_core = require("@tamagui/core");
42
+ var import_react = __toESM(require("react"), 1);
43
+ var import_jsx_runtime = require("react/jsx-runtime");
42
44
  function createCollection(name) {
43
45
  const {
44
- Provider: CollectionProviderImpl,
45
- useStyledContext: useCollectionContext
46
- } = (0, import_core.createStyledContext)({
47
- collectionRef: {
48
- current: void 0
49
- },
50
- itemMap: /* @__PURE__ */new Map()
51
- }, "Toast"),
52
- CollectionProvider = props => {
53
- const {
54
- scope,
55
- children
56
- } = props,
57
- ref = import_react.default.useRef(void 0),
58
- itemMap = import_react.default.useRef(/* @__PURE__ */new Map()).current;
59
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(CollectionProviderImpl, {
60
- scope,
61
- itemMap,
62
- collectionRef: ref,
63
- children
64
- });
65
- };
46
+ Provider: CollectionProviderImpl,
47
+ useStyledContext: useCollectionContext
48
+ } = (0, import_core.createStyledContext)({
49
+ collectionRef: {
50
+ current: void 0
51
+ },
52
+ itemMap: /* @__PURE__ */new Map()
53
+ }, "Toast");
54
+ const CollectionProvider = props => {
55
+ const {
56
+ scope,
57
+ children
58
+ } = props;
59
+ const ref = import_react.default.useRef(void 0);
60
+ const itemMap = import_react.default.useRef(/* @__PURE__ */new Map()).current;
61
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(CollectionProviderImpl, {
62
+ scope,
63
+ itemMap,
64
+ collectionRef: ref,
65
+ children
66
+ });
67
+ };
66
68
  CollectionProvider.displayName = "CollectionProvider";
67
- const COLLECTION_SLOT_NAME = name + "CollectionSlot",
68
- CollectionSlot = import_react.default.forwardRef((props, forwardedRef) => {
69
- const {
70
- scope,
71
- children
72
- } = props,
73
- context = useCollectionContext(scope),
74
- composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
75
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
76
- ref: composedRefs,
77
- children
78
- });
69
+ const COLLECTION_SLOT_NAME = name + "CollectionSlot";
70
+ const CollectionSlot = import_react.default.forwardRef((props, forwardedRef) => {
71
+ const {
72
+ scope,
73
+ children
74
+ } = props;
75
+ const context = useCollectionContext(scope);
76
+ const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
77
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
78
+ ref: composedRefs,
79
+ children
79
80
  });
81
+ });
80
82
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
81
- const ITEM_SLOT_NAME = name + "CollectionItemSlot",
82
- ITEM_DATA_ATTR = "data-collection-item",
83
- CollectionItemSlot = import_react.default.forwardRef((props, forwardedRef) => {
84
- const {
85
- scope,
86
- children,
87
- ...itemData
88
- } = props,
89
- ref = import_react.default.useRef(void 0),
90
- composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref),
91
- context = useCollectionContext(scope);
92
- return import_react.default.useEffect(() => (context.itemMap.set(ref, {
83
+ const ITEM_SLOT_NAME = name + "CollectionItemSlot";
84
+ const ITEM_DATA_ATTR = "data-collection-item";
85
+ const CollectionItemSlot = import_react.default.forwardRef((props, forwardedRef) => {
86
+ const {
87
+ scope,
88
+ children,
89
+ ...itemData
90
+ } = props;
91
+ const ref = import_react.default.useRef(void 0);
92
+ const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
93
+ const context = useCollectionContext(scope);
94
+ import_react.default.useEffect(() => {
95
+ context.itemMap.set(ref, {
93
96
  ref,
94
97
  ...itemData
95
- }), () => {
96
- context.itemMap.delete(ref);
97
- })), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
98
- [ITEM_DATA_ATTR]: "",
99
- ref: composedRefs,
100
- children
101
98
  });
99
+ return () => void context.itemMap.delete(ref);
100
+ });
101
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
102
+ ...{
103
+ [ITEM_DATA_ATTR]: ""
104
+ },
105
+ ref: composedRefs,
106
+ children
102
107
  });
108
+ });
103
109
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
104
110
  function useCollection(scope) {
105
111
  const context = useCollectionContext(scope);
106
- return import_react.default.useCallback(() => {
107
- if (!import_constants.isWeb) return [];
112
+ const getItems = import_react.default.useCallback(() => {
113
+ if (!import_constants.isWeb) {
114
+ return [];
115
+ }
108
116
  const collectionNode = context.collectionRef.current;
109
117
  if (!collectionNode) return [];
110
118
  const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
111
- return Array.from(context.itemMap.values()).sort((a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current));
119
+ const items = Array.from(context.itemMap.values());
120
+ const orderedItems = items.sort((a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current));
121
+ return orderedItems;
112
122
  }, [context.collectionRef, context.itemMap]);
123
+ return getItems;
113
124
  }
114
125
  return [{
115
126
  Provider: CollectionProvider,
@@ -4,120 +4,126 @@ var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
18
  get: () => from[key],
18
19
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
20
  });
20
- return to;
21
- };
21
+ }
22
+ return to;
23
+ };
22
24
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
34
36
  var Collection_exports = {};
35
37
  __export(Collection_exports, {
36
38
  createCollection: () => createCollection
37
39
  });
38
40
  module.exports = __toCommonJS(Collection_exports);
39
- var import_jsx_runtime = require("react/jsx-runtime"),
40
- import_compose_refs = require("@tamagui/compose-refs"),
41
- import_constants = require("@tamagui/constants"),
42
- import_core = require("@tamagui/core"),
43
- import_react = __toESM(require("react"), 1);
41
+ var import_jsx_runtime = require("react/jsx-runtime");
42
+ var import_compose_refs = require("@tamagui/compose-refs");
43
+ var import_constants = require("@tamagui/constants");
44
+ var import_core = require("@tamagui/core");
45
+ var import_react = __toESM(require("react"), 1);
44
46
  function createCollection(name) {
45
47
  var {
46
- Provider: CollectionProviderImpl,
47
- useStyledContext: useCollectionContext
48
- } = (0, import_core.createStyledContext)({
49
- collectionRef: {
50
- current: void 0
51
- },
52
- itemMap: /* @__PURE__ */new Map()
53
- }, "Toast"),
54
- CollectionProvider = function (props) {
55
- var {
56
- scope,
57
- children
58
- } = props,
59
- ref = import_react.default.useRef(void 0),
60
- itemMap = import_react.default.useRef(/* @__PURE__ */new Map()).current;
61
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(CollectionProviderImpl, {
62
- scope,
63
- itemMap,
64
- collectionRef: ref,
65
- children
66
- });
67
- };
48
+ Provider: CollectionProviderImpl,
49
+ useStyledContext: useCollectionContext
50
+ } = (0, import_core.createStyledContext)({
51
+ collectionRef: {
52
+ current: void 0
53
+ },
54
+ itemMap: /* @__PURE__ */new Map()
55
+ }, "Toast");
56
+ var CollectionProvider = function (props) {
57
+ var {
58
+ scope,
59
+ children
60
+ } = props;
61
+ var ref = import_react.default.useRef(void 0);
62
+ var itemMap = import_react.default.useRef(/* @__PURE__ */new Map()).current;
63
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(CollectionProviderImpl, {
64
+ scope,
65
+ itemMap,
66
+ collectionRef: ref,
67
+ children
68
+ });
69
+ };
68
70
  CollectionProvider.displayName = "CollectionProvider";
69
- var COLLECTION_SLOT_NAME = name + "CollectionSlot",
70
- CollectionSlot = /* @__PURE__ */import_react.default.forwardRef(function (props, forwardedRef) {
71
- var {
72
- scope,
73
- children
74
- } = props,
75
- context = useCollectionContext(scope),
76
- composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
77
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
78
- ref: composedRefs,
79
- children
80
- });
71
+ var COLLECTION_SLOT_NAME = name + "CollectionSlot";
72
+ var CollectionSlot = /* @__PURE__ */import_react.default.forwardRef(function (props, forwardedRef) {
73
+ var {
74
+ scope,
75
+ children
76
+ } = props;
77
+ var context = useCollectionContext(scope);
78
+ var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
79
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
80
+ ref: composedRefs,
81
+ children
81
82
  });
83
+ });
82
84
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
83
- var ITEM_SLOT_NAME = name + "CollectionItemSlot",
84
- ITEM_DATA_ATTR = "data-collection-item",
85
- CollectionItemSlot = /* @__PURE__ */import_react.default.forwardRef(function (props, forwardedRef) {
86
- var {
87
- scope,
88
- children,
89
- ...itemData
90
- } = props,
91
- ref = import_react.default.useRef(void 0),
92
- composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref),
93
- context = useCollectionContext(scope);
94
- return import_react.default.useEffect(function () {
95
- return context.itemMap.set(ref, {
96
- ref,
97
- ...itemData
98
- }), function () {
99
- context.itemMap.delete(ref);
100
- };
101
- }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
102
- [ITEM_DATA_ATTR]: "",
103
- ref: composedRefs,
104
- children
85
+ var ITEM_SLOT_NAME = name + "CollectionItemSlot";
86
+ var ITEM_DATA_ATTR = "data-collection-item";
87
+ var CollectionItemSlot = /* @__PURE__ */import_react.default.forwardRef(function (props, forwardedRef) {
88
+ var {
89
+ scope,
90
+ children,
91
+ ...itemData
92
+ } = props;
93
+ var ref = import_react.default.useRef(void 0);
94
+ var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
95
+ var context = useCollectionContext(scope);
96
+ import_react.default.useEffect(function () {
97
+ context.itemMap.set(ref, {
98
+ ref,
99
+ ...itemData
105
100
  });
101
+ return function () {
102
+ return void context.itemMap.delete(ref);
103
+ };
106
104
  });
105
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slot, {
106
+ [ITEM_DATA_ATTR]: "",
107
+ ref: composedRefs,
108
+ children
109
+ });
110
+ });
107
111
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
108
112
  function useCollection(scope) {
109
- var context = useCollectionContext(scope),
110
- getItems = import_react.default.useCallback(function () {
111
- if (!import_constants.isWeb) return [];
112
- var collectionNode = context.collectionRef.current;
113
- if (!collectionNode) return [];
114
- var orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`)),
115
- items = Array.from(context.itemMap.values()),
116
- orderedItems = items.sort(function (a, b) {
117
- return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
118
- });
119
- return orderedItems;
120
- }, [context.collectionRef, context.itemMap]);
113
+ var context = useCollectionContext(scope);
114
+ var getItems = import_react.default.useCallback(function () {
115
+ if (!import_constants.isWeb) {
116
+ return [];
117
+ }
118
+ var collectionNode = context.collectionRef.current;
119
+ if (!collectionNode) return [];
120
+ var orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
121
+ var items = Array.from(context.itemMap.values());
122
+ var orderedItems = items.sort(function (a, b) {
123
+ return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
124
+ });
125
+ return orderedItems;
126
+ }, [context.collectionRef, context.itemMap]);
121
127
  return getItems;
122
128
  }
123
129
  return [{
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Collection_exports","__export","createCollection","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_core","import_react","__toESM","name","Provider","CollectionProviderImpl","useStyledContext","useCollectionContext","createStyledContext","collectionRef","current","itemMap","Map","CollectionProvider","props","scope","children","ref","default","useRef","jsx","displayName","COLLECTION_SLOT_NAME","CollectionSlot","forwardRef","forwardedRef","context","composedRefs","useComposedRefs","Slot","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlot","itemData","useEffect","set","delete","useCollection","getItems","useCallback","isWeb"],"sources":["../../src/Collection.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,kBAAA;AAAAC,QAAA,CAAAD,kBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAgC,CAAAK,kBAAA;AAehC,IAAAK,kBAAS,GAAAC,OAEP;EAAAC,mBAAA,GAAAD,OAAA;EAAAE,gBAAA,GAAAF,OAAA;EAAAG,WAAA,GAAAH,OAAA;EAAAI,YAAA,GAAAC,OAAA,CAAAL,OAAA;AAmBA,SAAMJ,gBAAYA,CAAAU,IAAA;EAChB,IACE;MAAAC,QAAA,EAAAC,sBAAA;MAAAC,gBAAA,EAAAC;IAAA,QAAAP,WAAA,CAAAQ,mBAAA;MAAAC,aACE;QACAC,OAAA,EAAS;MACX;MACAC,OAAA,qBAAAC,GAAA;IACF,GAEI;IAAAC,kBAID,YAAAA,CAAUC,KAAA;MACb;UAAMC,KAAE;UAAAC;QAAO,IAASF,KAAI;QAAAG,GACtB,GAAAhB,YAAM,CAAAiB,OAAA,CAAAC,MAAM,MAA0B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,GAAA;UACA,GAAKgB;QACL,gBAAM;UACJP,OAAA,CAAAf,OAAe,CAAAyB,MAAA,CAAAnB,GAAA;QACjB;MAOA,mBANyB,IAAArB,kBAAgB,CAAOwB,GACrB,EAAApB,WAAA,CAAA6B,IAAA;QAAA,CAAAE,cAEvB;QAEJd,GAAA,EAAAU,YAAA;QAEFX;MAGF;IAEA;EAAOgB,kBACO,CAAAX,WAAA,GAAAS,cAA0B;EAA6C,SACnFO,cAAAtB,KAAA;IACF,IAAAW,OAAA,GAAAnB,oBAAA,CAAAQ,KAAA;MAAAuB,QAAA,GAAArC,YAAA,CAAAiB,OAAA,CAAAqB,WAAA;QACF,KAAAxC,gBAAA,CAAAyC,KAAA,E","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Collection_exports","__export","createCollection","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_core","import_react","__toESM","name","Provider","CollectionProviderImpl","useStyledContext","useCollectionContext","createStyledContext","collectionRef","current","itemMap","Map","CollectionProvider","props","scope","children","ref","default","useRef","jsx","displayName","COLLECTION_SLOT_NAME","CollectionSlot","forwardRef","forwardedRef","context","composedRefs","useComposedRefs","Slot","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlot","itemData","useEffect","set","delete","useCollection","getItems","useCallback","isWeb","collectionNode"],"sources":["../../src/Collection.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,kBAAA;AAAAC,QAAA,CAAAD,kBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAgC,CAAAK,kBAAA;AAChC,IAAAK,kBAAA,GAAsBC,OAAA;AAEtB,IAAAC,mBAA0C,GAAAD,OAAA;AAC1C,I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uBAAiD;EACrE,IAAA4B,cAAa,yBAAqB;EAAU,IAC7CC,kBAAA,kBAAA/B,YAAA,CAAAiB,OAAA,CAAAM,UAAA,WAAAV,KAAA,EAAAW,YAAA;IAED;MAAAV,KACE;MAAAC,QAAA;MAAA,GAAAiB;IAAA,IAAAnB,KAAA;IAIH,IAAAG,GAAA,GAAAhB,YAAA,CAAAiB,OAAA,CAAAC,MAAA;IAED,IAAAQ,YAAA,GAAmB,IAAA7B,mBAAc,CAAA8B,eAAA,EAAAH,YAAA,EAAAR,GAAA;IAMjC,IAAAS,OAAS,GAAAnB,oBAA6B,CAAAQ,KAAA;IACpCd,YAAM,CAAAiB,OAAU,CAAAgB,SAAA,aAA0B;MAE1CR,OAAM,CAAAf,OAAW,CAAAwB,GAAA,CAAAlB,GAAA;QACfA,GAAK;QACH,GAAAgB;MACF;MAEA,OAAM;QACN,OAAK,KAAAP,OAAgB,CAAAf,OAAQ,CAAAyB,MAAA,CAAAnB,GAAA;MAC7B;IAA2B;IAC4B,OACvD,mBAAArB,kBAAA,CAAAwB,GAAA,EAAApB,WAAA,CAAA6B,IAAA;MACA,CAAAE,cAAc,KAAM;MACpBd,GAAA,EAAAU,YAAM;MAAqBX;IAG2B,EACtD;EACA;EAAOgB,kBACG,CAAAX,WAAe,GAAAS,cAAgB;EAE3C,SAAOO,cAAAtB,KAAA;IACT,IAAAW,OAAA,GAAAnB,oBAAA,CAAAQ,KAAA;IAEA,IAAAuB,QAAO,GAAArC,YAAA,CAAAiB,OAAA,CAAAqB,WAAA;MACH,KAAAxC,gBAAU,CAAAyC,KAAA;QACZ;MACF;MACF,IAAAC,cAAA,GAAAf,OAAA,CAAAjB,aAAA,CAAAC,OAAA","ignoreList":[]}
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
7
8
  get: () => from[key],
8
9
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
10
  });
10
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
15
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
- value: !0
16
+ value: true
15
17
  }), mod);
16
18
  var index_exports = {};
17
19
  module.exports = __toCommonJS(index_exports);
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
9
10
  get: () => from[key],
10
11
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
12
  });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
17
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
18
+ value: true
17
19
  }), mod);
18
20
  var index_exports = {};
19
21
  module.exports = __toCommonJS(index_exports);
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}