diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace-api.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace-api.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b4751a7f8f85e4f0eeb1f7e72b8f88ceef962086 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace-api.d.ts @@ -0,0 +1,4 @@ +import { TraceAPI } from './api/trace'; +/** Entrypoint for trace API */ +export declare const trace: TraceAPI; +//# sourceMappingURL=trace-api.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace-api.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace-api.js new file mode 100644 index 0000000000000000000000000000000000000000..c8bbe93a8510984d8f7a711abd30a4a58352534a --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace-api.js @@ -0,0 +1,24 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.trace = void 0; +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const trace_1 = require("./api/trace"); +/** Entrypoint for trace API */ +exports.trace = trace_1.TraceAPI.getInstance(); +//# sourceMappingURL=trace-api.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace-api.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace-api.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2475b595351ada44e107f3ff1e19d1ca36d674bf --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace-api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-api.js","sourceRoot":"","sources":["../../src/trace-api.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,sEAAsE;AACtE,qCAAqC;AACrC,uCAAuC;AACvC,+BAA+B;AAClB,QAAA,KAAK,GAAG,gBAAQ,CAAC,WAAW,EAAE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { TraceAPI } from './api/trace';\n/** Entrypoint for trace API */\nexport const trace = TraceAPI.getInstance();\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/context-utils.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/context-utils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5fa81260661541214016d1f766a80e9f6a6399ef --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/context-utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"context-utils.js","sourceRoot":"","sources":["../../../src/trace/context-utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gDAAsD;AAItD,yDAAsD;AACtD,4CAA4C;AAE5C;;GAEG;AACH,MAAM,QAAQ,GAAG,IAAA,0BAAgB,EAAC,gCAAgC,CAAC,CAAC;AAEpE;;;;GAIG;AACH,SAAgB,OAAO,CAAC,OAAgB;IACtC,OAAQ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU,IAAI,SAAS,CAAC;AAC3D,CAAC;AAFD,0BAEC;AAED;;GAEG;AACH,SAAgB,aAAa;IAC3B,OAAO,OAAO,CAAC,oBAAU,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;AACpD,CAAC;AAFD,sCAEC;AAED;;;;;GAKG;AACH,SAAgB,OAAO,CAAC,OAAgB,EAAE,IAAU;IAClD,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC1C,CAAC;AAFD,0BAEC;AAED;;;;GAIG;AACH,SAAgB,UAAU,CAAC,OAAgB;IACzC,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC;AAFD,gCAEC;AAED;;;;;;GAMG;AACH,SAAgB,cAAc,CAC5B,OAAgB,EAChB,WAAwB;IAExB,OAAO,OAAO,CAAC,OAAO,EAAE,IAAI,mCAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;AAC7D,CAAC;AALD,wCAKC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAC,OAAgB;;IAC7C,OAAO,MAAA,OAAO,CAAC,OAAO,CAAC,0CAAE,WAAW,EAAE,CAAC;AACzC,CAAC;AAFD,wCAEC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createContextKey } from '../context/context';\nimport { Context } from '../context/types';\nimport { Span } from './span';\nimport { SpanContext } from './span_context';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { ContextAPI } from '../api/context';\n\n/**\n * span key\n */\nconst SPAN_KEY = createContextKey('OpenTelemetry Context Key SPAN');\n\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nexport function getSpan(context: Context): Span | undefined {\n return (context.getValue(SPAN_KEY) as Span) || undefined;\n}\n\n/**\n * Gets the span from the current context, if one exists.\n */\nexport function getActiveSpan(): Span | undefined {\n return getSpan(ContextAPI.getInstance().active());\n}\n\n/**\n * Set the span on a context\n *\n * @param context context to use as parent\n * @param span span to set active\n */\nexport function setSpan(context: Context, span: Span): Context {\n return context.setValue(SPAN_KEY, span);\n}\n\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nexport function deleteSpan(context: Context): Context {\n return context.deleteValue(SPAN_KEY);\n}\n\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context context to set active span on\n * @param spanContext span context to be wrapped\n */\nexport function setSpanContext(\n context: Context,\n spanContext: SpanContext\n): Context {\n return setSpan(context, new NonRecordingSpan(spanContext));\n}\n\n/**\n * Get the span context of the span if it exists.\n *\n * @param context context to get values from\n */\nexport function getSpanContext(context: Context): SpanContext | undefined {\n return getSpan(context)?.spanContext();\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9ed5ecb7109b26804a3e494ae958dffabec32eff --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.d.ts @@ -0,0 +1,22 @@ +import { TraceState } from '../trace_state'; +/** + * TraceState must be a class and not a simple object type because of the spec + * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). + * + * Here is the list of allowed mutations: + * - New key-value pair should be added into the beginning of the list + * - The value of any key can be updated. Modified keys MUST be moved to the + * beginning of the list. + */ +export declare class TraceStateImpl implements TraceState { + private _internalState; + constructor(rawTraceState?: string); + set(key: string, value: string): TraceStateImpl; + unset(key: string): TraceStateImpl; + get(key: string): string | undefined; + serialize(): string; + private _parse; + private _keys; + private _clone; +} +//# sourceMappingURL=tracestate-impl.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js new file mode 100644 index 0000000000000000000000000000000000000000..93c0289c17e4728884899353455c25416b8f34f8 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js @@ -0,0 +1,103 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TraceStateImpl = void 0; +const tracestate_validators_1 = require("./tracestate-validators"); +const MAX_TRACE_STATE_ITEMS = 32; +const MAX_TRACE_STATE_LEN = 512; +const LIST_MEMBERS_SEPARATOR = ','; +const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; +/** + * TraceState must be a class and not a simple object type because of the spec + * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). + * + * Here is the list of allowed mutations: + * - New key-value pair should be added into the beginning of the list + * - The value of any key can be updated. Modified keys MUST be moved to the + * beginning of the list. + */ +class TraceStateImpl { + constructor(rawTraceState) { + this._internalState = new Map(); + if (rawTraceState) + this._parse(rawTraceState); + } + set(key, value) { + // TODO: Benchmark the different approaches(map vs list) and + // use the faster one. + const traceState = this._clone(); + if (traceState._internalState.has(key)) { + traceState._internalState.delete(key); + } + traceState._internalState.set(key, value); + return traceState; + } + unset(key) { + const traceState = this._clone(); + traceState._internalState.delete(key); + return traceState; + } + get(key) { + return this._internalState.get(key); + } + serialize() { + return this._keys() + .reduce((agg, key) => { + agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); + return agg; + }, []) + .join(LIST_MEMBERS_SEPARATOR); + } + _parse(rawTraceState) { + if (rawTraceState.length > MAX_TRACE_STATE_LEN) + return; + this._internalState = rawTraceState + .split(LIST_MEMBERS_SEPARATOR) + .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning + .reduce((agg, part) => { + const listMember = part.trim(); // Optional Whitespace (OWS) handling + const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); + if (i !== -1) { + const key = listMember.slice(0, i); + const value = listMember.slice(i + 1, part.length); + if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) { + agg.set(key, value); + } + else { + // TODO: Consider to add warning log + } + } + return agg; + }, new Map()); + // Because of the reverse() requirement, trunc must be done after map is created + if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { + this._internalState = new Map(Array.from(this._internalState.entries()) + .reverse() // Use reverse same as original tracestate parse chain + .slice(0, MAX_TRACE_STATE_ITEMS)); + } + } + _keys() { + return Array.from(this._internalState.keys()).reverse(); + } + _clone() { + const traceState = new TraceStateImpl(); + traceState._internalState = new Map(this._internalState); + return traceState; + } +} +exports.TraceStateImpl = TraceStateImpl; +//# sourceMappingURL=tracestate-impl.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js.map new file mode 100644 index 0000000000000000000000000000000000000000..83eacbe7aad6b9046a12911a1a086ff73483faca --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tracestate-impl.js","sourceRoot":"","sources":["../../../../src/trace/internal/tracestate-impl.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,mEAAqE;AAErE,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AACnC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAa,cAAc;IAGzB,YAAY,aAAsB;QAF1B,mBAAc,GAAwB,IAAI,GAAG,EAAE,CAAC;QAGtD,IAAI,aAAa;YAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAChD,CAAC;IAED,GAAG,CAAC,GAAW,EAAE,KAAa;QAC5B,4DAA4D;QAC5D,sBAAsB;QACtB,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACjC,IAAI,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACtC,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACvC;QACD,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC1C,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,GAAW;QACf,MAAM,UAA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E;oBAC5C,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;iBACrB;qBAAM;oBACL,oCAAoC;iBACrC;aACF;YACD,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QAEhB,gFAAgF;QAChF,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,GAAG,qBAAqB,EAAE;YACpD,IAAI,CAAC,cAAc,GAAG,IAAI,GAAG,CAC3B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;iBACtC,OAAO,EAAE,CAAC,sDAAsD;iBAChE,KAAK,CAAC,CAAC,EAAE,qBAAqB,CAAC,CACnC,CAAC;SACH;IACH,CAAC;IAEO,KAAK;QACX,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;IAC1D,CAAC;IAEO,MAAM;QACZ,MAAM,UAAU,GAAG,IAAI,cAAc,EAAE,CAAC;QACxC,UAAU,CAAC,cAAc,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACzD,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AA5ED,wCA4EC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TraceState } from '../trace_state';\nimport { validateKey, validateValue } from './tracestate-validators';\n\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nexport class TraceStateImpl implements TraceState {\n private _internalState: Map = new Map();\n\n constructor(rawTraceState?: string) {\n if (rawTraceState) this._parse(rawTraceState);\n }\n\n set(key: string, value: string): TraceStateImpl {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n\n unset(key: string): TraceStateImpl {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n\n get(key: string): string | undefined {\n return this._internalState.get(key);\n }\n\n serialize(): string {\n return this._keys()\n .reduce((agg: string[], key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n\n private _parse(rawTraceState: string) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN) return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg: Map, part: string) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if (validateKey(key) && validateValue(value)) {\n agg.set(key, value);\n } else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(\n Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS)\n );\n }\n }\n\n private _keys(): string[] {\n return Array.from(this._internalState.keys()).reverse();\n }\n\n private _clone(): TraceStateImpl {\n const traceState = new TraceStateImpl();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4917f99d1ed3ace2bd271cac29f2254d3be72083 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.d.ts @@ -0,0 +1,15 @@ +/** + * Key is opaque string up to 256 characters printable. It MUST begin with a + * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, + * underscores _, dashes -, asterisks *, and forward slashes /. + * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the + * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. + * see https://www.w3.org/TR/trace-context/#key + */ +export declare function validateKey(key: string): boolean; +/** + * Value is opaque string up to 256 characters printable ASCII RFC0020 + * characters (i.e., the range 0x20 to 0x7E) except comma , and =. + */ +export declare function validateValue(value: string): boolean; +//# sourceMappingURL=tracestate-validators.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js new file mode 100644 index 0000000000000000000000000000000000000000..3e370449b3f6d25cfaa3222def39903e0264f61e --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js @@ -0,0 +1,46 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.validateValue = exports.validateKey = void 0; +const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; +const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; +const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; +const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); +const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; +const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; +/** + * Key is opaque string up to 256 characters printable. It MUST begin with a + * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, + * underscores _, dashes -, asterisks *, and forward slashes /. + * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the + * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. + * see https://www.w3.org/TR/trace-context/#key + */ +function validateKey(key) { + return VALID_KEY_REGEX.test(key); +} +exports.validateKey = validateKey; +/** + * Value is opaque string up to 256 characters printable ASCII RFC0020 + * characters (i.e., the range 0x20 to 0x7E) except comma , and =. + */ +function validateValue(value) { + return (VALID_VALUE_BASE_REGEX.test(value) && + !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); +} +exports.validateValue = validateValue; +//# sourceMappingURL=tracestate-validators.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js.map new file mode 100644 index 0000000000000000000000000000000000000000..498abce38de63f296de2813fc0dbf2dd8f506373 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tracestate-validators.js","sourceRoot":"","sources":["../../../../src/trace/internal/tracestate-validators.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAC5C,MAAM,SAAS,GAAG,QAAQ,oBAAoB,SAAS,CAAC;AACxD,MAAM,gBAAgB,GAAG,WAAW,oBAAoB,gBAAgB,oBAAoB,QAAQ,CAAC;AACrG,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,OAAO,SAAS,IAAI,gBAAgB,IAAI,CAAC,CAAC;AAC7E,MAAM,sBAAsB,GAAG,qBAAqB,CAAC;AACrD,MAAM,+BAA+B,GAAG,KAAK,CAAC;AAE9C;;;;;;;GAOG;AACH,SAAgB,WAAW,CAAC,GAAW;IACrC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC;AAFD,kCAEC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAAC,KAAa;IACzC,OAAO,CACL,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC;QAClC,CAAC,+BAA+B,CAAC,IAAI,CAAC,KAAK,CAAC,CAC7C,CAAC;AACJ,CAAC;AALD,sCAKC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nexport function validateKey(key: string): boolean {\n return VALID_KEY_REGEX.test(key);\n}\n\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nexport function validateValue(value: string): boolean {\n return (\n VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)\n );\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/utils.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/utils.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3b51fe45b952b3202534ad770260c38b0fecb73 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/utils.d.ts @@ -0,0 +1,3 @@ +import { TraceState } from '../trace_state'; +export declare function createTraceState(rawTraceState?: string): TraceState; +//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..3d954190beb5f0b7d64aae8dd90a1dcbb0f23a2f --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js @@ -0,0 +1,24 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createTraceState = void 0; +const tracestate_impl_1 = require("./tracestate-impl"); +function createTraceState(rawTraceState) { + return new tracestate_impl_1.TraceStateImpl(rawTraceState); +} +exports.createTraceState = createTraceState; +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..19cd87cbc8b681563b0d7346202e2c1ee28dd96f --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/trace/internal/utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,uDAAmD;AAEnD,SAAgB,gBAAgB,CAAC,aAAsB;IACrD,OAAO,IAAI,gCAAc,CAAC,aAAa,CAAC,CAAC;AAC3C,CAAC;AAFD,4CAEC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TraceState } from '../trace_state';\nimport { TraceStateImpl } from './tracestate-impl';\n\nexport function createTraceState(rawTraceState?: string): TraceState {\n return new TraceStateImpl(rawTraceState);\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e32dab9d602b9b338f51809ce472af12fd5a06ba --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.d.ts @@ -0,0 +1,5 @@ +import { SpanContext } from './span_context'; +export declare const INVALID_SPANID = "0000000000000000"; +export declare const INVALID_TRACEID = "00000000000000000000000000000000"; +export declare const INVALID_SPAN_CONTEXT: SpanContext; +//# sourceMappingURL=invalid-span-constants.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js new file mode 100644 index 0000000000000000000000000000000000000000..77fb79e97dbbd1e0b80d5082b35da1f45809f3bd --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js @@ -0,0 +1,27 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0; +const trace_flags_1 = require("./trace_flags"); +exports.INVALID_SPANID = '0000000000000000'; +exports.INVALID_TRACEID = '00000000000000000000000000000000'; +exports.INVALID_SPAN_CONTEXT = { + traceId: exports.INVALID_TRACEID, + spanId: exports.INVALID_SPANID, + traceFlags: trace_flags_1.TraceFlags.NONE, +}; +//# sourceMappingURL=invalid-span-constants.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js.map new file mode 100644 index 0000000000000000000000000000000000000000..54da53745eb5516c5f9ea43afed3ff94268b9cd8 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js.map @@ -0,0 +1 @@ +{"version":3,"file":"invalid-span-constants.js","sourceRoot":"","sources":["../../../src/trace/invalid-span-constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,+CAA2C;AAE9B,QAAA,cAAc,GAAG,kBAAkB,CAAC;AACpC,QAAA,eAAe,GAAG,kCAAkC,CAAC;AACrD,QAAA,oBAAoB,GAAgB;IAC/C,OAAO,EAAE,uBAAe;IACxB,MAAM,EAAE,sBAAc;IACtB,UAAU,EAAE,wBAAU,CAAC,IAAI;CAC5B,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SpanContext } from './span_context';\nimport { TraceFlags } from './trace_flags';\n\nexport const INVALID_SPANID = '0000000000000000';\nexport const INVALID_TRACEID = '00000000000000000000000000000000';\nexport const INVALID_SPAN_CONTEXT: SpanContext = {\n traceId: INVALID_TRACEID,\n spanId: INVALID_SPANID,\n traceFlags: TraceFlags.NONE,\n};\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/link.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/link.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8fc0106276c270850495706c6bc99e025b2894c2 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/link.d.ts @@ -0,0 +1,26 @@ +import { SpanAttributes } from './attributes'; +import { SpanContext } from './span_context'; +/** + * A pointer from the current {@link Span} to another span in the same trace or + * in a different trace. + * Few examples of Link usage. + * 1. Batch Processing: A batch of elements may contain elements associated + * with one or more traces/spans. Since there can only be one parent + * SpanContext, Link is used to keep reference to SpanContext of all + * elements in the batch. + * 2. Public Endpoint: A SpanContext in incoming client request on a public + * endpoint is untrusted from service provider perspective. In such case it + * is advisable to start a new trace with appropriate sampling decision. + * However, it is desirable to associate incoming SpanContext to new trace + * initiated on service provider side so two traces (from Client and from + * Service Provider) can be correlated. + */ +export interface Link { + /** The {@link SpanContext} of a linked span. */ + context: SpanContext; + /** A set of {@link SpanAttributes} on the link. */ + attributes?: SpanAttributes; + /** Count of attributes of the link that were dropped due to collection limits */ + droppedAttributesCount?: number; +} +//# sourceMappingURL=link.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/link.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/link.js new file mode 100644 index 0000000000000000000000000000000000000000..8036a6346db8ad8ccf5b3e1a00b0397045074f89 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/link.js @@ -0,0 +1,18 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=link.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/link.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/link.js.map new file mode 100644 index 0000000000000000000000000000000000000000..34fae43d0bfe38b680a3653ad256026b10286cfb --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/link.js.map @@ -0,0 +1 @@ +{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/trace/link.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SpanAttributes } from './attributes';\nimport { SpanContext } from './span_context';\n\n/**\n * A pointer from the current {@link Span} to another span in the same trace or\n * in a different trace.\n * Few examples of Link usage.\n * 1. Batch Processing: A batch of elements may contain elements associated\n * with one or more traces/spans. Since there can only be one parent\n * SpanContext, Link is used to keep reference to SpanContext of all\n * elements in the batch.\n * 2. Public Endpoint: A SpanContext in incoming client request on a public\n * endpoint is untrusted from service provider perspective. In such case it\n * is advisable to start a new trace with appropriate sampling decision.\n * However, it is desirable to associate incoming SpanContext to new trace\n * initiated on service provider side so two traces (from Client and from\n * Service Provider) can be correlated.\n */\nexport interface Link {\n /** The {@link SpanContext} of a linked span. */\n context: SpanContext;\n /** A set of {@link SpanAttributes} on the link. */\n attributes?: SpanAttributes;\n /** Count of attributes of the link that were dropped due to collection limits */\n droppedAttributesCount?: number;\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..28c6442dbe7fdeca8979378247a226b3bee82a06 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span.d.ts @@ -0,0 +1,120 @@ +import { Exception } from '../common/Exception'; +import { TimeInput } from '../common/Time'; +import { SpanAttributes, SpanAttributeValue } from './attributes'; +import { SpanContext } from './span_context'; +import { SpanStatus } from './status'; +import { Link } from './link'; +/** + * An interface that represents a span. A span represents a single operation + * within a trace. Examples of span might include remote procedure calls or a + * in-process function calls to sub-components. A Trace has a single, top-level + * "root" Span that in turn may have zero or more child Spans, which in turn + * may have children. + * + * Spans are created by the {@link Tracer.startSpan} method. + */ +export interface Span { + /** + * Returns the {@link SpanContext} object associated with this Span. + * + * Get an immutable, serializable identifier for this span that can be used + * to create new child spans. Returned SpanContext is usable even after the + * span ends. + * + * @returns the SpanContext object associated with this Span. + */ + spanContext(): SpanContext; + /** + * Sets an attribute to the span. + * + * Sets a single Attribute with the key and value passed as arguments. + * + * @param key the key for this attribute. + * @param value the value for this attribute. Setting a value null or + * undefined is invalid and will result in undefined behavior. + */ + setAttribute(key: string, value: SpanAttributeValue): this; + /** + * Sets attributes to the span. + * + * @param attributes the attributes that will be added. + * null or undefined attribute values + * are invalid and will result in undefined behavior. + */ + setAttributes(attributes: SpanAttributes): this; + /** + * Adds an event to the Span. + * + * @param name the name of the event. + * @param [attributesOrStartTime] the attributes that will be added; these are + * associated with this event. Can be also a start time + * if type is {@type TimeInput} and 3rd param is undefined + * @param [startTime] start time of the event. + */ + addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; + /** + * Adds a single link to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param link the link to add. + */ + addLink(link: Link): this; + /** + * Adds multiple links to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param links the links to add. + */ + addLinks(links: Link[]): this; + /** + * Sets a status to the span. If used, this will override the default Span + * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value + * of previous calls to SetStatus on the Span. + * + * @param status the SpanStatus to set. + */ + setStatus(status: SpanStatus): this; + /** + * Updates the Span name. + * + * This will override the name provided via {@link Tracer.startSpan}. + * + * Upon this update, any sampling behavior based on Span name will depend on + * the implementation. + * + * @param name the Span name. + */ + updateName(name: string): this; + /** + * Marks the end of Span execution. + * + * Call to End of a Span MUST not have any effects on child spans. Those may + * still be running and can be ended later. + * + * Do not return `this`. The Span generally should not be used after it + * is ended so chaining is not desired in this context. + * + * @param [endTime] the time to set as Span's end time. If not provided, + * use the current time as the span's end time. + */ + end(endTime?: TimeInput): void; + /** + * Returns the flag whether this span will be recorded. + * + * @returns true if this Span is active and recording information like events + * with the `AddEvent` operation and attributes using `setAttributes`. + */ + isRecording(): boolean; + /** + * Sets exception as a span event + * @param exception the exception the only accepted values are string or Error + * @param [time] the time to set as Span's event time. If not provided, + * use the current time. + */ + recordException(exception: Exception, time?: TimeInput): void; +} +//# sourceMappingURL=span.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span.js new file mode 100644 index 0000000000000000000000000000000000000000..b50af4627067c830194e612af93ea976a9be79b1 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span.js @@ -0,0 +1,18 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=span.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f32cb28b55f9bd4b6fa3a17aa4f53fc1e1fae024 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span.js.map @@ -0,0 +1 @@ +{"version":3,"file":"span.js","sourceRoot":"","sources":["../../../src/trace/span.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Exception } from '../common/Exception';\nimport { TimeInput } from '../common/Time';\nimport { SpanAttributes, SpanAttributeValue } from './attributes';\nimport { SpanContext } from './span_context';\nimport { SpanStatus } from './status';\nimport { Link } from './link';\n\n/**\n * An interface that represents a span. A span represents a single operation\n * within a trace. Examples of span might include remote procedure calls or a\n * in-process function calls to sub-components. A Trace has a single, top-level\n * \"root\" Span that in turn may have zero or more child Spans, which in turn\n * may have children.\n *\n * Spans are created by the {@link Tracer.startSpan} method.\n */\nexport interface Span {\n /**\n * Returns the {@link SpanContext} object associated with this Span.\n *\n * Get an immutable, serializable identifier for this span that can be used\n * to create new child spans. Returned SpanContext is usable even after the\n * span ends.\n *\n * @returns the SpanContext object associated with this Span.\n */\n spanContext(): SpanContext;\n\n /**\n * Sets an attribute to the span.\n *\n * Sets a single Attribute with the key and value passed as arguments.\n *\n * @param key the key for this attribute.\n * @param value the value for this attribute. Setting a value null or\n * undefined is invalid and will result in undefined behavior.\n */\n setAttribute(key: string, value: SpanAttributeValue): this;\n\n /**\n * Sets attributes to the span.\n *\n * @param attributes the attributes that will be added.\n * null or undefined attribute values\n * are invalid and will result in undefined behavior.\n */\n setAttributes(attributes: SpanAttributes): this;\n\n /**\n * Adds an event to the Span.\n *\n * @param name the name of the event.\n * @param [attributesOrStartTime] the attributes that will be added; these are\n * associated with this event. Can be also a start time\n * if type is {@type TimeInput} and 3rd param is undefined\n * @param [startTime] start time of the event.\n */\n addEvent(\n name: string,\n attributesOrStartTime?: SpanAttributes | TimeInput,\n startTime?: TimeInput\n ): this;\n\n /**\n * Adds a single link to the span.\n *\n * Links added after the creation will not affect the sampling decision.\n * It is preferred span links be added at span creation.\n *\n * @param link the link to add.\n */\n addLink(link: Link): this;\n\n /**\n * Adds multiple links to the span.\n *\n * Links added after the creation will not affect the sampling decision.\n * It is preferred span links be added at span creation.\n *\n * @param links the links to add.\n */\n addLinks(links: Link[]): this;\n\n /**\n * Sets a status to the span. If used, this will override the default Span\n * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value\n * of previous calls to SetStatus on the Span.\n *\n * @param status the SpanStatus to set.\n */\n setStatus(status: SpanStatus): this;\n\n /**\n * Updates the Span name.\n *\n * This will override the name provided via {@link Tracer.startSpan}.\n *\n * Upon this update, any sampling behavior based on Span name will depend on\n * the implementation.\n *\n * @param name the Span name.\n */\n updateName(name: string): this;\n\n /**\n * Marks the end of Span execution.\n *\n * Call to End of a Span MUST not have any effects on child spans. Those may\n * still be running and can be ended later.\n *\n * Do not return `this`. The Span generally should not be used after it\n * is ended so chaining is not desired in this context.\n *\n * @param [endTime] the time to set as Span's end time. If not provided,\n * use the current time as the span's end time.\n */\n end(endTime?: TimeInput): void;\n\n /**\n * Returns the flag whether this span will be recorded.\n *\n * @returns true if this Span is active and recording information like events\n * with the `AddEvent` operation and attributes using `setAttributes`.\n */\n isRecording(): boolean;\n\n /**\n * Sets exception as a span event\n * @param exception the exception the only accepted values are string or Error\n * @param [time] the time to set as Span's event time. If not provided,\n * use the current time.\n */\n recordException(exception: Exception, time?: TimeInput): void;\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_context.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_context.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f30933a1fb5cf94aae62028e05441ab37aa21a1a --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_context.d.ts @@ -0,0 +1,53 @@ +import { TraceState } from './trace_state'; +/** + * A SpanContext represents the portion of a {@link Span} which must be + * serialized and propagated along side of a {@link Baggage}. + */ +export interface SpanContext { + /** + * The ID of the trace that this span belongs to. It is worldwide unique + * with practically sufficient probability by being made as 16 randomly + * generated bytes, encoded as a 32 lowercase hex characters corresponding to + * 128 bits. + */ + traceId: string; + /** + * The ID of the Span. It is globally unique with practically sufficient + * probability by being made as 8 randomly generated bytes, encoded as a 16 + * lowercase hex characters corresponding to 64 bits. + */ + spanId: string; + /** + * Only true if the SpanContext was propagated from a remote parent. + */ + isRemote?: boolean; + /** + * Trace flags to propagate. + * + * It is represented as 1 byte (bitmap). Bit to represent whether trace is + * sampled or not. When set, the least significant bit documents that the + * caller may have recorded trace data. A caller who does not record trace + * data out-of-band leaves this flag unset. + * + * see {@link TraceFlags} for valid flag values. + */ + traceFlags: number; + /** + * Tracing-system-specific info to propagate. + * + * The tracestate field value is a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * More Info: https://www.w3.org/TR/trace-context/#tracestate-field + * + * Examples: + * Single tracing system (generic format): + * tracestate: rojo=00f067aa0ba902b7 + * Multiple tracing systems (with different formatting): + * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE + */ + traceState?: TraceState; +} +//# sourceMappingURL=span_context.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_context.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_context.js new file mode 100644 index 0000000000000000000000000000000000000000..4b7976ce7076ae69014560e3529550f58f0762a1 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_context.js @@ -0,0 +1,18 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=span_context.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_context.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_context.js.map new file mode 100644 index 0000000000000000000000000000000000000000..005386d689f0210bf65c6b3abb5633b41153b6f1 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_context.js.map @@ -0,0 +1 @@ +{"version":3,"file":"span_context.js","sourceRoot":"","sources":["../../../src/trace/span_context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TraceState } from './trace_state';\n\n/**\n * A SpanContext represents the portion of a {@link Span} which must be\n * serialized and propagated along side of a {@link Baggage}.\n */\nexport interface SpanContext {\n /**\n * The ID of the trace that this span belongs to. It is worldwide unique\n * with practically sufficient probability by being made as 16 randomly\n * generated bytes, encoded as a 32 lowercase hex characters corresponding to\n * 128 bits.\n */\n traceId: string;\n /**\n * The ID of the Span. It is globally unique with practically sufficient\n * probability by being made as 8 randomly generated bytes, encoded as a 16\n * lowercase hex characters corresponding to 64 bits.\n */\n spanId: string;\n /**\n * Only true if the SpanContext was propagated from a remote parent.\n */\n isRemote?: boolean;\n /**\n * Trace flags to propagate.\n *\n * It is represented as 1 byte (bitmap). Bit to represent whether trace is\n * sampled or not. When set, the least significant bit documents that the\n * caller may have recorded trace data. A caller who does not record trace\n * data out-of-band leaves this flag unset.\n *\n * see {@link TraceFlags} for valid flag values.\n */\n traceFlags: number;\n /**\n * Tracing-system-specific info to propagate.\n *\n * The tracestate field value is a `list` as defined below. The `list` is a\n * series of `list-members` separated by commas `,`, and a list-member is a\n * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs\n * surrounding `list-members` are ignored. There can be a maximum of 32\n * `list-members` in a `list`.\n * More Info: https://www.w3.org/TR/trace-context/#tracestate-field\n *\n * Examples:\n * Single tracing system (generic format):\n * tracestate: rojo=00f067aa0ba902b7\n * Multiple tracing systems (with different formatting):\n * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE\n */\n traceState?: TraceState;\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_kind.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_kind.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a89846f6567b7853e0e71571d5b5d19177e0efff --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_kind.d.ts @@ -0,0 +1,27 @@ +export declare enum SpanKind { + /** Default value. Indicates that the span is used internally. */ + INTERNAL = 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER = 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT = 2, + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER = 3, + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER = 4 +} +//# sourceMappingURL=span_kind.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_kind.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_kind.js new file mode 100644 index 0000000000000000000000000000000000000000..9c06e2c255af7fe5c70e2eb8621e574b5f451213 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_kind.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SpanKind = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var SpanKind; +(function (SpanKind) { + /** Default value. Indicates that the span is used internally. */ + SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL"; + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SpanKind[SpanKind["SERVER"] = 1] = "SERVER"; + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT"; + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER"; + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER"; +})(SpanKind = exports.SpanKind || (exports.SpanKind = {})); +//# sourceMappingURL=span_kind.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_kind.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_kind.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c0ba360f140b040597c4b685a23785f5d3fe319a --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/span_kind.js.map @@ -0,0 +1 @@ +{"version":3,"file":"span_kind.js","sourceRoot":"","sources":["../../../src/trace/span_kind.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAY,QA6BX;AA7BD,WAAY,QAAQ;IAClB,iEAAiE;IACjE,+CAAY,CAAA;IAEZ;;;OAGG;IACH,2CAAU,CAAA;IAEV;;;OAGG;IACH,2CAAU,CAAA;IAEV;;;;OAIG;IACH,+CAAY,CAAA;IAEZ;;;;OAIG;IACH,+CAAY,CAAA;AACd,CAAC,EA7BW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA6BnB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SpanKind {\n /** Default value. Indicates that the span is used internally. */\n INTERNAL = 0,\n\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote request.\n */\n SERVER = 1,\n\n /**\n * Indicates that the span covers the client-side wrapper around an RPC or\n * other remote request.\n */\n CLIENT = 2,\n\n /**\n * Indicates that the span describes producer sending a message to a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n PRODUCER = 3,\n\n /**\n * Indicates that the span describes consumer receiving a message from a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n CONSUMER = 4,\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f1911114873b0d63f9b79b927c306f87bb031d51 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.d.ts @@ -0,0 +1,17 @@ +import { Span } from './span'; +import { SpanContext } from './span_context'; +export declare function isValidTraceId(traceId: string): boolean; +export declare function isValidSpanId(spanId: string): boolean; +/** + * Returns true if this {@link SpanContext} is valid. + * @return true if this {@link SpanContext} is valid. + */ +export declare function isSpanContextValid(spanContext: SpanContext): boolean; +/** + * Wrap the given {@link SpanContext} in a new non-recording {@link Span} + * + * @param spanContext span context to be wrapped + * @returns a new non-recording {@link Span} with the provided context + */ +export declare function wrapSpanContext(spanContext: SpanContext): Span; +//# sourceMappingURL=spancontext-utils.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js new file mode 100644 index 0000000000000000000000000000000000000000..dc88f5e6f73cd71eb0956b72fee13951d4ab083b --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const invalid_span_constants_1 = require("./invalid-span-constants"); +const NonRecordingSpan_1 = require("./NonRecordingSpan"); +const VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i; +const VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i; +function isValidTraceId(traceId) { + return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID; +} +exports.isValidTraceId = isValidTraceId; +function isValidSpanId(spanId) { + return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID; +} +exports.isValidSpanId = isValidSpanId; +/** + * Returns true if this {@link SpanContext} is valid. + * @return true if this {@link SpanContext} is valid. + */ +function isSpanContextValid(spanContext) { + return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId)); +} +exports.isSpanContextValid = isSpanContextValid; +/** + * Wrap the given {@link SpanContext} in a new non-recording {@link Span} + * + * @param spanContext span context to be wrapped + * @returns a new non-recording {@link Span} with the provided context + */ +function wrapSpanContext(spanContext) { + return new NonRecordingSpan_1.NonRecordingSpan(spanContext); +} +exports.wrapSpanContext = wrapSpanContext; +//# sourceMappingURL=spancontext-utils.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..58358a069b267f7f62a77379c2af762eb1bb0b1a --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"spancontext-utils.js","sourceRoot":"","sources":["../../../src/trace/spancontext-utils.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,qEAA2E;AAC3E,yDAAsD;AAItD,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAChD,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAE7C,SAAgB,cAAc,CAAC,OAAe;IAC5C,OAAO,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,KAAK,wCAAe,CAAC;AAC1E,CAAC;AAFD,wCAEC;AAED,SAAgB,aAAa,CAAC,MAAc;IAC1C,OAAO,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,KAAK,uCAAc,CAAC;AACtE,CAAC;AAFD,sCAEC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,WAAwB;IACzD,OAAO,CACL,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,WAAW,CAAC,MAAM,CAAC,CACzE,CAAC;AACJ,CAAC;AAJD,gDAIC;AAED;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,WAAwB;IACtD,OAAO,IAAI,mCAAgB,CAAC,WAAW,CAAC,CAAC;AAC3C,CAAC;AAFD,0CAEC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INVALID_SPANID, INVALID_TRACEID } from './invalid-span-constants';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { Span } from './span';\nimport { SpanContext } from './span_context';\n\nconst VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nconst VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\n\nexport function isValidTraceId(traceId: string): boolean {\n return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;\n}\n\nexport function isValidSpanId(spanId: string): boolean {\n return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;\n}\n\n/**\n * Returns true if this {@link SpanContext} is valid.\n * @return true if this {@link SpanContext} is valid.\n */\nexport function isSpanContextValid(spanContext: SpanContext): boolean {\n return (\n isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId)\n );\n}\n\n/**\n * Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n *\n * @param spanContext span context to be wrapped\n * @returns a new non-recording {@link Span} with the provided context\n */\nexport function wrapSpanContext(spanContext: SpanContext): Span {\n return new NonRecordingSpan(spanContext);\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/status.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/status.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ab19a68f72e562175991a36fa43a48746434099e --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/status.d.ts @@ -0,0 +1,25 @@ +export interface SpanStatus { + /** The status code of this message. */ + code: SpanStatusCode; + /** A developer-facing error message. */ + message?: string; +} +/** + * An enumeration of status codes. + */ +export declare enum SpanStatusCode { + /** + * The default status. + */ + UNSET = 0, + /** + * The operation has been validated by an Application developer or + * Operator to have completed successfully. + */ + OK = 1, + /** + * The operation contains an error. + */ + ERROR = 2 +} +//# sourceMappingURL=status.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/status.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/status.js new file mode 100644 index 0000000000000000000000000000000000000000..50cbdef8e098dd1822106333846f20c020dcaf3a --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/status.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SpanStatusCode = void 0; +/** + * An enumeration of status codes. + */ +var SpanStatusCode; +(function (SpanStatusCode) { + /** + * The default status. + */ + SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET"; + /** + * The operation has been validated by an Application developer or + * Operator to have completed successfully. + */ + SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK"; + /** + * The operation contains an error. + */ + SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR"; +})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {})); +//# sourceMappingURL=status.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/status.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/status.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b921cae589ec129378ddcbd2857442d6b42ead97 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/status.js.map @@ -0,0 +1 @@ +{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/trace/status.ts"],"names":[],"mappings":";;;AAsBA;;GAEG;AACH,IAAY,cAcX;AAdD,WAAY,cAAc;IACxB;;OAEG;IACH,qDAAS,CAAA;IACT;;;OAGG;IACH,+CAAM,CAAA;IACN;;OAEG;IACH,qDAAS,CAAA;AACX,CAAC,EAdW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAczB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport interface SpanStatus {\n /** The status code of this message. */\n code: SpanStatusCode;\n /** A developer-facing error message. */\n message?: string;\n}\n\n/**\n * An enumeration of status codes.\n */\nexport enum SpanStatusCode {\n /**\n * The default status.\n */\n UNSET = 0,\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n OK = 1,\n /**\n * The operation contains an error.\n */\n ERROR = 2,\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_flags.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_flags.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..11288ba95aae4cd9bf8c80a802b99d2508bbd064 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_flags.d.ts @@ -0,0 +1,7 @@ +export declare enum TraceFlags { + /** Represents no flag set. */ + NONE = 0, + /** Bit to represent whether trace is sampled in trace flags. */ + SAMPLED = 1 +} +//# sourceMappingURL=trace_flags.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js new file mode 100644 index 0000000000000000000000000000000000000000..f8d4dd8a990de82e3bb7c103ca67d7c604a8abc4 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TraceFlags = void 0; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var TraceFlags; +(function (TraceFlags) { + /** Represents no flag set. */ + TraceFlags[TraceFlags["NONE"] = 0] = "NONE"; + /** Bit to represent whether trace is sampled in trace flags. */ + TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED"; +})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {})); +//# sourceMappingURL=trace_flags.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js.map new file mode 100644 index 0000000000000000000000000000000000000000..965ce7945d5ab933e67c349ff8f81733012840c3 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trace_flags.js","sourceRoot":"","sources":["../../../src/trace/trace_flags.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,8BAA8B;IAC9B,2CAAU,CAAA;IACV,gEAAgE;IAChE,iDAAkB,CAAA;AACpB,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum TraceFlags {\n /** Represents no flag set. */\n NONE = 0x0,\n /** Bit to represent whether trace is sampled in trace flags. */\n SAMPLED = 0x1 << 0,\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_state.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_state.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f275b8bed66be146a7981e296f7f7efde865cea9 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_state.d.ts @@ -0,0 +1,38 @@ +export interface TraceState { + /** + * Create a new TraceState which inherits from this TraceState and has the + * given key set. + * The new entry will always be added in the front of the list of states. + * + * @param key key of the TraceState entry. + * @param value value of the TraceState entry. + */ + set(key: string, value: string): TraceState; + /** + * Return a new TraceState which inherits from this TraceState but does not + * contain the given key. + * + * @param key the key for the TraceState entry to be removed. + */ + unset(key: string): TraceState; + /** + * Returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + * + * @param key with which the specified value is to be associated. + * @returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + */ + get(key: string): string | undefined; + /** + * Serializes the TraceState to a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * + * @returns the serialized string. + */ + serialize(): string; +} +//# sourceMappingURL=trace_state.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_state.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_state.js new file mode 100644 index 0000000000000000000000000000000000000000..139703815dcb70f996c7d5e100c9df76a5df2b0b --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_state.js @@ -0,0 +1,18 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=trace_state.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_state.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_state.js.map new file mode 100644 index 0000000000000000000000000000000000000000..267f2e8205afc7c6b9c02ba670b596ecb6ffb98a --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/trace_state.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trace_state.js","sourceRoot":"","sources":["../../../src/trace/trace_state.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface TraceState {\n /**\n * Create a new TraceState which inherits from this TraceState and has the\n * given key set.\n * The new entry will always be added in the front of the list of states.\n *\n * @param key key of the TraceState entry.\n * @param value value of the TraceState entry.\n */\n set(key: string, value: string): TraceState;\n\n /**\n * Return a new TraceState which inherits from this TraceState but does not\n * contain the given key.\n *\n * @param key the key for the TraceState entry to be removed.\n */\n unset(key: string): TraceState;\n\n /**\n * Returns the value to which the specified key is mapped, or `undefined` if\n * this map contains no mapping for the key.\n *\n * @param key with which the specified value is to be associated.\n * @returns the value to which the specified key is mapped, or `undefined` if\n * this map contains no mapping for the key.\n */\n get(key: string): string | undefined;\n\n // TODO: Consider to add support for merging an object as well by also\n // accepting a single internalTraceState argument similar to the constructor.\n\n /**\n * Serializes the TraceState to a `list` as defined below. The `list` is a\n * series of `list-members` separated by commas `,`, and a list-member is a\n * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs\n * surrounding `list-members` are ignored. There can be a maximum of 32\n * `list-members` in a `list`.\n *\n * @returns the serialized string.\n */\n serialize(): string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..25090899e8d38fc75c269641eb228a98ee01fcb4 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer.d.ts @@ -0,0 +1,71 @@ +import { Context } from '../context/types'; +import { Span } from './span'; +import { SpanOptions } from './SpanOptions'; +/** + * Tracer provides an interface for creating {@link Span}s. + */ +export interface Tracer { + /** + * Starts a new {@link Span}. Start the span without setting it on context. + * + * This method do NOT modify the current Context. + * + * @param name The name of the span + * @param [options] SpanOptions used for span creation + * @param [context] Context to use to extract parent + * @returns Span The newly created span + * @example + * const span = tracer.startSpan('op'); + * span.setAttribute('key', 'value'); + * span.end(); + */ + startSpan(name: string, options?: SpanOptions, context?: Context): Span; + /** + * Starts a new {@link Span} and calls the given function passing it the + * created span as first argument. + * Additionally the new span gets set in context and this context is activated + * for the duration of the function call. + * + * @param name The name of the span + * @param [options] SpanOptions used for span creation + * @param [context] Context to use to extract parent + * @param fn function called in the context of the span and receives the newly created span as an argument + * @returns return value of fn + * @example + * const something = tracer.startActiveSpan('op', span => { + * try { + * do some work + * span.setStatus({code: SpanStatusCode.OK}); + * return something; + * } catch (err) { + * span.setStatus({ + * code: SpanStatusCode.ERROR, + * message: err.message, + * }); + * throw err; + * } finally { + * span.end(); + * } + * }); + * + * @example + * const span = tracer.startActiveSpan('op', span => { + * try { + * do some work + * return span; + * } catch (err) { + * span.setStatus({ + * code: SpanStatusCode.ERROR, + * message: err.message, + * }); + * throw err; + * } + * }); + * do some more work + * span.end(); + */ + startActiveSpan unknown>(name: string, fn: F): ReturnType; + startActiveSpan unknown>(name: string, options: SpanOptions, fn: F): ReturnType; + startActiveSpan unknown>(name: string, options: SpanOptions, context: Context, fn: F): ReturnType; +} +//# sourceMappingURL=tracer.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer.js new file mode 100644 index 0000000000000000000000000000000000000000..d710ef9acbd570c0a789d59bd98fff0b81b77c4b --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer.js @@ -0,0 +1,18 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=tracer.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3c3c591a706cd3b3e30ad83e2e59c23d4cc9c415 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tracer.js","sourceRoot":"","sources":["../../../src/trace/tracer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Context } from '../context/types';\nimport { Span } from './span';\nimport { SpanOptions } from './SpanOptions';\n\n/**\n * Tracer provides an interface for creating {@link Span}s.\n */\nexport interface Tracer {\n /**\n * Starts a new {@link Span}. Start the span without setting it on context.\n *\n * This method do NOT modify the current Context.\n *\n * @param name The name of the span\n * @param [options] SpanOptions used for span creation\n * @param [context] Context to use to extract parent\n * @returns Span The newly created span\n * @example\n * const span = tracer.startSpan('op');\n * span.setAttribute('key', 'value');\n * span.end();\n */\n startSpan(name: string, options?: SpanOptions, context?: Context): Span;\n\n /**\n * Starts a new {@link Span} and calls the given function passing it the\n * created span as first argument.\n * Additionally the new span gets set in context and this context is activated\n * for the duration of the function call.\n *\n * @param name The name of the span\n * @param [options] SpanOptions used for span creation\n * @param [context] Context to use to extract parent\n * @param fn function called in the context of the span and receives the newly created span as an argument\n * @returns return value of fn\n * @example\n * const something = tracer.startActiveSpan('op', span => {\n * try {\n * do some work\n * span.setStatus({code: SpanStatusCode.OK});\n * return something;\n * } catch (err) {\n * span.setStatus({\n * code: SpanStatusCode.ERROR,\n * message: err.message,\n * });\n * throw err;\n * } finally {\n * span.end();\n * }\n * });\n *\n * @example\n * const span = tracer.startActiveSpan('op', span => {\n * try {\n * do some work\n * return span;\n * } catch (err) {\n * span.setStatus({\n * code: SpanStatusCode.ERROR,\n * message: err.message,\n * });\n * throw err;\n * }\n * });\n * do some more work\n * span.end();\n */\n startActiveSpan unknown>(\n name: string,\n fn: F\n ): ReturnType;\n startActiveSpan unknown>(\n name: string,\n options: SpanOptions,\n fn: F\n ): ReturnType;\n startActiveSpan unknown>(\n name: string,\n options: SpanOptions,\n context: Context,\n fn: F\n ): ReturnType;\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_options.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_options.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f3bbccfc25e91923aa696226210848f9de0fd666 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_options.d.ts @@ -0,0 +1,10 @@ +/** + * An interface describes additional metadata of a tracer. + */ +export interface TracerOptions { + /** + * The schemaUrl of the tracer or instrumentation library + */ + schemaUrl?: string; +} +//# sourceMappingURL=tracer_options.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_options.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_options.js new file mode 100644 index 0000000000000000000000000000000000000000..3547251a2723fc38f0e57861b3c6a652f65d2811 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_options.js @@ -0,0 +1,18 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=tracer_options.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_options.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_options.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a743252796cc1e0db2c55ce542a0ab1f6bc1dfe4 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tracer_options.js","sourceRoot":"","sources":["../../../src/trace/tracer_options.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * An interface describes additional metadata of a tracer.\n */\nexport interface TracerOptions {\n /**\n * The schemaUrl of the tracer or instrumentation library\n */\n schemaUrl?: string;\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9b2f7a954c6b675bac056b4bd5988386b442d621 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.d.ts @@ -0,0 +1,21 @@ +import { Tracer } from './tracer'; +import { TracerOptions } from './tracer_options'; +/** + * A registry for creating named {@link Tracer}s. + */ +export interface TracerProvider { + /** + * Returns a Tracer, creating one if one with the given name and version is + * not already created. + * + * This function may return different Tracer types (e.g. + * {@link NoopTracerProvider} vs. a functional tracer). + * + * @param name The name of the tracer or instrumentation library. + * @param version The version of the tracer or instrumentation library. + * @param options The options of the tracer or instrumentation library. + * @returns Tracer A Tracer with the given name and version + */ + getTracer(name: string, version?: string, options?: TracerOptions): Tracer; +} +//# sourceMappingURL=tracer_provider.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js new file mode 100644 index 0000000000000000000000000000000000000000..4c511db9537573332dccee39c9e638e641d1481f --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js @@ -0,0 +1,18 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=tracer_provider.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js.map new file mode 100644 index 0000000000000000000000000000000000000000..31f334aae758072ec66337231a2c91a0836aba97 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/trace/tracer_provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tracer_provider.js","sourceRoot":"","sources":["../../../src/trace/tracer_provider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Tracer } from './tracer';\nimport { TracerOptions } from './tracer_options';\n\n/**\n * A registry for creating named {@link Tracer}s.\n */\nexport interface TracerProvider {\n /**\n * Returns a Tracer, creating one if one with the given name and version is\n * not already created.\n *\n * This function may return different Tracer types (e.g.\n * {@link NoopTracerProvider} vs. a functional tracer).\n *\n * @param name The name of the tracer or instrumentation library.\n * @param version The version of the tracer or instrumentation library.\n * @param options The options of the tracer or instrumentation library.\n * @returns Tracer A Tracer with the given name and version\n */\n getTracer(name: string, version?: string, options?: TracerOptions): Tracer;\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/version.d.ts b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/version.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..40f036592c67d41bfe8d381554317b1818c74558 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/version.d.ts @@ -0,0 +1,2 @@ +export declare const VERSION = "1.9.0"; +//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/version.js b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/version.js new file mode 100644 index 0000000000000000000000000000000000000000..3c7179413e6c56702b5986d31a3c5c27ea0049a8 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/version.js @@ -0,0 +1,21 @@ +"use strict"; +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VERSION = void 0; +// this is autogenerated file, see scripts/version-update.js +exports.VERSION = '1.9.0'; +//# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/version.js.map b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/version.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ee3c12c757d5e327ce85aeea80686f8045062ca2 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/version.js.map @@ -0,0 +1 @@ +{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,OAAO,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '1.9.0';\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/package.json b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f7ba45f96dae308d68a738877c695026c0a312b6 --- /dev/null +++ b/node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/package.json @@ -0,0 +1,113 @@ +{ + "name": "@opentelemetry/api", + "version": "1.9.0", + "description": "Public API for OpenTelemetry", + "main": "build/src/index.js", + "module": "build/esm/index.js", + "esnext": "build/esnext/index.js", + "types": "build/src/index.d.ts", + "browser": { + "./src/platform/index.ts": "./src/platform/browser/index.ts", + "./build/esm/platform/index.js": "./build/esm/platform/browser/index.js", + "./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js", + "./build/src/platform/index.js": "./build/src/platform/browser/index.js" + }, + "exports": { + ".": { + "module": "./build/esm/index.js", + "esnext": "./build/esnext/index.js", + "types": "./build/src/index.d.ts", + "default": "./build/src/index.js" + }, + "./experimental": { + "module": "./build/esm/experimental/index.js", + "esnext": "./build/esnext/experimental/index.js", + "types": "./build/src/experimental/index.d.ts", + "default": "./build/src/experimental/index.js" + } + }, + "repository": "open-telemetry/opentelemetry-js", + "scripts": { + "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", + "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../", + "codecov:webworker": "nyc report --reporter=json && codecov -f coverage/*.json -p ../", + "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../", + "precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies", + "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", + "docs": "typedoc", + "docs:deploy": "gh-pages --dist docs/out", + "docs:test": "linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent", + "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext .ts", + "test:browser": "karma start --single-run", + "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", + "test:eol": "ts-mocha -p tsconfig.json 'test/**/*.test.ts'", + "test:webworker": "karma start karma.worker.js --single-run", + "cycle-check": "dpdm --exit-code circular:1 src/index.ts", + "version": "node ../scripts/version-update.js", + "prewatch": "npm run precompile", + "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json", + "peer-api-check": "node ../scripts/peer-api-check.js" + }, + "keywords": [ + "opentelemetry", + "nodejs", + "browser", + "tracing", + "profiling", + "stats", + "monitoring" + ], + "author": "OpenTelemetry Authors", + "license": "Apache-2.0", + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "build/esm/**/*.js", + "build/esm/**/*.js.map", + "build/esm/**/*.d.ts", + "build/esnext/**/*.js", + "build/esnext/**/*.js.map", + "build/esnext/**/*.d.ts", + "build/src/**/*.js", + "build/src/**/*.js.map", + "build/src/**/*.d.ts", + "LICENSE", + "README.md" + ], + "publishConfig": { + "access": "public" + }, + "devDependencies": { + "@types/mocha": "10.0.6", + "@types/node": "18.6.5", + "@types/sinon": "17.0.3", + "@types/webpack": "5.28.5", + "@types/webpack-env": "1.16.3", + "babel-plugin-istanbul": "6.1.1", + "codecov": "3.8.3", + "cross-var": "1.1.0", + "dpdm": "3.13.1", + "karma": "6.4.3", + "karma-chrome-launcher": "3.1.0", + "karma-coverage": "2.2.1", + "karma-mocha": "2.0.1", + "karma-mocha-webworker": "1.3.0", + "karma-spec-reporter": "0.0.36", + "karma-webpack": "5.0.1", + "lerna": "6.6.2", + "memfs": "3.5.3", + "mocha": "10.2.0", + "nyc": "15.1.0", + "sinon": "15.1.2", + "ts-loader": "9.5.1", + "ts-mocha": "10.0.0", + "typescript": "4.4.4", + "unionfs": "4.5.4", + "webpack": "5.89.0" + }, + "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/api", + "sideEffects": false, + "gitHead": "c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511" +} diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/README.md b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/README.md new file mode 100644 index 0000000000000000000000000000000000000000..db36c6aa8927a5b71f730f80ec4445d6c7a72045 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/README.md @@ -0,0 +1,1053 @@ + + + + +
+ Colord is a tiny yet powerful tool for high-performance color manipulations and conversions. +
+ +## Features + +- 📦 **Small**: Just **1.7 KB** gzipped ([3x+ lighter](#benchmarks) than **color** and **tinycolor2**) +- 🚀 **Fast**: [3x+ faster](#benchmarks) than **color** and **tinycolor2** +- 😍 **Simple**: Chainable API and familiar patterns +- 💪 **Immutable**: No need to worry about data mutations +- 🛡 **Bulletproof**: Written in strict TypeScript and has 100% test coverage +- 🗂 **Typed**: Ships with [types included](#types) +- 🏗 **Extendable**: Built-in [plugin system](#plugins) to add new functionality +- 📚 **CSS-compliant**: Strictly follows CSS Color Level specifications +- 👫 **Works everywhere**: Supports all browsers and Node.js +- 💨 **Dependency-free** + +
---
+ +## Benchmarks + +| Library | Operations/sec | Size
(minified) | Size
(gzipped) | Dependencies | Type declarations | +| ----------------------------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | +| colord 👑 | 3,524,989 | [![](https://badgen.net/bundlephobia/min/colord?color=6ead0a&label=)](https://bundlephobia.com/result?p=colord) | [![](https://badgen.net/bundlephobia/minzip/colord?color=6ead0a&label=)](https://bundlephobia.com/result?p=colord) | [![](https://badgen.net/bundlephobia/dependency-count/colord?color=6ead0a&label=)](https://bundlephobia.com/result?p=colord) | [![](https://badgen.net/npm/types/colord?color=6ead0a&label=)](https://bundlephobia.com/result?p=colord) | +| color | 744,263 | [![](https://badgen.net/bundlephobia/min/color?color=red&label=)](https://bundlephobia.com/result?p=color) | [![](https://badgen.net/bundlephobia/minzip/color?color=red&label=)](https://bundlephobia.com/result?p=color) | [![](https://badgen.net/bundlephobia/dependency-count/color?color=red&label=)](https://bundlephobia.com/result?p=color) | [![](https://badgen.net/npm/types/color?color=e6591d&label=)](https://bundlephobia.com/result?p=color) | +| tinycolor2 | 971,312 | [![](https://badgen.net/bundlephobia/min/tinycolor2?color=red&label=)](https://bundlephobia.com/result?p=tinycolor2) | [![](https://badgen.net/bundlephobia/minzip/tinycolor2?color=red&label=)](https://bundlephobia.com/result?p=tinycolor2) | [![](https://badgen.net/bundlephobia/dependency-count/tinycolor2?color=6ead0a&label=)](https://bundlephobia.com/result?p=tinycolor2) | [![](https://badgen.net/npm/types/tinycolor2?color=e6591d&label=)](https://bundlephobia.com/result?p=tinycolor2) | +| ac-colors | 660,722 | [![](https://badgen.net/bundlephobia/min/ac-colors?color=e6591d&label=)](https://bundlephobia.com/result?p=ac-colors) | [![](https://badgen.net/bundlephobia/minzip/ac-colors?color=e6591d&label=)](https://bundlephobia.com/result?p=ac-colors) | [![](https://badgen.net/bundlephobia/dependency-count/ac-colors?color=6ead0a&label=)](https://bundlephobia.com/result?p=ac-colors) | [![](https://badgen.net/npm/types/ac-colors?color=red&label=)](https://bundlephobia.com/result?p=ac-colors) | +| chroma-js | 962,967 | [![](https://badgen.net/bundlephobia/min/chroma-js?color=red&label=)](https://bundlephobia.com/result?p=chroma-js) | [![](https://badgen.net/bundlephobia/minzip/chroma-js?color=red&label=)](https://bundlephobia.com/result?p=chroma-js) | [![](https://badgen.net/bundlephobia/dependency-count/chroma-js?color=red&label=)](https://bundlephobia.com/result?p=chroma-js) | [![](https://badgen.net/npm/types/chroma-js?color=e6591d&label=)](https://bundlephobia.com/result?p=chroma-js) | + +The performance results were generated on a MBP 2019, 2,6 GHz Intel Core i7 by running `npm run benchmark` in the library folder. See [tests/benchmark.ts](https://github.com/omgovich/colord/blob/master/tests/benchmark.ts). + +
---
+ +## Getting Started + +``` +npm i colord +``` + +```js +import { colord } from "colord"; + +colord("#ff0000").grayscale().alpha(0.25).toRgbString(); // "rgba(128, 128, 128, 0.25)" +colord("rgb(192, 192, 192)").isLight(); // true +colord("hsl(0, 50%, 50%)").darken(0.25).toHex(); // "#602020" +``` + +
---
+ +## Supported Color Models + +- Hexadecimal strings (including 3, 4 and 8 digit notations) +- RGB strings and objects +- HSL strings and objects +- HSV objects +- Color names ([via plugin](#plugins)) +- HWB objects and strings ([via plugin](#plugins)) +- CMYK objects and strings ([via plugin](#plugins)) +- LCH objects and strings ([via plugin](#plugins)) +- LAB objects ([via plugin](#plugins)) +- XYZ objects ([via plugin](#plugins)) + +
---
+ +## API + +### Color parsing + +
+ colord(input) + +Parses the given input and creates a new Colord instance. String parsing strictly conforms to [CSS Color Level Specifications](https://www.w3.org/TR/css-color-4/#color-type). + +```js +import { colord } from "colord"; + +// String input examples +colord("#FFF"); +colord("#ffffff"); +colord("#ffffffff"); +colord("rgb(255, 255, 255)"); +colord("rgba(255, 255, 255, 0.5)"); +colord("rgba(100% 100% 100% / 50%)"); +colord("hsl(90, 100%, 100%)"); +colord("hsla(90, 100%, 100%, 0.5)"); +colord("hsla(90deg 100% 100% / 50%)"); +colord("tomato"); // requires "names" plugin + +// Object input examples +colord({ r: 255, g: 255, b: 255 }); +colord({ r: 255, g: 255, b: 255, a: 1 }); +colord({ h: 360, s: 100, l: 100 }); +colord({ h: 360, s: 100, l: 100, a: 1 }); +colord({ h: 360, s: 100, v: 100 }); +colord({ h: 360, s: 100, v: 100, a: 1 }); +``` + +Check out the ["Plugins"](#plugins) section for more input format examples. + +
+ +
+ getFormat(input) + +Returns a color model name for the input passed to the function. Uses the same parsing system as `colord` function. + +```js +import { getFormat } from "colord"; + +getFormat("#aabbcc"); // "hex" +getFormat({ r: 13, g: 237, b: 162, a: 0.5 }); // "rgb" +getFormat("hsl(180deg, 50%, 50%)"); // "hsl" +getFormat("WUT?"); // undefined +``` + +
+ +### Color conversion + +
+ .toHex() + +Returns the [hexadecimal representation](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#rgb_colors) of a color. When the alpha channel value of the color is less than 1, it outputs `#rrggbbaa` format instead of `#rrggbb`. + +```js +colord("rgb(0, 255, 0)").toHex(); // "#00ff00" +colord({ h: 300, s: 100, l: 50 }).toHex(); // "#ff00ff" +colord({ r: 255, g: 255, b: 255, a: 0 }).toHex(); // "#ffffff00" +``` + +
+ +
+ .toRgb() + +```js +colord("#ff0000").toRgb(); // { r: 255, g: 0, b: 0, a: 1 } +colord({ h: 180, s: 100, l: 50, a: 0.5 }).toRgb(); // { r: 0, g: 255, b: 255, a: 0.5 } +``` + +
+ +
+ .toRgbString() + +```js +colord("#ff0000").toRgbString(); // "rgb(255, 0, 0)" +colord({ h: 180, s: 100, l: 50, a: 0.5 }).toRgbString(); // "rgba(0, 255, 255, 0.5)" +``` + +
+ +
+ .toHsl() + +Converts a color to [HSL color space](https://en.wikipedia.org/wiki/HSL_and_HSV) and returns an object. + +```js +colord("#ffff00").toHsl(); // { h: 60, s: 100, l: 50, a: 1 } +colord("rgba(0, 0, 255, 0.5) ").toHsl(); // { h: 240, s: 100, l: 50, a: 0.5 } +``` + +
+ +
+ .toHslString() + +Converts a color to [HSL color space](https://en.wikipedia.org/wiki/HSL_and_HSV) and expresses it through the [functional notation](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#hsl_colors). + +```js +colord("#ffff00").toHslString(); // "hsl(60, 100%, 50%)" +colord("rgba(0, 0, 255, 0.5)").toHslString(); // "hsla(240, 100%, 50%, 0.5)" +``` + +
+ +
+ .toHsv() + +Converts a color to [HSV color space](https://en.wikipedia.org/wiki/HSL_and_HSV) and returns an object. + +```js +colord("#ffff00").toHsv(); // { h: 60, s: 100, v: 100, a: 1 } +colord("rgba(0, 255, 255, 0.5) ").toHsv(); // { h: 180, s: 100, v: 100, a: 1 } +``` + +
+ +
+ .toName(options?) (names plugin) + +Converts a color to a [CSS keyword](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#color_keywords). Returns `undefined` if the color is not specified in the specs. + +```js +import { colord, extend } from "colord"; +import namesPlugin from "colord/plugins/names"; + +extend([namesPlugin]); + +colord("#ff6347").toName(); // "tomato" +colord("#00ffff").toName(); // "cyan" +colord("rgba(0, 0, 0, 0)").toName(); // "transparent" + +colord("#fe0000").toName(); // undefined (the color is not specified in CSS specs) +colord("#fe0000").toName({ closest: true }); // "red" (closest color available) +``` + +
+ +
+ .toCmyk() (cmyk plugin) + +Converts a color to [CMYK](https://en.wikipedia.org/wiki/CMYK_color_model) color space. + +```js +import { colord, extend } from "colord"; +import cmykPlugin from "colord/plugins/cmyk"; + +extend([cmykPlugin]); + +colord("#ffffff").toCmyk(); // { c: 0, m: 0, y: 0, k: 0, a: 1 } +colord("#555aaa").toCmyk(); // { c: 50, m: 47, y: 0, k: 33, a: 1 } +``` + +
+ +
+ .toCmykString() (cmyk plugin) + +Converts a color to color space. + +Converts a color to [CMYK](https://en.wikipedia.org/wiki/CMYK_color_model) color space and expresses it through the [functional notation](https://www.w3.org/TR/css-color-4/#device-cmyk) + +```js +import { colord, extend } from "colord"; +import cmykPlugin from "colord/plugins/cmyk"; + +extend([cmykPlugin]); + +colord("#99ffff").toCmykString(); // "device-cmyk(40% 0% 0% 0%)" +colord("#00336680").toCmykString(); // "device-cmyk(100% 50% 0% 60% / 0.5)" +``` + +
+ +
+ .toHwb() (hwb plugin) + +Converts a color to [HWB (Hue-Whiteness-Blackness)](https://en.wikipedia.org/wiki/HWB_color_model) color space. + +```js +import { colord, extend } from "colord"; +import hwbPlugin from "colord/plugins/hwb"; + +extend([hwbPlugin]); + +colord("#ffffff").toHwb(); // { h: 0, w: 100, b: 0, a: 1 } +colord("#555aaa").toHwb(); // { h: 236, w: 33, b: 33, a: 1 } +``` + +
+ +
+ .toHwbString() (hwb plugin) + +Converts a color to [HWB (Hue-Whiteness-Blackness)](https://en.wikipedia.org/wiki/HWB_color_model) color space and expresses it through the [functional notation](https://www.w3.org/TR/css-color-4/#the-hwb-notation). + +```js +import { colord, extend } from "colord"; +import hwbPlugin from "colord/plugins/hwb"; + +extend([hwbPlugin]); + +colord("#999966").toHwbString(); // "hwb(60 40% 40%)" +colord("#99ffff").toHwbString(); // "hwb(180 60% 0%)" +colord("#003366").alpha(0.5).toHwbString(); // "hwb(210 0% 60% / 0.5)" +``` + +
+ +
+ .toLab() (lab plugin) + +Converts a color to [CIE LAB](https://en.wikipedia.org/wiki/CIELAB_color_space) color space. The conversion logic is ported from [CSS Color Module Level 4 Specification](https://www.w3.org/TR/css-color-4/#color-conversion-code). + +```js +import { colord, extend } from "colord"; +import labPlugin from "colord/plugins/lab"; + +extend([labPlugin]); + +colord("#ffffff").toLab(); // { l: 100, a: 0, b: 0, alpha: 1 } +colord("#33221180").toLab(); // { l: 14.89, a: 5.77, b: 14.41, alpha: 0.5 } +``` + +
+ +
+ .toLch() (lch plugin) + +Converts a color to [CIE LCH](https://lea.verou.me/2020/04/lch-colors-in-css-what-why-and-how/) color space. The conversion logic is ported from [CSS Color Module Level 4 Specification](https://www.w3.org/TR/css-color-4/#color-conversion-code). + +```js +import { colord, extend } from "colord"; +import lchPlugin from "colord/plugins/lch"; + +extend([lchPlugin]); + +colord("#ffffff").toLch(); // { l: 100, c: 0, h: 0, a: 1 } +colord("#213b0b").toLch(); // { l: 21.85, c: 31.95, h: 127.77, a: 1 } +``` + +
+ +
+ .toLchString() (lch plugin) + +Converts a color to [CIE LCH](https://lea.verou.me/2020/04/lch-colors-in-css-what-why-and-how/) color space and expresses it through the [functional notation](https://www.w3.org/TR/css-color-4/#specifying-lab-lch). + +```js +import { colord, extend } from "colord"; +import lchPlugin from "colord/plugins/lch"; + +extend([lchPlugin]); + +colord("#ffffff").toLchString(); // "lch(100% 0 0)" +colord("#213b0b").alpha(0.5).toLchString(); // "lch(21.85% 31.95 127.77 / 0.5)" +``` + +
+ +
+ .toXyz() (xyz plugin) + +Converts a color to [CIE XYZ](https://www.sttmedia.com/colormodel-xyz) color space. The conversion logic is ported from [CSS Color Module Level 4 Specification](https://www.w3.org/TR/css-color-4/#color-conversion-code). + +```js +import { colord, extend } from "colord"; +import xyzPlugin from "colord/plugins/xyz"; + +extend([xyzPlugin]); + +colord("#ffffff").toXyz(); // { x: 95.047, y: 100, z: 108.883, a: 1 } +``` + +
+ +### Color manipulation + +
+ .alpha(value) + +Changes the alpha channel value and returns a new `Colord` instance. + +```js +colord("rgb(0, 0, 0)").alpha(0.5).toRgbString(); // "rgba(0, 0, 0, 0.5)" +``` + +
+ +
+ .invert() + +Creates a new `Colord` instance containing an inverted (opposite) version of the color. + +```js +colord("#ffffff").invert().toHex(); // "#000000" +colord("#aabbcc").invert().toHex(); // "#554433" +``` + +
+ +
+ .saturate(amount = 0.1) + +Increases the [HSL saturation](https://en.wikipedia.org/wiki/HSL_and_HSV) of a color by the given amount. + +```js +colord("#bf4040").saturate(0.25).toHex(); // "#df2020" +colord("hsl(0, 50%, 50%)").saturate(0.5).toHslString(); // "hsl(0, 100%, 50%)" +``` + +
+ +
+ .desaturate(amount = 0.1) + +Decreases the [HSL saturation](https://en.wikipedia.org/wiki/HSL_and_HSV) of a color by the given amount. + +```js +colord("#df2020").saturate(0.25).toHex(); // "#bf4040" +colord("hsl(0, 100%, 50%)").saturate(0.5).toHslString(); // "hsl(0, 50%, 50%)" +``` + +
+ +
+ .grayscale() + +Makes a gray color with the same lightness as a source color. Same as calling `desaturate(1)`. + +```js +colord("#bf4040").grayscale().toHex(); // "#808080" +colord("hsl(0, 100%, 50%)").grayscale().toHslString(); // "hsl(0, 0%, 50%)" +``` + +
+ +
+ .lighten(amount = 0.1) + +Increases the [HSL lightness](https://en.wikipedia.org/wiki/HSL_and_HSV) of a color by the given amount. + +```js +colord("#000000").lighten(0.5).toHex(); // "#808080" +colord("#223344").lighten(0.3).toHex(); // "#5580aa" +colord("hsl(0, 50%, 50%)").lighten(0.5).toHslString(); // "hsl(0, 50%, 100%)" +``` + +
+ +
+ .darken(amount = 0.1) + +Decreases the [HSL lightness](https://en.wikipedia.org/wiki/HSL_and_HSV) of a color by the given amount. + +```js +colord("#ffffff").darken(0.5).toHex(); // "#808080" +colord("#5580aa").darken(0.3).toHex(); // "#223344" +colord("hsl(0, 50%, 100%)").lighten(0.5).toHslString(); // "hsl(0, 50%, 50%)" +``` + +
+ +
+ .hue(value) + +Changes the hue value and returns a new `Colord` instance. + +```js +colord("hsl(90, 50%, 50%)").hue(180).toHslString(); // "hsl(180, 50%, 50%)" +colord("hsl(90, 50%, 50%)").hue(370).toHslString(); // "hsl(10, 50%, 50%)" +``` + +
+ +
+ .rotate(amount = 15) + +Increases the [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) hue value of a color by the given amount. + +```js +colord("hsl(90, 50%, 50%)").rotate(90).toHslString(); // "hsl(180, 50%, 50%)" +colord("hsl(90, 50%, 50%)").rotate(-180).toHslString(); // "hsl(270, 50%, 50%)" +``` + +
+ +
+ .mix(color2, ratio = 0.5) (mix plugin) + +Produces a mixture of two colors and returns the result of mixing them (new Colord instance). + +In contrast to other libraries that perform RGB values mixing, Colord mixes colors through [LAB color space](https://en.wikipedia.org/wiki/CIELAB_color_space). This approach produces better results and doesn't have the drawbacks the legacy way has. + +→ [Online demo](https://3cg7o.csb.app/) + +```js +import { colord, extend } from "colord"; +import mixPlugin from "colord/plugins/mix"; + +extend([mixPlugin]); + +colord("#ffffff").mix("#000000").toHex(); // "#777777" +colord("#800080").mix("#dda0dd").toHex(); // "#af5cae" +colord("#cd853f").mix("#eee8aa", 0.6).toHex(); // "#e3c07e" +colord("#008080").mix("#808000", 0.35).toHex(); // "#50805d" +``` + +
+ +
+ .tints(count = 5) (mix plugin) + +Provides functionality to generate [tints](https://en.wikipedia.org/wiki/Tints_and_shades) of a color. Returns an array of `Colord` instances, including the original color. + +```js +import { colord, extend } from "colord"; +import mixPlugin from "colord/plugins/mix"; + +extend([mixPlugin]); + +const color = colord("#ff0000"); +color.tints(3).map((c) => c.toHex()); // ["#ff0000", "#ff9f80", "#ffffff"]; +``` + +
+ +
+ .shades(count = 5) (mix plugin) + +Provides functionality to generate [shades](https://en.wikipedia.org/wiki/Tints_and_shades) of a color. Returns an array of `Colord` instances, including the original color. + +```js +import { colord, extend } from "colord"; +import mixPlugin from "colord/plugins/mix"; + +extend([mixPlugin]); + +const color = colord("#ff0000"); +color.shades(3).map((c) => c.toHex()); // ["#ff0000", "#7a1b0b", "#000000"]; +``` + +
+ +
+ .tones(count = 5) (mix plugin) + +Provides functionality to generate [tones](https://en.wikipedia.org/wiki/Tints_and_shades) of a color. Returns an array of `Colord` instances, including the original color. + +```js +import { colord, extend } from "colord"; +import mixPlugin from "colord/plugins/mix"; + +extend([mixPlugin]); + +const color = colord("#ff0000"); +color.tones(3).map((c) => c.toHex()); // ["#ff0000", "#c86147", "#808080"]; +``` + +
+ +
+ .harmonies(type = "complementary") (harmonies plugin) + +Provides functionality to generate [harmony colors](). Returns an array of `Colord` instances. + +```js +import { colord, extend } from "colord"; +import harmoniesPlugin from "colord/plugins/harmonies"; + +extend([harmoniesPlugin]); + +const color = colord("#ff0000"); +color.harmonies("analogous").map((c) => c.toHex()); // ["#ff0080", "#ff0000", "#ff8000"] +color.harmonies("complementary").map((c) => c.toHex()); // ["#ff0000", "#00ffff"] +color.harmonies("double-split-complementary").map((c) => c.toHex()); // ["#ff0080", "#ff0000", "#ff8000", "#00ff80", "#0080ff"] +color.harmonies("rectangle").map((c) => c.toHex()); // ["#ff0000", "#ffff00", "#00ffff", "#0000ff"] +color.harmonies("split-complementary").map((c) => c.toHex()); // ["#ff0000", "#00ff80", "#0080ff"] +color.harmonies("tetradic").map((c) => c.toHex()); // ["#ff0000", "#80ff00", "#00ffff", "#8000ff"] +color.harmonies("triadic").map((c) => c.toHex()); // ["#ff0000", "#00ff00", "#0000ff"] +``` + +
+ +### Color analysis + +
+ .isValid() + +Returns a boolean indicating whether or not an input has been parsed successfully. +Note: If parsing is unsuccessful, Colord defaults to black (does not throws an error). + +```js +colord("#ffffff").isValid(); // true +colord("#wwuutt").isValid(); // false +colord("abracadabra").isValid(); // false +colord({ r: 0, g: 0, b: 0 }).isValid(); // true +colord({ r: 0, g: 0, v: 0 }).isValid(); // false +``` + +
+ +
+ .isEqual(color2) + +Determines whether two values are the same color. + +```js +colord("#000000").isEqual("rgb(0, 0, 0)"); // true +colord("#000000").isEqual("rgb(255, 255, 255)"); // false +``` + +
+ +
+ .alpha() + +```js +colord("#ffffff").alpha(); // 1 +colord("rgba(50, 100, 150, 0.5)").alpha(); // 0.5 +``` + +
+ +
+ .hue() + +```js +colord("hsl(90, 50%, 50%)").hue(); // 90 +colord("hsl(-10, 50%, 50%)").hue(); // 350 +``` + +
+ +
+ .brightness() + +Returns the brightness of a color (from 0 to 1). The calculation logic is modified from [Web Content Accessibility Guidelines](https://www.w3.org/TR/AERT/#color-contrast). + +```js +colord("#000000").brightness(); // 0 +colord("#808080").brightness(); // 0.5 +colord("#ffffff").brightness(); // 1 +``` + +
+ +
+ .isLight() + +Same as calling `brightness() >= 0.5`. + +```js +colord("#111111").isLight(); // false +colord("#aabbcc").isLight(); // true +colord("#ffffff").isLight(); // true +``` + +
+ +
+ .isDark() + +Same as calling `brightness() < 0.5`. + +```js +colord("#111111").isDark(); // true +colord("#aabbcc").isDark(); // false +colord("#ffffff").isDark(); // false +``` + +
+ +
+ .luminance() (a11y plugin) + +Returns the relative luminance of a color, normalized to 0 for darkest black and 1 for lightest white as defined by [WCAG 2.0](https://www.w3.org/TR/WCAG20/#relativeluminancedef). + +```js +colord("#000000").luminance(); // 0 +colord("#808080").luminance(); // 0.22 +colord("#ccddee").luminance(); // 0.71 +colord("#ffffff").luminance(); // 1 +``` + +
+ +
+ .contrast(color2 = "#FFF") (a11y plugin) + +Calculates a contrast ratio for a color pair. This luminance difference is expressed as a ratio ranging from 1 (e.g. white on white) to 21 (e.g., black on a white). [WCAG Accessibility Level AA requires](https://webaim.org/articles/contrast/) a ratio of at least 4.5 for normal text and 3 for large text. + +```js +colord("#000000").contrast(); // 21 (black on white) +colord("#ffffff").contrast("#000000"); // 21 (white on black) +colord("#777777").contrast(); // 4.47 (gray on white) +colord("#ff0000").contrast(); // 3.99 (red on white) +colord("#0000ff").contrast("#ff000"); // 2.14 (blue on red) +``` + +
+ +
+ .isReadable(color2 = "#FFF", options?) (a11y plugin) + +Checks that a background and text color pair is readable according to [WCAG 2.0 Contrast and Color Requirements](https://webaim.org/articles/contrast/). + +```js +colord("#000000").isReadable(); // true (normal black text on white bg conforms to WCAG AA) +colord("#777777").isReadable(); // false (normal gray text on white bg conforms to WCAG AA) +colord("#ffffff").isReadable("#000000"); // true (normal white text on black bg conforms to WCAG AA) +colord("#e60000").isReadable("#ffff47"); // true (normal red text on yellow bg conforms to WCAG AA) +colord("#e60000").isReadable("#ffff47", { level: "AAA" }); // false (normal red text on yellow bg does not conform to WCAG AAA) +colord("#e60000").isReadable("#ffff47", { level: "AAA", size: "large" }); // true (large red text on yellow bg conforms to WCAG AAA) +``` + +
+ +
+ .delta(color2 = "#FFF") (lab plugin) + +Calculates the perceived color difference between two colors. +The difference calculated according to [Delta E2000](https://en.wikipedia.org/wiki/Color_difference#CIEDE2000). +The return value is `0` if the colors are equal, `1` if they are entirely different. + +```js +colord("#3296fa").delta("#197dc8"); // 0.099 +colord("#faf0c8").delta("#ffffff"); // 0.148 +colord("#afafaf").delta("#b4b4b4"); // 0.014 +colord("#000000").delta("#ffffff"); // 1 +``` + +
+ +### Color utilities + +
+ random() + +Returns a new Colord instance with a random color value inside. + +```js +import { random } from "colord"; + +random().toHex(); // "#01c8ec" +random().alpha(0.5).toRgb(); // { r: 13, g: 237, b: 162, a: 0.5 } +``` + +
+ +
+ .minify(options?) + +Converts a color to its shortest string representation. + +```js +import { colord, extend } from "colord"; +import minifyPlugin from "colord/plugins/minify"; + +extend([minifyPlugin]); + +colord("black").minify(); // "#000" +colord("#112233").minify(); // "#123" +colord("darkgray").minify(); // "#a9a9a9" +colord("rgba(170,170,170,0.4)").minify(); // "hsla(0,0%,67%,.4)" +colord("rgba(170,170,170,0.4)").minify({ alphaHex: true }); // "#aaa6" +``` + +| Option | Default | Description | +| ------------- | ------- | ------------------------------------------------------------ | +| `hex` | `true` | Enable `#rrggbb` and `#rgb` notations | +| `alphaHex` | `false` | Enable `#rrggbbaa` and `#rgba` notations | +| `rgb` | `true` | Enable `rgb()` and `rgba()` functional notations | +| `hsl` | `true` | Enable `hsl()` and `hsla()` functional notations | +| `name` | `false` | Enable CSS color keywords. Requires `names` plugin installed | +| `transparent` | `false` | Enable `"transparent"` color keyword | + +
+ +
---
+ +## Plugins + +**Colord** has a built-in plugin system that allows new features and functionality to be easily added. + +
+ a11y (Accessibility) 0.38 KB + +Adds accessibility and color contrast utilities working according to [Web Content Accessibility Guidelines 2.0](https://www.w3.org/TR/WCAG20/). + +```js +import { colord, extend } from "colord"; +import a11yPlugin from "colord/plugins/a11y"; + +extend([a11yPlugin]); + +colord("#000000").luminance(); // 0 +colord("#ccddee").luminance(); // 0.71 +colord("#ffffff").luminance(); // 1 + +colord("#000000").contrast(); // 21 (black on white) +colord("#ffffff").contrast("#000000"); // 21 (white on black) +colord("#0000ff").contrast("#ff000"); // 2.14 (blue on red) + +colord("#000000").isReadable(); // true (black on white) +colord("#ffffff").isReadable("#000000"); // true (white on black) +colord("#777777").isReadable(); // false (gray on white) +colord("#e60000").isReadable("#ffff47"); // true (normal red text on yellow bg conforms to WCAG AA) +colord("#e60000").isReadable("#ffff47", { level: "AAA" }); // false (normal red text on yellow bg does not conform to WCAG AAA) +colord("#e60000").isReadable("#ffff47", { level: "AAA", size: "large" }); // true (large red text on yellow bg conforms to WCAG AAA) +``` + +
+ +
+ cmyk (CMYK color space) 0.6 KB + +Adds support of [CMYK](https://www.sttmedia.com/colormodel-cmyk) color model. + +```js +import { colord, extend } from "colord"; +import cmykPlugin from "colord/plugins/cmyk"; + +extend([cmykPlugin]); + +colord("#ffffff").toCmyk(); // { c: 0, m: 0, y: 0, k: 0, a: 1 } +colord("#999966").toCmykString(); // "device-cmyk(0% 0% 33% 40%)" +colord({ c: 0, m: 0, y: 0, k: 100, a: 1 }).toHex(); // "#000000" +colord("device-cmyk(0% 61% 72% 0% / 50%)").toHex(); // "#ff634780" +``` + +
+ +
+ harmonies (Color harmonies) 0.15 KB + +Provides functionality to generate [harmony colors](). + +```js +import { colord, extend } from "colord"; +import harmonies from "colord/plugins/harmonies"; + +extend([harmonies]); + +const color = colord("#ff0000"); +color.harmonies("analogous").map((c) => c.toHex()); // ["#ff0080", "#ff0000", "#ff8000"] +color.harmonies("complementary").map((c) => c.toHex()); // ["#ff0000", "#00ffff"] +color.harmonies("double-split-complementary").map((c) => c.toHex()); // ["#ff0080", "#ff0000", "#ff8000", "#00ff80", "#0080ff"] +color.harmonies("rectangle").map((c) => c.toHex()); // ["#ff0000", "#ffff00", "#00ffff", "#0000ff"] +color.harmonies("split-complementary").map((c) => c.toHex()); // ["#ff0000", "#00ff80", "#0080ff"] +color.harmonies("tetradic").map((c) => c.toHex()); // ["#ff0000", "#80ff00", "#00ffff", "#8000ff"] +color.harmonies("triadic").map((c) => c.toHex()); // ["#ff0000", "#00ff00", "#0000ff"] +``` + +
+ +
+ hwb (HWB color model) 0.8 KB + +Adds support of [Hue-Whiteness-Blackness](https://en.wikipedia.org/wiki/HWB_color_model) color model. + +```js +import { colord, extend } from "colord"; +import hwbPlugin from "colord/plugins/hwb"; + +extend([hwbPlugin]); + +colord("#999966").toHwb(); // { h: 60, w: 40, b: 40, a: 1 } +colord("#003366").toHwbString(); // "hwb(210 0% 60%)" + +colord({ h: 60, w: 40, b: 40 }).toHex(); // "#999966" +colord("hwb(210 0% 60% / 50%)").toHex(); // "#00336680" +``` + +
+ +
+ lab (CIE LAB color space) 1.4 KB + +Adds support of [CIE LAB](https://en.wikipedia.org/wiki/CIELAB_color_space) color model. The conversion logic is ported from [CSS Color Module Level 4 Specification](https://www.w3.org/TR/css-color-4/#color-conversion-code). + +Also plugin provides `.delta` method for [perceived color difference calculations](https://en.wikipedia.org/wiki/Color_difference#CIEDE2000). + +```js +import { colord, extend } from "colord"; +import labPlugin from "colord/plugins/lab"; + +extend([labPlugin]); + +colord({ l: 53.24, a: 80.09, b: 67.2 }).toHex(); // "#ff0000" +colord("#ffffff").toLab(); // { l: 100, a: 0, b: 0, alpha: 1 } + +colord("#afafaf").delta("#b4b4b4"); // 0.014 +colord("#000000").delta("#ffffff"); // 1 +``` + +
+ +
+ lch (CIE LCH color space) 1.3 KB + +Adds support of [CIE LCH](https://lea.verou.me/2020/04/lch-colors-in-css-what-why-and-how/) color space. The conversion logic is ported from [CSS Color Module Level 4 Specification](https://www.w3.org/TR/css-color-4/#color-conversion-code). + +```js +import { colord, extend } from "colord"; +import lchPlugin from "colord/plugins/lch"; + +extend([lchPlugin]); + +colord({ l: 100, c: 0, h: 0 }).toHex(); // "#ffffff" +colord("lch(48.25% 30.07 196.38)").toHex(); // "#008080" + +colord("#646464").toLch(); // { l: 42.37, c: 0, h: 0, a: 1 } +colord("#646464").alpha(0.5).toLchString(); // "lch(42.37% 0 0 / 0.5)" +``` + +
+ +
+ minify (Color string minification) 0.5 KB + +A plugin adding color string minification utilities. + +```js +import { colord, extend } from "colord"; +import minifyPlugin from "colord/plugins/minify"; + +extend([minifyPlugin]); + +colord("black").minify(); // "#000" +colord("#112233").minify(); // "#123" +colord("darkgray").minify(); // "#a9a9a9" +colord("rgba(170,170,170,0.4)").minify(); // "hsla(0,0%,67%,.4)" +colord("rgba(170,170,170,0.4)").minify({ alphaHex: true }); // "#aaa6" +``` + +
+ +
+ mix (Color mixing) 0.96 KB + +A plugin adding color mixing utilities. + +In contrast to other libraries that perform RGB values mixing, Colord mixes colors through [LAB color space](https://en.wikipedia.org/wiki/CIELAB_color_space). This approach produces better results and doesn't have the drawbacks the legacy way has. + +→ [Online demo](https://3cg7o.csb.app/) + +```js +import { colord, extend } from "colord"; +import mixPlugin from "colord/plugins/mix"; + +extend([mixPlugin]); + +colord("#ffffff").mix("#000000").toHex(); // "#777777" +colord("#800080").mix("#dda0dd").toHex(); // "#af5cae" +colord("#cd853f").mix("#eee8aa", 0.6).toHex(); // "#e3c07e" +colord("#008080").mix("#808000", 0.35).toHex(); // "#50805d" +``` + +Also, the plugin provides special mixtures such as [tints, shades, and tones](https://en.wikipedia.org/wiki/Tints_and_shades): + +
+tints, shades, and tones mixtures +
+ +```js +const color = colord("#ff0000"); +color.tints(3).map((c) => c.toHex()); // ["#ff0000", "#ff9f80", "#ffffff"]; +color.shades(3).map((c) => c.toHex()); // ["#ff0000", "#7a1b0b", "#000000"]; +color.tones(3).map((c) => c.toHex()); // ["#ff0000", "#c86147", "#808080"]; +``` + +
+ +
+ names (CSS color keywords) 1.45 KB + +Provides options to convert a color into a [CSS color keyword](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#color_keywords) and vice versa. + +```js +import { colord, extend } from "colord"; +import namesPlugin from "colord/plugins/names"; + +extend([namesPlugin]); + +colord("tomato").toHex(); // "#ff6347" +colord("#00ffff").toName(); // "cyan" +colord("rgba(0, 0, 0, 0)").toName(); // "transparent" +colord("#fe0000").toName(); // undefined (the color is not specified in CSS specs) +colord("#fe0000").toName({ closest: true }); // "red" (closest color) +``` + +
+ +
+ xyz (CIE XYZ color space) 0.7 KB + +Adds support of [CIE XYZ](https://www.sttmedia.com/colormodel-xyz) color model. The conversion logic is ported from [CSS Color Module Level 4 Specification](https://www.w3.org/TR/css-color-4/#color-conversion-code). + +```js +import { colord, extend } from "colord"; +import xyzPlugin from "colord/plugins/xyz"; + +extend([xyzPlugin]); + +colord("#ffffff").toXyz(); // { x: 95.047, y: 100, z: 108.883, a: 1 } +colord({ x: 0, y: 0, z: 0 }).toHex(); // "#000000" +``` + +
+ +
---
+ +## Types + +**Colord** is written in strict TypeScript and ships with types in the library itself — no need for any other install. We provide everything you need in one tiny package. + +While not only typing its own functions and variables, **Colord** can also help you type yours. Depending on the color space you are using, you can also import and use the type that is associated with it. + +```ts +import { RgbColor, RgbaColor, HslColor, HslaColor, HsvColor, HsvaColor } from "colord"; + +const foo: HslColor = { h: 0, s: 0, l: 0 }; +const bar: RgbColor = { r: 0, g: 0, v: 0 }; // ERROR +``` + +
---
+ +## Projects using Colord + +- [cssnano](https://github.com/cssnano/cssnano) — the most popular CSS minification tool +- [Resume.io](https://resume.io/) — online resume builder with over 12,000,000 users worldwide +- [Leva](https://github.com/pmndrs/leva) — open source extensible GUI panel made for React +- [Qui Max](https://github.com/Qvant-lab/qui-max) — Vue.js design system and component library +- and [thousands more](https://github.com/omgovich/colord/network/dependents)... + +
---
+ +## Roadmap + +- [x] Parse and convert Hex, RGB(A), HSL(A), HSV(A) +- [x] Saturate, desaturate, grayscale +- [x] Trim an input value +- [x] Clamp input numbers to resolve edge cases (e.g. `rgb(256, -1, 999, 2)`) +- [x] `brightness`, `isDark`, `isLight` +- [x] Set and get `alpha` +- [x] Plugin API +- [x] 4 and 8 digit Hex +- [x] `lighten`, `darken` +- [x] `invert` +- [x] CSS color names (via plugin) +- [x] A11y and contrast utils (via plugin) +- [x] XYZ color space (via plugin) +- [x] [HWB](https://drafts.csswg.org/css-color/#the-hwb-notation) color space (via plugin) +- [x] [LAB](https://www.w3.org/TR/css-color-4/#resolving-lab-lch-values) color space (via plugin) +- [x] [LCH](https://lea.verou.me/2020/04/lch-colors-in-css-what-why-and-how/) color space (via plugin) +- [x] Mix colors (via plugin) +- [x] CMYK color space (via plugin) diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/colord.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/colord.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3013b1ffe0cb96a1420516de49f4cec9a7e389dd --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/colord.d.ts @@ -0,0 +1,103 @@ +import { AnyColor, RgbaColor, HslaColor, HsvaColor } from "./types"; +export declare class Colord { + private readonly parsed; + readonly rgba: RgbaColor; + constructor(input: AnyColor); + /** + * Returns a boolean indicating whether or not an input has been parsed successfully. + * Note: If parsing is unsuccessful, Colord defaults to black (does not throws an error). + */ + isValid(): boolean; + /** + * Returns the brightness of a color (from 0 to 1). + * The calculation logic is modified from WCAG. + * https://www.w3.org/TR/AERT/#color-contrast + */ + brightness(): number; + /** + * Same as calling `brightness() < 0.5`. + */ + isDark(): boolean; + /** + * Same as calling `brightness() >= 0.5`. + * */ + isLight(): boolean; + /** + * Returns the hexadecimal representation of a color. + * When the alpha channel value of the color is less than 1, + * it outputs #rrggbbaa format instead of #rrggbb. + */ + toHex(): string; + /** + * Converts a color to RGB color space and returns an object. + * Always includes an alpha value from 0 to 1. + */ + toRgb(): RgbaColor; + /** + * Converts a color to RGB color space and returns a string representation. + * Outputs an alpha value only if it is less than 1. + */ + toRgbString(): string; + /** + * Converts a color to HSL color space and returns an object. + * Always includes an alpha value from 0 to 1. + */ + toHsl(): HslaColor; + /** + * Converts a color to HSL color space and returns a string representation. + * Always includes an alpha value from 0 to 1. + */ + toHslString(): string; + /** + * Converts a color to HSV color space and returns an object. + * Always includes an alpha value from 0 to 1. + */ + toHsv(): HsvaColor; + /** + * Creates a new instance containing an inverted (opposite) version of the color. + */ + invert(): Colord; + /** + * Increases the HSL saturation of a color by the given amount. + */ + saturate(amount?: number): Colord; + /** + * Decreases the HSL saturation of a color by the given amount. + */ + desaturate(amount?: number): Colord; + /** + * Makes a gray color with the same lightness as a source color. + */ + grayscale(): Colord; + /** + * Increases the HSL lightness of a color by the given amount. + */ + lighten(amount?: number): Colord; + /** + * Increases the HSL lightness of a color by the given amount. + */ + darken(amount?: number): Colord; + /** + * Changes the HSL hue of a color by the given amount. + */ + rotate(amount?: number): Colord; + /** + * Allows to get or change an alpha channel value. + */ + alpha(): number; + alpha(value: number): Colord; + /** + * Allows to get or change a hue value. + */ + hue(): number; + hue(value: number): Colord; + /** + * Determines whether two values are the same color. + */ + isEqual(color: AnyColor | Colord): boolean; +} +/** + * Parses the given input color and creates a new `Colord` instance. + * See accepted input formats: https://github.com/omgovich/colord#color-parsing + */ +export declare const colord: (input: AnyColor | Colord) => Colord; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/constants.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/constants.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..554b3a69b8fca4161d4436189ebc904c49693664 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/constants.d.ts @@ -0,0 +1,10 @@ +/** + * We used to work with 2 digits after the decimal point, but it wasn't accurate enough, + * so the library produced colors that were perceived differently. + */ +export declare const ALPHA_PRECISION = 3; +/** + * Valid CSS units. + * https://developer.mozilla.org/en-US/docs/Web/CSS/angle + */ +export declare const ANGLE_UNITS: Record; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/extend.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/extend.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..015b89f30905b5dd0da9ee8ae6983bcd18b9211b --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/extend.d.ts @@ -0,0 +1,4 @@ +import { Colord } from "./colord"; +import { Parsers } from "./types"; +export declare type Plugin = (ColordClass: typeof Colord, parsers: Parsers) => void; +export declare const extend: (plugins: Plugin[]) => void; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/helpers.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/helpers.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..64eb369ba3a8b32c25e2af350765ea89efd6fa4a --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/helpers.d.ts @@ -0,0 +1,20 @@ +export declare const isPresent: (value: unknown) => boolean; +export declare const round: (number: number, digits?: number, base?: number) => number; +export declare const floor: (number: number, digits?: number, base?: number) => number; +/** + * Clamps a value between an upper and lower bound. + * We use ternary operators because it makes the minified code + * is 2 times shorter then `Math.min(Math.max(a,b),c)` + * NaN is clamped to the lower bound + */ +export declare const clamp: (number: number, min?: number, max?: number) => number; +/** + * Processes and clamps a degree (angle) value properly. + * Any `NaN` or `Infinity` will be converted to `0`. + * Examples: -1 => 359, 361 => 1 + */ +export declare const clampHue: (degrees: number) => number; +/** + * Converts a hue value to degrees from 0 to 360 inclusive. + */ +export declare const parseHue: (value: string, unit?: string) => number; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/index.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e298876c0df7a1e80bd2f2a51320ba2ff6025562 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/index.d.ts @@ -0,0 +1,5 @@ +export { colord, Colord } from "./colord"; +export { extend, Plugin } from "./extend"; +export { getFormat } from "./parse"; +export { random } from "./random"; +export { HslColor, HslaColor, HsvColor, HsvaColor, HwbColor, HwbaColor, LabColor, LabaColor, LchColor, LchaColor, RgbColor, RgbaColor, XyzColor, XyzaColor, AnyColor, } from "./types"; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/index.js b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/index.js new file mode 100644 index 0000000000000000000000000000000000000000..f7a26ef8bc275752d1812d510a493cd158d02dde --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/index.js @@ -0,0 +1 @@ +Object.defineProperty(exports,"__esModule",{value:!0});var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},o=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},a=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},s=/^#([0-9a-f]{3,8})$/i,i=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,o=Math.max(t,n,e),a=o-Math.min(t,n,e),s=a?o===t?(n-e)/a:o===n?2+(e-t)/a:4+(t-n)/a:0;return{h:60*(s<0?s+6:s),s:o?a/o*100:0,v:o/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var o=Math.floor(t),a=e*(1-n),s=e*(1-(t-o)*n),i=e*(1-(1-t+o)*n),h=o%6;return{r:255*[e,s,a,a,i,e][h],g:255*[i,e,e,s,a,a][h],b:255*[a,a,i,e,e,s][h],a:u}},d=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},g=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},p=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,c=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=s.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:o({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||c.exec(t);if(!n)return null;var e,u,o=d({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(o)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,a=r.a,s=void 0===a?1:a;return t(n)&&t(e)&&t(u)?o({r:Number(n),g:Number(e),b:Number(u),a:Number(s)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,o=r.a,a=void 0===o?1:o;if(!t(n)||!t(e)||!t(u))return null;var s=d({h:Number(n),s:Number(e),l:Number(u),a:Number(a)});return f(s)},"hsl"],[function(r){var n=r.h,o=r.s,a=r.v,s=r.a,i=void 0===s?1:s;if(!t(n)||!t(o)||!t(a))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(o),v:Number(a),a:Number(i)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n=.5},r.prototype.toHex=function(){return r=a(this.rgba),t=r.r,e=r.g,u=r.b,s=(o=r.a)<1?i(n(255*o)):"","#"+i(t)+i(e)+i(u)+s;var r,t,e,u,o,s},r.prototype.toRgb=function(){return a(this.rgba)},r.prototype.toRgbString=function(){return r=a(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return g(p(this.rgba))},r.prototype.toHslString=function(){return r=g(p(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return j({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),j(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),j(M(this.rgba,-r))},r.prototype.grayscale=function(){return j(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),j(H(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),j(H(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?j({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=p(this.rgba);return"number"==typeof r?j({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===j(r).toHex()},r}(),j=function(r){return r instanceof $?r:new $(r)},w=[];exports.Colord=$,exports.colord=j,exports.extend=function(r){r.forEach(function(r){w.indexOf(r)<0&&(r($,y),w.push(r))})},exports.getFormat=function(r){return x(r)[1]},exports.random=function(){return new $({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/index.mjs b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..73b6deef284c0222d6f678afa3d27c8e02fbef67 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/index.mjs @@ -0,0 +1 @@ +var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return"number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};export{j as Colord,w as colord,k as extend,I as getFormat,E as random}; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/package.json b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/package.json new file mode 100644 index 0000000000000000000000000000000000000000..93f3ca386429119f7df96742146242dece16f11a --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/package.json @@ -0,0 +1,254 @@ +{ + "name": "@pixi/colord", + "version": "2.9.6", + "description": "👑 A tiny yet powerful tool for high-performance color manipulations and conversions", + "keywords": [ + "color", + "parser", + "convert", + "tiny", + "hex", + "rgb", + "hsl", + "hsv", + "hwb", + "lab", + "lch", + "xyz", + "css", + "color-names", + "a11y", + "cmyk", + "mix", + "minify", + "harmonies" + ], + "repository": "omgovich/colord", + "author": "Vlad Shilov ", + "license": "MIT", + "sideEffects": false, + "main": "./index.js", + "module": "./index.mjs", + "exports": { + ".": { + "import": { + "types": "./index.d.ts", + "default": "./index.mjs" + }, + "require": { + "types": "./index.d.ts", + "default": "./index.js" + } + }, + "./plugins/a11y": { + "import": { + "types": "./plugins/a11y.d.ts", + "default": "./plugins/a11y.mjs" + }, + "require": { + "types": "./plugins/a11y.d.ts", + "default": "./plugins/a11y.js" + } + }, + "./plugins/cmyk": { + "import": { + "types": "./plugins/cmyk.d.ts", + "default": "./plugins/cmyk.mjs" + }, + "require": { + "types": "./plugins/cmyk.d.ts", + "default": "./plugins/cmyk.js" + } + }, + "./plugins/harmonies": { + "import": { + "types": "./plugins/harmonies.d.ts", + "default": "./plugins/harmonies.mjs" + }, + "require": { + "types": "./plugins/harmonies.d.ts", + "default": "./plugins/harmonies.js" + } + }, + "./plugins/hwb": { + "import": { + "types": "./plugins/hwb.d.ts", + "default": "./plugins/hwb.mjs" + }, + "require": { + "types": "./plugins/hwb.d.ts", + "default": "./plugins/hwb.js" + } + }, + "./plugins/lab": { + "import": { + "types": "./plugins/lab.d.ts", + "default": "./plugins/lab.mjs" + }, + "require": { + "types": "./plugins/lab.d.ts", + "default": "./plugins/lab.js" + } + }, + "./plugins/lch": { + "import": { + "types": "./plugins/lch.d.ts", + "default": "./plugins/lch.mjs" + }, + "require": { + "types": "./plugins/lch.d.ts", + "default": "./plugins/lch.js" + } + }, + "./plugins/minify": { + "import": { + "types": "./plugins/minify.d.ts", + "default": "./plugins/minify.mjs" + }, + "require": { + "types": "./plugins/minify.d.ts", + "default": "./plugins/minify.js" + } + }, + "./plugins/mix": { + "import": { + "types": "./plugins/mix.d.ts", + "default": "./plugins/mix.mjs" + }, + "require": { + "types": "./plugins/mix.d.ts", + "default": "./plugins/mix.js" + } + }, + "./plugins/names": { + "import": { + "types": "./plugins/names.d.ts", + "default": "./plugins/names.mjs" + }, + "require": { + "types": "./plugins/names.d.ts", + "default": "./plugins/names.js" + } + }, + "./plugins/xyz": { + "import": { + "types": "./plugins/xyz.d.ts", + "default": "./plugins/xyz.mjs" + }, + "require": { + "types": "./plugins/xyz.d.ts", + "default": "./plugins/xyz.js" + } + }, + "./package.json": "./package.json" + }, + "files": [ + "*.{js,mjs,ts,map}", + "plugins/*.{js,mjs,ts,map}" + ], + "types": "index.d.ts", + "scripts": { + "lint": "eslint src/**/*.ts", + "size": "npm run build && size-limit", + "check-types": "tsc --noEmit true", + "test": "jest tests --coverage", + "benchmark": "tsc --outDir bench --skipLibCheck --esModuleInterop ./tests/benchmark.ts && node ./bench/tests/benchmark.js && rm -rf ./bench", + "build": "rollup --config", + "release": "npm run build && cp *.json dist && cp *.md dist && npm publish dist", + "check-release": "npm run release -- --dry-run" + }, + "dependencies": {}, + "devDependencies": { + "@size-limit/preset-small-lib": "^4.10.1", + "@types/jest": "^26.0.22", + "@typescript-eslint/eslint-plugin": "^4.19.0", + "@typescript-eslint/parser": "^4.19.0", + "ac-colors": "^1.4.2", + "benny": "^3.6.15", + "chroma-js": "^2.1.1", + "color": "^3.1.3", + "eslint": "^7.14.0", + "eslint-config-prettier": "^6.15.0", + "eslint-plugin-prettier": "^3.1.4", + "glob": "^7.1.6", + "jest": "^26.6.3", + "prettier": "^2.2.0", + "rollup": "^2.43.1", + "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-typescript2": "^0.30.0", + "size-limit": "^4.10.1", + "tinycolor2": "^1.4.2", + "ts-jest": "^26.5.4", + "ts-node": "^9.1.1", + "tslib": "^2.6.2", + "typescript": "^4.2.3" + }, + "jest": { + "verbose": true, + "transform": { + "^.+\\.ts$": "ts-jest" + } + }, + "eslintConfig": { + "plugins": [ + "prettier" + ], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended", + "prettier/@typescript-eslint" + ] + }, + "prettier": { + "printWidth": 100 + }, + "size-limit": [ + { + "path": "dist/index.mjs", + "import": "{ colord }", + "limit": "2 KB" + }, + { + "path": "dist/plugins/a11y.mjs", + "limit": "0.5 KB" + }, + { + "path": "dist/plugins/cmyk.mjs", + "limit": "1 KB" + }, + { + "path": "dist/plugins/harmonies.mjs", + "limit": "0.5 KB" + }, + { + "path": "dist/plugins/hwb.mjs", + "limit": "1 KB" + }, + { + "path": "dist/plugins/lab.mjs", + "limit": "1.5 KB" + }, + { + "path": "dist/plugins/lch.mjs", + "limit": "1.5 KB" + }, + { + "path": "dist/plugins/minify.mjs", + "limit": "0.6 KB" + }, + { + "path": "dist/plugins/mix.mjs", + "limit": "1 KB" + }, + { + "path": "dist/plugins/names.mjs", + "limit": "1.5 KB" + }, + { + "path": "dist/plugins/xyz.mjs", + "limit": "1 KB" + } + ] +} diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/parse.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/parse.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0901dfeb19d5ad6bf11b15d89dd9d5c888c0100b --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/parse.d.ts @@ -0,0 +1,8 @@ +import { Parsers, ParseResult, Input, Format } from "./types"; +export declare const parsers: Parsers; +/** Tries to convert an incoming value into RGBA color by going through all color model parsers */ +export declare const parse: (input: Input) => ParseResult | [null, undefined]; +/** + * Returns a color model name for the input passed to the function. + */ +export declare const getFormat: (input: Input) => Format | undefined; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/a11y.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/a11y.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..69a10cb12c4ba7f52e238ae0afbecff77cb3ebcf --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/a11y.d.ts @@ -0,0 +1,38 @@ +import { AnyColor } from "../types"; +import { Plugin } from "../extend"; +interface ReadabilityOptions { + level?: "AA" | "AAA"; + size?: "normal" | "large"; +} +declare module "../colord" { + interface Colord { + /** + * Returns the relative luminance of a color, + * normalized to 0 for darkest black and 1 for lightest white. + * https://www.w3.org/TR/WCAG20/#relativeluminancedef + * https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_Colors_and_Luminance + */ + luminance(): number; + /** + * Calculates a contrast ratio for a color pair. + * This luminance difference is expressed as a ratio ranging + * from 1 (e.g. white on white) to 21 (e.g., black on a white). + * WCAG requires a ratio of at least 4.5 for normal text and 3 for large text. + * https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html + * https://webaim.org/articles/contrast/ + */ + contrast(color2?: AnyColor | Colord): number; + /** + * Checks that a background and text color pair conforms to WCAG 2.0 requirements. + * https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html + */ + isReadable(color2?: AnyColor | Colord, options?: ReadabilityOptions): boolean; + } +} +/** + * A plugin adding accessibility and color contrast utilities. + * Follows Web Content Accessibility Guidelines 2.0. + * https://www.w3.org/TR/WCAG20/ + */ +declare const a11yPlugin: Plugin; +export default a11yPlugin; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/a11y.js b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/a11y.js new file mode 100644 index 0000000000000000000000000000000000000000..d59f207f4ae2fb11a5bb66782ef7570b02496ebd --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/a11y.js @@ -0,0 +1 @@ +var o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},t=function(t){return.2126*o(t.r)+.7152*o(t.g)+.0722*o(t.b)};module.exports=function(o){o.prototype.luminance=function(){return o=t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r="#FFF");var n,i,a,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),u=t(e),d=t(v),n=u>d?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(i=2)&&(i=0),void 0===a&&(a=Math.pow(10,i)),Math.floor(a*n)/a+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o="#FFF"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(a=(r=t).size)?"normal":a,"AAA"===(i=void 0===(n=r.level)?"AA":n)&&"normal"===e?7:"AA"===i&&"large"===e?3:4.5);var r,n,i,a,e}}; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/a11y.mjs b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/a11y.mjs new file mode 100644 index 0000000000000000000000000000000000000000..eef95c5e279563a93bbe94d6b2cf19d94bbce622 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/a11y.mjs @@ -0,0 +1 @@ +var o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},t=function(t){return.2126*o(t.r)+.7152*o(t.g)+.0722*o(t.b)};export default function(o){o.prototype.luminance=function(){return o=t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r="#FFF");var n,a,i,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),u=t(e),d=t(v),n=u>d?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(a=2)&&(a=0),void 0===i&&(i=Math.pow(10,a)),Math.floor(i*n)/i+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o="#FFF"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(i=(r=t).size)?"normal":i,"AAA"===(a=void 0===(n=r.level)?"AA":n)&&"normal"===e?7:"AA"===a&&"large"===e?3:4.5);var r,n,a,i,e}} diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/cmyk.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/cmyk.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..36c302a937778a5d0f17f2509e8a839db6e049ce --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/cmyk.d.ts @@ -0,0 +1,24 @@ +import { CmykaColor } from "../types"; +import { Plugin } from "../extend"; +declare module "../colord" { + interface Colord { + /** + * Converts a color to CMYK color space and returns an object. + * https://drafts.csswg.org/css-color/#cmyk-colors + * https://lea.verou.me/2009/03/cmyk-colors-in-css-useful-or-useless/ + */ + toCmyk(): CmykaColor; + /** + * Converts a color to CMYK color space and returns a string. + * https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/device-cmyk() + */ + toCmykString(): string; + } +} +/** + * A plugin adding support for CMYK color space. + * https://lea.verou.me/2009/03/cmyk-colors-in-css-useful-or-useless/ + * https://en.wikipedia.org/wiki/CMYK_color_model + */ +declare const cmykPlugin: Plugin; +export default cmykPlugin; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/cmyk.js b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/cmyk.js new file mode 100644 index 0000000000000000000000000000000000000000..eb89c7b841860f1dc826180cb6b21f21c01b6187 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/cmyk.js @@ -0,0 +1 @@ +var r=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=Math.pow(10,n)),Math.round(t*r)/t+0},t=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=1),r>t?t:r>n?r:n},u=function(r){return{c:t(r.c,0,100),m:t(r.m,0,100),y:t(r.y,0,100),k:t(r.k,0,100),a:t(r.a)}},e=function(r){return{c:n(r.c,2),m:n(r.m,2),y:n(r.y,2),k:n(r.k,2),a:n(r.a,3)}};function c(r){return{r:n(255*(1-r.c/100)*(1-r.k/100)),g:n(255*(1-r.m/100)*(1-r.k/100)),b:n(255*(1-r.y/100)*(1-r.k/100)),a:r.a}}function o(r){var t=1-Math.max(r.r/255,r.g/255,r.b/255),u=(1-r.r/255-t)/(1-t),e=(1-r.g/255-t)/(1-t),c=(1-r.b/255-t)/(1-t);return{c:isNaN(u)?0:n(100*u),m:isNaN(e)?0:n(100*e),y:isNaN(c)?0:n(100*c),k:n(100*t),a:r.a}}function i(n){var t=n.c,e=n.m,o=n.y,i=n.k,m=n.a,a=void 0===m?1:m;return r(t)&&r(e)&&r(o)&&r(i)?c(u({c:Number(t),m:Number(e),y:Number(o),k:Number(i),a:Number(a)})):null}var m=/^device-cmyk\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,a=function(r){var n=m.exec(r);return n?c(u({c:Number(n[1])*(n[2]?1:100),m:Number(n[3])*(n[4]?1:100),y:Number(n[5])*(n[6]?1:100),k:Number(n[7])*(n[8]?1:100),a:void 0===n[9]?1:Number(n[9])/(n[10]?100:1)})):null};module.exports=function(r,n){r.prototype.toCmyk=function(){return e(o(this.rgba))},r.prototype.toCmykString=function(){return r=e(o(this.rgba)),n=r.c,t=r.m,u=r.y,c=r.k,(i=r.a)<1?"device-cmyk("+n+"% "+t+"% "+u+"% "+c+"% / "+i+")":"device-cmyk("+n+"% "+t+"% "+u+"% "+c+"%)";var r,n,t,u,c,i},n.object.push([i,"cmyk"]),n.string.push([a,"cmyk"])}; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/cmyk.mjs b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/cmyk.mjs new file mode 100644 index 0000000000000000000000000000000000000000..febf50e21365c98b8ae180d03d083ef2cd067bd2 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/cmyk.mjs @@ -0,0 +1 @@ +var r=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=Math.pow(10,n)),Math.round(t*r)/t+0},t=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=1),r>t?t:r>n?r:n},u=function(r){return{c:t(r.c,0,100),m:t(r.m,0,100),y:t(r.y,0,100),k:t(r.k,0,100),a:t(r.a)}},e=function(r){return{c:n(r.c,2),m:n(r.m,2),y:n(r.y,2),k:n(r.k,2),a:n(r.a,3)}};function c(r){return{r:n(255*(1-r.c/100)*(1-r.k/100)),g:n(255*(1-r.m/100)*(1-r.k/100)),b:n(255*(1-r.y/100)*(1-r.k/100)),a:r.a}}function i(r){var t=1-Math.max(r.r/255,r.g/255,r.b/255),u=(1-r.r/255-t)/(1-t),e=(1-r.g/255-t)/(1-t),c=(1-r.b/255-t)/(1-t);return{c:isNaN(u)?0:n(100*u),m:isNaN(e)?0:n(100*e),y:isNaN(c)?0:n(100*c),k:n(100*t),a:r.a}}function o(n){var t=n.c,e=n.m,i=n.y,o=n.k,m=n.a,a=void 0===m?1:m;return r(t)&&r(e)&&r(i)&&r(o)?c(u({c:Number(t),m:Number(e),y:Number(i),k:Number(o),a:Number(a)})):null}var m=/^device-cmyk\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,a=function(r){var n=m.exec(r);return n?c(u({c:Number(n[1])*(n[2]?1:100),m:Number(n[3])*(n[4]?1:100),y:Number(n[5])*(n[6]?1:100),k:Number(n[7])*(n[8]?1:100),a:void 0===n[9]?1:Number(n[9])/(n[10]?100:1)})):null};export default function(r,n){r.prototype.toCmyk=function(){return e(i(this.rgba))},r.prototype.toCmykString=function(){return r=e(i(this.rgba)),n=r.c,t=r.m,u=r.y,c=r.k,(o=r.a)<1?"device-cmyk("+n+"% "+t+"% "+u+"% "+c+"% / "+o+")":"device-cmyk("+n+"% "+t+"% "+u+"% "+c+"%)";var r,n,t,u,c,o},n.object.push([o,"cmyk"]),n.string.push([a,"cmyk"])} diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/harmonies.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/harmonies.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..718992b07f25d90d616efd407ba4caed3c9f0bdc --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/harmonies.d.ts @@ -0,0 +1,16 @@ +import { Plugin } from "../extend"; +export declare type HarmonyType = "analogous" | "complementary" | "double-split-complementary" | "rectangle" | "split-complementary" | "tetradic" | "triadic"; +declare module "../colord" { + interface Colord { + /** + * Returns an array of harmony colors as `Colord` instances. + */ + harmonies(type?: HarmonyType): Colord[]; + } +} +/** + * A plugin adding functionality to generate harmony colors. + * https://en.wikipedia.org/wiki/Harmony_(color) + */ +declare const harmoniesPlugin: Plugin; +export default harmoniesPlugin; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/harmonies.js b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/harmonies.js new file mode 100644 index 0000000000000000000000000000000000000000..4087b16d04f951aa21e57c29df4c55a7fb5cd942 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/harmonies.js @@ -0,0 +1 @@ +module.exports=function(t){var e={analogous:[-30,0,30],complementary:[0,180],"double-split-complementary":[-30,0,30,150,210],rectangle:[0,60,180,240],tetradic:[0,90,180,270],triadic:[0,120,240],"split-complementary":[0,150,210]};t.prototype.harmonies=function(t){var o=this;return void 0===t&&(t="complementary"),e[t].map(function(t){return o.rotate(t)})}}; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/harmonies.mjs b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/harmonies.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c9fe61215ddc823a6dde8d3e7255e32386fcd0a3 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/harmonies.mjs @@ -0,0 +1 @@ +export default function(t){var e={analogous:[-30,0,30],complementary:[0,180],"double-split-complementary":[-30,0,30,150,210],rectangle:[0,60,180,240],tetradic:[0,90,180,270],triadic:[0,120,240],"split-complementary":[0,150,210]};t.prototype.harmonies=function(t){var r=this;return void 0===t&&(t="complementary"),e[t].map(function(t){return r.rotate(t)})}} diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/hwb.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/hwb.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..709fde3de135ab376431caed0dc9b4926d4ec6be --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/hwb.d.ts @@ -0,0 +1,23 @@ +import { HwbaColor } from "../types"; +import { Plugin } from "../extend"; +declare module "../colord" { + interface Colord { + /** + * Converts a color to HWB (Hue-Whiteness-Blackness) color space and returns an object. + * https://en.wikipedia.org/wiki/HWB_color_model + */ + toHwb(): HwbaColor; + /** + * Converts a color to HWB (Hue-Whiteness-Blackness) color space and returns a string. + * https://www.w3.org/TR/css-color-4/#the-hwb-notation + */ + toHwbString(): string; + } +} +/** + * A plugin adding support for HWB (Hue-Whiteness-Blackness) color model. + * https://en.wikipedia.org/wiki/HWB_color_model + * https://www.w3.org/TR/css-color-4/#the-hwb-notation + */ +declare const hwbPlugin: Plugin; +export default hwbPlugin; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/hwb.js b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/hwb.js new file mode 100644 index 0000000000000000000000000000000000000000..90d65293c0d7ed0d4a826f9fe47242c127e1a683 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/hwb.js @@ -0,0 +1 @@ +var r={grad:.9,turn:360,rad:360/(2*Math.PI)},n=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},t=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=Math.pow(10,n)),Math.round(t*r)/t+0},u=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=1),r>t?t:r>n?r:n},a=function(r){return{h:(n=r.h,(n=isFinite(n)?n%360:0)>0?n:n+360),w:u(r.w,0,100),b:u(r.b,0,100),a:u(r.a)};var n},e=function(r){return{h:t(r.h),w:t(r.w),b:t(r.b),a:t(r.a,3)}},o=function(r){return{h:function(r){var n=r.r,t=r.g,u=r.b,a=r.a,e=Math.max(n,t,u),o=e-Math.min(n,t,u),b=o?e===n?(t-u)/o:e===t?2+(u-n)/o:4+(n-t)/o:0;return{h:60*(b<0?b+6:b),s:e?o/e*100:0,v:e/255*100,a:a}}(r).h,w:Math.min(r.r,r.g,r.b)/255*100,b:100-Math.max(r.r,r.g,r.b)/255*100,a:r.a}},b=function(r){return function(r){var n=r.h,t=r.s,u=r.v,a=r.a;n=n/360*6,t/=100,u/=100;var e=Math.floor(n),o=u*(1-t),b=u*(1-(n-e)*t),i=u*(1-(1-n+e)*t),h=e%6;return{r:255*[u,b,o,o,i,u][h],g:255*[i,u,u,b,o,o][h],b:255*[o,o,i,u,u,b][h],a:a}}({h:r.h,s:100===r.b?0:100-r.w/(100-r.b)*100,v:100-r.b,a:r.a})},i=function(r){var t=r.h,u=r.w,e=r.b,o=r.a,i=void 0===o?1:o;if(!n(t)||!n(u)||!n(e))return null;var h=a({h:Number(t),w:Number(u),b:Number(e),a:Number(i)});return b(h)},h=/^hwb\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,d=function(n){var t=h.exec(n);if(!t)return null;var u,e,o=a({h:(u=t[1],e=t[2],void 0===e&&(e="deg"),Number(u)*(r[e]||1)),w:Number(t[3]),b:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return b(o)};module.exports=function(r,n){r.prototype.toHwb=function(){return e(o(this.rgba))},r.prototype.toHwbString=function(){return r=e(o(this.rgba)),n=r.h,t=r.w,u=r.b,(a=r.a)<1?"hwb("+n+" "+t+"% "+u+"% / "+a+")":"hwb("+n+" "+t+"% "+u+"%)";var r,n,t,u,a},n.string.push([d,"hwb"]),n.object.push([i,"hwb"])}; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/hwb.mjs b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/hwb.mjs new file mode 100644 index 0000000000000000000000000000000000000000..292bd9f0d557a4e0adf5f56078609ec230276958 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/hwb.mjs @@ -0,0 +1 @@ +var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},u=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},a=function(r){return{h:(t=r.h,(t=isFinite(t)?t%360:0)>0?t:t+360),w:u(r.w,0,100),b:u(r.b,0,100),a:u(r.a)};var t},e=function(r){return{h:n(r.h),w:n(r.w),b:n(r.b),a:n(r.a,3)}},b=function(r){return{h:function(r){var t=r.r,n=r.g,u=r.b,a=r.a,e=Math.max(t,n,u),b=e-Math.min(t,n,u),o=b?e===t?(n-u)/b:e===n?2+(u-t)/b:4+(t-n)/b:0;return{h:60*(o<0?o+6:o),s:e?b/e*100:0,v:e/255*100,a:a}}(r).h,w:Math.min(r.r,r.g,r.b)/255*100,b:100-Math.max(r.r,r.g,r.b)/255*100,a:r.a}},o=function(r){return function(r){var t=r.h,n=r.s,u=r.v,a=r.a;t=t/360*6,n/=100,u/=100;var e=Math.floor(t),b=u*(1-n),o=u*(1-(t-e)*n),i=u*(1-(1-t+e)*n),h=e%6;return{r:255*[u,o,b,b,i,u][h],g:255*[i,u,u,o,b,b][h],b:255*[b,b,i,u,u,o][h],a:a}}({h:r.h,s:100===r.b?0:100-r.w/(100-r.b)*100,v:100-r.b,a:r.a})},i=function(r){var n=r.h,u=r.w,e=r.b,b=r.a,i=void 0===b?1:b;if(!t(n)||!t(u)||!t(e))return null;var h=a({h:Number(n),w:Number(u),b:Number(e),a:Number(i)});return o(h)},h=/^hwb\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,d=function(t){var n=h.exec(t);if(!n)return null;var u,e,b=a({h:(u=n[1],e=n[2],void 0===e&&(e="deg"),Number(u)*(r[e]||1)),w:Number(n[3]),b:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return o(b)};export default function(r,t){r.prototype.toHwb=function(){return e(b(this.rgba))},r.prototype.toHwbString=function(){return r=e(b(this.rgba)),t=r.h,n=r.w,u=r.b,(a=r.a)<1?"hwb("+t+" "+n+"% "+u+"% / "+a+")":"hwb("+t+" "+n+"% "+u+"%)";var r,t,n,u,a},t.string.push([d,"hwb"]),t.object.push([i,"hwb"])} diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lab.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lab.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5b86ce884e852f09c430b6a9aaffd4b3974a3420 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lab.d.ts @@ -0,0 +1,23 @@ +import { LabaColor, AnyColor } from "../types"; +import { Plugin } from "../extend"; +declare module "../colord" { + interface Colord { + /** + * Converts a color to CIELAB color space and returns an object. + * The object always includes `alpha` value [0, 1]. + */ + toLab(): LabaColor; + /** + * Calculates the perceived color difference for two colors according to + * [Delta E2000](https://en.wikipedia.org/wiki/Color_difference#CIEDE2000). + * Returns a value in [0, 1] range. + */ + delta(color?: AnyColor | Colord): number; + } +} +/** + * A plugin adding support for CIELAB color space. + * https://en.wikipedia.org/wiki/CIELAB_color_space + */ +declare const labPlugin: Plugin; +export default labPlugin; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lab.js b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lab.js new file mode 100644 index 0000000000000000000000000000000000000000..267e6e0b0349e6513d67014b63fc6cd67dc8a57b --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lab.js @@ -0,0 +1 @@ +var a=function(a){return"string"==typeof a?a.length>0:"number"==typeof a},t=function(a,t,o){return void 0===t&&(t=0),void 0===o&&(o=Math.pow(10,t)),Math.round(o*a)/o+0},o=function(a,t,o){return void 0===t&&(t=0),void 0===o&&(o=1),a>o?o:a>t?a:t},r=function(a){var t=a/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},h=function(a){return 255*(a>.0031308?1.055*Math.pow(a,1/2.4)-.055:12.92*a)},n=96.422,p=100,M=82.521,u=function(a){var t,r,n={x:.9555766*(t=a).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return r={r:h(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:h(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:h(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:a.a},{r:o(r.r,0,255),g:o(r.g,0,255),b:o(r.b,0,255),a:o(r.a)}},e=function(a){var t=r(a.r),h=r(a.g),u=r(a.b);return function(a){return{x:o(a.x,0,n),y:o(a.y,0,p),z:o(a.z,0,M),a:o(a.a)}}(function(a){return{x:1.0478112*a.x+.0228866*a.y+-.050127*a.z,y:.0295424*a.x+.9904844*a.y+-.0170491*a.z,z:-.0092345*a.x+.0150436*a.y+.7521316*a.z,a:a.a}}({x:100*(.4124564*t+.3575761*h+.1804375*u),y:100*(.2126729*t+.7151522*h+.072175*u),z:100*(.0193339*t+.119192*h+.9503041*u),a:a.a}))},w=216/24389,b=24389/27,i=function(t){var r=t.l,h=t.a,n=t.b,p=t.alpha,M=void 0===p?1:p;if(!a(r)||!a(h)||!a(n))return null;var u=function(a){return{l:o(a.l,0,400),a:a.a,b:a.b,alpha:o(a.alpha)}}({l:Number(r),a:Number(h),b:Number(n),alpha:Number(M)});return l(u)},l=function(a){var t=(a.l+16)/116,o=a.a/500+t,r=t-a.b/200;return u({x:(Math.pow(o,3)>w?Math.pow(o,3):(116*o-16)/b)*n,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/b)*p,z:(Math.pow(r,3)>w?Math.pow(r,3):(116*r-16)/b)*M,a:a.alpha})};module.exports=function(a,r){a.prototype.toLab=function(){return o=e(this.rgba),h=o.y/p,u=o.z/M,r=(r=o.x/n)>w?Math.cbrt(r):(b*r+16)/116,a={l:116*(h=h>w?Math.cbrt(h):(b*h+16)/116)-16,a:500*(r-h),b:200*(h-(u=u>w?Math.cbrt(u):(b*u+16)/116)),alpha:o.a},{l:t(a.l,2),a:t(a.a,2),b:t(a.b,2),alpha:t(a.alpha,3)};var a,o,r,h,u},a.prototype.delta=function(r){void 0===r&&(r="#FFF");var h=r instanceof a?r:new a(r),n=function(a,t){var o=a.l,r=a.a,h=a.b,n=t.l,p=t.a,M=t.b,u=180/Math.PI,e=Math.PI/180,w=Math.pow(Math.pow(r,2)+Math.pow(h,2),.5),b=Math.pow(Math.pow(p,2)+Math.pow(M,2),.5),i=(o+n)/2,l=Math.pow((w+b)/2,7),c=.5*(1-Math.pow(l/(l+Math.pow(25,7)),.5)),f=r*(1+c),y=p*(1+c),v=Math.pow(Math.pow(f,2)+Math.pow(h,2),.5),x=Math.pow(Math.pow(y,2)+Math.pow(M,2),.5),z=(v+x)/2,s=0===f&&0===h?0:Math.atan2(h,f)*u,d=0===y&&0===M?0:Math.atan2(M,y)*u;s<0&&(s+=360),d<0&&(d+=360);var g=d-s,m=Math.abs(d-s);m>180&&d<=s?g+=360:m>180&&d>s&&(g-=360);var N=s+d;m<=180?N/=2:N=(s+d<360?N+360:N-360)/2;var F=1-.17*Math.cos(e*(N-30))+.24*Math.cos(2*e*N)+.32*Math.cos(e*(3*N+6))-.2*Math.cos(e*(4*N-63)),L=n-o,I=x-v,P=2*Math.sin(e*g/2)*Math.pow(v*x,.5),j=1+.015*Math.pow(i-50,2)/Math.pow(20+Math.pow(i-50,2),.5),k=1+.045*z,q=1+.015*z*F,A=30*Math.exp(-1*Math.pow((N-275)/25,2)),B=-2*Math.pow(l/(l+Math.pow(25,7)),.5)*Math.sin(2*e*A);return Math.pow(Math.pow(L/1/j,2)+Math.pow(I/1/k,2)+Math.pow(P/1/q,2)+B*I*P/(1*k*1*q),.5)}(this.toLab(),h.toLab())/100;return o(t(n,3))},r.object.push([i,"lab"])}; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lab.mjs b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lab.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a852df368c7ff77af2e260e40d32a8760a707990 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lab.mjs @@ -0,0 +1 @@ +var a=function(a){return"string"==typeof a?a.length>0:"number"==typeof a},t=function(a,t,o){return void 0===t&&(t=0),void 0===o&&(o=Math.pow(10,t)),Math.round(o*a)/o+0},o=function(a,t,o){return void 0===t&&(t=0),void 0===o&&(o=1),a>o?o:a>t?a:t},r=function(a){var t=a/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},h=function(a){return 255*(a>.0031308?1.055*Math.pow(a,1/2.4)-.055:12.92*a)},n=96.422,p=100,M=82.521,u=function(a){var t,r,n={x:.9555766*(t=a).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return r={r:h(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:h(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:h(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:a.a},{r:o(r.r,0,255),g:o(r.g,0,255),b:o(r.b,0,255),a:o(r.a)}},e=function(a){var t=r(a.r),h=r(a.g),u=r(a.b);return function(a){return{x:o(a.x,0,n),y:o(a.y,0,p),z:o(a.z,0,M),a:o(a.a)}}(function(a){return{x:1.0478112*a.x+.0228866*a.y+-.050127*a.z,y:.0295424*a.x+.9904844*a.y+-.0170491*a.z,z:-.0092345*a.x+.0150436*a.y+.7521316*a.z,a:a.a}}({x:100*(.4124564*t+.3575761*h+.1804375*u),y:100*(.2126729*t+.7151522*h+.072175*u),z:100*(.0193339*t+.119192*h+.9503041*u),a:a.a}))},w=216/24389,b=24389/27,i=function(t){var r=t.l,h=t.a,n=t.b,p=t.alpha,M=void 0===p?1:p;if(!a(r)||!a(h)||!a(n))return null;var u=function(a){return{l:o(a.l,0,400),a:a.a,b:a.b,alpha:o(a.alpha)}}({l:Number(r),a:Number(h),b:Number(n),alpha:Number(M)});return l(u)},l=function(a){var t=(a.l+16)/116,o=a.a/500+t,r=t-a.b/200;return u({x:(Math.pow(o,3)>w?Math.pow(o,3):(116*o-16)/b)*n,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/b)*p,z:(Math.pow(r,3)>w?Math.pow(r,3):(116*r-16)/b)*M,a:a.alpha})};export default function(a,r){a.prototype.toLab=function(){return o=e(this.rgba),h=o.y/p,u=o.z/M,r=(r=o.x/n)>w?Math.cbrt(r):(b*r+16)/116,a={l:116*(h=h>w?Math.cbrt(h):(b*h+16)/116)-16,a:500*(r-h),b:200*(h-(u=u>w?Math.cbrt(u):(b*u+16)/116)),alpha:o.a},{l:t(a.l,2),a:t(a.a,2),b:t(a.b,2),alpha:t(a.alpha,3)};var a,o,r,h,u},a.prototype.delta=function(r){void 0===r&&(r="#FFF");var h=r instanceof a?r:new a(r),n=function(a,t){var o=a.l,r=a.a,h=a.b,n=t.l,p=t.a,M=t.b,u=180/Math.PI,e=Math.PI/180,w=Math.pow(Math.pow(r,2)+Math.pow(h,2),.5),b=Math.pow(Math.pow(p,2)+Math.pow(M,2),.5),i=(o+n)/2,l=Math.pow((w+b)/2,7),c=.5*(1-Math.pow(l/(l+Math.pow(25,7)),.5)),f=r*(1+c),y=p*(1+c),v=Math.pow(Math.pow(f,2)+Math.pow(h,2),.5),x=Math.pow(Math.pow(y,2)+Math.pow(M,2),.5),z=(v+x)/2,s=0===f&&0===h?0:Math.atan2(h,f)*u,d=0===y&&0===M?0:Math.atan2(M,y)*u;s<0&&(s+=360),d<0&&(d+=360);var g=d-s,m=Math.abs(d-s);m>180&&d<=s?g+=360:m>180&&d>s&&(g-=360);var N=s+d;m<=180?N/=2:N=(s+d<360?N+360:N-360)/2;var F=1-.17*Math.cos(e*(N-30))+.24*Math.cos(2*e*N)+.32*Math.cos(e*(3*N+6))-.2*Math.cos(e*(4*N-63)),L=n-o,I=x-v,P=2*Math.sin(e*g/2)*Math.pow(v*x,.5),j=1+.015*Math.pow(i-50,2)/Math.pow(20+Math.pow(i-50,2),.5),k=1+.045*z,q=1+.015*z*F,A=30*Math.exp(-1*Math.pow((N-275)/25,2)),B=-2*Math.pow(l/(l+Math.pow(25,7)),.5)*Math.sin(2*e*A);return Math.pow(Math.pow(L/1/j,2)+Math.pow(I/1/k,2)+Math.pow(P/1/q,2)+B*I*P/(1*k*1*q),.5)}(this.toLab(),h.toLab())/100;return o(t(n,3))},r.object.push([i,"lab"])} diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lch.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lch.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7ce0a4b27044b4713b3adcfdfb7b87cade4001b6 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lch.d.ts @@ -0,0 +1,24 @@ +import { LchaColor } from "../types"; +import { Plugin } from "../extend"; +declare module "../colord" { + interface Colord { + /** + * Converts a color to CIELCH (Lightness-Chroma-Hue) color space and returns an object. + * https://lea.verou.me/2020/04/lch-colors-in-css-what-why-and-how/ + * https://en.wikipedia.org/wiki/CIELAB_color_space#Cylindrical_model + */ + toLch(): LchaColor; + /** + * Converts a color to CIELCH (Lightness-Chroma-Hue) color space and returns a string. + * https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/lch() + */ + toLchString(): string; + } +} +/** + * A plugin adding support for CIELCH color space. + * https://lea.verou.me/2020/04/lch-colors-in-css-what-why-and-how/ + * https://en.wikipedia.org/wiki/CIELAB_color_space#Cylindrical_model + */ +declare const lchPlugin: Plugin; +export default lchPlugin; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lch.js b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lch.js new file mode 100644 index 0000000000000000000000000000000000000000..955a5968155b29a7f130c8a0d48d1d74c94c5e91 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lch.js @@ -0,0 +1 @@ +var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},a=function(r,t,a){return void 0===t&&(t=0),void 0===a&&(a=Math.pow(10,t)),Math.round(a*r)/a+0},n=function(r,t,a){return void 0===t&&(t=0),void 0===a&&(a=1),r>a?a:r>t?r:t},u=function(r){var t=r/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},h=function(r){return 255*(r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r)},o=96.422,e=100,c=82.521,i=function(r){var t,a,u={x:.9555766*(t=r).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return a={r:h(.032404542*u.x-.015371385*u.y-.004985314*u.z),g:h(-.00969266*u.x+.018760108*u.y+41556e-8*u.z),b:h(556434e-9*u.x-.002040259*u.y+.010572252*u.z),a:r.a},{r:n(a.r,0,255),g:n(a.g,0,255),b:n(a.b,0,255),a:n(a.a)}},l=function(r){var t=u(r.r),a=u(r.g),h=u(r.b);return function(r){return{x:n(r.x,0,o),y:n(r.y,0,e),z:n(r.z,0,c),a:n(r.a)}}(function(r){return{x:1.0478112*r.x+.0228866*r.y+-.050127*r.z,y:.0295424*r.x+.9904844*r.y+-.0170491*r.z,z:-.0092345*r.x+.0150436*r.y+.7521316*r.z,a:r.a}}({x:100*(.4124564*t+.3575761*a+.1804375*h),y:100*(.2126729*t+.7151522*a+.072175*h),z:100*(.0193339*t+.119192*a+.9503041*h),a:r.a}))},b=216/24389,d=24389/27,f=function(r){return{l:n(r.l,0,100),c:r.c,h:(t=r.h,(t=isFinite(t)?t%360:0)>0?t:t+360),a:r.a};var t},p=function(r){return{l:a(r.l,2),c:a(r.c,2),h:a(r.h,2),a:a(r.a,3)}},v=function(r){var a=r.l,n=r.c,u=r.h,h=r.a,o=void 0===h?1:h;if(!t(a)||!t(n)||!t(u))return null;var e=f({l:Number(a),c:Number(n),h:Number(u),a:Number(o)});return M(e)},y=function(r){var t=function(r){var t=l(r),a=t.x/o,n=t.y/e,u=t.z/c;return a=a>b?Math.cbrt(a):(d*a+16)/116,{l:116*(n=n>b?Math.cbrt(n):(d*n+16)/116)-16,a:500*(a-n),b:200*(n-(u=u>b?Math.cbrt(u):(d*u+16)/116)),alpha:t.a}}(r),n=a(t.a,3),u=a(t.b,3),h=Math.atan2(u,n)/Math.PI*180;return{l:t.l,c:Math.sqrt(n*n+u*u),h:h<0?h+360:h,a:t.alpha}},M=function(r){return t={l:r.l,a:r.c*Math.cos(r.h*Math.PI/180),b:r.c*Math.sin(r.h*Math.PI/180),alpha:r.a},n=t.a/500+(a=(t.l+16)/116),u=a-t.b/200,i({x:(Math.pow(n,3)>b?Math.pow(n,3):(116*n-16)/d)*o,y:(t.l>8?Math.pow((t.l+16)/116,3):t.l/d)*e,z:(Math.pow(u,3)>b?Math.pow(u,3):(116*u-16)/d)*c,a:t.alpha});var t,a,n,u},x=/^lch\(\s*([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,s=function(t){var a=x.exec(t);if(!a)return null;var n,u,h=f({l:Number(a[1]),c:Number(a[2]),h:(n=a[3],u=a[4],void 0===u&&(u="deg"),Number(n)*(r[u]||1)),a:void 0===a[5]?1:Number(a[5])/(a[6]?100:1)});return M(h)};module.exports=function(r,t){r.prototype.toLch=function(){return p(y(this.rgba))},r.prototype.toLchString=function(){return r=p(y(this.rgba)),t=r.l,a=r.c,n=r.h,(u=r.a)<1?"lch("+t+"% "+a+" "+n+" / "+u+")":"lch("+t+"% "+a+" "+n+")";var r,t,a,n,u},t.string.push([s,"lch"]),t.object.push([v,"lch"])}; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lch.mjs b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lch.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cd7624a270b003d1a457d7d55fd63f46e339aba1 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/lch.mjs @@ -0,0 +1 @@ +var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},a=function(r,t,a){return void 0===t&&(t=0),void 0===a&&(a=Math.pow(10,t)),Math.round(a*r)/a+0},n=function(r,t,a){return void 0===t&&(t=0),void 0===a&&(a=1),r>a?a:r>t?r:t},u=function(r){var t=r/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},h=function(r){return 255*(r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r)},o=96.422,e=100,c=82.521,i=function(r){var t,a,u={x:.9555766*(t=r).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return a={r:h(.032404542*u.x-.015371385*u.y-.004985314*u.z),g:h(-.00969266*u.x+.018760108*u.y+41556e-8*u.z),b:h(556434e-9*u.x-.002040259*u.y+.010572252*u.z),a:r.a},{r:n(a.r,0,255),g:n(a.g,0,255),b:n(a.b,0,255),a:n(a.a)}},l=function(r){var t=u(r.r),a=u(r.g),h=u(r.b);return function(r){return{x:n(r.x,0,o),y:n(r.y,0,e),z:n(r.z,0,c),a:n(r.a)}}(function(r){return{x:1.0478112*r.x+.0228866*r.y+-.050127*r.z,y:.0295424*r.x+.9904844*r.y+-.0170491*r.z,z:-.0092345*r.x+.0150436*r.y+.7521316*r.z,a:r.a}}({x:100*(.4124564*t+.3575761*a+.1804375*h),y:100*(.2126729*t+.7151522*a+.072175*h),z:100*(.0193339*t+.119192*a+.9503041*h),a:r.a}))},f=216/24389,b=24389/27,d=function(r){return{l:n(r.l,0,100),c:r.c,h:(t=r.h,(t=isFinite(t)?t%360:0)>0?t:t+360),a:r.a};var t},p=function(r){return{l:a(r.l,2),c:a(r.c,2),h:a(r.h,2),a:a(r.a,3)}},v=function(r){var a=r.l,n=r.c,u=r.h,h=r.a,o=void 0===h?1:h;if(!t(a)||!t(n)||!t(u))return null;var e=d({l:Number(a),c:Number(n),h:Number(u),a:Number(o)});return M(e)},y=function(r){var t=function(r){var t=l(r),a=t.x/o,n=t.y/e,u=t.z/c;return a=a>f?Math.cbrt(a):(b*a+16)/116,{l:116*(n=n>f?Math.cbrt(n):(b*n+16)/116)-16,a:500*(a-n),b:200*(n-(u=u>f?Math.cbrt(u):(b*u+16)/116)),alpha:t.a}}(r),n=a(t.a,3),u=a(t.b,3),h=Math.atan2(u,n)/Math.PI*180;return{l:t.l,c:Math.sqrt(n*n+u*u),h:h<0?h+360:h,a:t.alpha}},M=function(r){return t={l:r.l,a:r.c*Math.cos(r.h*Math.PI/180),b:r.c*Math.sin(r.h*Math.PI/180),alpha:r.a},n=t.a/500+(a=(t.l+16)/116),u=a-t.b/200,i({x:(Math.pow(n,3)>f?Math.pow(n,3):(116*n-16)/b)*o,y:(t.l>8?Math.pow((t.l+16)/116,3):t.l/b)*e,z:(Math.pow(u,3)>f?Math.pow(u,3):(116*u-16)/b)*c,a:t.alpha});var t,a,n,u},x=/^lch\(\s*([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,s=function(t){var a=x.exec(t);if(!a)return null;var n,u,h=d({l:Number(a[1]),c:Number(a[2]),h:(n=a[3],u=a[4],void 0===u&&(u="deg"),Number(n)*(r[u]||1)),a:void 0===a[5]?1:Number(a[5])/(a[6]?100:1)});return M(h)};export default function(r,t){r.prototype.toLch=function(){return p(y(this.rgba))},r.prototype.toLchString=function(){return r=p(y(this.rgba)),t=r.l,a=r.c,n=r.h,(u=r.a)<1?"lch("+t+"% "+a+" "+n+" / "+u+")":"lch("+t+"% "+a+" "+n+")";var r,t,a,n,u},t.string.push([s,"lch"]),t.object.push([v,"lch"])} diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/minify.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/minify.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a072f41d66f66291568c235d391402e74c978d9b --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/minify.d.ts @@ -0,0 +1,20 @@ +import { Plugin } from "../extend"; +interface MinificationOptions { + hex?: boolean; + alphaHex?: boolean; + rgb?: boolean; + hsl?: boolean; + name?: boolean; + transparent?: boolean; +} +declare module "../colord" { + interface Colord { + /** Returns the shortest string representation of the color */ + minify(options?: MinificationOptions): string; + } +} +/** + * A plugin adding a color minification utilities. + */ +declare const minifyPlugin: Plugin; +export default minifyPlugin; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/minify.js b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/minify.js new file mode 100644 index 0000000000000000000000000000000000000000..30dfdec85a95e2eb606660ea29c6c4a6a1b14e28 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/minify.js @@ -0,0 +1 @@ +module.exports=function(t){var r=function(t){var r,n,e,i=t.toHex(),a=t.alpha(),h=i.split(""),s=h[1],o=h[2],u=h[3],l=h[4],p=h[5],f=h[6],g=h[7],v=h[8];if(a>0&&a<1&&(r=parseInt(g+v,16)/255,void 0===(n=2)&&(n=0),void 0===e&&(e=Math.pow(10,n)),Math.round(e*r)/e+0!==a))return null;if(s===o&&u===l&&p===f){if(1===a)return"#"+s+u+p;if(g===v)return"#"+s+u+p+g}return i},n=function(t){return t>0&&t<1?t.toString().replace("0.","."):t};t.prototype.minify=function(t){void 0===t&&(t={});var e=this.toRgb(),i=n(e.r),a=n(e.g),h=n(e.b),s=this.toHsl(),o=n(s.h),u=n(s.s),l=n(s.l),p=n(this.alpha()),f=Object.assign({hex:!0,rgb:!0,hsl:!0},t),g=[];if(f.hex&&(1===p||f.alphaHex)){var v=r(this);v&&g.push(v)}if(f.rgb&&g.push(1===p?"rgb("+i+","+a+","+h+")":"rgba("+i+","+a+","+h+","+p+")"),f.hsl&&g.push(1===p?"hsl("+o+","+u+"%,"+l+"%)":"hsla("+o+","+u+"%,"+l+"%,"+p+")"),f.transparent&&0===i&&0===a&&0===h&&0===p)g.push("transparent");else if(1===p&&f.name&&"function"==typeof this.toName){var c=this.toName();c&&g.push(c)}return function(t){for(var r=t[0],n=1;n0&&i<1&&(r=parseInt(g+v,16)/255,void 0===(n=2)&&(n=0),void 0===e&&(e=Math.pow(10,n)),Math.round(e*r)/e+0!==i))return null;if(s===o&&u===l&&p===f){if(1===i)return"#"+s+u+p;if(g===v)return"#"+s+u+p+g}return a},n=function(t){return t>0&&t<1?t.toString().replace("0.","."):t};t.prototype.minify=function(t){void 0===t&&(t={});var e=this.toRgb(),a=n(e.r),i=n(e.g),h=n(e.b),s=this.toHsl(),o=n(s.h),u=n(s.s),l=n(s.l),p=n(this.alpha()),f=Object.assign({hex:!0,rgb:!0,hsl:!0},t),g=[];if(f.hex&&(1===p||f.alphaHex)){var v=r(this);v&&g.push(v)}if(f.rgb&&g.push(1===p?"rgb("+a+","+i+","+h+")":"rgba("+a+","+i+","+h+","+p+")"),f.hsl&&g.push(1===p?"hsl("+o+","+u+"%,"+l+"%)":"hsla("+o+","+u+"%,"+l+"%,"+p+")"),f.transparent&&0===a&&0===i&&0===h&&0===p)g.push("transparent");else if(1===p&&f.name&&"function"==typeof this.toName){var c=this.toName();c&&g.push(c)}return function(t){for(var r=t[0],n=1;nn?n:t>a?t:a},a=function(t){var a=t/255;return a<.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)},n=function(t){return 255*(t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t)},r=96.422,o=100,u=82.521,e=function(a){var r,o,u={x:.9555766*(r=a).x+-.0230393*r.y+.0631636*r.z,y:-.0282895*r.x+1.0099416*r.y+.0210077*r.z,z:.0122982*r.x+-.020483*r.y+1.3299098*r.z};return o={r:n(.032404542*u.x-.015371385*u.y-.004985314*u.z),g:n(-.00969266*u.x+.018760108*u.y+41556e-8*u.z),b:n(556434e-9*u.x-.002040259*u.y+.010572252*u.z),a:a.a},{r:t(o.r,0,255),g:t(o.g,0,255),b:t(o.b,0,255),a:t(o.a)}},i=function(n){var e=a(n.r),i=a(n.g),p=a(n.b);return function(a){return{x:t(a.x,0,r),y:t(a.y,0,o),z:t(a.z,0,u),a:t(a.a)}}(function(t){return{x:1.0478112*t.x+.0228866*t.y+-.050127*t.z,y:.0295424*t.x+.9904844*t.y+-.0170491*t.z,z:-.0092345*t.x+.0150436*t.y+.7521316*t.z,a:t.a}}({x:100*(.4124564*e+.3575761*i+.1804375*p),y:100*(.2126729*e+.7151522*i+.072175*p),z:100*(.0193339*e+.119192*i+.9503041*p),a:n.a}))},p=216/24389,h=24389/27,f=function(t){var a=i(t),n=a.x/r,e=a.y/o,f=a.z/u;return n=n>p?Math.cbrt(n):(h*n+16)/116,{l:116*(e=e>p?Math.cbrt(e):(h*e+16)/116)-16,a:500*(n-e),b:200*(e-(f=f>p?Math.cbrt(f):(h*f+16)/116)),alpha:a.a}},c=function(a,n,i){var c,y=f(a),x=f(n);return function(t){var a=(t.l+16)/116,n=t.a/500+a,i=a-t.b/200;return e({x:(Math.pow(n,3)>p?Math.pow(n,3):(116*n-16)/h)*r,y:(t.l>8?Math.pow((t.l+16)/116,3):t.l/h)*o,z:(Math.pow(i,3)>p?Math.pow(i,3):(116*i-16)/h)*u,a:t.alpha})}({l:t((c={l:y.l*(1-i)+x.l*i,a:y.a*(1-i)+x.a*i,b:y.b*(1-i)+x.b*i,alpha:y.alpha*(1-i)+x.alpha*i}).l,0,400),a:c.a,b:c.b,alpha:t(c.alpha)})};module.exports=function(t){function a(t,a,n){void 0===n&&(n=5);for(var r=[],o=1/(n-1),u=0;u<=n-1;u++)r.push(t.mix(a,o*u));return r}t.prototype.mix=function(a,n){void 0===n&&(n=.5);var r=a instanceof t?a:new t(a),o=c(this.toRgb(),r.toRgb(),n);return new t(o)},t.prototype.tints=function(t){return a(this,"#fff",t)},t.prototype.shades=function(t){return a(this,"#000",t)},t.prototype.tones=function(t){return a(this,"#808080",t)}}; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/mix.mjs b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/mix.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d8841ccb488a3438db40645a88dfa8a6be0979ba --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/mix.mjs @@ -0,0 +1 @@ +var t=function(t,a,n){return void 0===a&&(a=0),void 0===n&&(n=1),t>n?n:t>a?t:a},a=function(t){var a=t/255;return a<.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)},n=function(t){return 255*(t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t)},r=96.422,o=100,u=82.521,e=function(a){var r,o,u={x:.9555766*(r=a).x+-.0230393*r.y+.0631636*r.z,y:-.0282895*r.x+1.0099416*r.y+.0210077*r.z,z:.0122982*r.x+-.020483*r.y+1.3299098*r.z};return o={r:n(.032404542*u.x-.015371385*u.y-.004985314*u.z),g:n(-.00969266*u.x+.018760108*u.y+41556e-8*u.z),b:n(556434e-9*u.x-.002040259*u.y+.010572252*u.z),a:a.a},{r:t(o.r,0,255),g:t(o.g,0,255),b:t(o.b,0,255),a:t(o.a)}},i=function(n){var e=a(n.r),i=a(n.g),p=a(n.b);return function(a){return{x:t(a.x,0,r),y:t(a.y,0,o),z:t(a.z,0,u),a:t(a.a)}}(function(t){return{x:1.0478112*t.x+.0228866*t.y+-.050127*t.z,y:.0295424*t.x+.9904844*t.y+-.0170491*t.z,z:-.0092345*t.x+.0150436*t.y+.7521316*t.z,a:t.a}}({x:100*(.4124564*e+.3575761*i+.1804375*p),y:100*(.2126729*e+.7151522*i+.072175*p),z:100*(.0193339*e+.119192*i+.9503041*p),a:n.a}))},p=216/24389,h=24389/27,f=function(t){var a=i(t),n=a.x/r,e=a.y/o,f=a.z/u;return n=n>p?Math.cbrt(n):(h*n+16)/116,{l:116*(e=e>p?Math.cbrt(e):(h*e+16)/116)-16,a:500*(n-e),b:200*(e-(f=f>p?Math.cbrt(f):(h*f+16)/116)),alpha:a.a}},c=function(a,n,i){var c,y=f(a),x=f(n);return function(t){var a=(t.l+16)/116,n=t.a/500+a,i=a-t.b/200;return e({x:(Math.pow(n,3)>p?Math.pow(n,3):(116*n-16)/h)*r,y:(t.l>8?Math.pow((t.l+16)/116,3):t.l/h)*o,z:(Math.pow(i,3)>p?Math.pow(i,3):(116*i-16)/h)*u,a:t.alpha})}({l:t((c={l:y.l*(1-i)+x.l*i,a:y.a*(1-i)+x.a*i,b:y.b*(1-i)+x.b*i,alpha:y.alpha*(1-i)+x.alpha*i}).l,0,400),a:c.a,b:c.b,alpha:t(c.alpha)})};export default function(t){function a(t,a,n){void 0===n&&(n=5);for(var r=[],o=1/(n-1),u=0;u<=n-1;u++)r.push(t.mix(a,o*u));return r}t.prototype.mix=function(a,n){void 0===n&&(n=.5);var r=a instanceof t?a:new t(a),o=c(this.toRgb(),r.toRgb(),n);return new t(o)},t.prototype.tints=function(t){return a(this,"#fff",t)},t.prototype.shades=function(t){return a(this,"#000",t)},t.prototype.tones=function(t){return a(this,"#808080",t)}} diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/names.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/names.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..57eb3dbaf7f34d6f316a2b711ae90cf99d305c2c --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/names.d.ts @@ -0,0 +1,19 @@ +import { Plugin } from "../extend"; +interface ConvertOptions { + closest?: boolean; +} +declare module "../colord" { + interface Colord { + /** Finds CSS color keyword that matches with the color value */ + toName(options?: ConvertOptions): string | undefined; + } +} +/** + * Plugin to work with named colors. + * Adds a parser to read CSS color names and `toName` method. + * See https://www.w3.org/TR/css-color-4/#named-colors + * Supports 'transparent' string as defined in + * https://drafts.csswg.org/css-color/#transparent-color + */ +declare const namesPlugin: Plugin; +export default namesPlugin; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/names.js b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/names.js new file mode 100644 index 0000000000000000000000000000000000000000..673b122e87cf5f586da9dd0111af2fda37371d24 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/names.js @@ -0,0 +1 @@ +module.exports=function(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,o=r[this.toHex()];if(o)return o;if(null==f?void 0:f.closest){var n=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=n,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u0:"number"==typeof r},n=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=Math.pow(10,n)),Math.round(t*r)/t+0},t=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=1),r>t?t:r>n?r:n},u=function(r){var n=r/255;return n<.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)},o=function(r){return 255*(r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r)},a=96.422,e=100,y=82.521,x=function(r){return{x:t(r.x,0,a),y:t(r.y,0,e),z:t(r.z,0,y),a:t(r.a)}},z=function(n){var t=n.x,u=n.y,o=n.z,a=n.a,e=void 0===a?1:a;if(!r(t)||!r(u)||!r(o))return null;var y=x({x:Number(t),y:Number(u),z:Number(o),a:Number(e)});return i(y)},i=function(r){var n,u,a={x:.9555766*(n=r).x+-.0230393*n.y+.0631636*n.z,y:-.0282895*n.x+1.0099416*n.y+.0210077*n.z,z:.0122982*n.x+-.020483*n.y+1.3299098*n.z};return u={r:o(.032404542*a.x-.015371385*a.y-.004985314*a.z),g:o(-.00969266*a.x+.018760108*a.y+41556e-8*a.z),b:o(556434e-9*a.x-.002040259*a.y+.010572252*a.z),a:r.a},{r:t(u.r,0,255),g:t(u.g,0,255),b:t(u.b,0,255),a:t(u.a)}};module.exports=function(r,t){r.prototype.toXyz=function(){return function(r){return{x:n(r.x,2),y:n(r.y,2),z:n(r.z,2),a:n(r.a,3)}}((t=u((r=this.rgba).r),o=u(r.g),a=u(r.b),x({x:1.0478112*(e={x:100*(.4124564*t+.3575761*o+.1804375*a),y:100*(.2126729*t+.7151522*o+.072175*a),z:100*(.0193339*t+.119192*o+.9503041*a),a:r.a}).x+.0228866*e.y+-.050127*e.z,y:.0295424*e.x+.9904844*e.y+-.0170491*e.z,z:-.0092345*e.x+.0150436*e.y+.7521316*e.z,a:e.a})));var r,t,o,a,e},t.object.push([z,"xyz"])}; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/xyz.mjs b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/xyz.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0c60d65109703528df1859f7042aa0c7a2ac53ef --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/xyz.mjs @@ -0,0 +1 @@ +var r=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=Math.pow(10,n)),Math.round(t*r)/t+0},t=function(r,n,t){return void 0===n&&(n=0),void 0===t&&(t=1),r>t?t:r>n?r:n},u=function(r){var n=r/255;return n<.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)},o=function(r){return 255*(r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r)},a=96.422,e=100,y=82.521,x=function(r){return{x:t(r.x,0,a),y:t(r.y,0,e),z:t(r.z,0,y),a:t(r.a)}},z=function(n){var t=n.x,u=n.y,o=n.z,a=n.a,e=void 0===a?1:a;if(!r(t)||!r(u)||!r(o))return null;var y=x({x:Number(t),y:Number(u),z:Number(o),a:Number(e)});return i(y)},i=function(r){var n,u,a={x:.9555766*(n=r).x+-.0230393*n.y+.0631636*n.z,y:-.0282895*n.x+1.0099416*n.y+.0210077*n.z,z:.0122982*n.x+-.020483*n.y+1.3299098*n.z};return u={r:o(.032404542*a.x-.015371385*a.y-.004985314*a.z),g:o(-.00969266*a.x+.018760108*a.y+41556e-8*a.z),b:o(556434e-9*a.x-.002040259*a.y+.010572252*a.z),a:r.a},{r:t(u.r,0,255),g:t(u.g,0,255),b:t(u.b,0,255),a:t(u.a)}};export default function(r,t){r.prototype.toXyz=function(){return function(r){return{x:n(r.x,2),y:n(r.y,2),z:n(r.z,2),a:n(r.a,3)}}((t=u((r=this.rgba).r),o=u(r.g),a=u(r.b),x({x:1.0478112*(e={x:100*(.4124564*t+.3575761*o+.1804375*a),y:100*(.2126729*t+.7151522*o+.072175*a),z:100*(.0193339*t+.119192*o+.9503041*a),a:r.a}).x+.0228866*e.y+-.050127*e.z,y:.0295424*e.x+.9904844*e.y+-.0170491*e.z,z:-.0092345*e.x+.0150436*e.y+.7521316*e.z,a:e.a})));var r,t,o,a,e},t.object.push([z,"xyz"])} diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/random.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/random.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..76178a6d75e654682d425cdd85b40fa082c9556a --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/random.d.ts @@ -0,0 +1,2 @@ +import { Colord } from "./colord"; +export declare const random: () => Colord; diff --git a/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/types.d.ts b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..02c10ff28d0ab9cd57130b01bc187c2f82d10690 --- /dev/null +++ b/node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/types.d.ts @@ -0,0 +1,67 @@ +export declare type RgbColor = { + r: number; + g: number; + b: number; +}; +export declare type HslColor = { + h: number; + s: number; + l: number; +}; +export declare type HsvColor = { + h: number; + s: number; + v: number; +}; +export declare type HwbColor = { + h: number; + w: number; + b: number; +}; +export interface XyzColor { + x: number; + y: number; + z: number; +} +export interface LabColor { + l: number; + a: number; + b: number; +} +export interface LchColor { + l: number; + c: number; + h: number; +} +export interface CmykColor { + c: number; + m: number; + y: number; + k: number; +} +declare type WithAlpha = O & { + a: number; +}; +export declare type RgbaColor = WithAlpha; +export declare type HslaColor = WithAlpha; +export declare type HsvaColor = WithAlpha; +export declare type HwbaColor = WithAlpha; +export declare type XyzaColor = WithAlpha; +export declare type LabaColor = LabColor & { + alpha: number; +}; +export declare type LchaColor = WithAlpha; +export declare type CmykaColor = WithAlpha; +export declare type ObjectColor = RgbColor | RgbaColor | HslColor | HslaColor | HsvColor | HsvaColor | HwbColor | HwbaColor | XyzColor | XyzaColor | LabColor | LabaColor | LchColor | LchaColor | CmykColor | CmykaColor; +export declare type AnyColor = string | ObjectColor; +export declare type InputObject = Record; +export declare type Format = "name" | "hex" | "rgb" | "hsl" | "hsv" | "hwb" | "xyz" | "lab" | "lch" | "cmyk"; +export declare type Input = string | InputObject; +export declare type ParseResult = [RgbaColor, Format]; +export declare type ParseFunction = (input: I) => RgbaColor | null; +export declare type Parser = [ParseFunction, Format]; +export declare type Parsers = { + string: Array>; + object: Array>; +}; +export {}; diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/.editorconfig b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/.editorconfig new file mode 100644 index 0000000000000000000000000000000000000000..b1401639051d7cb6d9453bd87c9e6649ba518240 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Copied from Node.js to ease compatibility in PR. +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true +quote_type = single diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/CHANGELOG.md b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..2adc7d3273d50d51625aa9d83ef3b672417f1677 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/CHANGELOG.md @@ -0,0 +1,147 @@ +# Changelog + +## [0.11.0](https://github.com/pkgjs/parseargs/compare/v0.10.0...v0.11.0) (2022-10-08) + + +### Features + +* add `default` option parameter ([#142](https://github.com/pkgjs/parseargs/issues/142)) ([cd20847](https://github.com/pkgjs/parseargs/commit/cd20847a00b2f556aa9c085ac83b942c60868ec1)) + +## [0.10.0](https://github.com/pkgjs/parseargs/compare/v0.9.1...v0.10.0) (2022-07-21) + + +### Features + +* add parsed meta-data to returned properties ([#129](https://github.com/pkgjs/parseargs/issues/129)) ([91bfb4d](https://github.com/pkgjs/parseargs/commit/91bfb4d3f7b6937efab1b27c91c45d1205f1497e)) + +## [0.9.1](https://github.com/pkgjs/parseargs/compare/v0.9.0...v0.9.1) (2022-06-20) + + +### Bug Fixes + +* **runtime:** support node 14+ ([#135](https://github.com/pkgjs/parseargs/issues/135)) ([6a1c5a6](https://github.com/pkgjs/parseargs/commit/6a1c5a6f7cadf2f035e004027e2742e3c4ce554b)) + +## [0.9.0](https://github.com/pkgjs/parseargs/compare/v0.8.0...v0.9.0) (2022-05-23) + + +### ⚠ BREAKING CHANGES + +* drop handling of electron arguments (#121) + +### Code Refactoring + +* drop handling of electron arguments ([#121](https://github.com/pkgjs/parseargs/issues/121)) ([a2ffd53](https://github.com/pkgjs/parseargs/commit/a2ffd537c244a062371522b955acb45a404fc9f2)) + +## [0.8.0](https://github.com/pkgjs/parseargs/compare/v0.7.1...v0.8.0) (2022-05-16) + + +### ⚠ BREAKING CHANGES + +* switch type:string option arguments to greedy, but with error for suspect cases in strict mode (#88) +* positionals now opt-in when strict:true (#116) +* create result.values with null prototype (#111) + +### Features + +* create result.values with null prototype ([#111](https://github.com/pkgjs/parseargs/issues/111)) ([9d539c3](https://github.com/pkgjs/parseargs/commit/9d539c3d57f269c160e74e0656ad4fa84ff92ec2)) +* positionals now opt-in when strict:true ([#116](https://github.com/pkgjs/parseargs/issues/116)) ([3643338](https://github.com/pkgjs/parseargs/commit/364333826b746e8a7dc5505b4b22fd19ac51df3b)) +* switch type:string option arguments to greedy, but with error for suspect cases in strict mode ([#88](https://github.com/pkgjs/parseargs/issues/88)) ([c2b5e72](https://github.com/pkgjs/parseargs/commit/c2b5e72161991dfdc535909f1327cc9b970fe7e8)) + +### [0.7.1](https://github.com/pkgjs/parseargs/compare/v0.7.0...v0.7.1) (2022-04-15) + + +### Bug Fixes + +* resist pollution ([#106](https://github.com/pkgjs/parseargs/issues/106)) ([ecf2dec](https://github.com/pkgjs/parseargs/commit/ecf2dece0a9f2a76d789384d5d71c68ffe64022a)) + +## [0.7.0](https://github.com/pkgjs/parseargs/compare/v0.6.0...v0.7.0) (2022-04-13) + + +### Features + +* Add strict mode to parser ([#74](https://github.com/pkgjs/parseargs/issues/74)) ([8267d02](https://github.com/pkgjs/parseargs/commit/8267d02083a87b8b8a71fcce08348d1e031ea91c)) + +## [0.6.0](https://github.com/pkgjs/parseargs/compare/v0.5.0...v0.6.0) (2022-04-11) + + +### ⚠ BREAKING CHANGES + +* rework results to remove redundant `flags` property and store value true for boolean options (#83) +* switch to existing ERR_INVALID_ARG_VALUE (#97) + +### Code Refactoring + +* rework results to remove redundant `flags` property and store value true for boolean options ([#83](https://github.com/pkgjs/parseargs/issues/83)) ([be153db](https://github.com/pkgjs/parseargs/commit/be153dbed1d488cb7b6e27df92f601ba7337713d)) +* switch to existing ERR_INVALID_ARG_VALUE ([#97](https://github.com/pkgjs/parseargs/issues/97)) ([084a23f](https://github.com/pkgjs/parseargs/commit/084a23f9fde2da030b159edb1c2385f24579ce40)) + +## [0.5.0](https://github.com/pkgjs/parseargs/compare/v0.4.0...v0.5.0) (2022-04-10) + + +### ⚠ BREAKING CHANGES + +* Require type to be specified for each supplied option (#95) + +### Features + +* Require type to be specified for each supplied option ([#95](https://github.com/pkgjs/parseargs/issues/95)) ([02cd018](https://github.com/pkgjs/parseargs/commit/02cd01885b8aaa59f2db8308f2d4479e64340068)) + +## [0.4.0](https://github.com/pkgjs/parseargs/compare/v0.3.0...v0.4.0) (2022-03-12) + + +### ⚠ BREAKING CHANGES + +* parsing, revisit short option groups, add support for combined short and value (#75) +* restructure configuration to take options bag (#63) + +### Code Refactoring + +* parsing, revisit short option groups, add support for combined short and value ([#75](https://github.com/pkgjs/parseargs/issues/75)) ([a92600f](https://github.com/pkgjs/parseargs/commit/a92600fa6c214508ab1e016fa55879a314f541af)) +* restructure configuration to take options bag ([#63](https://github.com/pkgjs/parseargs/issues/63)) ([b412095](https://github.com/pkgjs/parseargs/commit/b4120957d90e809ee8b607b06e747d3e6a6b213e)) + +## [0.3.0](https://github.com/pkgjs/parseargs/compare/v0.2.0...v0.3.0) (2022-02-06) + + +### Features + +* **parser:** support short-option groups ([#59](https://github.com/pkgjs/parseargs/issues/59)) ([882067b](https://github.com/pkgjs/parseargs/commit/882067bc2d7cbc6b796f8e5a079a99bc99d4e6ba)) + +## [0.2.0](https://github.com/pkgjs/parseargs/compare/v0.1.1...v0.2.0) (2022-02-05) + + +### Features + +* basic support for shorts ([#50](https://github.com/pkgjs/parseargs/issues/50)) ([a2f36d7](https://github.com/pkgjs/parseargs/commit/a2f36d7da4145af1c92f76806b7fe2baf6beeceb)) + + +### Bug Fixes + +* always store value for a=b ([#43](https://github.com/pkgjs/parseargs/issues/43)) ([a85e8dc](https://github.com/pkgjs/parseargs/commit/a85e8dc06379fd2696ee195cc625de8fac6aee42)) +* support single dash as positional ([#49](https://github.com/pkgjs/parseargs/issues/49)) ([d795bf8](https://github.com/pkgjs/parseargs/commit/d795bf877d068fd67aec381f30b30b63f97109ad)) + +### [0.1.1](https://github.com/pkgjs/parseargs/compare/v0.1.0...v0.1.1) (2022-01-25) + + +### Bug Fixes + +* only use arrays in results for multiples ([#42](https://github.com/pkgjs/parseargs/issues/42)) ([c357584](https://github.com/pkgjs/parseargs/commit/c357584847912506319ed34a0840080116f4fd65)) + +## 0.1.0 (2022-01-22) + + +### Features + +* expand scenarios covered by default arguments for environments ([#20](https://github.com/pkgjs/parseargs/issues/20)) ([582ada7](https://github.com/pkgjs/parseargs/commit/582ada7be0eca3a73d6e0bd016e7ace43449fa4c)) +* update readme and include contributing guidelines ([8edd6fc](https://github.com/pkgjs/parseargs/commit/8edd6fc863cd705f6fac732724159ebe8065a2b0)) + + +### Bug Fixes + +* do not strip excess leading dashes on long option names ([#21](https://github.com/pkgjs/parseargs/issues/21)) ([f848590](https://github.com/pkgjs/parseargs/commit/f848590ebf3249ed5979ff47e003fa6e1a8ec5c0)) +* name & readme ([3f057c1](https://github.com/pkgjs/parseargs/commit/3f057c1b158a1bdbe878c64b57460c58e56e465f)) +* package.json values ([9bac300](https://github.com/pkgjs/parseargs/commit/9bac300e00cd76c77076bf9e75e44f8929512da9)) +* update readme name ([957d8d9](https://github.com/pkgjs/parseargs/commit/957d8d96e1dcb48297c0a14345d44c0123b2883e)) + + +### Build System + +* first release as minor ([421c6e2](https://github.com/pkgjs/parseargs/commit/421c6e2569a8668ad14fac5a5af5be60479a7571)) diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/LICENSE b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/README.md b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0a041927e8b90ced15a56f9ac841afcbe72d8453 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/README.md @@ -0,0 +1,413 @@ + +# parseArgs + +[![Coverage][coverage-image]][coverage-url] + +Polyfill of `util.parseArgs()` + +## `util.parseArgs([config])` + + + +> Stability: 1 - Experimental + +* `config` {Object} Used to provide arguments for parsing and to configure + the parser. `config` supports the following properties: + * `args` {string\[]} array of argument strings. **Default:** `process.argv` + with `execPath` and `filename` removed. + * `options` {Object} Used to describe arguments known to the parser. + Keys of `options` are the long names of options and values are an + {Object} accepting the following properties: + * `type` {string} Type of argument, which must be either `boolean` or `string`. + * `multiple` {boolean} Whether this option can be provided multiple + times. If `true`, all values will be collected in an array. If + `false`, values for the option are last-wins. **Default:** `false`. + * `short` {string} A single character alias for the option. + * `default` {string | boolean | string\[] | boolean\[]} The default option + value when it is not set by args. It must be of the same type as the + the `type` property. When `multiple` is `true`, it must be an array. + * `strict` {boolean} Should an error be thrown when unknown arguments + are encountered, or when arguments are passed that do not match the + `type` configured in `options`. + **Default:** `true`. + * `allowPositionals` {boolean} Whether this command accepts positional + arguments. + **Default:** `false` if `strict` is `true`, otherwise `true`. + * `tokens` {boolean} Return the parsed tokens. This is useful for extending + the built-in behavior, from adding additional checks through to reprocessing + the tokens in different ways. + **Default:** `false`. + +* Returns: {Object} The parsed command line arguments: + * `values` {Object} A mapping of parsed option names with their {string} + or {boolean} values. + * `positionals` {string\[]} Positional arguments. + * `tokens` {Object\[] | undefined} See [parseArgs tokens](#parseargs-tokens) + section. Only returned if `config` includes `tokens: true`. + +Provides a higher level API for command-line argument parsing than interacting +with `process.argv` directly. Takes a specification for the expected arguments +and returns a structured object with the parsed options and positionals. + +```mjs +import { parseArgs } from 'node:util'; +const args = ['-f', '--bar', 'b']; +const options = { + foo: { + type: 'boolean', + short: 'f' + }, + bar: { + type: 'string' + } +}; +const { + values, + positionals +} = parseArgs({ args, options }); +console.log(values, positionals); +// Prints: [Object: null prototype] { foo: true, bar: 'b' } [] +``` + +```cjs +const { parseArgs } = require('node:util'); +const args = ['-f', '--bar', 'b']; +const options = { + foo: { + type: 'boolean', + short: 'f' + }, + bar: { + type: 'string' + } +}; +const { + values, + positionals +} = parseArgs({ args, options }); +console.log(values, positionals); +// Prints: [Object: null prototype] { foo: true, bar: 'b' } [] +``` + +`util.parseArgs` is experimental and behavior may change. Join the +conversation in [pkgjs/parseargs][] to contribute to the design. + +### `parseArgs` `tokens` + +Detailed parse information is available for adding custom behaviours by +specifying `tokens: true` in the configuration. +The returned tokens have properties describing: + +* all tokens + * `kind` {string} One of 'option', 'positional', or 'option-terminator'. + * `index` {number} Index of element in `args` containing token. So the + source argument for a token is `args[token.index]`. +* option tokens + * `name` {string} Long name of option. + * `rawName` {string} How option used in args, like `-f` of `--foo`. + * `value` {string | undefined} Option value specified in args. + Undefined for boolean options. + * `inlineValue` {boolean | undefined} Whether option value specified inline, + like `--foo=bar`. +* positional tokens + * `value` {string} The value of the positional argument in args (i.e. `args[index]`). +* option-terminator token + +The returned tokens are in the order encountered in the input args. Options +that appear more than once in args produce a token for each use. Short option +groups like `-xy` expand to a token for each option. So `-xxx` produces +three tokens. + +For example to use the returned tokens to add support for a negated option +like `--no-color`, the tokens can be reprocessed to change the value stored +for the negated option. + +```mjs +import { parseArgs } from 'node:util'; + +const options = { + 'color': { type: 'boolean' }, + 'no-color': { type: 'boolean' }, + 'logfile': { type: 'string' }, + 'no-logfile': { type: 'boolean' }, +}; +const { values, tokens } = parseArgs({ options, tokens: true }); + +// Reprocess the option tokens and overwrite the returned values. +tokens + .filter((token) => token.kind === 'option') + .forEach((token) => { + if (token.name.startsWith('no-')) { + // Store foo:false for --no-foo + const positiveName = token.name.slice(3); + values[positiveName] = false; + delete values[token.name]; + } else { + // Resave value so last one wins if both --foo and --no-foo. + values[token.name] = token.value ?? true; + } + }); + +const color = values.color; +const logfile = values.logfile ?? 'default.log'; + +console.log({ logfile, color }); +``` + +```cjs +const { parseArgs } = require('node:util'); + +const options = { + 'color': { type: 'boolean' }, + 'no-color': { type: 'boolean' }, + 'logfile': { type: 'string' }, + 'no-logfile': { type: 'boolean' }, +}; +const { values, tokens } = parseArgs({ options, tokens: true }); + +// Reprocess the option tokens and overwrite the returned values. +tokens + .filter((token) => token.kind === 'option') + .forEach((token) => { + if (token.name.startsWith('no-')) { + // Store foo:false for --no-foo + const positiveName = token.name.slice(3); + values[positiveName] = false; + delete values[token.name]; + } else { + // Resave value so last one wins if both --foo and --no-foo. + values[token.name] = token.value ?? true; + } + }); + +const color = values.color; +const logfile = values.logfile ?? 'default.log'; + +console.log({ logfile, color }); +``` + +Example usage showing negated options, and when an option is used +multiple ways then last one wins. + +```console +$ node negate.js +{ logfile: 'default.log', color: undefined } +$ node negate.js --no-logfile --no-color +{ logfile: false, color: false } +$ node negate.js --logfile=test.log --color +{ logfile: 'test.log', color: true } +$ node negate.js --no-logfile --logfile=test.log --color --no-color +{ logfile: 'test.log', color: false } +``` + +----- + + +## Table of Contents +- [`util.parseArgs([config])`](#utilparseargsconfig) +- [Scope](#scope) +- [Version Matchups](#version-matchups) +- [🚀 Getting Started](#-getting-started) +- [🙌 Contributing](#-contributing) +- [💡 `process.mainArgs` Proposal](#-processmainargs-proposal) + - [Implementation:](#implementation) +- [📃 Examples](#-examples) +- [F.A.Qs](#faqs) +- [Links & Resources](#links--resources) + +----- + +## Scope + +It is already possible to build great arg parsing modules on top of what Node.js provides; the prickly API is abstracted away by these modules. Thus, process.parseArgs() is not necessarily intended for library authors; it is intended for developers of simple CLI tools, ad-hoc scripts, deployed Node.js applications, and learning materials. + +It is exceedingly difficult to provide an API which would both be friendly to these Node.js users while being extensible enough for libraries to build upon. We chose to prioritize these use cases because these are currently not well-served by Node.js' API. + +---- + +## Version Matchups + +| Node.js | @pkgjs/parseArgs | +| -- | -- | +| [v18.3.0](https://nodejs.org/docs/latest-v18.x/api/util.html#utilparseargsconfig) | [v0.9.1](https://github.com/pkgjs/parseargs/tree/v0.9.1#utilparseargsconfig) | +| [v16.17.0](https://nodejs.org/dist/latest-v16.x/docs/api/util.html#utilparseargsconfig), [v18.7.0](https://nodejs.org/docs/latest-v18.x/api/util.html#utilparseargsconfig) | [0.10.0](https://github.com/pkgjs/parseargs/tree/v0.10.0#utilparseargsconfig) | + +---- + +## 🚀 Getting Started + +1. **Install dependencies.** + + ```bash + npm install + ``` + +2. **Open the index.js file and start editing!** + +3. **Test your code by calling parseArgs through our test file** + + ```bash + npm test + ``` + +---- + +## 🙌 Contributing + +Any person who wants to contribute to the initiative is welcome! Please first read the [Contributing Guide](CONTRIBUTING.md) + +Additionally, reading the [`Examples w/ Output`](#-examples-w-output) section of this document will be the best way to familiarize yourself with the target expected behavior for parseArgs() once it is fully implemented. + +This package was implemented using [tape](https://www.npmjs.com/package/tape) as its test harness. + +---- + +## 💡 `process.mainArgs` Proposal + +> Note: This can be moved forward independently of the `util.parseArgs()` proposal/work. + +### Implementation: + +```javascript +process.mainArgs = process.argv.slice(process._exec ? 1 : 2) +``` + +---- + +## 📃 Examples + +```js +const { parseArgs } = require('@pkgjs/parseargs'); +``` + +```js +const { parseArgs } = require('@pkgjs/parseargs'); +// specify the options that may be used +const options = { + foo: { type: 'string'}, + bar: { type: 'boolean' }, +}; +const args = ['--foo=a', '--bar']; +const { values, positionals } = parseArgs({ args, options }); +// values = { foo: 'a', bar: true } +// positionals = [] +``` + +```js +const { parseArgs } = require('@pkgjs/parseargs'); +// type:string & multiple +const options = { + foo: { + type: 'string', + multiple: true, + }, +}; +const args = ['--foo=a', '--foo', 'b']; +const { values, positionals } = parseArgs({ args, options }); +// values = { foo: [ 'a', 'b' ] } +// positionals = [] +``` + +```js +const { parseArgs } = require('@pkgjs/parseargs'); +// shorts +const options = { + foo: { + short: 'f', + type: 'boolean' + }, +}; +const args = ['-f', 'b']; +const { values, positionals } = parseArgs({ args, options, allowPositionals: true }); +// values = { foo: true } +// positionals = ['b'] +``` + +```js +const { parseArgs } = require('@pkgjs/parseargs'); +// unconfigured +const options = {}; +const args = ['-f', '--foo=a', '--bar', 'b']; +const { values, positionals } = parseArgs({ strict: false, args, options, allowPositionals: true }); +// values = { f: true, foo: 'a', bar: true } +// positionals = ['b'] +``` + +---- + +## F.A.Qs + +- Is `cmd --foo=bar baz` the same as `cmd baz --foo=bar`? + - yes +- Does the parser execute a function? + - no +- Does the parser execute one of several functions, depending on input? + - no +- Can subcommands take options that are distinct from the main command? + - no +- Does it output generated help when no options match? + - no +- Does it generated short usage? Like: `usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]` + - no (no usage/help at all) +- Does the user provide the long usage text? For each option? For the whole command? + - no +- Do subcommands (if implemented) have their own usage output? + - no +- Does usage print if the user runs `cmd --help`? + - no +- Does it set `process.exitCode`? + - no +- Does usage print to stderr or stdout? + - N/A +- Does it check types? (Say, specify that an option is a boolean, number, etc.) + - no +- Can an option have more than one type? (string or false, for example) + - no +- Can the user define a type? (Say, `type: path` to call `path.resolve()` on the argument.) + - no +- Does a `--foo=0o22` mean 0, 22, 18, or "0o22"? + - `"0o22"` +- Does it coerce types? + - no +- Does `--no-foo` coerce to `--foo=false`? For all options? Only boolean options? + - no, it sets `{values:{'no-foo': true}}` +- Is `--foo` the same as `--foo=true`? Only for known booleans? Only at the end? + - no, they are not the same. There is no special handling of `true` as a value so it is just another string. +- Does it read environment variables? Ie, is `FOO=1 cmd` the same as `cmd --foo=1`? + - no +- Do unknown arguments raise an error? Are they parsed? Are they treated as positional arguments? + - no, they are parsed, not treated as positionals +- Does `--` signal the end of options? + - yes +- Is `--` included as a positional? + - no +- Is `program -- foo` the same as `program foo`? + - yes, both store `{positionals:['foo']}` +- Does the API specify whether a `--` was present/relevant? + - no +- Is `-bar` the same as `--bar`? + - no, `-bar` is a short option or options, with expansion logic that follows the + [Utility Syntax Guidelines in POSIX.1-2017](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html). `-bar` expands to `-b`, `-a`, `-r`. +- Is `---foo` the same as `--foo`? + - no + - the first is a long option named `'-foo'` + - the second is a long option named `'foo'` +- Is `-` a positional? ie, `bash some-test.sh | tap -` + - yes + +## Links & Resources + +* [Initial Tooling Issue](https://github.com/nodejs/tooling/issues/19) +* [Initial Proposal](https://github.com/nodejs/node/pull/35015) +* [parseArgs Proposal](https://github.com/nodejs/node/pull/42675) + +[coverage-image]: https://img.shields.io/nycrc/pkgjs/parseargs +[coverage-url]: https://github.com/pkgjs/parseargs/blob/main/.nycrc +[pkgjs/parseargs]: https://github.com/pkgjs/parseargs diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/is-default-value.js b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/is-default-value.js new file mode 100644 index 0000000000000000000000000000000000000000..0a67972b71d135a4b75953d2fe2b43bf9a0c585e --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/is-default-value.js @@ -0,0 +1,25 @@ +'use strict'; + +// This example shows how to understand if a default value is used or not. + +// 1. const { parseArgs } = require('node:util'); // from node +// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package +const { parseArgs } = require('..'); // in repo + +const options = { + file: { short: 'f', type: 'string', default: 'FOO' }, +}; + +const { values, tokens } = parseArgs({ options, tokens: true }); + +const isFileDefault = !tokens.some((token) => token.kind === 'option' && + token.name === 'file' +); + +console.log(values); +console.log(`Is the file option [${values.file}] the default value? ${isFileDefault}`); + +// Try the following: +// node is-default-value.js +// node is-default-value.js -f FILE +// node is-default-value.js --file FILE diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js new file mode 100644 index 0000000000000000000000000000000000000000..943e643ee9553b3877b6b7ed58e69dcb9e94fb39 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js @@ -0,0 +1,35 @@ +'use strict'; + +// This is an example of using tokens to add a custom behaviour. +// +// Require the use of `=` for long options and values by blocking +// the use of space separated values. +// So allow `--foo=bar`, and not allow `--foo bar`. +// +// Note: this is not a common behaviour, most CLIs allow both forms. + +// 1. const { parseArgs } = require('node:util'); // from node +// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package +const { parseArgs } = require('..'); // in repo + +const options = { + file: { short: 'f', type: 'string' }, + log: { type: 'string' }, +}; + +const { values, tokens } = parseArgs({ options, tokens: true }); + +const badToken = tokens.find((token) => token.kind === 'option' && + token.value != null && + token.rawName.startsWith('--') && + !token.inlineValue +); +if (badToken) { + throw new Error(`Option value for '${badToken.rawName}' must be inline, like '${badToken.rawName}=VALUE'`); +} + +console.log(values); + +// Try the following: +// node limit-long-syntax.js -f FILE --log=LOG +// node limit-long-syntax.js --file FILE diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/negate.js b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/negate.js new file mode 100644 index 0000000000000000000000000000000000000000..b6634690a4a0c03d4c50239bc16fa38440dea5ae --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/negate.js @@ -0,0 +1,43 @@ +'use strict'; + +// This example is used in the documentation. + +// How might I add my own support for --no-foo? + +// 1. const { parseArgs } = require('node:util'); // from node +// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package +const { parseArgs } = require('..'); // in repo + +const options = { + 'color': { type: 'boolean' }, + 'no-color': { type: 'boolean' }, + 'logfile': { type: 'string' }, + 'no-logfile': { type: 'boolean' }, +}; +const { values, tokens } = parseArgs({ options, tokens: true }); + +// Reprocess the option tokens and overwrite the returned values. +tokens + .filter((token) => token.kind === 'option') + .forEach((token) => { + if (token.name.startsWith('no-')) { + // Store foo:false for --no-foo + const positiveName = token.name.slice(3); + values[positiveName] = false; + delete values[token.name]; + } else { + // Resave value so last one wins if both --foo and --no-foo. + values[token.name] = token.value ?? true; + } + }); + +const color = values.color; +const logfile = values.logfile ?? 'default.log'; + +console.log({ logfile, color }); + +// Try the following: +// node negate.js +// node negate.js --no-logfile --no-color +// negate.js --logfile=test.log --color +// node negate.js --no-logfile --logfile=test.log --color --no-color diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js new file mode 100644 index 0000000000000000000000000000000000000000..0c324688af03058fcd0a8b0b5dbdcb188e902f50 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js @@ -0,0 +1,31 @@ +'use strict'; + +// This is an example of using tokens to add a custom behaviour. +// +// Throw an error if an option is used more than once. + +// 1. const { parseArgs } = require('node:util'); // from node +// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package +const { parseArgs } = require('..'); // in repo + +const options = { + ding: { type: 'boolean', short: 'd' }, + beep: { type: 'boolean', short: 'b' } +}; +const { values, tokens } = parseArgs({ options, tokens: true }); + +const seenBefore = new Set(); +tokens.forEach((token) => { + if (token.kind !== 'option') return; + if (seenBefore.has(token.name)) { + throw new Error(`option '${token.name}' used multiple times`); + } + seenBefore.add(token.name); +}); + +console.log(values); + +// Try the following: +// node no-repeated-options --ding --beep +// node no-repeated-options --beep -b +// node no-repeated-options -ddd diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8ab7367b8bbb1120db7fc9f9365353af0ab9377e --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs @@ -0,0 +1,41 @@ +// This is an example of using tokens to add a custom behaviour. +// +// This adds a option order check so that --some-unstable-option +// may only be used after --enable-experimental-options +// +// Note: this is not a common behaviour, the order of different options +// does not usually matter. + +import { parseArgs } from '../index.js'; + +function findTokenIndex(tokens, target) { + return tokens.findIndex((token) => token.kind === 'option' && + token.name === target + ); +} + +const experimentalName = 'enable-experimental-options'; +const unstableName = 'some-unstable-option'; + +const options = { + [experimentalName]: { type: 'boolean' }, + [unstableName]: { type: 'boolean' }, +}; + +const { values, tokens } = parseArgs({ options, tokens: true }); + +const experimentalIndex = findTokenIndex(tokens, experimentalName); +const unstableIndex = findTokenIndex(tokens, unstableName); +if (unstableIndex !== -1 && + ((experimentalIndex === -1) || (unstableIndex < experimentalIndex))) { + throw new Error(`'--${experimentalName}' must be specified before '--${unstableName}'`); +} + +console.log(values); + +/* eslint-disable max-len */ +// Try the following: +// node ordered-options.mjs +// node ordered-options.mjs --some-unstable-option +// node ordered-options.mjs --some-unstable-option --enable-experimental-options +// node ordered-options.mjs --enable-experimental-options --some-unstable-option diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js new file mode 100644 index 0000000000000000000000000000000000000000..eff04c2a60fa21dffb1b293c27068d0a0af3c963 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js @@ -0,0 +1,26 @@ +'use strict'; + +// This example is used in the documentation. + +// 1. const { parseArgs } = require('node:util'); // from node +// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package +const { parseArgs } = require('..'); // in repo + +const args = ['-f', '--bar', 'b']; +const options = { + foo: { + type: 'boolean', + short: 'f' + }, + bar: { + type: 'string' + } +}; +const { + values, + positionals +} = parseArgs({ args, options }); +console.log(values, positionals); + +// Try the following: +// node simple-hard-coded.js diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/index.js b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b1004c7b72f271f4f529b1597d643a9272e3cf06 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/index.js @@ -0,0 +1,396 @@ +'use strict'; + +const { + ArrayPrototypeForEach, + ArrayPrototypeIncludes, + ArrayPrototypeMap, + ArrayPrototypePush, + ArrayPrototypePushApply, + ArrayPrototypeShift, + ArrayPrototypeSlice, + ArrayPrototypeUnshiftApply, + ObjectEntries, + ObjectPrototypeHasOwnProperty: ObjectHasOwn, + StringPrototypeCharAt, + StringPrototypeIndexOf, + StringPrototypeSlice, + StringPrototypeStartsWith, +} = require('./internal/primordials'); + +const { + validateArray, + validateBoolean, + validateBooleanArray, + validateObject, + validateString, + validateStringArray, + validateUnion, +} = require('./internal/validators'); + +const { + kEmptyObject, +} = require('./internal/util'); + +const { + findLongOptionForShort, + isLoneLongOption, + isLoneShortOption, + isLongOptionAndValue, + isOptionValue, + isOptionLikeValue, + isShortOptionAndValue, + isShortOptionGroup, + useDefaultValueOption, + objectGetOwn, + optionsGetOwn, +} = require('./utils'); + +const { + codes: { + ERR_INVALID_ARG_VALUE, + ERR_PARSE_ARGS_INVALID_OPTION_VALUE, + ERR_PARSE_ARGS_UNKNOWN_OPTION, + ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL, + }, +} = require('./internal/errors'); + +function getMainArgs() { + // Work out where to slice process.argv for user supplied arguments. + + // Check node options for scenarios where user CLI args follow executable. + const execArgv = process.execArgv; + if (ArrayPrototypeIncludes(execArgv, '-e') || + ArrayPrototypeIncludes(execArgv, '--eval') || + ArrayPrototypeIncludes(execArgv, '-p') || + ArrayPrototypeIncludes(execArgv, '--print')) { + return ArrayPrototypeSlice(process.argv, 1); + } + + // Normally first two arguments are executable and script, then CLI arguments + return ArrayPrototypeSlice(process.argv, 2); +} + +/** + * In strict mode, throw for possible usage errors like --foo --bar + * + * @param {object} token - from tokens as available from parseArgs + */ +function checkOptionLikeValue(token) { + if (!token.inlineValue && isOptionLikeValue(token.value)) { + // Only show short example if user used short option. + const example = StringPrototypeStartsWith(token.rawName, '--') ? + `'${token.rawName}=-XYZ'` : + `'--${token.name}=-XYZ' or '${token.rawName}-XYZ'`; + const errorMessage = `Option '${token.rawName}' argument is ambiguous. +Did you forget to specify the option argument for '${token.rawName}'? +To specify an option argument starting with a dash use ${example}.`; + throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(errorMessage); + } +} + +/** + * In strict mode, throw for usage errors. + * + * @param {object} config - from config passed to parseArgs + * @param {object} token - from tokens as available from parseArgs + */ +function checkOptionUsage(config, token) { + if (!ObjectHasOwn(config.options, token.name)) { + throw new ERR_PARSE_ARGS_UNKNOWN_OPTION( + token.rawName, config.allowPositionals); + } + + const short = optionsGetOwn(config.options, token.name, 'short'); + const shortAndLong = `${short ? `-${short}, ` : ''}--${token.name}`; + const type = optionsGetOwn(config.options, token.name, 'type'); + if (type === 'string' && typeof token.value !== 'string') { + throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong} ' argument missing`); + } + // (Idiomatic test for undefined||null, expecting undefined.) + if (type === 'boolean' && token.value != null) { + throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong}' does not take an argument`); + } +} + + +/** + * Store the option value in `values`. + * + * @param {string} longOption - long option name e.g. 'foo' + * @param {string|undefined} optionValue - value from user args + * @param {object} options - option configs, from parseArgs({ options }) + * @param {object} values - option values returned in `values` by parseArgs + */ +function storeOption(longOption, optionValue, options, values) { + if (longOption === '__proto__') { + return; // No. Just no. + } + + // We store based on the option value rather than option type, + // preserving the users intent for author to deal with. + const newValue = optionValue ?? true; + if (optionsGetOwn(options, longOption, 'multiple')) { + // Always store value in array, including for boolean. + // values[longOption] starts out not present, + // first value is added as new array [newValue], + // subsequent values are pushed to existing array. + // (note: values has null prototype, so simpler usage) + if (values[longOption]) { + ArrayPrototypePush(values[longOption], newValue); + } else { + values[longOption] = [newValue]; + } + } else { + values[longOption] = newValue; + } +} + +/** + * Store the default option value in `values`. + * + * @param {string} longOption - long option name e.g. 'foo' + * @param {string + * | boolean + * | string[] + * | boolean[]} optionValue - default value from option config + * @param {object} values - option values returned in `values` by parseArgs + */ +function storeDefaultOption(longOption, optionValue, values) { + if (longOption === '__proto__') { + return; // No. Just no. + } + + values[longOption] = optionValue; +} + +/** + * Process args and turn into identified tokens: + * - option (along with value, if any) + * - positional + * - option-terminator + * + * @param {string[]} args - from parseArgs({ args }) or mainArgs + * @param {object} options - option configs, from parseArgs({ options }) + */ +function argsToTokens(args, options) { + const tokens = []; + let index = -1; + let groupCount = 0; + + const remainingArgs = ArrayPrototypeSlice(args); + while (remainingArgs.length > 0) { + const arg = ArrayPrototypeShift(remainingArgs); + const nextArg = remainingArgs[0]; + if (groupCount > 0) + groupCount--; + else + index++; + + // Check if `arg` is an options terminator. + // Guideline 10 in https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html + if (arg === '--') { + // Everything after a bare '--' is considered a positional argument. + ArrayPrototypePush(tokens, { kind: 'option-terminator', index }); + ArrayPrototypePushApply( + tokens, ArrayPrototypeMap(remainingArgs, (arg) => { + return { kind: 'positional', index: ++index, value: arg }; + }) + ); + break; // Finished processing args, leave while loop. + } + + if (isLoneShortOption(arg)) { + // e.g. '-f' + const shortOption = StringPrototypeCharAt(arg, 1); + const longOption = findLongOptionForShort(shortOption, options); + let value; + let inlineValue; + if (optionsGetOwn(options, longOption, 'type') === 'string' && + isOptionValue(nextArg)) { + // e.g. '-f', 'bar' + value = ArrayPrototypeShift(remainingArgs); + inlineValue = false; + } + ArrayPrototypePush( + tokens, + { kind: 'option', name: longOption, rawName: arg, + index, value, inlineValue }); + if (value != null) ++index; + continue; + } + + if (isShortOptionGroup(arg, options)) { + // Expand -fXzy to -f -X -z -y + const expanded = []; + for (let index = 1; index < arg.length; index++) { + const shortOption = StringPrototypeCharAt(arg, index); + const longOption = findLongOptionForShort(shortOption, options); + if (optionsGetOwn(options, longOption, 'type') !== 'string' || + index === arg.length - 1) { + // Boolean option, or last short in group. Well formed. + ArrayPrototypePush(expanded, `-${shortOption}`); + } else { + // String option in middle. Yuck. + // Expand -abfFILE to -a -b -fFILE + ArrayPrototypePush(expanded, `-${StringPrototypeSlice(arg, index)}`); + break; // finished short group + } + } + ArrayPrototypeUnshiftApply(remainingArgs, expanded); + groupCount = expanded.length; + continue; + } + + if (isShortOptionAndValue(arg, options)) { + // e.g. -fFILE + const shortOption = StringPrototypeCharAt(arg, 1); + const longOption = findLongOptionForShort(shortOption, options); + const value = StringPrototypeSlice(arg, 2); + ArrayPrototypePush( + tokens, + { kind: 'option', name: longOption, rawName: `-${shortOption}`, + index, value, inlineValue: true }); + continue; + } + + if (isLoneLongOption(arg)) { + // e.g. '--foo' + const longOption = StringPrototypeSlice(arg, 2); + let value; + let inlineValue; + if (optionsGetOwn(options, longOption, 'type') === 'string' && + isOptionValue(nextArg)) { + // e.g. '--foo', 'bar' + value = ArrayPrototypeShift(remainingArgs); + inlineValue = false; + } + ArrayPrototypePush( + tokens, + { kind: 'option', name: longOption, rawName: arg, + index, value, inlineValue }); + if (value != null) ++index; + continue; + } + + if (isLongOptionAndValue(arg)) { + // e.g. --foo=bar + const equalIndex = StringPrototypeIndexOf(arg, '='); + const longOption = StringPrototypeSlice(arg, 2, equalIndex); + const value = StringPrototypeSlice(arg, equalIndex + 1); + ArrayPrototypePush( + tokens, + { kind: 'option', name: longOption, rawName: `--${longOption}`, + index, value, inlineValue: true }); + continue; + } + + ArrayPrototypePush(tokens, { kind: 'positional', index, value: arg }); + } + + return tokens; +} + +const parseArgs = (config = kEmptyObject) => { + const args = objectGetOwn(config, 'args') ?? getMainArgs(); + const strict = objectGetOwn(config, 'strict') ?? true; + const allowPositionals = objectGetOwn(config, 'allowPositionals') ?? !strict; + const returnTokens = objectGetOwn(config, 'tokens') ?? false; + const options = objectGetOwn(config, 'options') ?? { __proto__: null }; + // Bundle these up for passing to strict-mode checks. + const parseConfig = { args, strict, options, allowPositionals }; + + // Validate input configuration. + validateArray(args, 'args'); + validateBoolean(strict, 'strict'); + validateBoolean(allowPositionals, 'allowPositionals'); + validateBoolean(returnTokens, 'tokens'); + validateObject(options, 'options'); + ArrayPrototypeForEach( + ObjectEntries(options), + ({ 0: longOption, 1: optionConfig }) => { + validateObject(optionConfig, `options.${longOption}`); + + // type is required + const optionType = objectGetOwn(optionConfig, 'type'); + validateUnion(optionType, `options.${longOption}.type`, ['string', 'boolean']); + + if (ObjectHasOwn(optionConfig, 'short')) { + const shortOption = optionConfig.short; + validateString(shortOption, `options.${longOption}.short`); + if (shortOption.length !== 1) { + throw new ERR_INVALID_ARG_VALUE( + `options.${longOption}.short`, + shortOption, + 'must be a single character' + ); + } + } + + const multipleOption = objectGetOwn(optionConfig, 'multiple'); + if (ObjectHasOwn(optionConfig, 'multiple')) { + validateBoolean(multipleOption, `options.${longOption}.multiple`); + } + + const defaultValue = objectGetOwn(optionConfig, 'default'); + if (defaultValue !== undefined) { + let validator; + switch (optionType) { + case 'string': + validator = multipleOption ? validateStringArray : validateString; + break; + + case 'boolean': + validator = multipleOption ? validateBooleanArray : validateBoolean; + break; + } + validator(defaultValue, `options.${longOption}.default`); + } + } + ); + + // Phase 1: identify tokens + const tokens = argsToTokens(args, options); + + // Phase 2: process tokens into parsed option values and positionals + const result = { + values: { __proto__: null }, + positionals: [], + }; + if (returnTokens) { + result.tokens = tokens; + } + ArrayPrototypeForEach(tokens, (token) => { + if (token.kind === 'option') { + if (strict) { + checkOptionUsage(parseConfig, token); + checkOptionLikeValue(token); + } + storeOption(token.name, token.value, options, result.values); + } else if (token.kind === 'positional') { + if (!allowPositionals) { + throw new ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL(token.value); + } + ArrayPrototypePush(result.positionals, token.value); + } + }); + + // Phase 3: fill in default values for missing args + ArrayPrototypeForEach(ObjectEntries(options), ({ 0: longOption, + 1: optionConfig }) => { + const mustSetDefault = useDefaultValueOption(longOption, + optionConfig, + result.values); + if (mustSetDefault) { + storeDefaultOption(longOption, + objectGetOwn(optionConfig, 'default'), + result.values); + } + }); + + + return result; +}; + +module.exports = { + parseArgs, +}; diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/errors.js b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/errors.js new file mode 100644 index 0000000000000000000000000000000000000000..e1b237b5b16395895e310d18d0733410c940d17a --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/errors.js @@ -0,0 +1,47 @@ +'use strict'; + +class ERR_INVALID_ARG_TYPE extends TypeError { + constructor(name, expected, actual) { + super(`${name} must be ${expected} got ${actual}`); + this.code = 'ERR_INVALID_ARG_TYPE'; + } +} + +class ERR_INVALID_ARG_VALUE extends TypeError { + constructor(arg1, arg2, expected) { + super(`The property ${arg1} ${expected}. Received '${arg2}'`); + this.code = 'ERR_INVALID_ARG_VALUE'; + } +} + +class ERR_PARSE_ARGS_INVALID_OPTION_VALUE extends Error { + constructor(message) { + super(message); + this.code = 'ERR_PARSE_ARGS_INVALID_OPTION_VALUE'; + } +} + +class ERR_PARSE_ARGS_UNKNOWN_OPTION extends Error { + constructor(option, allowPositionals) { + const suggestDashDash = allowPositionals ? `. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- ${JSON.stringify(option)}` : ''; + super(`Unknown option '${option}'${suggestDashDash}`); + this.code = 'ERR_PARSE_ARGS_UNKNOWN_OPTION'; + } +} + +class ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL extends Error { + constructor(positional) { + super(`Unexpected argument '${positional}'. This command does not take positional arguments`); + this.code = 'ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL'; + } +} + +module.exports = { + codes: { + ERR_INVALID_ARG_TYPE, + ERR_INVALID_ARG_VALUE, + ERR_PARSE_ARGS_INVALID_OPTION_VALUE, + ERR_PARSE_ARGS_UNKNOWN_OPTION, + ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL, + } +}; diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/primordials.js b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/primordials.js new file mode 100644 index 0000000000000000000000000000000000000000..63e23ab117a9ccd324f792113c7a62e2f17e8ea2 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/primordials.js @@ -0,0 +1,393 @@ +/* +This file is copied from https://github.com/nodejs/node/blob/v14.19.3/lib/internal/per_context/primordials.js +under the following license: + +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +*/ + +'use strict'; + +/* eslint-disable node-core/prefer-primordials */ + +// This file subclasses and stores the JS builtins that come from the VM +// so that Node.js's builtin modules do not need to later look these up from +// the global proxy, which can be mutated by users. + +// Use of primordials have sometimes a dramatic impact on performance, please +// benchmark all changes made in performance-sensitive areas of the codebase. +// See: https://github.com/nodejs/node/pull/38248 + +const primordials = {}; + +const { + defineProperty: ReflectDefineProperty, + getOwnPropertyDescriptor: ReflectGetOwnPropertyDescriptor, + ownKeys: ReflectOwnKeys, +} = Reflect; + +// `uncurryThis` is equivalent to `func => Function.prototype.call.bind(func)`. +// It is using `bind.bind(call)` to avoid using `Function.prototype.bind` +// and `Function.prototype.call` after it may have been mutated by users. +const { apply, bind, call } = Function.prototype; +const uncurryThis = bind.bind(call); +primordials.uncurryThis = uncurryThis; + +// `applyBind` is equivalent to `func => Function.prototype.apply.bind(func)`. +// It is using `bind.bind(apply)` to avoid using `Function.prototype.bind` +// and `Function.prototype.apply` after it may have been mutated by users. +const applyBind = bind.bind(apply); +primordials.applyBind = applyBind; + +// Methods that accept a variable number of arguments, and thus it's useful to +// also create `${prefix}${key}Apply`, which uses `Function.prototype.apply`, +// instead of `Function.prototype.call`, and thus doesn't require iterator +// destructuring. +const varargsMethods = [ + // 'ArrayPrototypeConcat' is omitted, because it performs the spread + // on its own for arrays and array-likes with a truthy + // @@isConcatSpreadable symbol property. + 'ArrayOf', + 'ArrayPrototypePush', + 'ArrayPrototypeUnshift', + // 'FunctionPrototypeCall' is omitted, since there's 'ReflectApply' + // and 'FunctionPrototypeApply'. + 'MathHypot', + 'MathMax', + 'MathMin', + 'StringPrototypeConcat', + 'TypedArrayOf', +]; + +function getNewKey(key) { + return typeof key === 'symbol' ? + `Symbol${key.description[7].toUpperCase()}${key.description.slice(8)}` : + `${key[0].toUpperCase()}${key.slice(1)}`; +} + +function copyAccessor(dest, prefix, key, { enumerable, get, set }) { + ReflectDefineProperty(dest, `${prefix}Get${key}`, { + value: uncurryThis(get), + enumerable + }); + if (set !== undefined) { + ReflectDefineProperty(dest, `${prefix}Set${key}`, { + value: uncurryThis(set), + enumerable + }); + } +} + +function copyPropsRenamed(src, dest, prefix) { + for (const key of ReflectOwnKeys(src)) { + const newKey = getNewKey(key); + const desc = ReflectGetOwnPropertyDescriptor(src, key); + if ('get' in desc) { + copyAccessor(dest, prefix, newKey, desc); + } else { + const name = `${prefix}${newKey}`; + ReflectDefineProperty(dest, name, desc); + if (varargsMethods.includes(name)) { + ReflectDefineProperty(dest, `${name}Apply`, { + // `src` is bound as the `this` so that the static `this` points + // to the object it was defined on, + // e.g.: `ArrayOfApply` gets a `this` of `Array`: + value: applyBind(desc.value, src), + }); + } + } + } +} + +function copyPropsRenamedBound(src, dest, prefix) { + for (const key of ReflectOwnKeys(src)) { + const newKey = getNewKey(key); + const desc = ReflectGetOwnPropertyDescriptor(src, key); + if ('get' in desc) { + copyAccessor(dest, prefix, newKey, desc); + } else { + const { value } = desc; + if (typeof value === 'function') { + desc.value = value.bind(src); + } + + const name = `${prefix}${newKey}`; + ReflectDefineProperty(dest, name, desc); + if (varargsMethods.includes(name)) { + ReflectDefineProperty(dest, `${name}Apply`, { + value: applyBind(value, src), + }); + } + } + } +} + +function copyPrototype(src, dest, prefix) { + for (const key of ReflectOwnKeys(src)) { + const newKey = getNewKey(key); + const desc = ReflectGetOwnPropertyDescriptor(src, key); + if ('get' in desc) { + copyAccessor(dest, prefix, newKey, desc); + } else { + const { value } = desc; + if (typeof value === 'function') { + desc.value = uncurryThis(value); + } + + const name = `${prefix}${newKey}`; + ReflectDefineProperty(dest, name, desc); + if (varargsMethods.includes(name)) { + ReflectDefineProperty(dest, `${name}Apply`, { + value: applyBind(value), + }); + } + } + } +} + +// Create copies of configurable value properties of the global object +[ + 'Proxy', + 'globalThis', +].forEach((name) => { + // eslint-disable-next-line no-restricted-globals + primordials[name] = globalThis[name]; +}); + +// Create copies of URI handling functions +[ + decodeURI, + decodeURIComponent, + encodeURI, + encodeURIComponent, +].forEach((fn) => { + primordials[fn.name] = fn; +}); + +// Create copies of the namespace objects +[ + 'JSON', + 'Math', + 'Proxy', + 'Reflect', +].forEach((name) => { + // eslint-disable-next-line no-restricted-globals + copyPropsRenamed(global[name], primordials, name); +}); + +// Create copies of intrinsic objects +[ + 'Array', + 'ArrayBuffer', + 'BigInt', + 'BigInt64Array', + 'BigUint64Array', + 'Boolean', + 'DataView', + 'Date', + 'Error', + 'EvalError', + 'Float32Array', + 'Float64Array', + 'Function', + 'Int16Array', + 'Int32Array', + 'Int8Array', + 'Map', + 'Number', + 'Object', + 'RangeError', + 'ReferenceError', + 'RegExp', + 'Set', + 'String', + 'Symbol', + 'SyntaxError', + 'TypeError', + 'URIError', + 'Uint16Array', + 'Uint32Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'WeakMap', + 'WeakSet', +].forEach((name) => { + // eslint-disable-next-line no-restricted-globals + const original = global[name]; + primordials[name] = original; + copyPropsRenamed(original, primordials, name); + copyPrototype(original.prototype, primordials, `${name}Prototype`); +}); + +// Create copies of intrinsic objects that require a valid `this` to call +// static methods. +// Refs: https://www.ecma-international.org/ecma-262/#sec-promise.all +[ + 'Promise', +].forEach((name) => { + // eslint-disable-next-line no-restricted-globals + const original = global[name]; + primordials[name] = original; + copyPropsRenamedBound(original, primordials, name); + copyPrototype(original.prototype, primordials, `${name}Prototype`); +}); + +// Create copies of abstract intrinsic objects that are not directly exposed +// on the global object. +// Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object +[ + { name: 'TypedArray', original: Reflect.getPrototypeOf(Uint8Array) }, + { name: 'ArrayIterator', original: { + prototype: Reflect.getPrototypeOf(Array.prototype[Symbol.iterator]()), + } }, + { name: 'StringIterator', original: { + prototype: Reflect.getPrototypeOf(String.prototype[Symbol.iterator]()), + } }, +].forEach(({ name, original }) => { + primordials[name] = original; + // The static %TypedArray% methods require a valid `this`, but can't be bound, + // as they need a subclass constructor as the receiver: + copyPrototype(original, primordials, name); + copyPrototype(original.prototype, primordials, `${name}Prototype`); +}); + +/* eslint-enable node-core/prefer-primordials */ + +const { + ArrayPrototypeForEach, + FunctionPrototypeCall, + Map, + ObjectFreeze, + ObjectSetPrototypeOf, + Set, + SymbolIterator, + WeakMap, + WeakSet, +} = primordials; + +// Because these functions are used by `makeSafe`, which is exposed +// on the `primordials` object, it's important to use const references +// to the primordials that they use: +const createSafeIterator = (factory, next) => { + class SafeIterator { + constructor(iterable) { + this._iterator = factory(iterable); + } + next() { + return next(this._iterator); + } + [SymbolIterator]() { + return this; + } + } + ObjectSetPrototypeOf(SafeIterator.prototype, null); + ObjectFreeze(SafeIterator.prototype); + ObjectFreeze(SafeIterator); + return SafeIterator; +}; + +primordials.SafeArrayIterator = createSafeIterator( + primordials.ArrayPrototypeSymbolIterator, + primordials.ArrayIteratorPrototypeNext +); +primordials.SafeStringIterator = createSafeIterator( + primordials.StringPrototypeSymbolIterator, + primordials.StringIteratorPrototypeNext +); + +const copyProps = (src, dest) => { + ArrayPrototypeForEach(ReflectOwnKeys(src), (key) => { + if (!ReflectGetOwnPropertyDescriptor(dest, key)) { + ReflectDefineProperty( + dest, + key, + ReflectGetOwnPropertyDescriptor(src, key)); + } + }); +}; + +const makeSafe = (unsafe, safe) => { + if (SymbolIterator in unsafe.prototype) { + const dummy = new unsafe(); + let next; // We can reuse the same `next` method. + + ArrayPrototypeForEach(ReflectOwnKeys(unsafe.prototype), (key) => { + if (!ReflectGetOwnPropertyDescriptor(safe.prototype, key)) { + const desc = ReflectGetOwnPropertyDescriptor(unsafe.prototype, key); + if ( + typeof desc.value === 'function' && + desc.value.length === 0 && + SymbolIterator in (FunctionPrototypeCall(desc.value, dummy) ?? {}) + ) { + const createIterator = uncurryThis(desc.value); + next = next ?? uncurryThis(createIterator(dummy).next); + const SafeIterator = createSafeIterator(createIterator, next); + desc.value = function() { + return new SafeIterator(this); + }; + } + ReflectDefineProperty(safe.prototype, key, desc); + } + }); + } else { + copyProps(unsafe.prototype, safe.prototype); + } + copyProps(unsafe, safe); + + ObjectSetPrototypeOf(safe.prototype, null); + ObjectFreeze(safe.prototype); + ObjectFreeze(safe); + return safe; +}; +primordials.makeSafe = makeSafe; + +// Subclass the constructors because we need to use their prototype +// methods later. +// Defining the `constructor` is necessary here to avoid the default +// constructor which uses the user-mutable `%ArrayIteratorPrototype%.next`. +primordials.SafeMap = makeSafe( + Map, + class SafeMap extends Map { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } +); +primordials.SafeWeakMap = makeSafe( + WeakMap, + class SafeWeakMap extends WeakMap { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } +); +primordials.SafeSet = makeSafe( + Set, + class SafeSet extends Set { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } +); +primordials.SafeWeakSet = makeSafe( + WeakSet, + class SafeWeakSet extends WeakSet { + constructor(i) { super(i); } // eslint-disable-line no-useless-constructor + } +); + +ObjectSetPrototypeOf(primordials, null); +ObjectFreeze(primordials); + +module.exports = primordials; diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/util.js b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/util.js new file mode 100644 index 0000000000000000000000000000000000000000..b9b8fe5b8d7c02ec295f7b7b01d0bf3ef9fbccf1 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/util.js @@ -0,0 +1,14 @@ +'use strict'; + +// This is a placeholder for util.js in node.js land. + +const { + ObjectCreate, + ObjectFreeze, +} = require('./primordials'); + +const kEmptyObject = ObjectFreeze(ObjectCreate(null)); + +module.exports = { + kEmptyObject, +}; diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/validators.js b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/validators.js new file mode 100644 index 0000000000000000000000000000000000000000..b5ac4fb501eff454ad583570027f8b1aa044ca43 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/internal/validators.js @@ -0,0 +1,89 @@ +'use strict'; + +// This file is a proxy of the original file located at: +// https://github.com/nodejs/node/blob/main/lib/internal/validators.js +// Every addition or modification to this file must be evaluated +// during the PR review. + +const { + ArrayIsArray, + ArrayPrototypeIncludes, + ArrayPrototypeJoin, +} = require('./primordials'); + +const { + codes: { + ERR_INVALID_ARG_TYPE + } +} = require('./errors'); + +function validateString(value, name) { + if (typeof value !== 'string') { + throw new ERR_INVALID_ARG_TYPE(name, 'String', value); + } +} + +function validateUnion(value, name, union) { + if (!ArrayPrototypeIncludes(union, value)) { + throw new ERR_INVALID_ARG_TYPE(name, `('${ArrayPrototypeJoin(union, '|')}')`, value); + } +} + +function validateBoolean(value, name) { + if (typeof value !== 'boolean') { + throw new ERR_INVALID_ARG_TYPE(name, 'Boolean', value); + } +} + +function validateArray(value, name) { + if (!ArrayIsArray(value)) { + throw new ERR_INVALID_ARG_TYPE(name, 'Array', value); + } +} + +function validateStringArray(value, name) { + validateArray(value, name); + for (let i = 0; i < value.length; i++) { + validateString(value[i], `${name}[${i}]`); + } +} + +function validateBooleanArray(value, name) { + validateArray(value, name); + for (let i = 0; i < value.length; i++) { + validateBoolean(value[i], `${name}[${i}]`); + } +} + +/** + * @param {unknown} value + * @param {string} name + * @param {{ + * allowArray?: boolean, + * allowFunction?: boolean, + * nullable?: boolean + * }} [options] + */ +function validateObject(value, name, options) { + const useDefaultOptions = options == null; + const allowArray = useDefaultOptions ? false : options.allowArray; + const allowFunction = useDefaultOptions ? false : options.allowFunction; + const nullable = useDefaultOptions ? false : options.nullable; + if ((!nullable && value === null) || + (!allowArray && ArrayIsArray(value)) || + (typeof value !== 'object' && ( + !allowFunction || typeof value !== 'function' + ))) { + throw new ERR_INVALID_ARG_TYPE(name, 'Object', value); + } +} + +module.exports = { + validateArray, + validateObject, + validateString, + validateStringArray, + validateUnion, + validateBoolean, + validateBooleanArray, +}; diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/package.json b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0bcc05c0d4a3ec6b9616824c5ed25feb899d76ec --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/package.json @@ -0,0 +1,36 @@ +{ + "name": "@pkgjs/parseargs", + "version": "0.11.0", + "description": "Polyfill of future proposal for `util.parseArgs()`", + "engines": { + "node": ">=14" + }, + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "coverage": "c8 --check-coverage tape 'test/*.js'", + "test": "c8 tape 'test/*.js'", + "posttest": "eslint .", + "fix": "npm run posttest -- --fix" + }, + "repository": { + "type": "git", + "url": "git@github.com:pkgjs/parseargs.git" + }, + "keywords": [], + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/pkgjs/parseargs/issues" + }, + "homepage": "https://github.com/pkgjs/parseargs#readme", + "devDependencies": { + "c8": "^7.10.0", + "eslint": "^8.2.0", + "eslint-plugin-node-core": "iansu/eslint-plugin-node-core", + "tape": "^5.2.2" + } +} diff --git a/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/utils.js b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..d7f420a2339246233300ad2cdb2619f79261e4b8 --- /dev/null +++ b/node_modules/.pnpm/@pkgjs+parseargs@0.11.0/node_modules/@pkgjs/parseargs/utils.js @@ -0,0 +1,198 @@ +'use strict'; + +const { + ArrayPrototypeFind, + ObjectEntries, + ObjectPrototypeHasOwnProperty: ObjectHasOwn, + StringPrototypeCharAt, + StringPrototypeIncludes, + StringPrototypeStartsWith, +} = require('./internal/primordials'); + +const { + validateObject, +} = require('./internal/validators'); + +// These are internal utilities to make the parsing logic easier to read, and +// add lots of detail for the curious. They are in a separate file to allow +// unit testing, although that is not essential (this could be rolled into +// main file and just tested implicitly via API). +// +// These routines are for internal use, not for export to client. + +/** + * Return the named property, but only if it is an own property. + */ +function objectGetOwn(obj, prop) { + if (ObjectHasOwn(obj, prop)) + return obj[prop]; +} + +/** + * Return the named options property, but only if it is an own property. + */ +function optionsGetOwn(options, longOption, prop) { + if (ObjectHasOwn(options, longOption)) + return objectGetOwn(options[longOption], prop); +} + +/** + * Determines if the argument may be used as an option value. + * @example + * isOptionValue('V') // returns true + * isOptionValue('-v') // returns true (greedy) + * isOptionValue('--foo') // returns true (greedy) + * isOptionValue(undefined) // returns false + */ +function isOptionValue(value) { + if (value == null) return false; + + // Open Group Utility Conventions are that an option-argument + // is the argument after the option, and may start with a dash. + return true; // greedy! +} + +/** + * Detect whether there is possible confusion and user may have omitted + * the option argument, like `--port --verbose` when `port` of type:string. + * In strict mode we throw errors if value is option-like. + */ +function isOptionLikeValue(value) { + if (value == null) return false; + + return value.length > 1 && StringPrototypeCharAt(value, 0) === '-'; +} + +/** + * Determines if `arg` is just a short option. + * @example '-f' + */ +function isLoneShortOption(arg) { + return arg.length === 2 && + StringPrototypeCharAt(arg, 0) === '-' && + StringPrototypeCharAt(arg, 1) !== '-'; +} + +/** + * Determines if `arg` is a lone long option. + * @example + * isLoneLongOption('a') // returns false + * isLoneLongOption('-a') // returns false + * isLoneLongOption('--foo') // returns true + * isLoneLongOption('--foo=bar') // returns false + */ +function isLoneLongOption(arg) { + return arg.length > 2 && + StringPrototypeStartsWith(arg, '--') && + !StringPrototypeIncludes(arg, '=', 3); +} + +/** + * Determines if `arg` is a long option and value in the same argument. + * @example + * isLongOptionAndValue('--foo') // returns false + * isLongOptionAndValue('--foo=bar') // returns true + */ +function isLongOptionAndValue(arg) { + return arg.length > 2 && + StringPrototypeStartsWith(arg, '--') && + StringPrototypeIncludes(arg, '=', 3); +} + +/** + * Determines if `arg` is a short option group. + * + * See Guideline 5 of the [Open Group Utility Conventions](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html). + * One or more options without option-arguments, followed by at most one + * option that takes an option-argument, should be accepted when grouped + * behind one '-' delimiter. + * @example + * isShortOptionGroup('-a', {}) // returns false + * isShortOptionGroup('-ab', {}) // returns true + * // -fb is an option and a value, not a short option group + * isShortOptionGroup('-fb', { + * options: { f: { type: 'string' } } + * }) // returns false + * isShortOptionGroup('-bf', { + * options: { f: { type: 'string' } } + * }) // returns true + * // -bfb is an edge case, return true and caller sorts it out + * isShortOptionGroup('-bfb', { + * options: { f: { type: 'string' } } + * }) // returns true + */ +function isShortOptionGroup(arg, options) { + if (arg.length <= 2) return false; + if (StringPrototypeCharAt(arg, 0) !== '-') return false; + if (StringPrototypeCharAt(arg, 1) === '-') return false; + + const firstShort = StringPrototypeCharAt(arg, 1); + const longOption = findLongOptionForShort(firstShort, options); + return optionsGetOwn(options, longOption, 'type') !== 'string'; +} + +/** + * Determine if arg is a short string option followed by its value. + * @example + * isShortOptionAndValue('-a', {}); // returns false + * isShortOptionAndValue('-ab', {}); // returns false + * isShortOptionAndValue('-fFILE', { + * options: { foo: { short: 'f', type: 'string' }} + * }) // returns true + */ +function isShortOptionAndValue(arg, options) { + validateObject(options, 'options'); + + if (arg.length <= 2) return false; + if (StringPrototypeCharAt(arg, 0) !== '-') return false; + if (StringPrototypeCharAt(arg, 1) === '-') return false; + + const shortOption = StringPrototypeCharAt(arg, 1); + const longOption = findLongOptionForShort(shortOption, options); + return optionsGetOwn(options, longOption, 'type') === 'string'; +} + +/** + * Find the long option associated with a short option. Looks for a configured + * `short` and returns the short option itself if a long option is not found. + * @example + * findLongOptionForShort('a', {}) // returns 'a' + * findLongOptionForShort('b', { + * options: { bar: { short: 'b' } } + * }) // returns 'bar' + */ +function findLongOptionForShort(shortOption, options) { + validateObject(options, 'options'); + const longOptionEntry = ArrayPrototypeFind( + ObjectEntries(options), + ({ 1: optionConfig }) => objectGetOwn(optionConfig, 'short') === shortOption + ); + return longOptionEntry?.[0] ?? shortOption; +} + +/** + * Check if the given option includes a default value + * and that option has not been set by the input args. + * + * @param {string} longOption - long option name e.g. 'foo' + * @param {object} optionConfig - the option configuration properties + * @param {object} values - option values returned in `values` by parseArgs + */ +function useDefaultValueOption(longOption, optionConfig, values) { + return objectGetOwn(optionConfig, 'default') !== undefined && + values[longOption] === undefined; +} + +module.exports = { + findLongOptionForShort, + isLoneLongOption, + isLoneShortOption, + isLongOptionAndValue, + isOptionValue, + isOptionLikeValue, + isShortOptionAndValue, + isShortOptionGroup, + useDefaultValueOption, + objectGetOwn, + optionsGetOwn, +}; diff --git a/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/README.md b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/README.md new file mode 100644 index 0000000000000000000000000000000000000000..edb96b0132fa8d246be7fba97bfa24d0080eb824 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/README.md @@ -0,0 +1,13 @@ +# `number` + +## Installation + +```sh +$ yarn add @radix-ui/number +# or +$ npm install @radix-ui/number +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..971ef6b9aa0cd15adfe3b5ab314f9c5d9e1ff4e9 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.d.mts @@ -0,0 +1,3 @@ +declare function clamp(value: number, [min, max]: [number, number]): number; + +export { clamp }; diff --git a/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..971ef6b9aa0cd15adfe3b5ab314f9c5d9e1ff4e9 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.d.ts @@ -0,0 +1,3 @@ +declare function clamp(value: number, [min, max]: [number, number]): number; + +export { clamp }; diff --git a/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.js b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..9f0430efe39e0edcbd033eb4cd874af5abc4cdec --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.js @@ -0,0 +1,31 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/core/number/src/index.ts +var index_exports = {}; +__export(index_exports, { + clamp: () => clamp +}); +module.exports = __toCommonJS(index_exports); + +// packages/core/number/src/number.ts +function clamp(value, [min, max]) { + return Math.min(max, Math.max(min, value)); +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.js.map b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f438a44bc1621a36ee8ebab089463cb51c2cc92c --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/number.ts"], + "sourcesContent": ["export { clamp } from './number';\n", "function clamp(value: number, [min, max]: [number, number]): number {\n return Math.min(max, Math.max(min, value));\n}\n\nexport { clamp };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AAClE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.mjs b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ddb5cc9bf034c508375a07c26c3103ba7dc6f80f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.mjs @@ -0,0 +1,8 @@ +// packages/core/number/src/number.ts +function clamp(value, [min, max]) { + return Math.min(max, Math.max(min, value)); +} +export { + clamp +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..3357e7e141da5de9457af4c7c590ea4e958cf5be --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/number.ts"], + "sourcesContent": ["function clamp(value: number, [min, max]: [number, number]): number {\n return Math.min(max, Math.max(min, value));\n}\n\nexport { clamp };\n"], + "mappings": ";AAAA,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AAClE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/package.json b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/package.json new file mode 100644 index 0000000000000000000000000000000000000000..82fa99455bbd75da220e32708f355e35ea91786e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/package.json @@ -0,0 +1,62 @@ +{ + "name": "@radix-ui/number", + "version": "1.1.1", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "eslint": "^9.18.0", + "typescript": "^5.7.3" + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/README.md b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/README.md new file mode 100644 index 0000000000000000000000000000000000000000..29f34e9b197e281a72069e63c1cc5e9f76f9d863 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/README.md @@ -0,0 +1,13 @@ +# `primitive` + +## Installation + +```sh +$ yarn add @radix-ui/primitive +# or +$ npm install @radix-ui/primitive +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a3dac156da5622b125bf8e8346a4c127d63f36ea --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.d.mts @@ -0,0 +1,7 @@ +declare function composeEventHandlers(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: { + checkForDefaultPrevented?: boolean | undefined; +}): (event: E) => void; + +export { composeEventHandlers }; diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a3dac156da5622b125bf8e8346a4c127d63f36ea --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.d.ts @@ -0,0 +1,7 @@ +declare function composeEventHandlers(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: { + checkForDefaultPrevented?: boolean | undefined; +}): (event: E) => void; + +export { composeEventHandlers }; diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.js b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..2beb5a6dec9acb27b62b32ab6f0ef9bbdd5780f9 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.js @@ -0,0 +1,36 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/core/primitive/src/index.ts +var index_exports = {}; +__export(index_exports, { + composeEventHandlers: () => composeEventHandlers +}); +module.exports = __toCommonJS(index_exports); + +// packages/core/primitive/src/primitive.tsx +function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) { + return function handleEvent(event) { + originalEventHandler?.(event); + if (checkForDefaultPrevented === false || !event.defaultPrevented) { + return ourEventHandler?.(event); + } + }; +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.js.map b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b7f36bc83ba03a04202ca5767c5349545fd05b3f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/primitive.tsx"], + "sourcesContent": ["export { composeEventHandlers } from './primitive';\n", "function composeEventHandlers(\n originalEventHandler?: (event: E) => void,\n ourEventHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) {\n return function handleEvent(event: E) {\n originalEventHandler?.(event);\n\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\n\nexport { composeEventHandlers };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,SAAS,qBACP,sBACA,iBACA,EAAE,2BAA2B,KAAK,IAAI,CAAC,GACvC;AACA,SAAO,SAAS,YAAY,OAAU;AACpC,2BAAuB,KAAK;AAE5B,QAAI,6BAA6B,SAAS,CAAC,MAAM,kBAAkB;AACjE,aAAO,kBAAkB,KAAK;AAAA,IAChC;AAAA,EACF;AACF;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0bc0d71cb7b8dc4acd916e5b9aeb0b613fbb3510 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs @@ -0,0 +1,13 @@ +// packages/core/primitive/src/primitive.tsx +function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) { + return function handleEvent(event) { + originalEventHandler?.(event); + if (checkForDefaultPrevented === false || !event.defaultPrevented) { + return ourEventHandler?.(event); + } + }; +} +export { + composeEventHandlers +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..b19680a375c0267160cf642d0d63b24257a7cffa --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/primitive.tsx"], + "sourcesContent": ["function composeEventHandlers(\n originalEventHandler?: (event: E) => void,\n ourEventHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) {\n return function handleEvent(event: E) {\n originalEventHandler?.(event);\n\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\n\nexport { composeEventHandlers };\n"], + "mappings": ";AAAA,SAAS,qBACP,sBACA,iBACA,EAAE,2BAA2B,KAAK,IAAI,CAAC,GACvC;AACA,SAAO,SAAS,YAAY,OAAU;AACpC,2BAAuB,KAAK;AAE5B,QAAI,6BAA6B,SAAS,CAAC,MAAM,kBAAkB;AACjE,aAAO,kBAAkB,KAAK;AAAA,IAChC;AAAA,EACF;AACF;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/package.json b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/package.json new file mode 100644 index 0000000000000000000000000000000000000000..00c4e40f633eea002745ef29dfc879a1331353c1 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/package.json @@ -0,0 +1,62 @@ +{ + "name": "@radix-ui/primitive", + "version": "1.1.2", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "eslint": "^9.18.0", + "typescript": "^5.7.3" + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/LICENSE b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/README.md b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/README.md new file mode 100644 index 0000000000000000000000000000000000000000..79d1eef22a1eb564a20adc03814dd443ccc5bf8e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/README.md @@ -0,0 +1,3 @@ +# `primitive` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..dad4db4aeb2ff16aa0f006b132a1f98b8ca7006e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.d.mts @@ -0,0 +1,20 @@ +declare const canUseDOM: boolean; +declare function composeEventHandlers(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: { + checkForDefaultPrevented?: boolean | undefined; +}): (event: E) => void; +declare function getOwnerWindow(element: Node | null | undefined): Window & typeof globalThis; +declare function getOwnerDocument(element: Node | null | undefined): Document; +/** + * Lifted from https://github.com/ariakit/ariakit/blob/main/packages/ariakit-core/src/utils/dom.ts#L37 + * MIT License, Copyright (c) AriaKit. + */ +declare function getActiveElement(node: Node | null | undefined, activeDescendant?: boolean): HTMLElement | null; +declare function isFrame(element: Element): element is HTMLIFrameElement; + +type Timeout = ReturnType; +type Interval = ReturnType; +type Immediate = ReturnType; + +export { type Immediate, type Interval, type Timeout, canUseDOM, composeEventHandlers, getActiveElement, getOwnerDocument, getOwnerWindow, isFrame }; diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..dad4db4aeb2ff16aa0f006b132a1f98b8ca7006e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.d.ts @@ -0,0 +1,20 @@ +declare const canUseDOM: boolean; +declare function composeEventHandlers(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: { + checkForDefaultPrevented?: boolean | undefined; +}): (event: E) => void; +declare function getOwnerWindow(element: Node | null | undefined): Window & typeof globalThis; +declare function getOwnerDocument(element: Node | null | undefined): Document; +/** + * Lifted from https://github.com/ariakit/ariakit/blob/main/packages/ariakit-core/src/utils/dom.ts#L37 + * MIT License, Copyright (c) AriaKit. + */ +declare function getActiveElement(node: Node | null | undefined, activeDescendant?: boolean): HTMLElement | null; +declare function isFrame(element: Element): element is HTMLIFrameElement; + +type Timeout = ReturnType; +type Interval = ReturnType; +type Immediate = ReturnType; + +export { type Immediate, type Interval, type Timeout, canUseDOM, composeEventHandlers, getActiveElement, getOwnerDocument, getOwnerWindow, isFrame }; diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..24ae5dea44e598438e32dda15623ecd5a2146c75 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js @@ -0,0 +1,76 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + canUseDOM: () => canUseDOM, + composeEventHandlers: () => composeEventHandlers, + getActiveElement: () => getActiveElement, + getOwnerDocument: () => getOwnerDocument, + getOwnerWindow: () => getOwnerWindow, + isFrame: () => isFrame +}); +module.exports = __toCommonJS(index_exports); + +// src/primitive.tsx +var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement); +function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) { + return function handleEvent(event) { + originalEventHandler?.(event); + if (checkForDefaultPrevented === false || !event.defaultPrevented) { + return ourEventHandler?.(event); + } + }; +} +function getOwnerWindow(element) { + if (!canUseDOM) { + throw new Error("Cannot access window outside of the DOM"); + } + return element?.ownerDocument?.defaultView ?? window; +} +function getOwnerDocument(element) { + if (!canUseDOM) { + throw new Error("Cannot access document outside of the DOM"); + } + return element?.ownerDocument ?? document; +} +function getActiveElement(node, activeDescendant = false) { + const { activeElement } = getOwnerDocument(node); + if (!activeElement?.nodeName) { + return null; + } + if (isFrame(activeElement) && activeElement.contentDocument) { + return getActiveElement(activeElement.contentDocument.body, activeDescendant); + } + if (activeDescendant) { + const id = activeElement.getAttribute("aria-activedescendant"); + if (id) { + const element = getOwnerDocument(activeElement).getElementById(id); + if (element) { + return element; + } + } + } + return activeElement; +} +function isFrame(element) { + return element.tagName === "IFRAME"; +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js.map b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4216864f16fde6962a6e4956a8954bd536b16926 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/primitive.tsx"], + "sourcesContent": ["export * from './primitive';\nexport type * from './types';\n", "/* eslint-disable no-restricted-properties */\n\n/* eslint-disable no-restricted-globals */\nexport const canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n/* eslint-enable no-restricted-globals */\n\nexport function composeEventHandlers(\n originalEventHandler?: (event: E) => void,\n ourEventHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) {\n return function handleEvent(event: E) {\n originalEventHandler?.(event);\n\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\n\nexport function getOwnerWindow(element: Node | null | undefined) {\n if (!canUseDOM) {\n throw new Error('Cannot access window outside of the DOM');\n }\n // eslint-disable-next-line no-restricted-globals\n return element?.ownerDocument?.defaultView ?? window;\n}\n\nexport function getOwnerDocument(element: Node | null | undefined) {\n if (!canUseDOM) {\n throw new Error('Cannot access document outside of the DOM');\n }\n // eslint-disable-next-line no-restricted-globals\n return element?.ownerDocument ?? document;\n}\n\n/**\n * Lifted from https://github.com/ariakit/ariakit/blob/main/packages/ariakit-core/src/utils/dom.ts#L37\n * MIT License, Copyright (c) AriaKit.\n */\nexport function getActiveElement(\n node: Node | null | undefined,\n activeDescendant = false\n): HTMLElement | null {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n // `activeElement` might be an empty object if we're interacting with elements\n // inside of an iframe.\n return null;\n }\n\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n\n if (activeDescendant) {\n const id = activeElement.getAttribute('aria-activedescendant');\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n\n return activeElement as HTMLElement | null;\n}\n\nexport function isFrame(element: Element): element is HTMLIFrameElement {\n return element.tagName === 'IFRAME';\n}\n"], + "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js b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d28e40879e85ea74263f3a3dcb8d987d35d09891 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs @@ -0,0 +1,53 @@ +// src/primitive.tsx +var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement); +function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) { + return function handleEvent(event) { + originalEventHandler?.(event); + if (checkForDefaultPrevented === false || !event.defaultPrevented) { + return ourEventHandler?.(event); + } + }; +} +function getOwnerWindow(element) { + if (!canUseDOM) { + throw new Error("Cannot access window outside of the DOM"); + } + return element?.ownerDocument?.defaultView ?? window; +} +function getOwnerDocument(element) { + if (!canUseDOM) { + throw new Error("Cannot access document outside of the DOM"); + } + return element?.ownerDocument ?? document; +} +function getActiveElement(node, activeDescendant = false) { + const { activeElement } = getOwnerDocument(node); + if (!activeElement?.nodeName) { + return null; + } + if (isFrame(activeElement) && activeElement.contentDocument) { + return getActiveElement(activeElement.contentDocument.body, activeDescendant); + } + if (activeDescendant) { + const id = activeElement.getAttribute("aria-activedescendant"); + if (id) { + const element = getOwnerDocument(activeElement).getElementById(id); + if (element) { + return element; + } + } + } + return activeElement; +} +function isFrame(element) { + return element.tagName === "IFRAME"; +} +export { + canUseDOM, + composeEventHandlers, + getActiveElement, + getOwnerDocument, + getOwnerWindow, + isFrame +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..c493c0df5cd3dd9dacc97213663fc93edb3354f6 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/primitive.tsx"], + "sourcesContent": ["/* eslint-disable no-restricted-properties */\n\n/* eslint-disable no-restricted-globals */\nexport const canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n/* eslint-enable no-restricted-globals */\n\nexport function composeEventHandlers(\n originalEventHandler?: (event: E) => void,\n ourEventHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) {\n return function handleEvent(event: E) {\n originalEventHandler?.(event);\n\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\n\nexport function getOwnerWindow(element: Node | null | undefined) {\n if (!canUseDOM) {\n throw new Error('Cannot access window outside of the DOM');\n }\n // eslint-disable-next-line no-restricted-globals\n return element?.ownerDocument?.defaultView ?? window;\n}\n\nexport function getOwnerDocument(element: Node | null | undefined) {\n if (!canUseDOM) {\n throw new Error('Cannot access document outside of the DOM');\n }\n // eslint-disable-next-line no-restricted-globals\n return element?.ownerDocument ?? document;\n}\n\n/**\n * Lifted from https://github.com/ariakit/ariakit/blob/main/packages/ariakit-core/src/utils/dom.ts#L37\n * MIT License, Copyright (c) AriaKit.\n */\nexport function getActiveElement(\n node: Node | null | undefined,\n activeDescendant = false\n): HTMLElement | null {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n // `activeElement` might be an empty object if we're interacting with elements\n // inside of an iframe.\n return null;\n }\n\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n\n if (activeDescendant) {\n const id = activeElement.getAttribute('aria-activedescendant');\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n\n return activeElement as HTMLElement | null;\n}\n\nexport function isFrame(element: Element): element is HTMLIFrameElement {\n return element.tagName === 'IFRAME';\n}\n"], + "mappings": ";AAGO,IAAM,YAAY,CAAC,EACxB,OAAO,WAAW,eAClB,OAAO,YACP,OAAO,SAAS;AAIX,SAAS,qBACd,sBACA,iBACA,EAAE,2BAA2B,KAAK,IAAI,CAAC,GACvC;AACA,SAAO,SAAS,YAAY,OAAU;AACpC,2BAAuB,KAAK;AAE5B,QAAI,6BAA6B,SAAS,CAAC,MAAM,kBAAkB;AACjE,aAAO,kBAAkB,KAAK;AAAA,IAChC;AAAA,EACF;AACF;AAEO,SAAS,eAAe,SAAkC;AAC/D,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,MAAM,yCAAyC;AAAA,EAC3D;AAEA,SAAO,SAAS,eAAe,eAAe;AAChD;AAEO,SAAS,iBAAiB,SAAkC;AACjE,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,MAAM,2CAA2C;AAAA,EAC7D;AAEA,SAAO,SAAS,iBAAiB;AACnC;AAMO,SAAS,iBACd,MACA,mBAAmB,OACC;AACpB,QAAM,EAAE,cAAc,IAAI,iBAAiB,IAAI;AAC/C,MAAI,CAAC,eAAe,UAAU;AAG5B,WAAO;AAAA,EACT;AAEA,MAAI,QAAQ,aAAa,KAAK,cAAc,iBAAiB;AAC3D,WAAO,iBAAiB,cAAc,gBAAgB,MAAM,gBAAgB;AAAA,EAC9E;AAEA,MAAI,kBAAkB;AACpB,UAAM,KAAK,cAAc,aAAa,uBAAuB;AAC7D,QAAI,IAAI;AACN,YAAM,UAAU,iBAAiB,aAAa,EAAE,eAAe,EAAE;AACjE,UAAI,SAAS;AACX,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEO,SAAS,QAAQ,SAAgD;AACtE,SAAO,QAAQ,YAAY;AAC7B;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/package.json b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/package.json new file mode 100644 index 0000000000000000000000000000000000000000..eac446839c0be3674942d35240daf4e247ea76a3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/package.json @@ -0,0 +1,47 @@ +{ + "name": "@radix-ui/primitive", + "version": "1.1.3", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "devDependencies": { + "eslint": "^9.18.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/eslint-config": "0.0.0" + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/LICENSE b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/README.md b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/README.md new file mode 100644 index 0000000000000000000000000000000000000000..e5f7dc9cea73a6d8b275baf6413a71075acbc687 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/README.md @@ -0,0 +1,3 @@ +# `react-accordion` + +View docs [here](https://radix-ui.com/primitives/docs/components/accordion). diff --git a/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6ac68222b1985e242d3c8b12673609da9042f0ab --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.d.mts @@ -0,0 +1,114 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'; + +type Direction = 'ltr' | 'rtl'; +declare const createAccordionScope: _radix_ui_react_context.CreateScope; +interface AccordionSingleProps extends AccordionImplSingleProps { + type: 'single'; +} +interface AccordionMultipleProps extends AccordionImplMultipleProps { + type: 'multiple'; +} +declare const Accordion: React.ForwardRefExoticComponent<(AccordionSingleProps | AccordionMultipleProps) & React.RefAttributes>; +interface AccordionImplSingleProps extends AccordionImplProps { + /** + * The controlled stateful value of the accordion item whose content is expanded. + */ + value?: string; + /** + * The value of the item whose content is expanded when the accordion is initially rendered. Use + * `defaultValue` if you do not need to control the state of an accordion. + */ + defaultValue?: string; + /** + * The callback that fires when the state of the accordion changes. + */ + onValueChange?(value: string): void; + /** + * Whether an accordion item can be collapsed after it has been opened. + * @default false + */ + collapsible?: boolean; +} +interface AccordionImplMultipleProps extends AccordionImplProps { + /** + * The controlled stateful value of the accordion items whose contents are expanded. + */ + value?: string[]; + /** + * The value of the items whose contents are expanded when the accordion is initially rendered. Use + * `defaultValue` if you do not need to control the state of an accordion. + */ + defaultValue?: string[]; + /** + * The callback that fires when the state of the accordion changes. + */ + onValueChange?(value: string[]): void; +} +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface AccordionImplProps extends PrimitiveDivProps { + /** + * Whether or not an accordion is disabled from user interaction. + * + * @defaultValue false + */ + disabled?: boolean; + /** + * The layout in which the Accordion operates. + * @default vertical + */ + orientation?: React.AriaAttributes['aria-orientation']; + /** + * The language read direction. + */ + dir?: Direction; +} +type CollapsibleProps = React.ComponentPropsWithoutRef; +interface AccordionItemProps extends Omit { + /** + * Whether or not an accordion item is disabled from user interaction. + * + * @defaultValue false + */ + disabled?: boolean; + /** + * A string value for the accordion item. All items within an accordion should use a unique value. + */ + value: string; +} +/** + * `AccordionItem` contains all of the parts of a collapsible section inside of an `Accordion`. + */ +declare const AccordionItem: React.ForwardRefExoticComponent>; +type PrimitiveHeading3Props = React.ComponentPropsWithoutRef; +interface AccordionHeaderProps extends PrimitiveHeading3Props { +} +/** + * `AccordionHeader` contains the content for the parts of an `AccordionItem` that will be visible + * whether or not its content is collapsed. + */ +declare const AccordionHeader: React.ForwardRefExoticComponent>; +type CollapsibleTriggerProps = React.ComponentPropsWithoutRef; +interface AccordionTriggerProps extends CollapsibleTriggerProps { +} +/** + * `AccordionTrigger` is the trigger that toggles the collapsed state of an `AccordionItem`. It + * should always be nested inside of an `AccordionHeader`. + */ +declare const AccordionTrigger: React.ForwardRefExoticComponent>; +type CollapsibleContentProps = React.ComponentPropsWithoutRef; +interface AccordionContentProps extends CollapsibleContentProps { +} +/** + * `AccordionContent` contains the collapsible content for an `AccordionItem`. + */ +declare const AccordionContent: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent<(AccordionSingleProps | AccordionMultipleProps) & React.RefAttributes>; +declare const Item: React.ForwardRefExoticComponent>; +declare const Header: React.ForwardRefExoticComponent>; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; + +export { Accordion, AccordionContent, type AccordionContentProps, AccordionHeader, type AccordionHeaderProps, AccordionItem, type AccordionItemProps, type AccordionMultipleProps, type AccordionSingleProps, AccordionTrigger, type AccordionTriggerProps, Content, Header, Item, Root, Trigger, createAccordionScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6ac68222b1985e242d3c8b12673609da9042f0ab --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.d.ts @@ -0,0 +1,114 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'; + +type Direction = 'ltr' | 'rtl'; +declare const createAccordionScope: _radix_ui_react_context.CreateScope; +interface AccordionSingleProps extends AccordionImplSingleProps { + type: 'single'; +} +interface AccordionMultipleProps extends AccordionImplMultipleProps { + type: 'multiple'; +} +declare const Accordion: React.ForwardRefExoticComponent<(AccordionSingleProps | AccordionMultipleProps) & React.RefAttributes>; +interface AccordionImplSingleProps extends AccordionImplProps { + /** + * The controlled stateful value of the accordion item whose content is expanded. + */ + value?: string; + /** + * The value of the item whose content is expanded when the accordion is initially rendered. Use + * `defaultValue` if you do not need to control the state of an accordion. + */ + defaultValue?: string; + /** + * The callback that fires when the state of the accordion changes. + */ + onValueChange?(value: string): void; + /** + * Whether an accordion item can be collapsed after it has been opened. + * @default false + */ + collapsible?: boolean; +} +interface AccordionImplMultipleProps extends AccordionImplProps { + /** + * The controlled stateful value of the accordion items whose contents are expanded. + */ + value?: string[]; + /** + * The value of the items whose contents are expanded when the accordion is initially rendered. Use + * `defaultValue` if you do not need to control the state of an accordion. + */ + defaultValue?: string[]; + /** + * The callback that fires when the state of the accordion changes. + */ + onValueChange?(value: string[]): void; +} +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface AccordionImplProps extends PrimitiveDivProps { + /** + * Whether or not an accordion is disabled from user interaction. + * + * @defaultValue false + */ + disabled?: boolean; + /** + * The layout in which the Accordion operates. + * @default vertical + */ + orientation?: React.AriaAttributes['aria-orientation']; + /** + * The language read direction. + */ + dir?: Direction; +} +type CollapsibleProps = React.ComponentPropsWithoutRef; +interface AccordionItemProps extends Omit { + /** + * Whether or not an accordion item is disabled from user interaction. + * + * @defaultValue false + */ + disabled?: boolean; + /** + * A string value for the accordion item. All items within an accordion should use a unique value. + */ + value: string; +} +/** + * `AccordionItem` contains all of the parts of a collapsible section inside of an `Accordion`. + */ +declare const AccordionItem: React.ForwardRefExoticComponent>; +type PrimitiveHeading3Props = React.ComponentPropsWithoutRef; +interface AccordionHeaderProps extends PrimitiveHeading3Props { +} +/** + * `AccordionHeader` contains the content for the parts of an `AccordionItem` that will be visible + * whether or not its content is collapsed. + */ +declare const AccordionHeader: React.ForwardRefExoticComponent>; +type CollapsibleTriggerProps = React.ComponentPropsWithoutRef; +interface AccordionTriggerProps extends CollapsibleTriggerProps { +} +/** + * `AccordionTrigger` is the trigger that toggles the collapsed state of an `AccordionItem`. It + * should always be nested inside of an `AccordionHeader`. + */ +declare const AccordionTrigger: React.ForwardRefExoticComponent>; +type CollapsibleContentProps = React.ComponentPropsWithoutRef; +interface AccordionContentProps extends CollapsibleContentProps { +} +/** + * `AccordionContent` contains the collapsible content for an `AccordionItem`. + */ +declare const AccordionContent: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent<(AccordionSingleProps | AccordionMultipleProps) & React.RefAttributes>; +declare const Item: React.ForwardRefExoticComponent>; +declare const Header: React.ForwardRefExoticComponent>; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; + +export { Accordion, AccordionContent, type AccordionContentProps, AccordionHeader, type AccordionHeaderProps, AccordionItem, type AccordionItemProps, type AccordionMultipleProps, type AccordionSingleProps, AccordionTrigger, type AccordionTriggerProps, Content, Header, Item, Root, Trigger, createAccordionScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.js b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..9b786726fdc360aad66541937f2f78ce939b4f78 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.js @@ -0,0 +1,352 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Accordion: () => Accordion, + AccordionContent: () => AccordionContent, + AccordionHeader: () => AccordionHeader, + AccordionItem: () => AccordionItem, + AccordionTrigger: () => AccordionTrigger, + Content: () => Content2, + Header: () => Header, + Item: () => Item, + Root: () => Root2, + Trigger: () => Trigger2, + createAccordionScope: () => createAccordionScope +}); +module.exports = __toCommonJS(index_exports); + +// src/accordion.tsx +var import_react = __toESM(require("react")); +var import_react_context = require("@radix-ui/react-context"); +var import_react_collection = require("@radix-ui/react-collection"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_primitive = require("@radix-ui/primitive"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible")); +var import_react_collapsible = require("@radix-ui/react-collapsible"); +var import_react_id = require("@radix-ui/react-id"); +var import_react_direction = require("@radix-ui/react-direction"); +var import_jsx_runtime = require("react/jsx-runtime"); +var ACCORDION_NAME = "Accordion"; +var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"]; +var [Collection, useCollection, createCollectionScope] = (0, import_react_collection.createCollection)(ACCORDION_NAME); +var [createAccordionContext, createAccordionScope] = (0, import_react_context.createContextScope)(ACCORDION_NAME, [ + createCollectionScope, + import_react_collapsible.createCollapsibleScope +]); +var useCollapsibleScope = (0, import_react_collapsible.createCollapsibleScope)(); +var Accordion = import_react.default.forwardRef( + (props, forwardedRef) => { + const { type, ...accordionProps } = props; + const singleProps = accordionProps; + const multipleProps = accordionProps; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: props.__scopeAccordion, children: type === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) }); + } +); +Accordion.displayName = ACCORDION_NAME; +var [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME); +var [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext( + ACCORDION_NAME, + { collapsible: false } +); +var AccordionImplSingle = import_react.default.forwardRef( + (props, forwardedRef) => { + const { + value: valueProp, + defaultValue, + onValueChange = () => { + }, + collapsible = false, + ...accordionSingleProps + } = props; + const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({ + prop: valueProp, + defaultProp: defaultValue ?? "", + onChange: onValueChange, + caller: ACCORDION_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + AccordionValueProvider, + { + scope: props.__scopeAccordion, + value: import_react.default.useMemo(() => value ? [value] : [], [value]), + onItemOpen: setValue, + onItemClose: import_react.default.useCallback(() => collapsible && setValue(""), [collapsible, setValue]), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) }) + } + ); + } +); +var AccordionImplMultiple = import_react.default.forwardRef((props, forwardedRef) => { + const { + value: valueProp, + defaultValue, + onValueChange = () => { + }, + ...accordionMultipleProps + } = props; + const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({ + prop: valueProp, + defaultProp: defaultValue ?? [], + onChange: onValueChange, + caller: ACCORDION_NAME + }); + const handleItemOpen = import_react.default.useCallback( + (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]), + [setValue] + ); + const handleItemClose = import_react.default.useCallback( + (itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)), + [setValue] + ); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + AccordionValueProvider, + { + scope: props.__scopeAccordion, + value, + onItemOpen: handleItemOpen, + onItemClose: handleItemClose, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) }) + } + ); +}); +var [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME); +var AccordionImpl = import_react.default.forwardRef( + (props, forwardedRef) => { + const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props; + const accordionRef = import_react.default.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(accordionRef, forwardedRef); + const getItems = useCollection(__scopeAccordion); + const direction = (0, import_react_direction.useDirection)(dir); + const isDirectionLTR = direction === "ltr"; + const handleKeyDown = (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + if (!ACCORDION_KEYS.includes(event.key)) return; + const target = event.target; + const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled); + const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target); + const triggerCount = triggerCollection.length; + if (triggerIndex === -1) return; + event.preventDefault(); + let nextIndex = triggerIndex; + const homeIndex = 0; + const endIndex = triggerCount - 1; + const moveNext = () => { + nextIndex = triggerIndex + 1; + if (nextIndex > endIndex) { + nextIndex = homeIndex; + } + }; + const movePrev = () => { + nextIndex = triggerIndex - 1; + if (nextIndex < homeIndex) { + nextIndex = endIndex; + } + }; + switch (event.key) { + case "Home": + nextIndex = homeIndex; + break; + case "End": + nextIndex = endIndex; + break; + case "ArrowRight": + if (orientation === "horizontal") { + if (isDirectionLTR) { + moveNext(); + } else { + movePrev(); + } + } + break; + case "ArrowDown": + if (orientation === "vertical") { + moveNext(); + } + break; + case "ArrowLeft": + if (orientation === "horizontal") { + if (isDirectionLTR) { + movePrev(); + } else { + moveNext(); + } + } + break; + case "ArrowUp": + if (orientation === "vertical") { + movePrev(); + } + break; + } + const clampedIndex = nextIndex % triggerCount; + triggerCollection[clampedIndex].ref.current?.focus(); + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + AccordionImplProvider, + { + scope: __scopeAccordion, + disabled, + direction: dir, + orientation, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + ...accordionProps, + "data-orientation": orientation, + ref: composedRefs, + onKeyDown: disabled ? void 0 : handleKeyDown + } + ) }) + } + ); + } +); +var ITEM_NAME = "AccordionItem"; +var [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME); +var AccordionItem = import_react.default.forwardRef( + (props, forwardedRef) => { + const { __scopeAccordion, value, ...accordionItemProps } = props; + const accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion); + const valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion); + const collapsibleScope = useCollapsibleScope(__scopeAccordion); + const triggerId = (0, import_react_id.useId)(); + const open = value && valueContext.value.includes(value) || false; + const disabled = accordionContext.disabled || props.disabled; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + AccordionItemProvider, + { + scope: __scopeAccordion, + open, + disabled, + triggerId, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + CollapsiblePrimitive.Root, + { + "data-orientation": accordionContext.orientation, + "data-state": getState(open), + ...collapsibleScope, + ...accordionItemProps, + ref: forwardedRef, + disabled, + open, + onOpenChange: (open2) => { + if (open2) { + valueContext.onItemOpen(value); + } else { + valueContext.onItemClose(value); + } + } + } + ) + } + ); + } +); +AccordionItem.displayName = ITEM_NAME; +var HEADER_NAME = "AccordionHeader"; +var AccordionHeader = import_react.default.forwardRef( + (props, forwardedRef) => { + const { __scopeAccordion, ...headerProps } = props; + const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion); + const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.h3, + { + "data-orientation": accordionContext.orientation, + "data-state": getState(itemContext.open), + "data-disabled": itemContext.disabled ? "" : void 0, + ...headerProps, + ref: forwardedRef + } + ); + } +); +AccordionHeader.displayName = HEADER_NAME; +var TRIGGER_NAME = "AccordionTrigger"; +var AccordionTrigger = import_react.default.forwardRef( + (props, forwardedRef) => { + const { __scopeAccordion, ...triggerProps } = props; + const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion); + const itemContext = useAccordionItemContext(TRIGGER_NAME, __scopeAccordion); + const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME, __scopeAccordion); + const collapsibleScope = useCollapsibleScope(__scopeAccordion); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + CollapsiblePrimitive.Trigger, + { + "aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0, + "data-orientation": accordionContext.orientation, + id: itemContext.triggerId, + ...collapsibleScope, + ...triggerProps, + ref: forwardedRef + } + ) }); + } +); +AccordionTrigger.displayName = TRIGGER_NAME; +var CONTENT_NAME = "AccordionContent"; +var AccordionContent = import_react.default.forwardRef( + (props, forwardedRef) => { + const { __scopeAccordion, ...contentProps } = props; + const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion); + const itemContext = useAccordionItemContext(CONTENT_NAME, __scopeAccordion); + const collapsibleScope = useCollapsibleScope(__scopeAccordion); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + CollapsiblePrimitive.Content, + { + role: "region", + "aria-labelledby": itemContext.triggerId, + "data-orientation": accordionContext.orientation, + ...collapsibleScope, + ...contentProps, + ref: forwardedRef, + style: { + ["--radix-accordion-content-height"]: "var(--radix-collapsible-content-height)", + ["--radix-accordion-content-width"]: "var(--radix-collapsible-content-width)", + ...props.style + } + } + ); + } +); +AccordionContent.displayName = CONTENT_NAME; +function getState(open) { + return open ? "open" : "closed"; +} +var Root2 = Accordion; +var Item = AccordionItem; +var Header = AccordionHeader; +var Trigger2 = AccordionTrigger; +var Content2 = AccordionContent; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b5d40f57cf0a0f36687c4f790d468d26e995cdfe --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/accordion.tsx"], + "sourcesContent": ["'use client';\nexport {\n createAccordionScope,\n //\n Accordion,\n AccordionItem,\n AccordionHeader,\n AccordionTrigger,\n AccordionContent,\n //\n Root,\n Item,\n Header,\n Trigger,\n Content,\n} from './accordion';\nexport type {\n AccordionSingleProps,\n AccordionMultipleProps,\n AccordionItemProps,\n AccordionHeaderProps,\n AccordionTriggerProps,\n AccordionContentProps,\n} from './accordion';\n", "import React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport { createCollapsibleScope } from '@radix-ui/react-collapsible';\nimport { useId } from '@radix-ui/react-id';\n\nimport type { Scope } from '@radix-ui/react-context';\nimport { useDirection } from '@radix-ui/react-direction';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * Accordion\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACCORDION_NAME = 'Accordion';\nconst ACCORDION_KEYS = ['Home', 'End', 'ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'];\n\nconst [Collection, useCollection, createCollectionScope] =\n createCollection(ACCORDION_NAME);\n\ntype ScopedProps

= P & { __scopeAccordion?: Scope };\nconst [createAccordionContext, createAccordionScope] = createContextScope(ACCORDION_NAME, [\n createCollectionScope,\n createCollapsibleScope,\n]);\nconst useCollapsibleScope = createCollapsibleScope();\n\ntype AccordionElement = AccordionImplMultipleElement | AccordionImplSingleElement;\ninterface AccordionSingleProps extends AccordionImplSingleProps {\n type: 'single';\n}\ninterface AccordionMultipleProps extends AccordionImplMultipleProps {\n type: 'multiple';\n}\n\nconst Accordion = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { type, ...accordionProps } = props;\n const singleProps = accordionProps as AccordionImplSingleProps;\n const multipleProps = accordionProps as AccordionImplMultipleProps;\n return (\n \n {type === 'multiple' ? (\n \n ) : (\n \n )}\n \n );\n }\n);\n\nAccordion.displayName = ACCORDION_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype AccordionValueContextValue = {\n value: string[];\n onItemOpen(value: string): void;\n onItemClose(value: string): void;\n};\n\nconst [AccordionValueProvider, useAccordionValueContext] =\n createAccordionContext(ACCORDION_NAME);\n\nconst [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(\n ACCORDION_NAME,\n { collapsible: false }\n);\n\ntype AccordionImplSingleElement = AccordionImplElement;\ninterface AccordionImplSingleProps extends AccordionImplProps {\n /**\n * The controlled stateful value of the accordion item whose content is expanded.\n */\n value?: string;\n /**\n * The value of the item whose content is expanded when the accordion is initially rendered. Use\n * `defaultValue` if you do not need to control the state of an accordion.\n */\n defaultValue?: string;\n /**\n * The callback that fires when the state of the accordion changes.\n */\n onValueChange?(value: string): void;\n /**\n * Whether an accordion item can be collapsed after it has been opened.\n * @default false\n */\n collapsible?: boolean;\n}\n\nconst AccordionImplSingle = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {},\n collapsible = false,\n ...accordionSingleProps\n } = props;\n\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? '',\n onChange: onValueChange,\n caller: ACCORDION_NAME,\n });\n\n return (\n (value ? [value] : []), [value])}\n onItemOpen={setValue}\n onItemClose={React.useCallback(() => collapsible && setValue(''), [collapsible, setValue])}\n >\n \n \n \n \n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype AccordionImplMultipleElement = AccordionImplElement;\ninterface AccordionImplMultipleProps extends AccordionImplProps {\n /**\n * The controlled stateful value of the accordion items whose contents are expanded.\n */\n value?: string[];\n /**\n * The value of the items whose contents are expanded when the accordion is initially rendered. Use\n * `defaultValue` if you do not need to control the state of an accordion.\n */\n defaultValue?: string[];\n /**\n * The callback that fires when the state of the accordion changes.\n */\n onValueChange?(value: string[]): void;\n}\n\nconst AccordionImplMultiple = React.forwardRef<\n AccordionImplMultipleElement,\n AccordionImplMultipleProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {},\n ...accordionMultipleProps\n } = props;\n\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n caller: ACCORDION_NAME,\n });\n\n const handleItemOpen = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue]\n );\n\n const handleItemClose = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter((value) => value !== itemValue)),\n [setValue]\n );\n\n return (\n \n \n \n \n \n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype AccordionImplContextValue = {\n disabled?: boolean;\n direction: AccordionImplProps['dir'];\n orientation: AccordionImplProps['orientation'];\n};\n\nconst [AccordionImplProvider, useAccordionContext] =\n createAccordionContext(ACCORDION_NAME);\n\ntype AccordionImplElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface AccordionImplProps extends PrimitiveDivProps {\n /**\n * Whether or not an accordion is disabled from user interaction.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * The layout in which the Accordion operates.\n * @default vertical\n */\n orientation?: React.AriaAttributes['aria-orientation'];\n /**\n * The language read direction.\n */\n dir?: Direction;\n}\n\nconst AccordionImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAccordion, disabled, dir, orientation = 'vertical', ...accordionProps } = props;\n const accordionRef = React.useRef(null);\n const composedRefs = useComposedRefs(accordionRef, forwardedRef);\n const getItems = useCollection(__scopeAccordion);\n const direction = useDirection(dir);\n const isDirectionLTR = direction === 'ltr';\n\n const handleKeyDown = composeEventHandlers(props.onKeyDown, (event) => {\n if (!ACCORDION_KEYS.includes(event.key)) return;\n const target = event.target as HTMLElement;\n const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled);\n const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target);\n const triggerCount = triggerCollection.length;\n\n if (triggerIndex === -1) return;\n\n // Prevents page scroll while user is navigating\n event.preventDefault();\n\n let nextIndex = triggerIndex;\n const homeIndex = 0;\n const endIndex = triggerCount - 1;\n\n const moveNext = () => {\n nextIndex = triggerIndex + 1;\n if (nextIndex > endIndex) {\n nextIndex = homeIndex;\n }\n };\n\n const movePrev = () => {\n nextIndex = triggerIndex - 1;\n if (nextIndex < homeIndex) {\n nextIndex = endIndex;\n }\n };\n\n switch (event.key) {\n case 'Home':\n nextIndex = homeIndex;\n break;\n case 'End':\n nextIndex = endIndex;\n break;\n case 'ArrowRight':\n if (orientation === 'horizontal') {\n if (isDirectionLTR) {\n moveNext();\n } else {\n movePrev();\n }\n }\n break;\n case 'ArrowDown':\n if (orientation === 'vertical') {\n moveNext();\n }\n break;\n case 'ArrowLeft':\n if (orientation === 'horizontal') {\n if (isDirectionLTR) {\n movePrev();\n } else {\n moveNext();\n }\n }\n break;\n case 'ArrowUp':\n if (orientation === 'vertical') {\n movePrev();\n }\n break;\n }\n\n const clampedIndex = nextIndex % triggerCount;\n triggerCollection[clampedIndex]!.ref.current?.focus();\n });\n\n return (\n \n \n \n \n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * AccordionItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'AccordionItem';\n\ntype AccordionItemContextValue = { open?: boolean; disabled?: boolean; triggerId: string };\nconst [AccordionItemProvider, useAccordionItemContext] =\n createAccordionContext(ITEM_NAME);\n\ntype AccordionItemElement = React.ComponentRef;\ntype CollapsibleProps = React.ComponentPropsWithoutRef;\ninterface AccordionItemProps\n extends Omit {\n /**\n * Whether or not an accordion item is disabled from user interaction.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * A string value for the accordion item. All items within an accordion should use a unique value.\n */\n value: string;\n}\n\n/**\n * `AccordionItem` contains all of the parts of a collapsible section inside of an `Accordion`.\n */\nconst AccordionItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAccordion, value, ...accordionItemProps } = props;\n const accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion);\n const valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n const triggerId = useId();\n const open = (value && valueContext.value.includes(value)) || false;\n const disabled = accordionContext.disabled || props.disabled;\n\n return (\n \n {\n if (open) {\n valueContext.onItemOpen(value);\n } else {\n valueContext.onItemClose(value);\n }\n }}\n />\n \n );\n }\n);\n\nAccordionItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AccordionHeader\n * -----------------------------------------------------------------------------------------------*/\n\nconst HEADER_NAME = 'AccordionHeader';\n\ntype AccordionHeaderElement = React.ComponentRef;\ntype PrimitiveHeading3Props = React.ComponentPropsWithoutRef;\ninterface AccordionHeaderProps extends PrimitiveHeading3Props {}\n\n/**\n * `AccordionHeader` contains the content for the parts of an `AccordionItem` that will be visible\n * whether or not its content is collapsed.\n */\nconst AccordionHeader = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAccordion, ...headerProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);\n return (\n \n );\n }\n);\n\nAccordionHeader.displayName = HEADER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AccordionTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'AccordionTrigger';\n\ntype AccordionTriggerElement = React.ComponentRef;\ntype CollapsibleTriggerProps = React.ComponentPropsWithoutRef;\ninterface AccordionTriggerProps extends CollapsibleTriggerProps {}\n\n/**\n * `AccordionTrigger` is the trigger that toggles the collapsed state of an `AccordionItem`. It\n * should always be nested inside of an `AccordionHeader`.\n */\nconst AccordionTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAccordion, ...triggerProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(TRIGGER_NAME, __scopeAccordion);\n const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n return (\n \n \n \n );\n }\n);\n\nAccordionTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AccordionContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'AccordionContent';\n\ntype AccordionContentElement = React.ComponentRef;\ntype CollapsibleContentProps = React.ComponentPropsWithoutRef;\ninterface AccordionContentProps extends CollapsibleContentProps {}\n\n/**\n * `AccordionContent` contains the collapsible content for an `AccordionItem`.\n */\nconst AccordionContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAccordion, ...contentProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(CONTENT_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n return (\n \n );\n }\n);\n\nAccordionContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open?: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Accordion;\nconst Item = AccordionItem;\nconst Header = AccordionHeader;\nconst Trigger = AccordionTrigger;\nconst Content = AccordionContent;\n\nexport {\n createAccordionScope,\n //\n Accordion,\n AccordionItem,\n AccordionHeader,\n AccordionTrigger,\n AccordionContent,\n //\n Root,\n Item,\n Header,\n Trigger,\n Content,\n};\nexport type {\n AccordionSingleProps,\n AccordionMultipleProps,\n AccordionItemProps,\n AccordionHeaderProps,\n AccordionTriggerProps,\n AccordionContentProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAAA;AAAA,EAAA;AAAA;AAAA,cAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,mBAAkB;AAClB,2BAAmC;AACnC,8BAAiC;AACjC,gCAAgC;AAChC,uBAAqC;AACrC,0CAAqC;AACrC,6BAA0B;AAC1B,2BAAsC;AACtC,+BAAuC;AACvC,sBAAsB;AAGtB,6BAA6B;AAqCnB;AA7BV,IAAM,iBAAiB;AACvB,IAAM,iBAAiB,CAAC,QAAQ,OAAO,aAAa,WAAW,aAAa,YAAY;AAExF,IAAM,CAAC,YAAY,eAAe,qBAAqB,QACrD,0CAA0C,cAAc;AAG1D,IAAM,CAAC,wBA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AAC,OAA2C,iBAAiB;AAC3D,UAAM,EAAE,kBAAkB,GAAG,aAAa,IAAI;AAC9C,UAAM,mBAAmB,oBAAoB,gBAAgB,gBAAgB;AAC7E,UAAM,cAAc,wBAAwB,cAAc,gBAAgB;AAC1E,UAAM,mBAAmB,oBAAoB,gBAAgB;AAC7D,WACE;AAAA,MAAsB;AAAA,MAArB;AAAA,QACC,MAAK;AAAA,QACL,mBAAiB,YAAY;AAAA,QAC7B,oBAAkB,iBAAiB;AAAA,QAClC,GAAG;AAAA,QACH,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,OAAO;AAAA,UACL,CAAC,kCAAyC,GAAG;AAAA,UAC7C,CAAC,iCAAwC,GAAG;AAAA,UAC5C,GAAG,MAAM;AAAA,QACX;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,iBAAiB,cAAc;AAI/B,SAAS,SAAS,MAAgB;AAChC,SAAO,OAAO,SAAS;AACzB;AAEA,IAAMG,QAAO;AACb,IAAM,OAAO;AACb,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,WAAU;", + "names": ["Content", "Root", "Trigger", "React", "value", "open", "Root", "Trigger", "Content"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d24be94c6373fff31c242d6921bddd2ca9f19a36 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.mjs @@ -0,0 +1,320 @@ +"use client"; + +// src/accordion.tsx +import React from "react"; +import { createContextScope } from "@radix-ui/react-context"; +import { createCollection } from "@radix-ui/react-collection"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { Primitive } from "@radix-ui/react-primitive"; +import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"; +import { createCollapsibleScope } from "@radix-ui/react-collapsible"; +import { useId } from "@radix-ui/react-id"; +import { useDirection } from "@radix-ui/react-direction"; +import { jsx } from "react/jsx-runtime"; +var ACCORDION_NAME = "Accordion"; +var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"]; +var [Collection, useCollection, createCollectionScope] = createCollection(ACCORDION_NAME); +var [createAccordionContext, createAccordionScope] = createContextScope(ACCORDION_NAME, [ + createCollectionScope, + createCollapsibleScope +]); +var useCollapsibleScope = createCollapsibleScope(); +var Accordion = React.forwardRef( + (props, forwardedRef) => { + const { type, ...accordionProps } = props; + const singleProps = accordionProps; + const multipleProps = accordionProps; + return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeAccordion, children: type === "multiple" ? /* @__PURE__ */ jsx(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) }); + } +); +Accordion.displayName = ACCORDION_NAME; +var [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME); +var [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext( + ACCORDION_NAME, + { collapsible: false } +); +var AccordionImplSingle = React.forwardRef( + (props, forwardedRef) => { + const { + value: valueProp, + defaultValue, + onValueChange = () => { + }, + collapsible = false, + ...accordionSingleProps + } = props; + const [value, setValue] = useControllableState({ + prop: valueProp, + defaultProp: defaultValue ?? "", + onChange: onValueChange, + caller: ACCORDION_NAME + }); + return /* @__PURE__ */ jsx( + AccordionValueProvider, + { + scope: props.__scopeAccordion, + value: React.useMemo(() => value ? [value] : [], [value]), + onItemOpen: setValue, + onItemClose: React.useCallback(() => collapsible && setValue(""), [collapsible, setValue]), + children: /* @__PURE__ */ jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ jsx(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) }) + } + ); + } +); +var AccordionImplMultiple = React.forwardRef((props, forwardedRef) => { + const { + value: valueProp, + defaultValue, + onValueChange = () => { + }, + ...accordionMultipleProps + } = props; + const [value, setValue] = useControllableState({ + prop: valueProp, + defaultProp: defaultValue ?? [], + onChange: onValueChange, + caller: ACCORDION_NAME + }); + const handleItemOpen = React.useCallback( + (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]), + [setValue] + ); + const handleItemClose = React.useCallback( + (itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)), + [setValue] + ); + return /* @__PURE__ */ jsx( + AccordionValueProvider, + { + scope: props.__scopeAccordion, + value, + onItemOpen: handleItemOpen, + onItemClose: handleItemClose, + children: /* @__PURE__ */ jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ jsx(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) }) + } + ); +}); +var [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME); +var AccordionImpl = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props; + const accordionRef = React.useRef(null); + const composedRefs = useComposedRefs(accordionRef, forwardedRef); + const getItems = useCollection(__scopeAccordion); + const direction = useDirection(dir); + const isDirectionLTR = direction === "ltr"; + const handleKeyDown = composeEventHandlers(props.onKeyDown, (event) => { + if (!ACCORDION_KEYS.includes(event.key)) return; + const target = event.target; + const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled); + const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target); + const triggerCount = triggerCollection.length; + if (triggerIndex === -1) return; + event.preventDefault(); + let nextIndex = triggerIndex; + const homeIndex = 0; + const endIndex = triggerCount - 1; + const moveNext = () => { + nextIndex = triggerIndex + 1; + if (nextIndex > endIndex) { + nextIndex = homeIndex; + } + }; + const movePrev = () => { + nextIndex = triggerIndex - 1; + if (nextIndex < homeIndex) { + nextIndex = endIndex; + } + }; + switch (event.key) { + case "Home": + nextIndex = homeIndex; + break; + case "End": + nextIndex = endIndex; + break; + case "ArrowRight": + if (orientation === "horizontal") { + if (isDirectionLTR) { + moveNext(); + } else { + movePrev(); + } + } + break; + case "ArrowDown": + if (orientation === "vertical") { + moveNext(); + } + break; + case "ArrowLeft": + if (orientation === "horizontal") { + if (isDirectionLTR) { + movePrev(); + } else { + moveNext(); + } + } + break; + case "ArrowUp": + if (orientation === "vertical") { + movePrev(); + } + break; + } + const clampedIndex = nextIndex % triggerCount; + triggerCollection[clampedIndex].ref.current?.focus(); + }); + return /* @__PURE__ */ jsx( + AccordionImplProvider, + { + scope: __scopeAccordion, + disabled, + direction: dir, + orientation, + children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx( + Primitive.div, + { + ...accordionProps, + "data-orientation": orientation, + ref: composedRefs, + onKeyDown: disabled ? void 0 : handleKeyDown + } + ) }) + } + ); + } +); +var ITEM_NAME = "AccordionItem"; +var [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME); +var AccordionItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAccordion, value, ...accordionItemProps } = props; + const accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion); + const valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion); + const collapsibleScope = useCollapsibleScope(__scopeAccordion); + const triggerId = useId(); + const open = value && valueContext.value.includes(value) || false; + const disabled = accordionContext.disabled || props.disabled; + return /* @__PURE__ */ jsx( + AccordionItemProvider, + { + scope: __scopeAccordion, + open, + disabled, + triggerId, + children: /* @__PURE__ */ jsx( + CollapsiblePrimitive.Root, + { + "data-orientation": accordionContext.orientation, + "data-state": getState(open), + ...collapsibleScope, + ...accordionItemProps, + ref: forwardedRef, + disabled, + open, + onOpenChange: (open2) => { + if (open2) { + valueContext.onItemOpen(value); + } else { + valueContext.onItemClose(value); + } + } + } + ) + } + ); + } +); +AccordionItem.displayName = ITEM_NAME; +var HEADER_NAME = "AccordionHeader"; +var AccordionHeader = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAccordion, ...headerProps } = props; + const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion); + const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion); + return /* @__PURE__ */ jsx( + Primitive.h3, + { + "data-orientation": accordionContext.orientation, + "data-state": getState(itemContext.open), + "data-disabled": itemContext.disabled ? "" : void 0, + ...headerProps, + ref: forwardedRef + } + ); + } +); +AccordionHeader.displayName = HEADER_NAME; +var TRIGGER_NAME = "AccordionTrigger"; +var AccordionTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAccordion, ...triggerProps } = props; + const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion); + const itemContext = useAccordionItemContext(TRIGGER_NAME, __scopeAccordion); + const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME, __scopeAccordion); + const collapsibleScope = useCollapsibleScope(__scopeAccordion); + return /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx( + CollapsiblePrimitive.Trigger, + { + "aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0, + "data-orientation": accordionContext.orientation, + id: itemContext.triggerId, + ...collapsibleScope, + ...triggerProps, + ref: forwardedRef + } + ) }); + } +); +AccordionTrigger.displayName = TRIGGER_NAME; +var CONTENT_NAME = "AccordionContent"; +var AccordionContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAccordion, ...contentProps } = props; + const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion); + const itemContext = useAccordionItemContext(CONTENT_NAME, __scopeAccordion); + const collapsibleScope = useCollapsibleScope(__scopeAccordion); + return /* @__PURE__ */ jsx( + CollapsiblePrimitive.Content, + { + role: "region", + "aria-labelledby": itemContext.triggerId, + "data-orientation": accordionContext.orientation, + ...collapsibleScope, + ...contentProps, + ref: forwardedRef, + style: { + ["--radix-accordion-content-height"]: "var(--radix-collapsible-content-height)", + ["--radix-accordion-content-width"]: "var(--radix-collapsible-content-width)", + ...props.style + } + } + ); + } +); +AccordionContent.displayName = CONTENT_NAME; +function getState(open) { + return open ? "open" : "closed"; +} +var Root2 = Accordion; +var Item = AccordionItem; +var Header = AccordionHeader; +var Trigger2 = AccordionTrigger; +var Content2 = AccordionContent; +export { + Accordion, + AccordionContent, + AccordionHeader, + AccordionItem, + AccordionTrigger, + Content2 as Content, + Header, + Item, + Root2 as Root, + Trigger2 as Trigger, + createAccordionScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..8fefc38849331530b91030ec743656bad2847ec4 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/accordion.tsx"], + "sourcesContent": ["import React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport { createCollapsibleScope } from '@radix-ui/react-collapsible';\nimport { useId } from '@radix-ui/react-id';\n\nimport type { Scope } from '@radix-ui/react-context';\nimport { useDirection } from '@radix-ui/react-direction';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * Accordion\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACCORDION_NAME = 'Accordion';\nconst ACCORDION_KEYS = ['Home', 'End', 'ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'];\n\nconst [Collection, useCollection, createCollectionScope] =\n createCollection(ACCORDION_NAME);\n\ntype ScopedProps

= P & { __scopeAccordion?: Scope };\nconst [createAccordionContext, createAccordionScope] = createContextScope(ACCORDION_NAME, [\n createCollectionScope,\n createCollapsibleScope,\n]);\nconst useCollapsibleScope = createCollapsibleScope();\n\ntype AccordionElement = AccordionImplMultipleElement | AccordionImplSingleElement;\ninterface AccordionSingleProps extends AccordionImplSingleProps {\n type: 'single';\n}\ninterface AccordionMultipleProps extends AccordionImplMultipleProps {\n type: 'multiple';\n}\n\nconst Accordion = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { type, ...accordionProps } = props;\n const singleProps = accordionProps as AccordionImplSingleProps;\n const multipleProps = accordionProps as AccordionImplMultipleProps;\n return (\n \n {type === 'multiple' ? (\n \n ) : (\n \n )}\n \n );\n }\n);\n\nAccordion.displayName = ACCORDION_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype AccordionValueContextValue = {\n value: string[];\n onItemOpen(value: string): void;\n onItemClose(value: string): void;\n};\n\nconst [AccordionValueProvider, useAccordionValueContext] =\n createAccordionContext(ACCORDION_NAME);\n\nconst [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(\n ACCORDION_NAME,\n { collapsible: false }\n);\n\ntype AccordionImplSingleElement = AccordionImplElement;\ninterface AccordionImplSingleProps extends AccordionImplProps {\n /**\n * The controlled stateful value of the accordion item whose content is expanded.\n */\n value?: string;\n /**\n * The value of the item whose content is expanded when the accordion is initially rendered. Use\n * `defaultValue` if you do not need to control the state of an accordion.\n */\n defaultValue?: string;\n /**\n * The callback that fires when the state of the accordion changes.\n */\n onValueChange?(value: string): void;\n /**\n * Whether an accordion item can be collapsed after it has been opened.\n * @default false\n */\n collapsible?: boolean;\n}\n\nconst AccordionImplSingle = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {},\n collapsible = false,\n ...accordionSingleProps\n } = props;\n\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? '',\n onChange: onValueChange,\n caller: ACCORDION_NAME,\n });\n\n return (\n (value ? [value] : []), [value])}\n onItemOpen={setValue}\n onItemClose={React.useCallback(() => collapsible && setValue(''), [collapsible, setValue])}\n >\n \n \n \n \n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype AccordionImplMultipleElement = AccordionImplElement;\ninterface AccordionImplMultipleProps extends AccordionImplProps {\n /**\n * The controlled stateful value of the accordion items whose contents are expanded.\n */\n value?: string[];\n /**\n * The value of the items whose contents are expanded when the accordion is initially rendered. Use\n * `defaultValue` if you do not need to control the state of an accordion.\n */\n defaultValue?: string[];\n /**\n * The callback that fires when the state of the accordion changes.\n */\n onValueChange?(value: string[]): void;\n}\n\nconst AccordionImplMultiple = React.forwardRef<\n AccordionImplMultipleElement,\n AccordionImplMultipleProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {},\n ...accordionMultipleProps\n } = props;\n\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n caller: ACCORDION_NAME,\n });\n\n const handleItemOpen = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue]\n );\n\n const handleItemClose = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter((value) => value !== itemValue)),\n [setValue]\n );\n\n return (\n \n \n \n \n \n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype AccordionImplContextValue = {\n disabled?: boolean;\n direction: AccordionImplProps['dir'];\n orientation: AccordionImplProps['orientation'];\n};\n\nconst [AccordionImplProvider, useAccordionContext] =\n createAccordionContext(ACCORDION_NAME);\n\ntype AccordionImplElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface AccordionImplProps extends PrimitiveDivProps {\n /**\n * Whether or not an accordion is disabled from user interaction.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * The layout in which the Accordion operates.\n * @default vertical\n */\n orientation?: React.AriaAttributes['aria-orientation'];\n /**\n * The language read direction.\n */\n dir?: Direction;\n}\n\nconst AccordionImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAccordion, disabled, dir, orientation = 'vertical', ...accordionProps } = props;\n const accordionRef = React.useRef(null);\n const composedRefs = useComposedRefs(accordionRef, forwardedRef);\n const getItems = useCollection(__scopeAccordion);\n const direction = useDirection(dir);\n const isDirectionLTR = direction === 'ltr';\n\n const handleKeyDown = composeEventHandlers(props.onKeyDown, (event) => {\n if (!ACCORDION_KEYS.includes(event.key)) return;\n const target = event.target as HTMLElement;\n const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled);\n const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target);\n const triggerCount = triggerCollection.length;\n\n if (triggerIndex === -1) return;\n\n // Prevents page scroll while user is navigating\n event.preventDefault();\n\n let nextIndex = triggerIndex;\n const homeIndex = 0;\n const endIndex = triggerCount - 1;\n\n const moveNext = () => {\n nextIndex = triggerIndex + 1;\n if (nextIndex > endIndex) {\n nextIndex = homeIndex;\n }\n };\n\n const movePrev = () => {\n nextIndex = triggerIndex - 1;\n if (nextIndex < homeIndex) {\n nextIndex = endIndex;\n }\n };\n\n switch (event.key) {\n case 'Home':\n nextIndex = homeIndex;\n break;\n case 'End':\n nextIndex = endIndex;\n break;\n case 'ArrowRight':\n if (orientation === 'horizontal') {\n if (isDirectionLTR) {\n moveNext();\n } else {\n movePrev();\n }\n }\n break;\n case 'ArrowDown':\n if (orientation === 'vertical') {\n moveNext();\n }\n break;\n case 'ArrowLeft':\n if (orientation === 'horizontal') {\n if (isDirectionLTR) {\n movePrev();\n } else {\n moveNext();\n }\n }\n break;\n case 'ArrowUp':\n if (orientation === 'vertical') {\n movePrev();\n }\n break;\n }\n\n const clampedIndex = nextIndex % triggerCount;\n triggerCollection[clampedIndex]!.ref.current?.focus();\n });\n\n return (\n \n \n \n \n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * AccordionItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'AccordionItem';\n\ntype AccordionItemContextValue = { open?: boolean; disabled?: boolean; triggerId: string };\nconst [AccordionItemProvider, useAccordionItemContext] =\n createAccordionContext(ITEM_NAME);\n\ntype AccordionItemElement = React.ComponentRef;\ntype CollapsibleProps = React.ComponentPropsWithoutRef;\ninterface AccordionItemProps\n extends Omit {\n /**\n * Whether or not an accordion item is disabled from user interaction.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * A string value for the accordion item. All items within an accordion should use a unique value.\n */\n value: string;\n}\n\n/**\n * `AccordionItem` contains all of the parts of a collapsible section inside of an `Accordion`.\n */\nconst AccordionItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAccordion, value, ...accordionItemProps } = props;\n const accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion);\n const valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n const triggerId = useId();\n const open = (value && valueContext.value.includes(value)) || false;\n const disabled = accordionContext.disabled || props.disabled;\n\n return (\n \n {\n if (open) {\n valueContext.onItemOpen(value);\n } else {\n valueContext.onItemClose(value);\n }\n }}\n />\n \n );\n }\n);\n\nAccordionItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AccordionHeader\n * -----------------------------------------------------------------------------------------------*/\n\nconst HEADER_NAME = 'AccordionHeader';\n\ntype AccordionHeaderElement = React.ComponentRef;\ntype PrimitiveHeading3Props = React.ComponentPropsWithoutRef;\ninterface AccordionHeaderProps extends PrimitiveHeading3Props {}\n\n/**\n * `AccordionHeader` contains the content for the parts of an `AccordionItem` that will be visible\n * whether or not its content is collapsed.\n */\nconst AccordionHeader = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAccordion, ...headerProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);\n return (\n \n );\n }\n);\n\nAccordionHeader.displayName = HEADER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AccordionTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'AccordionTrigger';\n\ntype AccordionTriggerElement = React.ComponentRef;\ntype CollapsibleTriggerProps = React.ComponentPropsWithoutRef;\ninterface AccordionTriggerProps extends CollapsibleTriggerProps {}\n\n/**\n * `AccordionTrigger` is the trigger that toggles the collapsed state of an `AccordionItem`. It\n * should always be nested inside of an `AccordionHeader`.\n */\nconst AccordionTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAccordion, ...triggerProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(TRIGGER_NAME, __scopeAccordion);\n const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n return (\n \n \n \n );\n }\n);\n\nAccordionTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AccordionContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'AccordionContent';\n\ntype AccordionContentElement = React.ComponentRef;\ntype CollapsibleContentProps = React.ComponentPropsWithoutRef;\ninterface AccordionContentProps extends CollapsibleContentProps {}\n\n/**\n * `AccordionContent` contains the collapsible content for an `AccordionItem`.\n */\nconst AccordionContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAccordion, ...contentProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(CONTENT_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n return (\n \n );\n }\n);\n\nAccordionContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open?: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Accordion;\nconst Item = AccordionItem;\nconst Header = AccordionHeader;\nconst Trigger = AccordionTrigger;\nconst Content = AccordionContent;\n\nexport {\n createAccordionScope,\n //\n Accordion,\n AccordionItem,\n AccordionHeader,\n AccordionTrigger,\n AccordionContent,\n //\n Root,\n Item,\n Header,\n Trigger,\n Content,\n};\nexport type {\n AccordionSingleProps,\n AccordionMultipleProps,\n AccordionItemProps,\n AccordionHeaderProps,\n AccordionTriggerProps,\n AccordionContentProps,\n};\n"], + "mappings": ";;;AAAA,OAAO,WAAW;AAClB,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AACrC,SAAS,4BAA4B;AACrC,SAAS,iBAAiB;AAC1B,YAAY,0BAA0B;AACtC,SAAS,8BAA8B;AACvC,SAAS,aAAa;AAGtB,SAAS,oBAAoB;AAqCnB;AA7BV,IAAM,iBAAiB;AACvB,IAAM,iBAAiB,CAAC,QAAQ,OAAO,aAAa,WAAW,aAAa,YAAY;AAExF,I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UAAM,EAAE,kBAAkB,GAAG,aAAa,IAAI;AAC9C,UAAM,mBAAmB,oBAAoB,gBAAgB,gBAAgB;AAC7E,UAAM,cAAc,wBAAwB,cAAc,gBAAgB;AAC1E,UAAM,mBAAmB,oBAAoB,gBAAgB;AAC7D,WACE;AAAA,MAAsB;AAAA,MAArB;AAAA,QACC,MAAK;AAAA,QACL,mBAAiB,YAAY;AAAA,QAC7B,oBAAkB,iBAAiB;AAAA,QAClC,GAAG;AAAA,QACH,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,OAAO;AAAA,UACL,CAAC,kCAAyC,GAAG;AAAA,UAC7C,CAAC,iCAAwC,GAAG;AAAA,UAC5C,GAAG,MAAM;AAAA,QACX;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,iBAAiB,cAAc;AAI/B,SAAS,SAAS,MAAgB;AAChC,SAAO,OAAO,SAAS;AACzB;AAEA,IAAMC,QAAO;AACb,IAAM,OAAO;AACb,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,WAAU;", + "names": ["value", "open", "Root", "Trigger", "Content"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/package.json b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/package.json new file mode 100644 index 0000000000000000000000000000000000000000..168caf2cc5c76e6d68d4f0bb98f680f8cd0b577d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+re_9f2ad7c7f42754ee6ec74b937e89b351/node_modules/@radix-ui/react-accordion/package.json @@ -0,0 +1,76 @@ +{ + "name": "@radix-ui/react-accordion", + "version": "1.2.12", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-collapsible": "1.1.12", + "@radix-ui/react-collection": "1.1.7", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/LICENSE b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/README.md b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/README.md new file mode 100644 index 0000000000000000000000000000000000000000..819c90d63ad7e51054834114a6b7a6d13af1c2a2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/README.md @@ -0,0 +1,3 @@ +# `react-alert-dialog` + +View docs [here](https://radix-ui.com/primitives/docs/components/alert-dialog). diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..048750913c2e0d99411a6229e52a12a5755bd802 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.d.mts @@ -0,0 +1,51 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import * as DialogPrimitive from '@radix-ui/react-dialog'; + +declare const createAlertDialogScope: _radix_ui_react_context.CreateScope; +type DialogProps = React.ComponentPropsWithoutRef; +interface AlertDialogProps extends Omit { +} +declare const AlertDialog: React.FC; +type DialogTriggerProps = React.ComponentPropsWithoutRef; +interface AlertDialogTriggerProps extends DialogTriggerProps { +} +declare const AlertDialogTrigger: React.ForwardRefExoticComponent>; +type DialogPortalProps = React.ComponentPropsWithoutRef; +interface AlertDialogPortalProps extends DialogPortalProps { +} +declare const AlertDialogPortal: React.FC; +type DialogOverlayProps = React.ComponentPropsWithoutRef; +interface AlertDialogOverlayProps extends DialogOverlayProps { +} +declare const AlertDialogOverlay: React.ForwardRefExoticComponent>; +type DialogContentProps = React.ComponentPropsWithoutRef; +interface AlertDialogContentProps extends Omit { +} +declare const AlertDialogContent: React.ForwardRefExoticComponent>; +type DialogTitleProps = React.ComponentPropsWithoutRef; +interface AlertDialogTitleProps extends DialogTitleProps { +} +declare const AlertDialogTitle: React.ForwardRefExoticComponent>; +type DialogDescriptionProps = React.ComponentPropsWithoutRef; +interface AlertDialogDescriptionProps extends DialogDescriptionProps { +} +declare const AlertDialogDescription: React.ForwardRefExoticComponent>; +type DialogCloseProps = React.ComponentPropsWithoutRef; +interface AlertDialogActionProps extends DialogCloseProps { +} +declare const AlertDialogAction: React.ForwardRefExoticComponent>; +interface AlertDialogCancelProps extends DialogCloseProps { +} +declare const AlertDialogCancel: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Overlay: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; +declare const Action: React.ForwardRefExoticComponent>; +declare const Cancel: React.ForwardRefExoticComponent>; +declare const Title: React.ForwardRefExoticComponent>; +declare const Description: React.ForwardRefExoticComponent>; + +export { Action, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, type AlertDialogPortalProps, type AlertDialogProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, Cancel, Content, Description, Overlay, Portal, Root, Title, Trigger, createAlertDialogScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..048750913c2e0d99411a6229e52a12a5755bd802 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.d.ts @@ -0,0 +1,51 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import * as DialogPrimitive from '@radix-ui/react-dialog'; + +declare const createAlertDialogScope: _radix_ui_react_context.CreateScope; +type DialogProps = React.ComponentPropsWithoutRef; +interface AlertDialogProps extends Omit { +} +declare const AlertDialog: React.FC; +type DialogTriggerProps = React.ComponentPropsWithoutRef; +interface AlertDialogTriggerProps extends DialogTriggerProps { +} +declare const AlertDialogTrigger: React.ForwardRefExoticComponent>; +type DialogPortalProps = React.ComponentPropsWithoutRef; +interface AlertDialogPortalProps extends DialogPortalProps { +} +declare const AlertDialogPortal: React.FC; +type DialogOverlayProps = React.ComponentPropsWithoutRef; +interface AlertDialogOverlayProps extends DialogOverlayProps { +} +declare const AlertDialogOverlay: React.ForwardRefExoticComponent>; +type DialogContentProps = React.ComponentPropsWithoutRef; +interface AlertDialogContentProps extends Omit { +} +declare const AlertDialogContent: React.ForwardRefExoticComponent>; +type DialogTitleProps = React.ComponentPropsWithoutRef; +interface AlertDialogTitleProps extends DialogTitleProps { +} +declare const AlertDialogTitle: React.ForwardRefExoticComponent>; +type DialogDescriptionProps = React.ComponentPropsWithoutRef; +interface AlertDialogDescriptionProps extends DialogDescriptionProps { +} +declare const AlertDialogDescription: React.ForwardRefExoticComponent>; +type DialogCloseProps = React.ComponentPropsWithoutRef; +interface AlertDialogActionProps extends DialogCloseProps { +} +declare const AlertDialogAction: React.ForwardRefExoticComponent>; +interface AlertDialogCancelProps extends DialogCloseProps { +} +declare const AlertDialogCancel: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Overlay: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; +declare const Action: React.ForwardRefExoticComponent>; +declare const Cancel: React.ForwardRefExoticComponent>; +declare const Title: React.ForwardRefExoticComponent>; +declare const Description: React.ForwardRefExoticComponent>; + +export { Action, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, type AlertDialogPortalProps, type AlertDialogProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, Cancel, Content, Description, Overlay, Portal, Root, Title, Trigger, createAlertDialogScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.js b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..7ea58ae6a1de1d9ca772f42af9c5cb039cea4f3b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.js @@ -0,0 +1,202 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Action: () => Action, + AlertDialog: () => AlertDialog, + AlertDialogAction: () => AlertDialogAction, + AlertDialogCancel: () => AlertDialogCancel, + AlertDialogContent: () => AlertDialogContent, + AlertDialogDescription: () => AlertDialogDescription, + AlertDialogOverlay: () => AlertDialogOverlay, + AlertDialogPortal: () => AlertDialogPortal, + AlertDialogTitle: () => AlertDialogTitle, + AlertDialogTrigger: () => AlertDialogTrigger, + Cancel: () => Cancel, + Content: () => Content2, + Description: () => Description2, + Overlay: () => Overlay2, + Portal: () => Portal2, + Root: () => Root2, + Title: () => Title2, + Trigger: () => Trigger2, + createAlertDialogScope: () => createAlertDialogScope +}); +module.exports = __toCommonJS(index_exports); + +// src/alert-dialog.tsx +var React = __toESM(require("react")); +var import_react_context = require("@radix-ui/react-context"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var DialogPrimitive = __toESM(require("@radix-ui/react-dialog")); +var import_react_dialog = require("@radix-ui/react-dialog"); +var import_primitive = require("@radix-ui/primitive"); +var import_react_slot = require("@radix-ui/react-slot"); +var import_jsx_runtime = require("react/jsx-runtime"); +var ROOT_NAME = "AlertDialog"; +var [createAlertDialogContext, createAlertDialogScope] = (0, import_react_context.createContextScope)(ROOT_NAME, [ + import_react_dialog.createDialogScope +]); +var useDialogScope = (0, import_react_dialog.createDialogScope)(); +var AlertDialog = (props) => { + const { __scopeAlertDialog, ...alertDialogProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true }); +}; +AlertDialog.displayName = ROOT_NAME; +var TRIGGER_NAME = "AlertDialogTrigger"; +var AlertDialogTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, ...triggerProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef }); + } +); +AlertDialogTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "AlertDialogPortal"; +var AlertDialogPortal = (props) => { + const { __scopeAlertDialog, ...portalProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Portal, { ...dialogScope, ...portalProps }); +}; +AlertDialogPortal.displayName = PORTAL_NAME; +var OVERLAY_NAME = "AlertDialogOverlay"; +var AlertDialogOverlay = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, ...overlayProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef }); + } +); +AlertDialogOverlay.displayName = OVERLAY_NAME; +var CONTENT_NAME = "AlertDialogContent"; +var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME); +var Slottable = (0, import_react_slot.createSlottable)("AlertDialogContent"); +var AlertDialogContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, children, ...contentProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + const contentRef = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentRef); + const cancelRef = React.useRef(null); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + DialogPrimitive.WarningProvider, + { + contentName: CONTENT_NAME, + titleName: TITLE_NAME, + docsSlug: "alert-dialog", + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)( + DialogPrimitive.Content, + { + role: "alertdialog", + ...dialogScope, + ...contentProps, + ref: composedRefs, + onOpenAutoFocus: (0, import_primitive.composeEventHandlers)(contentProps.onOpenAutoFocus, (event) => { + event.preventDefault(); + cancelRef.current?.focus({ preventScroll: true }); + }), + onPointerDownOutside: (event) => event.preventDefault(), + onInteractOutside: (event) => event.preventDefault(), + children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Slottable, { children }), + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef }) + ] + } + ) }) + } + ); + } +); +AlertDialogContent.displayName = CONTENT_NAME; +var TITLE_NAME = "AlertDialogTitle"; +var AlertDialogTitle = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, ...titleProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef }); + } +); +AlertDialogTitle.displayName = TITLE_NAME; +var DESCRIPTION_NAME = "AlertDialogDescription"; +var AlertDialogDescription = React.forwardRef((props, forwardedRef) => { + const { __scopeAlertDialog, ...descriptionProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef }); +}); +AlertDialogDescription.displayName = DESCRIPTION_NAME; +var ACTION_NAME = "AlertDialogAction"; +var AlertDialogAction = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, ...actionProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef }); + } +); +AlertDialogAction.displayName = ACTION_NAME; +var CANCEL_NAME = "AlertDialogCancel"; +var AlertDialogCancel = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, ...cancelProps } = props; + const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog); + const dialogScope = useDialogScope(__scopeAlertDialog); + const ref = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, cancelRef); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref }); + } +); +AlertDialogCancel.displayName = CANCEL_NAME; +var DescriptionWarning = ({ contentRef }) => { + const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog. + +Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. + +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`; + React.useEffect(() => { + const hasDescription = document.getElementById( + contentRef.current?.getAttribute("aria-describedby") + ); + if (!hasDescription) console.warn(MESSAGE); + }, [MESSAGE, contentRef]); + return null; +}; +var Root2 = AlertDialog; +var Trigger2 = AlertDialogTrigger; +var Portal2 = AlertDialogPortal; +var Overlay2 = AlertDialogOverlay; +var Content2 = AlertDialogContent; +var Action = AlertDialogAction; +var Cancel = AlertDialogCancel; +var Title2 = AlertDialogTitle; +var Description2 = AlertDialogDescription; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..afb8193a5f1a8be88f57723020db778f9d290edf --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/alert-dialog.tsx"], + "sourcesContent": ["'use client';\nexport {\n createAlertDialogScope,\n //\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogContent,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogTitle,\n AlertDialogDescription,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Action,\n Cancel,\n Title,\n Description,\n} from './alert-dialog';\nexport type {\n AlertDialogProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertDialogActionProps,\n AlertDialogCancelProps,\n AlertDialogTitleProps,\n AlertDialogDescriptionProps,\n} from './alert-dialog';\n", "import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { createDialogScope } from '@radix-ui/react-dialog';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createSlottable } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_NAME = 'AlertDialog';\n\ntype ScopedProps

= P & { __scopeAlertDialog?: Scope };\nconst [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope,\n]);\nconst useDialogScope = createDialogScope();\n\ntype DialogProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogProps extends Omit {}\n\nconst AlertDialog: React.FC = (props: ScopedProps) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n};\n\nAlertDialog.displayName = ROOT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTrigger\n * -----------------------------------------------------------------------------------------------*/\nconst TRIGGER_NAME = 'AlertDialogTrigger';\n\ntype AlertDialogTriggerElement = React.ComponentRef;\ntype DialogTriggerProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogTriggerProps extends DialogTriggerProps {}\n\nconst AlertDialogTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n }\n);\n\nAlertDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'AlertDialogPortal';\n\ntype DialogPortalProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogPortalProps extends DialogPortalProps {}\n\nconst AlertDialogPortal: React.FC = (\n props: ScopedProps\n) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n};\n\nAlertDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'AlertDialogOverlay';\n\ntype AlertDialogOverlayElement = React.ComponentRef;\ntype DialogOverlayProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogOverlayProps extends DialogOverlayProps {}\n\nconst AlertDialogOverlay = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n }\n);\n\nAlertDialogOverlay.displayName = OVERLAY_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'AlertDialogContent';\n\ntype AlertDialogContentContextValue = {\n cancelRef: React.MutableRefObject;\n};\n\nconst [AlertDialogContentProvider, useAlertDialogContentContext] =\n createAlertDialogContext(CONTENT_NAME);\n\ntype AlertDialogContentElement = React.ComponentRef;\ntype DialogContentProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogContentProps\n extends Omit {}\n\nconst Slottable = createSlottable('AlertDialogContent');\n\nconst AlertDialogContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n\n return (\n \n \n {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n })}\n onPointerDownOutside={(event) => event.preventDefault()}\n onInteractOutside={(event) => event.preventDefault()}\n >\n {/**\n * We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider`\n * around everything, otherwise the `DescriptionWarning` would be rendered straight away.\n * This is because we want the accessibility checks to run only once the content is actually\n * open and that behaviour is already encapsulated in `DialogContent`.\n */}\n {children}\n {process.env.NODE_ENV === 'development' && (\n \n )}\n \n \n \n );\n }\n);\n\nAlertDialogContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'AlertDialogTitle';\n\ntype AlertDialogTitleElement = React.ComponentRef;\ntype DialogTitleProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogTitleProps extends DialogTitleProps {}\n\nconst AlertDialogTitle = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n }\n);\n\nAlertDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'AlertDialogDescription';\n\ntype AlertDialogDescriptionElement = React.ComponentRef;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogDescriptionProps extends DialogDescriptionProps {}\n\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n});\n\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACTION_NAME = 'AlertDialogAction';\n\ntype AlertDialogActionElement = React.ComponentRef;\ntype DialogCloseProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogActionProps extends DialogCloseProps {}\n\nconst AlertDialogAction = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n }\n);\n\nAlertDialogAction.displayName = ACTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogCancel\n * -----------------------------------------------------------------------------------------------*/\n\nconst CANCEL_NAME = 'AlertDialogCancel';\n\ntype AlertDialogCancelElement = React.ComponentRef;\ninterface AlertDialogCancelProps extends DialogCloseProps {}\n\nconst AlertDialogCancel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return ;\n }\n);\n\nAlertDialogCancel.displayName = CANCEL_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject;\n};\n\nconst DescriptionWarning: React.FC = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute('aria-describedby')!\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n\n return null;\n};\n\nconst Root = AlertDialog;\nconst Trigger = AlertDialogTrigger;\nconst Portal = AlertDialogPortal;\nconst Overlay = AlertDialogOverlay;\nconst Content = AlertDialogContent;\nconst Action = AlertDialogAction;\nconst Cancel = AlertDialogCancel;\nconst Title = AlertDialogTitle;\nconst Description = AlertDialogDescription;\n\nexport {\n createAlertDialogScope,\n //\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogContent,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogTitle,\n AlertDialogDescription,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Action,\n Cancel,\n Title,\n Description,\n};\nexport type {\n AlertDialogProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertDialogActionProps,\n AlertDialogCancelProps,\n AlertDialogTitleProps,\n AlertDialogDescriptionProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAAA;AAAA,EAAA,mBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,cAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,2BAAmC;AACnC,gCAAgC;AAChC,sBAAiC;AACjC,0BAAkC;AAClC,uBAAqC;AACrC,wBAAgC;AAsBvB;AAdT,IAAM,YAAY;AAGlB,IAAM,CAAC,0BAA0B,sBAAsB,QAAI,yCAAmB,WAAW;AAAA,EACvF;AACF,CAAC;AACD,IAAM,qBAAiB,uCAAkB;AAKzC,IAAM,cAA0C,CAAC,UAAyC;AACxF,QAAM,EAAE,oBAAoB,GAAG,iBAAiB,IAAI;AACpD,QAAM,cAAc,eAAe,kBAAkB;AACrD,SAAO,4CAAiB,sBAAhB,EAAsB,GAAG,aAAc,GAAG,kBAAkB,OAAO,MAAM;AACnF;AAEA,YAAY,cAAc;AAK1B,IAAM,eAAe;AAMrB,IAAM,qBAA2B;AAAA,EAC/B,CAAC,OAA6C,iBAAiB;AAC7D,UAAM,EAAE,oBAAoB,GAAG,aAAa,IAAI;AAChD,UAAM,cAAc,eAAe,kBAAkB;AACrD,WAAO,4CAAiB,yBAAhB,EAAyB,GAAG,aAAc,GAAG,cAAc,KAAK,cAAc;AAAA,E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,UAAM,cAAc,eAAe,kBAAkB;AACrD,UAAM,UAAM,2CAAgB,cAAc,SAAS;AACnD,WAAO,4CAAiB,uBAAhB,EAAuB,GAAG,aAAc,GAAG,aAAa,KAAU;AAAA,EAC5E;AACF;AAEA,kBAAkB,cAAc;AAQhC,IAAM,qBAAwD,CAAC,EAAE,WAAW,MAAM;AAChF,QAAM,UAAU,KAAK,YAAY;AAAA;AAAA,qCAEE,YAAY,qBAAqB,gBAAgB;AAAA;AAAA,4JAEsE,YAAY;AAAA;AAAA;AAItK,EAAM,gBAAU,MAAM;AACpB,UAAM,iBAAiB,SAAS;AAAA,MAC9B,WAAW,SAAS,aAAa,kBAAkB;AAAA,IACrD;AACA,QAAI,CAAC,eAAgB,SAAQ,KAAK,OAAO;AAAA,EAC3C,GAAG,CAAC,SAAS,UAAU,CAAC;AAExB,SAAO;AACT;AAEA,IAAMC,QAAO;AACb,IAAMC,WAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,WAAU;AAChB,IAAM,SAAS;AACf,IAAM,SAAS;AACf,IAAMC,SAAQ;AACd,IAAMC,eAAc;", + "names": ["Content", "Description", "Overlay", "Portal", "Root", "Title", "Trigger", "Root", "Trigger", "Portal", "Overlay", "Content", "Title", "Description"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..add0e0a3ae665060603a405efd0063cf64425bff --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs @@ -0,0 +1,170 @@ +"use client"; + +// src/alert-dialog.tsx +import * as React from "react"; +import { createContextScope } from "@radix-ui/react-context"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import * as DialogPrimitive from "@radix-ui/react-dialog"; +import { createDialogScope } from "@radix-ui/react-dialog"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { createSlottable } from "@radix-ui/react-slot"; +import { jsx, jsxs } from "react/jsx-runtime"; +var ROOT_NAME = "AlertDialog"; +var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [ + createDialogScope +]); +var useDialogScope = createDialogScope(); +var AlertDialog = (props) => { + const { __scopeAlertDialog, ...alertDialogProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true }); +}; +AlertDialog.displayName = ROOT_NAME; +var TRIGGER_NAME = "AlertDialogTrigger"; +var AlertDialogTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, ...triggerProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef }); + } +); +AlertDialogTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "AlertDialogPortal"; +var AlertDialogPortal = (props) => { + const { __scopeAlertDialog, ...portalProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps }); +}; +AlertDialogPortal.displayName = PORTAL_NAME; +var OVERLAY_NAME = "AlertDialogOverlay"; +var AlertDialogOverlay = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, ...overlayProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef }); + } +); +AlertDialogOverlay.displayName = OVERLAY_NAME; +var CONTENT_NAME = "AlertDialogContent"; +var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME); +var Slottable = createSlottable("AlertDialogContent"); +var AlertDialogContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, children, ...contentProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + const contentRef = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, contentRef); + const cancelRef = React.useRef(null); + return /* @__PURE__ */ jsx( + DialogPrimitive.WarningProvider, + { + contentName: CONTENT_NAME, + titleName: TITLE_NAME, + docsSlug: "alert-dialog", + children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs( + DialogPrimitive.Content, + { + role: "alertdialog", + ...dialogScope, + ...contentProps, + ref: composedRefs, + onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => { + event.preventDefault(); + cancelRef.current?.focus({ preventScroll: true }); + }), + onPointerDownOutside: (event) => event.preventDefault(), + onInteractOutside: (event) => event.preventDefault(), + children: [ + /* @__PURE__ */ jsx(Slottable, { children }), + /* @__PURE__ */ jsx(DescriptionWarning, { contentRef }) + ] + } + ) }) + } + ); + } +); +AlertDialogContent.displayName = CONTENT_NAME; +var TITLE_NAME = "AlertDialogTitle"; +var AlertDialogTitle = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, ...titleProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef }); + } +); +AlertDialogTitle.displayName = TITLE_NAME; +var DESCRIPTION_NAME = "AlertDialogDescription"; +var AlertDialogDescription = React.forwardRef((props, forwardedRef) => { + const { __scopeAlertDialog, ...descriptionProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef }); +}); +AlertDialogDescription.displayName = DESCRIPTION_NAME; +var ACTION_NAME = "AlertDialogAction"; +var AlertDialogAction = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, ...actionProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef }); + } +); +AlertDialogAction.displayName = ACTION_NAME; +var CANCEL_NAME = "AlertDialogCancel"; +var AlertDialogCancel = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAlertDialog, ...cancelProps } = props; + const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog); + const dialogScope = useDialogScope(__scopeAlertDialog); + const ref = useComposedRefs(forwardedRef, cancelRef); + return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref }); + } +); +AlertDialogCancel.displayName = CANCEL_NAME; +var DescriptionWarning = ({ contentRef }) => { + const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog. + +Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. + +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`; + React.useEffect(() => { + const hasDescription = document.getElementById( + contentRef.current?.getAttribute("aria-describedby") + ); + if (!hasDescription) console.warn(MESSAGE); + }, [MESSAGE, contentRef]); + return null; +}; +var Root2 = AlertDialog; +var Trigger2 = AlertDialogTrigger; +var Portal2 = AlertDialogPortal; +var Overlay2 = AlertDialogOverlay; +var Content2 = AlertDialogContent; +var Action = AlertDialogAction; +var Cancel = AlertDialogCancel; +var Title2 = AlertDialogTitle; +var Description2 = AlertDialogDescription; +export { + Action, + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogOverlay, + AlertDialogPortal, + AlertDialogTitle, + AlertDialogTrigger, + Cancel, + Content2 as Content, + Description2 as Description, + Overlay2 as Overlay, + Portal2 as Portal, + Root2 as Root, + Title2 as Title, + Trigger2 as Trigger, + createAlertDialogScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..04008c7e9e4757367b689799801c87fa8ea43467 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/alert-dialog.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { createDialogScope } from '@radix-ui/react-dialog';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createSlottable } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_NAME = 'AlertDialog';\n\ntype ScopedProps

= P & { __scopeAlertDialog?: Scope };\nconst [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope,\n]);\nconst useDialogScope = createDialogScope();\n\ntype DialogProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogProps extends Omit {}\n\nconst AlertDialog: React.FC = (props: ScopedProps) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n};\n\nAlertDialog.displayName = ROOT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTrigger\n * -----------------------------------------------------------------------------------------------*/\nconst TRIGGER_NAME = 'AlertDialogTrigger';\n\ntype AlertDialogTriggerElement = React.ComponentRef;\ntype DialogTriggerProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogTriggerProps extends DialogTriggerProps {}\n\nconst AlertDialogTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n }\n);\n\nAlertDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'AlertDialogPortal';\n\ntype DialogPortalProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogPortalProps extends DialogPortalProps {}\n\nconst AlertDialogPortal: React.FC = (\n props: ScopedProps\n) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n};\n\nAlertDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'AlertDialogOverlay';\n\ntype AlertDialogOverlayElement = React.ComponentRef;\ntype DialogOverlayProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogOverlayProps extends DialogOverlayProps {}\n\nconst AlertDialogOverlay = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n }\n);\n\nAlertDialogOverlay.displayName = OVERLAY_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'AlertDialogContent';\n\ntype AlertDialogContentContextValue = {\n cancelRef: React.MutableRefObject;\n};\n\nconst [AlertDialogContentProvider, useAlertDialogContentContext] =\n createAlertDialogContext(CONTENT_NAME);\n\ntype AlertDialogContentElement = React.ComponentRef;\ntype DialogContentProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogContentProps\n extends Omit {}\n\nconst Slottable = createSlottable('AlertDialogContent');\n\nconst AlertDialogContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n\n return (\n \n \n {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n })}\n onPointerDownOutside={(event) => event.preventDefault()}\n onInteractOutside={(event) => event.preventDefault()}\n >\n {/**\n * We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider`\n * around everything, otherwise the `DescriptionWarning` would be rendered straight away.\n * This is because we want the accessibility checks to run only once the content is actually\n * open and that behaviour is already encapsulated in `DialogContent`.\n */}\n {children}\n {process.env.NODE_ENV === 'development' && (\n \n )}\n \n \n \n );\n }\n);\n\nAlertDialogContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'AlertDialogTitle';\n\ntype AlertDialogTitleElement = React.ComponentRef;\ntype DialogTitleProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogTitleProps extends DialogTitleProps {}\n\nconst AlertDialogTitle = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n }\n);\n\nAlertDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'AlertDialogDescription';\n\ntype AlertDialogDescriptionElement = React.ComponentRef;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogDescriptionProps extends DialogDescriptionProps {}\n\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n});\n\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACTION_NAME = 'AlertDialogAction';\n\ntype AlertDialogActionElement = React.ComponentRef;\ntype DialogCloseProps = React.ComponentPropsWithoutRef;\ninterface AlertDialogActionProps extends DialogCloseProps {}\n\nconst AlertDialogAction = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return ;\n }\n);\n\nAlertDialogAction.displayName = ACTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDialogCancel\n * -----------------------------------------------------------------------------------------------*/\n\nconst CANCEL_NAME = 'AlertDialogCancel';\n\ntype AlertDialogCancelElement = React.ComponentRef;\ninterface AlertDialogCancelProps extends DialogCloseProps {}\n\nconst AlertDialogCancel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return ;\n }\n);\n\nAlertDialogCancel.displayName = CANCEL_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject;\n};\n\nconst DescriptionWarning: React.FC = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute('aria-describedby')!\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n\n return null;\n};\n\nconst Root = AlertDialog;\nconst Trigger = AlertDialogTrigger;\nconst Portal = AlertDialogPortal;\nconst Overlay = AlertDialogOverlay;\nconst Content = AlertDialogContent;\nconst Action = AlertDialogAction;\nconst Cancel = AlertDialogCancel;\nconst Title = AlertDialogTitle;\nconst Description = AlertDialogDescription;\n\nexport {\n createAlertDialogScope,\n //\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogContent,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogTitle,\n AlertDialogDescription,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Action,\n Cancel,\n Title,\n Description,\n};\nexport type {\n AlertDialogProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertD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AAAA,IACrD;AACA,QAAI,CAAC,eAAgB,SAAQ,KAAK,OAAO;AAAA,EAC3C,GAAG,CAAC,SAAS,UAAU,CAAC;AAExB,SAAO;AACT;AAEA,IAAMA,QAAO;AACb,IAAMC,WAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,WAAU;AAChB,IAAM,SAAS;AACf,IAAM,SAAS;AACf,IAAMC,SAAQ;AACd,IAAMC,eAAc;", + "names": ["Root", "Trigger", "Portal", "Overlay", "Content", "Title", "Description"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/package.json b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/package.json new file mode 100644 index 0000000000000000000000000000000000000000..50d5f592fb35f0864e6a061abe16ae3cb7499514 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/package.json @@ -0,0 +1,73 @@ +{ + "name": "@radix-ui/react-alert-dialog", + "version": "1.1.15", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "src", + "dist" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-dialog": "1.1.15", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-slot": "1.2.3", + "@radix-ui/react-compose-refs": "1.1.2" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/src/alert-dialog.test.tsx b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/src/alert-dialog.test.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e0fc311d75875f59d4cecee96305f10f75e78585 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/src/alert-dialog.test.tsx @@ -0,0 +1,64 @@ +import React from 'react'; +import { axe } from 'vitest-axe'; +import type { RenderResult } from '@testing-library/react'; +import { cleanup, render, fireEvent } from '@testing-library/react'; +import * as AlertDialog from './alert-dialog'; +import { afterEach, describe, it, beforeEach, expect } from 'vitest'; + +const OPEN_TEXT = 'Open'; +const CANCEL_TEXT = 'Cancel'; +const ACTION_TEXT = 'Do it'; +const TITLE_TEXT = 'Warning'; +const DESC_TEXT = 'This is a warning'; +const OVERLAY_TEST_ID = 'test-overlay'; + +const DialogTest = (props: React.ComponentProps) => ( + + {OPEN_TEXT} + + + {TITLE_TEXT} + {DESC_TEXT} + {CANCEL_TEXT} + {ACTION_TEXT} + + +); + +describe('given a default Dialog', () => { + let rendered: RenderResult; + let title: HTMLElement; + let trigger: HTMLElement; + let cancelButton: HTMLElement; + + afterEach(cleanup); + + beforeEach(() => { + rendered = render(); + trigger = rendered.getByText(OPEN_TEXT); + }); + + it('should have no accessibility violations in default state', async () => { + expect(await axe(rendered.container)).toHaveNoViolations(); + }); + + describe('after clicking the trigger', () => { + beforeEach(() => { + fireEvent.click(trigger); + title = rendered.getByText(TITLE_TEXT); + cancelButton = rendered.getByText(CANCEL_TEXT); + }); + + it('should open the content', () => { + expect(title).toBeVisible(); + }); + + it('should have no accessibility violations when open', async () => { + expect(await axe(rendered.container)).toHaveNoViolations(); + }); + + it('should focus the cancel button', () => { + expect(cancelButton).toHaveFocus(); + }); + }); +}); diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/src/alert-dialog.tsx b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/src/alert-dialog.tsx new file mode 100644 index 0000000000000000000000000000000000000000..9ba643999deac5d17d6b10d69cbfb9b4689964e2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/src/alert-dialog.tsx @@ -0,0 +1,308 @@ +import * as React from 'react'; +import { createContextScope } from '@radix-ui/react-context'; +import { useComposedRefs } from '@radix-ui/react-compose-refs'; +import * as DialogPrimitive from '@radix-ui/react-dialog'; +import { createDialogScope } from '@radix-ui/react-dialog'; +import { composeEventHandlers } from '@radix-ui/primitive'; +import { createSlottable } from '@radix-ui/react-slot'; + +import type { Scope } from '@radix-ui/react-context'; + +/* ------------------------------------------------------------------------------------------------- + * AlertDialog + * -----------------------------------------------------------------------------------------------*/ + +const ROOT_NAME = 'AlertDialog'; + +type ScopedProps

= P & { __scopeAlertDialog?: Scope }; +const [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [ + createDialogScope, +]); +const useDialogScope = createDialogScope(); + +type DialogProps = React.ComponentPropsWithoutRef; +interface AlertDialogProps extends Omit {} + +const AlertDialog: React.FC = (props: ScopedProps) => { + const { __scopeAlertDialog, ...alertDialogProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return ; +}; + +AlertDialog.displayName = ROOT_NAME; + +/* ------------------------------------------------------------------------------------------------- + * AlertDialogTrigger + * -----------------------------------------------------------------------------------------------*/ +const TRIGGER_NAME = 'AlertDialogTrigger'; + +type AlertDialogTriggerElement = React.ComponentRef; +type DialogTriggerProps = React.ComponentPropsWithoutRef; +interface AlertDialogTriggerProps extends DialogTriggerProps {} + +const AlertDialogTrigger = React.forwardRef( + (props: ScopedProps, forwardedRef) => { + const { __scopeAlertDialog, ...triggerProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return ; + } +); + +AlertDialogTrigger.displayName = TRIGGER_NAME; + +/* ------------------------------------------------------------------------------------------------- + * AlertDialogPortal + * -----------------------------------------------------------------------------------------------*/ + +const PORTAL_NAME = 'AlertDialogPortal'; + +type DialogPortalProps = React.ComponentPropsWithoutRef; +interface AlertDialogPortalProps extends DialogPortalProps {} + +const AlertDialogPortal: React.FC = ( + props: ScopedProps +) => { + const { __scopeAlertDialog, ...portalProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return ; +}; + +AlertDialogPortal.displayName = PORTAL_NAME; + +/* ------------------------------------------------------------------------------------------------- + * AlertDialogOverlay + * -----------------------------------------------------------------------------------------------*/ + +const OVERLAY_NAME = 'AlertDialogOverlay'; + +type AlertDialogOverlayElement = React.ComponentRef; +type DialogOverlayProps = React.ComponentPropsWithoutRef; +interface AlertDialogOverlayProps extends DialogOverlayProps {} + +const AlertDialogOverlay = React.forwardRef( + (props: ScopedProps, forwardedRef) => { + const { __scopeAlertDialog, ...overlayProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return ; + } +); + +AlertDialogOverlay.displayName = OVERLAY_NAME; + +/* ------------------------------------------------------------------------------------------------- + * AlertDialogContent + * -----------------------------------------------------------------------------------------------*/ + +const CONTENT_NAME = 'AlertDialogContent'; + +type AlertDialogContentContextValue = { + cancelRef: React.MutableRefObject; +}; + +const [AlertDialogContentProvider, useAlertDialogContentContext] = + createAlertDialogContext(CONTENT_NAME); + +type AlertDialogContentElement = React.ComponentRef; +type DialogContentProps = React.ComponentPropsWithoutRef; +interface AlertDialogContentProps + extends Omit {} + +const Slottable = createSlottable('AlertDialogContent'); + +const AlertDialogContent = React.forwardRef( + (props: ScopedProps, forwardedRef) => { + const { __scopeAlertDialog, children, ...contentProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + const contentRef = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, contentRef); + const cancelRef = React.useRef(null); + + return ( + + + { + event.preventDefault(); + cancelRef.current?.focus({ preventScroll: true }); + })} + onPointerDownOutside={(event) => event.preventDefault()} + onInteractOutside={(event) => event.preventDefault()} + > + {/** + * We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider` + * around everything, otherwise the `DescriptionWarning` would be rendered straight away. + * This is because we want the accessibility checks to run only once the content is actually + * open and that behaviour is already encapsulated in `DialogContent`. + */} + {children} + {process.env.NODE_ENV === 'development' && ( + + )} + + + + ); + } +); + +AlertDialogContent.displayName = CONTENT_NAME; + +/* ------------------------------------------------------------------------------------------------- + * AlertDialogTitle + * -----------------------------------------------------------------------------------------------*/ + +const TITLE_NAME = 'AlertDialogTitle'; + +type AlertDialogTitleElement = React.ComponentRef; +type DialogTitleProps = React.ComponentPropsWithoutRef; +interface AlertDialogTitleProps extends DialogTitleProps {} + +const AlertDialogTitle = React.forwardRef( + (props: ScopedProps, forwardedRef) => { + const { __scopeAlertDialog, ...titleProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return ; + } +); + +AlertDialogTitle.displayName = TITLE_NAME; + +/* ------------------------------------------------------------------------------------------------- + * AlertDialogDescription + * -----------------------------------------------------------------------------------------------*/ + +const DESCRIPTION_NAME = 'AlertDialogDescription'; + +type AlertDialogDescriptionElement = React.ComponentRef; +type DialogDescriptionProps = React.ComponentPropsWithoutRef; +interface AlertDialogDescriptionProps extends DialogDescriptionProps {} + +const AlertDialogDescription = React.forwardRef< + AlertDialogDescriptionElement, + AlertDialogDescriptionProps +>((props: ScopedProps, forwardedRef) => { + const { __scopeAlertDialog, ...descriptionProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return ; +}); + +AlertDialogDescription.displayName = DESCRIPTION_NAME; + +/* ------------------------------------------------------------------------------------------------- + * AlertDialogAction + * -----------------------------------------------------------------------------------------------*/ + +const ACTION_NAME = 'AlertDialogAction'; + +type AlertDialogActionElement = React.ComponentRef; +type DialogCloseProps = React.ComponentPropsWithoutRef; +interface AlertDialogActionProps extends DialogCloseProps {} + +const AlertDialogAction = React.forwardRef( + (props: ScopedProps, forwardedRef) => { + const { __scopeAlertDialog, ...actionProps } = props; + const dialogScope = useDialogScope(__scopeAlertDialog); + return ; + } +); + +AlertDialogAction.displayName = ACTION_NAME; + +/* ------------------------------------------------------------------------------------------------- + * AlertDialogCancel + * -----------------------------------------------------------------------------------------------*/ + +const CANCEL_NAME = 'AlertDialogCancel'; + +type AlertDialogCancelElement = React.ComponentRef; +interface AlertDialogCancelProps extends DialogCloseProps {} + +const AlertDialogCancel = React.forwardRef( + (props: ScopedProps, forwardedRef) => { + const { __scopeAlertDialog, ...cancelProps } = props; + const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog); + const dialogScope = useDialogScope(__scopeAlertDialog); + const ref = useComposedRefs(forwardedRef, cancelRef); + return ; + } +); + +AlertDialogCancel.displayName = CANCEL_NAME; + +/* ---------------------------------------------------------------------------------------------- */ + +type DescriptionWarningProps = { + contentRef: React.RefObject; +}; + +const DescriptionWarning: React.FC = ({ contentRef }) => { + const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog. + +Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. + +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`; + + React.useEffect(() => { + const hasDescription = document.getElementById( + contentRef.current?.getAttribute('aria-describedby')! + ); + if (!hasDescription) console.warn(MESSAGE); + }, [MESSAGE, contentRef]); + + return null; +}; + +const Root = AlertDialog; +const Trigger = AlertDialogTrigger; +const Portal = AlertDialogPortal; +const Overlay = AlertDialogOverlay; +const Content = AlertDialogContent; +const Action = AlertDialogAction; +const Cancel = AlertDialogCancel; +const Title = AlertDialogTitle; +const Description = AlertDialogDescription; + +export { + createAlertDialogScope, + // + AlertDialog, + AlertDialogTrigger, + AlertDialogPortal, + AlertDialogOverlay, + AlertDialogContent, + AlertDialogAction, + AlertDialogCancel, + AlertDialogTitle, + AlertDialogDescription, + // + Root, + Trigger, + Portal, + Overlay, + Content, + Action, + Cancel, + Title, + Description, +}; +export type { + AlertDialogProps, + AlertDialogTriggerProps, + AlertDialogPortalProps, + AlertDialogOverlayProps, + AlertDialogContentProps, + AlertDialogActionProps, + AlertDialogCancelProps, + AlertDialogTitleProps, + AlertDialogDescriptionProps, +}; diff --git a/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/src/index.ts b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..5561fed2f518b73e6191c56265aa9c0a85be0e15 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types_eb05f241b5ca9be44eab845adec1a33a/node_modules/@radix-ui/react-alert-dialog/src/index.ts @@ -0,0 +1,35 @@ +'use client'; +export { + createAlertDialogScope, + // + AlertDialog, + AlertDialogTrigger, + AlertDialogPortal, + AlertDialogOverlay, + AlertDialogContent, + AlertDialogAction, + AlertDialogCancel, + AlertDialogTitle, + AlertDialogDescription, + // + Root, + Trigger, + Portal, + Overlay, + Content, + Action, + Cancel, + Title, + Description, +} from './alert-dialog'; +export type { + AlertDialogProps, + AlertDialogTriggerProps, + AlertDialogPortalProps, + AlertDialogOverlayProps, + AlertDialogContentProps, + AlertDialogActionProps, + AlertDialogCancelProps, + AlertDialogTitleProps, + AlertDialogDescriptionProps, +} from './alert-dialog'; diff --git a/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/LICENSE b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/README.md b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4030b172f224ff7c1d73da3bd1c4a13bdbf3963e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/README.md @@ -0,0 +1,3 @@ +# `react-arrow` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..436792063bed117ff5672d36b39fb2ea189d3ce8 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.d.mts @@ -0,0 +1,10 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveSvgProps = React.ComponentPropsWithoutRef; +interface ArrowProps extends PrimitiveSvgProps { +} +declare const Arrow: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { Arrow, type ArrowProps, Root }; diff --git a/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..436792063bed117ff5672d36b39fb2ea189d3ce8 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.d.ts @@ -0,0 +1,10 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveSvgProps = React.ComponentPropsWithoutRef; +interface ArrowProps extends PrimitiveSvgProps { +} +declare const Arrow: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { Arrow, type ArrowProps, Root }; diff --git a/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.js b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..f812482c77978158ce0cb3d1edb85acd191f308b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.js @@ -0,0 +1,60 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Arrow: () => Arrow, + Root: () => Root +}); +module.exports = __toCommonJS(index_exports); + +// src/arrow.tsx +var React = __toESM(require("react")); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_jsx_runtime = require("react/jsx-runtime"); +var NAME = "Arrow"; +var Arrow = React.forwardRef((props, forwardedRef) => { + const { children, width = 10, height = 5, ...arrowProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.svg, + { + ...arrowProps, + ref: forwardedRef, + width, + height, + viewBox: "0 0 30 10", + preserveAspectRatio: "none", + children: props.asChild ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polygon", { points: "0,0 30,0 15,10" }) + } + ); +}); +Arrow.displayName = NAME; +var Root = Arrow; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..694fdfe6763be864cb3c54ed53bd69c15f357265 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/arrow.tsx"], + "sourcesContent": ["export {\n Arrow,\n //\n Root,\n} from './arrow';\nexport type { ArrowProps } from './arrow';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Arrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Arrow';\n\ntype ArrowElement = React.ComponentRef;\ntype PrimitiveSvgProps = React.ComponentPropsWithoutRef;\ninterface ArrowProps extends PrimitiveSvgProps {}\n\nconst Arrow = React.forwardRef((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return (\n \n {/* We use their children if they're slotting to replace the whole svg */}\n {props.asChild ? children : }\n \n );\n});\n\nArrow.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Arrow;\n\nexport {\n Arrow,\n //\n Root,\n};\nexport type { ArrowProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AAwBQ;AAlBlC,IAAM,OAAO;AAMb,IAAM,QAAc,iBAAqC,CAAC,OAAO,iBAAiB;AAChF,QAAM,EAAE,UAAU,QAAQ,IAAI,SAAS,GAAG,GAAG,WAAW,IAAI;AAC5D,SACE;AAAA,IAAC,iCAAU;AAAA,IAAV;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,SAAQ;AAAA,MACR,qBAAoB;AAAA,MAGnB,gBAAM,UAAU,WAAW,4CAAC,aAAQ,QAAO,kBAAiB;AAAA;AAAA,EAC/D;AAEJ,CAAC;AAED,MAAM,cAAc;AAIpB,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a15d6db0ce2d2c2ed5f7e63393d288cc160081db --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.mjs @@ -0,0 +1,27 @@ +// src/arrow.tsx +import * as React from "react"; +import { Primitive } from "@radix-ui/react-primitive"; +import { jsx } from "react/jsx-runtime"; +var NAME = "Arrow"; +var Arrow = React.forwardRef((props, forwardedRef) => { + const { children, width = 10, height = 5, ...arrowProps } = props; + return /* @__PURE__ */ jsx( + Primitive.svg, + { + ...arrowProps, + ref: forwardedRef, + width, + height, + viewBox: "0 0 30 10", + preserveAspectRatio: "none", + children: props.asChild ? children : /* @__PURE__ */ jsx("polygon", { points: "0,0 30,0 15,10" }) + } + ); +}); +Arrow.displayName = NAME; +var Root = Arrow; +export { + Arrow, + Root +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..8289098c06d9f5e49ee628e31c8c9c0468bbf878 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/arrow.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Arrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Arrow';\n\ntype ArrowElement = React.ComponentRef;\ntype PrimitiveSvgProps = React.ComponentPropsWithoutRef;\ninterface ArrowProps extends PrimitiveSvgProps {}\n\nconst Arrow = React.forwardRef((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return (\n \n {/* We use their children if they're slotting to replace the whole svg */}\n {props.asChild ? children : }\n \n );\n});\n\nArrow.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Arrow;\n\nexport {\n Arrow,\n //\n Root,\n};\nexport type { ArrowProps };\n"], + "mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAwBQ;AAlBlC,IAAM,OAAO;AAMb,IAAM,QAAc,iBAAqC,CAAC,OAAO,iBAAiB;AAChF,QAAM,EAAE,UAAU,QAAQ,IAAI,SAAS,GAAG,GAAG,WAAW,IAAI;AAC5D,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,SAAQ;AAAA,MACR,qBAAoB;AAAA,MAGnB,gBAAM,UAAU,WAAW,oBAAC,aAAQ,QAAO,kBAAiB;AAAA;AAAA,EAC/D;AAEJ,CAAC;AAED,MAAM,cAAc;AAIpB,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/package.json b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a0b0931f6d73842fd2918e2532dc4de99475c863 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_eef1b49e32fa305b3fa40b45db5cb90e/node_modules/@radix-ui/react-arrow/package.json @@ -0,0 +1,68 @@ +{ + "name": "@radix-ui/react-arrow", + "version": "1.1.7", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-primitive": "2.1.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/eslint-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/LICENSE b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/README.md b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a4db17b3f1e75b2a6cedd1fcabe6541790dd75e0 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/README.md @@ -0,0 +1,3 @@ +# `react-aspect-ratio` + +View docs [here](https://radix-ui.com/primitives/docs/utilities/aspect-ratio). diff --git a/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a3bca7b0ca10539ce519ca5f26b18414952956ca --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.d.mts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface AspectRatioProps extends PrimitiveDivProps { + ratio?: number; +} +declare const AspectRatio: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { AspectRatio, type AspectRatioProps, Root }; diff --git a/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a3bca7b0ca10539ce519ca5f26b18414952956ca --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface AspectRatioProps extends PrimitiveDivProps { + ratio?: number; +} +declare const AspectRatio: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { AspectRatio, type AspectRatioProps, Root }; diff --git a/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.js b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e9a40631a9e969f03a04531ef77e280ebe72ed46 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.js @@ -0,0 +1,79 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + AspectRatio: () => AspectRatio, + Root: () => Root +}); +module.exports = __toCommonJS(index_exports); + +// src/aspect-ratio.tsx +var React = __toESM(require("react")); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_jsx_runtime = require("react/jsx-runtime"); +var NAME = "AspectRatio"; +var AspectRatio = React.forwardRef( + (props, forwardedRef) => { + const { ratio = 1 / 1, style, ...aspectRatioProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + "div", + { + style: { + // ensures inner element is contained + position: "relative", + // ensures padding bottom trick maths works + width: "100%", + paddingBottom: `${100 / ratio}%` + }, + "data-radix-aspect-ratio-wrapper": "", + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + ...aspectRatioProps, + ref: forwardedRef, + style: { + ...style, + // ensures children expand in ratio + position: "absolute", + top: 0, + right: 0, + bottom: 0, + left: 0 + } + } + ) + } + ); + } +); +AspectRatio.displayName = NAME; +var Root = AspectRatio; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a8261a52cbdac56ca54e767d74af3d32930d8dea --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/aspect-ratio.tsx"], + "sourcesContent": ["export {\n AspectRatio,\n //\n Root,\n} from './aspect-ratio';\nexport type { AspectRatioProps } from './aspect-ratio';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * AspectRatio\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'AspectRatio';\n\ntype AspectRatioElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface AspectRatioProps extends PrimitiveDivProps {\n ratio?: number;\n}\n\nconst AspectRatio = React.forwardRef(\n (props, forwardedRef) => {\n const { ratio = 1 / 1, style, ...aspectRatioProps } = props;\n return (\n \n \n \n );\n }\n);\n\nAspectRatio.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = AspectRatio;\n\nexport {\n AspectRatio,\n //\n Root,\n};\nexport type { AspectRatioProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AA4BlB;AAtBR,IAAM,OAAO;AAQb,IAAM,cAAoB;AAAA,EACxB,CAAC,OAAO,iBAAiB;AACvB,UAAM,EAAE,QAAQ,IAAI,GAAG,OAAO,GAAG,iBAAiB,IAAI;AACtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA;AAAA,UAEL,UAAU;AAAA;AAAA,UAEV,OAAO;AAAA,UACP,eAAe,GAAG,MAAM,KAAK;AAAA,QAC/B;AAAA,QACA,mCAAgC;AAAA,QAEhC;AAAA,UAAC,iCAAU;AAAA,UAAV;AAAA,YACE,GAAG;AAAA,YACJ,KAAK;AAAA,YACL,OAAO;AAAA,cACL,GAAG;AAAA;AAAA,cAEH,UAAU;AAAA,cACV,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,MAAM;AAAA,YACR;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAI1B,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d33bd1fcedee5a93897ebc6bdb87c68e8ff67b5f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs @@ -0,0 +1,46 @@ +// src/aspect-ratio.tsx +import * as React from "react"; +import { Primitive } from "@radix-ui/react-primitive"; +import { jsx } from "react/jsx-runtime"; +var NAME = "AspectRatio"; +var AspectRatio = React.forwardRef( + (props, forwardedRef) => { + const { ratio = 1 / 1, style, ...aspectRatioProps } = props; + return /* @__PURE__ */ jsx( + "div", + { + style: { + // ensures inner element is contained + position: "relative", + // ensures padding bottom trick maths works + width: "100%", + paddingBottom: `${100 / ratio}%` + }, + "data-radix-aspect-ratio-wrapper": "", + children: /* @__PURE__ */ jsx( + Primitive.div, + { + ...aspectRatioProps, + ref: forwardedRef, + style: { + ...style, + // ensures children expand in ratio + position: "absolute", + top: 0, + right: 0, + bottom: 0, + left: 0 + } + } + ) + } + ); + } +); +AspectRatio.displayName = NAME; +var Root = AspectRatio; +export { + AspectRatio, + Root +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..582d2012a688294edb6d55263b7d678906956395 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/aspect-ratio.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * AspectRatio\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'AspectRatio';\n\ntype AspectRatioElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface AspectRatioProps extends PrimitiveDivProps {\n ratio?: number;\n}\n\nconst AspectRatio = React.forwardRef(\n (props, forwardedRef) => {\n const { ratio = 1 / 1, style, ...aspectRatioProps } = props;\n return (\n \n \n \n );\n }\n);\n\nAspectRatio.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = AspectRatio;\n\nexport {\n AspectRatio,\n //\n Root,\n};\nexport type { AspectRatioProps };\n"], + "mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AA4BlB;AAtBR,IAAM,OAAO;AAQb,IAAM,cAAoB;AAAA,EACxB,CAAC,OAAO,iBAAiB;AACvB,UAAM,EAAE,QAAQ,IAAI,GAAG,OAAO,GAAG,iBAAiB,IAAI;AACtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA;AAAA,UAEL,UAAU;AAAA;AAAA,UAEV,OAAO;AAAA,UACP,eAAe,GAAG,MAAM,KAAK;AAAA,QAC/B;AAAA,QACA,mCAAgC;AAAA,QAEhC;AAAA,UAAC,UAAU;AAAA,UAAV;AAAA,YACE,GAAG;AAAA,YACJ,KAAK;AAAA,YACL,OAAO;AAAA,cACL,GAAG;AAAA;AAAA,cAEH,UAAU;AAAA,cACV,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,MAAM;AAAA,YACR;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAI1B,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/package.json b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a8f88017e5c6ad0788b01f75531f5eb44e3e9245 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_50bf78b805216cb653c8427329471a03/node_modules/@radix-ui/react-aspect-ratio/package.json @@ -0,0 +1,68 @@ +{ + "name": "@radix-ui/react-aspect-ratio", + "version": "1.1.7", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-primitive": "2.1.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/LICENSE b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/README.md b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/README.md new file mode 100644 index 0000000000000000000000000000000000000000..cfe4acf4f522690d80028bb7aeccb5ad692326a9 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/README.md @@ -0,0 +1,3 @@ +# `react-avatar` + +View docs [here](https://radix-ui.com/primitives/docs/components/avatar). diff --git a/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6722b7c0462260c9d3b12199f30b602b75c9696a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.d.mts @@ -0,0 +1,24 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createAvatarScope: _radix_ui_react_context.CreateScope; +type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error'; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface AvatarProps extends PrimitiveSpanProps { +} +declare const Avatar: React.ForwardRefExoticComponent>; +type PrimitiveImageProps = React.ComponentPropsWithoutRef; +interface AvatarImageProps extends PrimitiveImageProps { + onLoadingStatusChange?: (status: ImageLoadingStatus) => void; +} +declare const AvatarImage: React.ForwardRefExoticComponent>; +interface AvatarFallbackProps extends PrimitiveSpanProps { + delayMs?: number; +} +declare const AvatarFallback: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Image: React.ForwardRefExoticComponent>; +declare const Fallback: React.ForwardRefExoticComponent>; + +export { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Fallback, Image, Root, createAvatarScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6722b7c0462260c9d3b12199f30b602b75c9696a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.d.ts @@ -0,0 +1,24 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createAvatarScope: _radix_ui_react_context.CreateScope; +type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error'; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface AvatarProps extends PrimitiveSpanProps { +} +declare const Avatar: React.ForwardRefExoticComponent>; +type PrimitiveImageProps = React.ComponentPropsWithoutRef; +interface AvatarImageProps extends PrimitiveImageProps { + onLoadingStatusChange?: (status: ImageLoadingStatus) => void; +} +declare const AvatarImage: React.ForwardRefExoticComponent>; +interface AvatarFallbackProps extends PrimitiveSpanProps { + delayMs?: number; +} +declare const AvatarFallback: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Image: React.ForwardRefExoticComponent>; +declare const Fallback: React.ForwardRefExoticComponent>; + +export { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Fallback, Image, Root, createAvatarScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.js b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..0932f60eafd8974951e03012f4a82d1022717eaf --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.js @@ -0,0 +1,160 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Avatar: () => Avatar, + AvatarFallback: () => AvatarFallback, + AvatarImage: () => AvatarImage, + Fallback: () => Fallback, + Image: () => Image, + Root: () => Root, + createAvatarScope: () => createAvatarScope +}); +module.exports = __toCommonJS(index_exports); + +// src/avatar.tsx +var React = __toESM(require("react")); +var import_react_context = require("@radix-ui/react-context"); +var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref"); +var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_use_is_hydrated = require("@radix-ui/react-use-is-hydrated"); +var import_jsx_runtime = require("react/jsx-runtime"); +var AVATAR_NAME = "Avatar"; +var [createAvatarContext, createAvatarScope] = (0, import_react_context.createContextScope)(AVATAR_NAME); +var [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME); +var Avatar = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAvatar, ...avatarProps } = props; + const [imageLoadingStatus, setImageLoadingStatus] = React.useState("idle"); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + AvatarProvider, + { + scope: __scopeAvatar, + imageLoadingStatus, + onImageLoadingStatusChange: setImageLoadingStatus, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.span, { ...avatarProps, ref: forwardedRef }) + } + ); + } +); +Avatar.displayName = AVATAR_NAME; +var IMAGE_NAME = "AvatarImage"; +var AvatarImage = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAvatar, src, onLoadingStatusChange = () => { + }, ...imageProps } = props; + const context = useAvatarContext(IMAGE_NAME, __scopeAvatar); + const imageLoadingStatus = useImageLoadingStatus(src, imageProps); + const handleLoadingStatusChange = (0, import_react_use_callback_ref.useCallbackRef)((status) => { + onLoadingStatusChange(status); + context.onImageLoadingStatusChange(status); + }); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + if (imageLoadingStatus !== "idle") { + handleLoadingStatusChange(imageLoadingStatus); + } + }, [imageLoadingStatus, handleLoadingStatusChange]); + return imageLoadingStatus === "loaded" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null; + } +); +AvatarImage.displayName = IMAGE_NAME; +var FALLBACK_NAME = "AvatarFallback"; +var AvatarFallback = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAvatar, delayMs, ...fallbackProps } = props; + const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar); + const [canRender, setCanRender] = React.useState(delayMs === void 0); + React.useEffect(() => { + if (delayMs !== void 0) { + const timerId = window.setTimeout(() => setCanRender(true), delayMs); + return () => window.clearTimeout(timerId); + } + }, [delayMs]); + return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null; + } +); +AvatarFallback.displayName = FALLBACK_NAME; +function resolveLoadingStatus(image, src) { + if (!image) { + return "idle"; + } + if (!src) { + return "error"; + } + if (image.src !== src) { + image.src = src; + } + return image.complete && image.naturalWidth > 0 ? "loaded" : "loading"; +} +function useImageLoadingStatus(src, { referrerPolicy, crossOrigin }) { + const isHydrated = (0, import_react_use_is_hydrated.useIsHydrated)(); + const imageRef = React.useRef(null); + const image = (() => { + if (!isHydrated) return null; + if (!imageRef.current) { + imageRef.current = new window.Image(); + } + return imageRef.current; + })(); + const [loadingStatus, setLoadingStatus] = React.useState( + () => resolveLoadingStatus(image, src) + ); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + setLoadingStatus(resolveLoadingStatus(image, src)); + }, [image, src]); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + const updateStatus = (status) => () => { + setLoadingStatus(status); + }; + if (!image) return; + const handleLoad = updateStatus("loaded"); + const handleError = updateStatus("error"); + image.addEventListener("load", handleLoad); + image.addEventListener("error", handleError); + if (referrerPolicy) { + image.referrerPolicy = referrerPolicy; + } + if (typeof crossOrigin === "string") { + image.crossOrigin = crossOrigin; + } + return () => { + image.removeEventListener("load", handleLoad); + image.removeEventListener("error", handleError); + }; + }, [image, crossOrigin, referrerPolicy]); + return loadingStatus; +} +var Root = Avatar; +var Image = AvatarImage; +var Fallback = AvatarFallback; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..13bd3d1378ba61c7ddc53faa1451d600eb80b0cf --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/avatar.tsx"], + "sourcesContent": ["'use client';\nexport {\n createAvatarScope,\n //\n Avatar,\n AvatarImage,\n AvatarFallback,\n //\n Root,\n Image,\n Fallback,\n} from './avatar';\nexport type { AvatarProps, AvatarImageProps, AvatarFallbackProps } from './avatar';\n", "import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useIsHydrated } from '@radix-ui/react-use-is-hydrated';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Avatar\n * -----------------------------------------------------------------------------------------------*/\n\nconst AVATAR_NAME = 'Avatar';\n\ntype ScopedProps

= P & { __scopeAvatar?: Scope };\nconst [createAvatarContext, createAvatarScope] = createContextScope(AVATAR_NAME);\n\ntype ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';\n\ntype AvatarContextValue = {\n imageLoadingStatus: ImageLoadingStatus;\n onImageLoadingStatusChange(status: ImageLoadingStatus): void;\n};\n\nconst [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);\n\ntype AvatarElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface AvatarProps extends PrimitiveSpanProps {}\n\nconst Avatar = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAvatar, ...avatarProps } = props;\n const [imageLoadingStatus, setImageLoadingStatus] = React.useState('idle');\n return (\n \n \n \n );\n }\n);\n\nAvatar.displayName = AVATAR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AvatarImage\n * -----------------------------------------------------------------------------------------------*/\n\nconst IMAGE_NAME = 'AvatarImage';\n\ntype AvatarImageElement = React.ComponentRef;\ntype PrimitiveImageProps = React.ComponentPropsWithoutRef;\ninterface AvatarImageProps extends PrimitiveImageProps {\n onLoadingStatusChange?: (status: ImageLoadingStatus) => void;\n}\n\nconst AvatarImage = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAvatar, src, onLoadingStatusChange = () => {}, ...imageProps } = props;\n const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);\n const imageLoadingStatus = useImageLoadingStatus(src, imageProps);\n const handleLoadingStatusChange = useCallbackRef((status: ImageLoadingStatus) => {\n onLoadingStatusChange(status);\n context.onImageLoadingStatusChange(status);\n });\n\n useLayoutEffect(() => {\n if (imageLoadingStatus !== 'idle') {\n handleLoadingStatusChange(imageLoadingStatus);\n }\n }, [imageLoadingStatus, handleLoadingStatusChange]);\n\n return imageLoadingStatus === 'loaded' ? (\n \n ) : null;\n }\n);\n\nAvatarImage.displayName = IMAGE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AvatarFallback\n * -----------------------------------------------------------------------------------------------*/\n\nconst FALLBACK_NAME = 'AvatarFallback';\n\ntype AvatarFallbackElement = React.ComponentRef;\ninterface AvatarFallbackProps extends PrimitiveSpanProps {\n delayMs?: number;\n}\n\nconst AvatarFallback = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAvatar, delayMs, ...fallbackProps } = props;\n const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);\n const [canRender, setCanRender] = React.useState(delayMs === undefined);\n\n React.useEffect(() => {\n if (delayMs !== undefined) {\n const timerId = window.setTimeout(() => setCanRender(true), delayMs);\n return () => window.clearTimeout(timerId);\n }\n }, [delayMs]);\n\n return canRender && context.imageLoadingStatus !== 'loaded' ? (\n \n ) : null;\n }\n);\n\nAvatarFallback.displayName = FALLBACK_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction resolveLoadingStatus(image: HTMLImageElement | null, src?: string): ImageLoadingStatus {\n if (!image) {\n return 'idle';\n }\n if (!src) {\n return 'error';\n }\n if (image.src !== src) {\n image.src = src;\n }\n return image.complete && image.naturalWidth > 0 ? 'loaded' : 'loading';\n}\n\nfunction useImageLoadingStatus(\n src: string | undefined,\n { referrerPolicy, crossOrigin }: AvatarImageProps\n) {\n const isHydrated = useIsHydrated();\n const imageRef = React.useRef(null);\n const image = (() => {\n if (!isHydrated) return null;\n if (!imageRef.current) {\n imageRef.current = new window.Image();\n }\n return imageRef.current;\n })();\n\n const [loadingStatus, setLoadingStatus] = React.useState(() =>\n resolveLoadingStatus(image, src)\n );\n\n useLayoutEffect(() => {\n setLoadingStatus(resolveLoadingStatus(image, src));\n }, [image, src]);\n\n useLayoutEffect(() => {\n const updateStatus = (status: ImageLoadingStatus) => () => {\n setLoadingStatus(status);\n };\n\n if (!image) return;\n\n const handleLoad = updateStatus('loaded');\n const handleError = updateStatus('error');\n image.addEventListener('load', handleLoad);\n image.addEventListener('error', handleError);\n if (referrerPolicy) {\n image.referrerPolicy = referrerPolicy;\n }\n if (typeof crossOrigin === 'string') {\n image.crossOrigin = crossOrigin;\n }\n\n return () => {\n image.removeEventListener('load', handleLoad);\n image.removeEventListener('error', handleError);\n };\n }, [image, crossOrigin, referrerPolicy]);\n\n return loadingStatus;\n}\n\nconst Root = Avatar;\nconst Image = AvatarImage;\nconst Fallback = AvatarFallback;\n\nexport {\n createAvatarScope,\n //\n Avatar,\n AvatarImage,\n AvatarFallback,\n //\n Root,\n Image,\n Fallback,\n};\nexport type { AvatarProps, AvatarImageProps, AvatarFallbackProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,2BAAmC;AACnC,oCAA+B;AAC/B,qCAAgC;AAChC,6BAA0B;AAC1B,mCAA8B;AAoCtB;AA5BR,IAAM,cAAc;AAGpB,IAAM,CAAC,qBAAqB,iBAAiB,QAAI,yCAAmB,WAAW;AAS/E,IAAM,CAAC,gBAAgB,gBAAgB,IAAI,oBAAwC,WAAW;AAM9F,IAAM,SAAe;AAAA,EACnB,CAAC,OAAiC,iBAAiB;AACjD,UAAM,EAAE,eAAe,GAAG,YAAY,IAAI;AAC1C,UAAM,CAAC,oBAAoB,qBAAqB,IAAU,eAA6B,MAAM;AAC7F,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP;AAAA,QACA,4BAA4B;AAAA,QAE5B,sDAAC,iCAAU,MAAV,EAAgB,GAAG,aAAa,KAAK,cAAc;AAAA;AAAA,IACtD;A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W;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..53de75fa3285233bf957ae52595c2e859604b7fb --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.mjs @@ -0,0 +1,128 @@ +"use client"; + +// src/avatar.tsx +import * as React from "react"; +import { createContextScope } from "@radix-ui/react-context"; +import { useCallbackRef } from "@radix-ui/react-use-callback-ref"; +import { useLayoutEffect } from "@radix-ui/react-use-layout-effect"; +import { Primitive } from "@radix-ui/react-primitive"; +import { useIsHydrated } from "@radix-ui/react-use-is-hydrated"; +import { jsx } from "react/jsx-runtime"; +var AVATAR_NAME = "Avatar"; +var [createAvatarContext, createAvatarScope] = createContextScope(AVATAR_NAME); +var [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME); +var Avatar = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAvatar, ...avatarProps } = props; + const [imageLoadingStatus, setImageLoadingStatus] = React.useState("idle"); + return /* @__PURE__ */ jsx( + AvatarProvider, + { + scope: __scopeAvatar, + imageLoadingStatus, + onImageLoadingStatusChange: setImageLoadingStatus, + children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef }) + } + ); + } +); +Avatar.displayName = AVATAR_NAME; +var IMAGE_NAME = "AvatarImage"; +var AvatarImage = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAvatar, src, onLoadingStatusChange = () => { + }, ...imageProps } = props; + const context = useAvatarContext(IMAGE_NAME, __scopeAvatar); + const imageLoadingStatus = useImageLoadingStatus(src, imageProps); + const handleLoadingStatusChange = useCallbackRef((status) => { + onLoadingStatusChange(status); + context.onImageLoadingStatusChange(status); + }); + useLayoutEffect(() => { + if (imageLoadingStatus !== "idle") { + handleLoadingStatusChange(imageLoadingStatus); + } + }, [imageLoadingStatus, handleLoadingStatusChange]); + return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null; + } +); +AvatarImage.displayName = IMAGE_NAME; +var FALLBACK_NAME = "AvatarFallback"; +var AvatarFallback = React.forwardRef( + (props, forwardedRef) => { + const { __scopeAvatar, delayMs, ...fallbackProps } = props; + const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar); + const [canRender, setCanRender] = React.useState(delayMs === void 0); + React.useEffect(() => { + if (delayMs !== void 0) { + const timerId = window.setTimeout(() => setCanRender(true), delayMs); + return () => window.clearTimeout(timerId); + } + }, [delayMs]); + return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null; + } +); +AvatarFallback.displayName = FALLBACK_NAME; +function resolveLoadingStatus(image, src) { + if (!image) { + return "idle"; + } + if (!src) { + return "error"; + } + if (image.src !== src) { + image.src = src; + } + return image.complete && image.naturalWidth > 0 ? "loaded" : "loading"; +} +function useImageLoadingStatus(src, { referrerPolicy, crossOrigin }) { + const isHydrated = useIsHydrated(); + const imageRef = React.useRef(null); + const image = (() => { + if (!isHydrated) return null; + if (!imageRef.current) { + imageRef.current = new window.Image(); + } + return imageRef.current; + })(); + const [loadingStatus, setLoadingStatus] = React.useState( + () => resolveLoadingStatus(image, src) + ); + useLayoutEffect(() => { + setLoadingStatus(resolveLoadingStatus(image, src)); + }, [image, src]); + useLayoutEffect(() => { + const updateStatus = (status) => () => { + setLoadingStatus(status); + }; + if (!image) return; + const handleLoad = updateStatus("loaded"); + const handleError = updateStatus("error"); + image.addEventListener("load", handleLoad); + image.addEventListener("error", handleError); + if (referrerPolicy) { + image.referrerPolicy = referrerPolicy; + } + if (typeof crossOrigin === "string") { + image.crossOrigin = crossOrigin; + } + return () => { + image.removeEventListener("load", handleLoad); + image.removeEventListener("error", handleError); + }; + }, [image, crossOrigin, referrerPolicy]); + return loadingStatus; +} +var Root = Avatar; +var Image = AvatarImage; +var Fallback = AvatarFallback; +export { + Avatar, + AvatarFallback, + AvatarImage, + Fallback, + Image, + Root, + createAvatarScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..3b6cd122754540eda4d3212a2305ab19a22eccc7 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/avatar.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useIsHydrated } from '@radix-ui/react-use-is-hydrated';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Avatar\n * -----------------------------------------------------------------------------------------------*/\n\nconst AVATAR_NAME = 'Avatar';\n\ntype ScopedProps

= P & { __scopeAvatar?: Scope };\nconst [createAvatarContext, createAvatarScope] = createContextScope(AVATAR_NAME);\n\ntype ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';\n\ntype AvatarContextValue = {\n imageLoadingStatus: ImageLoadingStatus;\n onImageLoadingStatusChange(status: ImageLoadingStatus): void;\n};\n\nconst [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);\n\ntype AvatarElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface AvatarProps extends PrimitiveSpanProps {}\n\nconst Avatar = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAvatar, ...avatarProps } = props;\n const [imageLoadingStatus, setImageLoadingStatus] = React.useState('idle');\n return (\n \n \n \n );\n }\n);\n\nAvatar.displayName = AVATAR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AvatarImage\n * -----------------------------------------------------------------------------------------------*/\n\nconst IMAGE_NAME = 'AvatarImage';\n\ntype AvatarImageElement = React.ComponentRef;\ntype PrimitiveImageProps = React.ComponentPropsWithoutRef;\ninterface AvatarImageProps extends PrimitiveImageProps {\n onLoadingStatusChange?: (status: ImageLoadingStatus) => void;\n}\n\nconst AvatarImage = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAvatar, src, onLoadingStatusChange = () => {}, ...imageProps } = props;\n const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);\n const imageLoadingStatus = useImageLoadingStatus(src, imageProps);\n const handleLoadingStatusChange = useCallbackRef((status: ImageLoadingStatus) => {\n onLoadingStatusChange(status);\n context.onImageLoadingStatusChange(status);\n });\n\n useLayoutEffect(() => {\n if (imageLoadingStatus !== 'idle') {\n handleLoadingStatusChange(imageLoadingStatus);\n }\n }, [imageLoadingStatus, handleLoadingStatusChange]);\n\n return imageLoadingStatus === 'loaded' ? (\n \n ) : null;\n }\n);\n\nAvatarImage.displayName = IMAGE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * AvatarFallback\n * -----------------------------------------------------------------------------------------------*/\n\nconst FALLBACK_NAME = 'AvatarFallback';\n\ntype AvatarFallbackElement = React.ComponentRef;\ninterface AvatarFallbackProps extends PrimitiveSpanProps {\n delayMs?: number;\n}\n\nconst AvatarFallback = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeAvatar, delayMs, ...fallbackProps } = props;\n const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);\n const [canRender, setCanRender] = React.useState(delayMs === undefined);\n\n React.useEffect(() => {\n if (delayMs !== undefined) {\n const timerId = window.setTimeout(() => setCanRender(true), delayMs);\n return () => window.clearTimeout(timerId);\n }\n }, [delayMs]);\n\n return canRender && context.imageLoadingStatus !== 'loaded' ? (\n \n ) : null;\n }\n);\n\nAvatarFallback.displayName = FALLBACK_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction resolveLoadingStatus(image: HTMLImageElement | null, src?: string): ImageLoadingStatus {\n if (!image) {\n return 'idle';\n }\n if (!src) {\n return 'error';\n }\n if (image.src !== src) {\n image.src = src;\n }\n return image.complete && image.naturalWidth > 0 ? 'loaded' : 'loading';\n}\n\nfunction useImageLoadingStatus(\n src: string | undefined,\n { referrerPolicy, crossOrigin }: AvatarImageProps\n) {\n const isHydrated = useIsHydrated();\n const imageRef = React.useRef(null);\n const image = (() => {\n if (!isHydrated) return null;\n if (!imageRef.current) {\n imageRef.current = new window.Image();\n }\n return imageRef.current;\n })();\n\n const [loadingStatus, setLoadingStatus] = React.useState(() =>\n resolveLoadingStatus(image, src)\n );\n\n useLayoutEffect(() => {\n setLoadingStatus(resolveLoadingStatus(image, src));\n }, [image, src]);\n\n useLayoutEffect(() => {\n const updateStatus = (status: ImageLoadingStatus) => () => {\n setLoadingStatus(status);\n };\n\n if (!image) return;\n\n const handleLoad = updateStatus('loaded');\n const handleError = updateStatus('error');\n image.addEventListener('load', handleLoad);\n image.addEventListener('error', handleError);\n if (referrerPolicy) {\n image.referrerPolicy = referrerPolicy;\n }\n if (typeof crossOrigin === 'string') {\n image.crossOrigin = crossOrigin;\n }\n\n return () => {\n image.removeEventListener('load', handleLoad);\n image.removeEventListener('error', handleError);\n };\n }, [image, crossOrigin, referrerPolicy]);\n\n return loadingStatus;\n}\n\nconst Root = Avatar;\nconst Image = AvatarImage;\nconst Fallback = AvatarFallback;\n\nexport {\n createAvatarScope,\n //\n Avatar,\n AvatarImage,\n AvatarFallback,\n //\n Root,\n Image,\n Fallback,\n};\nexport type { AvatarProps, AvatarImageProps, AvatarFallbackProps };\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAoCtB;AA5BR,IAAM,cAAc;AAGpB,IAAM,CAAC,qBAAqB,iBAAiB,IAAI,mBAAmB,WAAW;AAS/E,IAAM,CAAC,gBAAgB,gBAAgB,IAAI,oBAAwC,WAAW;AAM9F,IAAM,SAAe;AAAA,EACnB,CAAC,OAAiC,iBAAiB;AACjD,UAAM,EAAE,eAAe,GAAG,YAAY,IAAI;AAC1C,UAAM,CAAC,oBAAoB,qBAAqB,IAAU,eAA6B,MAAM;AAC7F,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP;AAAA,QACA,4BAA4B;AAAA,QAE5B,8BAAC,UAAU,MAAV,EAAgB,GAAG,aAAa,KAAK,cAAc;AAAA;AAAA,IACtD;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;AAMrB,IAAM,aAAa;AAQnB,IAAM,cAAoB;AAAA,EACxB,CAAC,OAAsC,iBAAiB;AACtD,UAAM,EAAE,eAAe,KAAK,wBAAwB,MAAM;AAAA,IAAC,GAAG,GAAG,WAAW,IAAI;AAChF,UAAM,UAAU,iBAAiB,YAAY,aAAa;AAC1D,UAAM,qBAAqB,sBAAsB,KAAK,UAAU;A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,WAAiB,aAAgC,IAAI;AAC3D,QAAM,SAAS,MAAM;AACnB,QAAI,CAAC,WAAY,QAAO;AACxB,QAAI,CAAC,SAAS,SAAS;AACrB,eAAS,UAAU,IAAI,OAAO,MAAM;AAAA,IACtC;AACA,WAAO,SAAS;AAAA,EAClB,GAAG;AAEH,QAAM,CAAC,eAAe,gBAAgB,IAAU;AAAA,IAA6B,MAC3E,qBAAqB,OAAO,GAAG;AAAA,EACjC;AAEA,kBAAgB,MAAM;AACpB,qBAAiB,qBAAqB,OAAO,GAAG,CAAC;AAAA,EACnD,GAAG,CAAC,OAAO,GAAG,CAAC;AAEf,kBAAgB,MAAM;AACpB,UAAM,eAAe,CAAC,WAA+B,MAAM;AACzD,uBAAiB,MAAM;AAAA,IACzB;AAEA,QAAI,CAAC,MAAO;AAEZ,UAAM,aAAa,aAAa,QAAQ;AACxC,UAAM,cAAc,aAAa,OAAO;AACxC,UAAM,iBAAiB,QAAQ,UAAU;AACzC,UAAM,iBAAiB,SAAS,WAAW;AAC3C,QAAI,gBAAgB;AAClB,YAAM,iBAAiB;AAAA,IACzB;AACA,QAAI,OAAO,gBAAgB,UAAU;AACnC,YAAM,cAAc;AAAA,IACtB;AAEA,WAAO,MAAM;AACX,YAAM,oBAAoB,QAAQ,UAAU;AAC5C,YAAM,oBAAoB,SAAS,WAAW;AAAA,IAChD;AAAA,EACF,GAAG,CAAC,OAAO,aAAa,cAAc,CAAC;AAEvC,SAAO;AACT;AAEA,IAAM,OAAO;AACb,IAAM,QAAQ;AACd,IAAM,WAAW;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/package.json b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8813a7cf9e9cb4cb7d59103a883e5993bf07edae --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-avatar@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_8c5415901ae3b2699de9d3a7d0d0d3d3/node_modules/@radix-ui/react-avatar/package.json @@ -0,0 +1,72 @@ +{ + "name": "@radix-ui/react-avatar", + "version": "1.1.10", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-callback-ref": "1.1.1", + "@radix-ui/react-use-is-hydrated": "0.1.0", + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/LICENSE b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/README.md b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f934a79a159d54908beb179aceded5aa8beffa75 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/README.md @@ -0,0 +1,3 @@ +# `react-checkbox` + +View docs [here](https://radix-ui.com/primitives/docs/components/checkbox). diff --git a/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..dbee673a65783784c2d5e6be4042ce1df92faf0b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.d.mts @@ -0,0 +1,50 @@ +import * as react_jsx_runtime from 'react/jsx-runtime'; +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import { Scope } from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type ScopedProps

= P & { + __scopeCheckbox?: Scope; +}; +declare const createCheckboxScope: _radix_ui_react_context.CreateScope; +type CheckedState = boolean | 'indeterminate'; +interface CheckboxProviderProps { + checked?: State | boolean; + defaultChecked?: State | boolean; + required?: boolean; + onCheckedChange?(checked: State | boolean): void; + name?: string; + form?: string; + disabled?: boolean; + value?: string | number | readonly string[]; + children?: React.ReactNode; +} +declare function CheckboxProvider(props: ScopedProps>): react_jsx_runtime.JSX.Element; +interface CheckboxTriggerProps extends Omit, keyof CheckboxProviderProps> { + children?: React.ReactNode; +} +declare const CheckboxTrigger: React.ForwardRefExoticComponent>; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface CheckboxProps extends Omit { + checked?: CheckedState; + defaultChecked?: CheckedState; + required?: boolean; + onCheckedChange?(checked: CheckedState): void; +} +declare const Checkbox: React.ForwardRefExoticComponent>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface CheckboxIndicatorProps extends PrimitiveSpanProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const CheckboxIndicator: React.ForwardRefExoticComponent>; +type InputProps = React.ComponentPropsWithoutRef; +interface CheckboxBubbleInputProps extends Omit { +} +declare const CheckboxBubbleInput: React.ForwardRefExoticComponent>; + +export { Checkbox, CheckboxIndicator, type CheckboxIndicatorProps, type CheckboxProps, type CheckedState, CheckboxIndicator as Indicator, Checkbox as Root, createCheckboxScope, CheckboxBubbleInput as unstable_BubbleInput, CheckboxBubbleInput as unstable_CheckboxBubbleInput, type CheckboxBubbleInputProps as unstable_CheckboxBubbleInputProps, CheckboxProvider as unstable_CheckboxProvider, type CheckboxProviderProps as unstable_CheckboxProviderProps, CheckboxTrigger as unstable_CheckboxTrigger, type CheckboxTriggerProps as unstable_CheckboxTriggerProps, CheckboxProvider as unstable_Provider, CheckboxTrigger as unstable_Trigger }; diff --git a/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..dbee673a65783784c2d5e6be4042ce1df92faf0b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.d.ts @@ -0,0 +1,50 @@ +import * as react_jsx_runtime from 'react/jsx-runtime'; +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import { Scope } from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type ScopedProps

= P & { + __scopeCheckbox?: Scope; +}; +declare const createCheckboxScope: _radix_ui_react_context.CreateScope; +type CheckedState = boolean | 'indeterminate'; +interface CheckboxProviderProps { + checked?: State | boolean; + defaultChecked?: State | boolean; + required?: boolean; + onCheckedChange?(checked: State | boolean): void; + name?: string; + form?: string; + disabled?: boolean; + value?: string | number | readonly string[]; + children?: React.ReactNode; +} +declare function CheckboxProvider(props: ScopedProps>): react_jsx_runtime.JSX.Element; +interface CheckboxTriggerProps extends Omit, keyof CheckboxProviderProps> { + children?: React.ReactNode; +} +declare const CheckboxTrigger: React.ForwardRefExoticComponent>; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface CheckboxProps extends Omit { + checked?: CheckedState; + defaultChecked?: CheckedState; + required?: boolean; + onCheckedChange?(checked: CheckedState): void; +} +declare const Checkbox: React.ForwardRefExoticComponent>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface CheckboxIndicatorProps extends PrimitiveSpanProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const CheckboxIndicator: React.ForwardRefExoticComponent>; +type InputProps = React.ComponentPropsWithoutRef; +interface CheckboxBubbleInputProps extends Omit { +} +declare const CheckboxBubbleInput: React.ForwardRefExoticComponent>; + +export { Checkbox, CheckboxIndicator, type CheckboxIndicatorProps, type CheckboxProps, type CheckedState, CheckboxIndicator as Indicator, Checkbox as Root, createCheckboxScope, CheckboxBubbleInput as unstable_BubbleInput, CheckboxBubbleInput as unstable_CheckboxBubbleInput, type CheckboxBubbleInputProps as unstable_CheckboxBubbleInputProps, CheckboxProvider as unstable_CheckboxProvider, type CheckboxProviderProps as unstable_CheckboxProviderProps, CheckboxTrigger as unstable_CheckboxTrigger, type CheckboxTriggerProps as unstable_CheckboxTriggerProps, CheckboxProvider as unstable_Provider, CheckboxTrigger as unstable_Trigger }; diff --git a/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.js b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..6fb1a27897e543acf531704205f561f98eba0229 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.js @@ -0,0 +1,316 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Checkbox: () => Checkbox, + CheckboxIndicator: () => CheckboxIndicator, + Indicator: () => CheckboxIndicator, + Root: () => Checkbox, + createCheckboxScope: () => createCheckboxScope, + unstable_BubbleInput: () => CheckboxBubbleInput, + unstable_CheckboxBubbleInput: () => CheckboxBubbleInput, + unstable_CheckboxProvider: () => CheckboxProvider, + unstable_CheckboxTrigger: () => CheckboxTrigger, + unstable_Provider: () => CheckboxProvider, + unstable_Trigger: () => CheckboxTrigger +}); +module.exports = __toCommonJS(index_exports); + +// src/checkbox.tsx +var React = __toESM(require("react")); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_primitive = require("@radix-ui/primitive"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_use_previous = require("@radix-ui/react-use-previous"); +var import_react_use_size = require("@radix-ui/react-use-size"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_jsx_runtime = require("react/jsx-runtime"); +var CHECKBOX_NAME = "Checkbox"; +var [createCheckboxContext, createCheckboxScope] = (0, import_react_context.createContextScope)(CHECKBOX_NAME); +var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME); +function CheckboxProvider(props) { + const { + __scopeCheckbox, + checked: checkedProp, + children, + defaultChecked, + disabled, + form, + name, + onCheckedChange, + required, + value = "on", + // @ts-expect-error + internal_do_not_use_render + } = props; + const [checked, setChecked] = (0, import_react_use_controllable_state.useControllableState)({ + prop: checkedProp, + defaultProp: defaultChecked ?? false, + onChange: onCheckedChange, + caller: CHECKBOX_NAME + }); + const [control, setControl] = React.useState(null); + const [bubbleInput, setBubbleInput] = React.useState(null); + const hasConsumerStoppedPropagationRef = React.useRef(false); + const isFormControl = control ? !!form || !!control.closest("form") : ( + // We set this to true by default so that events bubble to forms without JS (SSR) + true + ); + const context = { + checked, + disabled, + setChecked, + control, + setControl, + name, + form, + value, + hasConsumerStoppedPropagationRef, + required, + defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked, + isFormControl, + bubbleInput, + setBubbleInput + }; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + CheckboxProviderImpl, + { + scope: __scopeCheckbox, + ...context, + children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children + } + ); +} +var TRIGGER_NAME = "CheckboxTrigger"; +var CheckboxTrigger = React.forwardRef( + ({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => { + const { + control, + value, + disabled, + checked, + required, + setControl, + setChecked, + hasConsumerStoppedPropagationRef, + isFormControl, + bubbleInput + } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, setControl); + const initialCheckedStateRef = React.useRef(checked); + React.useEffect(() => { + const form = control?.form; + if (form) { + const reset = () => setChecked(initialCheckedStateRef.current); + form.addEventListener("reset", reset); + return () => form.removeEventListener("reset", reset); + } + }, [control, setChecked]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + role: "checkbox", + "aria-checked": isIndeterminate(checked) ? "mixed" : checked, + "aria-required": required, + "data-state": getState(checked), + "data-disabled": disabled ? "" : void 0, + disabled, + value, + ...checkboxProps, + ref: composedRefs, + onKeyDown: (0, import_primitive.composeEventHandlers)(onKeyDown, (event) => { + if (event.key === "Enter") event.preventDefault(); + }), + onClick: (0, import_primitive.composeEventHandlers)(onClick, (event) => { + setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked); + if (bubbleInput && isFormControl) { + hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(); + if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation(); + } + }) + } + ); + } +); +CheckboxTrigger.displayName = TRIGGER_NAME; +var Checkbox = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeCheckbox, + name, + checked, + defaultChecked, + required, + disabled, + value, + onCheckedChange, + form, + ...checkboxProps + } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + CheckboxProvider, + { + __scopeCheckbox, + checked, + defaultChecked, + disabled, + required, + onCheckedChange, + name, + form, + value, + internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + CheckboxTrigger, + { + ...checkboxProps, + ref: forwardedRef, + __scopeCheckbox + } + ), + isFormControl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + CheckboxBubbleInput, + { + __scopeCheckbox + } + ) + ] }) + } + ); + } +); +Checkbox.displayName = CHECKBOX_NAME; +var INDICATOR_NAME = "CheckboxIndicator"; +var CheckboxIndicator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeCheckbox, forceMount, ...indicatorProps } = props; + const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_presence.Presence, + { + present: forceMount || isIndeterminate(context.checked) || context.checked === true, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.span, + { + "data-state": getState(context.checked), + "data-disabled": context.disabled ? "" : void 0, + ...indicatorProps, + ref: forwardedRef, + style: { pointerEvents: "none", ...props.style } + } + ) + } + ); + } +); +CheckboxIndicator.displayName = INDICATOR_NAME; +var BUBBLE_INPUT_NAME = "CheckboxBubbleInput"; +var CheckboxBubbleInput = React.forwardRef( + ({ __scopeCheckbox, ...props }, forwardedRef) => { + const { + control, + hasConsumerStoppedPropagationRef, + checked, + defaultChecked, + required, + disabled, + name, + value, + form, + bubbleInput, + setBubbleInput + } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, setBubbleInput); + const prevChecked = (0, import_react_use_previous.usePrevious)(checked); + const controlSize = (0, import_react_use_size.useSize)(control); + React.useEffect(() => { + const input = bubbleInput; + if (!input) return; + const inputProto = window.HTMLInputElement.prototype; + const descriptor = Object.getOwnPropertyDescriptor( + inputProto, + "checked" + ); + const setChecked = descriptor.set; + const bubbles = !hasConsumerStoppedPropagationRef.current; + if (prevChecked !== checked && setChecked) { + const event = new Event("click", { bubbles }); + input.indeterminate = isIndeterminate(checked); + setChecked.call(input, isIndeterminate(checked) ? false : checked); + input.dispatchEvent(event); + } + }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]); + const defaultCheckedRef = React.useRef(isIndeterminate(checked) ? false : checked); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.input, + { + type: "checkbox", + "aria-hidden": true, + defaultChecked: defaultChecked ?? defaultCheckedRef.current, + required, + disabled, + name, + value, + form, + ...props, + tabIndex: -1, + ref: composedRefs, + style: { + ...props.style, + ...controlSize, + position: "absolute", + pointerEvents: "none", + opacity: 0, + margin: 0, + // We transform because the input is absolutely positioned but we have + // rendered it **after** the button. This pulls it back to sit on top + // of the button. + transform: "translateX(-100%)" + } + } + ); + } +); +CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME; +function isFunction(value) { + return typeof value === "function"; +} +function isIndeterminate(checked) { + return checked === "indeterminate"; +} +function getState(checked) { + return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked"; +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8326e29caaf9a5cab4af2a11fed544ea77926117 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/checkbox.tsx"], + "sourcesContent": ["'use client';\nexport {\n createCheckboxScope,\n //\n Checkbox,\n CheckboxProvider as unstable_CheckboxProvider,\n CheckboxTrigger as unstable_CheckboxTrigger,\n CheckboxIndicator,\n CheckboxBubbleInput as unstable_CheckboxBubbleInput,\n //\n Root,\n Provider as unstable_Provider,\n Trigger as unstable_Trigger,\n Indicator,\n BubbleInput as unstable_BubbleInput,\n} from './checkbox';\nexport type {\n CheckboxProps,\n CheckboxProviderProps as unstable_CheckboxProviderProps,\n CheckboxTriggerProps as unstable_CheckboxTriggerProps,\n CheckboxIndicatorProps,\n CheckboxBubbleInputProps as unstable_CheckboxBubbleInputProps,\n CheckedState,\n} from './checkbox';\n", "import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type { Scope } from '@radix-ui/react-context';\n\nconst CHECKBOX_NAME = 'Checkbox';\n\ntype ScopedProps

= P & { __scopeCheckbox?: Scope };\nconst [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);\n\ntype CheckedState = boolean | 'indeterminate';\n\ntype CheckboxContextValue = {\n checked: State | boolean;\n setChecked: React.Dispatch>;\n disabled: boolean | undefined;\n control: HTMLButtonElement | null;\n setControl: React.Dispatch>;\n name: string | undefined;\n form: string | undefined;\n value: string | number | readonly string[];\n hasConsumerStoppedPropagationRef: React.RefObject;\n required: boolean | undefined;\n defaultChecked: boolean | undefined;\n isFormControl: boolean;\n bubbleInput: HTMLInputElement | null;\n setBubbleInput: React.Dispatch>;\n};\n\nconst [CheckboxProviderImpl, useCheckboxContext] =\n createCheckboxContext(CHECKBOX_NAME);\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxProvider\n * -----------------------------------------------------------------------------------------------*/\n\ninterface CheckboxProviderProps {\n checked?: State | boolean;\n defaultChecked?: State | boolean;\n required?: boolean;\n onCheckedChange?(checked: State | boolean): void;\n name?: string;\n form?: string;\n disabled?: boolean;\n value?: string | number | readonly string[];\n children?: React.ReactNode;\n}\n\nfunction CheckboxProvider(\n props: ScopedProps>\n) {\n const {\n __scopeCheckbox,\n checked: checkedProp,\n children,\n defaultChecked,\n disabled,\n form,\n name,\n onCheckedChange,\n required,\n value = 'on',\n // @ts-expect-error\n internal_do_not_use_render,\n } = props;\n\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: CHECKBOX_NAME,\n });\n const [control, setControl] = React.useState(null);\n const [bubbleInput, setBubbleInput] = React.useState(null);\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = control\n ? !!form || !!control.closest('form')\n : // We set this to true by default so that events bubble to forms without JS (SSR)\n true;\n\n const context: CheckboxContextValue = {\n checked: checked,\n disabled: disabled,\n setChecked: setChecked,\n control: control,\n setControl: setControl,\n name: name,\n form: form,\n value: value,\n hasConsumerStoppedPropagationRef: hasConsumerStoppedPropagationRef,\n required: required,\n defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,\n isFormControl: isFormControl,\n bubbleInput,\n setBubbleInput,\n };\n\n return (\n )}\n >\n {isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children}\n \n );\n}\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'CheckboxTrigger';\n\ninterface CheckboxTriggerProps\n extends Omit<\n React.ComponentPropsWithoutRef,\n keyof CheckboxProviderProps\n > {\n children?: React.ReactNode;\n}\n\nconst CheckboxTrigger = React.forwardRef(\n (\n { __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }: ScopedProps,\n forwardedRef\n ) => {\n const {\n control,\n value,\n disabled,\n checked,\n required,\n setControl,\n setChecked,\n hasConsumerStoppedPropagationRef,\n isFormControl,\n bubbleInput,\n } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);\n const composedRefs = useComposedRefs(forwardedRef, setControl);\n\n const initialCheckedStateRef = React.useRef(checked);\n React.useEffect(() => {\n const form = control?.form;\n if (form) {\n const reset = () => setChecked(initialCheckedStateRef.current);\n form.addEventListener('reset', reset);\n return () => form.removeEventListener('reset', reset);\n }\n }, [control, setChecked]);\n\n return (\n {\n // According to WAI ARIA, Checkboxes don't activate on enter keypress\n if (event.key === 'Enter') event.preventDefault();\n })}\n onClick={composeEventHandlers(onClick, (event) => {\n setChecked((prevChecked) => (isIndeterminate(prevChecked) ? true : !prevChecked));\n if (bubbleInput && isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n // if checkbox has a bubble input and is a form control, stop\n // propagation from the button so that we only propagate one click\n // event (from the input). We propagate changes from an input so\n // that native form validation works and form events reflect\n // checkbox updates.\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })}\n />\n );\n }\n);\n\nCheckboxTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Checkbox\n * -----------------------------------------------------------------------------------------------*/\n\ntype CheckboxElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface CheckboxProps extends Omit {\n checked?: CheckedState;\n defaultChecked?: CheckedState;\n required?: boolean;\n onCheckedChange?(checked: CheckedState): void;\n}\n\nconst Checkbox = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeCheckbox,\n name,\n checked,\n defaultChecked,\n required,\n disabled,\n value,\n onCheckedChange,\n form,\n ...checkboxProps\n } = props;\n\n return (\n (\n <>\n \n {isFormControl && (\n \n )}\n \n )}\n />\n );\n }\n);\n\nCheckbox.displayName = CHECKBOX_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'CheckboxIndicator';\n\ntype CheckboxIndicatorElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface CheckboxIndicatorProps extends PrimitiveSpanProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst CheckboxIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeCheckbox, forceMount, ...indicatorProps } = props;\n const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);\n return (\n \n \n \n );\n }\n);\n\nCheckboxIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxBubbleInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUBBLE_INPUT_NAME = 'CheckboxBubbleInput';\n\ntype InputProps = React.ComponentPropsWithoutRef;\ninterface CheckboxBubbleInputProps extends Omit {}\n\nconst CheckboxBubbleInput = React.forwardRef(\n ({ __scopeCheckbox, ...props }: ScopedProps, forwardedRef) => {\n const {\n control,\n hasConsumerStoppedPropagationRef,\n checked,\n defaultChecked,\n required,\n disabled,\n name,\n value,\n form,\n bubbleInput,\n setBubbleInput,\n } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);\n\n const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n\n // Bubble checked change to parents (e.g form change event)\n React.useEffect(() => {\n const input = bubbleInput;\n if (!input) return;\n\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n 'checked'\n ) as PropertyDescriptor;\n const setChecked = descriptor.set;\n\n const bubbles = !hasConsumerStoppedPropagationRef.current;\n if (prevChecked !== checked && setChecked) {\n const event = new Event('click', { bubbles });\n input.indeterminate = isIndeterminate(checked);\n setChecked.call(input, isIndeterminate(checked) ? false : checked);\n input.dispatchEvent(event);\n }\n }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);\n\n const defaultCheckedRef = React.useRef(isIndeterminate(checked) ? false : checked);\n return (\n \n );\n }\n);\n\nCheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction isFunction(value: unknown): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n\nfunction isIndeterminate(checked?: CheckedState): checked is 'indeterminate' {\n return checked === 'indeterminate';\n}\n\nfunction getState(checked: CheckedState) {\n return isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';\n}\n\nexport {\n createCheckboxScope,\n //\n Checkbox,\n CheckboxProvider,\n CheckboxTrigger,\n CheckboxIndicator,\n CheckboxBubbleInput,\n //\n Checkbox as Root,\n CheckboxProvider as Provider,\n CheckboxTrigger as Trigger,\n CheckboxIndicator as Indicator,\n CheckboxBubbleInput as BubbleInput,\n};\nexport type {\n CheckboxProps,\n CheckboxProviderProps,\n CheckboxTriggerProps,\n CheckboxIndicatorProps,\n CheckboxBubbleInputProps,\n CheckedState,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,gCAAgC;AAChC,2BAAmC;AACnC,uBAAqC;AACrC,0CAAqC;AACrC,gCAA4B;AAC5B,4BAAwB;AACxB,4BAAyB;AACzB,6BAA0B;AAiGtB;AA7FJ,IAAM,gBAAgB;AAGtB,IAAM,CAAC,uBAAuB,mBAAmB,QAAI,yCAAmB,aAAa;AAqBrF,IAAM,CAAC,sBAAsB,kBAAkB,IAC7C,sBAA4C,aAAa;AAkB3D,SAAS,iBACP,OACA;AACA,QAAM;AAAA,IACJ;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA;AAAA,IAER;AAAA,EACF,IAAI;AAEJ,QAAM,CAAC,SAAS,UAAU,QAAI,0DAAqB;AAAA,IACjD,MAAM;AAAA,IACN,aAAa,kBAAkB;AAAA,IAC/B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV,CAAC;AACD,QAAM,CAAC,SAAS,UAAU,IAAU,eAAmC,IAAI;AAC3E,QAAM,CAAC,aAAa,cAAc,IAAU,eAAkC,IAAI;AAClF,QAAM,mCAAyC,aAAO,KAAK;AAC3D,QAAM,gBAAgB,UAClB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,QAAQ,MAAM;AAAA;AAAA,IAElC;AAAA;AAEJ,QAAM,UAAuC;AAAA,IAC3C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,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A;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACC,GAAG;AAAA,QACJ,UAAU;AAAA,QACV,KAAK;AAAA,QACL,OAAO;AAAA,UACL,GAAG,MAAM;AAAA,UACT,GAAG;AAAA,UACH,UAAU;AAAA,UACV,eAAe;AAAA,UACf,SAAS;AAAA,UACT,QAAQ;AAAA;AAAA;AAAA;AAAA,UAIR,WAAW;AAAA,QACb;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,oBAAoB,cAAc;AAIlC,SAAS,WAAW,OAAkD;AACpE,SAAO,OAAO,UAAU;AAC1B;AAEA,SAAS,gBAAgB,SAAoD;AAC3E,SAAO,YAAY;AACrB;AAEA,SAAS,SAAS,SAAuB;AACvC,SAAO,gBAAgB,OAAO,IAAI,kBAAkB,UAAU,YAAY;AAC5E;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3f718f60b0032a25ad9386082aab9329bd6f5c7a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.mjs @@ -0,0 +1,284 @@ +"use client"; + +// src/checkbox.tsx +import * as React from "react"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { createContextScope } from "@radix-ui/react-context"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { usePrevious } from "@radix-ui/react-use-previous"; +import { useSize } from "@radix-ui/react-use-size"; +import { Presence } from "@radix-ui/react-presence"; +import { Primitive } from "@radix-ui/react-primitive"; +import { Fragment, jsx, jsxs } from "react/jsx-runtime"; +var CHECKBOX_NAME = "Checkbox"; +var [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME); +var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME); +function CheckboxProvider(props) { + const { + __scopeCheckbox, + checked: checkedProp, + children, + defaultChecked, + disabled, + form, + name, + onCheckedChange, + required, + value = "on", + // @ts-expect-error + internal_do_not_use_render + } = props; + const [checked, setChecked] = useControllableState({ + prop: checkedProp, + defaultProp: defaultChecked ?? false, + onChange: onCheckedChange, + caller: CHECKBOX_NAME + }); + const [control, setControl] = React.useState(null); + const [bubbleInput, setBubbleInput] = React.useState(null); + const hasConsumerStoppedPropagationRef = React.useRef(false); + const isFormControl = control ? !!form || !!control.closest("form") : ( + // We set this to true by default so that events bubble to forms without JS (SSR) + true + ); + const context = { + checked, + disabled, + setChecked, + control, + setControl, + name, + form, + value, + hasConsumerStoppedPropagationRef, + required, + defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked, + isFormControl, + bubbleInput, + setBubbleInput + }; + return /* @__PURE__ */ jsx( + CheckboxProviderImpl, + { + scope: __scopeCheckbox, + ...context, + children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children + } + ); +} +var TRIGGER_NAME = "CheckboxTrigger"; +var CheckboxTrigger = React.forwardRef( + ({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => { + const { + control, + value, + disabled, + checked, + required, + setControl, + setChecked, + hasConsumerStoppedPropagationRef, + isFormControl, + bubbleInput + } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox); + const composedRefs = useComposedRefs(forwardedRef, setControl); + const initialCheckedStateRef = React.useRef(checked); + React.useEffect(() => { + const form = control?.form; + if (form) { + const reset = () => setChecked(initialCheckedStateRef.current); + form.addEventListener("reset", reset); + return () => form.removeEventListener("reset", reset); + } + }, [control, setChecked]); + return /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + role: "checkbox", + "aria-checked": isIndeterminate(checked) ? "mixed" : checked, + "aria-required": required, + "data-state": getState(checked), + "data-disabled": disabled ? "" : void 0, + disabled, + value, + ...checkboxProps, + ref: composedRefs, + onKeyDown: composeEventHandlers(onKeyDown, (event) => { + if (event.key === "Enter") event.preventDefault(); + }), + onClick: composeEventHandlers(onClick, (event) => { + setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked); + if (bubbleInput && isFormControl) { + hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(); + if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation(); + } + }) + } + ); + } +); +CheckboxTrigger.displayName = TRIGGER_NAME; +var Checkbox = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeCheckbox, + name, + checked, + defaultChecked, + required, + disabled, + value, + onCheckedChange, + form, + ...checkboxProps + } = props; + return /* @__PURE__ */ jsx( + CheckboxProvider, + { + __scopeCheckbox, + checked, + defaultChecked, + disabled, + required, + onCheckedChange, + name, + form, + value, + internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs(Fragment, { children: [ + /* @__PURE__ */ jsx( + CheckboxTrigger, + { + ...checkboxProps, + ref: forwardedRef, + __scopeCheckbox + } + ), + isFormControl && /* @__PURE__ */ jsx( + CheckboxBubbleInput, + { + __scopeCheckbox + } + ) + ] }) + } + ); + } +); +Checkbox.displayName = CHECKBOX_NAME; +var INDICATOR_NAME = "CheckboxIndicator"; +var CheckboxIndicator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeCheckbox, forceMount, ...indicatorProps } = props; + const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox); + return /* @__PURE__ */ jsx( + Presence, + { + present: forceMount || isIndeterminate(context.checked) || context.checked === true, + children: /* @__PURE__ */ jsx( + Primitive.span, + { + "data-state": getState(context.checked), + "data-disabled": context.disabled ? "" : void 0, + ...indicatorProps, + ref: forwardedRef, + style: { pointerEvents: "none", ...props.style } + } + ) + } + ); + } +); +CheckboxIndicator.displayName = INDICATOR_NAME; +var BUBBLE_INPUT_NAME = "CheckboxBubbleInput"; +var CheckboxBubbleInput = React.forwardRef( + ({ __scopeCheckbox, ...props }, forwardedRef) => { + const { + control, + hasConsumerStoppedPropagationRef, + checked, + defaultChecked, + required, + disabled, + name, + value, + form, + bubbleInput, + setBubbleInput + } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox); + const composedRefs = useComposedRefs(forwardedRef, setBubbleInput); + const prevChecked = usePrevious(checked); + const controlSize = useSize(control); + React.useEffect(() => { + const input = bubbleInput; + if (!input) return; + const inputProto = window.HTMLInputElement.prototype; + const descriptor = Object.getOwnPropertyDescriptor( + inputProto, + "checked" + ); + const setChecked = descriptor.set; + const bubbles = !hasConsumerStoppedPropagationRef.current; + if (prevChecked !== checked && setChecked) { + const event = new Event("click", { bubbles }); + input.indeterminate = isIndeterminate(checked); + setChecked.call(input, isIndeterminate(checked) ? false : checked); + input.dispatchEvent(event); + } + }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]); + const defaultCheckedRef = React.useRef(isIndeterminate(checked) ? false : checked); + return /* @__PURE__ */ jsx( + Primitive.input, + { + type: "checkbox", + "aria-hidden": true, + defaultChecked: defaultChecked ?? defaultCheckedRef.current, + required, + disabled, + name, + value, + form, + ...props, + tabIndex: -1, + ref: composedRefs, + style: { + ...props.style, + ...controlSize, + position: "absolute", + pointerEvents: "none", + opacity: 0, + margin: 0, + // We transform because the input is absolutely positioned but we have + // rendered it **after** the button. This pulls it back to sit on top + // of the button. + transform: "translateX(-100%)" + } + } + ); + } +); +CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME; +function isFunction(value) { + return typeof value === "function"; +} +function isIndeterminate(checked) { + return checked === "indeterminate"; +} +function getState(checked) { + return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked"; +} +export { + Checkbox, + CheckboxIndicator, + CheckboxIndicator as Indicator, + Checkbox as Root, + createCheckboxScope, + CheckboxBubbleInput as unstable_BubbleInput, + CheckboxBubbleInput as unstable_CheckboxBubbleInput, + CheckboxProvider as unstable_CheckboxProvider, + CheckboxTrigger as unstable_CheckboxTrigger, + CheckboxProvider as unstable_Provider, + CheckboxTrigger as unstable_Trigger +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..9c541d7027615fe6226c12896fdb4a6059f9610e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/checkbox.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type { Scope } from '@radix-ui/react-context';\n\nconst CHECKBOX_NAME = 'Checkbox';\n\ntype ScopedProps

= P & { __scopeCheckbox?: Scope };\nconst [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);\n\ntype CheckedState = boolean | 'indeterminate';\n\ntype CheckboxContextValue = {\n checked: State | boolean;\n setChecked: React.Dispatch>;\n disabled: boolean | undefined;\n control: HTMLButtonElement | null;\n setControl: React.Dispatch>;\n name: string | undefined;\n form: string | undefined;\n value: string | number | readonly string[];\n hasConsumerStoppedPropagationRef: React.RefObject;\n required: boolean | undefined;\n defaultChecked: boolean | undefined;\n isFormControl: boolean;\n bubbleInput: HTMLInputElement | null;\n setBubbleInput: React.Dispatch>;\n};\n\nconst [CheckboxProviderImpl, useCheckboxContext] =\n createCheckboxContext(CHECKBOX_NAME);\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxProvider\n * -----------------------------------------------------------------------------------------------*/\n\ninterface CheckboxProviderProps {\n checked?: State | boolean;\n defaultChecked?: State | boolean;\n required?: boolean;\n onCheckedChange?(checked: State | boolean): void;\n name?: string;\n form?: string;\n disabled?: boolean;\n value?: string | number | readonly string[];\n children?: React.ReactNode;\n}\n\nfunction CheckboxProvider(\n props: ScopedProps>\n) {\n const {\n __scopeCheckbox,\n checked: checkedProp,\n children,\n defaultChecked,\n disabled,\n form,\n name,\n onCheckedChange,\n required,\n value = 'on',\n // @ts-expect-error\n internal_do_not_use_render,\n } = props;\n\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: CHECKBOX_NAME,\n });\n const [control, setControl] = React.useState(null);\n const [bubbleInput, setBubbleInput] = React.useState(null);\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = control\n ? !!form || !!control.closest('form')\n : // We set this to true by default so that events bubble to forms without JS (SSR)\n true;\n\n const context: CheckboxContextValue = {\n checked: checked,\n disabled: disabled,\n setChecked: setChecked,\n control: control,\n setControl: setControl,\n name: name,\n form: form,\n value: value,\n hasConsumerStoppedPropagationRef: hasConsumerStoppedPropagationRef,\n required: required,\n defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,\n isFormControl: isFormControl,\n bubbleInput,\n setBubbleInput,\n };\n\n return (\n )}\n >\n {isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children}\n \n );\n}\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'CheckboxTrigger';\n\ninterface CheckboxTriggerProps\n extends Omit<\n React.ComponentPropsWithoutRef,\n keyof CheckboxProviderProps\n > {\n children?: React.ReactNode;\n}\n\nconst CheckboxTrigger = React.forwardRef(\n (\n { __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }: ScopedProps,\n forwardedRef\n ) => {\n const {\n control,\n value,\n disabled,\n checked,\n required,\n setControl,\n setChecked,\n hasConsumerStoppedPropagationRef,\n isFormControl,\n bubbleInput,\n } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);\n const composedRefs = useComposedRefs(forwardedRef, setControl);\n\n const initialCheckedStateRef = React.useRef(checked);\n React.useEffect(() => {\n const form = control?.form;\n if (form) {\n const reset = () => setChecked(initialCheckedStateRef.current);\n form.addEventListener('reset', reset);\n return () => form.removeEventListener('reset', reset);\n }\n }, [control, setChecked]);\n\n return (\n {\n // According to WAI ARIA, Checkboxes don't activate on enter keypress\n if (event.key === 'Enter') event.preventDefault();\n })}\n onClick={composeEventHandlers(onClick, (event) => {\n setChecked((prevChecked) => (isIndeterminate(prevChecked) ? true : !prevChecked));\n if (bubbleInput && isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n // if checkbox has a bubble input and is a form control, stop\n // propagation from the button so that we only propagate one click\n // event (from the input). We propagate changes from an input so\n // that native form validation works and form events reflect\n // checkbox updates.\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })}\n />\n );\n }\n);\n\nCheckboxTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Checkbox\n * -----------------------------------------------------------------------------------------------*/\n\ntype CheckboxElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface CheckboxProps extends Omit {\n checked?: CheckedState;\n defaultChecked?: CheckedState;\n required?: boolean;\n onCheckedChange?(checked: CheckedState): void;\n}\n\nconst Checkbox = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeCheckbox,\n name,\n checked,\n defaultChecked,\n required,\n disabled,\n value,\n onCheckedChange,\n form,\n ...checkboxProps\n } = props;\n\n return (\n (\n <>\n \n {isFormControl && (\n \n )}\n \n )}\n />\n );\n }\n);\n\nCheckbox.displayName = CHECKBOX_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'CheckboxIndicator';\n\ntype CheckboxIndicatorElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface CheckboxIndicatorProps extends PrimitiveSpanProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst CheckboxIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeCheckbox, forceMount, ...indicatorProps } = props;\n const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);\n return (\n \n \n \n );\n }\n);\n\nCheckboxIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxBubbleInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUBBLE_INPUT_NAME = 'CheckboxBubbleInput';\n\ntype InputProps = React.ComponentPropsWithoutRef;\ninterface CheckboxBubbleInputProps extends Omit {}\n\nconst CheckboxBubbleInput = React.forwardRef(\n ({ __scopeCheckbox, ...props }: ScopedProps, forwardedRef) => {\n const {\n control,\n hasConsumerStoppedPropagationRef,\n checked,\n defaultChecked,\n required,\n disabled,\n name,\n value,\n form,\n bubbleInput,\n setBubbleInput,\n } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);\n\n const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n\n // Bubble checked change to parents (e.g form change event)\n React.useEffect(() => {\n const input = bubbleInput;\n if (!input) return;\n\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n 'checked'\n ) as PropertyDescriptor;\n const setChecked = descriptor.set;\n\n const bubbles = !hasConsumerStoppedPropagationRef.current;\n if (prevChecked !== checked && setChecked) {\n const event = new Event('click', { bubbles });\n input.indeterminate = isIndeterminate(checked);\n setChecked.call(input, isIndeterminate(checked) ? false : checked);\n input.dispatchEvent(event);\n }\n }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);\n\n const defaultCheckedRef = React.useRef(isIndeterminate(checked) ? false : checked);\n return (\n \n );\n }\n);\n\nCheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction isFunction(value: unknown): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n\nfunction isIndeterminate(checked?: CheckedState): checked is 'indeterminate' {\n return checked === 'indeterminate';\n}\n\nfunction getState(checked: CheckedState) {\n return isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';\n}\n\nexport {\n createCheckboxScope,\n //\n Checkbox,\n CheckboxProvider,\n CheckboxTrigger,\n CheckboxIndicator,\n CheckboxBubbleInput,\n //\n Checkbox as Root,\n CheckboxProvider as Provider,\n CheckboxTrigger as Trigger,\n CheckboxIndicator as Indicator,\n CheckboxBubbleInput as BubbleInput,\n};\nexport type {\n CheckboxProps,\n CheckboxProviderProps,\n CheckboxTriggerProps,\n CheckboxIndicatorProps,\n CheckboxBubbleInputProps,\n CheckedState,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,4BAA4B;A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,EAEJ;AACF;AAEA,oBAAoB,cAAc;AAIlC,SAAS,WAAW,OAAkD;AACpE,SAAO,OAAO,UAAU;AAC1B;AAEA,SAAS,gBAAgB,SAAoD;AAC3E,SAAO,YAAY;AACrB;AAEA,SAAS,SAAS,SAAuB;AACvC,SAAO,gBAAgB,OAAO,IAAI,kBAAkB,UAAU,YAAY;AAC5E;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/package.json b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3b004d4bd29a5c0630bcabccce21ec07d7fc7834 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_e39b80c3dafb33ea8c6ec6247bbc264c/node_modules/@radix-ui/react-checkbox/package.json @@ -0,0 +1,75 @@ +{ + "name": "@radix-ui/react-checkbox", + "version": "1.3.3", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-previous": "1.1.1", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-use-size": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/LICENSE b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/README.md b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ce3d5bba01a9898b28207bdac37b6d4aee71bc83 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/README.md @@ -0,0 +1,3 @@ +# `react-collapsible` + +View docs [here](https://radix-ui.com/primitives/docs/components/collapsible). diff --git a/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..28cb0f12a349b86126fa41a64602936dfe3a66c1 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.d.mts @@ -0,0 +1,33 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createCollapsibleScope: _radix_ui_react_context.CreateScope; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface CollapsibleProps extends PrimitiveDivProps { + defaultOpen?: boolean; + open?: boolean; + disabled?: boolean; + onOpenChange?(open: boolean): void; +} +declare const Collapsible: React.ForwardRefExoticComponent>; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface CollapsibleTriggerProps extends PrimitiveButtonProps { +} +declare const CollapsibleTrigger: React.ForwardRefExoticComponent>; +interface CollapsibleContentProps extends Omit { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const CollapsibleContent: React.ForwardRefExoticComponent>; +interface CollapsibleContentImplProps extends PrimitiveDivProps { + present: boolean; +} +declare const Root: React.ForwardRefExoticComponent>; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; + +export { Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Content, Root, Trigger, createCollapsibleScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..28cb0f12a349b86126fa41a64602936dfe3a66c1 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.d.ts @@ -0,0 +1,33 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createCollapsibleScope: _radix_ui_react_context.CreateScope; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface CollapsibleProps extends PrimitiveDivProps { + defaultOpen?: boolean; + open?: boolean; + disabled?: boolean; + onOpenChange?(open: boolean): void; +} +declare const Collapsible: React.ForwardRefExoticComponent>; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface CollapsibleTriggerProps extends PrimitiveButtonProps { +} +declare const CollapsibleTrigger: React.ForwardRefExoticComponent>; +interface CollapsibleContentProps extends Omit { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const CollapsibleContent: React.ForwardRefExoticComponent>; +interface CollapsibleContentImplProps extends PrimitiveDivProps { + present: boolean; +} +declare const Root: React.ForwardRefExoticComponent>; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; + +export { Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Content, Root, Trigger, createCollapsibleScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.js b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..310f387a3e06971aae6dff19dad265110c150298 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.js @@ -0,0 +1,187 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Collapsible: () => Collapsible, + CollapsibleContent: () => CollapsibleContent, + CollapsibleTrigger: () => CollapsibleTrigger, + Content: () => Content, + Root: () => Root, + Trigger: () => Trigger, + createCollapsibleScope: () => createCollapsibleScope +}); +module.exports = __toCommonJS(index_exports); + +// src/collapsible.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_id = require("@radix-ui/react-id"); +var import_jsx_runtime = require("react/jsx-runtime"); +var COLLAPSIBLE_NAME = "Collapsible"; +var [createCollapsibleContext, createCollapsibleScope] = (0, import_react_context.createContextScope)(COLLAPSIBLE_NAME); +var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME); +var Collapsible = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeCollapsible, + open: openProp, + defaultOpen, + disabled, + onOpenChange, + ...collapsibleProps + } = props; + const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: COLLAPSIBLE_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + CollapsibleProvider, + { + scope: __scopeCollapsible, + disabled, + contentId: (0, import_react_id.useId)(), + open, + onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "data-state": getState(open), + "data-disabled": disabled ? "" : void 0, + ...collapsibleProps, + ref: forwardedRef + } + ) + } + ); + } +); +Collapsible.displayName = COLLAPSIBLE_NAME; +var TRIGGER_NAME = "CollapsibleTrigger"; +var CollapsibleTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeCollapsible, ...triggerProps } = props; + const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + "aria-controls": context.contentId, + "aria-expanded": context.open || false, + "data-state": getState(context.open), + "data-disabled": context.disabled ? "" : void 0, + disabled: context.disabled, + ...triggerProps, + ref: forwardedRef, + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, context.onOpenToggle) + } + ); + } +); +CollapsibleTrigger.displayName = TRIGGER_NAME; +var CONTENT_NAME = "CollapsibleContent"; +var CollapsibleContent = React.forwardRef( + (props, forwardedRef) => { + const { forceMount, ...contentProps } = props; + const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) }); + } +); +CollapsibleContent.displayName = CONTENT_NAME; +var CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => { + const { __scopeCollapsible, present, children, ...contentProps } = props; + const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible); + const [isPresent, setIsPresent] = React.useState(present); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + const heightRef = React.useRef(0); + const height = heightRef.current; + const widthRef = React.useRef(0); + const width = widthRef.current; + const isOpen = context.open || isPresent; + const isMountAnimationPreventedRef = React.useRef(isOpen); + const originalStylesRef = React.useRef(void 0); + React.useEffect(() => { + const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false); + return () => cancelAnimationFrame(rAF); + }, []); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + const node = ref.current; + if (node) { + originalStylesRef.current = originalStylesRef.current || { + transitionDuration: node.style.transitionDuration, + animationName: node.style.animationName + }; + node.style.transitionDuration = "0s"; + node.style.animationName = "none"; + const rect = node.getBoundingClientRect(); + heightRef.current = rect.height; + widthRef.current = rect.width; + if (!isMountAnimationPreventedRef.current) { + node.style.transitionDuration = originalStylesRef.current.transitionDuration; + node.style.animationName = originalStylesRef.current.animationName; + } + setIsPresent(present); + } + }, [context.open, present]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "data-state": getState(context.open), + "data-disabled": context.disabled ? "" : void 0, + id: context.contentId, + hidden: !isOpen, + ...contentProps, + ref: composedRefs, + style: { + [`--radix-collapsible-content-height`]: height ? `${height}px` : void 0, + [`--radix-collapsible-content-width`]: width ? `${width}px` : void 0, + ...props.style + }, + children: isOpen && children + } + ); +}); +function getState(open) { + return open ? "open" : "closed"; +} +var Root = Collapsible; +var Trigger = CollapsibleTrigger; +var Content = CollapsibleContent; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d14b2188b80be126313ca385bc8f5178de498b9c --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_d124cdc03a85cc0c20ea46a7e96f6c93/node_modules/@radix-ui/react-collapsible/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/collapsible.tsx"], + "sourcesContent": ["'use client';\nexport {\n createCollapsibleScope,\n //\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n //\n Root,\n Trigger,\n Content,\n} from './collapsible';\nexport type {\n CollapsibleProps,\n CollapsibleTriggerProps,\n CollapsibleContentProps,\n} from './collapsible';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Presence } from '@radix-ui/react-presence';\nimport { useId } from '@radix-ui/react-id';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Collapsible\n * -----------------------------------------------------------------------------------------------*/\n\nconst COLLAPSIBLE_NAME = 'Collapsible';\n\ntype ScopedProps

= P & { __scopeCollapsible?: Scope };\nconst [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);\n\ntype CollapsibleContextValue = {\n contentId: string;\n disabled?: boolean;\n open: boolean;\n onOpenToggle(): void;\n};\n\nconst [CollapsibleProvider, useCollapsibleContext] =\n createCollapsibleContext(COLLAPSIBLE_NAME);\n\ntype CollapsibleElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface CollapsibleProps extends PrimitiveDivProps {\n defaultOpen?: boolean;\n open?: boolean;\n disabled?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst Collapsible = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeCollapsible,\n open: openProp,\n defaultOpen,\n disabled,\n onOpenChange,\n ...collapsibleProps\n } = props;\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: COLLAPSIBLE_NAME,\n });\n\n return (\n setOpen((prevOpen) => !prevOpen), [setOpen])}\n >\n \n \n );\n }\n);\n\nCollapsible.displayName = COLLAPSIBLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'CollapsibleTrigger';\n\ntype CollapsibleTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface CollapsibleTriggerProps extends PrimitiveButtonProps {}\n\nconst CollapsibleTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeCollapsible, ...triggerProps } = props;\n const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);\n return (\n \n );\n }\n);\n\nCollapsibleTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'CollapsibleContent';\n\ntype CollapsibleContentElement = CollapsibleContentImplElement;\ninterface CollapsibleContentProps extends Omit {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst CollapsibleContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);\n return (\n \n {({ present }) => (\n \n )}\n \n );\n }\n);\n\nCollapsibleContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype CollapsibleContentImplElement = React.ComponentRef;\ninterface CollapsibleContentImplProps extends PrimitiveDivProps {\n present: boolean;\n}\n\nconst CollapsibleContentImpl = React.forwardRef<\n CollapsibleContentImplElement,\n CollapsibleContentImplProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeCollapsible, present, children, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);\n const [isPresent, setIsPresent] = React.useState(present);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const heightRef = React.useRef(0);\n const height = heightRef.current;\n const widthRef = React.useRef(0);\n const width = widthRef.current;\n // when opening we want it to immediately open to retrieve dimensions\n // when closing we delay `present` to retrieve dimensions before closing\n const isOpen = context.open || isPresent;\n const isMountAnimationPreventedRef = React.useRef(isOpen);\n const originalStylesRef = React.useRef>(undefined);\n\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => (isMountAnimationPreventedRef.current = false));\n return () => cancelAnimationFrame(rAF);\n }, []);\n\n useLayoutEffect(() => {\n const node = ref.current;\n if (node) {\n originalStylesRef.current = originalStylesRef.current || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName,\n };\n // block any animations/transitions so the element renders at its full dimensions\n node.style.transitionDuration = '0s';\n node.style.animationName = 'none';\n\n // get width and height from full dimensions\n const rect = node.getBoundingClientRect();\n heightRef.current = rect.height;\n widthRef.current = rect.width;\n\n // kick off any animations/transitions that were originally set up if it isn't the initial mount\n if (!isMountAnimationPreventedRef.current) {\n node.style.transitionDuration = originalStylesRef.current.transitionDuration!;\n node.style.animationName = originalStylesRef.current.animationName!;\n }\n\n setIsPresent(present);\n }\n /**\n * depends on `context.open` because it will change to `false`\n * when a close is triggered but `present` will be `false` on\n * animation end (so when close finishes). This allows us to\n * retrieve the dimensions *before* closing.\n */\n }, [context.open, present]);\n\n return (\n

= P & { __scopeCollapsible?: Scope };\nconst [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);\n\ntype CollapsibleContextValue = {\n contentId: string;\n disabled?: boolean;\n open: boolean;\n onOpenToggle(): void;\n};\n\nconst [CollapsibleProvider, useCollapsibleContext] =\n createCollapsibleContext(COLLAPSIBLE_NAME);\n\ntype CollapsibleElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface CollapsibleProps extends PrimitiveDivProps {\n defaultOpen?: boolean;\n open?: boolean;\n disabled?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst Collapsible = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeCollapsible,\n open: openProp,\n defaultOpen,\n disabled,\n onOpenChange,\n ...collapsibleProps\n } = props;\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: COLLAPSIBLE_NAME,\n });\n\n return (\n setOpen((prevOpen) => !prevOpen), [setOpen])}\n >\n \n \n );\n }\n);\n\nCollapsible.displayName = COLLAPSIBLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'CollapsibleTrigger';\n\ntype CollapsibleTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface CollapsibleTriggerProps extends PrimitiveButtonProps {}\n\nconst CollapsibleTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeCollapsible, ...triggerProps } = props;\n const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);\n return (\n \n );\n }\n);\n\nCollapsibleTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'CollapsibleContent';\n\ntype CollapsibleContentElement = CollapsibleContentImplElement;\ninterface CollapsibleContentProps extends Omit {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst CollapsibleContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);\n return (\n \n {({ present }) => (\n \n )}\n \n );\n }\n);\n\nCollapsibleContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype CollapsibleContentImplElement = React.ComponentRef;\ninterface CollapsibleContentImplProps extends PrimitiveDivProps {\n present: boolean;\n}\n\nconst CollapsibleContentImpl = React.forwardRef<\n CollapsibleContentImplElement,\n CollapsibleContentImplProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeCollapsible, present, children, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);\n const [isPresent, setIsPresent] = React.useState(present);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const heightRef = React.useRef(0);\n const height = heightRef.current;\n const widthRef = React.useRef(0);\n const width = widthRef.current;\n // when opening we want it to immediately open to retrieve dimensions\n // when closing we delay `present` to retrieve dimensions before closing\n const isOpen = context.open || isPresent;\n const isMountAnimationPreventedRef = React.useRef(isOpen);\n const originalStylesRef = React.useRef>(undefined);\n\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => (isMountAnimationPreventedRef.current = false));\n return () => cancelAnimationFrame(rAF);\n }, []);\n\n useLayoutEffect(() => {\n const node = ref.current;\n if (node) {\n originalStylesRef.current = originalStylesRef.current || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName,\n };\n // block any animations/transitions so the element renders at its full dimensions\n node.style.transitionDuration = '0s';\n node.style.animationName = 'none';\n\n // get width and height from full dimensions\n const rect = node.getBoundingClientRect();\n heightRef.current = rect.height;\n widthRef.current = rect.width;\n\n // kick off any animations/transitions that were originally set up if it isn't the initial mount\n if (!isMountAnimationPreventedRef.current) {\n node.style.transitionDuration = originalStylesRef.current.transitionDuration!;\n node.style.animationName = originalStylesRef.current.animationName!;\n }\n\n setIsPresent(present);\n }\n /**\n * depends on `context.open` because it will change to `false`\n * when a close is triggered but `present` will be `false` on\n * animation end (so when close finishes). This allows us to\n * retrieve the dimensions *before* closing.\n */\n }, [context.open, present]);\n\n return (\n

= P & { __scopeContextMenu?: Scope };\nconst [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [\n createMenuScope,\n]);\nconst useMenuScope = createMenuScope();\n\ntype ContextMenuContextValue = {\n open: boolean;\n onOpenChange(open: boolean): void;\n modal: boolean;\n};\n\nconst [ContextMenuProvider, useContextMenuContext] =\n createContextMenuContext(CONTEXT_MENU_NAME);\n\ninterface ContextMenuProps {\n children?: React.ReactNode;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst ContextMenu: React.FC = (props: ScopedProps) => {\n const { __scopeContextMenu, children, onOpenChange, dir, modal = true } = props;\n const [open, setOpen] = React.useState(false);\n const menuScope = useMenuScope(__scopeContextMenu);\n const handleOpenChangeProp = useCallbackRef(onOpenChange);\n\n const handleOpenChange = React.useCallback(\n (open: boolean) => {\n setOpen(open);\n handleOpenChangeProp(open);\n },\n [handleOpenChangeProp]\n );\n\n return (\n \n \n {children}\n \n \n );\n};\n\nContextMenu.displayName = CONTEXT_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'ContextMenuTrigger';\n\ntype ContextMenuTriggerElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuTriggerProps extends PrimitiveSpanProps {\n disabled?: boolean;\n}\n\nconst ContextMenuTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, disabled = false, ...triggerProps } = props;\n const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const pointRef = React.useRef({ x: 0, y: 0 });\n const virtualRef = React.useRef({\n getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...pointRef.current }),\n });\n const longPressTimerRef = React.useRef(0);\n const clearLongPress = React.useCallback(\n () => window.clearTimeout(longPressTimerRef.current),\n []\n );\n const handleOpen = (event: React.MouseEvent | React.PointerEvent) => {\n pointRef.current = { x: event.clientX, y: event.clientY };\n context.onOpenChange(true);\n };\n\n React.useEffect(() => clearLongPress, [clearLongPress]);\n React.useEffect(() => void (disabled && clearLongPress()), [disabled, clearLongPress]);\n\n return (\n <>\n \n {\n // clearing the long press here because some platforms already support\n // long press to trigger a `contextmenu` event\n clearLongPress();\n handleOpen(event);\n event.preventDefault();\n })\n }\n onPointerDown={\n disabled\n ? props.onPointerDown\n : composeEventHandlers(\n props.onPointerDown,\n whenTouchOrPen((event) => {\n // clear the long press here in case there's multiple touch points\n clearLongPress();\n longPressTimerRef.current = window.setTimeout(() => handleOpen(event), 700);\n })\n )\n }\n onPointerMove={\n disabled\n ? props.onPointerMove\n : composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress))\n }\n onPointerCancel={\n disabled\n ? props.onPointerCancel\n : composeEventHandlers(props.onPointerCancel, whenTouchOrPen(clearLongPress))\n }\n onPointerUp={\n disabled\n ? props.onPointerUp\n : composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress))\n }\n />\n \n );\n }\n);\n\nContextMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'ContextMenuPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuPortalProps extends MenuPortalProps {}\n\nconst ContextMenuPortal: React.FC = (\n props: ScopedProps\n) => {\n const { __scopeContextMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n};\n\nContextMenuPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'ContextMenuContent';\n\ntype ContextMenuContentElement = React.ComponentRef;\ntype MenuContentProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuContentProps\n extends Omit {}\n\nconst ContextMenuContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented && hasInteractedOutsideRef.current) {\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;\n }}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-context-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-context-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-context-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-context-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-context-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n }\n);\n\nContextMenuContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'ContextMenuGroup';\n\ntype ContextMenuGroupElement = React.ComponentRef;\ntype MenuGroupProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuGroupProps extends MenuGroupProps {}\n\nconst ContextMenuGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n }\n);\n\nContextMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'ContextMenuLabel';\n\ntype ContextMenuLabelElement = React.ComponentRef;\ntype MenuLabelProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuLabelProps extends MenuLabelProps {}\n\nconst ContextMenuLabel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n }\n);\n\nContextMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'ContextMenuItem';\n\ntype ContextMenuItemElement = React.ComponentRef;\ntype MenuItemProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuItemProps extends MenuItemProps {}\n\nconst ContextMenuItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n }\n);\n\nContextMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'ContextMenuCheckboxItem';\n\ntype ContextMenuCheckboxItemElement = React.ComponentRef;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'ContextMenuRadioGroup';\n\ntype ContextMenuRadioGroupElement = React.ComponentRef;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst ContextMenuRadioGroup = React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'ContextMenuRadioItem';\n\ntype ContextMenuRadioItemElement = React.ComponentRef;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst ContextMenuRadioItem = React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'ContextMenuItemIndicator';\n\ntype ContextMenuItemIndicatorElement = React.ComponentRef;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst ContextMenuItemIndicator = React.forwardRef<\n ContextMenuItemIndicatorElement,\n ContextMenuItemIndicatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'ContextMenuSeparator';\n\ntype ContextMenuSeparatorElement = React.ComponentRef;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst ContextMenuSeparator = React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'ContextMenuArrow';\n\ntype ContextMenuArrowElement = React.ComponentRef;\ntype MenuArrowProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuArrowProps extends MenuArrowProps {}\n\nconst ContextMenuArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n }\n);\n\nContextMenuArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'ContextMenuSub';\n\ninterface ContextMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst ContextMenuSub: React.FC = (props: ScopedProps) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: SUB_NAME,\n });\n\n return (\n \n {children}\n \n );\n};\n\nContextMenuSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'ContextMenuSubTrigger';\n\ntype ContextMenuSubTriggerElement = React.ComponentRef;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst ContextMenuSubTrigger = React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'ContextMenuSubContent';\n\ntype ContextMenuSubContentElement = React.ComponentRef;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuSubContentProps extends MenuSubContentProps {}\n\nconst ContextMenuSubContent = React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n \n );\n});\n\nContextMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction whenTouchOrPen(handler: React.PointerEventHandler): React.PointerEventHandler {\n return (event) => (event.pointerType !== 'mouse' ? handler(event) : undefined);\n}\n\nconst Root = ContextMenu;\nconst Trigger = ContextMenuTrigger;\nconst Portal = ContextMenuPortal;\nconst Content = ContextMenuContent;\nconst Group = ContextMenuGroup;\nconst Label = ContextMenuLabel;\nconst Item = ContextMenuItem;\nconst CheckboxItem = ContextMenuCheckboxItem;\nconst RadioGroup = ContextMenuRadioGroup;\nconst RadioItem = ContextMenuRadioItem;\nconst ItemIndicator = ContextMenuItemIndicator;\nconst Separator = ContextMenuSeparator;\nconst Arrow = ContextMenuArrow;\nconst Sub = ContextMenuSub;\nconst SubTrigger = ContextMenuSubTrigger;\nconst SubContent = ContextMenuSubContent;\n\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA,oBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,cAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,WAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,2BAAmC;AACnC,6BAA0B;AAC1B,oBAA+B;AAC/B,wBAAgC;AAChC,oCAA+B;AAC/B,0CAAqC;AAwD/B;AA7CN,IAAM,oBAAoB;AAG1B,IAAM,CAAC,0BAA0B,sBAAsB,QAAI,yCAAmB,mBAAmB;AAAA,EAC/F;AACF,CAAC;AACD,IAAM,mBAAe,mCAAgB;AAQrC,IAAM,CAAC,qBAAqB,qBAAqB,IAC/C,yBAAkD,iBAAiB;AASrE,IAAM,cAA0C,CAAC,UAAyC;AACxF,QAAM,EAAE,oBAAoB,UAAU,cAAc,KAAK,QAAQ,KAAK,IAAI;AAC1E,QAAM,CAAC,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BAAkB;AACjD,SAAO,4CAAe,0BAAd,EAA0B,GAAG,WAAY,GAAG,kBAAkB,KAAK,cAAc;AAC3F,CAAC;AAED,sBAAsB,cAAc;AAMpC,IAAM,mBAAmB;AAMzB,IAAM,wBAA8B,iBAGlC,CAAC,OAAgD,iBAAiB;AAClE,QAAM,EAAE,oBAAoB,GAAG,gBAAgB,IAAI;AACnD,QAAM,YAAY,aAAa,kBAAkB;AAEjD,SACE;AAAA,IAAe;AAAA,IAAd;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,OAAO;AAAA,QACL,GAAG,MAAM;AAAA;AAAA,QAET,GAAG;AAAA,UACD,iDAAiD;AAAA,UACjD,gDAAgD;AAAA,UAChD,iDAAiD;AAAA,UACjD,sCAAsC;AAAA,UACtC,uCAAuC;AAAA,QACzC;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,sBAAsB,cAAc;AAIpC,SAAS,eAAkB,SAAqE;AAC9F,SAAO,CAAC,UAAW,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI;AACtE;AAEA,IAAMC,QAAO;AACb,IAAM,UAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;AACd,IAAMC,SAAQ;AACd,IAAMC,QAAO;AACb,IAAMC,gBAAe;AACrB,IAAMC,cAAa;AACnB,IAAMC,aAAY;AAClB,IAAMC,iBAAgB;AACtB,IAAMC,aAAY;AAClB,IAAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;", + "names": ["Arrow", "CheckboxItem", "Content", "Group", "Item", "ItemIndicator", "Label", "Portal", "RadioGroup", "RadioItem", "Root", "Separator", "Sub", "SubContent", "SubTrigger", "open", "Root", "Portal", "Content", "Group", "Label", "Item", "CheckboxItem", "RadioGroup", "RadioItem", "ItemIndicator", "Separator", "Arrow", "Sub", "SubTrigger", "SubContent"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-context-menu@2.2.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types_ceed7d7b7bde7029b79a8339b0ce058b/node_modules/@radix-ui/react-context-menu/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-context-menu@2.2.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types_ceed7d7b7bde7029b79a8339b0ce058b/node_modules/@radix-ui/react-context-menu/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ed0dcedd6f8e43c3dd835d6c43456deff00b7212 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-context-menu@2.2.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types_ceed7d7b7bde7029b79a8339b0ce058b/node_modules/@radix-ui/react-context-menu/dist/index.mjs @@ -0,0 +1,325 @@ +"use client"; + +// src/context-menu.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { createContextScope } from "@radix-ui/react-context"; +import { Primitive } from "@radix-ui/react-primitive"; +import * as MenuPrimitive from "@radix-ui/react-menu"; +import { createMenuScope } from "@radix-ui/react-menu"; +import { useCallbackRef } from "@radix-ui/react-use-callback-ref"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { Fragment, jsx, jsxs } from "react/jsx-runtime"; +var CONTEXT_MENU_NAME = "ContextMenu"; +var [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [ + createMenuScope +]); +var useMenuScope = createMenuScope(); +var [ContextMenuProvider, useContextMenuContext] = createContextMenuContext(CONTEXT_MENU_NAME); +var ContextMenu = (props) => { + const { __scopeContextMenu, children, onOpenChange, dir, modal = true } = props; + const [open, setOpen] = React.useState(false); + const menuScope = useMenuScope(__scopeContextMenu); + const handleOpenChangeProp = useCallbackRef(onOpenChange); + const handleOpenChange = React.useCallback( + (open2) => { + setOpen(open2); + handleOpenChangeProp(open2); + }, + [handleOpenChangeProp] + ); + return /* @__PURE__ */ jsx( + ContextMenuProvider, + { + scope: __scopeContextMenu, + open, + onOpenChange: handleOpenChange, + modal, + children: /* @__PURE__ */ jsx( + MenuPrimitive.Root, + { + ...menuScope, + dir, + open, + onOpenChange: handleOpenChange, + modal, + children + } + ) + } + ); +}; +ContextMenu.displayName = CONTEXT_MENU_NAME; +var TRIGGER_NAME = "ContextMenuTrigger"; +var ContextMenuTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeContextMenu, disabled = false, ...triggerProps } = props; + const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu); + const menuScope = useMenuScope(__scopeContextMenu); + const pointRef = React.useRef({ x: 0, y: 0 }); + const virtualRef = React.useRef({ + getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...pointRef.current }) + }); + const longPressTimerRef = React.useRef(0); + const clearLongPress = React.useCallback( + () => window.clearTimeout(longPressTimerRef.current), + [] + ); + const handleOpen = (event) => { + pointRef.current = { x: event.clientX, y: event.clientY }; + context.onOpenChange(true); + }; + React.useEffect(() => clearLongPress, [clearLongPress]); + React.useEffect(() => void (disabled && clearLongPress()), [disabled, clearLongPress]); + return /* @__PURE__ */ jsxs(Fragment, { children: [ + /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { ...menuScope, virtualRef }), + /* @__PURE__ */ jsx( + Primitive.span, + { + "data-state": context.open ? "open" : "closed", + "data-disabled": disabled ? "" : void 0, + ...triggerProps, + ref: forwardedRef, + style: { WebkitTouchCallout: "none", ...props.style }, + onContextMenu: disabled ? props.onContextMenu : composeEventHandlers(props.onContextMenu, (event) => { + clearLongPress(); + handleOpen(event); + event.preventDefault(); + }), + onPointerDown: disabled ? props.onPointerDown : composeEventHandlers( + props.onPointerDown, + whenTouchOrPen((event) => { + clearLongPress(); + longPressTimerRef.current = window.setTimeout(() => handleOpen(event), 700); + }) + ), + onPointerMove: disabled ? props.onPointerMove : composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress)), + onPointerCancel: disabled ? props.onPointerCancel : composeEventHandlers(props.onPointerCancel, whenTouchOrPen(clearLongPress)), + onPointerUp: disabled ? props.onPointerUp : composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress)) + } + ) + ] }); + } +); +ContextMenuTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "ContextMenuPortal"; +var ContextMenuPortal = (props) => { + const { __scopeContextMenu, ...portalProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps }); +}; +ContextMenuPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "ContextMenuContent"; +var ContextMenuContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeContextMenu, ...contentProps } = props; + const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu); + const menuScope = useMenuScope(__scopeContextMenu); + const hasInteractedOutsideRef = React.useRef(false); + return /* @__PURE__ */ jsx( + MenuPrimitive.Content, + { + ...menuScope, + ...contentProps, + ref: forwardedRef, + side: "right", + sideOffset: 2, + align: "start", + onCloseAutoFocus: (event) => { + props.onCloseAutoFocus?.(event); + if (!event.defaultPrevented && hasInteractedOutsideRef.current) { + event.preventDefault(); + } + hasInteractedOutsideRef.current = false; + }, + onInteractOutside: (event) => { + props.onInteractOutside?.(event); + if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true; + }, + style: { + ...props.style, + // re-namespace exposed content custom properties + ...{ + "--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-context-menu-content-available-width": "var(--radix-popper-available-width)", + "--radix-context-menu-content-available-height": "var(--radix-popper-available-height)", + "--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); + } +); +ContextMenuContent.displayName = CONTENT_NAME; +var GROUP_NAME = "ContextMenuGroup"; +var ContextMenuGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeContextMenu, ...groupProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef }); + } +); +ContextMenuGroup.displayName = GROUP_NAME; +var LABEL_NAME = "ContextMenuLabel"; +var ContextMenuLabel = React.forwardRef( + (props, forwardedRef) => { + const { __scopeContextMenu, ...labelProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef }); + } +); +ContextMenuLabel.displayName = LABEL_NAME; +var ITEM_NAME = "ContextMenuItem"; +var ContextMenuItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeContextMenu, ...itemProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef }); + } +); +ContextMenuItem.displayName = ITEM_NAME; +var CHECKBOX_ITEM_NAME = "ContextMenuCheckboxItem"; +var ContextMenuCheckboxItem = React.forwardRef((props, forwardedRef) => { + const { __scopeContextMenu, ...checkboxItemProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef }); +}); +ContextMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME; +var RADIO_GROUP_NAME = "ContextMenuRadioGroup"; +var ContextMenuRadioGroup = React.forwardRef((props, forwardedRef) => { + const { __scopeContextMenu, ...radioGroupProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef }); +}); +ContextMenuRadioGroup.displayName = RADIO_GROUP_NAME; +var RADIO_ITEM_NAME = "ContextMenuRadioItem"; +var ContextMenuRadioItem = React.forwardRef((props, forwardedRef) => { + const { __scopeContextMenu, ...radioItemProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef }); +}); +ContextMenuRadioItem.displayName = RADIO_ITEM_NAME; +var INDICATOR_NAME = "ContextMenuItemIndicator"; +var ContextMenuItemIndicator = React.forwardRef((props, forwardedRef) => { + const { __scopeContextMenu, ...itemIndicatorProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef }); +}); +ContextMenuItemIndicator.displayName = INDICATOR_NAME; +var SEPARATOR_NAME = "ContextMenuSeparator"; +var ContextMenuSeparator = React.forwardRef((props, forwardedRef) => { + const { __scopeContextMenu, ...separatorProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef }); +}); +ContextMenuSeparator.displayName = SEPARATOR_NAME; +var ARROW_NAME = "ContextMenuArrow"; +var ContextMenuArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeContextMenu, ...arrowProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef }); + } +); +ContextMenuArrow.displayName = ARROW_NAME; +var SUB_NAME = "ContextMenuSub"; +var ContextMenuSub = (props) => { + const { __scopeContextMenu, children, onOpenChange, open: openProp, defaultOpen } = props; + const menuScope = useMenuScope(__scopeContextMenu); + const [open, setOpen] = useControllableState({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: SUB_NAME + }); + return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children }); +}; +ContextMenuSub.displayName = SUB_NAME; +var SUB_TRIGGER_NAME = "ContextMenuSubTrigger"; +var ContextMenuSubTrigger = React.forwardRef((props, forwardedRef) => { + const { __scopeContextMenu, ...triggerItemProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.SubTrigger, { ...menuScope, ...triggerItemProps, ref: forwardedRef }); +}); +ContextMenuSubTrigger.displayName = SUB_TRIGGER_NAME; +var SUB_CONTENT_NAME = "ContextMenuSubContent"; +var ContextMenuSubContent = React.forwardRef((props, forwardedRef) => { + const { __scopeContextMenu, ...subContentProps } = props; + const menuScope = useMenuScope(__scopeContextMenu); + return /* @__PURE__ */ jsx( + MenuPrimitive.SubContent, + { + ...menuScope, + ...subContentProps, + ref: forwardedRef, + style: { + ...props.style, + // re-namespace exposed content custom properties + ...{ + "--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-context-menu-content-available-width": "var(--radix-popper-available-width)", + "--radix-context-menu-content-available-height": "var(--radix-popper-available-height)", + "--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); +}); +ContextMenuSubContent.displayName = SUB_CONTENT_NAME; +function whenTouchOrPen(handler) { + return (event) => event.pointerType !== "mouse" ? handler(event) : void 0; +} +var Root2 = ContextMenu; +var Trigger = ContextMenuTrigger; +var Portal2 = ContextMenuPortal; +var Content2 = ContextMenuContent; +var Group2 = ContextMenuGroup; +var Label2 = ContextMenuLabel; +var Item2 = ContextMenuItem; +var CheckboxItem2 = ContextMenuCheckboxItem; +var RadioGroup2 = ContextMenuRadioGroup; +var RadioItem2 = ContextMenuRadioItem; +var ItemIndicator2 = ContextMenuItemIndicator; +var Separator2 = ContextMenuSeparator; +var Arrow2 = ContextMenuArrow; +var Sub2 = ContextMenuSub; +var SubTrigger2 = ContextMenuSubTrigger; +var SubContent2 = ContextMenuSubContent; +export { + Arrow2 as Arrow, + CheckboxItem2 as CheckboxItem, + Content2 as Content, + ContextMenu, + ContextMenuArrow, + ContextMenuCheckboxItem, + ContextMenuContent, + ContextMenuGroup, + ContextMenuItem, + ContextMenuItemIndicator, + ContextMenuLabel, + ContextMenuPortal, + ContextMenuRadioGroup, + ContextMenuRadioItem, + ContextMenuSeparator, + ContextMenuSub, + ContextMenuSubContent, + ContextMenuSubTrigger, + ContextMenuTrigger, + Group2 as Group, + Item2 as Item, + ItemIndicator2 as ItemIndicator, + Label2 as Label, + Portal2 as Portal, + RadioGroup2 as RadioGroup, + RadioItem2 as RadioItem, + Root2 as Root, + Separator2 as Separator, + Sub2 as Sub, + SubContent2 as SubContent, + SubTrigger2 as SubTrigger, + Trigger, + createContextMenuScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-context-menu@2.2.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types_ceed7d7b7bde7029b79a8339b0ce058b/node_modules/@radix-ui/react-context-menu/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-context-menu@2.2.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types_ceed7d7b7bde7029b79a8339b0ce058b/node_modules/@radix-ui/react-context-menu/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..e51cf43360b2c072966ffb46429f135c1ae61414 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-context-menu@2.2.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types_ceed7d7b7bde7029b79a8339b0ce058b/node_modules/@radix-ui/react-context-menu/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/context-menu.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Point = { x: number; y: number };\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTEXT_MENU_NAME = 'ContextMenu';\n\ntype ScopedProps

= P & { __scopeContextMenu?: Scope };\nconst [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [\n createMenuScope,\n]);\nconst useMenuScope = createMenuScope();\n\ntype ContextMenuContextValue = {\n open: boolean;\n onOpenChange(open: boolean): void;\n modal: boolean;\n};\n\nconst [ContextMenuProvider, useContextMenuContext] =\n createContextMenuContext(CONTEXT_MENU_NAME);\n\ninterface ContextMenuProps {\n children?: React.ReactNode;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst ContextMenu: React.FC = (props: ScopedProps) => {\n const { __scopeContextMenu, children, onOpenChange, dir, modal = true } = props;\n const [open, setOpen] = React.useState(false);\n const menuScope = useMenuScope(__scopeContextMenu);\n const handleOpenChangeProp = useCallbackRef(onOpenChange);\n\n const handleOpenChange = React.useCallback(\n (open: boolean) => {\n setOpen(open);\n handleOpenChangeProp(open);\n },\n [handleOpenChangeProp]\n );\n\n return (\n \n \n {children}\n \n \n );\n};\n\nContextMenu.displayName = CONTEXT_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'ContextMenuTrigger';\n\ntype ContextMenuTriggerElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuTriggerProps extends PrimitiveSpanProps {\n disabled?: boolean;\n}\n\nconst ContextMenuTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, disabled = false, ...triggerProps } = props;\n const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const pointRef = React.useRef({ x: 0, y: 0 });\n const virtualRef = React.useRef({\n getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...pointRef.current }),\n });\n const longPressTimerRef = React.useRef(0);\n const clearLongPress = React.useCallback(\n () => window.clearTimeout(longPressTimerRef.current),\n []\n );\n const handleOpen = (event: React.MouseEvent | React.PointerEvent) => {\n pointRef.current = { x: event.clientX, y: event.clientY };\n context.onOpenChange(true);\n };\n\n React.useEffect(() => clearLongPress, [clearLongPress]);\n React.useEffect(() => void (disabled && clearLongPress()), [disabled, clearLongPress]);\n\n return (\n <>\n \n {\n // clearing the long press here because some platforms already support\n // long press to trigger a `contextmenu` event\n clearLongPress();\n handleOpen(event);\n event.preventDefault();\n })\n }\n onPointerDown={\n disabled\n ? props.onPointerDown\n : composeEventHandlers(\n props.onPointerDown,\n whenTouchOrPen((event) => {\n // clear the long press here in case there's multiple touch points\n clearLongPress();\n longPressTimerRef.current = window.setTimeout(() => handleOpen(event), 700);\n })\n )\n }\n onPointerMove={\n disabled\n ? props.onPointerMove\n : composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress))\n }\n onPointerCancel={\n disabled\n ? props.onPointerCancel\n : composeEventHandlers(props.onPointerCancel, whenTouchOrPen(clearLongPress))\n }\n onPointerUp={\n disabled\n ? props.onPointerUp\n : composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress))\n }\n />\n \n );\n }\n);\n\nContextMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'ContextMenuPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuPortalProps extends MenuPortalProps {}\n\nconst ContextMenuPortal: React.FC = (\n props: ScopedProps\n) => {\n const { __scopeContextMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n};\n\nContextMenuPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'ContextMenuContent';\n\ntype ContextMenuContentElement = React.ComponentRef;\ntype MenuContentProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuContentProps\n extends Omit {}\n\nconst ContextMenuContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented && hasInteractedOutsideRef.current) {\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;\n }}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-context-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-context-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-context-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-context-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-context-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n }\n);\n\nContextMenuContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'ContextMenuGroup';\n\ntype ContextMenuGroupElement = React.ComponentRef;\ntype MenuGroupProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuGroupProps extends MenuGroupProps {}\n\nconst ContextMenuGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n }\n);\n\nContextMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'ContextMenuLabel';\n\ntype ContextMenuLabelElement = React.ComponentRef;\ntype MenuLabelProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuLabelProps extends MenuLabelProps {}\n\nconst ContextMenuLabel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n }\n);\n\nContextMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'ContextMenuItem';\n\ntype ContextMenuItemElement = React.ComponentRef;\ntype MenuItemProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuItemProps extends MenuItemProps {}\n\nconst ContextMenuItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n }\n);\n\nContextMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'ContextMenuCheckboxItem';\n\ntype ContextMenuCheckboxItemElement = React.ComponentRef;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'ContextMenuRadioGroup';\n\ntype ContextMenuRadioGroupElement = React.ComponentRef;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst ContextMenuRadioGroup = React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'ContextMenuRadioItem';\n\ntype ContextMenuRadioItemElement = React.ComponentRef;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst ContextMenuRadioItem = React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'ContextMenuItemIndicator';\n\ntype ContextMenuItemIndicatorElement = React.ComponentRef;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst ContextMenuItemIndicator = React.forwardRef<\n ContextMenuItemIndicatorElement,\n ContextMenuItemIndicatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'ContextMenuSeparator';\n\ntype ContextMenuSeparatorElement = React.ComponentRef;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst ContextMenuSeparator = React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'ContextMenuArrow';\n\ntype ContextMenuArrowElement = React.ComponentRef;\ntype MenuArrowProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuArrowProps extends MenuArrowProps {}\n\nconst ContextMenuArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n }\n);\n\nContextMenuArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'ContextMenuSub';\n\ninterface ContextMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst ContextMenuSub: React.FC = (props: ScopedProps) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: SUB_NAME,\n });\n\n return (\n \n {children}\n \n );\n};\n\nContextMenuSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'ContextMenuSubTrigger';\n\ntype ContextMenuSubTriggerElement = React.ComponentRef;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst ContextMenuSubTrigger = React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return ;\n});\n\nContextMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'ContextMenuSubContent';\n\ntype ContextMenuSubContentElement = React.ComponentRef;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef;\ninterface ContextMenuSubContentProps extends MenuSubContentProps {}\n\nconst ContextMenuSubContent = React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeContextMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n \n );\n});\n\nContextMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction whenTouchOrPen(handler: React.PointerEventHandler): React.PointerEventHandler {\n return (event) => (event.pointerType !== 'mouse' ? handler(event) : undefined);\n}\n\nconst Root = ContextMenu;\nconst Trigger = ContextMenuTrigger;\nconst Portal = ContextMenuPortal;\nconst Content = ContextMenuContent;\nconst Group = ContextMenuGroup;\nconst Label = ContextMenuLabel;\nconst Item = ContextMenuItem;\nconst CheckboxItem = ContextMenuCheckboxItem;\nconst RadioGroup = ContextMenuRadioGroup;\nconst RadioItem = ContextMenuRadioItem;\nconst ItemIndicator = ContextMenuItemIndicator;\nconst Separator = ContextMenuSeparator;\nconst Arrow = ContextMenuArrow;\nconst Sub = ContextMenuSub;\nconst SubTrigger = ContextMenuSubTrigger;\nconst SubContent = ContextMenuSubContent;\n\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAC1B,YAAY,mBAAmB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AAwD/B,SAkDA,UAlDA,KAkDA,YAlDA;AA7CN,IAAM,oBAAoB;AAG1B,IAAM,CAAC,0BAA0B,sBAAsB,IAAI,mBAAmB,mBAAmB;AAAA,EAC/F;AACF,CAAC;AACD,IAAM,eAAe,gBAAgB;AAQrC,IAAM,CAAC,qBAAqB,qBAAqB,IAC/C,yBAAkD,iBAAiB;AASrE,IAAM,cAA0C,CAAC,UAAyC;A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AAiB;AAClE,QAAM,EAAE,oBAAoB,GAAG,iBAAiB,IAAI;AACpD,QAAM,YAAY,aAAa,kBAAkB;AACjD,SAAO,oBAAe,0BAAd,EAA0B,GAAG,WAAY,GAAG,kBAAkB,KAAK,cAAc;AAC3F,CAAC;AAED,sBAAsB,cAAc;AAMpC,IAAM,mBAAmB;AAMzB,IAAM,wBAA8B,iBAGlC,CAAC,OAAgD,iBAAiB;AAClE,QAAM,EAAE,oBAAoB,GAAG,gBAAgB,IAAI;AACnD,QAAM,YAAY,aAAa,kBAAkB;AAEjD,SACE;AAAA,IAAe;AAAA,IAAd;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,OAAO;AAAA,QACL,GAAG,MAAM;AAAA;AAAA,QAET,GAAG;AAAA,UACD,iDAAiD;AAAA,UACjD,gDAAgD;AAAA,UAChD,iDAAiD;AAAA,UACjD,sCAAsC;AAAA,UACtC,uCAAuC;AAAA,QACzC;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,sBAAsB,cAAc;AAIpC,SAAS,eAAkB,SAAqE;AAC9F,SAAO,CAAC,UAAW,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI;AACtE;AAEA,IAAMC,QAAO;AACb,IAAM,UAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;AACd,IAAMC,SAAQ;AACd,IAAMC,QAAO;AACb,IAAMC,gBAAe;AACrB,IAAMC,cAAa;AACnB,IAAMC,aAAY;AAClB,IAAMC,iBAAgB;AACtB,IAAMC,aAAY;AAClB,IAAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;", + "names": ["open", "Root", "Portal", "Content", "Group", "Label", "Item", "CheckboxItem", "RadioGroup", "RadioItem", "ItemIndicator", "Separator", "Arrow", "Sub", "SubTrigger", "SubContent"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-context-menu@2.2.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types_ceed7d7b7bde7029b79a8339b0ce058b/node_modules/@radix-ui/react-context-menu/package.json b/node_modules/.pnpm/@radix-ui+react-context-menu@2.2.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types_ceed7d7b7bde7029b79a8339b0ce058b/node_modules/@radix-ui/react-context-menu/package.json new file mode 100644 index 0000000000000000000000000000000000000000..760b7ce991650e9135cab6474a6a9cb81fc63c28 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-context-menu@2.2.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types_ceed7d7b7bde7029b79a8339b0ce058b/node_modules/@radix-ui/react-context-menu/package.json @@ -0,0 +1,74 @@ +{ + "name": "@radix-ui/react-context-menu", + "version": "2.2.16", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-menu": "2.1.16", + "@radix-ui/react-use-callback-ref": "1.1.1", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/eslint-config": "0.0.0", + "@repo/builder": "0.0.0", + "@repo/test-data": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/README.md b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/README.md new file mode 100644 index 0000000000000000000000000000000000000000..330234345165bc499a2d6ca924b1be1faa6692c4 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/README.md @@ -0,0 +1,13 @@ +# `react-context` + +## Installation + +```sh +$ yarn add @radix-ui/react-context +# or +$ npm install @radix-ui/react-context +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c047514614c29aad29c6451a2ae504419490372d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.d.mts @@ -0,0 +1,21 @@ +import * as React from 'react'; + +declare function createContext(rootComponentName: string, defaultContext?: ContextValueType): readonly [React.FC, (consumerName: string) => ContextValueType]; +type Scope = { + [scopeName: string]: React.Context[]; +} | undefined; +type ScopeHook = (scope: Scope) => { + [__scopeProp: string]: Scope; +}; +interface CreateScope { + scopeName: string; + (): ScopeHook; +} +declare function createContextScope(scopeName: string, createContextScopeDeps?: CreateScope[]): readonly [(rootComponentName: string, defaultContext?: ContextValueType) => readonly [React.FC; + children: React.ReactNode; +}>, (consumerName: string, scope: Scope) => ContextValueType], CreateScope]; + +export { type CreateScope, type Scope, createContext, createContextScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c047514614c29aad29c6451a2ae504419490372d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.d.ts @@ -0,0 +1,21 @@ +import * as React from 'react'; + +declare function createContext(rootComponentName: string, defaultContext?: ContextValueType): readonly [React.FC, (consumerName: string) => ContextValueType]; +type Scope = { + [scopeName: string]: React.Context[]; +} | undefined; +type ScopeHook = (scope: Scope) => { + [__scopeProp: string]: Scope; +}; +interface CreateScope { + scopeName: string; + (): ScopeHook; +} +declare function createContextScope(scopeName: string, createContextScopeDeps?: CreateScope[]): readonly [(rootComponentName: string, defaultContext?: ContextValueType) => readonly [React.FC; + children: React.ReactNode; +}>, (consumerName: string, scope: Scope) => ContextValueType], CreateScope]; + +export { type CreateScope, type Scope, createContext, createContextScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.js b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..ae1a8664d8e26bafd532d83712c3dc428fa04d92 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.js @@ -0,0 +1,114 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/react/context/src/index.ts +var index_exports = {}; +__export(index_exports, { + createContext: () => createContext2, + createContextScope: () => createContextScope +}); +module.exports = __toCommonJS(index_exports); + +// packages/react/context/src/create-context.tsx +var React = __toESM(require("react")); +var import_jsx_runtime = require("react/jsx-runtime"); +function createContext2(rootComponentName, defaultContext) { + const Context = React.createContext(defaultContext); + const Provider = (props) => { + const { children, ...context } = props; + const value = React.useMemo(() => context, Object.values(context)); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children }); + }; + Provider.displayName = rootComponentName + "Provider"; + function useContext2(consumerName) { + const context = React.useContext(Context); + if (context) return context; + if (defaultContext !== void 0) return defaultContext; + throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``); + } + return [Provider, useContext2]; +} +function createContextScope(scopeName, createContextScopeDeps = []) { + let defaultContexts = []; + function createContext3(rootComponentName, defaultContext) { + const BaseContext = React.createContext(defaultContext); + const index = defaultContexts.length; + defaultContexts = [...defaultContexts, defaultContext]; + const Provider = (props) => { + const { scope, children, ...context } = props; + const Context = scope?.[scopeName]?.[index] || BaseContext; + const value = React.useMemo(() => context, Object.values(context)); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children }); + }; + Provider.displayName = rootComponentName + "Provider"; + function useContext2(consumerName, scope) { + const Context = scope?.[scopeName]?.[index] || BaseContext; + const context = React.useContext(Context); + if (context) return context; + if (defaultContext !== void 0) return defaultContext; + throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``); + } + return [Provider, useContext2]; + } + const createScope = () => { + const scopeContexts = defaultContexts.map((defaultContext) => { + return React.createContext(defaultContext); + }); + return function useScope(scope) { + const contexts = scope?.[scopeName] || scopeContexts; + return React.useMemo( + () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), + [scope, contexts] + ); + }; + }; + createScope.scopeName = scopeName; + return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)]; +} +function composeContextScopes(...scopes) { + const baseScope = scopes[0]; + if (scopes.length === 1) return baseScope; + const createScope = () => { + const scopeHooks = scopes.map((createScope2) => ({ + useScope: createScope2(), + scopeName: createScope2.scopeName + })); + return function useComposedScopes(overrideScopes) { + const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => { + const scopeProps = useScope(overrideScopes); + const currentScope = scopeProps[`__scope${scopeName}`]; + return { ...nextScopes2, ...currentScope }; + }, {}); + return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]); + }; + }; + createScope.scopeName = baseScope.scopeName; + return createScope; +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..544c370a88d9f510c902800b132f43a653bc2000 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/create-context.tsx"], + "sourcesContent": ["export { createContext, createContextScope } from './create-context';\nexport type { CreateScope, Scope } from './create-context';\n", "import * as React from 'react';\n\nfunction createContext(\n rootComponentName: string,\n defaultContext?: ContextValueType\n) {\n const Context = React.createContext(defaultContext);\n\n const Provider: React.FC = (props) => {\n const { children, ...context } = props;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return {children};\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * createContextScope\n * -----------------------------------------------------------------------------------------------*/\n\ntype Scope = { [scopeName: string]: React.Context[] } | undefined;\ntype ScopeHook = (scope: Scope) => { [__scopeProp: string]: Scope };\ninterface CreateScope {\n scopeName: string;\n (): ScopeHook;\n}\n\nfunction createContextScope(scopeName: string, createContextScopeDeps: CreateScope[] = []) {\n let defaultContexts: any[] = [];\n\n /* -----------------------------------------------------------------------------------------------\n * createContext\n * ---------------------------------------------------------------------------------------------*/\n\n function createContext(\n rootComponentName: string,\n defaultContext?: ContextValueType\n ) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n\n const Provider: React.FC<\n ContextValueType & { scope: Scope; children: React.ReactNode }\n > = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return {children};\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string, scope: Scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n }\n\n /* -----------------------------------------------------------------------------------------------\n * createScope\n * ---------------------------------------------------------------------------------------------*/\n\n const createScope: CreateScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope: Scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n\n createScope.scopeName = scopeName;\n return [createContext, composeContextScopes(createScope, ...createContextScopeDeps)] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * composeContextScopes\n * -----------------------------------------------------------------------------------------------*/\n\nfunction composeContextScopes(...scopes: CreateScope[]) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n\n const createScope: CreateScope = () => {\n const scopeHooks = scopes.map((createScope) => ({\n useScope: createScope(),\n scopeName: createScope.scopeName,\n }));\n\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes, { useScope, scopeName }) => {\n // We are calling a hook inside a callback which React warns against to avoid inconsistent\n // renders, however, scoping doesn't have render side effects so we ignore the rule.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes, ...currentScope };\n }, {});\n\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nexport { createContext, createContextScope };\nexport type { CreateScope, Scope };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,uBAAAA;AAAA,EAAA;AAAA;AAAA;;;ACAA,YAAuB;AAaZ;AAXX,SAASC,eACP,mBACA,gBACA;AACA,QAAM,UAAgB,oBAA4C,cAAc;AAEhF,QAAM,WAAuE,CAAC,UAAU;AACtF,UAAM,EAAE,UAAU,GAAG,QAAQ,IAAI;AAGjC,UAAM,QAAc,cAAQ,MAAM,SAAS,OAAO,OAAO,OAAO,CAAC;AACjE,WAAO,4CAAC,QAAQ,UAAR,EAAiB,OAAe,UAAS;AAAA,EACnD;AAEA,WAAS,cAAc,oBAAoB;AAE3C,WAASC,YAAW,cAAsB;AACxC,UAAM,UAAgB,iBAAW,OAAO;AACxC,QAAI,QAAS,QAAO;AACpB,QAAI,mBAAmB,OAAW,QAAO;AAEzC,UAAM,IAAI,MAAM,KAAK,YAAY,4BAA4B,iBAAiB,IAAI;AAAA,EACpF;AAEA,SAAO,CAAC,UAAUA,WAAU;AAC9B;AAaA,SAAS,mBAAmB,WAAmB,yBAAwC,CAAC,GAAG;AACzF,MAAI,kBAAyB,CAAC;AAM9B,WAASD,eACP,mBACA,gBACA;AACA,UAAM,cAAoB,oBAA4C,cAAc;AACpF,UAAM,QAAQ,gBAAgB;AAC9B,sBAAkB,CAAC,GAAG,iBAAiB,cAAc;AAErD,UAAM,WAEF,CAAC,UAAU;AACb,YAAM,EAAE,OAAO,UAAU,GAAG,QAAQ,IAAI;AACxC,YAAM,UAAU,QAAQ,SAAS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AU,UAAU,MAAM;AAI5E,cAAM,aAAa,SAAS,cAAc;AAC1C,cAAM,eAAe,WAAW,UAAU,SAAS,EAAE;AACrD,eAAO,EAAE,GAAGA,aAAY,GAAG,aAAa;AAAA,MAC1C,GAAG,CAAC,CAAC;AAEL,aAAa,cAAQ,OAAO,EAAE,CAAC,UAAU,UAAU,SAAS,EAAE,GAAG,WAAW,IAAI,CAAC,UAAU,CAAC;AAAA,IAC9F;AAAA,EACF;AAEA,cAAY,YAAY,UAAU;AAClC,SAAO;AACT;", + "names": ["createContext", "createContext", "useContext", "createScope", "nextScopes"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ea1d518f5db41dc86fbef1eef5eda7087bb36cdb --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs @@ -0,0 +1,81 @@ +// packages/react/context/src/create-context.tsx +import * as React from "react"; +import { jsx } from "react/jsx-runtime"; +function createContext2(rootComponentName, defaultContext) { + const Context = React.createContext(defaultContext); + const Provider = (props) => { + const { children, ...context } = props; + const value = React.useMemo(() => context, Object.values(context)); + return /* @__PURE__ */ jsx(Context.Provider, { value, children }); + }; + Provider.displayName = rootComponentName + "Provider"; + function useContext2(consumerName) { + const context = React.useContext(Context); + if (context) return context; + if (defaultContext !== void 0) return defaultContext; + throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``); + } + return [Provider, useContext2]; +} +function createContextScope(scopeName, createContextScopeDeps = []) { + let defaultContexts = []; + function createContext3(rootComponentName, defaultContext) { + const BaseContext = React.createContext(defaultContext); + const index = defaultContexts.length; + defaultContexts = [...defaultContexts, defaultContext]; + const Provider = (props) => { + const { scope, children, ...context } = props; + const Context = scope?.[scopeName]?.[index] || BaseContext; + const value = React.useMemo(() => context, Object.values(context)); + return /* @__PURE__ */ jsx(Context.Provider, { value, children }); + }; + Provider.displayName = rootComponentName + "Provider"; + function useContext2(consumerName, scope) { + const Context = scope?.[scopeName]?.[index] || BaseContext; + const context = React.useContext(Context); + if (context) return context; + if (defaultContext !== void 0) return defaultContext; + throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``); + } + return [Provider, useContext2]; + } + const createScope = () => { + const scopeContexts = defaultContexts.map((defaultContext) => { + return React.createContext(defaultContext); + }); + return function useScope(scope) { + const contexts = scope?.[scopeName] || scopeContexts; + return React.useMemo( + () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), + [scope, contexts] + ); + }; + }; + createScope.scopeName = scopeName; + return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)]; +} +function composeContextScopes(...scopes) { + const baseScope = scopes[0]; + if (scopes.length === 1) return baseScope; + const createScope = () => { + const scopeHooks = scopes.map((createScope2) => ({ + useScope: createScope2(), + scopeName: createScope2.scopeName + })); + return function useComposedScopes(overrideScopes) { + const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => { + const scopeProps = useScope(overrideScopes); + const currentScope = scopeProps[`__scope${scopeName}`]; + return { ...nextScopes2, ...currentScope }; + }, {}); + return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]); + }; + }; + createScope.scopeName = baseScope.scopeName; + return createScope; +} +export { + createContext2 as createContext, + createContextScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..5f9276ffbcb86cc977f88f494cf89e7d70a8eafe --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/create-context.tsx"], + "sourcesContent": ["import * as React from 'react';\n\nfunction createContext(\n rootComponentName: string,\n defaultContext?: ContextValueType\n) {\n const Context = React.createContext(defaultContext);\n\n const Provider: React.FC = (props) => {\n const { children, ...context } = props;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return {children};\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * createContextScope\n * -----------------------------------------------------------------------------------------------*/\n\ntype Scope = { [scopeName: string]: React.Context[] } | undefined;\ntype ScopeHook = (scope: Scope) => { [__scopeProp: string]: Scope };\ninterface CreateScope {\n scopeName: string;\n (): ScopeHook;\n}\n\nfunction createContextScope(scopeName: string, createContextScopeDeps: CreateScope[] = []) {\n let defaultContexts: any[] = [];\n\n /* -----------------------------------------------------------------------------------------------\n * createContext\n * ---------------------------------------------------------------------------------------------*/\n\n function createContext(\n rootComponentName: string,\n defaultContext?: ContextValueType\n ) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n\n const Provider: React.FC<\n ContextValueType & { scope: Scope; children: React.ReactNode }\n > = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n // Only re-memoize when prop values change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return {children};\n };\n\n Provider.displayName = rootComponentName + 'Provider';\n\n function useContext(consumerName: string, scope: Scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== undefined) return defaultContext;\n // if a defaultContext wasn't specified, it's a required context.\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContext] as const;\n }\n\n /* -----------------------------------------------------------------------------------------------\n * createScope\n * ---------------------------------------------------------------------------------------------*/\n\n const createScope: CreateScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope: Scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n\n createScope.scopeName = scopeName;\n return [createContext, composeContextScopes(createScope, ...createContextScopeDeps)] as const;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * composeContextScopes\n * -----------------------------------------------------------------------------------------------*/\n\nfunction composeContextScopes(...scopes: CreateScope[]) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n\n const createScope: CreateScope = () => {\n const scopeHooks = scopes.map((createScope) => ({\n useScope: createScope(),\n scopeName: createScope.scopeName,\n }));\n\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes, { useScope, scopeName }) => {\n // We are calling a hook inside a callback which React warns against to avoid inconsistent\n // renders, however, scoping doesn't have render side effects so we ignore the rule.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes, ...currentScope };\n }, {});\n\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nexport { createContext, createContextScope };\nexport type { CreateScope, Scope };\n"], + "mappings": ";AAAA,YAAY,WAAW;AAaZ;AAXX,SAASA,eACP,mBACA,gBACA;AACA,QAAM,UAAgB,oBAA4C,cAAc;AAEhF,QAAM,WAAuE,CAAC,UAAU;AACtF,UAAM,EAAE,UAAU,GAAG,QAAQ,IAAI;AAGjC,UAAM,QAAc,cAAQ,MAAM,SAAS,OAAO,OAAO,OAAO,CAAC;AACjE,WAAO,oBAAC,QAAQ,UAAR,EAAiB,OAAe,UAAS;AAAA,EACnD;AAEA,WAAS,cAAc,oBAAoB;AAE3C,WAASC,YAAW,cAAsB;AACxC,UAAM,UAAgB,iBAAW,OAAO;AACxC,QAAI,QAAS,QAAO;AACpB,QAAI,mBAAmB,OAAW,QAAO;AAEzC,UAAM,IAAI,MAAM,KAAK,YAAY,4BAA4B,iBAAiB,IAAI;AAAA,EACpF;AAEA,SAAO,CAAC,UAAUA,WAAU;AAC9B;AAaA,SAAS,mBAAmB,WAAmB,yBAAwC,CAAC,GAAG;AACzF,MAAI,kBAAyB,CAAC;AAM9B,WAASD,eACP,mBACA,gBACA;AACA,UAAM,cAAoB,oBAA4C,cAAc;AACpF,UAAM,QAAQ,gBAAgB;AAC9B,sBAAkB,CAAC,GAAG,iBAAiB,cAAc;AAErD,UAAM,WAEF,CAAC,UAAU;AACb,YAAM,EAAE,OAAO,UAAU,GAAG,QAAQ,IAAI;AACxC,YAAM,UAAU,QAAQ,SAAS,IAAI,KAAK,KAAK;AAG/C,YAAM,QAAc,cAAQ,MAAM,SAAS,OAAO,OAAO,OAAO,CAAC;AACjE,aAAO,oBAAC,QAAQ,UAAR,EAAiB,OAAe,UAAS;AAAA,IACnD;AAEA,aAAS,cAAc,oBAAoB;AAE3C,aAASC,YAAW,cAAsB,OAA4C;AACpF,YAAM,UAAU,QAAQ,SAAS,IAAI,KAAK,KAAK;AAC/C,YAAM,UAAgB,iBAAW,OAAO;AACxC,UAAI,QAAS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AAU;AAClC,SAAO;AACT;", + "names": ["createContext", "useContext", "createScope", "nextScopes"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/package.json b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5625eba2619e0222a711ed3e2d002d62eed0546d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-context/package.json @@ -0,0 +1,75 @@ +{ + "name": "@radix-ui/react-context", + "version": "1.1.2", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "typescript": "^5.7.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/LICENSE b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/README.md b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0cd9f9b457b600566d1f56e2f1191e646643c70b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/README.md @@ -0,0 +1,3 @@ +# `react-dialog` + +View docs [here](https://radix-ui.com/primitives/docs/components/dialog). diff --git a/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..20204d212833a011a6eaf6d048d727522bb501ae --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.d.mts @@ -0,0 +1,103 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import { FocusScope } from '@radix-ui/react-focus-scope'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createDialogScope: _radix_ui_react_context.CreateScope; +interface DialogProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; + modal?: boolean; +} +declare const Dialog: React.FC; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface DialogTriggerProps extends PrimitiveButtonProps { +} +declare const DialogTrigger: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface DialogPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const DialogPortal: React.FC; +interface DialogOverlayProps extends DialogOverlayImplProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const DialogOverlay: React.ForwardRefExoticComponent>; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface DialogOverlayImplProps extends PrimitiveDivProps { +} +interface DialogContentProps extends DialogContentTypeProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const DialogContent: React.ForwardRefExoticComponent>; +interface DialogContentTypeProps extends Omit { +} +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type FocusScopeProps = React.ComponentPropsWithoutRef; +interface DialogContentImplProps extends Omit { + /** + * When `true`, focus cannot escape the `Content` via keyboard, + * pointer, or a programmatic focus. + * @defaultValue false + */ + trapFocus?: FocusScopeProps['trapped']; + /** + * Event handler called when auto-focusing on open. + * Can be prevented. + */ + onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus']; + /** + * Event handler called when auto-focusing on close. + * Can be prevented. + */ + onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']; +} +type PrimitiveHeading2Props = React.ComponentPropsWithoutRef; +interface DialogTitleProps extends PrimitiveHeading2Props { +} +declare const DialogTitle: React.ForwardRefExoticComponent>; +type PrimitiveParagraphProps = React.ComponentPropsWithoutRef; +interface DialogDescriptionProps extends PrimitiveParagraphProps { +} +declare const DialogDescription: React.ForwardRefExoticComponent>; +interface DialogCloseProps extends PrimitiveButtonProps { +} +declare const DialogClose: React.ForwardRefExoticComponent>; +declare const WarningProvider: React.FC<{ + contentName: string; + titleName: string; + docsSlug: string; +} & { + children: React.ReactNode; +}>; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Overlay: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; +declare const Title: React.ForwardRefExoticComponent>; +declare const Description: React.ForwardRefExoticComponent>; +declare const Close: React.ForwardRefExoticComponent>; + +export { Close, Content, Description, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, Overlay, Portal, Root, Title, Trigger, WarningProvider, createDialogScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..20204d212833a011a6eaf6d048d727522bb501ae --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.d.ts @@ -0,0 +1,103 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import { FocusScope } from '@radix-ui/react-focus-scope'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createDialogScope: _radix_ui_react_context.CreateScope; +interface DialogProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; + modal?: boolean; +} +declare const Dialog: React.FC; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface DialogTriggerProps extends PrimitiveButtonProps { +} +declare const DialogTrigger: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface DialogPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const DialogPortal: React.FC; +interface DialogOverlayProps extends DialogOverlayImplProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const DialogOverlay: React.ForwardRefExoticComponent>; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface DialogOverlayImplProps extends PrimitiveDivProps { +} +interface DialogContentProps extends DialogContentTypeProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const DialogContent: React.ForwardRefExoticComponent>; +interface DialogContentTypeProps extends Omit { +} +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type FocusScopeProps = React.ComponentPropsWithoutRef; +interface DialogContentImplProps extends Omit { + /** + * When `true`, focus cannot escape the `Content` via keyboard, + * pointer, or a programmatic focus. + * @defaultValue false + */ + trapFocus?: FocusScopeProps['trapped']; + /** + * Event handler called when auto-focusing on open. + * Can be prevented. + */ + onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus']; + /** + * Event handler called when auto-focusing on close. + * Can be prevented. + */ + onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']; +} +type PrimitiveHeading2Props = React.ComponentPropsWithoutRef; +interface DialogTitleProps extends PrimitiveHeading2Props { +} +declare const DialogTitle: React.ForwardRefExoticComponent>; +type PrimitiveParagraphProps = React.ComponentPropsWithoutRef; +interface DialogDescriptionProps extends PrimitiveParagraphProps { +} +declare const DialogDescription: React.ForwardRefExoticComponent>; +interface DialogCloseProps extends PrimitiveButtonProps { +} +declare const DialogClose: React.ForwardRefExoticComponent>; +declare const WarningProvider: React.FC<{ + contentName: string; + titleName: string; + docsSlug: string; +} & { + children: React.ReactNode; +}>; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Overlay: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; +declare const Title: React.ForwardRefExoticComponent>; +declare const Description: React.ForwardRefExoticComponent>; +declare const Close: React.ForwardRefExoticComponent>; + +export { Close, Content, Description, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, Overlay, Portal, Root, Title, Trigger, WarningProvider, createDialogScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.js b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..ce328f1bc67710ca5c3bf303d552ba7be0b87a2e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.js @@ -0,0 +1,374 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Close: () => Close, + Content: () => Content, + Description: () => Description, + Dialog: () => Dialog, + DialogClose: () => DialogClose, + DialogContent: () => DialogContent, + DialogDescription: () => DialogDescription, + DialogOverlay: () => DialogOverlay, + DialogPortal: () => DialogPortal, + DialogTitle: () => DialogTitle, + DialogTrigger: () => DialogTrigger, + Overlay: () => Overlay, + Portal: () => Portal, + Root: () => Root, + Title: () => Title, + Trigger: () => Trigger, + WarningProvider: () => WarningProvider, + createDialogScope: () => createDialogScope +}); +module.exports = __toCommonJS(index_exports); + +// src/dialog.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_id = require("@radix-ui/react-id"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_dismissable_layer = require("@radix-ui/react-dismissable-layer"); +var import_react_focus_scope = require("@radix-ui/react-focus-scope"); +var import_react_portal = require("@radix-ui/react-portal"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_focus_guards = require("@radix-ui/react-focus-guards"); +var import_react_remove_scroll = require("react-remove-scroll"); +var import_aria_hidden = require("aria-hidden"); +var import_react_slot = require("@radix-ui/react-slot"); +var import_jsx_runtime = require("react/jsx-runtime"); +var DIALOG_NAME = "Dialog"; +var [createDialogContext, createDialogScope] = (0, import_react_context.createContextScope)(DIALOG_NAME); +var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME); +var Dialog = (props) => { + const { + __scopeDialog, + children, + open: openProp, + defaultOpen, + onOpenChange, + modal = true + } = props; + const triggerRef = React.useRef(null); + const contentRef = React.useRef(null); + const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: DIALOG_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + DialogProvider, + { + scope: __scopeDialog, + triggerRef, + contentRef, + contentId: (0, import_react_id.useId)(), + titleId: (0, import_react_id.useId)(), + descriptionId: (0, import_react_id.useId)(), + open, + onOpenChange: setOpen, + onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]), + modal, + children + } + ); +}; +Dialog.displayName = DIALOG_NAME; +var TRIGGER_NAME = "DialogTrigger"; +var DialogTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, ...triggerProps } = props; + const context = useDialogContext(TRIGGER_NAME, __scopeDialog); + const composedTriggerRef = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + "aria-haspopup": "dialog", + "aria-expanded": context.open, + "aria-controls": context.contentId, + "data-state": getState(context.open), + ...triggerProps, + ref: composedTriggerRef, + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, context.onOpenToggle) + } + ); + } +); +DialogTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "DialogPortal"; +var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, { + forceMount: void 0 +}); +var DialogPortal = (props) => { + const { __scopeDialog, forceMount, children, container } = props; + const context = useDialogContext(PORTAL_NAME, __scopeDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_portal.Portal, { asChild: true, container, children: child }) })) }); +}; +DialogPortal.displayName = PORTAL_NAME; +var OVERLAY_NAME = "DialogOverlay"; +var DialogOverlay = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog); + const { forceMount = portalContext.forceMount, ...overlayProps } = props; + const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog); + return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null; + } +); +DialogOverlay.displayName = OVERLAY_NAME; +var Slot = (0, import_react_slot.createSlot)("DialogOverlay.RemoveScroll"); +var DialogOverlayImpl = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, ...overlayProps } = props; + const context = useDialogContext(OVERLAY_NAME, __scopeDialog); + return ( + // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll` + // ie. when `Overlay` and `Content` are siblings + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_remove_scroll.RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "data-state": getState(context.open), + ...overlayProps, + ref: forwardedRef, + style: { pointerEvents: "auto", ...overlayProps.style } + } + ) }) + ); + } +); +var CONTENT_NAME = "DialogContent"; +var DialogContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog); + const { forceMount = portalContext.forceMount, ...contentProps } = props; + const context = useDialogContext(CONTENT_NAME, props.__scopeDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) }); + } +); +DialogContent.displayName = CONTENT_NAME; +var DialogContentModal = React.forwardRef( + (props, forwardedRef) => { + const context = useDialogContext(CONTENT_NAME, props.__scopeDialog); + const contentRef = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef); + React.useEffect(() => { + const content = contentRef.current; + if (content) return (0, import_aria_hidden.hideOthers)(content); + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + DialogContentImpl, + { + ...props, + ref: composedRefs, + trapFocus: context.open, + disableOutsidePointerEvents: true, + onCloseAutoFocus: (0, import_primitive.composeEventHandlers)(props.onCloseAutoFocus, (event) => { + event.preventDefault(); + context.triggerRef.current?.focus(); + }), + onPointerDownOutside: (0, import_primitive.composeEventHandlers)(props.onPointerDownOutside, (event) => { + const originalEvent = event.detail.originalEvent; + const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true; + const isRightClick = originalEvent.button === 2 || ctrlLeftClick; + if (isRightClick) event.preventDefault(); + }), + onFocusOutside: (0, import_primitive.composeEventHandlers)( + props.onFocusOutside, + (event) => event.preventDefault() + ) + } + ); + } +); +var DialogContentNonModal = React.forwardRef( + (props, forwardedRef) => { + const context = useDialogContext(CONTENT_NAME, props.__scopeDialog); + const hasInteractedOutsideRef = React.useRef(false); + const hasPointerDownOutsideRef = React.useRef(false); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + DialogContentImpl, + { + ...props, + ref: forwardedRef, + trapFocus: false, + disableOutsidePointerEvents: false, + onCloseAutoFocus: (event) => { + props.onCloseAutoFocus?.(event); + if (!event.defaultPrevented) { + if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus(); + event.preventDefault(); + } + hasInteractedOutsideRef.current = false; + hasPointerDownOutsideRef.current = false; + }, + onInteractOutside: (event) => { + props.onInteractOutside?.(event); + if (!event.defaultPrevented) { + hasInteractedOutsideRef.current = true; + if (event.detail.originalEvent.type === "pointerdown") { + hasPointerDownOutsideRef.current = true; + } + } + const target = event.target; + const targetIsTrigger = context.triggerRef.current?.contains(target); + if (targetIsTrigger) event.preventDefault(); + if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) { + event.preventDefault(); + } + } + } + ); + } +); +var DialogContentImpl = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props; + const context = useDialogContext(CONTENT_NAME, __scopeDialog); + const contentRef = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentRef); + (0, import_react_focus_guards.useFocusGuards)(); + return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_focus_scope.FocusScope, + { + asChild: true, + loop: true, + trapped: trapFocus, + onMountAutoFocus: onOpenAutoFocus, + onUnmountAutoFocus: onCloseAutoFocus, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_dismissable_layer.DismissableLayer, + { + role: "dialog", + id: context.contentId, + "aria-describedby": context.descriptionId, + "aria-labelledby": context.titleId, + "data-state": getState(context.open), + ...contentProps, + ref: composedRefs, + onDismiss: () => context.onOpenChange(false) + } + ) + } + ), + /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleWarning, { titleId: context.titleId }), + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId }) + ] }) + ] }); + } +); +var TITLE_NAME = "DialogTitle"; +var DialogTitle = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, ...titleProps } = props; + const context = useDialogContext(TITLE_NAME, __scopeDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef }); + } +); +DialogTitle.displayName = TITLE_NAME; +var DESCRIPTION_NAME = "DialogDescription"; +var DialogDescription = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, ...descriptionProps } = props; + const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef }); + } +); +DialogDescription.displayName = DESCRIPTION_NAME; +var CLOSE_NAME = "DialogClose"; +var DialogClose = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, ...closeProps } = props; + const context = useDialogContext(CLOSE_NAME, __scopeDialog); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + ...closeProps, + ref: forwardedRef, + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, () => context.onOpenChange(false)) + } + ); + } +); +DialogClose.displayName = CLOSE_NAME; +function getState(open) { + return open ? "open" : "closed"; +} +var TITLE_WARNING_NAME = "DialogTitleWarning"; +var [WarningProvider, useWarningContext] = (0, import_react_context.createContext)(TITLE_WARNING_NAME, { + contentName: CONTENT_NAME, + titleName: TITLE_NAME, + docsSlug: "dialog" +}); +var TitleWarning = ({ titleId }) => { + const titleWarningContext = useWarningContext(TITLE_WARNING_NAME); + const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`; + React.useEffect(() => { + if (titleId) { + const hasTitle = document.getElementById(titleId); + if (!hasTitle) console.error(MESSAGE); + } + }, [MESSAGE, titleId]); + return null; +}; +var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning"; +var DescriptionWarning = ({ contentRef, descriptionId }) => { + const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME); + const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`; + React.useEffect(() => { + const describedById = contentRef.current?.getAttribute("aria-describedby"); + if (descriptionId && describedById) { + const hasDescription = document.getElementById(descriptionId); + if (!hasDescription) console.warn(MESSAGE); + } + }, [MESSAGE, contentRef, descriptionId]); + return null; +}; +var Root = Dialog; +var Trigger = DialogTrigger; +var Portal = DialogPortal; +var Overlay = DialogOverlay; +var Content = DialogContent; +var Title = DialogTitle; +var Description = DialogDescription; +var Close = DialogClose; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5e2b531b7f1360729ef96718b593e3b826ae8a7a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/dialog.tsx"], + "sourcesContent": ["'use client';\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Title,\n Description,\n Close,\n //\n WarningProvider,\n} from './dialog';\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n} from './dialog';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContext, createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { hideOthers } from 'aria-hidden';\nimport { createSlot } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst DIALOG_NAME = 'Dialog';\n\ntype ScopedProps

= P & { __scopeDialog?: Scope };\nconst [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\n\ntype DialogContextValue = {\n triggerRef: React.RefObject;\n contentRef: React.RefObject;\n contentId: string;\n titleId: string;\n descriptionId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\n\ninterface DialogProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst Dialog: React.FC = (props: ScopedProps) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME,\n });\n\n return (\n setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n {children}\n \n );\n};\n\nDialog.displayName = DIALOG_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DialogTrigger';\n\ntype DialogTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface DialogTriggerProps extends PrimitiveButtonProps {}\n\nconst DialogTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return (\n \n );\n }\n);\n\nDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DialogPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface DialogPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogPortal: React.FC = (props: ScopedProps) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return (\n \n {React.Children.map(children, (child) => (\n \n \n {child}\n \n \n ))}\n \n );\n};\n\nDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'DialogOverlay';\n\ntype DialogOverlayElement = DialogOverlayImplElement;\ninterface DialogOverlayProps extends DialogOverlayImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogOverlay = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? (\n \n \n \n ) : null;\n }\n);\n\nDialogOverlay.displayName = OVERLAY_NAME;\n\ntype DialogOverlayImplElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface DialogOverlayImplProps extends PrimitiveDivProps {}\n\nconst Slot = createSlot('DialogOverlay.RemoveScroll');\n\nconst DialogOverlayImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n \n \n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DialogContent';\n\ntype DialogContentElement = DialogContentTypeElement;\ninterface DialogContentProps extends DialogContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return (\n \n {context.modal ? (\n \n ) : (\n \n )}\n \n );\n }\n);\n\nDialogContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentTypeElement = DialogContentImplElement;\ninterface DialogContentTypeProps\n extends Omit {}\n\nconst DialogContentModal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n {\n event.preventDefault();\n context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n // If the event is a right-click, we shouldn't close because\n // it is effectively as if we right-clicked the `Overlay`.\n if (isRightClick) event.preventDefault();\n })}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) =>\n event.preventDefault()\n )}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst DialogContentNonModal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentImplElement = React.ComponentRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype FocusScopeProps = React.ComponentPropsWithoutRef;\ninterface DialogContentImplProps extends Omit {\n /**\n * When `true`, focus cannot escape the `Content` via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst DialogContentImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n\n // Make sure the whole tree has focus guards as our `Dialog` will be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n <>\n \n context.onOpenChange(false)}\n />\n \n {process.env.NODE_ENV !== 'production' && (\n <>\n \n \n \n )}\n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'DialogTitle';\n\ntype DialogTitleElement = React.ComponentRef;\ntype PrimitiveHeading2Props = React.ComponentPropsWithoutRef;\ninterface DialogTitleProps extends PrimitiveHeading2Props {}\n\nconst DialogTitle = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return ;\n }\n);\n\nDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'DialogDescription';\n\ntype DialogDescriptionElement = React.ComponentRef;\ntype PrimitiveParagraphProps = React.ComponentPropsWithoutRef;\ninterface DialogDescriptionProps extends PrimitiveParagraphProps {}\n\nconst DialogDescription = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return ;\n }\n);\n\nDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'DialogClose';\n\ntype DialogCloseElement = React.ComponentRef;\ninterface DialogCloseProps extends PrimitiveButtonProps {}\n\nconst DialogClose = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return (\n context.onOpenChange(false))}\n />\n );\n }\n);\n\nDialogClose.displayName = CLOSE_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst TITLE_WARNING_NAME = 'DialogTitleWarning';\n\nconst [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: 'dialog',\n});\n\ntype TitleWarningProps = { titleId?: string };\n\nconst TitleWarning: React.FC = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n\n return null;\n};\n\nconst DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject;\n descriptionId?: string;\n};\n\nconst DescriptionWarning: React.FC = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute('aria-describedby');\n // if we have an id and the user hasn't set aria-describedby={undefined}\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n\n return null;\n};\n\nconst Root = Dialog;\nconst Trigger = DialogTrigger;\nconst Portal = DialogPortal;\nconst Overlay = DialogOverlay;\nconst Content = DialogContent;\nconst Title = DialogTitle;\nconst Description = DialogDescription;\nconst Close = DialogClose;\n\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Title,\n Description,\n Close,\n //\n WarningProvider,\n};\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,gCAAgC;AAChC,2BAAkD;AAClD,sBAAsB;AACtB,0CAAqC;AACrC,qCAAiC;AACjC,+BAA2B;AAC3B,0BAA0C;AAC1C,4BAAyB;AACzB,6BAA0B;AAC1B,gCAA+B;AAC/B,iCAA6B;AAC7B,yBAA2B;AAC3B,wBAA2B;AAsDvB;AA9CJ,IAAM,cAAc;AAGpB,IAAM,CAAC,qBAAqB,iBAAiB,QAAI,yCAAmB,WAAW;AAc/E,IAAM,CAAC,gBAAgB,gBAAgB,IAAI,oBAAwC,WAAW;AAU9F,IAAM,SAAgC,CAAC,UAAoC;AACzE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV,IAAI;AACJ,QAAM,aAAmB,aAA0B,IAAI;AACvD,QAAM,aAAmB,aAA6B,IAAI;AAC1D,QAAM,CAAC,MAAM,OAAO,QAAI,0DAAqB;AAAA,IAC3C,MAAM;AAAA,IACN,aAAa,e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"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..13581033b5a5635796d4cf492f0828e853d011c4 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.mjs @@ -0,0 +1,342 @@ +"use client"; + +// src/dialog.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { createContext, createContextScope } from "@radix-ui/react-context"; +import { useId } from "@radix-ui/react-id"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { DismissableLayer } from "@radix-ui/react-dismissable-layer"; +import { FocusScope } from "@radix-ui/react-focus-scope"; +import { Portal as PortalPrimitive } from "@radix-ui/react-portal"; +import { Presence } from "@radix-ui/react-presence"; +import { Primitive } from "@radix-ui/react-primitive"; +import { useFocusGuards } from "@radix-ui/react-focus-guards"; +import { RemoveScroll } from "react-remove-scroll"; +import { hideOthers } from "aria-hidden"; +import { createSlot } from "@radix-ui/react-slot"; +import { Fragment, jsx, jsxs } from "react/jsx-runtime"; +var DIALOG_NAME = "Dialog"; +var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME); +var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME); +var Dialog = (props) => { + const { + __scopeDialog, + children, + open: openProp, + defaultOpen, + onOpenChange, + modal = true + } = props; + const triggerRef = React.useRef(null); + const contentRef = React.useRef(null); + const [open, setOpen] = useControllableState({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: DIALOG_NAME + }); + return /* @__PURE__ */ jsx( + DialogProvider, + { + scope: __scopeDialog, + triggerRef, + contentRef, + contentId: useId(), + titleId: useId(), + descriptionId: useId(), + open, + onOpenChange: setOpen, + onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]), + modal, + children + } + ); +}; +Dialog.displayName = DIALOG_NAME; +var TRIGGER_NAME = "DialogTrigger"; +var DialogTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, ...triggerProps } = props; + const context = useDialogContext(TRIGGER_NAME, __scopeDialog); + const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef); + return /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + "aria-haspopup": "dialog", + "aria-expanded": context.open, + "aria-controls": context.contentId, + "data-state": getState(context.open), + ...triggerProps, + ref: composedTriggerRef, + onClick: composeEventHandlers(props.onClick, context.onOpenToggle) + } + ); + } +); +DialogTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "DialogPortal"; +var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, { + forceMount: void 0 +}); +var DialogPortal = (props) => { + const { __scopeDialog, forceMount, children, container } = props; + const context = useDialogContext(PORTAL_NAME, __scopeDialog); + return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) }); +}; +DialogPortal.displayName = PORTAL_NAME; +var OVERLAY_NAME = "DialogOverlay"; +var DialogOverlay = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog); + const { forceMount = portalContext.forceMount, ...overlayProps } = props; + const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog); + return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null; + } +); +DialogOverlay.displayName = OVERLAY_NAME; +var Slot = createSlot("DialogOverlay.RemoveScroll"); +var DialogOverlayImpl = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, ...overlayProps } = props; + const context = useDialogContext(OVERLAY_NAME, __scopeDialog); + return ( + // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll` + // ie. when `Overlay` and `Content` are siblings + /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx( + Primitive.div, + { + "data-state": getState(context.open), + ...overlayProps, + ref: forwardedRef, + style: { pointerEvents: "auto", ...overlayProps.style } + } + ) }) + ); + } +); +var CONTENT_NAME = "DialogContent"; +var DialogContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog); + const { forceMount = portalContext.forceMount, ...contentProps } = props; + const context = useDialogContext(CONTENT_NAME, props.__scopeDialog); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) }); + } +); +DialogContent.displayName = CONTENT_NAME; +var DialogContentModal = React.forwardRef( + (props, forwardedRef) => { + const context = useDialogContext(CONTENT_NAME, props.__scopeDialog); + const contentRef = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef); + React.useEffect(() => { + const content = contentRef.current; + if (content) return hideOthers(content); + }, []); + return /* @__PURE__ */ jsx( + DialogContentImpl, + { + ...props, + ref: composedRefs, + trapFocus: context.open, + disableOutsidePointerEvents: true, + onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => { + event.preventDefault(); + context.triggerRef.current?.focus(); + }), + onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => { + const originalEvent = event.detail.originalEvent; + const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true; + const isRightClick = originalEvent.button === 2 || ctrlLeftClick; + if (isRightClick) event.preventDefault(); + }), + onFocusOutside: composeEventHandlers( + props.onFocusOutside, + (event) => event.preventDefault() + ) + } + ); + } +); +var DialogContentNonModal = React.forwardRef( + (props, forwardedRef) => { + const context = useDialogContext(CONTENT_NAME, props.__scopeDialog); + const hasInteractedOutsideRef = React.useRef(false); + const hasPointerDownOutsideRef = React.useRef(false); + return /* @__PURE__ */ jsx( + DialogContentImpl, + { + ...props, + ref: forwardedRef, + trapFocus: false, + disableOutsidePointerEvents: false, + onCloseAutoFocus: (event) => { + props.onCloseAutoFocus?.(event); + if (!event.defaultPrevented) { + if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus(); + event.preventDefault(); + } + hasInteractedOutsideRef.current = false; + hasPointerDownOutsideRef.current = false; + }, + onInteractOutside: (event) => { + props.onInteractOutside?.(event); + if (!event.defaultPrevented) { + hasInteractedOutsideRef.current = true; + if (event.detail.originalEvent.type === "pointerdown") { + hasPointerDownOutsideRef.current = true; + } + } + const target = event.target; + const targetIsTrigger = context.triggerRef.current?.contains(target); + if (targetIsTrigger) event.preventDefault(); + if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) { + event.preventDefault(); + } + } + } + ); + } +); +var DialogContentImpl = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props; + const context = useDialogContext(CONTENT_NAME, __scopeDialog); + const contentRef = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, contentRef); + useFocusGuards(); + return /* @__PURE__ */ jsxs(Fragment, { children: [ + /* @__PURE__ */ jsx( + FocusScope, + { + asChild: true, + loop: true, + trapped: trapFocus, + onMountAutoFocus: onOpenAutoFocus, + onUnmountAutoFocus: onCloseAutoFocus, + children: /* @__PURE__ */ jsx( + DismissableLayer, + { + role: "dialog", + id: context.contentId, + "aria-describedby": context.descriptionId, + "aria-labelledby": context.titleId, + "data-state": getState(context.open), + ...contentProps, + ref: composedRefs, + onDismiss: () => context.onOpenChange(false) + } + ) + } + ), + /* @__PURE__ */ jsxs(Fragment, { children: [ + /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }), + /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId }) + ] }) + ] }); + } +); +var TITLE_NAME = "DialogTitle"; +var DialogTitle = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, ...titleProps } = props; + const context = useDialogContext(TITLE_NAME, __scopeDialog); + return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef }); + } +); +DialogTitle.displayName = TITLE_NAME; +var DESCRIPTION_NAME = "DialogDescription"; +var DialogDescription = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, ...descriptionProps } = props; + const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog); + return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef }); + } +); +DialogDescription.displayName = DESCRIPTION_NAME; +var CLOSE_NAME = "DialogClose"; +var DialogClose = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDialog, ...closeProps } = props; + const context = useDialogContext(CLOSE_NAME, __scopeDialog); + return /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + ...closeProps, + ref: forwardedRef, + onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false)) + } + ); + } +); +DialogClose.displayName = CLOSE_NAME; +function getState(open) { + return open ? "open" : "closed"; +} +var TITLE_WARNING_NAME = "DialogTitleWarning"; +var [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, { + contentName: CONTENT_NAME, + titleName: TITLE_NAME, + docsSlug: "dialog" +}); +var TitleWarning = ({ titleId }) => { + const titleWarningContext = useWarningContext(TITLE_WARNING_NAME); + const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`; + React.useEffect(() => { + if (titleId) { + const hasTitle = document.getElementById(titleId); + if (!hasTitle) console.error(MESSAGE); + } + }, [MESSAGE, titleId]); + return null; +}; +var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning"; +var DescriptionWarning = ({ contentRef, descriptionId }) => { + const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME); + const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`; + React.useEffect(() => { + const describedById = contentRef.current?.getAttribute("aria-describedby"); + if (descriptionId && describedById) { + const hasDescription = document.getElementById(descriptionId); + if (!hasDescription) console.warn(MESSAGE); + } + }, [MESSAGE, contentRef, descriptionId]); + return null; +}; +var Root = Dialog; +var Trigger = DialogTrigger; +var Portal = DialogPortal; +var Overlay = DialogOverlay; +var Content = DialogContent; +var Title = DialogTitle; +var Description = DialogDescription; +var Close = DialogClose; +export { + Close, + Content, + Description, + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogOverlay, + DialogPortal, + DialogTitle, + DialogTrigger, + Overlay, + Portal, + Root, + Title, + Trigger, + WarningProvider, + createDialogScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..53a66fe33fde53767f6e1ac807454f48bf075acd --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/dialog.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContext, createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { hideOthers } from 'aria-hidden';\nimport { createSlot } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst DIALOG_NAME = 'Dialog';\n\ntype ScopedProps

= P & { __scopeDialog?: Scope };\nconst [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\n\ntype DialogContextValue = {\n triggerRef: React.RefObject;\n contentRef: React.RefObject;\n contentId: string;\n titleId: string;\n descriptionId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\n\ninterface DialogProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst Dialog: React.FC = (props: ScopedProps) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME,\n });\n\n return (\n setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n {children}\n \n );\n};\n\nDialog.displayName = DIALOG_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DialogTrigger';\n\ntype DialogTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface DialogTriggerProps extends PrimitiveButtonProps {}\n\nconst DialogTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return (\n \n );\n }\n);\n\nDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DialogPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface DialogPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogPortal: React.FC = (props: ScopedProps) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return (\n \n {React.Children.map(children, (child) => (\n \n \n {child}\n \n \n ))}\n \n );\n};\n\nDialogPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'DialogOverlay';\n\ntype DialogOverlayElement = DialogOverlayImplElement;\ninterface DialogOverlayProps extends DialogOverlayImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogOverlay = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? (\n \n \n \n ) : null;\n }\n);\n\nDialogOverlay.displayName = OVERLAY_NAME;\n\ntype DialogOverlayImplElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface DialogOverlayImplProps extends PrimitiveDivProps {}\n\nconst Slot = createSlot('DialogOverlay.RemoveScroll');\n\nconst DialogOverlayImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n \n \n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DialogContent';\n\ntype DialogContentElement = DialogContentTypeElement;\ninterface DialogContentProps extends DialogContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst DialogContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return (\n \n {context.modal ? (\n \n ) : (\n \n )}\n \n );\n }\n);\n\nDialogContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentTypeElement = DialogContentImplElement;\ninterface DialogContentTypeProps\n extends Omit {}\n\nconst DialogContentModal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n {\n event.preventDefault();\n context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n // If the event is a right-click, we shouldn't close because\n // it is effectively as if we right-clicked the `Overlay`.\n if (isRightClick) event.preventDefault();\n })}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) =>\n event.preventDefault()\n )}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst DialogContentNonModal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentImplElement = React.ComponentRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype FocusScopeProps = React.ComponentPropsWithoutRef;\ninterface DialogContentImplProps extends Omit {\n /**\n * When `true`, focus cannot escape the `Content` via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst DialogContentImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n\n // Make sure the whole tree has focus guards as our `Dialog` will be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n <>\n \n context.onOpenChange(false)}\n />\n \n {process.env.NODE_ENV !== 'production' && (\n <>\n \n \n \n )}\n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'DialogTitle';\n\ntype DialogTitleElement = React.ComponentRef;\ntype PrimitiveHeading2Props = React.ComponentPropsWithoutRef;\ninterface DialogTitleProps extends PrimitiveHeading2Props {}\n\nconst DialogTitle = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return ;\n }\n);\n\nDialogTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'DialogDescription';\n\ntype DialogDescriptionElement = React.ComponentRef;\ntype PrimitiveParagraphProps = React.ComponentPropsWithoutRef;\ninterface DialogDescriptionProps extends PrimitiveParagraphProps {}\n\nconst DialogDescription = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return ;\n }\n);\n\nDialogDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'DialogClose';\n\ntype DialogCloseElement = React.ComponentRef;\ninterface DialogCloseProps extends PrimitiveButtonProps {}\n\nconst DialogClose = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return (\n context.onOpenChange(false))}\n />\n );\n }\n);\n\nDialogClose.displayName = CLOSE_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst TITLE_WARNING_NAME = 'DialogTitleWarning';\n\nconst [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: 'dialog',\n});\n\ntype TitleWarningProps = { titleId?: string };\n\nconst TitleWarning: React.FC = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n\n return null;\n};\n\nconst DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject;\n descriptionId?: string;\n};\n\nconst DescriptionWarning: React.FC = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute('aria-describedby');\n // if we have an id and the user hasn't set aria-describedby={undefined}\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n\n return null;\n};\n\nconst Root = Dialog;\nconst Trigger = DialogTrigger;\nconst Portal = DialogPortal;\nconst Overlay = DialogOverlay;\nconst Content = DialogContent;\nconst Title = DialogTitle;\nconst Description = DialogDescription;\nconst Close = DialogClose;\n\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Title,\n Description,\n Close,\n //\n WarningProvider,\n};\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,eAAe,0BAA0B;AAClD,SAAS,aAAa;AACtB,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,SAAS,UAAU,uBAAuB;AAC1C,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAsDvB,SA2VM,UA3VN,KA2VM,YA3VN;AA9CJ,IAAM,cAAc;AAGpB,IAAM,CAAC,qBAAqB,iBAAiB,IAAI,mBAAmB,WAAW;AAc/E,IAAM,CAAC,gBAAgB,gBAAgB,IAAI,oBAAwC,WAAW;AAU9F,IAAM,SAAgC,CAAC,UAAoC;AACzE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV,IAAI;AACJ,QAAM,aAAmB,aAA0B,IAAI;AACvD,QAAM,aAAmB,aAA6B,IAAI;AAC1D,QAAM,CAAC,MAAM,OAAO,IAAI,qBAAqB;AAAA,IAC3C,MAAM;AAAA,IACN,aAAa,eAAe;AAAA,IAC5B,UAAU;AAAA,IACV,QAAQ;AAAA,EACV,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA,WAAW,MAAM;AAAA,MACjB,SAAS,MAAM;AAAA,MACf,eAAe,MAAM;AAAA,MACrB;AAAA,MACA,cAAc;AAAA,MACd,cAAoB,kBAAY,MAAM,QAAQ,C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,QAAM,sBAAsB,kBAAkB,kBAAkB;AAEhE,QAAM,UAAU,KAAK,oBAAoB,WAAW,mBAAmB,oBAAoB,SAAS;AAAA;AAAA,4BAE1E,oBAAoB,SAAS;AAAA;AAAA,4EAEmB,oBAAoB,QAAQ;AAEtG,EAAM,gBAAU,MAAM;AACpB,QAAI,SAAS;AACX,YAAM,WAAW,SAAS,eAAe,OAAO;AAChD,UAAI,CAAC,SAAU,SAAQ,MAAM,OAAO;AAAA,IACtC;AAAA,EACF,GAAG,CAAC,SAAS,OAAO,CAAC;AAErB,SAAO;AACT;AAEA,IAAM,2BAA2B;AAOjC,IAAM,qBAAwD,CAAC,EAAE,YAAY,cAAc,MAAM;AAC/F,QAAM,4BAA4B,kBAAkB,wBAAwB;AAC5E,QAAM,UAAU,6EAA6E,0BAA0B,WAAW;AAElI,EAAM,gBAAU,MAAM;AACpB,UAAM,gBAAgB,WAAW,SAAS,aAAa,kBAAkB;AAEzE,QAAI,iBAAiB,eAAe;AAClC,YAAM,iBAAiB,SAAS,eAAe,aAAa;AAC5D,UAAI,CAAC,eAAgB,SAAQ,KAAK,OAAO;AAAA,IAC3C;AAAA,EACF,GAAG,CAAC,SAAS,YAAY,aAAa,CAAC;AAEvC,SAAO;AACT;AAEA,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAM,SAAS;AACf,IAAM,UAAU;AAChB,IAAM,UAAU;AAChB,IAAM,QAAQ;AACd,IAAM,cAAc;AACpB,IAAM,QAAQ;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/package.json b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/package.json new file mode 100644 index 0000000000000000000000000000000000000000..bc7d43d07f8ad679c86b8bca3a234fb39c21009e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_65a8b6345f5fd410eff6fc0c55ad88c4/node_modules/@radix-ui/react-dialog/package.json @@ -0,0 +1,81 @@ +{ + "name": "@radix-ui/react-dialog", + "version": "1.1.15", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3", + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-dismissable-layer": "1.1.11", + "@radix-ui/react-focus-scope": "1.1.7", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-focus-guards": "1.1.3", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-portal": "1.1.9", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-slot": "1.2.3", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/README.md b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d11d6ea6125ef0da5082051b11c583519507b698 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/README.md @@ -0,0 +1,13 @@ +# `react-direction` + +## Installation + +```sh +$ yarn add @radix-ui/react-direction +# or +$ npm install @radix-ui/react-direction +``` + +## Usage + +View docs [here](https://radix-ui.com/primitives/docs/utilities/direction). diff --git a/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b0f8834145f6a11f8864b08b5e770aa39ecfa9a5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.d.mts @@ -0,0 +1,12 @@ +import * as React from 'react'; + +type Direction = 'ltr' | 'rtl'; +interface DirectionProviderProps { + children?: React.ReactNode; + dir: Direction; +} +declare const DirectionProvider: React.FC; +declare function useDirection(localDir?: Direction): Direction; +declare const Provider: React.FC; + +export { DirectionProvider, Provider, useDirection }; diff --git a/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b0f8834145f6a11f8864b08b5e770aa39ecfa9a5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; + +type Direction = 'ltr' | 'rtl'; +interface DirectionProviderProps { + children?: React.ReactNode; + dir: Direction; +} +declare const DirectionProvider: React.FC; +declare function useDirection(localDir?: Direction): Direction; +declare const Provider: React.FC; + +export { DirectionProvider, Provider, useDirection }; diff --git a/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.js b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5bbb59f7f7ef390bd1c48d70951eb8c9ab0dcbcb --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.js @@ -0,0 +1,52 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/react/direction/src/index.ts +var index_exports = {}; +__export(index_exports, { + DirectionProvider: () => DirectionProvider, + Provider: () => Provider, + useDirection: () => useDirection +}); +module.exports = __toCommonJS(index_exports); + +// packages/react/direction/src/direction.tsx +var React = __toESM(require("react")); +var import_jsx_runtime = require("react/jsx-runtime"); +var DirectionContext = React.createContext(void 0); +var DirectionProvider = (props) => { + const { dir, children } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DirectionContext.Provider, { value: dir, children }); +}; +function useDirection(localDir) { + const globalDir = React.useContext(DirectionContext); + return localDir || globalDir || "ltr"; +} +var Provider = DirectionProvider; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..96e93d8332c3333c1eb1a1280c9b13836aeaeb62 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/direction.tsx"], + "sourcesContent": ["export {\n useDirection,\n //\n Provider,\n //\n DirectionProvider,\n} from './direction';\n", "import * as React from 'react';\n\ntype Direction = 'ltr' | 'rtl';\nconst DirectionContext = React.createContext(undefined);\n\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DirectionProviderProps {\n children?: React.ReactNode;\n dir: Direction;\n}\nconst DirectionProvider: React.FC = (props) => {\n const { dir, children } = props;\n return {children};\n};\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction useDirection(localDir?: Direction) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || 'ltr';\n}\n\nconst Provider = DirectionProvider;\n\nexport {\n useDirection,\n //\n Provider,\n //\n DirectionProvider,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAed;AAZT,IAAM,mBAAyB,oBAAqC,MAAS;AAU7E,IAAM,oBAAsD,CAAC,UAAU;AACrE,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SAAO,4CAAC,iBAAiB,UAAjB,EAA0B,OAAO,KAAM,UAAS;AAC1D;AAIA,SAAS,aAAa,UAAsB;AAC1C,QAAM,YAAkB,iBAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEA,IAAM,WAAW;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c72b0d83008dfecdfb3f4649aab8121d8868de5b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.mjs @@ -0,0 +1,19 @@ +// packages/react/direction/src/direction.tsx +import * as React from "react"; +import { jsx } from "react/jsx-runtime"; +var DirectionContext = React.createContext(void 0); +var DirectionProvider = (props) => { + const { dir, children } = props; + return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children }); +}; +function useDirection(localDir) { + const globalDir = React.useContext(DirectionContext); + return localDir || globalDir || "ltr"; +} +var Provider = DirectionProvider; +export { + DirectionProvider, + Provider, + useDirection +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..48a384d2295324fee3ece32fb8603ff61e8ee7a6 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/direction.tsx"], + "sourcesContent": ["import * as React from 'react';\n\ntype Direction = 'ltr' | 'rtl';\nconst DirectionContext = React.createContext(undefined);\n\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DirectionProviderProps {\n children?: React.ReactNode;\n dir: Direction;\n}\nconst DirectionProvider: React.FC = (props) => {\n const { dir, children } = props;\n return {children};\n};\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction useDirection(localDir?: Direction) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || 'ltr';\n}\n\nconst Provider = DirectionProvider;\n\nexport {\n useDirection,\n //\n Provider,\n //\n DirectionProvider,\n};\n"], + "mappings": ";AAAA,YAAY,WAAW;AAed;AAZT,IAAM,mBAAyB,oBAAqC,MAAS;AAU7E,IAAM,oBAAsD,CAAC,UAAU;AACrE,QAAM,EAAE,KAAK,SAAS,IAAI;AAC1B,SAAO,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,KAAM,UAAS;AAC1D;AAIA,SAAS,aAAa,UAAsB;AAC1C,QAAM,YAAkB,iBAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;AAEA,IAAM,WAAW;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/package.json b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/package.json new file mode 100644 index 0000000000000000000000000000000000000000..2ff3740b6a5e56ca337a8229876d9c17144cd571 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-direction/package.json @@ -0,0 +1,75 @@ +{ + "name": "@radix-ui/react-direction", + "version": "1.1.1", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "typescript": "^5.7.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/LICENSE b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/README.md b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fbb8e092a16d1a67c3f08c573303b40997c0c086 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/README.md @@ -0,0 +1,3 @@ +# `react-dismissable-layer` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..dccc025abb4e6a600e8c6e86abeac76942f7bb8d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts @@ -0,0 +1,51 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface DismissableLayerProps extends PrimitiveDivProps { + /** + * When `true`, hover/focus/click interactions will be disabled on elements outside + * the `DismissableLayer`. Users will need to click twice on outside elements to + * interact with them: once to close the `DismissableLayer`, and again to trigger the element. + */ + disableOutsidePointerEvents?: boolean; + /** + * Event handler called when the escape key is down. + * Can be prevented. + */ + onEscapeKeyDown?: (event: KeyboardEvent) => void; + /** + * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`. + * Can be prevented. + */ + onPointerDownOutside?: (event: PointerDownOutsideEvent) => void; + /** + * Event handler called when the focus moves outside of the `DismissableLayer`. + * Can be prevented. + */ + onFocusOutside?: (event: FocusOutsideEvent) => void; + /** + * Event handler called when an interaction happens outside the `DismissableLayer`. + * Specifically, when a `pointerdown` event happens outside or focus moves outside of it. + * Can be prevented. + */ + onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void; + /** + * Handler called when the `DismissableLayer` should be dismissed + */ + onDismiss?: () => void; +} +declare const DismissableLayer: React.ForwardRefExoticComponent>; +interface DismissableLayerBranchProps extends PrimitiveDivProps { +} +declare const DismissableLayerBranch: React.ForwardRefExoticComponent>; +type PointerDownOutsideEvent = CustomEvent<{ + originalEvent: PointerEvent; +}>; +type FocusOutsideEvent = CustomEvent<{ + originalEvent: FocusEvent; +}>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Branch: React.ForwardRefExoticComponent>; + +export { Branch, DismissableLayer, DismissableLayerBranch, type DismissableLayerProps, Root }; diff --git a/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..dccc025abb4e6a600e8c6e86abeac76942f7bb8d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts @@ -0,0 +1,51 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface DismissableLayerProps extends PrimitiveDivProps { + /** + * When `true`, hover/focus/click interactions will be disabled on elements outside + * the `DismissableLayer`. Users will need to click twice on outside elements to + * interact with them: once to close the `DismissableLayer`, and again to trigger the element. + */ + disableOutsidePointerEvents?: boolean; + /** + * Event handler called when the escape key is down. + * Can be prevented. + */ + onEscapeKeyDown?: (event: KeyboardEvent) => void; + /** + * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`. + * Can be prevented. + */ + onPointerDownOutside?: (event: PointerDownOutsideEvent) => void; + /** + * Event handler called when the focus moves outside of the `DismissableLayer`. + * Can be prevented. + */ + onFocusOutside?: (event: FocusOutsideEvent) => void; + /** + * Event handler called when an interaction happens outside the `DismissableLayer`. + * Specifically, when a `pointerdown` event happens outside or focus moves outside of it. + * Can be prevented. + */ + onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void; + /** + * Handler called when the `DismissableLayer` should be dismissed + */ + onDismiss?: () => void; +} +declare const DismissableLayer: React.ForwardRefExoticComponent>; +interface DismissableLayerBranchProps extends PrimitiveDivProps { +} +declare const DismissableLayerBranch: React.ForwardRefExoticComponent>; +type PointerDownOutsideEvent = CustomEvent<{ + originalEvent: PointerEvent; +}>; +type FocusOutsideEvent = CustomEvent<{ + originalEvent: FocusEvent; +}>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Branch: React.ForwardRefExoticComponent>; + +export { Branch, DismissableLayer, DismissableLayerBranch, type DismissableLayerProps, Root }; diff --git a/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.js b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..16c48898e85048392a31e654c9c072c0d8d7ad18 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.js @@ -0,0 +1,253 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Branch: () => Branch, + DismissableLayer: () => DismissableLayer, + DismissableLayerBranch: () => DismissableLayerBranch, + Root: () => Root +}); +module.exports = __toCommonJS(index_exports); + +// src/dismissable-layer.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref"); +var import_react_use_escape_keydown = require("@radix-ui/react-use-escape-keydown"); +var import_jsx_runtime = require("react/jsx-runtime"); +var DISMISSABLE_LAYER_NAME = "DismissableLayer"; +var CONTEXT_UPDATE = "dismissableLayer.update"; +var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside"; +var FOCUS_OUTSIDE = "dismissableLayer.focusOutside"; +var originalBodyPointerEvents; +var DismissableLayerContext = React.createContext({ + layers: /* @__PURE__ */ new Set(), + layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(), + branches: /* @__PURE__ */ new Set() +}); +var DismissableLayer = React.forwardRef( + (props, forwardedRef) => { + const { + disableOutsidePointerEvents = false, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onInteractOutside, + onDismiss, + ...layerProps + } = props; + const context = React.useContext(DismissableLayerContext); + const [node, setNode] = React.useState(null); + const ownerDocument = node?.ownerDocument ?? globalThis?.document; + const [, force] = React.useState({}); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node2) => setNode(node2)); + const layers = Array.from(context.layers); + const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1); + const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); + const index = node ? layers.indexOf(node) : -1; + const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0; + const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex; + const pointerDownOutside = usePointerDownOutside((event) => { + const target = event.target; + const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target)); + if (!isPointerEventsEnabled || isPointerDownOnBranch) return; + onPointerDownOutside?.(event); + onInteractOutside?.(event); + if (!event.defaultPrevented) onDismiss?.(); + }, ownerDocument); + const focusOutside = useFocusOutside((event) => { + const target = event.target; + const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target)); + if (isFocusInBranch) return; + onFocusOutside?.(event); + onInteractOutside?.(event); + if (!event.defaultPrevented) onDismiss?.(); + }, ownerDocument); + (0, import_react_use_escape_keydown.useEscapeKeydown)((event) => { + const isHighestLayer = index === context.layers.size - 1; + if (!isHighestLayer) return; + onEscapeKeyDown?.(event); + if (!event.defaultPrevented && onDismiss) { + event.preventDefault(); + onDismiss(); + } + }, ownerDocument); + React.useEffect(() => { + if (!node) return; + if (disableOutsidePointerEvents) { + if (context.layersWithOutsidePointerEventsDisabled.size === 0) { + originalBodyPointerEvents = ownerDocument.body.style.pointerEvents; + ownerDocument.body.style.pointerEvents = "none"; + } + context.layersWithOutsidePointerEventsDisabled.add(node); + } + context.layers.add(node); + dispatchUpdate(); + return () => { + if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) { + ownerDocument.body.style.pointerEvents = originalBodyPointerEvents; + } + }; + }, [node, ownerDocument, disableOutsidePointerEvents, context]); + React.useEffect(() => { + return () => { + if (!node) return; + context.layers.delete(node); + context.layersWithOutsidePointerEventsDisabled.delete(node); + dispatchUpdate(); + }; + }, [node, context]); + React.useEffect(() => { + const handleUpdate = () => force({}); + document.addEventListener(CONTEXT_UPDATE, handleUpdate); + return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate); + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + ...layerProps, + ref: composedRefs, + style: { + pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0, + ...props.style + }, + onFocusCapture: (0, import_primitive.composeEventHandlers)(props.onFocusCapture, focusOutside.onFocusCapture), + onBlurCapture: (0, import_primitive.composeEventHandlers)(props.onBlurCapture, focusOutside.onBlurCapture), + onPointerDownCapture: (0, import_primitive.composeEventHandlers)( + props.onPointerDownCapture, + pointerDownOutside.onPointerDownCapture + ) + } + ); + } +); +DismissableLayer.displayName = DISMISSABLE_LAYER_NAME; +var BRANCH_NAME = "DismissableLayerBranch"; +var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => { + const context = React.useContext(DismissableLayerContext); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + React.useEffect(() => { + const node = ref.current; + if (node) { + context.branches.add(node); + return () => { + context.branches.delete(node); + }; + } + }, [context.branches]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { ...props, ref: composedRefs }); +}); +DismissableLayerBranch.displayName = BRANCH_NAME; +function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) { + const handlePointerDownOutside = (0, import_react_use_callback_ref.useCallbackRef)(onPointerDownOutside); + const isPointerInsideReactTreeRef = React.useRef(false); + const handleClickRef = React.useRef(() => { + }); + React.useEffect(() => { + const handlePointerDown = (event) => { + if (event.target && !isPointerInsideReactTreeRef.current) { + let handleAndDispatchPointerDownOutsideEvent2 = function() { + handleAndDispatchCustomEvent( + POINTER_DOWN_OUTSIDE, + handlePointerDownOutside, + eventDetail, + { discrete: true } + ); + }; + var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2; + const eventDetail = { originalEvent: event }; + if (event.pointerType === "touch") { + ownerDocument.removeEventListener("click", handleClickRef.current); + handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2; + ownerDocument.addEventListener("click", handleClickRef.current, { once: true }); + } else { + handleAndDispatchPointerDownOutsideEvent2(); + } + } else { + ownerDocument.removeEventListener("click", handleClickRef.current); + } + isPointerInsideReactTreeRef.current = false; + }; + const timerId = window.setTimeout(() => { + ownerDocument.addEventListener("pointerdown", handlePointerDown); + }, 0); + return () => { + window.clearTimeout(timerId); + ownerDocument.removeEventListener("pointerdown", handlePointerDown); + ownerDocument.removeEventListener("click", handleClickRef.current); + }; + }, [ownerDocument, handlePointerDownOutside]); + return { + // ensures we check React component tree (not just DOM tree) + onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true + }; +} +function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) { + const handleFocusOutside = (0, import_react_use_callback_ref.useCallbackRef)(onFocusOutside); + const isFocusInsideReactTreeRef = React.useRef(false); + React.useEffect(() => { + const handleFocus = (event) => { + if (event.target && !isFocusInsideReactTreeRef.current) { + const eventDetail = { originalEvent: event }; + handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, { + discrete: false + }); + } + }; + ownerDocument.addEventListener("focusin", handleFocus); + return () => ownerDocument.removeEventListener("focusin", handleFocus); + }, [ownerDocument, handleFocusOutside]); + return { + onFocusCapture: () => isFocusInsideReactTreeRef.current = true, + onBlurCapture: () => isFocusInsideReactTreeRef.current = false + }; +} +function dispatchUpdate() { + const event = new CustomEvent(CONTEXT_UPDATE); + document.dispatchEvent(event); +} +function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) { + const target = detail.originalEvent.target; + const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail }); + if (handler) target.addEventListener(name, handler, { once: true }); + if (discrete) { + (0, import_react_primitive.dispatchDiscreteCustomEvent)(target, event); + } else { + target.dispatchEvent(event); + } +} +var Root = DismissableLayer; +var Branch = DismissableLayerBranch; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3fbc3be76cdd64bc578845c194cfa54bec803b68 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/dismissable-layer.tsx"], + "sourcesContent": ["'use client';\nexport {\n DismissableLayer,\n DismissableLayerBranch,\n //\n Root,\n Branch,\n} from './dismissable-layer';\nexport type { DismissableLayerProps } from './dismissable-layer';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useEscapeKeydown } from '@radix-ui/react-use-escape-keydown';\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayer\n * -----------------------------------------------------------------------------------------------*/\n\nconst DISMISSABLE_LAYER_NAME = 'DismissableLayer';\nconst CONTEXT_UPDATE = 'dismissableLayer.update';\nconst POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nconst FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\n\nlet originalBodyPointerEvents: string;\n\nconst DismissableLayerContext = React.createContext({\n layers: new Set(),\n layersWithOutsidePointerEventsDisabled: new Set(),\n branches: new Set(),\n});\n\ntype DismissableLayerElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface DismissableLayerProps extends PrimitiveDivProps {\n /**\n * When `true`, hover/focus/click interactions will be disabled on elements outside\n * the `DismissableLayer`. Users will need to click twice on outside elements to\n * interact with them: once to close the `DismissableLayer`, and again to trigger the element.\n */\n disableOutsidePointerEvents?: boolean;\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;\n /**\n * Event handler called when the focus moves outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void;\n /**\n * Event handler called when an interaction happens outside the `DismissableLayer`.\n * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n * Can be prevented.\n */\n onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;\n /**\n * Handler called when the `DismissableLayer` should be dismissed\n */\n onDismiss?: () => void;\n}\n\nconst DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node) => setNode(node));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1); // prettier-ignore\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled!); // prettier-ignore\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target as HTMLElement;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n const focusOutside = useFocusOutside((event) => {\n const target = event.target as HTMLElement;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = 'none';\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (\n disableOutsidePointerEvents &&\n context.layersWithOutsidePointerEventsDisabled.size === 1\n ) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n\n /**\n * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect\n * because a change to `disableOutsidePointerEvents` would remove this layer from the stack\n * and add it to the end again so the layering order wouldn't be _creation order_.\n * We only want them to be removed from context stacks when unmounted.\n */\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n\n return (\n \n );\n }\n);\n\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayerBranch\n * -----------------------------------------------------------------------------------------------*/\n\nconst BRANCH_NAME = 'DismissableLayerBranch';\n\ntype DismissableLayerBranchElement = React.ComponentRef;\ninterface DismissableLayerBranchProps extends PrimitiveDivProps {}\n\nconst DismissableLayerBranch = React.forwardRef<\n DismissableLayerBranchElement,\n DismissableLayerBranchProps\n>((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n\n return ;\n});\n\nDismissableLayerBranch.displayName = BRANCH_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PointerDownOutsideEvent = CustomEvent<{ originalEvent: PointerEvent }>;\ntype FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent }>;\n\n/**\n * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */\nfunction usePointerDownOutside(\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside) as EventListener;\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {});\n\n React.useEffect(() => {\n const handlePointerDown = (event: PointerEvent) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n\n function handleAndDispatchPointerDownOutsideEvent() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n }\n\n /**\n * On touch devices, we need to wait for a click event because browsers implement\n * a ~350ms delay between the time the user stops touching the display and when the\n * browser executres events. We need to ensure we don't reactivate pointer-events within\n * this timeframe otherwise the browser may execute events that should have been prevented.\n *\n * Additionally, this also lets us deal automatically with cancellations when a click event\n * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n *\n * This is why we also continuously remove the previous listener, because we cannot be\n * certain that it was raised, and therefore cleaned-up.\n */\n if (event.pointerType === 'touch') {\n ownerDocument.removeEventListener('click', handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n ownerDocument.addEventListener('click', handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent();\n }\n } else {\n // We need to remove the event listener in case the outside click has been canceled.\n // See: https://github.com/radix-ui/primitives/issues/2171\n ownerDocument.removeEventListener('click', handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n /**\n * if this hook executes in a component that mounts via a `pointerdown` event, the event\n * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n * this by delaying the event listener registration on the document.\n * This is not React specific, but rather how the DOM works, ie:\n * ```\n * button.addEventListener('pointerdown', () => {\n * console.log('I will log');\n * document.addEventListener('pointerdown', () => {\n * console.log('I will also log');\n * })\n * });\n */\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener('pointerdown', handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener('pointerdown', handlePointerDown);\n ownerDocument.removeEventListener('click', handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => (isPointerInsideReactTreeRef.current = true),\n };\n}\n\n/**\n * Listens for when focus happens outside a react subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */\nfunction useFocusOutside(\n onFocusOutside?: (event: FocusOutsideEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const handleFocusOutside = useCallbackRef(onFocusOutside) as EventListener;\n const isFocusInsideReactTreeRef = React.useRef(false);\n\n React.useEffect(() => {\n const handleFocus = (event: FocusEvent) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false,\n });\n }\n };\n ownerDocument.addEventListener('focusin', handleFocus);\n return () => ownerDocument.removeEventListener('focusin', handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n\n return {\n onFocusCapture: () => (isFocusInsideReactTreeRef.current = true),\n onBlurCapture: () => (isFocusInsideReactTreeRef.current = false),\n };\n}\n\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\n\nfunction handleAndDispatchCustomEvent(\n name: string,\n handler: ((event: E) => void) | undefined,\n detail: { originalEvent: OriginalEvent } & (E extends CustomEvent ? D : never),\n { discrete }: { discrete: boolean }\n) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler as EventListener, { once: true });\n\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\n\nconst Root = DismissableLayer;\nconst Branch = DismissableLayerBranch;\n\nexport {\n DismissableLayer,\n DismissableLayerBranch,\n //\n Root,\n Branch,\n};\nexport type { DismissableLayerProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,6BAAuD;AACvD,gCAAgC;AAChC,oCAA+B;AAC/B,sCAAiC;AAqJ3B;AA/IN,IAAM,yBAAyB;AAC/B,IAAM,iBAAiB;AACvB,IAAM,uBAAuB;AAC7B,IAAM,gBAAgB;AAEtB,IAAI;AAEJ,IAAM,0BAAgC,oBAAc;AAAA,EAClD,QAAQ,oBAAI,IAA6B;AAAA,EACzC,wCAAwC,oBAAI,IAA6B;AAAA,EACzE,UAAU,oBAAI,IAAmC;AACnD,CAAC;AAsCD,IAAM,mBAAyB;AAAA,EAC7B,CAAC,OA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C5C,WAAS,cAAc,KAAK;AAC9B;AAEA,SAAS,6BACP,MACA,SACA,QACA,EAAE,SAAS,GACX;AACA,QAAM,SAAS,OAAO,cAAc;AACpC,QAAM,QAAQ,IAAI,YAAY,MAAM,EAAE,SAAS,OAAO,YAAY,MAAM,OAAO,CAAC;AAChF,MAAI,QAAS,QAAO,iBAAiB,MAAM,SAA0B,EAAE,MAAM,KAAK,CAAC;AAEnF,MAAI,UAAU;AACZ,4DAA4B,QAAQ,KAAK;AAAA,EAC3C,OAAO;AACL,WAAO,cAAc,KAAK;AAAA,EAC5B;AACF;AAEA,IAAM,OAAO;AACb,IAAM,SAAS;", + "names": ["node", "handleAndDispatchPointerDownOutsideEvent"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d668167e42ed3bacb20bf72ae6bbb78e411c378e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs @@ -0,0 +1,221 @@ +"use client"; + +// src/dismissable-layer.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { Primitive, dispatchDiscreteCustomEvent } from "@radix-ui/react-primitive"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { useCallbackRef } from "@radix-ui/react-use-callback-ref"; +import { useEscapeKeydown } from "@radix-ui/react-use-escape-keydown"; +import { jsx } from "react/jsx-runtime"; +var DISMISSABLE_LAYER_NAME = "DismissableLayer"; +var CONTEXT_UPDATE = "dismissableLayer.update"; +var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside"; +var FOCUS_OUTSIDE = "dismissableLayer.focusOutside"; +var originalBodyPointerEvents; +var DismissableLayerContext = React.createContext({ + layers: /* @__PURE__ */ new Set(), + layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(), + branches: /* @__PURE__ */ new Set() +}); +var DismissableLayer = React.forwardRef( + (props, forwardedRef) => { + const { + disableOutsidePointerEvents = false, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onInteractOutside, + onDismiss, + ...layerProps + } = props; + const context = React.useContext(DismissableLayerContext); + const [node, setNode] = React.useState(null); + const ownerDocument = node?.ownerDocument ?? globalThis?.document; + const [, force] = React.useState({}); + const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2)); + const layers = Array.from(context.layers); + const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1); + const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); + const index = node ? layers.indexOf(node) : -1; + const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0; + const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex; + const pointerDownOutside = usePointerDownOutside((event) => { + const target = event.target; + const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target)); + if (!isPointerEventsEnabled || isPointerDownOnBranch) return; + onPointerDownOutside?.(event); + onInteractOutside?.(event); + if (!event.defaultPrevented) onDismiss?.(); + }, ownerDocument); + const focusOutside = useFocusOutside((event) => { + const target = event.target; + const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target)); + if (isFocusInBranch) return; + onFocusOutside?.(event); + onInteractOutside?.(event); + if (!event.defaultPrevented) onDismiss?.(); + }, ownerDocument); + useEscapeKeydown((event) => { + const isHighestLayer = index === context.layers.size - 1; + if (!isHighestLayer) return; + onEscapeKeyDown?.(event); + if (!event.defaultPrevented && onDismiss) { + event.preventDefault(); + onDismiss(); + } + }, ownerDocument); + React.useEffect(() => { + if (!node) return; + if (disableOutsidePointerEvents) { + if (context.layersWithOutsidePointerEventsDisabled.size === 0) { + originalBodyPointerEvents = ownerDocument.body.style.pointerEvents; + ownerDocument.body.style.pointerEvents = "none"; + } + context.layersWithOutsidePointerEventsDisabled.add(node); + } + context.layers.add(node); + dispatchUpdate(); + return () => { + if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) { + ownerDocument.body.style.pointerEvents = originalBodyPointerEvents; + } + }; + }, [node, ownerDocument, disableOutsidePointerEvents, context]); + React.useEffect(() => { + return () => { + if (!node) return; + context.layers.delete(node); + context.layersWithOutsidePointerEventsDisabled.delete(node); + dispatchUpdate(); + }; + }, [node, context]); + React.useEffect(() => { + const handleUpdate = () => force({}); + document.addEventListener(CONTEXT_UPDATE, handleUpdate); + return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate); + }, []); + return /* @__PURE__ */ jsx( + Primitive.div, + { + ...layerProps, + ref: composedRefs, + style: { + pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0, + ...props.style + }, + onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture), + onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture), + onPointerDownCapture: composeEventHandlers( + props.onPointerDownCapture, + pointerDownOutside.onPointerDownCapture + ) + } + ); + } +); +DismissableLayer.displayName = DISMISSABLE_LAYER_NAME; +var BRANCH_NAME = "DismissableLayerBranch"; +var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => { + const context = React.useContext(DismissableLayerContext); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref); + React.useEffect(() => { + const node = ref.current; + if (node) { + context.branches.add(node); + return () => { + context.branches.delete(node); + }; + } + }, [context.branches]); + return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs }); +}); +DismissableLayerBranch.displayName = BRANCH_NAME; +function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) { + const handlePointerDownOutside = useCallbackRef(onPointerDownOutside); + const isPointerInsideReactTreeRef = React.useRef(false); + const handleClickRef = React.useRef(() => { + }); + React.useEffect(() => { + const handlePointerDown = (event) => { + if (event.target && !isPointerInsideReactTreeRef.current) { + let handleAndDispatchPointerDownOutsideEvent2 = function() { + handleAndDispatchCustomEvent( + POINTER_DOWN_OUTSIDE, + handlePointerDownOutside, + eventDetail, + { discrete: true } + ); + }; + var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2; + const eventDetail = { originalEvent: event }; + if (event.pointerType === "touch") { + ownerDocument.removeEventListener("click", handleClickRef.current); + handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2; + ownerDocument.addEventListener("click", handleClickRef.current, { once: true }); + } else { + handleAndDispatchPointerDownOutsideEvent2(); + } + } else { + ownerDocument.removeEventListener("click", handleClickRef.current); + } + isPointerInsideReactTreeRef.current = false; + }; + const timerId = window.setTimeout(() => { + ownerDocument.addEventListener("pointerdown", handlePointerDown); + }, 0); + return () => { + window.clearTimeout(timerId); + ownerDocument.removeEventListener("pointerdown", handlePointerDown); + ownerDocument.removeEventListener("click", handleClickRef.current); + }; + }, [ownerDocument, handlePointerDownOutside]); + return { + // ensures we check React component tree (not just DOM tree) + onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true + }; +} +function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) { + const handleFocusOutside = useCallbackRef(onFocusOutside); + const isFocusInsideReactTreeRef = React.useRef(false); + React.useEffect(() => { + const handleFocus = (event) => { + if (event.target && !isFocusInsideReactTreeRef.current) { + const eventDetail = { originalEvent: event }; + handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, { + discrete: false + }); + } + }; + ownerDocument.addEventListener("focusin", handleFocus); + return () => ownerDocument.removeEventListener("focusin", handleFocus); + }, [ownerDocument, handleFocusOutside]); + return { + onFocusCapture: () => isFocusInsideReactTreeRef.current = true, + onBlurCapture: () => isFocusInsideReactTreeRef.current = false + }; +} +function dispatchUpdate() { + const event = new CustomEvent(CONTEXT_UPDATE); + document.dispatchEvent(event); +} +function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) { + const target = detail.originalEvent.target; + const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail }); + if (handler) target.addEventListener(name, handler, { once: true }); + if (discrete) { + dispatchDiscreteCustomEvent(target, event); + } else { + target.dispatchEvent(event); + } +} +var Root = DismissableLayer; +var Branch = DismissableLayerBranch; +export { + Branch, + DismissableLayer, + DismissableLayerBranch, + Root +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..8cce9fa8c4c45d66c07c0dc4cb9b22d39ceeea86 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/dismissable-layer.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useEscapeKeydown } from '@radix-ui/react-use-escape-keydown';\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayer\n * -----------------------------------------------------------------------------------------------*/\n\nconst DISMISSABLE_LAYER_NAME = 'DismissableLayer';\nconst CONTEXT_UPDATE = 'dismissableLayer.update';\nconst POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nconst FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\n\nlet originalBodyPointerEvents: string;\n\nconst DismissableLayerContext = React.createContext({\n layers: new Set(),\n layersWithOutsidePointerEventsDisabled: new Set(),\n branches: new Set(),\n});\n\ntype DismissableLayerElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface DismissableLayerProps extends PrimitiveDivProps {\n /**\n * When `true`, hover/focus/click interactions will be disabled on elements outside\n * the `DismissableLayer`. Users will need to click twice on outside elements to\n * interact with them: once to close the `DismissableLayer`, and again to trigger the element.\n */\n disableOutsidePointerEvents?: boolean;\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;\n /**\n * Event handler called when the focus moves outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void;\n /**\n * Event handler called when an interaction happens outside the `DismissableLayer`.\n * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n * Can be prevented.\n */\n onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;\n /**\n * Handler called when the `DismissableLayer` should be dismissed\n */\n onDismiss?: () => void;\n}\n\nconst DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node) => setNode(node));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1); // prettier-ignore\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled!); // prettier-ignore\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target as HTMLElement;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n const focusOutside = useFocusOutside((event) => {\n const target = event.target as HTMLElement;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = 'none';\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (\n disableOutsidePointerEvents &&\n context.layersWithOutsidePointerEventsDisabled.size === 1\n ) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n\n /**\n * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect\n * because a change to `disableOutsidePointerEvents` would remove this layer from the stack\n * and add it to the end again so the layering order wouldn't be _creation order_.\n * We only want them to be removed from context stacks when unmounted.\n */\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n\n return (\n \n );\n }\n);\n\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayerBranch\n * -----------------------------------------------------------------------------------------------*/\n\nconst BRANCH_NAME = 'DismissableLayerBranch';\n\ntype DismissableLayerBranchElement = React.ComponentRef;\ninterface DismissableLayerBranchProps extends PrimitiveDivProps {}\n\nconst DismissableLayerBranch = React.forwardRef<\n DismissableLayerBranchElement,\n DismissableLayerBranchProps\n>((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n\n return ;\n});\n\nDismissableLayerBranch.displayName = BRANCH_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PointerDownOutsideEvent = CustomEvent<{ originalEvent: PointerEvent }>;\ntype FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent }>;\n\n/**\n * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */\nfunction usePointerDownOutside(\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside) as EventListener;\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {});\n\n React.useEffect(() => {\n const handlePointerDown = (event: PointerEvent) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n\n function handleAndDispatchPointerDownOutsideEvent() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n }\n\n /**\n * On touch devices, we need to wait for a click event because browsers implement\n * a ~350ms delay between the time the user stops touching the display and when the\n * browser executres events. We need to ensure we don't reactivate pointer-events within\n * this timeframe otherwise the browser may execute events that should have been prevented.\n *\n * Additionally, this also lets us deal automatically with cancellations when a click event\n * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n *\n * This is why we also continuously remove the previous listener, because we cannot be\n * certain that it was raised, and therefore cleaned-up.\n */\n if (event.pointerType === 'touch') {\n ownerDocument.removeEventListener('click', handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n ownerDocument.addEventListener('click', handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent();\n }\n } else {\n // We need to remove the event listener in case the outside click has been canceled.\n // See: https://github.com/radix-ui/primitives/issues/2171\n ownerDocument.removeEventListener('click', handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n /**\n * if this hook executes in a component that mounts via a `pointerdown` event, the event\n * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n * this by delaying the event listener registration on the document.\n * This is not React specific, but rather how the DOM works, ie:\n * ```\n * button.addEventListener('pointerdown', () => {\n * console.log('I will log');\n * document.addEventListener('pointerdown', () => {\n * console.log('I will also log');\n * })\n * });\n */\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener('pointerdown', handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener('pointerdown', handlePointerDown);\n ownerDocument.removeEventListener('click', handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => (isPointerInsideReactTreeRef.current = true),\n };\n}\n\n/**\n * Listens for when focus happens outside a react subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */\nfunction useFocusOutside(\n onFocusOutside?: (event: FocusOutsideEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const handleFocusOutside = useCallbackRef(onFocusOutside) as EventListener;\n const isFocusInsideReactTreeRef = React.useRef(false);\n\n React.useEffect(() => {\n const handleFocus = (event: FocusEvent) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false,\n });\n }\n };\n ownerDocument.addEventListener('focusin', handleFocus);\n return () => ownerDocument.removeEventListener('focusin', handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n\n return {\n onFocusCapture: () => (isFocusInsideReactTreeRef.current = true),\n onBlurCapture: () => (isFocusInsideReactTreeRef.current = false),\n };\n}\n\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\n\nfunction handleAndDispatchCustomEvent(\n name: string,\n handler: ((event: E) => void) | undefined,\n detail: { originalEvent: OriginalEvent } & (E extends CustomEvent ? D : never),\n { discrete }: { discrete: boolean }\n) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler as EventListener, { once: true });\n\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\n\nconst Root = DismissableLayer;\nconst Branch = DismissableLayerBranch;\n\nexport {\n DismissableLayer,\n DismissableLayerBranch,\n //\n Root,\n Branch,\n};\nexport type { DismissableLayerProps };\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,WAAW,mCAAmC;AACvD,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AAqJ3B;AA/IN,IAAM,yBAAyB;AAC/B,IAAM,iBAAiB;AACvB,IAAM,uBAAuB;AAC7B,IAAM,gBAAgB;AAEtB,IAAI;AAEJ,IAAM,0BAAgC,oBAAc;AAAA,EAClD,QAAQ,oBAAI,IAA6B;AAAA,EACzC,wCAAwC,oBAAI,IAA6B;AAAA,EACzE,UAAU,oBAAI,IAAmC;AACnD,CAAC;AAsCD,IAAM,mBAAyB;AAAA,EAC7B,CAAC,OAAO,iBAAiB;AACvB,UAAM;AAAA,MACJ,8BAA8B;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI;AACJ,UAAM,UAAgB,iBAAW,uBAAuB;AACxD,UAAM,CAAC,MAAM,OAAO,IAAU,eAAyC,IAAI;AAC3E,UAAM,gBAAgB,MAAM,iBAAiB,YAAY;AACzD,UAAM,CAAC,EAAE,KAAK,IAAU,eAAS,CAAC,CAAC;AACnC,UAAM,eAAe,gBAAgB,cAAc,CAACA,UAAS,QAAQA,KAAI,CAAC;AAC1E,UAAM,SAAS,MAAM,KAAK,QAAQ,MAAM;AACxC,UAAM,CAAC,4CAA4C,IAAI,CAAC,GAAG,QAAQ,sCAAsC,EAAE,MAAM,EAAE;AACnH,UAAM,oDAAoD,OAAO,QAAQ,4CAA6C;AACtH,UAAM,QAAQ,OAAO,OAAO,QAAQ,IAAI,IAAI;AAC5C,UAAM,8BAA8B,QAAQ,uCAAuC,OAAO;AAC1F,UAAM,yBAAyB,SAAS;AAExC,UAAM,qBAAq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C,aAAO,KAAK;AAEpD,EAAM,gBAAU,MAAM;AACpB,UAAM,cAAc,CAAC,UAAsB;AACzC,UAAI,MAAM,UAAU,CAAC,0BAA0B,SAAS;AACtD,cAAM,cAAc,EAAE,eAAe,MAAM;AAC3C,qCAA6B,eAAe,oBAAoB,aAAa;AAAA,UAC3E,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACF;AACA,kBAAc,iBAAiB,WAAW,WAAW;AACrD,WAAO,MAAM,cAAc,oBAAoB,WAAW,WAAW;AAAA,EACvE,GAAG,CAAC,eAAe,kBAAkB,CAAC;AAEtC,SAAO;AAAA,IACL,gBAAgB,MAAO,0BAA0B,UAAU;AAAA,IAC3D,eAAe,MAAO,0BAA0B,UAAU;AAAA,EAC5D;AACF;AAEA,SAAS,iBAAiB;AACxB,QAAM,QAAQ,IAAI,YAAY,cAAc;AAC5C,WAAS,cAAc,KAAK;AAC9B;AAEA,SAAS,6BACP,MACA,SACA,QACA,EAAE,SAAS,GACX;AACA,QAAM,SAAS,OAAO,cAAc;AACpC,QAAM,QAAQ,IAAI,YAAY,MAAM,EAAE,SAAS,OAAO,YAAY,MAAM,OAAO,CAAC;AAChF,MAAI,QAAS,QAAO,iBAAiB,MAAM,SAA0B,EAAE,MAAM,KAAK,CAAC;AAEnF,MAAI,UAAU;AACZ,gCAA4B,QAAQ,KAAK;AAAA,EAC3C,OAAO;AACL,WAAO,cAAc,KAAK;AAAA,EAC5B;AACF;AAEA,IAAM,OAAO;AACb,IAAM,SAAS;", + "names": ["node", "handleAndDispatchPointerDownOutsideEvent"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/package.json b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5c3511c6e2b6e9afc30032f0856c8876d3a24804 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@_8e969a7c8b3c5ef31329260b62f7a59b/node_modules/@radix-ui/react-dismissable-layer/package.json @@ -0,0 +1,73 @@ +{ + "name": "@radix-ui/react-dismissable-layer", + "version": "1.1.11", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-use-escape-keydown": "1.1.1", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-use-callback-ref": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "react-remove-scroll": "^2.6.3", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/eslint-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/LICENSE b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/README.md b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d1e96feb24b6a55e0897c5ba9171b2a7a636ec7a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/README.md @@ -0,0 +1,3 @@ +# `react-dropdown-menu` + +View docs [here](https://radix-ui.com/primitives/docs/components/dropdown-menu). diff --git a/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c1e140f67dc63fc6afd3601aae4946a9bb5b8757 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.d.mts @@ -0,0 +1,97 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as MenuPrimitive from '@radix-ui/react-menu'; + +type Direction = 'ltr' | 'rtl'; +declare const createDropdownMenuScope: _radix_ui_react_context.CreateScope; +interface DropdownMenuProps { + children?: React.ReactNode; + dir?: Direction; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; + modal?: boolean; +} +declare const DropdownMenu: React.FC; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface DropdownMenuTriggerProps extends PrimitiveButtonProps { +} +declare const DropdownMenuTrigger: React.ForwardRefExoticComponent>; +type MenuPortalProps = React.ComponentPropsWithoutRef; +interface DropdownMenuPortalProps extends MenuPortalProps { +} +declare const DropdownMenuPortal: React.FC; +type MenuContentProps = React.ComponentPropsWithoutRef; +interface DropdownMenuContentProps extends Omit { +} +declare const DropdownMenuContent: React.ForwardRefExoticComponent>; +type MenuGroupProps = React.ComponentPropsWithoutRef; +interface DropdownMenuGroupProps extends MenuGroupProps { +} +declare const DropdownMenuGroup: React.ForwardRefExoticComponent>; +type MenuLabelProps = React.ComponentPropsWithoutRef; +interface DropdownMenuLabelProps extends MenuLabelProps { +} +declare const DropdownMenuLabel: React.ForwardRefExoticComponent>; +type MenuItemProps = React.ComponentPropsWithoutRef; +interface DropdownMenuItemProps extends MenuItemProps { +} +declare const DropdownMenuItem: React.ForwardRefExoticComponent>; +type MenuCheckboxItemProps = React.ComponentPropsWithoutRef; +interface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps { +} +declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent>; +type MenuRadioGroupProps = React.ComponentPropsWithoutRef; +interface DropdownMenuRadioGroupProps extends MenuRadioGroupProps { +} +declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent>; +type MenuRadioItemProps = React.ComponentPropsWithoutRef; +interface DropdownMenuRadioItemProps extends MenuRadioItemProps { +} +declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent>; +type MenuItemIndicatorProps = React.ComponentPropsWithoutRef; +interface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps { +} +declare const DropdownMenuItemIndicator: React.ForwardRefExoticComponent>; +type MenuSeparatorProps = React.ComponentPropsWithoutRef; +interface DropdownMenuSeparatorProps extends MenuSeparatorProps { +} +declare const DropdownMenuSeparator: React.ForwardRefExoticComponent>; +type MenuArrowProps = React.ComponentPropsWithoutRef; +interface DropdownMenuArrowProps extends MenuArrowProps { +} +declare const DropdownMenuArrow: React.ForwardRefExoticComponent>; +interface DropdownMenuSubProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; +} +declare const DropdownMenuSub: React.FC; +type MenuSubTriggerProps = React.ComponentPropsWithoutRef; +interface DropdownMenuSubTriggerProps extends MenuSubTriggerProps { +} +declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent>; +type MenuSubContentProps = React.ComponentPropsWithoutRef; +interface DropdownMenuSubContentProps extends MenuSubContentProps { +} +declare const DropdownMenuSubContent: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Group: React.ForwardRefExoticComponent>; +declare const Label: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const CheckboxItem: React.ForwardRefExoticComponent>; +declare const RadioGroup: React.ForwardRefExoticComponent>; +declare const RadioItem: React.ForwardRefExoticComponent>; +declare const ItemIndicator: React.ForwardRefExoticComponent>; +declare const Separator: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; +declare const Sub: React.FC; +declare const SubTrigger: React.ForwardRefExoticComponent>; +declare const SubContent: React.ForwardRefExoticComponent>; + +export { Arrow, CheckboxItem, Content, DropdownMenu, DropdownMenuArrow, type DropdownMenuArrowProps, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, DropdownMenuItemIndicator, type DropdownMenuItemIndicatorProps, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuPortalProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, Group, Item, ItemIndicator, Label, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, Trigger, createDropdownMenuScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c1e140f67dc63fc6afd3601aae4946a9bb5b8757 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.d.ts @@ -0,0 +1,97 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as MenuPrimitive from '@radix-ui/react-menu'; + +type Direction = 'ltr' | 'rtl'; +declare const createDropdownMenuScope: _radix_ui_react_context.CreateScope; +interface DropdownMenuProps { + children?: React.ReactNode; + dir?: Direction; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; + modal?: boolean; +} +declare const DropdownMenu: React.FC; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface DropdownMenuTriggerProps extends PrimitiveButtonProps { +} +declare const DropdownMenuTrigger: React.ForwardRefExoticComponent>; +type MenuPortalProps = React.ComponentPropsWithoutRef; +interface DropdownMenuPortalProps extends MenuPortalProps { +} +declare const DropdownMenuPortal: React.FC; +type MenuContentProps = React.ComponentPropsWithoutRef; +interface DropdownMenuContentProps extends Omit { +} +declare const DropdownMenuContent: React.ForwardRefExoticComponent>; +type MenuGroupProps = React.ComponentPropsWithoutRef; +interface DropdownMenuGroupProps extends MenuGroupProps { +} +declare const DropdownMenuGroup: React.ForwardRefExoticComponent>; +type MenuLabelProps = React.ComponentPropsWithoutRef; +interface DropdownMenuLabelProps extends MenuLabelProps { +} +declare const DropdownMenuLabel: React.ForwardRefExoticComponent>; +type MenuItemProps = React.ComponentPropsWithoutRef; +interface DropdownMenuItemProps extends MenuItemProps { +} +declare const DropdownMenuItem: React.ForwardRefExoticComponent>; +type MenuCheckboxItemProps = React.ComponentPropsWithoutRef; +interface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps { +} +declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent>; +type MenuRadioGroupProps = React.ComponentPropsWithoutRef; +interface DropdownMenuRadioGroupProps extends MenuRadioGroupProps { +} +declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent>; +type MenuRadioItemProps = React.ComponentPropsWithoutRef; +interface DropdownMenuRadioItemProps extends MenuRadioItemProps { +} +declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent>; +type MenuItemIndicatorProps = React.ComponentPropsWithoutRef; +interface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps { +} +declare const DropdownMenuItemIndicator: React.ForwardRefExoticComponent>; +type MenuSeparatorProps = React.ComponentPropsWithoutRef; +interface DropdownMenuSeparatorProps extends MenuSeparatorProps { +} +declare const DropdownMenuSeparator: React.ForwardRefExoticComponent>; +type MenuArrowProps = React.ComponentPropsWithoutRef; +interface DropdownMenuArrowProps extends MenuArrowProps { +} +declare const DropdownMenuArrow: React.ForwardRefExoticComponent>; +interface DropdownMenuSubProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; +} +declare const DropdownMenuSub: React.FC; +type MenuSubTriggerProps = React.ComponentPropsWithoutRef; +interface DropdownMenuSubTriggerProps extends MenuSubTriggerProps { +} +declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent>; +type MenuSubContentProps = React.ComponentPropsWithoutRef; +interface DropdownMenuSubContentProps extends MenuSubContentProps { +} +declare const DropdownMenuSubContent: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Group: React.ForwardRefExoticComponent>; +declare const Label: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const CheckboxItem: React.ForwardRefExoticComponent>; +declare const RadioGroup: React.ForwardRefExoticComponent>; +declare const RadioItem: React.ForwardRefExoticComponent>; +declare const ItemIndicator: React.ForwardRefExoticComponent>; +declare const Separator: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; +declare const Sub: React.FC; +declare const SubTrigger: React.ForwardRefExoticComponent>; +declare const SubContent: React.ForwardRefExoticComponent>; + +export { Arrow, CheckboxItem, Content, DropdownMenu, DropdownMenuArrow, type DropdownMenuArrowProps, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, DropdownMenuItemIndicator, type DropdownMenuItemIndicatorProps, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuPortalProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, Group, Item, ItemIndicator, Label, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, Trigger, createDropdownMenuScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.js b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..2087d670495a7664b83f0a910dbd09727a0b5679 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.js @@ -0,0 +1,337 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Arrow: () => Arrow2, + CheckboxItem: () => CheckboxItem2, + Content: () => Content2, + DropdownMenu: () => DropdownMenu, + DropdownMenuArrow: () => DropdownMenuArrow, + DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem, + DropdownMenuContent: () => DropdownMenuContent, + DropdownMenuGroup: () => DropdownMenuGroup, + DropdownMenuItem: () => DropdownMenuItem, + DropdownMenuItemIndicator: () => DropdownMenuItemIndicator, + DropdownMenuLabel: () => DropdownMenuLabel, + DropdownMenuPortal: () => DropdownMenuPortal, + DropdownMenuRadioGroup: () => DropdownMenuRadioGroup, + DropdownMenuRadioItem: () => DropdownMenuRadioItem, + DropdownMenuSeparator: () => DropdownMenuSeparator, + DropdownMenuSub: () => DropdownMenuSub, + DropdownMenuSubContent: () => DropdownMenuSubContent, + DropdownMenuSubTrigger: () => DropdownMenuSubTrigger, + DropdownMenuTrigger: () => DropdownMenuTrigger, + Group: () => Group2, + Item: () => Item2, + ItemIndicator: () => ItemIndicator2, + Label: () => Label2, + Portal: () => Portal2, + RadioGroup: () => RadioGroup2, + RadioItem: () => RadioItem2, + Root: () => Root2, + Separator: () => Separator2, + Sub: () => Sub2, + SubContent: () => SubContent2, + SubTrigger: () => SubTrigger2, + Trigger: () => Trigger, + createDropdownMenuScope: () => createDropdownMenuScope +}); +module.exports = __toCommonJS(index_exports); + +// src/dropdown-menu.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var MenuPrimitive = __toESM(require("@radix-ui/react-menu")); +var import_react_menu = require("@radix-ui/react-menu"); +var import_react_id = require("@radix-ui/react-id"); +var import_jsx_runtime = require("react/jsx-runtime"); +var DROPDOWN_MENU_NAME = "DropdownMenu"; +var [createDropdownMenuContext, createDropdownMenuScope] = (0, import_react_context.createContextScope)( + DROPDOWN_MENU_NAME, + [import_react_menu.createMenuScope] +); +var useMenuScope = (0, import_react_menu.createMenuScope)(); +var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME); +var DropdownMenu = (props) => { + const { + __scopeDropdownMenu, + children, + dir, + open: openProp, + defaultOpen, + onOpenChange, + modal = true + } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + const triggerRef = React.useRef(null); + const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: DROPDOWN_MENU_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + DropdownMenuProvider, + { + scope: __scopeDropdownMenu, + triggerId: (0, import_react_id.useId)(), + triggerRef, + contentId: (0, import_react_id.useId)(), + open, + onOpenChange: setOpen, + onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]), + modal, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children }) + } + ); +}; +DropdownMenu.displayName = DROPDOWN_MENU_NAME; +var TRIGGER_NAME = "DropdownMenuTrigger"; +var DropdownMenuTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props; + const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu); + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + id: context.triggerId, + "aria-haspopup": "menu", + "aria-expanded": context.open, + "aria-controls": context.open ? context.contentId : void 0, + "data-state": context.open ? "open" : "closed", + "data-disabled": disabled ? "" : void 0, + disabled, + ...triggerProps, + ref: (0, import_react_compose_refs.composeRefs)(forwardedRef, context.triggerRef), + onPointerDown: (0, import_primitive.composeEventHandlers)(props.onPointerDown, (event) => { + if (!disabled && event.button === 0 && event.ctrlKey === false) { + context.onOpenToggle(); + if (!context.open) event.preventDefault(); + } + }), + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + if (disabled) return; + if (["Enter", " "].includes(event.key)) context.onOpenToggle(); + if (event.key === "ArrowDown") context.onOpenChange(true); + if (["Enter", " ", "ArrowDown"].includes(event.key)) event.preventDefault(); + }) + } + ) }); + } +); +DropdownMenuTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "DropdownMenuPortal"; +var DropdownMenuPortal = (props) => { + const { __scopeDropdownMenu, ...portalProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Portal, { ...menuScope, ...portalProps }); +}; +DropdownMenuPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "DropdownMenuContent"; +var DropdownMenuContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, ...contentProps } = props; + const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu); + const menuScope = useMenuScope(__scopeDropdownMenu); + const hasInteractedOutsideRef = React.useRef(false); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuPrimitive.Content, + { + id: context.contentId, + "aria-labelledby": context.triggerId, + ...menuScope, + ...contentProps, + ref: forwardedRef, + onCloseAutoFocus: (0, import_primitive.composeEventHandlers)(props.onCloseAutoFocus, (event) => { + if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus(); + hasInteractedOutsideRef.current = false; + event.preventDefault(); + }), + onInteractOutside: (0, import_primitive.composeEventHandlers)(props.onInteractOutside, (event) => { + const originalEvent = event.detail.originalEvent; + const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true; + const isRightClick = originalEvent.button === 2 || ctrlLeftClick; + if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true; + }), + style: { + ...props.style, + // re-namespace exposed content custom properties + ...{ + "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)", + "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)", + "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); + } +); +DropdownMenuContent.displayName = CONTENT_NAME; +var GROUP_NAME = "DropdownMenuGroup"; +var DropdownMenuGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, ...groupProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef }); + } +); +DropdownMenuGroup.displayName = GROUP_NAME; +var LABEL_NAME = "DropdownMenuLabel"; +var DropdownMenuLabel = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, ...labelProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef }); + } +); +DropdownMenuLabel.displayName = LABEL_NAME; +var ITEM_NAME = "DropdownMenuItem"; +var DropdownMenuItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, ...itemProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef }); + } +); +DropdownMenuItem.displayName = ITEM_NAME; +var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem"; +var DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...checkboxItemProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef }); +}); +DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME; +var RADIO_GROUP_NAME = "DropdownMenuRadioGroup"; +var DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...radioGroupProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef }); +}); +DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME; +var RADIO_ITEM_NAME = "DropdownMenuRadioItem"; +var DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...radioItemProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef }); +}); +DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME; +var INDICATOR_NAME = "DropdownMenuItemIndicator"; +var DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...itemIndicatorProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef }); +}); +DropdownMenuItemIndicator.displayName = INDICATOR_NAME; +var SEPARATOR_NAME = "DropdownMenuSeparator"; +var DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...separatorProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef }); +}); +DropdownMenuSeparator.displayName = SEPARATOR_NAME; +var ARROW_NAME = "DropdownMenuArrow"; +var DropdownMenuArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, ...arrowProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef }); + } +); +DropdownMenuArrow.displayName = ARROW_NAME; +var DropdownMenuSub = (props) => { + const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: "DropdownMenuSub" + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children }); +}; +var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger"; +var DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...subTriggerProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef }); +}); +DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME; +var SUB_CONTENT_NAME = "DropdownMenuSubContent"; +var DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...subContentProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuPrimitive.SubContent, + { + ...menuScope, + ...subContentProps, + ref: forwardedRef, + style: { + ...props.style, + // re-namespace exposed content custom properties + ...{ + "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)", + "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)", + "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); +}); +DropdownMenuSubContent.displayName = SUB_CONTENT_NAME; +var Root2 = DropdownMenu; +var Trigger = DropdownMenuTrigger; +var Portal2 = DropdownMenuPortal; +var Content2 = DropdownMenuContent; +var Group2 = DropdownMenuGroup; +var Label2 = DropdownMenuLabel; +var Item2 = DropdownMenuItem; +var CheckboxItem2 = DropdownMenuCheckboxItem; +var RadioGroup2 = DropdownMenuRadioGroup; +var RadioItem2 = DropdownMenuRadioItem; +var ItemIndicator2 = DropdownMenuItemIndicator; +var Separator2 = DropdownMenuSeparator; +var Arrow2 = DropdownMenuArrow; +var Sub2 = DropdownMenuSub; +var SubTrigger2 = DropdownMenuSubTrigger; +var SubContent2 = DropdownMenuSubContent; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b83a7e4cf12d96c3f845c39494317dffda285212 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/dropdown-menu.tsx"], + "sourcesContent": ["'use client';\nexport {\n createDropdownMenuScope,\n //\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuPortal,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuItemIndicator,\n DropdownMenuSeparator,\n DropdownMenuArrow,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './dropdown-menu';\nexport type {\n DropdownMenuProps,\n DropdownMenuTriggerProps,\n DropdownMenuPortalProps,\n DropdownMenuContentProps,\n DropdownMenuGroupProps,\n DropdownMenuLabelProps,\n DropdownMenuItemProps,\n DropdownMenuCheckboxItemProps,\n DropdownMenuRadioGroupProps,\n DropdownMenuRadioItemProps,\n DropdownMenuItemIndicatorProps,\n DropdownMenuSeparatorProps,\n DropdownMenuArrowProps,\n DropdownMenuSubProps,\n DropdownMenuSubTriggerProps,\n DropdownMenuSubContentProps,\n} from './dropdown-menu';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useId } from '@radix-ui/react-id';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst DROPDOWN_MENU_NAME = 'DropdownMenu';\n\ntype ScopedProps

= P & { __scopeDropdownMenu?: Scope };\nconst [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nconst useMenuScope = createMenuScope();\n\ntype DropdownMenuContextValue = {\n triggerId: string;\n triggerRef: React.RefObject;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DropdownMenuProvider, useDropdownMenuContext] =\n createDropdownMenuContext(DROPDOWN_MENU_NAME);\n\ninterface DropdownMenuProps {\n children?: React.ReactNode;\n dir?: Direction;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst DropdownMenu: React.FC = (props: ScopedProps) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DROPDOWN_MENU_NAME,\n });\n\n return (\n setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n \n {children}\n \n \n );\n};\n\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DropdownMenuTrigger';\n\ntype DropdownMenuTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuTriggerProps extends PrimitiveButtonProps {}\n\nconst DropdownMenuTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return (\n \n {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n if (!context.open) event.preventDefault();\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if (['Enter', ' '].includes(event.key)) context.onOpenToggle();\n if (event.key === 'ArrowDown') context.onOpenChange(true);\n // prevent keydown from scrolling window / first focused item to execute\n // that keydown (inadvertently closing the menu)\n if (['Enter', ' ', 'ArrowDown'].includes(event.key)) event.preventDefault();\n })}\n />\n \n );\n }\n);\n\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DropdownMenuPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuPortalProps extends MenuPortalProps {}\n\nconst DropdownMenuPortal: React.FC = (\n props: ScopedProps\n) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n};\n\nDropdownMenuPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DropdownMenuContent';\n\ntype DropdownMenuContentElement = React.ComponentRef;\ntype MenuContentProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuContentProps extends Omit {}\n\nconst DropdownMenuContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n })}\n onInteractOutside={composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent as PointerEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n })}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-dropdown-menu-content-transform-origin':\n 'var(--radix-popper-transform-origin)',\n '--radix-dropdown-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-dropdown-menu-content-available-height':\n 'var(--radix-popper-available-height)',\n '--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n }\n);\n\nDropdownMenuContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'DropdownMenuGroup';\n\ntype DropdownMenuGroupElement = React.ComponentRef;\ntype MenuGroupProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuGroupProps extends MenuGroupProps {}\n\nconst DropdownMenuGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n }\n);\n\nDropdownMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'DropdownMenuLabel';\n\ntype DropdownMenuLabelElement = React.ComponentRef;\ntype MenuLabelProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuLabelProps extends MenuLabelProps {}\n\nconst DropdownMenuLabel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n }\n);\n\nDropdownMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'DropdownMenuItem';\n\ntype DropdownMenuItemElement = React.ComponentRef;\ntype MenuItemProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuItemProps extends MenuItemProps {}\n\nconst DropdownMenuItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n }\n);\n\nDropdownMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';\n\ntype DropdownMenuCheckboxItemElement = React.ComponentRef;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';\n\ntype DropdownMenuRadioGroupElement = React.ComponentRef;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'DropdownMenuRadioItem';\n\ntype DropdownMenuRadioItemElement = React.ComponentRef;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'DropdownMenuItemIndicator';\n\ntype DropdownMenuItemIndicatorElement = React.ComponentRef;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst DropdownMenuItemIndicator = React.forwardRef<\n DropdownMenuItemIndicatorElement,\n DropdownMenuItemIndicatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'DropdownMenuSeparator';\n\ntype DropdownMenuSeparatorElement = React.ComponentRef;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'DropdownMenuArrow';\n\ntype DropdownMenuArrowElement = React.ComponentRef;\ntype MenuArrowProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuArrowProps extends MenuArrowProps {}\n\nconst DropdownMenuArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n }\n);\n\nDropdownMenuArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DropdownMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst DropdownMenuSub: React.FC = (\n props: ScopedProps\n) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: 'DropdownMenuSub',\n });\n\n return (\n \n {children}\n \n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';\n\ntype DropdownMenuSubTriggerElement = React.ComponentRef;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'DropdownMenuSubContent';\n\ntype DropdownMenuSubContentElement = React.ComponentRef;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuSubContentProps extends MenuSubContentProps {}\n\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n\n return (\n \n );\n});\n\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = DropdownMenu;\nconst Trigger = DropdownMenuTrigger;\nconst Portal = DropdownMenuPortal;\nconst Content = DropdownMenuContent;\nconst Group = DropdownMenuGroup;\nconst Label = DropdownMenuLabel;\nconst Item = DropdownMenuItem;\nconst CheckboxItem = DropdownMenuCheckboxItem;\nconst RadioGroup = DropdownMenuRadioGroup;\nconst RadioItem = DropdownMenuRadioItem;\nconst ItemIndicator = DropdownMenuItemIndicator;\nconst Separator = DropdownMenuSeparator;\nconst Arrow = DropdownMenuArrow;\nconst Sub = DropdownMenuSub;\nconst SubTrigger = DropdownMenuSubTrigger;\nconst SubContent = DropdownMenuSubContent;\n\nexport {\n createDropdownMenuScope,\n //\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuPortal,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuItemIndicator,\n DropdownMenuSeparator,\n DropdownMenuArrow,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n DropdownMenuProps,\n DropdownMenuTriggerProps,\n DropdownMenuPortalProps,\n DropdownMenuContentProps,\n DropdownMenuGroupProps,\n DropdownMenuLabelProps,\n DropdownMenuItemProps,\n DropdownMenuCheckboxItemProps,\n DropdownMenuRadioGroupProps,\n DropdownMenuRadioItemProps,\n DropdownMenuItemIndicatorProps,\n DropdownMenuSeparatorProps,\n DropdownMenuArrowProps,\n DropdownMenuSubProps,\n DropdownMenuSubTriggerProps,\n DropdownMenuSubContentProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA,oBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,cAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,WAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AAC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AAgB,IAAI;AACpD,QAAM,YAAY,aAAa,mBAAmB;AAClD,SAAO,4CAAe,0BAAd,EAA0B,GAAG,WAAY,GAAG,iBAAiB,KAAK,cAAc;AAC1F,CAAC;AAED,uBAAuB,cAAc;AAMrC,IAAM,mBAAmB;AAMzB,IAAM,yBAA+B,iBAGnC,CAAC,OAAiD,iBAAiB;AACnE,QAAM,EAAE,qBAAqB,GAAG,gBAAgB,IAAI;AACpD,QAAM,YAAY,aAAa,mBAAmB;AAElD,SACE;AAAA,IAAe;AAAA,IAAd;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,OAAO;AAAA,QACL,GAAG,MAAM;AAAA;AAAA,QAET,GAAG;AAAA,UACD,kDAAkD;AAAA,UAClD,iDAAiD;AAAA,UACjD,kDAAkD;AAAA,UAClD,uCAAuC;AAAA,UACvC,wCAAwC;AAAA,QAC1C;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,uBAAuB,cAAc;AAIrC,IAAMC,QAAO;AACb,IAAM,UAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;AACd,IAAMC,SAAQ;AACd,IAAMC,QAAO;AACb,IAAMC,gBAAe;AACrB,IAAMC,cAAa;AACnB,IAAMC,aAAY;AAClB,IAAMC,iBAAgB;AACtB,IAAMC,aAAY;AAClB,IAAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;", + "names": ["Arrow", "CheckboxItem", "Content", "Group", "Item", "ItemIndicator", "Label", "Portal", "RadioGroup", "RadioItem", "Root", "Separator", "Sub", "SubContent", "SubTrigger", "Root", "Portal", "Content", "Group", "Label", "Item", "CheckboxItem", "RadioGroup", "RadioItem", "ItemIndicator", "Separator", "Arrow", "Sub", "SubTrigger", "SubContent"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1799d5816f33aee1c512953bdd2acff61e91dd54 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs @@ -0,0 +1,305 @@ +"use client"; + +// src/dropdown-menu.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { composeRefs } from "@radix-ui/react-compose-refs"; +import { createContextScope } from "@radix-ui/react-context"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { Primitive } from "@radix-ui/react-primitive"; +import * as MenuPrimitive from "@radix-ui/react-menu"; +import { createMenuScope } from "@radix-ui/react-menu"; +import { useId } from "@radix-ui/react-id"; +import { jsx } from "react/jsx-runtime"; +var DROPDOWN_MENU_NAME = "DropdownMenu"; +var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope( + DROPDOWN_MENU_NAME, + [createMenuScope] +); +var useMenuScope = createMenuScope(); +var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME); +var DropdownMenu = (props) => { + const { + __scopeDropdownMenu, + children, + dir, + open: openProp, + defaultOpen, + onOpenChange, + modal = true + } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + const triggerRef = React.useRef(null); + const [open, setOpen] = useControllableState({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: DROPDOWN_MENU_NAME + }); + return /* @__PURE__ */ jsx( + DropdownMenuProvider, + { + scope: __scopeDropdownMenu, + triggerId: useId(), + triggerRef, + contentId: useId(), + open, + onOpenChange: setOpen, + onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]), + modal, + children: /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children }) + } + ); +}; +DropdownMenu.displayName = DROPDOWN_MENU_NAME; +var TRIGGER_NAME = "DropdownMenuTrigger"; +var DropdownMenuTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props; + const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu); + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + id: context.triggerId, + "aria-haspopup": "menu", + "aria-expanded": context.open, + "aria-controls": context.open ? context.contentId : void 0, + "data-state": context.open ? "open" : "closed", + "data-disabled": disabled ? "" : void 0, + disabled, + ...triggerProps, + ref: composeRefs(forwardedRef, context.triggerRef), + onPointerDown: composeEventHandlers(props.onPointerDown, (event) => { + if (!disabled && event.button === 0 && event.ctrlKey === false) { + context.onOpenToggle(); + if (!context.open) event.preventDefault(); + } + }), + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + if (disabled) return; + if (["Enter", " "].includes(event.key)) context.onOpenToggle(); + if (event.key === "ArrowDown") context.onOpenChange(true); + if (["Enter", " ", "ArrowDown"].includes(event.key)) event.preventDefault(); + }) + } + ) }); + } +); +DropdownMenuTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "DropdownMenuPortal"; +var DropdownMenuPortal = (props) => { + const { __scopeDropdownMenu, ...portalProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps }); +}; +DropdownMenuPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "DropdownMenuContent"; +var DropdownMenuContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, ...contentProps } = props; + const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu); + const menuScope = useMenuScope(__scopeDropdownMenu); + const hasInteractedOutsideRef = React.useRef(false); + return /* @__PURE__ */ jsx( + MenuPrimitive.Content, + { + id: context.contentId, + "aria-labelledby": context.triggerId, + ...menuScope, + ...contentProps, + ref: forwardedRef, + onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => { + if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus(); + hasInteractedOutsideRef.current = false; + event.preventDefault(); + }), + onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => { + const originalEvent = event.detail.originalEvent; + const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true; + const isRightClick = originalEvent.button === 2 || ctrlLeftClick; + if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true; + }), + style: { + ...props.style, + // re-namespace exposed content custom properties + ...{ + "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)", + "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)", + "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); + } +); +DropdownMenuContent.displayName = CONTENT_NAME; +var GROUP_NAME = "DropdownMenuGroup"; +var DropdownMenuGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, ...groupProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef }); + } +); +DropdownMenuGroup.displayName = GROUP_NAME; +var LABEL_NAME = "DropdownMenuLabel"; +var DropdownMenuLabel = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, ...labelProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef }); + } +); +DropdownMenuLabel.displayName = LABEL_NAME; +var ITEM_NAME = "DropdownMenuItem"; +var DropdownMenuItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, ...itemProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef }); + } +); +DropdownMenuItem.displayName = ITEM_NAME; +var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem"; +var DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...checkboxItemProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef }); +}); +DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME; +var RADIO_GROUP_NAME = "DropdownMenuRadioGroup"; +var DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...radioGroupProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef }); +}); +DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME; +var RADIO_ITEM_NAME = "DropdownMenuRadioItem"; +var DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...radioItemProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef }); +}); +DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME; +var INDICATOR_NAME = "DropdownMenuItemIndicator"; +var DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...itemIndicatorProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef }); +}); +DropdownMenuItemIndicator.displayName = INDICATOR_NAME; +var SEPARATOR_NAME = "DropdownMenuSeparator"; +var DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...separatorProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef }); +}); +DropdownMenuSeparator.displayName = SEPARATOR_NAME; +var ARROW_NAME = "DropdownMenuArrow"; +var DropdownMenuArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeDropdownMenu, ...arrowProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef }); + } +); +DropdownMenuArrow.displayName = ARROW_NAME; +var DropdownMenuSub = (props) => { + const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + const [open, setOpen] = useControllableState({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: "DropdownMenuSub" + }); + return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children }); +}; +var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger"; +var DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...subTriggerProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef }); +}); +DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME; +var SUB_CONTENT_NAME = "DropdownMenuSubContent"; +var DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => { + const { __scopeDropdownMenu, ...subContentProps } = props; + const menuScope = useMenuScope(__scopeDropdownMenu); + return /* @__PURE__ */ jsx( + MenuPrimitive.SubContent, + { + ...menuScope, + ...subContentProps, + ref: forwardedRef, + style: { + ...props.style, + // re-namespace exposed content custom properties + ...{ + "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)", + "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)", + "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); +}); +DropdownMenuSubContent.displayName = SUB_CONTENT_NAME; +var Root2 = DropdownMenu; +var Trigger = DropdownMenuTrigger; +var Portal2 = DropdownMenuPortal; +var Content2 = DropdownMenuContent; +var Group2 = DropdownMenuGroup; +var Label2 = DropdownMenuLabel; +var Item2 = DropdownMenuItem; +var CheckboxItem2 = DropdownMenuCheckboxItem; +var RadioGroup2 = DropdownMenuRadioGroup; +var RadioItem2 = DropdownMenuRadioItem; +var ItemIndicator2 = DropdownMenuItemIndicator; +var Separator2 = DropdownMenuSeparator; +var Arrow2 = DropdownMenuArrow; +var Sub2 = DropdownMenuSub; +var SubTrigger2 = DropdownMenuSubTrigger; +var SubContent2 = DropdownMenuSubContent; +export { + Arrow2 as Arrow, + CheckboxItem2 as CheckboxItem, + Content2 as Content, + DropdownMenu, + DropdownMenuArrow, + DropdownMenuCheckboxItem, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuItemIndicator, + DropdownMenuLabel, + DropdownMenuPortal, + DropdownMenuRadioGroup, + DropdownMenuRadioItem, + DropdownMenuSeparator, + DropdownMenuSub, + DropdownMenuSubContent, + DropdownMenuSubTrigger, + DropdownMenuTrigger, + Group2 as Group, + Item2 as Item, + ItemIndicator2 as ItemIndicator, + Label2 as Label, + Portal2 as Portal, + RadioGroup2 as RadioGroup, + RadioItem2 as RadioItem, + Root2 as Root, + Separator2 as Separator, + Sub2 as Sub, + SubContent2 as SubContent, + SubTrigger2 as SubTrigger, + Trigger, + createDropdownMenuScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..3f73065443e933a778fcb14830e432418cd2fc0b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/dropdown-menu.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useId } from '@radix-ui/react-id';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst DROPDOWN_MENU_NAME = 'DropdownMenu';\n\ntype ScopedProps

= P & { __scopeDropdownMenu?: Scope };\nconst [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nconst useMenuScope = createMenuScope();\n\ntype DropdownMenuContextValue = {\n triggerId: string;\n triggerRef: React.RefObject;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DropdownMenuProvider, useDropdownMenuContext] =\n createDropdownMenuContext(DROPDOWN_MENU_NAME);\n\ninterface DropdownMenuProps {\n children?: React.ReactNode;\n dir?: Direction;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst DropdownMenu: React.FC = (props: ScopedProps) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DROPDOWN_MENU_NAME,\n });\n\n return (\n setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n \n {children}\n \n \n );\n};\n\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DropdownMenuTrigger';\n\ntype DropdownMenuTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuTriggerProps extends PrimitiveButtonProps {}\n\nconst DropdownMenuTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return (\n \n {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n if (!context.open) event.preventDefault();\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if (['Enter', ' '].includes(event.key)) context.onOpenToggle();\n if (event.key === 'ArrowDown') context.onOpenChange(true);\n // prevent keydown from scrolling window / first focused item to execute\n // that keydown (inadvertently closing the menu)\n if (['Enter', ' ', 'ArrowDown'].includes(event.key)) event.preventDefault();\n })}\n />\n \n );\n }\n);\n\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DropdownMenuPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuPortalProps extends MenuPortalProps {}\n\nconst DropdownMenuPortal: React.FC = (\n props: ScopedProps\n) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n};\n\nDropdownMenuPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DropdownMenuContent';\n\ntype DropdownMenuContentElement = React.ComponentRef;\ntype MenuContentProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuContentProps extends Omit {}\n\nconst DropdownMenuContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n })}\n onInteractOutside={composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent as PointerEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n })}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-dropdown-menu-content-transform-origin':\n 'var(--radix-popper-transform-origin)',\n '--radix-dropdown-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-dropdown-menu-content-available-height':\n 'var(--radix-popper-available-height)',\n '--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n }\n);\n\nDropdownMenuContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'DropdownMenuGroup';\n\ntype DropdownMenuGroupElement = React.ComponentRef;\ntype MenuGroupProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuGroupProps extends MenuGroupProps {}\n\nconst DropdownMenuGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n }\n);\n\nDropdownMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'DropdownMenuLabel';\n\ntype DropdownMenuLabelElement = React.ComponentRef;\ntype MenuLabelProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuLabelProps extends MenuLabelProps {}\n\nconst DropdownMenuLabel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n }\n);\n\nDropdownMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'DropdownMenuItem';\n\ntype DropdownMenuItemElement = React.ComponentRef;\ntype MenuItemProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuItemProps extends MenuItemProps {}\n\nconst DropdownMenuItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n }\n);\n\nDropdownMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';\n\ntype DropdownMenuCheckboxItemElement = React.ComponentRef;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';\n\ntype DropdownMenuRadioGroupElement = React.ComponentRef;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'DropdownMenuRadioItem';\n\ntype DropdownMenuRadioItemElement = React.ComponentRef;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'DropdownMenuItemIndicator';\n\ntype DropdownMenuItemIndicatorElement = React.ComponentRef;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst DropdownMenuItemIndicator = React.forwardRef<\n DropdownMenuItemIndicatorElement,\n DropdownMenuItemIndicatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'DropdownMenuSeparator';\n\ntype DropdownMenuSeparatorElement = React.ComponentRef;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'DropdownMenuArrow';\n\ntype DropdownMenuArrowElement = React.ComponentRef;\ntype MenuArrowProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuArrowProps extends MenuArrowProps {}\n\nconst DropdownMenuArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n }\n);\n\nDropdownMenuArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DropdownMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst DropdownMenuSub: React.FC = (\n props: ScopedProps\n) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: 'DropdownMenuSub',\n });\n\n return (\n \n {children}\n \n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';\n\ntype DropdownMenuSubTriggerElement = React.ComponentRef;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return ;\n});\n\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'DropdownMenuSubContent';\n\ntype DropdownMenuSubContentElement = React.ComponentRef;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef;\ninterface DropdownMenuSubContentProps extends MenuSubContentProps {}\n\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n\n return (\n \n );\n});\n\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = DropdownMenu;\nconst Trigger = DropdownMenuTrigger;\nconst Portal = DropdownMenuPortal;\nconst Content = DropdownMenuContent;\nconst Group = DropdownMenuGroup;\nconst Label = DropdownMenuLabel;\nconst Item = DropdownMenuItem;\nconst CheckboxItem = DropdownMenuCheckboxItem;\nconst RadioGroup = DropdownMenuRadioGroup;\nconst RadioItem = DropdownMenuRadioItem;\nconst ItemIndicator = DropdownMenuItemIndicator;\nconst Separator = DropdownMenuSeparator;\nconst Arrow = DropdownMenuArrow;\nconst Sub = DropdownMenuSub;\nconst SubTrigger = DropdownMenuSubTrigger;\nconst SubContent = DropdownMenuSubContent;\n\nexport {\n createDropdownMenuScope,\n //\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuPortal,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuItemIndicator,\n DropdownMenuSeparator,\n DropdownMenuArrow,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n DropdownMenuProps,\n DropdownMenuTriggerProps,\n DropdownMenuPortalProps,\n DropdownMenuContentProps,\n DropdownMenuGroupProps,\n DropdownMenuLabelProps,\n DropdownMenuItemProps,\n DropdownMenuCheckboxItemProps,\n DropdownMenuRadioGroupProps,\n DropdownMenuRadioItemProps,\n DropdownMenuItemIndicatorProps,\n DropdownMenuSeparatorProps,\n DropdownMenuArrowProps,\n DropdownMenuSubProps,\n DropdownMenuSubTriggerProps,\n DropdownMenuSubContentProps,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAC5B,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,iBAAiB;AAC1B,YAAY,mBAAmB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,aAAa;AAuEhB;AA7DN,IAAM,qBAAqB;AAG3B,IAAM,CAAC,2BAA2B,uBAAuB,IAAI;AAAA,EAC3D;AAAA,EACA,CAAC,eAAe;AAClB;AACA,IAAM,eAAe,gBAAgB;AAYrC,IAAM,CAAC,sBAAsB,sBAAsB,IACjD,0BAAoD,kBAAkB;AAWxE,IAAM,eAA4C,CAAC,UAA0C;AAC3F,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV,IAAI;AACJ,QAAM,YAAY,aAAa,mBAAmB;AAClD,QAAM,aAAmB,aAA0B,IAA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AAuC;AAAA,UACvC,wCAAwC;AAAA,QAC1C;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,uBAAuB,cAAc;AAIrC,IAAMA,QAAO;AACb,IAAM,UAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;AACd,IAAMC,SAAQ;AACd,IAAMC,QAAO;AACb,IAAMC,gBAAe;AACrB,IAAMC,cAAa;AACnB,IAAMC,aAAY;AAClB,IAAMC,iBAAgB;AACtB,IAAMC,aAAY;AAClB,IAAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;", + "names": ["Root", "Portal", "Content", "Group", "Label", "Item", "CheckboxItem", "RadioGroup", "RadioItem", "ItemIndicator", "Separator", "Arrow", "Sub", "SubTrigger", "SubContent"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/package.json b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/package.json new file mode 100644 index 0000000000000000000000000000000000000000..c131e6115c5f5ba14f1049ba70d5a475f835bc6f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@type_17d9eb7b10fc1061a903a24d110a1c22/node_modules/@radix-ui/react-dropdown-menu/package.json @@ -0,0 +1,75 @@ +{ + "name": "@radix-ui/react-dropdown-menu", + "version": "2.1.16", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-menu": "2.1.16", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-primitive": "2.1.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/test-data": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/LICENSE b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/README.md b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c0de2543c69255a28b9d5aaf63d62bcb262e9b57 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/README.md @@ -0,0 +1,3 @@ +# `react-focus-guards` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..19d3b4dfe9bc81fbc7dfcbd9190689ab88abbd8b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.d.mts @@ -0,0 +1,13 @@ +import * as React from 'react'; + +interface FocusGuardsProps { + children?: React.ReactNode; +} +declare function FocusGuards(props: FocusGuardsProps): React.ReactNode; +/** + * Injects a pair of focus guards at the edges of the whole DOM tree + * to ensure `focusin` & `focusout` events can be caught consistently. + */ +declare function useFocusGuards(): void; + +export { FocusGuards, FocusGuards as Root, useFocusGuards }; diff --git a/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..19d3b4dfe9bc81fbc7dfcbd9190689ab88abbd8b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts @@ -0,0 +1,13 @@ +import * as React from 'react'; + +interface FocusGuardsProps { + children?: React.ReactNode; +} +declare function FocusGuards(props: FocusGuardsProps): React.ReactNode; +/** + * Injects a pair of focus guards at the edges of the whole DOM tree + * to ensure `focusin` & `focusout` events can be caught consistently. + */ +declare function useFocusGuards(): void; + +export { FocusGuards, FocusGuards as Root, useFocusGuards }; diff --git a/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.js b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5f640f5cc9cc135cc28578fadde9c2ddf6e983a1 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.js @@ -0,0 +1,71 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + FocusGuards: () => FocusGuards, + Root: () => FocusGuards, + useFocusGuards: () => useFocusGuards +}); +module.exports = __toCommonJS(index_exports); + +// src/focus-guards.tsx +var React = __toESM(require("react")); +var count = 0; +function FocusGuards(props) { + useFocusGuards(); + return props.children; +} +function useFocusGuards() { + React.useEffect(() => { + const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]"); + document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard()); + document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard()); + count++; + return () => { + if (count === 1) { + document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove()); + } + count--; + }; + }, []); +} +function createFocusGuard() { + const element = document.createElement("span"); + element.setAttribute("data-radix-focus-guard", ""); + element.tabIndex = 0; + element.style.outline = "none"; + element.style.opacity = "0"; + element.style.position = "fixed"; + element.style.pointerEvents = "none"; + return element; +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5635f10256583ff9c01dc2eb897ad2b07a1eac39 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/focus-guards.tsx"], + "sourcesContent": ["'use client';\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n} from './focus-guards';\n", "import * as React from 'react';\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0;\n\ninterface FocusGuardsProps {\n children?: React.ReactNode;\n}\n\nfunction FocusGuards(props: FocusGuardsProps) {\n useFocusGuards();\n return props.children;\n}\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nfunction useFocusGuards() {\n /* eslint-disable no-restricted-globals */\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n\n return () => {\n if (count === 1) {\n document.querySelectorAll('[data-radix-focus-guard]').forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n /* eslint-enable no-restricted-globals */\n}\n\nfunction createFocusGuard() {\n // eslint-disable-next-line no-restricted-globals\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.outline = 'none';\n element.style.opacity = '0';\n element.style.position = 'fixed';\n element.style.pointerEvents = 'none';\n return element;\n}\n\nexport {\n FocusGuards,\n //\n FocusGuards as Root,\n //\n useFocusGuards,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAGvB,IAAI,QAAQ;AAMZ,SAAS,YAAY,OAAyB;AAC5C,iBAAe;AACf,SAAO,MAAM;AACf;AAMA,SAAS,iBAAiB;AAExB,EAAM,gBAAU,MAAM;AACpB,UAAM,aAAa,SAAS,iBAAiB,0BAA0B;AACvE,aAAS,KAAK,sBAAsB,cAAc,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACrF,aAAS,KAAK,sBAAsB,aAAa,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACpF;AAEA,WAAO,MAAM;AACX,UAAI,UAAU,GAAG;AACf,iBAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAAC,SAAS,KAAK,OAAO,CAAC;AAAA,MACvF;AACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AAEP;AAEA,SAAS,mBAAmB;AAE1B,QAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,UAAQ,aAAa,0BAA0B,EAAE;AACjD,UAAQ,WAAW;AACnB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,WAAW;AACzB,UAAQ,MAAM,gBAAgB;AAC9B,SAAO;AACT;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f2f1b7d443ccffbed12b694b2ae4cffd1c32bf3f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs @@ -0,0 +1,39 @@ +"use client"; + +// src/focus-guards.tsx +import * as React from "react"; +var count = 0; +function FocusGuards(props) { + useFocusGuards(); + return props.children; +} +function useFocusGuards() { + React.useEffect(() => { + const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]"); + document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard()); + document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard()); + count++; + return () => { + if (count === 1) { + document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove()); + } + count--; + }; + }, []); +} +function createFocusGuard() { + const element = document.createElement("span"); + element.setAttribute("data-radix-focus-guard", ""); + element.tabIndex = 0; + element.style.outline = "none"; + element.style.opacity = "0"; + element.style.position = "fixed"; + element.style.pointerEvents = "none"; + return element; +} +export { + FocusGuards, + FocusGuards as Root, + useFocusGuards +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..c182a7b089c33dc3d82ae2daab38f4a854466b62 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/focus-guards.tsx"], + "sourcesContent": ["import * as React from 'react';\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0;\n\ninterface FocusGuardsProps {\n children?: React.ReactNode;\n}\n\nfunction FocusGuards(props: FocusGuardsProps) {\n useFocusGuards();\n return props.children;\n}\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nfunction useFocusGuards() {\n /* eslint-disable no-restricted-globals */\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n\n return () => {\n if (count === 1) {\n document.querySelectorAll('[data-radix-focus-guard]').forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n /* eslint-enable no-restricted-globals */\n}\n\nfunction createFocusGuard() {\n // eslint-disable-next-line no-restricted-globals\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.outline = 'none';\n element.style.opacity = '0';\n element.style.position = 'fixed';\n element.style.pointerEvents = 'none';\n return element;\n}\n\nexport {\n FocusGuards,\n //\n FocusGuards as Root,\n //\n useFocusGuards,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AAGvB,IAAI,QAAQ;AAMZ,SAAS,YAAY,OAAyB;AAC5C,iBAAe;AACf,SAAO,MAAM;AACf;AAMA,SAAS,iBAAiB;AAExB,EAAM,gBAAU,MAAM;AACpB,UAAM,aAAa,SAAS,iBAAiB,0BAA0B;AACvE,aAAS,KAAK,sBAAsB,cAAc,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACrF,aAAS,KAAK,sBAAsB,aAAa,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACpF;AAEA,WAAO,MAAM;AACX,UAAI,UAAU,GAAG;AACf,iBAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAAC,SAAS,KAAK,OAAO,CAAC;AAAA,MACvF;AACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AAEP;AAEA,SAAS,mBAAmB;AAE1B,QAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,UAAQ,aAAa,0BAA0B,EAAE;AACjD,UAAQ,WAAW;AACnB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,WAAW;AACzB,UAAQ,MAAM,gBAAgB;AAC9B,SAAO;AACT;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/package.json b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/package.json new file mode 100644 index 0000000000000000000000000000000000000000..22137caa45fee136fc705336ac6ced483c6a41e9 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-focus-guards/package.json @@ -0,0 +1,60 @@ +{ + "name": "@radix-ui/react-focus-guards", + "version": "1.1.3", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/eslint-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/LICENSE b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/README.md b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/README.md new file mode 100644 index 0000000000000000000000000000000000000000..46f03117fb1211fd95ebb2f9813522c1a7f54f5a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/README.md @@ -0,0 +1,3 @@ +# `react-focus-scope` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f35f9971d7cd705d0f0083e24ae695b963e0d2e1 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.d.mts @@ -0,0 +1,32 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface FocusScopeProps extends PrimitiveDivProps { + /** + * When `true`, tabbing from last item will focus first tabbable + * and shift+tab from first item will focus last tababble. + * @defaultValue false + */ + loop?: boolean; + /** + * When `true`, focus cannot escape the focus scope via keyboard, + * pointer, or a programmatic focus. + * @defaultValue false + */ + trapped?: boolean; + /** + * Event handler called when auto-focusing on mount. + * Can be prevented. + */ + onMountAutoFocus?: (event: Event) => void; + /** + * Event handler called when auto-focusing on unmount. + * Can be prevented. + */ + onUnmountAutoFocus?: (event: Event) => void; +} +declare const FocusScope: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { FocusScope, type FocusScopeProps, Root }; diff --git a/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f35f9971d7cd705d0f0083e24ae695b963e0d2e1 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts @@ -0,0 +1,32 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface FocusScopeProps extends PrimitiveDivProps { + /** + * When `true`, tabbing from last item will focus first tabbable + * and shift+tab from first item will focus last tababble. + * @defaultValue false + */ + loop?: boolean; + /** + * When `true`, focus cannot escape the focus scope via keyboard, + * pointer, or a programmatic focus. + * @defaultValue false + */ + trapped?: boolean; + /** + * Event handler called when auto-focusing on mount. + * Can be prevented. + */ + onMountAutoFocus?: (event: Event) => void; + /** + * Event handler called when auto-focusing on unmount. + * Can be prevented. + */ + onUnmountAutoFocus?: (event: Event) => void; +} +declare const FocusScope: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { FocusScope, type FocusScopeProps, Root }; diff --git a/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.js b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c91ae9196280060974778cbb1164839d5610e7d0 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.js @@ -0,0 +1,246 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + FocusScope: () => FocusScope, + Root: () => Root +}); +module.exports = __toCommonJS(index_exports); + +// src/focus-scope.tsx +var React = __toESM(require("react")); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref"); +var import_jsx_runtime = require("react/jsx-runtime"); +var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount"; +var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount"; +var EVENT_OPTIONS = { bubbles: false, cancelable: true }; +var FOCUS_SCOPE_NAME = "FocusScope"; +var FocusScope = React.forwardRef((props, forwardedRef) => { + const { + loop = false, + trapped = false, + onMountAutoFocus: onMountAutoFocusProp, + onUnmountAutoFocus: onUnmountAutoFocusProp, + ...scopeProps + } = props; + const [container, setContainer] = React.useState(null); + const onMountAutoFocus = (0, import_react_use_callback_ref.useCallbackRef)(onMountAutoFocusProp); + const onUnmountAutoFocus = (0, import_react_use_callback_ref.useCallbackRef)(onUnmountAutoFocusProp); + const lastFocusedElementRef = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setContainer(node)); + const focusScope = React.useRef({ + paused: false, + pause() { + this.paused = true; + }, + resume() { + this.paused = false; + } + }).current; + React.useEffect(() => { + if (trapped) { + let handleFocusIn2 = function(event) { + if (focusScope.paused || !container) return; + const target = event.target; + if (container.contains(target)) { + lastFocusedElementRef.current = target; + } else { + focus(lastFocusedElementRef.current, { select: true }); + } + }, handleFocusOut2 = function(event) { + if (focusScope.paused || !container) return; + const relatedTarget = event.relatedTarget; + if (relatedTarget === null) return; + if (!container.contains(relatedTarget)) { + focus(lastFocusedElementRef.current, { select: true }); + } + }, handleMutations2 = function(mutations) { + const focusedElement = document.activeElement; + if (focusedElement !== document.body) return; + for (const mutation of mutations) { + if (mutation.removedNodes.length > 0) focus(container); + } + }; + var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2; + document.addEventListener("focusin", handleFocusIn2); + document.addEventListener("focusout", handleFocusOut2); + const mutationObserver = new MutationObserver(handleMutations2); + if (container) mutationObserver.observe(container, { childList: true, subtree: true }); + return () => { + document.removeEventListener("focusin", handleFocusIn2); + document.removeEventListener("focusout", handleFocusOut2); + mutationObserver.disconnect(); + }; + } + }, [trapped, container, focusScope.paused]); + React.useEffect(() => { + if (container) { + focusScopesStack.add(focusScope); + const previouslyFocusedElement = document.activeElement; + const hasFocusedCandidate = container.contains(previouslyFocusedElement); + if (!hasFocusedCandidate) { + const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS); + container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus); + container.dispatchEvent(mountEvent); + if (!mountEvent.defaultPrevented) { + focusFirst(removeLinks(getTabbableCandidates(container)), { select: true }); + if (document.activeElement === previouslyFocusedElement) { + focus(container); + } + } + } + return () => { + container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus); + setTimeout(() => { + const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS); + container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus); + container.dispatchEvent(unmountEvent); + if (!unmountEvent.defaultPrevented) { + focus(previouslyFocusedElement ?? document.body, { select: true }); + } + container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus); + focusScopesStack.remove(focusScope); + }, 0); + }; + } + }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]); + const handleKeyDown = React.useCallback( + (event) => { + if (!loop && !trapped) return; + if (focusScope.paused) return; + const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey; + const focusedElement = document.activeElement; + if (isTabKey && focusedElement) { + const container2 = event.currentTarget; + const [first, last] = getTabbableEdges(container2); + const hasTabbableElementsInside = first && last; + if (!hasTabbableElementsInside) { + if (focusedElement === container2) event.preventDefault(); + } else { + if (!event.shiftKey && focusedElement === last) { + event.preventDefault(); + if (loop) focus(first, { select: true }); + } else if (event.shiftKey && focusedElement === first) { + event.preventDefault(); + if (loop) focus(last, { select: true }); + } + } + } + }, + [loop, trapped, focusScope.paused] + ); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown }); +}); +FocusScope.displayName = FOCUS_SCOPE_NAME; +function focusFirst(candidates, { select = false } = {}) { + const previouslyFocusedElement = document.activeElement; + for (const candidate of candidates) { + focus(candidate, { select }); + if (document.activeElement !== previouslyFocusedElement) return; + } +} +function getTabbableEdges(container) { + const candidates = getTabbableCandidates(container); + const first = findVisible(candidates, container); + const last = findVisible(candidates.reverse(), container); + return [first, last]; +} +function getTabbableCandidates(container) { + const nodes = []; + const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { + acceptNode: (node) => { + const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden"; + if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; + return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; + } + }); + while (walker.nextNode()) nodes.push(walker.currentNode); + return nodes; +} +function findVisible(elements, container) { + for (const element of elements) { + if (!isHidden(element, { upTo: container })) return element; + } +} +function isHidden(node, { upTo }) { + if (getComputedStyle(node).visibility === "hidden") return true; + while (node) { + if (upTo !== void 0 && node === upTo) return false; + if (getComputedStyle(node).display === "none") return true; + node = node.parentElement; + } + return false; +} +function isSelectableInput(element) { + return element instanceof HTMLInputElement && "select" in element; +} +function focus(element, { select = false } = {}) { + if (element && element.focus) { + const previouslyFocusedElement = document.activeElement; + element.focus({ preventScroll: true }); + if (element !== previouslyFocusedElement && isSelectableInput(element) && select) + element.select(); + } +} +var focusScopesStack = createFocusScopesStack(); +function createFocusScopesStack() { + let stack = []; + return { + add(focusScope) { + const activeFocusScope = stack[0]; + if (focusScope !== activeFocusScope) { + activeFocusScope?.pause(); + } + stack = arrayRemove(stack, focusScope); + stack.unshift(focusScope); + }, + remove(focusScope) { + stack = arrayRemove(stack, focusScope); + stack[0]?.resume(); + } + }; +} +function arrayRemove(array, item) { + const updatedArray = [...array]; + const index = updatedArray.indexOf(item); + if (index !== -1) { + updatedArray.splice(index, 1); + } + return updatedArray; +} +function removeLinks(items) { + return items.filter((item) => item.tagName !== "A"); +} +var Root = FocusScope; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..788e404d349346f397274f21b0567ff1d380f6d7 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/focus-scope.tsx"], + "sourcesContent": ["'use client';\nexport {\n FocusScope,\n //\n Root,\n} from './focus-scope';\nexport type { FocusScopeProps } from './focus-scope';\n", "import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\n\nconst AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';\nconst AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\ntype FocusableTarget = HTMLElement | { focus(): void };\n\n/* -------------------------------------------------------------------------------------------------\n * FocusScope\n * -----------------------------------------------------------------------------------------------*/\n\nconst FOCUS_SCOPE_NAME = 'FocusScope';\n\ntype FocusScopeElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface FocusScopeProps extends PrimitiveDivProps {\n /**\n * When `true`, tabbing from last item will focus first tabbable\n * and shift+tab from first item will focus last tababble.\n * @defaultValue false\n */\n loop?: boolean;\n\n /**\n * When `true`, focus cannot escape the focus scope via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapped?: boolean;\n\n /**\n * Event handler called when auto-focusing on mount.\n * Can be prevented.\n */\n onMountAutoFocus?: (event: Event) => void;\n\n /**\n * Event handler called when auto-focusing on unmount.\n * Can be prevented.\n */\n onUnmountAutoFocus?: (event: Event) => void;\n}\n\nconst FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n },\n }).current;\n\n // Takes care of trapping focus if focus is moved outside programmatically for example\n React.useEffect(() => {\n if (trapped) {\n function handleFocusIn(event: FocusEvent) {\n if (focusScope.paused || !container) return;\n const target = event.target as HTMLElement | null;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }\n\n function handleFocusOut(event: FocusEvent) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget as HTMLElement | null;\n\n // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:\n //\n // 1. When the user switches app/tabs/windows/the browser itself loses focus.\n // 2. In Google Chrome, when the focused element is removed from the DOM.\n //\n // We let the browser do its thing here because:\n //\n // 1. The browser already keeps a memory of what's focused for when the page gets refocused.\n // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it\n // throws the CPU to 100%, so we avoid doing anything for this reason here too.\n if (relatedTarget === null) return;\n\n // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)\n // that is outside the container, we move focus to the last valid focused element inside.\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }\n\n // When the focused element gets removed from the DOM, browsers move focus\n // back to the document.body. In this case, we move focus to the container\n // to keep focus trapped correctly.\n function handleMutations(mutations: MutationRecord[]) {\n const focusedElement = document.activeElement as HTMLElement | null;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n }\n\n document.addEventListener('focusin', handleFocusIn);\n document.addEventListener('focusout', handleFocusOut);\n const mutationObserver = new MutationObserver(handleMutations);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n\n return () => {\n document.removeEventListener('focusin', handleFocusIn);\n document.removeEventListener('focusout', handleFocusOut);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement as HTMLElement | null;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n\n // We hit a react bug (fixed in v17) with focusing in unmount.\n // We need to delay the focus a little to get around it for now.\n // See: https://github.com/facebook/react/issues/17894\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n // we need to remove the listener after we `dispatchEvent`\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n\n // Takes care of looping focus (when tabbing whilst at the edges)\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n\n const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement as HTMLElement | null;\n\n if (isTabKey && focusedElement) {\n const container = event.currentTarget as HTMLElement;\n const [first, last] = getTabbableEdges(container);\n const hasTabbableElementsInside = first && last;\n\n // we can only wrap focus if we have tabbable edges\n if (!hasTabbableElementsInside) {\n if (focusedElement === container) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n\n return (\n \n );\n});\n\nFocusScope.displayName = FOCUS_SCOPE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Attempts focusing the first element in a list of candidates.\n * Stops when focus has actually moved.\n */\nfunction focusFirst(candidates: HTMLElement[], { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\n\n/**\n * Returns the first and last tabbable elements inside a container.\n */\nfunction getTabbableEdges(container: HTMLElement) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last] as const;\n}\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nfunction getTabbableCandidates(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n\n/**\n * Returns the first visible element in a list.\n * NOTE: Only checks visibility up to the `container`.\n */\nfunction findVisible(elements: HTMLElement[], container: HTMLElement) {\n for (const element of elements) {\n // we stop checking if it's hidden at the `container` level (excluding)\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\n\nfunction isHidden(node: HTMLElement, { upTo }: { upTo?: HTMLElement }) {\n if (getComputedStyle(node).visibility === 'hidden') return true;\n while (node) {\n // we stop at `upTo` (excluding it)\n if (upTo !== undefined && node === upTo) return false;\n if (getComputedStyle(node).display === 'none') return true;\n node = node.parentElement as HTMLElement;\n }\n return false;\n}\n\nfunction isSelectableInput(element: any): element is FocusableTarget & { select: () => void } {\n return element instanceof HTMLInputElement && 'select' in element;\n}\n\nfunction focus(element?: FocusableTarget | null, { select = false } = {}) {\n // only focus if that element is focusable\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users\n element.focus({ preventScroll: true });\n // only select if its not the same element, it supports selection and we need to select\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\n\n/* -------------------------------------------------------------------------------------------------\n * FocusScope stack\n * -----------------------------------------------------------------------------------------------*/\n\ntype FocusScopeAPI = { paused: boolean; pause(): void; resume(): void };\nconst focusScopesStack = createFocusScopesStack();\n\nfunction createFocusScopesStack() {\n /** A stack of focus scopes, with the active one at the top */\n let stack: FocusScopeAPI[] = [];\n\n return {\n add(focusScope: FocusScopeAPI) {\n // pause the currently active focus scope (at the top of the stack)\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n // remove in case it already exists (because we'll re-add it at the top of the stack)\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n\n remove(focusScope: FocusScopeAPI) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n },\n };\n}\n\nfunction arrayRemove(array: T[], item: T) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\n\nfunction removeLinks(items: HTMLElement[]) {\n return items.filter((item) => item.tagName !== 'A');\n}\n\nconst Root = FocusScope;\n\nexport {\n FocusScope,\n //\n Root,\n};\nexport type { FocusScopeProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,gCAAgC;AAChC,6BAA0B;AAC1B,oCAA+B;AAwM3B;AAtMJ,IAAM,qBAAqB;AAC3B,IAAM,uBAAuB;AAC7B,IAAM,gBAAgB,EAAE,SAAS,OAAO,YAAY,KAAK;AAQzD,IAAM,mBAAmB;AAgCzB,IAAM,aAAmB,iBAA+C,CAAC,OAAO,iBAAiB;AAC/F,QAAM;AAAA,IACJ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,kBAAkB;AAAA,IAClB,oBAAoB;AAAA,IACpB,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,CAAC,WAAW,YAAY,IAAU,eAA6B,IAAI;AACzE,QAAM,uBAAmB,8CAAe,oBAAoB;AAC5D,QAAM,yBAAqB,8CAAe,sBAAsB;AAChE,QAAM,wBAA8B,aAA2B,IAAI;AACnE,QAAM,mBAAe,2CAAgB,cAAc,CAAC,SAAS,aAAa,IAAI,CAAC;AAE/E,QAAM,aAAmB,aAAO;AAAA,IAC9B,QAAQ;AAAA,IACR,QAAQ;AACN,WAAK,SAAS;AAAA,IAChB;AAAA,IACA,SAAS;AACP,WAAK,SAAS;AAAA,IAChB;AAAA,EACF,CAAC,EAAE;AAGH,EAAM,gBAAU,MAAM;AACpB,QAAI,SAAS;AACX,UAASA,iBAAT,SAAuB,OAAmB;AACxC,YAAI,WAAW,UAAU,CAAC,UAAW;AACrC,cAAM,SAAS,MAAM;AACrB,YAAI,UAAU,SAAS,MAAM,GAAG;AAC9B,gCAAsB,UAAU;AAAA,QAClC,OAAO;AAC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FocusIn", "handleFocusOut", "handleMutations", "container"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e39d5c9105b3f8060d037bf5490843d20d1c859a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.mjs @@ -0,0 +1,214 @@ +"use client"; + +// src/focus-scope.tsx +import * as React from "react"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { Primitive } from "@radix-ui/react-primitive"; +import { useCallbackRef } from "@radix-ui/react-use-callback-ref"; +import { jsx } from "react/jsx-runtime"; +var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount"; +var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount"; +var EVENT_OPTIONS = { bubbles: false, cancelable: true }; +var FOCUS_SCOPE_NAME = "FocusScope"; +var FocusScope = React.forwardRef((props, forwardedRef) => { + const { + loop = false, + trapped = false, + onMountAutoFocus: onMountAutoFocusProp, + onUnmountAutoFocus: onUnmountAutoFocusProp, + ...scopeProps + } = props; + const [container, setContainer] = React.useState(null); + const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp); + const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp); + const lastFocusedElementRef = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node)); + const focusScope = React.useRef({ + paused: false, + pause() { + this.paused = true; + }, + resume() { + this.paused = false; + } + }).current; + React.useEffect(() => { + if (trapped) { + let handleFocusIn2 = function(event) { + if (focusScope.paused || !container) return; + const target = event.target; + if (container.contains(target)) { + lastFocusedElementRef.current = target; + } else { + focus(lastFocusedElementRef.current, { select: true }); + } + }, handleFocusOut2 = function(event) { + if (focusScope.paused || !container) return; + const relatedTarget = event.relatedTarget; + if (relatedTarget === null) return; + if (!container.contains(relatedTarget)) { + focus(lastFocusedElementRef.current, { select: true }); + } + }, handleMutations2 = function(mutations) { + const focusedElement = document.activeElement; + if (focusedElement !== document.body) return; + for (const mutation of mutations) { + if (mutation.removedNodes.length > 0) focus(container); + } + }; + var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2; + document.addEventListener("focusin", handleFocusIn2); + document.addEventListener("focusout", handleFocusOut2); + const mutationObserver = new MutationObserver(handleMutations2); + if (container) mutationObserver.observe(container, { childList: true, subtree: true }); + return () => { + document.removeEventListener("focusin", handleFocusIn2); + document.removeEventListener("focusout", handleFocusOut2); + mutationObserver.disconnect(); + }; + } + }, [trapped, container, focusScope.paused]); + React.useEffect(() => { + if (container) { + focusScopesStack.add(focusScope); + const previouslyFocusedElement = document.activeElement; + const hasFocusedCandidate = container.contains(previouslyFocusedElement); + if (!hasFocusedCandidate) { + const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS); + container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus); + container.dispatchEvent(mountEvent); + if (!mountEvent.defaultPrevented) { + focusFirst(removeLinks(getTabbableCandidates(container)), { select: true }); + if (document.activeElement === previouslyFocusedElement) { + focus(container); + } + } + } + return () => { + container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus); + setTimeout(() => { + const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS); + container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus); + container.dispatchEvent(unmountEvent); + if (!unmountEvent.defaultPrevented) { + focus(previouslyFocusedElement ?? document.body, { select: true }); + } + container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus); + focusScopesStack.remove(focusScope); + }, 0); + }; + } + }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]); + const handleKeyDown = React.useCallback( + (event) => { + if (!loop && !trapped) return; + if (focusScope.paused) return; + const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey; + const focusedElement = document.activeElement; + if (isTabKey && focusedElement) { + const container2 = event.currentTarget; + const [first, last] = getTabbableEdges(container2); + const hasTabbableElementsInside = first && last; + if (!hasTabbableElementsInside) { + if (focusedElement === container2) event.preventDefault(); + } else { + if (!event.shiftKey && focusedElement === last) { + event.preventDefault(); + if (loop) focus(first, { select: true }); + } else if (event.shiftKey && focusedElement === first) { + event.preventDefault(); + if (loop) focus(last, { select: true }); + } + } + } + }, + [loop, trapped, focusScope.paused] + ); + return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown }); +}); +FocusScope.displayName = FOCUS_SCOPE_NAME; +function focusFirst(candidates, { select = false } = {}) { + const previouslyFocusedElement = document.activeElement; + for (const candidate of candidates) { + focus(candidate, { select }); + if (document.activeElement !== previouslyFocusedElement) return; + } +} +function getTabbableEdges(container) { + const candidates = getTabbableCandidates(container); + const first = findVisible(candidates, container); + const last = findVisible(candidates.reverse(), container); + return [first, last]; +} +function getTabbableCandidates(container) { + const nodes = []; + const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { + acceptNode: (node) => { + const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden"; + if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; + return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; + } + }); + while (walker.nextNode()) nodes.push(walker.currentNode); + return nodes; +} +function findVisible(elements, container) { + for (const element of elements) { + if (!isHidden(element, { upTo: container })) return element; + } +} +function isHidden(node, { upTo }) { + if (getComputedStyle(node).visibility === "hidden") return true; + while (node) { + if (upTo !== void 0 && node === upTo) return false; + if (getComputedStyle(node).display === "none") return true; + node = node.parentElement; + } + return false; +} +function isSelectableInput(element) { + return element instanceof HTMLInputElement && "select" in element; +} +function focus(element, { select = false } = {}) { + if (element && element.focus) { + const previouslyFocusedElement = document.activeElement; + element.focus({ preventScroll: true }); + if (element !== previouslyFocusedElement && isSelectableInput(element) && select) + element.select(); + } +} +var focusScopesStack = createFocusScopesStack(); +function createFocusScopesStack() { + let stack = []; + return { + add(focusScope) { + const activeFocusScope = stack[0]; + if (focusScope !== activeFocusScope) { + activeFocusScope?.pause(); + } + stack = arrayRemove(stack, focusScope); + stack.unshift(focusScope); + }, + remove(focusScope) { + stack = arrayRemove(stack, focusScope); + stack[0]?.resume(); + } + }; +} +function arrayRemove(array, item) { + const updatedArray = [...array]; + const index = updatedArray.indexOf(item); + if (index !== -1) { + updatedArray.splice(index, 1); + } + return updatedArray; +} +function removeLinks(items) { + return items.filter((item) => item.tagName !== "A"); +} +var Root = FocusScope; +export { + FocusScope, + Root +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..f46dc6e2a6e87cf0dd3951f8ec74664386f24a35 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/focus-scope.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\n\nconst AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';\nconst AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\ntype FocusableTarget = HTMLElement | { focus(): void };\n\n/* -------------------------------------------------------------------------------------------------\n * FocusScope\n * -----------------------------------------------------------------------------------------------*/\n\nconst FOCUS_SCOPE_NAME = 'FocusScope';\n\ntype FocusScopeElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface FocusScopeProps extends PrimitiveDivProps {\n /**\n * When `true`, tabbing from last item will focus first tabbable\n * and shift+tab from first item will focus last tababble.\n * @defaultValue false\n */\n loop?: boolean;\n\n /**\n * When `true`, focus cannot escape the focus scope via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapped?: boolean;\n\n /**\n * Event handler called when auto-focusing on mount.\n * Can be prevented.\n */\n onMountAutoFocus?: (event: Event) => void;\n\n /**\n * Event handler called when auto-focusing on unmount.\n * Can be prevented.\n */\n onUnmountAutoFocus?: (event: Event) => void;\n}\n\nconst FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n },\n }).current;\n\n // Takes care of trapping focus if focus is moved outside programmatically for example\n React.useEffect(() => {\n if (trapped) {\n function handleFocusIn(event: FocusEvent) {\n if (focusScope.paused || !container) return;\n const target = event.target as HTMLElement | null;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }\n\n function handleFocusOut(event: FocusEvent) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget as HTMLElement | null;\n\n // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:\n //\n // 1. When the user switches app/tabs/windows/the browser itself loses focus.\n // 2. In Google Chrome, when the focused element is removed from the DOM.\n //\n // We let the browser do its thing here because:\n //\n // 1. The browser already keeps a memory of what's focused for when the page gets refocused.\n // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it\n // throws the CPU to 100%, so we avoid doing anything for this reason here too.\n if (relatedTarget === null) return;\n\n // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)\n // that is outside the container, we move focus to the last valid focused element inside.\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }\n\n // When the focused element gets removed from the DOM, browsers move focus\n // back to the document.body. In this case, we move focus to the container\n // to keep focus trapped correctly.\n function handleMutations(mutations: MutationRecord[]) {\n const focusedElement = document.activeElement as HTMLElement | null;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n }\n\n document.addEventListener('focusin', handleFocusIn);\n document.addEventListener('focusout', handleFocusOut);\n const mutationObserver = new MutationObserver(handleMutations);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n\n return () => {\n document.removeEventListener('focusin', handleFocusIn);\n document.removeEventListener('focusout', handleFocusOut);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement as HTMLElement | null;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n\n // We hit a react bug (fixed in v17) with focusing in unmount.\n // We need to delay the focus a little to get around it for now.\n // See: https://github.com/facebook/react/issues/17894\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n // we need to remove the listener after we `dispatchEvent`\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n\n // Takes care of looping focus (when tabbing whilst at the edges)\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n\n const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement as HTMLElement | null;\n\n if (isTabKey && focusedElement) {\n const container = event.currentTarget as HTMLElement;\n const [first, last] = getTabbableEdges(container);\n const hasTabbableElementsInside = first && last;\n\n // we can only wrap focus if we have tabbable edges\n if (!hasTabbableElementsInside) {\n if (focusedElement === container) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n\n return (\n \n );\n});\n\nFocusScope.displayName = FOCUS_SCOPE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Attempts focusing the first element in a list of candidates.\n * Stops when focus has actually moved.\n */\nfunction focusFirst(candidates: HTMLElement[], { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\n\n/**\n * Returns the first and last tabbable elements inside a container.\n */\nfunction getTabbableEdges(container: HTMLElement) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last] as const;\n}\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nfunction getTabbableCandidates(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n\n/**\n * Returns the first visible element in a list.\n * NOTE: Only checks visibility up to the `container`.\n */\nfunction findVisible(elements: HTMLElement[], container: HTMLElement) {\n for (const element of elements) {\n // we stop checking if it's hidden at the `container` level (excluding)\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\n\nfunction isHidden(node: HTMLElement, { upTo }: { upTo?: HTMLElement }) {\n if (getComputedStyle(node).visibility === 'hidden') return true;\n while (node) {\n // we stop at `upTo` (excluding it)\n if (upTo !== undefined && node === upTo) return false;\n if (getComputedStyle(node).display === 'none') return true;\n node = node.parentElement as HTMLElement;\n }\n return false;\n}\n\nfunction isSelectableInput(element: any): element is FocusableTarget & { select: () => void } {\n return element instanceof HTMLInputElement && 'select' in element;\n}\n\nfunction focus(element?: FocusableTarget | null, { select = false } = {}) {\n // only focus if that element is focusable\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users\n element.focus({ preventScroll: true });\n // only select if its not the same element, it supports selection and we need to select\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\n\n/* -------------------------------------------------------------------------------------------------\n * FocusScope stack\n * -----------------------------------------------------------------------------------------------*/\n\ntype FocusScopeAPI = { paused: boolean; pause(): void; resume(): void };\nconst focusScopesStack = createFocusScopesStack();\n\nfunction createFocusScopesStack() {\n /** A stack of focus scopes, with the active one at the top */\n let stack: FocusScopeAPI[] = [];\n\n return {\n add(focusScope: FocusScopeAPI) {\n // pause the currently active focus scope (at the top of the stack)\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n // remove in case it already exists (because we'll re-add it at the top of the stack)\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n\n remove(focusScope: FocusScopeAPI) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n },\n };\n}\n\nfunction arrayRemove(array: T[], item: T) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\n\nfunction removeLinks(items: HTMLElement[]) {\n return items.filter((item) => item.tagName !== 'A');\n}\n\nconst Root = FocusScope;\n\nexport {\n FocusScope,\n //\n Root,\n};\nexport type { FocusScopeProps };\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAwM3B;AAtMJ,IAAM,qBAAqB;AAC3B,IAAM,uBAAuB;AAC7B,IAAM,gBAAgB,EAAE,SAAS,OAAO,YAAY,KAAK;AAQzD,IAAM,mBAAmB;AAgCzB,IAAM,aAAmB,iBAA+C,CAAC,OAAO,iBAAiB;AAC/F,QAAM;AAAA,IACJ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,kBAAkB;AAAA,IAClB,oBAAoB;AAAA,IACpB,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,CAAC,WAAW,YAAY,IAAU,eAA6B,IAAI;AACzE,QAAM,mBAAmB,eAAe,oBAAoB;AAC5D,QAAM,qBAAqB,eAAe,sBAAsB;AAChE,QAAM,wBAA8B,aAA2B,IAAI;AACnE,QAAM,eAAe,gBAAgB,cAAc,CAAC,SAAS,aAAa,IAAI,CAAC;AAE/E,QAAM,aAAmB,aAAO;AAAA,IAC9B,QAAQ;AAAA,IACR,QAAQ;AACN,WAAK,SAAS;AAAA,IAChB;AAAA,IACA,SAAS;AACP,WAAK,SAAS;AAAA,IAChB;AAAA,EACF,CAAC,EAAE;AAGH,EAAM,gBAAU,MAAM;AACpB,QAAI,SAAS;AACX,UAASA,iBAAT,SAAuB,OAAmB;AACxC,YAAI,WAAW,UAAU,CAAC,UAAW;AACrC,cAAM,SAAS,MAAM;AACrB,YAAI,UAAU,SAAS,MAAM,GAAG;AAC9B,gCAAsB,UAAU;AAAA,QAClC,OAAO;A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FocusIn", "handleFocusOut", "handleMutations", "container"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/package.json b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0dfeb68eebaa28d30a79191ab87042dcbe697b61 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_bfee2eb130bbcf88306d67dcb0704394/node_modules/@radix-ui/react-focus-scope/package.json @@ -0,0 +1,70 @@ +{ + "name": "@radix-ui/react-focus-scope", + "version": "1.1.7", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-callback-ref": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/LICENSE b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/README.md b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9045f9090d3d27192249b1019ad3e5607ca710e8 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/README.md @@ -0,0 +1,3 @@ +# `react-hover-card` + +View docs [here](https://radix-ui.com/primitives/docs/components/hover-card). diff --git a/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..242d39a9cde72fa1a09f8f1ec9469183c463e7fc --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.d.mts @@ -0,0 +1,79 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import * as PopperPrimitive from '@radix-ui/react-popper'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; + +declare const createHoverCardScope: _radix_ui_react_context.CreateScope; +interface HoverCardProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?: (open: boolean) => void; + openDelay?: number; + closeDelay?: number; +} +declare const HoverCard: React.FC; +type PrimitiveLinkProps = React.ComponentPropsWithoutRef; +interface HoverCardTriggerProps extends PrimitiveLinkProps { +} +declare const HoverCardTrigger: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface HoverCardPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const HoverCardPortal: React.FC; +interface HoverCardContentProps extends HoverCardContentImplProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const HoverCardContent: React.ForwardRefExoticComponent>; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type PopperContentProps = React.ComponentPropsWithoutRef; +interface HoverCardContentImplProps extends Omit { + /** + * Event handler called when the escape key is down. + * Can be prevented. + */ + onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; + /** + * Event handler called when the a `pointerdown` event happens outside of the `HoverCard`. + * Can be prevented. + */ + onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside']; + /** + * Event handler called when the focus moves outside of the `HoverCard`. + * Can be prevented. + */ + onFocusOutside?: DismissableLayerProps['onFocusOutside']; + /** + * Event handler called when an interaction happens outside the `HoverCard`. + * Specifically, when a `pointerdown` event happens outside or focus moves outside of it. + * Can be prevented. + */ + onInteractOutside?: DismissableLayerProps['onInteractOutside']; +} +type PopperArrowProps = React.ComponentPropsWithoutRef; +interface HoverCardArrowProps extends PopperArrowProps { +} +declare const HoverCardArrow: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; + +export { Arrow, Content, HoverCard, HoverCardArrow, type HoverCardArrowProps, HoverCardContent, type HoverCardContentProps, HoverCardPortal, type HoverCardPortalProps, type HoverCardProps, HoverCardTrigger, type HoverCardTriggerProps, Portal, Root, Trigger, createHoverCardScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..242d39a9cde72fa1a09f8f1ec9469183c463e7fc --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.d.ts @@ -0,0 +1,79 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import * as PopperPrimitive from '@radix-ui/react-popper'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; + +declare const createHoverCardScope: _radix_ui_react_context.CreateScope; +interface HoverCardProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?: (open: boolean) => void; + openDelay?: number; + closeDelay?: number; +} +declare const HoverCard: React.FC; +type PrimitiveLinkProps = React.ComponentPropsWithoutRef; +interface HoverCardTriggerProps extends PrimitiveLinkProps { +} +declare const HoverCardTrigger: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface HoverCardPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const HoverCardPortal: React.FC; +interface HoverCardContentProps extends HoverCardContentImplProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const HoverCardContent: React.ForwardRefExoticComponent>; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type PopperContentProps = React.ComponentPropsWithoutRef; +interface HoverCardContentImplProps extends Omit { + /** + * Event handler called when the escape key is down. + * Can be prevented. + */ + onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; + /** + * Event handler called when the a `pointerdown` event happens outside of the `HoverCard`. + * Can be prevented. + */ + onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside']; + /** + * Event handler called when the focus moves outside of the `HoverCard`. + * Can be prevented. + */ + onFocusOutside?: DismissableLayerProps['onFocusOutside']; + /** + * Event handler called when an interaction happens outside the `HoverCard`. + * Specifically, when a `pointerdown` event happens outside or focus moves outside of it. + * Can be prevented. + */ + onInteractOutside?: DismissableLayerProps['onInteractOutside']; +} +type PopperArrowProps = React.ComponentPropsWithoutRef; +interface HoverCardArrowProps extends PopperArrowProps { +} +declare const HoverCardArrow: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; + +export { Arrow, Content, HoverCard, HoverCardArrow, type HoverCardArrowProps, HoverCardContent, type HoverCardContentProps, HoverCardPortal, type HoverCardPortalProps, type HoverCardProps, HoverCardTrigger, type HoverCardTriggerProps, Portal, Root, Trigger, createHoverCardScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.js b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..594bebff0521f5fbc3fbac52411a692226bf53d3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.js @@ -0,0 +1,294 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Arrow: () => Arrow2, + Content: () => Content2, + HoverCard: () => HoverCard, + HoverCardArrow: () => HoverCardArrow, + HoverCardContent: () => HoverCardContent, + HoverCardPortal: () => HoverCardPortal, + HoverCardTrigger: () => HoverCardTrigger, + Portal: () => Portal, + Root: () => Root2, + Trigger: () => Trigger, + createHoverCardScope: () => createHoverCardScope +}); +module.exports = __toCommonJS(index_exports); + +// src/hover-card.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var PopperPrimitive = __toESM(require("@radix-ui/react-popper")); +var import_react_popper = require("@radix-ui/react-popper"); +var import_react_portal = require("@radix-ui/react-portal"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_dismissable_layer = require("@radix-ui/react-dismissable-layer"); +var import_jsx_runtime = require("react/jsx-runtime"); +var originalBodyUserSelect; +var HOVERCARD_NAME = "HoverCard"; +var [createHoverCardContext, createHoverCardScope] = (0, import_react_context.createContextScope)(HOVERCARD_NAME, [ + import_react_popper.createPopperScope +]); +var usePopperScope = (0, import_react_popper.createPopperScope)(); +var [HoverCardProvider, useHoverCardContext] = createHoverCardContext(HOVERCARD_NAME); +var HoverCard = (props) => { + const { + __scopeHoverCard, + children, + open: openProp, + defaultOpen, + onOpenChange, + openDelay = 700, + closeDelay = 300 + } = props; + const popperScope = usePopperScope(__scopeHoverCard); + const openTimerRef = React.useRef(0); + const closeTimerRef = React.useRef(0); + const hasSelectionRef = React.useRef(false); + const isPointerDownOnContentRef = React.useRef(false); + const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: HOVERCARD_NAME + }); + const handleOpen = React.useCallback(() => { + clearTimeout(closeTimerRef.current); + openTimerRef.current = window.setTimeout(() => setOpen(true), openDelay); + }, [openDelay, setOpen]); + const handleClose = React.useCallback(() => { + clearTimeout(openTimerRef.current); + if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) { + closeTimerRef.current = window.setTimeout(() => setOpen(false), closeDelay); + } + }, [closeDelay, setOpen]); + const handleDismiss = React.useCallback(() => setOpen(false), [setOpen]); + React.useEffect(() => { + return () => { + clearTimeout(openTimerRef.current); + clearTimeout(closeTimerRef.current); + }; + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + HoverCardProvider, + { + scope: __scopeHoverCard, + open, + onOpenChange: setOpen, + onOpen: handleOpen, + onClose: handleClose, + onDismiss: handleDismiss, + hasSelectionRef, + isPointerDownOnContentRef, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Root, { ...popperScope, children }) + } + ); +}; +HoverCard.displayName = HOVERCARD_NAME; +var TRIGGER_NAME = "HoverCardTrigger"; +var HoverCardTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeHoverCard, ...triggerProps } = props; + const context = useHoverCardContext(TRIGGER_NAME, __scopeHoverCard); + const popperScope = usePopperScope(__scopeHoverCard); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.a, + { + "data-state": context.open ? "open" : "closed", + ...triggerProps, + ref: forwardedRef, + onPointerEnter: (0, import_primitive.composeEventHandlers)(props.onPointerEnter, excludeTouch(context.onOpen)), + onPointerLeave: (0, import_primitive.composeEventHandlers)(props.onPointerLeave, excludeTouch(context.onClose)), + onFocus: (0, import_primitive.composeEventHandlers)(props.onFocus, context.onOpen), + onBlur: (0, import_primitive.composeEventHandlers)(props.onBlur, context.onClose), + onTouchStart: (0, import_primitive.composeEventHandlers)(props.onTouchStart, (event) => event.preventDefault()) + } + ) }); + } +); +HoverCardTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "HoverCardPortal"; +var [PortalProvider, usePortalContext] = createHoverCardContext(PORTAL_NAME, { + forceMount: void 0 +}); +var HoverCardPortal = (props) => { + const { __scopeHoverCard, forceMount, children, container } = props; + const context = useHoverCardContext(PORTAL_NAME, __scopeHoverCard); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProvider, { scope: __scopeHoverCard, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_portal.Portal, { asChild: true, container, children }) }) }); +}; +HoverCardPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "HoverCardContent"; +var HoverCardContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopeHoverCard); + const { forceMount = portalContext.forceMount, ...contentProps } = props; + const context = useHoverCardContext(CONTENT_NAME, props.__scopeHoverCard); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + HoverCardContentImpl, + { + "data-state": context.open ? "open" : "closed", + ...contentProps, + onPointerEnter: (0, import_primitive.composeEventHandlers)(props.onPointerEnter, excludeTouch(context.onOpen)), + onPointerLeave: (0, import_primitive.composeEventHandlers)(props.onPointerLeave, excludeTouch(context.onClose)), + ref: forwardedRef + } + ) }); + } +); +HoverCardContent.displayName = CONTENT_NAME; +var HoverCardContentImpl = React.forwardRef((props, forwardedRef) => { + const { + __scopeHoverCard, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onInteractOutside, + ...contentProps + } = props; + const context = useHoverCardContext(CONTENT_NAME, __scopeHoverCard); + const popperScope = usePopperScope(__scopeHoverCard); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + const [containSelection, setContainSelection] = React.useState(false); + React.useEffect(() => { + if (containSelection) { + const body = document.body; + originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect; + body.style.userSelect = "none"; + body.style.webkitUserSelect = "none"; + return () => { + body.style.userSelect = originalBodyUserSelect; + body.style.webkitUserSelect = originalBodyUserSelect; + }; + } + }, [containSelection]); + React.useEffect(() => { + if (ref.current) { + const handlePointerUp = () => { + setContainSelection(false); + context.isPointerDownOnContentRef.current = false; + setTimeout(() => { + const hasSelection = document.getSelection()?.toString() !== ""; + if (hasSelection) context.hasSelectionRef.current = true; + }); + }; + document.addEventListener("pointerup", handlePointerUp); + return () => { + document.removeEventListener("pointerup", handlePointerUp); + context.hasSelectionRef.current = false; + context.isPointerDownOnContentRef.current = false; + }; + } + }, [context.isPointerDownOnContentRef, context.hasSelectionRef]); + React.useEffect(() => { + if (ref.current) { + const tabbables = getTabbableNodes(ref.current); + tabbables.forEach((tabbable) => tabbable.setAttribute("tabindex", "-1")); + } + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_dismissable_layer.DismissableLayer, + { + asChild: true, + disableOutsidePointerEvents: false, + onInteractOutside, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside: (0, import_primitive.composeEventHandlers)(onFocusOutside, (event) => { + event.preventDefault(); + }), + onDismiss: context.onDismiss, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + PopperPrimitive.Content, + { + ...popperScope, + ...contentProps, + onPointerDown: (0, import_primitive.composeEventHandlers)(contentProps.onPointerDown, (event) => { + if (event.currentTarget.contains(event.target)) { + setContainSelection(true); + } + context.hasSelectionRef.current = false; + context.isPointerDownOnContentRef.current = true; + }), + ref: composedRefs, + style: { + ...contentProps.style, + userSelect: containSelection ? "text" : void 0, + // Safari requires prefix + WebkitUserSelect: containSelection ? "text" : void 0, + // re-namespace exposed content custom properties + ...{ + "--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-hover-card-content-available-width": "var(--radix-popper-available-width)", + "--radix-hover-card-content-available-height": "var(--radix-popper-available-height)", + "--radix-hover-card-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-hover-card-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ) + } + ); +}); +var ARROW_NAME = "HoverCardArrow"; +var HoverCardArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeHoverCard, ...arrowProps } = props; + const popperScope = usePopperScope(__scopeHoverCard); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }); + } +); +HoverCardArrow.displayName = ARROW_NAME; +function excludeTouch(eventHandler) { + return (event) => event.pointerType === "touch" ? void 0 : eventHandler(); +} +function getTabbableNodes(container) { + const nodes = []; + const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { + acceptNode: (node) => { + return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; + } + }); + while (walker.nextNode()) nodes.push(walker.currentNode); + return nodes; +} +var Root2 = HoverCard; +var Trigger = HoverCardTrigger; +var Portal = HoverCardPortal; +var Content2 = HoverCardContent; +var Arrow2 = HoverCardArrow; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a726eb543ee4ab82b1e6817519f4aa7a3ac0a99f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/hover-card.tsx"], + "sourcesContent": ["'use client';\nexport {\n createHoverCardScope,\n //\n HoverCard,\n HoverCardTrigger,\n HoverCardPortal,\n HoverCardContent,\n HoverCardArrow,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Arrow,\n} from './hover-card';\nexport type {\n HoverCardProps,\n HoverCardTriggerProps,\n HoverCardPortalProps,\n HoverCardContentProps,\n HoverCardArrowProps,\n} from './hover-card';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCard\n * -----------------------------------------------------------------------------------------------*/\n\nlet originalBodyUserSelect: string;\n\nconst HOVERCARD_NAME = 'HoverCard';\n\ntype ScopedProps

= P & { __scopeHoverCard?: Scope };\nconst [createHoverCardContext, createHoverCardScope] = createContextScope(HOVERCARD_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype HoverCardContextValue = {\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpen(): void;\n onClose(): void;\n onDismiss(): void;\n hasSelectionRef: React.MutableRefObject;\n isPointerDownOnContentRef: React.MutableRefObject;\n};\n\nconst [HoverCardProvider, useHoverCardContext] =\n createHoverCardContext(HOVERCARD_NAME);\n\ninterface HoverCardProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n openDelay?: number;\n closeDelay?: number;\n}\n\nconst HoverCard: React.FC = (props: ScopedProps) => {\n const {\n __scopeHoverCard,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n openDelay = 700,\n closeDelay = 300,\n } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n const openTimerRef = React.useRef(0);\n const closeTimerRef = React.useRef(0);\n const hasSelectionRef = React.useRef(false);\n const isPointerDownOnContentRef = React.useRef(false);\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: HOVERCARD_NAME,\n });\n\n const handleOpen = React.useCallback(() => {\n clearTimeout(closeTimerRef.current);\n openTimerRef.current = window.setTimeout(() => setOpen(true), openDelay);\n }, [openDelay, setOpen]);\n\n const handleClose = React.useCallback(() => {\n clearTimeout(openTimerRef.current);\n if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) {\n closeTimerRef.current = window.setTimeout(() => setOpen(false), closeDelay);\n }\n }, [closeDelay, setOpen]);\n\n const handleDismiss = React.useCallback(() => setOpen(false), [setOpen]);\n\n // cleanup any queued state updates on unmount\n React.useEffect(() => {\n return () => {\n clearTimeout(openTimerRef.current);\n clearTimeout(closeTimerRef.current);\n };\n }, []);\n\n return (\n \n {children}\n \n );\n};\n\nHoverCard.displayName = HOVERCARD_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'HoverCardTrigger';\n\ntype HoverCardTriggerElement = React.ComponentRef;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef;\ninterface HoverCardTriggerProps extends PrimitiveLinkProps {}\n\nconst HoverCardTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeHoverCard, ...triggerProps } = props;\n const context = useHoverCardContext(TRIGGER_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n return (\n \n event.preventDefault())}\n />\n \n );\n }\n);\n\nHoverCardTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'HoverCardPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createHoverCardContext(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface HoverCardPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst HoverCardPortal: React.FC = (\n props: ScopedProps\n) => {\n const { __scopeHoverCard, forceMount, children, container } = props;\n const context = useHoverCardContext(PORTAL_NAME, __scopeHoverCard);\n return (\n \n \n \n {children}\n \n \n \n );\n};\n\nHoverCardPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'HoverCardContent';\n\ntype HoverCardContentElement = HoverCardContentImplElement;\ninterface HoverCardContentProps extends HoverCardContentImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst HoverCardContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeHoverCard);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useHoverCardContext(CONTENT_NAME, props.__scopeHoverCard);\n return (\n \n \n \n );\n }\n);\n\nHoverCardContent.displayName = CONTENT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype HoverCardContentImplElement = React.ComponentRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype PopperContentProps = React.ComponentPropsWithoutRef;\ninterface HoverCardContentImplProps extends Omit {\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `HoverCard`.\n * Can be prevented.\n */\n onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n /**\n * Event handler called when the focus moves outside of the `HoverCard`.\n * Can be prevented.\n */\n onFocusOutside?: DismissableLayerProps['onFocusOutside'];\n /**\n * Event handler called when an interaction happens outside the `HoverCard`.\n * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n * Can be prevented.\n */\n onInteractOutside?: DismissableLayerProps['onInteractOutside'];\n}\n\nconst HoverCardContentImpl = React.forwardRef<\n HoverCardContentImplElement,\n HoverCardContentImplProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n __scopeHoverCard,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = useHoverCardContext(CONTENT_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [containSelection, setContainSelection] = React.useState(false);\n\n React.useEffect(() => {\n if (containSelection) {\n const body = document.body;\n\n // Safari requires prefix\n originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect;\n\n body.style.userSelect = 'none';\n body.style.webkitUserSelect = 'none';\n return () => {\n body.style.userSelect = originalBodyUserSelect;\n body.style.webkitUserSelect = originalBodyUserSelect;\n };\n }\n }, [containSelection]);\n\n React.useEffect(() => {\n if (ref.current) {\n const handlePointerUp = () => {\n setContainSelection(false);\n context.isPointerDownOnContentRef.current = false;\n\n // Delay a frame to ensure we always access the latest selection\n setTimeout(() => {\n const hasSelection = document.getSelection()?.toString() !== '';\n if (hasSelection) context.hasSelectionRef.current = true;\n });\n };\n\n document.addEventListener('pointerup', handlePointerUp);\n return () => {\n document.removeEventListener('pointerup', handlePointerUp);\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = false;\n };\n }\n }, [context.isPointerDownOnContentRef, context.hasSelectionRef]);\n\n React.useEffect(() => {\n if (ref.current) {\n const tabbables = getTabbableNodes(ref.current);\n tabbables.forEach((tabbable) => tabbable.setAttribute('tabindex', '-1'));\n }\n });\n\n return (\n {\n event.preventDefault();\n })}\n onDismiss={context.onDismiss}\n >\n {\n // Contain selection to current layer\n if (event.currentTarget.contains(event.target as HTMLElement)) {\n setContainSelection(true);\n }\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = true;\n })}\n ref={composedRefs}\n style={{\n ...contentProps.style,\n userSelect: containSelection ? 'text' : undefined,\n // Safari requires prefix\n WebkitUserSelect: containSelection ? 'text' : undefined,\n // re-namespace exposed content custom properties\n ...{\n '--radix-hover-card-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-hover-card-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-hover-card-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-hover-card-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-hover-card-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n \n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'HoverCardArrow';\n\ntype HoverCardArrowElement = React.ComponentRef;\ntype PopperArrowProps = React.ComponentPropsWithoutRef;\ninterface HoverCardArrowProps extends PopperArrowProps {}\n\nconst HoverCardArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeHoverCard, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n return ;\n }\n);\n\nHoverCardArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction excludeTouch(eventHandler: () => void) {\n return (event: React.PointerEvent) =>\n event.pointerType === 'touch' ? undefined : eventHandler();\n}\n\n/**\n * Returns a list of nodes that can be in the tab sequence.\n * @see: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n */\nfunction getTabbableNodes(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n return nodes;\n}\n\nconst Root = HoverCard;\nconst Trigger = HoverCardTrigger;\nconst Portal = HoverCardPortal;\nconst Content = HoverCardContent;\nconst Arrow = HoverCardArrow;\n\nexport {\n createHoverCardScope,\n //\n HoverCard,\n HoverCardTrigger,\n HoverCardPortal,\n HoverCardContent,\n HoverCardArrow,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Arrow,\n};\nexport type {\n HoverCardProps,\n HoverCardTriggerProps,\n HoverCardPortalProps,\n HoverCardContentProps,\n HoverCardArrowProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA,eAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,2BAAmC;AACnC,0CAAqC;AACrC,gCAAgC;AAChC,sBAAiC;AACjC,0BAAkC;AAClC,0BAA0C;AAC1C,4BAAyB;AACzB,6BAA0B;AAC1B,qCAAiC;AAgG3B;AAxFN,IAAI;AAEJ,IAAM,iBAAiB;AAGvB,IAAM,CAAC,wBAAwB,oBAAoB,QAAI,yCAAmB,gBAAgB;AAAA,EACxF;AACF,CAAC;AACD,IAAM,qBAAiB,uCAAkB;AAYzC,IAAM,CAAC,mBAAmB,mBAAmB,IAC3C,uBAA8C,cAAc;AAW9D,IAAM,YAAsC,CAAC,UAAuC;AAClF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,I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CAA+C;AAAA,cAC/C,oCAAoC;AAAA,cACpC,qCAAqC;AAAA,YACvC;AAAA,UACF;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,CAAC;AAMD,IAAM,aAAa;AAMnB,IAAM,iBAAuB;AAAA,EAC3B,CAAC,OAAyC,iBAAiB;AACzD,UAAM,EAAE,kBAAkB,GAAG,WAAW,IAAI;AAC5C,UAAM,cAAc,eAAe,gBAAgB;AACnD,WAAO,4CAAiB,uBAAhB,EAAuB,GAAG,aAAc,GAAG,YAAY,KAAK,cAAc;AAAA,EACpF;AACF;AAEA,eAAe,cAAc;AAI7B,SAAS,aAAgB,cAA0B;AACjD,SAAO,CAAC,UACN,MAAM,gBAAgB,UAAU,SAAY,aAAa;AAC7D;AAMA,SAAS,iBAAiB,WAAwB;AAChD,QAAM,QAAuB,CAAC;AAC9B,QAAM,SAAS,SAAS,iBAAiB,WAAW,WAAW,cAAc;AAAA,IAC3E,YAAY,CAAC,SAAc;AAIzB,aAAO,KAAK,YAAY,IAAI,WAAW,gBAAgB,WAAW;AAAA,IACpE;AAAA,EACF,CAAC;AACD,SAAO,OAAO,SAAS,EAAG,OAAM,KAAK,OAAO,WAA0B;AACtE,SAAO;AACT;AAEA,IAAMC,QAAO;AACb,IAAM,UAAU;AAChB,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;", + "names": ["Arrow", "Content", "Root", "PortalPrimitive", "Root", "Content", "Arrow"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..94fae527ca03dcf51f3047be555545ac016072ab --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.mjs @@ -0,0 +1,262 @@ +"use client"; + +// src/hover-card.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { createContextScope } from "@radix-ui/react-context"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import * as PopperPrimitive from "@radix-ui/react-popper"; +import { createPopperScope } from "@radix-ui/react-popper"; +import { Portal as PortalPrimitive } from "@radix-ui/react-portal"; +import { Presence } from "@radix-ui/react-presence"; +import { Primitive } from "@radix-ui/react-primitive"; +import { DismissableLayer } from "@radix-ui/react-dismissable-layer"; +import { jsx } from "react/jsx-runtime"; +var originalBodyUserSelect; +var HOVERCARD_NAME = "HoverCard"; +var [createHoverCardContext, createHoverCardScope] = createContextScope(HOVERCARD_NAME, [ + createPopperScope +]); +var usePopperScope = createPopperScope(); +var [HoverCardProvider, useHoverCardContext] = createHoverCardContext(HOVERCARD_NAME); +var HoverCard = (props) => { + const { + __scopeHoverCard, + children, + open: openProp, + defaultOpen, + onOpenChange, + openDelay = 700, + closeDelay = 300 + } = props; + const popperScope = usePopperScope(__scopeHoverCard); + const openTimerRef = React.useRef(0); + const closeTimerRef = React.useRef(0); + const hasSelectionRef = React.useRef(false); + const isPointerDownOnContentRef = React.useRef(false); + const [open, setOpen] = useControllableState({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: HOVERCARD_NAME + }); + const handleOpen = React.useCallback(() => { + clearTimeout(closeTimerRef.current); + openTimerRef.current = window.setTimeout(() => setOpen(true), openDelay); + }, [openDelay, setOpen]); + const handleClose = React.useCallback(() => { + clearTimeout(openTimerRef.current); + if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) { + closeTimerRef.current = window.setTimeout(() => setOpen(false), closeDelay); + } + }, [closeDelay, setOpen]); + const handleDismiss = React.useCallback(() => setOpen(false), [setOpen]); + React.useEffect(() => { + return () => { + clearTimeout(openTimerRef.current); + clearTimeout(closeTimerRef.current); + }; + }, []); + return /* @__PURE__ */ jsx( + HoverCardProvider, + { + scope: __scopeHoverCard, + open, + onOpenChange: setOpen, + onOpen: handleOpen, + onClose: handleClose, + onDismiss: handleDismiss, + hasSelectionRef, + isPointerDownOnContentRef, + children: /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children }) + } + ); +}; +HoverCard.displayName = HOVERCARD_NAME; +var TRIGGER_NAME = "HoverCardTrigger"; +var HoverCardTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeHoverCard, ...triggerProps } = props; + const context = useHoverCardContext(TRIGGER_NAME, __scopeHoverCard); + const popperScope = usePopperScope(__scopeHoverCard); + return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx( + Primitive.a, + { + "data-state": context.open ? "open" : "closed", + ...triggerProps, + ref: forwardedRef, + onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)), + onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)), + onFocus: composeEventHandlers(props.onFocus, context.onOpen), + onBlur: composeEventHandlers(props.onBlur, context.onClose), + onTouchStart: composeEventHandlers(props.onTouchStart, (event) => event.preventDefault()) + } + ) }); + } +); +HoverCardTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "HoverCardPortal"; +var [PortalProvider, usePortalContext] = createHoverCardContext(PORTAL_NAME, { + forceMount: void 0 +}); +var HoverCardPortal = (props) => { + const { __scopeHoverCard, forceMount, children, container } = props; + const context = useHoverCardContext(PORTAL_NAME, __scopeHoverCard); + return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeHoverCard, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) }); +}; +HoverCardPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "HoverCardContent"; +var HoverCardContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopeHoverCard); + const { forceMount = portalContext.forceMount, ...contentProps } = props; + const context = useHoverCardContext(CONTENT_NAME, props.__scopeHoverCard); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx( + HoverCardContentImpl, + { + "data-state": context.open ? "open" : "closed", + ...contentProps, + onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)), + onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)), + ref: forwardedRef + } + ) }); + } +); +HoverCardContent.displayName = CONTENT_NAME; +var HoverCardContentImpl = React.forwardRef((props, forwardedRef) => { + const { + __scopeHoverCard, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onInteractOutside, + ...contentProps + } = props; + const context = useHoverCardContext(CONTENT_NAME, __scopeHoverCard); + const popperScope = usePopperScope(__scopeHoverCard); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref); + const [containSelection, setContainSelection] = React.useState(false); + React.useEffect(() => { + if (containSelection) { + const body = document.body; + originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect; + body.style.userSelect = "none"; + body.style.webkitUserSelect = "none"; + return () => { + body.style.userSelect = originalBodyUserSelect; + body.style.webkitUserSelect = originalBodyUserSelect; + }; + } + }, [containSelection]); + React.useEffect(() => { + if (ref.current) { + const handlePointerUp = () => { + setContainSelection(false); + context.isPointerDownOnContentRef.current = false; + setTimeout(() => { + const hasSelection = document.getSelection()?.toString() !== ""; + if (hasSelection) context.hasSelectionRef.current = true; + }); + }; + document.addEventListener("pointerup", handlePointerUp); + return () => { + document.removeEventListener("pointerup", handlePointerUp); + context.hasSelectionRef.current = false; + context.isPointerDownOnContentRef.current = false; + }; + } + }, [context.isPointerDownOnContentRef, context.hasSelectionRef]); + React.useEffect(() => { + if (ref.current) { + const tabbables = getTabbableNodes(ref.current); + tabbables.forEach((tabbable) => tabbable.setAttribute("tabindex", "-1")); + } + }); + return /* @__PURE__ */ jsx( + DismissableLayer, + { + asChild: true, + disableOutsidePointerEvents: false, + onInteractOutside, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside: composeEventHandlers(onFocusOutside, (event) => { + event.preventDefault(); + }), + onDismiss: context.onDismiss, + children: /* @__PURE__ */ jsx( + PopperPrimitive.Content, + { + ...popperScope, + ...contentProps, + onPointerDown: composeEventHandlers(contentProps.onPointerDown, (event) => { + if (event.currentTarget.contains(event.target)) { + setContainSelection(true); + } + context.hasSelectionRef.current = false; + context.isPointerDownOnContentRef.current = true; + }), + ref: composedRefs, + style: { + ...contentProps.style, + userSelect: containSelection ? "text" : void 0, + // Safari requires prefix + WebkitUserSelect: containSelection ? "text" : void 0, + // re-namespace exposed content custom properties + ...{ + "--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-hover-card-content-available-width": "var(--radix-popper-available-width)", + "--radix-hover-card-content-available-height": "var(--radix-popper-available-height)", + "--radix-hover-card-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-hover-card-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ) + } + ); +}); +var ARROW_NAME = "HoverCardArrow"; +var HoverCardArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeHoverCard, ...arrowProps } = props; + const popperScope = usePopperScope(__scopeHoverCard); + return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }); + } +); +HoverCardArrow.displayName = ARROW_NAME; +function excludeTouch(eventHandler) { + return (event) => event.pointerType === "touch" ? void 0 : eventHandler(); +} +function getTabbableNodes(container) { + const nodes = []; + const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { + acceptNode: (node) => { + return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; + } + }); + while (walker.nextNode()) nodes.push(walker.currentNode); + return nodes; +} +var Root2 = HoverCard; +var Trigger = HoverCardTrigger; +var Portal = HoverCardPortal; +var Content2 = HoverCardContent; +var Arrow2 = HoverCardArrow; +export { + Arrow2 as Arrow, + Content2 as Content, + HoverCard, + HoverCardArrow, + HoverCardContent, + HoverCardPortal, + HoverCardTrigger, + Portal, + Root2 as Root, + Trigger, + createHoverCardScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..55dba042372d0e17cb78b5eb420de0081905592d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/hover-card.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCard\n * -----------------------------------------------------------------------------------------------*/\n\nlet originalBodyUserSelect: string;\n\nconst HOVERCARD_NAME = 'HoverCard';\n\ntype ScopedProps

= P & { __scopeHoverCard?: Scope };\nconst [createHoverCardContext, createHoverCardScope] = createContextScope(HOVERCARD_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype HoverCardContextValue = {\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpen(): void;\n onClose(): void;\n onDismiss(): void;\n hasSelectionRef: React.MutableRefObject;\n isPointerDownOnContentRef: React.MutableRefObject;\n};\n\nconst [HoverCardProvider, useHoverCardContext] =\n createHoverCardContext(HOVERCARD_NAME);\n\ninterface HoverCardProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n openDelay?: number;\n closeDelay?: number;\n}\n\nconst HoverCard: React.FC = (props: ScopedProps) => {\n const {\n __scopeHoverCard,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n openDelay = 700,\n closeDelay = 300,\n } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n const openTimerRef = React.useRef(0);\n const closeTimerRef = React.useRef(0);\n const hasSelectionRef = React.useRef(false);\n const isPointerDownOnContentRef = React.useRef(false);\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: HOVERCARD_NAME,\n });\n\n const handleOpen = React.useCallback(() => {\n clearTimeout(closeTimerRef.current);\n openTimerRef.current = window.setTimeout(() => setOpen(true), openDelay);\n }, [openDelay, setOpen]);\n\n const handleClose = React.useCallback(() => {\n clearTimeout(openTimerRef.current);\n if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) {\n closeTimerRef.current = window.setTimeout(() => setOpen(false), closeDelay);\n }\n }, [closeDelay, setOpen]);\n\n const handleDismiss = React.useCallback(() => setOpen(false), [setOpen]);\n\n // cleanup any queued state updates on unmount\n React.useEffect(() => {\n return () => {\n clearTimeout(openTimerRef.current);\n clearTimeout(closeTimerRef.current);\n };\n }, []);\n\n return (\n \n {children}\n \n );\n};\n\nHoverCard.displayName = HOVERCARD_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'HoverCardTrigger';\n\ntype HoverCardTriggerElement = React.ComponentRef;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef;\ninterface HoverCardTriggerProps extends PrimitiveLinkProps {}\n\nconst HoverCardTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeHoverCard, ...triggerProps } = props;\n const context = useHoverCardContext(TRIGGER_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n return (\n \n event.preventDefault())}\n />\n \n );\n }\n);\n\nHoverCardTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'HoverCardPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createHoverCardContext(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface HoverCardPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst HoverCardPortal: React.FC = (\n props: ScopedProps\n) => {\n const { __scopeHoverCard, forceMount, children, container } = props;\n const context = useHoverCardContext(PORTAL_NAME, __scopeHoverCard);\n return (\n \n \n \n {children}\n \n \n \n );\n};\n\nHoverCardPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'HoverCardContent';\n\ntype HoverCardContentElement = HoverCardContentImplElement;\ninterface HoverCardContentProps extends HoverCardContentImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst HoverCardContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeHoverCard);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useHoverCardContext(CONTENT_NAME, props.__scopeHoverCard);\n return (\n \n \n \n );\n }\n);\n\nHoverCardContent.displayName = CONTENT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype HoverCardContentImplElement = React.ComponentRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype PopperContentProps = React.ComponentPropsWithoutRef;\ninterface HoverCardContentImplProps extends Omit {\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `HoverCard`.\n * Can be prevented.\n */\n onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n /**\n * Event handler called when the focus moves outside of the `HoverCard`.\n * Can be prevented.\n */\n onFocusOutside?: DismissableLayerProps['onFocusOutside'];\n /**\n * Event handler called when an interaction happens outside the `HoverCard`.\n * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n * Can be prevented.\n */\n onInteractOutside?: DismissableLayerProps['onInteractOutside'];\n}\n\nconst HoverCardContentImpl = React.forwardRef<\n HoverCardContentImplElement,\n HoverCardContentImplProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n __scopeHoverCard,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = useHoverCardContext(CONTENT_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [containSelection, setContainSelection] = React.useState(false);\n\n React.useEffect(() => {\n if (containSelection) {\n const body = document.body;\n\n // Safari requires prefix\n originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect;\n\n body.style.userSelect = 'none';\n body.style.webkitUserSelect = 'none';\n return () => {\n body.style.userSelect = originalBodyUserSelect;\n body.style.webkitUserSelect = originalBodyUserSelect;\n };\n }\n }, [containSelection]);\n\n React.useEffect(() => {\n if (ref.current) {\n const handlePointerUp = () => {\n setContainSelection(false);\n context.isPointerDownOnContentRef.current = false;\n\n // Delay a frame to ensure we always access the latest selection\n setTimeout(() => {\n const hasSelection = document.getSelection()?.toString() !== '';\n if (hasSelection) context.hasSelectionRef.current = true;\n });\n };\n\n document.addEventListener('pointerup', handlePointerUp);\n return () => {\n document.removeEventListener('pointerup', handlePointerUp);\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = false;\n };\n }\n }, [context.isPointerDownOnContentRef, context.hasSelectionRef]);\n\n React.useEffect(() => {\n if (ref.current) {\n const tabbables = getTabbableNodes(ref.current);\n tabbables.forEach((tabbable) => tabbable.setAttribute('tabindex', '-1'));\n }\n });\n\n return (\n {\n event.preventDefault();\n })}\n onDismiss={context.onDismiss}\n >\n {\n // Contain selection to current layer\n if (event.currentTarget.contains(event.target as HTMLElement)) {\n setContainSelection(true);\n }\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = true;\n })}\n ref={composedRefs}\n style={{\n ...contentProps.style,\n userSelect: containSelection ? 'text' : undefined,\n // Safari requires prefix\n WebkitUserSelect: containSelection ? 'text' : undefined,\n // re-namespace exposed content custom properties\n ...{\n '--radix-hover-card-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-hover-card-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-hover-card-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-hover-card-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-hover-card-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n \n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * HoverCardArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'HoverCardArrow';\n\ntype HoverCardArrowElement = React.ComponentRef;\ntype PopperArrowProps = React.ComponentPropsWithoutRef;\ninterface HoverCardArrowProps extends PopperArrowProps {}\n\nconst HoverCardArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeHoverCard, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n return ;\n }\n);\n\nHoverCardArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction excludeTouch(eventHandler: () => void) {\n return (event: React.PointerEvent) =>\n event.pointerType === 'touch' ? undefined : eventHandler();\n}\n\n/**\n * Returns a list of nodes that can be in the tab sequence.\n * @see: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n */\nfunction getTabbableNodes(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n return nodes;\n}\n\nconst Root = HoverCard;\nconst Trigger = HoverCardTrigger;\nconst Portal = HoverCardPortal;\nconst Content = HoverCardContent;\nconst Arrow = HoverCardArrow;\n\nexport {\n createHoverCardScope,\n //\n HoverCard,\n HoverCardTrigger,\n HoverCardPortal,\n HoverCardContent,\n HoverCardArrow,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Arrow,\n};\nexport type {\n HoverCardProps,\n HoverCardTriggerProps,\n HoverCardPortalProps,\n HoverCardContentProps,\n HoverCardArrowProps,\n};\n"], + "mappings": ";;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S,EAAG,OAAM,KAAK,OAAO,WAA0B;AACtE,SAAO;AACT;AAEA,IAAMA,QAAO;AACb,IAAM,UAAU;AAChB,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;", + "names": ["Root", "Content", "Arrow"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/package.json b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/package.json new file mode 100644 index 0000000000000000000000000000000000000000..666211537aaf0bf7278d1c9d92b2ee8265179c6f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-hover-card@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_8fe26a5ece3646d678c6d362a647814e/node_modules/@radix-ui/react-hover-card/package.json @@ -0,0 +1,76 @@ +{ + "name": "@radix-ui/react-hover-card", + "version": "1.1.15", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-dismissable-layer": "1.1.11", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-portal": "1.1.9", + "@radix-ui/react-popper": "1.2.8", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-primitive": "2.1.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/eslint-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/README.md b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0867a457499a348a858ca8ec7e6624df866b77a3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/README.md @@ -0,0 +1,13 @@ +# `react-id` + +## Installation + +```sh +$ yarn add @radix-ui/react-id +# or +$ npm install @radix-ui/react-id +``` + +## Usage + +View docs [here](https://radix-ui.com/primitives/docs/utilities/id-provider). diff --git a/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..411b3336d2b8894d6fc67a27b47f5488f7bacd13 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.d.mts @@ -0,0 +1,3 @@ +declare function useId(deterministicId?: string): string; + +export { useId }; diff --git a/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..411b3336d2b8894d6fc67a27b47f5488f7bacd13 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.d.ts @@ -0,0 +1,3 @@ +declare function useId(deterministicId?: string): string; + +export { useId }; diff --git a/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.js b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..27fa5805bc1af163f724289beca7c7b4fc55d817 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.js @@ -0,0 +1,49 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/react/id/src/index.ts +var index_exports = {}; +__export(index_exports, { + useId: () => useId +}); +module.exports = __toCommonJS(index_exports); + +// packages/react/id/src/id.tsx +var React = __toESM(require("react")); +var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect"); +var useReactId = React[" useId ".trim().toString()] || (() => void 0); +var count = 0; +function useId(deterministicId) { + const [id, setId] = React.useState(useReactId()); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + if (!deterministicId) setId((reactId) => reactId ?? String(count++)); + }, [deterministicId]); + return deterministicId || (id ? `radix-${id}` : ""); +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6cc584993944a77e0135a8b21f748ef0e4507222 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/id.tsx"], + "sourcesContent": ["export { useId } from './id';\n", "import * as React from 'react';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n// We spaces with `.trim().toString()` to prevent bundlers from trying to `import { useId } from 'react';`\nconst useReactId = (React as any)[' useId '.trim().toString()] || (() => undefined);\nlet count = 0;\n\nfunction useId(deterministicId?: string): string {\n const [id, setId] = React.useState(useReactId());\n // React versions older than 18 will have client-side ids only.\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : '');\n}\n\nexport { useId };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,qCAAgC;AAGhC,IAAM,aAAc,MAAc,UAAU,KAAK,EAAE,SAAS,CAAC,MAAM,MAAM;AACzE,IAAI,QAAQ;AAEZ,SAAS,MAAM,iBAAkC;AAC/C,QAAM,CAAC,IAAI,KAAK,IAAU,eAA6B,WAAW,CAAC;AAEnE,sDAAgB,MAAM;AACpB,QAAI,CAAC,gBAAiB,OAAM,CAAC,YAAY,WAAW,OAAO,OAAO,CAAC;AAAA,EACrE,GAAG,CAAC,eAAe,CAAC;AACpB,SAAO,oBAAoB,KAAK,SAAS,EAAE,KAAK;AAClD;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c415a74f9179a46422d37dda599233d427dfac6f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs @@ -0,0 +1,16 @@ +// packages/react/id/src/id.tsx +import * as React from "react"; +import { useLayoutEffect } from "@radix-ui/react-use-layout-effect"; +var useReactId = React[" useId ".trim().toString()] || (() => void 0); +var count = 0; +function useId(deterministicId) { + const [id, setId] = React.useState(useReactId()); + useLayoutEffect(() => { + if (!deterministicId) setId((reactId) => reactId ?? String(count++)); + }, [deterministicId]); + return deterministicId || (id ? `radix-${id}` : ""); +} +export { + useId +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..42b7e1f6c7c96f980b08be6670460a347fa117e4 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/id.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n// We spaces with `.trim().toString()` to prevent bundlers from trying to `import { useId } from 'react';`\nconst useReactId = (React as any)[' useId '.trim().toString()] || (() => undefined);\nlet count = 0;\n\nfunction useId(deterministicId?: string): string {\n const [id, setId] = React.useState(useReactId());\n // React versions older than 18 will have client-side ids only.\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : '');\n}\n\nexport { useId };\n"], + "mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAGhC,IAAM,aAAc,MAAc,UAAU,KAAK,EAAE,SAAS,CAAC,MAAM,MAAM;AACzE,IAAI,QAAQ;AAEZ,SAAS,MAAM,iBAAkC;AAC/C,QAAM,CAAC,IAAI,KAAK,IAAU,eAA6B,WAAW,CAAC;AAEnE,kBAAgB,MAAM;AACpB,QAAI,CAAC,gBAAiB,OAAM,CAAC,YAAY,WAAW,OAAO,OAAO,CAAC;AAAA,EACrE,GAAG,CAAC,eAAe,CAAC;AACpB,SAAO,oBAAoB,KAAK,SAAS,EAAE,KAAK;AAClD;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/package.json b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e84a4e43f6ab3c8a62cd5c6c77913a608f800fbc --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-id/package.json @@ -0,0 +1,78 @@ +{ + "name": "@radix-ui/react-id", + "version": "1.1.1", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "typescript": "^5.7.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/LICENSE b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/README.md b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/README.md new file mode 100644 index 0000000000000000000000000000000000000000..939fd9151edd673c3ff5f3beb40f68576e3e38a4 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/README.md @@ -0,0 +1,3 @@ +# `react-label` + +View docs [here](https://radix-ui.com/primitives/docs/utilities/label). diff --git a/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b37e26cf74939d3029689b0dc74d85e0100b0717 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.d.mts @@ -0,0 +1,10 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveLabelProps = React.ComponentPropsWithoutRef; +interface LabelProps extends PrimitiveLabelProps { +} +declare const Label: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { Label, type LabelProps, Root }; diff --git a/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b37e26cf74939d3029689b0dc74d85e0100b0717 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.d.ts @@ -0,0 +1,10 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveLabelProps = React.ComponentPropsWithoutRef; +interface LabelProps extends PrimitiveLabelProps { +} +declare const Label: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { Label, type LabelProps, Root }; diff --git a/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.js b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..0bfc39b61b43c628141fed8cf7349b7d1fac29ef --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.js @@ -0,0 +1,61 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Label: () => Label, + Root: () => Root +}); +module.exports = __toCommonJS(index_exports); + +// src/label.tsx +var React = __toESM(require("react")); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_jsx_runtime = require("react/jsx-runtime"); +var NAME = "Label"; +var Label = React.forwardRef((props, forwardedRef) => { + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.label, + { + ...props, + ref: forwardedRef, + onMouseDown: (event) => { + const target = event.target; + if (target.closest("button, input, select, textarea")) return; + props.onMouseDown?.(event); + if (!event.defaultPrevented && event.detail > 1) event.preventDefault(); + } + } + ); +}); +Label.displayName = NAME; +var Root = Label; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b3ff8dadd28b2de86892d1052b904e2fee79aad3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/label.tsx"], + "sourcesContent": ["'use client';\nexport {\n Label,\n //\n Root,\n} from './label';\nexport type { LabelProps } from './label';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Label\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Label';\n\ntype LabelElement = React.ComponentRef;\ntype PrimitiveLabelProps = React.ComponentPropsWithoutRef;\ninterface LabelProps extends PrimitiveLabelProps {}\n\nconst Label = React.forwardRef((props, forwardedRef) => {\n return (\n {\n // only prevent text selection if clicking inside the label itself\n const target = event.target as HTMLElement;\n if (target.closest('button, input, select, textarea')) return;\n\n props.onMouseDown?.(event);\n // prevent text selection when double clicking label\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }}\n />\n );\n});\n\nLabel.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Label;\n\nexport {\n Label,\n //\n Root,\n};\nexport type { LabelProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AActB;AARJ,IAAM,OAAO;AAMb,IAAM,QAAc,iBAAqC,CAAC,OAAO,iBAAiB;AAChF,SACE;AAAA,IAAC,iCAAU;AAAA,IAAV;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,aAAa,CAAC,UAAU;AAEtB,cAAM,SAAS,MAAM;AACrB,YAAI,OAAO,QAAQ,iCAAiC,EAAG;AAEvD,cAAM,cAAc,KAAK;AAEzB,YAAI,CAAC,MAAM,oBAAoB,MAAM,SAAS,EAAG,OAAM,eAAe;AAAA,MACxE;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,MAAM,cAAc;AAIpB,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e346c4e7d0136be56178baa884ff160f58a4a8e9 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.mjs @@ -0,0 +1,29 @@ +"use client"; + +// src/label.tsx +import * as React from "react"; +import { Primitive } from "@radix-ui/react-primitive"; +import { jsx } from "react/jsx-runtime"; +var NAME = "Label"; +var Label = React.forwardRef((props, forwardedRef) => { + return /* @__PURE__ */ jsx( + Primitive.label, + { + ...props, + ref: forwardedRef, + onMouseDown: (event) => { + const target = event.target; + if (target.closest("button, input, select, textarea")) return; + props.onMouseDown?.(event); + if (!event.defaultPrevented && event.detail > 1) event.preventDefault(); + } + } + ); +}); +Label.displayName = NAME; +var Root = Label; +export { + Label, + Root +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..705d34925588c0b11d8330043f0577dbd1114167 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/label.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Label\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Label';\n\ntype LabelElement = React.ComponentRef;\ntype PrimitiveLabelProps = React.ComponentPropsWithoutRef;\ninterface LabelProps extends PrimitiveLabelProps {}\n\nconst Label = React.forwardRef((props, forwardedRef) => {\n return (\n {\n // only prevent text selection if clicking inside the label itself\n const target = event.target as HTMLElement;\n if (target.closest('button, input, select, textarea')) return;\n\n props.onMouseDown?.(event);\n // prevent text selection when double clicking label\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }}\n />\n );\n});\n\nLabel.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Label;\n\nexport {\n Label,\n //\n Root,\n};\nexport type { LabelProps };\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AActB;AARJ,IAAM,OAAO;AAMb,IAAM,QAAc,iBAAqC,CAAC,OAAO,iBAAiB;AAChF,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,aAAa,CAAC,UAAU;AAEtB,cAAM,SAAS,MAAM;AACrB,YAAI,OAAO,QAAQ,iCAAiC,EAAG;AAEvD,cAAM,cAAc,KAAK;AAEzB,YAAI,CAAC,MAAM,oBAAoB,MAAM,SAAS,EAAG,OAAM,eAAe;AAAA,MACxE;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,MAAM,cAAc;AAIpB,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/package.json b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9d19d7d2856b12cb90ad24286b0eed04df3abc17 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_181fc8577c9d21b606b51d1a424dd950/node_modules/@radix-ui/react-label/package.json @@ -0,0 +1,68 @@ +{ + "name": "@radix-ui/react-label", + "version": "2.1.7", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-primitive": "2.1.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/builder": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/LICENSE b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/README.md b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b13105179be45b0a4402f3bc231fa89836bbeb1 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/README.md @@ -0,0 +1,3 @@ +# `react-menu` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..58c3358800028b8c13eefa6fa485d75bc928db9b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.d.mts @@ -0,0 +1,169 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import { FocusScope } from '@radix-ui/react-focus-scope'; +import * as PopperPrimitive from '@radix-ui/react-popper'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as RovingFocusGroup from '@radix-ui/react-roving-focus'; + +type Direction = 'ltr' | 'rtl'; +declare const createMenuScope: _radix_ui_react_context.CreateScope; +interface MenuProps { + children?: React.ReactNode; + open?: boolean; + onOpenChange?(open: boolean): void; + dir?: Direction; + modal?: boolean; +} +declare const Menu: React.FC; +type PopperAnchorProps = React.ComponentPropsWithoutRef; +interface MenuAnchorProps extends PopperAnchorProps { +} +declare const MenuAnchor: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface MenuPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const MenuPortal: React.FC; +/** + * We purposefully don't union MenuRootContent and MenuSubContent props here because + * they have conflicting prop types. We agreed that we would allow MenuSubContent to + * accept props that it would just ignore. + */ +interface MenuContentProps extends MenuRootContentTypeProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const MenuContent: React.ForwardRefExoticComponent>; +interface MenuRootContentTypeProps extends Omit { +} +type FocusScopeProps = React.ComponentPropsWithoutRef; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type RovingFocusGroupProps = React.ComponentPropsWithoutRef; +type PopperContentProps = React.ComponentPropsWithoutRef; +type MenuContentImplPrivateProps = { + onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus']; + onDismiss?: DismissableLayerProps['onDismiss']; + disableOutsidePointerEvents?: DismissableLayerProps['disableOutsidePointerEvents']; + /** + * Whether scrolling outside the `MenuContent` should be prevented + * (default: `false`) + */ + disableOutsideScroll?: boolean; + /** + * Whether focus should be trapped within the `MenuContent` + * (default: false) + */ + trapFocus?: FocusScopeProps['trapped']; +}; +interface MenuContentImplProps extends MenuContentImplPrivateProps, Omit { + /** + * Event handler called when auto-focusing on close. + * Can be prevented. + */ + onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']; + /** + * Whether keyboard navigation should loop around + * @defaultValue false + */ + loop?: RovingFocusGroupProps['loop']; + onEntryFocus?: RovingFocusGroupProps['onEntryFocus']; + onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; + onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside']; + onFocusOutside?: DismissableLayerProps['onFocusOutside']; + onInteractOutside?: DismissableLayerProps['onInteractOutside']; +} +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface MenuGroupProps extends PrimitiveDivProps { +} +declare const MenuGroup: React.ForwardRefExoticComponent>; +interface MenuLabelProps extends PrimitiveDivProps { +} +declare const MenuLabel: React.ForwardRefExoticComponent>; +interface MenuItemProps extends Omit { + onSelect?: (event: Event) => void; +} +declare const MenuItem: React.ForwardRefExoticComponent>; +interface MenuItemImplProps extends PrimitiveDivProps { + disabled?: boolean; + textValue?: string; +} +type CheckedState = boolean | 'indeterminate'; +interface MenuCheckboxItemProps extends MenuItemProps { + checked?: CheckedState; + onCheckedChange?: (checked: boolean) => void; +} +declare const MenuCheckboxItem: React.ForwardRefExoticComponent>; +interface MenuRadioGroupProps extends MenuGroupProps { + value?: string; + onValueChange?: (value: string) => void; +} +declare const MenuRadioGroup: React.ForwardRefExoticComponent>; +interface MenuRadioItemProps extends MenuItemProps { + value: string; +} +declare const MenuRadioItem: React.ForwardRefExoticComponent>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface MenuItemIndicatorProps extends PrimitiveSpanProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const MenuItemIndicator: React.ForwardRefExoticComponent>; +interface MenuSeparatorProps extends PrimitiveDivProps { +} +declare const MenuSeparator: React.ForwardRefExoticComponent>; +type PopperArrowProps = React.ComponentPropsWithoutRef; +interface MenuArrowProps extends PopperArrowProps { +} +declare const MenuArrow: React.ForwardRefExoticComponent>; +interface MenuSubProps { + children?: React.ReactNode; + open?: boolean; + onOpenChange?(open: boolean): void; +} +declare const MenuSub: React.FC; +interface MenuSubTriggerProps extends MenuItemImplProps { +} +declare const MenuSubTrigger: React.ForwardRefExoticComponent>; +interface MenuSubContentProps extends Omit { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const MenuSubContent: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Anchor: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Group: React.ForwardRefExoticComponent>; +declare const Label: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const CheckboxItem: React.ForwardRefExoticComponent>; +declare const RadioGroup: React.ForwardRefExoticComponent>; +declare const RadioItem: React.ForwardRefExoticComponent>; +declare const ItemIndicator: React.ForwardRefExoticComponent>; +declare const Separator: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; +declare const Sub: React.FC; +declare const SubTrigger: React.ForwardRefExoticComponent>; +declare const SubContent: React.ForwardRefExoticComponent>; + +export { Anchor, Arrow, CheckboxItem, Content, Group, Item, ItemIndicator, Label, Menu, MenuAnchor, type MenuAnchorProps, MenuArrow, type MenuArrowProps, MenuCheckboxItem, type MenuCheckboxItemProps, MenuContent, type MenuContentProps, MenuGroup, type MenuGroupProps, MenuItem, MenuItemIndicator, type MenuItemIndicatorProps, type MenuItemProps, MenuLabel, type MenuLabelProps, MenuPortal, type MenuPortalProps, type MenuProps, MenuRadioGroup, type MenuRadioGroupProps, MenuRadioItem, type MenuRadioItemProps, MenuSeparator, type MenuSeparatorProps, MenuSub, MenuSubContent, type MenuSubContentProps, type MenuSubProps, MenuSubTrigger, type MenuSubTriggerProps, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, createMenuScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..58c3358800028b8c13eefa6fa485d75bc928db9b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.d.ts @@ -0,0 +1,169 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import { FocusScope } from '@radix-ui/react-focus-scope'; +import * as PopperPrimitive from '@radix-ui/react-popper'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as RovingFocusGroup from '@radix-ui/react-roving-focus'; + +type Direction = 'ltr' | 'rtl'; +declare const createMenuScope: _radix_ui_react_context.CreateScope; +interface MenuProps { + children?: React.ReactNode; + open?: boolean; + onOpenChange?(open: boolean): void; + dir?: Direction; + modal?: boolean; +} +declare const Menu: React.FC; +type PopperAnchorProps = React.ComponentPropsWithoutRef; +interface MenuAnchorProps extends PopperAnchorProps { +} +declare const MenuAnchor: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface MenuPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const MenuPortal: React.FC; +/** + * We purposefully don't union MenuRootContent and MenuSubContent props here because + * they have conflicting prop types. We agreed that we would allow MenuSubContent to + * accept props that it would just ignore. + */ +interface MenuContentProps extends MenuRootContentTypeProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const MenuContent: React.ForwardRefExoticComponent>; +interface MenuRootContentTypeProps extends Omit { +} +type FocusScopeProps = React.ComponentPropsWithoutRef; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type RovingFocusGroupProps = React.ComponentPropsWithoutRef; +type PopperContentProps = React.ComponentPropsWithoutRef; +type MenuContentImplPrivateProps = { + onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus']; + onDismiss?: DismissableLayerProps['onDismiss']; + disableOutsidePointerEvents?: DismissableLayerProps['disableOutsidePointerEvents']; + /** + * Whether scrolling outside the `MenuContent` should be prevented + * (default: `false`) + */ + disableOutsideScroll?: boolean; + /** + * Whether focus should be trapped within the `MenuContent` + * (default: false) + */ + trapFocus?: FocusScopeProps['trapped']; +}; +interface MenuContentImplProps extends MenuContentImplPrivateProps, Omit { + /** + * Event handler called when auto-focusing on close. + * Can be prevented. + */ + onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']; + /** + * Whether keyboard navigation should loop around + * @defaultValue false + */ + loop?: RovingFocusGroupProps['loop']; + onEntryFocus?: RovingFocusGroupProps['onEntryFocus']; + onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; + onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside']; + onFocusOutside?: DismissableLayerProps['onFocusOutside']; + onInteractOutside?: DismissableLayerProps['onInteractOutside']; +} +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface MenuGroupProps extends PrimitiveDivProps { +} +declare const MenuGroup: React.ForwardRefExoticComponent>; +interface MenuLabelProps extends PrimitiveDivProps { +} +declare const MenuLabel: React.ForwardRefExoticComponent>; +interface MenuItemProps extends Omit { + onSelect?: (event: Event) => void; +} +declare const MenuItem: React.ForwardRefExoticComponent>; +interface MenuItemImplProps extends PrimitiveDivProps { + disabled?: boolean; + textValue?: string; +} +type CheckedState = boolean | 'indeterminate'; +interface MenuCheckboxItemProps extends MenuItemProps { + checked?: CheckedState; + onCheckedChange?: (checked: boolean) => void; +} +declare const MenuCheckboxItem: React.ForwardRefExoticComponent>; +interface MenuRadioGroupProps extends MenuGroupProps { + value?: string; + onValueChange?: (value: string) => void; +} +declare const MenuRadioGroup: React.ForwardRefExoticComponent>; +interface MenuRadioItemProps extends MenuItemProps { + value: string; +} +declare const MenuRadioItem: React.ForwardRefExoticComponent>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface MenuItemIndicatorProps extends PrimitiveSpanProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const MenuItemIndicator: React.ForwardRefExoticComponent>; +interface MenuSeparatorProps extends PrimitiveDivProps { +} +declare const MenuSeparator: React.ForwardRefExoticComponent>; +type PopperArrowProps = React.ComponentPropsWithoutRef; +interface MenuArrowProps extends PopperArrowProps { +} +declare const MenuArrow: React.ForwardRefExoticComponent>; +interface MenuSubProps { + children?: React.ReactNode; + open?: boolean; + onOpenChange?(open: boolean): void; +} +declare const MenuSub: React.FC; +interface MenuSubTriggerProps extends MenuItemImplProps { +} +declare const MenuSubTrigger: React.ForwardRefExoticComponent>; +interface MenuSubContentProps extends Omit { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const MenuSubContent: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Anchor: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Group: React.ForwardRefExoticComponent>; +declare const Label: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const CheckboxItem: React.ForwardRefExoticComponent>; +declare const RadioGroup: React.ForwardRefExoticComponent>; +declare const RadioItem: React.ForwardRefExoticComponent>; +declare const ItemIndicator: React.ForwardRefExoticComponent>; +declare const Separator: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; +declare const Sub: React.FC; +declare const SubTrigger: React.ForwardRefExoticComponent>; +declare const SubContent: React.ForwardRefExoticComponent>; + +export { Anchor, Arrow, CheckboxItem, Content, Group, Item, ItemIndicator, Label, Menu, MenuAnchor, type MenuAnchorProps, MenuArrow, type MenuArrowProps, MenuCheckboxItem, type MenuCheckboxItemProps, MenuContent, type MenuContentProps, MenuGroup, type MenuGroupProps, MenuItem, MenuItemIndicator, type MenuItemIndicatorProps, type MenuItemProps, MenuLabel, type MenuLabelProps, MenuPortal, type MenuPortalProps, type MenuProps, MenuRadioGroup, type MenuRadioGroupProps, MenuRadioItem, type MenuRadioItemProps, MenuSeparator, type MenuSeparatorProps, MenuSub, MenuSubContent, type MenuSubContentProps, type MenuSubProps, MenuSubTrigger, type MenuSubTriggerProps, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, createMenuScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.js b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..4d102d0cf4c9f82dcf13a384e5af0af36a4285d3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.js @@ -0,0 +1,904 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Anchor: () => Anchor2, + Arrow: () => Arrow2, + CheckboxItem: () => CheckboxItem, + Content: () => Content2, + Group: () => Group, + Item: () => Item2, + ItemIndicator: () => ItemIndicator, + Label: () => Label, + Menu: () => Menu, + MenuAnchor: () => MenuAnchor, + MenuArrow: () => MenuArrow, + MenuCheckboxItem: () => MenuCheckboxItem, + MenuContent: () => MenuContent, + MenuGroup: () => MenuGroup, + MenuItem: () => MenuItem, + MenuItemIndicator: () => MenuItemIndicator, + MenuLabel: () => MenuLabel, + MenuPortal: () => MenuPortal, + MenuRadioGroup: () => MenuRadioGroup, + MenuRadioItem: () => MenuRadioItem, + MenuSeparator: () => MenuSeparator, + MenuSub: () => MenuSub, + MenuSubContent: () => MenuSubContent, + MenuSubTrigger: () => MenuSubTrigger, + Portal: () => Portal, + RadioGroup: () => RadioGroup, + RadioItem: () => RadioItem, + Root: () => Root3, + Separator: () => Separator, + Sub: () => Sub, + SubContent: () => SubContent, + SubTrigger: () => SubTrigger, + createMenuScope: () => createMenuScope +}); +module.exports = __toCommonJS(index_exports); + +// src/menu.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_collection = require("@radix-ui/react-collection"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_direction = require("@radix-ui/react-direction"); +var import_react_dismissable_layer = require("@radix-ui/react-dismissable-layer"); +var import_react_focus_guards = require("@radix-ui/react-focus-guards"); +var import_react_focus_scope = require("@radix-ui/react-focus-scope"); +var import_react_id = require("@radix-ui/react-id"); +var PopperPrimitive = __toESM(require("@radix-ui/react-popper")); +var import_react_popper = require("@radix-ui/react-popper"); +var import_react_portal = require("@radix-ui/react-portal"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var RovingFocusGroup = __toESM(require("@radix-ui/react-roving-focus")); +var import_react_roving_focus = require("@radix-ui/react-roving-focus"); +var import_react_slot = require("@radix-ui/react-slot"); +var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref"); +var import_aria_hidden = require("aria-hidden"); +var import_react_remove_scroll = require("react-remove-scroll"); +var import_jsx_runtime = require("react/jsx-runtime"); +var SELECTION_KEYS = ["Enter", " "]; +var FIRST_KEYS = ["ArrowDown", "PageUp", "Home"]; +var LAST_KEYS = ["ArrowUp", "PageDown", "End"]; +var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS]; +var SUB_OPEN_KEYS = { + ltr: [...SELECTION_KEYS, "ArrowRight"], + rtl: [...SELECTION_KEYS, "ArrowLeft"] +}; +var SUB_CLOSE_KEYS = { + ltr: ["ArrowLeft"], + rtl: ["ArrowRight"] +}; +var MENU_NAME = "Menu"; +var [Collection, useCollection, createCollectionScope] = (0, import_react_collection.createCollection)(MENU_NAME); +var [createMenuContext, createMenuScope] = (0, import_react_context.createContextScope)(MENU_NAME, [ + createCollectionScope, + import_react_popper.createPopperScope, + import_react_roving_focus.createRovingFocusGroupScope +]); +var usePopperScope = (0, import_react_popper.createPopperScope)(); +var useRovingFocusGroupScope = (0, import_react_roving_focus.createRovingFocusGroupScope)(); +var [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME); +var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME); +var Menu = (props) => { + const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props; + const popperScope = usePopperScope(__scopeMenu); + const [content, setContent] = React.useState(null); + const isUsingKeyboardRef = React.useRef(false); + const handleOpenChange = (0, import_react_use_callback_ref.useCallbackRef)(onOpenChange); + const direction = (0, import_react_direction.useDirection)(dir); + React.useEffect(() => { + const handleKeyDown = () => { + isUsingKeyboardRef.current = true; + document.addEventListener("pointerdown", handlePointer, { capture: true, once: true }); + document.addEventListener("pointermove", handlePointer, { capture: true, once: true }); + }; + const handlePointer = () => isUsingKeyboardRef.current = false; + document.addEventListener("keydown", handleKeyDown, { capture: true }); + return () => { + document.removeEventListener("keydown", handleKeyDown, { capture: true }); + document.removeEventListener("pointerdown", handlePointer, { capture: true }); + document.removeEventListener("pointermove", handlePointer, { capture: true }); + }; + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuProvider, + { + scope: __scopeMenu, + open, + onOpenChange: handleOpenChange, + content, + onContentChange: setContent, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuRootProvider, + { + scope: __scopeMenu, + onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]), + isUsingKeyboardRef, + dir: direction, + modal, + children + } + ) + } + ) }); +}; +Menu.displayName = MENU_NAME; +var ANCHOR_NAME = "MenuAnchor"; +var MenuAnchor = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, ...anchorProps } = props; + const popperScope = usePopperScope(__scopeMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef }); + } +); +MenuAnchor.displayName = ANCHOR_NAME; +var PORTAL_NAME = "MenuPortal"; +var [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, { + forceMount: void 0 +}); +var MenuPortal = (props) => { + const { __scopeMenu, forceMount, children, container } = props; + const context = useMenuContext(PORTAL_NAME, __scopeMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_portal.Portal, { asChild: true, container, children }) }) }); +}; +MenuPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "MenuContent"; +var [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME); +var MenuContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu); + const { forceMount = portalContext.forceMount, ...contentProps } = props; + const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); + const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) }); + } +); +var MenuRootContentModal = React.forwardRef( + (props, forwardedRef) => { + const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + React.useEffect(() => { + const content = ref.current; + if (content) return (0, import_aria_hidden.hideOthers)(content); + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuContentImpl, + { + ...props, + ref: composedRefs, + trapFocus: context.open, + disableOutsidePointerEvents: context.open, + disableOutsideScroll: true, + onFocusOutside: (0, import_primitive.composeEventHandlers)( + props.onFocusOutside, + (event) => event.preventDefault(), + { checkForDefaultPrevented: false } + ), + onDismiss: () => context.onOpenChange(false) + } + ); + } +); +var MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => { + const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuContentImpl, + { + ...props, + ref: forwardedRef, + trapFocus: false, + disableOutsidePointerEvents: false, + disableOutsideScroll: false, + onDismiss: () => context.onOpenChange(false) + } + ); +}); +var Slot = (0, import_react_slot.createSlot)("MenuContent.ScrollLock"); +var MenuContentImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeMenu, + loop = false, + trapFocus, + onOpenAutoFocus, + onCloseAutoFocus, + disableOutsidePointerEvents, + onEntryFocus, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onInteractOutside, + onDismiss, + disableOutsideScroll, + ...contentProps + } = props; + const context = useMenuContext(CONTENT_NAME, __scopeMenu); + const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu); + const popperScope = usePopperScope(__scopeMenu); + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu); + const getItems = useCollection(__scopeMenu); + const [currentItemId, setCurrentItemId] = React.useState(null); + const contentRef = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentRef, context.onContentChange); + const timerRef = React.useRef(0); + const searchRef = React.useRef(""); + const pointerGraceTimerRef = React.useRef(0); + const pointerGraceIntentRef = React.useRef(null); + const pointerDirRef = React.useRef("right"); + const lastPointerXRef = React.useRef(0); + const ScrollLockWrapper = disableOutsideScroll ? import_react_remove_scroll.RemoveScroll : React.Fragment; + const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0; + const handleTypeaheadSearch = (key) => { + const search = searchRef.current + key; + const items = getItems().filter((item) => !item.disabled); + const currentItem = document.activeElement; + const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue; + const values = items.map((item) => item.textValue); + const nextMatch = getNextMatch(values, search, currentMatch); + const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current; + (function updateSearch(value) { + searchRef.current = value; + window.clearTimeout(timerRef.current); + if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3); + })(search); + if (newItem) { + setTimeout(() => newItem.focus()); + } + }; + React.useEffect(() => { + return () => window.clearTimeout(timerRef.current); + }, []); + (0, import_react_focus_guards.useFocusGuards)(); + const isPointerMovingToSubmenu = React.useCallback((event) => { + const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side; + return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area); + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuContentProvider, + { + scope: __scopeMenu, + searchRef, + onItemEnter: React.useCallback( + (event) => { + if (isPointerMovingToSubmenu(event)) event.preventDefault(); + }, + [isPointerMovingToSubmenu] + ), + onItemLeave: React.useCallback( + (event) => { + if (isPointerMovingToSubmenu(event)) return; + contentRef.current?.focus(); + setCurrentItemId(null); + }, + [isPointerMovingToSubmenu] + ), + onTriggerLeave: React.useCallback( + (event) => { + if (isPointerMovingToSubmenu(event)) event.preventDefault(); + }, + [isPointerMovingToSubmenu] + ), + pointerGraceTimerRef, + onPointerGraceIntentChange: React.useCallback((intent) => { + pointerGraceIntentRef.current = intent; + }, []), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_focus_scope.FocusScope, + { + asChild: true, + trapped: trapFocus, + onMountAutoFocus: (0, import_primitive.composeEventHandlers)(onOpenAutoFocus, (event) => { + event.preventDefault(); + contentRef.current?.focus({ preventScroll: true }); + }), + onUnmountAutoFocus: onCloseAutoFocus, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_dismissable_layer.DismissableLayer, + { + asChild: true, + disableOutsidePointerEvents, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onInteractOutside, + onDismiss, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + RovingFocusGroup.Root, + { + asChild: true, + ...rovingFocusGroupScope, + dir: rootContext.dir, + orientation: "vertical", + loop, + currentTabStopId: currentItemId, + onCurrentTabStopIdChange: setCurrentItemId, + onEntryFocus: (0, import_primitive.composeEventHandlers)(onEntryFocus, (event) => { + if (!rootContext.isUsingKeyboardRef.current) event.preventDefault(); + }), + preventScrollOnEntryFocus: true, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + PopperPrimitive.Content, + { + role: "menu", + "aria-orientation": "vertical", + "data-state": getOpenState(context.open), + "data-radix-menu-content": "", + dir: rootContext.dir, + ...popperScope, + ...contentProps, + ref: composedRefs, + style: { outline: "none", ...contentProps.style }, + onKeyDown: (0, import_primitive.composeEventHandlers)(contentProps.onKeyDown, (event) => { + const target = event.target; + const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget; + const isModifierKey = event.ctrlKey || event.altKey || event.metaKey; + const isCharacterKey = event.key.length === 1; + if (isKeyDownInside) { + if (event.key === "Tab") event.preventDefault(); + if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key); + } + const content = contentRef.current; + if (event.target !== content) return; + if (!FIRST_LAST_KEYS.includes(event.key)) return; + event.preventDefault(); + const items = getItems().filter((item) => !item.disabled); + const candidateNodes = items.map((item) => item.ref.current); + if (LAST_KEYS.includes(event.key)) candidateNodes.reverse(); + focusFirst(candidateNodes); + }), + onBlur: (0, import_primitive.composeEventHandlers)(props.onBlur, (event) => { + if (!event.currentTarget.contains(event.target)) { + window.clearTimeout(timerRef.current); + searchRef.current = ""; + } + }), + onPointerMove: (0, import_primitive.composeEventHandlers)( + props.onPointerMove, + whenMouse((event) => { + const target = event.target; + const pointerXHasChanged = lastPointerXRef.current !== event.clientX; + if (event.currentTarget.contains(target) && pointerXHasChanged) { + const newDir = event.clientX > lastPointerXRef.current ? "right" : "left"; + pointerDirRef.current = newDir; + lastPointerXRef.current = event.clientX; + } + }) + ) + } + ) + } + ) + } + ) + } + ) }) + } + ); + } +); +MenuContent.displayName = CONTENT_NAME; +var GROUP_NAME = "MenuGroup"; +var MenuGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, ...groupProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { role: "group", ...groupProps, ref: forwardedRef }); + } +); +MenuGroup.displayName = GROUP_NAME; +var LABEL_NAME = "MenuLabel"; +var MenuLabel = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, ...labelProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { ...labelProps, ref: forwardedRef }); + } +); +MenuLabel.displayName = LABEL_NAME; +var ITEM_NAME = "MenuItem"; +var ITEM_SELECT = "menu.itemSelect"; +var MenuItem = React.forwardRef( + (props, forwardedRef) => { + const { disabled = false, onSelect, ...itemProps } = props; + const ref = React.useRef(null); + const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu); + const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + const isPointerDownRef = React.useRef(false); + const handleSelect = () => { + const menuItem = ref.current; + if (!disabled && menuItem) { + const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true }); + menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true }); + (0, import_react_primitive.dispatchDiscreteCustomEvent)(menuItem, itemSelectEvent); + if (itemSelectEvent.defaultPrevented) { + isPointerDownRef.current = false; + } else { + rootContext.onClose(); + } + } + }; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuItemImpl, + { + ...itemProps, + ref: composedRefs, + disabled, + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, handleSelect), + onPointerDown: (event) => { + props.onPointerDown?.(event); + isPointerDownRef.current = true; + }, + onPointerUp: (0, import_primitive.composeEventHandlers)(props.onPointerUp, (event) => { + if (!isPointerDownRef.current) event.currentTarget?.click(); + }), + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + const isTypingAhead = contentContext.searchRef.current !== ""; + if (disabled || isTypingAhead && event.key === " ") return; + if (SELECTION_KEYS.includes(event.key)) { + event.currentTarget.click(); + event.preventDefault(); + } + }) + } + ); + } +); +MenuItem.displayName = ITEM_NAME; +var MenuItemImpl = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, disabled = false, textValue, ...itemProps } = props; + const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu); + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + const [isFocused, setIsFocused] = React.useState(false); + const [textContent, setTextContent] = React.useState(""); + React.useEffect(() => { + const menuItem = ref.current; + if (menuItem) { + setTextContent((menuItem.textContent ?? "").trim()); + } + }, [itemProps.children]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + Collection.ItemSlot, + { + scope: __scopeMenu, + disabled, + textValue: textValue ?? textContent, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + role: "menuitem", + "data-highlighted": isFocused ? "" : void 0, + "aria-disabled": disabled || void 0, + "data-disabled": disabled ? "" : void 0, + ...itemProps, + ref: composedRefs, + onPointerMove: (0, import_primitive.composeEventHandlers)( + props.onPointerMove, + whenMouse((event) => { + if (disabled) { + contentContext.onItemLeave(event); + } else { + contentContext.onItemEnter(event); + if (!event.defaultPrevented) { + const item = event.currentTarget; + item.focus({ preventScroll: true }); + } + } + }) + ), + onPointerLeave: (0, import_primitive.composeEventHandlers)( + props.onPointerLeave, + whenMouse((event) => contentContext.onItemLeave(event)) + ), + onFocus: (0, import_primitive.composeEventHandlers)(props.onFocus, () => setIsFocused(true)), + onBlur: (0, import_primitive.composeEventHandlers)(props.onBlur, () => setIsFocused(false)) + } + ) }) + } + ); + } +); +var CHECKBOX_ITEM_NAME = "MenuCheckboxItem"; +var MenuCheckboxItem = React.forwardRef( + (props, forwardedRef) => { + const { checked = false, onCheckedChange, ...checkboxItemProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuItem, + { + role: "menuitemcheckbox", + "aria-checked": isIndeterminate(checked) ? "mixed" : checked, + ...checkboxItemProps, + ref: forwardedRef, + "data-state": getCheckedState(checked), + onSelect: (0, import_primitive.composeEventHandlers)( + checkboxItemProps.onSelect, + () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked), + { checkForDefaultPrevented: false } + ) + } + ) }); + } +); +MenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME; +var RADIO_GROUP_NAME = "MenuRadioGroup"; +var [RadioGroupProvider, useRadioGroupContext] = createMenuContext( + RADIO_GROUP_NAME, + { value: void 0, onValueChange: () => { + } } +); +var MenuRadioGroup = React.forwardRef( + (props, forwardedRef) => { + const { value, onValueChange, ...groupProps } = props; + const handleValueChange = (0, import_react_use_callback_ref.useCallbackRef)(onValueChange); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuGroup, { ...groupProps, ref: forwardedRef }) }); + } +); +MenuRadioGroup.displayName = RADIO_GROUP_NAME; +var RADIO_ITEM_NAME = "MenuRadioItem"; +var MenuRadioItem = React.forwardRef( + (props, forwardedRef) => { + const { value, ...radioItemProps } = props; + const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu); + const checked = value === context.value; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuItem, + { + role: "menuitemradio", + "aria-checked": checked, + ...radioItemProps, + ref: forwardedRef, + "data-state": getCheckedState(checked), + onSelect: (0, import_primitive.composeEventHandlers)( + radioItemProps.onSelect, + () => context.onValueChange?.(value), + { checkForDefaultPrevented: false } + ) + } + ) }); + } +); +MenuRadioItem.displayName = RADIO_ITEM_NAME; +var ITEM_INDICATOR_NAME = "MenuItemIndicator"; +var [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext( + ITEM_INDICATOR_NAME, + { checked: false } +); +var MenuItemIndicator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, forceMount, ...itemIndicatorProps } = props; + const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_presence.Presence, + { + present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.span, + { + ...itemIndicatorProps, + ref: forwardedRef, + "data-state": getCheckedState(indicatorContext.checked) + } + ) + } + ); + } +); +MenuItemIndicator.displayName = ITEM_INDICATOR_NAME; +var SEPARATOR_NAME = "MenuSeparator"; +var MenuSeparator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, ...separatorProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + role: "separator", + "aria-orientation": "horizontal", + ...separatorProps, + ref: forwardedRef + } + ); + } +); +MenuSeparator.displayName = SEPARATOR_NAME; +var ARROW_NAME = "MenuArrow"; +var MenuArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, ...arrowProps } = props; + const popperScope = usePopperScope(__scopeMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }); + } +); +MenuArrow.displayName = ARROW_NAME; +var SUB_NAME = "MenuSub"; +var [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME); +var MenuSub = (props) => { + const { __scopeMenu, children, open = false, onOpenChange } = props; + const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu); + const popperScope = usePopperScope(__scopeMenu); + const [trigger, setTrigger] = React.useState(null); + const [content, setContent] = React.useState(null); + const handleOpenChange = (0, import_react_use_callback_ref.useCallbackRef)(onOpenChange); + React.useEffect(() => { + if (parentMenuContext.open === false) handleOpenChange(false); + return () => handleOpenChange(false); + }, [parentMenuContext.open, handleOpenChange]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuProvider, + { + scope: __scopeMenu, + open, + onOpenChange: handleOpenChange, + content, + onContentChange: setContent, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuSubProvider, + { + scope: __scopeMenu, + contentId: (0, import_react_id.useId)(), + triggerId: (0, import_react_id.useId)(), + trigger, + onTriggerChange: setTrigger, + children + } + ) + } + ) }); +}; +MenuSub.displayName = SUB_NAME; +var SUB_TRIGGER_NAME = "MenuSubTrigger"; +var MenuSubTrigger = React.forwardRef( + (props, forwardedRef) => { + const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu); + const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu); + const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu); + const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu); + const openTimerRef = React.useRef(null); + const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext; + const scope = { __scopeMenu: props.__scopeMenu }; + const clearOpenTimer = React.useCallback(() => { + if (openTimerRef.current) window.clearTimeout(openTimerRef.current); + openTimerRef.current = null; + }, []); + React.useEffect(() => clearOpenTimer, [clearOpenTimer]); + React.useEffect(() => { + const pointerGraceTimer = pointerGraceTimerRef.current; + return () => { + window.clearTimeout(pointerGraceTimer); + onPointerGraceIntentChange(null); + }; + }, [pointerGraceTimerRef, onPointerGraceIntentChange]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuItemImpl, + { + id: subContext.triggerId, + "aria-haspopup": "menu", + "aria-expanded": context.open, + "aria-controls": subContext.contentId, + "data-state": getOpenState(context.open), + ...props, + ref: (0, import_react_compose_refs.composeRefs)(forwardedRef, subContext.onTriggerChange), + onClick: (event) => { + props.onClick?.(event); + if (props.disabled || event.defaultPrevented) return; + event.currentTarget.focus(); + if (!context.open) context.onOpenChange(true); + }, + onPointerMove: (0, import_primitive.composeEventHandlers)( + props.onPointerMove, + whenMouse((event) => { + contentContext.onItemEnter(event); + if (event.defaultPrevented) return; + if (!props.disabled && !context.open && !openTimerRef.current) { + contentContext.onPointerGraceIntentChange(null); + openTimerRef.current = window.setTimeout(() => { + context.onOpenChange(true); + clearOpenTimer(); + }, 100); + } + }) + ), + onPointerLeave: (0, import_primitive.composeEventHandlers)( + props.onPointerLeave, + whenMouse((event) => { + clearOpenTimer(); + const contentRect = context.content?.getBoundingClientRect(); + if (contentRect) { + const side = context.content?.dataset.side; + const rightSide = side === "right"; + const bleed = rightSide ? -5 : 5; + const contentNearEdge = contentRect[rightSide ? "left" : "right"]; + const contentFarEdge = contentRect[rightSide ? "right" : "left"]; + contentContext.onPointerGraceIntentChange({ + area: [ + // Apply a bleed on clientX to ensure that our exit point is + // consistently within polygon bounds + { x: event.clientX + bleed, y: event.clientY }, + { x: contentNearEdge, y: contentRect.top }, + { x: contentFarEdge, y: contentRect.top }, + { x: contentFarEdge, y: contentRect.bottom }, + { x: contentNearEdge, y: contentRect.bottom } + ], + side + }); + window.clearTimeout(pointerGraceTimerRef.current); + pointerGraceTimerRef.current = window.setTimeout( + () => contentContext.onPointerGraceIntentChange(null), + 300 + ); + } else { + contentContext.onTriggerLeave(event); + if (event.defaultPrevented) return; + contentContext.onPointerGraceIntentChange(null); + } + }) + ), + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + const isTypingAhead = contentContext.searchRef.current !== ""; + if (props.disabled || isTypingAhead && event.key === " ") return; + if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) { + context.onOpenChange(true); + context.content?.focus(); + event.preventDefault(); + } + }) + } + ) }); + } +); +MenuSubTrigger.displayName = SUB_TRIGGER_NAME; +var SUB_CONTENT_NAME = "MenuSubContent"; +var MenuSubContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu); + const { forceMount = portalContext.forceMount, ...subContentProps } = props; + const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); + const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu); + const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuContentImpl, + { + id: subContext.contentId, + "aria-labelledby": subContext.triggerId, + ...subContentProps, + ref: composedRefs, + align: "start", + side: rootContext.dir === "rtl" ? "left" : "right", + disableOutsidePointerEvents: false, + disableOutsideScroll: false, + trapFocus: false, + onOpenAutoFocus: (event) => { + if (rootContext.isUsingKeyboardRef.current) ref.current?.focus(); + event.preventDefault(); + }, + onCloseAutoFocus: (event) => event.preventDefault(), + onFocusOutside: (0, import_primitive.composeEventHandlers)(props.onFocusOutside, (event) => { + if (event.target !== subContext.trigger) context.onOpenChange(false); + }), + onEscapeKeyDown: (0, import_primitive.composeEventHandlers)(props.onEscapeKeyDown, (event) => { + rootContext.onClose(); + event.preventDefault(); + }), + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + const isKeyDownInside = event.currentTarget.contains(event.target); + const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key); + if (isKeyDownInside && isCloseKey) { + context.onOpenChange(false); + subContext.trigger?.focus(); + event.preventDefault(); + } + }) + } + ) }) }) }); + } +); +MenuSubContent.displayName = SUB_CONTENT_NAME; +function getOpenState(open) { + return open ? "open" : "closed"; +} +function isIndeterminate(checked) { + return checked === "indeterminate"; +} +function getCheckedState(checked) { + return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked"; +} +function focusFirst(candidates) { + const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement; + for (const candidate of candidates) { + if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return; + candidate.focus(); + if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return; + } +} +function wrapArray(array, startIndex) { + return array.map((_, index) => array[(startIndex + index) % array.length]); +} +function getNextMatch(values, search, currentMatch) { + const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]); + const normalizedSearch = isRepeated ? search[0] : search; + const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1; + let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0)); + const excludeCurrentMatch = normalizedSearch.length === 1; + if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch); + const nextMatch = wrappedValues.find( + (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase()) + ); + return nextMatch !== currentMatch ? nextMatch : void 0; +} +function isPointInPolygon(point, polygon) { + const { x, y } = point; + let inside = false; + for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) { + const ii = polygon[i]; + const jj = polygon[j]; + const xi = ii.x; + const yi = ii.y; + const xj = jj.x; + const yj = jj.y; + const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi; + if (intersect) inside = !inside; + } + return inside; +} +function isPointerInGraceArea(event, area) { + if (!area) return false; + const cursorPos = { x: event.clientX, y: event.clientY }; + return isPointInPolygon(cursorPos, area); +} +function whenMouse(handler) { + return (event) => event.pointerType === "mouse" ? handler(event) : void 0; +} +var Root3 = Menu; +var Anchor2 = MenuAnchor; +var Portal = MenuPortal; +var Content2 = MenuContent; +var Group = MenuGroup; +var Label = MenuLabel; +var Item2 = MenuItem; +var CheckboxItem = MenuCheckboxItem; +var RadioGroup = MenuRadioGroup; +var RadioItem = MenuRadioItem; +var ItemIndicator = MenuItemIndicator; +var Separator = MenuSeparator; +var Arrow2 = MenuArrow; +var Sub = MenuSub; +var SubTrigger = MenuSubTrigger; +var SubContent = MenuSubContent; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cade066fba0a6033473ef244efe2b11e39e4e9bc --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/menu.tsx"], + "sourcesContent": ["'use client';\nexport {\n createMenuScope,\n //\n Menu,\n MenuAnchor,\n MenuPortal,\n MenuContent,\n MenuGroup,\n MenuLabel,\n MenuItem,\n MenuCheckboxItem,\n MenuRadioGroup,\n MenuRadioItem,\n MenuItemIndicator,\n MenuSeparator,\n MenuArrow,\n MenuSub,\n MenuSubTrigger,\n MenuSubContent,\n //\n Root,\n Anchor,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './menu';\nexport type {\n MenuProps,\n MenuAnchorProps,\n MenuPortalProps,\n MenuContentProps,\n MenuGroupProps,\n MenuLabelProps,\n MenuItemProps,\n MenuCheckboxItemProps,\n MenuRadioGroupProps,\n MenuRadioItemProps,\n MenuItemIndicatorProps,\n MenuSeparatorProps,\n MenuArrowProps,\n MenuSubProps,\n MenuSubTriggerProps,\n MenuSubContentProps,\n} from './menu';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs, composeRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { createSlot } from '@radix-ui/react-slot';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\nconst SELECTION_KEYS = ['Enter', ' '];\nconst FIRST_KEYS = ['ArrowDown', 'PageUp', 'Home'];\nconst LAST_KEYS = ['ArrowUp', 'PageDown', 'End'];\nconst FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nconst SUB_OPEN_KEYS: Record = {\n ltr: [...SELECTION_KEYS, 'ArrowRight'],\n rtl: [...SELECTION_KEYS, 'ArrowLeft'],\n};\nconst SUB_CLOSE_KEYS: Record = {\n ltr: ['ArrowLeft'],\n rtl: ['ArrowRight'],\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Menu\n * -----------------------------------------------------------------------------------------------*/\n\nconst MENU_NAME = 'Menu';\n\ntype ItemData = { disabled: boolean; textValue: string };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n MenuItemElement,\n ItemData\n>(MENU_NAME);\n\ntype ScopedProps

= P & { __scopeMenu?: Scope };\nconst [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope,\n]);\nconst usePopperScope = createPopperScope();\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\n\ntype MenuContextValue = {\n open: boolean;\n onOpenChange(open: boolean): void;\n content: MenuContentElement | null;\n onContentChange(content: MenuContentElement | null): void;\n};\n\nconst [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\n\ntype MenuRootContextValue = {\n onClose(): void;\n isUsingKeyboardRef: React.RefObject;\n dir: Direction;\n modal: boolean;\n};\n\nconst [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\n\ninterface MenuProps {\n children?: React.ReactNode;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst Menu: React.FC = (props: ScopedProps) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n\n React.useEffect(() => {\n // Capture phase ensures we set the boolean before any side effects execute\n // in response to the key or pointer event as they might depend on this value.\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener('pointerdown', handlePointer, { capture: true, once: true });\n document.addEventListener('pointermove', handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => (isUsingKeyboardRef.current = false);\n document.addEventListener('keydown', handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener('keydown', handleKeyDown, { capture: true });\n document.removeEventListener('pointerdown', handlePointer, { capture: true });\n document.removeEventListener('pointermove', handlePointer, { capture: true });\n };\n }, []);\n\n return (\n \n \n handleOpenChange(false), [handleOpenChange])}\n isUsingKeyboardRef={isUsingKeyboardRef}\n dir={direction}\n modal={modal}\n >\n {children}\n \n \n \n );\n};\n\nMenu.displayName = MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'MenuAnchor';\n\ntype MenuAnchorElement = React.ComponentRef;\ntype PopperAnchorProps = React.ComponentPropsWithoutRef;\ninterface MenuAnchorProps extends PopperAnchorProps {}\n\nconst MenuAnchor = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return ;\n }\n);\n\nMenuAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'MenuPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface MenuPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst MenuPortal: React.FC = (props: ScopedProps) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return (\n \n \n \n {children}\n \n \n \n );\n};\n\nMenuPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'MenuContent';\n\ntype MenuContentContextValue = {\n onItemEnter(event: React.PointerEvent): void;\n onItemLeave(event: React.PointerEvent): void;\n onTriggerLeave(event: React.PointerEvent): void;\n searchRef: React.RefObject;\n pointerGraceTimerRef: React.MutableRefObject;\n onPointerGraceIntentChange(intent: GraceIntent | null): void;\n};\nconst [MenuContentProvider, useMenuContentContext] =\n createMenuContext(CONTENT_NAME);\n\ntype MenuContentElement = MenuRootContentTypeElement;\n/**\n * We purposefully don't union MenuRootContent and MenuSubContent props here because\n * they have conflicting prop types. We agreed that we would allow MenuSubContent to\n * accept props that it would just ignore.\n */\ninterface MenuContentProps extends MenuRootContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst MenuContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n\n return (\n \n \n \n {rootContext.modal ? (\n \n ) : (\n \n )}\n \n \n \n );\n }\n);\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype MenuRootContentTypeElement = MenuContentImplElement;\ninterface MenuRootContentTypeProps\n extends Omit {}\n\nconst MenuRootContentModal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n // Hide everything from ARIA except the `MenuContent`\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n event.preventDefault(),\n { checkForDefaultPrevented: false }\n )}\n onDismiss={() => context.onOpenChange(false)}\n />\n );\n }\n);\n\nconst MenuRootContentNonModal = React.forwardRef<\n MenuRootContentTypeElement,\n MenuRootContentTypeProps\n>((props: ScopedProps, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return (\n context.onOpenChange(false)}\n />\n );\n});\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype MenuContentImplElement = React.ComponentRef;\ntype FocusScopeProps = React.ComponentPropsWithoutRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef;\ntype PopperContentProps = React.ComponentPropsWithoutRef;\ntype MenuContentImplPrivateProps = {\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n onDismiss?: DismissableLayerProps['onDismiss'];\n disableOutsidePointerEvents?: DismissableLayerProps['disableOutsidePointerEvents'];\n\n /**\n * Whether scrolling outside the `MenuContent` should be prevented\n * (default: `false`)\n */\n disableOutsideScroll?: boolean;\n\n /**\n * Whether focus should be trapped within the `MenuContent`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n};\ninterface MenuContentImplProps\n extends MenuContentImplPrivateProps,\n Omit {\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n\n /**\n * Whether keyboard navigation should loop around\n * @defaultValue false\n */\n loop?: RovingFocusGroupProps['loop'];\n\n onEntryFocus?: RovingFocusGroupProps['onEntryFocus'];\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n onFocusOutside?: DismissableLayerProps['onFocusOutside'];\n onInteractOutside?: DismissableLayerProps['onInteractOutside'];\n}\n\nconst Slot = createSlot('MenuContent.ScrollLock');\n\nconst MenuContentImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState(null);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef('');\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef(null);\n const pointerDirRef = React.useRef('right');\n const lastPointerXRef = React.useRef(0);\n\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll\n ? { as: Slot, allowPinchZoom: true }\n : undefined;\n\n const handleTypeaheadSearch = (key: string) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n\n // Reset `searchRef` 1 second after it was last updated\n (function updateSearch(value: string) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== '') timerRef.current = window.setTimeout(() => updateSearch(''), 1000);\n })(search);\n\n if (newItem) {\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => (newItem as HTMLElement).focus());\n }\n };\n\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n\n // Make sure the whole tree has focus guards as our `MenuContent` may be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n const isPointerMovingToSubmenu = React.useCallback((event: React.PointerEvent) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n\n return (\n {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n )}\n onItemLeave={React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n )}\n onTriggerLeave={React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n )}\n pointerGraceTimerRef={pointerGraceTimerRef}\n onPointerGraceIntentChange={React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, [])}\n >\n \n {\n // when opening, explicitly focus the content area only and leave\n // `onEntryFocus` in control of focusing first item\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n })}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n \n {\n // only focus first item when using keyboard\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n })}\n preventScrollOnEntryFocus\n >\n {\n // submenu key events bubble through portals. We only care about keys in this menu.\n const target = event.target as HTMLElement;\n const isKeyDownInside =\n target.closest('[data-radix-menu-content]') === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n // menus should not be navigated using tab key so we prevent it\n if (event.key === 'Tab') event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n // focus first/last item based on key pressed\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current!);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n })}\n onBlur={composeEventHandlers(props.onBlur, (event) => {\n // clear search buffer when leaving the menu\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = '';\n }\n })}\n onPointerMove={composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target as HTMLElement;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n\n // We don't use `event.movementX` for this check because Safari will\n // always return `0` on a pointer event.\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? 'right' : 'left';\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )}\n />\n \n \n \n \n \n );\n }\n);\n\nMenuContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'MenuGroup';\n\ntype MenuGroupElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface MenuGroupProps extends PrimitiveDivProps {}\n\nconst MenuGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return ;\n }\n);\n\nMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'MenuLabel';\n\ntype MenuLabelElement = React.ComponentRef;\ninterface MenuLabelProps extends PrimitiveDivProps {}\n\nconst MenuLabel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return ;\n }\n);\n\nMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'MenuItem';\nconst ITEM_SELECT = 'menu.itemSelect';\n\ntype MenuItemElement = MenuItemImplElement;\ninterface MenuItemProps extends Omit {\n onSelect?: (event: Event) => void;\n}\n\nconst MenuItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n\n return (\n {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n }}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n // Pointer down can move to a different menu item which should activate it on pointer up.\n // We dispatch a click for selection to allow composition with click based triggers and to\n // prevent Firefox from getting stuck in text selection mode when the menu closes.\n if (!isPointerDownRef.current) event.currentTarget?.click();\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== '';\n if (disabled || (isTypingAhead && event.key === ' ')) return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n /**\n * We prevent default browser behaviour for selection keys as they should trigger\n * a selection only:\n * - prevents space from scrolling the page.\n * - if keydown causes focus to move, prevents keydown from firing on the new target.\n */\n event.preventDefault();\n }\n })}\n />\n );\n }\n);\n\nMenuItem.displayName = ITEM_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype MenuItemImplElement = React.ComponentRef;\ninterface MenuItemImplProps extends PrimitiveDivProps {\n disabled?: boolean;\n textValue?: string;\n}\n\nconst MenuItemImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n\n // get the item's `.textContent` as default strategy for typeahead `textValue`\n const [textContent, setTextContent] = React.useState('');\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? '').trim());\n }\n }, [itemProps.children]);\n\n return (\n \n \n {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n )}\n onPointerLeave={composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n )}\n onFocus={composeEventHandlers(props.onFocus, () => setIsFocused(true))}\n onBlur={composeEventHandlers(props.onBlur, () => setIsFocused(false))}\n />\n \n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'MenuCheckboxItem';\n\ntype MenuCheckboxItemElement = MenuItemElement;\n\ntype CheckedState = boolean | 'indeterminate';\n\ninterface MenuCheckboxItemProps extends MenuItemProps {\n checked?: CheckedState;\n // `onCheckedChange` can never be called with `\"indeterminate\"` from the inside\n onCheckedChange?: (checked: boolean) => void;\n}\n\nconst MenuCheckboxItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return (\n \n onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )}\n />\n \n );\n }\n);\n\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'MenuRadioGroup';\n\nconst [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: undefined, onValueChange: () => {} }\n);\n\ntype MenuRadioGroupElement = React.ComponentRef;\ninterface MenuRadioGroupProps extends MenuGroupProps {\n value?: string;\n onValueChange?: (value: string) => void;\n}\n\nconst MenuRadioGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return (\n \n \n \n );\n }\n);\n\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'MenuRadioItem';\n\ntype MenuRadioItemElement = React.ComponentRef;\ninterface MenuRadioItemProps extends MenuItemProps {\n value: string;\n}\n\nconst MenuRadioItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return (\n \n context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )}\n />\n \n );\n }\n);\n\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_INDICATOR_NAME = 'MenuItemIndicator';\n\ntype CheckboxContextValue = { checked: CheckedState };\n\nconst [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\n\ntype MenuItemIndicatorElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface MenuItemIndicatorProps extends PrimitiveSpanProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst MenuItemIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return (\n \n \n \n );\n }\n);\n\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'MenuSeparator';\n\ntype MenuSeparatorElement = React.ComponentRef;\ninterface MenuSeparatorProps extends PrimitiveDivProps {}\n\nconst MenuSeparator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return (\n \n );\n }\n);\n\nMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'MenuArrow';\n\ntype MenuArrowElement = React.ComponentRef;\ntype PopperArrowProps = React.ComponentPropsWithoutRef;\ninterface MenuArrowProps extends PopperArrowProps {}\n\nconst MenuArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return ;\n }\n);\n\nMenuArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'MenuSub';\n\ntype MenuSubContextValue = {\n contentId: string;\n triggerId: string;\n trigger: MenuSubTriggerElement | null;\n onTriggerChange(trigger: MenuSubTriggerElement | null): void;\n};\n\nconst [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\n\ninterface MenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst MenuSub: React.FC = (props: ScopedProps) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n\n // Prevent the parent menu from reopening with open submenus.\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n\n return (\n \n \n \n {children}\n \n \n \n );\n};\n\nMenuSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'MenuSubTrigger';\n\ntype MenuSubTriggerElement = MenuItemImplElement;\ninterface MenuSubTriggerProps extends MenuItemImplProps {}\n\nconst MenuSubTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n\n return (\n \n {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n /**\n * We manually focus because iOS Safari doesn't always focus on click (e.g. buttons)\n * and we rely heavily on `onFocusOutside` for submenus to close when switching\n * between separate submenus.\n */\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n }}\n onPointerMove={composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n )}\n onPointerLeave={composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n // TODO: make sure to update this when we change positioning logic\n const side = context.content?.dataset.side as Side;\n const rightSide = side === 'right';\n const bleed = rightSide ? -5 : +5;\n const contentNearEdge = contentRect[rightSide ? 'left' : 'right'];\n const contentFarEdge = contentRect[rightSide ? 'right' : 'left'];\n\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom },\n ],\n side,\n });\n\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n\n // There's 100ms where the user may leave an item before the submenu was opened.\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n )}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== '';\n if (props.disabled || (isTypingAhead && event.key === ' ')) return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n // The trigger may hold focus if opened via pointer interaction\n // so we ensure content is given focus again when switching to keyboard.\n context.content?.focus();\n // prevent window from scrolling\n event.preventDefault();\n }\n })}\n />\n \n );\n }\n);\n\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'MenuSubContent';\n\ntype MenuSubContentElement = MenuContentImplElement;\ninterface MenuSubContentProps\n extends Omit<\n MenuContentImplProps,\n keyof MenuContentImplPrivateProps | 'onCloseAutoFocus' | 'onEntryFocus' | 'side' | 'align'\n > {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst MenuSubContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return (\n \n \n \n {\n // when opening a submenu, focus content for keyboard users only\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n }}\n // The menu might close because of focusing another menu item in the parent menu. We\n // don't want it to refocus the trigger in that case so we handle trigger focus ourselves.\n onCloseAutoFocus={(event) => event.preventDefault()}\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) => {\n // We prevent closing when the trigger is focused to avoid triggering a re-open animation\n // on pointer interaction.\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n })}\n onEscapeKeyDown={composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n // ensure pressing escape in submenu doesn't escape full screen mode\n event.preventDefault();\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n // Submenu key events bubble through portals. We only care about keys in this menu.\n const isKeyDownInside = event.currentTarget.contains(event.target as HTMLElement);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n // We focus manually because we prevented it in `onCloseAutoFocus`\n subContext.trigger?.focus();\n // prevent window from scrolling\n event.preventDefault();\n }\n })}\n />\n \n \n \n );\n }\n);\n\nMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getOpenState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nfunction isIndeterminate(checked?: CheckedState): checked is 'indeterminate' {\n return checked === 'indeterminate';\n}\n\nfunction getCheckedState(checked: CheckedState) {\n return isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';\n}\n\nfunction focusFirst(candidates: HTMLElement[]) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray(array: T[], startIndex: number) {\n return array.map((_, index) => array[(startIndex + index) % array.length]!);\n}\n\n/**\n * This is the \"meat\" of the typeahead matching logic. It takes in all the values,\n * the search and the current match, and returns the next match (or `undefined`).\n *\n * We normalize the search because if a user has repeatedly pressed a character,\n * we want the exact same behavior as if we only had that one character\n * (ie. cycle through options starting with that character)\n *\n * We also reorder the values by wrapping the array around the current match.\n * This is so we always look forward from the current match, and picking the first\n * match will always be the correct one.\n *\n * Finally, if the normalized search is exactly one character, we exclude the\n * current match from the values because otherwise it would be the first to match always\n * and focus would never move. This is as opposed to the regular case, where we\n * don't want focus to move if the current match still matches.\n */\nfunction getNextMatch(values: string[], search: string, currentMatch?: string) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0]! : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find((value) =>\n value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : undefined;\n}\n\ntype Point = { x: number; y: number };\ntype Polygon = Point[];\ntype Side = 'left' | 'right';\ntype GraceIntent = { area: Polygon; side: Side };\n\n// Determine if a point is inside of a polygon.\n// Based on https://github.com/substack/point-in-polygon\nfunction isPointInPolygon(point: Point, polygon: Polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i]!;\n const jj = polygon[j]!;\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n\n // prettier-ignore\n const intersect = ((yi > y) !== (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\n if (intersect) inside = !inside;\n }\n\n return inside;\n}\n\nfunction isPointerInGraceArea(event: React.PointerEvent, area?: Polygon) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\n\nfunction whenMouse(handler: React.PointerEventHandler): React.PointerEventHandler {\n return (event) => (event.pointerType === 'mouse' ? handler(event) : undefined);\n}\n\nconst Root = Menu;\nconst Anchor = MenuAnchor;\nconst Portal = MenuPortal;\nconst Content = MenuContent;\nconst Group = MenuGroup;\nconst Label = MenuLabel;\nconst Item = MenuItem;\nconst CheckboxItem = MenuCheckboxItem;\nconst RadioGroup = MenuRadioGroup;\nconst RadioItem = MenuRadioItem;\nconst ItemIndicator = MenuItemIndicator;\nconst Separator = MenuSeparator;\nconst Arrow = MenuArrow;\nconst Sub = MenuSub;\nconst SubTrigger = MenuSubTrigger;\nconst SubContent = MenuSubContent;\n\nexport {\n createMenuScope,\n //\n Menu,\n MenuAnchor,\n MenuPortal,\n MenuContent,\n MenuGroup,\n MenuLabel,\n MenuItem,\n MenuCheckboxItem,\n MenuRadioGroup,\n MenuRadioItem,\n MenuItemIndicator,\n MenuSeparator,\n MenuArrow,\n MenuSub,\n MenuSubTrigger,\n MenuSubContent,\n //\n Root,\n Anchor,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n MenuProps,\n MenuAnchorProps,\n MenuPortalProps,\n MenuContentProps,\n MenuGroupProps,\n MenuLabelProps,\n MenuItemProps,\n MenuCheckboxItemProps,\n MenuRadioGroupProps,\n MenuRadioItemProps,\n MenuItemIndicatorProps,\n MenuSeparatorProps,\n MenuArrowProps,\n MenuSubProps,\n MenuSubTriggerProps,\n MenuSubContentProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,gBAAAA;AAAA,EAAA,aAAAC;AAAA,EAAA;AAAA,iB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Y,EAAE,GAAG,MAAM,SAAS,GAAG,MAAM,QAAQ;AACvD,SAAO,iBAAiB,WAAW,IAAI;AACzC;AAEA,SAAS,UAAa,SAAqE;AACzF,SAAO,CAAC,UAAW,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI;AACtE;AAEA,IAAMC,QAAO;AACb,IAAMC,UAAS;AACf,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAM,QAAQ;AACd,IAAM,QAAQ;AACd,IAAMC,QAAO;AACb,IAAM,eAAe;AACrB,IAAM,aAAa;AACnB,IAAM,YAAY;AAClB,IAAM,gBAAgB;AACtB,IAAM,YAAY;AAClB,IAAMC,SAAQ;AACd,IAAM,MAAM;AACZ,IAAM,aAAa;AACnB,IAAM,aAAa;", + "names": ["Anchor", "Arrow", "Content", "Item", "Root", "PortalPrimitive", "Root", "Anchor", "Content", "Item", "Arrow"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..10eefb0533ee4fa16b7f0e42671969c2c4464835 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.mjs @@ -0,0 +1,872 @@ +"use client"; + +// src/menu.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { createCollection } from "@radix-ui/react-collection"; +import { useComposedRefs, composeRefs } from "@radix-ui/react-compose-refs"; +import { createContextScope } from "@radix-ui/react-context"; +import { useDirection } from "@radix-ui/react-direction"; +import { DismissableLayer } from "@radix-ui/react-dismissable-layer"; +import { useFocusGuards } from "@radix-ui/react-focus-guards"; +import { FocusScope } from "@radix-ui/react-focus-scope"; +import { useId } from "@radix-ui/react-id"; +import * as PopperPrimitive from "@radix-ui/react-popper"; +import { createPopperScope } from "@radix-ui/react-popper"; +import { Portal as PortalPrimitive } from "@radix-ui/react-portal"; +import { Presence } from "@radix-ui/react-presence"; +import { Primitive, dispatchDiscreteCustomEvent } from "@radix-ui/react-primitive"; +import * as RovingFocusGroup from "@radix-ui/react-roving-focus"; +import { createRovingFocusGroupScope } from "@radix-ui/react-roving-focus"; +import { createSlot } from "@radix-ui/react-slot"; +import { useCallbackRef } from "@radix-ui/react-use-callback-ref"; +import { hideOthers } from "aria-hidden"; +import { RemoveScroll } from "react-remove-scroll"; +import { jsx } from "react/jsx-runtime"; +var SELECTION_KEYS = ["Enter", " "]; +var FIRST_KEYS = ["ArrowDown", "PageUp", "Home"]; +var LAST_KEYS = ["ArrowUp", "PageDown", "End"]; +var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS]; +var SUB_OPEN_KEYS = { + ltr: [...SELECTION_KEYS, "ArrowRight"], + rtl: [...SELECTION_KEYS, "ArrowLeft"] +}; +var SUB_CLOSE_KEYS = { + ltr: ["ArrowLeft"], + rtl: ["ArrowRight"] +}; +var MENU_NAME = "Menu"; +var [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME); +var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [ + createCollectionScope, + createPopperScope, + createRovingFocusGroupScope +]); +var usePopperScope = createPopperScope(); +var useRovingFocusGroupScope = createRovingFocusGroupScope(); +var [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME); +var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME); +var Menu = (props) => { + const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props; + const popperScope = usePopperScope(__scopeMenu); + const [content, setContent] = React.useState(null); + const isUsingKeyboardRef = React.useRef(false); + const handleOpenChange = useCallbackRef(onOpenChange); + const direction = useDirection(dir); + React.useEffect(() => { + const handleKeyDown = () => { + isUsingKeyboardRef.current = true; + document.addEventListener("pointerdown", handlePointer, { capture: true, once: true }); + document.addEventListener("pointermove", handlePointer, { capture: true, once: true }); + }; + const handlePointer = () => isUsingKeyboardRef.current = false; + document.addEventListener("keydown", handleKeyDown, { capture: true }); + return () => { + document.removeEventListener("keydown", handleKeyDown, { capture: true }); + document.removeEventListener("pointerdown", handlePointer, { capture: true }); + document.removeEventListener("pointermove", handlePointer, { capture: true }); + }; + }, []); + return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx( + MenuProvider, + { + scope: __scopeMenu, + open, + onOpenChange: handleOpenChange, + content, + onContentChange: setContent, + children: /* @__PURE__ */ jsx( + MenuRootProvider, + { + scope: __scopeMenu, + onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]), + isUsingKeyboardRef, + dir: direction, + modal, + children + } + ) + } + ) }); +}; +Menu.displayName = MENU_NAME; +var ANCHOR_NAME = "MenuAnchor"; +var MenuAnchor = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, ...anchorProps } = props; + const popperScope = usePopperScope(__scopeMenu); + return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef }); + } +); +MenuAnchor.displayName = ANCHOR_NAME; +var PORTAL_NAME = "MenuPortal"; +var [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, { + forceMount: void 0 +}); +var MenuPortal = (props) => { + const { __scopeMenu, forceMount, children, container } = props; + const context = useMenuContext(PORTAL_NAME, __scopeMenu); + return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) }); +}; +MenuPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "MenuContent"; +var [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME); +var MenuContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu); + const { forceMount = portalContext.forceMount, ...contentProps } = props; + const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); + const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu); + return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) }); + } +); +var MenuRootContentModal = React.forwardRef( + (props, forwardedRef) => { + const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref); + React.useEffect(() => { + const content = ref.current; + if (content) return hideOthers(content); + }, []); + return /* @__PURE__ */ jsx( + MenuContentImpl, + { + ...props, + ref: composedRefs, + trapFocus: context.open, + disableOutsidePointerEvents: context.open, + disableOutsideScroll: true, + onFocusOutside: composeEventHandlers( + props.onFocusOutside, + (event) => event.preventDefault(), + { checkForDefaultPrevented: false } + ), + onDismiss: () => context.onOpenChange(false) + } + ); + } +); +var MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => { + const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); + return /* @__PURE__ */ jsx( + MenuContentImpl, + { + ...props, + ref: forwardedRef, + trapFocus: false, + disableOutsidePointerEvents: false, + disableOutsideScroll: false, + onDismiss: () => context.onOpenChange(false) + } + ); +}); +var Slot = createSlot("MenuContent.ScrollLock"); +var MenuContentImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeMenu, + loop = false, + trapFocus, + onOpenAutoFocus, + onCloseAutoFocus, + disableOutsidePointerEvents, + onEntryFocus, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onInteractOutside, + onDismiss, + disableOutsideScroll, + ...contentProps + } = props; + const context = useMenuContext(CONTENT_NAME, __scopeMenu); + const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu); + const popperScope = usePopperScope(__scopeMenu); + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu); + const getItems = useCollection(__scopeMenu); + const [currentItemId, setCurrentItemId] = React.useState(null); + const contentRef = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange); + const timerRef = React.useRef(0); + const searchRef = React.useRef(""); + const pointerGraceTimerRef = React.useRef(0); + const pointerGraceIntentRef = React.useRef(null); + const pointerDirRef = React.useRef("right"); + const lastPointerXRef = React.useRef(0); + const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment; + const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0; + const handleTypeaheadSearch = (key) => { + const search = searchRef.current + key; + const items = getItems().filter((item) => !item.disabled); + const currentItem = document.activeElement; + const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue; + const values = items.map((item) => item.textValue); + const nextMatch = getNextMatch(values, search, currentMatch); + const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current; + (function updateSearch(value) { + searchRef.current = value; + window.clearTimeout(timerRef.current); + if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3); + })(search); + if (newItem) { + setTimeout(() => newItem.focus()); + } + }; + React.useEffect(() => { + return () => window.clearTimeout(timerRef.current); + }, []); + useFocusGuards(); + const isPointerMovingToSubmenu = React.useCallback((event) => { + const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side; + return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area); + }, []); + return /* @__PURE__ */ jsx( + MenuContentProvider, + { + scope: __scopeMenu, + searchRef, + onItemEnter: React.useCallback( + (event) => { + if (isPointerMovingToSubmenu(event)) event.preventDefault(); + }, + [isPointerMovingToSubmenu] + ), + onItemLeave: React.useCallback( + (event) => { + if (isPointerMovingToSubmenu(event)) return; + contentRef.current?.focus(); + setCurrentItemId(null); + }, + [isPointerMovingToSubmenu] + ), + onTriggerLeave: React.useCallback( + (event) => { + if (isPointerMovingToSubmenu(event)) event.preventDefault(); + }, + [isPointerMovingToSubmenu] + ), + pointerGraceTimerRef, + onPointerGraceIntentChange: React.useCallback((intent) => { + pointerGraceIntentRef.current = intent; + }, []), + children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx( + FocusScope, + { + asChild: true, + trapped: trapFocus, + onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => { + event.preventDefault(); + contentRef.current?.focus({ preventScroll: true }); + }), + onUnmountAutoFocus: onCloseAutoFocus, + children: /* @__PURE__ */ jsx( + DismissableLayer, + { + asChild: true, + disableOutsidePointerEvents, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onInteractOutside, + onDismiss, + children: /* @__PURE__ */ jsx( + RovingFocusGroup.Root, + { + asChild: true, + ...rovingFocusGroupScope, + dir: rootContext.dir, + orientation: "vertical", + loop, + currentTabStopId: currentItemId, + onCurrentTabStopIdChange: setCurrentItemId, + onEntryFocus: composeEventHandlers(onEntryFocus, (event) => { + if (!rootContext.isUsingKeyboardRef.current) event.preventDefault(); + }), + preventScrollOnEntryFocus: true, + children: /* @__PURE__ */ jsx( + PopperPrimitive.Content, + { + role: "menu", + "aria-orientation": "vertical", + "data-state": getOpenState(context.open), + "data-radix-menu-content": "", + dir: rootContext.dir, + ...popperScope, + ...contentProps, + ref: composedRefs, + style: { outline: "none", ...contentProps.style }, + onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => { + const target = event.target; + const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget; + const isModifierKey = event.ctrlKey || event.altKey || event.metaKey; + const isCharacterKey = event.key.length === 1; + if (isKeyDownInside) { + if (event.key === "Tab") event.preventDefault(); + if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key); + } + const content = contentRef.current; + if (event.target !== content) return; + if (!FIRST_LAST_KEYS.includes(event.key)) return; + event.preventDefault(); + const items = getItems().filter((item) => !item.disabled); + const candidateNodes = items.map((item) => item.ref.current); + if (LAST_KEYS.includes(event.key)) candidateNodes.reverse(); + focusFirst(candidateNodes); + }), + onBlur: composeEventHandlers(props.onBlur, (event) => { + if (!event.currentTarget.contains(event.target)) { + window.clearTimeout(timerRef.current); + searchRef.current = ""; + } + }), + onPointerMove: composeEventHandlers( + props.onPointerMove, + whenMouse((event) => { + const target = event.target; + const pointerXHasChanged = lastPointerXRef.current !== event.clientX; + if (event.currentTarget.contains(target) && pointerXHasChanged) { + const newDir = event.clientX > lastPointerXRef.current ? "right" : "left"; + pointerDirRef.current = newDir; + lastPointerXRef.current = event.clientX; + } + }) + ) + } + ) + } + ) + } + ) + } + ) }) + } + ); + } +); +MenuContent.displayName = CONTENT_NAME; +var GROUP_NAME = "MenuGroup"; +var MenuGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, ...groupProps } = props; + return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef }); + } +); +MenuGroup.displayName = GROUP_NAME; +var LABEL_NAME = "MenuLabel"; +var MenuLabel = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, ...labelProps } = props; + return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef }); + } +); +MenuLabel.displayName = LABEL_NAME; +var ITEM_NAME = "MenuItem"; +var ITEM_SELECT = "menu.itemSelect"; +var MenuItem = React.forwardRef( + (props, forwardedRef) => { + const { disabled = false, onSelect, ...itemProps } = props; + const ref = React.useRef(null); + const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu); + const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu); + const composedRefs = useComposedRefs(forwardedRef, ref); + const isPointerDownRef = React.useRef(false); + const handleSelect = () => { + const menuItem = ref.current; + if (!disabled && menuItem) { + const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true }); + menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true }); + dispatchDiscreteCustomEvent(menuItem, itemSelectEvent); + if (itemSelectEvent.defaultPrevented) { + isPointerDownRef.current = false; + } else { + rootContext.onClose(); + } + } + }; + return /* @__PURE__ */ jsx( + MenuItemImpl, + { + ...itemProps, + ref: composedRefs, + disabled, + onClick: composeEventHandlers(props.onClick, handleSelect), + onPointerDown: (event) => { + props.onPointerDown?.(event); + isPointerDownRef.current = true; + }, + onPointerUp: composeEventHandlers(props.onPointerUp, (event) => { + if (!isPointerDownRef.current) event.currentTarget?.click(); + }), + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + const isTypingAhead = contentContext.searchRef.current !== ""; + if (disabled || isTypingAhead && event.key === " ") return; + if (SELECTION_KEYS.includes(event.key)) { + event.currentTarget.click(); + event.preventDefault(); + } + }) + } + ); + } +); +MenuItem.displayName = ITEM_NAME; +var MenuItemImpl = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, disabled = false, textValue, ...itemProps } = props; + const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu); + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref); + const [isFocused, setIsFocused] = React.useState(false); + const [textContent, setTextContent] = React.useState(""); + React.useEffect(() => { + const menuItem = ref.current; + if (menuItem) { + setTextContent((menuItem.textContent ?? "").trim()); + } + }, [itemProps.children]); + return /* @__PURE__ */ jsx( + Collection.ItemSlot, + { + scope: __scopeMenu, + disabled, + textValue: textValue ?? textContent, + children: /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx( + Primitive.div, + { + role: "menuitem", + "data-highlighted": isFocused ? "" : void 0, + "aria-disabled": disabled || void 0, + "data-disabled": disabled ? "" : void 0, + ...itemProps, + ref: composedRefs, + onPointerMove: composeEventHandlers( + props.onPointerMove, + whenMouse((event) => { + if (disabled) { + contentContext.onItemLeave(event); + } else { + contentContext.onItemEnter(event); + if (!event.defaultPrevented) { + const item = event.currentTarget; + item.focus({ preventScroll: true }); + } + } + }) + ), + onPointerLeave: composeEventHandlers( + props.onPointerLeave, + whenMouse((event) => contentContext.onItemLeave(event)) + ), + onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)), + onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false)) + } + ) }) + } + ); + } +); +var CHECKBOX_ITEM_NAME = "MenuCheckboxItem"; +var MenuCheckboxItem = React.forwardRef( + (props, forwardedRef) => { + const { checked = false, onCheckedChange, ...checkboxItemProps } = props; + return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx( + MenuItem, + { + role: "menuitemcheckbox", + "aria-checked": isIndeterminate(checked) ? "mixed" : checked, + ...checkboxItemProps, + ref: forwardedRef, + "data-state": getCheckedState(checked), + onSelect: composeEventHandlers( + checkboxItemProps.onSelect, + () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked), + { checkForDefaultPrevented: false } + ) + } + ) }); + } +); +MenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME; +var RADIO_GROUP_NAME = "MenuRadioGroup"; +var [RadioGroupProvider, useRadioGroupContext] = createMenuContext( + RADIO_GROUP_NAME, + { value: void 0, onValueChange: () => { + } } +); +var MenuRadioGroup = React.forwardRef( + (props, forwardedRef) => { + const { value, onValueChange, ...groupProps } = props; + const handleValueChange = useCallbackRef(onValueChange); + return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) }); + } +); +MenuRadioGroup.displayName = RADIO_GROUP_NAME; +var RADIO_ITEM_NAME = "MenuRadioItem"; +var MenuRadioItem = React.forwardRef( + (props, forwardedRef) => { + const { value, ...radioItemProps } = props; + const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu); + const checked = value === context.value; + return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx( + MenuItem, + { + role: "menuitemradio", + "aria-checked": checked, + ...radioItemProps, + ref: forwardedRef, + "data-state": getCheckedState(checked), + onSelect: composeEventHandlers( + radioItemProps.onSelect, + () => context.onValueChange?.(value), + { checkForDefaultPrevented: false } + ) + } + ) }); + } +); +MenuRadioItem.displayName = RADIO_ITEM_NAME; +var ITEM_INDICATOR_NAME = "MenuItemIndicator"; +var [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext( + ITEM_INDICATOR_NAME, + { checked: false } +); +var MenuItemIndicator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, forceMount, ...itemIndicatorProps } = props; + const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu); + return /* @__PURE__ */ jsx( + Presence, + { + present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true, + children: /* @__PURE__ */ jsx( + Primitive.span, + { + ...itemIndicatorProps, + ref: forwardedRef, + "data-state": getCheckedState(indicatorContext.checked) + } + ) + } + ); + } +); +MenuItemIndicator.displayName = ITEM_INDICATOR_NAME; +var SEPARATOR_NAME = "MenuSeparator"; +var MenuSeparator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, ...separatorProps } = props; + return /* @__PURE__ */ jsx( + Primitive.div, + { + role: "separator", + "aria-orientation": "horizontal", + ...separatorProps, + ref: forwardedRef + } + ); + } +); +MenuSeparator.displayName = SEPARATOR_NAME; +var ARROW_NAME = "MenuArrow"; +var MenuArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenu, ...arrowProps } = props; + const popperScope = usePopperScope(__scopeMenu); + return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }); + } +); +MenuArrow.displayName = ARROW_NAME; +var SUB_NAME = "MenuSub"; +var [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME); +var MenuSub = (props) => { + const { __scopeMenu, children, open = false, onOpenChange } = props; + const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu); + const popperScope = usePopperScope(__scopeMenu); + const [trigger, setTrigger] = React.useState(null); + const [content, setContent] = React.useState(null); + const handleOpenChange = useCallbackRef(onOpenChange); + React.useEffect(() => { + if (parentMenuContext.open === false) handleOpenChange(false); + return () => handleOpenChange(false); + }, [parentMenuContext.open, handleOpenChange]); + return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx( + MenuProvider, + { + scope: __scopeMenu, + open, + onOpenChange: handleOpenChange, + content, + onContentChange: setContent, + children: /* @__PURE__ */ jsx( + MenuSubProvider, + { + scope: __scopeMenu, + contentId: useId(), + triggerId: useId(), + trigger, + onTriggerChange: setTrigger, + children + } + ) + } + ) }); +}; +MenuSub.displayName = SUB_NAME; +var SUB_TRIGGER_NAME = "MenuSubTrigger"; +var MenuSubTrigger = React.forwardRef( + (props, forwardedRef) => { + const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu); + const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu); + const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu); + const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu); + const openTimerRef = React.useRef(null); + const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext; + const scope = { __scopeMenu: props.__scopeMenu }; + const clearOpenTimer = React.useCallback(() => { + if (openTimerRef.current) window.clearTimeout(openTimerRef.current); + openTimerRef.current = null; + }, []); + React.useEffect(() => clearOpenTimer, [clearOpenTimer]); + React.useEffect(() => { + const pointerGraceTimer = pointerGraceTimerRef.current; + return () => { + window.clearTimeout(pointerGraceTimer); + onPointerGraceIntentChange(null); + }; + }, [pointerGraceTimerRef, onPointerGraceIntentChange]); + return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx( + MenuItemImpl, + { + id: subContext.triggerId, + "aria-haspopup": "menu", + "aria-expanded": context.open, + "aria-controls": subContext.contentId, + "data-state": getOpenState(context.open), + ...props, + ref: composeRefs(forwardedRef, subContext.onTriggerChange), + onClick: (event) => { + props.onClick?.(event); + if (props.disabled || event.defaultPrevented) return; + event.currentTarget.focus(); + if (!context.open) context.onOpenChange(true); + }, + onPointerMove: composeEventHandlers( + props.onPointerMove, + whenMouse((event) => { + contentContext.onItemEnter(event); + if (event.defaultPrevented) return; + if (!props.disabled && !context.open && !openTimerRef.current) { + contentContext.onPointerGraceIntentChange(null); + openTimerRef.current = window.setTimeout(() => { + context.onOpenChange(true); + clearOpenTimer(); + }, 100); + } + }) + ), + onPointerLeave: composeEventHandlers( + props.onPointerLeave, + whenMouse((event) => { + clearOpenTimer(); + const contentRect = context.content?.getBoundingClientRect(); + if (contentRect) { + const side = context.content?.dataset.side; + const rightSide = side === "right"; + const bleed = rightSide ? -5 : 5; + const contentNearEdge = contentRect[rightSide ? "left" : "right"]; + const contentFarEdge = contentRect[rightSide ? "right" : "left"]; + contentContext.onPointerGraceIntentChange({ + area: [ + // Apply a bleed on clientX to ensure that our exit point is + // consistently within polygon bounds + { x: event.clientX + bleed, y: event.clientY }, + { x: contentNearEdge, y: contentRect.top }, + { x: contentFarEdge, y: contentRect.top }, + { x: contentFarEdge, y: contentRect.bottom }, + { x: contentNearEdge, y: contentRect.bottom } + ], + side + }); + window.clearTimeout(pointerGraceTimerRef.current); + pointerGraceTimerRef.current = window.setTimeout( + () => contentContext.onPointerGraceIntentChange(null), + 300 + ); + } else { + contentContext.onTriggerLeave(event); + if (event.defaultPrevented) return; + contentContext.onPointerGraceIntentChange(null); + } + }) + ), + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + const isTypingAhead = contentContext.searchRef.current !== ""; + if (props.disabled || isTypingAhead && event.key === " ") return; + if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) { + context.onOpenChange(true); + context.content?.focus(); + event.preventDefault(); + } + }) + } + ) }); + } +); +MenuSubTrigger.displayName = SUB_TRIGGER_NAME; +var SUB_CONTENT_NAME = "MenuSubContent"; +var MenuSubContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu); + const { forceMount = portalContext.forceMount, ...subContentProps } = props; + const context = useMenuContext(CONTENT_NAME, props.__scopeMenu); + const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu); + const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref); + return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx( + MenuContentImpl, + { + id: subContext.contentId, + "aria-labelledby": subContext.triggerId, + ...subContentProps, + ref: composedRefs, + align: "start", + side: rootContext.dir === "rtl" ? "left" : "right", + disableOutsidePointerEvents: false, + disableOutsideScroll: false, + trapFocus: false, + onOpenAutoFocus: (event) => { + if (rootContext.isUsingKeyboardRef.current) ref.current?.focus(); + event.preventDefault(); + }, + onCloseAutoFocus: (event) => event.preventDefault(), + onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => { + if (event.target !== subContext.trigger) context.onOpenChange(false); + }), + onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => { + rootContext.onClose(); + event.preventDefault(); + }), + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + const isKeyDownInside = event.currentTarget.contains(event.target); + const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key); + if (isKeyDownInside && isCloseKey) { + context.onOpenChange(false); + subContext.trigger?.focus(); + event.preventDefault(); + } + }) + } + ) }) }) }); + } +); +MenuSubContent.displayName = SUB_CONTENT_NAME; +function getOpenState(open) { + return open ? "open" : "closed"; +} +function isIndeterminate(checked) { + return checked === "indeterminate"; +} +function getCheckedState(checked) { + return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked"; +} +function focusFirst(candidates) { + const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement; + for (const candidate of candidates) { + if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return; + candidate.focus(); + if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return; + } +} +function wrapArray(array, startIndex) { + return array.map((_, index) => array[(startIndex + index) % array.length]); +} +function getNextMatch(values, search, currentMatch) { + const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]); + const normalizedSearch = isRepeated ? search[0] : search; + const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1; + let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0)); + const excludeCurrentMatch = normalizedSearch.length === 1; + if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch); + const nextMatch = wrappedValues.find( + (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase()) + ); + return nextMatch !== currentMatch ? nextMatch : void 0; +} +function isPointInPolygon(point, polygon) { + const { x, y } = point; + let inside = false; + for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) { + const ii = polygon[i]; + const jj = polygon[j]; + const xi = ii.x; + const yi = ii.y; + const xj = jj.x; + const yj = jj.y; + const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi; + if (intersect) inside = !inside; + } + return inside; +} +function isPointerInGraceArea(event, area) { + if (!area) return false; + const cursorPos = { x: event.clientX, y: event.clientY }; + return isPointInPolygon(cursorPos, area); +} +function whenMouse(handler) { + return (event) => event.pointerType === "mouse" ? handler(event) : void 0; +} +var Root3 = Menu; +var Anchor2 = MenuAnchor; +var Portal = MenuPortal; +var Content2 = MenuContent; +var Group = MenuGroup; +var Label = MenuLabel; +var Item2 = MenuItem; +var CheckboxItem = MenuCheckboxItem; +var RadioGroup = MenuRadioGroup; +var RadioItem = MenuRadioItem; +var ItemIndicator = MenuItemIndicator; +var Separator = MenuSeparator; +var Arrow2 = MenuArrow; +var Sub = MenuSub; +var SubTrigger = MenuSubTrigger; +var SubContent = MenuSubContent; +export { + Anchor2 as Anchor, + Arrow2 as Arrow, + CheckboxItem, + Content2 as Content, + Group, + Item2 as Item, + ItemIndicator, + Label, + Menu, + MenuAnchor, + MenuArrow, + MenuCheckboxItem, + MenuContent, + MenuGroup, + MenuItem, + MenuItemIndicator, + MenuLabel, + MenuPortal, + MenuRadioGroup, + MenuRadioItem, + MenuSeparator, + MenuSub, + MenuSubContent, + MenuSubTrigger, + Portal, + RadioGroup, + RadioItem, + Root3 as Root, + Separator, + Sub, + SubContent, + SubTrigger, + createMenuScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..9e7ab7bd6c9c4f17d03864e8bb6ac253b0dfabf5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/menu.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs, composeRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { createSlot } from '@radix-ui/react-slot';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\nconst SELECTION_KEYS = ['Enter', ' '];\nconst FIRST_KEYS = ['ArrowDown', 'PageUp', 'Home'];\nconst LAST_KEYS = ['ArrowUp', 'PageDown', 'End'];\nconst FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nconst SUB_OPEN_KEYS: Record = {\n ltr: [...SELECTION_KEYS, 'ArrowRight'],\n rtl: [...SELECTION_KEYS, 'ArrowLeft'],\n};\nconst SUB_CLOSE_KEYS: Record = {\n ltr: ['ArrowLeft'],\n rtl: ['ArrowRight'],\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Menu\n * -----------------------------------------------------------------------------------------------*/\n\nconst MENU_NAME = 'Menu';\n\ntype ItemData = { disabled: boolean; textValue: string };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n MenuItemElement,\n ItemData\n>(MENU_NAME);\n\ntype ScopedProps

= P & { __scopeMenu?: Scope };\nconst [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope,\n]);\nconst usePopperScope = createPopperScope();\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\n\ntype MenuContextValue = {\n open: boolean;\n onOpenChange(open: boolean): void;\n content: MenuContentElement | null;\n onContentChange(content: MenuContentElement | null): void;\n};\n\nconst [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\n\ntype MenuRootContextValue = {\n onClose(): void;\n isUsingKeyboardRef: React.RefObject;\n dir: Direction;\n modal: boolean;\n};\n\nconst [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\n\ninterface MenuProps {\n children?: React.ReactNode;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst Menu: React.FC = (props: ScopedProps) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n\n React.useEffect(() => {\n // Capture phase ensures we set the boolean before any side effects execute\n // in response to the key or pointer event as they might depend on this value.\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener('pointerdown', handlePointer, { capture: true, once: true });\n document.addEventListener('pointermove', handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => (isUsingKeyboardRef.current = false);\n document.addEventListener('keydown', handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener('keydown', handleKeyDown, { capture: true });\n document.removeEventListener('pointerdown', handlePointer, { capture: true });\n document.removeEventListener('pointermove', handlePointer, { capture: true });\n };\n }, []);\n\n return (\n \n \n handleOpenChange(false), [handleOpenChange])}\n isUsingKeyboardRef={isUsingKeyboardRef}\n dir={direction}\n modal={modal}\n >\n {children}\n \n \n \n );\n};\n\nMenu.displayName = MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'MenuAnchor';\n\ntype MenuAnchorElement = React.ComponentRef;\ntype PopperAnchorProps = React.ComponentPropsWithoutRef;\ninterface MenuAnchorProps extends PopperAnchorProps {}\n\nconst MenuAnchor = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return ;\n }\n);\n\nMenuAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'MenuPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface MenuPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst MenuPortal: React.FC = (props: ScopedProps) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return (\n \n \n \n {children}\n \n \n \n );\n};\n\nMenuPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'MenuContent';\n\ntype MenuContentContextValue = {\n onItemEnter(event: React.PointerEvent): void;\n onItemLeave(event: React.PointerEvent): void;\n onTriggerLeave(event: React.PointerEvent): void;\n searchRef: React.RefObject;\n pointerGraceTimerRef: React.MutableRefObject;\n onPointerGraceIntentChange(intent: GraceIntent | null): void;\n};\nconst [MenuContentProvider, useMenuContentContext] =\n createMenuContext(CONTENT_NAME);\n\ntype MenuContentElement = MenuRootContentTypeElement;\n/**\n * We purposefully don't union MenuRootContent and MenuSubContent props here because\n * they have conflicting prop types. We agreed that we would allow MenuSubContent to\n * accept props that it would just ignore.\n */\ninterface MenuContentProps extends MenuRootContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst MenuContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n\n return (\n \n \n \n {rootContext.modal ? (\n \n ) : (\n \n )}\n \n \n \n );\n }\n);\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype MenuRootContentTypeElement = MenuContentImplElement;\ninterface MenuRootContentTypeProps\n extends Omit {}\n\nconst MenuRootContentModal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n // Hide everything from ARIA except the `MenuContent`\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n event.preventDefault(),\n { checkForDefaultPrevented: false }\n )}\n onDismiss={() => context.onOpenChange(false)}\n />\n );\n }\n);\n\nconst MenuRootContentNonModal = React.forwardRef<\n MenuRootContentTypeElement,\n MenuRootContentTypeProps\n>((props: ScopedProps, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return (\n context.onOpenChange(false)}\n />\n );\n});\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype MenuContentImplElement = React.ComponentRef;\ntype FocusScopeProps = React.ComponentPropsWithoutRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef;\ntype PopperContentProps = React.ComponentPropsWithoutRef;\ntype MenuContentImplPrivateProps = {\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n onDismiss?: DismissableLayerProps['onDismiss'];\n disableOutsidePointerEvents?: DismissableLayerProps['disableOutsidePointerEvents'];\n\n /**\n * Whether scrolling outside the `MenuContent` should be prevented\n * (default: `false`)\n */\n disableOutsideScroll?: boolean;\n\n /**\n * Whether focus should be trapped within the `MenuContent`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n};\ninterface MenuContentImplProps\n extends MenuContentImplPrivateProps,\n Omit {\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n\n /**\n * Whether keyboard navigation should loop around\n * @defaultValue false\n */\n loop?: RovingFocusGroupProps['loop'];\n\n onEntryFocus?: RovingFocusGroupProps['onEntryFocus'];\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n onFocusOutside?: DismissableLayerProps['onFocusOutside'];\n onInteractOutside?: DismissableLayerProps['onInteractOutside'];\n}\n\nconst Slot = createSlot('MenuContent.ScrollLock');\n\nconst MenuContentImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState(null);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef('');\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef(null);\n const pointerDirRef = React.useRef('right');\n const lastPointerXRef = React.useRef(0);\n\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll\n ? { as: Slot, allowPinchZoom: true }\n : undefined;\n\n const handleTypeaheadSearch = (key: string) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n\n // Reset `searchRef` 1 second after it was last updated\n (function updateSearch(value: string) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== '') timerRef.current = window.setTimeout(() => updateSearch(''), 1000);\n })(search);\n\n if (newItem) {\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => (newItem as HTMLElement).focus());\n }\n };\n\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n\n // Make sure the whole tree has focus guards as our `MenuContent` may be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n const isPointerMovingToSubmenu = React.useCallback((event: React.PointerEvent) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n\n return (\n {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n )}\n onItemLeave={React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n )}\n onTriggerLeave={React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n )}\n pointerGraceTimerRef={pointerGraceTimerRef}\n onPointerGraceIntentChange={React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, [])}\n >\n \n {\n // when opening, explicitly focus the content area only and leave\n // `onEntryFocus` in control of focusing first item\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n })}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n \n {\n // only focus first item when using keyboard\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n })}\n preventScrollOnEntryFocus\n >\n {\n // submenu key events bubble through portals. We only care about keys in this menu.\n const target = event.target as HTMLElement;\n const isKeyDownInside =\n target.closest('[data-radix-menu-content]') === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n // menus should not be navigated using tab key so we prevent it\n if (event.key === 'Tab') event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n // focus first/last item based on key pressed\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current!);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n })}\n onBlur={composeEventHandlers(props.onBlur, (event) => {\n // clear search buffer when leaving the menu\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = '';\n }\n })}\n onPointerMove={composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target as HTMLElement;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n\n // We don't use `event.movementX` for this check because Safari will\n // always return `0` on a pointer event.\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? 'right' : 'left';\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )}\n />\n \n \n \n \n \n );\n }\n);\n\nMenuContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'MenuGroup';\n\ntype MenuGroupElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface MenuGroupProps extends PrimitiveDivProps {}\n\nconst MenuGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return ;\n }\n);\n\nMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'MenuLabel';\n\ntype MenuLabelElement = React.ComponentRef;\ninterface MenuLabelProps extends PrimitiveDivProps {}\n\nconst MenuLabel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return ;\n }\n);\n\nMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'MenuItem';\nconst ITEM_SELECT = 'menu.itemSelect';\n\ntype MenuItemElement = MenuItemImplElement;\ninterface MenuItemProps extends Omit {\n onSelect?: (event: Event) => void;\n}\n\nconst MenuItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n\n return (\n {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n }}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n // Pointer down can move to a different menu item which should activate it on pointer up.\n // We dispatch a click for selection to allow composition with click based triggers and to\n // prevent Firefox from getting stuck in text selection mode when the menu closes.\n if (!isPointerDownRef.current) event.currentTarget?.click();\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== '';\n if (disabled || (isTypingAhead && event.key === ' ')) return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n /**\n * We prevent default browser behaviour for selection keys as they should trigger\n * a selection only:\n * - prevents space from scrolling the page.\n * - if keydown causes focus to move, prevents keydown from firing on the new target.\n */\n event.preventDefault();\n }\n })}\n />\n );\n }\n);\n\nMenuItem.displayName = ITEM_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype MenuItemImplElement = React.ComponentRef;\ninterface MenuItemImplProps extends PrimitiveDivProps {\n disabled?: boolean;\n textValue?: string;\n}\n\nconst MenuItemImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n\n // get the item's `.textContent` as default strategy for typeahead `textValue`\n const [textContent, setTextContent] = React.useState('');\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? '').trim());\n }\n }, [itemProps.children]);\n\n return (\n \n \n {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n )}\n onPointerLeave={composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n )}\n onFocus={composeEventHandlers(props.onFocus, () => setIsFocused(true))}\n onBlur={composeEventHandlers(props.onBlur, () => setIsFocused(false))}\n />\n \n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * MenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'MenuCheckboxItem';\n\ntype MenuCheckboxItemElement = MenuItemElement;\n\ntype CheckedState = boolean | 'indeterminate';\n\ninterface MenuCheckboxItemProps extends MenuItemProps {\n checked?: CheckedState;\n // `onCheckedChange` can never be called with `\"indeterminate\"` from the inside\n onCheckedChange?: (checked: boolean) => void;\n}\n\nconst MenuCheckboxItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return (\n \n onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )}\n />\n \n );\n }\n);\n\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'MenuRadioGroup';\n\nconst [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: undefined, onValueChange: () => {} }\n);\n\ntype MenuRadioGroupElement = React.ComponentRef;\ninterface MenuRadioGroupProps extends MenuGroupProps {\n value?: string;\n onValueChange?: (value: string) => void;\n}\n\nconst MenuRadioGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return (\n \n \n \n );\n }\n);\n\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'MenuRadioItem';\n\ntype MenuRadioItemElement = React.ComponentRef;\ninterface MenuRadioItemProps extends MenuItemProps {\n value: string;\n}\n\nconst MenuRadioItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return (\n \n context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )}\n />\n \n );\n }\n);\n\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_INDICATOR_NAME = 'MenuItemIndicator';\n\ntype CheckboxContextValue = { checked: CheckedState };\n\nconst [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\n\ntype MenuItemIndicatorElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface MenuItemIndicatorProps extends PrimitiveSpanProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst MenuItemIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return (\n \n \n \n );\n }\n);\n\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'MenuSeparator';\n\ntype MenuSeparatorElement = React.ComponentRef;\ninterface MenuSeparatorProps extends PrimitiveDivProps {}\n\nconst MenuSeparator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return (\n \n );\n }\n);\n\nMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'MenuArrow';\n\ntype MenuArrowElement = React.ComponentRef;\ntype PopperArrowProps = React.ComponentPropsWithoutRef;\ninterface MenuArrowProps extends PopperArrowProps {}\n\nconst MenuArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return ;\n }\n);\n\nMenuArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'MenuSub';\n\ntype MenuSubContextValue = {\n contentId: string;\n triggerId: string;\n trigger: MenuSubTriggerElement | null;\n onTriggerChange(trigger: MenuSubTriggerElement | null): void;\n};\n\nconst [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\n\ninterface MenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst MenuSub: React.FC = (props: ScopedProps) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n\n // Prevent the parent menu from reopening with open submenus.\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n\n return (\n \n \n \n {children}\n \n \n \n );\n};\n\nMenuSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'MenuSubTrigger';\n\ntype MenuSubTriggerElement = MenuItemImplElement;\ninterface MenuSubTriggerProps extends MenuItemImplProps {}\n\nconst MenuSubTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n\n return (\n \n {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n /**\n * We manually focus because iOS Safari doesn't always focus on click (e.g. buttons)\n * and we rely heavily on `onFocusOutside` for submenus to close when switching\n * between separate submenus.\n */\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n }}\n onPointerMove={composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n )}\n onPointerLeave={composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n // TODO: make sure to update this when we change positioning logic\n const side = context.content?.dataset.side as Side;\n const rightSide = side === 'right';\n const bleed = rightSide ? -5 : +5;\n const contentNearEdge = contentRect[rightSide ? 'left' : 'right'];\n const contentFarEdge = contentRect[rightSide ? 'right' : 'left'];\n\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom },\n ],\n side,\n });\n\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n\n // There's 100ms where the user may leave an item before the submenu was opened.\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n )}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== '';\n if (props.disabled || (isTypingAhead && event.key === ' ')) return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n // The trigger may hold focus if opened via pointer interaction\n // so we ensure content is given focus again when switching to keyboard.\n context.content?.focus();\n // prevent window from scrolling\n event.preventDefault();\n }\n })}\n />\n \n );\n }\n);\n\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'MenuSubContent';\n\ntype MenuSubContentElement = MenuContentImplElement;\ninterface MenuSubContentProps\n extends Omit<\n MenuContentImplProps,\n keyof MenuContentImplPrivateProps | 'onCloseAutoFocus' | 'onEntryFocus' | 'side' | 'align'\n > {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst MenuSubContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return (\n \n \n \n {\n // when opening a submenu, focus content for keyboard users only\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n }}\n // The menu might close because of focusing another menu item in the parent menu. We\n // don't want it to refocus the trigger in that case so we handle trigger focus ourselves.\n onCloseAutoFocus={(event) => event.preventDefault()}\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) => {\n // We prevent closing when the trigger is focused to avoid triggering a re-open animation\n // on pointer interaction.\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n })}\n onEscapeKeyDown={composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n // ensure pressing escape in submenu doesn't escape full screen mode\n event.preventDefault();\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n // Submenu key events bubble through portals. We only care about keys in this menu.\n const isKeyDownInside = event.currentTarget.contains(event.target as HTMLElement);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n // We focus manually because we prevented it in `onCloseAutoFocus`\n subContext.trigger?.focus();\n // prevent window from scrolling\n event.preventDefault();\n }\n })}\n />\n \n \n \n );\n }\n);\n\nMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getOpenState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nfunction isIndeterminate(checked?: CheckedState): checked is 'indeterminate' {\n return checked === 'indeterminate';\n}\n\nfunction getCheckedState(checked: CheckedState) {\n return isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';\n}\n\nfunction focusFirst(candidates: HTMLElement[]) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray(array: T[], startIndex: number) {\n return array.map((_, index) => array[(startIndex + index) % array.length]!);\n}\n\n/**\n * This is the \"meat\" of the typeahead matching logic. It takes in all the values,\n * the search and the current match, and returns the next match (or `undefined`).\n *\n * We normalize the search because if a user has repeatedly pressed a character,\n * we want the exact same behavior as if we only had that one character\n * (ie. cycle through options starting with that character)\n *\n * We also reorder the values by wrapping the array around the current match.\n * This is so we always look forward from the current match, and picking the first\n * match will always be the correct one.\n *\n * Finally, if the normalized search is exactly one character, we exclude the\n * current match from the values because otherwise it would be the first to match always\n * and focus would never move. This is as opposed to the regular case, where we\n * don't want focus to move if the current match still matches.\n */\nfunction getNextMatch(values: string[], search: string, currentMatch?: string) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0]! : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find((value) =>\n value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : undefined;\n}\n\ntype Point = { x: number; y: number };\ntype Polygon = Point[];\ntype Side = 'left' | 'right';\ntype GraceIntent = { area: Polygon; side: Side };\n\n// Determine if a point is inside of a polygon.\n// Based on https://github.com/substack/point-in-polygon\nfunction isPointInPolygon(point: Point, polygon: Polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i]!;\n const jj = polygon[j]!;\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n\n // prettier-ignore\n const intersect = ((yi > y) !== (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\n if (intersect) inside = !inside;\n }\n\n return inside;\n}\n\nfunction isPointerInGraceArea(event: React.PointerEvent, area?: Polygon) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\n\nfunction whenMouse(handler: React.PointerEventHandler): React.PointerEventHandler {\n return (event) => (event.pointerType === 'mouse' ? handler(event) : undefined);\n}\n\nconst Root = Menu;\nconst Anchor = MenuAnchor;\nconst Portal = MenuPortal;\nconst Content = MenuContent;\nconst Group = MenuGroup;\nconst Label = MenuLabel;\nconst Item = MenuItem;\nconst CheckboxItem = MenuCheckboxItem;\nconst RadioGroup = MenuRadioGroup;\nconst RadioItem = MenuRadioItem;\nconst ItemIndicator = MenuItemIndicator;\nconst Separator = MenuSeparator;\nconst Arrow = MenuArrow;\nconst Sub = MenuSub;\nconst SubTrigger = MenuSubTrigger;\nconst SubContent = MenuSubContent;\n\nexport {\n createMenuScope,\n //\n Menu,\n MenuAnchor,\n MenuPortal,\n MenuContent,\n MenuGroup,\n MenuLabel,\n MenuItem,\n MenuCheckboxItem,\n MenuRadioGroup,\n MenuRadioItem,\n MenuItemIndicator,\n MenuSeparator,\n MenuArrow,\n MenuSub,\n MenuSubTrigger,\n MenuSubContent,\n //\n Root,\n Anchor,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n MenuProps,\n MenuAnchorProps,\n MenuPortalProps,\n MenuContentProps,\n MenuGroupProps,\n MenuLabelProps,\n MenuItemProps,\n MenuCheckboxItemProps,\n MenuRadioGroupProps,\n MenuRadioItemProps,\n MenuItemIndicatorProps,\n MenuSeparatorProps,\n MenuArrowProps,\n MenuSubProps,\n MenuSubTriggerProps,\n MenuSubContentProps,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,iBAAiB,mBAAmB;AAC7C,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,aAAa;AACtB,YAAY,qBAAqB;AACjC,SAAS,yBAAyB;AAClC,SAAS,UAAU,uBAAuB;AAC1C,SAAS,gBAAgB;AACzB,SAAS,WAAW,mCAAmC;AACvD,YAAY,sBAAsB;AAClC,SAAS,mCAAmC;AAC5C,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAoGrB;AA9FR,IAAM,iBAAiB,CAAC,SAAS,GAAG;AACpC,IAAM,aAAa,CAAC,aAAa,UAAU,MAAM;AACjD,IAAM,YAAY,CAAC,WAAW,YAAY,KAAK;AAC/C,IAAM,kBAAkB,CAAC,GAAG,YAAY,GAAG,SAAS;AACpD,IAAM,gBAA6C;AAAA,EACjD,KAAK,CAAC,GAAG,gBAAgB,YAAY;AAAA,EACrC,KAAK,CAAC,GAAG,gBAAgB,WAAW;AACtC;AACA,IAAM,iBAA8C;AAAA,EAClD,KAAK,CAAC,WAAW;AAAA,EACjB,KAAK,CAAC,YAAY;AACpB;AAMA,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G;AACd,UAAM,KAAK,GAAG;AAGd,UAAM,YAAc,KAAK,MAAQ,KAAK,KAAQ,KAAK,KAAK,OAAO,IAAI,OAAO,KAAK,MAAM;AACrF,QAAI,UAAW,UAAS,CAAC;AAAA,EAC3B;AAEA,SAAO;AACT;AAEA,SAAS,qBAAqB,OAA2B,MAAgB;AACvE,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,YAAY,EAAE,GAAG,MAAM,SAAS,GAAG,MAAM,QAAQ;AACvD,SAAO,iBAAiB,WAAW,IAAI;AACzC;AAEA,SAAS,UAAa,SAAqE;AACzF,SAAO,CAAC,UAAW,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI;AACtE;AAEA,IAAMA,QAAO;AACb,IAAMC,UAAS;AACf,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAM,QAAQ;AACd,IAAM,QAAQ;AACd,IAAMC,QAAO;AACb,IAAM,eAAe;AACrB,IAAM,aAAa;AACnB,IAAM,YAAY;AAClB,IAAM,gBAAgB;AACtB,IAAM,YAAY;AAClB,IAAMC,SAAQ;AACd,IAAM,MAAM;AACZ,IAAM,aAAa;AACnB,IAAM,aAAa;", + "names": ["Root", "Anchor", "Content", "Item", "Arrow"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/package.json b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e54a11f6d0480169ff366a2d4a764a0030f1182c --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menu@2.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_7290b990568fe8031f44e22c743231ab/node_modules/@radix-ui/react-menu/package.json @@ -0,0 +1,86 @@ +{ + "name": "@radix-ui/react-menu", + "version": "2.1.16", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3", + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-collection": "1.1.7", + "@radix-ui/react-dismissable-layer": "1.1.11", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-focus-scope": "1.1.7", + "@radix-ui/react-focus-guards": "1.1.3", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-portal": "1.1.9", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-popper": "1.2.8", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-roving-focus": "1.1.11", + "@radix-ui/react-slot": "1.2.3", + "@radix-ui/react-use-callback-ref": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/test-data": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/LICENSE b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/README.md b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c3114db5d21fe1e9e1000e0124eb8fd0edc04e73 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/README.md @@ -0,0 +1,3 @@ +# `react-menubar` + +View docs [here](https://radix-ui.com/primitives/docs/components/menubar). diff --git a/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..5e358d0771a00a75b47755e46ac3495dbdf16f73 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.d.mts @@ -0,0 +1,115 @@ +import * as react_jsx_runtime from 'react/jsx-runtime'; +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import { Scope } from '@radix-ui/react-context'; +import * as React from 'react'; +import * as MenuPrimitive from '@radix-ui/react-menu'; +import * as RovingFocusGroup from '@radix-ui/react-roving-focus'; +import { Primitive } from '@radix-ui/react-primitive'; + +type ScopedProps

= P & { + __scopeMenubar?: Scope; +}; +declare const createMenubarScope: _radix_ui_react_context.CreateScope; +type RovingFocusGroupProps = React.ComponentPropsWithoutRef; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface MenubarProps extends PrimitiveDivProps { + value?: string; + defaultValue?: string; + onValueChange?: (value: string) => void; + loop?: RovingFocusGroupProps['loop']; + dir?: RovingFocusGroupProps['dir']; +} +declare const Menubar: React.ForwardRefExoticComponent>; +interface MenubarMenuProps { + value?: string; + children?: React.ReactNode; +} +declare const MenubarMenu: { + (props: ScopedProps): react_jsx_runtime.JSX.Element; + displayName: string; +}; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface MenubarTriggerProps extends PrimitiveButtonProps { +} +declare const MenubarTrigger: React.ForwardRefExoticComponent>; +type MenuPortalProps = React.ComponentPropsWithoutRef; +interface MenubarPortalProps extends MenuPortalProps { +} +declare const MenubarPortal: React.FC; +type MenuContentProps = React.ComponentPropsWithoutRef; +interface MenubarContentProps extends Omit { +} +declare const MenubarContent: React.ForwardRefExoticComponent>; +type MenuGroupProps = React.ComponentPropsWithoutRef; +interface MenubarGroupProps extends MenuGroupProps { +} +declare const MenubarGroup: React.ForwardRefExoticComponent>; +type MenuLabelProps = React.ComponentPropsWithoutRef; +interface MenubarLabelProps extends MenuLabelProps { +} +declare const MenubarLabel: React.ForwardRefExoticComponent>; +type MenuItemProps = React.ComponentPropsWithoutRef; +interface MenubarItemProps extends MenuItemProps { +} +declare const MenubarItem: React.ForwardRefExoticComponent>; +type MenuCheckboxItemProps = React.ComponentPropsWithoutRef; +interface MenubarCheckboxItemProps extends MenuCheckboxItemProps { +} +declare const MenubarCheckboxItem: React.ForwardRefExoticComponent>; +type MenuRadioGroupProps = React.ComponentPropsWithoutRef; +interface MenubarRadioGroupProps extends MenuRadioGroupProps { +} +declare const MenubarRadioGroup: React.ForwardRefExoticComponent>; +type MenuRadioItemProps = React.ComponentPropsWithoutRef; +interface MenubarRadioItemProps extends MenuRadioItemProps { +} +declare const MenubarRadioItem: React.ForwardRefExoticComponent>; +type MenuItemIndicatorProps = React.ComponentPropsWithoutRef; +interface MenubarItemIndicatorProps extends MenuItemIndicatorProps { +} +declare const MenubarItemIndicator: React.ForwardRefExoticComponent>; +type MenuSeparatorProps = React.ComponentPropsWithoutRef; +interface MenubarSeparatorProps extends MenuSeparatorProps { +} +declare const MenubarSeparator: React.ForwardRefExoticComponent>; +type MenuArrowProps = React.ComponentPropsWithoutRef; +interface MenubarArrowProps extends MenuArrowProps { +} +declare const MenubarArrow: React.ForwardRefExoticComponent>; +interface MenubarSubProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; +} +declare const MenubarSub: React.FC; +type MenuSubTriggerProps = React.ComponentPropsWithoutRef; +interface MenubarSubTriggerProps extends MenuSubTriggerProps { +} +declare const MenubarSubTrigger: React.ForwardRefExoticComponent>; +type MenuSubContentProps = React.ComponentPropsWithoutRef; +interface MenubarSubContentProps extends MenuSubContentProps { +} +declare const MenubarSubContent: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Menu: { + (props: ScopedProps): react_jsx_runtime.JSX.Element; + displayName: string; +}; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Group: React.ForwardRefExoticComponent>; +declare const Label: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const CheckboxItem: React.ForwardRefExoticComponent>; +declare const RadioGroup: React.ForwardRefExoticComponent>; +declare const RadioItem: React.ForwardRefExoticComponent>; +declare const ItemIndicator: React.ForwardRefExoticComponent>; +declare const Separator: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; +declare const Sub: React.FC; +declare const SubTrigger: React.ForwardRefExoticComponent>; +declare const SubContent: React.ForwardRefExoticComponent>; + +export { Arrow, CheckboxItem, Content, Group, Item, ItemIndicator, Label, Menu, Menubar, MenubarArrow, type MenubarArrowProps, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, MenubarItemIndicator, type MenubarItemIndicatorProps, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, MenubarPortal, type MenubarPortalProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, Trigger, createMenubarScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5e358d0771a00a75b47755e46ac3495dbdf16f73 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.d.ts @@ -0,0 +1,115 @@ +import * as react_jsx_runtime from 'react/jsx-runtime'; +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import { Scope } from '@radix-ui/react-context'; +import * as React from 'react'; +import * as MenuPrimitive from '@radix-ui/react-menu'; +import * as RovingFocusGroup from '@radix-ui/react-roving-focus'; +import { Primitive } from '@radix-ui/react-primitive'; + +type ScopedProps

= P & { + __scopeMenubar?: Scope; +}; +declare const createMenubarScope: _radix_ui_react_context.CreateScope; +type RovingFocusGroupProps = React.ComponentPropsWithoutRef; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface MenubarProps extends PrimitiveDivProps { + value?: string; + defaultValue?: string; + onValueChange?: (value: string) => void; + loop?: RovingFocusGroupProps['loop']; + dir?: RovingFocusGroupProps['dir']; +} +declare const Menubar: React.ForwardRefExoticComponent>; +interface MenubarMenuProps { + value?: string; + children?: React.ReactNode; +} +declare const MenubarMenu: { + (props: ScopedProps): react_jsx_runtime.JSX.Element; + displayName: string; +}; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface MenubarTriggerProps extends PrimitiveButtonProps { +} +declare const MenubarTrigger: React.ForwardRefExoticComponent>; +type MenuPortalProps = React.ComponentPropsWithoutRef; +interface MenubarPortalProps extends MenuPortalProps { +} +declare const MenubarPortal: React.FC; +type MenuContentProps = React.ComponentPropsWithoutRef; +interface MenubarContentProps extends Omit { +} +declare const MenubarContent: React.ForwardRefExoticComponent>; +type MenuGroupProps = React.ComponentPropsWithoutRef; +interface MenubarGroupProps extends MenuGroupProps { +} +declare const MenubarGroup: React.ForwardRefExoticComponent>; +type MenuLabelProps = React.ComponentPropsWithoutRef; +interface MenubarLabelProps extends MenuLabelProps { +} +declare const MenubarLabel: React.ForwardRefExoticComponent>; +type MenuItemProps = React.ComponentPropsWithoutRef; +interface MenubarItemProps extends MenuItemProps { +} +declare const MenubarItem: React.ForwardRefExoticComponent>; +type MenuCheckboxItemProps = React.ComponentPropsWithoutRef; +interface MenubarCheckboxItemProps extends MenuCheckboxItemProps { +} +declare const MenubarCheckboxItem: React.ForwardRefExoticComponent>; +type MenuRadioGroupProps = React.ComponentPropsWithoutRef; +interface MenubarRadioGroupProps extends MenuRadioGroupProps { +} +declare const MenubarRadioGroup: React.ForwardRefExoticComponent>; +type MenuRadioItemProps = React.ComponentPropsWithoutRef; +interface MenubarRadioItemProps extends MenuRadioItemProps { +} +declare const MenubarRadioItem: React.ForwardRefExoticComponent>; +type MenuItemIndicatorProps = React.ComponentPropsWithoutRef; +interface MenubarItemIndicatorProps extends MenuItemIndicatorProps { +} +declare const MenubarItemIndicator: React.ForwardRefExoticComponent>; +type MenuSeparatorProps = React.ComponentPropsWithoutRef; +interface MenubarSeparatorProps extends MenuSeparatorProps { +} +declare const MenubarSeparator: React.ForwardRefExoticComponent>; +type MenuArrowProps = React.ComponentPropsWithoutRef; +interface MenubarArrowProps extends MenuArrowProps { +} +declare const MenubarArrow: React.ForwardRefExoticComponent>; +interface MenubarSubProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; +} +declare const MenubarSub: React.FC; +type MenuSubTriggerProps = React.ComponentPropsWithoutRef; +interface MenubarSubTriggerProps extends MenuSubTriggerProps { +} +declare const MenubarSubTrigger: React.ForwardRefExoticComponent>; +type MenuSubContentProps = React.ComponentPropsWithoutRef; +interface MenubarSubContentProps extends MenuSubContentProps { +} +declare const MenubarSubContent: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Menu: { + (props: ScopedProps): react_jsx_runtime.JSX.Element; + displayName: string; +}; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Group: React.ForwardRefExoticComponent>; +declare const Label: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const CheckboxItem: React.ForwardRefExoticComponent>; +declare const RadioGroup: React.ForwardRefExoticComponent>; +declare const RadioItem: React.ForwardRefExoticComponent>; +declare const ItemIndicator: React.ForwardRefExoticComponent>; +declare const Separator: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; +declare const Sub: React.FC; +declare const SubTrigger: React.ForwardRefExoticComponent>; +declare const SubContent: React.ForwardRefExoticComponent>; + +export { Arrow, CheckboxItem, Content, Group, Item, ItemIndicator, Label, Menu, Menubar, MenubarArrow, type MenubarArrowProps, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, MenubarItemIndicator, type MenubarItemIndicatorProps, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, MenubarPortal, type MenubarPortalProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, Trigger, createMenubarScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.js b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..86a52a0df095a304435e1d5eb8a40cb0f76e96c4 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.js @@ -0,0 +1,502 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Arrow: () => Arrow2, + CheckboxItem: () => CheckboxItem2, + Content: () => Content2, + Group: () => Group2, + Item: () => Item3, + ItemIndicator: () => ItemIndicator2, + Label: () => Label2, + Menu: () => Menu, + Menubar: () => Menubar, + MenubarArrow: () => MenubarArrow, + MenubarCheckboxItem: () => MenubarCheckboxItem, + MenubarContent: () => MenubarContent, + MenubarGroup: () => MenubarGroup, + MenubarItem: () => MenubarItem, + MenubarItemIndicator: () => MenubarItemIndicator, + MenubarLabel: () => MenubarLabel, + MenubarMenu: () => MenubarMenu, + MenubarPortal: () => MenubarPortal, + MenubarRadioGroup: () => MenubarRadioGroup, + MenubarRadioItem: () => MenubarRadioItem, + MenubarSeparator: () => MenubarSeparator, + MenubarSub: () => MenubarSub, + MenubarSubContent: () => MenubarSubContent, + MenubarSubTrigger: () => MenubarSubTrigger, + MenubarTrigger: () => MenubarTrigger, + Portal: () => Portal2, + RadioGroup: () => RadioGroup2, + RadioItem: () => RadioItem2, + Root: () => Root3, + Separator: () => Separator2, + Sub: () => Sub2, + SubContent: () => SubContent2, + SubTrigger: () => SubTrigger2, + Trigger: () => Trigger, + createMenubarScope: () => createMenubarScope +}); +module.exports = __toCommonJS(index_exports); + +// src/menubar.tsx +var React = __toESM(require("react")); +var import_react_collection = require("@radix-ui/react-collection"); +var import_react_direction = require("@radix-ui/react-direction"); +var import_primitive = require("@radix-ui/primitive"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_id = require("@radix-ui/react-id"); +var MenuPrimitive = __toESM(require("@radix-ui/react-menu")); +var import_react_menu = require("@radix-ui/react-menu"); +var RovingFocusGroup = __toESM(require("@radix-ui/react-roving-focus")); +var import_react_roving_focus = require("@radix-ui/react-roving-focus"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_jsx_runtime = require("react/jsx-runtime"); +var MENUBAR_NAME = "Menubar"; +var [Collection, useCollection, createCollectionScope] = (0, import_react_collection.createCollection)(MENUBAR_NAME); +var [createMenubarContext, createMenubarScope] = (0, import_react_context.createContextScope)(MENUBAR_NAME, [ + createCollectionScope, + import_react_roving_focus.createRovingFocusGroupScope +]); +var useMenuScope = (0, import_react_menu.createMenuScope)(); +var useRovingFocusGroupScope = (0, import_react_roving_focus.createRovingFocusGroupScope)(); +var [MenubarContextProvider, useMenubarContext] = createMenubarContext(MENUBAR_NAME); +var Menubar = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeMenubar, + value: valueProp, + onValueChange, + defaultValue, + loop = true, + dir, + ...menubarProps + } = props; + const direction = (0, import_react_direction.useDirection)(dir); + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar); + const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({ + prop: valueProp, + onChange: onValueChange, + defaultProp: defaultValue ?? "", + caller: MENUBAR_NAME + }); + const [currentTabStopId, setCurrentTabStopId] = React.useState(null); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenubarContextProvider, + { + scope: __scopeMenubar, + value, + onMenuOpen: React.useCallback( + (value2) => { + setValue(value2); + setCurrentTabStopId(value2); + }, + [setValue] + ), + onMenuClose: React.useCallback(() => setValue(""), [setValue]), + onMenuToggle: React.useCallback( + (value2) => { + setValue((prevValue) => prevValue ? "" : value2); + setCurrentTabStopId(value2); + }, + [setValue] + ), + dir: direction, + loop, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: __scopeMenubar, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: __scopeMenubar, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + RovingFocusGroup.Root, + { + asChild: true, + ...rovingFocusGroupScope, + orientation: "horizontal", + loop, + dir: direction, + currentTabStopId, + onCurrentTabStopIdChange: setCurrentTabStopId, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { role: "menubar", ...menubarProps, ref: forwardedRef }) + } + ) }) }) + } + ); + } +); +Menubar.displayName = MENUBAR_NAME; +var MENU_NAME = "MenubarMenu"; +var [MenubarMenuProvider, useMenubarMenuContext] = createMenubarContext(MENU_NAME); +var MenubarMenu = (props) => { + const { __scopeMenubar, value: valueProp, ...menuProps } = props; + const autoValue = (0, import_react_id.useId)(); + const value = valueProp || autoValue || "LEGACY_REACT_AUTO_VALUE"; + const context = useMenubarContext(MENU_NAME, __scopeMenubar); + const menuScope = useMenuScope(__scopeMenubar); + const triggerRef = React.useRef(null); + const wasKeyboardTriggerOpenRef = React.useRef(false); + const open = context.value === value; + React.useEffect(() => { + if (!open) wasKeyboardTriggerOpenRef.current = false; + }, [open]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenubarMenuProvider, + { + scope: __scopeMenubar, + value, + triggerId: (0, import_react_id.useId)(), + triggerRef, + contentId: (0, import_react_id.useId)(), + wasKeyboardTriggerOpenRef, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuPrimitive.Root, + { + ...menuScope, + open, + onOpenChange: (open2) => { + if (!open2) context.onMenuClose(); + }, + modal: false, + dir: context.dir, + ...menuProps + } + ) + } + ); +}; +MenubarMenu.displayName = MENU_NAME; +var TRIGGER_NAME = "MenubarTrigger"; +var MenubarTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, disabled = false, ...triggerProps } = props; + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar); + const menuScope = useMenuScope(__scopeMenubar); + const context = useMenubarContext(TRIGGER_NAME, __scopeMenubar); + const menuContext = useMenubarMenuContext(TRIGGER_NAME, __scopeMenubar); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref, menuContext.triggerRef); + const [isFocused, setIsFocused] = React.useState(false); + const open = context.value === menuContext.value; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.ItemSlot, { scope: __scopeMenubar, value: menuContext.value, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + RovingFocusGroup.Item, + { + asChild: true, + ...rovingFocusGroupScope, + focusable: !disabled, + tabStopId: menuContext.value, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + role: "menuitem", + id: menuContext.triggerId, + "aria-haspopup": "menu", + "aria-expanded": open, + "aria-controls": open ? menuContext.contentId : void 0, + "data-highlighted": isFocused ? "" : void 0, + "data-state": open ? "open" : "closed", + "data-disabled": disabled ? "" : void 0, + disabled, + ...triggerProps, + ref: composedRefs, + onPointerDown: (0, import_primitive.composeEventHandlers)(props.onPointerDown, (event) => { + if (!disabled && event.button === 0 && event.ctrlKey === false) { + context.onMenuOpen(menuContext.value); + if (!open) event.preventDefault(); + } + }), + onPointerEnter: (0, import_primitive.composeEventHandlers)(props.onPointerEnter, () => { + const menubarOpen = Boolean(context.value); + if (menubarOpen && !open) { + context.onMenuOpen(menuContext.value); + ref.current?.focus(); + } + }), + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + if (disabled) return; + if (["Enter", " "].includes(event.key)) context.onMenuToggle(menuContext.value); + if (event.key === "ArrowDown") context.onMenuOpen(menuContext.value); + if (["Enter", " ", "ArrowDown"].includes(event.key)) { + menuContext.wasKeyboardTriggerOpenRef.current = true; + event.preventDefault(); + } + }), + onFocus: (0, import_primitive.composeEventHandlers)(props.onFocus, () => setIsFocused(true)), + onBlur: (0, import_primitive.composeEventHandlers)(props.onBlur, () => setIsFocused(false)) + } + ) }) + } + ) }); + } +); +MenubarTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "MenubarPortal"; +var MenubarPortal = (props) => { + const { __scopeMenubar, ...portalProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Portal, { ...menuScope, ...portalProps }); +}; +MenubarPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "MenubarContent"; +var MenubarContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, align = "start", ...contentProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + const context = useMenubarContext(CONTENT_NAME, __scopeMenubar); + const menuContext = useMenubarMenuContext(CONTENT_NAME, __scopeMenubar); + const getItems = useCollection(__scopeMenubar); + const hasInteractedOutsideRef = React.useRef(false); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuPrimitive.Content, + { + id: menuContext.contentId, + "aria-labelledby": menuContext.triggerId, + "data-radix-menubar-content": "", + ...menuScope, + ...contentProps, + ref: forwardedRef, + align, + onCloseAutoFocus: (0, import_primitive.composeEventHandlers)(props.onCloseAutoFocus, (event) => { + const menubarOpen = Boolean(context.value); + if (!menubarOpen && !hasInteractedOutsideRef.current) { + menuContext.triggerRef.current?.focus(); + } + hasInteractedOutsideRef.current = false; + event.preventDefault(); + }), + onFocusOutside: (0, import_primitive.composeEventHandlers)(props.onFocusOutside, (event) => { + const target = event.target; + const isMenubarTrigger = getItems().some((item) => item.ref.current?.contains(target)); + if (isMenubarTrigger) event.preventDefault(); + }), + onInteractOutside: (0, import_primitive.composeEventHandlers)(props.onInteractOutside, () => { + hasInteractedOutsideRef.current = true; + }), + onEntryFocus: (event) => { + if (!menuContext.wasKeyboardTriggerOpenRef.current) event.preventDefault(); + }, + onKeyDown: (0, import_primitive.composeEventHandlers)( + props.onKeyDown, + (event) => { + if (["ArrowRight", "ArrowLeft"].includes(event.key)) { + const target = event.target; + const targetIsSubTrigger = target.hasAttribute("data-radix-menubar-subtrigger"); + const isKeyDownInsideSubMenu = target.closest("[data-radix-menubar-content]") !== event.currentTarget; + const prevMenuKey = context.dir === "rtl" ? "ArrowRight" : "ArrowLeft"; + const isPrevKey = prevMenuKey === event.key; + const isNextKey = !isPrevKey; + if (isNextKey && targetIsSubTrigger) return; + if (isKeyDownInsideSubMenu && isPrevKey) return; + const items = getItems().filter((item) => !item.disabled); + let candidateValues = items.map((item) => item.value); + if (isPrevKey) candidateValues.reverse(); + const currentIndex = candidateValues.indexOf(menuContext.value); + candidateValues = context.loop ? wrapArray(candidateValues, currentIndex + 1) : candidateValues.slice(currentIndex + 1); + const [nextValue] = candidateValues; + if (nextValue) context.onMenuOpen(nextValue); + } + }, + { checkForDefaultPrevented: false } + ), + style: { + ...props.style, + // re-namespace exposed content custom properties + ...{ + "--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-menubar-content-available-width": "var(--radix-popper-available-width)", + "--radix-menubar-content-available-height": "var(--radix-popper-available-height)", + "--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); + } +); +MenubarContent.displayName = CONTENT_NAME; +var GROUP_NAME = "MenubarGroup"; +var MenubarGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...groupProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef }); + } +); +MenubarGroup.displayName = GROUP_NAME; +var LABEL_NAME = "MenubarLabel"; +var MenubarLabel = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...labelProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef }); + } +); +MenubarLabel.displayName = LABEL_NAME; +var ITEM_NAME = "MenubarItem"; +var MenubarItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...itemProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef }); + } +); +MenubarItem.displayName = ITEM_NAME; +var CHECKBOX_ITEM_NAME = "MenubarCheckboxItem"; +var MenubarCheckboxItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...checkboxItemProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef }); + } +); +MenubarCheckboxItem.displayName = CHECKBOX_ITEM_NAME; +var RADIO_GROUP_NAME = "MenubarRadioGroup"; +var MenubarRadioGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...radioGroupProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef }); + } +); +MenubarRadioGroup.displayName = RADIO_GROUP_NAME; +var RADIO_ITEM_NAME = "MenubarRadioItem"; +var MenubarRadioItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...radioItemProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef }); + } +); +MenubarRadioItem.displayName = RADIO_ITEM_NAME; +var INDICATOR_NAME = "MenubarItemIndicator"; +var MenubarItemIndicator = React.forwardRef((props, forwardedRef) => { + const { __scopeMenubar, ...itemIndicatorProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef }); +}); +MenubarItemIndicator.displayName = INDICATOR_NAME; +var SEPARATOR_NAME = "MenubarSeparator"; +var MenubarSeparator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...separatorProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef }); + } +); +MenubarSeparator.displayName = SEPARATOR_NAME; +var ARROW_NAME = "MenubarArrow"; +var MenubarArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...arrowProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef }); + } +); +MenubarArrow.displayName = ARROW_NAME; +var SUB_NAME = "MenubarSub"; +var MenubarSub = (props) => { + const { __scopeMenubar, children, open: openProp, onOpenChange, defaultOpen } = props; + const menuScope = useMenuScope(__scopeMenubar); + const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: SUB_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children }); +}; +MenubarSub.displayName = SUB_NAME; +var SUB_TRIGGER_NAME = "MenubarSubTrigger"; +var MenubarSubTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...subTriggerProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuPrimitive.SubTrigger, + { + "data-radix-menubar-subtrigger": "", + ...menuScope, + ...subTriggerProps, + ref: forwardedRef + } + ); + } +); +MenubarSubTrigger.displayName = SUB_TRIGGER_NAME; +var SUB_CONTENT_NAME = "MenubarSubContent"; +var MenubarSubContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...subContentProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + MenuPrimitive.SubContent, + { + ...menuScope, + "data-radix-menubar-content": "", + ...subContentProps, + ref: forwardedRef, + style: { + ...props.style, + // re-namespace exposed content custom properties + ...{ + "--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-menubar-content-available-width": "var(--radix-popper-available-width)", + "--radix-menubar-content-available-height": "var(--radix-popper-available-height)", + "--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); + } +); +MenubarSubContent.displayName = SUB_CONTENT_NAME; +function wrapArray(array, startIndex) { + return array.map((_, index) => array[(startIndex + index) % array.length]); +} +var Root3 = Menubar; +var Menu = MenubarMenu; +var Trigger = MenubarTrigger; +var Portal2 = MenubarPortal; +var Content2 = MenubarContent; +var Group2 = MenubarGroup; +var Label2 = MenubarLabel; +var Item3 = MenubarItem; +var CheckboxItem2 = MenubarCheckboxItem; +var RadioGroup2 = MenubarRadioGroup; +var RadioItem2 = MenubarRadioItem; +var ItemIndicator2 = MenubarItemIndicator; +var Separator2 = MenubarSeparator; +var Arrow2 = MenubarArrow; +var Sub2 = MenubarSub; +var SubTrigger2 = MenubarSubTrigger; +var SubContent2 = MenubarSubContent; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f3ee3cfbf8a6fabd5d27a3b258540e6f0c94356b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/menubar.tsx"], + "sourcesContent": ["'use client';\nexport {\n createMenubarScope,\n //\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarPortal,\n MenubarContent,\n MenubarGroup,\n MenubarLabel,\n MenubarItem,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarItemIndicator,\n MenubarSeparator,\n MenubarArrow,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n //\n Root,\n Menu,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './menubar';\nexport type {\n MenubarProps,\n MenubarMenuProps,\n MenubarTriggerProps,\n MenubarPortalProps,\n MenubarContentProps,\n MenubarGroupProps,\n MenubarLabelProps,\n MenubarItemProps,\n MenubarCheckboxItemProps,\n MenubarRadioGroupProps,\n MenubarRadioItemProps,\n MenubarItemIndicatorProps,\n MenubarSeparatorProps,\n MenubarArrowProps,\n MenubarSubProps,\n MenubarSubTriggerProps,\n MenubarSubContentProps,\n} from './menubar';\n", "import * as React from 'react';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * Menubar\n * -----------------------------------------------------------------------------------------------*/\n\nconst MENUBAR_NAME = 'Menubar';\n\ntype ItemData = { value: string; disabled: boolean };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n MenubarTriggerElement,\n ItemData\n>(MENUBAR_NAME);\n\ntype ScopedProps

= P & { __scopeMenubar?: Scope };\nconst [createMenubarContext, createMenubarScope] = createContextScope(MENUBAR_NAME, [\n createCollectionScope,\n createRovingFocusGroupScope,\n]);\n\nconst useMenuScope = createMenuScope();\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\n\ntype MenubarContextValue = {\n value: string;\n dir: Direction;\n loop: boolean;\n onMenuOpen(value: string): void;\n onMenuClose(): void;\n onMenuToggle(value: string): void;\n};\n\nconst [MenubarContextProvider, useMenubarContext] =\n createMenubarContext(MENUBAR_NAME);\n\ntype MenubarElement = React.ComponentRef;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface MenubarProps extends PrimitiveDivProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n loop?: RovingFocusGroupProps['loop'];\n dir?: RovingFocusGroupProps['dir'];\n}\n\nconst Menubar = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeMenubar,\n value: valueProp,\n onValueChange,\n defaultValue,\n loop = true,\n dir,\n ...menubarProps\n } = props;\n const direction = useDirection(dir);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? '',\n caller: MENUBAR_NAME,\n });\n\n // We need to manage tab stop id manually as `RovingFocusGroup` updates the stop\n // based on focus, and in some situations our triggers won't ever be given focus\n // (e.g. click to open and then outside to close)\n const [currentTabStopId, setCurrentTabStopId] = React.useState(null);\n\n return (\n {\n setValue(value);\n setCurrentTabStopId(value);\n },\n [setValue]\n )}\n onMenuClose={React.useCallback(() => setValue(''), [setValue])}\n onMenuToggle={React.useCallback(\n (value) => {\n setValue((prevValue) => (prevValue ? '' : value));\n // `openMenuOpen` and `onMenuToggle` are called exclusively so we\n // need to update the id in either case.\n setCurrentTabStopId(value);\n },\n [setValue]\n )}\n dir={direction}\n loop={loop}\n >\n \n \n \n \n \n \n \n \n );\n }\n);\n\nMenubar.displayName = MENUBAR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst MENU_NAME = 'MenubarMenu';\n\ntype MenubarMenuContextValue = {\n value: string;\n triggerId: string;\n triggerRef: React.RefObject;\n contentId: string;\n wasKeyboardTriggerOpenRef: React.MutableRefObject;\n};\n\nconst [MenubarMenuProvider, useMenubarMenuContext] =\n createMenubarContext(MENU_NAME);\n\ninterface MenubarMenuProps {\n value?: string;\n children?: React.ReactNode;\n}\n\nconst MenubarMenu = (props: ScopedProps) => {\n const { __scopeMenubar, value: valueProp, ...menuProps } = props;\n const autoValue = useId();\n // We need to provide an initial deterministic value as `useId` will return\n // empty string on the first render and we don't want to match our internal \"closed\" value.\n const value = valueProp || autoValue || 'LEGACY_REACT_AUTO_VALUE';\n const context = useMenubarContext(MENU_NAME, __scopeMenubar);\n const menuScope = useMenuScope(__scopeMenubar);\n const triggerRef = React.useRef(null);\n const wasKeyboardTriggerOpenRef = React.useRef(false);\n const open = context.value === value;\n\n React.useEffect(() => {\n if (!open) wasKeyboardTriggerOpenRef.current = false;\n }, [open]);\n\n return (\n \n {\n // Menu only calls `onOpenChange` when dismissing so we\n // want to close our MenuBar based on the same events.\n if (!open) context.onMenuClose();\n }}\n modal={false}\n dir={context.dir}\n {...menuProps}\n />\n \n );\n};\n\nMenubarMenu.displayName = MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'MenubarTrigger';\n\ntype MenubarTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface MenubarTriggerProps extends PrimitiveButtonProps {}\n\nconst MenubarTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, disabled = false, ...triggerProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);\n const menuScope = useMenuScope(__scopeMenubar);\n const context = useMenubarContext(TRIGGER_NAME, __scopeMenubar);\n const menuContext = useMenubarMenuContext(TRIGGER_NAME, __scopeMenubar);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, menuContext.triggerRef);\n const [isFocused, setIsFocused] = React.useState(false);\n const open = context.value === menuContext.value;\n\n return (\n \n \n \n {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onMenuOpen(menuContext.value);\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n if (!open) event.preventDefault();\n }\n })}\n onPointerEnter={composeEventHandlers(props.onPointerEnter, () => {\n const menubarOpen = Boolean(context.value);\n if (menubarOpen && !open) {\n context.onMenuOpen(menuContext.value);\n ref.current?.focus();\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if (['Enter', ' '].includes(event.key)) context.onMenuToggle(menuContext.value);\n if (event.key === 'ArrowDown') context.onMenuOpen(menuContext.value);\n // prevent keydown from scrolling window / first focused item to execute\n // that keydown (inadvertently closing the menu)\n if (['Enter', ' ', 'ArrowDown'].includes(event.key)) {\n menuContext.wasKeyboardTriggerOpenRef.current = true;\n event.preventDefault();\n }\n })}\n onFocus={composeEventHandlers(props.onFocus, () => setIsFocused(true))}\n onBlur={composeEventHandlers(props.onBlur, () => setIsFocused(false))}\n />\n \n \n \n );\n }\n);\n\nMenubarTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'MenubarPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef;\ninterface MenubarPortalProps extends MenuPortalProps {}\n\nconst MenubarPortal: React.FC = (props: ScopedProps) => {\n const { __scopeMenubar, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n};\n\nMenubarPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'MenubarContent';\n\ntype MenubarContentElement = React.ComponentRef;\ntype MenuContentProps = React.ComponentPropsWithoutRef;\ninterface MenubarContentProps extends Omit {}\n\nconst MenubarContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, align = 'start', ...contentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n const context = useMenubarContext(CONTENT_NAME, __scopeMenubar);\n const menuContext = useMenubarMenuContext(CONTENT_NAME, __scopeMenubar);\n const getItems = useCollection(__scopeMenubar);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n {\n const menubarOpen = Boolean(context.value);\n if (!menubarOpen && !hasInteractedOutsideRef.current) {\n menuContext.triggerRef.current?.focus();\n }\n\n hasInteractedOutsideRef.current = false;\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n })}\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) => {\n const target = event.target as HTMLElement;\n const isMenubarTrigger = getItems().some((item) => item.ref.current?.contains(target));\n if (isMenubarTrigger) event.preventDefault();\n })}\n onInteractOutside={composeEventHandlers(props.onInteractOutside, () => {\n hasInteractedOutsideRef.current = true;\n })}\n onEntryFocus={(event) => {\n if (!menuContext.wasKeyboardTriggerOpenRef.current) event.preventDefault();\n }}\n onKeyDown={composeEventHandlers(\n props.onKeyDown,\n (event) => {\n if (['ArrowRight', 'ArrowLeft'].includes(event.key)) {\n const target = event.target as HTMLElement;\n const targetIsSubTrigger = target.hasAttribute('data-radix-menubar-subtrigger');\n const isKeyDownInsideSubMenu =\n target.closest('[data-radix-menubar-content]') !== event.currentTarget;\n\n const prevMenuKey = context.dir === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n const isPrevKey = prevMenuKey === event.key;\n const isNextKey = !isPrevKey;\n\n // Prevent navigation when we're opening a submenu\n if (isNextKey && targetIsSubTrigger) return;\n // or we're inside a submenu and are moving backwards to close it\n if (isKeyDownInsideSubMenu && isPrevKey) return;\n\n const items = getItems().filter((item) => !item.disabled);\n let candidateValues = items.map((item) => item.value);\n if (isPrevKey) candidateValues.reverse();\n\n const currentIndex = candidateValues.indexOf(menuContext.value);\n\n candidateValues = context.loop\n ? wrapArray(candidateValues, currentIndex + 1)\n : candidateValues.slice(currentIndex + 1);\n\n const [nextValue] = candidateValues;\n if (nextValue) context.onMenuOpen(nextValue);\n }\n },\n { checkForDefaultPrevented: false }\n )}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-menubar-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-menubar-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-menubar-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-menubar-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-menubar-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n }\n);\n\nMenubarContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'MenubarGroup';\n\ntype MenubarGroupElement = React.ComponentRef;\ntype MenuGroupProps = React.ComponentPropsWithoutRef;\ninterface MenubarGroupProps extends MenuGroupProps {}\n\nconst MenubarGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'MenubarLabel';\n\ntype MenubarLabelElement = React.ComponentRef;\ntype MenuLabelProps = React.ComponentPropsWithoutRef;\ninterface MenubarLabelProps extends MenuLabelProps {}\n\nconst MenubarLabel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'MenubarItem';\n\ntype MenubarItemElement = React.ComponentRef;\ntype MenuItemProps = React.ComponentPropsWithoutRef;\ninterface MenubarItemProps extends MenuItemProps {}\n\nconst MenubarItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'MenubarCheckboxItem';\n\ntype MenubarCheckboxItemElement = React.ComponentRef;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef;\ninterface MenubarCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst MenubarCheckboxItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'MenubarRadioGroup';\n\ntype MenubarRadioGroupElement = React.ComponentRef;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef;\ninterface MenubarRadioGroupProps extends MenuRadioGroupProps {}\n\nconst MenubarRadioGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'MenubarRadioItem';\n\ntype MenubarRadioItemElement = React.ComponentRef;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef;\ninterface MenubarRadioItemProps extends MenuRadioItemProps {}\n\nconst MenubarRadioItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'MenubarItemIndicator';\n\ntype MenubarItemIndicatorElement = React.ComponentRef;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef;\ninterface MenubarItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst MenubarItemIndicator = React.forwardRef<\n MenubarItemIndicatorElement,\n MenubarItemIndicatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n});\n\nMenubarItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'MenubarSeparator';\n\ntype MenubarSeparatorElement = React.ComponentRef;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef;\ninterface MenubarSeparatorProps extends MenuSeparatorProps {}\n\nconst MenubarSeparator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'MenubarArrow';\n\ntype MenubarArrowElement = React.ComponentRef;\ntype MenuArrowProps = React.ComponentPropsWithoutRef;\ninterface MenubarArrowProps extends MenuArrowProps {}\n\nconst MenubarArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'MenubarSub';\n\ninterface MenubarSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst MenubarSub: React.FC = (props: ScopedProps) => {\n const { __scopeMenubar, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: SUB_NAME,\n });\n\n return (\n \n {children}\n \n );\n};\n\nMenubarSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'MenubarSubTrigger';\n\ntype MenubarSubTriggerElement = React.ComponentRef;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef;\ninterface MenubarSubTriggerProps extends MenuSubTriggerProps {}\n\nconst MenubarSubTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return (\n \n );\n }\n);\n\nMenubarSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'MenubarSubContent';\n\ntype MenubarSubContentElement = React.ComponentRef;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef;\ninterface MenubarSubContentProps extends MenuSubContentProps {}\n\nconst MenubarSubContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n\n return (\n \n );\n }\n);\n\nMenubarSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray(array: T[], startIndex: number) {\n return array.map((_, index) => array[(startIndex + index) % array.length]!);\n}\n\nconst Root = Menubar;\nconst Menu = MenubarMenu;\nconst Trigger = MenubarTrigger;\nconst Portal = MenubarPortal;\nconst Content = MenubarContent;\nconst Group = MenubarGroup;\nconst Label = MenubarLabel;\nconst Item = MenubarItem;\nconst CheckboxItem = MenubarCheckboxItem;\nconst RadioGroup = MenubarRadioGroup;\nconst RadioItem = MenubarRadioItem;\nconst ItemIndicator = MenubarItemIndicator;\nconst Separator = MenubarSeparator;\nconst Arrow = MenubarArrow;\nconst Sub = MenubarSub;\nconst SubTrigger = MenubarSubTrigger;\nconst SubContent = MenubarSubContent;\n\nexport {\n createMenubarScope,\n //\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarPortal,\n MenubarContent,\n MenubarGroup,\n MenubarLabel,\n MenubarItem,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarItemIndicator,\n MenubarSeparator,\n MenubarArrow,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n //\n Root,\n Menu,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n MenubarProps,\n MenubarMenuProps,\n MenubarTriggerProps,\n MenubarPortalProps,\n MenubarContentProps,\n MenubarGroupProps,\n MenubarLabelProps,\n MenubarItemProps,\n MenubarCheckboxItemProps,\n MenubarRadioGroupProps,\n MenubarRadioItemProps,\n MenubarItemIndicatorProps,\n MenubarSeparatorProps,\n MenubarArrowProps,\n MenubarSubProps,\n MenubarSubTriggerProps,\n MenubarSubContentProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA,oBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,iBAAAC;A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,aAAY;AAClB,IAAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;", + "names": ["Arrow", "CheckboxItem", "Content", "Group", "Item", "ItemIndicator", "Label", "Portal", "RadioGroup", "RadioItem", "Root", "Separator", "Sub", "SubContent", "SubTrigger", "value", "open", "Root", "Portal", "Content", "Group", "Label", "Item", "CheckboxItem", "RadioGroup", "RadioItem", "ItemIndicator", "Separator", "Arrow", "Sub", "SubTrigger", "SubContent"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2118076113a8bb89fda0e21d3e846027f15c341f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.mjs @@ -0,0 +1,470 @@ +"use client"; + +// src/menubar.tsx +import * as React from "react"; +import { createCollection } from "@radix-ui/react-collection"; +import { useDirection } from "@radix-ui/react-direction"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { createContextScope } from "@radix-ui/react-context"; +import { useId } from "@radix-ui/react-id"; +import * as MenuPrimitive from "@radix-ui/react-menu"; +import { createMenuScope } from "@radix-ui/react-menu"; +import * as RovingFocusGroup from "@radix-ui/react-roving-focus"; +import { createRovingFocusGroupScope } from "@radix-ui/react-roving-focus"; +import { Primitive } from "@radix-ui/react-primitive"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { jsx } from "react/jsx-runtime"; +var MENUBAR_NAME = "Menubar"; +var [Collection, useCollection, createCollectionScope] = createCollection(MENUBAR_NAME); +var [createMenubarContext, createMenubarScope] = createContextScope(MENUBAR_NAME, [ + createCollectionScope, + createRovingFocusGroupScope +]); +var useMenuScope = createMenuScope(); +var useRovingFocusGroupScope = createRovingFocusGroupScope(); +var [MenubarContextProvider, useMenubarContext] = createMenubarContext(MENUBAR_NAME); +var Menubar = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeMenubar, + value: valueProp, + onValueChange, + defaultValue, + loop = true, + dir, + ...menubarProps + } = props; + const direction = useDirection(dir); + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar); + const [value, setValue] = useControllableState({ + prop: valueProp, + onChange: onValueChange, + defaultProp: defaultValue ?? "", + caller: MENUBAR_NAME + }); + const [currentTabStopId, setCurrentTabStopId] = React.useState(null); + return /* @__PURE__ */ jsx( + MenubarContextProvider, + { + scope: __scopeMenubar, + value, + onMenuOpen: React.useCallback( + (value2) => { + setValue(value2); + setCurrentTabStopId(value2); + }, + [setValue] + ), + onMenuClose: React.useCallback(() => setValue(""), [setValue]), + onMenuToggle: React.useCallback( + (value2) => { + setValue((prevValue) => prevValue ? "" : value2); + setCurrentTabStopId(value2); + }, + [setValue] + ), + dir: direction, + loop, + children: /* @__PURE__ */ jsx(Collection.Provider, { scope: __scopeMenubar, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeMenubar, children: /* @__PURE__ */ jsx( + RovingFocusGroup.Root, + { + asChild: true, + ...rovingFocusGroupScope, + orientation: "horizontal", + loop, + dir: direction, + currentTabStopId, + onCurrentTabStopIdChange: setCurrentTabStopId, + children: /* @__PURE__ */ jsx(Primitive.div, { role: "menubar", ...menubarProps, ref: forwardedRef }) + } + ) }) }) + } + ); + } +); +Menubar.displayName = MENUBAR_NAME; +var MENU_NAME = "MenubarMenu"; +var [MenubarMenuProvider, useMenubarMenuContext] = createMenubarContext(MENU_NAME); +var MenubarMenu = (props) => { + const { __scopeMenubar, value: valueProp, ...menuProps } = props; + const autoValue = useId(); + const value = valueProp || autoValue || "LEGACY_REACT_AUTO_VALUE"; + const context = useMenubarContext(MENU_NAME, __scopeMenubar); + const menuScope = useMenuScope(__scopeMenubar); + const triggerRef = React.useRef(null); + const wasKeyboardTriggerOpenRef = React.useRef(false); + const open = context.value === value; + React.useEffect(() => { + if (!open) wasKeyboardTriggerOpenRef.current = false; + }, [open]); + return /* @__PURE__ */ jsx( + MenubarMenuProvider, + { + scope: __scopeMenubar, + value, + triggerId: useId(), + triggerRef, + contentId: useId(), + wasKeyboardTriggerOpenRef, + children: /* @__PURE__ */ jsx( + MenuPrimitive.Root, + { + ...menuScope, + open, + onOpenChange: (open2) => { + if (!open2) context.onMenuClose(); + }, + modal: false, + dir: context.dir, + ...menuProps + } + ) + } + ); +}; +MenubarMenu.displayName = MENU_NAME; +var TRIGGER_NAME = "MenubarTrigger"; +var MenubarTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, disabled = false, ...triggerProps } = props; + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar); + const menuScope = useMenuScope(__scopeMenubar); + const context = useMenubarContext(TRIGGER_NAME, __scopeMenubar); + const menuContext = useMenubarMenuContext(TRIGGER_NAME, __scopeMenubar); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref, menuContext.triggerRef); + const [isFocused, setIsFocused] = React.useState(false); + const open = context.value === menuContext.value; + return /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeMenubar, value: menuContext.value, disabled, children: /* @__PURE__ */ jsx( + RovingFocusGroup.Item, + { + asChild: true, + ...rovingFocusGroupScope, + focusable: !disabled, + tabStopId: menuContext.value, + children: /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + role: "menuitem", + id: menuContext.triggerId, + "aria-haspopup": "menu", + "aria-expanded": open, + "aria-controls": open ? menuContext.contentId : void 0, + "data-highlighted": isFocused ? "" : void 0, + "data-state": open ? "open" : "closed", + "data-disabled": disabled ? "" : void 0, + disabled, + ...triggerProps, + ref: composedRefs, + onPointerDown: composeEventHandlers(props.onPointerDown, (event) => { + if (!disabled && event.button === 0 && event.ctrlKey === false) { + context.onMenuOpen(menuContext.value); + if (!open) event.preventDefault(); + } + }), + onPointerEnter: composeEventHandlers(props.onPointerEnter, () => { + const menubarOpen = Boolean(context.value); + if (menubarOpen && !open) { + context.onMenuOpen(menuContext.value); + ref.current?.focus(); + } + }), + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + if (disabled) return; + if (["Enter", " "].includes(event.key)) context.onMenuToggle(menuContext.value); + if (event.key === "ArrowDown") context.onMenuOpen(menuContext.value); + if (["Enter", " ", "ArrowDown"].includes(event.key)) { + menuContext.wasKeyboardTriggerOpenRef.current = true; + event.preventDefault(); + } + }), + onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)), + onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false)) + } + ) }) + } + ) }); + } +); +MenubarTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "MenubarPortal"; +var MenubarPortal = (props) => { + const { __scopeMenubar, ...portalProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps }); +}; +MenubarPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "MenubarContent"; +var MenubarContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, align = "start", ...contentProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + const context = useMenubarContext(CONTENT_NAME, __scopeMenubar); + const menuContext = useMenubarMenuContext(CONTENT_NAME, __scopeMenubar); + const getItems = useCollection(__scopeMenubar); + const hasInteractedOutsideRef = React.useRef(false); + return /* @__PURE__ */ jsx( + MenuPrimitive.Content, + { + id: menuContext.contentId, + "aria-labelledby": menuContext.triggerId, + "data-radix-menubar-content": "", + ...menuScope, + ...contentProps, + ref: forwardedRef, + align, + onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => { + const menubarOpen = Boolean(context.value); + if (!menubarOpen && !hasInteractedOutsideRef.current) { + menuContext.triggerRef.current?.focus(); + } + hasInteractedOutsideRef.current = false; + event.preventDefault(); + }), + onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => { + const target = event.target; + const isMenubarTrigger = getItems().some((item) => item.ref.current?.contains(target)); + if (isMenubarTrigger) event.preventDefault(); + }), + onInteractOutside: composeEventHandlers(props.onInteractOutside, () => { + hasInteractedOutsideRef.current = true; + }), + onEntryFocus: (event) => { + if (!menuContext.wasKeyboardTriggerOpenRef.current) event.preventDefault(); + }, + onKeyDown: composeEventHandlers( + props.onKeyDown, + (event) => { + if (["ArrowRight", "ArrowLeft"].includes(event.key)) { + const target = event.target; + const targetIsSubTrigger = target.hasAttribute("data-radix-menubar-subtrigger"); + const isKeyDownInsideSubMenu = target.closest("[data-radix-menubar-content]") !== event.currentTarget; + const prevMenuKey = context.dir === "rtl" ? "ArrowRight" : "ArrowLeft"; + const isPrevKey = prevMenuKey === event.key; + const isNextKey = !isPrevKey; + if (isNextKey && targetIsSubTrigger) return; + if (isKeyDownInsideSubMenu && isPrevKey) return; + const items = getItems().filter((item) => !item.disabled); + let candidateValues = items.map((item) => item.value); + if (isPrevKey) candidateValues.reverse(); + const currentIndex = candidateValues.indexOf(menuContext.value); + candidateValues = context.loop ? wrapArray(candidateValues, currentIndex + 1) : candidateValues.slice(currentIndex + 1); + const [nextValue] = candidateValues; + if (nextValue) context.onMenuOpen(nextValue); + } + }, + { checkForDefaultPrevented: false } + ), + style: { + ...props.style, + // re-namespace exposed content custom properties + ...{ + "--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-menubar-content-available-width": "var(--radix-popper-available-width)", + "--radix-menubar-content-available-height": "var(--radix-popper-available-height)", + "--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); + } +); +MenubarContent.displayName = CONTENT_NAME; +var GROUP_NAME = "MenubarGroup"; +var MenubarGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...groupProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef }); + } +); +MenubarGroup.displayName = GROUP_NAME; +var LABEL_NAME = "MenubarLabel"; +var MenubarLabel = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...labelProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef }); + } +); +MenubarLabel.displayName = LABEL_NAME; +var ITEM_NAME = "MenubarItem"; +var MenubarItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...itemProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef }); + } +); +MenubarItem.displayName = ITEM_NAME; +var CHECKBOX_ITEM_NAME = "MenubarCheckboxItem"; +var MenubarCheckboxItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...checkboxItemProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef }); + } +); +MenubarCheckboxItem.displayName = CHECKBOX_ITEM_NAME; +var RADIO_GROUP_NAME = "MenubarRadioGroup"; +var MenubarRadioGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...radioGroupProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef }); + } +); +MenubarRadioGroup.displayName = RADIO_GROUP_NAME; +var RADIO_ITEM_NAME = "MenubarRadioItem"; +var MenubarRadioItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...radioItemProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef }); + } +); +MenubarRadioItem.displayName = RADIO_ITEM_NAME; +var INDICATOR_NAME = "MenubarItemIndicator"; +var MenubarItemIndicator = React.forwardRef((props, forwardedRef) => { + const { __scopeMenubar, ...itemIndicatorProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef }); +}); +MenubarItemIndicator.displayName = INDICATOR_NAME; +var SEPARATOR_NAME = "MenubarSeparator"; +var MenubarSeparator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...separatorProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef }); + } +); +MenubarSeparator.displayName = SEPARATOR_NAME; +var ARROW_NAME = "MenubarArrow"; +var MenubarArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...arrowProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef }); + } +); +MenubarArrow.displayName = ARROW_NAME; +var SUB_NAME = "MenubarSub"; +var MenubarSub = (props) => { + const { __scopeMenubar, children, open: openProp, onOpenChange, defaultOpen } = props; + const menuScope = useMenuScope(__scopeMenubar); + const [open, setOpen] = useControllableState({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: SUB_NAME + }); + return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children }); +}; +MenubarSub.displayName = SUB_NAME; +var SUB_TRIGGER_NAME = "MenubarSubTrigger"; +var MenubarSubTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...subTriggerProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx( + MenuPrimitive.SubTrigger, + { + "data-radix-menubar-subtrigger": "", + ...menuScope, + ...subTriggerProps, + ref: forwardedRef + } + ); + } +); +MenubarSubTrigger.displayName = SUB_TRIGGER_NAME; +var SUB_CONTENT_NAME = "MenubarSubContent"; +var MenubarSubContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeMenubar, ...subContentProps } = props; + const menuScope = useMenuScope(__scopeMenubar); + return /* @__PURE__ */ jsx( + MenuPrimitive.SubContent, + { + ...menuScope, + "data-radix-menubar-content": "", + ...subContentProps, + ref: forwardedRef, + style: { + ...props.style, + // re-namespace exposed content custom properties + ...{ + "--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-menubar-content-available-width": "var(--radix-popper-available-width)", + "--radix-menubar-content-available-height": "var(--radix-popper-available-height)", + "--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); + } +); +MenubarSubContent.displayName = SUB_CONTENT_NAME; +function wrapArray(array, startIndex) { + return array.map((_, index) => array[(startIndex + index) % array.length]); +} +var Root3 = Menubar; +var Menu = MenubarMenu; +var Trigger = MenubarTrigger; +var Portal2 = MenubarPortal; +var Content2 = MenubarContent; +var Group2 = MenubarGroup; +var Label2 = MenubarLabel; +var Item3 = MenubarItem; +var CheckboxItem2 = MenubarCheckboxItem; +var RadioGroup2 = MenubarRadioGroup; +var RadioItem2 = MenubarRadioItem; +var ItemIndicator2 = MenubarItemIndicator; +var Separator2 = MenubarSeparator; +var Arrow2 = MenubarArrow; +var Sub2 = MenubarSub; +var SubTrigger2 = MenubarSubTrigger; +var SubContent2 = MenubarSubContent; +export { + Arrow2 as Arrow, + CheckboxItem2 as CheckboxItem, + Content2 as Content, + Group2 as Group, + Item3 as Item, + ItemIndicator2 as ItemIndicator, + Label2 as Label, + Menu, + Menubar, + MenubarArrow, + MenubarCheckboxItem, + MenubarContent, + MenubarGroup, + MenubarItem, + MenubarItemIndicator, + MenubarLabel, + MenubarMenu, + MenubarPortal, + MenubarRadioGroup, + MenubarRadioItem, + MenubarSeparator, + MenubarSub, + MenubarSubContent, + MenubarSubTrigger, + MenubarTrigger, + Portal2 as Portal, + RadioGroup2 as RadioGroup, + RadioItem2 as RadioItem, + Root3 as Root, + Separator2 as Separator, + Sub2 as Sub, + SubContent2 as SubContent, + SubTrigger2 as SubTrigger, + Trigger, + createMenubarScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..9ed05e2c8176683537f0bdfefe4ee85e68c5ebd1 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/menubar.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * Menubar\n * -----------------------------------------------------------------------------------------------*/\n\nconst MENUBAR_NAME = 'Menubar';\n\ntype ItemData = { value: string; disabled: boolean };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n MenubarTriggerElement,\n ItemData\n>(MENUBAR_NAME);\n\ntype ScopedProps

= P & { __scopeMenubar?: Scope };\nconst [createMenubarContext, createMenubarScope] = createContextScope(MENUBAR_NAME, [\n createCollectionScope,\n createRovingFocusGroupScope,\n]);\n\nconst useMenuScope = createMenuScope();\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\n\ntype MenubarContextValue = {\n value: string;\n dir: Direction;\n loop: boolean;\n onMenuOpen(value: string): void;\n onMenuClose(): void;\n onMenuToggle(value: string): void;\n};\n\nconst [MenubarContextProvider, useMenubarContext] =\n createMenubarContext(MENUBAR_NAME);\n\ntype MenubarElement = React.ComponentRef;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface MenubarProps extends PrimitiveDivProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n loop?: RovingFocusGroupProps['loop'];\n dir?: RovingFocusGroupProps['dir'];\n}\n\nconst Menubar = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeMenubar,\n value: valueProp,\n onValueChange,\n defaultValue,\n loop = true,\n dir,\n ...menubarProps\n } = props;\n const direction = useDirection(dir);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? '',\n caller: MENUBAR_NAME,\n });\n\n // We need to manage tab stop id manually as `RovingFocusGroup` updates the stop\n // based on focus, and in some situations our triggers won't ever be given focus\n // (e.g. click to open and then outside to close)\n const [currentTabStopId, setCurrentTabStopId] = React.useState(null);\n\n return (\n {\n setValue(value);\n setCurrentTabStopId(value);\n },\n [setValue]\n )}\n onMenuClose={React.useCallback(() => setValue(''), [setValue])}\n onMenuToggle={React.useCallback(\n (value) => {\n setValue((prevValue) => (prevValue ? '' : value));\n // `openMenuOpen` and `onMenuToggle` are called exclusively so we\n // need to update the id in either case.\n setCurrentTabStopId(value);\n },\n [setValue]\n )}\n dir={direction}\n loop={loop}\n >\n \n \n \n \n \n \n \n \n );\n }\n);\n\nMenubar.displayName = MENUBAR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst MENU_NAME = 'MenubarMenu';\n\ntype MenubarMenuContextValue = {\n value: string;\n triggerId: string;\n triggerRef: React.RefObject;\n contentId: string;\n wasKeyboardTriggerOpenRef: React.MutableRefObject;\n};\n\nconst [MenubarMenuProvider, useMenubarMenuContext] =\n createMenubarContext(MENU_NAME);\n\ninterface MenubarMenuProps {\n value?: string;\n children?: React.ReactNode;\n}\n\nconst MenubarMenu = (props: ScopedProps) => {\n const { __scopeMenubar, value: valueProp, ...menuProps } = props;\n const autoValue = useId();\n // We need to provide an initial deterministic value as `useId` will return\n // empty string on the first render and we don't want to match our internal \"closed\" value.\n const value = valueProp || autoValue || 'LEGACY_REACT_AUTO_VALUE';\n const context = useMenubarContext(MENU_NAME, __scopeMenubar);\n const menuScope = useMenuScope(__scopeMenubar);\n const triggerRef = React.useRef(null);\n const wasKeyboardTriggerOpenRef = React.useRef(false);\n const open = context.value === value;\n\n React.useEffect(() => {\n if (!open) wasKeyboardTriggerOpenRef.current = false;\n }, [open]);\n\n return (\n \n {\n // Menu only calls `onOpenChange` when dismissing so we\n // want to close our MenuBar based on the same events.\n if (!open) context.onMenuClose();\n }}\n modal={false}\n dir={context.dir}\n {...menuProps}\n />\n \n );\n};\n\nMenubarMenu.displayName = MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'MenubarTrigger';\n\ntype MenubarTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface MenubarTriggerProps extends PrimitiveButtonProps {}\n\nconst MenubarTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, disabled = false, ...triggerProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);\n const menuScope = useMenuScope(__scopeMenubar);\n const context = useMenubarContext(TRIGGER_NAME, __scopeMenubar);\n const menuContext = useMenubarMenuContext(TRIGGER_NAME, __scopeMenubar);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, menuContext.triggerRef);\n const [isFocused, setIsFocused] = React.useState(false);\n const open = context.value === menuContext.value;\n\n return (\n \n \n \n {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onMenuOpen(menuContext.value);\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n if (!open) event.preventDefault();\n }\n })}\n onPointerEnter={composeEventHandlers(props.onPointerEnter, () => {\n const menubarOpen = Boolean(context.value);\n if (menubarOpen && !open) {\n context.onMenuOpen(menuContext.value);\n ref.current?.focus();\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if (['Enter', ' '].includes(event.key)) context.onMenuToggle(menuContext.value);\n if (event.key === 'ArrowDown') context.onMenuOpen(menuContext.value);\n // prevent keydown from scrolling window / first focused item to execute\n // that keydown (inadvertently closing the menu)\n if (['Enter', ' ', 'ArrowDown'].includes(event.key)) {\n menuContext.wasKeyboardTriggerOpenRef.current = true;\n event.preventDefault();\n }\n })}\n onFocus={composeEventHandlers(props.onFocus, () => setIsFocused(true))}\n onBlur={composeEventHandlers(props.onBlur, () => setIsFocused(false))}\n />\n \n \n \n );\n }\n);\n\nMenubarTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'MenubarPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef;\ninterface MenubarPortalProps extends MenuPortalProps {}\n\nconst MenubarPortal: React.FC = (props: ScopedProps) => {\n const { __scopeMenubar, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n};\n\nMenubarPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'MenubarContent';\n\ntype MenubarContentElement = React.ComponentRef;\ntype MenuContentProps = React.ComponentPropsWithoutRef;\ninterface MenubarContentProps extends Omit {}\n\nconst MenubarContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, align = 'start', ...contentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n const context = useMenubarContext(CONTENT_NAME, __scopeMenubar);\n const menuContext = useMenubarMenuContext(CONTENT_NAME, __scopeMenubar);\n const getItems = useCollection(__scopeMenubar);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n {\n const menubarOpen = Boolean(context.value);\n if (!menubarOpen && !hasInteractedOutsideRef.current) {\n menuContext.triggerRef.current?.focus();\n }\n\n hasInteractedOutsideRef.current = false;\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n })}\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) => {\n const target = event.target as HTMLElement;\n const isMenubarTrigger = getItems().some((item) => item.ref.current?.contains(target));\n if (isMenubarTrigger) event.preventDefault();\n })}\n onInteractOutside={composeEventHandlers(props.onInteractOutside, () => {\n hasInteractedOutsideRef.current = true;\n })}\n onEntryFocus={(event) => {\n if (!menuContext.wasKeyboardTriggerOpenRef.current) event.preventDefault();\n }}\n onKeyDown={composeEventHandlers(\n props.onKeyDown,\n (event) => {\n if (['ArrowRight', 'ArrowLeft'].includes(event.key)) {\n const target = event.target as HTMLElement;\n const targetIsSubTrigger = target.hasAttribute('data-radix-menubar-subtrigger');\n const isKeyDownInsideSubMenu =\n target.closest('[data-radix-menubar-content]') !== event.currentTarget;\n\n const prevMenuKey = context.dir === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n const isPrevKey = prevMenuKey === event.key;\n const isNextKey = !isPrevKey;\n\n // Prevent navigation when we're opening a submenu\n if (isNextKey && targetIsSubTrigger) return;\n // or we're inside a submenu and are moving backwards to close it\n if (isKeyDownInsideSubMenu && isPrevKey) return;\n\n const items = getItems().filter((item) => !item.disabled);\n let candidateValues = items.map((item) => item.value);\n if (isPrevKey) candidateValues.reverse();\n\n const currentIndex = candidateValues.indexOf(menuContext.value);\n\n candidateValues = context.loop\n ? wrapArray(candidateValues, currentIndex + 1)\n : candidateValues.slice(currentIndex + 1);\n\n const [nextValue] = candidateValues;\n if (nextValue) context.onMenuOpen(nextValue);\n }\n },\n { checkForDefaultPrevented: false }\n )}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-menubar-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-menubar-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-menubar-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-menubar-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-menubar-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n }\n);\n\nMenubarContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'MenubarGroup';\n\ntype MenubarGroupElement = React.ComponentRef;\ntype MenuGroupProps = React.ComponentPropsWithoutRef;\ninterface MenubarGroupProps extends MenuGroupProps {}\n\nconst MenubarGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'MenubarLabel';\n\ntype MenubarLabelElement = React.ComponentRef;\ntype MenuLabelProps = React.ComponentPropsWithoutRef;\ninterface MenubarLabelProps extends MenuLabelProps {}\n\nconst MenubarLabel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'MenubarItem';\n\ntype MenubarItemElement = React.ComponentRef;\ntype MenuItemProps = React.ComponentPropsWithoutRef;\ninterface MenubarItemProps extends MenuItemProps {}\n\nconst MenubarItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'MenubarCheckboxItem';\n\ntype MenubarCheckboxItemElement = React.ComponentRef;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef;\ninterface MenubarCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst MenubarCheckboxItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'MenubarRadioGroup';\n\ntype MenubarRadioGroupElement = React.ComponentRef;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef;\ninterface MenubarRadioGroupProps extends MenuRadioGroupProps {}\n\nconst MenubarRadioGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'MenubarRadioItem';\n\ntype MenubarRadioItemElement = React.ComponentRef;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef;\ninterface MenubarRadioItemProps extends MenuRadioItemProps {}\n\nconst MenubarRadioItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'MenubarItemIndicator';\n\ntype MenubarItemIndicatorElement = React.ComponentRef;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef;\ninterface MenubarItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst MenubarItemIndicator = React.forwardRef<\n MenubarItemIndicatorElement,\n MenubarItemIndicatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n});\n\nMenubarItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'MenubarSeparator';\n\ntype MenubarSeparatorElement = React.ComponentRef;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef;\ninterface MenubarSeparatorProps extends MenuSeparatorProps {}\n\nconst MenubarSeparator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'MenubarArrow';\n\ntype MenubarArrowElement = React.ComponentRef;\ntype MenuArrowProps = React.ComponentPropsWithoutRef;\ninterface MenubarArrowProps extends MenuArrowProps {}\n\nconst MenubarArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'MenubarSub';\n\ninterface MenubarSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst MenubarSub: React.FC = (props: ScopedProps) => {\n const { __scopeMenubar, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: SUB_NAME,\n });\n\n return (\n \n {children}\n \n );\n};\n\nMenubarSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'MenubarSubTrigger';\n\ntype MenubarSubTriggerElement = React.ComponentRef;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef;\ninterface MenubarSubTriggerProps extends MenuSubTriggerProps {}\n\nconst MenubarSubTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return (\n \n );\n }\n);\n\nMenubarSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'MenubarSubContent';\n\ntype MenubarSubContentElement = React.ComponentRef;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef;\ninterface MenubarSubContentProps extends MenuSubContentProps {}\n\nconst MenubarSubContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n\n return (\n \n );\n }\n);\n\nMenubarSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray(array: T[], startIndex: number) {\n return array.map((_, index) => array[(startIndex + index) % array.length]!);\n}\n\nconst Root = Menubar;\nconst Menu = MenubarMenu;\nconst Trigger = MenubarTrigger;\nconst Portal = MenubarPortal;\nconst Content = MenubarContent;\nconst Group = MenubarGroup;\nconst Label = MenubarLabel;\nconst Item = MenubarItem;\nconst CheckboxItem = MenubarCheckboxItem;\nconst RadioGroup = MenubarRadioGroup;\nconst RadioItem = MenubarRadioItem;\nconst ItemIndicator = MenubarItemIndicator;\nconst Separator = MenubarSeparator;\nconst Arrow = MenubarArrow;\nconst Sub = MenubarSub;\nconst SubTrigger = MenubarSubTrigger;\nconst SubContent = MenubarSubContent;\n\nexport {\n createMenubarScope,\n //\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarPortal,\n MenubarContent,\n MenubarGroup,\n MenubarLabel,\n MenubarItem,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarItemIndicator,\n MenubarSeparator,\n MenubarArrow,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n //\n Root,\n Menu,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n MenubarProps,\n MenubarMenuProps,\n MenubarTriggerProps,\n MenubarPortalProps,\n MenubarContentProps,\n MenubarGroupProps,\n MenubarLabelProps,\n MenubarItemProps,\n MenubarCheckboxItemProps,\n MenubarRadioGroupProps,\n MenubarRadioItemProps,\n MenubarItemIndicatorProps,\n MenubarSeparatorProps,\n MenubarArrowProps,\n MenubarSubProps,\n MenubarSubTriggerProps,\n MenubarSubContentProps,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;AAC7B,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,aAAa;AACtB,YAAY,mBAAmB;AAC/B,SAAS,uBAAuB;AAChC,YAAY,sBAAsB;AAClC,SAAS,mCAAmC;AAC5C,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;AA8GvB;AApGd,IAAM,eAAe;AAGrB,IAAM,CAAC,YAAY,eAAe,qBAAqB,IAAI,iBAGzD,YAAY;AAGd,IAAM,CAAC,sBAAsB,kBAAkB,IAAI,mBAAmB,cAAc;AAAA,EAClF;AAAA,EACA;AACF,CAAC;AAED,IAAM,eAAe,gBAAgB;AACrC,IAAM,2BAA2B,4BAA4B;AAW7D,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AAA,QACJ,8BAA2B;AAAA,QAC1B,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,OAAO;AAAA,UACL,GAAG,MAAM;AAAA;AAAA,UAET,GAAG;AAAA,YACD,4CAA4C;AAAA,YAC5C,2CAA2C;AAAA,YAC3C,4CAA4C;AAAA,YAC5C,iCAAiC;AAAA,YACjC,kCAAkC;AAAA,UACpC;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;AAQhC,SAAS,UAAa,OAAY,YAAoB;AACpD,SAAO,MAAM,IAAO,CAAC,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,MAAM,CAAE;AAC/E;AAEA,IAAMC,QAAO;AACb,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;AACd,IAAMC,SAAQ;AACd,IAAMC,QAAO;AACb,IAAMC,gBAAe;AACrB,IAAMC,cAAa;AACnB,IAAMC,aAAY;AAClB,IAAMC,iBAAgB;AACtB,IAAMC,aAAY;AAClB,IAAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;", + "names": ["value", "open", "Root", "Portal", "Content", "Group", "Label", "Item", "CheckboxItem", "RadioGroup", "RadioItem", "ItemIndicator", "Separator", "Arrow", "Sub", "SubTrigger", "SubContent"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/package.json b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9ed3bdd9beda309551d0885fbc7b1436f6ba1b64 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-menubar@1.1.16_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_03219e9b353bb0f2b805a70f7b9e2618/node_modules/@radix-ui/react-menubar/package.json @@ -0,0 +1,78 @@ +{ + "name": "@radix-ui/react-menubar", + "version": "1.1.16", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-collection": "1.1.7", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-menu": "2.1.16", + "@radix-ui/react-roving-focus": "1.1.11", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/test-data": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/LICENSE b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/README.md b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ae8b266f069a4b81e29d22d5cbcce3ab40893654 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/README.md @@ -0,0 +1,3 @@ +# `react-navigation-menu` + +View docs [here](https://radix-ui.com/primitives/docs/components/navigation-menu). diff --git a/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..874b78eb5ffbbbc831d71ba032ec24d4dcfb0df5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.d.mts @@ -0,0 +1,126 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import { Scope } from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden'; + +type Orientation = 'vertical' | 'horizontal'; +type Direction = 'ltr' | 'rtl'; +declare const createNavigationMenuScope: _radix_ui_react_context.CreateScope; +type NavigationMenuElement = React.ComponentRef; +type PrimitiveNavProps = React.ComponentPropsWithoutRef; +interface NavigationMenuProps extends Omit, PrimitiveNavProps { + value?: string; + defaultValue?: string; + onValueChange?: (value: string) => void; + dir?: Direction; + orientation?: Orientation; + /** + * The duration from when the pointer enters the trigger until the tooltip gets opened. + * @defaultValue 200 + */ + delayDuration?: number; + /** + * How much time a user has to enter another trigger without incurring a delay again. + * @defaultValue 300 + */ + skipDelayDuration?: number; +} +declare const NavigationMenu: React.ForwardRefExoticComponent>; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface NavigationMenuSubProps extends Omit, PrimitiveDivProps { + value?: string; + defaultValue?: string; + onValueChange?: (value: string) => void; + orientation?: Orientation; +} +declare const NavigationMenuSub: React.ForwardRefExoticComponent>; +interface NavigationMenuProviderPrivateProps { + isRootMenu: boolean; + scope: Scope; + children: React.ReactNode; + orientation: Orientation; + dir: Direction; + rootNavigationMenu: NavigationMenuElement | null; + value: string; + onTriggerEnter(itemValue: string): void; + onTriggerLeave?(): void; + onContentEnter?(): void; + onContentLeave?(): void; + onItemSelect(itemValue: string): void; + onItemDismiss(): void; +} +interface NavigationMenuProviderProps extends NavigationMenuProviderPrivateProps { +} +type PrimitiveUnorderedListProps = React.ComponentPropsWithoutRef; +interface NavigationMenuListProps extends PrimitiveUnorderedListProps { +} +declare const NavigationMenuList: React.ForwardRefExoticComponent>; +type FocusProxyElement = React.ComponentRef; +type PrimitiveListItemProps = React.ComponentPropsWithoutRef; +interface NavigationMenuItemProps extends PrimitiveListItemProps { + value?: string; +} +declare const NavigationMenuItem: React.ForwardRefExoticComponent>; +type NavigationMenuTriggerElement = React.ComponentRef; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface NavigationMenuTriggerProps extends PrimitiveButtonProps { +} +declare const NavigationMenuTrigger: React.ForwardRefExoticComponent>; +type PrimitiveLinkProps = React.ComponentPropsWithoutRef; +interface NavigationMenuLinkProps extends Omit { + active?: boolean; + onSelect?: (event: Event) => void; +} +declare const NavigationMenuLink: React.ForwardRefExoticComponent>; +interface NavigationMenuIndicatorProps extends NavigationMenuIndicatorImplProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const NavigationMenuIndicator: React.ForwardRefExoticComponent>; +interface NavigationMenuIndicatorImplProps extends PrimitiveDivProps { +} +interface NavigationMenuContentProps extends Omit { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const NavigationMenuContent: React.ForwardRefExoticComponent>; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +interface NavigationMenuContentImplPrivateProps { + value: string; + triggerRef: React.RefObject; + focusProxyRef: React.RefObject; + wasEscapeCloseRef: React.MutableRefObject; + onContentFocusOutside(): void; + onRootContentClose(): void; +} +interface NavigationMenuContentImplProps extends Omit, NavigationMenuContentImplPrivateProps { +} +interface NavigationMenuViewportProps extends Omit { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const NavigationMenuViewport: React.ForwardRefExoticComponent>; +interface NavigationMenuViewportImplProps extends PrimitiveDivProps { +} +declare const Root: React.ForwardRefExoticComponent>; +declare const Sub: React.ForwardRefExoticComponent>; +declare const List: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Link: React.ForwardRefExoticComponent>; +declare const Indicator: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; +declare const Viewport: React.ForwardRefExoticComponent>; + +export { Content, Indicator, Item, Link, List, NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuIndicator, type NavigationMenuIndicatorProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, NavigationMenuList, type NavigationMenuListProps, type NavigationMenuProps, NavigationMenuSub, type NavigationMenuSubProps, NavigationMenuTrigger, type NavigationMenuTriggerProps, NavigationMenuViewport, type NavigationMenuViewportProps, Root, Sub, Trigger, Viewport, createNavigationMenuScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..874b78eb5ffbbbc831d71ba032ec24d4dcfb0df5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.d.ts @@ -0,0 +1,126 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import { Scope } from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden'; + +type Orientation = 'vertical' | 'horizontal'; +type Direction = 'ltr' | 'rtl'; +declare const createNavigationMenuScope: _radix_ui_react_context.CreateScope; +type NavigationMenuElement = React.ComponentRef; +type PrimitiveNavProps = React.ComponentPropsWithoutRef; +interface NavigationMenuProps extends Omit, PrimitiveNavProps { + value?: string; + defaultValue?: string; + onValueChange?: (value: string) => void; + dir?: Direction; + orientation?: Orientation; + /** + * The duration from when the pointer enters the trigger until the tooltip gets opened. + * @defaultValue 200 + */ + delayDuration?: number; + /** + * How much time a user has to enter another trigger without incurring a delay again. + * @defaultValue 300 + */ + skipDelayDuration?: number; +} +declare const NavigationMenu: React.ForwardRefExoticComponent>; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface NavigationMenuSubProps extends Omit, PrimitiveDivProps { + value?: string; + defaultValue?: string; + onValueChange?: (value: string) => void; + orientation?: Orientation; +} +declare const NavigationMenuSub: React.ForwardRefExoticComponent>; +interface NavigationMenuProviderPrivateProps { + isRootMenu: boolean; + scope: Scope; + children: React.ReactNode; + orientation: Orientation; + dir: Direction; + rootNavigationMenu: NavigationMenuElement | null; + value: string; + onTriggerEnter(itemValue: string): void; + onTriggerLeave?(): void; + onContentEnter?(): void; + onContentLeave?(): void; + onItemSelect(itemValue: string): void; + onItemDismiss(): void; +} +interface NavigationMenuProviderProps extends NavigationMenuProviderPrivateProps { +} +type PrimitiveUnorderedListProps = React.ComponentPropsWithoutRef; +interface NavigationMenuListProps extends PrimitiveUnorderedListProps { +} +declare const NavigationMenuList: React.ForwardRefExoticComponent>; +type FocusProxyElement = React.ComponentRef; +type PrimitiveListItemProps = React.ComponentPropsWithoutRef; +interface NavigationMenuItemProps extends PrimitiveListItemProps { + value?: string; +} +declare const NavigationMenuItem: React.ForwardRefExoticComponent>; +type NavigationMenuTriggerElement = React.ComponentRef; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface NavigationMenuTriggerProps extends PrimitiveButtonProps { +} +declare const NavigationMenuTrigger: React.ForwardRefExoticComponent>; +type PrimitiveLinkProps = React.ComponentPropsWithoutRef; +interface NavigationMenuLinkProps extends Omit { + active?: boolean; + onSelect?: (event: Event) => void; +} +declare const NavigationMenuLink: React.ForwardRefExoticComponent>; +interface NavigationMenuIndicatorProps extends NavigationMenuIndicatorImplProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const NavigationMenuIndicator: React.ForwardRefExoticComponent>; +interface NavigationMenuIndicatorImplProps extends PrimitiveDivProps { +} +interface NavigationMenuContentProps extends Omit { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const NavigationMenuContent: React.ForwardRefExoticComponent>; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +interface NavigationMenuContentImplPrivateProps { + value: string; + triggerRef: React.RefObject; + focusProxyRef: React.RefObject; + wasEscapeCloseRef: React.MutableRefObject; + onContentFocusOutside(): void; + onRootContentClose(): void; +} +interface NavigationMenuContentImplProps extends Omit, NavigationMenuContentImplPrivateProps { +} +interface NavigationMenuViewportProps extends Omit { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const NavigationMenuViewport: React.ForwardRefExoticComponent>; +interface NavigationMenuViewportImplProps extends PrimitiveDivProps { +} +declare const Root: React.ForwardRefExoticComponent>; +declare const Sub: React.ForwardRefExoticComponent>; +declare const List: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Link: React.ForwardRefExoticComponent>; +declare const Indicator: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; +declare const Viewport: React.ForwardRefExoticComponent>; + +export { Content, Indicator, Item, Link, List, NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuIndicator, type NavigationMenuIndicatorProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, NavigationMenuList, type NavigationMenuListProps, type NavigationMenuProps, NavigationMenuSub, type NavigationMenuSubProps, NavigationMenuTrigger, type NavigationMenuTriggerProps, NavigationMenuViewport, type NavigationMenuViewportProps, Root, Sub, Trigger, Viewport, createNavigationMenuScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.js b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..74b27be88f68fd7838f336e0b94e7cbc8a6d6202 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.js @@ -0,0 +1,838 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Content: () => Content, + Indicator: () => Indicator, + Item: () => Item, + Link: () => Link, + List: () => List, + NavigationMenu: () => NavigationMenu, + NavigationMenuContent: () => NavigationMenuContent, + NavigationMenuIndicator: () => NavigationMenuIndicator, + NavigationMenuItem: () => NavigationMenuItem, + NavigationMenuLink: () => NavigationMenuLink, + NavigationMenuList: () => NavigationMenuList, + NavigationMenuSub: () => NavigationMenuSub, + NavigationMenuTrigger: () => NavigationMenuTrigger, + NavigationMenuViewport: () => NavigationMenuViewport, + Root: () => Root2, + Sub: () => Sub, + Trigger: () => Trigger, + Viewport: () => Viewport, + createNavigationMenuScope: () => createNavigationMenuScope +}); +module.exports = __toCommonJS(index_exports); + +// src/navigation-menu.tsx +var React = __toESM(require("react")); +var import_react_dom = __toESM(require("react-dom")); +var import_react_context = require("@radix-ui/react-context"); +var import_primitive = require("@radix-ui/primitive"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_direction = require("@radix-ui/react-direction"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_id = require("@radix-ui/react-id"); +var import_react_collection = require("@radix-ui/react-collection"); +var import_react_dismissable_layer = require("@radix-ui/react-dismissable-layer"); +var import_react_use_previous = require("@radix-ui/react-use-previous"); +var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect"); +var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref"); +var VisuallyHiddenPrimitive = __toESM(require("@radix-ui/react-visually-hidden")); +var import_jsx_runtime = require("react/jsx-runtime"); +var NAVIGATION_MENU_NAME = "NavigationMenu"; +var [Collection, useCollection, createCollectionScope] = (0, import_react_collection.createCollection)(NAVIGATION_MENU_NAME); +var [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] = (0, import_react_collection.createCollection)(NAVIGATION_MENU_NAME); +var [createNavigationMenuContext, createNavigationMenuScope] = (0, import_react_context.createContextScope)( + NAVIGATION_MENU_NAME, + [createCollectionScope, createFocusGroupCollectionScope] +); +var [NavigationMenuProviderImpl, useNavigationMenuContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME); +var [ViewportContentProvider, useViewportContentContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME); +var NavigationMenu = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeNavigationMenu, + value: valueProp, + onValueChange, + defaultValue, + delayDuration = 200, + skipDelayDuration = 300, + orientation = "horizontal", + dir, + ...NavigationMenuProps + } = props; + const [navigationMenu, setNavigationMenu] = React.useState(null); + const composedRef = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setNavigationMenu(node)); + const direction = (0, import_react_direction.useDirection)(dir); + const openTimerRef = React.useRef(0); + const closeTimerRef = React.useRef(0); + const skipDelayTimerRef = React.useRef(0); + const [isOpenDelayed, setIsOpenDelayed] = React.useState(true); + const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({ + prop: valueProp, + onChange: (value2) => { + const isOpen = value2 !== ""; + const hasSkipDelayDuration = skipDelayDuration > 0; + if (isOpen) { + window.clearTimeout(skipDelayTimerRef.current); + if (hasSkipDelayDuration) setIsOpenDelayed(false); + } else { + window.clearTimeout(skipDelayTimerRef.current); + skipDelayTimerRef.current = window.setTimeout( + () => setIsOpenDelayed(true), + skipDelayDuration + ); + } + onValueChange?.(value2); + }, + defaultProp: defaultValue ?? "", + caller: NAVIGATION_MENU_NAME + }); + const startCloseTimer = React.useCallback(() => { + window.clearTimeout(closeTimerRef.current); + closeTimerRef.current = window.setTimeout(() => setValue(""), 150); + }, [setValue]); + const handleOpen = React.useCallback( + (itemValue) => { + window.clearTimeout(closeTimerRef.current); + setValue(itemValue); + }, + [setValue] + ); + const handleDelayedOpen = React.useCallback( + (itemValue) => { + const isOpenItem = value === itemValue; + if (isOpenItem) { + window.clearTimeout(closeTimerRef.current); + } else { + openTimerRef.current = window.setTimeout(() => { + window.clearTimeout(closeTimerRef.current); + setValue(itemValue); + }, delayDuration); + } + }, + [value, setValue, delayDuration] + ); + React.useEffect(() => { + return () => { + window.clearTimeout(openTimerRef.current); + window.clearTimeout(closeTimerRef.current); + window.clearTimeout(skipDelayTimerRef.current); + }; + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + NavigationMenuProvider, + { + scope: __scopeNavigationMenu, + isRootMenu: true, + value, + dir: direction, + orientation, + rootNavigationMenu: navigationMenu, + onTriggerEnter: (itemValue) => { + window.clearTimeout(openTimerRef.current); + if (isOpenDelayed) handleDelayedOpen(itemValue); + else handleOpen(itemValue); + }, + onTriggerLeave: () => { + window.clearTimeout(openTimerRef.current); + startCloseTimer(); + }, + onContentEnter: () => window.clearTimeout(closeTimerRef.current), + onContentLeave: startCloseTimer, + onItemSelect: (itemValue) => { + setValue((prevValue) => prevValue === itemValue ? "" : itemValue); + }, + onItemDismiss: () => setValue(""), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.nav, + { + "aria-label": "Main", + "data-orientation": orientation, + dir: direction, + ...NavigationMenuProps, + ref: composedRef + } + ) + } + ); + } +); +NavigationMenu.displayName = NAVIGATION_MENU_NAME; +var SUB_NAME = "NavigationMenuSub"; +var NavigationMenuSub = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeNavigationMenu, + value: valueProp, + onValueChange, + defaultValue, + orientation = "horizontal", + ...subProps + } = props; + const context = useNavigationMenuContext(SUB_NAME, __scopeNavigationMenu); + const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({ + prop: valueProp, + onChange: onValueChange, + defaultProp: defaultValue ?? "", + caller: SUB_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + NavigationMenuProvider, + { + scope: __scopeNavigationMenu, + isRootMenu: false, + value, + dir: context.dir, + orientation, + rootNavigationMenu: context.rootNavigationMenu, + onTriggerEnter: (itemValue) => setValue(itemValue), + onItemSelect: (itemValue) => setValue(itemValue), + onItemDismiss: () => setValue(""), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { "data-orientation": orientation, ...subProps, ref: forwardedRef }) + } + ); + } +); +NavigationMenuSub.displayName = SUB_NAME; +var NavigationMenuProvider = (props) => { + const { + scope, + isRootMenu, + rootNavigationMenu, + dir, + orientation, + children, + value, + onItemSelect, + onItemDismiss, + onTriggerEnter, + onTriggerLeave, + onContentEnter, + onContentLeave + } = props; + const [viewport, setViewport] = React.useState(null); + const [viewportContent, setViewportContent] = React.useState(/* @__PURE__ */ new Map()); + const [indicatorTrack, setIndicatorTrack] = React.useState(null); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + NavigationMenuProviderImpl, + { + scope, + isRootMenu, + rootNavigationMenu, + value, + previousValue: (0, import_react_use_previous.usePrevious)(value), + baseId: (0, import_react_id.useId)(), + dir, + orientation, + viewport, + onViewportChange: setViewport, + indicatorTrack, + onIndicatorTrackChange: setIndicatorTrack, + onTriggerEnter: (0, import_react_use_callback_ref.useCallbackRef)(onTriggerEnter), + onTriggerLeave: (0, import_react_use_callback_ref.useCallbackRef)(onTriggerLeave), + onContentEnter: (0, import_react_use_callback_ref.useCallbackRef)(onContentEnter), + onContentLeave: (0, import_react_use_callback_ref.useCallbackRef)(onContentLeave), + onItemSelect: (0, import_react_use_callback_ref.useCallbackRef)(onItemSelect), + onItemDismiss: (0, import_react_use_callback_ref.useCallbackRef)(onItemDismiss), + onViewportContentChange: React.useCallback((contentValue, contentData) => { + setViewportContent((prevContent) => { + prevContent.set(contentValue, contentData); + return new Map(prevContent); + }); + }, []), + onViewportContentRemove: React.useCallback((contentValue) => { + setViewportContent((prevContent) => { + if (!prevContent.has(contentValue)) return prevContent; + prevContent.delete(contentValue); + return new Map(prevContent); + }); + }, []), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, { scope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ViewportContentProvider, { scope, items: viewportContent, children }) }) + } + ); +}; +var LIST_NAME = "NavigationMenuList"; +var NavigationMenuList = React.forwardRef( + (props, forwardedRef) => { + const { __scopeNavigationMenu, ...listProps } = props; + const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu); + const list = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.ul, { "data-orientation": context.orientation, ...listProps, ref: forwardedRef }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { style: { position: "relative" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FocusGroup, { asChild: true, children: list }) : list }) }); + } +); +NavigationMenuList.displayName = LIST_NAME; +var ITEM_NAME = "NavigationMenuItem"; +var [NavigationMenuItemContextProvider, useNavigationMenuItemContext] = createNavigationMenuContext(ITEM_NAME); +var NavigationMenuItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props; + const autoValue = (0, import_react_id.useId)(); + const value = valueProp || autoValue || "LEGACY_REACT_AUTO_VALUE"; + const contentRef = React.useRef(null); + const triggerRef = React.useRef(null); + const focusProxyRef = React.useRef(null); + const restoreContentTabOrderRef = React.useRef(() => { + }); + const wasEscapeCloseRef = React.useRef(false); + const handleContentEntry = React.useCallback((side = "start") => { + if (contentRef.current) { + restoreContentTabOrderRef.current(); + const candidates = getTabbableCandidates(contentRef.current); + if (candidates.length) focusFirst(side === "start" ? candidates : candidates.reverse()); + } + }, []); + const handleContentExit = React.useCallback(() => { + if (contentRef.current) { + const candidates = getTabbableCandidates(contentRef.current); + if (candidates.length) restoreContentTabOrderRef.current = removeFromTabOrder(candidates); + } + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + NavigationMenuItemContextProvider, + { + scope: __scopeNavigationMenu, + value, + triggerRef, + contentRef, + focusProxyRef, + wasEscapeCloseRef, + onEntryKeyDown: handleContentEntry, + onFocusProxyEnter: handleContentEntry, + onRootContentClose: handleContentExit, + onContentFocusOutside: handleContentExit, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.li, { ...itemProps, ref: forwardedRef }) + } + ); + } +); +NavigationMenuItem.displayName = ITEM_NAME; +var TRIGGER_NAME = "NavigationMenuTrigger"; +var NavigationMenuTrigger = React.forwardRef((props, forwardedRef) => { + const { __scopeNavigationMenu, disabled, ...triggerProps } = props; + const context = useNavigationMenuContext(TRIGGER_NAME, props.__scopeNavigationMenu); + const itemContext = useNavigationMenuItemContext(TRIGGER_NAME, props.__scopeNavigationMenu); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(ref, itemContext.triggerRef, forwardedRef); + const triggerId = makeTriggerId(context.baseId, itemContext.value); + const contentId = makeContentId(context.baseId, itemContext.value); + const hasPointerMoveOpenedRef = React.useRef(false); + const wasClickCloseRef = React.useRef(false); + const open = itemContext.value === context.value; + return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.ItemSlot, { scope: __scopeNavigationMenu, value: itemContext.value, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + id: triggerId, + disabled, + "data-disabled": disabled ? "" : void 0, + "data-state": getOpenState(open), + "aria-expanded": open, + "aria-controls": contentId, + ...triggerProps, + ref: composedRefs, + onPointerEnter: (0, import_primitive.composeEventHandlers)(props.onPointerEnter, () => { + wasClickCloseRef.current = false; + itemContext.wasEscapeCloseRef.current = false; + }), + onPointerMove: (0, import_primitive.composeEventHandlers)( + props.onPointerMove, + whenMouse(() => { + if (disabled || wasClickCloseRef.current || itemContext.wasEscapeCloseRef.current || hasPointerMoveOpenedRef.current) + return; + context.onTriggerEnter(itemContext.value); + hasPointerMoveOpenedRef.current = true; + }) + ), + onPointerLeave: (0, import_primitive.composeEventHandlers)( + props.onPointerLeave, + whenMouse(() => { + if (disabled) return; + context.onTriggerLeave(); + hasPointerMoveOpenedRef.current = false; + }) + ), + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, () => { + context.onItemSelect(itemContext.value); + wasClickCloseRef.current = open; + }), + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + const verticalEntryKey = context.dir === "rtl" ? "ArrowLeft" : "ArrowRight"; + const entryKey = { horizontal: "ArrowDown", vertical: verticalEntryKey }[context.orientation]; + if (open && event.key === entryKey) { + itemContext.onEntryKeyDown(); + event.preventDefault(); + } + }) + } + ) }) }), + open && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + VisuallyHiddenPrimitive.Root, + { + "aria-hidden": true, + tabIndex: 0, + ref: itemContext.focusProxyRef, + onFocus: (event) => { + const content = itemContext.contentRef.current; + const prevFocusedElement = event.relatedTarget; + const wasTriggerFocused = prevFocusedElement === ref.current; + const wasFocusFromContent = content?.contains(prevFocusedElement); + if (wasTriggerFocused || !wasFocusFromContent) { + itemContext.onFocusProxyEnter(wasTriggerFocused ? "start" : "end"); + } + } + } + ), + context.viewport && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-owns": contentId }) + ] }) + ] }); +}); +NavigationMenuTrigger.displayName = TRIGGER_NAME; +var LINK_NAME = "NavigationMenuLink"; +var LINK_SELECT = "navigationMenu.linkSelect"; +var NavigationMenuLink = React.forwardRef( + (props, forwardedRef) => { + const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.a, + { + "data-active": active ? "" : void 0, + "aria-current": active ? "page" : void 0, + ...linkProps, + ref: forwardedRef, + onClick: (0, import_primitive.composeEventHandlers)( + props.onClick, + (event) => { + const target = event.target; + const linkSelectEvent = new CustomEvent(LINK_SELECT, { + bubbles: true, + cancelable: true + }); + target.addEventListener(LINK_SELECT, (event2) => onSelect?.(event2), { once: true }); + (0, import_react_primitive.dispatchDiscreteCustomEvent)(target, linkSelectEvent); + if (!linkSelectEvent.defaultPrevented && !event.metaKey) { + const rootContentDismissEvent = new CustomEvent(ROOT_CONTENT_DISMISS, { + bubbles: true, + cancelable: true + }); + (0, import_react_primitive.dispatchDiscreteCustomEvent)(target, rootContentDismissEvent); + } + }, + { checkForDefaultPrevented: false } + ) + } + ) }); + } +); +NavigationMenuLink.displayName = LINK_NAME; +var INDICATOR_NAME = "NavigationMenuIndicator"; +var NavigationMenuIndicator = React.forwardRef((props, forwardedRef) => { + const { forceMount, ...indicatorProps } = props; + const context = useNavigationMenuContext(INDICATOR_NAME, props.__scopeNavigationMenu); + const isVisible = Boolean(context.value); + return context.indicatorTrack ? import_react_dom.default.createPortal( + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavigationMenuIndicatorImpl, { ...indicatorProps, ref: forwardedRef }) }), + context.indicatorTrack + ) : null; +}); +NavigationMenuIndicator.displayName = INDICATOR_NAME; +var NavigationMenuIndicatorImpl = React.forwardRef((props, forwardedRef) => { + const { __scopeNavigationMenu, ...indicatorProps } = props; + const context = useNavigationMenuContext(INDICATOR_NAME, __scopeNavigationMenu); + const getItems = useCollection(__scopeNavigationMenu); + const [activeTrigger, setActiveTrigger] = React.useState( + null + ); + const [position, setPosition] = React.useState(null); + const isHorizontal = context.orientation === "horizontal"; + const isVisible = Boolean(context.value); + React.useEffect(() => { + const items = getItems(); + const triggerNode = items.find((item) => item.value === context.value)?.ref.current; + if (triggerNode) setActiveTrigger(triggerNode); + }, [getItems, context.value]); + const handlePositionChange = () => { + if (activeTrigger) { + setPosition({ + size: isHorizontal ? activeTrigger.offsetWidth : activeTrigger.offsetHeight, + offset: isHorizontal ? activeTrigger.offsetLeft : activeTrigger.offsetTop + }); + } + }; + useResizeObserver(activeTrigger, handlePositionChange); + useResizeObserver(context.indicatorTrack, handlePositionChange); + return position ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "aria-hidden": true, + "data-state": isVisible ? "visible" : "hidden", + "data-orientation": context.orientation, + ...indicatorProps, + ref: forwardedRef, + style: { + position: "absolute", + ...isHorizontal ? { + left: 0, + width: position.size + "px", + transform: `translateX(${position.offset}px)` + } : { + top: 0, + height: position.size + "px", + transform: `translateY(${position.offset}px)` + }, + ...indicatorProps.style + } + } + ) : null; +}); +var CONTENT_NAME = "NavigationMenuContent"; +var NavigationMenuContent = React.forwardRef((props, forwardedRef) => { + const { forceMount, ...contentProps } = props; + const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu); + const itemContext = useNavigationMenuItemContext(CONTENT_NAME, props.__scopeNavigationMenu); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(itemContext.contentRef, forwardedRef); + const open = itemContext.value === context.value; + const commonProps = { + value: itemContext.value, + triggerRef: itemContext.triggerRef, + focusProxyRef: itemContext.focusProxyRef, + wasEscapeCloseRef: itemContext.wasEscapeCloseRef, + onContentFocusOutside: itemContext.onContentFocusOutside, + onRootContentClose: itemContext.onRootContentClose, + ...contentProps + }; + return !context.viewport ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + NavigationMenuContentImpl, + { + "data-state": getOpenState(open), + ...commonProps, + ref: composedRefs, + onPointerEnter: (0, import_primitive.composeEventHandlers)(props.onPointerEnter, context.onContentEnter), + onPointerLeave: (0, import_primitive.composeEventHandlers)( + props.onPointerLeave, + whenMouse(context.onContentLeave) + ), + style: { + // Prevent interaction when animating out + pointerEvents: !open && context.isRootMenu ? "none" : void 0, + ...commonProps.style + } + } + ) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ViewportContentMounter, { forceMount, ...commonProps, ref: composedRefs }); +}); +NavigationMenuContent.displayName = CONTENT_NAME; +var ViewportContentMounter = React.forwardRef((props, forwardedRef) => { + const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu); + const { onViewportContentChange, onViewportContentRemove } = context; + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + onViewportContentChange(props.value, { + ref: forwardedRef, + ...props + }); + }, [props, forwardedRef, onViewportContentChange]); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + return () => onViewportContentRemove(props.value); + }, [props.value, onViewportContentRemove]); + return null; +}); +var ROOT_CONTENT_DISMISS = "navigationMenu.rootContentDismiss"; +var NavigationMenuContentImpl = React.forwardRef((props, forwardedRef) => { + const { + __scopeNavigationMenu, + value, + triggerRef, + focusProxyRef, + wasEscapeCloseRef, + onRootContentClose, + onContentFocusOutside, + ...contentProps + } = props; + const context = useNavigationMenuContext(CONTENT_NAME, __scopeNavigationMenu); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(ref, forwardedRef); + const triggerId = makeTriggerId(context.baseId, value); + const contentId = makeContentId(context.baseId, value); + const getItems = useCollection(__scopeNavigationMenu); + const prevMotionAttributeRef = React.useRef(null); + const { onItemDismiss } = context; + React.useEffect(() => { + const content = ref.current; + if (context.isRootMenu && content) { + const handleClose = () => { + onItemDismiss(); + onRootContentClose(); + if (content.contains(document.activeElement)) triggerRef.current?.focus(); + }; + content.addEventListener(ROOT_CONTENT_DISMISS, handleClose); + return () => content.removeEventListener(ROOT_CONTENT_DISMISS, handleClose); + } + }, [context.isRootMenu, props.value, triggerRef, onItemDismiss, onRootContentClose]); + const motionAttribute = React.useMemo(() => { + const items = getItems(); + const values = items.map((item) => item.value); + if (context.dir === "rtl") values.reverse(); + const index = values.indexOf(context.value); + const prevIndex = values.indexOf(context.previousValue); + const isSelected = value === context.value; + const wasSelected = prevIndex === values.indexOf(value); + if (!isSelected && !wasSelected) return prevMotionAttributeRef.current; + const attribute = (() => { + if (index !== prevIndex) { + if (isSelected && prevIndex !== -1) return index > prevIndex ? "from-end" : "from-start"; + if (wasSelected && index !== -1) return index > prevIndex ? "to-start" : "to-end"; + } + return null; + })(); + prevMotionAttributeRef.current = attribute; + return attribute; + }, [context.previousValue, context.value, context.dir, getItems, value]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FocusGroup, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_dismissable_layer.DismissableLayer, + { + id: contentId, + "aria-labelledby": triggerId, + "data-motion": motionAttribute, + "data-orientation": context.orientation, + ...contentProps, + ref: composedRefs, + disableOutsidePointerEvents: false, + onDismiss: () => { + const rootContentDismissEvent = new Event(ROOT_CONTENT_DISMISS, { + bubbles: true, + cancelable: true + }); + ref.current?.dispatchEvent(rootContentDismissEvent); + }, + onFocusOutside: (0, import_primitive.composeEventHandlers)(props.onFocusOutside, (event) => { + onContentFocusOutside(); + const target = event.target; + if (context.rootNavigationMenu?.contains(target)) event.preventDefault(); + }), + onPointerDownOutside: (0, import_primitive.composeEventHandlers)(props.onPointerDownOutside, (event) => { + const target = event.target; + const isTrigger = getItems().some((item) => item.ref.current?.contains(target)); + const isRootViewport = context.isRootMenu && context.viewport?.contains(target); + if (isTrigger || isRootViewport || !context.isRootMenu) event.preventDefault(); + }), + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + const isMetaKey = event.altKey || event.ctrlKey || event.metaKey; + const isTabKey = event.key === "Tab" && !isMetaKey; + if (isTabKey) { + const candidates = getTabbableCandidates(event.currentTarget); + const focusedElement = document.activeElement; + const index = candidates.findIndex((candidate) => candidate === focusedElement); + const isMovingBackwards = event.shiftKey; + const nextCandidates = isMovingBackwards ? candidates.slice(0, index).reverse() : candidates.slice(index + 1, candidates.length); + if (focusFirst(nextCandidates)) { + event.preventDefault(); + } else { + focusProxyRef.current?.focus(); + } + } + }), + onEscapeKeyDown: (0, import_primitive.composeEventHandlers)(props.onEscapeKeyDown, (_event) => { + wasEscapeCloseRef.current = true; + }) + } + ) }); +}); +var VIEWPORT_NAME = "NavigationMenuViewport"; +var NavigationMenuViewport = React.forwardRef((props, forwardedRef) => { + const { forceMount, ...viewportProps } = props; + const context = useNavigationMenuContext(VIEWPORT_NAME, props.__scopeNavigationMenu); + const open = Boolean(context.value); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavigationMenuViewportImpl, { ...viewportProps, ref: forwardedRef }) }); +}); +NavigationMenuViewport.displayName = VIEWPORT_NAME; +var NavigationMenuViewportImpl = React.forwardRef((props, forwardedRef) => { + const { __scopeNavigationMenu, children, ...viewportImplProps } = props; + const context = useNavigationMenuContext(VIEWPORT_NAME, __scopeNavigationMenu); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.onViewportChange); + const viewportContentContext = useViewportContentContext( + CONTENT_NAME, + props.__scopeNavigationMenu + ); + const [size, setSize] = React.useState(null); + const [content, setContent] = React.useState(null); + const viewportWidth = size ? size?.width + "px" : void 0; + const viewportHeight = size ? size?.height + "px" : void 0; + const open = Boolean(context.value); + const activeContentValue = open ? context.value : context.previousValue; + const handleSizeChange = () => { + if (content) setSize({ width: content.offsetWidth, height: content.offsetHeight }); + }; + useResizeObserver(content, handleSizeChange); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "data-state": getOpenState(open), + "data-orientation": context.orientation, + ...viewportImplProps, + ref: composedRefs, + style: { + // Prevent interaction when animating out + pointerEvents: !open && context.isRootMenu ? "none" : void 0, + ["--radix-navigation-menu-viewport-width"]: viewportWidth, + ["--radix-navigation-menu-viewport-height"]: viewportHeight, + ...viewportImplProps.style + }, + onPointerEnter: (0, import_primitive.composeEventHandlers)(props.onPointerEnter, context.onContentEnter), + onPointerLeave: (0, import_primitive.composeEventHandlers)(props.onPointerLeave, whenMouse(context.onContentLeave)), + children: Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props2 }]) => { + const isActive = activeContentValue === value; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || isActive, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + NavigationMenuContentImpl, + { + ...props2, + ref: (0, import_react_compose_refs.composeRefs)(ref, (node) => { + if (isActive && node) setContent(node); + }) + } + ) }, value); + }) + } + ); +}); +var FOCUS_GROUP_NAME = "FocusGroup"; +var FocusGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeNavigationMenu, ...groupProps } = props; + const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) }); + } +); +var ARROW_KEYS = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"]; +var FOCUS_GROUP_ITEM_NAME = "FocusGroupItem"; +var FocusGroupItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeNavigationMenu, ...groupProps } = props; + const getItems = useFocusGroupCollection(__scopeNavigationMenu); + const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FocusGroupCollection.ItemSlot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + ...groupProps, + ref: forwardedRef, + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + const isFocusNavigationKey = ["Home", "End", ...ARROW_KEYS].includes(event.key); + if (isFocusNavigationKey) { + let candidateNodes = getItems().map((item) => item.ref.current); + const prevItemKey = context.dir === "rtl" ? "ArrowRight" : "ArrowLeft"; + const prevKeys = [prevItemKey, "ArrowUp", "End"]; + if (prevKeys.includes(event.key)) candidateNodes.reverse(); + if (ARROW_KEYS.includes(event.key)) { + const currentIndex = candidateNodes.indexOf(event.currentTarget); + candidateNodes = candidateNodes.slice(currentIndex + 1); + } + setTimeout(() => focusFirst(candidateNodes)); + event.preventDefault(); + } + }) + } + ) }); + } +); +function getTabbableCandidates(container) { + const nodes = []; + const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { + acceptNode: (node) => { + const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden"; + if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; + return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; + } + }); + while (walker.nextNode()) nodes.push(walker.currentNode); + return nodes; +} +function focusFirst(candidates) { + const previouslyFocusedElement = document.activeElement; + return candidates.some((candidate) => { + if (candidate === previouslyFocusedElement) return true; + candidate.focus(); + return document.activeElement !== previouslyFocusedElement; + }); +} +function removeFromTabOrder(candidates) { + candidates.forEach((candidate) => { + candidate.dataset.tabindex = candidate.getAttribute("tabindex") || ""; + candidate.setAttribute("tabindex", "-1"); + }); + return () => { + candidates.forEach((candidate) => { + const prevTabIndex = candidate.dataset.tabindex; + candidate.setAttribute("tabindex", prevTabIndex); + }); + }; +} +function useResizeObserver(element, onResize) { + const handleResize = (0, import_react_use_callback_ref.useCallbackRef)(onResize); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + let rAF = 0; + if (element) { + const resizeObserver = new ResizeObserver(() => { + cancelAnimationFrame(rAF); + rAF = window.requestAnimationFrame(handleResize); + }); + resizeObserver.observe(element); + return () => { + window.cancelAnimationFrame(rAF); + resizeObserver.unobserve(element); + }; + } + }, [element, handleResize]); +} +function getOpenState(open) { + return open ? "open" : "closed"; +} +function makeTriggerId(baseId, value) { + return `${baseId}-trigger-${value}`; +} +function makeContentId(baseId, value) { + return `${baseId}-content-${value}`; +} +function whenMouse(handler) { + return (event) => event.pointerType === "mouse" ? handler(event) : void 0; +} +var Root2 = NavigationMenu; +var Sub = NavigationMenuSub; +var List = NavigationMenuList; +var Item = NavigationMenuItem; +var Trigger = NavigationMenuTrigger; +var Link = NavigationMenuLink; +var Indicator = NavigationMenuIndicator; +var Content = NavigationMenuContent; +var Viewport = NavigationMenuViewport; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8bc7b4929eeb841b00c73c579b23fe72da7dc307 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/navigation-menu.tsx"], + "sourcesContent": ["'use client';\nexport {\n createNavigationMenuScope,\n //\n NavigationMenu,\n NavigationMenuSub,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuContent,\n NavigationMenuViewport,\n //\n Root,\n Sub,\n List,\n Item,\n Trigger,\n Link,\n Indicator,\n Content,\n Viewport,\n} from './navigation-menu';\nexport type {\n NavigationMenuProps,\n NavigationMenuSubProps,\n NavigationMenuListProps,\n NavigationMenuItemProps,\n NavigationMenuTriggerProps,\n NavigationMenuLinkProps,\n NavigationMenuIndicatorProps,\n NavigationMenuContentProps,\n NavigationMenuViewportProps,\n} from './navigation-menu';\n", "import * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { composeRefs, useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { Presence } from '@radix-ui/react-presence';\nimport { useId } from '@radix-ui/react-id';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Orientation = 'vertical' | 'horizontal';\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAVIGATION_MENU_NAME = 'NavigationMenu';\n\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n NavigationMenuTriggerElement,\n { value: string }\n>(NAVIGATION_MENU_NAME);\n\nconst [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] =\n createCollection(NAVIGATION_MENU_NAME);\n\ntype ScopedProps

= P & { __scopeNavigationMenu?: Scope };\nconst [createNavigationMenuContext, createNavigationMenuScope] = createContextScope(\n NAVIGATION_MENU_NAME,\n [createCollectionScope, createFocusGroupCollectionScope]\n);\n\ntype ContentData = {\n ref?: React.Ref;\n} & ViewportContentMounterProps;\n\ntype NavigationMenuContextValue = {\n isRootMenu: boolean;\n value: string;\n previousValue: string;\n baseId: string;\n dir: Direction;\n orientation: Orientation;\n rootNavigationMenu: NavigationMenuElement | null;\n indicatorTrack: HTMLDivElement | null;\n onIndicatorTrackChange(indicatorTrack: HTMLDivElement | null): void;\n viewport: NavigationMenuViewportElement | null;\n onViewportChange(viewport: NavigationMenuViewportElement | null): void;\n onViewportContentChange(contentValue: string, contentData: ContentData): void;\n onViewportContentRemove(contentValue: string): void;\n onTriggerEnter(itemValue: string): void;\n onTriggerLeave(): void;\n onContentEnter(): void;\n onContentLeave(): void;\n onItemSelect(itemValue: string): void;\n onItemDismiss(): void;\n};\n\nconst [NavigationMenuProviderImpl, useNavigationMenuContext] =\n createNavigationMenuContext(NAVIGATION_MENU_NAME);\n\nconst [ViewportContentProvider, useViewportContentContext] = createNavigationMenuContext<{\n items: Map;\n}>(NAVIGATION_MENU_NAME);\n\ntype NavigationMenuElement = React.ComponentRef;\ntype PrimitiveNavProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuProps\n extends Omit,\n PrimitiveNavProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n dir?: Direction;\n orientation?: Orientation;\n /**\n * The duration from when the pointer enters the trigger until the tooltip gets opened.\n * @defaultValue 200\n */\n delayDuration?: number;\n /**\n * How much time a user has to enter another trigger without incurring a delay again.\n * @defaultValue 300\n */\n skipDelayDuration?: number;\n}\n\nconst NavigationMenu = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value: valueProp,\n onValueChange,\n defaultValue,\n delayDuration = 200,\n skipDelayDuration = 300,\n orientation = 'horizontal',\n dir,\n ...NavigationMenuProps\n } = props;\n const [navigationMenu, setNavigationMenu] = React.useState(null);\n const composedRef = useComposedRefs(forwardedRef, (node) => setNavigationMenu(node));\n const direction = useDirection(dir);\n const openTimerRef = React.useRef(0);\n const closeTimerRef = React.useRef(0);\n const skipDelayTimerRef = React.useRef(0);\n const [isOpenDelayed, setIsOpenDelayed] = React.useState(true);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: (value) => {\n const isOpen = value !== '';\n const hasSkipDelayDuration = skipDelayDuration > 0;\n\n if (isOpen) {\n window.clearTimeout(skipDelayTimerRef.current);\n if (hasSkipDelayDuration) setIsOpenDelayed(false);\n } else {\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(\n () => setIsOpenDelayed(true),\n skipDelayDuration\n );\n }\n\n onValueChange?.(value);\n },\n defaultProp: defaultValue ?? '',\n caller: NAVIGATION_MENU_NAME,\n });\n\n const startCloseTimer = React.useCallback(() => {\n window.clearTimeout(closeTimerRef.current);\n closeTimerRef.current = window.setTimeout(() => setValue(''), 150);\n }, [setValue]);\n\n const handleOpen = React.useCallback(\n (itemValue: string) => {\n window.clearTimeout(closeTimerRef.current);\n setValue(itemValue);\n },\n [setValue]\n );\n\n const handleDelayedOpen = React.useCallback(\n (itemValue: string) => {\n const isOpenItem = value === itemValue;\n if (isOpenItem) {\n // If the item is already open (e.g. we're transitioning from the content to the trigger)\n // then we want to clear the close timer immediately.\n window.clearTimeout(closeTimerRef.current);\n } else {\n openTimerRef.current = window.setTimeout(() => {\n window.clearTimeout(closeTimerRef.current);\n setValue(itemValue);\n }, delayDuration);\n }\n },\n [value, setValue, delayDuration]\n );\n\n React.useEffect(() => {\n return () => {\n window.clearTimeout(openTimerRef.current);\n window.clearTimeout(closeTimerRef.current);\n window.clearTimeout(skipDelayTimerRef.current);\n };\n }, []);\n\n return (\n {\n window.clearTimeout(openTimerRef.current);\n if (isOpenDelayed) handleDelayedOpen(itemValue);\n else handleOpen(itemValue);\n }}\n onTriggerLeave={() => {\n window.clearTimeout(openTimerRef.current);\n startCloseTimer();\n }}\n onContentEnter={() => window.clearTimeout(closeTimerRef.current)}\n onContentLeave={startCloseTimer}\n onItemSelect={(itemValue) => {\n setValue((prevValue) => (prevValue === itemValue ? '' : itemValue));\n }}\n onItemDismiss={() => setValue('')}\n >\n \n \n );\n }\n);\n\nNavigationMenu.displayName = NAVIGATION_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'NavigationMenuSub';\n\ntype NavigationMenuSubElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuSubProps\n extends Omit,\n PrimitiveDivProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n orientation?: Orientation;\n}\n\nconst NavigationMenuSub = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = 'horizontal',\n ...subProps\n } = props;\n const context = useNavigationMenuContext(SUB_NAME, __scopeNavigationMenu);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? '',\n caller: SUB_NAME,\n });\n\n return (\n setValue(itemValue)}\n onItemSelect={(itemValue) => setValue(itemValue)}\n onItemDismiss={() => setValue('')}\n >\n \n \n );\n }\n);\n\nNavigationMenuSub.displayName = SUB_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ninterface NavigationMenuProviderPrivateProps {\n isRootMenu: boolean;\n scope: Scope;\n children: React.ReactNode;\n orientation: Orientation;\n dir: Direction;\n rootNavigationMenu: NavigationMenuElement | null;\n value: string;\n onTriggerEnter(itemValue: string): void;\n onTriggerLeave?(): void;\n onContentEnter?(): void;\n onContentLeave?(): void;\n onItemSelect(itemValue: string): void;\n onItemDismiss(): void;\n}\n\ninterface NavigationMenuProviderProps extends NavigationMenuProviderPrivateProps {}\n\nconst NavigationMenuProvider: React.FC = (\n props: ScopedProps\n) => {\n const {\n scope,\n isRootMenu,\n rootNavigationMenu,\n dir,\n orientation,\n children,\n value,\n onItemSelect,\n onItemDismiss,\n onTriggerEnter,\n onTriggerLeave,\n onContentEnter,\n onContentLeave,\n } = props;\n const [viewport, setViewport] = React.useState(null);\n const [viewportContent, setViewportContent] = React.useState>(new Map());\n const [indicatorTrack, setIndicatorTrack] = React.useState(null);\n\n return (\n {\n setViewportContent((prevContent) => {\n prevContent.set(contentValue, contentData);\n return new Map(prevContent);\n });\n }, [])}\n onViewportContentRemove={React.useCallback((contentValue) => {\n setViewportContent((prevContent) => {\n if (!prevContent.has(contentValue)) return prevContent;\n prevContent.delete(contentValue);\n return new Map(prevContent);\n });\n }, [])}\n >\n \n \n {children}\n \n \n \n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuList\n * -----------------------------------------------------------------------------------------------*/\n\nconst LIST_NAME = 'NavigationMenuList';\n\ntype NavigationMenuListElement = React.ComponentRef;\ntype PrimitiveUnorderedListProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuListProps extends PrimitiveUnorderedListProps {}\n\nconst NavigationMenuList = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, ...listProps } = props;\n const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu);\n\n const list = (\n \n );\n\n return (\n \n \n {context.isRootMenu ? {list} : list}\n \n \n );\n }\n);\n\nNavigationMenuList.displayName = LIST_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'NavigationMenuItem';\n\ntype FocusProxyElement = React.ComponentRef;\n\ntype NavigationMenuItemContextValue = {\n value: string;\n triggerRef: React.RefObject;\n contentRef: React.RefObject;\n focusProxyRef: React.RefObject;\n wasEscapeCloseRef: React.MutableRefObject;\n onEntryKeyDown(): void;\n onFocusProxyEnter(side: 'start' | 'end'): void;\n onRootContentClose(): void;\n onContentFocusOutside(): void;\n};\n\nconst [NavigationMenuItemContextProvider, useNavigationMenuItemContext] =\n createNavigationMenuContext(ITEM_NAME);\n\ntype NavigationMenuItemElement = React.ComponentRef;\ntype PrimitiveListItemProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuItemProps extends PrimitiveListItemProps {\n value?: string;\n}\n\nconst NavigationMenuItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props;\n const autoValue = useId();\n // We need to provide an initial deterministic value as `useId` will return\n // empty string on the first render and we don't want to match our internal \"closed\" value.\n const value = valueProp || autoValue || 'LEGACY_REACT_AUTO_VALUE';\n const contentRef = React.useRef(null);\n const triggerRef = React.useRef(null);\n const focusProxyRef = React.useRef(null);\n const restoreContentTabOrderRef = React.useRef(() => {});\n const wasEscapeCloseRef = React.useRef(false);\n\n const handleContentEntry = React.useCallback((side = 'start') => {\n if (contentRef.current) {\n restoreContentTabOrderRef.current();\n const candidates = getTabbableCandidates(contentRef.current);\n if (candidates.length) focusFirst(side === 'start' ? candidates : candidates.reverse());\n }\n }, []);\n\n const handleContentExit = React.useCallback(() => {\n if (contentRef.current) {\n const candidates = getTabbableCandidates(contentRef.current);\n if (candidates.length) restoreContentTabOrderRef.current = removeFromTabOrder(candidates);\n }\n }, []);\n\n return (\n \n \n \n );\n }\n);\n\nNavigationMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'NavigationMenuTrigger';\n\ntype NavigationMenuTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuTriggerProps extends PrimitiveButtonProps {}\n\nconst NavigationMenuTrigger = React.forwardRef<\n NavigationMenuTriggerElement,\n NavigationMenuTriggerProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, disabled, ...triggerProps } = props;\n const context = useNavigationMenuContext(TRIGGER_NAME, props.__scopeNavigationMenu);\n const itemContext = useNavigationMenuItemContext(TRIGGER_NAME, props.__scopeNavigationMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, itemContext.triggerRef, forwardedRef);\n const triggerId = makeTriggerId(context.baseId, itemContext.value);\n const contentId = makeContentId(context.baseId, itemContext.value);\n const hasPointerMoveOpenedRef = React.useRef(false);\n const wasClickCloseRef = React.useRef(false);\n const open = itemContext.value === context.value;\n\n return (\n <>\n \n \n {\n wasClickCloseRef.current = false;\n itemContext.wasEscapeCloseRef.current = false;\n })}\n onPointerMove={composeEventHandlers(\n props.onPointerMove,\n whenMouse(() => {\n if (\n disabled ||\n wasClickCloseRef.current ||\n itemContext.wasEscapeCloseRef.current ||\n hasPointerMoveOpenedRef.current\n )\n return;\n context.onTriggerEnter(itemContext.value);\n hasPointerMoveOpenedRef.current = true;\n })\n )}\n onPointerLeave={composeEventHandlers(\n props.onPointerLeave,\n whenMouse(() => {\n if (disabled) return;\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n })\n )}\n onClick={composeEventHandlers(props.onClick, () => {\n context.onItemSelect(itemContext.value);\n wasClickCloseRef.current = open;\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n const verticalEntryKey = context.dir === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n const entryKey = { horizontal: 'ArrowDown', vertical: verticalEntryKey }[\n context.orientation\n ];\n if (open && event.key === entryKey) {\n itemContext.onEntryKeyDown();\n // Prevent FocusGroupItem from handling the event\n event.preventDefault();\n }\n })}\n />\n \n \n\n {/* Proxy tab order between trigger and content */}\n {open && (\n <>\n {\n const content = itemContext.contentRef.current;\n const prevFocusedElement = event.relatedTarget as HTMLElement | null;\n const wasTriggerFocused = prevFocusedElement === ref.current;\n const wasFocusFromContent = content?.contains(prevFocusedElement);\n\n if (wasTriggerFocused || !wasFocusFromContent) {\n itemContext.onFocusProxyEnter(wasTriggerFocused ? 'start' : 'end');\n }\n }}\n />\n\n {/* Restructure a11y tree to make content accessible to screen reader when using the viewport */}\n {context.viewport && }\n \n )}\n \n );\n});\n\nNavigationMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuLink\n * -----------------------------------------------------------------------------------------------*/\n\nconst LINK_NAME = 'NavigationMenuLink';\nconst LINK_SELECT = 'navigationMenu.linkSelect';\n\ntype NavigationMenuLinkElement = React.ComponentRef;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuLinkProps extends Omit {\n active?: boolean;\n onSelect?: (event: Event) => void;\n}\n\nconst NavigationMenuLink = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props;\n\n return (\n \n {\n const target = event.target as HTMLElement;\n const linkSelectEvent = new CustomEvent(LINK_SELECT, {\n bubbles: true,\n cancelable: true,\n });\n target.addEventListener(LINK_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(target, linkSelectEvent);\n\n if (!linkSelectEvent.defaultPrevented && !event.metaKey) {\n const rootContentDismissEvent = new CustomEvent(ROOT_CONTENT_DISMISS, {\n bubbles: true,\n cancelable: true,\n });\n dispatchDiscreteCustomEvent(target, rootContentDismissEvent);\n }\n },\n { checkForDefaultPrevented: false }\n )}\n />\n \n );\n }\n);\n\nNavigationMenuLink.displayName = LINK_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'NavigationMenuIndicator';\n\ntype NavigationMenuIndicatorElement = NavigationMenuIndicatorImplElement;\ninterface NavigationMenuIndicatorProps extends NavigationMenuIndicatorImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst NavigationMenuIndicator = React.forwardRef<\n NavigationMenuIndicatorElement,\n NavigationMenuIndicatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { forceMount, ...indicatorProps } = props;\n const context = useNavigationMenuContext(INDICATOR_NAME, props.__scopeNavigationMenu);\n const isVisible = Boolean(context.value);\n\n return context.indicatorTrack\n ? ReactDOM.createPortal(\n \n \n ,\n context.indicatorTrack\n )\n : null;\n});\n\nNavigationMenuIndicator.displayName = INDICATOR_NAME;\n\ntype NavigationMenuIndicatorImplElement = React.ComponentRef;\ninterface NavigationMenuIndicatorImplProps extends PrimitiveDivProps {}\n\nconst NavigationMenuIndicatorImpl = React.forwardRef<\n NavigationMenuIndicatorImplElement,\n NavigationMenuIndicatorImplProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, ...indicatorProps } = props;\n const context = useNavigationMenuContext(INDICATOR_NAME, __scopeNavigationMenu);\n const getItems = useCollection(__scopeNavigationMenu);\n const [activeTrigger, setActiveTrigger] = React.useState(\n null\n );\n const [position, setPosition] = React.useState<{ size: number; offset: number } | null>(null);\n const isHorizontal = context.orientation === 'horizontal';\n const isVisible = Boolean(context.value);\n\n React.useEffect(() => {\n const items = getItems();\n const triggerNode = items.find((item) => item.value === context.value)?.ref.current;\n if (triggerNode) setActiveTrigger(triggerNode);\n }, [getItems, context.value]);\n\n /**\n * Update position when the indicator or parent track size changes\n */\n const handlePositionChange = () => {\n if (activeTrigger) {\n setPosition({\n size: isHorizontal ? activeTrigger.offsetWidth : activeTrigger.offsetHeight,\n offset: isHorizontal ? activeTrigger.offsetLeft : activeTrigger.offsetTop,\n });\n }\n };\n useResizeObserver(activeTrigger, handlePositionChange);\n useResizeObserver(context.indicatorTrack, handlePositionChange);\n\n // We need to wait for the indicator position to be available before rendering to\n // snap immediately into position rather than transitioning from initial\n return position ? (\n \n ) : null;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'NavigationMenuContent';\n\ntype NavigationMenuContentElement = NavigationMenuContentImplElement;\ninterface NavigationMenuContentProps\n extends Omit {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst NavigationMenuContent = React.forwardRef<\n NavigationMenuContentElement,\n NavigationMenuContentProps\n>((props: ScopedProps, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const itemContext = useNavigationMenuItemContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const composedRefs = useComposedRefs(itemContext.contentRef, forwardedRef);\n const open = itemContext.value === context.value;\n\n const commonProps = {\n value: itemContext.value,\n triggerRef: itemContext.triggerRef,\n focusProxyRef: itemContext.focusProxyRef,\n wasEscapeCloseRef: itemContext.wasEscapeCloseRef,\n onContentFocusOutside: itemContext.onContentFocusOutside,\n onRootContentClose: itemContext.onRootContentClose,\n ...contentProps,\n };\n\n return !context.viewport ? (\n \n \n \n ) : (\n \n );\n});\n\nNavigationMenuContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ViewportContentMounterElement = NavigationMenuContentImplElement;\ninterface ViewportContentMounterProps extends NavigationMenuContentImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst ViewportContentMounter = React.forwardRef<\n ViewportContentMounterElement,\n ViewportContentMounterProps\n>((props: ScopedProps, forwardedRef) => {\n const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const { onViewportContentChange, onViewportContentRemove } = context;\n\n useLayoutEffect(() => {\n onViewportContentChange(props.value, {\n ref: forwardedRef,\n ...props,\n });\n }, [props, forwardedRef, onViewportContentChange]);\n\n useLayoutEffect(() => {\n return () => onViewportContentRemove(props.value);\n }, [props.value, onViewportContentRemove]);\n\n // Content is proxied into the viewport\n return null;\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_CONTENT_DISMISS = 'navigationMenu.rootContentDismiss';\n\ntype MotionAttribute = 'to-start' | 'to-end' | 'from-start' | 'from-end';\ntype NavigationMenuContentImplElement = React.ComponentRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\n\ninterface NavigationMenuContentImplPrivateProps {\n value: string;\n triggerRef: React.RefObject;\n focusProxyRef: React.RefObject;\n wasEscapeCloseRef: React.MutableRefObject;\n onContentFocusOutside(): void;\n onRootContentClose(): void;\n}\ninterface NavigationMenuContentImplProps\n extends Omit,\n NavigationMenuContentImplPrivateProps {}\n\nconst NavigationMenuContentImpl = React.forwardRef<\n NavigationMenuContentImplElement,\n NavigationMenuContentImplProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value,\n triggerRef,\n focusProxyRef,\n wasEscapeCloseRef,\n onRootContentClose,\n onContentFocusOutside,\n ...contentProps\n } = props;\n const context = useNavigationMenuContext(CONTENT_NAME, __scopeNavigationMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const getItems = useCollection(__scopeNavigationMenu);\n const prevMotionAttributeRef = React.useRef(null);\n\n const { onItemDismiss } = context;\n\n React.useEffect(() => {\n const content = ref.current;\n\n // Bubble dismiss to the root content node and focus its trigger\n if (context.isRootMenu && content) {\n const handleClose = () => {\n onItemDismiss();\n onRootContentClose();\n if (content.contains(document.activeElement)) triggerRef.current?.focus();\n };\n content.addEventListener(ROOT_CONTENT_DISMISS, handleClose);\n return () => content.removeEventListener(ROOT_CONTENT_DISMISS, handleClose);\n }\n }, [context.isRootMenu, props.value, triggerRef, onItemDismiss, onRootContentClose]);\n\n const motionAttribute = React.useMemo(() => {\n const items = getItems();\n const values = items.map((item) => item.value);\n if (context.dir === 'rtl') values.reverse();\n const index = values.indexOf(context.value);\n const prevIndex = values.indexOf(context.previousValue);\n const isSelected = value === context.value;\n const wasSelected = prevIndex === values.indexOf(value);\n\n // We only want to update selected and the last selected content\n // this avoids animations being interrupted outside of that range\n if (!isSelected && !wasSelected) return prevMotionAttributeRef.current;\n\n const attribute = (() => {\n // Don't provide a direction on the initial open\n if (index !== prevIndex) {\n // If we're moving to this item from another\n if (isSelected && prevIndex !== -1) return index > prevIndex ? 'from-end' : 'from-start';\n // If we're leaving this item for another\n if (wasSelected && index !== -1) return index > prevIndex ? 'to-start' : 'to-end';\n }\n // Otherwise we're entering from closed or leaving the list\n // entirely and should not animate in any direction\n return null;\n })();\n\n prevMotionAttributeRef.current = attribute;\n return attribute;\n }, [context.previousValue, context.value, context.dir, getItems, value]);\n\n return (\n \n {\n const rootContentDismissEvent = new Event(ROOT_CONTENT_DISMISS, {\n bubbles: true,\n cancelable: true,\n });\n ref.current?.dispatchEvent(rootContentDismissEvent);\n }}\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) => {\n onContentFocusOutside();\n const target = event.target as HTMLElement;\n // Only dismiss content when focus moves outside of the menu\n if (context.rootNavigationMenu?.contains(target)) event.preventDefault();\n })}\n onPointerDownOutside={composeEventHandlers(props.onPointerDownOutside, (event) => {\n const target = event.target as HTMLElement;\n const isTrigger = getItems().some((item) => item.ref.current?.contains(target));\n const isRootViewport = context.isRootMenu && context.viewport?.contains(target);\n if (isTrigger || isRootViewport || !context.isRootMenu) event.preventDefault();\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;\n const isTabKey = event.key === 'Tab' && !isMetaKey;\n if (isTabKey) {\n const candidates = getTabbableCandidates(event.currentTarget);\n const focusedElement = document.activeElement;\n const index = candidates.findIndex((candidate) => candidate === focusedElement);\n const isMovingBackwards = event.shiftKey;\n const nextCandidates = isMovingBackwards\n ? candidates.slice(0, index).reverse()\n : candidates.slice(index + 1, candidates.length);\n\n if (focusFirst(nextCandidates)) {\n // prevent browser tab keydown because we've handled focus\n event.preventDefault();\n } else {\n // If we can't focus that means we're at the edges\n // so focus the proxy and let browser handle\n // tab/shift+tab keypress on the proxy instead\n focusProxyRef.current?.focus();\n }\n }\n })}\n onEscapeKeyDown={composeEventHandlers(props.onEscapeKeyDown, (_event) => {\n // prevent the dropdown from reopening\n // after the escape key has been pressed\n wasEscapeCloseRef.current = true;\n })}\n />\n \n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuViewport\n * -----------------------------------------------------------------------------------------------*/\n\nconst VIEWPORT_NAME = 'NavigationMenuViewport';\n\ntype NavigationMenuViewportElement = NavigationMenuViewportImplElement;\ninterface NavigationMenuViewportProps\n extends Omit {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst NavigationMenuViewport = React.forwardRef<\n NavigationMenuViewportElement,\n NavigationMenuViewportProps\n>((props: ScopedProps, forwardedRef) => {\n const { forceMount, ...viewportProps } = props;\n const context = useNavigationMenuContext(VIEWPORT_NAME, props.__scopeNavigationMenu);\n const open = Boolean(context.value);\n\n return (\n \n \n \n );\n});\n\nNavigationMenuViewport.displayName = VIEWPORT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype NavigationMenuViewportImplElement = React.ComponentRef;\ninterface NavigationMenuViewportImplProps extends PrimitiveDivProps {}\n\nconst NavigationMenuViewportImpl = React.forwardRef<\n NavigationMenuViewportImplElement,\n NavigationMenuViewportImplProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, children, ...viewportImplProps } = props;\n const context = useNavigationMenuContext(VIEWPORT_NAME, __scopeNavigationMenu);\n const composedRefs = useComposedRefs(forwardedRef, context.onViewportChange);\n const viewportContentContext = useViewportContentContext(\n CONTENT_NAME,\n props.__scopeNavigationMenu\n );\n const [size, setSize] = React.useState<{ width: number; height: number } | null>(null);\n const [content, setContent] = React.useState(null);\n const viewportWidth = size ? size?.width + 'px' : undefined;\n const viewportHeight = size ? size?.height + 'px' : undefined;\n const open = Boolean(context.value);\n // We persist the last active content value as the viewport may be animating out\n // and we want the content to remain mounted for the lifecycle of the viewport.\n const activeContentValue = open ? context.value : context.previousValue;\n\n /**\n * Update viewport size to match the active content node.\n * We prefer offset dimensions over `getBoundingClientRect` as the latter respects CSS transform.\n * For example, if content animates in from `scale(0.5)` the dimensions would be anything\n * from `0.5` to `1` of the intended size.\n */\n const handleSizeChange = () => {\n if (content) setSize({ width: content.offsetWidth, height: content.offsetHeight });\n };\n useResizeObserver(content, handleSizeChange);\n\n return (\n \n {Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props }]) => {\n const isActive = activeContentValue === value;\n return (\n \n {\n // We only want to update the stored node when another is available\n // as we need to smoothly transition between them.\n if (isActive && node) setContent(node);\n })}\n />\n \n );\n })}\n \n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst FOCUS_GROUP_NAME = 'FocusGroup';\n\ntype FocusGroupElement = React.ComponentRef;\ninterface FocusGroupProps extends PrimitiveDivProps {}\n\nconst FocusGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, ...groupProps } = props;\n const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu);\n\n return (\n \n \n \n \n \n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_KEYS = ['ArrowRight', 'ArrowLeft', 'ArrowUp', 'ArrowDown'];\nconst FOCUS_GROUP_ITEM_NAME = 'FocusGroupItem';\n\ntype FocusGroupItemElement = React.ComponentRef;\ninterface FocusGroupItemProps extends PrimitiveButtonProps {}\n\nconst FocusGroupItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, ...groupProps } = props;\n const getItems = useFocusGroupCollection(__scopeNavigationMenu);\n const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);\n\n return (\n \n {\n const isFocusNavigationKey = ['Home', 'End', ...ARROW_KEYS].includes(event.key);\n if (isFocusNavigationKey) {\n let candidateNodes = getItems().map((item) => item.ref.current!);\n const prevItemKey = context.dir === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n const prevKeys = [prevItemKey, 'ArrowUp', 'End'];\n if (prevKeys.includes(event.key)) candidateNodes.reverse();\n if (ARROW_KEYS.includes(event.key)) {\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = candidateNodes.slice(currentIndex + 1);\n }\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => focusFirst(candidateNodes));\n\n // Prevent page scroll while navigating\n event.preventDefault();\n }\n })}\n />\n \n );\n }\n);\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nfunction getTabbableCandidates(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n\nfunction focusFirst(candidates: HTMLElement[]) {\n const previouslyFocusedElement = document.activeElement;\n return candidates.some((candidate) => {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === previouslyFocusedElement) return true;\n candidate.focus();\n return document.activeElement !== previouslyFocusedElement;\n });\n}\n\nfunction removeFromTabOrder(candidates: HTMLElement[]) {\n candidates.forEach((candidate) => {\n candidate.dataset.tabindex = candidate.getAttribute('tabindex') || '';\n candidate.setAttribute('tabindex', '-1');\n });\n return () => {\n candidates.forEach((candidate) => {\n const prevTabIndex = candidate.dataset.tabindex as string;\n candidate.setAttribute('tabindex', prevTabIndex);\n });\n };\n}\n\nfunction useResizeObserver(element: HTMLElement | null, onResize: () => void) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n /**\n * Resize Observer will throw an often benign error that says `ResizeObserver loop\n * completed with undelivered notifications`. This means that ResizeObserver was not\n * able to deliver all observations within a single animation frame, so we use\n * `requestAnimationFrame` to ensure we don't deliver unnecessary observations.\n * Further reading: https://github.com/WICG/resize-observer/issues/38\n */\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\n\nfunction getOpenState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nfunction makeTriggerId(baseId: string, value: string) {\n return `${baseId}-trigger-${value}`;\n}\n\nfunction makeContentId(baseId: string, value: string) {\n return `${baseId}-content-${value}`;\n}\n\nfunction whenMouse(handler: React.PointerEventHandler): React.PointerEventHandler {\n return (event) => (event.pointerType === 'mouse' ? handler(event) : undefined);\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = NavigationMenu;\nconst Sub = NavigationMenuSub;\nconst List = NavigationMenuList;\nconst Item = NavigationMenuItem;\nconst Trigger = NavigationMenuTrigger;\nconst Link = NavigationMenuLink;\nconst Indicator = NavigationMenuIndicator;\nconst Content = NavigationMenuContent;\nconst Viewport = NavigationMenuViewport;\n\nexport {\n createNavigationMenuScope,\n //\n NavigationMenu,\n NavigationMenuSub,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuContent,\n NavigationMenuViewport,\n //\n Root,\n Sub,\n List,\n Item,\n Trigger,\n Link,\n Indicator,\n Content,\n Viewport,\n};\nexport type {\n NavigationMenuProps,\n NavigationMenuSubProps,\n NavigationMenuListProps,\n NavigationMenuItemProps,\n NavigationMenuTriggerProps,\n NavigationMenuLinkProps,\n NavigationMenuIndicatorProps,\n NavigationMenuContentProps,\n NavigationMenuViewportProps,\n};\n"], + "mappings": ";;;;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;AACzB;AAEA,SAAS,cAAc,QAAgB,OAAe;AACpD,SAAO,GAAG,MAAM,YAAY,KAAK;AACnC;AAEA,SAAS,cAAc,QAAgB,OAAe;AACpD,SAAO,GAAG,MAAM,YAAY,KAAK;AACnC;AAEA,SAAS,UAAa,SAAqE;AACzF,SAAO,CAAC,UAAW,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI;AACtE;AAIA,IAAMC,QAAO;AACb,IAAM,MAAM;AACZ,IAAM,OAAO;AACb,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAM,OAAO;AACb,IAAM,YAAY;AAClB,IAAM,UAAU;AAChB,IAAM,WAAW;", + "names": ["Root", "value", "event", "ReactDOM", "props", "Root"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fb32adb48a936c4d338051ed0f2acb5e32d8555d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs @@ -0,0 +1,806 @@ +"use client"; + +// src/navigation-menu.tsx +import * as React from "react"; +import ReactDOM from "react-dom"; +import { createContextScope } from "@radix-ui/react-context"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { Primitive, dispatchDiscreteCustomEvent } from "@radix-ui/react-primitive"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { composeRefs, useComposedRefs } from "@radix-ui/react-compose-refs"; +import { useDirection } from "@radix-ui/react-direction"; +import { Presence } from "@radix-ui/react-presence"; +import { useId } from "@radix-ui/react-id"; +import { createCollection } from "@radix-ui/react-collection"; +import { DismissableLayer } from "@radix-ui/react-dismissable-layer"; +import { usePrevious } from "@radix-ui/react-use-previous"; +import { useLayoutEffect } from "@radix-ui/react-use-layout-effect"; +import { useCallbackRef } from "@radix-ui/react-use-callback-ref"; +import * as VisuallyHiddenPrimitive from "@radix-ui/react-visually-hidden"; +import { Fragment, jsx, jsxs } from "react/jsx-runtime"; +var NAVIGATION_MENU_NAME = "NavigationMenu"; +var [Collection, useCollection, createCollectionScope] = createCollection(NAVIGATION_MENU_NAME); +var [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] = createCollection(NAVIGATION_MENU_NAME); +var [createNavigationMenuContext, createNavigationMenuScope] = createContextScope( + NAVIGATION_MENU_NAME, + [createCollectionScope, createFocusGroupCollectionScope] +); +var [NavigationMenuProviderImpl, useNavigationMenuContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME); +var [ViewportContentProvider, useViewportContentContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME); +var NavigationMenu = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeNavigationMenu, + value: valueProp, + onValueChange, + defaultValue, + delayDuration = 200, + skipDelayDuration = 300, + orientation = "horizontal", + dir, + ...NavigationMenuProps + } = props; + const [navigationMenu, setNavigationMenu] = React.useState(null); + const composedRef = useComposedRefs(forwardedRef, (node) => setNavigationMenu(node)); + const direction = useDirection(dir); + const openTimerRef = React.useRef(0); + const closeTimerRef = React.useRef(0); + const skipDelayTimerRef = React.useRef(0); + const [isOpenDelayed, setIsOpenDelayed] = React.useState(true); + const [value, setValue] = useControllableState({ + prop: valueProp, + onChange: (value2) => { + const isOpen = value2 !== ""; + const hasSkipDelayDuration = skipDelayDuration > 0; + if (isOpen) { + window.clearTimeout(skipDelayTimerRef.current); + if (hasSkipDelayDuration) setIsOpenDelayed(false); + } else { + window.clearTimeout(skipDelayTimerRef.current); + skipDelayTimerRef.current = window.setTimeout( + () => setIsOpenDelayed(true), + skipDelayDuration + ); + } + onValueChange?.(value2); + }, + defaultProp: defaultValue ?? "", + caller: NAVIGATION_MENU_NAME + }); + const startCloseTimer = React.useCallback(() => { + window.clearTimeout(closeTimerRef.current); + closeTimerRef.current = window.setTimeout(() => setValue(""), 150); + }, [setValue]); + const handleOpen = React.useCallback( + (itemValue) => { + window.clearTimeout(closeTimerRef.current); + setValue(itemValue); + }, + [setValue] + ); + const handleDelayedOpen = React.useCallback( + (itemValue) => { + const isOpenItem = value === itemValue; + if (isOpenItem) { + window.clearTimeout(closeTimerRef.current); + } else { + openTimerRef.current = window.setTimeout(() => { + window.clearTimeout(closeTimerRef.current); + setValue(itemValue); + }, delayDuration); + } + }, + [value, setValue, delayDuration] + ); + React.useEffect(() => { + return () => { + window.clearTimeout(openTimerRef.current); + window.clearTimeout(closeTimerRef.current); + window.clearTimeout(skipDelayTimerRef.current); + }; + }, []); + return /* @__PURE__ */ jsx( + NavigationMenuProvider, + { + scope: __scopeNavigationMenu, + isRootMenu: true, + value, + dir: direction, + orientation, + rootNavigationMenu: navigationMenu, + onTriggerEnter: (itemValue) => { + window.clearTimeout(openTimerRef.current); + if (isOpenDelayed) handleDelayedOpen(itemValue); + else handleOpen(itemValue); + }, + onTriggerLeave: () => { + window.clearTimeout(openTimerRef.current); + startCloseTimer(); + }, + onContentEnter: () => window.clearTimeout(closeTimerRef.current), + onContentLeave: startCloseTimer, + onItemSelect: (itemValue) => { + setValue((prevValue) => prevValue === itemValue ? "" : itemValue); + }, + onItemDismiss: () => setValue(""), + children: /* @__PURE__ */ jsx( + Primitive.nav, + { + "aria-label": "Main", + "data-orientation": orientation, + dir: direction, + ...NavigationMenuProps, + ref: composedRef + } + ) + } + ); + } +); +NavigationMenu.displayName = NAVIGATION_MENU_NAME; +var SUB_NAME = "NavigationMenuSub"; +var NavigationMenuSub = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeNavigationMenu, + value: valueProp, + onValueChange, + defaultValue, + orientation = "horizontal", + ...subProps + } = props; + const context = useNavigationMenuContext(SUB_NAME, __scopeNavigationMenu); + const [value, setValue] = useControllableState({ + prop: valueProp, + onChange: onValueChange, + defaultProp: defaultValue ?? "", + caller: SUB_NAME + }); + return /* @__PURE__ */ jsx( + NavigationMenuProvider, + { + scope: __scopeNavigationMenu, + isRootMenu: false, + value, + dir: context.dir, + orientation, + rootNavigationMenu: context.rootNavigationMenu, + onTriggerEnter: (itemValue) => setValue(itemValue), + onItemSelect: (itemValue) => setValue(itemValue), + onItemDismiss: () => setValue(""), + children: /* @__PURE__ */ jsx(Primitive.div, { "data-orientation": orientation, ...subProps, ref: forwardedRef }) + } + ); + } +); +NavigationMenuSub.displayName = SUB_NAME; +var NavigationMenuProvider = (props) => { + const { + scope, + isRootMenu, + rootNavigationMenu, + dir, + orientation, + children, + value, + onItemSelect, + onItemDismiss, + onTriggerEnter, + onTriggerLeave, + onContentEnter, + onContentLeave + } = props; + const [viewport, setViewport] = React.useState(null); + const [viewportContent, setViewportContent] = React.useState(/* @__PURE__ */ new Map()); + const [indicatorTrack, setIndicatorTrack] = React.useState(null); + return /* @__PURE__ */ jsx( + NavigationMenuProviderImpl, + { + scope, + isRootMenu, + rootNavigationMenu, + value, + previousValue: usePrevious(value), + baseId: useId(), + dir, + orientation, + viewport, + onViewportChange: setViewport, + indicatorTrack, + onIndicatorTrackChange: setIndicatorTrack, + onTriggerEnter: useCallbackRef(onTriggerEnter), + onTriggerLeave: useCallbackRef(onTriggerLeave), + onContentEnter: useCallbackRef(onContentEnter), + onContentLeave: useCallbackRef(onContentLeave), + onItemSelect: useCallbackRef(onItemSelect), + onItemDismiss: useCallbackRef(onItemDismiss), + onViewportContentChange: React.useCallback((contentValue, contentData) => { + setViewportContent((prevContent) => { + prevContent.set(contentValue, contentData); + return new Map(prevContent); + }); + }, []), + onViewportContentRemove: React.useCallback((contentValue) => { + setViewportContent((prevContent) => { + if (!prevContent.has(contentValue)) return prevContent; + prevContent.delete(contentValue); + return new Map(prevContent); + }); + }, []), + children: /* @__PURE__ */ jsx(Collection.Provider, { scope, children: /* @__PURE__ */ jsx(ViewportContentProvider, { scope, items: viewportContent, children }) }) + } + ); +}; +var LIST_NAME = "NavigationMenuList"; +var NavigationMenuList = React.forwardRef( + (props, forwardedRef) => { + const { __scopeNavigationMenu, ...listProps } = props; + const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu); + const list = /* @__PURE__ */ jsx(Primitive.ul, { "data-orientation": context.orientation, ...listProps, ref: forwardedRef }); + return /* @__PURE__ */ jsx(Primitive.div, { style: { position: "relative" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: list }) : list }) }); + } +); +NavigationMenuList.displayName = LIST_NAME; +var ITEM_NAME = "NavigationMenuItem"; +var [NavigationMenuItemContextProvider, useNavigationMenuItemContext] = createNavigationMenuContext(ITEM_NAME); +var NavigationMenuItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props; + const autoValue = useId(); + const value = valueProp || autoValue || "LEGACY_REACT_AUTO_VALUE"; + const contentRef = React.useRef(null); + const triggerRef = React.useRef(null); + const focusProxyRef = React.useRef(null); + const restoreContentTabOrderRef = React.useRef(() => { + }); + const wasEscapeCloseRef = React.useRef(false); + const handleContentEntry = React.useCallback((side = "start") => { + if (contentRef.current) { + restoreContentTabOrderRef.current(); + const candidates = getTabbableCandidates(contentRef.current); + if (candidates.length) focusFirst(side === "start" ? candidates : candidates.reverse()); + } + }, []); + const handleContentExit = React.useCallback(() => { + if (contentRef.current) { + const candidates = getTabbableCandidates(contentRef.current); + if (candidates.length) restoreContentTabOrderRef.current = removeFromTabOrder(candidates); + } + }, []); + return /* @__PURE__ */ jsx( + NavigationMenuItemContextProvider, + { + scope: __scopeNavigationMenu, + value, + triggerRef, + contentRef, + focusProxyRef, + wasEscapeCloseRef, + onEntryKeyDown: handleContentEntry, + onFocusProxyEnter: handleContentEntry, + onRootContentClose: handleContentExit, + onContentFocusOutside: handleContentExit, + children: /* @__PURE__ */ jsx(Primitive.li, { ...itemProps, ref: forwardedRef }) + } + ); + } +); +NavigationMenuItem.displayName = ITEM_NAME; +var TRIGGER_NAME = "NavigationMenuTrigger"; +var NavigationMenuTrigger = React.forwardRef((props, forwardedRef) => { + const { __scopeNavigationMenu, disabled, ...triggerProps } = props; + const context = useNavigationMenuContext(TRIGGER_NAME, props.__scopeNavigationMenu); + const itemContext = useNavigationMenuItemContext(TRIGGER_NAME, props.__scopeNavigationMenu); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(ref, itemContext.triggerRef, forwardedRef); + const triggerId = makeTriggerId(context.baseId, itemContext.value); + const contentId = makeContentId(context.baseId, itemContext.value); + const hasPointerMoveOpenedRef = React.useRef(false); + const wasClickCloseRef = React.useRef(false); + const open = itemContext.value === context.value; + return /* @__PURE__ */ jsxs(Fragment, { children: [ + /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeNavigationMenu, value: itemContext.value, children: /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx( + Primitive.button, + { + id: triggerId, + disabled, + "data-disabled": disabled ? "" : void 0, + "data-state": getOpenState(open), + "aria-expanded": open, + "aria-controls": contentId, + ...triggerProps, + ref: composedRefs, + onPointerEnter: composeEventHandlers(props.onPointerEnter, () => { + wasClickCloseRef.current = false; + itemContext.wasEscapeCloseRef.current = false; + }), + onPointerMove: composeEventHandlers( + props.onPointerMove, + whenMouse(() => { + if (disabled || wasClickCloseRef.current || itemContext.wasEscapeCloseRef.current || hasPointerMoveOpenedRef.current) + return; + context.onTriggerEnter(itemContext.value); + hasPointerMoveOpenedRef.current = true; + }) + ), + onPointerLeave: composeEventHandlers( + props.onPointerLeave, + whenMouse(() => { + if (disabled) return; + context.onTriggerLeave(); + hasPointerMoveOpenedRef.current = false; + }) + ), + onClick: composeEventHandlers(props.onClick, () => { + context.onItemSelect(itemContext.value); + wasClickCloseRef.current = open; + }), + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + const verticalEntryKey = context.dir === "rtl" ? "ArrowLeft" : "ArrowRight"; + const entryKey = { horizontal: "ArrowDown", vertical: verticalEntryKey }[context.orientation]; + if (open && event.key === entryKey) { + itemContext.onEntryKeyDown(); + event.preventDefault(); + } + }) + } + ) }) }), + open && /* @__PURE__ */ jsxs(Fragment, { children: [ + /* @__PURE__ */ jsx( + VisuallyHiddenPrimitive.Root, + { + "aria-hidden": true, + tabIndex: 0, + ref: itemContext.focusProxyRef, + onFocus: (event) => { + const content = itemContext.contentRef.current; + const prevFocusedElement = event.relatedTarget; + const wasTriggerFocused = prevFocusedElement === ref.current; + const wasFocusFromContent = content?.contains(prevFocusedElement); + if (wasTriggerFocused || !wasFocusFromContent) { + itemContext.onFocusProxyEnter(wasTriggerFocused ? "start" : "end"); + } + } + } + ), + context.viewport && /* @__PURE__ */ jsx("span", { "aria-owns": contentId }) + ] }) + ] }); +}); +NavigationMenuTrigger.displayName = TRIGGER_NAME; +var LINK_NAME = "NavigationMenuLink"; +var LINK_SELECT = "navigationMenu.linkSelect"; +var NavigationMenuLink = React.forwardRef( + (props, forwardedRef) => { + const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props; + return /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx( + Primitive.a, + { + "data-active": active ? "" : void 0, + "aria-current": active ? "page" : void 0, + ...linkProps, + ref: forwardedRef, + onClick: composeEventHandlers( + props.onClick, + (event) => { + const target = event.target; + const linkSelectEvent = new CustomEvent(LINK_SELECT, { + bubbles: true, + cancelable: true + }); + target.addEventListener(LINK_SELECT, (event2) => onSelect?.(event2), { once: true }); + dispatchDiscreteCustomEvent(target, linkSelectEvent); + if (!linkSelectEvent.defaultPrevented && !event.metaKey) { + const rootContentDismissEvent = new CustomEvent(ROOT_CONTENT_DISMISS, { + bubbles: true, + cancelable: true + }); + dispatchDiscreteCustomEvent(target, rootContentDismissEvent); + } + }, + { checkForDefaultPrevented: false } + ) + } + ) }); + } +); +NavigationMenuLink.displayName = LINK_NAME; +var INDICATOR_NAME = "NavigationMenuIndicator"; +var NavigationMenuIndicator = React.forwardRef((props, forwardedRef) => { + const { forceMount, ...indicatorProps } = props; + const context = useNavigationMenuContext(INDICATOR_NAME, props.__scopeNavigationMenu); + const isVisible = Boolean(context.value); + return context.indicatorTrack ? ReactDOM.createPortal( + /* @__PURE__ */ jsx(Presence, { present: forceMount || isVisible, children: /* @__PURE__ */ jsx(NavigationMenuIndicatorImpl, { ...indicatorProps, ref: forwardedRef }) }), + context.indicatorTrack + ) : null; +}); +NavigationMenuIndicator.displayName = INDICATOR_NAME; +var NavigationMenuIndicatorImpl = React.forwardRef((props, forwardedRef) => { + const { __scopeNavigationMenu, ...indicatorProps } = props; + const context = useNavigationMenuContext(INDICATOR_NAME, __scopeNavigationMenu); + const getItems = useCollection(__scopeNavigationMenu); + const [activeTrigger, setActiveTrigger] = React.useState( + null + ); + const [position, setPosition] = React.useState(null); + const isHorizontal = context.orientation === "horizontal"; + const isVisible = Boolean(context.value); + React.useEffect(() => { + const items = getItems(); + const triggerNode = items.find((item) => item.value === context.value)?.ref.current; + if (triggerNode) setActiveTrigger(triggerNode); + }, [getItems, context.value]); + const handlePositionChange = () => { + if (activeTrigger) { + setPosition({ + size: isHorizontal ? activeTrigger.offsetWidth : activeTrigger.offsetHeight, + offset: isHorizontal ? activeTrigger.offsetLeft : activeTrigger.offsetTop + }); + } + }; + useResizeObserver(activeTrigger, handlePositionChange); + useResizeObserver(context.indicatorTrack, handlePositionChange); + return position ? /* @__PURE__ */ jsx( + Primitive.div, + { + "aria-hidden": true, + "data-state": isVisible ? "visible" : "hidden", + "data-orientation": context.orientation, + ...indicatorProps, + ref: forwardedRef, + style: { + position: "absolute", + ...isHorizontal ? { + left: 0, + width: position.size + "px", + transform: `translateX(${position.offset}px)` + } : { + top: 0, + height: position.size + "px", + transform: `translateY(${position.offset}px)` + }, + ...indicatorProps.style + } + } + ) : null; +}); +var CONTENT_NAME = "NavigationMenuContent"; +var NavigationMenuContent = React.forwardRef((props, forwardedRef) => { + const { forceMount, ...contentProps } = props; + const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu); + const itemContext = useNavigationMenuItemContext(CONTENT_NAME, props.__scopeNavigationMenu); + const composedRefs = useComposedRefs(itemContext.contentRef, forwardedRef); + const open = itemContext.value === context.value; + const commonProps = { + value: itemContext.value, + triggerRef: itemContext.triggerRef, + focusProxyRef: itemContext.focusProxyRef, + wasEscapeCloseRef: itemContext.wasEscapeCloseRef, + onContentFocusOutside: itemContext.onContentFocusOutside, + onRootContentClose: itemContext.onRootContentClose, + ...contentProps + }; + return !context.viewport ? /* @__PURE__ */ jsx(Presence, { present: forceMount || open, children: /* @__PURE__ */ jsx( + NavigationMenuContentImpl, + { + "data-state": getOpenState(open), + ...commonProps, + ref: composedRefs, + onPointerEnter: composeEventHandlers(props.onPointerEnter, context.onContentEnter), + onPointerLeave: composeEventHandlers( + props.onPointerLeave, + whenMouse(context.onContentLeave) + ), + style: { + // Prevent interaction when animating out + pointerEvents: !open && context.isRootMenu ? "none" : void 0, + ...commonProps.style + } + } + ) }) : /* @__PURE__ */ jsx(ViewportContentMounter, { forceMount, ...commonProps, ref: composedRefs }); +}); +NavigationMenuContent.displayName = CONTENT_NAME; +var ViewportContentMounter = React.forwardRef((props, forwardedRef) => { + const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu); + const { onViewportContentChange, onViewportContentRemove } = context; + useLayoutEffect(() => { + onViewportContentChange(props.value, { + ref: forwardedRef, + ...props + }); + }, [props, forwardedRef, onViewportContentChange]); + useLayoutEffect(() => { + return () => onViewportContentRemove(props.value); + }, [props.value, onViewportContentRemove]); + return null; +}); +var ROOT_CONTENT_DISMISS = "navigationMenu.rootContentDismiss"; +var NavigationMenuContentImpl = React.forwardRef((props, forwardedRef) => { + const { + __scopeNavigationMenu, + value, + triggerRef, + focusProxyRef, + wasEscapeCloseRef, + onRootContentClose, + onContentFocusOutside, + ...contentProps + } = props; + const context = useNavigationMenuContext(CONTENT_NAME, __scopeNavigationMenu); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(ref, forwardedRef); + const triggerId = makeTriggerId(context.baseId, value); + const contentId = makeContentId(context.baseId, value); + const getItems = useCollection(__scopeNavigationMenu); + const prevMotionAttributeRef = React.useRef(null); + const { onItemDismiss } = context; + React.useEffect(() => { + const content = ref.current; + if (context.isRootMenu && content) { + const handleClose = () => { + onItemDismiss(); + onRootContentClose(); + if (content.contains(document.activeElement)) triggerRef.current?.focus(); + }; + content.addEventListener(ROOT_CONTENT_DISMISS, handleClose); + return () => content.removeEventListener(ROOT_CONTENT_DISMISS, handleClose); + } + }, [context.isRootMenu, props.value, triggerRef, onItemDismiss, onRootContentClose]); + const motionAttribute = React.useMemo(() => { + const items = getItems(); + const values = items.map((item) => item.value); + if (context.dir === "rtl") values.reverse(); + const index = values.indexOf(context.value); + const prevIndex = values.indexOf(context.previousValue); + const isSelected = value === context.value; + const wasSelected = prevIndex === values.indexOf(value); + if (!isSelected && !wasSelected) return prevMotionAttributeRef.current; + const attribute = (() => { + if (index !== prevIndex) { + if (isSelected && prevIndex !== -1) return index > prevIndex ? "from-end" : "from-start"; + if (wasSelected && index !== -1) return index > prevIndex ? "to-start" : "to-end"; + } + return null; + })(); + prevMotionAttributeRef.current = attribute; + return attribute; + }, [context.previousValue, context.value, context.dir, getItems, value]); + return /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: /* @__PURE__ */ jsx( + DismissableLayer, + { + id: contentId, + "aria-labelledby": triggerId, + "data-motion": motionAttribute, + "data-orientation": context.orientation, + ...contentProps, + ref: composedRefs, + disableOutsidePointerEvents: false, + onDismiss: () => { + const rootContentDismissEvent = new Event(ROOT_CONTENT_DISMISS, { + bubbles: true, + cancelable: true + }); + ref.current?.dispatchEvent(rootContentDismissEvent); + }, + onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => { + onContentFocusOutside(); + const target = event.target; + if (context.rootNavigationMenu?.contains(target)) event.preventDefault(); + }), + onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => { + const target = event.target; + const isTrigger = getItems().some((item) => item.ref.current?.contains(target)); + const isRootViewport = context.isRootMenu && context.viewport?.contains(target); + if (isTrigger || isRootViewport || !context.isRootMenu) event.preventDefault(); + }), + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + const isMetaKey = event.altKey || event.ctrlKey || event.metaKey; + const isTabKey = event.key === "Tab" && !isMetaKey; + if (isTabKey) { + const candidates = getTabbableCandidates(event.currentTarget); + const focusedElement = document.activeElement; + const index = candidates.findIndex((candidate) => candidate === focusedElement); + const isMovingBackwards = event.shiftKey; + const nextCandidates = isMovingBackwards ? candidates.slice(0, index).reverse() : candidates.slice(index + 1, candidates.length); + if (focusFirst(nextCandidates)) { + event.preventDefault(); + } else { + focusProxyRef.current?.focus(); + } + } + }), + onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (_event) => { + wasEscapeCloseRef.current = true; + }) + } + ) }); +}); +var VIEWPORT_NAME = "NavigationMenuViewport"; +var NavigationMenuViewport = React.forwardRef((props, forwardedRef) => { + const { forceMount, ...viewportProps } = props; + const context = useNavigationMenuContext(VIEWPORT_NAME, props.__scopeNavigationMenu); + const open = Boolean(context.value); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || open, children: /* @__PURE__ */ jsx(NavigationMenuViewportImpl, { ...viewportProps, ref: forwardedRef }) }); +}); +NavigationMenuViewport.displayName = VIEWPORT_NAME; +var NavigationMenuViewportImpl = React.forwardRef((props, forwardedRef) => { + const { __scopeNavigationMenu, children, ...viewportImplProps } = props; + const context = useNavigationMenuContext(VIEWPORT_NAME, __scopeNavigationMenu); + const composedRefs = useComposedRefs(forwardedRef, context.onViewportChange); + const viewportContentContext = useViewportContentContext( + CONTENT_NAME, + props.__scopeNavigationMenu + ); + const [size, setSize] = React.useState(null); + const [content, setContent] = React.useState(null); + const viewportWidth = size ? size?.width + "px" : void 0; + const viewportHeight = size ? size?.height + "px" : void 0; + const open = Boolean(context.value); + const activeContentValue = open ? context.value : context.previousValue; + const handleSizeChange = () => { + if (content) setSize({ width: content.offsetWidth, height: content.offsetHeight }); + }; + useResizeObserver(content, handleSizeChange); + return /* @__PURE__ */ jsx( + Primitive.div, + { + "data-state": getOpenState(open), + "data-orientation": context.orientation, + ...viewportImplProps, + ref: composedRefs, + style: { + // Prevent interaction when animating out + pointerEvents: !open && context.isRootMenu ? "none" : void 0, + ["--radix-navigation-menu-viewport-width"]: viewportWidth, + ["--radix-navigation-menu-viewport-height"]: viewportHeight, + ...viewportImplProps.style + }, + onPointerEnter: composeEventHandlers(props.onPointerEnter, context.onContentEnter), + onPointerLeave: composeEventHandlers(props.onPointerLeave, whenMouse(context.onContentLeave)), + children: Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props2 }]) => { + const isActive = activeContentValue === value; + return /* @__PURE__ */ jsx(Presence, { present: forceMount || isActive, children: /* @__PURE__ */ jsx( + NavigationMenuContentImpl, + { + ...props2, + ref: composeRefs(ref, (node) => { + if (isActive && node) setContent(node); + }) + } + ) }, value); + }) + } + ); +}); +var FOCUS_GROUP_NAME = "FocusGroup"; +var FocusGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeNavigationMenu, ...groupProps } = props; + const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu); + return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) }); + } +); +var ARROW_KEYS = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"]; +var FOCUS_GROUP_ITEM_NAME = "FocusGroupItem"; +var FocusGroupItem = React.forwardRef( + (props, forwardedRef) => { + const { __scopeNavigationMenu, ...groupProps } = props; + const getItems = useFocusGroupCollection(__scopeNavigationMenu); + const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu); + return /* @__PURE__ */ jsx(FocusGroupCollection.ItemSlot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx( + Primitive.button, + { + ...groupProps, + ref: forwardedRef, + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + const isFocusNavigationKey = ["Home", "End", ...ARROW_KEYS].includes(event.key); + if (isFocusNavigationKey) { + let candidateNodes = getItems().map((item) => item.ref.current); + const prevItemKey = context.dir === "rtl" ? "ArrowRight" : "ArrowLeft"; + const prevKeys = [prevItemKey, "ArrowUp", "End"]; + if (prevKeys.includes(event.key)) candidateNodes.reverse(); + if (ARROW_KEYS.includes(event.key)) { + const currentIndex = candidateNodes.indexOf(event.currentTarget); + candidateNodes = candidateNodes.slice(currentIndex + 1); + } + setTimeout(() => focusFirst(candidateNodes)); + event.preventDefault(); + } + }) + } + ) }); + } +); +function getTabbableCandidates(container) { + const nodes = []; + const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { + acceptNode: (node) => { + const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden"; + if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; + return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; + } + }); + while (walker.nextNode()) nodes.push(walker.currentNode); + return nodes; +} +function focusFirst(candidates) { + const previouslyFocusedElement = document.activeElement; + return candidates.some((candidate) => { + if (candidate === previouslyFocusedElement) return true; + candidate.focus(); + return document.activeElement !== previouslyFocusedElement; + }); +} +function removeFromTabOrder(candidates) { + candidates.forEach((candidate) => { + candidate.dataset.tabindex = candidate.getAttribute("tabindex") || ""; + candidate.setAttribute("tabindex", "-1"); + }); + return () => { + candidates.forEach((candidate) => { + const prevTabIndex = candidate.dataset.tabindex; + candidate.setAttribute("tabindex", prevTabIndex); + }); + }; +} +function useResizeObserver(element, onResize) { + const handleResize = useCallbackRef(onResize); + useLayoutEffect(() => { + let rAF = 0; + if (element) { + const resizeObserver = new ResizeObserver(() => { + cancelAnimationFrame(rAF); + rAF = window.requestAnimationFrame(handleResize); + }); + resizeObserver.observe(element); + return () => { + window.cancelAnimationFrame(rAF); + resizeObserver.unobserve(element); + }; + } + }, [element, handleResize]); +} +function getOpenState(open) { + return open ? "open" : "closed"; +} +function makeTriggerId(baseId, value) { + return `${baseId}-trigger-${value}`; +} +function makeContentId(baseId, value) { + return `${baseId}-content-${value}`; +} +function whenMouse(handler) { + return (event) => event.pointerType === "mouse" ? handler(event) : void 0; +} +var Root2 = NavigationMenu; +var Sub = NavigationMenuSub; +var List = NavigationMenuList; +var Item = NavigationMenuItem; +var Trigger = NavigationMenuTrigger; +var Link = NavigationMenuLink; +var Indicator = NavigationMenuIndicator; +var Content = NavigationMenuContent; +var Viewport = NavigationMenuViewport; +export { + Content, + Indicator, + Item, + Link, + List, + NavigationMenu, + NavigationMenuContent, + NavigationMenuIndicator, + NavigationMenuItem, + NavigationMenuLink, + NavigationMenuList, + NavigationMenuSub, + NavigationMenuTrigger, + NavigationMenuViewport, + Root2 as Root, + Sub, + Trigger, + Viewport, + createNavigationMenuScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..d74099a903adf02d93d9093edc7d6f822614accf --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/navigation-menu.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { composeRefs, useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { Presence } from '@radix-ui/react-presence';\nimport { useId } from '@radix-ui/react-id';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Orientation = 'vertical' | 'horizontal';\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAVIGATION_MENU_NAME = 'NavigationMenu';\n\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n NavigationMenuTriggerElement,\n { value: string }\n>(NAVIGATION_MENU_NAME);\n\nconst [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] =\n createCollection(NAVIGATION_MENU_NAME);\n\ntype ScopedProps

= P & { __scopeNavigationMenu?: Scope };\nconst [createNavigationMenuContext, createNavigationMenuScope] = createContextScope(\n NAVIGATION_MENU_NAME,\n [createCollectionScope, createFocusGroupCollectionScope]\n);\n\ntype ContentData = {\n ref?: React.Ref;\n} & ViewportContentMounterProps;\n\ntype NavigationMenuContextValue = {\n isRootMenu: boolean;\n value: string;\n previousValue: string;\n baseId: string;\n dir: Direction;\n orientation: Orientation;\n rootNavigationMenu: NavigationMenuElement | null;\n indicatorTrack: HTMLDivElement | null;\n onIndicatorTrackChange(indicatorTrack: HTMLDivElement | null): void;\n viewport: NavigationMenuViewportElement | null;\n onViewportChange(viewport: NavigationMenuViewportElement | null): void;\n onViewportContentChange(contentValue: string, contentData: ContentData): void;\n onViewportContentRemove(contentValue: string): void;\n onTriggerEnter(itemValue: string): void;\n onTriggerLeave(): void;\n onContentEnter(): void;\n onContentLeave(): void;\n onItemSelect(itemValue: string): void;\n onItemDismiss(): void;\n};\n\nconst [NavigationMenuProviderImpl, useNavigationMenuContext] =\n createNavigationMenuContext(NAVIGATION_MENU_NAME);\n\nconst [ViewportContentProvider, useViewportContentContext] = createNavigationMenuContext<{\n items: Map;\n}>(NAVIGATION_MENU_NAME);\n\ntype NavigationMenuElement = React.ComponentRef;\ntype PrimitiveNavProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuProps\n extends Omit,\n PrimitiveNavProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n dir?: Direction;\n orientation?: Orientation;\n /**\n * The duration from when the pointer enters the trigger until the tooltip gets opened.\n * @defaultValue 200\n */\n delayDuration?: number;\n /**\n * How much time a user has to enter another trigger without incurring a delay again.\n * @defaultValue 300\n */\n skipDelayDuration?: number;\n}\n\nconst NavigationMenu = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value: valueProp,\n onValueChange,\n defaultValue,\n delayDuration = 200,\n skipDelayDuration = 300,\n orientation = 'horizontal',\n dir,\n ...NavigationMenuProps\n } = props;\n const [navigationMenu, setNavigationMenu] = React.useState(null);\n const composedRef = useComposedRefs(forwardedRef, (node) => setNavigationMenu(node));\n const direction = useDirection(dir);\n const openTimerRef = React.useRef(0);\n const closeTimerRef = React.useRef(0);\n const skipDelayTimerRef = React.useRef(0);\n const [isOpenDelayed, setIsOpenDelayed] = React.useState(true);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: (value) => {\n const isOpen = value !== '';\n const hasSkipDelayDuration = skipDelayDuration > 0;\n\n if (isOpen) {\n window.clearTimeout(skipDelayTimerRef.current);\n if (hasSkipDelayDuration) setIsOpenDelayed(false);\n } else {\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(\n () => setIsOpenDelayed(true),\n skipDelayDuration\n );\n }\n\n onValueChange?.(value);\n },\n defaultProp: defaultValue ?? '',\n caller: NAVIGATION_MENU_NAME,\n });\n\n const startCloseTimer = React.useCallback(() => {\n window.clearTimeout(closeTimerRef.current);\n closeTimerRef.current = window.setTimeout(() => setValue(''), 150);\n }, [setValue]);\n\n const handleOpen = React.useCallback(\n (itemValue: string) => {\n window.clearTimeout(closeTimerRef.current);\n setValue(itemValue);\n },\n [setValue]\n );\n\n const handleDelayedOpen = React.useCallback(\n (itemValue: string) => {\n const isOpenItem = value === itemValue;\n if (isOpenItem) {\n // If the item is already open (e.g. we're transitioning from the content to the trigger)\n // then we want to clear the close timer immediately.\n window.clearTimeout(closeTimerRef.current);\n } else {\n openTimerRef.current = window.setTimeout(() => {\n window.clearTimeout(closeTimerRef.current);\n setValue(itemValue);\n }, delayDuration);\n }\n },\n [value, setValue, delayDuration]\n );\n\n React.useEffect(() => {\n return () => {\n window.clearTimeout(openTimerRef.current);\n window.clearTimeout(closeTimerRef.current);\n window.clearTimeout(skipDelayTimerRef.current);\n };\n }, []);\n\n return (\n {\n window.clearTimeout(openTimerRef.current);\n if (isOpenDelayed) handleDelayedOpen(itemValue);\n else handleOpen(itemValue);\n }}\n onTriggerLeave={() => {\n window.clearTimeout(openTimerRef.current);\n startCloseTimer();\n }}\n onContentEnter={() => window.clearTimeout(closeTimerRef.current)}\n onContentLeave={startCloseTimer}\n onItemSelect={(itemValue) => {\n setValue((prevValue) => (prevValue === itemValue ? '' : itemValue));\n }}\n onItemDismiss={() => setValue('')}\n >\n \n \n );\n }\n);\n\nNavigationMenu.displayName = NAVIGATION_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'NavigationMenuSub';\n\ntype NavigationMenuSubElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuSubProps\n extends Omit,\n PrimitiveDivProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n orientation?: Orientation;\n}\n\nconst NavigationMenuSub = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = 'horizontal',\n ...subProps\n } = props;\n const context = useNavigationMenuContext(SUB_NAME, __scopeNavigationMenu);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? '',\n caller: SUB_NAME,\n });\n\n return (\n setValue(itemValue)}\n onItemSelect={(itemValue) => setValue(itemValue)}\n onItemDismiss={() => setValue('')}\n >\n \n \n );\n }\n);\n\nNavigationMenuSub.displayName = SUB_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ninterface NavigationMenuProviderPrivateProps {\n isRootMenu: boolean;\n scope: Scope;\n children: React.ReactNode;\n orientation: Orientation;\n dir: Direction;\n rootNavigationMenu: NavigationMenuElement | null;\n value: string;\n onTriggerEnter(itemValue: string): void;\n onTriggerLeave?(): void;\n onContentEnter?(): void;\n onContentLeave?(): void;\n onItemSelect(itemValue: string): void;\n onItemDismiss(): void;\n}\n\ninterface NavigationMenuProviderProps extends NavigationMenuProviderPrivateProps {}\n\nconst NavigationMenuProvider: React.FC = (\n props: ScopedProps\n) => {\n const {\n scope,\n isRootMenu,\n rootNavigationMenu,\n dir,\n orientation,\n children,\n value,\n onItemSelect,\n onItemDismiss,\n onTriggerEnter,\n onTriggerLeave,\n onContentEnter,\n onContentLeave,\n } = props;\n const [viewport, setViewport] = React.useState(null);\n const [viewportContent, setViewportContent] = React.useState>(new Map());\n const [indicatorTrack, setIndicatorTrack] = React.useState(null);\n\n return (\n {\n setViewportContent((prevContent) => {\n prevContent.set(contentValue, contentData);\n return new Map(prevContent);\n });\n }, [])}\n onViewportContentRemove={React.useCallback((contentValue) => {\n setViewportContent((prevContent) => {\n if (!prevContent.has(contentValue)) return prevContent;\n prevContent.delete(contentValue);\n return new Map(prevContent);\n });\n }, [])}\n >\n \n \n {children}\n \n \n \n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuList\n * -----------------------------------------------------------------------------------------------*/\n\nconst LIST_NAME = 'NavigationMenuList';\n\ntype NavigationMenuListElement = React.ComponentRef;\ntype PrimitiveUnorderedListProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuListProps extends PrimitiveUnorderedListProps {}\n\nconst NavigationMenuList = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, ...listProps } = props;\n const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu);\n\n const list = (\n \n );\n\n return (\n \n \n {context.isRootMenu ? {list} : list}\n \n \n );\n }\n);\n\nNavigationMenuList.displayName = LIST_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'NavigationMenuItem';\n\ntype FocusProxyElement = React.ComponentRef;\n\ntype NavigationMenuItemContextValue = {\n value: string;\n triggerRef: React.RefObject;\n contentRef: React.RefObject;\n focusProxyRef: React.RefObject;\n wasEscapeCloseRef: React.MutableRefObject;\n onEntryKeyDown(): void;\n onFocusProxyEnter(side: 'start' | 'end'): void;\n onRootContentClose(): void;\n onContentFocusOutside(): void;\n};\n\nconst [NavigationMenuItemContextProvider, useNavigationMenuItemContext] =\n createNavigationMenuContext(ITEM_NAME);\n\ntype NavigationMenuItemElement = React.ComponentRef;\ntype PrimitiveListItemProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuItemProps extends PrimitiveListItemProps {\n value?: string;\n}\n\nconst NavigationMenuItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props;\n const autoValue = useId();\n // We need to provide an initial deterministic value as `useId` will return\n // empty string on the first render and we don't want to match our internal \"closed\" value.\n const value = valueProp || autoValue || 'LEGACY_REACT_AUTO_VALUE';\n const contentRef = React.useRef(null);\n const triggerRef = React.useRef(null);\n const focusProxyRef = React.useRef(null);\n const restoreContentTabOrderRef = React.useRef(() => {});\n const wasEscapeCloseRef = React.useRef(false);\n\n const handleContentEntry = React.useCallback((side = 'start') => {\n if (contentRef.current) {\n restoreContentTabOrderRef.current();\n const candidates = getTabbableCandidates(contentRef.current);\n if (candidates.length) focusFirst(side === 'start' ? candidates : candidates.reverse());\n }\n }, []);\n\n const handleContentExit = React.useCallback(() => {\n if (contentRef.current) {\n const candidates = getTabbableCandidates(contentRef.current);\n if (candidates.length) restoreContentTabOrderRef.current = removeFromTabOrder(candidates);\n }\n }, []);\n\n return (\n \n \n \n );\n }\n);\n\nNavigationMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'NavigationMenuTrigger';\n\ntype NavigationMenuTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuTriggerProps extends PrimitiveButtonProps {}\n\nconst NavigationMenuTrigger = React.forwardRef<\n NavigationMenuTriggerElement,\n NavigationMenuTriggerProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, disabled, ...triggerProps } = props;\n const context = useNavigationMenuContext(TRIGGER_NAME, props.__scopeNavigationMenu);\n const itemContext = useNavigationMenuItemContext(TRIGGER_NAME, props.__scopeNavigationMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, itemContext.triggerRef, forwardedRef);\n const triggerId = makeTriggerId(context.baseId, itemContext.value);\n const contentId = makeContentId(context.baseId, itemContext.value);\n const hasPointerMoveOpenedRef = React.useRef(false);\n const wasClickCloseRef = React.useRef(false);\n const open = itemContext.value === context.value;\n\n return (\n <>\n \n \n {\n wasClickCloseRef.current = false;\n itemContext.wasEscapeCloseRef.current = false;\n })}\n onPointerMove={composeEventHandlers(\n props.onPointerMove,\n whenMouse(() => {\n if (\n disabled ||\n wasClickCloseRef.current ||\n itemContext.wasEscapeCloseRef.current ||\n hasPointerMoveOpenedRef.current\n )\n return;\n context.onTriggerEnter(itemContext.value);\n hasPointerMoveOpenedRef.current = true;\n })\n )}\n onPointerLeave={composeEventHandlers(\n props.onPointerLeave,\n whenMouse(() => {\n if (disabled) return;\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n })\n )}\n onClick={composeEventHandlers(props.onClick, () => {\n context.onItemSelect(itemContext.value);\n wasClickCloseRef.current = open;\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n const verticalEntryKey = context.dir === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n const entryKey = { horizontal: 'ArrowDown', vertical: verticalEntryKey }[\n context.orientation\n ];\n if (open && event.key === entryKey) {\n itemContext.onEntryKeyDown();\n // Prevent FocusGroupItem from handling the event\n event.preventDefault();\n }\n })}\n />\n \n \n\n {/* Proxy tab order between trigger and content */}\n {open && (\n <>\n {\n const content = itemContext.contentRef.current;\n const prevFocusedElement = event.relatedTarget as HTMLElement | null;\n const wasTriggerFocused = prevFocusedElement === ref.current;\n const wasFocusFromContent = content?.contains(prevFocusedElement);\n\n if (wasTriggerFocused || !wasFocusFromContent) {\n itemContext.onFocusProxyEnter(wasTriggerFocused ? 'start' : 'end');\n }\n }}\n />\n\n {/* Restructure a11y tree to make content accessible to screen reader when using the viewport */}\n {context.viewport && }\n \n )}\n \n );\n});\n\nNavigationMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuLink\n * -----------------------------------------------------------------------------------------------*/\n\nconst LINK_NAME = 'NavigationMenuLink';\nconst LINK_SELECT = 'navigationMenu.linkSelect';\n\ntype NavigationMenuLinkElement = React.ComponentRef;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef;\ninterface NavigationMenuLinkProps extends Omit {\n active?: boolean;\n onSelect?: (event: Event) => void;\n}\n\nconst NavigationMenuLink = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props;\n\n return (\n \n {\n const target = event.target as HTMLElement;\n const linkSelectEvent = new CustomEvent(LINK_SELECT, {\n bubbles: true,\n cancelable: true,\n });\n target.addEventListener(LINK_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(target, linkSelectEvent);\n\n if (!linkSelectEvent.defaultPrevented && !event.metaKey) {\n const rootContentDismissEvent = new CustomEvent(ROOT_CONTENT_DISMISS, {\n bubbles: true,\n cancelable: true,\n });\n dispatchDiscreteCustomEvent(target, rootContentDismissEvent);\n }\n },\n { checkForDefaultPrevented: false }\n )}\n />\n \n );\n }\n);\n\nNavigationMenuLink.displayName = LINK_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'NavigationMenuIndicator';\n\ntype NavigationMenuIndicatorElement = NavigationMenuIndicatorImplElement;\ninterface NavigationMenuIndicatorProps extends NavigationMenuIndicatorImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst NavigationMenuIndicator = React.forwardRef<\n NavigationMenuIndicatorElement,\n NavigationMenuIndicatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { forceMount, ...indicatorProps } = props;\n const context = useNavigationMenuContext(INDICATOR_NAME, props.__scopeNavigationMenu);\n const isVisible = Boolean(context.value);\n\n return context.indicatorTrack\n ? ReactDOM.createPortal(\n \n \n ,\n context.indicatorTrack\n )\n : null;\n});\n\nNavigationMenuIndicator.displayName = INDICATOR_NAME;\n\ntype NavigationMenuIndicatorImplElement = React.ComponentRef;\ninterface NavigationMenuIndicatorImplProps extends PrimitiveDivProps {}\n\nconst NavigationMenuIndicatorImpl = React.forwardRef<\n NavigationMenuIndicatorImplElement,\n NavigationMenuIndicatorImplProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, ...indicatorProps } = props;\n const context = useNavigationMenuContext(INDICATOR_NAME, __scopeNavigationMenu);\n const getItems = useCollection(__scopeNavigationMenu);\n const [activeTrigger, setActiveTrigger] = React.useState(\n null\n );\n const [position, setPosition] = React.useState<{ size: number; offset: number } | null>(null);\n const isHorizontal = context.orientation === 'horizontal';\n const isVisible = Boolean(context.value);\n\n React.useEffect(() => {\n const items = getItems();\n const triggerNode = items.find((item) => item.value === context.value)?.ref.current;\n if (triggerNode) setActiveTrigger(triggerNode);\n }, [getItems, context.value]);\n\n /**\n * Update position when the indicator or parent track size changes\n */\n const handlePositionChange = () => {\n if (activeTrigger) {\n setPosition({\n size: isHorizontal ? activeTrigger.offsetWidth : activeTrigger.offsetHeight,\n offset: isHorizontal ? activeTrigger.offsetLeft : activeTrigger.offsetTop,\n });\n }\n };\n useResizeObserver(activeTrigger, handlePositionChange);\n useResizeObserver(context.indicatorTrack, handlePositionChange);\n\n // We need to wait for the indicator position to be available before rendering to\n // snap immediately into position rather than transitioning from initial\n return position ? (\n \n ) : null;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'NavigationMenuContent';\n\ntype NavigationMenuContentElement = NavigationMenuContentImplElement;\ninterface NavigationMenuContentProps\n extends Omit {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst NavigationMenuContent = React.forwardRef<\n NavigationMenuContentElement,\n NavigationMenuContentProps\n>((props: ScopedProps, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const itemContext = useNavigationMenuItemContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const composedRefs = useComposedRefs(itemContext.contentRef, forwardedRef);\n const open = itemContext.value === context.value;\n\n const commonProps = {\n value: itemContext.value,\n triggerRef: itemContext.triggerRef,\n focusProxyRef: itemContext.focusProxyRef,\n wasEscapeCloseRef: itemContext.wasEscapeCloseRef,\n onContentFocusOutside: itemContext.onContentFocusOutside,\n onRootContentClose: itemContext.onRootContentClose,\n ...contentProps,\n };\n\n return !context.viewport ? (\n \n \n \n ) : (\n \n );\n});\n\nNavigationMenuContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ViewportContentMounterElement = NavigationMenuContentImplElement;\ninterface ViewportContentMounterProps extends NavigationMenuContentImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst ViewportContentMounter = React.forwardRef<\n ViewportContentMounterElement,\n ViewportContentMounterProps\n>((props: ScopedProps, forwardedRef) => {\n const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const { onViewportContentChange, onViewportContentRemove } = context;\n\n useLayoutEffect(() => {\n onViewportContentChange(props.value, {\n ref: forwardedRef,\n ...props,\n });\n }, [props, forwardedRef, onViewportContentChange]);\n\n useLayoutEffect(() => {\n return () => onViewportContentRemove(props.value);\n }, [props.value, onViewportContentRemove]);\n\n // Content is proxied into the viewport\n return null;\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst ROOT_CONTENT_DISMISS = 'navigationMenu.rootContentDismiss';\n\ntype MotionAttribute = 'to-start' | 'to-end' | 'from-start' | 'from-end';\ntype NavigationMenuContentImplElement = React.ComponentRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\n\ninterface NavigationMenuContentImplPrivateProps {\n value: string;\n triggerRef: React.RefObject;\n focusProxyRef: React.RefObject;\n wasEscapeCloseRef: React.MutableRefObject;\n onContentFocusOutside(): void;\n onRootContentClose(): void;\n}\ninterface NavigationMenuContentImplProps\n extends Omit,\n NavigationMenuContentImplPrivateProps {}\n\nconst NavigationMenuContentImpl = React.forwardRef<\n NavigationMenuContentImplElement,\n NavigationMenuContentImplProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value,\n triggerRef,\n focusProxyRef,\n wasEscapeCloseRef,\n onRootContentClose,\n onContentFocusOutside,\n ...contentProps\n } = props;\n const context = useNavigationMenuContext(CONTENT_NAME, __scopeNavigationMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const getItems = useCollection(__scopeNavigationMenu);\n const prevMotionAttributeRef = React.useRef(null);\n\n const { onItemDismiss } = context;\n\n React.useEffect(() => {\n const content = ref.current;\n\n // Bubble dismiss to the root content node and focus its trigger\n if (context.isRootMenu && content) {\n const handleClose = () => {\n onItemDismiss();\n onRootContentClose();\n if (content.contains(document.activeElement)) triggerRef.current?.focus();\n };\n content.addEventListener(ROOT_CONTENT_DISMISS, handleClose);\n return () => content.removeEventListener(ROOT_CONTENT_DISMISS, handleClose);\n }\n }, [context.isRootMenu, props.value, triggerRef, onItemDismiss, onRootContentClose]);\n\n const motionAttribute = React.useMemo(() => {\n const items = getItems();\n const values = items.map((item) => item.value);\n if (context.dir === 'rtl') values.reverse();\n const index = values.indexOf(context.value);\n const prevIndex = values.indexOf(context.previousValue);\n const isSelected = value === context.value;\n const wasSelected = prevIndex === values.indexOf(value);\n\n // We only want to update selected and the last selected content\n // this avoids animations being interrupted outside of that range\n if (!isSelected && !wasSelected) return prevMotionAttributeRef.current;\n\n const attribute = (() => {\n // Don't provide a direction on the initial open\n if (index !== prevIndex) {\n // If we're moving to this item from another\n if (isSelected && prevIndex !== -1) return index > prevIndex ? 'from-end' : 'from-start';\n // If we're leaving this item for another\n if (wasSelected && index !== -1) return index > prevIndex ? 'to-start' : 'to-end';\n }\n // Otherwise we're entering from closed or leaving the list\n // entirely and should not animate in any direction\n return null;\n })();\n\n prevMotionAttributeRef.current = attribute;\n return attribute;\n }, [context.previousValue, context.value, context.dir, getItems, value]);\n\n return (\n \n {\n const rootContentDismissEvent = new Event(ROOT_CONTENT_DISMISS, {\n bubbles: true,\n cancelable: true,\n });\n ref.current?.dispatchEvent(rootContentDismissEvent);\n }}\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) => {\n onContentFocusOutside();\n const target = event.target as HTMLElement;\n // Only dismiss content when focus moves outside of the menu\n if (context.rootNavigationMenu?.contains(target)) event.preventDefault();\n })}\n onPointerDownOutside={composeEventHandlers(props.onPointerDownOutside, (event) => {\n const target = event.target as HTMLElement;\n const isTrigger = getItems().some((item) => item.ref.current?.contains(target));\n const isRootViewport = context.isRootMenu && context.viewport?.contains(target);\n if (isTrigger || isRootViewport || !context.isRootMenu) event.preventDefault();\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;\n const isTabKey = event.key === 'Tab' && !isMetaKey;\n if (isTabKey) {\n const candidates = getTabbableCandidates(event.currentTarget);\n const focusedElement = document.activeElement;\n const index = candidates.findIndex((candidate) => candidate === focusedElement);\n const isMovingBackwards = event.shiftKey;\n const nextCandidates = isMovingBackwards\n ? candidates.slice(0, index).reverse()\n : candidates.slice(index + 1, candidates.length);\n\n if (focusFirst(nextCandidates)) {\n // prevent browser tab keydown because we've handled focus\n event.preventDefault();\n } else {\n // If we can't focus that means we're at the edges\n // so focus the proxy and let browser handle\n // tab/shift+tab keypress on the proxy instead\n focusProxyRef.current?.focus();\n }\n }\n })}\n onEscapeKeyDown={composeEventHandlers(props.onEscapeKeyDown, (_event) => {\n // prevent the dropdown from reopening\n // after the escape key has been pressed\n wasEscapeCloseRef.current = true;\n })}\n />\n \n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * NavigationMenuViewport\n * -----------------------------------------------------------------------------------------------*/\n\nconst VIEWPORT_NAME = 'NavigationMenuViewport';\n\ntype NavigationMenuViewportElement = NavigationMenuViewportImplElement;\ninterface NavigationMenuViewportProps\n extends Omit {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst NavigationMenuViewport = React.forwardRef<\n NavigationMenuViewportElement,\n NavigationMenuViewportProps\n>((props: ScopedProps, forwardedRef) => {\n const { forceMount, ...viewportProps } = props;\n const context = useNavigationMenuContext(VIEWPORT_NAME, props.__scopeNavigationMenu);\n const open = Boolean(context.value);\n\n return (\n \n \n \n );\n});\n\nNavigationMenuViewport.displayName = VIEWPORT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype NavigationMenuViewportImplElement = React.ComponentRef;\ninterface NavigationMenuViewportImplProps extends PrimitiveDivProps {}\n\nconst NavigationMenuViewportImpl = React.forwardRef<\n NavigationMenuViewportImplElement,\n NavigationMenuViewportImplProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, children, ...viewportImplProps } = props;\n const context = useNavigationMenuContext(VIEWPORT_NAME, __scopeNavigationMenu);\n const composedRefs = useComposedRefs(forwardedRef, context.onViewportChange);\n const viewportContentContext = useViewportContentContext(\n CONTENT_NAME,\n props.__scopeNavigationMenu\n );\n const [size, setSize] = React.useState<{ width: number; height: number } | null>(null);\n const [content, setContent] = React.useState(null);\n const viewportWidth = size ? size?.width + 'px' : undefined;\n const viewportHeight = size ? size?.height + 'px' : undefined;\n const open = Boolean(context.value);\n // We persist the last active content value as the viewport may be animating out\n // and we want the content to remain mounted for the lifecycle of the viewport.\n const activeContentValue = open ? context.value : context.previousValue;\n\n /**\n * Update viewport size to match the active content node.\n * We prefer offset dimensions over `getBoundingClientRect` as the latter respects CSS transform.\n * For example, if content animates in from `scale(0.5)` the dimensions would be anything\n * from `0.5` to `1` of the intended size.\n */\n const handleSizeChange = () => {\n if (content) setSize({ width: content.offsetWidth, height: content.offsetHeight });\n };\n useResizeObserver(content, handleSizeChange);\n\n return (\n \n {Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props }]) => {\n const isActive = activeContentValue === value;\n return (\n \n {\n // We only want to update the stored node when another is available\n // as we need to smoothly transition between them.\n if (isActive && node) setContent(node);\n })}\n />\n \n );\n })}\n \n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst FOCUS_GROUP_NAME = 'FocusGroup';\n\ntype FocusGroupElement = React.ComponentRef;\ninterface FocusGroupProps extends PrimitiveDivProps {}\n\nconst FocusGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, ...groupProps } = props;\n const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu);\n\n return (\n \n \n \n \n \n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_KEYS = ['ArrowRight', 'ArrowLeft', 'ArrowUp', 'ArrowDown'];\nconst FOCUS_GROUP_ITEM_NAME = 'FocusGroupItem';\n\ntype FocusGroupItemElement = React.ComponentRef;\ninterface FocusGroupItemProps extends PrimitiveButtonProps {}\n\nconst FocusGroupItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeNavigationMenu, ...groupProps } = props;\n const getItems = useFocusGroupCollection(__scopeNavigationMenu);\n const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);\n\n return (\n \n {\n const isFocusNavigationKey = ['Home', 'End', ...ARROW_KEYS].includes(event.key);\n if (isFocusNavigationKey) {\n let candidateNodes = getItems().map((item) => item.ref.current!);\n const prevItemKey = context.dir === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n const prevKeys = [prevItemKey, 'ArrowUp', 'End'];\n if (prevKeys.includes(event.key)) candidateNodes.reverse();\n if (ARROW_KEYS.includes(event.key)) {\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = candidateNodes.slice(currentIndex + 1);\n }\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => focusFirst(candidateNodes));\n\n // Prevent page scroll while navigating\n event.preventDefault();\n }\n })}\n />\n \n );\n }\n);\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nfunction getTabbableCandidates(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n\nfunction focusFirst(candidates: HTMLElement[]) {\n const previouslyFocusedElement = document.activeElement;\n return candidates.some((candidate) => {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === previouslyFocusedElement) return true;\n candidate.focus();\n return document.activeElement !== previouslyFocusedElement;\n });\n}\n\nfunction removeFromTabOrder(candidates: HTMLElement[]) {\n candidates.forEach((candidate) => {\n candidate.dataset.tabindex = candidate.getAttribute('tabindex') || '';\n candidate.setAttribute('tabindex', '-1');\n });\n return () => {\n candidates.forEach((candidate) => {\n const prevTabIndex = candidate.dataset.tabindex as string;\n candidate.setAttribute('tabindex', prevTabIndex);\n });\n };\n}\n\nfunction useResizeObserver(element: HTMLElement | null, onResize: () => void) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n /**\n * Resize Observer will throw an often benign error that says `ResizeObserver loop\n * completed with undelivered notifications`. This means that ResizeObserver was not\n * able to deliver all observations within a single animation frame, so we use\n * `requestAnimationFrame` to ensure we don't deliver unnecessary observations.\n * Further reading: https://github.com/WICG/resize-observer/issues/38\n */\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\n\nfunction getOpenState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nfunction makeTriggerId(baseId: string, value: string) {\n return `${baseId}-trigger-${value}`;\n}\n\nfunction makeContentId(baseId: string, value: string) {\n return `${baseId}-content-${value}`;\n}\n\nfunction whenMouse(handler: React.PointerEventHandler): React.PointerEventHandler {\n return (event) => (event.pointerType === 'mouse' ? handler(event) : undefined);\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = NavigationMenu;\nconst Sub = NavigationMenuSub;\nconst List = NavigationMenuList;\nconst Item = NavigationMenuItem;\nconst Trigger = NavigationMenuTrigger;\nconst Link = NavigationMenuLink;\nconst Indicator = NavigationMenuIndicator;\nconst Content = NavigationMenuContent;\nconst Viewport = NavigationMenuViewport;\n\nexport {\n createNavigationMenuScope,\n //\n NavigationMenu,\n NavigationMenuSub,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuContent,\n NavigationMenuViewport,\n //\n Root,\n Sub,\n List,\n Item,\n Trigger,\n Link,\n Indicator,\n Content,\n Viewport,\n};\nexport type {\n NavigationMenuProps,\n NavigationMenuSubProps,\n NavigationMenuListProps,\n NavigationMenuItemProps,\n NavigationMenuTriggerProps,\n NavigationMenuLinkProps,\n NavigationMenuIndicatorProps,\n NavigationMenuContentProps,\n NavigationMenuViewportProps,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,OAAO,cAAc;AACrB,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,WAAW,mCAAmC;AACvD,SAAS,4BAA4B;AACrC,SAAS,aAAa,uBAAuB;AAC7C,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AACzB,SAAS,aAAa;AACtB,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,YAAY,6BAA6B;AA2LjC,SA4VA,UA5VA,KA4VA,YA5VA;AAhLR,IAAM,uBAAuB;AAE7B,IAAM,CAAC,YAAY,eAAe,qBAAqB,IAAI,iBAGzD,oBAAoB;AAEtB,IAAM,CAAC,sBAAsB,yBAAyB,+BAA+B,IACnF,iBAA4C,oBAAoB;AAGlE,IAAM,CAAC,6BAA6B,yBAAyB,IAAI;AAAA,EAC/D;AAAA,EACA,CAAC,uBAAuB,+BAA+B;AACzD;AA4BA,IAAM,CAAC,4BAA4B,wBAAwB,IACzD,4BAAwD,oBAAoB;AAE9E,IAAM,CAAC,yBAAyB,yBAAyB,IAAI,4BAE1D,oBAAoB;AAwBvB,IAAM,iBAAuB;AAAA,EAC3B,CAAC,OAAyC,iBAAiB;AACzD,UAAM;AAAA,MACJ;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,MACpB,cAAc;AAAA,MACd;AAAA,MACA,G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aAAO,MAAM;AACX,eAAO,qBAAqB,GAAG;AAC/B,uBAAe,UAAU,OAAO;AAAA,MAClC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,SAAS,YAAY,CAAC;AAC5B;AAEA,SAAS,aAAa,MAAe;AACnC,SAAO,OAAO,SAAS;AACzB;AAEA,SAAS,cAAc,QAAgB,OAAe;AACpD,SAAO,GAAG,MAAM,YAAY,KAAK;AACnC;AAEA,SAAS,cAAc,QAAgB,OAAe;AACpD,SAAO,GAAG,MAAM,YAAY,KAAK;AACnC;AAEA,SAAS,UAAa,SAAqE;AACzF,SAAO,CAAC,UAAW,MAAM,gBAAgB,UAAU,QAAQ,KAAK,IAAI;AACtE;AAIA,IAAMC,QAAO;AACb,IAAM,MAAM;AACZ,IAAM,OAAO;AACb,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAM,OAAO;AACb,IAAM,YAAY;AAClB,IAAM,UAAU;AAChB,IAAM,WAAW;", + "names": ["value", "event", "props", "Root"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/package.json b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/package.json new file mode 100644 index 0000000000000000000000000000000000000000..031eab967030468c83786b51d03d53f3ec3894a2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-navigation-menu@1.2.14_@types+react-dom@19.1.7_@types+react@19.1.9__@ty_0e95f014d73259ce7f4fff555f010711/node_modules/@radix-ui/react-navigation-menu/package.json @@ -0,0 +1,81 @@ +{ + "name": "@radix-ui/react-navigation-menu", + "version": "1.2.14", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-collection": "1.1.7", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-dismissable-layer": "1.1.11", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-callback-ref": "1.1.1", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-use-layout-effect": "1.1.1", + "@radix-ui/react-use-previous": "1.1.1", + "@radix-ui/react-visually-hidden": "1.2.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/LICENSE b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/README.md b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/README.md new file mode 100644 index 0000000000000000000000000000000000000000..aae69b625c341062799387ca13addb41fd6c855d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/README.md @@ -0,0 +1,3 @@ +# `react-popover` + +View docs [here](https://radix-ui.com/primitives/docs/components/popover). diff --git a/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..83bdfa3cf595c498f57b1674cddfcc00d158cdd3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.d.mts @@ -0,0 +1,85 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import { FocusScope } from '@radix-ui/react-focus-scope'; +import * as PopperPrimitive from '@radix-ui/react-popper'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createPopoverScope: _radix_ui_react_context.CreateScope; +interface PopoverProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?: (open: boolean) => void; + modal?: boolean; +} +declare const Popover: React.FC; +type PopperAnchorProps = React.ComponentPropsWithoutRef; +interface PopoverAnchorProps extends PopperAnchorProps { +} +declare const PopoverAnchor: React.ForwardRefExoticComponent>; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface PopoverTriggerProps extends PrimitiveButtonProps { +} +declare const PopoverTrigger: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface PopoverPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const PopoverPortal: React.FC; +interface PopoverContentProps extends PopoverContentTypeProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const PopoverContent: React.ForwardRefExoticComponent>; +interface PopoverContentTypeProps extends Omit { +} +type FocusScopeProps = React.ComponentPropsWithoutRef; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type PopperContentProps = React.ComponentPropsWithoutRef; +interface PopoverContentImplProps extends Omit, Omit { + /** + * Whether focus should be trapped within the `Popover` + * (default: false) + */ + trapFocus?: FocusScopeProps['trapped']; + /** + * Event handler called when auto-focusing on open. + * Can be prevented. + */ + onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus']; + /** + * Event handler called when auto-focusing on close. + * Can be prevented. + */ + onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']; +} +interface PopoverCloseProps extends PrimitiveButtonProps { +} +declare const PopoverClose: React.ForwardRefExoticComponent>; +type PopperArrowProps = React.ComponentPropsWithoutRef; +interface PopoverArrowProps extends PopperArrowProps { +} +declare const PopoverArrow: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Anchor: React.ForwardRefExoticComponent>; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Close: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; + +export { Anchor, Arrow, Close, Content, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverArrow, type PopoverArrowProps, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, PopoverPortal, type PopoverPortalProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, Root, Trigger, createPopoverScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..83bdfa3cf595c498f57b1674cddfcc00d158cdd3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.d.ts @@ -0,0 +1,85 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import { FocusScope } from '@radix-ui/react-focus-scope'; +import * as PopperPrimitive from '@radix-ui/react-popper'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createPopoverScope: _radix_ui_react_context.CreateScope; +interface PopoverProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?: (open: boolean) => void; + modal?: boolean; +} +declare const Popover: React.FC; +type PopperAnchorProps = React.ComponentPropsWithoutRef; +interface PopoverAnchorProps extends PopperAnchorProps { +} +declare const PopoverAnchor: React.ForwardRefExoticComponent>; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface PopoverTriggerProps extends PrimitiveButtonProps { +} +declare const PopoverTrigger: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface PopoverPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const PopoverPortal: React.FC; +interface PopoverContentProps extends PopoverContentTypeProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const PopoverContent: React.ForwardRefExoticComponent>; +interface PopoverContentTypeProps extends Omit { +} +type FocusScopeProps = React.ComponentPropsWithoutRef; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type PopperContentProps = React.ComponentPropsWithoutRef; +interface PopoverContentImplProps extends Omit, Omit { + /** + * Whether focus should be trapped within the `Popover` + * (default: false) + */ + trapFocus?: FocusScopeProps['trapped']; + /** + * Event handler called when auto-focusing on open. + * Can be prevented. + */ + onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus']; + /** + * Event handler called when auto-focusing on close. + * Can be prevented. + */ + onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']; +} +interface PopoverCloseProps extends PrimitiveButtonProps { +} +declare const PopoverClose: React.ForwardRefExoticComponent>; +type PopperArrowProps = React.ComponentPropsWithoutRef; +interface PopoverArrowProps extends PopperArrowProps { +} +declare const PopoverArrow: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Anchor: React.ForwardRefExoticComponent>; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Close: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; + +export { Anchor, Arrow, Close, Content, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverArrow, type PopoverArrowProps, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, PopoverPortal, type PopoverPortalProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, Root, Trigger, createPopoverScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.js b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..080d2c5200ffd58bd535b971edadd65fa18acb7e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.js @@ -0,0 +1,352 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Anchor: () => Anchor2, + Arrow: () => Arrow2, + Close: () => Close, + Content: () => Content2, + Popover: () => Popover, + PopoverAnchor: () => PopoverAnchor, + PopoverArrow: () => PopoverArrow, + PopoverClose: () => PopoverClose, + PopoverContent: () => PopoverContent, + PopoverPortal: () => PopoverPortal, + PopoverTrigger: () => PopoverTrigger, + Portal: () => Portal, + Root: () => Root2, + Trigger: () => Trigger, + createPopoverScope: () => createPopoverScope +}); +module.exports = __toCommonJS(index_exports); + +// src/popover.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_dismissable_layer = require("@radix-ui/react-dismissable-layer"); +var import_react_focus_guards = require("@radix-ui/react-focus-guards"); +var import_react_focus_scope = require("@radix-ui/react-focus-scope"); +var import_react_id = require("@radix-ui/react-id"); +var PopperPrimitive = __toESM(require("@radix-ui/react-popper")); +var import_react_popper = require("@radix-ui/react-popper"); +var import_react_portal = require("@radix-ui/react-portal"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_slot = require("@radix-ui/react-slot"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_aria_hidden = require("aria-hidden"); +var import_react_remove_scroll = require("react-remove-scroll"); +var import_jsx_runtime = require("react/jsx-runtime"); +var POPOVER_NAME = "Popover"; +var [createPopoverContext, createPopoverScope] = (0, import_react_context.createContextScope)(POPOVER_NAME, [ + import_react_popper.createPopperScope +]); +var usePopperScope = (0, import_react_popper.createPopperScope)(); +var [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME); +var Popover = (props) => { + const { + __scopePopover, + children, + open: openProp, + defaultOpen, + onOpenChange, + modal = false + } = props; + const popperScope = usePopperScope(__scopePopover); + const triggerRef = React.useRef(null); + const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false); + const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: POPOVER_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + PopoverProvider, + { + scope: __scopePopover, + contentId: (0, import_react_id.useId)(), + triggerRef, + open, + onOpenChange: setOpen, + onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]), + hasCustomAnchor, + onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []), + onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []), + modal, + children + } + ) }); +}; +Popover.displayName = POPOVER_NAME; +var ANCHOR_NAME = "PopoverAnchor"; +var PopoverAnchor = React.forwardRef( + (props, forwardedRef) => { + const { __scopePopover, ...anchorProps } = props; + const context = usePopoverContext(ANCHOR_NAME, __scopePopover); + const popperScope = usePopperScope(__scopePopover); + const { onCustomAnchorAdd, onCustomAnchorRemove } = context; + React.useEffect(() => { + onCustomAnchorAdd(); + return () => onCustomAnchorRemove(); + }, [onCustomAnchorAdd, onCustomAnchorRemove]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef }); + } +); +PopoverAnchor.displayName = ANCHOR_NAME; +var TRIGGER_NAME = "PopoverTrigger"; +var PopoverTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopePopover, ...triggerProps } = props; + const context = usePopoverContext(TRIGGER_NAME, __scopePopover); + const popperScope = usePopperScope(__scopePopover); + const composedTriggerRef = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef); + const trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + "aria-haspopup": "dialog", + "aria-expanded": context.open, + "aria-controls": context.contentId, + "data-state": getState(context.open), + ...triggerProps, + ref: composedTriggerRef, + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, context.onOpenToggle) + } + ); + return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger }); + } +); +PopoverTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "PopoverPortal"; +var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, { + forceMount: void 0 +}); +var PopoverPortal = (props) => { + const { __scopePopover, forceMount, children, container } = props; + const context = usePopoverContext(PORTAL_NAME, __scopePopover); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_portal.Portal, { asChild: true, container, children }) }) }); +}; +PopoverPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "PopoverContent"; +var PopoverContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover); + const { forceMount = portalContext.forceMount, ...contentProps } = props; + const context = usePopoverContext(CONTENT_NAME, props.__scopePopover); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) }); + } +); +PopoverContent.displayName = CONTENT_NAME; +var Slot = (0, import_react_slot.createSlot)("PopoverContent.RemoveScroll"); +var PopoverContentModal = React.forwardRef( + (props, forwardedRef) => { + const context = usePopoverContext(CONTENT_NAME, props.__scopePopover); + const contentRef = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentRef); + const isRightClickOutsideRef = React.useRef(false); + React.useEffect(() => { + const content = contentRef.current; + if (content) return (0, import_aria_hidden.hideOthers)(content); + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_remove_scroll.RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + PopoverContentImpl, + { + ...props, + ref: composedRefs, + trapFocus: context.open, + disableOutsidePointerEvents: true, + onCloseAutoFocus: (0, import_primitive.composeEventHandlers)(props.onCloseAutoFocus, (event) => { + event.preventDefault(); + if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus(); + }), + onPointerDownOutside: (0, import_primitive.composeEventHandlers)( + props.onPointerDownOutside, + (event) => { + const originalEvent = event.detail.originalEvent; + const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true; + const isRightClick = originalEvent.button === 2 || ctrlLeftClick; + isRightClickOutsideRef.current = isRightClick; + }, + { checkForDefaultPrevented: false } + ), + onFocusOutside: (0, import_primitive.composeEventHandlers)( + props.onFocusOutside, + (event) => event.preventDefault(), + { checkForDefaultPrevented: false } + ) + } + ) }); + } +); +var PopoverContentNonModal = React.forwardRef( + (props, forwardedRef) => { + const context = usePopoverContext(CONTENT_NAME, props.__scopePopover); + const hasInteractedOutsideRef = React.useRef(false); + const hasPointerDownOutsideRef = React.useRef(false); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + PopoverContentImpl, + { + ...props, + ref: forwardedRef, + trapFocus: false, + disableOutsidePointerEvents: false, + onCloseAutoFocus: (event) => { + props.onCloseAutoFocus?.(event); + if (!event.defaultPrevented) { + if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus(); + event.preventDefault(); + } + hasInteractedOutsideRef.current = false; + hasPointerDownOutsideRef.current = false; + }, + onInteractOutside: (event) => { + props.onInteractOutside?.(event); + if (!event.defaultPrevented) { + hasInteractedOutsideRef.current = true; + if (event.detail.originalEvent.type === "pointerdown") { + hasPointerDownOutsideRef.current = true; + } + } + const target = event.target; + const targetIsTrigger = context.triggerRef.current?.contains(target); + if (targetIsTrigger) event.preventDefault(); + if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) { + event.preventDefault(); + } + } + } + ); + } +); +var PopoverContentImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopePopover, + trapFocus, + onOpenAutoFocus, + onCloseAutoFocus, + disableOutsidePointerEvents, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onInteractOutside, + ...contentProps + } = props; + const context = usePopoverContext(CONTENT_NAME, __scopePopover); + const popperScope = usePopperScope(__scopePopover); + (0, import_react_focus_guards.useFocusGuards)(); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_focus_scope.FocusScope, + { + asChild: true, + loop: true, + trapped: trapFocus, + onMountAutoFocus: onOpenAutoFocus, + onUnmountAutoFocus: onCloseAutoFocus, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_dismissable_layer.DismissableLayer, + { + asChild: true, + disableOutsidePointerEvents, + onInteractOutside, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onDismiss: () => context.onOpenChange(false), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + PopperPrimitive.Content, + { + "data-state": getState(context.open), + role: "dialog", + id: context.contentId, + ...popperScope, + ...contentProps, + ref: forwardedRef, + style: { + ...contentProps.style, + // re-namespace exposed content custom properties + ...{ + "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-popover-content-available-width": "var(--radix-popper-available-width)", + "--radix-popover-content-available-height": "var(--radix-popper-available-height)", + "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ) + } + ) + } + ); + } +); +var CLOSE_NAME = "PopoverClose"; +var PopoverClose = React.forwardRef( + (props, forwardedRef) => { + const { __scopePopover, ...closeProps } = props; + const context = usePopoverContext(CLOSE_NAME, __scopePopover); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + ...closeProps, + ref: forwardedRef, + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, () => context.onOpenChange(false)) + } + ); + } +); +PopoverClose.displayName = CLOSE_NAME; +var ARROW_NAME = "PopoverArrow"; +var PopoverArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopePopover, ...arrowProps } = props; + const popperScope = usePopperScope(__scopePopover); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }); + } +); +PopoverArrow.displayName = ARROW_NAME; +function getState(open) { + return open ? "open" : "closed"; +} +var Root2 = Popover; +var Anchor2 = PopoverAnchor; +var Trigger = PopoverTrigger; +var Portal = PopoverPortal; +var Content2 = PopoverContent; +var Close = PopoverClose; +var Arrow2 = PopoverArrow; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f22903c1e1421956788145bb07217189e8344a47 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/popover.tsx"], + "sourcesContent": ["'use client';\nexport {\n createPopoverScope,\n //\n Popover,\n PopoverAnchor,\n PopoverTrigger,\n PopoverPortal,\n PopoverContent,\n PopoverClose,\n PopoverArrow,\n //\n Root,\n Anchor,\n Trigger,\n Portal,\n Content,\n Close,\n Arrow,\n} from './popover';\nexport type {\n PopoverProps,\n PopoverAnchorProps,\n PopoverTriggerProps,\n PopoverPortalProps,\n PopoverContentProps,\n PopoverCloseProps,\n PopoverArrowProps,\n} from './popover';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createSlot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPOVER_NAME = 'Popover';\n\ntype ScopedProps

= P & { __scopePopover?: Scope };\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: React.RefObject;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n hasCustomAnchor: boolean;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n modal: boolean;\n};\n\nconst [PopoverProvider, usePopoverContext] =\n createPopoverContext(POPOVER_NAME);\n\ninterface PopoverProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n modal?: boolean;\n}\n\nconst Popover: React.FC = (props: ScopedProps) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false,\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME,\n });\n\n return (\n \n setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={React.useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={React.useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n >\n {children}\n \n \n );\n};\n\nPopover.displayName = POPOVER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopoverAnchor';\n\ntype PopoverAnchorElement = React.ComponentRef;\ntype PopperAnchorProps = React.ComponentPropsWithoutRef;\ninterface PopoverAnchorProps extends PopperAnchorProps {}\n\nconst PopoverAnchor = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\n return ;\n }\n);\n\nPopoverAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'PopoverTrigger';\n\ntype PopoverTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface PopoverTriggerProps extends PrimitiveButtonProps {}\n\nconst PopoverTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const trigger = (\n \n );\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n \n {trigger}\n \n );\n }\n);\n\nPopoverTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'PopoverPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface PopoverPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverPortal: React.FC = (props: ScopedProps) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return (\n \n \n \n {children}\n \n \n \n );\n};\n\nPopoverPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopoverContent';\n\ninterface PopoverContentProps extends PopoverContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return (\n \n {context.modal ? (\n \n ) : (\n \n )}\n \n );\n }\n);\n\nPopoverContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Slot = createSlot('PopoverContent.RemoveScroll');\n\ntype PopoverContentTypeElement = PopoverContentImplElement;\ninterface PopoverContentTypeProps\n extends Omit {}\n\nconst PopoverContentModal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n \n {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n )}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )}\n />\n \n );\n }\n);\n\nconst PopoverContentNonModal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentImplElement = React.ComponentRef;\ntype FocusScopeProps = React.ComponentPropsWithoutRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype PopperContentProps = React.ComponentPropsWithoutRef;\ninterface PopoverContentImplProps\n extends Omit,\n Omit {\n /**\n * Whether focus should be trapped within the `Popover`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst PopoverContentImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n\n // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n \n context.onOpenChange(false)}\n >\n \n \n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'PopoverClose';\n\ntype PopoverCloseElement = React.ComponentRef;\ninterface PopoverCloseProps extends PrimitiveButtonProps {}\n\nconst PopoverClose = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return (\n context.onOpenChange(false))}\n />\n );\n }\n);\n\nPopoverClose.displayName = CLOSE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'PopoverArrow';\n\ntype PopoverArrowElement = React.ComponentRef;\ntype PopperArrowProps = React.ComponentPropsWithoutRef;\ninterface PopoverArrowProps extends PopperArrowProps {}\n\nconst PopoverArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return ;\n }\n);\n\nPopoverArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Popover;\nconst Anchor = PopoverAnchor;\nconst Trigger = PopoverTrigger;\nconst Portal = PopoverPortal;\nconst Content = PopoverContent;\nconst Close = PopoverClose;\nconst Arrow = PopoverArrow;\n\nexport {\n createPopoverScope,\n //\n Popover,\n PopoverAnchor,\n PopoverTrigger,\n PopoverPortal,\n PopoverContent,\n PopoverClose,\n PopoverArrow,\n //\n Root,\n Anchor,\n Trigger,\n Portal,\n Content,\n Close,\n Arrow,\n};\nexport type {\n PopoverProps,\n PopoverAnchorProps,\n PopoverTriggerProps,\n PopoverPortalProps,\n PopoverContentProps,\n PopoverCloseProps,\n PopoverArrowProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,gBAAAA;AAAA,EAAA,aAAAC;AAAA,EAAA;AAAA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C;AAAA,oBAC5C,2CAA2C;AAAA,oBAC3C,4CAA4C;AAAA,oBAC5C,iCAAiC;AAAA,oBACjC,kCAAkC;AAAA,kBACpC;AAAA,gBACF;AAAA;AAAA,YACF;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAMA,IAAM,aAAa;AAKnB,IAAM,eAAqB;AAAA,EACzB,CAAC,OAAuC,iBAAiB;AACvD,UAAM,EAAE,gBAAgB,GAAG,WAAW,IAAI;AAC1C,UAAM,UAAU,kBAAkB,YAAY,cAAc;AAC5D,WACE;AAAA,MAAC,iCAAU;AAAA,MAAV;AAAA,QACC,MAAK;AAAA,QACJ,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,aAAS,uCAAqB,MAAM,SAAS,MAAM,QAAQ,aAAa,KAAK,CAAC;AAAA;AAAA,IAChF;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;AAM3B,IAAM,aAAa;AAMnB,IAAM,eAAqB;AAAA,EACzB,CAAC,OAAuC,iBAAiB;AACvD,UAAM,EAAE,gBAAgB,GAAG,WAAW,IAAI;AAC1C,UAAM,cAAc,eAAe,cAAc;AACjD,WAAO,4CAAiB,uBAAhB,EAAuB,GAAG,aAAc,GAAG,YAAY,KAAK,cAAc;AAAA,EACpF;AACF;AAEA,aAAa,cAAc;AAI3B,SAAS,SAAS,MAAe;AAC/B,SAAO,OAAO,SAAS;AACzB;AAEA,IAAMC,QAAO;AACb,IAAMC,UAAS;AACf,IAAM,UAAU;AAChB,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAM,QAAQ;AACd,IAAMC,SAAQ;", + "names": ["Anchor", "Arrow", "Content", "Root", "PortalPrimitive", "Root", "Anchor", "Content", "Arrow"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..289118f9b8ba69c9a8baaeb4a471c4ea49f61efc --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.mjs @@ -0,0 +1,320 @@ +"use client"; + +// src/popover.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { createContextScope } from "@radix-ui/react-context"; +import { DismissableLayer } from "@radix-ui/react-dismissable-layer"; +import { useFocusGuards } from "@radix-ui/react-focus-guards"; +import { FocusScope } from "@radix-ui/react-focus-scope"; +import { useId } from "@radix-ui/react-id"; +import * as PopperPrimitive from "@radix-ui/react-popper"; +import { createPopperScope } from "@radix-ui/react-popper"; +import { Portal as PortalPrimitive } from "@radix-ui/react-portal"; +import { Presence } from "@radix-ui/react-presence"; +import { Primitive } from "@radix-ui/react-primitive"; +import { createSlot } from "@radix-ui/react-slot"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { hideOthers } from "aria-hidden"; +import { RemoveScroll } from "react-remove-scroll"; +import { jsx } from "react/jsx-runtime"; +var POPOVER_NAME = "Popover"; +var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [ + createPopperScope +]); +var usePopperScope = createPopperScope(); +var [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME); +var Popover = (props) => { + const { + __scopePopover, + children, + open: openProp, + defaultOpen, + onOpenChange, + modal = false + } = props; + const popperScope = usePopperScope(__scopePopover); + const triggerRef = React.useRef(null); + const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false); + const [open, setOpen] = useControllableState({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: POPOVER_NAME + }); + return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx( + PopoverProvider, + { + scope: __scopePopover, + contentId: useId(), + triggerRef, + open, + onOpenChange: setOpen, + onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]), + hasCustomAnchor, + onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []), + onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []), + modal, + children + } + ) }); +}; +Popover.displayName = POPOVER_NAME; +var ANCHOR_NAME = "PopoverAnchor"; +var PopoverAnchor = React.forwardRef( + (props, forwardedRef) => { + const { __scopePopover, ...anchorProps } = props; + const context = usePopoverContext(ANCHOR_NAME, __scopePopover); + const popperScope = usePopperScope(__scopePopover); + const { onCustomAnchorAdd, onCustomAnchorRemove } = context; + React.useEffect(() => { + onCustomAnchorAdd(); + return () => onCustomAnchorRemove(); + }, [onCustomAnchorAdd, onCustomAnchorRemove]); + return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef }); + } +); +PopoverAnchor.displayName = ANCHOR_NAME; +var TRIGGER_NAME = "PopoverTrigger"; +var PopoverTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopePopover, ...triggerProps } = props; + const context = usePopoverContext(TRIGGER_NAME, __scopePopover); + const popperScope = usePopperScope(__scopePopover); + const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef); + const trigger = /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + "aria-haspopup": "dialog", + "aria-expanded": context.open, + "aria-controls": context.contentId, + "data-state": getState(context.open), + ...triggerProps, + ref: composedTriggerRef, + onClick: composeEventHandlers(props.onClick, context.onOpenToggle) + } + ); + return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger }); + } +); +PopoverTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "PopoverPortal"; +var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, { + forceMount: void 0 +}); +var PopoverPortal = (props) => { + const { __scopePopover, forceMount, children, container } = props; + const context = usePopoverContext(PORTAL_NAME, __scopePopover); + return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) }); +}; +PopoverPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "PopoverContent"; +var PopoverContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover); + const { forceMount = portalContext.forceMount, ...contentProps } = props; + const context = usePopoverContext(CONTENT_NAME, props.__scopePopover); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) }); + } +); +PopoverContent.displayName = CONTENT_NAME; +var Slot = createSlot("PopoverContent.RemoveScroll"); +var PopoverContentModal = React.forwardRef( + (props, forwardedRef) => { + const context = usePopoverContext(CONTENT_NAME, props.__scopePopover); + const contentRef = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, contentRef); + const isRightClickOutsideRef = React.useRef(false); + React.useEffect(() => { + const content = contentRef.current; + if (content) return hideOthers(content); + }, []); + return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx( + PopoverContentImpl, + { + ...props, + ref: composedRefs, + trapFocus: context.open, + disableOutsidePointerEvents: true, + onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => { + event.preventDefault(); + if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus(); + }), + onPointerDownOutside: composeEventHandlers( + props.onPointerDownOutside, + (event) => { + const originalEvent = event.detail.originalEvent; + const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true; + const isRightClick = originalEvent.button === 2 || ctrlLeftClick; + isRightClickOutsideRef.current = isRightClick; + }, + { checkForDefaultPrevented: false } + ), + onFocusOutside: composeEventHandlers( + props.onFocusOutside, + (event) => event.preventDefault(), + { checkForDefaultPrevented: false } + ) + } + ) }); + } +); +var PopoverContentNonModal = React.forwardRef( + (props, forwardedRef) => { + const context = usePopoverContext(CONTENT_NAME, props.__scopePopover); + const hasInteractedOutsideRef = React.useRef(false); + const hasPointerDownOutsideRef = React.useRef(false); + return /* @__PURE__ */ jsx( + PopoverContentImpl, + { + ...props, + ref: forwardedRef, + trapFocus: false, + disableOutsidePointerEvents: false, + onCloseAutoFocus: (event) => { + props.onCloseAutoFocus?.(event); + if (!event.defaultPrevented) { + if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus(); + event.preventDefault(); + } + hasInteractedOutsideRef.current = false; + hasPointerDownOutsideRef.current = false; + }, + onInteractOutside: (event) => { + props.onInteractOutside?.(event); + if (!event.defaultPrevented) { + hasInteractedOutsideRef.current = true; + if (event.detail.originalEvent.type === "pointerdown") { + hasPointerDownOutsideRef.current = true; + } + } + const target = event.target; + const targetIsTrigger = context.triggerRef.current?.contains(target); + if (targetIsTrigger) event.preventDefault(); + if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) { + event.preventDefault(); + } + } + } + ); + } +); +var PopoverContentImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopePopover, + trapFocus, + onOpenAutoFocus, + onCloseAutoFocus, + disableOutsidePointerEvents, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onInteractOutside, + ...contentProps + } = props; + const context = usePopoverContext(CONTENT_NAME, __scopePopover); + const popperScope = usePopperScope(__scopePopover); + useFocusGuards(); + return /* @__PURE__ */ jsx( + FocusScope, + { + asChild: true, + loop: true, + trapped: trapFocus, + onMountAutoFocus: onOpenAutoFocus, + onUnmountAutoFocus: onCloseAutoFocus, + children: /* @__PURE__ */ jsx( + DismissableLayer, + { + asChild: true, + disableOutsidePointerEvents, + onInteractOutside, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside, + onDismiss: () => context.onOpenChange(false), + children: /* @__PURE__ */ jsx( + PopperPrimitive.Content, + { + "data-state": getState(context.open), + role: "dialog", + id: context.contentId, + ...popperScope, + ...contentProps, + ref: forwardedRef, + style: { + ...contentProps.style, + // re-namespace exposed content custom properties + ...{ + "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-popover-content-available-width": "var(--radix-popper-available-width)", + "--radix-popover-content-available-height": "var(--radix-popper-available-height)", + "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ) + } + ) + } + ); + } +); +var CLOSE_NAME = "PopoverClose"; +var PopoverClose = React.forwardRef( + (props, forwardedRef) => { + const { __scopePopover, ...closeProps } = props; + const context = usePopoverContext(CLOSE_NAME, __scopePopover); + return /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + ...closeProps, + ref: forwardedRef, + onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false)) + } + ); + } +); +PopoverClose.displayName = CLOSE_NAME; +var ARROW_NAME = "PopoverArrow"; +var PopoverArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopePopover, ...arrowProps } = props; + const popperScope = usePopperScope(__scopePopover); + return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }); + } +); +PopoverArrow.displayName = ARROW_NAME; +function getState(open) { + return open ? "open" : "closed"; +} +var Root2 = Popover; +var Anchor2 = PopoverAnchor; +var Trigger = PopoverTrigger; +var Portal = PopoverPortal; +var Content2 = PopoverContent; +var Close = PopoverClose; +var Arrow2 = PopoverArrow; +export { + Anchor2 as Anchor, + Arrow2 as Arrow, + Close, + Content2 as Content, + Popover, + PopoverAnchor, + PopoverArrow, + PopoverClose, + PopoverContent, + PopoverPortal, + PopoverTrigger, + Portal, + Root2 as Root, + Trigger, + createPopoverScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..d5f1d92d92d87567c21b2e6a66c619dbb96f67e6 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/popover.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createSlot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPOVER_NAME = 'Popover';\n\ntype ScopedProps

= P & { __scopePopover?: Scope };\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: React.RefObject;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n hasCustomAnchor: boolean;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n modal: boolean;\n};\n\nconst [PopoverProvider, usePopoverContext] =\n createPopoverContext(POPOVER_NAME);\n\ninterface PopoverProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n modal?: boolean;\n}\n\nconst Popover: React.FC = (props: ScopedProps) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false,\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME,\n });\n\n return (\n \n setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={React.useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={React.useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n >\n {children}\n \n \n );\n};\n\nPopover.displayName = POPOVER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopoverAnchor';\n\ntype PopoverAnchorElement = React.ComponentRef;\ntype PopperAnchorProps = React.ComponentPropsWithoutRef;\ninterface PopoverAnchorProps extends PopperAnchorProps {}\n\nconst PopoverAnchor = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\n return ;\n }\n);\n\nPopoverAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'PopoverTrigger';\n\ntype PopoverTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface PopoverTriggerProps extends PrimitiveButtonProps {}\n\nconst PopoverTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const trigger = (\n \n );\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n \n {trigger}\n \n );\n }\n);\n\nPopoverTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'PopoverPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface PopoverPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverPortal: React.FC = (props: ScopedProps) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return (\n \n \n \n {children}\n \n \n \n );\n};\n\nPopoverPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopoverContent';\n\ninterface PopoverContentProps extends PopoverContentTypeProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return (\n \n {context.modal ? (\n \n ) : (\n \n )}\n \n );\n }\n);\n\nPopoverContent.displayName = CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Slot = createSlot('PopoverContent.RemoveScroll');\n\ntype PopoverContentTypeElement = PopoverContentImplElement;\ninterface PopoverContentTypeProps\n extends Omit {}\n\nconst PopoverContentModal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n\n return (\n \n {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n })}\n onPointerDownOutside={composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n )}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )}\n />\n \n );\n }\n);\n\nconst PopoverContentNonModal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n\n return (\n {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentImplElement = React.ComponentRef;\ntype FocusScopeProps = React.ComponentPropsWithoutRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype PopperContentProps = React.ComponentPropsWithoutRef;\ninterface PopoverContentImplProps\n extends Omit,\n Omit {\n /**\n * Whether focus should be trapped within the `Popover`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst PopoverContentImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n\n // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n \n context.onOpenChange(false)}\n >\n \n \n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'PopoverClose';\n\ntype PopoverCloseElement = React.ComponentRef;\ninterface PopoverCloseProps extends PrimitiveButtonProps {}\n\nconst PopoverClose = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return (\n context.onOpenChange(false))}\n />\n );\n }\n);\n\nPopoverClose.displayName = CLOSE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'PopoverArrow';\n\ntype PopoverArrowElement = React.ComponentRef;\ntype PopperArrowProps = React.ComponentPropsWithoutRef;\ninterface PopoverArrowProps extends PopperArrowProps {}\n\nconst PopoverArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return ;\n }\n);\n\nPopoverArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed';\n}\n\nconst Root = Popover;\nconst Anchor = PopoverAnchor;\nconst Trigger = PopoverTrigger;\nconst Portal = PopoverPortal;\nconst Content = PopoverContent;\nconst Close = PopoverClose;\nconst Arrow = PopoverArrow;\n\nexport {\n createPopoverScope,\n //\n Popover,\n PopoverAnchor,\n PopoverTrigger,\n PopoverPortal,\n PopoverContent,\n PopoverClose,\n PopoverArrow,\n //\n Root,\n Anchor,\n Trigger,\n Portal,\n Content,\n Close,\n Arrow,\n};\nexport type {\n PopoverProps,\n PopoverAnchorProps,\n PopoverTriggerProps,\n PopoverPortalProps,\n PopoverContentProps,\n PopoverCloseProps,\n PopoverArrowProps,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,aAAa;AACtB,YAAY,qBAAqB;AACjC,SAAS,yBAAyB;AAClC,SAAS,UAAU,uBAAuB;AAC1C,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,4BAA4B;AACrC,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AA4DvB;AApDN,IAAM,eAAe;AAGrB,IAAM,CAAC,sBAAsB,kBAAkB,IAAI,mBAAmB,cAAc;AAAA,EAClF;AACF,CAAC;AACD,IAAM,iBAAiB,kBAAkB;AAczC,IAAM,CAAC,iBAAiB,iBAAiB,IACvC,qBAA0C,YAAY;AAUxD,IAAM,UAAkC,CAAC,UAAqC;AAC5E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV,IAAI;AACJ,QAAM,cAAc,eAAe,c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AAuB,GAAG,aAAc,GAAG,YAAY,KAAK,cAAc;AAAA,EACpF;AACF;AAEA,aAAa,cAAc;AAI3B,SAAS,SAAS,MAAe;AAC/B,SAAO,OAAO,SAAS;AACzB;AAEA,IAAMA,QAAO;AACb,IAAMC,UAAS;AACf,IAAM,UAAU;AAChB,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAM,QAAQ;AACd,IAAMC,SAAQ;", + "names": ["Root", "Anchor", "Content", "Arrow"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/package.json b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/package.json new file mode 100644 index 0000000000000000000000000000000000000000..01a5ed714fab3a14e9dfec841064068f89ee2976 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_d9f326a23716d2e541d52f8eb0155669/node_modules/@radix-ui/react-popover/package.json @@ -0,0 +1,82 @@ +{ + "name": "@radix-ui/react-popover", + "version": "1.1.15", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3", + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-dismissable-layer": "1.1.11", + "@radix-ui/react-focus-guards": "1.1.3", + "@radix-ui/react-focus-scope": "1.1.7", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-portal": "1.1.9", + "@radix-ui/react-popper": "1.2.8", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-slot": "1.2.3", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/LICENSE b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/README.md b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/README.md new file mode 100644 index 0000000000000000000000000000000000000000..187ada0533f0c3f9079ce91584112e30d6824323 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/README.md @@ -0,0 +1,3 @@ +# `react-popper` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..bffb3cd79339bf87dd2527967055423518ec7645 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.d.mts @@ -0,0 +1,46 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import * as ArrowPrimitive from '@radix-ui/react-arrow'; +import { Primitive } from '@radix-ui/react-primitive'; +import { Measurable } from '@radix-ui/rect'; + +declare const SIDE_OPTIONS: readonly ["top", "right", "bottom", "left"]; +declare const ALIGN_OPTIONS: readonly ["start", "center", "end"]; +type Side = (typeof SIDE_OPTIONS)[number]; +type Align = (typeof ALIGN_OPTIONS)[number]; +declare const createPopperScope: _radix_ui_react_context.CreateScope; +interface PopperProps { + children?: React.ReactNode; +} +declare const Popper: React.FC; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface PopperAnchorProps extends PrimitiveDivProps { + virtualRef?: React.RefObject; +} +declare const PopperAnchor: React.ForwardRefExoticComponent>; +type Boundary = Element | null; +interface PopperContentProps extends PrimitiveDivProps { + side?: Side; + sideOffset?: number; + align?: Align; + alignOffset?: number; + arrowPadding?: number; + avoidCollisions?: boolean; + collisionBoundary?: Boundary | Boundary[]; + collisionPadding?: number | Partial>; + sticky?: 'partial' | 'always'; + hideWhenDetached?: boolean; + updatePositionStrategy?: 'optimized' | 'always'; + onPlaced?: () => void; +} +declare const PopperContent: React.ForwardRefExoticComponent>; +type ArrowProps = React.ComponentPropsWithoutRef; +interface PopperArrowProps extends ArrowProps { +} +declare const PopperArrow: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Anchor: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; + +export { ALIGN_OPTIONS, Anchor, Arrow, Content, Popper, PopperAnchor, type PopperAnchorProps, PopperArrow, type PopperArrowProps, PopperContent, type PopperContentProps, type PopperProps, Root, SIDE_OPTIONS, createPopperScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bffb3cd79339bf87dd2527967055423518ec7645 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.d.ts @@ -0,0 +1,46 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import * as ArrowPrimitive from '@radix-ui/react-arrow'; +import { Primitive } from '@radix-ui/react-primitive'; +import { Measurable } from '@radix-ui/rect'; + +declare const SIDE_OPTIONS: readonly ["top", "right", "bottom", "left"]; +declare const ALIGN_OPTIONS: readonly ["start", "center", "end"]; +type Side = (typeof SIDE_OPTIONS)[number]; +type Align = (typeof ALIGN_OPTIONS)[number]; +declare const createPopperScope: _radix_ui_react_context.CreateScope; +interface PopperProps { + children?: React.ReactNode; +} +declare const Popper: React.FC; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface PopperAnchorProps extends PrimitiveDivProps { + virtualRef?: React.RefObject; +} +declare const PopperAnchor: React.ForwardRefExoticComponent>; +type Boundary = Element | null; +interface PopperContentProps extends PrimitiveDivProps { + side?: Side; + sideOffset?: number; + align?: Align; + alignOffset?: number; + arrowPadding?: number; + avoidCollisions?: boolean; + collisionBoundary?: Boundary | Boundary[]; + collisionPadding?: number | Partial>; + sticky?: 'partial' | 'always'; + hideWhenDetached?: boolean; + updatePositionStrategy?: 'optimized' | 'always'; + onPlaced?: () => void; +} +declare const PopperContent: React.ForwardRefExoticComponent>; +type ArrowProps = React.ComponentPropsWithoutRef; +interface PopperArrowProps extends ArrowProps { +} +declare const PopperArrow: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Anchor: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; + +export { ALIGN_OPTIONS, Anchor, Arrow, Content, Popper, PopperAnchor, type PopperAnchorProps, PopperArrow, type PopperArrowProps, PopperContent, type PopperContentProps, type PopperProps, Root, SIDE_OPTIONS, createPopperScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.js b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5cb1fd007d32021ad950d961dd4a0868576a2c0d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.js @@ -0,0 +1,330 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + ALIGN_OPTIONS: () => ALIGN_OPTIONS, + Anchor: () => Anchor, + Arrow: () => Arrow, + Content: () => Content, + Popper: () => Popper, + PopperAnchor: () => PopperAnchor, + PopperArrow: () => PopperArrow, + PopperContent: () => PopperContent, + Root: () => Root2, + SIDE_OPTIONS: () => SIDE_OPTIONS, + createPopperScope: () => createPopperScope +}); +module.exports = __toCommonJS(index_exports); + +// src/popper.tsx +var React = __toESM(require("react")); +var import_react_dom = require("@floating-ui/react-dom"); +var ArrowPrimitive = __toESM(require("@radix-ui/react-arrow")); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref"); +var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect"); +var import_react_use_size = require("@radix-ui/react-use-size"); +var import_jsx_runtime = require("react/jsx-runtime"); +var SIDE_OPTIONS = ["top", "right", "bottom", "left"]; +var ALIGN_OPTIONS = ["start", "center", "end"]; +var POPPER_NAME = "Popper"; +var [createPopperContext, createPopperScope] = (0, import_react_context.createContextScope)(POPPER_NAME); +var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME); +var Popper = (props) => { + const { __scopePopper, children } = props; + const [anchor, setAnchor] = React.useState(null); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children }); +}; +Popper.displayName = POPPER_NAME; +var ANCHOR_NAME = "PopperAnchor"; +var PopperAnchor = React.forwardRef( + (props, forwardedRef) => { + const { __scopePopper, virtualRef, ...anchorProps } = props; + const context = usePopperContext(ANCHOR_NAME, __scopePopper); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + const anchorRef = React.useRef(null); + React.useEffect(() => { + const previousAnchor = anchorRef.current; + anchorRef.current = virtualRef?.current || ref.current; + if (previousAnchor !== anchorRef.current) { + context.onAnchorChange(anchorRef.current); + } + }); + return virtualRef ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { ...anchorProps, ref: composedRefs }); + } +); +PopperAnchor.displayName = ANCHOR_NAME; +var CONTENT_NAME = "PopperContent"; +var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME); +var PopperContent = React.forwardRef( + (props, forwardedRef) => { + const { + __scopePopper, + side = "bottom", + sideOffset = 0, + align = "center", + alignOffset = 0, + arrowPadding = 0, + avoidCollisions = true, + collisionBoundary = [], + collisionPadding: collisionPaddingProp = 0, + sticky = "partial", + hideWhenDetached = false, + updatePositionStrategy = "optimized", + onPlaced, + ...contentProps + } = props; + const context = usePopperContext(CONTENT_NAME, __scopePopper); + const [content, setContent] = React.useState(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setContent(node)); + const [arrow, setArrow] = React.useState(null); + const arrowSize = (0, import_react_use_size.useSize)(arrow); + const arrowWidth = arrowSize?.width ?? 0; + const arrowHeight = arrowSize?.height ?? 0; + const desiredPlacement = side + (align !== "center" ? "-" + align : ""); + const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp }; + const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary]; + const hasExplicitBoundaries = boundary.length > 0; + const detectOverflowOptions = { + padding: collisionPadding, + boundary: boundary.filter(isNotNull), + // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries + altBoundary: hasExplicitBoundaries + }; + const { refs, floatingStyles, placement, isPositioned, middlewareData } = (0, import_react_dom.useFloating)({ + // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues + strategy: "fixed", + placement: desiredPlacement, + whileElementsMounted: (...args) => { + const cleanup = (0, import_react_dom.autoUpdate)(...args, { + animationFrame: updatePositionStrategy === "always" + }); + return cleanup; + }, + elements: { + reference: context.anchor + }, + middleware: [ + (0, import_react_dom.offset)({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }), + avoidCollisions && (0, import_react_dom.shift)({ + mainAxis: true, + crossAxis: false, + limiter: sticky === "partial" ? (0, import_react_dom.limitShift)() : void 0, + ...detectOverflowOptions + }), + avoidCollisions && (0, import_react_dom.flip)({ ...detectOverflowOptions }), + (0, import_react_dom.size)({ + ...detectOverflowOptions, + apply: ({ elements, rects, availableWidth, availableHeight }) => { + const { width: anchorWidth, height: anchorHeight } = rects.reference; + const contentStyle = elements.floating.style; + contentStyle.setProperty("--radix-popper-available-width", `${availableWidth}px`); + contentStyle.setProperty("--radix-popper-available-height", `${availableHeight}px`); + contentStyle.setProperty("--radix-popper-anchor-width", `${anchorWidth}px`); + contentStyle.setProperty("--radix-popper-anchor-height", `${anchorHeight}px`); + } + }), + arrow && (0, import_react_dom.arrow)({ element: arrow, padding: arrowPadding }), + transformOrigin({ arrowWidth, arrowHeight }), + hideWhenDetached && (0, import_react_dom.hide)({ strategy: "referenceHidden", ...detectOverflowOptions }) + ] + }); + const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement); + const handlePlaced = (0, import_react_use_callback_ref.useCallbackRef)(onPlaced); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + if (isPositioned) { + handlePlaced?.(); + } + }, [isPositioned, handlePlaced]); + const arrowX = middlewareData.arrow?.x; + const arrowY = middlewareData.arrow?.y; + const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0; + const [contentZIndex, setContentZIndex] = React.useState(); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + if (content) setContentZIndex(window.getComputedStyle(content).zIndex); + }, [content]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + "div", + { + ref: refs.setFloating, + "data-radix-popper-content-wrapper": "", + style: { + ...floatingStyles, + transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)", + // keep off the page when measuring + minWidth: "max-content", + zIndex: contentZIndex, + ["--radix-popper-transform-origin"]: [ + middlewareData.transformOrigin?.x, + middlewareData.transformOrigin?.y + ].join(" "), + // hide the content if using the hide middleware and should be hidden + // set visibility to hidden and disable pointer events so the UI behaves + // as if the PopperContent isn't there at all + ...middlewareData.hide?.referenceHidden && { + visibility: "hidden", + pointerEvents: "none" + } + }, + dir: props.dir, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + PopperContentProvider, + { + scope: __scopePopper, + placedSide, + onArrowChange: setArrow, + arrowX, + arrowY, + shouldHideArrow: cannotCenterArrow, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "data-side": placedSide, + "data-align": placedAlign, + ...contentProps, + ref: composedRefs, + style: { + ...contentProps.style, + // if the PopperContent hasn't been placed yet (not all measurements done) + // we prevent animations so that users's animation don't kick in too early referring wrong sides + animation: !isPositioned ? "none" : void 0 + } + } + ) + } + ) + } + ); + } +); +PopperContent.displayName = CONTENT_NAME; +var ARROW_NAME = "PopperArrow"; +var OPPOSITE_SIDE = { + top: "bottom", + right: "left", + bottom: "top", + left: "right" +}; +var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) { + const { __scopePopper, ...arrowProps } = props; + const contentContext = useContentContext(ARROW_NAME, __scopePopper); + const baseSide = OPPOSITE_SIDE[contentContext.placedSide]; + return ( + // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`) + // doesn't report size as we'd expect on SVG elements. + // it reports their bounding box which is effectively the largest path inside the SVG. + /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + "span", + { + ref: contentContext.onArrowChange, + style: { + position: "absolute", + left: contentContext.arrowX, + top: contentContext.arrowY, + [baseSide]: 0, + transformOrigin: { + top: "", + right: "0 0", + bottom: "center 0", + left: "100% 0" + }[contentContext.placedSide], + transform: { + top: "translateY(100%)", + right: "translateY(50%) rotate(90deg) translateX(-50%)", + bottom: `rotate(180deg)`, + left: "translateY(50%) rotate(-90deg) translateX(50%)" + }[contentContext.placedSide], + visibility: contentContext.shouldHideArrow ? "hidden" : void 0 + }, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ArrowPrimitive.Root, + { + ...arrowProps, + ref: forwardedRef, + style: { + ...arrowProps.style, + // ensures the element can be measured correctly (mostly for if SVG) + display: "block" + } + } + ) + } + ) + ); +}); +PopperArrow.displayName = ARROW_NAME; +function isNotNull(value) { + return value !== null; +} +var transformOrigin = (options) => ({ + name: "transformOrigin", + options, + fn(data) { + const { placement, rects, middlewareData } = data; + const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0; + const isArrowHidden = cannotCenterArrow; + const arrowWidth = isArrowHidden ? 0 : options.arrowWidth; + const arrowHeight = isArrowHidden ? 0 : options.arrowHeight; + const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement); + const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign]; + const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2; + const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2; + let x = ""; + let y = ""; + if (placedSide === "bottom") { + x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`; + y = `${-arrowHeight}px`; + } else if (placedSide === "top") { + x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`; + y = `${rects.floating.height + arrowHeight}px`; + } else if (placedSide === "right") { + x = `${-arrowHeight}px`; + y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`; + } else if (placedSide === "left") { + x = `${rects.floating.width + arrowHeight}px`; + y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`; + } + return { data: { x, y } }; + } +}); +function getSideAndAlignFromPlacement(placement) { + const [side, align = "center"] = placement.split("-"); + return [side, align]; +} +var Root2 = Popper; +var Anchor = PopperAnchor; +var Content = PopperContent; +var Arrow = PopperArrow; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a4547acfb2535f8e78198be946ffd4514b79b4cf --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_34fd01df07afd23a9a68b08a5124b8c5/node_modules/@radix-ui/react-popper/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/popper.tsx"], + "sourcesContent": ["'use client';\nexport {\n createPopperScope,\n //\n Popper,\n PopperAnchor,\n PopperContent,\n PopperArrow,\n //\n Root,\n Anchor,\n Content,\n Arrow,\n //\n SIDE_OPTIONS,\n ALIGN_OPTIONS,\n} from './popper';\nexport type {\n PopperProps,\n PopperAnchorProps,\n PopperContentProps,\n PopperArrowProps,\n} from './popper';\n", "import * as React from 'react';\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size,\n} from '@floating-ui/react-dom';\nimport * as ArrowPrimitive from '@radix-ui/react-arrow';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { useSize } from '@radix-ui/react-use-size';\n\nimport type { Placement, Middleware } from '@floating-ui/react-dom';\nimport type { Scope } from '@radix-ui/react-context';\nimport type { Measurable } from '@radix-ui/rect';\n\nconst SIDE_OPTIONS = ['top', 'right', 'bottom', 'left'] as const;\nconst ALIGN_OPTIONS = ['start', 'center', 'end'] as const;\n\ntype Side = (typeof SIDE_OPTIONS)[number];\ntype Align = (typeof ALIGN_OPTIONS)[number];\n\n/* -------------------------------------------------------------------------------------------------\n * Popper\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPPER_NAME = 'Popper';\n\ntype ScopedProps

= P & { __scopePopper?: Scope };\nconst [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\n\ntype PopperContextValue = {\n anchor: Measurable | null;\n onAnchorChange(anchor: Measurable | null): void;\n};\nconst [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\n\ninterface PopperProps {\n children?: React.ReactNode;\n}\nconst Popper: React.FC = (props: ScopedProps) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n return (\n \n {children}\n \n );\n};\n\nPopper.displayName = POPPER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopperAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopperAnchor';\n\ntype PopperAnchorElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface PopperAnchorProps extends PrimitiveDivProps {\n virtualRef?: React.RefObject;\n}\n\nconst PopperAnchor = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef?.current || ref.current;\n if (previousAnchor !== anchorRef.current) {\n // Consumer can anchor the popper to something that isn't\n // a DOM node e.g. pointer position, so we override the\n // `anchorRef` with their virtual ref in this case.\n context.onAnchorChange(anchorRef.current);\n }\n });\n\n return virtualRef ? null : ;\n }\n);\n\nPopperAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopperContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopperContent';\n\ntype PopperContentContextValue = {\n placedSide: Side;\n onArrowChange(arrow: HTMLSpanElement | null): void;\n arrowX?: number;\n arrowY?: number;\n shouldHideArrow: boolean;\n};\n\nconst [PopperContentProvider, useContentContext] =\n createPopperContext(CONTENT_NAME);\n\ntype Boundary = Element | null;\n\ntype PopperContentElement = React.ComponentRef;\ninterface PopperContentProps extends PrimitiveDivProps {\n side?: Side;\n sideOffset?: number;\n align?: Align;\n alignOffset?: number;\n arrowPadding?: number;\n avoidCollisions?: boolean;\n collisionBoundary?: Boundary | Boundary[];\n collisionPadding?: number | Partial>;\n sticky?: 'partial' | 'always';\n hideWhenDetached?: boolean;\n updatePositionStrategy?: 'optimized' | 'always';\n onPlaced?: () => void;\n}\n\nconst PopperContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopePopper,\n side = 'bottom',\n sideOffset = 0,\n align = 'center',\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = 'partial',\n hideWhenDetached = false,\n updatePositionStrategy = 'optimized',\n onPlaced,\n ...contentProps\n } = props;\n\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n\n const desiredPlacement = (side + (align !== 'center' ? '-' + align : '')) as Placement;\n\n const collisionPadding =\n typeof collisionPaddingProp === 'number'\n ? collisionPaddingProp\n : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries,\n };\n\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: 'fixed',\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === 'always',\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor,\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions &&\n shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === 'partial' ? limitShift() : undefined,\n ...detectOverflowOptions,\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty('--radix-popper-available-width', `${availableWidth}px`);\n contentStyle.setProperty('--radix-popper-available-height', `${availableHeight}px`);\n contentStyle.setProperty('--radix-popper-anchor-width', `${anchorWidth}px`);\n contentStyle.setProperty('--radix-popper-anchor-height', `${anchorHeight}px`);\n },\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: 'referenceHidden', ...detectOverflowOptions }),\n ],\n });\n\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n\n return (\n

= P & { __scopePopper?: Scope };\nconst [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\n\ntype PopperContextValue = {\n anchor: Measurable | null;\n onAnchorChange(anchor: Measurable | null): void;\n};\nconst [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\n\ninterface PopperProps {\n children?: React.ReactNode;\n}\nconst Popper: React.FC = (props: ScopedProps) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n return (\n \n {children}\n \n );\n};\n\nPopper.displayName = POPPER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopperAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopperAnchor';\n\ntype PopperAnchorElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface PopperAnchorProps extends PrimitiveDivProps {\n virtualRef?: React.RefObject;\n}\n\nconst PopperAnchor = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef?.current || ref.current;\n if (previousAnchor !== anchorRef.current) {\n // Consumer can anchor the popper to something that isn't\n // a DOM node e.g. pointer position, so we override the\n // `anchorRef` with their virtual ref in this case.\n context.onAnchorChange(anchorRef.current);\n }\n });\n\n return virtualRef ? null : ;\n }\n);\n\nPopperAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopperContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopperContent';\n\ntype PopperContentContextValue = {\n placedSide: Side;\n onArrowChange(arrow: HTMLSpanElement | null): void;\n arrowX?: number;\n arrowY?: number;\n shouldHideArrow: boolean;\n};\n\nconst [PopperContentProvider, useContentContext] =\n createPopperContext(CONTENT_NAME);\n\ntype Boundary = Element | null;\n\ntype PopperContentElement = React.ComponentRef;\ninterface PopperContentProps extends PrimitiveDivProps {\n side?: Side;\n sideOffset?: number;\n align?: Align;\n alignOffset?: number;\n arrowPadding?: number;\n avoidCollisions?: boolean;\n collisionBoundary?: Boundary | Boundary[];\n collisionPadding?: number | Partial>;\n sticky?: 'partial' | 'always';\n hideWhenDetached?: boolean;\n updatePositionStrategy?: 'optimized' | 'always';\n onPlaced?: () => void;\n}\n\nconst PopperContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopePopper,\n side = 'bottom',\n sideOffset = 0,\n align = 'center',\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = 'partial',\n hideWhenDetached = false,\n updatePositionStrategy = 'optimized',\n onPlaced,\n ...contentProps\n } = props;\n\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n\n const desiredPlacement = (side + (align !== 'center' ? '-' + align : '')) as Placement;\n\n const collisionPadding =\n typeof collisionPaddingProp === 'number'\n ? collisionPaddingProp\n : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries,\n };\n\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: 'fixed',\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === 'always',\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor,\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions &&\n shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === 'partial' ? limitShift() : undefined,\n ...detectOverflowOptions,\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty('--radix-popper-available-width', `${availableWidth}px`);\n contentStyle.setProperty('--radix-popper-available-height', `${availableHeight}px`);\n contentStyle.setProperty('--radix-popper-anchor-width', `${anchorWidth}px`);\n contentStyle.setProperty('--radix-popper-anchor-height', `${anchorHeight}px`);\n },\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: 'referenceHidden', ...detectOverflowOptions }),\n ],\n });\n\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n\n return (\n

= P & { __scopeProgress?: Scope };\nconst [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);\n\ntype ProgressState = 'indeterminate' | 'complete' | 'loading';\ntype ProgressContextValue = { value: number | null; max: number };\nconst [ProgressProvider, useProgressContext] =\n createProgressContext(PROGRESS_NAME);\n\ntype ProgressElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface ProgressProps extends PrimitiveDivProps {\n value?: number | null | undefined;\n max?: number;\n getValueLabel?(value: number, max: number): string;\n}\n\nconst Progress = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeProgress,\n value: valueProp = null,\n max: maxProp,\n getValueLabel = defaultGetValueLabel,\n ...progressProps\n } = props;\n\n if ((maxProp || maxProp === 0) && !isValidMaxNumber(maxProp)) {\n console.error(getInvalidMaxError(`${maxProp}`, 'Progress'));\n }\n\n const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;\n\n if (valueProp !== null && !isValidValueNumber(valueProp, max)) {\n console.error(getInvalidValueError(`${valueProp}`, 'Progress'));\n }\n\n const value = isValidValueNumber(valueProp, max) ? valueProp : null;\n const valueLabel = isNumber(value) ? getValueLabel(value, max) : undefined;\n\n return (\n \n \n \n );\n }\n);\n\nProgress.displayName = PROGRESS_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ProgressIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'ProgressIndicator';\n\ntype ProgressIndicatorElement = React.ComponentRef;\ninterface ProgressIndicatorProps extends PrimitiveDivProps {}\n\nconst ProgressIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeProgress, ...indicatorProps } = props;\n const context = useProgressContext(INDICATOR_NAME, __scopeProgress);\n return (\n \n );\n }\n);\n\nProgressIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction defaultGetValueLabel(value: number, max: number) {\n return `${Math.round((value / max) * 100)}%`;\n}\n\nfunction getProgressState(value: number | undefined | null, maxValue: number): ProgressState {\n return value == null ? 'indeterminate' : value === maxValue ? 'complete' : 'loading';\n}\n\nfunction isNumber(value: any): value is number {\n return typeof value === 'number';\n}\n\nfunction isValidMaxNumber(max: any): max is number {\n // prettier-ignore\n return (\n isNumber(max) &&\n !isNaN(max) &&\n max > 0\n );\n}\n\nfunction isValidValueNumber(value: any, max: number): value is number {\n // prettier-ignore\n return (\n isNumber(value) &&\n !isNaN(value) &&\n value <= max &&\n value >= 0\n );\n}\n\n// Split this out for clearer readability of the error message.\nfunction getInvalidMaxError(propValue: string, componentName: string) {\n return `Invalid prop \\`max\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`;\n}\n\nfunction getInvalidValueError(propValue: string, componentName: string) {\n return `Invalid prop \\`value\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` or \\`undefined\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`;\n}\n\nconst Root = Progress;\nconst Indicator = ProgressIndicator;\n\nexport {\n createProgressScope,\n //\n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+ "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-progress@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_f9f96ded56bfb832298a6aad18d58e70/node_modules/@radix-ui/react-progress/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-progress@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_f9f96ded56bfb832298a6aad18d58e70/node_modules/@radix-ui/react-progress/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5183a128fd397282b7e19deb1b964d2616fa4da2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-progress@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_f9f96ded56bfb832298a6aad18d58e70/node_modules/@radix-ui/react-progress/dist/index.mjs @@ -0,0 +1,101 @@ +"use client"; + +// src/progress.tsx +import * as React from "react"; +import { createContextScope } from "@radix-ui/react-context"; +import { Primitive } from "@radix-ui/react-primitive"; +import { jsx } from "react/jsx-runtime"; +var PROGRESS_NAME = "Progress"; +var DEFAULT_MAX = 100; +var [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME); +var [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME); +var Progress = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeProgress, + value: valueProp = null, + max: maxProp, + getValueLabel = defaultGetValueLabel, + ...progressProps + } = props; + if ((maxProp || maxProp === 0) && !isValidMaxNumber(maxProp)) { + console.error(getInvalidMaxError(`${maxProp}`, "Progress")); + } + const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX; + if (valueProp !== null && !isValidValueNumber(valueProp, max)) { + console.error(getInvalidValueError(`${valueProp}`, "Progress")); + } + const value = isValidValueNumber(valueProp, max) ? valueProp : null; + const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0; + return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ jsx( + Primitive.div, + { + "aria-valuemax": max, + "aria-valuemin": 0, + "aria-valuenow": isNumber(value) ? value : void 0, + "aria-valuetext": valueLabel, + role: "progressbar", + "data-state": getProgressState(value, max), + "data-value": value ?? void 0, + "data-max": max, + ...progressProps, + ref: forwardedRef + } + ) }); + } +); +Progress.displayName = PROGRESS_NAME; +var INDICATOR_NAME = "ProgressIndicator"; +var ProgressIndicator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeProgress, ...indicatorProps } = props; + const context = useProgressContext(INDICATOR_NAME, __scopeProgress); + return /* @__PURE__ */ jsx( + Primitive.div, + { + "data-state": getProgressState(context.value, context.max), + "data-value": context.value ?? void 0, + "data-max": context.max, + ...indicatorProps, + ref: forwardedRef + } + ); + } +); +ProgressIndicator.displayName = INDICATOR_NAME; +function defaultGetValueLabel(value, max) { + return `${Math.round(value / max * 100)}%`; +} +function getProgressState(value, maxValue) { + return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading"; +} +function isNumber(value) { + return typeof value === "number"; +} +function isValidMaxNumber(max) { + return isNumber(max) && !isNaN(max) && max > 0; +} +function isValidValueNumber(value, max) { + return isNumber(value) && !isNaN(value) && value <= max && value >= 0; +} +function getInvalidMaxError(propValue, componentName) { + return `Invalid prop \`max\` of value \`${propValue}\` supplied to \`${componentName}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DEFAULT_MAX}\`.`; +} +function getInvalidValueError(propValue, componentName) { + return `Invalid prop \`value\` of value \`${propValue}\` supplied to \`${componentName}\`. The \`value\` prop must be: + - a positive number + - less than the value passed to \`max\` (or ${DEFAULT_MAX} if no \`max\` prop is set) + - \`null\` or \`undefined\` if the progress is indeterminate. + +Defaulting to \`null\`.`; +} +var Root = Progress; +var Indicator = ProgressIndicator; +export { + Indicator, + Progress, + ProgressIndicator, + Root, + createProgressScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-progress@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_f9f96ded56bfb832298a6aad18d58e70/node_modules/@radix-ui/react-progress/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-progress@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_f9f96ded56bfb832298a6aad18d58e70/node_modules/@radix-ui/react-progress/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..089bcb5acfdc246f1981fe34493e46a4e48f1678 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-progress@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_f9f96ded56bfb832298a6aad18d58e70/node_modules/@radix-ui/react-progress/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/progress.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Progress\n * -----------------------------------------------------------------------------------------------*/\n\nconst PROGRESS_NAME = 'Progress';\nconst DEFAULT_MAX = 100;\n\ntype ScopedProps

= P & { __scopeProgress?: Scope };\nconst [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);\n\ntype ProgressState = 'indeterminate' | 'complete' | 'loading';\ntype ProgressContextValue = { value: number | null; max: number };\nconst [ProgressProvider, useProgressContext] =\n createProgressContext(PROGRESS_NAME);\n\ntype ProgressElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface ProgressProps extends PrimitiveDivProps {\n value?: number | null | undefined;\n max?: number;\n getValueLabel?(value: number, max: number): string;\n}\n\nconst Progress = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeProgress,\n value: valueProp = null,\n max: maxProp,\n getValueLabel = defaultGetValueLabel,\n ...progressProps\n } = props;\n\n if ((maxProp || maxProp === 0) && !isValidMaxNumber(maxProp)) {\n console.error(getInvalidMaxError(`${maxProp}`, 'Progress'));\n }\n\n const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;\n\n if (valueProp !== null && !isValidValueNumber(valueProp, max)) {\n console.error(getInvalidValueError(`${valueProp}`, 'Progress'));\n }\n\n const value = isValidValueNumber(valueProp, max) ? valueProp : null;\n const valueLabel = isNumber(value) ? getValueLabel(value, max) : undefined;\n\n return (\n \n \n \n );\n }\n);\n\nProgress.displayName = PROGRESS_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ProgressIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'ProgressIndicator';\n\ntype ProgressIndicatorElement = React.ComponentRef;\ninterface ProgressIndicatorProps extends PrimitiveDivProps {}\n\nconst ProgressIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeProgress, ...indicatorProps } = props;\n const context = useProgressContext(INDICATOR_NAME, __scopeProgress);\n return (\n \n );\n }\n);\n\nProgressIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction defaultGetValueLabel(value: number, max: number) {\n return `${Math.round((value / max) * 100)}%`;\n}\n\nfunction getProgressState(value: number | undefined | null, maxValue: number): ProgressState {\n return value == null ? 'indeterminate' : value === maxValue ? 'complete' : 'loading';\n}\n\nfunction isNumber(value: any): value is number {\n return typeof value === 'number';\n}\n\nfunction isValidMaxNumber(max: any): max is number {\n // prettier-ignore\n return (\n isNumber(max) &&\n !isNaN(max) &&\n max > 0\n );\n}\n\nfunction isValidValueNumber(value: any, max: number): value is number {\n // prettier-ignore\n return (\n isNumber(value) &&\n !isNaN(value) &&\n value <= max &&\n value >= 0\n );\n}\n\n// Split this out for clearer readability of the error message.\nfunction getInvalidMaxError(propValue: string, componentName: string) {\n return `Invalid prop \\`max\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`;\n}\n\nfunction getInvalidValueError(propValue: string, componentName: string) {\n return `Invalid prop \\`value\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` or \\`undefined\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`;\n}\n\nconst Root = Progress;\nconst Indicator = ProgressIndicator;\n\nexport {\n createProgressScope,\n //\n Progress,\n ProgressIndicator,\n //\n Root,\n Indicator,\n};\nexport type { ProgressProps, ProgressIndicatorProps };\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAoDlB;AA5CR,IAAM,gBAAgB;AACtB,IAAM,cAAc;AAGpB,IAAM,CAAC,uBAAuB,mBAAmB,IAAI,mBAAmB,aAAa;AAIrF,IAAM,CAAC,kBAAkB,kBAAkB,IACzC,sBAA4C,aAAa;AAU3D,IAAM,WAAiB;AAAA,EACrB,CAAC,OAAmC,iBAAiB;AACnD,UAAM;AAAA,MACJ;AAAA,MACA,OAAO,YAAY;AAAA,MACnB,KAAK;AAAA,MACL,gBAAgB;AAAA,MAChB,GAAG;AAAA,IACL,IAAI;AAEJ,SAAK,WAAW,YAAY,MAAM,CAAC,iBAAiB,OAAO,GAAG;AAC5D,cAAQ,MAAM,mBAAmB,GAAG,OAAO,IAAI,UAAU,CAAC;AAAA,IAC5D;AAEA,UAAM,MAAM,iBAAiB,OAAO,IAAI,UAAU;AAElD,QAAI,cAAc,QAAQ,CAAC,mBAAmB,WAAW,GAAG,GAAG;AAC7D,cAAQ,MAAM,qBAAqB,GAAG,SAAS,IAAI,UAAU,CAAC;AAAA,IAChE;AAEA,UAAM,QAAQ,mBAAmB,WAAW,GAAG,IAAI,YAAY;AAC/D,UAAM,aAAa,SAAS,KAAK,IAAI,cAAc,OAAO,GAAG,IAAI;AAEjE,WACE,oBAAC,oBAAiB,OAAO,iBAAiB,OAAc,KACtD;AAAA,MAAC,UAAU;AAAA,MAAV;AAAA,QACC,iBAAe;AAAA,QACf,iBAA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WAAmB,eAAuB;AACtE,SAAO,qCAAqC,SAAS,oBAAoB,aAAa;AAAA;AAAA,gDAExC,WAAW;AAAA;AAAA;AAAA;AAI3D;AAEA,IAAM,OAAO;AACb,IAAM,YAAY;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-progress@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_f9f96ded56bfb832298a6aad18d58e70/node_modules/@radix-ui/react-progress/package.json b/node_modules/.pnpm/@radix-ui+react-progress@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_f9f96ded56bfb832298a6aad18d58e70/node_modules/@radix-ui/react-progress/package.json new file mode 100644 index 0000000000000000000000000000000000000000..54f1fc3f41bddc9fc0a3c525273c5ac5dc9c65d3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-progress@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+reac_f9f96ded56bfb832298a6aad18d58e70/node_modules/@radix-ui/react-progress/package.json @@ -0,0 +1,69 @@ +{ + "name": "@radix-ui/react-progress", + "version": "1.1.7", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-primitive": "2.1.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/eslint-config": "0.0.0", + "@repo/builder": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/LICENSE b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/README.md b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6f8f5362c478d44cd4b7cb44832d2547d3519c47 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/README.md @@ -0,0 +1,3 @@ +# `react-radio-group` + +View docs [here](https://radix-ui.com/primitives/docs/components/radio-group). diff --git a/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d3d0a280aa42bab40df1509970c8659906d04b1f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.d.mts @@ -0,0 +1,58 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as RovingFocusGroup from '@radix-ui/react-roving-focus'; + +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface RadioProps$1 extends PrimitiveButtonProps { + checked?: boolean; + required?: boolean; + onCheck?(): void; +} +declare const Radio: React.ForwardRefExoticComponent>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface RadioIndicatorProps$1 extends PrimitiveSpanProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const RadioIndicator: React.ForwardRefExoticComponent>; + +declare const createRadioGroupScope: _radix_ui_react_context.CreateScope; +type RadioGroupContextValue = { + name?: string; + required: boolean; + disabled: boolean; + value: string | null; + onValueChange(value: string): void; +}; +type RovingFocusGroupProps = React.ComponentPropsWithoutRef; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface RadioGroupProps extends PrimitiveDivProps { + name?: RadioGroupContextValue['name']; + required?: React.ComponentPropsWithoutRef['required']; + disabled?: React.ComponentPropsWithoutRef['disabled']; + dir?: RovingFocusGroupProps['dir']; + orientation?: RovingFocusGroupProps['orientation']; + loop?: RovingFocusGroupProps['loop']; + defaultValue?: string; + value?: string | null; + onValueChange?: RadioGroupContextValue['onValueChange']; +} +declare const RadioGroup: React.ForwardRefExoticComponent>; +type RadioProps = React.ComponentPropsWithoutRef; +interface RadioGroupItemProps extends Omit { + value: string; +} +declare const RadioGroupItem: React.ForwardRefExoticComponent>; +type RadioIndicatorProps = React.ComponentPropsWithoutRef; +interface RadioGroupIndicatorProps extends RadioIndicatorProps { +} +declare const RadioGroupIndicator: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const Indicator: React.ForwardRefExoticComponent>; + +export { Indicator, Item, RadioGroup, RadioGroupIndicator, type RadioGroupIndicatorProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Root, createRadioGroupScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d3d0a280aa42bab40df1509970c8659906d04b1f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.d.ts @@ -0,0 +1,58 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as RovingFocusGroup from '@radix-ui/react-roving-focus'; + +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface RadioProps$1 extends PrimitiveButtonProps { + checked?: boolean; + required?: boolean; + onCheck?(): void; +} +declare const Radio: React.ForwardRefExoticComponent>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface RadioIndicatorProps$1 extends PrimitiveSpanProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const RadioIndicator: React.ForwardRefExoticComponent>; + +declare const createRadioGroupScope: _radix_ui_react_context.CreateScope; +type RadioGroupContextValue = { + name?: string; + required: boolean; + disabled: boolean; + value: string | null; + onValueChange(value: string): void; +}; +type RovingFocusGroupProps = React.ComponentPropsWithoutRef; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface RadioGroupProps extends PrimitiveDivProps { + name?: RadioGroupContextValue['name']; + required?: React.ComponentPropsWithoutRef['required']; + disabled?: React.ComponentPropsWithoutRef['disabled']; + dir?: RovingFocusGroupProps['dir']; + orientation?: RovingFocusGroupProps['orientation']; + loop?: RovingFocusGroupProps['loop']; + defaultValue?: string; + value?: string | null; + onValueChange?: RadioGroupContextValue['onValueChange']; +} +declare const RadioGroup: React.ForwardRefExoticComponent>; +type RadioProps = React.ComponentPropsWithoutRef; +interface RadioGroupItemProps extends Omit { + value: string; +} +declare const RadioGroupItem: React.ForwardRefExoticComponent>; +type RadioIndicatorProps = React.ComponentPropsWithoutRef; +interface RadioGroupIndicatorProps extends RadioIndicatorProps { +} +declare const RadioGroupIndicator: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const Indicator: React.ForwardRefExoticComponent>; + +export { Indicator, Item, RadioGroup, RadioGroupIndicator, type RadioGroupIndicatorProps, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Root, createRadioGroupScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.js b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..deae02992529c4daef1710bb7394a94edeea11f5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.js @@ -0,0 +1,335 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Indicator: () => Indicator, + Item: () => Item2, + RadioGroup: () => RadioGroup, + RadioGroupIndicator: () => RadioGroupIndicator, + RadioGroupItem: () => RadioGroupItem, + Root: () => Root2, + createRadioGroupScope: () => createRadioGroupScope +}); +module.exports = __toCommonJS(index_exports); + +// src/radio-group.tsx +var React2 = __toESM(require("react")); +var import_primitive2 = require("@radix-ui/primitive"); +var import_react_compose_refs2 = require("@radix-ui/react-compose-refs"); +var import_react_context2 = require("@radix-ui/react-context"); +var import_react_primitive2 = require("@radix-ui/react-primitive"); +var RovingFocusGroup = __toESM(require("@radix-ui/react-roving-focus")); +var import_react_roving_focus = require("@radix-ui/react-roving-focus"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_direction = require("@radix-ui/react-direction"); + +// src/radio.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_use_size = require("@radix-ui/react-use-size"); +var import_react_use_previous = require("@radix-ui/react-use-previous"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_jsx_runtime = require("react/jsx-runtime"); +var RADIO_NAME = "Radio"; +var [createRadioContext, createRadioScope] = (0, import_react_context.createContextScope)(RADIO_NAME); +var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME); +var Radio = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeRadio, + name, + checked = false, + required, + disabled, + value = "on", + onCheck, + form, + ...radioProps + } = props; + const [button, setButton] = React.useState(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setButton(node)); + const hasConsumerStoppedPropagationRef = React.useRef(false); + const isFormControl = button ? form || !!button.closest("form") : true; + return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + role: "radio", + "aria-checked": checked, + "data-state": getState(checked), + "data-disabled": disabled ? "" : void 0, + disabled, + value, + ...radioProps, + ref: composedRefs, + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, (event) => { + if (!checked) onCheck?.(); + if (isFormControl) { + hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(); + if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation(); + } + }) + } + ), + isFormControl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + RadioBubbleInput, + { + control: button, + bubbles: !hasConsumerStoppedPropagationRef.current, + name, + value, + checked, + required, + disabled, + form, + style: { transform: "translateX(-100%)" } + } + ) + ] }); + } +); +Radio.displayName = RADIO_NAME; +var INDICATOR_NAME = "RadioIndicator"; +var RadioIndicator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeRadio, forceMount, ...indicatorProps } = props; + const context = useRadioContext(INDICATOR_NAME, __scopeRadio); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.span, + { + "data-state": getState(context.checked), + "data-disabled": context.disabled ? "" : void 0, + ...indicatorProps, + ref: forwardedRef + } + ) }); + } +); +RadioIndicator.displayName = INDICATOR_NAME; +var BUBBLE_INPUT_NAME = "RadioBubbleInput"; +var RadioBubbleInput = React.forwardRef( + ({ + __scopeRadio, + control, + checked, + bubbles = true, + ...props + }, forwardedRef) => { + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(ref, forwardedRef); + const prevChecked = (0, import_react_use_previous.usePrevious)(checked); + const controlSize = (0, import_react_use_size.useSize)(control); + React.useEffect(() => { + const input = ref.current; + if (!input) return; + const inputProto = window.HTMLInputElement.prototype; + const descriptor = Object.getOwnPropertyDescriptor( + inputProto, + "checked" + ); + const setChecked = descriptor.set; + if (prevChecked !== checked && setChecked) { + const event = new Event("click", { bubbles }); + setChecked.call(input, checked); + input.dispatchEvent(event); + } + }, [prevChecked, checked, bubbles]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.input, + { + type: "radio", + "aria-hidden": true, + defaultChecked: checked, + ...props, + tabIndex: -1, + ref: composedRefs, + style: { + ...props.style, + ...controlSize, + position: "absolute", + pointerEvents: "none", + opacity: 0, + margin: 0 + } + } + ); + } +); +RadioBubbleInput.displayName = BUBBLE_INPUT_NAME; +function getState(checked) { + return checked ? "checked" : "unchecked"; +} + +// src/radio-group.tsx +var import_jsx_runtime2 = require("react/jsx-runtime"); +var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]; +var RADIO_GROUP_NAME = "RadioGroup"; +var [createRadioGroupContext, createRadioGroupScope] = (0, import_react_context2.createContextScope)(RADIO_GROUP_NAME, [ + import_react_roving_focus.createRovingFocusGroupScope, + createRadioScope +]); +var useRovingFocusGroupScope = (0, import_react_roving_focus.createRovingFocusGroupScope)(); +var useRadioScope = createRadioScope(); +var [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME); +var RadioGroup = React2.forwardRef( + (props, forwardedRef) => { + const { + __scopeRadioGroup, + name, + defaultValue, + value: valueProp, + required = false, + disabled = false, + orientation, + dir, + loop = true, + onValueChange, + ...groupProps + } = props; + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup); + const direction = (0, import_react_direction.useDirection)(dir); + const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({ + prop: valueProp, + defaultProp: defaultValue ?? null, + onChange: onValueChange, + caller: RADIO_GROUP_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( + RadioGroupProvider, + { + scope: __scopeRadioGroup, + name, + required, + disabled, + value, + onValueChange: setValue, + children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( + RovingFocusGroup.Root, + { + asChild: true, + ...rovingFocusGroupScope, + orientation, + dir: direction, + loop, + children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( + import_react_primitive2.Primitive.div, + { + role: "radiogroup", + "aria-required": required, + "aria-orientation": orientation, + "data-disabled": disabled ? "" : void 0, + dir: direction, + ...groupProps, + ref: forwardedRef + } + ) + } + ) + } + ); + } +); +RadioGroup.displayName = RADIO_GROUP_NAME; +var ITEM_NAME = "RadioGroupItem"; +var RadioGroupItem = React2.forwardRef( + (props, forwardedRef) => { + const { __scopeRadioGroup, disabled, ...itemProps } = props; + const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup); + const isDisabled = context.disabled || disabled; + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup); + const radioScope = useRadioScope(__scopeRadioGroup); + const ref = React2.useRef(null); + const composedRefs = (0, import_react_compose_refs2.useComposedRefs)(forwardedRef, ref); + const checked = context.value === itemProps.value; + const isArrowKeyPressedRef = React2.useRef(false); + React2.useEffect(() => { + const handleKeyDown = (event) => { + if (ARROW_KEYS.includes(event.key)) { + isArrowKeyPressedRef.current = true; + } + }; + const handleKeyUp = () => isArrowKeyPressedRef.current = false; + document.addEventListener("keydown", handleKeyDown); + document.addEventListener("keyup", handleKeyUp); + return () => { + document.removeEventListener("keydown", handleKeyDown); + document.removeEventListener("keyup", handleKeyUp); + }; + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( + RovingFocusGroup.Item, + { + asChild: true, + ...rovingFocusGroupScope, + focusable: !isDisabled, + active: checked, + children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( + Radio, + { + disabled: isDisabled, + required: context.required, + checked, + ...radioScope, + ...itemProps, + name: context.name, + ref: composedRefs, + onCheck: () => context.onValueChange(itemProps.value), + onKeyDown: (0, import_primitive2.composeEventHandlers)((event) => { + if (event.key === "Enter") event.preventDefault(); + }), + onFocus: (0, import_primitive2.composeEventHandlers)(itemProps.onFocus, () => { + if (isArrowKeyPressedRef.current) ref.current?.click(); + }) + } + ) + } + ); + } +); +RadioGroupItem.displayName = ITEM_NAME; +var INDICATOR_NAME2 = "RadioGroupIndicator"; +var RadioGroupIndicator = React2.forwardRef( + (props, forwardedRef) => { + const { __scopeRadioGroup, ...indicatorProps } = props; + const radioScope = useRadioScope(__scopeRadioGroup); + return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RadioIndicator, { ...radioScope, ...indicatorProps, ref: forwardedRef }); + } +); +RadioGroupIndicator.displayName = INDICATOR_NAME2; +var Root2 = RadioGroup; +var Item2 = RadioGroupItem; +var Indicator = RadioGroupIndicator; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d0639cd052d07b3035d854caf8f984e8040cdba5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/radio-group.tsx", "../src/radio.tsx"], + "sourcesContent": ["'use client';\nexport {\n createRadioGroupScope,\n //\n RadioGroup,\n RadioGroupItem,\n RadioGroupIndicator,\n //\n Root,\n Item,\n Indicator,\n} from './radio-group';\nexport type { RadioGroupProps, RadioGroupItemProps, RadioGroupIndicatorProps } from './radio-group';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { Radio, RadioIndicator, createRadioScope } from './radio';\n\nimport type { Scope } from '@radix-ui/react-context';\n\nconst ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\n\n/* -------------------------------------------------------------------------------------------------\n * RadioGroup\n * -----------------------------------------------------------------------------------------------*/\nconst RADIO_GROUP_NAME = 'RadioGroup';\n\ntype ScopedProps

= P & { __scopeRadioGroup?: Scope };\nconst [createRadioGroupContext, createRadioGroupScope] = createContextScope(RADIO_GROUP_NAME, [\n createRovingFocusGroupScope,\n createRadioScope,\n]);\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\nconst useRadioScope = createRadioScope();\n\ntype RadioGroupContextValue = {\n name?: string;\n required: boolean;\n disabled: boolean;\n value: string | null;\n onValueChange(value: string): void;\n};\n\nconst [RadioGroupProvider, useRadioGroupContext] =\n createRadioGroupContext(RADIO_GROUP_NAME);\n\ntype RadioGroupElement = React.ComponentRef;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface RadioGroupProps extends PrimitiveDivProps {\n name?: RadioGroupContextValue['name'];\n required?: React.ComponentPropsWithoutRef['required'];\n disabled?: React.ComponentPropsWithoutRef['disabled'];\n dir?: RovingFocusGroupProps['dir'];\n orientation?: RovingFocusGroupProps['orientation'];\n loop?: RovingFocusGroupProps['loop'];\n defaultValue?: string;\n value?: string | null;\n onValueChange?: RadioGroupContextValue['onValueChange'];\n}\n\nconst RadioGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeRadioGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation,\n dir,\n loop = true,\n onValueChange,\n ...groupProps\n } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? null,\n onChange: onValueChange as (value: string | null) => void,\n caller: RADIO_GROUP_NAME,\n });\n\n return (\n \n \n \n \n \n );\n }\n);\n\nRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * RadioGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'RadioGroupItem';\n\ntype RadioGroupItemElement = React.ComponentRef;\ntype RadioProps = React.ComponentPropsWithoutRef;\ninterface RadioGroupItemProps extends Omit {\n value: string;\n}\n\nconst RadioGroupItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeRadioGroup, disabled, ...itemProps } = props;\n const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);\n const isDisabled = context.disabled || disabled;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const radioScope = useRadioScope(__scopeRadioGroup);\n const ref = React.useRef>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const checked = context.value === itemProps.value;\n const isArrowKeyPressedRef = React.useRef(false);\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (ARROW_KEYS.includes(event.key)) {\n isArrowKeyPressedRef.current = true;\n }\n };\n const handleKeyUp = () => (isArrowKeyPressedRef.current = false);\n document.addEventListener('keydown', handleKeyDown);\n document.addEventListener('keyup', handleKeyUp);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n document.removeEventListener('keyup', handleKeyUp);\n };\n }, []);\n\n return (\n \n context.onValueChange(itemProps.value)}\n onKeyDown={composeEventHandlers((event) => {\n // According to WAI ARIA, radio groups don't activate items on enter keypress\n if (event.key === 'Enter') event.preventDefault();\n })}\n onFocus={composeEventHandlers(itemProps.onFocus, () => {\n /**\n * Our `RovingFocusGroup` will focus the radio when navigating with arrow keys\n * and we need to \"check\" it in that case. We click it to \"check\" it (instead\n * of updating `context.value`) so that the radio change event fires.\n */\n if (isArrowKeyPressedRef.current) ref.current?.click();\n })}\n />\n \n );\n }\n);\n\nRadioGroupItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * RadioGroupIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'RadioGroupIndicator';\n\ntype RadioGroupIndicatorElement = React.ComponentRef;\ntype RadioIndicatorProps = React.ComponentPropsWithoutRef;\ninterface RadioGroupIndicatorProps extends RadioIndicatorProps {}\n\nconst RadioGroupIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeRadioGroup, ...indicatorProps } = props;\n const radioScope = useRadioScope(__scopeRadioGroup);\n return ;\n }\n);\n\nRadioGroupIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = RadioGroup;\nconst Item = RadioGroupItem;\nconst Indicator = RadioGroupIndicator;\n\nexport {\n createRadioGroupScope,\n //\n RadioGroup,\n RadioGroupItem,\n RadioGroupIndicator,\n //\n Root,\n Item,\n Indicator,\n};\nexport type { RadioGroupProps, RadioGroupItemProps, RadioGroupIndicatorProps };\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Radio\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_NAME = 'Radio';\n\ntype ScopedProps

= P & { __scopeRadio?: Scope };\nconst [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);\n\ntype RadioContextValue = { checked: boolean; disabled?: boolean };\nconst [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);\n\ntype RadioElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface RadioProps extends PrimitiveButtonProps {\n checked?: boolean;\n required?: boolean;\n onCheck?(): void;\n}\n\nconst Radio = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeRadio,\n name,\n checked = false,\n required,\n disabled,\n value = 'on',\n onCheck,\n form,\n ...radioProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = button ? form || !!button.closest('form') : true;\n\n return (\n \n {\n // radios cannot be unchecked so we only communicate a checked state\n if (!checked) onCheck?.();\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n // if radio is in a form, stop propagation from the button so that we only propagate\n // one click event (from the input). We propagate changes from an input so that native\n // form validation works and form events reflect radio updates.\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })}\n />\n {isFormControl && (\n \n )}\n \n );\n }\n);\n\nRadio.displayName = RADIO_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * RadioIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'RadioIndicator';\n\ntype RadioIndicatorElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\nexport interface RadioIndicatorProps extends PrimitiveSpanProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst RadioIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeRadio, forceMount, ...indicatorProps } = props;\n const context = useRadioContext(INDICATOR_NAME, __scopeRadio);\n return (\n \n \n \n );\n }\n);\n\nRadioIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * RadioBubbleInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUBBLE_INPUT_NAME = 'RadioBubbleInput';\n\ntype InputProps = React.ComponentPropsWithoutRef;\ninterface RadioBubbleInputProps extends Omit {\n checked: boolean;\n control: HTMLElement | null;\n bubbles: boolean;\n}\n\nconst RadioBubbleInput = React.forwardRef(\n (\n {\n __scopeRadio,\n control,\n checked,\n bubbles = true,\n ...props\n }: ScopedProps,\n forwardedRef\n ) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n\n // Bubble checked change to parents (e.g form change event)\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n 'checked'\n ) as PropertyDescriptor;\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event('click', { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n\n return (\n \n );\n }\n);\n\nRadioBubbleInput.displayName = BUBBLE_INPUT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction getState(checked: boolean) {\n return checked ? 'checked' : 'unchecked';\n}\n\nexport {\n createRadioScope,\n //\n Radio,\n RadioIndicator,\n};\nexport type { RadioProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA,EAAA;AAAA;AAAA;AAAA,cAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,IAAAC,SAAuB;AACvB,IAAAC,oBAAqC;AACrC,IAAAC,6BAAgC;AAChC,IAAAC,wBAAmC;AACnC,IAAAC,0BAA0B;AAC1B,uBAAkC;AAClC,gCAA4C;AAC5C,0CAAqC;AACrC,6BAA6B;;;ACR7B,YAAuB;AACvB,uBAAqC;AACrC,gCAAgC;AAChC,2BAAmC;AACnC,4BAAwB;AACxB,gCAA4B;AAC5B,4BAAyB;AACzB,6BAA0B;AA4CpB;AApCN,IAAM,aAAa;AAGnB,IAAM,CAAC,oBAAoB,gBAAgB,QAAI,yCAAmB,UAAU;AAG5E,IAAM,CAAC,eAAe,eAAe,IAAI,mBAAsC,UAAU;AAUzF,IAAM,QAAc;AAAA,EAClB,CAAC,OAAgC,iBAAiB;AAChD,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI;AACJ,UAAM,CAAC,QAAQ,SAAS,IAAU,eAAmC,IAAI;AACzE,UAAM,mBAAe,2CAAgB,cAAc,CAAC,SAAS,UAAU,IAAI,CAAC;AAC5E,UAAM,mCAAyC,aAAO,KAAK;AAE3D,UAAM,gBAAgB,SAAS,QAAQ,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7B,IAAMC,kBAAiB;AAMvB,IAAM,sBAA4B;AAAA,EAChC,CAAC,OAA8C,iBAAiB;AAC9D,UAAM,EAAE,mBAAmB,GAAG,eAAe,IAAI;AACjD,UAAM,aAAa,cAAc,iBAAiB;AAClD,WAAO,6CAAC,kBAAgB,GAAG,YAAa,GAAG,gBAAgB,KAAK,cAAc;AAAA,EAChF;AACF;AAEA,oBAAoB,cAAcA;AAIlC,IAAMC,QAAO;AACb,IAAMC,QAAO;AACb,IAAM,YAAY;", + "names": ["Item", "Root", "React", "import_primitive", "import_react_compose_refs", "import_react_context", "import_react_primitive", "import_jsx_runtime", "INDICATOR_NAME", "Root", "Item"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..46bb67f279d7e0a06cb177ad6a8b3de12745d4a5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.mjs @@ -0,0 +1,303 @@ +"use client"; + +// src/radio-group.tsx +import * as React2 from "react"; +import { composeEventHandlers as composeEventHandlers2 } from "@radix-ui/primitive"; +import { useComposedRefs as useComposedRefs2 } from "@radix-ui/react-compose-refs"; +import { createContextScope as createContextScope2 } from "@radix-ui/react-context"; +import { Primitive as Primitive2 } from "@radix-ui/react-primitive"; +import * as RovingFocusGroup from "@radix-ui/react-roving-focus"; +import { createRovingFocusGroupScope } from "@radix-ui/react-roving-focus"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { useDirection } from "@radix-ui/react-direction"; + +// src/radio.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { createContextScope } from "@radix-ui/react-context"; +import { useSize } from "@radix-ui/react-use-size"; +import { usePrevious } from "@radix-ui/react-use-previous"; +import { Presence } from "@radix-ui/react-presence"; +import { Primitive } from "@radix-ui/react-primitive"; +import { jsx, jsxs } from "react/jsx-runtime"; +var RADIO_NAME = "Radio"; +var [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME); +var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME); +var Radio = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeRadio, + name, + checked = false, + required, + disabled, + value = "on", + onCheck, + form, + ...radioProps + } = props; + const [button, setButton] = React.useState(null); + const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node)); + const hasConsumerStoppedPropagationRef = React.useRef(false); + const isFormControl = button ? form || !!button.closest("form") : true; + return /* @__PURE__ */ jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [ + /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + role: "radio", + "aria-checked": checked, + "data-state": getState(checked), + "data-disabled": disabled ? "" : void 0, + disabled, + value, + ...radioProps, + ref: composedRefs, + onClick: composeEventHandlers(props.onClick, (event) => { + if (!checked) onCheck?.(); + if (isFormControl) { + hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(); + if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation(); + } + }) + } + ), + isFormControl && /* @__PURE__ */ jsx( + RadioBubbleInput, + { + control: button, + bubbles: !hasConsumerStoppedPropagationRef.current, + name, + value, + checked, + required, + disabled, + form, + style: { transform: "translateX(-100%)" } + } + ) + ] }); + } +); +Radio.displayName = RADIO_NAME; +var INDICATOR_NAME = "RadioIndicator"; +var RadioIndicator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeRadio, forceMount, ...indicatorProps } = props; + const context = useRadioContext(INDICATOR_NAME, __scopeRadio); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsx( + Primitive.span, + { + "data-state": getState(context.checked), + "data-disabled": context.disabled ? "" : void 0, + ...indicatorProps, + ref: forwardedRef + } + ) }); + } +); +RadioIndicator.displayName = INDICATOR_NAME; +var BUBBLE_INPUT_NAME = "RadioBubbleInput"; +var RadioBubbleInput = React.forwardRef( + ({ + __scopeRadio, + control, + checked, + bubbles = true, + ...props + }, forwardedRef) => { + const ref = React.useRef(null); + const composedRefs = useComposedRefs(ref, forwardedRef); + const prevChecked = usePrevious(checked); + const controlSize = useSize(control); + React.useEffect(() => { + const input = ref.current; + if (!input) return; + const inputProto = window.HTMLInputElement.prototype; + const descriptor = Object.getOwnPropertyDescriptor( + inputProto, + "checked" + ); + const setChecked = descriptor.set; + if (prevChecked !== checked && setChecked) { + const event = new Event("click", { bubbles }); + setChecked.call(input, checked); + input.dispatchEvent(event); + } + }, [prevChecked, checked, bubbles]); + return /* @__PURE__ */ jsx( + Primitive.input, + { + type: "radio", + "aria-hidden": true, + defaultChecked: checked, + ...props, + tabIndex: -1, + ref: composedRefs, + style: { + ...props.style, + ...controlSize, + position: "absolute", + pointerEvents: "none", + opacity: 0, + margin: 0 + } + } + ); + } +); +RadioBubbleInput.displayName = BUBBLE_INPUT_NAME; +function getState(checked) { + return checked ? "checked" : "unchecked"; +} + +// src/radio-group.tsx +import { jsx as jsx2 } from "react/jsx-runtime"; +var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]; +var RADIO_GROUP_NAME = "RadioGroup"; +var [createRadioGroupContext, createRadioGroupScope] = createContextScope2(RADIO_GROUP_NAME, [ + createRovingFocusGroupScope, + createRadioScope +]); +var useRovingFocusGroupScope = createRovingFocusGroupScope(); +var useRadioScope = createRadioScope(); +var [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME); +var RadioGroup = React2.forwardRef( + (props, forwardedRef) => { + const { + __scopeRadioGroup, + name, + defaultValue, + value: valueProp, + required = false, + disabled = false, + orientation, + dir, + loop = true, + onValueChange, + ...groupProps + } = props; + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup); + const direction = useDirection(dir); + const [value, setValue] = useControllableState({ + prop: valueProp, + defaultProp: defaultValue ?? null, + onChange: onValueChange, + caller: RADIO_GROUP_NAME + }); + return /* @__PURE__ */ jsx2( + RadioGroupProvider, + { + scope: __scopeRadioGroup, + name, + required, + disabled, + value, + onValueChange: setValue, + children: /* @__PURE__ */ jsx2( + RovingFocusGroup.Root, + { + asChild: true, + ...rovingFocusGroupScope, + orientation, + dir: direction, + loop, + children: /* @__PURE__ */ jsx2( + Primitive2.div, + { + role: "radiogroup", + "aria-required": required, + "aria-orientation": orientation, + "data-disabled": disabled ? "" : void 0, + dir: direction, + ...groupProps, + ref: forwardedRef + } + ) + } + ) + } + ); + } +); +RadioGroup.displayName = RADIO_GROUP_NAME; +var ITEM_NAME = "RadioGroupItem"; +var RadioGroupItem = React2.forwardRef( + (props, forwardedRef) => { + const { __scopeRadioGroup, disabled, ...itemProps } = props; + const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup); + const isDisabled = context.disabled || disabled; + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup); + const radioScope = useRadioScope(__scopeRadioGroup); + const ref = React2.useRef(null); + const composedRefs = useComposedRefs2(forwardedRef, ref); + const checked = context.value === itemProps.value; + const isArrowKeyPressedRef = React2.useRef(false); + React2.useEffect(() => { + const handleKeyDown = (event) => { + if (ARROW_KEYS.includes(event.key)) { + isArrowKeyPressedRef.current = true; + } + }; + const handleKeyUp = () => isArrowKeyPressedRef.current = false; + document.addEventListener("keydown", handleKeyDown); + document.addEventListener("keyup", handleKeyUp); + return () => { + document.removeEventListener("keydown", handleKeyDown); + document.removeEventListener("keyup", handleKeyUp); + }; + }, []); + return /* @__PURE__ */ jsx2( + RovingFocusGroup.Item, + { + asChild: true, + ...rovingFocusGroupScope, + focusable: !isDisabled, + active: checked, + children: /* @__PURE__ */ jsx2( + Radio, + { + disabled: isDisabled, + required: context.required, + checked, + ...radioScope, + ...itemProps, + name: context.name, + ref: composedRefs, + onCheck: () => context.onValueChange(itemProps.value), + onKeyDown: composeEventHandlers2((event) => { + if (event.key === "Enter") event.preventDefault(); + }), + onFocus: composeEventHandlers2(itemProps.onFocus, () => { + if (isArrowKeyPressedRef.current) ref.current?.click(); + }) + } + ) + } + ); + } +); +RadioGroupItem.displayName = ITEM_NAME; +var INDICATOR_NAME2 = "RadioGroupIndicator"; +var RadioGroupIndicator = React2.forwardRef( + (props, forwardedRef) => { + const { __scopeRadioGroup, ...indicatorProps } = props; + const radioScope = useRadioScope(__scopeRadioGroup); + return /* @__PURE__ */ jsx2(RadioIndicator, { ...radioScope, ...indicatorProps, ref: forwardedRef }); + } +); +RadioGroupIndicator.displayName = INDICATOR_NAME2; +var Root2 = RadioGroup; +var Item2 = RadioGroupItem; +var Indicator = RadioGroupIndicator; +export { + Indicator, + Item2 as Item, + RadioGroup, + RadioGroupIndicator, + RadioGroupItem, + Root2 as Root, + createRadioGroupScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..d699a82dc6a776ede920d673befecca82b9d263f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/radio-group.tsx", "../src/radio.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { Radio, RadioIndicator, createRadioScope } from './radio';\n\nimport type { Scope } from '@radix-ui/react-context';\n\nconst ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\n\n/* -------------------------------------------------------------------------------------------------\n * RadioGroup\n * -----------------------------------------------------------------------------------------------*/\nconst RADIO_GROUP_NAME = 'RadioGroup';\n\ntype ScopedProps

= P & { __scopeRadioGroup?: Scope };\nconst [createRadioGroupContext, createRadioGroupScope] = createContextScope(RADIO_GROUP_NAME, [\n createRovingFocusGroupScope,\n createRadioScope,\n]);\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\nconst useRadioScope = createRadioScope();\n\ntype RadioGroupContextValue = {\n name?: string;\n required: boolean;\n disabled: boolean;\n value: string | null;\n onValueChange(value: string): void;\n};\n\nconst [RadioGroupProvider, useRadioGroupContext] =\n createRadioGroupContext(RADIO_GROUP_NAME);\n\ntype RadioGroupElement = React.ComponentRef;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface RadioGroupProps extends PrimitiveDivProps {\n name?: RadioGroupContextValue['name'];\n required?: React.ComponentPropsWithoutRef['required'];\n disabled?: React.ComponentPropsWithoutRef['disabled'];\n dir?: RovingFocusGroupProps['dir'];\n orientation?: RovingFocusGroupProps['orientation'];\n loop?: RovingFocusGroupProps['loop'];\n defaultValue?: string;\n value?: string | null;\n onValueChange?: RadioGroupContextValue['onValueChange'];\n}\n\nconst RadioGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeRadioGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation,\n dir,\n loop = true,\n onValueChange,\n ...groupProps\n } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? null,\n onChange: onValueChange as (value: string | null) => void,\n caller: RADIO_GROUP_NAME,\n });\n\n return (\n \n \n \n \n \n );\n }\n);\n\nRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * RadioGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'RadioGroupItem';\n\ntype RadioGroupItemElement = React.ComponentRef;\ntype RadioProps = React.ComponentPropsWithoutRef;\ninterface RadioGroupItemProps extends Omit {\n value: string;\n}\n\nconst RadioGroupItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeRadioGroup, disabled, ...itemProps } = props;\n const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);\n const isDisabled = context.disabled || disabled;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const radioScope = useRadioScope(__scopeRadioGroup);\n const ref = React.useRef>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const checked = context.value === itemProps.value;\n const isArrowKeyPressedRef = React.useRef(false);\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (ARROW_KEYS.includes(event.key)) {\n isArrowKeyPressedRef.current = true;\n }\n };\n const handleKeyUp = () => (isArrowKeyPressedRef.current = false);\n document.addEventListener('keydown', handleKeyDown);\n document.addEventListener('keyup', handleKeyUp);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n document.removeEventListener('keyup', handleKeyUp);\n };\n }, []);\n\n return (\n \n context.onValueChange(itemProps.value)}\n onKeyDown={composeEventHandlers((event) => {\n // According to WAI ARIA, radio groups don't activate items on enter keypress\n if (event.key === 'Enter') event.preventDefault();\n })}\n onFocus={composeEventHandlers(itemProps.onFocus, () => {\n /**\n * Our `RovingFocusGroup` will focus the radio when navigating with arrow keys\n * and we need to \"check\" it in that case. We click it to \"check\" it (instead\n * of updating `context.value`) so that the radio change event fires.\n */\n if (isArrowKeyPressedRef.current) ref.current?.click();\n })}\n />\n \n );\n }\n);\n\nRadioGroupItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * RadioGroupIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'RadioGroupIndicator';\n\ntype RadioGroupIndicatorElement = React.ComponentRef;\ntype RadioIndicatorProps = React.ComponentPropsWithoutRef;\ninterface RadioGroupIndicatorProps extends RadioIndicatorProps {}\n\nconst RadioGroupIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeRadioGroup, ...indicatorProps } = props;\n const radioScope = useRadioScope(__scopeRadioGroup);\n return ;\n }\n);\n\nRadioGroupIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = RadioGroup;\nconst Item = RadioGroupItem;\nconst Indicator = RadioGroupIndicator;\n\nexport {\n createRadioGroupScope,\n //\n RadioGroup,\n RadioGroupItem,\n RadioGroupIndicator,\n //\n Root,\n Item,\n Indicator,\n};\nexport type { RadioGroupProps, RadioGroupItemProps, RadioGroupIndicatorProps };\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Radio\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_NAME = 'Radio';\n\ntype ScopedProps

= P & { __scopeRadio?: Scope };\nconst [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);\n\ntype RadioContextValue = { checked: boolean; disabled?: boolean };\nconst [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);\n\ntype RadioElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface RadioProps extends PrimitiveButtonProps {\n checked?: boolean;\n required?: boolean;\n onCheck?(): void;\n}\n\nconst Radio = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeRadio,\n name,\n checked = false,\n required,\n disabled,\n value = 'on',\n onCheck,\n form,\n ...radioProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = button ? form || !!button.closest('form') : true;\n\n return (\n \n {\n // radios cannot be unchecked so we only communicate a checked state\n if (!checked) onCheck?.();\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n // if radio is in a form, stop propagation from the button so that we only propagate\n // one click event (from the input). We propagate changes from an input so that native\n // form validation works and form events reflect radio updates.\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })}\n />\n {isFormControl && (\n \n )}\n \n );\n }\n);\n\nRadio.displayName = RADIO_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * RadioIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'RadioIndicator';\n\ntype RadioIndicatorElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\nexport interface RadioIndicatorProps extends PrimitiveSpanProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst RadioIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeRadio, forceMount, ...indicatorProps } = props;\n const context = useRadioContext(INDICATOR_NAME, __scopeRadio);\n return (\n \n \n \n );\n }\n);\n\nRadioIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * RadioBubbleInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUBBLE_INPUT_NAME = 'RadioBubbleInput';\n\ntype InputProps = React.ComponentPropsWithoutRef;\ninterface RadioBubbleInputProps extends Omit {\n checked: boolean;\n control: HTMLElement | null;\n bubbles: boolean;\n}\n\nconst RadioBubbleInput = React.forwardRef(\n (\n {\n __scopeRadio,\n control,\n checked,\n bubbles = true,\n ...props\n }: ScopedProps,\n forwardedRef\n ) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n\n // Bubble checked change to parents (e.g form change event)\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n 'checked'\n ) as PropertyDescriptor;\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event('click', { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n\n return (\n \n );\n }\n);\n\nRadioBubbleInput.displayName = BUBBLE_INPUT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction getState(checked: boolean) {\n return checked ? 'checked' : 'unchecked';\n}\n\nexport {\n createRadioScope,\n //\n Radio,\n RadioIndicator,\n};\nexport type { RadioProps };\n"], + "mappings": ";;;AAAA,YAAYA,YAAW;AACvB,SAAS,wBAAAC,6BAA4B;AACrC,SAAS,mBAAAC,wBAAuB;AAChC,SAAS,sBAAA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,cAAc,MAAO,qBAAqB,UAAU;AAC1D,eAAS,iBAAiB,WAAW,aAAa;AAClD,eAAS,iBAAiB,SAAS,WAAW;AAC9C,aAAO,MAAM;AACX,iBAAS,oBAAoB,WAAW,aAAa;AACrD,iBAAS,oBAAoB,SAAS,WAAW;AAAA,MACnD;AAAA,IACF,GAAG,CAAC,CAAC;AAEL,WACE,gBAAAH;AAAA,MAAkB;AAAA,MAAjB;AAAA,QACC,SAAO;AAAA,QACN,GAAG;AAAA,QACJ,WAAW,CAAC;AAAA,QACZ,QAAQ;AAAA,QAER,0BAAAA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,UAAU,QAAQ;AAAA,YAClB;AAAA,YACC,GAAG;AAAA,YACH,GAAG;AAAA,YACJ,MAAM,QAAQ;AAAA,YACd,KAAK;AAAA,YACL,SAAS,MAAM,QAAQ,cAAc,UAAU,KAAK;AAAA,YACpD,WAAWI,sBAAqB,CAAC,UAAU;AAEzC,kBAAI,MAAM,QAAQ,QAAS,OAAM,eAAe;AAAA,YAClD,CAAC;AAAA,YACD,SAASA,sBAAqB,UAAU,SAAS,MAAM;AAMrD,kBAAI,qBAAqB,QAAS,KAAI,SAAS,MAAM;AAAA,YACvD,CAAC;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;AAM7B,IAAMC,kBAAiB;AAMvB,IAAM,sBAA4B;AAAA,EAChC,CAAC,OAA8C,iBAAiB;AAC9D,UAAM,EAAE,mBAAmB,GAAG,eAAe,IAAI;AACjD,UAAM,aAAa,cAAc,iBAAiB;AAClD,WAAO,gBAAAL,KAAC,kBAAgB,GAAG,YAAa,GAAG,gBAAgB,KAAK,cAAc;AAAA,EAChF;AACF;AAEA,oBAAoB,cAAcK;AAIlC,IAAMC,QAAO;AACb,IAAMC,QAAO;AACb,IAAM,YAAY;", + "names": ["React", "composeEventHandlers", "useComposedRefs", "createContextScope", "Primitive", "jsx", "createContextScope", "Primitive", "useComposedRefs", "composeEventHandlers", "INDICATOR_NAME", "Root", "Item"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/package.json b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/package.json new file mode 100644 index 0000000000000000000000000000000000000000..40580e09d2d5aa565c2ab0edf8c668c26439422f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-radio-group@1.3.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+r_9f1a5621114c6de57bb8fe37a1b9c675/node_modules/@radix-ui/react-radio-group/package.json @@ -0,0 +1,77 @@ +{ + "name": "@radix-ui/react-radio-group", + "version": "1.3.8", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-roving-focus": "1.1.11", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-use-previous": "1.1.1", + "@radix-ui/react-use-size": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/eslint-config": "0.0.0", + "@repo/builder": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/LICENSE b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/README.md b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bc1d8c035336ae4ca27bc783defa948b0cceb5f0 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/README.md @@ -0,0 +1,3 @@ +# `react-roving-focus` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7a81f796b48dc35d94d63603a0afffd55bccb8f6 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.d.mts @@ -0,0 +1,49 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createRovingFocusGroupScope: _radix_ui_react_context.CreateScope; +type Orientation = React.AriaAttributes['aria-orientation']; +type Direction = 'ltr' | 'rtl'; +interface RovingFocusGroupOptions { + /** + * The orientation of the group. + * Mainly so arrow navigation is done accordingly (left & right vs. up & down) + */ + orientation?: Orientation; + /** + * The direction of navigation between items. + */ + dir?: Direction; + /** + * Whether keyboard navigation should loop around + * @defaultValue false + */ + loop?: boolean; +} +interface RovingFocusGroupProps extends RovingFocusGroupImplProps { +} +declare const RovingFocusGroup: React.ForwardRefExoticComponent>; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface RovingFocusGroupImplProps extends Omit, RovingFocusGroupOptions { + currentTabStopId?: string | null; + defaultCurrentTabStopId?: string; + onCurrentTabStopIdChange?: (tabStopId: string | null) => void; + onEntryFocus?: (event: Event) => void; + preventScrollOnEntryFocus?: boolean; +} +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface RovingFocusItemProps extends Omit { + tabStopId?: string; + focusable?: boolean; + active?: boolean; + children?: React.ReactNode | ((props: { + hasTabStop: boolean; + isCurrentTabStop: boolean; + }) => React.ReactNode); +} +declare const RovingFocusGroupItem: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; + +export { Item, Root, RovingFocusGroup, RovingFocusGroupItem, type RovingFocusGroupProps, type RovingFocusItemProps, createRovingFocusGroupScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7a81f796b48dc35d94d63603a0afffd55bccb8f6 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts @@ -0,0 +1,49 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createRovingFocusGroupScope: _radix_ui_react_context.CreateScope; +type Orientation = React.AriaAttributes['aria-orientation']; +type Direction = 'ltr' | 'rtl'; +interface RovingFocusGroupOptions { + /** + * The orientation of the group. + * Mainly so arrow navigation is done accordingly (left & right vs. up & down) + */ + orientation?: Orientation; + /** + * The direction of navigation between items. + */ + dir?: Direction; + /** + * Whether keyboard navigation should loop around + * @defaultValue false + */ + loop?: boolean; +} +interface RovingFocusGroupProps extends RovingFocusGroupImplProps { +} +declare const RovingFocusGroup: React.ForwardRefExoticComponent>; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface RovingFocusGroupImplProps extends Omit, RovingFocusGroupOptions { + currentTabStopId?: string | null; + defaultCurrentTabStopId?: string; + onCurrentTabStopIdChange?: (tabStopId: string | null) => void; + onEntryFocus?: (event: Event) => void; + preventScrollOnEntryFocus?: boolean; +} +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface RovingFocusItemProps extends Omit { + tabStopId?: string; + focusable?: boolean; + active?: boolean; + children?: React.ReactNode | ((props: { + hasTabStop: boolean; + isCurrentTabStop: boolean; + }) => React.ReactNode); +} +declare const RovingFocusGroupItem: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; + +export { Item, Root, RovingFocusGroup, RovingFocusGroupItem, type RovingFocusGroupProps, type RovingFocusItemProps, createRovingFocusGroupScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.js b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b49982f5a62521aaf0be8831ad7c86d661ab04a0 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.js @@ -0,0 +1,263 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Item: () => Item, + Root: () => Root, + RovingFocusGroup: () => RovingFocusGroup, + RovingFocusGroupItem: () => RovingFocusGroupItem, + createRovingFocusGroupScope: () => createRovingFocusGroupScope +}); +module.exports = __toCommonJS(index_exports); + +// src/roving-focus-group.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_collection = require("@radix-ui/react-collection"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_id = require("@radix-ui/react-id"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_direction = require("@radix-ui/react-direction"); +var import_jsx_runtime = require("react/jsx-runtime"); +var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus"; +var EVENT_OPTIONS = { bubbles: false, cancelable: true }; +var GROUP_NAME = "RovingFocusGroup"; +var [Collection, useCollection, createCollectionScope] = (0, import_react_collection.createCollection)(GROUP_NAME); +var [createRovingFocusGroupContext, createRovingFocusGroupScope] = (0, import_react_context.createContextScope)( + GROUP_NAME, + [createCollectionScope] +); +var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME); +var RovingFocusGroup = React.forwardRef( + (props, forwardedRef) => { + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) }); + } +); +RovingFocusGroup.displayName = GROUP_NAME; +var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => { + const { + __scopeRovingFocusGroup, + orientation, + loop = false, + dir, + currentTabStopId: currentTabStopIdProp, + defaultCurrentTabStopId, + onCurrentTabStopIdChange, + onEntryFocus, + preventScrollOnEntryFocus = false, + ...groupProps + } = props; + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + const direction = (0, import_react_direction.useDirection)(dir); + const [currentTabStopId, setCurrentTabStopId] = (0, import_react_use_controllable_state.useControllableState)({ + prop: currentTabStopIdProp, + defaultProp: defaultCurrentTabStopId ?? null, + onChange: onCurrentTabStopIdChange, + caller: GROUP_NAME + }); + const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false); + const handleEntryFocus = (0, import_react_use_callback_ref.useCallbackRef)(onEntryFocus); + const getItems = useCollection(__scopeRovingFocusGroup); + const isClickFocusRef = React.useRef(false); + const [focusableItemsCount, setFocusableItemsCount] = React.useState(0); + React.useEffect(() => { + const node = ref.current; + if (node) { + node.addEventListener(ENTRY_FOCUS, handleEntryFocus); + return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus); + } + }, [handleEntryFocus]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + RovingFocusProvider, + { + scope: __scopeRovingFocusGroup, + orientation, + dir: direction, + loop, + currentTabStopId, + onItemFocus: React.useCallback( + (tabStopId) => setCurrentTabStopId(tabStopId), + [setCurrentTabStopId] + ), + onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []), + onFocusableItemAdd: React.useCallback( + () => setFocusableItemsCount((prevCount) => prevCount + 1), + [] + ), + onFocusableItemRemove: React.useCallback( + () => setFocusableItemsCount((prevCount) => prevCount - 1), + [] + ), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0, + "data-orientation": orientation, + ...groupProps, + ref: composedRefs, + style: { outline: "none", ...props.style }, + onMouseDown: (0, import_primitive.composeEventHandlers)(props.onMouseDown, () => { + isClickFocusRef.current = true; + }), + onFocus: (0, import_primitive.composeEventHandlers)(props.onFocus, (event) => { + const isKeyboardFocus = !isClickFocusRef.current; + if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) { + const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS); + event.currentTarget.dispatchEvent(entryFocusEvent); + if (!entryFocusEvent.defaultPrevented) { + const items = getItems().filter((item) => item.focusable); + const activeItem = items.find((item) => item.active); + const currentItem = items.find((item) => item.id === currentTabStopId); + const candidateItems = [activeItem, currentItem, ...items].filter( + Boolean + ); + const candidateNodes = candidateItems.map((item) => item.ref.current); + focusFirst(candidateNodes, preventScrollOnEntryFocus); + } + } + isClickFocusRef.current = false; + }), + onBlur: (0, import_primitive.composeEventHandlers)(props.onBlur, () => setIsTabbingBackOut(false)) + } + ) + } + ); +}); +var ITEM_NAME = "RovingFocusGroupItem"; +var RovingFocusGroupItem = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeRovingFocusGroup, + focusable = true, + active = false, + tabStopId, + children, + ...itemProps + } = props; + const autoId = (0, import_react_id.useId)(); + const id = tabStopId || autoId; + const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup); + const isCurrentTabStop = context.currentTabStopId === id; + const getItems = useCollection(__scopeRovingFocusGroup); + const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context; + React.useEffect(() => { + if (focusable) { + onFocusableItemAdd(); + return () => onFocusableItemRemove(); + } + }, [focusable, onFocusableItemAdd, onFocusableItemRemove]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + Collection.ItemSlot, + { + scope: __scopeRovingFocusGroup, + id, + focusable, + active, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.span, + { + tabIndex: isCurrentTabStop ? 0 : -1, + "data-orientation": context.orientation, + ...itemProps, + ref: forwardedRef, + onMouseDown: (0, import_primitive.composeEventHandlers)(props.onMouseDown, (event) => { + if (!focusable) event.preventDefault(); + else context.onItemFocus(id); + }), + onFocus: (0, import_primitive.composeEventHandlers)(props.onFocus, () => context.onItemFocus(id)), + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + if (event.key === "Tab" && event.shiftKey) { + context.onItemShiftTab(); + return; + } + if (event.target !== event.currentTarget) return; + const focusIntent = getFocusIntent(event, context.orientation, context.dir); + if (focusIntent !== void 0) { + if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return; + event.preventDefault(); + const items = getItems().filter((item) => item.focusable); + let candidateNodes = items.map((item) => item.ref.current); + if (focusIntent === "last") candidateNodes.reverse(); + else if (focusIntent === "prev" || focusIntent === "next") { + if (focusIntent === "prev") candidateNodes.reverse(); + const currentIndex = candidateNodes.indexOf(event.currentTarget); + candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1); + } + setTimeout(() => focusFirst(candidateNodes)); + } + }), + children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children + } + ) + } + ); + } +); +RovingFocusGroupItem.displayName = ITEM_NAME; +var MAP_KEY_TO_FOCUS_INTENT = { + ArrowLeft: "prev", + ArrowUp: "prev", + ArrowRight: "next", + ArrowDown: "next", + PageUp: "first", + Home: "first", + PageDown: "last", + End: "last" +}; +function getDirectionAwareKey(key, dir) { + if (dir !== "rtl") return key; + return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key; +} +function getFocusIntent(event, orientation, dir) { + const key = getDirectionAwareKey(event.key, dir); + if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0; + if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0; + return MAP_KEY_TO_FOCUS_INTENT[key]; +} +function focusFirst(candidates, preventScroll = false) { + const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement; + for (const candidate of candidates) { + if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return; + candidate.focus({ preventScroll }); + if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return; + } +} +function wrapArray(array, startIndex) { + return array.map((_, index) => array[(startIndex + index) % array.length]); +} +var Root = RovingFocusGroup; +var Item = RovingFocusGroupItem; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2ee02dc55a89a8c316e0c166589160f4af7ff3a7 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/roving-focus-group.tsx"], + "sourcesContent": ["'use client';\nexport {\n createRovingFocusGroupScope,\n //\n RovingFocusGroup,\n RovingFocusGroupItem,\n //\n Root,\n Item,\n} from './roving-focus-group';\nexport type { RovingFocusGroupProps, RovingFocusItemProps } from './roving-focus-group';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\n\nimport type { Scope } from '@radix-ui/react-context';\n\nconst ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'RovingFocusGroup';\n\ntype ItemData = { id: string; focusable: boolean; active: boolean };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n HTMLSpanElement,\n ItemData\n>(GROUP_NAME);\n\ntype ScopedProps

= P & { __scopeRovingFocusGroup?: Scope };\nconst [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\n\ntype Orientation = React.AriaAttributes['aria-orientation'];\ntype Direction = 'ltr' | 'rtl';\n\ninterface RovingFocusGroupOptions {\n /**\n * The orientation of the group.\n * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n */\n orientation?: Orientation;\n /**\n * The direction of navigation between items.\n */\n dir?: Direction;\n /**\n * Whether keyboard navigation should loop around\n * @defaultValue false\n */\n loop?: boolean;\n}\n\ntype RovingContextValue = RovingFocusGroupOptions & {\n currentTabStopId: string | null;\n onItemFocus(tabStopId: string): void;\n onItemShiftTab(): void;\n onFocusableItemAdd(): void;\n onFocusableItemRemove(): void;\n};\n\nconst [RovingFocusProvider, useRovingFocusContext] =\n createRovingFocusGroupContext(GROUP_NAME);\n\ntype RovingFocusGroupElement = RovingFocusGroupImplElement;\ninterface RovingFocusGroupProps extends RovingFocusGroupImplProps {}\n\nconst RovingFocusGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n return (\n \n \n \n \n \n );\n }\n);\n\nRovingFocusGroup.displayName = GROUP_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype RovingFocusGroupImplElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface RovingFocusGroupImplProps\n extends Omit,\n RovingFocusGroupOptions {\n currentTabStopId?: string | null;\n defaultCurrentTabStopId?: string;\n onCurrentTabStopIdChange?: (tabStopId: string | null) => void;\n onEntryFocus?: (event: Event) => void;\n preventScrollOnEntryFocus?: boolean;\n}\n\nconst RovingFocusGroupImpl = React.forwardRef<\n RovingFocusGroupImplElement,\n RovingFocusGroupImplProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME,\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n\n return (\n setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n )}\n onItemShiftTab={React.useCallback(() => setIsTabbingBackOut(true), [])}\n onFocusableItemAdd={React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n )}\n onFocusableItemRemove={React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n )}\n >\n {\n isClickFocusRef.current = true;\n })}\n onFocus={composeEventHandlers(props.onFocus, (event) => {\n // We normally wouldn't need this check, because we already check\n // that the focus is on the current target and not bubbling to it.\n // We do this because Safari doesn't focus buttons when clicked, and\n // instead, the wrapper will get focused and not through a bubbling event.\n const isKeyboardFocus = !isClickFocusRef.current;\n\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n ) as typeof items;\n const candidateNodes = candidateItems.map((item) => item.ref.current!);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n\n isClickFocusRef.current = false;\n })}\n onBlur={composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))}\n />\n \n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'RovingFocusGroupItem';\n\ntype RovingFocusItemElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface RovingFocusItemProps extends Omit {\n tabStopId?: string;\n focusable?: boolean;\n active?: boolean;\n children?:\n | React.ReactNode\n | ((props: { hasTabStop: boolean; isCurrentTabStop: boolean }) => React.ReactNode);\n}\n\nconst RovingFocusGroupItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n\n return (\n \n {\n // We prevent focusing non-focusable items on `mousedown`.\n // Even though the item has tabIndex={-1}, that only means take it out of the tab order.\n if (!focusable) event.preventDefault();\n // Safari doesn't focus a button when clicked so we run our logic on mousedown also\n else context.onItemFocus(id);\n })}\n onFocus={composeEventHandlers(props.onFocus, () => context.onItemFocus(id))}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === 'Tab' && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n\n if (event.target !== event.currentTarget) return;\n\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n\n if (focusIntent !== undefined) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current!);\n\n if (focusIntent === 'last') candidateNodes.reverse();\n else if (focusIntent === 'prev' || focusIntent === 'next') {\n if (focusIntent === 'prev') candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop\n ? wrapArray(candidateNodes, currentIndex + 1)\n : candidateNodes.slice(currentIndex + 1);\n }\n\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => focusFirst(candidateNodes));\n }\n })}\n >\n {typeof children === 'function'\n ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null })\n : children}\n \n \n );\n }\n);\n\nRovingFocusGroupItem.displayName = ITEM_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\n// prettier-ignore\nconst MAP_KEY_TO_FOCUS_INTENT: Record = {\n ArrowLeft: 'prev', ArrowUp: 'prev',\n ArrowRight: 'next', ArrowDown: 'next',\n PageUp: 'first', Home: 'first',\n PageDown: 'last', End: 'last',\n};\n\nfunction getDirectionAwareKey(key: string, dir?: Direction) {\n if (dir !== 'rtl') return key;\n return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;\n}\n\ntype FocusIntent = 'first' | 'last' | 'prev' | 'next';\n\nfunction getFocusIntent(event: React.KeyboardEvent, orientation?: Orientation, dir?: Direction) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === 'vertical' && ['ArrowLeft', 'ArrowRight'].includes(key)) return undefined;\n if (orientation === 'horizontal' && ['ArrowUp', 'ArrowDown'].includes(key)) return undefined;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\n\nfunction focusFirst(candidates: HTMLElement[], preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray(array: T[], startIndex: number) {\n return array.map((_, index) => array[(startIndex + index) % array.length]!);\n}\n\nconst Root = RovingFocusGroup;\nconst Item = RovingFocusGroupItem;\n\nexport {\n createRovingFocusGroupScope,\n //\n RovingFocusGroup,\n RovingFocusGroupItem,\n //\n Root,\n Item,\n};\nexport type { RovingFocusGroupProps, RovingFocusItemProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,8BAAiC;AACjC,gCAAgC;AAChC,2BAAmC;AACnC,sBAAsB;AACtB,6BAA0B;AAC1B,oCAA+B;AAC/B,0CAAqC;AACrC,6BAA6B;AAgEnB;AA5DV,IAAM,cAAc;AACpB,IAAM,gBAAgB,EAAE,SAAS,OAAO,YAAY,KAAK;AAMzD,IAAM,aAAa;AAGnB,IAAM,CAAC,Y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AAAA,EAAS,MAAM;AAAA,EACvB,UAAU;AAAA,EAAQ,KAAK;AACzB;AAEA,SAAS,qBAAqB,KAAa,KAAiB;AAC1D,MAAI,QAAQ,MAAO,QAAO;AAC1B,SAAO,QAAQ,cAAc,eAAe,QAAQ,eAAe,cAAc;AACnF;AAIA,SAAS,eAAe,OAA4B,aAA2B,KAAiB;AAC9F,QAAM,MAAM,qBAAqB,MAAM,KAAK,GAAG;AAC/C,MAAI,gBAAgB,cAAc,CAAC,aAAa,YAAY,EAAE,SAAS,GAAG,EAAG,QAAO;AACpF,MAAI,gBAAgB,gBAAgB,CAAC,WAAW,WAAW,EAAE,SAAS,GAAG,EAAG,QAAO;AACnF,SAAO,wBAAwB,GAAG;AACpC;AAEA,SAAS,WAAW,YAA2B,gBAAgB,OAAO;AACpE,QAAM,6BAA6B,SAAS;AAC5C,aAAW,aAAa,YAAY;AAElC,QAAI,cAAc,2BAA4B;AAC9C,cAAU,MAAM,EAAE,cAAc,CAAC;AACjC,QAAI,SAAS,kBAAkB,2BAA4B;AAAA,EAC7D;AACF;AAMA,SAAS,UAAa,OAAY,YAAoB;AACpD,SAAO,MAAM,IAAO,CAAC,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,MAAM,CAAE;AAC/E;AAEA,IAAM,OAAO;AACb,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..08aaabcdb5402c74bcbd935a34e2b7f4a50fdfc0 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.mjs @@ -0,0 +1,231 @@ +"use client"; + +// src/roving-focus-group.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { createCollection } from "@radix-ui/react-collection"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { createContextScope } from "@radix-ui/react-context"; +import { useId } from "@radix-ui/react-id"; +import { Primitive } from "@radix-ui/react-primitive"; +import { useCallbackRef } from "@radix-ui/react-use-callback-ref"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { useDirection } from "@radix-ui/react-direction"; +import { jsx } from "react/jsx-runtime"; +var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus"; +var EVENT_OPTIONS = { bubbles: false, cancelable: true }; +var GROUP_NAME = "RovingFocusGroup"; +var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME); +var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope( + GROUP_NAME, + [createCollectionScope] +); +var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME); +var RovingFocusGroup = React.forwardRef( + (props, forwardedRef) => { + return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) }); + } +); +RovingFocusGroup.displayName = GROUP_NAME; +var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => { + const { + __scopeRovingFocusGroup, + orientation, + loop = false, + dir, + currentTabStopId: currentTabStopIdProp, + defaultCurrentTabStopId, + onCurrentTabStopIdChange, + onEntryFocus, + preventScrollOnEntryFocus = false, + ...groupProps + } = props; + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref); + const direction = useDirection(dir); + const [currentTabStopId, setCurrentTabStopId] = useControllableState({ + prop: currentTabStopIdProp, + defaultProp: defaultCurrentTabStopId ?? null, + onChange: onCurrentTabStopIdChange, + caller: GROUP_NAME + }); + const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false); + const handleEntryFocus = useCallbackRef(onEntryFocus); + const getItems = useCollection(__scopeRovingFocusGroup); + const isClickFocusRef = React.useRef(false); + const [focusableItemsCount, setFocusableItemsCount] = React.useState(0); + React.useEffect(() => { + const node = ref.current; + if (node) { + node.addEventListener(ENTRY_FOCUS, handleEntryFocus); + return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus); + } + }, [handleEntryFocus]); + return /* @__PURE__ */ jsx( + RovingFocusProvider, + { + scope: __scopeRovingFocusGroup, + orientation, + dir: direction, + loop, + currentTabStopId, + onItemFocus: React.useCallback( + (tabStopId) => setCurrentTabStopId(tabStopId), + [setCurrentTabStopId] + ), + onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []), + onFocusableItemAdd: React.useCallback( + () => setFocusableItemsCount((prevCount) => prevCount + 1), + [] + ), + onFocusableItemRemove: React.useCallback( + () => setFocusableItemsCount((prevCount) => prevCount - 1), + [] + ), + children: /* @__PURE__ */ jsx( + Primitive.div, + { + tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0, + "data-orientation": orientation, + ...groupProps, + ref: composedRefs, + style: { outline: "none", ...props.style }, + onMouseDown: composeEventHandlers(props.onMouseDown, () => { + isClickFocusRef.current = true; + }), + onFocus: composeEventHandlers(props.onFocus, (event) => { + const isKeyboardFocus = !isClickFocusRef.current; + if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) { + const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS); + event.currentTarget.dispatchEvent(entryFocusEvent); + if (!entryFocusEvent.defaultPrevented) { + const items = getItems().filter((item) => item.focusable); + const activeItem = items.find((item) => item.active); + const currentItem = items.find((item) => item.id === currentTabStopId); + const candidateItems = [activeItem, currentItem, ...items].filter( + Boolean + ); + const candidateNodes = candidateItems.map((item) => item.ref.current); + focusFirst(candidateNodes, preventScrollOnEntryFocus); + } + } + isClickFocusRef.current = false; + }), + onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false)) + } + ) + } + ); +}); +var ITEM_NAME = "RovingFocusGroupItem"; +var RovingFocusGroupItem = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeRovingFocusGroup, + focusable = true, + active = false, + tabStopId, + children, + ...itemProps + } = props; + const autoId = useId(); + const id = tabStopId || autoId; + const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup); + const isCurrentTabStop = context.currentTabStopId === id; + const getItems = useCollection(__scopeRovingFocusGroup); + const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context; + React.useEffect(() => { + if (focusable) { + onFocusableItemAdd(); + return () => onFocusableItemRemove(); + } + }, [focusable, onFocusableItemAdd, onFocusableItemRemove]); + return /* @__PURE__ */ jsx( + Collection.ItemSlot, + { + scope: __scopeRovingFocusGroup, + id, + focusable, + active, + children: /* @__PURE__ */ jsx( + Primitive.span, + { + tabIndex: isCurrentTabStop ? 0 : -1, + "data-orientation": context.orientation, + ...itemProps, + ref: forwardedRef, + onMouseDown: composeEventHandlers(props.onMouseDown, (event) => { + if (!focusable) event.preventDefault(); + else context.onItemFocus(id); + }), + onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)), + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + if (event.key === "Tab" && event.shiftKey) { + context.onItemShiftTab(); + return; + } + if (event.target !== event.currentTarget) return; + const focusIntent = getFocusIntent(event, context.orientation, context.dir); + if (focusIntent !== void 0) { + if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return; + event.preventDefault(); + const items = getItems().filter((item) => item.focusable); + let candidateNodes = items.map((item) => item.ref.current); + if (focusIntent === "last") candidateNodes.reverse(); + else if (focusIntent === "prev" || focusIntent === "next") { + if (focusIntent === "prev") candidateNodes.reverse(); + const currentIndex = candidateNodes.indexOf(event.currentTarget); + candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1); + } + setTimeout(() => focusFirst(candidateNodes)); + } + }), + children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children + } + ) + } + ); + } +); +RovingFocusGroupItem.displayName = ITEM_NAME; +var MAP_KEY_TO_FOCUS_INTENT = { + ArrowLeft: "prev", + ArrowUp: "prev", + ArrowRight: "next", + ArrowDown: "next", + PageUp: "first", + Home: "first", + PageDown: "last", + End: "last" +}; +function getDirectionAwareKey(key, dir) { + if (dir !== "rtl") return key; + return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key; +} +function getFocusIntent(event, orientation, dir) { + const key = getDirectionAwareKey(event.key, dir); + if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0; + if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0; + return MAP_KEY_TO_FOCUS_INTENT[key]; +} +function focusFirst(candidates, preventScroll = false) { + const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement; + for (const candidate of candidates) { + if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return; + candidate.focus({ preventScroll }); + if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return; + } +} +function wrapArray(array, startIndex) { + return array.map((_, index) => array[(startIndex + index) % array.length]); +} +var Root = RovingFocusGroup; +var Item = RovingFocusGroupItem; +export { + Item, + Root, + RovingFocusGroup, + RovingFocusGroupItem, + createRovingFocusGroupScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..c6af2f8a6a9813e61863a80adf0ec3ddf8368170 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/roving-focus-group.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\n\nimport type { Scope } from '@radix-ui/react-context';\n\nconst ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'RovingFocusGroup';\n\ntype ItemData = { id: string; focusable: boolean; active: boolean };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n HTMLSpanElement,\n ItemData\n>(GROUP_NAME);\n\ntype ScopedProps

= P & { __scopeRovingFocusGroup?: Scope };\nconst [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\n\ntype Orientation = React.AriaAttributes['aria-orientation'];\ntype Direction = 'ltr' | 'rtl';\n\ninterface RovingFocusGroupOptions {\n /**\n * The orientation of the group.\n * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n */\n orientation?: Orientation;\n /**\n * The direction of navigation between items.\n */\n dir?: Direction;\n /**\n * Whether keyboard navigation should loop around\n * @defaultValue false\n */\n loop?: boolean;\n}\n\ntype RovingContextValue = RovingFocusGroupOptions & {\n currentTabStopId: string | null;\n onItemFocus(tabStopId: string): void;\n onItemShiftTab(): void;\n onFocusableItemAdd(): void;\n onFocusableItemRemove(): void;\n};\n\nconst [RovingFocusProvider, useRovingFocusContext] =\n createRovingFocusGroupContext(GROUP_NAME);\n\ntype RovingFocusGroupElement = RovingFocusGroupImplElement;\ninterface RovingFocusGroupProps extends RovingFocusGroupImplProps {}\n\nconst RovingFocusGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n return (\n \n \n \n \n \n );\n }\n);\n\nRovingFocusGroup.displayName = GROUP_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype RovingFocusGroupImplElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface RovingFocusGroupImplProps\n extends Omit,\n RovingFocusGroupOptions {\n currentTabStopId?: string | null;\n defaultCurrentTabStopId?: string;\n onCurrentTabStopIdChange?: (tabStopId: string | null) => void;\n onEntryFocus?: (event: Event) => void;\n preventScrollOnEntryFocus?: boolean;\n}\n\nconst RovingFocusGroupImpl = React.forwardRef<\n RovingFocusGroupImplElement,\n RovingFocusGroupImplProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME,\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n\n return (\n setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n )}\n onItemShiftTab={React.useCallback(() => setIsTabbingBackOut(true), [])}\n onFocusableItemAdd={React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n )}\n onFocusableItemRemove={React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n )}\n >\n {\n isClickFocusRef.current = true;\n })}\n onFocus={composeEventHandlers(props.onFocus, (event) => {\n // We normally wouldn't need this check, because we already check\n // that the focus is on the current target and not bubbling to it.\n // We do this because Safari doesn't focus buttons when clicked, and\n // instead, the wrapper will get focused and not through a bubbling event.\n const isKeyboardFocus = !isClickFocusRef.current;\n\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n ) as typeof items;\n const candidateNodes = candidateItems.map((item) => item.ref.current!);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n\n isClickFocusRef.current = false;\n })}\n onBlur={composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))}\n />\n \n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'RovingFocusGroupItem';\n\ntype RovingFocusItemElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface RovingFocusItemProps extends Omit {\n tabStopId?: string;\n focusable?: boolean;\n active?: boolean;\n children?:\n | React.ReactNode\n | ((props: { hasTabStop: boolean; isCurrentTabStop: boolean }) => React.ReactNode);\n}\n\nconst RovingFocusGroupItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n\n return (\n \n {\n // We prevent focusing non-focusable items on `mousedown`.\n // Even though the item has tabIndex={-1}, that only means take it out of the tab order.\n if (!focusable) event.preventDefault();\n // Safari doesn't focus a button when clicked so we run our logic on mousedown also\n else context.onItemFocus(id);\n })}\n onFocus={composeEventHandlers(props.onFocus, () => context.onItemFocus(id))}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === 'Tab' && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n\n if (event.target !== event.currentTarget) return;\n\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n\n if (focusIntent !== undefined) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current!);\n\n if (focusIntent === 'last') candidateNodes.reverse();\n else if (focusIntent === 'prev' || focusIntent === 'next') {\n if (focusIntent === 'prev') candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop\n ? wrapArray(candidateNodes, currentIndex + 1)\n : candidateNodes.slice(currentIndex + 1);\n }\n\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => focusFirst(candidateNodes));\n }\n })}\n >\n {typeof children === 'function'\n ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null })\n : children}\n \n \n );\n }\n);\n\nRovingFocusGroupItem.displayName = ITEM_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\n// prettier-ignore\nconst MAP_KEY_TO_FOCUS_INTENT: Record = {\n ArrowLeft: 'prev', ArrowUp: 'prev',\n ArrowRight: 'next', ArrowDown: 'next',\n PageUp: 'first', Home: 'first',\n PageDown: 'last', End: 'last',\n};\n\nfunction getDirectionAwareKey(key: string, dir?: Direction) {\n if (dir !== 'rtl') return key;\n return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;\n}\n\ntype FocusIntent = 'first' | 'last' | 'prev' | 'next';\n\nfunction getFocusIntent(event: React.KeyboardEvent, orientation?: Orientation, dir?: Direction) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === 'vertical' && ['ArrowLeft', 'ArrowRight'].includes(key)) return undefined;\n if (orientation === 'horizontal' && ['ArrowUp', 'ArrowDown'].includes(key)) return undefined;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\n\nfunction focusFirst(candidates: HTMLElement[], preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray(array: T[], startIndex: number) {\n return array.map((_, index) => array[(startIndex + index) % array.length]!);\n}\n\nconst Root = RovingFocusGroup;\nconst Item = RovingFocusGroupItem;\n\nexport {\n createRovingFocusGroupScope,\n //\n RovingFocusGroup,\n RovingFocusGroupItem,\n //\n Root,\n Item,\n};\nexport type { RovingFocusGroupProps, RovingFocusItemProps };\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,aAAa;AACtB,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAgEnB;AA5DV,IAAM,cAAc;AACpB,IAAM,gBAAgB,EAAE,SAAS,OAAO,YAAY,KAAK;AAMzD,IAAM,aAAa;AAGnB,IAAM,CAAC,YAAY,eAAe,qBAAqB,IAAI,iBAGzD,UAAU;AAGZ,IAAM,CAAC,+BAA+B,2BAA2B,IAAI;AAAA,EACnE;AAAA,EACA,CAAC,qBAAqB;AACxB;AA8BA,IAAM,CAAC,qBAAqB,qBAAqB,IAC/C,8BAAkD,UAAU;AAK9D,IAAM,mBAAyB;AAAA,EAC7B,CAAC,OAA2C,iBAAiB;AAC3D,WACE,oBAAC,WAAW,UAAX,EAAoB,OAAO,MAAM,yBAChC,8BAAC,WAAW,MAAX,EAAgB,OAAO,MAAM,yBAC5B,8BAAC,wBAAsB,GAAG,OAAO,KAAK,cAAc,GACtD,GACF;AAAA,EAEJ;AACF;AAEA,iBAAiB,cAAc;AAgB/B,IAAM,uBAA6B,iBAGjC,CAAC,OAA+C,iBAAiB;AACjE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IAC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;AACjC,QAAI,SAAS,kBAAkB,2BAA4B;AAAA,EAC7D;AACF;AAMA,SAAS,UAAa,OAAY,YAAoB;AACpD,SAAO,MAAM,IAAO,CAAC,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,MAAM,CAAE;AAC/E;AAEA,IAAM,OAAO;AACb,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/package.json b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/package.json new file mode 100644 index 0000000000000000000000000000000000000000..69b00f5e3e202c5db507478cf6c6b25f0f0658a9 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_1c1af026a6336a80c01aa1102eb7a489/node_modules/@radix-ui/react-roving-focus/package.json @@ -0,0 +1,76 @@ +{ + "name": "@radix-ui/react-roving-focus", + "version": "1.1.11", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-collection": "1.1.7", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-callback-ref": "1.1.1", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/LICENSE b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/README.md b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/README.md new file mode 100644 index 0000000000000000000000000000000000000000..44cee383609ad358f2239e381f15c5beb548e880 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/README.md @@ -0,0 +1,3 @@ +# `react-scroll-area` + +View docs [here](https://radix-ui.com/primitives/docs/components/scroll-area). diff --git a/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..28bfd02cca32f09901c4def4af75a99ae8f07e74 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.d.mts @@ -0,0 +1,123 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type Direction = 'ltr' | 'rtl'; +type Sizes = { + content: number; + viewport: number; + scrollbar: { + size: number; + paddingStart: number; + paddingEnd: number; + }; +}; +declare const createScrollAreaScope: _radix_ui_react_context.CreateScope; +type ScrollAreaContextValue = { + type: 'auto' | 'always' | 'scroll' | 'hover'; + dir: Direction; + scrollHideDelay: number; + scrollArea: ScrollAreaElement | null; + viewport: ScrollAreaViewportElement | null; + onViewportChange(viewport: ScrollAreaViewportElement | null): void; + content: HTMLDivElement | null; + onContentChange(content: HTMLDivElement): void; + scrollbarX: ScrollAreaScrollbarElement | null; + onScrollbarXChange(scrollbar: ScrollAreaScrollbarElement | null): void; + scrollbarXEnabled: boolean; + onScrollbarXEnabledChange(rendered: boolean): void; + scrollbarY: ScrollAreaScrollbarElement | null; + onScrollbarYChange(scrollbar: ScrollAreaScrollbarElement | null): void; + scrollbarYEnabled: boolean; + onScrollbarYEnabledChange(rendered: boolean): void; + onCornerWidthChange(width: number): void; + onCornerHeightChange(height: number): void; +}; +type ScrollAreaElement = React.ComponentRef; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface ScrollAreaProps extends PrimitiveDivProps { + type?: ScrollAreaContextValue['type']; + dir?: ScrollAreaContextValue['dir']; + scrollHideDelay?: number; +} +declare const ScrollArea: React.ForwardRefExoticComponent>; +type ScrollAreaViewportElement = React.ComponentRef; +interface ScrollAreaViewportProps extends PrimitiveDivProps { + nonce?: string; +} +declare const ScrollAreaViewport: React.ForwardRefExoticComponent>; +type ScrollAreaScrollbarElement = ScrollAreaScrollbarVisibleElement; +interface ScrollAreaScrollbarProps extends ScrollAreaScrollbarVisibleProps { + forceMount?: true; +} +declare const ScrollAreaScrollbar: React.ForwardRefExoticComponent>; +type ScrollAreaScrollbarVisibleElement = ScrollAreaScrollbarAxisElement; +interface ScrollAreaScrollbarVisibleProps extends Omit { + orientation?: 'horizontal' | 'vertical'; +} +type ScrollAreaScrollbarAxisPrivateProps = { + hasThumb: boolean; + sizes: Sizes; + onSizesChange(sizes: Sizes): void; + onThumbChange(thumb: ScrollAreaThumbElement | null): void; + onThumbPointerDown(pointerPos: number): void; + onThumbPointerUp(): void; + onThumbPositionChange(): void; + onWheelScroll(scrollPos: number): void; + onDragScroll(pointerPos: number): void; +}; +type ScrollAreaScrollbarAxisElement = ScrollAreaScrollbarImplElement; +interface ScrollAreaScrollbarAxisProps extends Omit, ScrollAreaScrollbarAxisPrivateProps { +} +type ScrollbarContext = { + hasThumb: boolean; + scrollbar: ScrollAreaScrollbarElement | null; + onThumbChange(thumb: ScrollAreaThumbElement | null): void; + onThumbPointerUp(): void; + onThumbPointerDown(pointerPos: { + x: number; + y: number; + }): void; + onThumbPositionChange(): void; +}; +type ScrollAreaScrollbarImplElement = React.ComponentRef; +type ScrollAreaScrollbarImplPrivateProps = { + sizes: Sizes; + hasThumb: boolean; + onThumbChange: ScrollbarContext['onThumbChange']; + onThumbPointerUp: ScrollbarContext['onThumbPointerUp']; + onThumbPointerDown: ScrollbarContext['onThumbPointerDown']; + onThumbPositionChange: ScrollbarContext['onThumbPositionChange']; + onWheelScroll(event: WheelEvent, maxScrollPos: number): void; + onDragScroll(pointerPos: { + x: number; + y: number; + }): void; + onResize(): void; +}; +interface ScrollAreaScrollbarImplProps extends Omit, ScrollAreaScrollbarImplPrivateProps { +} +type ScrollAreaThumbElement = ScrollAreaThumbImplElement; +interface ScrollAreaThumbProps extends ScrollAreaThumbImplProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const ScrollAreaThumb: React.ForwardRefExoticComponent>; +type ScrollAreaThumbImplElement = React.ComponentRef; +interface ScrollAreaThumbImplProps extends PrimitiveDivProps { +} +interface ScrollAreaCornerProps extends ScrollAreaCornerImplProps { +} +declare const ScrollAreaCorner: React.ForwardRefExoticComponent>; +interface ScrollAreaCornerImplProps extends PrimitiveDivProps { +} +declare const Root: React.ForwardRefExoticComponent>; +declare const Viewport: React.ForwardRefExoticComponent>; +declare const Scrollbar: React.ForwardRefExoticComponent>; +declare const Thumb: React.ForwardRefExoticComponent>; +declare const Corner: React.ForwardRefExoticComponent>; + +export { Corner, Root, ScrollArea, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, Scrollbar, Thumb, Viewport, createScrollAreaScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..28bfd02cca32f09901c4def4af75a99ae8f07e74 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.d.ts @@ -0,0 +1,123 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type Direction = 'ltr' | 'rtl'; +type Sizes = { + content: number; + viewport: number; + scrollbar: { + size: number; + paddingStart: number; + paddingEnd: number; + }; +}; +declare const createScrollAreaScope: _radix_ui_react_context.CreateScope; +type ScrollAreaContextValue = { + type: 'auto' | 'always' | 'scroll' | 'hover'; + dir: Direction; + scrollHideDelay: number; + scrollArea: ScrollAreaElement | null; + viewport: ScrollAreaViewportElement | null; + onViewportChange(viewport: ScrollAreaViewportElement | null): void; + content: HTMLDivElement | null; + onContentChange(content: HTMLDivElement): void; + scrollbarX: ScrollAreaScrollbarElement | null; + onScrollbarXChange(scrollbar: ScrollAreaScrollbarElement | null): void; + scrollbarXEnabled: boolean; + onScrollbarXEnabledChange(rendered: boolean): void; + scrollbarY: ScrollAreaScrollbarElement | null; + onScrollbarYChange(scrollbar: ScrollAreaScrollbarElement | null): void; + scrollbarYEnabled: boolean; + onScrollbarYEnabledChange(rendered: boolean): void; + onCornerWidthChange(width: number): void; + onCornerHeightChange(height: number): void; +}; +type ScrollAreaElement = React.ComponentRef; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface ScrollAreaProps extends PrimitiveDivProps { + type?: ScrollAreaContextValue['type']; + dir?: ScrollAreaContextValue['dir']; + scrollHideDelay?: number; +} +declare const ScrollArea: React.ForwardRefExoticComponent>; +type ScrollAreaViewportElement = React.ComponentRef; +interface ScrollAreaViewportProps extends PrimitiveDivProps { + nonce?: string; +} +declare const ScrollAreaViewport: React.ForwardRefExoticComponent>; +type ScrollAreaScrollbarElement = ScrollAreaScrollbarVisibleElement; +interface ScrollAreaScrollbarProps extends ScrollAreaScrollbarVisibleProps { + forceMount?: true; +} +declare const ScrollAreaScrollbar: React.ForwardRefExoticComponent>; +type ScrollAreaScrollbarVisibleElement = ScrollAreaScrollbarAxisElement; +interface ScrollAreaScrollbarVisibleProps extends Omit { + orientation?: 'horizontal' | 'vertical'; +} +type ScrollAreaScrollbarAxisPrivateProps = { + hasThumb: boolean; + sizes: Sizes; + onSizesChange(sizes: Sizes): void; + onThumbChange(thumb: ScrollAreaThumbElement | null): void; + onThumbPointerDown(pointerPos: number): void; + onThumbPointerUp(): void; + onThumbPositionChange(): void; + onWheelScroll(scrollPos: number): void; + onDragScroll(pointerPos: number): void; +}; +type ScrollAreaScrollbarAxisElement = ScrollAreaScrollbarImplElement; +interface ScrollAreaScrollbarAxisProps extends Omit, ScrollAreaScrollbarAxisPrivateProps { +} +type ScrollbarContext = { + hasThumb: boolean; + scrollbar: ScrollAreaScrollbarElement | null; + onThumbChange(thumb: ScrollAreaThumbElement | null): void; + onThumbPointerUp(): void; + onThumbPointerDown(pointerPos: { + x: number; + y: number; + }): void; + onThumbPositionChange(): void; +}; +type ScrollAreaScrollbarImplElement = React.ComponentRef; +type ScrollAreaScrollbarImplPrivateProps = { + sizes: Sizes; + hasThumb: boolean; + onThumbChange: ScrollbarContext['onThumbChange']; + onThumbPointerUp: ScrollbarContext['onThumbPointerUp']; + onThumbPointerDown: ScrollbarContext['onThumbPointerDown']; + onThumbPositionChange: ScrollbarContext['onThumbPositionChange']; + onWheelScroll(event: WheelEvent, maxScrollPos: number): void; + onDragScroll(pointerPos: { + x: number; + y: number; + }): void; + onResize(): void; +}; +interface ScrollAreaScrollbarImplProps extends Omit, ScrollAreaScrollbarImplPrivateProps { +} +type ScrollAreaThumbElement = ScrollAreaThumbImplElement; +interface ScrollAreaThumbProps extends ScrollAreaThumbImplProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const ScrollAreaThumb: React.ForwardRefExoticComponent>; +type ScrollAreaThumbImplElement = React.ComponentRef; +interface ScrollAreaThumbImplProps extends PrimitiveDivProps { +} +interface ScrollAreaCornerProps extends ScrollAreaCornerImplProps { +} +declare const ScrollAreaCorner: React.ForwardRefExoticComponent>; +interface ScrollAreaCornerImplProps extends PrimitiveDivProps { +} +declare const Root: React.ForwardRefExoticComponent>; +declare const Viewport: React.ForwardRefExoticComponent>; +declare const Scrollbar: React.ForwardRefExoticComponent>; +declare const Thumb: React.ForwardRefExoticComponent>; +declare const Corner: React.ForwardRefExoticComponent>; + +export { Corner, Root, ScrollArea, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, Scrollbar, Thumb, Viewport, createScrollAreaScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.js b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..6e0a40d99edf0a3e2ed405455c25bed6a48c1c5a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.js @@ -0,0 +1,771 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Corner: () => Corner, + Root: () => Root, + ScrollArea: () => ScrollArea, + ScrollAreaCorner: () => ScrollAreaCorner, + ScrollAreaScrollbar: () => ScrollAreaScrollbar, + ScrollAreaThumb: () => ScrollAreaThumb, + ScrollAreaViewport: () => ScrollAreaViewport, + Scrollbar: () => Scrollbar, + Thumb: () => Thumb, + Viewport: () => Viewport, + createScrollAreaScope: () => createScrollAreaScope +}); +module.exports = __toCommonJS(index_exports); + +// src/scroll-area.tsx +var React2 = __toESM(require("react")); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref"); +var import_react_direction = require("@radix-ui/react-direction"); +var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect"); +var import_number = require("@radix-ui/number"); +var import_primitive = require("@radix-ui/primitive"); + +// src/use-state-machine.ts +var React = __toESM(require("react")); +function useStateMachine(initialState, machine) { + return React.useReducer((state, event) => { + const nextState = machine[state][event]; + return nextState ?? state; + }, initialState); +} + +// src/scroll-area.tsx +var import_jsx_runtime = require("react/jsx-runtime"); +var SCROLL_AREA_NAME = "ScrollArea"; +var [createScrollAreaContext, createScrollAreaScope] = (0, import_react_context.createContextScope)(SCROLL_AREA_NAME); +var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME); +var ScrollArea = React2.forwardRef( + (props, forwardedRef) => { + const { + __scopeScrollArea, + type = "hover", + dir, + scrollHideDelay = 600, + ...scrollAreaProps + } = props; + const [scrollArea, setScrollArea] = React2.useState(null); + const [viewport, setViewport] = React2.useState(null); + const [content, setContent] = React2.useState(null); + const [scrollbarX, setScrollbarX] = React2.useState(null); + const [scrollbarY, setScrollbarY] = React2.useState(null); + const [cornerWidth, setCornerWidth] = React2.useState(0); + const [cornerHeight, setCornerHeight] = React2.useState(0); + const [scrollbarXEnabled, setScrollbarXEnabled] = React2.useState(false); + const [scrollbarYEnabled, setScrollbarYEnabled] = React2.useState(false); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setScrollArea(node)); + const direction = (0, import_react_direction.useDirection)(dir); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ScrollAreaProvider, + { + scope: __scopeScrollArea, + type, + dir: direction, + scrollHideDelay, + scrollArea, + viewport, + onViewportChange: setViewport, + content, + onContentChange: setContent, + scrollbarX, + onScrollbarXChange: setScrollbarX, + scrollbarXEnabled, + onScrollbarXEnabledChange: setScrollbarXEnabled, + scrollbarY, + onScrollbarYChange: setScrollbarY, + scrollbarYEnabled, + onScrollbarYEnabledChange: setScrollbarYEnabled, + onCornerWidthChange: setCornerWidth, + onCornerHeightChange: setCornerHeight, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + dir: direction, + ...scrollAreaProps, + ref: composedRefs, + style: { + position: "relative", + // Pass corner sizes as CSS vars to reduce re-renders of context consumers + ["--radix-scroll-area-corner-width"]: cornerWidth + "px", + ["--radix-scroll-area-corner-height"]: cornerHeight + "px", + ...props.style + } + } + ) + } + ); + } +); +ScrollArea.displayName = SCROLL_AREA_NAME; +var VIEWPORT_NAME = "ScrollAreaViewport"; +var ScrollAreaViewport = React2.forwardRef( + (props, forwardedRef) => { + const { __scopeScrollArea, children, nonce, ...viewportProps } = props; + const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea); + const ref = React2.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref, context.onViewportChange); + return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + "style", + { + dangerouslySetInnerHTML: { + __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}` + }, + nonce + } + ), + /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "data-radix-scroll-area-viewport": "", + ...viewportProps, + ref: composedRefs, + style: { + /** + * We don't support `visible` because the intention is to have at least one scrollbar + * if this component is used and `visible` will behave like `auto` in that case + * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description + * + * We don't handle `auto` because the intention is for the native implementation + * to be hidden if using this component. We just want to ensure the node is scrollable + * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent + * the browser from having to work out whether to render native scrollbars or not, + * we tell it to with the intention of hiding them in CSS. + */ + overflowX: context.scrollbarXEnabled ? "scroll" : "hidden", + overflowY: context.scrollbarYEnabled ? "scroll" : "hidden", + ...props.style + }, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: context.onContentChange, style: { minWidth: "100%", display: "table" }, children }) + } + ) + ] }); + } +); +ScrollAreaViewport.displayName = VIEWPORT_NAME; +var SCROLLBAR_NAME = "ScrollAreaScrollbar"; +var ScrollAreaScrollbar = React2.forwardRef( + (props, forwardedRef) => { + const { forceMount, ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context; + const isHorizontal = props.orientation === "horizontal"; + React2.useEffect(() => { + isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true); + return () => { + isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false); + }; + }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]); + return context.type === "hover" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "scroll" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "auto" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "always" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null; + } +); +ScrollAreaScrollbar.displayName = SCROLLBAR_NAME; +var ScrollAreaScrollbarHover = React2.forwardRef((props, forwardedRef) => { + const { forceMount, ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const [visible, setVisible] = React2.useState(false); + React2.useEffect(() => { + const scrollArea = context.scrollArea; + let hideTimer = 0; + if (scrollArea) { + const handlePointerEnter = () => { + window.clearTimeout(hideTimer); + setVisible(true); + }; + const handlePointerLeave = () => { + hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay); + }; + scrollArea.addEventListener("pointerenter", handlePointerEnter); + scrollArea.addEventListener("pointerleave", handlePointerLeave); + return () => { + window.clearTimeout(hideTimer); + scrollArea.removeEventListener("pointerenter", handlePointerEnter); + scrollArea.removeEventListener("pointerleave", handlePointerLeave); + }; + } + }, [context.scrollArea, context.scrollHideDelay]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || visible, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ScrollAreaScrollbarAuto, + { + "data-state": visible ? "visible" : "hidden", + ...scrollbarProps, + ref: forwardedRef + } + ) }); +}); +var ScrollAreaScrollbarScroll = React2.forwardRef((props, forwardedRef) => { + const { forceMount, ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const isHorizontal = props.orientation === "horizontal"; + const debounceScrollEnd = useDebounceCallback(() => send("SCROLL_END"), 100); + const [state, send] = useStateMachine("hidden", { + hidden: { + SCROLL: "scrolling" + }, + scrolling: { + SCROLL_END: "idle", + POINTER_ENTER: "interacting" + }, + interacting: { + SCROLL: "interacting", + POINTER_LEAVE: "idle" + }, + idle: { + HIDE: "hidden", + SCROLL: "scrolling", + POINTER_ENTER: "interacting" + } + }); + React2.useEffect(() => { + if (state === "idle") { + const hideTimer = window.setTimeout(() => send("HIDE"), context.scrollHideDelay); + return () => window.clearTimeout(hideTimer); + } + }, [state, context.scrollHideDelay, send]); + React2.useEffect(() => { + const viewport = context.viewport; + const scrollDirection = isHorizontal ? "scrollLeft" : "scrollTop"; + if (viewport) { + let prevScrollPos = viewport[scrollDirection]; + const handleScroll = () => { + const scrollPos = viewport[scrollDirection]; + const hasScrollInDirectionChanged = prevScrollPos !== scrollPos; + if (hasScrollInDirectionChanged) { + send("SCROLL"); + debounceScrollEnd(); + } + prevScrollPos = scrollPos; + }; + viewport.addEventListener("scroll", handleScroll); + return () => viewport.removeEventListener("scroll", handleScroll); + } + }, [context.viewport, isHorizontal, send, debounceScrollEnd]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || state !== "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ScrollAreaScrollbarVisible, + { + "data-state": state === "hidden" ? "hidden" : "visible", + ...scrollbarProps, + ref: forwardedRef, + onPointerEnter: (0, import_primitive.composeEventHandlers)(props.onPointerEnter, () => send("POINTER_ENTER")), + onPointerLeave: (0, import_primitive.composeEventHandlers)(props.onPointerLeave, () => send("POINTER_LEAVE")) + } + ) }); +}); +var ScrollAreaScrollbarAuto = React2.forwardRef((props, forwardedRef) => { + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const { forceMount, ...scrollbarProps } = props; + const [visible, setVisible] = React2.useState(false); + const isHorizontal = props.orientation === "horizontal"; + const handleResize = useDebounceCallback(() => { + if (context.viewport) { + const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth; + const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight; + setVisible(isHorizontal ? isOverflowX : isOverflowY); + } + }, 10); + useResizeObserver(context.viewport, handleResize); + useResizeObserver(context.content, handleResize); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || visible, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ScrollAreaScrollbarVisible, + { + "data-state": visible ? "visible" : "hidden", + ...scrollbarProps, + ref: forwardedRef + } + ) }); +}); +var ScrollAreaScrollbarVisible = React2.forwardRef((props, forwardedRef) => { + const { orientation = "vertical", ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const thumbRef = React2.useRef(null); + const pointerOffsetRef = React2.useRef(0); + const [sizes, setSizes] = React2.useState({ + content: 0, + viewport: 0, + scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 } + }); + const thumbRatio = getThumbRatio(sizes.viewport, sizes.content); + const commonProps = { + ...scrollbarProps, + sizes, + onSizesChange: setSizes, + hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1), + onThumbChange: (thumb) => thumbRef.current = thumb, + onThumbPointerUp: () => pointerOffsetRef.current = 0, + onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos + }; + function getScrollPosition(pointerPos, dir) { + return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir); + } + if (orientation === "horizontal") { + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ScrollAreaScrollbarX, + { + ...commonProps, + ref: forwardedRef, + onThumbPositionChange: () => { + if (context.viewport && thumbRef.current) { + const scrollPos = context.viewport.scrollLeft; + const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir); + thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`; + } + }, + onWheelScroll: (scrollPos) => { + if (context.viewport) context.viewport.scrollLeft = scrollPos; + }, + onDragScroll: (pointerPos) => { + if (context.viewport) { + context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir); + } + } + } + ); + } + if (orientation === "vertical") { + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ScrollAreaScrollbarY, + { + ...commonProps, + ref: forwardedRef, + onThumbPositionChange: () => { + if (context.viewport && thumbRef.current) { + const scrollPos = context.viewport.scrollTop; + const offset = getThumbOffsetFromScroll(scrollPos, sizes); + thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`; + } + }, + onWheelScroll: (scrollPos) => { + if (context.viewport) context.viewport.scrollTop = scrollPos; + }, + onDragScroll: (pointerPos) => { + if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos); + } + } + ); + } + return null; +}); +var ScrollAreaScrollbarX = React2.forwardRef((props, forwardedRef) => { + const { sizes, onSizesChange, ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const [computedStyle, setComputedStyle] = React2.useState(); + const ref = React2.useRef(null); + const composeRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref, context.onScrollbarXChange); + React2.useEffect(() => { + if (ref.current) setComputedStyle(getComputedStyle(ref.current)); + }, [ref]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ScrollAreaScrollbarImpl, + { + "data-orientation": "horizontal", + ...scrollbarProps, + ref: composeRefs, + sizes, + style: { + bottom: 0, + left: context.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0, + right: context.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0, + ["--radix-scroll-area-thumb-width"]: getThumbSize(sizes) + "px", + ...props.style + }, + onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x), + onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x), + onWheelScroll: (event, maxScrollPos) => { + if (context.viewport) { + const scrollPos = context.viewport.scrollLeft + event.deltaX; + props.onWheelScroll(scrollPos); + if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) { + event.preventDefault(); + } + } + }, + onResize: () => { + if (ref.current && context.viewport && computedStyle) { + onSizesChange({ + content: context.viewport.scrollWidth, + viewport: context.viewport.offsetWidth, + scrollbar: { + size: ref.current.clientWidth, + paddingStart: toInt(computedStyle.paddingLeft), + paddingEnd: toInt(computedStyle.paddingRight) + } + }); + } + } + } + ); +}); +var ScrollAreaScrollbarY = React2.forwardRef((props, forwardedRef) => { + const { sizes, onSizesChange, ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const [computedStyle, setComputedStyle] = React2.useState(); + const ref = React2.useRef(null); + const composeRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref, context.onScrollbarYChange); + React2.useEffect(() => { + if (ref.current) setComputedStyle(getComputedStyle(ref.current)); + }, [ref]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ScrollAreaScrollbarImpl, + { + "data-orientation": "vertical", + ...scrollbarProps, + ref: composeRefs, + sizes, + style: { + top: 0, + right: context.dir === "ltr" ? 0 : void 0, + left: context.dir === "rtl" ? 0 : void 0, + bottom: "var(--radix-scroll-area-corner-height)", + ["--radix-scroll-area-thumb-height"]: getThumbSize(sizes) + "px", + ...props.style + }, + onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y), + onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y), + onWheelScroll: (event, maxScrollPos) => { + if (context.viewport) { + const scrollPos = context.viewport.scrollTop + event.deltaY; + props.onWheelScroll(scrollPos); + if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) { + event.preventDefault(); + } + } + }, + onResize: () => { + if (ref.current && context.viewport && computedStyle) { + onSizesChange({ + content: context.viewport.scrollHeight, + viewport: context.viewport.offsetHeight, + scrollbar: { + size: ref.current.clientHeight, + paddingStart: toInt(computedStyle.paddingTop), + paddingEnd: toInt(computedStyle.paddingBottom) + } + }); + } + } + } + ); +}); +var [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME); +var ScrollAreaScrollbarImpl = React2.forwardRef((props, forwardedRef) => { + const { + __scopeScrollArea, + sizes, + hasThumb, + onThumbChange, + onThumbPointerUp, + onThumbPointerDown, + onThumbPositionChange, + onDragScroll, + onWheelScroll, + onResize, + ...scrollbarProps + } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea); + const [scrollbar, setScrollbar] = React2.useState(null); + const composeRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setScrollbar(node)); + const rectRef = React2.useRef(null); + const prevWebkitUserSelectRef = React2.useRef(""); + const viewport = context.viewport; + const maxScrollPos = sizes.content - sizes.viewport; + const handleWheelScroll = (0, import_react_use_callback_ref.useCallbackRef)(onWheelScroll); + const handleThumbPositionChange = (0, import_react_use_callback_ref.useCallbackRef)(onThumbPositionChange); + const handleResize = useDebounceCallback(onResize, 10); + function handleDragScroll(event) { + if (rectRef.current) { + const x = event.clientX - rectRef.current.left; + const y = event.clientY - rectRef.current.top; + onDragScroll({ x, y }); + } + } + React2.useEffect(() => { + const handleWheel = (event) => { + const element = event.target; + const isScrollbarWheel = scrollbar?.contains(element); + if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos); + }; + document.addEventListener("wheel", handleWheel, { passive: false }); + return () => document.removeEventListener("wheel", handleWheel, { passive: false }); + }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]); + React2.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]); + useResizeObserver(scrollbar, handleResize); + useResizeObserver(context.content, handleResize); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ScrollbarProvider, + { + scope: __scopeScrollArea, + scrollbar, + hasThumb, + onThumbChange: (0, import_react_use_callback_ref.useCallbackRef)(onThumbChange), + onThumbPointerUp: (0, import_react_use_callback_ref.useCallbackRef)(onThumbPointerUp), + onThumbPositionChange: handleThumbPositionChange, + onThumbPointerDown: (0, import_react_use_callback_ref.useCallbackRef)(onThumbPointerDown), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + ...scrollbarProps, + ref: composeRefs, + style: { position: "absolute", ...scrollbarProps.style }, + onPointerDown: (0, import_primitive.composeEventHandlers)(props.onPointerDown, (event) => { + const mainPointer = 0; + if (event.button === mainPointer) { + const element = event.target; + element.setPointerCapture(event.pointerId); + rectRef.current = scrollbar.getBoundingClientRect(); + prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect; + document.body.style.webkitUserSelect = "none"; + if (context.viewport) context.viewport.style.scrollBehavior = "auto"; + handleDragScroll(event); + } + }), + onPointerMove: (0, import_primitive.composeEventHandlers)(props.onPointerMove, handleDragScroll), + onPointerUp: (0, import_primitive.composeEventHandlers)(props.onPointerUp, (event) => { + const element = event.target; + if (element.hasPointerCapture(event.pointerId)) { + element.releasePointerCapture(event.pointerId); + } + document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current; + if (context.viewport) context.viewport.style.scrollBehavior = ""; + rectRef.current = null; + }) + } + ) + } + ); +}); +var THUMB_NAME = "ScrollAreaThumb"; +var ScrollAreaThumb = React2.forwardRef( + (props, forwardedRef) => { + const { forceMount, ...thumbProps } = props; + const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) }); + } +); +var ScrollAreaThumbImpl = React2.forwardRef( + (props, forwardedRef) => { + const { __scopeScrollArea, style, ...thumbProps } = props; + const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea); + const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea); + const { onThumbPositionChange } = scrollbarContext; + const composedRef = (0, import_react_compose_refs.useComposedRefs)( + forwardedRef, + (node) => scrollbarContext.onThumbChange(node) + ); + const removeUnlinkedScrollListenerRef = React2.useRef(void 0); + const debounceScrollEnd = useDebounceCallback(() => { + if (removeUnlinkedScrollListenerRef.current) { + removeUnlinkedScrollListenerRef.current(); + removeUnlinkedScrollListenerRef.current = void 0; + } + }, 100); + React2.useEffect(() => { + const viewport = scrollAreaContext.viewport; + if (viewport) { + const handleScroll = () => { + debounceScrollEnd(); + if (!removeUnlinkedScrollListenerRef.current) { + const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange); + removeUnlinkedScrollListenerRef.current = listener; + onThumbPositionChange(); + } + }; + onThumbPositionChange(); + viewport.addEventListener("scroll", handleScroll); + return () => viewport.removeEventListener("scroll", handleScroll); + } + }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "data-state": scrollbarContext.hasThumb ? "visible" : "hidden", + ...thumbProps, + ref: composedRef, + style: { + width: "var(--radix-scroll-area-thumb-width)", + height: "var(--radix-scroll-area-thumb-height)", + ...style + }, + onPointerDownCapture: (0, import_primitive.composeEventHandlers)(props.onPointerDownCapture, (event) => { + const thumb = event.target; + const thumbRect = thumb.getBoundingClientRect(); + const x = event.clientX - thumbRect.left; + const y = event.clientY - thumbRect.top; + scrollbarContext.onThumbPointerDown({ x, y }); + }), + onPointerUp: (0, import_primitive.composeEventHandlers)(props.onPointerUp, scrollbarContext.onThumbPointerUp) + } + ); + } +); +ScrollAreaThumb.displayName = THUMB_NAME; +var CORNER_NAME = "ScrollAreaCorner"; +var ScrollAreaCorner = React2.forwardRef( + (props, forwardedRef) => { + const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea); + const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY); + const hasCorner = context.type !== "scroll" && hasBothScrollbarsVisible; + return hasCorner ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null; + } +); +ScrollAreaCorner.displayName = CORNER_NAME; +var ScrollAreaCornerImpl = React2.forwardRef((props, forwardedRef) => { + const { __scopeScrollArea, ...cornerProps } = props; + const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea); + const [width, setWidth] = React2.useState(0); + const [height, setHeight] = React2.useState(0); + const hasSize = Boolean(width && height); + useResizeObserver(context.scrollbarX, () => { + const height2 = context.scrollbarX?.offsetHeight || 0; + context.onCornerHeightChange(height2); + setHeight(height2); + }); + useResizeObserver(context.scrollbarY, () => { + const width2 = context.scrollbarY?.offsetWidth || 0; + context.onCornerWidthChange(width2); + setWidth(width2); + }); + return hasSize ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + ...cornerProps, + ref: forwardedRef, + style: { + width, + height, + position: "absolute", + right: context.dir === "ltr" ? 0 : void 0, + left: context.dir === "rtl" ? 0 : void 0, + bottom: 0, + ...props.style + } + } + ) : null; +}); +function toInt(value) { + return value ? parseInt(value, 10) : 0; +} +function getThumbRatio(viewportSize, contentSize) { + const ratio = viewportSize / contentSize; + return isNaN(ratio) ? 0 : ratio; +} +function getThumbSize(sizes) { + const ratio = getThumbRatio(sizes.viewport, sizes.content); + const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd; + const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio; + return Math.max(thumbSize, 18); +} +function getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = "ltr") { + const thumbSizePx = getThumbSize(sizes); + const thumbCenter = thumbSizePx / 2; + const offset = pointerOffset || thumbCenter; + const thumbOffsetFromEnd = thumbSizePx - offset; + const minPointerPos = sizes.scrollbar.paddingStart + offset; + const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd; + const maxScrollPos = sizes.content - sizes.viewport; + const scrollRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0]; + const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange); + return interpolate(pointerPos); +} +function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") { + const thumbSizePx = getThumbSize(sizes); + const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd; + const scrollbar = sizes.scrollbar.size - scrollbarPadding; + const maxScrollPos = sizes.content - sizes.viewport; + const maxThumbPos = scrollbar - thumbSizePx; + const scrollClampRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0]; + const scrollWithoutMomentum = (0, import_number.clamp)(scrollPos, scrollClampRange); + const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]); + return interpolate(scrollWithoutMomentum); +} +function linearScale(input, output) { + return (value) => { + if (input[0] === input[1] || output[0] === output[1]) return output[0]; + const ratio = (output[1] - output[0]) / (input[1] - input[0]); + return output[0] + ratio * (value - input[0]); + }; +} +function isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) { + return scrollPos > 0 && scrollPos < maxScrollPos; +} +var addUnlinkedScrollListener = (node, handler = () => { +}) => { + let prevPosition = { left: node.scrollLeft, top: node.scrollTop }; + let rAF = 0; + (function loop() { + const position = { left: node.scrollLeft, top: node.scrollTop }; + const isHorizontalScroll = prevPosition.left !== position.left; + const isVerticalScroll = prevPosition.top !== position.top; + if (isHorizontalScroll || isVerticalScroll) handler(); + prevPosition = position; + rAF = window.requestAnimationFrame(loop); + })(); + return () => window.cancelAnimationFrame(rAF); +}; +function useDebounceCallback(callback, delay) { + const handleCallback = (0, import_react_use_callback_ref.useCallbackRef)(callback); + const debounceTimerRef = React2.useRef(0); + React2.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []); + return React2.useCallback(() => { + window.clearTimeout(debounceTimerRef.current); + debounceTimerRef.current = window.setTimeout(handleCallback, delay); + }, [handleCallback, delay]); +} +function useResizeObserver(element, onResize) { + const handleResize = (0, import_react_use_callback_ref.useCallbackRef)(onResize); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + let rAF = 0; + if (element) { + const resizeObserver = new ResizeObserver(() => { + cancelAnimationFrame(rAF); + rAF = window.requestAnimationFrame(handleResize); + }); + resizeObserver.observe(element); + return () => { + window.cancelAnimationFrame(rAF); + resizeObserver.unobserve(element); + }; + } + }, [element, handleResize]); +} +var Root = ScrollArea; +var Viewport = ScrollAreaViewport; +var Scrollbar = ScrollAreaScrollbar; +var Thumb = ScrollAreaThumb; +var Corner = ScrollAreaCorner; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e5c925abdb3154ab043484eb47cb9cf79c5a4535 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/scroll-area.tsx", "../src/use-state-machine.ts"], + "sourcesContent": ["'use client';\nexport {\n createScrollAreaScope,\n //\n ScrollArea,\n ScrollAreaViewport,\n ScrollAreaScrollbar,\n ScrollAreaThumb,\n ScrollAreaCorner,\n //\n Root,\n Viewport,\n Scrollbar,\n Thumb,\n Corner,\n} from './scroll-area';\nexport type {\n ScrollAreaProps,\n ScrollAreaViewportProps,\n ScrollAreaScrollbarProps,\n ScrollAreaThumbProps,\n ScrollAreaCornerProps,\n} from './scroll-area';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Presence } from '@radix-ui/react-presence';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { clamp } from '@radix-ui/number';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useStateMachine } from './use-state-machine';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Sizes = {\n content: number;\n viewport: number;\n scrollbar: {\n size: number;\n paddingStart: number;\n paddingEnd: number;\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollArea\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_AREA_NAME = 'ScrollArea';\n\ntype ScopedProps

= P & { __scopeScrollArea?: Scope };\nconst [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);\n\ntype ScrollAreaContextValue = {\n type: 'auto' | 'always' | 'scroll' | 'hover';\n dir: Direction;\n scrollHideDelay: number;\n scrollArea: ScrollAreaElement | null;\n viewport: ScrollAreaViewportElement | null;\n onViewportChange(viewport: ScrollAreaViewportElement | null): void;\n content: HTMLDivElement | null;\n onContentChange(content: HTMLDivElement): void;\n scrollbarX: ScrollAreaScrollbarElement | null;\n onScrollbarXChange(scrollbar: ScrollAreaScrollbarElement | null): void;\n scrollbarXEnabled: boolean;\n onScrollbarXEnabledChange(rendered: boolean): void;\n scrollbarY: ScrollAreaScrollbarElement | null;\n onScrollbarYChange(scrollbar: ScrollAreaScrollbarElement | null): void;\n scrollbarYEnabled: boolean;\n onScrollbarYEnabledChange(rendered: boolean): void;\n onCornerWidthChange(width: number): void;\n onCornerHeightChange(height: number): void;\n};\n\nconst [ScrollAreaProvider, useScrollAreaContext] =\n createScrollAreaContext(SCROLL_AREA_NAME);\n\ntype ScrollAreaElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface ScrollAreaProps extends PrimitiveDivProps {\n type?: ScrollAreaContextValue['type'];\n dir?: ScrollAreaContextValue['dir'];\n scrollHideDelay?: number;\n}\n\nconst ScrollArea = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeScrollArea,\n type = 'hover',\n dir,\n scrollHideDelay = 600,\n ...scrollAreaProps\n } = props;\n const [scrollArea, setScrollArea] = React.useState(null);\n const [viewport, setViewport] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const [scrollbarX, setScrollbarX] = React.useState(null);\n const [scrollbarY, setScrollbarY] = React.useState(null);\n const [cornerWidth, setCornerWidth] = React.useState(0);\n const [cornerHeight, setCornerHeight] = React.useState(0);\n const [scrollbarXEnabled, setScrollbarXEnabled] = React.useState(false);\n const [scrollbarYEnabled, setScrollbarYEnabled] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));\n const direction = useDirection(dir);\n\n return (\n \n \n \n );\n }\n);\n\nScrollArea.displayName = SCROLL_AREA_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaViewport\n * -----------------------------------------------------------------------------------------------*/\n\nconst VIEWPORT_NAME = 'ScrollAreaViewport';\n\ntype ScrollAreaViewportElement = React.ComponentRef;\ninterface ScrollAreaViewportProps extends PrimitiveDivProps {\n nonce?: string;\n}\n\nconst ScrollAreaViewport = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeScrollArea, children, nonce, ...viewportProps } = props;\n const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n return (\n <>\n {/* Hide scrollbars cross-browser and enable momentum scroll for touch devices */}\n \n

\n {children}\n
\n \n \n );\n }\n);\n\nScrollAreaViewport.displayName = VIEWPORT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaScrollbar\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLLBAR_NAME = 'ScrollAreaScrollbar';\n\ntype ScrollAreaScrollbarElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbar = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;\n const isHorizontal = props.orientation === 'horizontal';\n\n React.useEffect(() => {\n isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);\n return () => {\n isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);\n };\n }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);\n\n return context.type === 'hover' ? (\n \n ) : context.type === 'scroll' ? (\n \n ) : context.type === 'auto' ? (\n \n ) : context.type === 'always' ? (\n \n ) : null;\n }\n);\n\nScrollAreaScrollbar.displayName = SCROLLBAR_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarHoverElement = ScrollAreaScrollbarAutoElement;\ninterface ScrollAreaScrollbarHoverProps extends ScrollAreaScrollbarAutoProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarHover = React.forwardRef<\n ScrollAreaScrollbarHoverElement,\n ScrollAreaScrollbarHoverProps\n>((props: ScopedProps, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [visible, setVisible] = React.useState(false);\n\n React.useEffect(() => {\n const scrollArea = context.scrollArea;\n let hideTimer = 0;\n if (scrollArea) {\n const handlePointerEnter = () => {\n window.clearTimeout(hideTimer);\n setVisible(true);\n };\n const handlePointerLeave = () => {\n hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);\n };\n scrollArea.addEventListener('pointerenter', handlePointerEnter);\n scrollArea.addEventListener('pointerleave', handlePointerLeave);\n return () => {\n window.clearTimeout(hideTimer);\n scrollArea.removeEventListener('pointerenter', handlePointerEnter);\n scrollArea.removeEventListener('pointerleave', handlePointerLeave);\n };\n }\n }, [context.scrollArea, context.scrollHideDelay]);\n\n return (\n \n \n \n );\n});\n\ntype ScrollAreaScrollbarScrollElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarScrollProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarScroll = React.forwardRef<\n ScrollAreaScrollbarScrollElement,\n ScrollAreaScrollbarScrollProps\n>((props: ScopedProps, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const isHorizontal = props.orientation === 'horizontal';\n const debounceScrollEnd = useDebounceCallback(() => send('SCROLL_END'), 100);\n const [state, send] = useStateMachine('hidden', {\n hidden: {\n SCROLL: 'scrolling',\n },\n scrolling: {\n SCROLL_END: 'idle',\n POINTER_ENTER: 'interacting',\n },\n interacting: {\n SCROLL: 'interacting',\n POINTER_LEAVE: 'idle',\n },\n idle: {\n HIDE: 'hidden',\n SCROLL: 'scrolling',\n POINTER_ENTER: 'interacting',\n },\n });\n\n React.useEffect(() => {\n if (state === 'idle') {\n const hideTimer = window.setTimeout(() => send('HIDE'), context.scrollHideDelay);\n return () => window.clearTimeout(hideTimer);\n }\n }, [state, context.scrollHideDelay, send]);\n\n React.useEffect(() => {\n const viewport = context.viewport;\n const scrollDirection = isHorizontal ? 'scrollLeft' : 'scrollTop';\n\n if (viewport) {\n let prevScrollPos = viewport[scrollDirection];\n const handleScroll = () => {\n const scrollPos = viewport[scrollDirection];\n const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;\n if (hasScrollInDirectionChanged) {\n send('SCROLL');\n debounceScrollEnd();\n }\n prevScrollPos = scrollPos;\n };\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [context.viewport, isHorizontal, send, debounceScrollEnd]);\n\n return (\n \n send('POINTER_ENTER'))}\n onPointerLeave={composeEventHandlers(props.onPointerLeave, () => send('POINTER_LEAVE'))}\n />\n \n );\n});\n\ntype ScrollAreaScrollbarAutoElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarAutoProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarAuto = React.forwardRef<\n ScrollAreaScrollbarAutoElement,\n ScrollAreaScrollbarAutoProps\n>((props: ScopedProps, forwardedRef) => {\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { forceMount, ...scrollbarProps } = props;\n const [visible, setVisible] = React.useState(false);\n const isHorizontal = props.orientation === 'horizontal';\n const handleResize = useDebounceCallback(() => {\n if (context.viewport) {\n const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;\n const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;\n setVisible(isHorizontal ? isOverflowX : isOverflowY);\n }\n }, 10);\n\n useResizeObserver(context.viewport, handleResize);\n useResizeObserver(context.content, handleResize);\n\n return (\n \n \n \n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarVisibleElement = ScrollAreaScrollbarAxisElement;\ninterface ScrollAreaScrollbarVisibleProps\n extends Omit {\n orientation?: 'horizontal' | 'vertical';\n}\n\nconst ScrollAreaScrollbarVisible = React.forwardRef<\n ScrollAreaScrollbarVisibleElement,\n ScrollAreaScrollbarVisibleProps\n>((props: ScopedProps, forwardedRef) => {\n const { orientation = 'vertical', ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const thumbRef = React.useRef(null);\n const pointerOffsetRef = React.useRef(0);\n const [sizes, setSizes] = React.useState({\n content: 0,\n viewport: 0,\n scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 },\n });\n const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);\n\n type UncommonProps = 'onThumbPositionChange' | 'onDragScroll' | 'onWheelScroll';\n const commonProps: Omit = {\n ...scrollbarProps,\n sizes,\n onSizesChange: setSizes,\n hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),\n onThumbChange: (thumb) => (thumbRef.current = thumb),\n onThumbPointerUp: () => (pointerOffsetRef.current = 0),\n onThumbPointerDown: (pointerPos) => (pointerOffsetRef.current = pointerPos),\n };\n\n function getScrollPosition(pointerPos: number, dir?: Direction) {\n return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);\n }\n\n if (orientation === 'horizontal') {\n return (\n {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollLeft;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);\n thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;\n }\n }}\n onWheelScroll={(scrollPos) => {\n if (context.viewport) context.viewport.scrollLeft = scrollPos;\n }}\n onDragScroll={(pointerPos) => {\n if (context.viewport) {\n context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);\n }\n }}\n />\n );\n }\n\n if (orientation === 'vertical') {\n return (\n {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollTop;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes);\n thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;\n }\n }}\n onWheelScroll={(scrollPos) => {\n if (context.viewport) context.viewport.scrollTop = scrollPos;\n }}\n onDragScroll={(pointerPos) => {\n if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);\n }}\n />\n );\n }\n\n return null;\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarAxisPrivateProps = {\n hasThumb: boolean;\n sizes: Sizes;\n onSizesChange(sizes: Sizes): void;\n onThumbChange(thumb: ScrollAreaThumbElement | null): void;\n onThumbPointerDown(pointerPos: number): void;\n onThumbPointerUp(): void;\n onThumbPositionChange(): void;\n onWheelScroll(scrollPos: number): void;\n onDragScroll(pointerPos: number): void;\n};\n\ntype ScrollAreaScrollbarAxisElement = ScrollAreaScrollbarImplElement;\ninterface ScrollAreaScrollbarAxisProps\n extends Omit,\n ScrollAreaScrollbarAxisPrivateProps {}\n\nconst ScrollAreaScrollbarX = React.forwardRef<\n ScrollAreaScrollbarAxisElement,\n ScrollAreaScrollbarAxisProps\n>((props: ScopedProps, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React.useState();\n const ref = React.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);\n\n React.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n\n return (\n props.onThumbPointerDown(pointerPos.x)}\n onDragScroll={(pointerPos) => props.onDragScroll(pointerPos.x)}\n onWheelScroll={(event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollLeft + event.deltaX;\n props.onWheelScroll(scrollPos);\n // prevent window scroll when wheeling on scrollbar\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n }}\n onResize={() => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollWidth,\n viewport: context.viewport.offsetWidth,\n scrollbar: {\n size: ref.current.clientWidth,\n paddingStart: toInt(computedStyle.paddingLeft),\n paddingEnd: toInt(computedStyle.paddingRight),\n },\n });\n }\n }}\n />\n );\n});\n\nconst ScrollAreaScrollbarY = React.forwardRef<\n ScrollAreaScrollbarAxisElement,\n ScrollAreaScrollbarAxisProps\n>((props: ScopedProps, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React.useState();\n const ref = React.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);\n\n React.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n\n return (\n props.onThumbPointerDown(pointerPos.y)}\n onDragScroll={(pointerPos) => props.onDragScroll(pointerPos.y)}\n onWheelScroll={(event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollTop + event.deltaY;\n props.onWheelScroll(scrollPos);\n // prevent window scroll when wheeling on scrollbar\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n }}\n onResize={() => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollHeight,\n viewport: context.viewport.offsetHeight,\n scrollbar: {\n size: ref.current.clientHeight,\n paddingStart: toInt(computedStyle.paddingTop),\n paddingEnd: toInt(computedStyle.paddingBottom),\n },\n });\n }\n }}\n />\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollbarContext = {\n hasThumb: boolean;\n scrollbar: ScrollAreaScrollbarElement | null;\n onThumbChange(thumb: ScrollAreaThumbElement | null): void;\n onThumbPointerUp(): void;\n onThumbPointerDown(pointerPos: { x: number; y: number }): void;\n onThumbPositionChange(): void;\n};\n\nconst [ScrollbarProvider, useScrollbarContext] =\n createScrollAreaContext(SCROLLBAR_NAME);\n\ntype ScrollAreaScrollbarImplElement = React.ComponentRef;\ntype ScrollAreaScrollbarImplPrivateProps = {\n sizes: Sizes;\n hasThumb: boolean;\n onThumbChange: ScrollbarContext['onThumbChange'];\n onThumbPointerUp: ScrollbarContext['onThumbPointerUp'];\n onThumbPointerDown: ScrollbarContext['onThumbPointerDown'];\n onThumbPositionChange: ScrollbarContext['onThumbPositionChange'];\n onWheelScroll(event: WheelEvent, maxScrollPos: number): void;\n onDragScroll(pointerPos: { x: number; y: number }): void;\n onResize(): void;\n};\ninterface ScrollAreaScrollbarImplProps\n extends Omit,\n ScrollAreaScrollbarImplPrivateProps {}\n\nconst ScrollAreaScrollbarImpl = React.forwardRef<\n ScrollAreaScrollbarImplElement,\n ScrollAreaScrollbarImplProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n __scopeScrollArea,\n sizes,\n hasThumb,\n onThumbChange,\n onThumbPointerUp,\n onThumbPointerDown,\n onThumbPositionChange,\n onDragScroll,\n onWheelScroll,\n onResize,\n ...scrollbarProps\n } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);\n const [scrollbar, setScrollbar] = React.useState(null);\n const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));\n const rectRef = React.useRef(null);\n const prevWebkitUserSelectRef = React.useRef('');\n const viewport = context.viewport;\n const maxScrollPos = sizes.content - sizes.viewport;\n const handleWheelScroll = useCallbackRef(onWheelScroll);\n const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);\n const handleResize = useDebounceCallback(onResize, 10);\n\n function handleDragScroll(event: React.PointerEvent) {\n if (rectRef.current) {\n const x = event.clientX - rectRef.current.left;\n const y = event.clientY - rectRef.current.top;\n onDragScroll({ x, y });\n }\n }\n\n /**\n * We bind wheel event imperatively so we can switch off passive\n * mode for document wheel event to allow it to be prevented\n */\n React.useEffect(() => {\n const handleWheel = (event: WheelEvent) => {\n const element = event.target as HTMLElement;\n const isScrollbarWheel = scrollbar?.contains(element);\n if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);\n };\n document.addEventListener('wheel', handleWheel, { passive: false });\n return () => document.removeEventListener('wheel', handleWheel, { passive: false } as any);\n }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);\n\n /**\n * Update thumb position on sizes change\n */\n React.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);\n\n useResizeObserver(scrollbar, handleResize);\n useResizeObserver(context.content, handleResize);\n\n return (\n \n {\n const mainPointer = 0;\n if (event.button === mainPointer) {\n const element = event.target as HTMLElement;\n element.setPointerCapture(event.pointerId);\n rectRef.current = scrollbar!.getBoundingClientRect();\n // pointer capture doesn't prevent text selection in Safari\n // so we remove text selection manually when scrolling\n prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;\n document.body.style.webkitUserSelect = 'none';\n if (context.viewport) context.viewport.style.scrollBehavior = 'auto';\n handleDragScroll(event);\n }\n })}\n onPointerMove={composeEventHandlers(props.onPointerMove, handleDragScroll)}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n const element = event.target as HTMLElement;\n if (element.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId);\n }\n document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;\n if (context.viewport) context.viewport.style.scrollBehavior = '';\n rectRef.current = null;\n })}\n />\n \n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaThumb\n * -----------------------------------------------------------------------------------------------*/\n\nconst THUMB_NAME = 'ScrollAreaThumb';\n\ntype ScrollAreaThumbElement = ScrollAreaThumbImplElement;\ninterface ScrollAreaThumbProps extends ScrollAreaThumbImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst ScrollAreaThumb = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { forceMount, ...thumbProps } = props;\n const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);\n return (\n \n \n \n );\n }\n);\n\ntype ScrollAreaThumbImplElement = React.ComponentRef;\ninterface ScrollAreaThumbImplProps extends PrimitiveDivProps {}\n\nconst ScrollAreaThumbImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeScrollArea, style, ...thumbProps } = props;\n const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);\n const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);\n const { onThumbPositionChange } = scrollbarContext;\n const composedRef = useComposedRefs(forwardedRef, (node) =>\n scrollbarContext.onThumbChange(node)\n );\n const removeUnlinkedScrollListenerRef = React.useRef<() => void>(undefined);\n const debounceScrollEnd = useDebounceCallback(() => {\n if (removeUnlinkedScrollListenerRef.current) {\n removeUnlinkedScrollListenerRef.current();\n removeUnlinkedScrollListenerRef.current = undefined;\n }\n }, 100);\n\n React.useEffect(() => {\n const viewport = scrollAreaContext.viewport;\n if (viewport) {\n /**\n * We only bind to native scroll event so we know when scroll starts and ends.\n * When scroll starts we start a requestAnimationFrame loop that checks for\n * changes to scroll position. That rAF loop triggers our thumb position change\n * when relevant to avoid scroll-linked effects. We cancel the loop when scroll ends.\n * https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects\n */\n const handleScroll = () => {\n debounceScrollEnd();\n if (!removeUnlinkedScrollListenerRef.current) {\n const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);\n removeUnlinkedScrollListenerRef.current = listener;\n onThumbPositionChange();\n }\n };\n onThumbPositionChange();\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);\n\n return (\n {\n const thumb = event.target as HTMLElement;\n const thumbRect = thumb.getBoundingClientRect();\n const x = event.clientX - thumbRect.left;\n const y = event.clientY - thumbRect.top;\n scrollbarContext.onThumbPointerDown({ x, y });\n })}\n onPointerUp={composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)}\n />\n );\n }\n);\n\nScrollAreaThumb.displayName = THUMB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaCorner\n * -----------------------------------------------------------------------------------------------*/\n\nconst CORNER_NAME = 'ScrollAreaCorner';\n\ntype ScrollAreaCornerElement = ScrollAreaCornerImplElement;\ninterface ScrollAreaCornerProps extends ScrollAreaCornerImplProps {}\n\nconst ScrollAreaCorner = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);\n const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);\n const hasCorner = context.type !== 'scroll' && hasBothScrollbarsVisible;\n return hasCorner ? : null;\n }\n);\n\nScrollAreaCorner.displayName = CORNER_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaCornerImplElement = React.ComponentRef;\ninterface ScrollAreaCornerImplProps extends PrimitiveDivProps {}\n\nconst ScrollAreaCornerImpl = React.forwardRef<\n ScrollAreaCornerImplElement,\n ScrollAreaCornerImplProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeScrollArea, ...cornerProps } = props;\n const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);\n const [width, setWidth] = React.useState(0);\n const [height, setHeight] = React.useState(0);\n const hasSize = Boolean(width && height);\n\n useResizeObserver(context.scrollbarX, () => {\n const height = context.scrollbarX?.offsetHeight || 0;\n context.onCornerHeightChange(height);\n setHeight(height);\n });\n\n useResizeObserver(context.scrollbarY, () => {\n const width = context.scrollbarY?.offsetWidth || 0;\n context.onCornerWidthChange(width);\n setWidth(width);\n });\n\n return hasSize ? (\n \n ) : null;\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction toInt(value?: string) {\n return value ? parseInt(value, 10) : 0;\n}\n\nfunction getThumbRatio(viewportSize: number, contentSize: number) {\n const ratio = viewportSize / contentSize;\n return isNaN(ratio) ? 0 : ratio;\n}\n\nfunction getThumbSize(sizes: Sizes) {\n const ratio = getThumbRatio(sizes.viewport, sizes.content);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;\n // minimum of 18 matches macOS minimum\n return Math.max(thumbSize, 18);\n}\n\nfunction getScrollPositionFromPointer(\n pointerPos: number,\n pointerOffset: number,\n sizes: Sizes,\n dir: Direction = 'ltr'\n) {\n const thumbSizePx = getThumbSize(sizes);\n const thumbCenter = thumbSizePx / 2;\n const offset = pointerOffset || thumbCenter;\n const thumbOffsetFromEnd = thumbSizePx - offset;\n const minPointerPos = sizes.scrollbar.paddingStart + offset;\n const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;\n const maxScrollPos = sizes.content - sizes.viewport;\n const scrollRange = dir === 'ltr' ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange as [number, number]);\n return interpolate(pointerPos);\n}\n\nfunction getThumbOffsetFromScroll(scrollPos: number, sizes: Sizes, dir: Direction = 'ltr') {\n const thumbSizePx = getThumbSize(sizes);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const scrollbar = sizes.scrollbar.size - scrollbarPadding;\n const maxScrollPos = sizes.content - sizes.viewport;\n const maxThumbPos = scrollbar - thumbSizePx;\n const scrollClampRange = dir === 'ltr' ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange as [number, number]);\n const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);\n return interpolate(scrollWithoutMomentum);\n}\n\n// https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js\nfunction linearScale(input: readonly [number, number], output: readonly [number, number]) {\n return (value: number) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\n\nfunction isScrollingWithinScrollbarBounds(scrollPos: number, maxScrollPos: number) {\n return scrollPos > 0 && scrollPos < maxScrollPos;\n}\n\n// Custom scroll handler to avoid scroll-linked effects\n// https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects\nconst addUnlinkedScrollListener = (node: HTMLElement, handler = () => {}) => {\n let prevPosition = { left: node.scrollLeft, top: node.scrollTop };\n let rAF = 0;\n (function loop() {\n const position = { left: node.scrollLeft, top: node.scrollTop };\n const isHorizontalScroll = prevPosition.left !== position.left;\n const isVerticalScroll = prevPosition.top !== position.top;\n if (isHorizontalScroll || isVerticalScroll) handler();\n prevPosition = position;\n rAF = window.requestAnimationFrame(loop);\n })();\n return () => window.cancelAnimationFrame(rAF);\n};\n\nfunction useDebounceCallback(callback: () => void, delay: number) {\n const handleCallback = useCallbackRef(callback);\n const debounceTimerRef = React.useRef(0);\n React.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);\n return React.useCallback(() => {\n window.clearTimeout(debounceTimerRef.current);\n debounceTimerRef.current = window.setTimeout(handleCallback, delay);\n }, [handleCallback, delay]);\n}\n\nfunction useResizeObserver(element: HTMLElement | null, onResize: () => void) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n /**\n * Resize Observer will throw an often benign error that says `ResizeObserver loop\n * completed with undelivered notifications`. This means that ResizeObserver was not\n * able to deliver all observations within a single animation frame, so we use\n * `requestAnimationFrame` to ensure we don't deliver unnecessary observations.\n * Further reading: https://github.com/WICG/resize-observer/issues/38\n */\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = ScrollArea;\nconst Viewport = ScrollAreaViewport;\nconst Scrollbar = ScrollAreaScrollbar;\nconst Thumb = ScrollAreaThumb;\nconst Corner = ScrollAreaCorner;\n\nexport {\n createScrollAreaScope,\n //\n ScrollArea,\n ScrollAreaViewport,\n ScrollAreaScrollbar,\n ScrollAreaThumb,\n ScrollAreaCorner,\n //\n Root,\n Viewport,\n Scrollbar,\n Thumb,\n Corner,\n};\nexport type {\n ScrollAreaProps,\n ScrollAreaViewportProps,\n ScrollAreaScrollbarProps,\n ScrollAreaThumbProps,\n ScrollAreaCornerProps,\n};\n", "import * as React from 'react';\n\ntype Machine = { [k: string]: { [k: string]: S } };\ntype MachineState = keyof T;\ntype MachineEvent = keyof UnionToIntersection;\n\n// \uD83E\uDD2F https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection = (T extends any ? (x: T) => any : never) extends (x: infer R) => any\n ? R\n : never;\n\nexport function useStateMachine(\n initialState: MachineState,\n machine: M & Machine>\n) {\n return React.useReducer((state: MachineState, event: MachineEvent): MachineState => {\n const nextState = (machine[state] as any)[event];\n return nextState ?? state;\n }, initialState);\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,SAAuB;AACvB,6BAA0B;AAC1B,4BAAyB;AACzB,2BAAmC;AACnC,gCAAgC;AAChC,oCAA+B;AAC/B,6BAA6B;AAC7B,qCAAgC;AAChC,oBAAsB;AACtB,uBAAqC;;;ACTrC,YAAuB;AAWhB,SAAS,gBACd,cACA,SACA;AACA,SAAa,iBAAW,CAAC,OAAwB,UAA4C;AAC3F,UAAM,YAAa,QAAQ,KAAK,EAAU,KAAK;AAC/C,WAAO,aAAa;AAAA,EACtB,GAAG,YAAY;AACjB;;;AD0FQ;AAhFR,IAAM,mBAAmB;AAGzB,IAAM,CAAC,yBAAyB,qBAAqB,QAAI,yCAAmB,gBAAgB;AAuB5F,IAAM,CAAC,oBAAoB,oBAAoB,IAC7C,wBAAgD,gBAAgB;AAUlE,IAAM,aAAmB;AAAA,EACvB,CAAC,OAAqC,iBAAiB;AACrD,UAAM;AAAA,MACJ;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA,kBAAkB;AAAA,MAClB,GAAG;AAAA,IACL,IAAI;AACJ,UAAM,CAAC,YAAY,aAAa,IAAU,gBAAmC,IAAI;AACjF,UAAM,CAAC,UAAU,WAAW,IAAU,gBAA2C,IAAI;AACrF,UAAM,CAAC,SAAS,UAAU,IAAU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gB,MAAM;AACpB,QAAI,MAAM;AACV,QAAI,SAAS;AAQX,YAAM,iBAAiB,IAAI,eAAe,MAAM;AAC9C,6BAAqB,GAAG;AACxB,cAAM,OAAO,sBAAsB,YAAY;AAAA,MACjD,CAAC;AACD,qBAAe,QAAQ,OAAO;AAC9B,aAAO,MAAM;AACX,eAAO,qBAAqB,GAAG;AAC/B,uBAAe,UAAU,OAAO;AAAA,MAClC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,SAAS,YAAY,CAAC;AAC5B;AAIA,IAAM,OAAO;AACb,IAAM,WAAW;AACjB,IAAM,YAAY;AAClB,IAAM,QAAQ;AACd,IAAM,SAAS;", + "names": ["React", "height", "width"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fac521d1e293331d6c358170552a0d15ebbc04c6 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.mjs @@ -0,0 +1,739 @@ +"use client"; + +// src/scroll-area.tsx +import * as React2 from "react"; +import { Primitive } from "@radix-ui/react-primitive"; +import { Presence } from "@radix-ui/react-presence"; +import { createContextScope } from "@radix-ui/react-context"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { useCallbackRef } from "@radix-ui/react-use-callback-ref"; +import { useDirection } from "@radix-ui/react-direction"; +import { useLayoutEffect } from "@radix-ui/react-use-layout-effect"; +import { clamp } from "@radix-ui/number"; +import { composeEventHandlers } from "@radix-ui/primitive"; + +// src/use-state-machine.ts +import * as React from "react"; +function useStateMachine(initialState, machine) { + return React.useReducer((state, event) => { + const nextState = machine[state][event]; + return nextState ?? state; + }, initialState); +} + +// src/scroll-area.tsx +import { Fragment, jsx, jsxs } from "react/jsx-runtime"; +var SCROLL_AREA_NAME = "ScrollArea"; +var [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME); +var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME); +var ScrollArea = React2.forwardRef( + (props, forwardedRef) => { + const { + __scopeScrollArea, + type = "hover", + dir, + scrollHideDelay = 600, + ...scrollAreaProps + } = props; + const [scrollArea, setScrollArea] = React2.useState(null); + const [viewport, setViewport] = React2.useState(null); + const [content, setContent] = React2.useState(null); + const [scrollbarX, setScrollbarX] = React2.useState(null); + const [scrollbarY, setScrollbarY] = React2.useState(null); + const [cornerWidth, setCornerWidth] = React2.useState(0); + const [cornerHeight, setCornerHeight] = React2.useState(0); + const [scrollbarXEnabled, setScrollbarXEnabled] = React2.useState(false); + const [scrollbarYEnabled, setScrollbarYEnabled] = React2.useState(false); + const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node)); + const direction = useDirection(dir); + return /* @__PURE__ */ jsx( + ScrollAreaProvider, + { + scope: __scopeScrollArea, + type, + dir: direction, + scrollHideDelay, + scrollArea, + viewport, + onViewportChange: setViewport, + content, + onContentChange: setContent, + scrollbarX, + onScrollbarXChange: setScrollbarX, + scrollbarXEnabled, + onScrollbarXEnabledChange: setScrollbarXEnabled, + scrollbarY, + onScrollbarYChange: setScrollbarY, + scrollbarYEnabled, + onScrollbarYEnabledChange: setScrollbarYEnabled, + onCornerWidthChange: setCornerWidth, + onCornerHeightChange: setCornerHeight, + children: /* @__PURE__ */ jsx( + Primitive.div, + { + dir: direction, + ...scrollAreaProps, + ref: composedRefs, + style: { + position: "relative", + // Pass corner sizes as CSS vars to reduce re-renders of context consumers + ["--radix-scroll-area-corner-width"]: cornerWidth + "px", + ["--radix-scroll-area-corner-height"]: cornerHeight + "px", + ...props.style + } + } + ) + } + ); + } +); +ScrollArea.displayName = SCROLL_AREA_NAME; +var VIEWPORT_NAME = "ScrollAreaViewport"; +var ScrollAreaViewport = React2.forwardRef( + (props, forwardedRef) => { + const { __scopeScrollArea, children, nonce, ...viewportProps } = props; + const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea); + const ref = React2.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange); + return /* @__PURE__ */ jsxs(Fragment, { children: [ + /* @__PURE__ */ jsx( + "style", + { + dangerouslySetInnerHTML: { + __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}` + }, + nonce + } + ), + /* @__PURE__ */ jsx( + Primitive.div, + { + "data-radix-scroll-area-viewport": "", + ...viewportProps, + ref: composedRefs, + style: { + /** + * We don't support `visible` because the intention is to have at least one scrollbar + * if this component is used and `visible` will behave like `auto` in that case + * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description + * + * We don't handle `auto` because the intention is for the native implementation + * to be hidden if using this component. We just want to ensure the node is scrollable + * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent + * the browser from having to work out whether to render native scrollbars or not, + * we tell it to with the intention of hiding them in CSS. + */ + overflowX: context.scrollbarXEnabled ? "scroll" : "hidden", + overflowY: context.scrollbarYEnabled ? "scroll" : "hidden", + ...props.style + }, + children: /* @__PURE__ */ jsx("div", { ref: context.onContentChange, style: { minWidth: "100%", display: "table" }, children }) + } + ) + ] }); + } +); +ScrollAreaViewport.displayName = VIEWPORT_NAME; +var SCROLLBAR_NAME = "ScrollAreaScrollbar"; +var ScrollAreaScrollbar = React2.forwardRef( + (props, forwardedRef) => { + const { forceMount, ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context; + const isHorizontal = props.orientation === "horizontal"; + React2.useEffect(() => { + isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true); + return () => { + isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false); + }; + }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]); + return context.type === "hover" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "scroll" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "auto" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "always" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null; + } +); +ScrollAreaScrollbar.displayName = SCROLLBAR_NAME; +var ScrollAreaScrollbarHover = React2.forwardRef((props, forwardedRef) => { + const { forceMount, ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const [visible, setVisible] = React2.useState(false); + React2.useEffect(() => { + const scrollArea = context.scrollArea; + let hideTimer = 0; + if (scrollArea) { + const handlePointerEnter = () => { + window.clearTimeout(hideTimer); + setVisible(true); + }; + const handlePointerLeave = () => { + hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay); + }; + scrollArea.addEventListener("pointerenter", handlePointerEnter); + scrollArea.addEventListener("pointerleave", handlePointerLeave); + return () => { + window.clearTimeout(hideTimer); + scrollArea.removeEventListener("pointerenter", handlePointerEnter); + scrollArea.removeEventListener("pointerleave", handlePointerLeave); + }; + } + }, [context.scrollArea, context.scrollHideDelay]); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx( + ScrollAreaScrollbarAuto, + { + "data-state": visible ? "visible" : "hidden", + ...scrollbarProps, + ref: forwardedRef + } + ) }); +}); +var ScrollAreaScrollbarScroll = React2.forwardRef((props, forwardedRef) => { + const { forceMount, ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const isHorizontal = props.orientation === "horizontal"; + const debounceScrollEnd = useDebounceCallback(() => send("SCROLL_END"), 100); + const [state, send] = useStateMachine("hidden", { + hidden: { + SCROLL: "scrolling" + }, + scrolling: { + SCROLL_END: "idle", + POINTER_ENTER: "interacting" + }, + interacting: { + SCROLL: "interacting", + POINTER_LEAVE: "idle" + }, + idle: { + HIDE: "hidden", + SCROLL: "scrolling", + POINTER_ENTER: "interacting" + } + }); + React2.useEffect(() => { + if (state === "idle") { + const hideTimer = window.setTimeout(() => send("HIDE"), context.scrollHideDelay); + return () => window.clearTimeout(hideTimer); + } + }, [state, context.scrollHideDelay, send]); + React2.useEffect(() => { + const viewport = context.viewport; + const scrollDirection = isHorizontal ? "scrollLeft" : "scrollTop"; + if (viewport) { + let prevScrollPos = viewport[scrollDirection]; + const handleScroll = () => { + const scrollPos = viewport[scrollDirection]; + const hasScrollInDirectionChanged = prevScrollPos !== scrollPos; + if (hasScrollInDirectionChanged) { + send("SCROLL"); + debounceScrollEnd(); + } + prevScrollPos = scrollPos; + }; + viewport.addEventListener("scroll", handleScroll); + return () => viewport.removeEventListener("scroll", handleScroll); + } + }, [context.viewport, isHorizontal, send, debounceScrollEnd]); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || state !== "hidden", children: /* @__PURE__ */ jsx( + ScrollAreaScrollbarVisible, + { + "data-state": state === "hidden" ? "hidden" : "visible", + ...scrollbarProps, + ref: forwardedRef, + onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send("POINTER_ENTER")), + onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send("POINTER_LEAVE")) + } + ) }); +}); +var ScrollAreaScrollbarAuto = React2.forwardRef((props, forwardedRef) => { + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const { forceMount, ...scrollbarProps } = props; + const [visible, setVisible] = React2.useState(false); + const isHorizontal = props.orientation === "horizontal"; + const handleResize = useDebounceCallback(() => { + if (context.viewport) { + const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth; + const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight; + setVisible(isHorizontal ? isOverflowX : isOverflowY); + } + }, 10); + useResizeObserver(context.viewport, handleResize); + useResizeObserver(context.content, handleResize); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx( + ScrollAreaScrollbarVisible, + { + "data-state": visible ? "visible" : "hidden", + ...scrollbarProps, + ref: forwardedRef + } + ) }); +}); +var ScrollAreaScrollbarVisible = React2.forwardRef((props, forwardedRef) => { + const { orientation = "vertical", ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const thumbRef = React2.useRef(null); + const pointerOffsetRef = React2.useRef(0); + const [sizes, setSizes] = React2.useState({ + content: 0, + viewport: 0, + scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 } + }); + const thumbRatio = getThumbRatio(sizes.viewport, sizes.content); + const commonProps = { + ...scrollbarProps, + sizes, + onSizesChange: setSizes, + hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1), + onThumbChange: (thumb) => thumbRef.current = thumb, + onThumbPointerUp: () => pointerOffsetRef.current = 0, + onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos + }; + function getScrollPosition(pointerPos, dir) { + return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir); + } + if (orientation === "horizontal") { + return /* @__PURE__ */ jsx( + ScrollAreaScrollbarX, + { + ...commonProps, + ref: forwardedRef, + onThumbPositionChange: () => { + if (context.viewport && thumbRef.current) { + const scrollPos = context.viewport.scrollLeft; + const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir); + thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`; + } + }, + onWheelScroll: (scrollPos) => { + if (context.viewport) context.viewport.scrollLeft = scrollPos; + }, + onDragScroll: (pointerPos) => { + if (context.viewport) { + context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir); + } + } + } + ); + } + if (orientation === "vertical") { + return /* @__PURE__ */ jsx( + ScrollAreaScrollbarY, + { + ...commonProps, + ref: forwardedRef, + onThumbPositionChange: () => { + if (context.viewport && thumbRef.current) { + const scrollPos = context.viewport.scrollTop; + const offset = getThumbOffsetFromScroll(scrollPos, sizes); + thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`; + } + }, + onWheelScroll: (scrollPos) => { + if (context.viewport) context.viewport.scrollTop = scrollPos; + }, + onDragScroll: (pointerPos) => { + if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos); + } + } + ); + } + return null; +}); +var ScrollAreaScrollbarX = React2.forwardRef((props, forwardedRef) => { + const { sizes, onSizesChange, ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const [computedStyle, setComputedStyle] = React2.useState(); + const ref = React2.useRef(null); + const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange); + React2.useEffect(() => { + if (ref.current) setComputedStyle(getComputedStyle(ref.current)); + }, [ref]); + return /* @__PURE__ */ jsx( + ScrollAreaScrollbarImpl, + { + "data-orientation": "horizontal", + ...scrollbarProps, + ref: composeRefs, + sizes, + style: { + bottom: 0, + left: context.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0, + right: context.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0, + ["--radix-scroll-area-thumb-width"]: getThumbSize(sizes) + "px", + ...props.style + }, + onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x), + onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x), + onWheelScroll: (event, maxScrollPos) => { + if (context.viewport) { + const scrollPos = context.viewport.scrollLeft + event.deltaX; + props.onWheelScroll(scrollPos); + if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) { + event.preventDefault(); + } + } + }, + onResize: () => { + if (ref.current && context.viewport && computedStyle) { + onSizesChange({ + content: context.viewport.scrollWidth, + viewport: context.viewport.offsetWidth, + scrollbar: { + size: ref.current.clientWidth, + paddingStart: toInt(computedStyle.paddingLeft), + paddingEnd: toInt(computedStyle.paddingRight) + } + }); + } + } + } + ); +}); +var ScrollAreaScrollbarY = React2.forwardRef((props, forwardedRef) => { + const { sizes, onSizesChange, ...scrollbarProps } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea); + const [computedStyle, setComputedStyle] = React2.useState(); + const ref = React2.useRef(null); + const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange); + React2.useEffect(() => { + if (ref.current) setComputedStyle(getComputedStyle(ref.current)); + }, [ref]); + return /* @__PURE__ */ jsx( + ScrollAreaScrollbarImpl, + { + "data-orientation": "vertical", + ...scrollbarProps, + ref: composeRefs, + sizes, + style: { + top: 0, + right: context.dir === "ltr" ? 0 : void 0, + left: context.dir === "rtl" ? 0 : void 0, + bottom: "var(--radix-scroll-area-corner-height)", + ["--radix-scroll-area-thumb-height"]: getThumbSize(sizes) + "px", + ...props.style + }, + onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y), + onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y), + onWheelScroll: (event, maxScrollPos) => { + if (context.viewport) { + const scrollPos = context.viewport.scrollTop + event.deltaY; + props.onWheelScroll(scrollPos); + if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) { + event.preventDefault(); + } + } + }, + onResize: () => { + if (ref.current && context.viewport && computedStyle) { + onSizesChange({ + content: context.viewport.scrollHeight, + viewport: context.viewport.offsetHeight, + scrollbar: { + size: ref.current.clientHeight, + paddingStart: toInt(computedStyle.paddingTop), + paddingEnd: toInt(computedStyle.paddingBottom) + } + }); + } + } + } + ); +}); +var [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME); +var ScrollAreaScrollbarImpl = React2.forwardRef((props, forwardedRef) => { + const { + __scopeScrollArea, + sizes, + hasThumb, + onThumbChange, + onThumbPointerUp, + onThumbPointerDown, + onThumbPositionChange, + onDragScroll, + onWheelScroll, + onResize, + ...scrollbarProps + } = props; + const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea); + const [scrollbar, setScrollbar] = React2.useState(null); + const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node)); + const rectRef = React2.useRef(null); + const prevWebkitUserSelectRef = React2.useRef(""); + const viewport = context.viewport; + const maxScrollPos = sizes.content - sizes.viewport; + const handleWheelScroll = useCallbackRef(onWheelScroll); + const handleThumbPositionChange = useCallbackRef(onThumbPositionChange); + const handleResize = useDebounceCallback(onResize, 10); + function handleDragScroll(event) { + if (rectRef.current) { + const x = event.clientX - rectRef.current.left; + const y = event.clientY - rectRef.current.top; + onDragScroll({ x, y }); + } + } + React2.useEffect(() => { + const handleWheel = (event) => { + const element = event.target; + const isScrollbarWheel = scrollbar?.contains(element); + if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos); + }; + document.addEventListener("wheel", handleWheel, { passive: false }); + return () => document.removeEventListener("wheel", handleWheel, { passive: false }); + }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]); + React2.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]); + useResizeObserver(scrollbar, handleResize); + useResizeObserver(context.content, handleResize); + return /* @__PURE__ */ jsx( + ScrollbarProvider, + { + scope: __scopeScrollArea, + scrollbar, + hasThumb, + onThumbChange: useCallbackRef(onThumbChange), + onThumbPointerUp: useCallbackRef(onThumbPointerUp), + onThumbPositionChange: handleThumbPositionChange, + onThumbPointerDown: useCallbackRef(onThumbPointerDown), + children: /* @__PURE__ */ jsx( + Primitive.div, + { + ...scrollbarProps, + ref: composeRefs, + style: { position: "absolute", ...scrollbarProps.style }, + onPointerDown: composeEventHandlers(props.onPointerDown, (event) => { + const mainPointer = 0; + if (event.button === mainPointer) { + const element = event.target; + element.setPointerCapture(event.pointerId); + rectRef.current = scrollbar.getBoundingClientRect(); + prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect; + document.body.style.webkitUserSelect = "none"; + if (context.viewport) context.viewport.style.scrollBehavior = "auto"; + handleDragScroll(event); + } + }), + onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll), + onPointerUp: composeEventHandlers(props.onPointerUp, (event) => { + const element = event.target; + if (element.hasPointerCapture(event.pointerId)) { + element.releasePointerCapture(event.pointerId); + } + document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current; + if (context.viewport) context.viewport.style.scrollBehavior = ""; + rectRef.current = null; + }) + } + ) + } + ); +}); +var THUMB_NAME = "ScrollAreaThumb"; +var ScrollAreaThumb = React2.forwardRef( + (props, forwardedRef) => { + const { forceMount, ...thumbProps } = props; + const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) }); + } +); +var ScrollAreaThumbImpl = React2.forwardRef( + (props, forwardedRef) => { + const { __scopeScrollArea, style, ...thumbProps } = props; + const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea); + const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea); + const { onThumbPositionChange } = scrollbarContext; + const composedRef = useComposedRefs( + forwardedRef, + (node) => scrollbarContext.onThumbChange(node) + ); + const removeUnlinkedScrollListenerRef = React2.useRef(void 0); + const debounceScrollEnd = useDebounceCallback(() => { + if (removeUnlinkedScrollListenerRef.current) { + removeUnlinkedScrollListenerRef.current(); + removeUnlinkedScrollListenerRef.current = void 0; + } + }, 100); + React2.useEffect(() => { + const viewport = scrollAreaContext.viewport; + if (viewport) { + const handleScroll = () => { + debounceScrollEnd(); + if (!removeUnlinkedScrollListenerRef.current) { + const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange); + removeUnlinkedScrollListenerRef.current = listener; + onThumbPositionChange(); + } + }; + onThumbPositionChange(); + viewport.addEventListener("scroll", handleScroll); + return () => viewport.removeEventListener("scroll", handleScroll); + } + }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]); + return /* @__PURE__ */ jsx( + Primitive.div, + { + "data-state": scrollbarContext.hasThumb ? "visible" : "hidden", + ...thumbProps, + ref: composedRef, + style: { + width: "var(--radix-scroll-area-thumb-width)", + height: "var(--radix-scroll-area-thumb-height)", + ...style + }, + onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => { + const thumb = event.target; + const thumbRect = thumb.getBoundingClientRect(); + const x = event.clientX - thumbRect.left; + const y = event.clientY - thumbRect.top; + scrollbarContext.onThumbPointerDown({ x, y }); + }), + onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp) + } + ); + } +); +ScrollAreaThumb.displayName = THUMB_NAME; +var CORNER_NAME = "ScrollAreaCorner"; +var ScrollAreaCorner = React2.forwardRef( + (props, forwardedRef) => { + const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea); + const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY); + const hasCorner = context.type !== "scroll" && hasBothScrollbarsVisible; + return hasCorner ? /* @__PURE__ */ jsx(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null; + } +); +ScrollAreaCorner.displayName = CORNER_NAME; +var ScrollAreaCornerImpl = React2.forwardRef((props, forwardedRef) => { + const { __scopeScrollArea, ...cornerProps } = props; + const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea); + const [width, setWidth] = React2.useState(0); + const [height, setHeight] = React2.useState(0); + const hasSize = Boolean(width && height); + useResizeObserver(context.scrollbarX, () => { + const height2 = context.scrollbarX?.offsetHeight || 0; + context.onCornerHeightChange(height2); + setHeight(height2); + }); + useResizeObserver(context.scrollbarY, () => { + const width2 = context.scrollbarY?.offsetWidth || 0; + context.onCornerWidthChange(width2); + setWidth(width2); + }); + return hasSize ? /* @__PURE__ */ jsx( + Primitive.div, + { + ...cornerProps, + ref: forwardedRef, + style: { + width, + height, + position: "absolute", + right: context.dir === "ltr" ? 0 : void 0, + left: context.dir === "rtl" ? 0 : void 0, + bottom: 0, + ...props.style + } + } + ) : null; +}); +function toInt(value) { + return value ? parseInt(value, 10) : 0; +} +function getThumbRatio(viewportSize, contentSize) { + const ratio = viewportSize / contentSize; + return isNaN(ratio) ? 0 : ratio; +} +function getThumbSize(sizes) { + const ratio = getThumbRatio(sizes.viewport, sizes.content); + const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd; + const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio; + return Math.max(thumbSize, 18); +} +function getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = "ltr") { + const thumbSizePx = getThumbSize(sizes); + const thumbCenter = thumbSizePx / 2; + const offset = pointerOffset || thumbCenter; + const thumbOffsetFromEnd = thumbSizePx - offset; + const minPointerPos = sizes.scrollbar.paddingStart + offset; + const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd; + const maxScrollPos = sizes.content - sizes.viewport; + const scrollRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0]; + const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange); + return interpolate(pointerPos); +} +function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") { + const thumbSizePx = getThumbSize(sizes); + const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd; + const scrollbar = sizes.scrollbar.size - scrollbarPadding; + const maxScrollPos = sizes.content - sizes.viewport; + const maxThumbPos = scrollbar - thumbSizePx; + const scrollClampRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0]; + const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange); + const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]); + return interpolate(scrollWithoutMomentum); +} +function linearScale(input, output) { + return (value) => { + if (input[0] === input[1] || output[0] === output[1]) return output[0]; + const ratio = (output[1] - output[0]) / (input[1] - input[0]); + return output[0] + ratio * (value - input[0]); + }; +} +function isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) { + return scrollPos > 0 && scrollPos < maxScrollPos; +} +var addUnlinkedScrollListener = (node, handler = () => { +}) => { + let prevPosition = { left: node.scrollLeft, top: node.scrollTop }; + let rAF = 0; + (function loop() { + const position = { left: node.scrollLeft, top: node.scrollTop }; + const isHorizontalScroll = prevPosition.left !== position.left; + const isVerticalScroll = prevPosition.top !== position.top; + if (isHorizontalScroll || isVerticalScroll) handler(); + prevPosition = position; + rAF = window.requestAnimationFrame(loop); + })(); + return () => window.cancelAnimationFrame(rAF); +}; +function useDebounceCallback(callback, delay) { + const handleCallback = useCallbackRef(callback); + const debounceTimerRef = React2.useRef(0); + React2.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []); + return React2.useCallback(() => { + window.clearTimeout(debounceTimerRef.current); + debounceTimerRef.current = window.setTimeout(handleCallback, delay); + }, [handleCallback, delay]); +} +function useResizeObserver(element, onResize) { + const handleResize = useCallbackRef(onResize); + useLayoutEffect(() => { + let rAF = 0; + if (element) { + const resizeObserver = new ResizeObserver(() => { + cancelAnimationFrame(rAF); + rAF = window.requestAnimationFrame(handleResize); + }); + resizeObserver.observe(element); + return () => { + window.cancelAnimationFrame(rAF); + resizeObserver.unobserve(element); + }; + } + }, [element, handleResize]); +} +var Root = ScrollArea; +var Viewport = ScrollAreaViewport; +var Scrollbar = ScrollAreaScrollbar; +var Thumb = ScrollAreaThumb; +var Corner = ScrollAreaCorner; +export { + Corner, + Root, + ScrollArea, + ScrollAreaCorner, + ScrollAreaScrollbar, + ScrollAreaThumb, + ScrollAreaViewport, + Scrollbar, + Thumb, + Viewport, + createScrollAreaScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..8c8b60a88461603155eb6b16eaeee7351407503f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/scroll-area.tsx", "../src/use-state-machine.ts"], + "sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Presence } from '@radix-ui/react-presence';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { clamp } from '@radix-ui/number';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useStateMachine } from './use-state-machine';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Sizes = {\n content: number;\n viewport: number;\n scrollbar: {\n size: number;\n paddingStart: number;\n paddingEnd: number;\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollArea\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_AREA_NAME = 'ScrollArea';\n\ntype ScopedProps

= P & { __scopeScrollArea?: Scope };\nconst [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);\n\ntype ScrollAreaContextValue = {\n type: 'auto' | 'always' | 'scroll' | 'hover';\n dir: Direction;\n scrollHideDelay: number;\n scrollArea: ScrollAreaElement | null;\n viewport: ScrollAreaViewportElement | null;\n onViewportChange(viewport: ScrollAreaViewportElement | null): void;\n content: HTMLDivElement | null;\n onContentChange(content: HTMLDivElement): void;\n scrollbarX: ScrollAreaScrollbarElement | null;\n onScrollbarXChange(scrollbar: ScrollAreaScrollbarElement | null): void;\n scrollbarXEnabled: boolean;\n onScrollbarXEnabledChange(rendered: boolean): void;\n scrollbarY: ScrollAreaScrollbarElement | null;\n onScrollbarYChange(scrollbar: ScrollAreaScrollbarElement | null): void;\n scrollbarYEnabled: boolean;\n onScrollbarYEnabledChange(rendered: boolean): void;\n onCornerWidthChange(width: number): void;\n onCornerHeightChange(height: number): void;\n};\n\nconst [ScrollAreaProvider, useScrollAreaContext] =\n createScrollAreaContext(SCROLL_AREA_NAME);\n\ntype ScrollAreaElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface ScrollAreaProps extends PrimitiveDivProps {\n type?: ScrollAreaContextValue['type'];\n dir?: ScrollAreaContextValue['dir'];\n scrollHideDelay?: number;\n}\n\nconst ScrollArea = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeScrollArea,\n type = 'hover',\n dir,\n scrollHideDelay = 600,\n ...scrollAreaProps\n } = props;\n const [scrollArea, setScrollArea] = React.useState(null);\n const [viewport, setViewport] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const [scrollbarX, setScrollbarX] = React.useState(null);\n const [scrollbarY, setScrollbarY] = React.useState(null);\n const [cornerWidth, setCornerWidth] = React.useState(0);\n const [cornerHeight, setCornerHeight] = React.useState(0);\n const [scrollbarXEnabled, setScrollbarXEnabled] = React.useState(false);\n const [scrollbarYEnabled, setScrollbarYEnabled] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));\n const direction = useDirection(dir);\n\n return (\n \n \n \n );\n }\n);\n\nScrollArea.displayName = SCROLL_AREA_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaViewport\n * -----------------------------------------------------------------------------------------------*/\n\nconst VIEWPORT_NAME = 'ScrollAreaViewport';\n\ntype ScrollAreaViewportElement = React.ComponentRef;\ninterface ScrollAreaViewportProps extends PrimitiveDivProps {\n nonce?: string;\n}\n\nconst ScrollAreaViewport = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeScrollArea, children, nonce, ...viewportProps } = props;\n const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n return (\n <>\n {/* Hide scrollbars cross-browser and enable momentum scroll for touch devices */}\n \n

\n {children}\n
\n \n \n );\n }\n);\n\nScrollAreaViewport.displayName = VIEWPORT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaScrollbar\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLLBAR_NAME = 'ScrollAreaScrollbar';\n\ntype ScrollAreaScrollbarElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbar = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;\n const isHorizontal = props.orientation === 'horizontal';\n\n React.useEffect(() => {\n isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);\n return () => {\n isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);\n };\n }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);\n\n return context.type === 'hover' ? (\n \n ) : context.type === 'scroll' ? (\n \n ) : context.type === 'auto' ? (\n \n ) : context.type === 'always' ? (\n \n ) : null;\n }\n);\n\nScrollAreaScrollbar.displayName = SCROLLBAR_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarHoverElement = ScrollAreaScrollbarAutoElement;\ninterface ScrollAreaScrollbarHoverProps extends ScrollAreaScrollbarAutoProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarHover = React.forwardRef<\n ScrollAreaScrollbarHoverElement,\n ScrollAreaScrollbarHoverProps\n>((props: ScopedProps, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [visible, setVisible] = React.useState(false);\n\n React.useEffect(() => {\n const scrollArea = context.scrollArea;\n let hideTimer = 0;\n if (scrollArea) {\n const handlePointerEnter = () => {\n window.clearTimeout(hideTimer);\n setVisible(true);\n };\n const handlePointerLeave = () => {\n hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);\n };\n scrollArea.addEventListener('pointerenter', handlePointerEnter);\n scrollArea.addEventListener('pointerleave', handlePointerLeave);\n return () => {\n window.clearTimeout(hideTimer);\n scrollArea.removeEventListener('pointerenter', handlePointerEnter);\n scrollArea.removeEventListener('pointerleave', handlePointerLeave);\n };\n }\n }, [context.scrollArea, context.scrollHideDelay]);\n\n return (\n \n \n \n );\n});\n\ntype ScrollAreaScrollbarScrollElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarScrollProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarScroll = React.forwardRef<\n ScrollAreaScrollbarScrollElement,\n ScrollAreaScrollbarScrollProps\n>((props: ScopedProps, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const isHorizontal = props.orientation === 'horizontal';\n const debounceScrollEnd = useDebounceCallback(() => send('SCROLL_END'), 100);\n const [state, send] = useStateMachine('hidden', {\n hidden: {\n SCROLL: 'scrolling',\n },\n scrolling: {\n SCROLL_END: 'idle',\n POINTER_ENTER: 'interacting',\n },\n interacting: {\n SCROLL: 'interacting',\n POINTER_LEAVE: 'idle',\n },\n idle: {\n HIDE: 'hidden',\n SCROLL: 'scrolling',\n POINTER_ENTER: 'interacting',\n },\n });\n\n React.useEffect(() => {\n if (state === 'idle') {\n const hideTimer = window.setTimeout(() => send('HIDE'), context.scrollHideDelay);\n return () => window.clearTimeout(hideTimer);\n }\n }, [state, context.scrollHideDelay, send]);\n\n React.useEffect(() => {\n const viewport = context.viewport;\n const scrollDirection = isHorizontal ? 'scrollLeft' : 'scrollTop';\n\n if (viewport) {\n let prevScrollPos = viewport[scrollDirection];\n const handleScroll = () => {\n const scrollPos = viewport[scrollDirection];\n const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;\n if (hasScrollInDirectionChanged) {\n send('SCROLL');\n debounceScrollEnd();\n }\n prevScrollPos = scrollPos;\n };\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [context.viewport, isHorizontal, send, debounceScrollEnd]);\n\n return (\n \n send('POINTER_ENTER'))}\n onPointerLeave={composeEventHandlers(props.onPointerLeave, () => send('POINTER_LEAVE'))}\n />\n \n );\n});\n\ntype ScrollAreaScrollbarAutoElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarAutoProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarAuto = React.forwardRef<\n ScrollAreaScrollbarAutoElement,\n ScrollAreaScrollbarAutoProps\n>((props: ScopedProps, forwardedRef) => {\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { forceMount, ...scrollbarProps } = props;\n const [visible, setVisible] = React.useState(false);\n const isHorizontal = props.orientation === 'horizontal';\n const handleResize = useDebounceCallback(() => {\n if (context.viewport) {\n const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;\n const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;\n setVisible(isHorizontal ? isOverflowX : isOverflowY);\n }\n }, 10);\n\n useResizeObserver(context.viewport, handleResize);\n useResizeObserver(context.content, handleResize);\n\n return (\n \n \n \n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarVisibleElement = ScrollAreaScrollbarAxisElement;\ninterface ScrollAreaScrollbarVisibleProps\n extends Omit {\n orientation?: 'horizontal' | 'vertical';\n}\n\nconst ScrollAreaScrollbarVisible = React.forwardRef<\n ScrollAreaScrollbarVisibleElement,\n ScrollAreaScrollbarVisibleProps\n>((props: ScopedProps, forwardedRef) => {\n const { orientation = 'vertical', ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const thumbRef = React.useRef(null);\n const pointerOffsetRef = React.useRef(0);\n const [sizes, setSizes] = React.useState({\n content: 0,\n viewport: 0,\n scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 },\n });\n const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);\n\n type UncommonProps = 'onThumbPositionChange' | 'onDragScroll' | 'onWheelScroll';\n const commonProps: Omit = {\n ...scrollbarProps,\n sizes,\n onSizesChange: setSizes,\n hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),\n onThumbChange: (thumb) => (thumbRef.current = thumb),\n onThumbPointerUp: () => (pointerOffsetRef.current = 0),\n onThumbPointerDown: (pointerPos) => (pointerOffsetRef.current = pointerPos),\n };\n\n function getScrollPosition(pointerPos: number, dir?: Direction) {\n return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);\n }\n\n if (orientation === 'horizontal') {\n return (\n {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollLeft;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);\n thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;\n }\n }}\n onWheelScroll={(scrollPos) => {\n if (context.viewport) context.viewport.scrollLeft = scrollPos;\n }}\n onDragScroll={(pointerPos) => {\n if (context.viewport) {\n context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);\n }\n }}\n />\n );\n }\n\n if (orientation === 'vertical') {\n return (\n {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollTop;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes);\n thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;\n }\n }}\n onWheelScroll={(scrollPos) => {\n if (context.viewport) context.viewport.scrollTop = scrollPos;\n }}\n onDragScroll={(pointerPos) => {\n if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);\n }}\n />\n );\n }\n\n return null;\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarAxisPrivateProps = {\n hasThumb: boolean;\n sizes: Sizes;\n onSizesChange(sizes: Sizes): void;\n onThumbChange(thumb: ScrollAreaThumbElement | null): void;\n onThumbPointerDown(pointerPos: number): void;\n onThumbPointerUp(): void;\n onThumbPositionChange(): void;\n onWheelScroll(scrollPos: number): void;\n onDragScroll(pointerPos: number): void;\n};\n\ntype ScrollAreaScrollbarAxisElement = ScrollAreaScrollbarImplElement;\ninterface ScrollAreaScrollbarAxisProps\n extends Omit,\n ScrollAreaScrollbarAxisPrivateProps {}\n\nconst ScrollAreaScrollbarX = React.forwardRef<\n ScrollAreaScrollbarAxisElement,\n ScrollAreaScrollbarAxisProps\n>((props: ScopedProps, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React.useState();\n const ref = React.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);\n\n React.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n\n return (\n props.onThumbPointerDown(pointerPos.x)}\n onDragScroll={(pointerPos) => props.onDragScroll(pointerPos.x)}\n onWheelScroll={(event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollLeft + event.deltaX;\n props.onWheelScroll(scrollPos);\n // prevent window scroll when wheeling on scrollbar\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n }}\n onResize={() => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollWidth,\n viewport: context.viewport.offsetWidth,\n scrollbar: {\n size: ref.current.clientWidth,\n paddingStart: toInt(computedStyle.paddingLeft),\n paddingEnd: toInt(computedStyle.paddingRight),\n },\n });\n }\n }}\n />\n );\n});\n\nconst ScrollAreaScrollbarY = React.forwardRef<\n ScrollAreaScrollbarAxisElement,\n ScrollAreaScrollbarAxisProps\n>((props: ScopedProps, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React.useState();\n const ref = React.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);\n\n React.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n\n return (\n props.onThumbPointerDown(pointerPos.y)}\n onDragScroll={(pointerPos) => props.onDragScroll(pointerPos.y)}\n onWheelScroll={(event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollTop + event.deltaY;\n props.onWheelScroll(scrollPos);\n // prevent window scroll when wheeling on scrollbar\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n }}\n onResize={() => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollHeight,\n viewport: context.viewport.offsetHeight,\n scrollbar: {\n size: ref.current.clientHeight,\n paddingStart: toInt(computedStyle.paddingTop),\n paddingEnd: toInt(computedStyle.paddingBottom),\n },\n });\n }\n }}\n />\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollbarContext = {\n hasThumb: boolean;\n scrollbar: ScrollAreaScrollbarElement | null;\n onThumbChange(thumb: ScrollAreaThumbElement | null): void;\n onThumbPointerUp(): void;\n onThumbPointerDown(pointerPos: { x: number; y: number }): void;\n onThumbPositionChange(): void;\n};\n\nconst [ScrollbarProvider, useScrollbarContext] =\n createScrollAreaContext(SCROLLBAR_NAME);\n\ntype ScrollAreaScrollbarImplElement = React.ComponentRef;\ntype ScrollAreaScrollbarImplPrivateProps = {\n sizes: Sizes;\n hasThumb: boolean;\n onThumbChange: ScrollbarContext['onThumbChange'];\n onThumbPointerUp: ScrollbarContext['onThumbPointerUp'];\n onThumbPointerDown: ScrollbarContext['onThumbPointerDown'];\n onThumbPositionChange: ScrollbarContext['onThumbPositionChange'];\n onWheelScroll(event: WheelEvent, maxScrollPos: number): void;\n onDragScroll(pointerPos: { x: number; y: number }): void;\n onResize(): void;\n};\ninterface ScrollAreaScrollbarImplProps\n extends Omit,\n ScrollAreaScrollbarImplPrivateProps {}\n\nconst ScrollAreaScrollbarImpl = React.forwardRef<\n ScrollAreaScrollbarImplElement,\n ScrollAreaScrollbarImplProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n __scopeScrollArea,\n sizes,\n hasThumb,\n onThumbChange,\n onThumbPointerUp,\n onThumbPointerDown,\n onThumbPositionChange,\n onDragScroll,\n onWheelScroll,\n onResize,\n ...scrollbarProps\n } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);\n const [scrollbar, setScrollbar] = React.useState(null);\n const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));\n const rectRef = React.useRef(null);\n const prevWebkitUserSelectRef = React.useRef('');\n const viewport = context.viewport;\n const maxScrollPos = sizes.content - sizes.viewport;\n const handleWheelScroll = useCallbackRef(onWheelScroll);\n const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);\n const handleResize = useDebounceCallback(onResize, 10);\n\n function handleDragScroll(event: React.PointerEvent) {\n if (rectRef.current) {\n const x = event.clientX - rectRef.current.left;\n const y = event.clientY - rectRef.current.top;\n onDragScroll({ x, y });\n }\n }\n\n /**\n * We bind wheel event imperatively so we can switch off passive\n * mode for document wheel event to allow it to be prevented\n */\n React.useEffect(() => {\n const handleWheel = (event: WheelEvent) => {\n const element = event.target as HTMLElement;\n const isScrollbarWheel = scrollbar?.contains(element);\n if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);\n };\n document.addEventListener('wheel', handleWheel, { passive: false });\n return () => document.removeEventListener('wheel', handleWheel, { passive: false } as any);\n }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);\n\n /**\n * Update thumb position on sizes change\n */\n React.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);\n\n useResizeObserver(scrollbar, handleResize);\n useResizeObserver(context.content, handleResize);\n\n return (\n \n {\n const mainPointer = 0;\n if (event.button === mainPointer) {\n const element = event.target as HTMLElement;\n element.setPointerCapture(event.pointerId);\n rectRef.current = scrollbar!.getBoundingClientRect();\n // pointer capture doesn't prevent text selection in Safari\n // so we remove text selection manually when scrolling\n prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;\n document.body.style.webkitUserSelect = 'none';\n if (context.viewport) context.viewport.style.scrollBehavior = 'auto';\n handleDragScroll(event);\n }\n })}\n onPointerMove={composeEventHandlers(props.onPointerMove, handleDragScroll)}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n const element = event.target as HTMLElement;\n if (element.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId);\n }\n document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;\n if (context.viewport) context.viewport.style.scrollBehavior = '';\n rectRef.current = null;\n })}\n />\n \n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaThumb\n * -----------------------------------------------------------------------------------------------*/\n\nconst THUMB_NAME = 'ScrollAreaThumb';\n\ntype ScrollAreaThumbElement = ScrollAreaThumbImplElement;\ninterface ScrollAreaThumbProps extends ScrollAreaThumbImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst ScrollAreaThumb = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { forceMount, ...thumbProps } = props;\n const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);\n return (\n \n \n \n );\n }\n);\n\ntype ScrollAreaThumbImplElement = React.ComponentRef;\ninterface ScrollAreaThumbImplProps extends PrimitiveDivProps {}\n\nconst ScrollAreaThumbImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeScrollArea, style, ...thumbProps } = props;\n const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);\n const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);\n const { onThumbPositionChange } = scrollbarContext;\n const composedRef = useComposedRefs(forwardedRef, (node) =>\n scrollbarContext.onThumbChange(node)\n );\n const removeUnlinkedScrollListenerRef = React.useRef<() => void>(undefined);\n const debounceScrollEnd = useDebounceCallback(() => {\n if (removeUnlinkedScrollListenerRef.current) {\n removeUnlinkedScrollListenerRef.current();\n removeUnlinkedScrollListenerRef.current = undefined;\n }\n }, 100);\n\n React.useEffect(() => {\n const viewport = scrollAreaContext.viewport;\n if (viewport) {\n /**\n * We only bind to native scroll event so we know when scroll starts and ends.\n * When scroll starts we start a requestAnimationFrame loop that checks for\n * changes to scroll position. That rAF loop triggers our thumb position change\n * when relevant to avoid scroll-linked effects. We cancel the loop when scroll ends.\n * https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects\n */\n const handleScroll = () => {\n debounceScrollEnd();\n if (!removeUnlinkedScrollListenerRef.current) {\n const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);\n removeUnlinkedScrollListenerRef.current = listener;\n onThumbPositionChange();\n }\n };\n onThumbPositionChange();\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);\n\n return (\n {\n const thumb = event.target as HTMLElement;\n const thumbRect = thumb.getBoundingClientRect();\n const x = event.clientX - thumbRect.left;\n const y = event.clientY - thumbRect.top;\n scrollbarContext.onThumbPointerDown({ x, y });\n })}\n onPointerUp={composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)}\n />\n );\n }\n);\n\nScrollAreaThumb.displayName = THUMB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaCorner\n * -----------------------------------------------------------------------------------------------*/\n\nconst CORNER_NAME = 'ScrollAreaCorner';\n\ntype ScrollAreaCornerElement = ScrollAreaCornerImplElement;\ninterface ScrollAreaCornerProps extends ScrollAreaCornerImplProps {}\n\nconst ScrollAreaCorner = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);\n const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);\n const hasCorner = context.type !== 'scroll' && hasBothScrollbarsVisible;\n return hasCorner ? : null;\n }\n);\n\nScrollAreaCorner.displayName = CORNER_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaCornerImplElement = React.ComponentRef;\ninterface ScrollAreaCornerImplProps extends PrimitiveDivProps {}\n\nconst ScrollAreaCornerImpl = React.forwardRef<\n ScrollAreaCornerImplElement,\n ScrollAreaCornerImplProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeScrollArea, ...cornerProps } = props;\n const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);\n const [width, setWidth] = React.useState(0);\n const [height, setHeight] = React.useState(0);\n const hasSize = Boolean(width && height);\n\n useResizeObserver(context.scrollbarX, () => {\n const height = context.scrollbarX?.offsetHeight || 0;\n context.onCornerHeightChange(height);\n setHeight(height);\n });\n\n useResizeObserver(context.scrollbarY, () => {\n const width = context.scrollbarY?.offsetWidth || 0;\n context.onCornerWidthChange(width);\n setWidth(width);\n });\n\n return hasSize ? (\n \n ) : null;\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction toInt(value?: string) {\n return value ? parseInt(value, 10) : 0;\n}\n\nfunction getThumbRatio(viewportSize: number, contentSize: number) {\n const ratio = viewportSize / contentSize;\n return isNaN(ratio) ? 0 : ratio;\n}\n\nfunction getThumbSize(sizes: Sizes) {\n const ratio = getThumbRatio(sizes.viewport, sizes.content);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;\n // minimum of 18 matches macOS minimum\n return Math.max(thumbSize, 18);\n}\n\nfunction getScrollPositionFromPointer(\n pointerPos: number,\n pointerOffset: number,\n sizes: Sizes,\n dir: Direction = 'ltr'\n) {\n const thumbSizePx = getThumbSize(sizes);\n const thumbCenter = thumbSizePx / 2;\n const offset = pointerOffset || thumbCenter;\n const thumbOffsetFromEnd = thumbSizePx - offset;\n const minPointerPos = sizes.scrollbar.paddingStart + offset;\n const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;\n const maxScrollPos = sizes.content - sizes.viewport;\n const scrollRange = dir === 'ltr' ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange as [number, number]);\n return interpolate(pointerPos);\n}\n\nfunction getThumbOffsetFromScroll(scrollPos: number, sizes: Sizes, dir: Direction = 'ltr') {\n const thumbSizePx = getThumbSize(sizes);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const scrollbar = sizes.scrollbar.size - scrollbarPadding;\n const maxScrollPos = sizes.content - sizes.viewport;\n const maxThumbPos = scrollbar - thumbSizePx;\n const scrollClampRange = dir === 'ltr' ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange as [number, number]);\n const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);\n return interpolate(scrollWithoutMomentum);\n}\n\n// https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js\nfunction linearScale(input: readonly [number, number], output: readonly [number, number]) {\n return (value: number) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\n\nfunction isScrollingWithinScrollbarBounds(scrollPos: number, maxScrollPos: number) {\n return scrollPos > 0 && scrollPos < maxScrollPos;\n}\n\n// Custom scroll handler to avoid scroll-linked effects\n// https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects\nconst addUnlinkedScrollListener = (node: HTMLElement, handler = () => {}) => {\n let prevPosition = { left: node.scrollLeft, top: node.scrollTop };\n let rAF = 0;\n (function loop() {\n const position = { left: node.scrollLeft, top: node.scrollTop };\n const isHorizontalScroll = prevPosition.left !== position.left;\n const isVerticalScroll = prevPosition.top !== position.top;\n if (isHorizontalScroll || isVerticalScroll) handler();\n prevPosition = position;\n rAF = window.requestAnimationFrame(loop);\n })();\n return () => window.cancelAnimationFrame(rAF);\n};\n\nfunction useDebounceCallback(callback: () => void, delay: number) {\n const handleCallback = useCallbackRef(callback);\n const debounceTimerRef = React.useRef(0);\n React.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);\n return React.useCallback(() => {\n window.clearTimeout(debounceTimerRef.current);\n debounceTimerRef.current = window.setTimeout(handleCallback, delay);\n }, [handleCallback, delay]);\n}\n\nfunction useResizeObserver(element: HTMLElement | null, onResize: () => void) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n /**\n * Resize Observer will throw an often benign error that says `ResizeObserver loop\n * completed with undelivered notifications`. This means that ResizeObserver was not\n * able to deliver all observations within a single animation frame, so we use\n * `requestAnimationFrame` to ensure we don't deliver unnecessary observations.\n * Further reading: https://github.com/WICG/resize-observer/issues/38\n */\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = ScrollArea;\nconst Viewport = ScrollAreaViewport;\nconst Scrollbar = ScrollAreaScrollbar;\nconst Thumb = ScrollAreaThumb;\nconst Corner = ScrollAreaCorner;\n\nexport {\n createScrollAreaScope,\n //\n ScrollArea,\n ScrollAreaViewport,\n ScrollAreaScrollbar,\n ScrollAreaThumb,\n ScrollAreaCorner,\n //\n Root,\n Viewport,\n Scrollbar,\n Thumb,\n Corner,\n};\nexport type {\n ScrollAreaProps,\n ScrollAreaViewportProps,\n ScrollAreaScrollbarProps,\n ScrollAreaThumbProps,\n ScrollAreaCornerProps,\n};\n", "import * as React from 'react';\n\ntype Machine = { [k: string]: { [k: string]: S } };\ntype MachineState = keyof T;\ntype MachineEvent = keyof UnionToIntersection;\n\n// \uD83E\uDD2F https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection = (T extends any ? (x: T) => any : never) extends (x: infer R) => any\n ? R\n : never;\n\nexport function useStateMachine(\n initialState: MachineState,\n machine: M & Machine>\n) {\n return React.useReducer((state: MachineState, event: MachineEvent): MachineState => {\n const nextState = (machine[state] as any)[event];\n return nextState ?? state;\n }, initialState);\n}\n"], + "mappings": ";;;AAAA,YAAYA,YAAW;AACvB,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,aAAa;AACtB,SAAS,4BAA4B;;;ACTrC,YAAY,WAAW;AAWhB,SAAS,gBACd,cACA,SACA;AACA,SAAa,iBAAW,CAAC,OAAwB,UAA4C;AAC3F,UAAM,YAAa,QAAQ,KAAK,EAAU,KAAK;AAC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AAI;AAAA,EACzC,GAAG;AACH,SAAO,MAAM,OAAO,qBAAqB,GAAG;AAC9C;AAEA,SAAS,oBAAoB,UAAsB,OAAe;AAChE,QAAM,iBAAiB,eAAe,QAAQ;AAC9C,QAAM,mBAAyB,cAAO,CAAC;AACvC,EAAM,iBAAU,MAAM,MAAM,OAAO,aAAa,iBAAiB,OAAO,GAAG,CAAC,CAAC;AAC7E,SAAa,mBAAY,MAAM;AAC7B,WAAO,aAAa,iBAAiB,OAAO;AAC5C,qBAAiB,UAAU,OAAO,WAAW,gBAAgB,KAAK;AAAA,EACpE,GAAG,CAAC,gBAAgB,KAAK,CAAC;AAC5B;AAEA,SAAS,kBAAkB,SAA6B,UAAsB;AAC5E,QAAM,eAAe,eAAe,QAAQ;AAC5C,kBAAgB,MAAM;AACpB,QAAI,MAAM;AACV,QAAI,SAAS;AAQX,YAAM,iBAAiB,IAAI,eAAe,MAAM;AAC9C,6BAAqB,GAAG;AACxB,cAAM,OAAO,sBAAsB,YAAY;AAAA,MACjD,CAAC;AACD,qBAAe,QAAQ,OAAO;AAC9B,aAAO,MAAM;AACX,eAAO,qBAAqB,GAAG;AAC/B,uBAAe,UAAU,OAAO;AAAA,MAClC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,SAAS,YAAY,CAAC;AAC5B;AAIA,IAAM,OAAO;AACb,IAAM,WAAW;AACjB,IAAM,YAAY;AAClB,IAAM,QAAQ;AACd,IAAM,SAAS;", + "names": ["React", "height", "width"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/package.json b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0990fa1e52604f6e65c52ac887f66d405b947f0e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-scroll-area@1.2.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+_2e614ac8548e2000739f579d724174b7/node_modules/@radix-ui/react-scroll-area/package.json @@ -0,0 +1,76 @@ +{ + "name": "@radix-ui/react-scroll-area", + "version": "1.2.10", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/number": "1.1.1", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-use-layout-effect": "1.1.1", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-callback-ref": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/builder": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/LICENSE b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/README.md b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2eed12ca63174f987e3b13f8b2fa04eabe8fa17d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/README.md @@ -0,0 +1,3 @@ +# `react-select` + +View docs [here](https://radix-ui.com/primitives/docs/components/select). diff --git a/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f257b6090627d72c04d0537851a8655ea2a0ece0 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.d.mts @@ -0,0 +1,137 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import { FocusScope } from '@radix-ui/react-focus-scope'; +import * as PopperPrimitive from '@radix-ui/react-popper'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; + +type Direction = 'ltr' | 'rtl'; +declare const createSelectScope: _radix_ui_react_context.CreateScope; +interface SelectSharedProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; + dir?: Direction; + name?: string; + autoComplete?: string; + disabled?: boolean; + required?: boolean; + form?: string; +} +type SelectProps = SelectSharedProps & { + value?: string; + defaultValue?: string; + onValueChange?(value: string): void; +}; +declare const Select: React.FC; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface SelectTriggerProps extends PrimitiveButtonProps { +} +declare const SelectTrigger: React.ForwardRefExoticComponent>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface SelectValueProps extends Omit { + placeholder?: React.ReactNode; +} +declare const SelectValue: React.ForwardRefExoticComponent>; +interface SelectIconProps extends PrimitiveSpanProps { +} +declare const SelectIcon: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface SelectPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; +} +declare const SelectPortal: React.FC; +interface SelectContentProps extends SelectContentImplProps { +} +declare const SelectContent: React.ForwardRefExoticComponent>; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type FocusScopeProps = React.ComponentPropsWithoutRef; +type SelectPopperPrivateProps = { + onPlaced?: PopperContentProps['onPlaced']; +}; +interface SelectContentImplProps extends Omit, Omit { + /** + * Event handler called when auto-focusing on close. + * Can be prevented. + */ + onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']; + /** + * Event handler called when the escape key is down. + * Can be prevented. + */ + onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; + /** + * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`. + * Can be prevented. + */ + onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside']; + position?: 'item-aligned' | 'popper'; +} +interface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps { +} +type PopperContentProps = React.ComponentPropsWithoutRef; +interface SelectPopperPositionProps extends PopperContentProps, SelectPopperPrivateProps { +} +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface SelectViewportProps extends PrimitiveDivProps { + nonce?: string; +} +declare const SelectViewport: React.ForwardRefExoticComponent>; +interface SelectGroupProps extends PrimitiveDivProps { +} +declare const SelectGroup: React.ForwardRefExoticComponent>; +interface SelectLabelProps extends PrimitiveDivProps { +} +declare const SelectLabel: React.ForwardRefExoticComponent>; +interface SelectItemProps extends PrimitiveDivProps { + value: string; + disabled?: boolean; + textValue?: string; +} +declare const SelectItem: React.ForwardRefExoticComponent>; +interface SelectItemTextProps extends PrimitiveSpanProps { +} +declare const SelectItemText: React.ForwardRefExoticComponent>; +interface SelectItemIndicatorProps extends PrimitiveSpanProps { +} +declare const SelectItemIndicator: React.ForwardRefExoticComponent>; +interface SelectScrollUpButtonProps extends Omit { +} +declare const SelectScrollUpButton: React.ForwardRefExoticComponent>; +interface SelectScrollDownButtonProps extends Omit { +} +declare const SelectScrollDownButton: React.ForwardRefExoticComponent>; +interface SelectScrollButtonImplProps extends PrimitiveDivProps { + onAutoScroll(): void; +} +interface SelectSeparatorProps extends PrimitiveDivProps { +} +declare const SelectSeparator: React.ForwardRefExoticComponent>; +type PopperArrowProps = React.ComponentPropsWithoutRef; +interface SelectArrowProps extends PopperArrowProps { +} +declare const SelectArrow: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Value: React.ForwardRefExoticComponent>; +declare const Icon: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Viewport: React.ForwardRefExoticComponent>; +declare const Group: React.ForwardRefExoticComponent>; +declare const Label: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const ItemText: React.ForwardRefExoticComponent>; +declare const ItemIndicator: React.ForwardRefExoticComponent>; +declare const ScrollUpButton: React.ForwardRefExoticComponent>; +declare const ScrollDownButton: React.ForwardRefExoticComponent>; +declare const Separator: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; + +export { Arrow, Content, Group, Icon, Item, ItemIndicator, ItemText, Label, Portal, Root, ScrollDownButton, ScrollUpButton, Select, SelectArrow, type SelectArrowProps, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectIcon, type SelectIconProps, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectLabel, type SelectLabelProps, SelectPortal, type SelectPortalProps, type SelectProps, SelectScrollDownButton, type SelectScrollDownButtonProps, SelectScrollUpButton, type SelectScrollUpButtonProps, SelectSeparator, type SelectSeparatorProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, SelectViewport, type SelectViewportProps, Separator, Trigger, Value, Viewport, createSelectScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f257b6090627d72c04d0537851a8655ea2a0ece0 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.d.ts @@ -0,0 +1,137 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import { FocusScope } from '@radix-ui/react-focus-scope'; +import * as PopperPrimitive from '@radix-ui/react-popper'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; + +type Direction = 'ltr' | 'rtl'; +declare const createSelectScope: _radix_ui_react_context.CreateScope; +interface SelectSharedProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; + dir?: Direction; + name?: string; + autoComplete?: string; + disabled?: boolean; + required?: boolean; + form?: string; +} +type SelectProps = SelectSharedProps & { + value?: string; + defaultValue?: string; + onValueChange?(value: string): void; +}; +declare const Select: React.FC; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface SelectTriggerProps extends PrimitiveButtonProps { +} +declare const SelectTrigger: React.ForwardRefExoticComponent>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface SelectValueProps extends Omit { + placeholder?: React.ReactNode; +} +declare const SelectValue: React.ForwardRefExoticComponent>; +interface SelectIconProps extends PrimitiveSpanProps { +} +declare const SelectIcon: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface SelectPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; +} +declare const SelectPortal: React.FC; +interface SelectContentProps extends SelectContentImplProps { +} +declare const SelectContent: React.ForwardRefExoticComponent>; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type FocusScopeProps = React.ComponentPropsWithoutRef; +type SelectPopperPrivateProps = { + onPlaced?: PopperContentProps['onPlaced']; +}; +interface SelectContentImplProps extends Omit, Omit { + /** + * Event handler called when auto-focusing on close. + * Can be prevented. + */ + onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']; + /** + * Event handler called when the escape key is down. + * Can be prevented. + */ + onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; + /** + * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`. + * Can be prevented. + */ + onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside']; + position?: 'item-aligned' | 'popper'; +} +interface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps { +} +type PopperContentProps = React.ComponentPropsWithoutRef; +interface SelectPopperPositionProps extends PopperContentProps, SelectPopperPrivateProps { +} +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface SelectViewportProps extends PrimitiveDivProps { + nonce?: string; +} +declare const SelectViewport: React.ForwardRefExoticComponent>; +interface SelectGroupProps extends PrimitiveDivProps { +} +declare const SelectGroup: React.ForwardRefExoticComponent>; +interface SelectLabelProps extends PrimitiveDivProps { +} +declare const SelectLabel: React.ForwardRefExoticComponent>; +interface SelectItemProps extends PrimitiveDivProps { + value: string; + disabled?: boolean; + textValue?: string; +} +declare const SelectItem: React.ForwardRefExoticComponent>; +interface SelectItemTextProps extends PrimitiveSpanProps { +} +declare const SelectItemText: React.ForwardRefExoticComponent>; +interface SelectItemIndicatorProps extends PrimitiveSpanProps { +} +declare const SelectItemIndicator: React.ForwardRefExoticComponent>; +interface SelectScrollUpButtonProps extends Omit { +} +declare const SelectScrollUpButton: React.ForwardRefExoticComponent>; +interface SelectScrollDownButtonProps extends Omit { +} +declare const SelectScrollDownButton: React.ForwardRefExoticComponent>; +interface SelectScrollButtonImplProps extends PrimitiveDivProps { + onAutoScroll(): void; +} +interface SelectSeparatorProps extends PrimitiveDivProps { +} +declare const SelectSeparator: React.ForwardRefExoticComponent>; +type PopperArrowProps = React.ComponentPropsWithoutRef; +interface SelectArrowProps extends PopperArrowProps { +} +declare const SelectArrow: React.ForwardRefExoticComponent>; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Value: React.ForwardRefExoticComponent>; +declare const Icon: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Viewport: React.ForwardRefExoticComponent>; +declare const Group: React.ForwardRefExoticComponent>; +declare const Label: React.ForwardRefExoticComponent>; +declare const Item: React.ForwardRefExoticComponent>; +declare const ItemText: React.ForwardRefExoticComponent>; +declare const ItemIndicator: React.ForwardRefExoticComponent>; +declare const ScrollUpButton: React.ForwardRefExoticComponent>; +declare const ScrollDownButton: React.ForwardRefExoticComponent>; +declare const Separator: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; + +export { Arrow, Content, Group, Icon, Item, ItemIndicator, ItemText, Label, Portal, Root, ScrollDownButton, ScrollUpButton, Select, SelectArrow, type SelectArrowProps, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectIcon, type SelectIconProps, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectLabel, type SelectLabelProps, SelectPortal, type SelectPortalProps, type SelectProps, SelectScrollDownButton, type SelectScrollDownButtonProps, SelectScrollUpButton, type SelectScrollUpButtonProps, SelectSeparator, type SelectSeparatorProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, SelectViewport, type SelectViewportProps, Separator, Trigger, Value, Viewport, createSelectScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.js b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..dc37ac4a018a086c4244a09a67215dbaa9b4de65 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.js @@ -0,0 +1,1228 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Arrow: () => Arrow2, + Content: () => Content2, + Group: () => Group, + Icon: () => Icon, + Item: () => Item, + ItemIndicator: () => ItemIndicator, + ItemText: () => ItemText, + Label: () => Label, + Portal: () => Portal, + Root: () => Root2, + ScrollDownButton: () => ScrollDownButton, + ScrollUpButton: () => ScrollUpButton, + Select: () => Select, + SelectArrow: () => SelectArrow, + SelectContent: () => SelectContent, + SelectGroup: () => SelectGroup, + SelectIcon: () => SelectIcon, + SelectItem: () => SelectItem, + SelectItemIndicator: () => SelectItemIndicator, + SelectItemText: () => SelectItemText, + SelectLabel: () => SelectLabel, + SelectPortal: () => SelectPortal, + SelectScrollDownButton: () => SelectScrollDownButton, + SelectScrollUpButton: () => SelectScrollUpButton, + SelectSeparator: () => SelectSeparator, + SelectTrigger: () => SelectTrigger, + SelectValue: () => SelectValue, + SelectViewport: () => SelectViewport, + Separator: () => Separator, + Trigger: () => Trigger, + Value: () => Value, + Viewport: () => Viewport, + createSelectScope: () => createSelectScope +}); +module.exports = __toCommonJS(index_exports); + +// src/select.tsx +var React = __toESM(require("react")); +var ReactDOM = __toESM(require("react-dom")); +var import_number = require("@radix-ui/number"); +var import_primitive = require("@radix-ui/primitive"); +var import_react_collection = require("@radix-ui/react-collection"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_direction = require("@radix-ui/react-direction"); +var import_react_dismissable_layer = require("@radix-ui/react-dismissable-layer"); +var import_react_focus_guards = require("@radix-ui/react-focus-guards"); +var import_react_focus_scope = require("@radix-ui/react-focus-scope"); +var import_react_id = require("@radix-ui/react-id"); +var PopperPrimitive = __toESM(require("@radix-ui/react-popper")); +var import_react_popper = require("@radix-ui/react-popper"); +var import_react_portal = require("@radix-ui/react-portal"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_slot = require("@radix-ui/react-slot"); +var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect"); +var import_react_use_previous = require("@radix-ui/react-use-previous"); +var import_react_visually_hidden = require("@radix-ui/react-visually-hidden"); +var import_aria_hidden = require("aria-hidden"); +var import_react_remove_scroll = require("react-remove-scroll"); +var import_jsx_runtime = require("react/jsx-runtime"); +var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"]; +var SELECTION_KEYS = [" ", "Enter"]; +var SELECT_NAME = "Select"; +var [Collection, useCollection, createCollectionScope] = (0, import_react_collection.createCollection)(SELECT_NAME); +var [createSelectContext, createSelectScope] = (0, import_react_context.createContextScope)(SELECT_NAME, [ + createCollectionScope, + import_react_popper.createPopperScope +]); +var usePopperScope = (0, import_react_popper.createPopperScope)(); +var [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME); +var [SelectNativeOptionsProvider, useSelectNativeOptionsContext] = createSelectContext(SELECT_NAME); +var Select = (props) => { + const { + __scopeSelect, + children, + open: openProp, + defaultOpen, + onOpenChange, + value: valueProp, + defaultValue, + onValueChange, + dir, + name, + autoComplete, + disabled, + required, + form + } = props; + const popperScope = usePopperScope(__scopeSelect); + const [trigger, setTrigger] = React.useState(null); + const [valueNode, setValueNode] = React.useState(null); + const [valueNodeHasChildren, setValueNodeHasChildren] = React.useState(false); + const direction = (0, import_react_direction.useDirection)(dir); + const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: SELECT_NAME + }); + const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({ + prop: valueProp, + defaultProp: defaultValue, + onChange: onValueChange, + caller: SELECT_NAME + }); + const triggerPointerDownPosRef = React.useRef(null); + const isFormControl = trigger ? form || !!trigger.closest("form") : true; + const [nativeOptionsSet, setNativeOptionsSet] = React.useState(/* @__PURE__ */ new Set()); + const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";"); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)( + SelectProvider, + { + required, + scope: __scopeSelect, + trigger, + onTriggerChange: setTrigger, + valueNode, + onValueNodeChange: setValueNode, + valueNodeHasChildren, + onValueNodeHasChildrenChange: setValueNodeHasChildren, + contentId: (0, import_react_id.useId)(), + value, + onValueChange: setValue, + open, + onOpenChange: setOpen, + dir: direction, + triggerPointerDownPosRef, + disabled, + children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SelectNativeOptionsProvider, + { + scope: props.__scopeSelect, + onNativeOptionAdd: React.useCallback((option) => { + setNativeOptionsSet((prev) => new Set(prev).add(option)); + }, []), + onNativeOptionRemove: React.useCallback((option) => { + setNativeOptionsSet((prev) => { + const optionsSet = new Set(prev); + optionsSet.delete(option); + return optionsSet; + }); + }, []), + children + } + ) }), + isFormControl ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)( + SelectBubbleInput, + { + "aria-hidden": true, + required, + tabIndex: -1, + name, + autoComplete, + value, + onChange: (event) => setValue(event.target.value), + disabled, + form, + children: [ + value === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "" }) : null, + Array.from(nativeOptionsSet) + ] + }, + nativeSelectKey + ) : null + ] + } + ) }); +}; +Select.displayName = SELECT_NAME; +var TRIGGER_NAME = "SelectTrigger"; +var SelectTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, disabled = false, ...triggerProps } = props; + const popperScope = usePopperScope(__scopeSelect); + const context = useSelectContext(TRIGGER_NAME, __scopeSelect); + const isDisabled = context.disabled || disabled; + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.onTriggerChange); + const getItems = useCollection(__scopeSelect); + const pointerTypeRef = React.useRef("touch"); + const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => { + const enabledItems = getItems().filter((item) => !item.disabled); + const currentItem = enabledItems.find((item) => item.value === context.value); + const nextItem = findNextItem(enabledItems, search, currentItem); + if (nextItem !== void 0) { + context.onValueChange(nextItem.value); + } + }); + const handleOpen = (pointerEvent) => { + if (!isDisabled) { + context.onOpenChange(true); + resetTypeahead(); + } + if (pointerEvent) { + context.triggerPointerDownPosRef.current = { + x: Math.round(pointerEvent.pageX), + y: Math.round(pointerEvent.pageY) + }; + } + }; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + role: "combobox", + "aria-controls": context.contentId, + "aria-expanded": context.open, + "aria-required": context.required, + "aria-autocomplete": "none", + dir: context.dir, + "data-state": context.open ? "open" : "closed", + disabled: isDisabled, + "data-disabled": isDisabled ? "" : void 0, + "data-placeholder": shouldShowPlaceholder(context.value) ? "" : void 0, + ...triggerProps, + ref: composedRefs, + onClick: (0, import_primitive.composeEventHandlers)(triggerProps.onClick, (event) => { + event.currentTarget.focus(); + if (pointerTypeRef.current !== "mouse") { + handleOpen(event); + } + }), + onPointerDown: (0, import_primitive.composeEventHandlers)(triggerProps.onPointerDown, (event) => { + pointerTypeRef.current = event.pointerType; + const target = event.target; + if (target.hasPointerCapture(event.pointerId)) { + target.releasePointerCapture(event.pointerId); + } + if (event.button === 0 && event.ctrlKey === false && event.pointerType === "mouse") { + handleOpen(event); + event.preventDefault(); + } + }), + onKeyDown: (0, import_primitive.composeEventHandlers)(triggerProps.onKeyDown, (event) => { + const isTypingAhead = searchRef.current !== ""; + const isModifierKey = event.ctrlKey || event.altKey || event.metaKey; + if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key); + if (isTypingAhead && event.key === " ") return; + if (OPEN_KEYS.includes(event.key)) { + handleOpen(); + event.preventDefault(); + } + }) + } + ) }); + } +); +SelectTrigger.displayName = TRIGGER_NAME; +var VALUE_NAME = "SelectValue"; +var SelectValue = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props; + const context = useSelectContext(VALUE_NAME, __scopeSelect); + const { onValueNodeHasChildrenChange } = context; + const hasChildren = children !== void 0; + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.onValueNodeChange); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + onValueNodeHasChildrenChange(hasChildren); + }, [onValueNodeHasChildrenChange, hasChildren]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.span, + { + ...valueProps, + ref: composedRefs, + style: { pointerEvents: "none" }, + children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: placeholder }) : children + } + ); + } +); +SelectValue.displayName = VALUE_NAME; +var ICON_NAME = "SelectIcon"; +var SelectIcon = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, children, ...iconProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "\u25BC" }); + } +); +SelectIcon.displayName = ICON_NAME; +var PORTAL_NAME = "SelectPortal"; +var SelectPortal = (props) => { + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_portal.Portal, { asChild: true, ...props }); +}; +SelectPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "SelectContent"; +var SelectContent = React.forwardRef( + (props, forwardedRef) => { + const context = useSelectContext(CONTENT_NAME, props.__scopeSelect); + const [fragment, setFragment] = React.useState(); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + setFragment(new DocumentFragment()); + }, []); + if (!context.open) { + const frag = fragment; + return frag ? ReactDOM.createPortal( + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: props.children }) }) }), + frag + ) : null; + } + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectContentImpl, { ...props, ref: forwardedRef }); + } +); +SelectContent.displayName = CONTENT_NAME; +var CONTENT_MARGIN = 10; +var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME); +var CONTENT_IMPL_NAME = "SelectContentImpl"; +var Slot = (0, import_react_slot.createSlot)("SelectContent.RemoveScroll"); +var SelectContentImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeSelect, + position = "item-aligned", + onCloseAutoFocus, + onEscapeKeyDown, + onPointerDownOutside, + // + // PopperContent props + side, + sideOffset, + align, + alignOffset, + arrowPadding, + collisionBoundary, + collisionPadding, + sticky, + hideWhenDetached, + avoidCollisions, + // + ...contentProps + } = props; + const context = useSelectContext(CONTENT_NAME, __scopeSelect); + const [content, setContent] = React.useState(null); + const [viewport, setViewport] = React.useState(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setContent(node)); + const [selectedItem, setSelectedItem] = React.useState(null); + const [selectedItemText, setSelectedItemText] = React.useState( + null + ); + const getItems = useCollection(__scopeSelect); + const [isPositioned, setIsPositioned] = React.useState(false); + const firstValidItemFoundRef = React.useRef(false); + React.useEffect(() => { + if (content) return (0, import_aria_hidden.hideOthers)(content); + }, [content]); + (0, import_react_focus_guards.useFocusGuards)(); + const focusFirst = React.useCallback( + (candidates) => { + const [firstItem, ...restItems] = getItems().map((item) => item.ref.current); + const [lastItem] = restItems.slice(-1); + const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement; + for (const candidate of candidates) { + if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return; + candidate?.scrollIntoView({ block: "nearest" }); + if (candidate === firstItem && viewport) viewport.scrollTop = 0; + if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight; + candidate?.focus(); + if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return; + } + }, + [getItems, viewport] + ); + const focusSelectedItem = React.useCallback( + () => focusFirst([selectedItem, content]), + [focusFirst, selectedItem, content] + ); + React.useEffect(() => { + if (isPositioned) { + focusSelectedItem(); + } + }, [isPositioned, focusSelectedItem]); + const { onOpenChange, triggerPointerDownPosRef } = context; + React.useEffect(() => { + if (content) { + let pointerMoveDelta = { x: 0, y: 0 }; + const handlePointerMove = (event) => { + pointerMoveDelta = { + x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)), + y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0)) + }; + }; + const handlePointerUp = (event) => { + if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) { + event.preventDefault(); + } else { + if (!content.contains(event.target)) { + onOpenChange(false); + } + } + document.removeEventListener("pointermove", handlePointerMove); + triggerPointerDownPosRef.current = null; + }; + if (triggerPointerDownPosRef.current !== null) { + document.addEventListener("pointermove", handlePointerMove); + document.addEventListener("pointerup", handlePointerUp, { capture: true, once: true }); + } + return () => { + document.removeEventListener("pointermove", handlePointerMove); + document.removeEventListener("pointerup", handlePointerUp, { capture: true }); + }; + } + }, [content, onOpenChange, triggerPointerDownPosRef]); + React.useEffect(() => { + const close = () => onOpenChange(false); + window.addEventListener("blur", close); + window.addEventListener("resize", close); + return () => { + window.removeEventListener("blur", close); + window.removeEventListener("resize", close); + }; + }, [onOpenChange]); + const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => { + const enabledItems = getItems().filter((item) => !item.disabled); + const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement); + const nextItem = findNextItem(enabledItems, search, currentItem); + if (nextItem) { + setTimeout(() => nextItem.ref.current.focus()); + } + }); + const itemRefCallback = React.useCallback( + (node, value, disabled) => { + const isFirstValidItem = !firstValidItemFoundRef.current && !disabled; + const isSelectedItem = context.value !== void 0 && context.value === value; + if (isSelectedItem || isFirstValidItem) { + setSelectedItem(node); + if (isFirstValidItem) firstValidItemFoundRef.current = true; + } + }, + [context.value] + ); + const handleItemLeave = React.useCallback(() => content?.focus(), [content]); + const itemTextRefCallback = React.useCallback( + (node, value, disabled) => { + const isFirstValidItem = !firstValidItemFoundRef.current && !disabled; + const isSelectedItem = context.value !== void 0 && context.value === value; + if (isSelectedItem || isFirstValidItem) { + setSelectedItemText(node); + } + }, + [context.value] + ); + const SelectPosition = position === "popper" ? SelectPopperPosition : SelectItemAlignedPosition; + const popperContentProps = SelectPosition === SelectPopperPosition ? { + side, + sideOffset, + align, + alignOffset, + arrowPadding, + collisionBoundary, + collisionPadding, + sticky, + hideWhenDetached, + avoidCollisions + } : {}; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SelectContentProvider, + { + scope: __scopeSelect, + content, + viewport, + onViewportChange: setViewport, + itemRefCallback, + selectedItem, + onItemLeave: handleItemLeave, + itemTextRefCallback, + focusSelectedItem, + selectedItemText, + position, + isPositioned, + searchRef, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_remove_scroll.RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_focus_scope.FocusScope, + { + asChild: true, + trapped: context.open, + onMountAutoFocus: (event) => { + event.preventDefault(); + }, + onUnmountAutoFocus: (0, import_primitive.composeEventHandlers)(onCloseAutoFocus, (event) => { + context.trigger?.focus({ preventScroll: true }); + event.preventDefault(); + }), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_dismissable_layer.DismissableLayer, + { + asChild: true, + disableOutsidePointerEvents: true, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside: (event) => event.preventDefault(), + onDismiss: () => context.onOpenChange(false), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SelectPosition, + { + role: "listbox", + id: context.contentId, + "data-state": context.open ? "open" : "closed", + dir: context.dir, + onContextMenu: (event) => event.preventDefault(), + ...contentProps, + ...popperContentProps, + onPlaced: () => setIsPositioned(true), + ref: composedRefs, + style: { + // flex layout so we can place the scroll buttons properly + display: "flex", + flexDirection: "column", + // reset the outline by default as the content MAY get focused + outline: "none", + ...contentProps.style + }, + onKeyDown: (0, import_primitive.composeEventHandlers)(contentProps.onKeyDown, (event) => { + const isModifierKey = event.ctrlKey || event.altKey || event.metaKey; + if (event.key === "Tab") event.preventDefault(); + if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key); + if (["ArrowUp", "ArrowDown", "Home", "End"].includes(event.key)) { + const items = getItems().filter((item) => !item.disabled); + let candidateNodes = items.map((item) => item.ref.current); + if (["ArrowUp", "End"].includes(event.key)) { + candidateNodes = candidateNodes.slice().reverse(); + } + if (["ArrowUp", "ArrowDown"].includes(event.key)) { + const currentElement = event.target; + const currentIndex = candidateNodes.indexOf(currentElement); + candidateNodes = candidateNodes.slice(currentIndex + 1); + } + setTimeout(() => focusFirst(candidateNodes)); + event.preventDefault(); + } + }) + } + ) + } + ) + } + ) }) + } + ); + } +); +SelectContentImpl.displayName = CONTENT_IMPL_NAME; +var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition"; +var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => { + const { __scopeSelect, onPlaced, ...popperProps } = props; + const context = useSelectContext(CONTENT_NAME, __scopeSelect); + const contentContext = useSelectContentContext(CONTENT_NAME, __scopeSelect); + const [contentWrapper, setContentWrapper] = React.useState(null); + const [content, setContent] = React.useState(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setContent(node)); + const getItems = useCollection(__scopeSelect); + const shouldExpandOnScrollRef = React.useRef(false); + const shouldRepositionRef = React.useRef(true); + const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext; + const position = React.useCallback(() => { + if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) { + const triggerRect = context.trigger.getBoundingClientRect(); + const contentRect = content.getBoundingClientRect(); + const valueNodeRect = context.valueNode.getBoundingClientRect(); + const itemTextRect = selectedItemText.getBoundingClientRect(); + if (context.dir !== "rtl") { + const itemTextOffset = itemTextRect.left - contentRect.left; + const left = valueNodeRect.left - itemTextOffset; + const leftDelta = triggerRect.left - left; + const minContentWidth = triggerRect.width + leftDelta; + const contentWidth = Math.max(minContentWidth, contentRect.width); + const rightEdge = window.innerWidth - CONTENT_MARGIN; + const clampedLeft = (0, import_number.clamp)(left, [ + CONTENT_MARGIN, + // Prevents the content from going off the starting edge of the + // viewport. It may still go off the ending edge, but this can be + // controlled by the user since they may want to manage overflow in a + // specific way. + // https://github.com/radix-ui/primitives/issues/2049 + Math.max(CONTENT_MARGIN, rightEdge - contentWidth) + ]); + contentWrapper.style.minWidth = minContentWidth + "px"; + contentWrapper.style.left = clampedLeft + "px"; + } else { + const itemTextOffset = contentRect.right - itemTextRect.right; + const right = window.innerWidth - valueNodeRect.right - itemTextOffset; + const rightDelta = window.innerWidth - triggerRect.right - right; + const minContentWidth = triggerRect.width + rightDelta; + const contentWidth = Math.max(minContentWidth, contentRect.width); + const leftEdge = window.innerWidth - CONTENT_MARGIN; + const clampedRight = (0, import_number.clamp)(right, [ + CONTENT_MARGIN, + Math.max(CONTENT_MARGIN, leftEdge - contentWidth) + ]); + contentWrapper.style.minWidth = minContentWidth + "px"; + contentWrapper.style.right = clampedRight + "px"; + } + const items = getItems(); + const availableHeight = window.innerHeight - CONTENT_MARGIN * 2; + const itemsHeight = viewport.scrollHeight; + const contentStyles = window.getComputedStyle(content); + const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10); + const contentPaddingTop = parseInt(contentStyles.paddingTop, 10); + const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10); + const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10); + const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth; + const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight); + const viewportStyles = window.getComputedStyle(viewport); + const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10); + const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10); + const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN; + const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle; + const selectedItemHalfHeight = selectedItem.offsetHeight / 2; + const itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight; + const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle; + const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle; + const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle; + if (willAlignWithoutTopOverflow) { + const isLastItem = items.length > 0 && selectedItem === items[items.length - 1].ref.current; + contentWrapper.style.bottom = "0px"; + const viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight; + const clampedTriggerMiddleToBottomEdge = Math.max( + triggerMiddleToBottomEdge, + selectedItemHalfHeight + // viewport might have padding bottom, include it to avoid a scrollable viewport + (isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth + ); + const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge; + contentWrapper.style.height = height + "px"; + } else { + const isFirstItem = items.length > 0 && selectedItem === items[0].ref.current; + contentWrapper.style.top = "0px"; + const clampedTopEdgeToTriggerMiddle = Math.max( + topEdgeToTriggerMiddle, + contentBorderTopWidth + viewport.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport + (isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight + ); + const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom; + contentWrapper.style.height = height + "px"; + viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop; + } + contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`; + contentWrapper.style.minHeight = minContentHeight + "px"; + contentWrapper.style.maxHeight = availableHeight + "px"; + onPlaced?.(); + requestAnimationFrame(() => shouldExpandOnScrollRef.current = true); + } + }, [ + getItems, + context.trigger, + context.valueNode, + contentWrapper, + content, + viewport, + selectedItem, + selectedItemText, + context.dir, + onPlaced + ]); + (0, import_react_use_layout_effect.useLayoutEffect)(() => position(), [position]); + const [contentZIndex, setContentZIndex] = React.useState(); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + if (content) setContentZIndex(window.getComputedStyle(content).zIndex); + }, [content]); + const handleScrollButtonChange = React.useCallback( + (node) => { + if (node && shouldRepositionRef.current === true) { + position(); + focusSelectedItem?.(); + shouldRepositionRef.current = false; + } + }, + [position, focusSelectedItem] + ); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SelectViewportProvider, + { + scope: __scopeSelect, + contentWrapper, + shouldExpandOnScrollRef, + onScrollButtonChange: handleScrollButtonChange, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + "div", + { + ref: setContentWrapper, + style: { + display: "flex", + flexDirection: "column", + position: "fixed", + zIndex: contentZIndex + }, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + ...popperProps, + ref: composedRefs, + style: { + // When we get the height of the content, it includes borders. If we were to set + // the height without having `boxSizing: 'border-box'` it would be too big. + boxSizing: "border-box", + // We need to ensure the content doesn't get taller than the wrapper + maxHeight: "100%", + ...popperProps.style + } + } + ) + } + ) + } + ); +}); +SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME; +var POPPER_POSITION_NAME = "SelectPopperPosition"; +var SelectPopperPosition = React.forwardRef((props, forwardedRef) => { + const { + __scopeSelect, + align = "start", + collisionPadding = CONTENT_MARGIN, + ...popperProps + } = props; + const popperScope = usePopperScope(__scopeSelect); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + PopperPrimitive.Content, + { + ...popperScope, + ...popperProps, + ref: forwardedRef, + align, + collisionPadding, + style: { + // Ensure border-box for floating-ui calculations + boxSizing: "border-box", + ...popperProps.style, + // re-namespace exposed content custom properties + ...{ + "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-select-content-available-width": "var(--radix-popper-available-width)", + "--radix-select-content-available-height": "var(--radix-popper-available-height)", + "--radix-select-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-select-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); +}); +SelectPopperPosition.displayName = POPPER_POSITION_NAME; +var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME, {}); +var VIEWPORT_NAME = "SelectViewport"; +var SelectViewport = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, nonce, ...viewportProps } = props; + const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect); + const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentContext.onViewportChange); + const prevScrollTopRef = React.useRef(0); + return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + "style", + { + dangerouslySetInnerHTML: { + __html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}` + }, + nonce + } + ), + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "data-radix-select-viewport": "", + role: "presentation", + ...viewportProps, + ref: composedRefs, + style: { + // we use position: 'relative' here on the `viewport` so that when we call + // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport + // (independent of the scrollUpButton). + position: "relative", + flex: 1, + // Viewport should only be scrollable in the vertical direction. + // This won't work in vertical writing modes, so we'll need to + // revisit this if/when that is supported + // https://developer.chrome.com/blog/vertical-form-controls + overflow: "hidden auto", + ...viewportProps.style + }, + onScroll: (0, import_primitive.composeEventHandlers)(viewportProps.onScroll, (event) => { + const viewport = event.currentTarget; + const { contentWrapper, shouldExpandOnScrollRef } = viewportContext; + if (shouldExpandOnScrollRef?.current && contentWrapper) { + const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop); + if (scrolledBy > 0) { + const availableHeight = window.innerHeight - CONTENT_MARGIN * 2; + const cssMinHeight = parseFloat(contentWrapper.style.minHeight); + const cssHeight = parseFloat(contentWrapper.style.height); + const prevHeight = Math.max(cssMinHeight, cssHeight); + if (prevHeight < availableHeight) { + const nextHeight = prevHeight + scrolledBy; + const clampedNextHeight = Math.min(availableHeight, nextHeight); + const heightDiff = nextHeight - clampedNextHeight; + contentWrapper.style.height = clampedNextHeight + "px"; + if (contentWrapper.style.bottom === "0px") { + viewport.scrollTop = heightDiff > 0 ? heightDiff : 0; + contentWrapper.style.justifyContent = "flex-end"; + } + } + } + } + prevScrollTopRef.current = viewport.scrollTop; + }) + } + ) }) + ] }); + } +); +SelectViewport.displayName = VIEWPORT_NAME; +var GROUP_NAME = "SelectGroup"; +var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME); +var SelectGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, ...groupProps } = props; + const groupId = (0, import_react_id.useId)(); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) }); + } +); +SelectGroup.displayName = GROUP_NAME; +var LABEL_NAME = "SelectLabel"; +var SelectLabel = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, ...labelProps } = props; + const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef }); + } +); +SelectLabel.displayName = LABEL_NAME; +var ITEM_NAME = "SelectItem"; +var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME); +var SelectItem = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeSelect, + value, + disabled = false, + textValue: textValueProp, + ...itemProps + } = props; + const context = useSelectContext(ITEM_NAME, __scopeSelect); + const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect); + const isSelected = context.value === value; + const [textValue, setTextValue] = React.useState(textValueProp ?? ""); + const [isFocused, setIsFocused] = React.useState(false); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)( + forwardedRef, + (node) => contentContext.itemRefCallback?.(node, value, disabled) + ); + const textId = (0, import_react_id.useId)(); + const pointerTypeRef = React.useRef("touch"); + const handleSelect = () => { + if (!disabled) { + context.onValueChange(value); + context.onOpenChange(false); + } + }; + if (value === "") { + throw new Error( + "A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder." + ); + } + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SelectItemContextProvider, + { + scope: __scopeSelect, + value, + disabled, + textId, + isSelected, + onItemTextChange: React.useCallback((node) => { + setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim()); + }, []), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + Collection.ItemSlot, + { + scope: __scopeSelect, + value, + disabled, + textValue, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + role: "option", + "aria-labelledby": textId, + "data-highlighted": isFocused ? "" : void 0, + "aria-selected": isSelected && isFocused, + "data-state": isSelected ? "checked" : "unchecked", + "aria-disabled": disabled || void 0, + "data-disabled": disabled ? "" : void 0, + tabIndex: disabled ? void 0 : -1, + ...itemProps, + ref: composedRefs, + onFocus: (0, import_primitive.composeEventHandlers)(itemProps.onFocus, () => setIsFocused(true)), + onBlur: (0, import_primitive.composeEventHandlers)(itemProps.onBlur, () => setIsFocused(false)), + onClick: (0, import_primitive.composeEventHandlers)(itemProps.onClick, () => { + if (pointerTypeRef.current !== "mouse") handleSelect(); + }), + onPointerUp: (0, import_primitive.composeEventHandlers)(itemProps.onPointerUp, () => { + if (pointerTypeRef.current === "mouse") handleSelect(); + }), + onPointerDown: (0, import_primitive.composeEventHandlers)(itemProps.onPointerDown, (event) => { + pointerTypeRef.current = event.pointerType; + }), + onPointerMove: (0, import_primitive.composeEventHandlers)(itemProps.onPointerMove, (event) => { + pointerTypeRef.current = event.pointerType; + if (disabled) { + contentContext.onItemLeave?.(); + } else if (pointerTypeRef.current === "mouse") { + event.currentTarget.focus({ preventScroll: true }); + } + }), + onPointerLeave: (0, import_primitive.composeEventHandlers)(itemProps.onPointerLeave, (event) => { + if (event.currentTarget === document.activeElement) { + contentContext.onItemLeave?.(); + } + }), + onKeyDown: (0, import_primitive.composeEventHandlers)(itemProps.onKeyDown, (event) => { + const isTypingAhead = contentContext.searchRef?.current !== ""; + if (isTypingAhead && event.key === " ") return; + if (SELECTION_KEYS.includes(event.key)) handleSelect(); + if (event.key === " ") event.preventDefault(); + }) + } + ) + } + ) + } + ); + } +); +SelectItem.displayName = ITEM_NAME; +var ITEM_TEXT_NAME = "SelectItemText"; +var SelectItemText = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, className, style, ...itemTextProps } = props; + const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect); + const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect); + const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect); + const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect); + const [itemTextNode, setItemTextNode] = React.useState(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)( + forwardedRef, + (node) => setItemTextNode(node), + itemContext.onItemTextChange, + (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled) + ); + const textContent = itemTextNode?.textContent; + const nativeOption = React.useMemo( + () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), + [itemContext.disabled, itemContext.value, textContent] + ); + const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext; + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + onNativeOptionAdd(nativeOption); + return () => onNativeOptionRemove(nativeOption); + }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }), + itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null + ] }); + } +); +SelectItemText.displayName = ITEM_TEXT_NAME; +var ITEM_INDICATOR_NAME = "SelectItemIndicator"; +var SelectItemIndicator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, ...itemIndicatorProps } = props; + const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect); + return itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null; + } +); +SelectItemIndicator.displayName = ITEM_INDICATOR_NAME; +var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton"; +var SelectScrollUpButton = React.forwardRef((props, forwardedRef) => { + const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect); + const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect); + const [canScrollUp, setCanScrollUp] = React.useState(false); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, viewportContext.onScrollButtonChange); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + if (contentContext.viewport && contentContext.isPositioned) { + let handleScroll2 = function() { + const canScrollUp2 = viewport.scrollTop > 0; + setCanScrollUp(canScrollUp2); + }; + var handleScroll = handleScroll2; + const viewport = contentContext.viewport; + handleScroll2(); + viewport.addEventListener("scroll", handleScroll2); + return () => viewport.removeEventListener("scroll", handleScroll2); + } + }, [contentContext.viewport, contentContext.isPositioned]); + return canScrollUp ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SelectScrollButtonImpl, + { + ...props, + ref: composedRefs, + onAutoScroll: () => { + const { viewport, selectedItem } = contentContext; + if (viewport && selectedItem) { + viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight; + } + } + } + ) : null; +}); +SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME; +var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton"; +var SelectScrollDownButton = React.forwardRef((props, forwardedRef) => { + const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect); + const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect); + const [canScrollDown, setCanScrollDown] = React.useState(false); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, viewportContext.onScrollButtonChange); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + if (contentContext.viewport && contentContext.isPositioned) { + let handleScroll2 = function() { + const maxScroll = viewport.scrollHeight - viewport.clientHeight; + const canScrollDown2 = Math.ceil(viewport.scrollTop) < maxScroll; + setCanScrollDown(canScrollDown2); + }; + var handleScroll = handleScroll2; + const viewport = contentContext.viewport; + handleScroll2(); + viewport.addEventListener("scroll", handleScroll2); + return () => viewport.removeEventListener("scroll", handleScroll2); + } + }, [contentContext.viewport, contentContext.isPositioned]); + return canScrollDown ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SelectScrollButtonImpl, + { + ...props, + ref: composedRefs, + onAutoScroll: () => { + const { viewport, selectedItem } = contentContext; + if (viewport && selectedItem) { + viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight; + } + } + } + ) : null; +}); +SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME; +var SelectScrollButtonImpl = React.forwardRef((props, forwardedRef) => { + const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props; + const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect); + const autoScrollTimerRef = React.useRef(null); + const getItems = useCollection(__scopeSelect); + const clearAutoScrollTimer = React.useCallback(() => { + if (autoScrollTimerRef.current !== null) { + window.clearInterval(autoScrollTimerRef.current); + autoScrollTimerRef.current = null; + } + }, []); + React.useEffect(() => { + return () => clearAutoScrollTimer(); + }, [clearAutoScrollTimer]); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + const activeItem = getItems().find((item) => item.ref.current === document.activeElement); + activeItem?.ref.current?.scrollIntoView({ block: "nearest" }); + }, [getItems]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "aria-hidden": true, + ...scrollIndicatorProps, + ref: forwardedRef, + style: { flexShrink: 0, ...scrollIndicatorProps.style }, + onPointerDown: (0, import_primitive.composeEventHandlers)(scrollIndicatorProps.onPointerDown, () => { + if (autoScrollTimerRef.current === null) { + autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50); + } + }), + onPointerMove: (0, import_primitive.composeEventHandlers)(scrollIndicatorProps.onPointerMove, () => { + contentContext.onItemLeave?.(); + if (autoScrollTimerRef.current === null) { + autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50); + } + }), + onPointerLeave: (0, import_primitive.composeEventHandlers)(scrollIndicatorProps.onPointerLeave, () => { + clearAutoScrollTimer(); + }) + } + ); +}); +var SEPARATOR_NAME = "SelectSeparator"; +var SelectSeparator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, ...separatorProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef }); + } +); +SelectSeparator.displayName = SEPARATOR_NAME; +var ARROW_NAME = "SelectArrow"; +var SelectArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, ...arrowProps } = props; + const popperScope = usePopperScope(__scopeSelect); + const context = useSelectContext(ARROW_NAME, __scopeSelect); + const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect); + return context.open && contentContext.position === "popper" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null; + } +); +SelectArrow.displayName = ARROW_NAME; +var BUBBLE_INPUT_NAME = "SelectBubbleInput"; +var SelectBubbleInput = React.forwardRef( + ({ __scopeSelect, value, ...props }, forwardedRef) => { + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + const prevValue = (0, import_react_use_previous.usePrevious)(value); + React.useEffect(() => { + const select = ref.current; + if (!select) return; + const selectProto = window.HTMLSelectElement.prototype; + const descriptor = Object.getOwnPropertyDescriptor( + selectProto, + "value" + ); + const setValue = descriptor.set; + if (prevValue !== value && setValue) { + const event = new Event("change", { bubbles: true }); + setValue.call(select, value); + select.dispatchEvent(event); + } + }, [prevValue, value]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.select, + { + ...props, + style: { ...import_react_visually_hidden.VISUALLY_HIDDEN_STYLES, ...props.style }, + ref: composedRefs, + defaultValue: value + } + ); + } +); +SelectBubbleInput.displayName = BUBBLE_INPUT_NAME; +function shouldShowPlaceholder(value) { + return value === "" || value === void 0; +} +function useTypeaheadSearch(onSearchChange) { + const handleSearchChange = (0, import_react_use_callback_ref.useCallbackRef)(onSearchChange); + const searchRef = React.useRef(""); + const timerRef = React.useRef(0); + const handleTypeaheadSearch = React.useCallback( + (key) => { + const search = searchRef.current + key; + handleSearchChange(search); + (function updateSearch(value) { + searchRef.current = value; + window.clearTimeout(timerRef.current); + if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3); + })(search); + }, + [handleSearchChange] + ); + const resetTypeahead = React.useCallback(() => { + searchRef.current = ""; + window.clearTimeout(timerRef.current); + }, []); + React.useEffect(() => { + return () => window.clearTimeout(timerRef.current); + }, []); + return [searchRef, handleTypeaheadSearch, resetTypeahead]; +} +function findNextItem(items, search, currentItem) { + const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]); + const normalizedSearch = isRepeated ? search[0] : search; + const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1; + let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0)); + const excludeCurrentItem = normalizedSearch.length === 1; + if (excludeCurrentItem) wrappedItems = wrappedItems.filter((v) => v !== currentItem); + const nextItem = wrappedItems.find( + (item) => item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase()) + ); + return nextItem !== currentItem ? nextItem : void 0; +} +function wrapArray(array, startIndex) { + return array.map((_, index) => array[(startIndex + index) % array.length]); +} +var Root2 = Select; +var Trigger = SelectTrigger; +var Value = SelectValue; +var Icon = SelectIcon; +var Portal = SelectPortal; +var Content2 = SelectContent; +var Viewport = SelectViewport; +var Group = SelectGroup; +var Label = SelectLabel; +var Item = SelectItem; +var ItemText = SelectItemText; +var ItemIndicator = SelectItemIndicator; +var ScrollUpButton = SelectScrollUpButton; +var ScrollDownButton = SelectScrollDownButton; +var Separator = SelectSeparator; +var Arrow2 = SelectArrow; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..68955d628b3c880d7ac6a6d03d426bc4c7e89077 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/select.tsx"], + "sourcesContent": ["'use client';\nexport {\n createSelectScope,\n //\n Select,\n SelectTrigger,\n SelectValue,\n SelectIcon,\n SelectPortal,\n SelectContent,\n SelectViewport,\n SelectGroup,\n SelectLabel,\n SelectItem,\n SelectItemText,\n SelectItemIndicator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n SelectSeparator,\n SelectArrow,\n //\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Content,\n Viewport,\n Group,\n Label,\n Item,\n ItemText,\n ItemIndicator,\n ScrollUpButton,\n ScrollDownButton,\n Separator,\n Arrow,\n} from './select';\nexport type {\n SelectProps,\n SelectTriggerProps,\n SelectValueProps,\n SelectIconProps,\n SelectPortalProps,\n SelectContentProps,\n SelectViewportProps,\n SelectGroupProps,\n SelectLabelProps,\n SelectItemProps,\n SelectItemTextProps,\n SelectItemIndicatorProps,\n SelectScrollUpButtonProps,\n SelectScrollDownButtonProps,\n SelectSeparatorProps,\n SelectArrowProps,\n} from './select';\n", "import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { clamp } from '@radix-ui/number';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createSlot } from '@radix-ui/react-slot';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { VISUALLY_HIDDEN_STYLES } from '@radix-ui/react-visually-hidden';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\nconst OPEN_KEYS = [' ', 'Enter', 'ArrowUp', 'ArrowDown'];\nconst SELECTION_KEYS = [' ', 'Enter'];\n\n/* -------------------------------------------------------------------------------------------------\n * Select\n * -----------------------------------------------------------------------------------------------*/\n\nconst SELECT_NAME = 'Select';\n\ntype ItemData = { value: string; disabled: boolean; textValue: string };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n SelectItemElement,\n ItemData\n>(SELECT_NAME);\n\ntype ScopedProps

= P & { __scopeSelect?: Scope };\nconst [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [\n createCollectionScope,\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype SelectContextValue = {\n trigger: SelectTriggerElement | null;\n onTriggerChange(node: SelectTriggerElement | null): void;\n valueNode: SelectValueElement | null;\n onValueNodeChange(node: SelectValueElement): void;\n valueNodeHasChildren: boolean;\n onValueNodeHasChildrenChange(hasChildren: boolean): void;\n contentId: string;\n value: string | undefined;\n onValueChange(value: string): void;\n open: boolean;\n required?: boolean;\n onOpenChange(open: boolean): void;\n dir: SelectProps['dir'];\n triggerPointerDownPosRef: React.MutableRefObject<{ x: number; y: number } | null>;\n disabled?: boolean;\n};\n\nconst [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME);\n\ntype NativeOption = React.ReactElement>;\n\ntype SelectNativeOptionsContextValue = {\n onNativeOptionAdd(option: NativeOption): void;\n onNativeOptionRemove(option: NativeOption): void;\n};\nconst [SelectNativeOptionsProvider, useSelectNativeOptionsContext] =\n createSelectContext(SELECT_NAME);\n\ninterface ControlledClearableSelectProps {\n value: string | undefined;\n defaultValue?: never;\n onValueChange: (value: string | undefined) => void;\n}\n\ninterface ControlledUnclearableSelectProps {\n value: string;\n defaultValue?: never;\n onValueChange: (value: string) => void;\n}\n\ninterface UncontrolledSelectProps {\n value?: never;\n defaultValue?: string;\n onValueChange?: {\n (value: string): void;\n (value: string | undefined): void;\n };\n}\n\ntype SelectControlProps =\n | ControlledClearableSelectProps\n | ControlledUnclearableSelectProps\n | UncontrolledSelectProps;\n\ninterface SelectSharedProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n name?: string;\n autoComplete?: string;\n disabled?: boolean;\n required?: boolean;\n form?: string;\n}\n\n// TODO: Should improve typing somewhat, but this would be a breaking change.\n// Consider using in the next major version (along with some testing to be sure\n// it works as expected and doesn't cause problems)\ntype _FutureSelectProps = SelectSharedProps & SelectControlProps;\n\ntype SelectProps = SelectSharedProps & {\n value?: string;\n defaultValue?: string;\n onValueChange?(value: string): void;\n};\n\nconst Select: React.FC = (props: ScopedProps) => {\n const {\n __scopeSelect,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n value: valueProp,\n defaultValue,\n onValueChange,\n dir,\n name,\n autoComplete,\n disabled,\n required,\n form,\n } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const [trigger, setTrigger] = React.useState(null);\n const [valueNode, setValueNode] = React.useState(null);\n const [valueNodeHasChildren, setValueNodeHasChildren] = React.useState(false);\n const direction = useDirection(dir);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: SELECT_NAME,\n });\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange as any,\n caller: SELECT_NAME,\n });\n const triggerPointerDownPosRef = React.useRef<{ x: number; y: number } | null>(null);\n\n // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = trigger ? form || !!trigger.closest('form') : true;\n const [nativeOptionsSet, setNativeOptionsSet] = React.useState(new Set());\n\n // The native `select` only associates the correct default value if the corresponding\n // `option` is rendered as a child **at the same time** as itself.\n // Because it might take a few renders for our items to gather the information to build\n // the native `option`(s), we generate a key on the `select` to make sure React re-builds it\n // each time the options change.\n const nativeSelectKey = Array.from(nativeOptionsSet)\n .map((option) => option.props.value)\n .join(';');\n\n return (\n \n \n \n {\n setNativeOptionsSet((prev) => new Set(prev).add(option));\n }, [])}\n onNativeOptionRemove={React.useCallback((option) => {\n setNativeOptionsSet((prev) => {\n const optionsSet = new Set(prev);\n optionsSet.delete(option);\n return optionsSet;\n });\n }, [])}\n >\n {children}\n \n \n\n {isFormControl ? (\n setValue(event.target.value)}\n disabled={disabled}\n form={form}\n >\n {value === undefined ? \n );\n};\n\nSelect.displayName = SELECT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'SelectTrigger';\n\ntype SelectTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface SelectTriggerProps extends PrimitiveButtonProps {}\n\nconst SelectTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, disabled = false, ...triggerProps } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const context = useSelectContext(TRIGGER_NAME, __scopeSelect);\n const isDisabled = context.disabled || disabled;\n const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);\n const getItems = useCollection(__scopeSelect);\n const pointerTypeRef = React.useRef('touch');\n\n const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {\n const enabledItems = getItems().filter((item) => !item.disabled);\n const currentItem = enabledItems.find((item) => item.value === context.value);\n const nextItem = findNextItem(enabledItems, search, currentItem);\n if (nextItem !== undefined) {\n context.onValueChange(nextItem.value);\n }\n });\n\n const handleOpen = (pointerEvent?: React.MouseEvent | React.PointerEvent) => {\n if (!isDisabled) {\n context.onOpenChange(true);\n // reset typeahead when we open\n resetTypeahead();\n }\n\n if (pointerEvent) {\n context.triggerPointerDownPosRef.current = {\n x: Math.round(pointerEvent.pageX),\n y: Math.round(pointerEvent.pageY),\n };\n }\n };\n\n return (\n \n {\n // Whilst browsers generally have no issue focusing the trigger when clicking\n // on a label, Safari seems to struggle with the fact that there's no `onClick`.\n // We force `focus` in this case. Note: this doesn't create any other side-effect\n // because we are preventing default in `onPointerDown` so effectively\n // this only runs for a label \"click\"\n event.currentTarget.focus();\n\n // Open on click when using a touch or pen device\n if (pointerTypeRef.current !== 'mouse') {\n handleOpen(event);\n }\n })}\n onPointerDown={composeEventHandlers(triggerProps.onPointerDown, (event) => {\n pointerTypeRef.current = event.pointerType;\n\n // prevent implicit pointer capture\n // https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture\n const target = event.target as HTMLElement;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n }\n\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click); also not for touch\n // devices because that would open the menu on scroll. (pen devices behave as touch on iOS).\n if (event.button === 0 && event.ctrlKey === false && event.pointerType === 'mouse') {\n handleOpen(event);\n // prevent trigger from stealing focus from the active item after opening.\n event.preventDefault();\n }\n })}\n onKeyDown={composeEventHandlers(triggerProps.onKeyDown, (event) => {\n const isTypingAhead = searchRef.current !== '';\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n if (isTypingAhead && event.key === ' ') return;\n if (OPEN_KEYS.includes(event.key)) {\n handleOpen();\n event.preventDefault();\n }\n })}\n />\n \n );\n }\n);\n\nSelectTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectValue\n * -----------------------------------------------------------------------------------------------*/\n\nconst VALUE_NAME = 'SelectValue';\n\ntype SelectValueElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface SelectValueProps extends Omit {\n placeholder?: React.ReactNode;\n}\n\nconst SelectValue = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n // We ignore `className` and `style` as this part shouldn't be styled.\n const { __scopeSelect, className, style, children, placeholder = '', ...valueProps } = props;\n const context = useSelectContext(VALUE_NAME, __scopeSelect);\n const { onValueNodeHasChildrenChange } = context;\n const hasChildren = children !== undefined;\n const composedRefs = useComposedRefs(forwardedRef, context.onValueNodeChange);\n\n useLayoutEffect(() => {\n onValueNodeHasChildrenChange(hasChildren);\n }, [onValueNodeHasChildrenChange, hasChildren]);\n\n return (\n \n {shouldShowPlaceholder(context.value) ? <>{placeholder} : children}\n \n );\n }\n);\n\nSelectValue.displayName = VALUE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectIcon\n * -----------------------------------------------------------------------------------------------*/\n\nconst ICON_NAME = 'SelectIcon';\n\ntype SelectIconElement = React.ComponentRef;\ninterface SelectIconProps extends PrimitiveSpanProps {}\n\nconst SelectIcon = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, children, ...iconProps } = props;\n return (\n \n {children || '\u25BC'}\n \n );\n }\n);\n\nSelectIcon.displayName = ICON_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'SelectPortal';\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface SelectPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n}\n\nconst SelectPortal: React.FC = (props: ScopedProps) => {\n return ;\n};\n\nSelectPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'SelectContent';\n\ntype SelectContentElement = SelectContentImplElement;\ninterface SelectContentProps extends SelectContentImplProps {}\n\nconst SelectContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useSelectContext(CONTENT_NAME, props.__scopeSelect);\n const [fragment, setFragment] = React.useState();\n\n // setting the fragment in `useLayoutEffect` as `DocumentFragment` doesn't exist on the server\n useLayoutEffect(() => {\n setFragment(new DocumentFragment());\n }, []);\n\n if (!context.open) {\n const frag = fragment as Element | undefined;\n return frag\n ? ReactDOM.createPortal(\n \n \n

{props.children}
\n \n ,\n frag\n )\n : null;\n }\n\n return ;\n }\n);\n\nSelectContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectContentImpl\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_MARGIN = 10;\n\ntype SelectContentContextValue = {\n content?: SelectContentElement | null;\n viewport?: SelectViewportElement | null;\n onViewportChange?: (node: SelectViewportElement | null) => void;\n itemRefCallback?: (node: SelectItemElement | null, value: string, disabled: boolean) => void;\n selectedItem?: SelectItemElement | null;\n onItemLeave?: () => void;\n itemTextRefCallback?: (\n node: SelectItemTextElement | null,\n value: string,\n disabled: boolean\n ) => void;\n focusSelectedItem?: () => void;\n selectedItemText?: SelectItemTextElement | null;\n position?: SelectContentProps['position'];\n isPositioned?: boolean;\n searchRef?: React.RefObject;\n};\n\nconst [SelectContentProvider, useSelectContentContext] =\n createSelectContext(CONTENT_NAME);\n\nconst CONTENT_IMPL_NAME = 'SelectContentImpl';\n\ntype SelectContentImplElement = SelectPopperPositionElement | SelectItemAlignedPositionElement;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype FocusScopeProps = React.ComponentPropsWithoutRef;\n\ntype SelectPopperPrivateProps = { onPlaced?: PopperContentProps['onPlaced'] };\n\ninterface SelectContentImplProps\n extends Omit,\n Omit {\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n\n position?: 'item-aligned' | 'popper';\n}\n\nconst Slot = createSlot('SelectContent.RemoveScroll');\n\nconst SelectContentImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeSelect,\n position = 'item-aligned',\n onCloseAutoFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n //\n // PopperContent props\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n hideWhenDetached,\n avoidCollisions,\n //\n ...contentProps\n } = props;\n const context = useSelectContext(CONTENT_NAME, __scopeSelect);\n const [content, setContent] = React.useState(null);\n const [viewport, setViewport] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [selectedItem, setSelectedItem] = React.useState(null);\n const [selectedItemText, setSelectedItemText] = React.useState(\n null\n );\n const getItems = useCollection(__scopeSelect);\n const [isPositioned, setIsPositioned] = React.useState(false);\n const firstValidItemFoundRef = React.useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n if (content) return hideOthers(content);\n }, [content]);\n\n // Make sure the whole tree has focus guards as our `Select` may be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n const focusFirst = React.useCallback(\n (candidates: Array) => {\n const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);\n const [lastItem] = restItems.slice(-1);\n\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate?.scrollIntoView({ block: 'nearest' });\n // viewport might have padding so scroll to its edges when focusing first/last items.\n if (candidate === firstItem && viewport) viewport.scrollTop = 0;\n if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight;\n candidate?.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n },\n [getItems, viewport]\n );\n\n const focusSelectedItem = React.useCallback(\n () => focusFirst([selectedItem, content]),\n [focusFirst, selectedItem, content]\n );\n\n // Since this is not dependent on layout, we want to ensure this runs at the same time as\n // other effects across components. Hence why we don't call `focusSelectedItem` inside `position`.\n React.useEffect(() => {\n if (isPositioned) {\n focusSelectedItem();\n }\n }, [isPositioned, focusSelectedItem]);\n\n // prevent selecting items on `pointerup` in some cases after opening from `pointerdown`\n // and close on `pointerup` outside.\n const { onOpenChange, triggerPointerDownPosRef } = context;\n React.useEffect(() => {\n if (content) {\n let pointerMoveDelta = { x: 0, y: 0 };\n\n const handlePointerMove = (event: PointerEvent) => {\n pointerMoveDelta = {\n x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)),\n y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0)),\n };\n };\n const handlePointerUp = (event: PointerEvent) => {\n // If the pointer hasn't moved by a certain threshold then we prevent selecting item on `pointerup`.\n if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {\n event.preventDefault();\n } else {\n // otherwise, if the event was outside the content, close.\n if (!content.contains(event.target as HTMLElement)) {\n onOpenChange(false);\n }\n }\n document.removeEventListener('pointermove', handlePointerMove);\n triggerPointerDownPosRef.current = null;\n };\n\n if (triggerPointerDownPosRef.current !== null) {\n document.addEventListener('pointermove', handlePointerMove);\n document.addEventListener('pointerup', handlePointerUp, { capture: true, once: true });\n }\n\n return () => {\n document.removeEventListener('pointermove', handlePointerMove);\n document.removeEventListener('pointerup', handlePointerUp, { capture: true });\n };\n }\n }, [content, onOpenChange, triggerPointerDownPosRef]);\n\n React.useEffect(() => {\n const close = () => onOpenChange(false);\n window.addEventListener('blur', close);\n window.addEventListener('resize', close);\n return () => {\n window.removeEventListener('blur', close);\n window.removeEventListener('resize', close);\n };\n }, [onOpenChange]);\n\n const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => {\n const enabledItems = getItems().filter((item) => !item.disabled);\n const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement);\n const nextItem = findNextItem(enabledItems, search, currentItem);\n if (nextItem) {\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => (nextItem.ref.current as HTMLElement).focus());\n }\n });\n\n const itemRefCallback = React.useCallback(\n (node: SelectItemElement | null, value: string, disabled: boolean) => {\n const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n const isSelectedItem = context.value !== undefined && context.value === value;\n if (isSelectedItem || isFirstValidItem) {\n setSelectedItem(node);\n if (isFirstValidItem) firstValidItemFoundRef.current = true;\n }\n },\n [context.value]\n );\n const handleItemLeave = React.useCallback(() => content?.focus(), [content]);\n const itemTextRefCallback = React.useCallback(\n (node: SelectItemTextElement | null, value: string, disabled: boolean) => {\n const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n const isSelectedItem = context.value !== undefined && context.value === value;\n if (isSelectedItem || isFirstValidItem) {\n setSelectedItemText(node);\n }\n },\n [context.value]\n );\n\n const SelectPosition = position === 'popper' ? SelectPopperPosition : SelectItemAlignedPosition;\n\n // Silently ignore props that are not supported by `SelectItemAlignedPosition`\n const popperContentProps =\n SelectPosition === SelectPopperPosition\n ? {\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n hideWhenDetached,\n avoidCollisions,\n }\n : {};\n\n return (\n \n \n {\n // we prevent open autofocus because we manually focus the selected item\n event.preventDefault();\n }}\n onUnmountAutoFocus={composeEventHandlers(onCloseAutoFocus, (event) => {\n context.trigger?.focus({ preventScroll: true });\n event.preventDefault();\n })}\n >\n event.preventDefault()}\n onDismiss={() => context.onOpenChange(false)}\n >\n event.preventDefault()}\n {...contentProps}\n {...popperContentProps}\n onPlaced={() => setIsPositioned(true)}\n ref={composedRefs}\n style={{\n // flex layout so we can place the scroll buttons properly\n display: 'flex',\n flexDirection: 'column',\n // reset the outline by default as the content MAY get focused\n outline: 'none',\n ...contentProps.style,\n }}\n onKeyDown={composeEventHandlers(contentProps.onKeyDown, (event) => {\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n\n // select should not be navigated using tab key so we prevent it\n if (event.key === 'Tab') event.preventDefault();\n\n if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n\n if (['ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n const items = getItems().filter((item) => !item.disabled);\n let candidateNodes = items.map((item) => item.ref.current!);\n\n if (['ArrowUp', 'End'].includes(event.key)) {\n candidateNodes = candidateNodes.slice().reverse();\n }\n if (['ArrowUp', 'ArrowDown'].includes(event.key)) {\n const currentElement = event.target as SelectItemElement;\n const currentIndex = candidateNodes.indexOf(currentElement);\n candidateNodes = candidateNodes.slice(currentIndex + 1);\n }\n\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => focusFirst(candidateNodes));\n\n event.preventDefault();\n }\n })}\n />\n \n \n \n \n );\n }\n);\n\nSelectContentImpl.displayName = CONTENT_IMPL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItemAlignedPosition\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_ALIGNED_POSITION_NAME = 'SelectItemAlignedPosition';\n\ntype SelectItemAlignedPositionElement = React.ComponentRef;\ninterface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps {}\n\nconst SelectItemAlignedPosition = React.forwardRef<\n SelectItemAlignedPositionElement,\n SelectItemAlignedPositionProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, onPlaced, ...popperProps } = props;\n const context = useSelectContext(CONTENT_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(CONTENT_NAME, __scopeSelect);\n const [contentWrapper, setContentWrapper] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const getItems = useCollection(__scopeSelect);\n const shouldExpandOnScrollRef = React.useRef(false);\n const shouldRepositionRef = React.useRef(true);\n\n const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;\n const position = React.useCallback(() => {\n if (\n context.trigger &&\n context.valueNode &&\n contentWrapper &&\n content &&\n viewport &&\n selectedItem &&\n selectedItemText\n ) {\n const triggerRect = context.trigger.getBoundingClientRect();\n\n // -----------------------------------------------------------------------------------------\n // Horizontal positioning\n // -----------------------------------------------------------------------------------------\n const contentRect = content.getBoundingClientRect();\n const valueNodeRect = context.valueNode.getBoundingClientRect();\n const itemTextRect = selectedItemText.getBoundingClientRect();\n\n if (context.dir !== 'rtl') {\n const itemTextOffset = itemTextRect.left - contentRect.left;\n const left = valueNodeRect.left - itemTextOffset;\n const leftDelta = triggerRect.left - left;\n const minContentWidth = triggerRect.width + leftDelta;\n const contentWidth = Math.max(minContentWidth, contentRect.width);\n const rightEdge = window.innerWidth - CONTENT_MARGIN;\n const clampedLeft = clamp(left, [\n CONTENT_MARGIN,\n // Prevents the content from going off the starting edge of the\n // viewport. It may still go off the ending edge, but this can be\n // controlled by the user since they may want to manage overflow in a\n // specific way.\n // https://github.com/radix-ui/primitives/issues/2049\n Math.max(CONTENT_MARGIN, rightEdge - contentWidth),\n ]);\n\n contentWrapper.style.minWidth = minContentWidth + 'px';\n contentWrapper.style.left = clampedLeft + 'px';\n } else {\n const itemTextOffset = contentRect.right - itemTextRect.right;\n const right = window.innerWidth - valueNodeRect.right - itemTextOffset;\n const rightDelta = window.innerWidth - triggerRect.right - right;\n const minContentWidth = triggerRect.width + rightDelta;\n const contentWidth = Math.max(minContentWidth, contentRect.width);\n const leftEdge = window.innerWidth - CONTENT_MARGIN;\n const clampedRight = clamp(right, [\n CONTENT_MARGIN,\n Math.max(CONTENT_MARGIN, leftEdge - contentWidth),\n ]);\n\n contentWrapper.style.minWidth = minContentWidth + 'px';\n contentWrapper.style.right = clampedRight + 'px';\n }\n\n // -----------------------------------------------------------------------------------------\n // Vertical positioning\n // -----------------------------------------------------------------------------------------\n const items = getItems();\n const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n const itemsHeight = viewport.scrollHeight;\n\n const contentStyles = window.getComputedStyle(content);\n const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);\n const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);\n const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);\n const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10);\n const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth; // prettier-ignore\n const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight);\n\n const viewportStyles = window.getComputedStyle(viewport);\n const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10);\n const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10);\n\n const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN;\n const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;\n\n const selectedItemHalfHeight = selectedItem.offsetHeight / 2;\n const itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight;\n const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;\n const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;\n\n const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle;\n\n if (willAlignWithoutTopOverflow) {\n const isLastItem =\n items.length > 0 && selectedItem === items[items.length - 1]!.ref.current;\n contentWrapper.style.bottom = 0 + 'px';\n const viewportOffsetBottom =\n content.clientHeight - viewport.offsetTop - viewport.offsetHeight;\n const clampedTriggerMiddleToBottomEdge = Math.max(\n triggerMiddleToBottomEdge,\n selectedItemHalfHeight +\n // viewport might have padding bottom, include it to avoid a scrollable viewport\n (isLastItem ? viewportPaddingBottom : 0) +\n viewportOffsetBottom +\n contentBorderBottomWidth\n );\n const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;\n contentWrapper.style.height = height + 'px';\n } else {\n const isFirstItem = items.length > 0 && selectedItem === items[0]!.ref.current;\n contentWrapper.style.top = 0 + 'px';\n const clampedTopEdgeToTriggerMiddle = Math.max(\n topEdgeToTriggerMiddle,\n contentBorderTopWidth +\n viewport.offsetTop +\n // viewport might have padding top, include it to avoid a scrollable viewport\n (isFirstItem ? viewportPaddingTop : 0) +\n selectedItemHalfHeight\n );\n const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;\n contentWrapper.style.height = height + 'px';\n viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop;\n }\n\n contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`;\n contentWrapper.style.minHeight = minContentHeight + 'px';\n contentWrapper.style.maxHeight = availableHeight + 'px';\n // -----------------------------------------------------------------------------------------\n\n onPlaced?.();\n\n // we don't want the initial scroll position adjustment to trigger \"expand on scroll\"\n // so we explicitly turn it on only after they've registered.\n requestAnimationFrame(() => (shouldExpandOnScrollRef.current = true));\n }\n }, [\n getItems,\n context.trigger,\n context.valueNode,\n contentWrapper,\n content,\n viewport,\n selectedItem,\n selectedItemText,\n context.dir,\n onPlaced,\n ]);\n\n useLayoutEffect(() => position(), [position]);\n\n // copy z-index from content to wrapper\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n\n // When the viewport becomes scrollable at the top, the scroll up button will mount.\n // Because it is part of the normal flow, it will push down the viewport, thus throwing our\n // trigger => selectedItem alignment off by the amount the viewport was pushed down.\n // We wait for this to happen and then re-run the positining logic one more time to account for it.\n const handleScrollButtonChange = React.useCallback(\n (node: SelectScrollButtonImplElement | null) => {\n if (node && shouldRepositionRef.current === true) {\n position();\n focusSelectedItem?.();\n shouldRepositionRef.current = false;\n }\n },\n [position, focusSelectedItem]\n );\n\n return (\n \n \n \n \n \n );\n});\n\nSelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectPopperPosition\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPPER_POSITION_NAME = 'SelectPopperPosition';\n\ntype SelectPopperPositionElement = React.ComponentRef;\ntype PopperContentProps = React.ComponentPropsWithoutRef;\ninterface SelectPopperPositionProps extends PopperContentProps, SelectPopperPrivateProps {}\n\nconst SelectPopperPosition = React.forwardRef<\n SelectPopperPositionElement,\n SelectPopperPositionProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n __scopeSelect,\n align = 'start',\n collisionPadding = CONTENT_MARGIN,\n ...popperProps\n } = props;\n const popperScope = usePopperScope(__scopeSelect);\n\n return (\n \n );\n});\n\nSelectPopperPosition.displayName = POPPER_POSITION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectViewport\n * -----------------------------------------------------------------------------------------------*/\n\ntype SelectViewportContextValue = {\n contentWrapper?: HTMLDivElement | null;\n shouldExpandOnScrollRef?: React.RefObject;\n onScrollButtonChange?: (node: SelectScrollButtonImplElement | null) => void;\n};\n\nconst [SelectViewportProvider, useSelectViewportContext] =\n createSelectContext(CONTENT_NAME, {});\n\nconst VIEWPORT_NAME = 'SelectViewport';\n\ntype SelectViewportElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface SelectViewportProps extends PrimitiveDivProps {\n nonce?: string;\n}\n\nconst SelectViewport = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, nonce, ...viewportProps } = props;\n const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);\n const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);\n const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);\n const prevScrollTopRef = React.useRef(0);\n return (\n <>\n {/* Hide scrollbars cross-browser and enable momentum scroll for touch devices */}\n \n \n {\n const viewport = event.currentTarget;\n const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;\n if (shouldExpandOnScrollRef?.current && contentWrapper) {\n const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);\n if (scrolledBy > 0) {\n const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n const cssMinHeight = parseFloat(contentWrapper.style.minHeight);\n const cssHeight = parseFloat(contentWrapper.style.height);\n const prevHeight = Math.max(cssMinHeight, cssHeight);\n\n if (prevHeight < availableHeight) {\n const nextHeight = prevHeight + scrolledBy;\n const clampedNextHeight = Math.min(availableHeight, nextHeight);\n const heightDiff = nextHeight - clampedNextHeight;\n\n contentWrapper.style.height = clampedNextHeight + 'px';\n if (contentWrapper.style.bottom === '0px') {\n viewport.scrollTop = heightDiff > 0 ? heightDiff : 0;\n // ensure the content stays pinned to the bottom\n contentWrapper.style.justifyContent = 'flex-end';\n }\n }\n }\n }\n prevScrollTopRef.current = viewport.scrollTop;\n })}\n />\n \n \n );\n }\n);\n\nSelectViewport.displayName = VIEWPORT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'SelectGroup';\n\ntype SelectGroupContextValue = { id: string };\n\nconst [SelectGroupContextProvider, useSelectGroupContext] =\n createSelectContext(GROUP_NAME);\n\ntype SelectGroupElement = React.ComponentRef;\ninterface SelectGroupProps extends PrimitiveDivProps {}\n\nconst SelectGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, ...groupProps } = props;\n const groupId = useId();\n return (\n \n \n \n );\n }\n);\n\nSelectGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'SelectLabel';\n\ntype SelectLabelElement = React.ComponentRef;\ninterface SelectLabelProps extends PrimitiveDivProps {}\n\nconst SelectLabel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, ...labelProps } = props;\n const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);\n return ;\n }\n);\n\nSelectLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'SelectItem';\n\ntype SelectItemContextValue = {\n value: string;\n disabled: boolean;\n textId: string;\n isSelected: boolean;\n onItemTextChange(node: SelectItemTextElement | null): void;\n};\n\nconst [SelectItemContextProvider, useSelectItemContext] =\n createSelectContext(ITEM_NAME);\n\ntype SelectItemElement = React.ComponentRef;\ninterface SelectItemProps extends PrimitiveDivProps {\n value: string;\n disabled?: boolean;\n textValue?: string;\n}\n\nconst SelectItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeSelect,\n value,\n disabled = false,\n textValue: textValueProp,\n ...itemProps\n } = props;\n const context = useSelectContext(ITEM_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);\n const isSelected = context.value === value;\n const [textValue, setTextValue] = React.useState(textValueProp ?? '');\n const [isFocused, setIsFocused] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) =>\n contentContext.itemRefCallback?.(node, value, disabled)\n );\n const textId = useId();\n const pointerTypeRef = React.useRef('touch');\n\n const handleSelect = () => {\n if (!disabled) {\n context.onValueChange(value);\n context.onOpenChange(false);\n }\n };\n\n if (value === '') {\n throw new Error(\n 'A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.'\n );\n }\n\n return (\n {\n setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? '').trim());\n }, [])}\n >\n \n setIsFocused(true))}\n onBlur={composeEventHandlers(itemProps.onBlur, () => setIsFocused(false))}\n onClick={composeEventHandlers(itemProps.onClick, () => {\n // Open on click when using a touch or pen device\n if (pointerTypeRef.current !== 'mouse') handleSelect();\n })}\n onPointerUp={composeEventHandlers(itemProps.onPointerUp, () => {\n // Using a mouse you should be able to do pointer down, move through\n // the list, and release the pointer over the item to select it.\n if (pointerTypeRef.current === 'mouse') handleSelect();\n })}\n onPointerDown={composeEventHandlers(itemProps.onPointerDown, (event) => {\n pointerTypeRef.current = event.pointerType;\n })}\n onPointerMove={composeEventHandlers(itemProps.onPointerMove, (event) => {\n // Remember pointer type when sliding over to this item from another one\n pointerTypeRef.current = event.pointerType;\n if (disabled) {\n contentContext.onItemLeave?.();\n } else if (pointerTypeRef.current === 'mouse') {\n // even though safari doesn't support this option, it's acceptable\n // as it only means it might scroll a few pixels when using the pointer.\n event.currentTarget.focus({ preventScroll: true });\n }\n })}\n onPointerLeave={composeEventHandlers(itemProps.onPointerLeave, (event) => {\n if (event.currentTarget === document.activeElement) {\n contentContext.onItemLeave?.();\n }\n })}\n onKeyDown={composeEventHandlers(itemProps.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef?.current !== '';\n if (isTypingAhead && event.key === ' ') return;\n if (SELECTION_KEYS.includes(event.key)) handleSelect();\n // prevent page scroll if using the space key to select an item\n if (event.key === ' ') event.preventDefault();\n })}\n />\n \n \n );\n }\n);\n\nSelectItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItemText\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_TEXT_NAME = 'SelectItemText';\n\ntype SelectItemTextElement = React.ComponentRef;\ninterface SelectItemTextProps extends PrimitiveSpanProps {}\n\nconst SelectItemText = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n // We ignore `className` and `style` as this part shouldn't be styled.\n const { __scopeSelect, className, style, ...itemTextProps } = props;\n const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);\n const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);\n const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);\n const [itemTextNode, setItemTextNode] = React.useState(null);\n const composedRefs = useComposedRefs(\n forwardedRef,\n (node) => setItemTextNode(node),\n itemContext.onItemTextChange,\n (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)\n );\n\n const textContent = itemTextNode?.textContent;\n const nativeOption = React.useMemo(\n () => (\n \n ),\n [itemContext.disabled, itemContext.value, textContent]\n );\n\n const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;\n useLayoutEffect(() => {\n onNativeOptionAdd(nativeOption);\n return () => onNativeOptionRemove(nativeOption);\n }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);\n\n return (\n <>\n \n\n {/* Portal the select item text into the trigger value node */}\n {itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren\n ? ReactDOM.createPortal(itemTextProps.children, context.valueNode)\n : null}\n \n );\n }\n);\n\nSelectItemText.displayName = ITEM_TEXT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_INDICATOR_NAME = 'SelectItemIndicator';\n\ntype SelectItemIndicatorElement = React.ComponentRef;\ninterface SelectItemIndicatorProps extends PrimitiveSpanProps {}\n\nconst SelectItemIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, ...itemIndicatorProps } = props;\n const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);\n return itemContext.isSelected ? (\n \n ) : null;\n }\n);\n\nSelectItemIndicator.displayName = ITEM_INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectScrollUpButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_UP_BUTTON_NAME = 'SelectScrollUpButton';\n\ntype SelectScrollUpButtonElement = SelectScrollButtonImplElement;\ninterface SelectScrollUpButtonProps extends Omit {}\n\nconst SelectScrollUpButton = React.forwardRef<\n SelectScrollUpButtonElement,\n SelectScrollUpButtonProps\n>((props: ScopedProps, forwardedRef) => {\n const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n const [canScrollUp, setCanScrollUp] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n\n useLayoutEffect(() => {\n if (contentContext.viewport && contentContext.isPositioned) {\n const viewport = contentContext.viewport;\n function handleScroll() {\n const canScrollUp = viewport.scrollTop > 0;\n setCanScrollUp(canScrollUp);\n }\n handleScroll();\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [contentContext.viewport, contentContext.isPositioned]);\n\n return canScrollUp ? (\n {\n const { viewport, selectedItem } = contentContext;\n if (viewport && selectedItem) {\n viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight;\n }\n }}\n />\n ) : null;\n});\n\nSelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectScrollDownButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_DOWN_BUTTON_NAME = 'SelectScrollDownButton';\n\ntype SelectScrollDownButtonElement = SelectScrollButtonImplElement;\ninterface SelectScrollDownButtonProps extends Omit {}\n\nconst SelectScrollDownButton = React.forwardRef<\n SelectScrollDownButtonElement,\n SelectScrollDownButtonProps\n>((props: ScopedProps, forwardedRef) => {\n const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n const [canScrollDown, setCanScrollDown] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n\n useLayoutEffect(() => {\n if (contentContext.viewport && contentContext.isPositioned) {\n const viewport = contentContext.viewport;\n function handleScroll() {\n const maxScroll = viewport.scrollHeight - viewport.clientHeight;\n // we use Math.ceil here because if the UI is zoomed-in\n // `scrollTop` is not always reported as an integer\n const canScrollDown = Math.ceil(viewport.scrollTop) < maxScroll;\n setCanScrollDown(canScrollDown);\n }\n handleScroll();\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [contentContext.viewport, contentContext.isPositioned]);\n\n return canScrollDown ? (\n {\n const { viewport, selectedItem } = contentContext;\n if (viewport && selectedItem) {\n viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight;\n }\n }}\n />\n ) : null;\n});\n\nSelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;\n\ntype SelectScrollButtonImplElement = React.ComponentRef;\ninterface SelectScrollButtonImplProps extends PrimitiveDivProps {\n onAutoScroll(): void;\n}\n\nconst SelectScrollButtonImpl = React.forwardRef<\n SelectScrollButtonImplElement,\n SelectScrollButtonImplProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;\n const contentContext = useSelectContentContext('SelectScrollButton', __scopeSelect);\n const autoScrollTimerRef = React.useRef(null);\n const getItems = useCollection(__scopeSelect);\n\n const clearAutoScrollTimer = React.useCallback(() => {\n if (autoScrollTimerRef.current !== null) {\n window.clearInterval(autoScrollTimerRef.current);\n autoScrollTimerRef.current = null;\n }\n }, []);\n\n React.useEffect(() => {\n return () => clearAutoScrollTimer();\n }, [clearAutoScrollTimer]);\n\n // When the viewport becomes scrollable on either side, the relevant scroll button will mount.\n // Because it is part of the normal flow, it will push down (top button) or shrink (bottom button)\n // the viewport, potentially causing the active item to now be partially out of view.\n // We re-run the `scrollIntoView` logic to make sure it stays within the viewport.\n useLayoutEffect(() => {\n const activeItem = getItems().find((item) => item.ref.current === document.activeElement);\n activeItem?.ref.current?.scrollIntoView({ block: 'nearest' });\n }, [getItems]);\n\n return (\n {\n if (autoScrollTimerRef.current === null) {\n autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n }\n })}\n onPointerMove={composeEventHandlers(scrollIndicatorProps.onPointerMove, () => {\n contentContext.onItemLeave?.();\n if (autoScrollTimerRef.current === null) {\n autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n }\n })}\n onPointerLeave={composeEventHandlers(scrollIndicatorProps.onPointerLeave, () => {\n clearAutoScrollTimer();\n })}\n />\n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * SelectSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'SelectSeparator';\n\ntype SelectSeparatorElement = React.ComponentRef;\ninterface SelectSeparatorProps extends PrimitiveDivProps {}\n\nconst SelectSeparator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, ...separatorProps } = props;\n return ;\n }\n);\n\nSelectSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'SelectArrow';\n\ntype SelectArrowElement = React.ComponentRef;\ntype PopperArrowProps = React.ComponentPropsWithoutRef;\ninterface SelectArrowProps extends PopperArrowProps {}\n\nconst SelectArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const context = useSelectContext(ARROW_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect);\n return context.open && contentContext.position === 'popper' ? (\n \n ) : null;\n }\n);\n\nSelectArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectBubbleInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUBBLE_INPUT_NAME = 'SelectBubbleInput';\n\ntype InputProps = React.ComponentPropsWithoutRef;\ninterface SwitchBubbleInputProps extends InputProps {}\n\nconst SelectBubbleInput = React.forwardRef(\n ({ __scopeSelect, value, ...props }: ScopedProps, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const prevValue = usePrevious(value);\n\n // Bubble value change to parents (e.g form change event)\n React.useEffect(() => {\n const select = ref.current;\n if (!select) return;\n\n const selectProto = window.HTMLSelectElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n selectProto,\n 'value'\n ) as PropertyDescriptor;\n const setValue = descriptor.set;\n if (prevValue !== value && setValue) {\n const event = new Event('change', { bubbles: true });\n setValue.call(select, value);\n select.dispatchEvent(event);\n }\n }, [prevValue, value]);\n\n /**\n * We purposefully use a `select` here to support form autofill as much as\n * possible.\n *\n * We purposefully do not add the `value` attribute here to allow the value\n * to be set programmatically and bubble to any parent form `onChange`\n * event. Adding the `value` will cause React to consider the programmatic\n * dispatch a duplicate and it will get swallowed.\n *\n * We use visually hidden styles rather than `display: \"none\"` because\n * Safari autofill won't work otherwise.\n */\n return (\n \n );\n }\n);\n\nSelectBubbleInput.displayName = BUBBLE_INPUT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction shouldShowPlaceholder(value?: string) {\n return value === '' || value === undefined;\n}\n\nfunction useTypeaheadSearch(onSearchChange: (search: string) => void) {\n const handleSearchChange = useCallbackRef(onSearchChange);\n const searchRef = React.useRef('');\n const timerRef = React.useRef(0);\n\n const handleTypeaheadSearch = React.useCallback(\n (key: string) => {\n const search = searchRef.current + key;\n handleSearchChange(search);\n\n (function updateSearch(value: string) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n // Reset `searchRef` 1 second after it was last updated\n if (value !== '') timerRef.current = window.setTimeout(() => updateSearch(''), 1000);\n })(search);\n },\n [handleSearchChange]\n );\n\n const resetTypeahead = React.useCallback(() => {\n searchRef.current = '';\n window.clearTimeout(timerRef.current);\n }, []);\n\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n\n return [searchRef, handleTypeaheadSearch, resetTypeahead] as const;\n}\n\n/**\n * This is the \"meat\" of the typeahead matching logic. It takes in a list of items,\n * the search and the current item, and returns the next item (or `undefined`).\n *\n * We normalize the search because if a user has repeatedly pressed a character,\n * we want the exact same behavior as if we only had that one character\n * (ie. cycle through items starting with that character)\n *\n * We also reorder the items by wrapping the array around the current item.\n * This is so we always look forward from the current item, and picking the first\n * item will always be the correct one.\n *\n * Finally, if the normalized search is exactly one character, we exclude the\n * current item from the values because otherwise it would be the first to match always\n * and focus would never move. This is as opposed to the regular case, where we\n * don't want focus to move if the current item still matches.\n */\nfunction findNextItem(\n items: T[],\n search: string,\n currentItem?: T\n) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0]! : search;\n const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;\n let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0));\n const excludeCurrentItem = normalizedSearch.length === 1;\n if (excludeCurrentItem) wrappedItems = wrappedItems.filter((v) => v !== currentItem);\n const nextItem = wrappedItems.find((item) =>\n item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextItem !== currentItem ? nextItem : undefined;\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray(array: T[], startIndex: number) {\n return array.map((_, index) => array[(startIndex + index) % array.length]!);\n}\n\nconst Root = Select;\nconst Trigger = SelectTrigger;\nconst Value = SelectValue;\nconst Icon = SelectIcon;\nconst Portal = SelectPortal;\nconst Content = SelectContent;\nconst Viewport = SelectViewport;\nconst Group = SelectGroup;\nconst Label = SelectLabel;\nconst Item = SelectItem;\nconst ItemText = SelectItemText;\nconst ItemIndicator = SelectItemIndicator;\nconst ScrollUpButton = SelectScrollUpButton;\nconst ScrollDownButton = SelectScrollDownButton;\nconst Separator = SelectSeparator;\nconst Arrow = SelectArrow;\n\nexport {\n createSelectScope,\n //\n Select,\n SelectTrigger,\n SelectValue,\n SelectIcon,\n SelectPortal,\n SelectContent,\n SelectViewport,\n SelectGroup,\n SelectLabel,\n SelectItem,\n SelectItemText,\n SelectItemIndicator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n SelectSeparator,\n SelectArrow,\n //\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Content,\n Viewport,\n Group,\n Label,\n Item,\n ItemText,\n ItemIndicator,\n ScrollUpButton,\n ScrollDownButton,\n Separator,\n Arrow,\n};\nexport type {\n SelectProps,\n SelectTriggerProps,\n SelectValueProps,\n SelectIconProps,\n SelectPortalProps,\n SelectContentProps,\n SelectViewportProps,\n SelectGroupProps,\n SelectLabelProps,\n SelectItemProps,\n SelectItemTextProps,\n SelectItemIndicatorProps,\n SelectScrollUpButtonProps,\n SelectScrollDownButtonProps,\n SelectSeparatorProps,\n SelectArrowProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA,eAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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O,CAAC,WAAW,uBAAuB,cAAc;AAC1D;AAmBA,SAAS,aACP,OACA,QACA,aACA;AACA,QAAM,aAAa,OAAO,SAAS,KAAK,MAAM,KAAK,MAAM,EAAE,MAAM,CAAC,SAAS,SAAS,OAAO,CAAC,CAAC;AAC7F,QAAM,mBAAmB,aAAa,OAAO,CAAC,IAAK;AACnD,QAAM,mBAAmB,cAAc,MAAM,QAAQ,WAAW,IAAI;AACpE,MAAI,eAAe,UAAU,OAAO,KAAK,IAAI,kBAAkB,CAAC,CAAC;AACjE,QAAM,qBAAqB,iBAAiB,WAAW;AACvD,MAAI,mBAAoB,gBAAe,aAAa,OAAO,CAAC,MAAM,MAAM,WAAW;AACnF,QAAM,WAAW,aAAa;AAAA,IAAK,CAAC,SAClC,KAAK,UAAU,YAAY,EAAE,WAAW,iBAAiB,YAAY,CAAC;AAAA,EACxE;AACA,SAAO,aAAa,cAAc,WAAW;AAC/C;AAMA,SAAS,UAAa,OAAY,YAAoB;AACpD,SAAO,MAAM,IAAO,CAAC,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,MAAM,CAAE;AAC/E;AAEA,IAAMG,QAAO;AACb,IAAM,UAAU;AAChB,IAAM,QAAQ;AACd,IAAM,OAAO;AACb,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAM,WAAW;AACjB,IAAM,QAAQ;AACd,IAAM,QAAQ;AACd,IAAM,OAAO;AACb,IAAM,WAAW;AACjB,IAAM,gBAAgB;AACtB,IAAM,iBAAiB;AACvB,IAAM,mBAAmB;AACzB,IAAM,YAAY;AAClB,IAAMC,SAAQ;", + "names": ["Arrow", "Content", "Root", "PortalPrimitive", "handleScroll", "canScrollUp", "canScrollDown", "Root", "Content", "Arrow"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f9b94f39dfddef678ef3086354f8d7413ae27e52 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.mjs @@ -0,0 +1,1196 @@ +"use client"; + +// src/select.tsx +import * as React from "react"; +import * as ReactDOM from "react-dom"; +import { clamp } from "@radix-ui/number"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { createCollection } from "@radix-ui/react-collection"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { createContextScope } from "@radix-ui/react-context"; +import { useDirection } from "@radix-ui/react-direction"; +import { DismissableLayer } from "@radix-ui/react-dismissable-layer"; +import { useFocusGuards } from "@radix-ui/react-focus-guards"; +import { FocusScope } from "@radix-ui/react-focus-scope"; +import { useId } from "@radix-ui/react-id"; +import * as PopperPrimitive from "@radix-ui/react-popper"; +import { createPopperScope } from "@radix-ui/react-popper"; +import { Portal as PortalPrimitive } from "@radix-ui/react-portal"; +import { Primitive } from "@radix-ui/react-primitive"; +import { createSlot } from "@radix-ui/react-slot"; +import { useCallbackRef } from "@radix-ui/react-use-callback-ref"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { useLayoutEffect } from "@radix-ui/react-use-layout-effect"; +import { usePrevious } from "@radix-ui/react-use-previous"; +import { VISUALLY_HIDDEN_STYLES } from "@radix-ui/react-visually-hidden"; +import { hideOthers } from "aria-hidden"; +import { RemoveScroll } from "react-remove-scroll"; +import { Fragment, jsx, jsxs } from "react/jsx-runtime"; +var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"]; +var SELECTION_KEYS = [" ", "Enter"]; +var SELECT_NAME = "Select"; +var [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME); +var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [ + createCollectionScope, + createPopperScope +]); +var usePopperScope = createPopperScope(); +var [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME); +var [SelectNativeOptionsProvider, useSelectNativeOptionsContext] = createSelectContext(SELECT_NAME); +var Select = (props) => { + const { + __scopeSelect, + children, + open: openProp, + defaultOpen, + onOpenChange, + value: valueProp, + defaultValue, + onValueChange, + dir, + name, + autoComplete, + disabled, + required, + form + } = props; + const popperScope = usePopperScope(__scopeSelect); + const [trigger, setTrigger] = React.useState(null); + const [valueNode, setValueNode] = React.useState(null); + const [valueNodeHasChildren, setValueNodeHasChildren] = React.useState(false); + const direction = useDirection(dir); + const [open, setOpen] = useControllableState({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: onOpenChange, + caller: SELECT_NAME + }); + const [value, setValue] = useControllableState({ + prop: valueProp, + defaultProp: defaultValue, + onChange: onValueChange, + caller: SELECT_NAME + }); + const triggerPointerDownPosRef = React.useRef(null); + const isFormControl = trigger ? form || !!trigger.closest("form") : true; + const [nativeOptionsSet, setNativeOptionsSet] = React.useState(/* @__PURE__ */ new Set()); + const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";"); + return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsxs( + SelectProvider, + { + required, + scope: __scopeSelect, + trigger, + onTriggerChange: setTrigger, + valueNode, + onValueNodeChange: setValueNode, + valueNodeHasChildren, + onValueNodeHasChildrenChange: setValueNodeHasChildren, + contentId: useId(), + value, + onValueChange: setValue, + open, + onOpenChange: setOpen, + dir: direction, + triggerPointerDownPosRef, + disabled, + children: [ + /* @__PURE__ */ jsx(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx( + SelectNativeOptionsProvider, + { + scope: props.__scopeSelect, + onNativeOptionAdd: React.useCallback((option) => { + setNativeOptionsSet((prev) => new Set(prev).add(option)); + }, []), + onNativeOptionRemove: React.useCallback((option) => { + setNativeOptionsSet((prev) => { + const optionsSet = new Set(prev); + optionsSet.delete(option); + return optionsSet; + }); + }, []), + children + } + ) }), + isFormControl ? /* @__PURE__ */ jsxs( + SelectBubbleInput, + { + "aria-hidden": true, + required, + tabIndex: -1, + name, + autoComplete, + value, + onChange: (event) => setValue(event.target.value), + disabled, + form, + children: [ + value === void 0 ? /* @__PURE__ */ jsx("option", { value: "" }) : null, + Array.from(nativeOptionsSet) + ] + }, + nativeSelectKey + ) : null + ] + } + ) }); +}; +Select.displayName = SELECT_NAME; +var TRIGGER_NAME = "SelectTrigger"; +var SelectTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, disabled = false, ...triggerProps } = props; + const popperScope = usePopperScope(__scopeSelect); + const context = useSelectContext(TRIGGER_NAME, __scopeSelect); + const isDisabled = context.disabled || disabled; + const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange); + const getItems = useCollection(__scopeSelect); + const pointerTypeRef = React.useRef("touch"); + const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => { + const enabledItems = getItems().filter((item) => !item.disabled); + const currentItem = enabledItems.find((item) => item.value === context.value); + const nextItem = findNextItem(enabledItems, search, currentItem); + if (nextItem !== void 0) { + context.onValueChange(nextItem.value); + } + }); + const handleOpen = (pointerEvent) => { + if (!isDisabled) { + context.onOpenChange(true); + resetTypeahead(); + } + if (pointerEvent) { + context.triggerPointerDownPosRef.current = { + x: Math.round(pointerEvent.pageX), + y: Math.round(pointerEvent.pageY) + }; + } + }; + return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + role: "combobox", + "aria-controls": context.contentId, + "aria-expanded": context.open, + "aria-required": context.required, + "aria-autocomplete": "none", + dir: context.dir, + "data-state": context.open ? "open" : "closed", + disabled: isDisabled, + "data-disabled": isDisabled ? "" : void 0, + "data-placeholder": shouldShowPlaceholder(context.value) ? "" : void 0, + ...triggerProps, + ref: composedRefs, + onClick: composeEventHandlers(triggerProps.onClick, (event) => { + event.currentTarget.focus(); + if (pointerTypeRef.current !== "mouse") { + handleOpen(event); + } + }), + onPointerDown: composeEventHandlers(triggerProps.onPointerDown, (event) => { + pointerTypeRef.current = event.pointerType; + const target = event.target; + if (target.hasPointerCapture(event.pointerId)) { + target.releasePointerCapture(event.pointerId); + } + if (event.button === 0 && event.ctrlKey === false && event.pointerType === "mouse") { + handleOpen(event); + event.preventDefault(); + } + }), + onKeyDown: composeEventHandlers(triggerProps.onKeyDown, (event) => { + const isTypingAhead = searchRef.current !== ""; + const isModifierKey = event.ctrlKey || event.altKey || event.metaKey; + if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key); + if (isTypingAhead && event.key === " ") return; + if (OPEN_KEYS.includes(event.key)) { + handleOpen(); + event.preventDefault(); + } + }) + } + ) }); + } +); +SelectTrigger.displayName = TRIGGER_NAME; +var VALUE_NAME = "SelectValue"; +var SelectValue = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props; + const context = useSelectContext(VALUE_NAME, __scopeSelect); + const { onValueNodeHasChildrenChange } = context; + const hasChildren = children !== void 0; + const composedRefs = useComposedRefs(forwardedRef, context.onValueNodeChange); + useLayoutEffect(() => { + onValueNodeHasChildrenChange(hasChildren); + }, [onValueNodeHasChildrenChange, hasChildren]); + return /* @__PURE__ */ jsx( + Primitive.span, + { + ...valueProps, + ref: composedRefs, + style: { pointerEvents: "none" }, + children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx(Fragment, { children: placeholder }) : children + } + ); + } +); +SelectValue.displayName = VALUE_NAME; +var ICON_NAME = "SelectIcon"; +var SelectIcon = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, children, ...iconProps } = props; + return /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "\u25BC" }); + } +); +SelectIcon.displayName = ICON_NAME; +var PORTAL_NAME = "SelectPortal"; +var SelectPortal = (props) => { + return /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, ...props }); +}; +SelectPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "SelectContent"; +var SelectContent = React.forwardRef( + (props, forwardedRef) => { + const context = useSelectContext(CONTENT_NAME, props.__scopeSelect); + const [fragment, setFragment] = React.useState(); + useLayoutEffect(() => { + setFragment(new DocumentFragment()); + }, []); + if (!context.open) { + const frag = fragment; + return frag ? ReactDOM.createPortal( + /* @__PURE__ */ jsx(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx("div", { children: props.children }) }) }), + frag + ) : null; + } + return /* @__PURE__ */ jsx(SelectContentImpl, { ...props, ref: forwardedRef }); + } +); +SelectContent.displayName = CONTENT_NAME; +var CONTENT_MARGIN = 10; +var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME); +var CONTENT_IMPL_NAME = "SelectContentImpl"; +var Slot = createSlot("SelectContent.RemoveScroll"); +var SelectContentImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeSelect, + position = "item-aligned", + onCloseAutoFocus, + onEscapeKeyDown, + onPointerDownOutside, + // + // PopperContent props + side, + sideOffset, + align, + alignOffset, + arrowPadding, + collisionBoundary, + collisionPadding, + sticky, + hideWhenDetached, + avoidCollisions, + // + ...contentProps + } = props; + const context = useSelectContext(CONTENT_NAME, __scopeSelect); + const [content, setContent] = React.useState(null); + const [viewport, setViewport] = React.useState(null); + const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node)); + const [selectedItem, setSelectedItem] = React.useState(null); + const [selectedItemText, setSelectedItemText] = React.useState( + null + ); + const getItems = useCollection(__scopeSelect); + const [isPositioned, setIsPositioned] = React.useState(false); + const firstValidItemFoundRef = React.useRef(false); + React.useEffect(() => { + if (content) return hideOthers(content); + }, [content]); + useFocusGuards(); + const focusFirst = React.useCallback( + (candidates) => { + const [firstItem, ...restItems] = getItems().map((item) => item.ref.current); + const [lastItem] = restItems.slice(-1); + const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement; + for (const candidate of candidates) { + if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return; + candidate?.scrollIntoView({ block: "nearest" }); + if (candidate === firstItem && viewport) viewport.scrollTop = 0; + if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight; + candidate?.focus(); + if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return; + } + }, + [getItems, viewport] + ); + const focusSelectedItem = React.useCallback( + () => focusFirst([selectedItem, content]), + [focusFirst, selectedItem, content] + ); + React.useEffect(() => { + if (isPositioned) { + focusSelectedItem(); + } + }, [isPositioned, focusSelectedItem]); + const { onOpenChange, triggerPointerDownPosRef } = context; + React.useEffect(() => { + if (content) { + let pointerMoveDelta = { x: 0, y: 0 }; + const handlePointerMove = (event) => { + pointerMoveDelta = { + x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)), + y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0)) + }; + }; + const handlePointerUp = (event) => { + if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) { + event.preventDefault(); + } else { + if (!content.contains(event.target)) { + onOpenChange(false); + } + } + document.removeEventListener("pointermove", handlePointerMove); + triggerPointerDownPosRef.current = null; + }; + if (triggerPointerDownPosRef.current !== null) { + document.addEventListener("pointermove", handlePointerMove); + document.addEventListener("pointerup", handlePointerUp, { capture: true, once: true }); + } + return () => { + document.removeEventListener("pointermove", handlePointerMove); + document.removeEventListener("pointerup", handlePointerUp, { capture: true }); + }; + } + }, [content, onOpenChange, triggerPointerDownPosRef]); + React.useEffect(() => { + const close = () => onOpenChange(false); + window.addEventListener("blur", close); + window.addEventListener("resize", close); + return () => { + window.removeEventListener("blur", close); + window.removeEventListener("resize", close); + }; + }, [onOpenChange]); + const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => { + const enabledItems = getItems().filter((item) => !item.disabled); + const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement); + const nextItem = findNextItem(enabledItems, search, currentItem); + if (nextItem) { + setTimeout(() => nextItem.ref.current.focus()); + } + }); + const itemRefCallback = React.useCallback( + (node, value, disabled) => { + const isFirstValidItem = !firstValidItemFoundRef.current && !disabled; + const isSelectedItem = context.value !== void 0 && context.value === value; + if (isSelectedItem || isFirstValidItem) { + setSelectedItem(node); + if (isFirstValidItem) firstValidItemFoundRef.current = true; + } + }, + [context.value] + ); + const handleItemLeave = React.useCallback(() => content?.focus(), [content]); + const itemTextRefCallback = React.useCallback( + (node, value, disabled) => { + const isFirstValidItem = !firstValidItemFoundRef.current && !disabled; + const isSelectedItem = context.value !== void 0 && context.value === value; + if (isSelectedItem || isFirstValidItem) { + setSelectedItemText(node); + } + }, + [context.value] + ); + const SelectPosition = position === "popper" ? SelectPopperPosition : SelectItemAlignedPosition; + const popperContentProps = SelectPosition === SelectPopperPosition ? { + side, + sideOffset, + align, + alignOffset, + arrowPadding, + collisionBoundary, + collisionPadding, + sticky, + hideWhenDetached, + avoidCollisions + } : {}; + return /* @__PURE__ */ jsx( + SelectContentProvider, + { + scope: __scopeSelect, + content, + viewport, + onViewportChange: setViewport, + itemRefCallback, + selectedItem, + onItemLeave: handleItemLeave, + itemTextRefCallback, + focusSelectedItem, + selectedItemText, + position, + isPositioned, + searchRef, + children: /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx( + FocusScope, + { + asChild: true, + trapped: context.open, + onMountAutoFocus: (event) => { + event.preventDefault(); + }, + onUnmountAutoFocus: composeEventHandlers(onCloseAutoFocus, (event) => { + context.trigger?.focus({ preventScroll: true }); + event.preventDefault(); + }), + children: /* @__PURE__ */ jsx( + DismissableLayer, + { + asChild: true, + disableOutsidePointerEvents: true, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside: (event) => event.preventDefault(), + onDismiss: () => context.onOpenChange(false), + children: /* @__PURE__ */ jsx( + SelectPosition, + { + role: "listbox", + id: context.contentId, + "data-state": context.open ? "open" : "closed", + dir: context.dir, + onContextMenu: (event) => event.preventDefault(), + ...contentProps, + ...popperContentProps, + onPlaced: () => setIsPositioned(true), + ref: composedRefs, + style: { + // flex layout so we can place the scroll buttons properly + display: "flex", + flexDirection: "column", + // reset the outline by default as the content MAY get focused + outline: "none", + ...contentProps.style + }, + onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => { + const isModifierKey = event.ctrlKey || event.altKey || event.metaKey; + if (event.key === "Tab") event.preventDefault(); + if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key); + if (["ArrowUp", "ArrowDown", "Home", "End"].includes(event.key)) { + const items = getItems().filter((item) => !item.disabled); + let candidateNodes = items.map((item) => item.ref.current); + if (["ArrowUp", "End"].includes(event.key)) { + candidateNodes = candidateNodes.slice().reverse(); + } + if (["ArrowUp", "ArrowDown"].includes(event.key)) { + const currentElement = event.target; + const currentIndex = candidateNodes.indexOf(currentElement); + candidateNodes = candidateNodes.slice(currentIndex + 1); + } + setTimeout(() => focusFirst(candidateNodes)); + event.preventDefault(); + } + }) + } + ) + } + ) + } + ) }) + } + ); + } +); +SelectContentImpl.displayName = CONTENT_IMPL_NAME; +var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition"; +var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => { + const { __scopeSelect, onPlaced, ...popperProps } = props; + const context = useSelectContext(CONTENT_NAME, __scopeSelect); + const contentContext = useSelectContentContext(CONTENT_NAME, __scopeSelect); + const [contentWrapper, setContentWrapper] = React.useState(null); + const [content, setContent] = React.useState(null); + const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node)); + const getItems = useCollection(__scopeSelect); + const shouldExpandOnScrollRef = React.useRef(false); + const shouldRepositionRef = React.useRef(true); + const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext; + const position = React.useCallback(() => { + if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) { + const triggerRect = context.trigger.getBoundingClientRect(); + const contentRect = content.getBoundingClientRect(); + const valueNodeRect = context.valueNode.getBoundingClientRect(); + const itemTextRect = selectedItemText.getBoundingClientRect(); + if (context.dir !== "rtl") { + const itemTextOffset = itemTextRect.left - contentRect.left; + const left = valueNodeRect.left - itemTextOffset; + const leftDelta = triggerRect.left - left; + const minContentWidth = triggerRect.width + leftDelta; + const contentWidth = Math.max(minContentWidth, contentRect.width); + const rightEdge = window.innerWidth - CONTENT_MARGIN; + const clampedLeft = clamp(left, [ + CONTENT_MARGIN, + // Prevents the content from going off the starting edge of the + // viewport. It may still go off the ending edge, but this can be + // controlled by the user since they may want to manage overflow in a + // specific way. + // https://github.com/radix-ui/primitives/issues/2049 + Math.max(CONTENT_MARGIN, rightEdge - contentWidth) + ]); + contentWrapper.style.minWidth = minContentWidth + "px"; + contentWrapper.style.left = clampedLeft + "px"; + } else { + const itemTextOffset = contentRect.right - itemTextRect.right; + const right = window.innerWidth - valueNodeRect.right - itemTextOffset; + const rightDelta = window.innerWidth - triggerRect.right - right; + const minContentWidth = triggerRect.width + rightDelta; + const contentWidth = Math.max(minContentWidth, contentRect.width); + const leftEdge = window.innerWidth - CONTENT_MARGIN; + const clampedRight = clamp(right, [ + CONTENT_MARGIN, + Math.max(CONTENT_MARGIN, leftEdge - contentWidth) + ]); + contentWrapper.style.minWidth = minContentWidth + "px"; + contentWrapper.style.right = clampedRight + "px"; + } + const items = getItems(); + const availableHeight = window.innerHeight - CONTENT_MARGIN * 2; + const itemsHeight = viewport.scrollHeight; + const contentStyles = window.getComputedStyle(content); + const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10); + const contentPaddingTop = parseInt(contentStyles.paddingTop, 10); + const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10); + const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10); + const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth; + const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight); + const viewportStyles = window.getComputedStyle(viewport); + const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10); + const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10); + const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN; + const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle; + const selectedItemHalfHeight = selectedItem.offsetHeight / 2; + const itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight; + const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle; + const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle; + const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle; + if (willAlignWithoutTopOverflow) { + const isLastItem = items.length > 0 && selectedItem === items[items.length - 1].ref.current; + contentWrapper.style.bottom = "0px"; + const viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight; + const clampedTriggerMiddleToBottomEdge = Math.max( + triggerMiddleToBottomEdge, + selectedItemHalfHeight + // viewport might have padding bottom, include it to avoid a scrollable viewport + (isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth + ); + const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge; + contentWrapper.style.height = height + "px"; + } else { + const isFirstItem = items.length > 0 && selectedItem === items[0].ref.current; + contentWrapper.style.top = "0px"; + const clampedTopEdgeToTriggerMiddle = Math.max( + topEdgeToTriggerMiddle, + contentBorderTopWidth + viewport.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport + (isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight + ); + const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom; + contentWrapper.style.height = height + "px"; + viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop; + } + contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`; + contentWrapper.style.minHeight = minContentHeight + "px"; + contentWrapper.style.maxHeight = availableHeight + "px"; + onPlaced?.(); + requestAnimationFrame(() => shouldExpandOnScrollRef.current = true); + } + }, [ + getItems, + context.trigger, + context.valueNode, + contentWrapper, + content, + viewport, + selectedItem, + selectedItemText, + context.dir, + onPlaced + ]); + useLayoutEffect(() => position(), [position]); + const [contentZIndex, setContentZIndex] = React.useState(); + useLayoutEffect(() => { + if (content) setContentZIndex(window.getComputedStyle(content).zIndex); + }, [content]); + const handleScrollButtonChange = React.useCallback( + (node) => { + if (node && shouldRepositionRef.current === true) { + position(); + focusSelectedItem?.(); + shouldRepositionRef.current = false; + } + }, + [position, focusSelectedItem] + ); + return /* @__PURE__ */ jsx( + SelectViewportProvider, + { + scope: __scopeSelect, + contentWrapper, + shouldExpandOnScrollRef, + onScrollButtonChange: handleScrollButtonChange, + children: /* @__PURE__ */ jsx( + "div", + { + ref: setContentWrapper, + style: { + display: "flex", + flexDirection: "column", + position: "fixed", + zIndex: contentZIndex + }, + children: /* @__PURE__ */ jsx( + Primitive.div, + { + ...popperProps, + ref: composedRefs, + style: { + // When we get the height of the content, it includes borders. If we were to set + // the height without having `boxSizing: 'border-box'` it would be too big. + boxSizing: "border-box", + // We need to ensure the content doesn't get taller than the wrapper + maxHeight: "100%", + ...popperProps.style + } + } + ) + } + ) + } + ); +}); +SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME; +var POPPER_POSITION_NAME = "SelectPopperPosition"; +var SelectPopperPosition = React.forwardRef((props, forwardedRef) => { + const { + __scopeSelect, + align = "start", + collisionPadding = CONTENT_MARGIN, + ...popperProps + } = props; + const popperScope = usePopperScope(__scopeSelect); + return /* @__PURE__ */ jsx( + PopperPrimitive.Content, + { + ...popperScope, + ...popperProps, + ref: forwardedRef, + align, + collisionPadding, + style: { + // Ensure border-box for floating-ui calculations + boxSizing: "border-box", + ...popperProps.style, + // re-namespace exposed content custom properties + ...{ + "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-select-content-available-width": "var(--radix-popper-available-width)", + "--radix-select-content-available-height": "var(--radix-popper-available-height)", + "--radix-select-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-select-trigger-height": "var(--radix-popper-anchor-height)" + } + } + } + ); +}); +SelectPopperPosition.displayName = POPPER_POSITION_NAME; +var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME, {}); +var VIEWPORT_NAME = "SelectViewport"; +var SelectViewport = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, nonce, ...viewportProps } = props; + const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect); + const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect); + const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange); + const prevScrollTopRef = React.useRef(0); + return /* @__PURE__ */ jsxs(Fragment, { children: [ + /* @__PURE__ */ jsx( + "style", + { + dangerouslySetInnerHTML: { + __html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}` + }, + nonce + } + ), + /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx( + Primitive.div, + { + "data-radix-select-viewport": "", + role: "presentation", + ...viewportProps, + ref: composedRefs, + style: { + // we use position: 'relative' here on the `viewport` so that when we call + // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport + // (independent of the scrollUpButton). + position: "relative", + flex: 1, + // Viewport should only be scrollable in the vertical direction. + // This won't work in vertical writing modes, so we'll need to + // revisit this if/when that is supported + // https://developer.chrome.com/blog/vertical-form-controls + overflow: "hidden auto", + ...viewportProps.style + }, + onScroll: composeEventHandlers(viewportProps.onScroll, (event) => { + const viewport = event.currentTarget; + const { contentWrapper, shouldExpandOnScrollRef } = viewportContext; + if (shouldExpandOnScrollRef?.current && contentWrapper) { + const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop); + if (scrolledBy > 0) { + const availableHeight = window.innerHeight - CONTENT_MARGIN * 2; + const cssMinHeight = parseFloat(contentWrapper.style.minHeight); + const cssHeight = parseFloat(contentWrapper.style.height); + const prevHeight = Math.max(cssMinHeight, cssHeight); + if (prevHeight < availableHeight) { + const nextHeight = prevHeight + scrolledBy; + const clampedNextHeight = Math.min(availableHeight, nextHeight); + const heightDiff = nextHeight - clampedNextHeight; + contentWrapper.style.height = clampedNextHeight + "px"; + if (contentWrapper.style.bottom === "0px") { + viewport.scrollTop = heightDiff > 0 ? heightDiff : 0; + contentWrapper.style.justifyContent = "flex-end"; + } + } + } + } + prevScrollTopRef.current = viewport.scrollTop; + }) + } + ) }) + ] }); + } +); +SelectViewport.displayName = VIEWPORT_NAME; +var GROUP_NAME = "SelectGroup"; +var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME); +var SelectGroup = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, ...groupProps } = props; + const groupId = useId(); + return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) }); + } +); +SelectGroup.displayName = GROUP_NAME; +var LABEL_NAME = "SelectLabel"; +var SelectLabel = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, ...labelProps } = props; + const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect); + return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef }); + } +); +SelectLabel.displayName = LABEL_NAME; +var ITEM_NAME = "SelectItem"; +var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME); +var SelectItem = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeSelect, + value, + disabled = false, + textValue: textValueProp, + ...itemProps + } = props; + const context = useSelectContext(ITEM_NAME, __scopeSelect); + const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect); + const isSelected = context.value === value; + const [textValue, setTextValue] = React.useState(textValueProp ?? ""); + const [isFocused, setIsFocused] = React.useState(false); + const composedRefs = useComposedRefs( + forwardedRef, + (node) => contentContext.itemRefCallback?.(node, value, disabled) + ); + const textId = useId(); + const pointerTypeRef = React.useRef("touch"); + const handleSelect = () => { + if (!disabled) { + context.onValueChange(value); + context.onOpenChange(false); + } + }; + if (value === "") { + throw new Error( + "A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder." + ); + } + return /* @__PURE__ */ jsx( + SelectItemContextProvider, + { + scope: __scopeSelect, + value, + disabled, + textId, + isSelected, + onItemTextChange: React.useCallback((node) => { + setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim()); + }, []), + children: /* @__PURE__ */ jsx( + Collection.ItemSlot, + { + scope: __scopeSelect, + value, + disabled, + textValue, + children: /* @__PURE__ */ jsx( + Primitive.div, + { + role: "option", + "aria-labelledby": textId, + "data-highlighted": isFocused ? "" : void 0, + "aria-selected": isSelected && isFocused, + "data-state": isSelected ? "checked" : "unchecked", + "aria-disabled": disabled || void 0, + "data-disabled": disabled ? "" : void 0, + tabIndex: disabled ? void 0 : -1, + ...itemProps, + ref: composedRefs, + onFocus: composeEventHandlers(itemProps.onFocus, () => setIsFocused(true)), + onBlur: composeEventHandlers(itemProps.onBlur, () => setIsFocused(false)), + onClick: composeEventHandlers(itemProps.onClick, () => { + if (pointerTypeRef.current !== "mouse") handleSelect(); + }), + onPointerUp: composeEventHandlers(itemProps.onPointerUp, () => { + if (pointerTypeRef.current === "mouse") handleSelect(); + }), + onPointerDown: composeEventHandlers(itemProps.onPointerDown, (event) => { + pointerTypeRef.current = event.pointerType; + }), + onPointerMove: composeEventHandlers(itemProps.onPointerMove, (event) => { + pointerTypeRef.current = event.pointerType; + if (disabled) { + contentContext.onItemLeave?.(); + } else if (pointerTypeRef.current === "mouse") { + event.currentTarget.focus({ preventScroll: true }); + } + }), + onPointerLeave: composeEventHandlers(itemProps.onPointerLeave, (event) => { + if (event.currentTarget === document.activeElement) { + contentContext.onItemLeave?.(); + } + }), + onKeyDown: composeEventHandlers(itemProps.onKeyDown, (event) => { + const isTypingAhead = contentContext.searchRef?.current !== ""; + if (isTypingAhead && event.key === " ") return; + if (SELECTION_KEYS.includes(event.key)) handleSelect(); + if (event.key === " ") event.preventDefault(); + }) + } + ) + } + ) + } + ); + } +); +SelectItem.displayName = ITEM_NAME; +var ITEM_TEXT_NAME = "SelectItemText"; +var SelectItemText = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, className, style, ...itemTextProps } = props; + const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect); + const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect); + const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect); + const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect); + const [itemTextNode, setItemTextNode] = React.useState(null); + const composedRefs = useComposedRefs( + forwardedRef, + (node) => setItemTextNode(node), + itemContext.onItemTextChange, + (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled) + ); + const textContent = itemTextNode?.textContent; + const nativeOption = React.useMemo( + () => /* @__PURE__ */ jsx("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), + [itemContext.disabled, itemContext.value, textContent] + ); + const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext; + useLayoutEffect(() => { + onNativeOptionAdd(nativeOption); + return () => onNativeOptionRemove(nativeOption); + }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]); + return /* @__PURE__ */ jsxs(Fragment, { children: [ + /* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }), + itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null + ] }); + } +); +SelectItemText.displayName = ITEM_TEXT_NAME; +var ITEM_INDICATOR_NAME = "SelectItemIndicator"; +var SelectItemIndicator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, ...itemIndicatorProps } = props; + const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect); + return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null; + } +); +SelectItemIndicator.displayName = ITEM_INDICATOR_NAME; +var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton"; +var SelectScrollUpButton = React.forwardRef((props, forwardedRef) => { + const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect); + const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect); + const [canScrollUp, setCanScrollUp] = React.useState(false); + const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange); + useLayoutEffect(() => { + if (contentContext.viewport && contentContext.isPositioned) { + let handleScroll2 = function() { + const canScrollUp2 = viewport.scrollTop > 0; + setCanScrollUp(canScrollUp2); + }; + var handleScroll = handleScroll2; + const viewport = contentContext.viewport; + handleScroll2(); + viewport.addEventListener("scroll", handleScroll2); + return () => viewport.removeEventListener("scroll", handleScroll2); + } + }, [contentContext.viewport, contentContext.isPositioned]); + return canScrollUp ? /* @__PURE__ */ jsx( + SelectScrollButtonImpl, + { + ...props, + ref: composedRefs, + onAutoScroll: () => { + const { viewport, selectedItem } = contentContext; + if (viewport && selectedItem) { + viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight; + } + } + } + ) : null; +}); +SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME; +var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton"; +var SelectScrollDownButton = React.forwardRef((props, forwardedRef) => { + const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect); + const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect); + const [canScrollDown, setCanScrollDown] = React.useState(false); + const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange); + useLayoutEffect(() => { + if (contentContext.viewport && contentContext.isPositioned) { + let handleScroll2 = function() { + const maxScroll = viewport.scrollHeight - viewport.clientHeight; + const canScrollDown2 = Math.ceil(viewport.scrollTop) < maxScroll; + setCanScrollDown(canScrollDown2); + }; + var handleScroll = handleScroll2; + const viewport = contentContext.viewport; + handleScroll2(); + viewport.addEventListener("scroll", handleScroll2); + return () => viewport.removeEventListener("scroll", handleScroll2); + } + }, [contentContext.viewport, contentContext.isPositioned]); + return canScrollDown ? /* @__PURE__ */ jsx( + SelectScrollButtonImpl, + { + ...props, + ref: composedRefs, + onAutoScroll: () => { + const { viewport, selectedItem } = contentContext; + if (viewport && selectedItem) { + viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight; + } + } + } + ) : null; +}); +SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME; +var SelectScrollButtonImpl = React.forwardRef((props, forwardedRef) => { + const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props; + const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect); + const autoScrollTimerRef = React.useRef(null); + const getItems = useCollection(__scopeSelect); + const clearAutoScrollTimer = React.useCallback(() => { + if (autoScrollTimerRef.current !== null) { + window.clearInterval(autoScrollTimerRef.current); + autoScrollTimerRef.current = null; + } + }, []); + React.useEffect(() => { + return () => clearAutoScrollTimer(); + }, [clearAutoScrollTimer]); + useLayoutEffect(() => { + const activeItem = getItems().find((item) => item.ref.current === document.activeElement); + activeItem?.ref.current?.scrollIntoView({ block: "nearest" }); + }, [getItems]); + return /* @__PURE__ */ jsx( + Primitive.div, + { + "aria-hidden": true, + ...scrollIndicatorProps, + ref: forwardedRef, + style: { flexShrink: 0, ...scrollIndicatorProps.style }, + onPointerDown: composeEventHandlers(scrollIndicatorProps.onPointerDown, () => { + if (autoScrollTimerRef.current === null) { + autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50); + } + }), + onPointerMove: composeEventHandlers(scrollIndicatorProps.onPointerMove, () => { + contentContext.onItemLeave?.(); + if (autoScrollTimerRef.current === null) { + autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50); + } + }), + onPointerLeave: composeEventHandlers(scrollIndicatorProps.onPointerLeave, () => { + clearAutoScrollTimer(); + }) + } + ); +}); +var SEPARATOR_NAME = "SelectSeparator"; +var SelectSeparator = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, ...separatorProps } = props; + return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef }); + } +); +SelectSeparator.displayName = SEPARATOR_NAME; +var ARROW_NAME = "SelectArrow"; +var SelectArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSelect, ...arrowProps } = props; + const popperScope = usePopperScope(__scopeSelect); + const context = useSelectContext(ARROW_NAME, __scopeSelect); + const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect); + return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null; + } +); +SelectArrow.displayName = ARROW_NAME; +var BUBBLE_INPUT_NAME = "SelectBubbleInput"; +var SelectBubbleInput = React.forwardRef( + ({ __scopeSelect, value, ...props }, forwardedRef) => { + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref); + const prevValue = usePrevious(value); + React.useEffect(() => { + const select = ref.current; + if (!select) return; + const selectProto = window.HTMLSelectElement.prototype; + const descriptor = Object.getOwnPropertyDescriptor( + selectProto, + "value" + ); + const setValue = descriptor.set; + if (prevValue !== value && setValue) { + const event = new Event("change", { bubbles: true }); + setValue.call(select, value); + select.dispatchEvent(event); + } + }, [prevValue, value]); + return /* @__PURE__ */ jsx( + Primitive.select, + { + ...props, + style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }, + ref: composedRefs, + defaultValue: value + } + ); + } +); +SelectBubbleInput.displayName = BUBBLE_INPUT_NAME; +function shouldShowPlaceholder(value) { + return value === "" || value === void 0; +} +function useTypeaheadSearch(onSearchChange) { + const handleSearchChange = useCallbackRef(onSearchChange); + const searchRef = React.useRef(""); + const timerRef = React.useRef(0); + const handleTypeaheadSearch = React.useCallback( + (key) => { + const search = searchRef.current + key; + handleSearchChange(search); + (function updateSearch(value) { + searchRef.current = value; + window.clearTimeout(timerRef.current); + if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3); + })(search); + }, + [handleSearchChange] + ); + const resetTypeahead = React.useCallback(() => { + searchRef.current = ""; + window.clearTimeout(timerRef.current); + }, []); + React.useEffect(() => { + return () => window.clearTimeout(timerRef.current); + }, []); + return [searchRef, handleTypeaheadSearch, resetTypeahead]; +} +function findNextItem(items, search, currentItem) { + const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]); + const normalizedSearch = isRepeated ? search[0] : search; + const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1; + let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0)); + const excludeCurrentItem = normalizedSearch.length === 1; + if (excludeCurrentItem) wrappedItems = wrappedItems.filter((v) => v !== currentItem); + const nextItem = wrappedItems.find( + (item) => item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase()) + ); + return nextItem !== currentItem ? nextItem : void 0; +} +function wrapArray(array, startIndex) { + return array.map((_, index) => array[(startIndex + index) % array.length]); +} +var Root2 = Select; +var Trigger = SelectTrigger; +var Value = SelectValue; +var Icon = SelectIcon; +var Portal = SelectPortal; +var Content2 = SelectContent; +var Viewport = SelectViewport; +var Group = SelectGroup; +var Label = SelectLabel; +var Item = SelectItem; +var ItemText = SelectItemText; +var ItemIndicator = SelectItemIndicator; +var ScrollUpButton = SelectScrollUpButton; +var ScrollDownButton = SelectScrollDownButton; +var Separator = SelectSeparator; +var Arrow2 = SelectArrow; +export { + Arrow2 as Arrow, + Content2 as Content, + Group, + Icon, + Item, + ItemIndicator, + ItemText, + Label, + Portal, + Root2 as Root, + ScrollDownButton, + ScrollUpButton, + Select, + SelectArrow, + SelectContent, + SelectGroup, + SelectIcon, + SelectItem, + SelectItemIndicator, + SelectItemText, + SelectLabel, + SelectPortal, + SelectScrollDownButton, + SelectScrollUpButton, + SelectSeparator, + SelectTrigger, + SelectValue, + SelectViewport, + Separator, + Trigger, + Value, + Viewport, + createSelectScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..58109a49f00962c2b8ca69e18832ce5f0bd42019 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/select.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { clamp } from '@radix-ui/number';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createSlot } from '@radix-ui/react-slot';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { VISUALLY_HIDDEN_STYLES } from '@radix-ui/react-visually-hidden';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\nconst OPEN_KEYS = [' ', 'Enter', 'ArrowUp', 'ArrowDown'];\nconst SELECTION_KEYS = [' ', 'Enter'];\n\n/* -------------------------------------------------------------------------------------------------\n * Select\n * -----------------------------------------------------------------------------------------------*/\n\nconst SELECT_NAME = 'Select';\n\ntype ItemData = { value: string; disabled: boolean; textValue: string };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n SelectItemElement,\n ItemData\n>(SELECT_NAME);\n\ntype ScopedProps

= P & { __scopeSelect?: Scope };\nconst [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [\n createCollectionScope,\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype SelectContextValue = {\n trigger: SelectTriggerElement | null;\n onTriggerChange(node: SelectTriggerElement | null): void;\n valueNode: SelectValueElement | null;\n onValueNodeChange(node: SelectValueElement): void;\n valueNodeHasChildren: boolean;\n onValueNodeHasChildrenChange(hasChildren: boolean): void;\n contentId: string;\n value: string | undefined;\n onValueChange(value: string): void;\n open: boolean;\n required?: boolean;\n onOpenChange(open: boolean): void;\n dir: SelectProps['dir'];\n triggerPointerDownPosRef: React.MutableRefObject<{ x: number; y: number } | null>;\n disabled?: boolean;\n};\n\nconst [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME);\n\ntype NativeOption = React.ReactElement>;\n\ntype SelectNativeOptionsContextValue = {\n onNativeOptionAdd(option: NativeOption): void;\n onNativeOptionRemove(option: NativeOption): void;\n};\nconst [SelectNativeOptionsProvider, useSelectNativeOptionsContext] =\n createSelectContext(SELECT_NAME);\n\ninterface ControlledClearableSelectProps {\n value: string | undefined;\n defaultValue?: never;\n onValueChange: (value: string | undefined) => void;\n}\n\ninterface ControlledUnclearableSelectProps {\n value: string;\n defaultValue?: never;\n onValueChange: (value: string) => void;\n}\n\ninterface UncontrolledSelectProps {\n value?: never;\n defaultValue?: string;\n onValueChange?: {\n (value: string): void;\n (value: string | undefined): void;\n };\n}\n\ntype SelectControlProps =\n | ControlledClearableSelectProps\n | ControlledUnclearableSelectProps\n | UncontrolledSelectProps;\n\ninterface SelectSharedProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n name?: string;\n autoComplete?: string;\n disabled?: boolean;\n required?: boolean;\n form?: string;\n}\n\n// TODO: Should improve typing somewhat, but this would be a breaking change.\n// Consider using in the next major version (along with some testing to be sure\n// it works as expected and doesn't cause problems)\ntype _FutureSelectProps = SelectSharedProps & SelectControlProps;\n\ntype SelectProps = SelectSharedProps & {\n value?: string;\n defaultValue?: string;\n onValueChange?(value: string): void;\n};\n\nconst Select: React.FC = (props: ScopedProps) => {\n const {\n __scopeSelect,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n value: valueProp,\n defaultValue,\n onValueChange,\n dir,\n name,\n autoComplete,\n disabled,\n required,\n form,\n } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const [trigger, setTrigger] = React.useState(null);\n const [valueNode, setValueNode] = React.useState(null);\n const [valueNodeHasChildren, setValueNodeHasChildren] = React.useState(false);\n const direction = useDirection(dir);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: SELECT_NAME,\n });\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange as any,\n caller: SELECT_NAME,\n });\n const triggerPointerDownPosRef = React.useRef<{ x: number; y: number } | null>(null);\n\n // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = trigger ? form || !!trigger.closest('form') : true;\n const [nativeOptionsSet, setNativeOptionsSet] = React.useState(new Set());\n\n // The native `select` only associates the correct default value if the corresponding\n // `option` is rendered as a child **at the same time** as itself.\n // Because it might take a few renders for our items to gather the information to build\n // the native `option`(s), we generate a key on the `select` to make sure React re-builds it\n // each time the options change.\n const nativeSelectKey = Array.from(nativeOptionsSet)\n .map((option) => option.props.value)\n .join(';');\n\n return (\n \n \n \n {\n setNativeOptionsSet((prev) => new Set(prev).add(option));\n }, [])}\n onNativeOptionRemove={React.useCallback((option) => {\n setNativeOptionsSet((prev) => {\n const optionsSet = new Set(prev);\n optionsSet.delete(option);\n return optionsSet;\n });\n }, [])}\n >\n {children}\n \n \n\n {isFormControl ? (\n setValue(event.target.value)}\n disabled={disabled}\n form={form}\n >\n {value === undefined ? \n );\n};\n\nSelect.displayName = SELECT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'SelectTrigger';\n\ntype SelectTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface SelectTriggerProps extends PrimitiveButtonProps {}\n\nconst SelectTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, disabled = false, ...triggerProps } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const context = useSelectContext(TRIGGER_NAME, __scopeSelect);\n const isDisabled = context.disabled || disabled;\n const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);\n const getItems = useCollection(__scopeSelect);\n const pointerTypeRef = React.useRef('touch');\n\n const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {\n const enabledItems = getItems().filter((item) => !item.disabled);\n const currentItem = enabledItems.find((item) => item.value === context.value);\n const nextItem = findNextItem(enabledItems, search, currentItem);\n if (nextItem !== undefined) {\n context.onValueChange(nextItem.value);\n }\n });\n\n const handleOpen = (pointerEvent?: React.MouseEvent | React.PointerEvent) => {\n if (!isDisabled) {\n context.onOpenChange(true);\n // reset typeahead when we open\n resetTypeahead();\n }\n\n if (pointerEvent) {\n context.triggerPointerDownPosRef.current = {\n x: Math.round(pointerEvent.pageX),\n y: Math.round(pointerEvent.pageY),\n };\n }\n };\n\n return (\n \n {\n // Whilst browsers generally have no issue focusing the trigger when clicking\n // on a label, Safari seems to struggle with the fact that there's no `onClick`.\n // We force `focus` in this case. Note: this doesn't create any other side-effect\n // because we are preventing default in `onPointerDown` so effectively\n // this only runs for a label \"click\"\n event.currentTarget.focus();\n\n // Open on click when using a touch or pen device\n if (pointerTypeRef.current !== 'mouse') {\n handleOpen(event);\n }\n })}\n onPointerDown={composeEventHandlers(triggerProps.onPointerDown, (event) => {\n pointerTypeRef.current = event.pointerType;\n\n // prevent implicit pointer capture\n // https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture\n const target = event.target as HTMLElement;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n }\n\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click); also not for touch\n // devices because that would open the menu on scroll. (pen devices behave as touch on iOS).\n if (event.button === 0 && event.ctrlKey === false && event.pointerType === 'mouse') {\n handleOpen(event);\n // prevent trigger from stealing focus from the active item after opening.\n event.preventDefault();\n }\n })}\n onKeyDown={composeEventHandlers(triggerProps.onKeyDown, (event) => {\n const isTypingAhead = searchRef.current !== '';\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n if (isTypingAhead && event.key === ' ') return;\n if (OPEN_KEYS.includes(event.key)) {\n handleOpen();\n event.preventDefault();\n }\n })}\n />\n \n );\n }\n);\n\nSelectTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectValue\n * -----------------------------------------------------------------------------------------------*/\n\nconst VALUE_NAME = 'SelectValue';\n\ntype SelectValueElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface SelectValueProps extends Omit {\n placeholder?: React.ReactNode;\n}\n\nconst SelectValue = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n // We ignore `className` and `style` as this part shouldn't be styled.\n const { __scopeSelect, className, style, children, placeholder = '', ...valueProps } = props;\n const context = useSelectContext(VALUE_NAME, __scopeSelect);\n const { onValueNodeHasChildrenChange } = context;\n const hasChildren = children !== undefined;\n const composedRefs = useComposedRefs(forwardedRef, context.onValueNodeChange);\n\n useLayoutEffect(() => {\n onValueNodeHasChildrenChange(hasChildren);\n }, [onValueNodeHasChildrenChange, hasChildren]);\n\n return (\n \n {shouldShowPlaceholder(context.value) ? <>{placeholder} : children}\n \n );\n }\n);\n\nSelectValue.displayName = VALUE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectIcon\n * -----------------------------------------------------------------------------------------------*/\n\nconst ICON_NAME = 'SelectIcon';\n\ntype SelectIconElement = React.ComponentRef;\ninterface SelectIconProps extends PrimitiveSpanProps {}\n\nconst SelectIcon = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, children, ...iconProps } = props;\n return (\n \n {children || '\u25BC'}\n \n );\n }\n);\n\nSelectIcon.displayName = ICON_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'SelectPortal';\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface SelectPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n}\n\nconst SelectPortal: React.FC = (props: ScopedProps) => {\n return ;\n};\n\nSelectPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'SelectContent';\n\ntype SelectContentElement = SelectContentImplElement;\ninterface SelectContentProps extends SelectContentImplProps {}\n\nconst SelectContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const context = useSelectContext(CONTENT_NAME, props.__scopeSelect);\n const [fragment, setFragment] = React.useState();\n\n // setting the fragment in `useLayoutEffect` as `DocumentFragment` doesn't exist on the server\n useLayoutEffect(() => {\n setFragment(new DocumentFragment());\n }, []);\n\n if (!context.open) {\n const frag = fragment as Element | undefined;\n return frag\n ? ReactDOM.createPortal(\n \n \n

{props.children}
\n \n ,\n frag\n )\n : null;\n }\n\n return ;\n }\n);\n\nSelectContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectContentImpl\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_MARGIN = 10;\n\ntype SelectContentContextValue = {\n content?: SelectContentElement | null;\n viewport?: SelectViewportElement | null;\n onViewportChange?: (node: SelectViewportElement | null) => void;\n itemRefCallback?: (node: SelectItemElement | null, value: string, disabled: boolean) => void;\n selectedItem?: SelectItemElement | null;\n onItemLeave?: () => void;\n itemTextRefCallback?: (\n node: SelectItemTextElement | null,\n value: string,\n disabled: boolean\n ) => void;\n focusSelectedItem?: () => void;\n selectedItemText?: SelectItemTextElement | null;\n position?: SelectContentProps['position'];\n isPositioned?: boolean;\n searchRef?: React.RefObject;\n};\n\nconst [SelectContentProvider, useSelectContentContext] =\n createSelectContext(CONTENT_NAME);\n\nconst CONTENT_IMPL_NAME = 'SelectContentImpl';\n\ntype SelectContentImplElement = SelectPopperPositionElement | SelectItemAlignedPositionElement;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype FocusScopeProps = React.ComponentPropsWithoutRef;\n\ntype SelectPopperPrivateProps = { onPlaced?: PopperContentProps['onPlaced'] };\n\ninterface SelectContentImplProps\n extends Omit,\n Omit {\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n\n position?: 'item-aligned' | 'popper';\n}\n\nconst Slot = createSlot('SelectContent.RemoveScroll');\n\nconst SelectContentImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeSelect,\n position = 'item-aligned',\n onCloseAutoFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n //\n // PopperContent props\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n hideWhenDetached,\n avoidCollisions,\n //\n ...contentProps\n } = props;\n const context = useSelectContext(CONTENT_NAME, __scopeSelect);\n const [content, setContent] = React.useState(null);\n const [viewport, setViewport] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [selectedItem, setSelectedItem] = React.useState(null);\n const [selectedItemText, setSelectedItemText] = React.useState(\n null\n );\n const getItems = useCollection(__scopeSelect);\n const [isPositioned, setIsPositioned] = React.useState(false);\n const firstValidItemFoundRef = React.useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n if (content) return hideOthers(content);\n }, [content]);\n\n // Make sure the whole tree has focus guards as our `Select` may be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n const focusFirst = React.useCallback(\n (candidates: Array) => {\n const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);\n const [lastItem] = restItems.slice(-1);\n\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate?.scrollIntoView({ block: 'nearest' });\n // viewport might have padding so scroll to its edges when focusing first/last items.\n if (candidate === firstItem && viewport) viewport.scrollTop = 0;\n if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight;\n candidate?.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n },\n [getItems, viewport]\n );\n\n const focusSelectedItem = React.useCallback(\n () => focusFirst([selectedItem, content]),\n [focusFirst, selectedItem, content]\n );\n\n // Since this is not dependent on layout, we want to ensure this runs at the same time as\n // other effects across components. Hence why we don't call `focusSelectedItem` inside `position`.\n React.useEffect(() => {\n if (isPositioned) {\n focusSelectedItem();\n }\n }, [isPositioned, focusSelectedItem]);\n\n // prevent selecting items on `pointerup` in some cases after opening from `pointerdown`\n // and close on `pointerup` outside.\n const { onOpenChange, triggerPointerDownPosRef } = context;\n React.useEffect(() => {\n if (content) {\n let pointerMoveDelta = { x: 0, y: 0 };\n\n const handlePointerMove = (event: PointerEvent) => {\n pointerMoveDelta = {\n x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)),\n y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0)),\n };\n };\n const handlePointerUp = (event: PointerEvent) => {\n // If the pointer hasn't moved by a certain threshold then we prevent selecting item on `pointerup`.\n if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {\n event.preventDefault();\n } else {\n // otherwise, if the event was outside the content, close.\n if (!content.contains(event.target as HTMLElement)) {\n onOpenChange(false);\n }\n }\n document.removeEventListener('pointermove', handlePointerMove);\n triggerPointerDownPosRef.current = null;\n };\n\n if (triggerPointerDownPosRef.current !== null) {\n document.addEventListener('pointermove', handlePointerMove);\n document.addEventListener('pointerup', handlePointerUp, { capture: true, once: true });\n }\n\n return () => {\n document.removeEventListener('pointermove', handlePointerMove);\n document.removeEventListener('pointerup', handlePointerUp, { capture: true });\n };\n }\n }, [content, onOpenChange, triggerPointerDownPosRef]);\n\n React.useEffect(() => {\n const close = () => onOpenChange(false);\n window.addEventListener('blur', close);\n window.addEventListener('resize', close);\n return () => {\n window.removeEventListener('blur', close);\n window.removeEventListener('resize', close);\n };\n }, [onOpenChange]);\n\n const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => {\n const enabledItems = getItems().filter((item) => !item.disabled);\n const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement);\n const nextItem = findNextItem(enabledItems, search, currentItem);\n if (nextItem) {\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => (nextItem.ref.current as HTMLElement).focus());\n }\n });\n\n const itemRefCallback = React.useCallback(\n (node: SelectItemElement | null, value: string, disabled: boolean) => {\n const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n const isSelectedItem = context.value !== undefined && context.value === value;\n if (isSelectedItem || isFirstValidItem) {\n setSelectedItem(node);\n if (isFirstValidItem) firstValidItemFoundRef.current = true;\n }\n },\n [context.value]\n );\n const handleItemLeave = React.useCallback(() => content?.focus(), [content]);\n const itemTextRefCallback = React.useCallback(\n (node: SelectItemTextElement | null, value: string, disabled: boolean) => {\n const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n const isSelectedItem = context.value !== undefined && context.value === value;\n if (isSelectedItem || isFirstValidItem) {\n setSelectedItemText(node);\n }\n },\n [context.value]\n );\n\n const SelectPosition = position === 'popper' ? SelectPopperPosition : SelectItemAlignedPosition;\n\n // Silently ignore props that are not supported by `SelectItemAlignedPosition`\n const popperContentProps =\n SelectPosition === SelectPopperPosition\n ? {\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n hideWhenDetached,\n avoidCollisions,\n }\n : {};\n\n return (\n \n \n {\n // we prevent open autofocus because we manually focus the selected item\n event.preventDefault();\n }}\n onUnmountAutoFocus={composeEventHandlers(onCloseAutoFocus, (event) => {\n context.trigger?.focus({ preventScroll: true });\n event.preventDefault();\n })}\n >\n event.preventDefault()}\n onDismiss={() => context.onOpenChange(false)}\n >\n event.preventDefault()}\n {...contentProps}\n {...popperContentProps}\n onPlaced={() => setIsPositioned(true)}\n ref={composedRefs}\n style={{\n // flex layout so we can place the scroll buttons properly\n display: 'flex',\n flexDirection: 'column',\n // reset the outline by default as the content MAY get focused\n outline: 'none',\n ...contentProps.style,\n }}\n onKeyDown={composeEventHandlers(contentProps.onKeyDown, (event) => {\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n\n // select should not be navigated using tab key so we prevent it\n if (event.key === 'Tab') event.preventDefault();\n\n if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n\n if (['ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n const items = getItems().filter((item) => !item.disabled);\n let candidateNodes = items.map((item) => item.ref.current!);\n\n if (['ArrowUp', 'End'].includes(event.key)) {\n candidateNodes = candidateNodes.slice().reverse();\n }\n if (['ArrowUp', 'ArrowDown'].includes(event.key)) {\n const currentElement = event.target as SelectItemElement;\n const currentIndex = candidateNodes.indexOf(currentElement);\n candidateNodes = candidateNodes.slice(currentIndex + 1);\n }\n\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */\n setTimeout(() => focusFirst(candidateNodes));\n\n event.preventDefault();\n }\n })}\n />\n \n \n \n \n );\n }\n);\n\nSelectContentImpl.displayName = CONTENT_IMPL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItemAlignedPosition\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_ALIGNED_POSITION_NAME = 'SelectItemAlignedPosition';\n\ntype SelectItemAlignedPositionElement = React.ComponentRef;\ninterface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps {}\n\nconst SelectItemAlignedPosition = React.forwardRef<\n SelectItemAlignedPositionElement,\n SelectItemAlignedPositionProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, onPlaced, ...popperProps } = props;\n const context = useSelectContext(CONTENT_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(CONTENT_NAME, __scopeSelect);\n const [contentWrapper, setContentWrapper] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const getItems = useCollection(__scopeSelect);\n const shouldExpandOnScrollRef = React.useRef(false);\n const shouldRepositionRef = React.useRef(true);\n\n const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;\n const position = React.useCallback(() => {\n if (\n context.trigger &&\n context.valueNode &&\n contentWrapper &&\n content &&\n viewport &&\n selectedItem &&\n selectedItemText\n ) {\n const triggerRect = context.trigger.getBoundingClientRect();\n\n // -----------------------------------------------------------------------------------------\n // Horizontal positioning\n // -----------------------------------------------------------------------------------------\n const contentRect = content.getBoundingClientRect();\n const valueNodeRect = context.valueNode.getBoundingClientRect();\n const itemTextRect = selectedItemText.getBoundingClientRect();\n\n if (context.dir !== 'rtl') {\n const itemTextOffset = itemTextRect.left - contentRect.left;\n const left = valueNodeRect.left - itemTextOffset;\n const leftDelta = triggerRect.left - left;\n const minContentWidth = triggerRect.width + leftDelta;\n const contentWidth = Math.max(minContentWidth, contentRect.width);\n const rightEdge = window.innerWidth - CONTENT_MARGIN;\n const clampedLeft = clamp(left, [\n CONTENT_MARGIN,\n // Prevents the content from going off the starting edge of the\n // viewport. It may still go off the ending edge, but this can be\n // controlled by the user since they may want to manage overflow in a\n // specific way.\n // https://github.com/radix-ui/primitives/issues/2049\n Math.max(CONTENT_MARGIN, rightEdge - contentWidth),\n ]);\n\n contentWrapper.style.minWidth = minContentWidth + 'px';\n contentWrapper.style.left = clampedLeft + 'px';\n } else {\n const itemTextOffset = contentRect.right - itemTextRect.right;\n const right = window.innerWidth - valueNodeRect.right - itemTextOffset;\n const rightDelta = window.innerWidth - triggerRect.right - right;\n const minContentWidth = triggerRect.width + rightDelta;\n const contentWidth = Math.max(minContentWidth, contentRect.width);\n const leftEdge = window.innerWidth - CONTENT_MARGIN;\n const clampedRight = clamp(right, [\n CONTENT_MARGIN,\n Math.max(CONTENT_MARGIN, leftEdge - contentWidth),\n ]);\n\n contentWrapper.style.minWidth = minContentWidth + 'px';\n contentWrapper.style.right = clampedRight + 'px';\n }\n\n // -----------------------------------------------------------------------------------------\n // Vertical positioning\n // -----------------------------------------------------------------------------------------\n const items = getItems();\n const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n const itemsHeight = viewport.scrollHeight;\n\n const contentStyles = window.getComputedStyle(content);\n const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);\n const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);\n const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);\n const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10);\n const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth; // prettier-ignore\n const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight);\n\n const viewportStyles = window.getComputedStyle(viewport);\n const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10);\n const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10);\n\n const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN;\n const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;\n\n const selectedItemHalfHeight = selectedItem.offsetHeight / 2;\n const itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight;\n const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;\n const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;\n\n const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle;\n\n if (willAlignWithoutTopOverflow) {\n const isLastItem =\n items.length > 0 && selectedItem === items[items.length - 1]!.ref.current;\n contentWrapper.style.bottom = 0 + 'px';\n const viewportOffsetBottom =\n content.clientHeight - viewport.offsetTop - viewport.offsetHeight;\n const clampedTriggerMiddleToBottomEdge = Math.max(\n triggerMiddleToBottomEdge,\n selectedItemHalfHeight +\n // viewport might have padding bottom, include it to avoid a scrollable viewport\n (isLastItem ? viewportPaddingBottom : 0) +\n viewportOffsetBottom +\n contentBorderBottomWidth\n );\n const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;\n contentWrapper.style.height = height + 'px';\n } else {\n const isFirstItem = items.length > 0 && selectedItem === items[0]!.ref.current;\n contentWrapper.style.top = 0 + 'px';\n const clampedTopEdgeToTriggerMiddle = Math.max(\n topEdgeToTriggerMiddle,\n contentBorderTopWidth +\n viewport.offsetTop +\n // viewport might have padding top, include it to avoid a scrollable viewport\n (isFirstItem ? viewportPaddingTop : 0) +\n selectedItemHalfHeight\n );\n const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;\n contentWrapper.style.height = height + 'px';\n viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop;\n }\n\n contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`;\n contentWrapper.style.minHeight = minContentHeight + 'px';\n contentWrapper.style.maxHeight = availableHeight + 'px';\n // -----------------------------------------------------------------------------------------\n\n onPlaced?.();\n\n // we don't want the initial scroll position adjustment to trigger \"expand on scroll\"\n // so we explicitly turn it on only after they've registered.\n requestAnimationFrame(() => (shouldExpandOnScrollRef.current = true));\n }\n }, [\n getItems,\n context.trigger,\n context.valueNode,\n contentWrapper,\n content,\n viewport,\n selectedItem,\n selectedItemText,\n context.dir,\n onPlaced,\n ]);\n\n useLayoutEffect(() => position(), [position]);\n\n // copy z-index from content to wrapper\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n\n // When the viewport becomes scrollable at the top, the scroll up button will mount.\n // Because it is part of the normal flow, it will push down the viewport, thus throwing our\n // trigger => selectedItem alignment off by the amount the viewport was pushed down.\n // We wait for this to happen and then re-run the positining logic one more time to account for it.\n const handleScrollButtonChange = React.useCallback(\n (node: SelectScrollButtonImplElement | null) => {\n if (node && shouldRepositionRef.current === true) {\n position();\n focusSelectedItem?.();\n shouldRepositionRef.current = false;\n }\n },\n [position, focusSelectedItem]\n );\n\n return (\n \n \n \n \n \n );\n});\n\nSelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectPopperPosition\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPPER_POSITION_NAME = 'SelectPopperPosition';\n\ntype SelectPopperPositionElement = React.ComponentRef;\ntype PopperContentProps = React.ComponentPropsWithoutRef;\ninterface SelectPopperPositionProps extends PopperContentProps, SelectPopperPrivateProps {}\n\nconst SelectPopperPosition = React.forwardRef<\n SelectPopperPositionElement,\n SelectPopperPositionProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n __scopeSelect,\n align = 'start',\n collisionPadding = CONTENT_MARGIN,\n ...popperProps\n } = props;\n const popperScope = usePopperScope(__scopeSelect);\n\n return (\n \n );\n});\n\nSelectPopperPosition.displayName = POPPER_POSITION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectViewport\n * -----------------------------------------------------------------------------------------------*/\n\ntype SelectViewportContextValue = {\n contentWrapper?: HTMLDivElement | null;\n shouldExpandOnScrollRef?: React.RefObject;\n onScrollButtonChange?: (node: SelectScrollButtonImplElement | null) => void;\n};\n\nconst [SelectViewportProvider, useSelectViewportContext] =\n createSelectContext(CONTENT_NAME, {});\n\nconst VIEWPORT_NAME = 'SelectViewport';\n\ntype SelectViewportElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface SelectViewportProps extends PrimitiveDivProps {\n nonce?: string;\n}\n\nconst SelectViewport = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, nonce, ...viewportProps } = props;\n const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);\n const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);\n const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);\n const prevScrollTopRef = React.useRef(0);\n return (\n <>\n {/* Hide scrollbars cross-browser and enable momentum scroll for touch devices */}\n \n \n {\n const viewport = event.currentTarget;\n const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;\n if (shouldExpandOnScrollRef?.current && contentWrapper) {\n const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);\n if (scrolledBy > 0) {\n const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n const cssMinHeight = parseFloat(contentWrapper.style.minHeight);\n const cssHeight = parseFloat(contentWrapper.style.height);\n const prevHeight = Math.max(cssMinHeight, cssHeight);\n\n if (prevHeight < availableHeight) {\n const nextHeight = prevHeight + scrolledBy;\n const clampedNextHeight = Math.min(availableHeight, nextHeight);\n const heightDiff = nextHeight - clampedNextHeight;\n\n contentWrapper.style.height = clampedNextHeight + 'px';\n if (contentWrapper.style.bottom === '0px') {\n viewport.scrollTop = heightDiff > 0 ? heightDiff : 0;\n // ensure the content stays pinned to the bottom\n contentWrapper.style.justifyContent = 'flex-end';\n }\n }\n }\n }\n prevScrollTopRef.current = viewport.scrollTop;\n })}\n />\n \n \n );\n }\n);\n\nSelectViewport.displayName = VIEWPORT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'SelectGroup';\n\ntype SelectGroupContextValue = { id: string };\n\nconst [SelectGroupContextProvider, useSelectGroupContext] =\n createSelectContext(GROUP_NAME);\n\ntype SelectGroupElement = React.ComponentRef;\ninterface SelectGroupProps extends PrimitiveDivProps {}\n\nconst SelectGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, ...groupProps } = props;\n const groupId = useId();\n return (\n \n \n \n );\n }\n);\n\nSelectGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'SelectLabel';\n\ntype SelectLabelElement = React.ComponentRef;\ninterface SelectLabelProps extends PrimitiveDivProps {}\n\nconst SelectLabel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, ...labelProps } = props;\n const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);\n return ;\n }\n);\n\nSelectLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'SelectItem';\n\ntype SelectItemContextValue = {\n value: string;\n disabled: boolean;\n textId: string;\n isSelected: boolean;\n onItemTextChange(node: SelectItemTextElement | null): void;\n};\n\nconst [SelectItemContextProvider, useSelectItemContext] =\n createSelectContext(ITEM_NAME);\n\ntype SelectItemElement = React.ComponentRef;\ninterface SelectItemProps extends PrimitiveDivProps {\n value: string;\n disabled?: boolean;\n textValue?: string;\n}\n\nconst SelectItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeSelect,\n value,\n disabled = false,\n textValue: textValueProp,\n ...itemProps\n } = props;\n const context = useSelectContext(ITEM_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);\n const isSelected = context.value === value;\n const [textValue, setTextValue] = React.useState(textValueProp ?? '');\n const [isFocused, setIsFocused] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) =>\n contentContext.itemRefCallback?.(node, value, disabled)\n );\n const textId = useId();\n const pointerTypeRef = React.useRef('touch');\n\n const handleSelect = () => {\n if (!disabled) {\n context.onValueChange(value);\n context.onOpenChange(false);\n }\n };\n\n if (value === '') {\n throw new Error(\n 'A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.'\n );\n }\n\n return (\n {\n setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? '').trim());\n }, [])}\n >\n \n setIsFocused(true))}\n onBlur={composeEventHandlers(itemProps.onBlur, () => setIsFocused(false))}\n onClick={composeEventHandlers(itemProps.onClick, () => {\n // Open on click when using a touch or pen device\n if (pointerTypeRef.current !== 'mouse') handleSelect();\n })}\n onPointerUp={composeEventHandlers(itemProps.onPointerUp, () => {\n // Using a mouse you should be able to do pointer down, move through\n // the list, and release the pointer over the item to select it.\n if (pointerTypeRef.current === 'mouse') handleSelect();\n })}\n onPointerDown={composeEventHandlers(itemProps.onPointerDown, (event) => {\n pointerTypeRef.current = event.pointerType;\n })}\n onPointerMove={composeEventHandlers(itemProps.onPointerMove, (event) => {\n // Remember pointer type when sliding over to this item from another one\n pointerTypeRef.current = event.pointerType;\n if (disabled) {\n contentContext.onItemLeave?.();\n } else if (pointerTypeRef.current === 'mouse') {\n // even though safari doesn't support this option, it's acceptable\n // as it only means it might scroll a few pixels when using the pointer.\n event.currentTarget.focus({ preventScroll: true });\n }\n })}\n onPointerLeave={composeEventHandlers(itemProps.onPointerLeave, (event) => {\n if (event.currentTarget === document.activeElement) {\n contentContext.onItemLeave?.();\n }\n })}\n onKeyDown={composeEventHandlers(itemProps.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef?.current !== '';\n if (isTypingAhead && event.key === ' ') return;\n if (SELECTION_KEYS.includes(event.key)) handleSelect();\n // prevent page scroll if using the space key to select an item\n if (event.key === ' ') event.preventDefault();\n })}\n />\n \n \n );\n }\n);\n\nSelectItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItemText\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_TEXT_NAME = 'SelectItemText';\n\ntype SelectItemTextElement = React.ComponentRef;\ninterface SelectItemTextProps extends PrimitiveSpanProps {}\n\nconst SelectItemText = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n // We ignore `className` and `style` as this part shouldn't be styled.\n const { __scopeSelect, className, style, ...itemTextProps } = props;\n const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);\n const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);\n const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);\n const [itemTextNode, setItemTextNode] = React.useState(null);\n const composedRefs = useComposedRefs(\n forwardedRef,\n (node) => setItemTextNode(node),\n itemContext.onItemTextChange,\n (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)\n );\n\n const textContent = itemTextNode?.textContent;\n const nativeOption = React.useMemo(\n () => (\n \n ),\n [itemContext.disabled, itemContext.value, textContent]\n );\n\n const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;\n useLayoutEffect(() => {\n onNativeOptionAdd(nativeOption);\n return () => onNativeOptionRemove(nativeOption);\n }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);\n\n return (\n <>\n \n\n {/* Portal the select item text into the trigger value node */}\n {itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren\n ? ReactDOM.createPortal(itemTextProps.children, context.valueNode)\n : null}\n \n );\n }\n);\n\nSelectItemText.displayName = ITEM_TEXT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_INDICATOR_NAME = 'SelectItemIndicator';\n\ntype SelectItemIndicatorElement = React.ComponentRef;\ninterface SelectItemIndicatorProps extends PrimitiveSpanProps {}\n\nconst SelectItemIndicator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, ...itemIndicatorProps } = props;\n const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);\n return itemContext.isSelected ? (\n \n ) : null;\n }\n);\n\nSelectItemIndicator.displayName = ITEM_INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectScrollUpButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_UP_BUTTON_NAME = 'SelectScrollUpButton';\n\ntype SelectScrollUpButtonElement = SelectScrollButtonImplElement;\ninterface SelectScrollUpButtonProps extends Omit {}\n\nconst SelectScrollUpButton = React.forwardRef<\n SelectScrollUpButtonElement,\n SelectScrollUpButtonProps\n>((props: ScopedProps, forwardedRef) => {\n const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n const [canScrollUp, setCanScrollUp] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n\n useLayoutEffect(() => {\n if (contentContext.viewport && contentContext.isPositioned) {\n const viewport = contentContext.viewport;\n function handleScroll() {\n const canScrollUp = viewport.scrollTop > 0;\n setCanScrollUp(canScrollUp);\n }\n handleScroll();\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [contentContext.viewport, contentContext.isPositioned]);\n\n return canScrollUp ? (\n {\n const { viewport, selectedItem } = contentContext;\n if (viewport && selectedItem) {\n viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight;\n }\n }}\n />\n ) : null;\n});\n\nSelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectScrollDownButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_DOWN_BUTTON_NAME = 'SelectScrollDownButton';\n\ntype SelectScrollDownButtonElement = SelectScrollButtonImplElement;\ninterface SelectScrollDownButtonProps extends Omit {}\n\nconst SelectScrollDownButton = React.forwardRef<\n SelectScrollDownButtonElement,\n SelectScrollDownButtonProps\n>((props: ScopedProps, forwardedRef) => {\n const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n const [canScrollDown, setCanScrollDown] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n\n useLayoutEffect(() => {\n if (contentContext.viewport && contentContext.isPositioned) {\n const viewport = contentContext.viewport;\n function handleScroll() {\n const maxScroll = viewport.scrollHeight - viewport.clientHeight;\n // we use Math.ceil here because if the UI is zoomed-in\n // `scrollTop` is not always reported as an integer\n const canScrollDown = Math.ceil(viewport.scrollTop) < maxScroll;\n setCanScrollDown(canScrollDown);\n }\n handleScroll();\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [contentContext.viewport, contentContext.isPositioned]);\n\n return canScrollDown ? (\n {\n const { viewport, selectedItem } = contentContext;\n if (viewport && selectedItem) {\n viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight;\n }\n }}\n />\n ) : null;\n});\n\nSelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;\n\ntype SelectScrollButtonImplElement = React.ComponentRef;\ninterface SelectScrollButtonImplProps extends PrimitiveDivProps {\n onAutoScroll(): void;\n}\n\nconst SelectScrollButtonImpl = React.forwardRef<\n SelectScrollButtonImplElement,\n SelectScrollButtonImplProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;\n const contentContext = useSelectContentContext('SelectScrollButton', __scopeSelect);\n const autoScrollTimerRef = React.useRef(null);\n const getItems = useCollection(__scopeSelect);\n\n const clearAutoScrollTimer = React.useCallback(() => {\n if (autoScrollTimerRef.current !== null) {\n window.clearInterval(autoScrollTimerRef.current);\n autoScrollTimerRef.current = null;\n }\n }, []);\n\n React.useEffect(() => {\n return () => clearAutoScrollTimer();\n }, [clearAutoScrollTimer]);\n\n // When the viewport becomes scrollable on either side, the relevant scroll button will mount.\n // Because it is part of the normal flow, it will push down (top button) or shrink (bottom button)\n // the viewport, potentially causing the active item to now be partially out of view.\n // We re-run the `scrollIntoView` logic to make sure it stays within the viewport.\n useLayoutEffect(() => {\n const activeItem = getItems().find((item) => item.ref.current === document.activeElement);\n activeItem?.ref.current?.scrollIntoView({ block: 'nearest' });\n }, [getItems]);\n\n return (\n {\n if (autoScrollTimerRef.current === null) {\n autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n }\n })}\n onPointerMove={composeEventHandlers(scrollIndicatorProps.onPointerMove, () => {\n contentContext.onItemLeave?.();\n if (autoScrollTimerRef.current === null) {\n autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n }\n })}\n onPointerLeave={composeEventHandlers(scrollIndicatorProps.onPointerLeave, () => {\n clearAutoScrollTimer();\n })}\n />\n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * SelectSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'SelectSeparator';\n\ntype SelectSeparatorElement = React.ComponentRef;\ninterface SelectSeparatorProps extends PrimitiveDivProps {}\n\nconst SelectSeparator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, ...separatorProps } = props;\n return ;\n }\n);\n\nSelectSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'SelectArrow';\n\ntype SelectArrowElement = React.ComponentRef;\ntype PopperArrowProps = React.ComponentPropsWithoutRef;\ninterface SelectArrowProps extends PopperArrowProps {}\n\nconst SelectArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSelect, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const context = useSelectContext(ARROW_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect);\n return context.open && contentContext.position === 'popper' ? (\n \n ) : null;\n }\n);\n\nSelectArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectBubbleInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUBBLE_INPUT_NAME = 'SelectBubbleInput';\n\ntype InputProps = React.ComponentPropsWithoutRef;\ninterface SwitchBubbleInputProps extends InputProps {}\n\nconst SelectBubbleInput = React.forwardRef(\n ({ __scopeSelect, value, ...props }: ScopedProps, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const prevValue = usePrevious(value);\n\n // Bubble value change to parents (e.g form change event)\n React.useEffect(() => {\n const select = ref.current;\n if (!select) return;\n\n const selectProto = window.HTMLSelectElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n selectProto,\n 'value'\n ) as PropertyDescriptor;\n const setValue = descriptor.set;\n if (prevValue !== value && setValue) {\n const event = new Event('change', { bubbles: true });\n setValue.call(select, value);\n select.dispatchEvent(event);\n }\n }, [prevValue, value]);\n\n /**\n * We purposefully use a `select` here to support form autofill as much as\n * possible.\n *\n * We purposefully do not add the `value` attribute here to allow the value\n * to be set programmatically and bubble to any parent form `onChange`\n * event. Adding the `value` will cause React to consider the programmatic\n * dispatch a duplicate and it will get swallowed.\n *\n * We use visually hidden styles rather than `display: \"none\"` because\n * Safari autofill won't work otherwise.\n */\n return (\n \n );\n }\n);\n\nSelectBubbleInput.displayName = BUBBLE_INPUT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction shouldShowPlaceholder(value?: string) {\n return value === '' || value === undefined;\n}\n\nfunction useTypeaheadSearch(onSearchChange: (search: string) => void) {\n const handleSearchChange = useCallbackRef(onSearchChange);\n const searchRef = React.useRef('');\n const timerRef = React.useRef(0);\n\n const handleTypeaheadSearch = React.useCallback(\n (key: string) => {\n const search = searchRef.current + key;\n handleSearchChange(search);\n\n (function updateSearch(value: string) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n // Reset `searchRef` 1 second after it was last updated\n if (value !== '') timerRef.current = window.setTimeout(() => updateSearch(''), 1000);\n })(search);\n },\n [handleSearchChange]\n );\n\n const resetTypeahead = React.useCallback(() => {\n searchRef.current = '';\n window.clearTimeout(timerRef.current);\n }, []);\n\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n\n return [searchRef, handleTypeaheadSearch, resetTypeahead] as const;\n}\n\n/**\n * This is the \"meat\" of the typeahead matching logic. It takes in a list of items,\n * the search and the current item, and returns the next item (or `undefined`).\n *\n * We normalize the search because if a user has repeatedly pressed a character,\n * we want the exact same behavior as if we only had that one character\n * (ie. cycle through items starting with that character)\n *\n * We also reorder the items by wrapping the array around the current item.\n * This is so we always look forward from the current item, and picking the first\n * item will always be the correct one.\n *\n * Finally, if the normalized search is exactly one character, we exclude the\n * current item from the values because otherwise it would be the first to match always\n * and focus would never move. This is as opposed to the regular case, where we\n * don't want focus to move if the current item still matches.\n */\nfunction findNextItem(\n items: T[],\n search: string,\n currentItem?: T\n) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0]! : search;\n const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;\n let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0));\n const excludeCurrentItem = normalizedSearch.length === 1;\n if (excludeCurrentItem) wrappedItems = wrappedItems.filter((v) => v !== currentItem);\n const nextItem = wrappedItems.find((item) =>\n item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextItem !== currentItem ? nextItem : undefined;\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray(array: T[], startIndex: number) {\n return array.map((_, index) => array[(startIndex + index) % array.length]!);\n}\n\nconst Root = Select;\nconst Trigger = SelectTrigger;\nconst Value = SelectValue;\nconst Icon = SelectIcon;\nconst Portal = SelectPortal;\nconst Content = SelectContent;\nconst Viewport = SelectViewport;\nconst Group = SelectGroup;\nconst Label = SelectLabel;\nconst Item = SelectItem;\nconst ItemText = SelectItemText;\nconst ItemIndicator = SelectItemIndicator;\nconst ScrollUpButton = SelectScrollUpButton;\nconst ScrollDownButton = SelectScrollDownButton;\nconst Separator = SelectSeparator;\nconst Arrow = SelectArrow;\n\nexport {\n createSelectScope,\n //\n Select,\n SelectTrigger,\n SelectValue,\n SelectIcon,\n SelectPortal,\n SelectContent,\n SelectViewport,\n SelectGroup,\n SelectLabel,\n SelectItem,\n SelectItemText,\n SelectItemIndicator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n SelectSeparator,\n SelectArrow,\n //\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Content,\n Viewport,\n Group,\n Label,\n Item,\n ItemText,\n ItemIndicator,\n ScrollUpButton,\n ScrollDownButton,\n Separator,\n Arrow,\n};\nexport type {\n SelectProps,\n SelectTriggerProps,\n SelectValueProps,\n SelectIconProps,\n SelectPortalProps,\n SelectContentProps,\n SelectViewportProps,\n SelectGroupProps,\n SelectLabelProps,\n SelectItemProps,\n SelectItemTextProps,\n SelectItemIndicatorProps,\n SelectScrollUpButtonProps,\n SelectScrollDownButtonProps,\n SelectSeparatorProps,\n SelectArrowProps,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,YAAY,cAAc;AAC1B,SAAS,aAAa;AACtB,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,aAAa;AACtB,YAAY,qBAAqB;AACjC,SAAS,yBAAyB;AAClC,SAAS,UAAU,uBAAuB;AAC1C,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,8BAA8B;AACvC,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AA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,WAAW,iBAAiB,YAAY,CAAC;AAAA,EACxE;AACA,SAAO,aAAa,cAAc,WAAW;AAC/C;AAMA,SAAS,UAAa,OAAY,YAAoB;AACpD,SAAO,MAAM,IAAO,CAAC,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,MAAM,CAAE;AAC/E;AAEA,IAAMG,QAAO;AACb,IAAM,UAAU;AAChB,IAAM,QAAQ;AACd,IAAM,OAAO;AACb,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAM,WAAW;AACjB,IAAM,QAAQ;AACd,IAAM,QAAQ;AACd,IAAM,OAAO;AACb,IAAM,WAAW;AACjB,IAAM,gBAAgB;AACtB,IAAM,iBAAiB;AACvB,IAAM,mBAAmB;AACzB,IAAM,YAAY;AAClB,IAAMC,SAAQ;", + "names": ["handleScroll", "canScrollUp", "canScrollDown", "Root", "Content", "Arrow"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/package.json b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/package.json new file mode 100644 index 0000000000000000000000000000000000000000..c57bfc8a0663ef1d73f484ed49cd2fa3cf6a0c2e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_a30c7edeed55a43616cc68fefdd9dc18/node_modules/@radix-ui/react-select/package.json @@ -0,0 +1,89 @@ +{ + "name": "@radix-ui/react-select", + "version": "2.2.6", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.6.3", + "@radix-ui/number": "1.1.1", + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-collection": "1.1.7", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-focus-guards": "1.1.3", + "@radix-ui/react-focus-scope": "1.1.7", + "@radix-ui/react-dismissable-layer": "1.1.11", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-popper": "1.2.8", + "@radix-ui/react-portal": "1.1.9", + "@radix-ui/react-slot": "1.2.3", + "@radix-ui/react-use-callback-ref": "1.1.1", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-use-layout-effect": "1.1.1", + "@radix-ui/react-use-previous": "1.1.1", + "@radix-ui/react-visually-hidden": "1.2.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/test-data": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/LICENSE b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/README.md b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4f5ae03f6456767278bb67699bb25e43a3182cc2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/README.md @@ -0,0 +1,3 @@ +# `react-separator` + +View docs [here](https://radix-ui.com/primitives/docs/components/separator). diff --git a/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..3b12737e45e6b72a92bb9a9086071f4e1a67f3a6 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.d.mts @@ -0,0 +1,21 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const ORIENTATIONS: readonly ["horizontal", "vertical"]; +type Orientation = (typeof ORIENTATIONS)[number]; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface SeparatorProps extends PrimitiveDivProps { + /** + * Either `vertical` or `horizontal`. Defaults to `horizontal`. + */ + orientation?: Orientation; + /** + * Whether or not the component is purely decorative. When true, accessibility-related attributes + * are updated so that that the rendered element is removed from the accessibility tree. + */ + decorative?: boolean; +} +declare const Separator: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { Root, Separator, type SeparatorProps }; diff --git a/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3b12737e45e6b72a92bb9a9086071f4e1a67f3a6 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.d.ts @@ -0,0 +1,21 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const ORIENTATIONS: readonly ["horizontal", "vertical"]; +type Orientation = (typeof ORIENTATIONS)[number]; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface SeparatorProps extends PrimitiveDivProps { + /** + * Either `vertical` or `horizontal`. Defaults to `horizontal`. + */ + orientation?: Orientation; + /** + * Whether or not the component is purely decorative. When true, accessibility-related attributes + * are updated so that that the rendered element is removed from the accessibility tree. + */ + decorative?: boolean; +} +declare const Separator: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { Root, Separator, type SeparatorProps }; diff --git a/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.js b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..4332e8c4c425944be01f3cc75c2b1f8ac2a5e96a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.js @@ -0,0 +1,65 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Root: () => Root, + Separator: () => Separator +}); +module.exports = __toCommonJS(index_exports); + +// src/separator.tsx +var React = __toESM(require("react")); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_jsx_runtime = require("react/jsx-runtime"); +var NAME = "Separator"; +var DEFAULT_ORIENTATION = "horizontal"; +var ORIENTATIONS = ["horizontal", "vertical"]; +var Separator = React.forwardRef((props, forwardedRef) => { + const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props; + const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION; + const ariaOrientation = orientation === "vertical" ? orientation : void 0; + const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" }; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "data-orientation": orientation, + ...semanticProps, + ...domProps, + ref: forwardedRef + } + ); +}); +Separator.displayName = NAME; +function isValidOrientation(orientation) { + return ORIENTATIONS.includes(orientation); +} +var Root = Separator; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5c4efaf7e8a9d2b87a929edf8a34df2492265a0b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/separator.tsx"], + "sourcesContent": ["export {\n Separator,\n //\n Root,\n} from './separator';\nexport type { SeparatorProps } from './separator';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Separator\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Separator';\nconst DEFAULT_ORIENTATION = 'horizontal';\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const;\n\ntype Orientation = (typeof ORIENTATIONS)[number];\ntype SeparatorElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface SeparatorProps extends PrimitiveDivProps {\n /**\n * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n */\n orientation?: Orientation;\n /**\n * Whether or not the component is purely decorative. When true, accessibility-related attributes\n * are updated so that that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean;\n}\n\nconst Separator = React.forwardRef((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n // `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical\n const ariaOrientation = orientation === 'vertical' ? orientation : undefined;\n const semanticProps = decorative\n ? { role: 'none' }\n : { 'aria-orientation': ariaOrientation, role: 'separator' };\n\n return (\n \n );\n});\n\nSeparator.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction isValidOrientation(orientation: any): orientation is Orientation {\n return ORIENTATIONS.includes(orientation);\n}\n\nconst Root = Separator;\n\nexport {\n Separator,\n //\n Root,\n};\nexport type { SeparatorProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AAmCtB;AA7BJ,IAAM,OAAO;AACb,IAAM,sBAAsB;AAC5B,IAAM,eAAe,CAAC,cAAc,UAAU;AAiB9C,IAAM,YAAkB,iBAA6C,CAAC,OAAO,iBAAiB;AAC5F,QAAM,EAAE,YAAY,aAAa,kBAAkB,qBAAqB,GAAG,SAAS,IAAI;AACxF,QAAM,cAAc,mBAAmB,eAAe,IAAI,kBAAkB;AAE5E,QAAM,kBAAkB,gBAAgB,aAAa,cAAc;AACnE,QAAM,gBAAgB,aAClB,EAAE,MAAM,OAAO,IACf,EAAE,oBAAoB,iBAAiB,MAAM,YAAY;AAE7D,SACE;AAAA,IAAC,iCAAU;AAAA,IAAV;AAAA,MACC,oBAAkB;AAAA,MACjB,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,KAAK;AAAA;AAAA,EACP;AAEJ,CAAC;AAED,UAAU,cAAc;AAIxB,SAAS,mBAAmB,aAA8C;AACxE,SAAO,aAAa,SAAS,WAAW;AAC1C;AAEA,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..91d602e41b66527295f4bbb1725188a8919685c8 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.mjs @@ -0,0 +1,32 @@ +// src/separator.tsx +import * as React from "react"; +import { Primitive } from "@radix-ui/react-primitive"; +import { jsx } from "react/jsx-runtime"; +var NAME = "Separator"; +var DEFAULT_ORIENTATION = "horizontal"; +var ORIENTATIONS = ["horizontal", "vertical"]; +var Separator = React.forwardRef((props, forwardedRef) => { + const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props; + const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION; + const ariaOrientation = orientation === "vertical" ? orientation : void 0; + const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" }; + return /* @__PURE__ */ jsx( + Primitive.div, + { + "data-orientation": orientation, + ...semanticProps, + ...domProps, + ref: forwardedRef + } + ); +}); +Separator.displayName = NAME; +function isValidOrientation(orientation) { + return ORIENTATIONS.includes(orientation); +} +var Root = Separator; +export { + Root, + Separator +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..6440993980484dda8b2bf6311bb3a59252d0afc0 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/separator.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Separator\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Separator';\nconst DEFAULT_ORIENTATION = 'horizontal';\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const;\n\ntype Orientation = (typeof ORIENTATIONS)[number];\ntype SeparatorElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface SeparatorProps extends PrimitiveDivProps {\n /**\n * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n */\n orientation?: Orientation;\n /**\n * Whether or not the component is purely decorative. When true, accessibility-related attributes\n * are updated so that that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean;\n}\n\nconst Separator = React.forwardRef((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n // `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical\n const ariaOrientation = orientation === 'vertical' ? orientation : undefined;\n const semanticProps = decorative\n ? { role: 'none' }\n : { 'aria-orientation': ariaOrientation, role: 'separator' };\n\n return (\n \n );\n});\n\nSeparator.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction isValidOrientation(orientation: any): orientation is Orientation {\n return ORIENTATIONS.includes(orientation);\n}\n\nconst Root = Separator;\n\nexport {\n Separator,\n //\n Root,\n};\nexport type { SeparatorProps };\n"], + "mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAmCtB;AA7BJ,IAAM,OAAO;AACb,IAAM,sBAAsB;AAC5B,IAAM,eAAe,CAAC,cAAc,UAAU;AAiB9C,IAAM,YAAkB,iBAA6C,CAAC,OAAO,iBAAiB;AAC5F,QAAM,EAAE,YAAY,aAAa,kBAAkB,qBAAqB,GAAG,SAAS,IAAI;AACxF,QAAM,cAAc,mBAAmB,eAAe,IAAI,kBAAkB;AAE5E,QAAM,kBAAkB,gBAAgB,aAAa,cAAc;AACnE,QAAM,gBAAgB,aAClB,EAAE,MAAM,OAAO,IACf,EAAE,oBAAoB,iBAAiB,MAAM,YAAY;AAE7D,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACC,oBAAkB;AAAA,MACjB,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,KAAK;AAAA;AAAA,EACP;AAEJ,CAAC;AAED,UAAU,cAAc;AAIxB,SAAS,mBAAmB,aAA8C;AACxE,SAAO,aAAa,SAAS,WAAW;AAC1C;AAEA,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/package.json b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e58693b1345dc34b4bb7bb94906915e5556582fa --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-separator@1.1.7_@types+react-dom@19.1.7_@types+react@19.1.9__@types+rea_6eceb94073f1531ccbb1206e4667a8c9/node_modules/@radix-ui/react-separator/package.json @@ -0,0 +1,68 @@ +{ + "name": "@radix-ui/react-separator", + "version": "1.1.7", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-primitive": "2.1.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/eslint-config": "0.0.0", + "@repo/builder": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/LICENSE b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/README.md b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7cc74e8f30def9103b54d1e052d67c3adf955088 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/README.md @@ -0,0 +1,3 @@ +# `react-slider` + +View docs [here](https://radix-ui.com/primitives/docs/components/slider). diff --git a/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d5f9f2707800ce81b74dd2e2627d684f8cd86f5a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.d.mts @@ -0,0 +1,75 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type Direction = 'ltr' | 'rtl'; +declare const createSliderScope: _radix_ui_react_context.CreateScope; +interface SliderProps extends Omit { + name?: string; + disabled?: boolean; + orientation?: React.AriaAttributes['aria-orientation']; + dir?: Direction; + min?: number; + max?: number; + step?: number; + minStepsBetweenThumbs?: number; + value?: number[]; + defaultValue?: number[]; + onValueChange?(value: number[]): void; + onValueCommit?(value: number[]): void; + inverted?: boolean; + form?: string; +} +declare const Slider: React.ForwardRefExoticComponent>; +type SliderOrientationPrivateProps = { + min: number; + max: number; + inverted: boolean; + onSlideStart?(value: number): void; + onSlideMove?(value: number): void; + onSlideEnd?(): void; + onHomeKeyDown(event: React.KeyboardEvent): void; + onEndKeyDown(event: React.KeyboardEvent): void; + onStepKeyDown(step: { + event: React.KeyboardEvent; + direction: number; + }): void; +}; +interface SliderOrientationProps extends Omit, SliderOrientationPrivateProps { +} +interface SliderHorizontalProps extends SliderOrientationProps { + dir?: Direction; +} +interface SliderVerticalProps extends SliderOrientationProps { +} +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +type SliderImplPrivateProps = { + onSlideStart(event: React.PointerEvent): void; + onSlideMove(event: React.PointerEvent): void; + onSlideEnd(event: React.PointerEvent): void; + onHomeKeyDown(event: React.KeyboardEvent): void; + onEndKeyDown(event: React.KeyboardEvent): void; + onStepKeyDown(event: React.KeyboardEvent): void; +}; +interface SliderImplProps extends PrimitiveDivProps, SliderImplPrivateProps { +} +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface SliderTrackProps extends PrimitiveSpanProps { +} +declare const SliderTrack: React.ForwardRefExoticComponent>; +interface SliderRangeProps extends PrimitiveSpanProps { +} +declare const SliderRange: React.ForwardRefExoticComponent>; +interface SliderThumbProps extends Omit { +} +declare const SliderThumb: React.ForwardRefExoticComponent>; +interface SliderThumbImplProps extends PrimitiveSpanProps { + index: number; + name?: string; +} +declare const Root: React.ForwardRefExoticComponent>; +declare const Track: React.ForwardRefExoticComponent>; +declare const Range: React.ForwardRefExoticComponent>; +declare const Thumb: React.ForwardRefExoticComponent>; + +export { Range, Root, Slider, type SliderProps, SliderRange, type SliderRangeProps, SliderThumb, type SliderThumbProps, SliderTrack, type SliderTrackProps, Thumb, Track, createSliderScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d5f9f2707800ce81b74dd2e2627d684f8cd86f5a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.d.ts @@ -0,0 +1,75 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type Direction = 'ltr' | 'rtl'; +declare const createSliderScope: _radix_ui_react_context.CreateScope; +interface SliderProps extends Omit { + name?: string; + disabled?: boolean; + orientation?: React.AriaAttributes['aria-orientation']; + dir?: Direction; + min?: number; + max?: number; + step?: number; + minStepsBetweenThumbs?: number; + value?: number[]; + defaultValue?: number[]; + onValueChange?(value: number[]): void; + onValueCommit?(value: number[]): void; + inverted?: boolean; + form?: string; +} +declare const Slider: React.ForwardRefExoticComponent>; +type SliderOrientationPrivateProps = { + min: number; + max: number; + inverted: boolean; + onSlideStart?(value: number): void; + onSlideMove?(value: number): void; + onSlideEnd?(): void; + onHomeKeyDown(event: React.KeyboardEvent): void; + onEndKeyDown(event: React.KeyboardEvent): void; + onStepKeyDown(step: { + event: React.KeyboardEvent; + direction: number; + }): void; +}; +interface SliderOrientationProps extends Omit, SliderOrientationPrivateProps { +} +interface SliderHorizontalProps extends SliderOrientationProps { + dir?: Direction; +} +interface SliderVerticalProps extends SliderOrientationProps { +} +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +type SliderImplPrivateProps = { + onSlideStart(event: React.PointerEvent): void; + onSlideMove(event: React.PointerEvent): void; + onSlideEnd(event: React.PointerEvent): void; + onHomeKeyDown(event: React.KeyboardEvent): void; + onEndKeyDown(event: React.KeyboardEvent): void; + onStepKeyDown(event: React.KeyboardEvent): void; +}; +interface SliderImplProps extends PrimitiveDivProps, SliderImplPrivateProps { +} +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface SliderTrackProps extends PrimitiveSpanProps { +} +declare const SliderTrack: React.ForwardRefExoticComponent>; +interface SliderRangeProps extends PrimitiveSpanProps { +} +declare const SliderRange: React.ForwardRefExoticComponent>; +interface SliderThumbProps extends Omit { +} +declare const SliderThumb: React.ForwardRefExoticComponent>; +interface SliderThumbImplProps extends PrimitiveSpanProps { + index: number; + name?: string; +} +declare const Root: React.ForwardRefExoticComponent>; +declare const Track: React.ForwardRefExoticComponent>; +declare const Range: React.ForwardRefExoticComponent>; +declare const Thumb: React.ForwardRefExoticComponent>; + +export { Range, Root, Slider, type SliderProps, SliderRange, type SliderRangeProps, SliderThumb, type SliderThumbProps, SliderTrack, type SliderTrackProps, Thumb, Track, createSliderScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.js b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..f5429ee0182f2f87e288285e147d7d019e40fea2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.js @@ -0,0 +1,598 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Range: () => Range, + Root: () => Root, + Slider: () => Slider, + SliderRange: () => SliderRange, + SliderThumb: () => SliderThumb, + SliderTrack: () => SliderTrack, + Thumb: () => Thumb, + Track: () => Track, + createSliderScope: () => createSliderScope +}); +module.exports = __toCommonJS(index_exports); + +// src/slider.tsx +var React = __toESM(require("react")); +var import_number = require("@radix-ui/number"); +var import_primitive = require("@radix-ui/primitive"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_direction = require("@radix-ui/react-direction"); +var import_react_use_previous = require("@radix-ui/react-use-previous"); +var import_react_use_size = require("@radix-ui/react-use-size"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_collection = require("@radix-ui/react-collection"); +var import_jsx_runtime = require("react/jsx-runtime"); +var PAGE_KEYS = ["PageUp", "PageDown"]; +var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]; +var BACK_KEYS = { + "from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"], + "from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"], + "from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"], + "from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"] +}; +var SLIDER_NAME = "Slider"; +var [Collection, useCollection, createCollectionScope] = (0, import_react_collection.createCollection)(SLIDER_NAME); +var [createSliderContext, createSliderScope] = (0, import_react_context.createContextScope)(SLIDER_NAME, [ + createCollectionScope +]); +var [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME); +var Slider = React.forwardRef( + (props, forwardedRef) => { + const { + name, + min = 0, + max = 100, + step = 1, + orientation = "horizontal", + disabled = false, + minStepsBetweenThumbs = 0, + defaultValue = [min], + value, + onValueChange = () => { + }, + onValueCommit = () => { + }, + inverted = false, + form, + ...sliderProps + } = props; + const thumbRefs = React.useRef(/* @__PURE__ */ new Set()); + const valueIndexToChangeRef = React.useRef(0); + const isHorizontal = orientation === "horizontal"; + const SliderOrientation = isHorizontal ? SliderHorizontal : SliderVertical; + const [values = [], setValues] = (0, import_react_use_controllable_state.useControllableState)({ + prop: value, + defaultProp: defaultValue, + onChange: (value2) => { + const thumbs = [...thumbRefs.current]; + thumbs[valueIndexToChangeRef.current]?.focus(); + onValueChange(value2); + } + }); + const valuesBeforeSlideStartRef = React.useRef(values); + function handleSlideStart(value2) { + const closestIndex = getClosestValueIndex(values, value2); + updateValues(value2, closestIndex); + } + function handleSlideMove(value2) { + updateValues(value2, valueIndexToChangeRef.current); + } + function handleSlideEnd() { + const prevValue = valuesBeforeSlideStartRef.current[valueIndexToChangeRef.current]; + const nextValue = values[valueIndexToChangeRef.current]; + const hasChanged = nextValue !== prevValue; + if (hasChanged) onValueCommit(values); + } + function updateValues(value2, atIndex, { commit } = { commit: false }) { + const decimalCount = getDecimalCount(step); + const snapToStep = roundValue(Math.round((value2 - min) / step) * step + min, decimalCount); + const nextValue = (0, import_number.clamp)(snapToStep, [min, max]); + setValues((prevValues = []) => { + const nextValues = getNextSortedValues(prevValues, nextValue, atIndex); + if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs * step)) { + valueIndexToChangeRef.current = nextValues.indexOf(nextValue); + const hasChanged = String(nextValues) !== String(prevValues); + if (hasChanged && commit) onValueCommit(nextValues); + return hasChanged ? nextValues : prevValues; + } else { + return prevValues; + } + }); + } + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SliderProvider, + { + scope: props.__scopeSlider, + name, + disabled, + min, + max, + valueIndexToChangeRef, + thumbs: thumbRefs.current, + values, + orientation, + form, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: props.__scopeSlider, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: props.__scopeSlider, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SliderOrientation, + { + "aria-disabled": disabled, + "data-disabled": disabled ? "" : void 0, + ...sliderProps, + ref: forwardedRef, + onPointerDown: (0, import_primitive.composeEventHandlers)(sliderProps.onPointerDown, () => { + if (!disabled) valuesBeforeSlideStartRef.current = values; + }), + min, + max, + inverted, + onSlideStart: disabled ? void 0 : handleSlideStart, + onSlideMove: disabled ? void 0 : handleSlideMove, + onSlideEnd: disabled ? void 0 : handleSlideEnd, + onHomeKeyDown: () => !disabled && updateValues(min, 0, { commit: true }), + onEndKeyDown: () => !disabled && updateValues(max, values.length - 1, { commit: true }), + onStepKeyDown: ({ event, direction: stepDirection }) => { + if (!disabled) { + const isPageKey = PAGE_KEYS.includes(event.key); + const isSkipKey = isPageKey || event.shiftKey && ARROW_KEYS.includes(event.key); + const multiplier = isSkipKey ? 10 : 1; + const atIndex = valueIndexToChangeRef.current; + const value2 = values[atIndex]; + const stepInDirection = step * multiplier * stepDirection; + updateValues(value2 + stepInDirection, atIndex, { commit: true }); + } + } + } + ) }) }) + } + ); + } +); +Slider.displayName = SLIDER_NAME; +var [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext(SLIDER_NAME, { + startEdge: "left", + endEdge: "right", + size: "width", + direction: 1 +}); +var SliderHorizontal = React.forwardRef( + (props, forwardedRef) => { + const { + min, + max, + dir, + inverted, + onSlideStart, + onSlideMove, + onSlideEnd, + onStepKeyDown, + ...sliderProps + } = props; + const [slider, setSlider] = React.useState(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setSlider(node)); + const rectRef = React.useRef(void 0); + const direction = (0, import_react_direction.useDirection)(dir); + const isDirectionLTR = direction === "ltr"; + const isSlidingFromLeft = isDirectionLTR && !inverted || !isDirectionLTR && inverted; + function getValueFromPointer(pointerPosition) { + const rect = rectRef.current || slider.getBoundingClientRect(); + const input = [0, rect.width]; + const output = isSlidingFromLeft ? [min, max] : [max, min]; + const value = linearScale(input, output); + rectRef.current = rect; + return value(pointerPosition - rect.left); + } + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SliderOrientationProvider, + { + scope: props.__scopeSlider, + startEdge: isSlidingFromLeft ? "left" : "right", + endEdge: isSlidingFromLeft ? "right" : "left", + direction: isSlidingFromLeft ? 1 : -1, + size: "width", + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SliderImpl, + { + dir: direction, + "data-orientation": "horizontal", + ...sliderProps, + ref: composedRefs, + style: { + ...sliderProps.style, + ["--radix-slider-thumb-transform"]: "translateX(-50%)" + }, + onSlideStart: (event) => { + const value = getValueFromPointer(event.clientX); + onSlideStart?.(value); + }, + onSlideMove: (event) => { + const value = getValueFromPointer(event.clientX); + onSlideMove?.(value); + }, + onSlideEnd: () => { + rectRef.current = void 0; + onSlideEnd?.(); + }, + onStepKeyDown: (event) => { + const slideDirection = isSlidingFromLeft ? "from-left" : "from-right"; + const isBackKey = BACK_KEYS[slideDirection].includes(event.key); + onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 }); + } + } + ) + } + ); + } +); +var SliderVertical = React.forwardRef( + (props, forwardedRef) => { + const { + min, + max, + inverted, + onSlideStart, + onSlideMove, + onSlideEnd, + onStepKeyDown, + ...sliderProps + } = props; + const sliderRef = React.useRef(null); + const ref = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, sliderRef); + const rectRef = React.useRef(void 0); + const isSlidingFromBottom = !inverted; + function getValueFromPointer(pointerPosition) { + const rect = rectRef.current || sliderRef.current.getBoundingClientRect(); + const input = [0, rect.height]; + const output = isSlidingFromBottom ? [max, min] : [min, max]; + const value = linearScale(input, output); + rectRef.current = rect; + return value(pointerPosition - rect.top); + } + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SliderOrientationProvider, + { + scope: props.__scopeSlider, + startEdge: isSlidingFromBottom ? "bottom" : "top", + endEdge: isSlidingFromBottom ? "top" : "bottom", + size: "height", + direction: isSlidingFromBottom ? 1 : -1, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SliderImpl, + { + "data-orientation": "vertical", + ...sliderProps, + ref, + style: { + ...sliderProps.style, + ["--radix-slider-thumb-transform"]: "translateY(50%)" + }, + onSlideStart: (event) => { + const value = getValueFromPointer(event.clientY); + onSlideStart?.(value); + }, + onSlideMove: (event) => { + const value = getValueFromPointer(event.clientY); + onSlideMove?.(value); + }, + onSlideEnd: () => { + rectRef.current = void 0; + onSlideEnd?.(); + }, + onStepKeyDown: (event) => { + const slideDirection = isSlidingFromBottom ? "from-bottom" : "from-top"; + const isBackKey = BACK_KEYS[slideDirection].includes(event.key); + onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 }); + } + } + ) + } + ); + } +); +var SliderImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeSlider, + onSlideStart, + onSlideMove, + onSlideEnd, + onHomeKeyDown, + onEndKeyDown, + onStepKeyDown, + ...sliderProps + } = props; + const context = useSliderContext(SLIDER_NAME, __scopeSlider); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.span, + { + ...sliderProps, + ref: forwardedRef, + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + if (event.key === "Home") { + onHomeKeyDown(event); + event.preventDefault(); + } else if (event.key === "End") { + onEndKeyDown(event); + event.preventDefault(); + } else if (PAGE_KEYS.concat(ARROW_KEYS).includes(event.key)) { + onStepKeyDown(event); + event.preventDefault(); + } + }), + onPointerDown: (0, import_primitive.composeEventHandlers)(props.onPointerDown, (event) => { + const target = event.target; + target.setPointerCapture(event.pointerId); + event.preventDefault(); + if (context.thumbs.has(target)) { + target.focus(); + } else { + onSlideStart(event); + } + }), + onPointerMove: (0, import_primitive.composeEventHandlers)(props.onPointerMove, (event) => { + const target = event.target; + if (target.hasPointerCapture(event.pointerId)) onSlideMove(event); + }), + onPointerUp: (0, import_primitive.composeEventHandlers)(props.onPointerUp, (event) => { + const target = event.target; + if (target.hasPointerCapture(event.pointerId)) { + target.releasePointerCapture(event.pointerId); + onSlideEnd(event); + } + }) + } + ); + } +); +var TRACK_NAME = "SliderTrack"; +var SliderTrack = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSlider, ...trackProps } = props; + const context = useSliderContext(TRACK_NAME, __scopeSlider); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.span, + { + "data-disabled": context.disabled ? "" : void 0, + "data-orientation": context.orientation, + ...trackProps, + ref: forwardedRef + } + ); + } +); +SliderTrack.displayName = TRACK_NAME; +var RANGE_NAME = "SliderRange"; +var SliderRange = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSlider, ...rangeProps } = props; + const context = useSliderContext(RANGE_NAME, __scopeSlider); + const orientation = useSliderOrientationContext(RANGE_NAME, __scopeSlider); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + const valuesCount = context.values.length; + const percentages = context.values.map( + (value) => convertValueToPercentage(value, context.min, context.max) + ); + const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0; + const offsetEnd = 100 - Math.max(...percentages); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.span, + { + "data-orientation": context.orientation, + "data-disabled": context.disabled ? "" : void 0, + ...rangeProps, + ref: composedRefs, + style: { + ...props.style, + [orientation.startEdge]: offsetStart + "%", + [orientation.endEdge]: offsetEnd + "%" + } + } + ); + } +); +SliderRange.displayName = RANGE_NAME; +var THUMB_NAME = "SliderThumb"; +var SliderThumb = React.forwardRef( + (props, forwardedRef) => { + const getItems = useCollection(props.__scopeSlider); + const [thumb, setThumb] = React.useState(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setThumb(node)); + const index = React.useMemo( + () => thumb ? getItems().findIndex((item) => item.ref.current === thumb) : -1, + [getItems, thumb] + ); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SliderThumbImpl, { ...props, ref: composedRefs, index }); + } +); +var SliderThumbImpl = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSlider, index, name, ...thumbProps } = props; + const context = useSliderContext(THUMB_NAME, __scopeSlider); + const orientation = useSliderOrientationContext(THUMB_NAME, __scopeSlider); + const [thumb, setThumb] = React.useState(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setThumb(node)); + const isFormControl = thumb ? context.form || !!thumb.closest("form") : true; + const size = (0, import_react_use_size.useSize)(thumb); + const value = context.values[index]; + const percent = value === void 0 ? 0 : convertValueToPercentage(value, context.min, context.max); + const label = getLabel(index, context.values.length); + const orientationSize = size?.[orientation.size]; + const thumbInBoundsOffset = orientationSize ? getThumbInBoundsOffset(orientationSize, percent, orientation.direction) : 0; + React.useEffect(() => { + if (thumb) { + context.thumbs.add(thumb); + return () => { + context.thumbs.delete(thumb); + }; + } + }, [thumb, context.thumbs]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)( + "span", + { + style: { + transform: "var(--radix-slider-thumb-transform)", + position: "absolute", + [orientation.startEdge]: `calc(${percent}% + ${thumbInBoundsOffset}px)` + }, + children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.ItemSlot, { scope: props.__scopeSlider, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.span, + { + role: "slider", + "aria-label": props["aria-label"] || label, + "aria-valuemin": context.min, + "aria-valuenow": value, + "aria-valuemax": context.max, + "aria-orientation": context.orientation, + "data-orientation": context.orientation, + "data-disabled": context.disabled ? "" : void 0, + tabIndex: context.disabled ? void 0 : 0, + ...thumbProps, + ref: composedRefs, + style: value === void 0 ? { display: "none" } : props.style, + onFocus: (0, import_primitive.composeEventHandlers)(props.onFocus, () => { + context.valueIndexToChangeRef.current = index; + }) + } + ) }), + isFormControl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SliderBubbleInput, + { + name: name ?? (context.name ? context.name + (context.values.length > 1 ? "[]" : "") : void 0), + form: context.form, + value + }, + index + ) + ] + } + ); + } +); +SliderThumb.displayName = THUMB_NAME; +var BUBBLE_INPUT_NAME = "RadioBubbleInput"; +var SliderBubbleInput = React.forwardRef( + ({ __scopeSlider, value, ...props }, forwardedRef) => { + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(ref, forwardedRef); + const prevValue = (0, import_react_use_previous.usePrevious)(value); + React.useEffect(() => { + const input = ref.current; + if (!input) return; + const inputProto = window.HTMLInputElement.prototype; + const descriptor = Object.getOwnPropertyDescriptor(inputProto, "value"); + const setValue = descriptor.set; + if (prevValue !== value && setValue) { + const event = new Event("input", { bubbles: true }); + setValue.call(input, value); + input.dispatchEvent(event); + } + }, [prevValue, value]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.input, + { + style: { display: "none" }, + ...props, + ref: composedRefs, + defaultValue: value + } + ); + } +); +SliderBubbleInput.displayName = BUBBLE_INPUT_NAME; +function getNextSortedValues(prevValues = [], nextValue, atIndex) { + const nextValues = [...prevValues]; + nextValues[atIndex] = nextValue; + return nextValues.sort((a, b) => a - b); +} +function convertValueToPercentage(value, min, max) { + const maxSteps = max - min; + const percentPerStep = 100 / maxSteps; + const percentage = percentPerStep * (value - min); + return (0, import_number.clamp)(percentage, [0, 100]); +} +function getLabel(index, totalValues) { + if (totalValues > 2) { + return `Value ${index + 1} of ${totalValues}`; + } else if (totalValues === 2) { + return ["Minimum", "Maximum"][index]; + } else { + return void 0; + } +} +function getClosestValueIndex(values, nextValue) { + if (values.length === 1) return 0; + const distances = values.map((value) => Math.abs(value - nextValue)); + const closestDistance = Math.min(...distances); + return distances.indexOf(closestDistance); +} +function getThumbInBoundsOffset(width, left, direction) { + const halfWidth = width / 2; + const halfPercent = 50; + const offset = linearScale([0, halfPercent], [0, halfWidth]); + return (halfWidth - offset(left) * direction) * direction; +} +function getStepsBetweenValues(values) { + return values.slice(0, -1).map((value, index) => values[index + 1] - value); +} +function hasMinStepsBetweenValues(values, minStepsBetweenValues) { + if (minStepsBetweenValues > 0) { + const stepsBetweenValues = getStepsBetweenValues(values); + const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues); + return actualMinStepsBetweenValues >= minStepsBetweenValues; + } + return true; +} +function linearScale(input, output) { + return (value) => { + if (input[0] === input[1] || output[0] === output[1]) return output[0]; + const ratio = (output[1] - output[0]) / (input[1] - input[0]); + return output[0] + ratio * (value - input[0]); + }; +} +function getDecimalCount(value) { + return (String(value).split(".")[1] || "").length; +} +function roundValue(value, decimalCount) { + const rounder = Math.pow(10, decimalCount); + return Math.round(value * rounder) / rounder; +} +var Root = Slider; +var Track = SliderTrack; +var Range = SliderRange; +var Thumb = SliderThumb; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..028f6afb601b77c17067e48f32b51e6301961167 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/slider.tsx"], + "sourcesContent": ["'use client';\nexport {\n createSliderScope,\n //\n Slider,\n SliderTrack,\n SliderRange,\n SliderThumb,\n //\n Root,\n Track,\n Range,\n Thumb,\n} from './slider';\nexport type { SliderProps, SliderTrackProps, SliderRangeProps, SliderThumbProps } from './slider';\n", "import * as React from 'react';\nimport { clamp } from '@radix-ui/number';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createCollection } from '@radix-ui/react-collection';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\nconst PAGE_KEYS = ['PageUp', 'PageDown'];\nconst ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\n\ntype SlideDirection = 'from-left' | 'from-right' | 'from-bottom' | 'from-top';\nconst BACK_KEYS: Record = {\n 'from-left': ['Home', 'PageDown', 'ArrowDown', 'ArrowLeft'],\n 'from-right': ['Home', 'PageDown', 'ArrowDown', 'ArrowRight'],\n 'from-bottom': ['Home', 'PageDown', 'ArrowDown', 'ArrowLeft'],\n 'from-top': ['Home', 'PageDown', 'ArrowUp', 'ArrowLeft'],\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Slider\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLIDER_NAME = 'Slider';\n\nconst [Collection, useCollection, createCollectionScope] =\n createCollection(SLIDER_NAME);\n\ntype ScopedProps

= P & { __scopeSlider?: Scope };\nconst [createSliderContext, createSliderScope] = createContextScope(SLIDER_NAME, [\n createCollectionScope,\n]);\n\ntype SliderContextValue = {\n name: string | undefined;\n disabled: boolean | undefined;\n min: number;\n max: number;\n values: number[];\n valueIndexToChangeRef: React.MutableRefObject;\n thumbs: Set;\n orientation: SliderProps['orientation'];\n form: string | undefined;\n};\n\nconst [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME);\n\ntype SliderElement = SliderHorizontalElement | SliderVerticalElement;\ninterface SliderProps\n extends Omit<\n SliderHorizontalProps | SliderVerticalProps,\n keyof SliderOrientationPrivateProps | 'defaultValue'\n > {\n name?: string;\n disabled?: boolean;\n orientation?: React.AriaAttributes['aria-orientation'];\n dir?: Direction;\n min?: number;\n max?: number;\n step?: number;\n minStepsBetweenThumbs?: number;\n value?: number[];\n defaultValue?: number[];\n onValueChange?(value: number[]): void;\n onValueCommit?(value: number[]): void;\n inverted?: boolean;\n form?: string;\n}\n\nconst Slider = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n name,\n min = 0,\n max = 100,\n step = 1,\n orientation = 'horizontal',\n disabled = false,\n minStepsBetweenThumbs = 0,\n defaultValue = [min],\n value,\n onValueChange = () => {},\n onValueCommit = () => {},\n inverted = false,\n form,\n ...sliderProps\n } = props;\n const thumbRefs = React.useRef(new Set());\n const valueIndexToChangeRef = React.useRef(0);\n const isHorizontal = orientation === 'horizontal';\n const SliderOrientation = isHorizontal ? SliderHorizontal : SliderVertical;\n\n const [values = [], setValues] = useControllableState({\n prop: value,\n defaultProp: defaultValue,\n onChange: (value) => {\n const thumbs = [...thumbRefs.current];\n thumbs[valueIndexToChangeRef.current]?.focus();\n onValueChange(value);\n },\n });\n const valuesBeforeSlideStartRef = React.useRef(values);\n\n function handleSlideStart(value: number) {\n const closestIndex = getClosestValueIndex(values, value);\n updateValues(value, closestIndex);\n }\n\n function handleSlideMove(value: number) {\n updateValues(value, valueIndexToChangeRef.current);\n }\n\n function handleSlideEnd() {\n const prevValue = valuesBeforeSlideStartRef.current[valueIndexToChangeRef.current];\n const nextValue = values[valueIndexToChangeRef.current];\n const hasChanged = nextValue !== prevValue;\n if (hasChanged) onValueCommit(values);\n }\n\n function updateValues(value: number, atIndex: number, { commit } = { commit: false }) {\n const decimalCount = getDecimalCount(step);\n const snapToStep = roundValue(Math.round((value - min) / step) * step + min, decimalCount);\n const nextValue = clamp(snapToStep, [min, max]);\n\n setValues((prevValues = []) => {\n const nextValues = getNextSortedValues(prevValues, nextValue, atIndex);\n if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs * step)) {\n valueIndexToChangeRef.current = nextValues.indexOf(nextValue);\n const hasChanged = String(nextValues) !== String(prevValues);\n if (hasChanged && commit) onValueCommit(nextValues);\n return hasChanged ? nextValues : prevValues;\n } else {\n return prevValues;\n }\n });\n }\n\n return (\n \n \n \n {\n if (!disabled) valuesBeforeSlideStartRef.current = values;\n })}\n min={min}\n max={max}\n inverted={inverted}\n onSlideStart={disabled ? undefined : handleSlideStart}\n onSlideMove={disabled ? undefined : handleSlideMove}\n onSlideEnd={disabled ? undefined : handleSlideEnd}\n onHomeKeyDown={() => !disabled && updateValues(min, 0, { commit: true })}\n onEndKeyDown={() =>\n !disabled && updateValues(max, values.length - 1, { commit: true })\n }\n onStepKeyDown={({ event, direction: stepDirection }) => {\n if (!disabled) {\n const isPageKey = PAGE_KEYS.includes(event.key);\n const isSkipKey = isPageKey || (event.shiftKey && ARROW_KEYS.includes(event.key));\n const multiplier = isSkipKey ? 10 : 1;\n const atIndex = valueIndexToChangeRef.current;\n const value = values[atIndex]!;\n const stepInDirection = step * multiplier * stepDirection;\n updateValues(value + stepInDirection, atIndex, { commit: true });\n }\n }}\n />\n \n \n \n );\n }\n);\n\nSlider.displayName = SLIDER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SliderHorizontal\n * -----------------------------------------------------------------------------------------------*/\n\ntype Side = 'top' | 'right' | 'bottom' | 'left';\n\nconst [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext<{\n startEdge: Side;\n endEdge: Side;\n size: keyof NonNullable>;\n direction: number;\n}>(SLIDER_NAME, {\n startEdge: 'left',\n endEdge: 'right',\n size: 'width',\n direction: 1,\n});\n\ntype SliderOrientationPrivateProps = {\n min: number;\n max: number;\n inverted: boolean;\n onSlideStart?(value: number): void;\n onSlideMove?(value: number): void;\n onSlideEnd?(): void;\n onHomeKeyDown(event: React.KeyboardEvent): void;\n onEndKeyDown(event: React.KeyboardEvent): void;\n onStepKeyDown(step: { event: React.KeyboardEvent; direction: number }): void;\n};\ninterface SliderOrientationProps\n extends Omit,\n SliderOrientationPrivateProps {}\n\ntype SliderHorizontalElement = SliderImplElement;\ninterface SliderHorizontalProps extends SliderOrientationProps {\n dir?: Direction;\n}\n\nconst SliderHorizontal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n min,\n max,\n dir,\n inverted,\n onSlideStart,\n onSlideMove,\n onSlideEnd,\n onStepKeyDown,\n ...sliderProps\n } = props;\n const [slider, setSlider] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setSlider(node));\n const rectRef = React.useRef(undefined);\n const direction = useDirection(dir);\n const isDirectionLTR = direction === 'ltr';\n const isSlidingFromLeft = (isDirectionLTR && !inverted) || (!isDirectionLTR && inverted);\n\n function getValueFromPointer(pointerPosition: number) {\n const rect = rectRef.current || slider!.getBoundingClientRect();\n const input: [number, number] = [0, rect.width];\n const output: [number, number] = isSlidingFromLeft ? [min, max] : [max, min];\n const value = linearScale(input, output);\n\n rectRef.current = rect;\n return value(pointerPosition - rect.left);\n }\n\n return (\n \n {\n const value = getValueFromPointer(event.clientX);\n onSlideStart?.(value);\n }}\n onSlideMove={(event) => {\n const value = getValueFromPointer(event.clientX);\n onSlideMove?.(value);\n }}\n onSlideEnd={() => {\n rectRef.current = undefined;\n onSlideEnd?.();\n }}\n onStepKeyDown={(event) => {\n const slideDirection = isSlidingFromLeft ? 'from-left' : 'from-right';\n const isBackKey = BACK_KEYS[slideDirection].includes(event.key);\n onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 });\n }}\n />\n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * SliderVertical\n * -----------------------------------------------------------------------------------------------*/\n\ntype SliderVerticalElement = SliderImplElement;\ninterface SliderVerticalProps extends SliderOrientationProps {}\n\nconst SliderVertical = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n min,\n max,\n inverted,\n onSlideStart,\n onSlideMove,\n onSlideEnd,\n onStepKeyDown,\n ...sliderProps\n } = props;\n const sliderRef = React.useRef(null);\n const ref = useComposedRefs(forwardedRef, sliderRef);\n const rectRef = React.useRef(undefined);\n const isSlidingFromBottom = !inverted;\n\n function getValueFromPointer(pointerPosition: number) {\n const rect = rectRef.current || sliderRef.current!.getBoundingClientRect();\n const input: [number, number] = [0, rect.height];\n const output: [number, number] = isSlidingFromBottom ? [max, min] : [min, max];\n const value = linearScale(input, output);\n\n rectRef.current = rect;\n return value(pointerPosition - rect.top);\n }\n\n return (\n \n {\n const value = getValueFromPointer(event.clientY);\n onSlideStart?.(value);\n }}\n onSlideMove={(event) => {\n const value = getValueFromPointer(event.clientY);\n onSlideMove?.(value);\n }}\n onSlideEnd={() => {\n rectRef.current = undefined;\n onSlideEnd?.();\n }}\n onStepKeyDown={(event) => {\n const slideDirection = isSlidingFromBottom ? 'from-bottom' : 'from-top';\n const isBackKey = BACK_KEYS[slideDirection].includes(event.key);\n onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 });\n }}\n />\n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * SliderImpl\n * -----------------------------------------------------------------------------------------------*/\n\ntype SliderImplElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ntype SliderImplPrivateProps = {\n onSlideStart(event: React.PointerEvent): void;\n onSlideMove(event: React.PointerEvent): void;\n onSlideEnd(event: React.PointerEvent): void;\n onHomeKeyDown(event: React.KeyboardEvent): void;\n onEndKeyDown(event: React.KeyboardEvent): void;\n onStepKeyDown(event: React.KeyboardEvent): void;\n};\ninterface SliderImplProps extends PrimitiveDivProps, SliderImplPrivateProps {}\n\nconst SliderImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeSlider,\n onSlideStart,\n onSlideMove,\n onSlideEnd,\n onHomeKeyDown,\n onEndKeyDown,\n onStepKeyDown,\n ...sliderProps\n } = props;\n const context = useSliderContext(SLIDER_NAME, __scopeSlider);\n\n return (\n {\n if (event.key === 'Home') {\n onHomeKeyDown(event);\n // Prevent scrolling to page start\n event.preventDefault();\n } else if (event.key === 'End') {\n onEndKeyDown(event);\n // Prevent scrolling to page end\n event.preventDefault();\n } else if (PAGE_KEYS.concat(ARROW_KEYS).includes(event.key)) {\n onStepKeyDown(event);\n // Prevent scrolling for directional key presses\n event.preventDefault();\n }\n })}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n const target = event.target as HTMLElement;\n target.setPointerCapture(event.pointerId);\n // Prevent browser focus behaviour because we focus a thumb manually when values change.\n event.preventDefault();\n // Touch devices have a delay before focusing so won't focus if touch immediately moves\n // away from target (sliding). We want thumb to focus regardless.\n if (context.thumbs.has(target)) {\n target.focus();\n } else {\n onSlideStart(event);\n }\n })}\n onPointerMove={composeEventHandlers(props.onPointerMove, (event) => {\n const target = event.target as HTMLElement;\n if (target.hasPointerCapture(event.pointerId)) onSlideMove(event);\n })}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n const target = event.target as HTMLElement;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n onSlideEnd(event);\n }\n })}\n />\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * SliderTrack\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRACK_NAME = 'SliderTrack';\n\ntype SliderTrackElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface SliderTrackProps extends PrimitiveSpanProps {}\n\nconst SliderTrack = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSlider, ...trackProps } = props;\n const context = useSliderContext(TRACK_NAME, __scopeSlider);\n return (\n \n );\n }\n);\n\nSliderTrack.displayName = TRACK_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SliderRange\n * -----------------------------------------------------------------------------------------------*/\n\nconst RANGE_NAME = 'SliderRange';\n\ntype SliderRangeElement = React.ComponentRef;\ninterface SliderRangeProps extends PrimitiveSpanProps {}\n\nconst SliderRange = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSlider, ...rangeProps } = props;\n const context = useSliderContext(RANGE_NAME, __scopeSlider);\n const orientation = useSliderOrientationContext(RANGE_NAME, __scopeSlider);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const valuesCount = context.values.length;\n const percentages = context.values.map((value) =>\n convertValueToPercentage(value, context.min, context.max)\n );\n const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;\n const offsetEnd = 100 - Math.max(...percentages);\n\n return (\n \n );\n }\n);\n\nSliderRange.displayName = RANGE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SliderThumb\n * -----------------------------------------------------------------------------------------------*/\n\nconst THUMB_NAME = 'SliderThumb';\n\ntype SliderThumbElement = SliderThumbImplElement;\ninterface SliderThumbProps extends Omit {}\n\nconst SliderThumb = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const getItems = useCollection(props.__scopeSlider);\n const [thumb, setThumb] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setThumb(node));\n const index = React.useMemo(\n () => (thumb ? getItems().findIndex((item) => item.ref.current === thumb) : -1),\n [getItems, thumb]\n );\n return ;\n }\n);\n\ntype SliderThumbImplElement = React.ComponentRef;\ninterface SliderThumbImplProps extends PrimitiveSpanProps {\n index: number;\n name?: string;\n}\n\nconst SliderThumbImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSlider, index, name, ...thumbProps } = props;\n const context = useSliderContext(THUMB_NAME, __scopeSlider);\n const orientation = useSliderOrientationContext(THUMB_NAME, __scopeSlider);\n const [thumb, setThumb] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setThumb(node));\n // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = thumb ? context.form || !!thumb.closest('form') : true;\n const size = useSize(thumb);\n // We cast because index could be `-1` which would return undefined\n const value = context.values[index] as number | undefined;\n const percent =\n value === undefined ? 0 : convertValueToPercentage(value, context.min, context.max);\n const label = getLabel(index, context.values.length);\n const orientationSize = size?.[orientation.size];\n const thumbInBoundsOffset = orientationSize\n ? getThumbInBoundsOffset(orientationSize, percent, orientation.direction)\n : 0;\n\n React.useEffect(() => {\n if (thumb) {\n context.thumbs.add(thumb);\n return () => {\n context.thumbs.delete(thumb);\n };\n }\n }, [thumb, context.thumbs]);\n\n return (\n \n \n {\n context.valueIndexToChangeRef.current = index;\n })}\n />\n \n\n {isFormControl && (\n 1 ? '[]' : '') : undefined)\n }\n form={context.form}\n value={value}\n />\n )}\n \n );\n }\n);\n\nSliderThumb.displayName = THUMB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SliderBubbleInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUBBLE_INPUT_NAME = 'RadioBubbleInput';\n\ntype InputProps = React.ComponentPropsWithoutRef;\ninterface SliderBubbleInputProps extends InputProps {}\n\nconst SliderBubbleInput = React.forwardRef(\n ({ __scopeSlider, value, ...props }: ScopedProps, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevValue = usePrevious(value);\n\n // Bubble value change to parents (e.g form change event)\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(inputProto, 'value') as PropertyDescriptor;\n const setValue = descriptor.set;\n if (prevValue !== value && setValue) {\n const event = new Event('input', { bubbles: true });\n setValue.call(input, value);\n input.dispatchEvent(event);\n }\n }, [prevValue, value]);\n\n /**\n * We purposefully do not use `type=\"hidden\"` here otherwise forms that\n * wrap it will not be able to access its value via the FormData API.\n *\n * We purposefully do not add the `value` attribute here to allow the value\n * to be set programmatically and bubble to any parent form `onChange` event.\n * Adding the `value` will cause React to consider the programmatic\n * dispatch a duplicate and it will get swallowed.\n */\n return (\n \n );\n }\n);\n\nSliderBubbleInput.displayName = BUBBLE_INPUT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getNextSortedValues(prevValues: number[] = [], nextValue: number, atIndex: number) {\n const nextValues = [...prevValues];\n nextValues[atIndex] = nextValue;\n return nextValues.sort((a, b) => a - b);\n}\n\nfunction convertValueToPercentage(value: number, min: number, max: number) {\n const maxSteps = max - min;\n const percentPerStep = 100 / maxSteps;\n const percentage = percentPerStep * (value - min);\n return clamp(percentage, [0, 100]);\n}\n\n/**\n * Returns a label for each thumb when there are two or more thumbs\n */\nfunction getLabel(index: number, totalValues: number) {\n if (totalValues > 2) {\n return `Value ${index + 1} of ${totalValues}`;\n } else if (totalValues === 2) {\n return ['Minimum', 'Maximum'][index];\n } else {\n return undefined;\n }\n}\n\n/**\n * Given a `values` array and a `nextValue`, determine which value in\n * the array is closest to `nextValue` and return its index.\n *\n * @example\n * // returns 1\n * getClosestValueIndex([10, 30], 25);\n */\nfunction getClosestValueIndex(values: number[], nextValue: number) {\n if (values.length === 1) return 0;\n const distances = values.map((value) => Math.abs(value - nextValue));\n const closestDistance = Math.min(...distances);\n return distances.indexOf(closestDistance);\n}\n\n/**\n * Offsets the thumb centre point while sliding to ensure it remains\n * within the bounds of the slider when reaching the edges\n */\nfunction getThumbInBoundsOffset(width: number, left: number, direction: number) {\n const halfWidth = width / 2;\n const halfPercent = 50;\n const offset = linearScale([0, halfPercent], [0, halfWidth]);\n return (halfWidth - offset(left) * direction) * direction;\n}\n\n/**\n * Gets an array of steps between each value.\n *\n * @example\n * // returns [1, 9]\n * getStepsBetweenValues([10, 11, 20]);\n */\nfunction getStepsBetweenValues(values: number[]) {\n return values.slice(0, -1).map((value, index) => values[index + 1]! - value);\n}\n\n/**\n * Verifies the minimum steps between all values is greater than or equal\n * to the expected minimum steps.\n *\n * @example\n * // returns false\n * hasMinStepsBetweenValues([1,2,3], 2);\n *\n * @example\n * // returns true\n * hasMinStepsBetweenValues([1,2,3], 1);\n */\nfunction hasMinStepsBetweenValues(values: number[], minStepsBetweenValues: number) {\n if (minStepsBetweenValues > 0) {\n const stepsBetweenValues = getStepsBetweenValues(values);\n const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);\n return actualMinStepsBetweenValues >= minStepsBetweenValues;\n }\n return true;\n}\n\n// https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js\nfunction linearScale(input: readonly [number, number], output: readonly [number, number]) {\n return (value: number) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\n\nfunction getDecimalCount(value: number) {\n return (String(value).split('.')[1] || '').length;\n}\n\nfunction roundValue(value: number, decimalCount: number) {\n const rounder = Math.pow(10, decimalCount);\n return Math.round(value * rounder) / rounder;\n}\n\nconst Root = Slider;\nconst Track = SliderTrack;\nconst Range = SliderRange;\nconst Thumb = SliderThumb;\n\nexport {\n createSliderScope,\n //\n Slider,\n SliderTrack,\n SliderRange,\n SliderThumb,\n //\n Root,\n Track,\n Range,\n Thumb,\n};\nexport type { SliderProps, SliderTrackProps, SliderRangeProps, SliderThumbProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,oBAAsB;AACtB,uBAAqC;AACrC,gCAAgC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;AAcA,SAAS,yBAAyB,QAAkB,uBAA+B;AACjF,MAAI,wBAAwB,GAAG;AAC7B,UAAM,qBAAqB,sBAAsB,MAAM;AACvD,UAAM,8BAA8B,KAAK,IAAI,GAAG,kBAAkB;AAClE,WAAO,+BAA+B;AAAA,EACxC;AACA,SAAO;AACT;AAGA,SAAS,YAAY,OAAkC,QAAmC;AACxF,SAAO,CAAC,UAAkB;AACxB,QAAI,MAAM,CAAC,MAAM,MAAM,CAAC,KAAK,OAAO,CAAC,MAAM,OAAO,CAAC,EAAG,QAAO,OAAO,CAAC;AACrE,UAAM,SAAS,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,MAAM,CAAC,IAAI,MAAM,CAAC;AAC3D,WAAO,OAAO,CAAC,IAAI,SAAS,QAAQ,MAAM,CAAC;AAAA,EAC7C;AACF;AAEA,SAAS,gBAAgB,OAAe;AACtC,UAAQ,OAAO,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC,KAAK,IAAI;AAC7C;AAEA,SAAS,WAAW,OAAe,cAAsB;AACvD,QAAM,UAAU,KAAK,IAAI,IAAI,YAAY;AACzC,SAAO,KAAK,MAAM,QAAQ,OAAO,IAAI;AACvC;AAEA,IAAM,OAAO;AACb,IAAM,QAAQ;AACd,IAAM,QAAQ;AACd,IAAM,QAAQ;", + "names": ["value"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3968447bff20f19fe31b1fcfd9c77b14a320c16b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.mjs @@ -0,0 +1,566 @@ +"use client"; + +// src/slider.tsx +import * as React from "react"; +import { clamp } from "@radix-ui/number"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { createContextScope } from "@radix-ui/react-context"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { useDirection } from "@radix-ui/react-direction"; +import { usePrevious } from "@radix-ui/react-use-previous"; +import { useSize } from "@radix-ui/react-use-size"; +import { Primitive } from "@radix-ui/react-primitive"; +import { createCollection } from "@radix-ui/react-collection"; +import { jsx, jsxs } from "react/jsx-runtime"; +var PAGE_KEYS = ["PageUp", "PageDown"]; +var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]; +var BACK_KEYS = { + "from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"], + "from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"], + "from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"], + "from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"] +}; +var SLIDER_NAME = "Slider"; +var [Collection, useCollection, createCollectionScope] = createCollection(SLIDER_NAME); +var [createSliderContext, createSliderScope] = createContextScope(SLIDER_NAME, [ + createCollectionScope +]); +var [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME); +var Slider = React.forwardRef( + (props, forwardedRef) => { + const { + name, + min = 0, + max = 100, + step = 1, + orientation = "horizontal", + disabled = false, + minStepsBetweenThumbs = 0, + defaultValue = [min], + value, + onValueChange = () => { + }, + onValueCommit = () => { + }, + inverted = false, + form, + ...sliderProps + } = props; + const thumbRefs = React.useRef(/* @__PURE__ */ new Set()); + const valueIndexToChangeRef = React.useRef(0); + const isHorizontal = orientation === "horizontal"; + const SliderOrientation = isHorizontal ? SliderHorizontal : SliderVertical; + const [values = [], setValues] = useControllableState({ + prop: value, + defaultProp: defaultValue, + onChange: (value2) => { + const thumbs = [...thumbRefs.current]; + thumbs[valueIndexToChangeRef.current]?.focus(); + onValueChange(value2); + } + }); + const valuesBeforeSlideStartRef = React.useRef(values); + function handleSlideStart(value2) { + const closestIndex = getClosestValueIndex(values, value2); + updateValues(value2, closestIndex); + } + function handleSlideMove(value2) { + updateValues(value2, valueIndexToChangeRef.current); + } + function handleSlideEnd() { + const prevValue = valuesBeforeSlideStartRef.current[valueIndexToChangeRef.current]; + const nextValue = values[valueIndexToChangeRef.current]; + const hasChanged = nextValue !== prevValue; + if (hasChanged) onValueCommit(values); + } + function updateValues(value2, atIndex, { commit } = { commit: false }) { + const decimalCount = getDecimalCount(step); + const snapToStep = roundValue(Math.round((value2 - min) / step) * step + min, decimalCount); + const nextValue = clamp(snapToStep, [min, max]); + setValues((prevValues = []) => { + const nextValues = getNextSortedValues(prevValues, nextValue, atIndex); + if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs * step)) { + valueIndexToChangeRef.current = nextValues.indexOf(nextValue); + const hasChanged = String(nextValues) !== String(prevValues); + if (hasChanged && commit) onValueCommit(nextValues); + return hasChanged ? nextValues : prevValues; + } else { + return prevValues; + } + }); + } + return /* @__PURE__ */ jsx( + SliderProvider, + { + scope: props.__scopeSlider, + name, + disabled, + min, + max, + valueIndexToChangeRef, + thumbs: thumbRefs.current, + values, + orientation, + form, + children: /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeSlider, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeSlider, children: /* @__PURE__ */ jsx( + SliderOrientation, + { + "aria-disabled": disabled, + "data-disabled": disabled ? "" : void 0, + ...sliderProps, + ref: forwardedRef, + onPointerDown: composeEventHandlers(sliderProps.onPointerDown, () => { + if (!disabled) valuesBeforeSlideStartRef.current = values; + }), + min, + max, + inverted, + onSlideStart: disabled ? void 0 : handleSlideStart, + onSlideMove: disabled ? void 0 : handleSlideMove, + onSlideEnd: disabled ? void 0 : handleSlideEnd, + onHomeKeyDown: () => !disabled && updateValues(min, 0, { commit: true }), + onEndKeyDown: () => !disabled && updateValues(max, values.length - 1, { commit: true }), + onStepKeyDown: ({ event, direction: stepDirection }) => { + if (!disabled) { + const isPageKey = PAGE_KEYS.includes(event.key); + const isSkipKey = isPageKey || event.shiftKey && ARROW_KEYS.includes(event.key); + const multiplier = isSkipKey ? 10 : 1; + const atIndex = valueIndexToChangeRef.current; + const value2 = values[atIndex]; + const stepInDirection = step * multiplier * stepDirection; + updateValues(value2 + stepInDirection, atIndex, { commit: true }); + } + } + } + ) }) }) + } + ); + } +); +Slider.displayName = SLIDER_NAME; +var [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext(SLIDER_NAME, { + startEdge: "left", + endEdge: "right", + size: "width", + direction: 1 +}); +var SliderHorizontal = React.forwardRef( + (props, forwardedRef) => { + const { + min, + max, + dir, + inverted, + onSlideStart, + onSlideMove, + onSlideEnd, + onStepKeyDown, + ...sliderProps + } = props; + const [slider, setSlider] = React.useState(null); + const composedRefs = useComposedRefs(forwardedRef, (node) => setSlider(node)); + const rectRef = React.useRef(void 0); + const direction = useDirection(dir); + const isDirectionLTR = direction === "ltr"; + const isSlidingFromLeft = isDirectionLTR && !inverted || !isDirectionLTR && inverted; + function getValueFromPointer(pointerPosition) { + const rect = rectRef.current || slider.getBoundingClientRect(); + const input = [0, rect.width]; + const output = isSlidingFromLeft ? [min, max] : [max, min]; + const value = linearScale(input, output); + rectRef.current = rect; + return value(pointerPosition - rect.left); + } + return /* @__PURE__ */ jsx( + SliderOrientationProvider, + { + scope: props.__scopeSlider, + startEdge: isSlidingFromLeft ? "left" : "right", + endEdge: isSlidingFromLeft ? "right" : "left", + direction: isSlidingFromLeft ? 1 : -1, + size: "width", + children: /* @__PURE__ */ jsx( + SliderImpl, + { + dir: direction, + "data-orientation": "horizontal", + ...sliderProps, + ref: composedRefs, + style: { + ...sliderProps.style, + ["--radix-slider-thumb-transform"]: "translateX(-50%)" + }, + onSlideStart: (event) => { + const value = getValueFromPointer(event.clientX); + onSlideStart?.(value); + }, + onSlideMove: (event) => { + const value = getValueFromPointer(event.clientX); + onSlideMove?.(value); + }, + onSlideEnd: () => { + rectRef.current = void 0; + onSlideEnd?.(); + }, + onStepKeyDown: (event) => { + const slideDirection = isSlidingFromLeft ? "from-left" : "from-right"; + const isBackKey = BACK_KEYS[slideDirection].includes(event.key); + onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 }); + } + } + ) + } + ); + } +); +var SliderVertical = React.forwardRef( + (props, forwardedRef) => { + const { + min, + max, + inverted, + onSlideStart, + onSlideMove, + onSlideEnd, + onStepKeyDown, + ...sliderProps + } = props; + const sliderRef = React.useRef(null); + const ref = useComposedRefs(forwardedRef, sliderRef); + const rectRef = React.useRef(void 0); + const isSlidingFromBottom = !inverted; + function getValueFromPointer(pointerPosition) { + const rect = rectRef.current || sliderRef.current.getBoundingClientRect(); + const input = [0, rect.height]; + const output = isSlidingFromBottom ? [max, min] : [min, max]; + const value = linearScale(input, output); + rectRef.current = rect; + return value(pointerPosition - rect.top); + } + return /* @__PURE__ */ jsx( + SliderOrientationProvider, + { + scope: props.__scopeSlider, + startEdge: isSlidingFromBottom ? "bottom" : "top", + endEdge: isSlidingFromBottom ? "top" : "bottom", + size: "height", + direction: isSlidingFromBottom ? 1 : -1, + children: /* @__PURE__ */ jsx( + SliderImpl, + { + "data-orientation": "vertical", + ...sliderProps, + ref, + style: { + ...sliderProps.style, + ["--radix-slider-thumb-transform"]: "translateY(50%)" + }, + onSlideStart: (event) => { + const value = getValueFromPointer(event.clientY); + onSlideStart?.(value); + }, + onSlideMove: (event) => { + const value = getValueFromPointer(event.clientY); + onSlideMove?.(value); + }, + onSlideEnd: () => { + rectRef.current = void 0; + onSlideEnd?.(); + }, + onStepKeyDown: (event) => { + const slideDirection = isSlidingFromBottom ? "from-bottom" : "from-top"; + const isBackKey = BACK_KEYS[slideDirection].includes(event.key); + onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 }); + } + } + ) + } + ); + } +); +var SliderImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeSlider, + onSlideStart, + onSlideMove, + onSlideEnd, + onHomeKeyDown, + onEndKeyDown, + onStepKeyDown, + ...sliderProps + } = props; + const context = useSliderContext(SLIDER_NAME, __scopeSlider); + return /* @__PURE__ */ jsx( + Primitive.span, + { + ...sliderProps, + ref: forwardedRef, + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + if (event.key === "Home") { + onHomeKeyDown(event); + event.preventDefault(); + } else if (event.key === "End") { + onEndKeyDown(event); + event.preventDefault(); + } else if (PAGE_KEYS.concat(ARROW_KEYS).includes(event.key)) { + onStepKeyDown(event); + event.preventDefault(); + } + }), + onPointerDown: composeEventHandlers(props.onPointerDown, (event) => { + const target = event.target; + target.setPointerCapture(event.pointerId); + event.preventDefault(); + if (context.thumbs.has(target)) { + target.focus(); + } else { + onSlideStart(event); + } + }), + onPointerMove: composeEventHandlers(props.onPointerMove, (event) => { + const target = event.target; + if (target.hasPointerCapture(event.pointerId)) onSlideMove(event); + }), + onPointerUp: composeEventHandlers(props.onPointerUp, (event) => { + const target = event.target; + if (target.hasPointerCapture(event.pointerId)) { + target.releasePointerCapture(event.pointerId); + onSlideEnd(event); + } + }) + } + ); + } +); +var TRACK_NAME = "SliderTrack"; +var SliderTrack = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSlider, ...trackProps } = props; + const context = useSliderContext(TRACK_NAME, __scopeSlider); + return /* @__PURE__ */ jsx( + Primitive.span, + { + "data-disabled": context.disabled ? "" : void 0, + "data-orientation": context.orientation, + ...trackProps, + ref: forwardedRef + } + ); + } +); +SliderTrack.displayName = TRACK_NAME; +var RANGE_NAME = "SliderRange"; +var SliderRange = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSlider, ...rangeProps } = props; + const context = useSliderContext(RANGE_NAME, __scopeSlider); + const orientation = useSliderOrientationContext(RANGE_NAME, __scopeSlider); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref); + const valuesCount = context.values.length; + const percentages = context.values.map( + (value) => convertValueToPercentage(value, context.min, context.max) + ); + const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0; + const offsetEnd = 100 - Math.max(...percentages); + return /* @__PURE__ */ jsx( + Primitive.span, + { + "data-orientation": context.orientation, + "data-disabled": context.disabled ? "" : void 0, + ...rangeProps, + ref: composedRefs, + style: { + ...props.style, + [orientation.startEdge]: offsetStart + "%", + [orientation.endEdge]: offsetEnd + "%" + } + } + ); + } +); +SliderRange.displayName = RANGE_NAME; +var THUMB_NAME = "SliderThumb"; +var SliderThumb = React.forwardRef( + (props, forwardedRef) => { + const getItems = useCollection(props.__scopeSlider); + const [thumb, setThumb] = React.useState(null); + const composedRefs = useComposedRefs(forwardedRef, (node) => setThumb(node)); + const index = React.useMemo( + () => thumb ? getItems().findIndex((item) => item.ref.current === thumb) : -1, + [getItems, thumb] + ); + return /* @__PURE__ */ jsx(SliderThumbImpl, { ...props, ref: composedRefs, index }); + } +); +var SliderThumbImpl = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSlider, index, name, ...thumbProps } = props; + const context = useSliderContext(THUMB_NAME, __scopeSlider); + const orientation = useSliderOrientationContext(THUMB_NAME, __scopeSlider); + const [thumb, setThumb] = React.useState(null); + const composedRefs = useComposedRefs(forwardedRef, (node) => setThumb(node)); + const isFormControl = thumb ? context.form || !!thumb.closest("form") : true; + const size = useSize(thumb); + const value = context.values[index]; + const percent = value === void 0 ? 0 : convertValueToPercentage(value, context.min, context.max); + const label = getLabel(index, context.values.length); + const orientationSize = size?.[orientation.size]; + const thumbInBoundsOffset = orientationSize ? getThumbInBoundsOffset(orientationSize, percent, orientation.direction) : 0; + React.useEffect(() => { + if (thumb) { + context.thumbs.add(thumb); + return () => { + context.thumbs.delete(thumb); + }; + } + }, [thumb, context.thumbs]); + return /* @__PURE__ */ jsxs( + "span", + { + style: { + transform: "var(--radix-slider-thumb-transform)", + position: "absolute", + [orientation.startEdge]: `calc(${percent}% + ${thumbInBoundsOffset}px)` + }, + children: [ + /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: props.__scopeSlider, children: /* @__PURE__ */ jsx( + Primitive.span, + { + role: "slider", + "aria-label": props["aria-label"] || label, + "aria-valuemin": context.min, + "aria-valuenow": value, + "aria-valuemax": context.max, + "aria-orientation": context.orientation, + "data-orientation": context.orientation, + "data-disabled": context.disabled ? "" : void 0, + tabIndex: context.disabled ? void 0 : 0, + ...thumbProps, + ref: composedRefs, + style: value === void 0 ? { display: "none" } : props.style, + onFocus: composeEventHandlers(props.onFocus, () => { + context.valueIndexToChangeRef.current = index; + }) + } + ) }), + isFormControl && /* @__PURE__ */ jsx( + SliderBubbleInput, + { + name: name ?? (context.name ? context.name + (context.values.length > 1 ? "[]" : "") : void 0), + form: context.form, + value + }, + index + ) + ] + } + ); + } +); +SliderThumb.displayName = THUMB_NAME; +var BUBBLE_INPUT_NAME = "RadioBubbleInput"; +var SliderBubbleInput = React.forwardRef( + ({ __scopeSlider, value, ...props }, forwardedRef) => { + const ref = React.useRef(null); + const composedRefs = useComposedRefs(ref, forwardedRef); + const prevValue = usePrevious(value); + React.useEffect(() => { + const input = ref.current; + if (!input) return; + const inputProto = window.HTMLInputElement.prototype; + const descriptor = Object.getOwnPropertyDescriptor(inputProto, "value"); + const setValue = descriptor.set; + if (prevValue !== value && setValue) { + const event = new Event("input", { bubbles: true }); + setValue.call(input, value); + input.dispatchEvent(event); + } + }, [prevValue, value]); + return /* @__PURE__ */ jsx( + Primitive.input, + { + style: { display: "none" }, + ...props, + ref: composedRefs, + defaultValue: value + } + ); + } +); +SliderBubbleInput.displayName = BUBBLE_INPUT_NAME; +function getNextSortedValues(prevValues = [], nextValue, atIndex) { + const nextValues = [...prevValues]; + nextValues[atIndex] = nextValue; + return nextValues.sort((a, b) => a - b); +} +function convertValueToPercentage(value, min, max) { + const maxSteps = max - min; + const percentPerStep = 100 / maxSteps; + const percentage = percentPerStep * (value - min); + return clamp(percentage, [0, 100]); +} +function getLabel(index, totalValues) { + if (totalValues > 2) { + return `Value ${index + 1} of ${totalValues}`; + } else if (totalValues === 2) { + return ["Minimum", "Maximum"][index]; + } else { + return void 0; + } +} +function getClosestValueIndex(values, nextValue) { + if (values.length === 1) return 0; + const distances = values.map((value) => Math.abs(value - nextValue)); + const closestDistance = Math.min(...distances); + return distances.indexOf(closestDistance); +} +function getThumbInBoundsOffset(width, left, direction) { + const halfWidth = width / 2; + const halfPercent = 50; + const offset = linearScale([0, halfPercent], [0, halfWidth]); + return (halfWidth - offset(left) * direction) * direction; +} +function getStepsBetweenValues(values) { + return values.slice(0, -1).map((value, index) => values[index + 1] - value); +} +function hasMinStepsBetweenValues(values, minStepsBetweenValues) { + if (minStepsBetweenValues > 0) { + const stepsBetweenValues = getStepsBetweenValues(values); + const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues); + return actualMinStepsBetweenValues >= minStepsBetweenValues; + } + return true; +} +function linearScale(input, output) { + return (value) => { + if (input[0] === input[1] || output[0] === output[1]) return output[0]; + const ratio = (output[1] - output[0]) / (input[1] - input[0]); + return output[0] + ratio * (value - input[0]); + }; +} +function getDecimalCount(value) { + return (String(value).split(".")[1] || "").length; +} +function roundValue(value, decimalCount) { + const rounder = Math.pow(10, decimalCount); + return Math.round(value * rounder) / rounder; +} +var Root = Slider; +var Track = SliderTrack; +var Range = SliderRange; +var Thumb = SliderThumb; +export { + Range, + Root, + Slider, + SliderRange, + SliderThumb, + SliderTrack, + Thumb, + Track, + createSliderScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..948498cbd230e863f2a1ab30eed1c3aead181f38 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/slider.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { clamp } from '@radix-ui/number';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createCollection } from '@radix-ui/react-collection';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\nconst PAGE_KEYS = ['PageUp', 'PageDown'];\nconst ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\n\ntype SlideDirection = 'from-left' | 'from-right' | 'from-bottom' | 'from-top';\nconst BACK_KEYS: Record = {\n 'from-left': ['Home', 'PageDown', 'ArrowDown', 'ArrowLeft'],\n 'from-right': ['Home', 'PageDown', 'ArrowDown', 'ArrowRight'],\n 'from-bottom': ['Home', 'PageDown', 'ArrowDown', 'ArrowLeft'],\n 'from-top': ['Home', 'PageDown', 'ArrowUp', 'ArrowLeft'],\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Slider\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLIDER_NAME = 'Slider';\n\nconst [Collection, useCollection, createCollectionScope] =\n createCollection(SLIDER_NAME);\n\ntype ScopedProps

= P & { __scopeSlider?: Scope };\nconst [createSliderContext, createSliderScope] = createContextScope(SLIDER_NAME, [\n createCollectionScope,\n]);\n\ntype SliderContextValue = {\n name: string | undefined;\n disabled: boolean | undefined;\n min: number;\n max: number;\n values: number[];\n valueIndexToChangeRef: React.MutableRefObject;\n thumbs: Set;\n orientation: SliderProps['orientation'];\n form: string | undefined;\n};\n\nconst [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME);\n\ntype SliderElement = SliderHorizontalElement | SliderVerticalElement;\ninterface SliderProps\n extends Omit<\n SliderHorizontalProps | SliderVerticalProps,\n keyof SliderOrientationPrivateProps | 'defaultValue'\n > {\n name?: string;\n disabled?: boolean;\n orientation?: React.AriaAttributes['aria-orientation'];\n dir?: Direction;\n min?: number;\n max?: number;\n step?: number;\n minStepsBetweenThumbs?: number;\n value?: number[];\n defaultValue?: number[];\n onValueChange?(value: number[]): void;\n onValueCommit?(value: number[]): void;\n inverted?: boolean;\n form?: string;\n}\n\nconst Slider = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n name,\n min = 0,\n max = 100,\n step = 1,\n orientation = 'horizontal',\n disabled = false,\n minStepsBetweenThumbs = 0,\n defaultValue = [min],\n value,\n onValueChange = () => {},\n onValueCommit = () => {},\n inverted = false,\n form,\n ...sliderProps\n } = props;\n const thumbRefs = React.useRef(new Set());\n const valueIndexToChangeRef = React.useRef(0);\n const isHorizontal = orientation === 'horizontal';\n const SliderOrientation = isHorizontal ? SliderHorizontal : SliderVertical;\n\n const [values = [], setValues] = useControllableState({\n prop: value,\n defaultProp: defaultValue,\n onChange: (value) => {\n const thumbs = [...thumbRefs.current];\n thumbs[valueIndexToChangeRef.current]?.focus();\n onValueChange(value);\n },\n });\n const valuesBeforeSlideStartRef = React.useRef(values);\n\n function handleSlideStart(value: number) {\n const closestIndex = getClosestValueIndex(values, value);\n updateValues(value, closestIndex);\n }\n\n function handleSlideMove(value: number) {\n updateValues(value, valueIndexToChangeRef.current);\n }\n\n function handleSlideEnd() {\n const prevValue = valuesBeforeSlideStartRef.current[valueIndexToChangeRef.current];\n const nextValue = values[valueIndexToChangeRef.current];\n const hasChanged = nextValue !== prevValue;\n if (hasChanged) onValueCommit(values);\n }\n\n function updateValues(value: number, atIndex: number, { commit } = { commit: false }) {\n const decimalCount = getDecimalCount(step);\n const snapToStep = roundValue(Math.round((value - min) / step) * step + min, decimalCount);\n const nextValue = clamp(snapToStep, [min, max]);\n\n setValues((prevValues = []) => {\n const nextValues = getNextSortedValues(prevValues, nextValue, atIndex);\n if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs * step)) {\n valueIndexToChangeRef.current = nextValues.indexOf(nextValue);\n const hasChanged = String(nextValues) !== String(prevValues);\n if (hasChanged && commit) onValueCommit(nextValues);\n return hasChanged ? nextValues : prevValues;\n } else {\n return prevValues;\n }\n });\n }\n\n return (\n \n \n \n {\n if (!disabled) valuesBeforeSlideStartRef.current = values;\n })}\n min={min}\n max={max}\n inverted={inverted}\n onSlideStart={disabled ? undefined : handleSlideStart}\n onSlideMove={disabled ? undefined : handleSlideMove}\n onSlideEnd={disabled ? undefined : handleSlideEnd}\n onHomeKeyDown={() => !disabled && updateValues(min, 0, { commit: true })}\n onEndKeyDown={() =>\n !disabled && updateValues(max, values.length - 1, { commit: true })\n }\n onStepKeyDown={({ event, direction: stepDirection }) => {\n if (!disabled) {\n const isPageKey = PAGE_KEYS.includes(event.key);\n const isSkipKey = isPageKey || (event.shiftKey && ARROW_KEYS.includes(event.key));\n const multiplier = isSkipKey ? 10 : 1;\n const atIndex = valueIndexToChangeRef.current;\n const value = values[atIndex]!;\n const stepInDirection = step * multiplier * stepDirection;\n updateValues(value + stepInDirection, atIndex, { commit: true });\n }\n }}\n />\n \n \n \n );\n }\n);\n\nSlider.displayName = SLIDER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SliderHorizontal\n * -----------------------------------------------------------------------------------------------*/\n\ntype Side = 'top' | 'right' | 'bottom' | 'left';\n\nconst [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext<{\n startEdge: Side;\n endEdge: Side;\n size: keyof NonNullable>;\n direction: number;\n}>(SLIDER_NAME, {\n startEdge: 'left',\n endEdge: 'right',\n size: 'width',\n direction: 1,\n});\n\ntype SliderOrientationPrivateProps = {\n min: number;\n max: number;\n inverted: boolean;\n onSlideStart?(value: number): void;\n onSlideMove?(value: number): void;\n onSlideEnd?(): void;\n onHomeKeyDown(event: React.KeyboardEvent): void;\n onEndKeyDown(event: React.KeyboardEvent): void;\n onStepKeyDown(step: { event: React.KeyboardEvent; direction: number }): void;\n};\ninterface SliderOrientationProps\n extends Omit,\n SliderOrientationPrivateProps {}\n\ntype SliderHorizontalElement = SliderImplElement;\ninterface SliderHorizontalProps extends SliderOrientationProps {\n dir?: Direction;\n}\n\nconst SliderHorizontal = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n min,\n max,\n dir,\n inverted,\n onSlideStart,\n onSlideMove,\n onSlideEnd,\n onStepKeyDown,\n ...sliderProps\n } = props;\n const [slider, setSlider] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setSlider(node));\n const rectRef = React.useRef(undefined);\n const direction = useDirection(dir);\n const isDirectionLTR = direction === 'ltr';\n const isSlidingFromLeft = (isDirectionLTR && !inverted) || (!isDirectionLTR && inverted);\n\n function getValueFromPointer(pointerPosition: number) {\n const rect = rectRef.current || slider!.getBoundingClientRect();\n const input: [number, number] = [0, rect.width];\n const output: [number, number] = isSlidingFromLeft ? [min, max] : [max, min];\n const value = linearScale(input, output);\n\n rectRef.current = rect;\n return value(pointerPosition - rect.left);\n }\n\n return (\n \n {\n const value = getValueFromPointer(event.clientX);\n onSlideStart?.(value);\n }}\n onSlideMove={(event) => {\n const value = getValueFromPointer(event.clientX);\n onSlideMove?.(value);\n }}\n onSlideEnd={() => {\n rectRef.current = undefined;\n onSlideEnd?.();\n }}\n onStepKeyDown={(event) => {\n const slideDirection = isSlidingFromLeft ? 'from-left' : 'from-right';\n const isBackKey = BACK_KEYS[slideDirection].includes(event.key);\n onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 });\n }}\n />\n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * SliderVertical\n * -----------------------------------------------------------------------------------------------*/\n\ntype SliderVerticalElement = SliderImplElement;\ninterface SliderVerticalProps extends SliderOrientationProps {}\n\nconst SliderVertical = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n min,\n max,\n inverted,\n onSlideStart,\n onSlideMove,\n onSlideEnd,\n onStepKeyDown,\n ...sliderProps\n } = props;\n const sliderRef = React.useRef(null);\n const ref = useComposedRefs(forwardedRef, sliderRef);\n const rectRef = React.useRef(undefined);\n const isSlidingFromBottom = !inverted;\n\n function getValueFromPointer(pointerPosition: number) {\n const rect = rectRef.current || sliderRef.current!.getBoundingClientRect();\n const input: [number, number] = [0, rect.height];\n const output: [number, number] = isSlidingFromBottom ? [max, min] : [min, max];\n const value = linearScale(input, output);\n\n rectRef.current = rect;\n return value(pointerPosition - rect.top);\n }\n\n return (\n \n {\n const value = getValueFromPointer(event.clientY);\n onSlideStart?.(value);\n }}\n onSlideMove={(event) => {\n const value = getValueFromPointer(event.clientY);\n onSlideMove?.(value);\n }}\n onSlideEnd={() => {\n rectRef.current = undefined;\n onSlideEnd?.();\n }}\n onStepKeyDown={(event) => {\n const slideDirection = isSlidingFromBottom ? 'from-bottom' : 'from-top';\n const isBackKey = BACK_KEYS[slideDirection].includes(event.key);\n onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 });\n }}\n />\n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * SliderImpl\n * -----------------------------------------------------------------------------------------------*/\n\ntype SliderImplElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ntype SliderImplPrivateProps = {\n onSlideStart(event: React.PointerEvent): void;\n onSlideMove(event: React.PointerEvent): void;\n onSlideEnd(event: React.PointerEvent): void;\n onHomeKeyDown(event: React.KeyboardEvent): void;\n onEndKeyDown(event: React.KeyboardEvent): void;\n onStepKeyDown(event: React.KeyboardEvent): void;\n};\ninterface SliderImplProps extends PrimitiveDivProps, SliderImplPrivateProps {}\n\nconst SliderImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeSlider,\n onSlideStart,\n onSlideMove,\n onSlideEnd,\n onHomeKeyDown,\n onEndKeyDown,\n onStepKeyDown,\n ...sliderProps\n } = props;\n const context = useSliderContext(SLIDER_NAME, __scopeSlider);\n\n return (\n {\n if (event.key === 'Home') {\n onHomeKeyDown(event);\n // Prevent scrolling to page start\n event.preventDefault();\n } else if (event.key === 'End') {\n onEndKeyDown(event);\n // Prevent scrolling to page end\n event.preventDefault();\n } else if (PAGE_KEYS.concat(ARROW_KEYS).includes(event.key)) {\n onStepKeyDown(event);\n // Prevent scrolling for directional key presses\n event.preventDefault();\n }\n })}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n const target = event.target as HTMLElement;\n target.setPointerCapture(event.pointerId);\n // Prevent browser focus behaviour because we focus a thumb manually when values change.\n event.preventDefault();\n // Touch devices have a delay before focusing so won't focus if touch immediately moves\n // away from target (sliding). We want thumb to focus regardless.\n if (context.thumbs.has(target)) {\n target.focus();\n } else {\n onSlideStart(event);\n }\n })}\n onPointerMove={composeEventHandlers(props.onPointerMove, (event) => {\n const target = event.target as HTMLElement;\n if (target.hasPointerCapture(event.pointerId)) onSlideMove(event);\n })}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n const target = event.target as HTMLElement;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n onSlideEnd(event);\n }\n })}\n />\n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * SliderTrack\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRACK_NAME = 'SliderTrack';\n\ntype SliderTrackElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface SliderTrackProps extends PrimitiveSpanProps {}\n\nconst SliderTrack = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSlider, ...trackProps } = props;\n const context = useSliderContext(TRACK_NAME, __scopeSlider);\n return (\n \n );\n }\n);\n\nSliderTrack.displayName = TRACK_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SliderRange\n * -----------------------------------------------------------------------------------------------*/\n\nconst RANGE_NAME = 'SliderRange';\n\ntype SliderRangeElement = React.ComponentRef;\ninterface SliderRangeProps extends PrimitiveSpanProps {}\n\nconst SliderRange = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSlider, ...rangeProps } = props;\n const context = useSliderContext(RANGE_NAME, __scopeSlider);\n const orientation = useSliderOrientationContext(RANGE_NAME, __scopeSlider);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const valuesCount = context.values.length;\n const percentages = context.values.map((value) =>\n convertValueToPercentage(value, context.min, context.max)\n );\n const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;\n const offsetEnd = 100 - Math.max(...percentages);\n\n return (\n \n );\n }\n);\n\nSliderRange.displayName = RANGE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SliderThumb\n * -----------------------------------------------------------------------------------------------*/\n\nconst THUMB_NAME = 'SliderThumb';\n\ntype SliderThumbElement = SliderThumbImplElement;\ninterface SliderThumbProps extends Omit {}\n\nconst SliderThumb = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const getItems = useCollection(props.__scopeSlider);\n const [thumb, setThumb] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setThumb(node));\n const index = React.useMemo(\n () => (thumb ? getItems().findIndex((item) => item.ref.current === thumb) : -1),\n [getItems, thumb]\n );\n return ;\n }\n);\n\ntype SliderThumbImplElement = React.ComponentRef;\ninterface SliderThumbImplProps extends PrimitiveSpanProps {\n index: number;\n name?: string;\n}\n\nconst SliderThumbImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSlider, index, name, ...thumbProps } = props;\n const context = useSliderContext(THUMB_NAME, __scopeSlider);\n const orientation = useSliderOrientationContext(THUMB_NAME, __scopeSlider);\n const [thumb, setThumb] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setThumb(node));\n // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = thumb ? context.form || !!thumb.closest('form') : true;\n const size = useSize(thumb);\n // We cast because index could be `-1` which would return undefined\n const value = context.values[index] as number | undefined;\n const percent =\n value === undefined ? 0 : convertValueToPercentage(value, context.min, context.max);\n const label = getLabel(index, context.values.length);\n const orientationSize = size?.[orientation.size];\n const thumbInBoundsOffset = orientationSize\n ? getThumbInBoundsOffset(orientationSize, percent, orientation.direction)\n : 0;\n\n React.useEffect(() => {\n if (thumb) {\n context.thumbs.add(thumb);\n return () => {\n context.thumbs.delete(thumb);\n };\n }\n }, [thumb, context.thumbs]);\n\n return (\n \n \n {\n context.valueIndexToChangeRef.current = index;\n })}\n />\n \n\n {isFormControl && (\n 1 ? '[]' : '') : undefined)\n }\n form={context.form}\n value={value}\n />\n )}\n \n );\n }\n);\n\nSliderThumb.displayName = THUMB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SliderBubbleInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUBBLE_INPUT_NAME = 'RadioBubbleInput';\n\ntype InputProps = React.ComponentPropsWithoutRef;\ninterface SliderBubbleInputProps extends InputProps {}\n\nconst SliderBubbleInput = React.forwardRef(\n ({ __scopeSlider, value, ...props }: ScopedProps, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevValue = usePrevious(value);\n\n // Bubble value change to parents (e.g form change event)\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(inputProto, 'value') as PropertyDescriptor;\n const setValue = descriptor.set;\n if (prevValue !== value && setValue) {\n const event = new Event('input', { bubbles: true });\n setValue.call(input, value);\n input.dispatchEvent(event);\n }\n }, [prevValue, value]);\n\n /**\n * We purposefully do not use `type=\"hidden\"` here otherwise forms that\n * wrap it will not be able to access its value via the FormData API.\n *\n * We purposefully do not add the `value` attribute here to allow the value\n * to be set programmatically and bubble to any parent form `onChange` event.\n * Adding the `value` will cause React to consider the programmatic\n * dispatch a duplicate and it will get swallowed.\n */\n return (\n \n );\n }\n);\n\nSliderBubbleInput.displayName = BUBBLE_INPUT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getNextSortedValues(prevValues: number[] = [], nextValue: number, atIndex: number) {\n const nextValues = [...prevValues];\n nextValues[atIndex] = nextValue;\n return nextValues.sort((a, b) => a - b);\n}\n\nfunction convertValueToPercentage(value: number, min: number, max: number) {\n const maxSteps = max - min;\n const percentPerStep = 100 / maxSteps;\n const percentage = percentPerStep * (value - min);\n return clamp(percentage, [0, 100]);\n}\n\n/**\n * Returns a label for each thumb when there are two or more thumbs\n */\nfunction getLabel(index: number, totalValues: number) {\n if (totalValues > 2) {\n return `Value ${index + 1} of ${totalValues}`;\n } else if (totalValues === 2) {\n return ['Minimum', 'Maximum'][index];\n } else {\n return undefined;\n }\n}\n\n/**\n * Given a `values` array and a `nextValue`, determine which value in\n * the array is closest to `nextValue` and return its index.\n *\n * @example\n * // returns 1\n * getClosestValueIndex([10, 30], 25);\n */\nfunction getClosestValueIndex(values: number[], nextValue: number) {\n if (values.length === 1) return 0;\n const distances = values.map((value) => Math.abs(value - nextValue));\n const closestDistance = Math.min(...distances);\n return distances.indexOf(closestDistance);\n}\n\n/**\n * Offsets the thumb centre point while sliding to ensure it remains\n * within the bounds of the slider when reaching the edges\n */\nfunction getThumbInBoundsOffset(width: number, left: number, direction: number) {\n const halfWidth = width / 2;\n const halfPercent = 50;\n const offset = linearScale([0, halfPercent], [0, halfWidth]);\n return (halfWidth - offset(left) * direction) * direction;\n}\n\n/**\n * Gets an array of steps between each value.\n *\n * @example\n * // returns [1, 9]\n * getStepsBetweenValues([10, 11, 20]);\n */\nfunction getStepsBetweenValues(values: number[]) {\n return values.slice(0, -1).map((value, index) => values[index + 1]! - value);\n}\n\n/**\n * Verifies the minimum steps between all values is greater than or equal\n * to the expected minimum steps.\n *\n * @example\n * // returns false\n * hasMinStepsBetweenValues([1,2,3], 2);\n *\n * @example\n * // returns true\n * hasMinStepsBetweenValues([1,2,3], 1);\n */\nfunction hasMinStepsBetweenValues(values: number[], minStepsBetweenValues: number) {\n if (minStepsBetweenValues > 0) {\n const stepsBetweenValues = getStepsBetweenValues(values);\n const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);\n return actualMinStepsBetweenValues >= minStepsBetweenValues;\n }\n return true;\n}\n\n// https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js\nfunction linearScale(input: readonly [number, number], output: readonly [number, number]) {\n return (value: number) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\n\nfunction getDecimalCount(value: number) {\n return (String(value).split('.')[1] || '').length;\n}\n\nfunction roundValue(value: number, decimalCount: number) {\n const rounder = Math.pow(10, decimalCount);\n return Math.round(value * rounder) / rounder;\n}\n\nconst Root = Slider;\nconst Track = SliderTrack;\nconst Range = SliderRange;\nconst Thumb = SliderThumb;\n\nexport {\n createSliderScope,\n //\n Slider,\n SliderTrack,\n SliderRange,\n SliderThumb,\n //\n Root,\n Track,\n Range,\n Thumb,\n};\nexport type { SliderProps, SliderTrackProps, SliderRangeProps, SliderThumbProps };\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,aAAa;AACtB,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB;AAsJrB,cAwaN,YAxaM;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AAkB;AAClE,WAAO,+BAA+B;AAAA,EACxC;AACA,SAAO;AACT;AAGA,SAAS,YAAY,OAAkC,QAAmC;AACxF,SAAO,CAAC,UAAkB;AACxB,QAAI,MAAM,CAAC,MAAM,MAAM,CAAC,KAAK,OAAO,CAAC,MAAM,OAAO,CAAC,EAAG,QAAO,OAAO,CAAC;AACrE,UAAM,SAAS,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,MAAM,CAAC,IAAI,MAAM,CAAC;AAC3D,WAAO,OAAO,CAAC,IAAI,SAAS,QAAQ,MAAM,CAAC;AAAA,EAC7C;AACF;AAEA,SAAS,gBAAgB,OAAe;AACtC,UAAQ,OAAO,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC,KAAK,IAAI;AAC7C;AAEA,SAAS,WAAW,OAAe,cAAsB;AACvD,QAAM,UAAU,KAAK,IAAI,IAAI,YAAY;AACzC,SAAO,KAAK,MAAM,QAAQ,OAAO,IAAI;AACvC;AAEA,IAAM,OAAO;AACb,IAAM,QAAQ;AACd,IAAM,QAAQ;AACd,IAAM,QAAQ;", + "names": ["value"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/package.json b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/package.json new file mode 100644 index 0000000000000000000000000000000000000000..153704ed5b258c628e58ac0426cc40f64823231c --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slider@1.3.6_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_5731e3ed8503df154f4d2f5fd80b3af7/node_modules/@radix-ui/react-slider/package.json @@ -0,0 +1,78 @@ +{ + "name": "@radix-ui/react-slider", + "version": "1.3.6", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/number": "1.1.1", + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-collection": "1.1.7", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-use-layout-effect": "1.1.1", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-previous": "1.1.1", + "@radix-ui/react-use-size": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/eslint-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/LICENSE b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/README.md b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/README.md new file mode 100644 index 0000000000000000000000000000000000000000..55ccbd800664f1263fc663214264103775289120 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/README.md @@ -0,0 +1,3 @@ +# `react-slot` + +View docs [here](https://radix-ui.com/primitives/docs/utilities/slot). diff --git a/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..17de6f0d4b7a119ddc1bc78c7d5ffb784b4ccd09 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.d.mts @@ -0,0 +1,17 @@ +import * as React from 'react'; + +interface SlotProps extends React.HTMLAttributes { + children?: React.ReactNode; +} +declare function createSlot(ownerName: string): React.ForwardRefExoticComponent>; +declare const Slot: React.ForwardRefExoticComponent>; +interface SlottableProps { + children: React.ReactNode; +} +interface SlottableComponent extends React.FC { + __radixId: symbol; +} +declare function createSlottable(ownerName: string): SlottableComponent; +declare const Slottable: SlottableComponent; + +export { Slot as Root, Slot, type SlotProps, Slottable, createSlot, createSlottable }; diff --git a/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..17de6f0d4b7a119ddc1bc78c7d5ffb784b4ccd09 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.d.ts @@ -0,0 +1,17 @@ +import * as React from 'react'; + +interface SlotProps extends React.HTMLAttributes { + children?: React.ReactNode; +} +declare function createSlot(ownerName: string): React.ForwardRefExoticComponent>; +declare const Slot: React.ForwardRefExoticComponent>; +interface SlottableProps { + children: React.ReactNode; +} +interface SlottableComponent extends React.FC { + __radixId: symbol; +} +declare function createSlottable(ownerName: string): SlottableComponent; +declare const Slottable: SlottableComponent; + +export { Slot as Root, Slot, type SlotProps, Slottable, createSlot, createSlottable }; diff --git a/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.js b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..39b589364a894882efa43c8d162a44d68c6fa58f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.js @@ -0,0 +1,138 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Root: () => Slot, + Slot: () => Slot, + Slottable: () => Slottable, + createSlot: () => createSlot, + createSlottable: () => createSlottable +}); +module.exports = __toCommonJS(index_exports); + +// src/slot.tsx +var React = __toESM(require("react")); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_jsx_runtime = require("react/jsx-runtime"); +// @__NO_SIDE_EFFECTS__ +function createSlot(ownerName) { + const SlotClone = /* @__PURE__ */ createSlotClone(ownerName); + const Slot2 = React.forwardRef((props, forwardedRef) => { + const { children, ...slotProps } = props; + const childrenArray = React.Children.toArray(children); + const slottable = childrenArray.find(isSlottable); + if (slottable) { + const newElement = slottable.props.children; + const newChildren = childrenArray.map((child) => { + if (child === slottable) { + if (React.Children.count(newElement) > 1) return React.Children.only(null); + return React.isValidElement(newElement) ? newElement.props.children : null; + } else { + return child; + } + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null }); + } + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children }); + }); + Slot2.displayName = `${ownerName}.Slot`; + return Slot2; +} +var Slot = /* @__PURE__ */ createSlot("Slot"); +// @__NO_SIDE_EFFECTS__ +function createSlotClone(ownerName) { + const SlotClone = React.forwardRef((props, forwardedRef) => { + const { children, ...slotProps } = props; + if (React.isValidElement(children)) { + const childrenRef = getElementRef(children); + const props2 = mergeProps(slotProps, children.props); + if (children.type !== React.Fragment) { + props2.ref = forwardedRef ? (0, import_react_compose_refs.composeRefs)(forwardedRef, childrenRef) : childrenRef; + } + return React.cloneElement(children, props2); + } + return React.Children.count(children) > 1 ? React.Children.only(null) : null; + }); + SlotClone.displayName = `${ownerName}.SlotClone`; + return SlotClone; +} +var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable"); +// @__NO_SIDE_EFFECTS__ +function createSlottable(ownerName) { + const Slottable2 = ({ children }) => { + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children }); + }; + Slottable2.displayName = `${ownerName}.Slottable`; + Slottable2.__radixId = SLOTTABLE_IDENTIFIER; + return Slottable2; +} +var Slottable = /* @__PURE__ */ createSlottable("Slottable"); +function isSlottable(child) { + return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER; +} +function mergeProps(slotProps, childProps) { + const overrideProps = { ...childProps }; + for (const propName in childProps) { + const slotPropValue = slotProps[propName]; + const childPropValue = childProps[propName]; + const isHandler = /^on[A-Z]/.test(propName); + if (isHandler) { + if (slotPropValue && childPropValue) { + overrideProps[propName] = (...args) => { + const result = childPropValue(...args); + slotPropValue(...args); + return result; + }; + } else if (slotPropValue) { + overrideProps[propName] = slotPropValue; + } + } else if (propName === "style") { + overrideProps[propName] = { ...slotPropValue, ...childPropValue }; + } else if (propName === "className") { + overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" "); + } + } + return { ...slotProps, ...overrideProps }; +} +function getElementRef(element) { + let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get; + let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; + if (mayWarn) { + return element.ref; + } + getter = Object.getOwnPropertyDescriptor(element, "ref")?.get; + mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; + if (mayWarn) { + return element.props.ref; + } + return element.props.ref || element.ref; +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..04eca4cb66d707ce56ffdd26ca2905d015a8f959 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/slot.tsx"], + "sourcesContent": ["export {\n Slot,\n Slottable,\n //\n Root,\n createSlot,\n createSlottable,\n} from './slot';\nexport type { SlotProps } from './slot';\n", "import * as React from 'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotProps extends React.HTMLAttributes {\n children?: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlot(ownerName: string) {\n const SlotClone = createSlotClone(ownerName);\n const Slot = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n \n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n \n );\n }\n\n return (\n \n {children}\n \n );\n });\n\n Slot.displayName = `${ownerName}.Slot`;\n return Slot;\n}\n\nconst Slot = createSlot('Slot');\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ function createSlotClone(ownerName: string) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props = mergeProps(slotProps, children.props as AnyProps);\n // do not pass ref to React.Fragment for React 19 compatibility\n if (children.type !== React.Fragment) {\n props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props);\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLOTTABLE_IDENTIFIER = Symbol('radix.slottable');\n\ninterface SlottableProps {\n children: React.ReactNode;\n}\n\ninterface SlottableComponent extends React.FC {\n __radixId: symbol;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlottable(ownerName: string) {\n const Slottable: SlottableComponent = ({ children }) => {\n return <>{children};\n };\n Slottable.displayName = `${ownerName}.Slottable`;\n Slottable.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable;\n}\n\nconst Slottable = createSlottable('Slottable');\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record;\n\nfunction isSlottable(\n child: React.ReactNode\n): child is React.ReactElement {\n return (\n React.isValidElement(child) &&\n typeof child.type === 'function' &&\n '__radixId' in child.type &&\n child.type.__radixId === SLOTTABLE_IDENTIFIER\n );\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n // all child props should override\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n }\n // but if it exists only on the slot, we use only this one\n else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');\n }\n }\n\n return { ...slotProps, ...overrideProps };\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element.props as { ref?: React.Ref }).ref;\n }\n\n // Not DEV\n return (element.props as { ref?: React.Ref }).ref || (element as any).ref;\n}\n\nexport {\n Slot,\n Slottable,\n //\n Slot as Root,\n};\nexport type { SlotProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,gCAA4B;AAmCpB;AAAA;AAzB0B,SAAS,WAAW,WAAmB;AACvE,QAAM,YAAY,gCAAgB,SAAS;AAC3C,QAAMA,QAAa,iBAAmC,CAAC,OAAO,iBAAiB;AAC7E,UAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AACnC,UAAM,gBAAsB,eAAS,QAAQ,QAAQ;AACrD,UAAM,YAAY,cAAc,KAAK,WAAW;AAEhD,QAAI,WAAW;AAEb,YAAM,aAAa,UAAU,MAAM;AAEnC,YAAM,cAAc,cAAc,IAAI,CAAC,UAAU;AAC/C,YAAI,UAAU,WAAW;AAGvB,cAAU,eAAS,MAAM,UAAU,IAAI,EAAG,QAAa,eAAS,KAAK,IAAI;AACzE,iBAAa,qBAAe,UAAU,IACjC,WAAW,MAAwC,WACpD;AAAA,QACN,OAAO;AACL,iBAAO;AAAA,QACT;AAAA,MACF,CAAC;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AM,gBAAgB,EAAE,GAAG,WAAW;AAEtC,aAAW,YAAY,YAAY;AACjC,UAAM,gBAAgB,UAAU,QAAQ;AACxC,UAAM,iBAAiB,WAAW,QAAQ;AAE1C,UAAM,YAAY,WAAW,KAAK,QAAQ;AAC1C,QAAI,WAAW;AAEb,UAAI,iBAAiB,gBAAgB;AACnC,sBAAc,QAAQ,IAAI,IAAI,SAAoB;AAChD,gBAAM,SAAS,eAAe,GAAG,IAAI;AACrC,wBAAc,GAAG,IAAI;AACrB,iBAAO;AAAA,QACT;AAAA,MACF,WAES,eAAe;AACtB,sBAAc,QAAQ,IAAI;AAAA,MAC5B;AAAA,IACF,WAES,aAAa,SAAS;AAC7B,oBAAc,QAAQ,IAAI,EAAE,GAAG,eAAe,GAAG,eAAe;AAAA,IAClE,WAAW,aAAa,aAAa;AACnC,oBAAc,QAAQ,IAAI,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAc;AAC1C;AAOA,SAAS,cAAc,SAA6B;AAElD,MAAI,SAAS,OAAO,yBAAyB,QAAQ,OAAO,KAAK,GAAG;AACpE,MAAI,UAAU,UAAU,oBAAoB,UAAU,OAAO;AAC7D,MAAI,SAAS;AACX,WAAQ,QAAgB;AAAA,EAC1B;AAGA,WAAS,OAAO,yBAAyB,SAAS,KAAK,GAAG;AAC1D,YAAU,UAAU,oBAAoB,UAAU,OAAO;AACzD,MAAI,SAAS;AACX,WAAQ,QAAQ,MAAuC;AAAA,EACzD;AAGA,SAAQ,QAAQ,MAAuC,OAAQ,QAAgB;AACjF;", + "names": ["Slot", "props", "Slottable"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..510e77fc0471abe017279f39c87ecded59c41954 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs @@ -0,0 +1,105 @@ +// src/slot.tsx +import * as React from "react"; +import { composeRefs } from "@radix-ui/react-compose-refs"; +import { Fragment as Fragment2, jsx } from "react/jsx-runtime"; +// @__NO_SIDE_EFFECTS__ +function createSlot(ownerName) { + const SlotClone = /* @__PURE__ */ createSlotClone(ownerName); + const Slot2 = React.forwardRef((props, forwardedRef) => { + const { children, ...slotProps } = props; + const childrenArray = React.Children.toArray(children); + const slottable = childrenArray.find(isSlottable); + if (slottable) { + const newElement = slottable.props.children; + const newChildren = childrenArray.map((child) => { + if (child === slottable) { + if (React.Children.count(newElement) > 1) return React.Children.only(null); + return React.isValidElement(newElement) ? newElement.props.children : null; + } else { + return child; + } + }); + return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null }); + } + return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children }); + }); + Slot2.displayName = `${ownerName}.Slot`; + return Slot2; +} +var Slot = /* @__PURE__ */ createSlot("Slot"); +// @__NO_SIDE_EFFECTS__ +function createSlotClone(ownerName) { + const SlotClone = React.forwardRef((props, forwardedRef) => { + const { children, ...slotProps } = props; + if (React.isValidElement(children)) { + const childrenRef = getElementRef(children); + const props2 = mergeProps(slotProps, children.props); + if (children.type !== React.Fragment) { + props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef; + } + return React.cloneElement(children, props2); + } + return React.Children.count(children) > 1 ? React.Children.only(null) : null; + }); + SlotClone.displayName = `${ownerName}.SlotClone`; + return SlotClone; +} +var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable"); +// @__NO_SIDE_EFFECTS__ +function createSlottable(ownerName) { + const Slottable2 = ({ children }) => { + return /* @__PURE__ */ jsx(Fragment2, { children }); + }; + Slottable2.displayName = `${ownerName}.Slottable`; + Slottable2.__radixId = SLOTTABLE_IDENTIFIER; + return Slottable2; +} +var Slottable = /* @__PURE__ */ createSlottable("Slottable"); +function isSlottable(child) { + return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER; +} +function mergeProps(slotProps, childProps) { + const overrideProps = { ...childProps }; + for (const propName in childProps) { + const slotPropValue = slotProps[propName]; + const childPropValue = childProps[propName]; + const isHandler = /^on[A-Z]/.test(propName); + if (isHandler) { + if (slotPropValue && childPropValue) { + overrideProps[propName] = (...args) => { + const result = childPropValue(...args); + slotPropValue(...args); + return result; + }; + } else if (slotPropValue) { + overrideProps[propName] = slotPropValue; + } + } else if (propName === "style") { + overrideProps[propName] = { ...slotPropValue, ...childPropValue }; + } else if (propName === "className") { + overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" "); + } + } + return { ...slotProps, ...overrideProps }; +} +function getElementRef(element) { + let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get; + let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; + if (mayWarn) { + return element.ref; + } + getter = Object.getOwnPropertyDescriptor(element, "ref")?.get; + mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; + if (mayWarn) { + return element.props.ref; + } + return element.props.ref || element.ref; +} +export { + Slot as Root, + Slot, + Slottable, + createSlot, + createSlottable +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..5b96781705c3334c02d13096971fab74c43e8b71 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/slot.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotProps extends React.HTMLAttributes {\n children?: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlot(ownerName: string) {\n const SlotClone = createSlotClone(ownerName);\n const Slot = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n \n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n \n );\n }\n\n return (\n \n {children}\n \n );\n });\n\n Slot.displayName = `${ownerName}.Slot`;\n return Slot;\n}\n\nconst Slot = createSlot('Slot');\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ function createSlotClone(ownerName: string) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props = mergeProps(slotProps, children.props as AnyProps);\n // do not pass ref to React.Fragment for React 19 compatibility\n if (children.type !== React.Fragment) {\n props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props);\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLOTTABLE_IDENTIFIER = Symbol('radix.slottable');\n\ninterface SlottableProps {\n children: React.ReactNode;\n}\n\ninterface SlottableComponent extends React.FC {\n __radixId: symbol;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlottable(ownerName: string) {\n const Slottable: SlottableComponent = ({ children }) => {\n return <>{children};\n };\n Slottable.displayName = `${ownerName}.Slottable`;\n Slottable.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable;\n}\n\nconst Slottable = createSlottable('Slottable');\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record;\n\nfunction isSlottable(\n child: React.ReactNode\n): child is React.ReactElement {\n return (\n React.isValidElement(child) &&\n typeof child.type === 'function' &&\n '__radixId' in child.type &&\n child.type.__radixId === SLOTTABLE_IDENTIFIER\n );\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n // all child props should override\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n }\n // but if it exists only on the slot, we use only this one\n else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');\n }\n }\n\n return { ...slotProps, ...overrideProps };\n}\n\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nfunction getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element as any).ref;\n }\n\n // React 19 in DEV\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n return (element.props as { ref?: React.Ref }).ref;\n }\n\n // Not DEV\n return (element.props as { ref?: React.Ref }).ref || (element as any).ref;\n}\n\nexport {\n Slot,\n Slottable,\n //\n Slot as Root,\n};\nexport type { SlotProps };\n"], + "mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,mBAAmB;AAmCpB,SAkEG,YAAAA,WAlEH;AAAA;AAzB0B,SAAS,WAAW,WAAmB;AACvE,QAAM,YAAY,gCAAgB,SAAS;AAC3C,QAAMC,QAAa,iBAAmC,CAAC,OAAO,iBAAiB;AAC7E,UAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AACnC,UAAM,gBAAsB,eAAS,QAAQ,QAAQ;AACrD,UAAM,YAAY,cAAc,KAAK,WAAW;AAEhD,QAAI,WAAW;AAEb,YAAM,aAAa,UAAU,MAAM;AAEnC,YAAM,cAAc,cAAc,IAAI,CAAC,UAAU;AAC/C,YAAI,UAAU,WAAW;AAGvB,cAAU,eAAS,MAAM,UAAU,IAAI,EAAG,QAAa,eAAS,KAAK,IAAI;AACzE,iBAAa,qBAAe,UAAU,IACjC,WAAW,MAAwC,WACpD;AAAA,QACN,OAAO;AACL,iBAAO;AAAA,QACT;AAAA,MACF,CAAC;AAED,aACE,oBAAC,aAAW,GAAG,WAAW,KAAK,cAC5B,UAAM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,YAAY,YAAY;AACjC,UAAM,gBAAgB,UAAU,QAAQ;AACxC,UAAM,iBAAiB,WAAW,QAAQ;AAE1C,UAAM,YAAY,WAAW,KAAK,QAAQ;AAC1C,QAAI,WAAW;AAEb,UAAI,iBAAiB,gBAAgB;AACnC,sBAAc,QAAQ,IAAI,IAAI,SAAoB;AAChD,gBAAM,SAAS,eAAe,GAAG,IAAI;AACrC,wBAAc,GAAG,IAAI;AACrB,iBAAO;AAAA,QACT;AAAA,MACF,WAES,eAAe;AACtB,sBAAc,QAAQ,IAAI;AAAA,MAC5B;AAAA,IACF,WAES,aAAa,SAAS;AAC7B,oBAAc,QAAQ,IAAI,EAAE,GAAG,eAAe,GAAG,eAAe;AAAA,IAClE,WAAW,aAAa,aAAa;AACnC,oBAAc,QAAQ,IAAI,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAc;AAC1C;AAOA,SAAS,cAAc,SAA6B;AAElD,MAAI,SAAS,OAAO,yBAAyB,QAAQ,OAAO,KAAK,GAAG;AACpE,MAAI,UAAU,UAAU,oBAAoB,UAAU,OAAO;AAC7D,MAAI,SAAS;AACX,WAAQ,QAAgB;AAAA,EAC1B;AAGA,WAAS,OAAO,yBAAyB,SAAS,KAAK,GAAG;AAC1D,YAAU,UAAU,oBAAoB,UAAU,OAAO;AACzD,MAAI,SAAS;AACX,WAAQ,QAAQ,MAAuC;AAAA,EACzD;AAGA,SAAQ,QAAQ,MAAuC,OAAQ,QAAgB;AACjF;", + "names": ["Fragment", "Slot", "props", "Slottable"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/package.json b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/package.json new file mode 100644 index 0000000000000000000000000000000000000000..52aa51543283f3da75007a9d7beabc24eea60deb --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-slot/package.json @@ -0,0 +1,63 @@ +{ + "name": "@radix-ui/react-slot", + "version": "1.2.3", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/builder": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/LICENSE b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/README.md b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2cd0073426525898bb214ab7cf53b1d71c69174f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/README.md @@ -0,0 +1,3 @@ +# `react-switch` + +View docs [here](https://radix-ui.com/primitives/docs/components/switch). diff --git a/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..fd8bc755428f9876366a05816ddff869cdeec500 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.d.mts @@ -0,0 +1,21 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createSwitchScope: _radix_ui_react_context.CreateScope; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface SwitchProps extends PrimitiveButtonProps { + checked?: boolean; + defaultChecked?: boolean; + required?: boolean; + onCheckedChange?(checked: boolean): void; +} +declare const Switch: React.ForwardRefExoticComponent>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface SwitchThumbProps extends PrimitiveSpanProps { +} +declare const SwitchThumb: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Thumb: React.ForwardRefExoticComponent>; + +export { Root, Switch, type SwitchProps, SwitchThumb, type SwitchThumbProps, Thumb, createSwitchScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fd8bc755428f9876366a05816ddff869cdeec500 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.d.ts @@ -0,0 +1,21 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createSwitchScope: _radix_ui_react_context.CreateScope; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface SwitchProps extends PrimitiveButtonProps { + checked?: boolean; + defaultChecked?: boolean; + required?: boolean; + onCheckedChange?(checked: boolean): void; +} +declare const Switch: React.ForwardRefExoticComponent>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface SwitchThumbProps extends PrimitiveSpanProps { +} +declare const SwitchThumb: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Thumb: React.ForwardRefExoticComponent>; + +export { Root, Switch, type SwitchProps, SwitchThumb, type SwitchThumbProps, Thumb, createSwitchScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.js b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..1819185d74ba6db7f9b04a11fae33bc78dea65d5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.js @@ -0,0 +1,192 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Root: () => Root, + Switch: () => Switch, + SwitchThumb: () => SwitchThumb, + Thumb: () => Thumb, + createSwitchScope: () => createSwitchScope +}); +module.exports = __toCommonJS(index_exports); + +// src/switch.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_use_previous = require("@radix-ui/react-use-previous"); +var import_react_use_size = require("@radix-ui/react-use-size"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_jsx_runtime = require("react/jsx-runtime"); +var SWITCH_NAME = "Switch"; +var [createSwitchContext, createSwitchScope] = (0, import_react_context.createContextScope)(SWITCH_NAME); +var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME); +var Switch = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeSwitch, + name, + checked: checkedProp, + defaultChecked, + required, + disabled, + value = "on", + onCheckedChange, + form, + ...switchProps + } = props; + const [button, setButton] = React.useState(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setButton(node)); + const hasConsumerStoppedPropagationRef = React.useRef(false); + const isFormControl = button ? form || !!button.closest("form") : true; + const [checked, setChecked] = (0, import_react_use_controllable_state.useControllableState)({ + prop: checkedProp, + defaultProp: defaultChecked ?? false, + onChange: onCheckedChange, + caller: SWITCH_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + role: "switch", + "aria-checked": checked, + "aria-required": required, + "data-state": getState(checked), + "data-disabled": disabled ? "" : void 0, + disabled, + value, + ...switchProps, + ref: composedRefs, + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, (event) => { + setChecked((prevChecked) => !prevChecked); + if (isFormControl) { + hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(); + if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation(); + } + }) + } + ), + isFormControl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + SwitchBubbleInput, + { + control: button, + bubbles: !hasConsumerStoppedPropagationRef.current, + name, + value, + checked, + required, + disabled, + form, + style: { transform: "translateX(-100%)" } + } + ) + ] }); + } +); +Switch.displayName = SWITCH_NAME; +var THUMB_NAME = "SwitchThumb"; +var SwitchThumb = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSwitch, ...thumbProps } = props; + const context = useSwitchContext(THUMB_NAME, __scopeSwitch); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.span, + { + "data-state": getState(context.checked), + "data-disabled": context.disabled ? "" : void 0, + ...thumbProps, + ref: forwardedRef + } + ); + } +); +SwitchThumb.displayName = THUMB_NAME; +var BUBBLE_INPUT_NAME = "SwitchBubbleInput"; +var SwitchBubbleInput = React.forwardRef( + ({ + __scopeSwitch, + control, + checked, + bubbles = true, + ...props + }, forwardedRef) => { + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(ref, forwardedRef); + const prevChecked = (0, import_react_use_previous.usePrevious)(checked); + const controlSize = (0, import_react_use_size.useSize)(control); + React.useEffect(() => { + const input = ref.current; + if (!input) return; + const inputProto = window.HTMLInputElement.prototype; + const descriptor = Object.getOwnPropertyDescriptor( + inputProto, + "checked" + ); + const setChecked = descriptor.set; + if (prevChecked !== checked && setChecked) { + const event = new Event("click", { bubbles }); + setChecked.call(input, checked); + input.dispatchEvent(event); + } + }, [prevChecked, checked, bubbles]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + "input", + { + type: "checkbox", + "aria-hidden": true, + defaultChecked: checked, + ...props, + tabIndex: -1, + ref: composedRefs, + style: { + ...props.style, + ...controlSize, + position: "absolute", + pointerEvents: "none", + opacity: 0, + margin: 0 + } + } + ); + } +); +SwitchBubbleInput.displayName = BUBBLE_INPUT_NAME; +function getState(checked) { + return checked ? "checked" : "unchecked"; +} +var Root = Switch; +var Thumb = SwitchThumb; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..991d58fb1aa8a597ec0e9b636365aeade27b9aa2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/switch.tsx"], + "sourcesContent": ["'use client';\nexport {\n createSwitchScope,\n //\n Switch,\n SwitchThumb,\n //\n Root,\n Thumb,\n} from './switch';\nexport type { SwitchProps, SwitchThumbProps } from './switch';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Switch\n * -----------------------------------------------------------------------------------------------*/\n\nconst SWITCH_NAME = 'Switch';\n\ntype ScopedProps

= P & { __scopeSwitch?: Scope };\nconst [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\n\ntype SwitchContextValue = { checked: boolean; disabled?: boolean };\nconst [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);\n\ntype SwitchElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface SwitchProps extends PrimitiveButtonProps {\n checked?: boolean;\n defaultChecked?: boolean;\n required?: boolean;\n onCheckedChange?(checked: boolean): void;\n}\n\nconst Switch = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeSwitch,\n name,\n checked: checkedProp,\n defaultChecked,\n required,\n disabled,\n value = 'on',\n onCheckedChange,\n form,\n ...switchProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = button ? form || !!button.closest('form') : true;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: SWITCH_NAME,\n });\n\n return (\n \n {\n setChecked((prevChecked) => !prevChecked);\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n // if switch is in a form, stop propagation from the button so that we only propagate\n // one click event (from the input). We propagate changes from an input so that native\n // form validation works and form events reflect switch updates.\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })}\n />\n {isFormControl && (\n \n )}\n \n );\n }\n);\n\nSwitch.displayName = SWITCH_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SwitchThumb\n * -----------------------------------------------------------------------------------------------*/\n\nconst THUMB_NAME = 'SwitchThumb';\n\ntype SwitchThumbElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface SwitchThumbProps extends PrimitiveSpanProps {}\n\nconst SwitchThumb = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return (\n \n );\n }\n);\n\nSwitchThumb.displayName = THUMB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SwitchBubbleInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUBBLE_INPUT_NAME = 'SwitchBubbleInput';\n\ntype InputProps = React.ComponentPropsWithoutRef;\ninterface SwitchBubbleInputProps extends Omit {\n checked: boolean;\n control: HTMLElement | null;\n bubbles: boolean;\n}\n\nconst SwitchBubbleInput = React.forwardRef(\n (\n {\n __scopeSwitch,\n control,\n checked,\n bubbles = true,\n ...props\n }: ScopedProps,\n forwardedRef\n ) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n\n // Bubble checked change to parents (e.g form change event)\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n 'checked'\n ) as PropertyDescriptor;\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event('click', { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n\n return (\n \n );\n }\n);\n\nSwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(checked: boolean) {\n return checked ? 'checked' : 'unchecked';\n}\n\nconst Root = Switch;\nconst Thumb = SwitchThumb;\n\nexport {\n createSwitchScope,\n //\n Switch,\n SwitchThumb,\n //\n Root,\n Thumb,\n};\nexport type { SwitchProps, SwitchThumbProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,gCAAgC;AAChC,2BAAmC;AACnC,0CAAqC;AACrC,gCAA4B;AAC5B,4BAAwB;AACxB,6BAA0B;AAoDpB;AA5CN,IAAM,cAAc;AAGpB,IAAM,CAAC,qBAAqB,iBAAiB,QAAI,yCAAmB,WAAW;AAG/E,IAAM,CAAC,gBAAgB,gBAAgB,IAAI,oBAAwC,WAAW;AAW9F,IAAM,SAAe;AAAA,EACnB,CAAC,OAAiC,iBAAiB;AACjD,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA,SAAS;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI;AACJ,UAAM,CAAC,QAAQ,SAAS,IAAU,eAAmC,IAAI;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AS,SAAS,SAAkB;AAClC,SAAO,UAAU,YAAY;AAC/B;AAEA,IAAM,OAAO;AACb,IAAM,QAAQ;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..be87da8879f67a6fd662a1003d999e94d62abe29 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.mjs @@ -0,0 +1,160 @@ +"use client"; + +// src/switch.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { createContextScope } from "@radix-ui/react-context"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { usePrevious } from "@radix-ui/react-use-previous"; +import { useSize } from "@radix-ui/react-use-size"; +import { Primitive } from "@radix-ui/react-primitive"; +import { jsx, jsxs } from "react/jsx-runtime"; +var SWITCH_NAME = "Switch"; +var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME); +var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME); +var Switch = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeSwitch, + name, + checked: checkedProp, + defaultChecked, + required, + disabled, + value = "on", + onCheckedChange, + form, + ...switchProps + } = props; + const [button, setButton] = React.useState(null); + const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node)); + const hasConsumerStoppedPropagationRef = React.useRef(false); + const isFormControl = button ? form || !!button.closest("form") : true; + const [checked, setChecked] = useControllableState({ + prop: checkedProp, + defaultProp: defaultChecked ?? false, + onChange: onCheckedChange, + caller: SWITCH_NAME + }); + return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [ + /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + role: "switch", + "aria-checked": checked, + "aria-required": required, + "data-state": getState(checked), + "data-disabled": disabled ? "" : void 0, + disabled, + value, + ...switchProps, + ref: composedRefs, + onClick: composeEventHandlers(props.onClick, (event) => { + setChecked((prevChecked) => !prevChecked); + if (isFormControl) { + hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(); + if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation(); + } + }) + } + ), + isFormControl && /* @__PURE__ */ jsx( + SwitchBubbleInput, + { + control: button, + bubbles: !hasConsumerStoppedPropagationRef.current, + name, + value, + checked, + required, + disabled, + form, + style: { transform: "translateX(-100%)" } + } + ) + ] }); + } +); +Switch.displayName = SWITCH_NAME; +var THUMB_NAME = "SwitchThumb"; +var SwitchThumb = React.forwardRef( + (props, forwardedRef) => { + const { __scopeSwitch, ...thumbProps } = props; + const context = useSwitchContext(THUMB_NAME, __scopeSwitch); + return /* @__PURE__ */ jsx( + Primitive.span, + { + "data-state": getState(context.checked), + "data-disabled": context.disabled ? "" : void 0, + ...thumbProps, + ref: forwardedRef + } + ); + } +); +SwitchThumb.displayName = THUMB_NAME; +var BUBBLE_INPUT_NAME = "SwitchBubbleInput"; +var SwitchBubbleInput = React.forwardRef( + ({ + __scopeSwitch, + control, + checked, + bubbles = true, + ...props + }, forwardedRef) => { + const ref = React.useRef(null); + const composedRefs = useComposedRefs(ref, forwardedRef); + const prevChecked = usePrevious(checked); + const controlSize = useSize(control); + React.useEffect(() => { + const input = ref.current; + if (!input) return; + const inputProto = window.HTMLInputElement.prototype; + const descriptor = Object.getOwnPropertyDescriptor( + inputProto, + "checked" + ); + const setChecked = descriptor.set; + if (prevChecked !== checked && setChecked) { + const event = new Event("click", { bubbles }); + setChecked.call(input, checked); + input.dispatchEvent(event); + } + }, [prevChecked, checked, bubbles]); + return /* @__PURE__ */ jsx( + "input", + { + type: "checkbox", + "aria-hidden": true, + defaultChecked: checked, + ...props, + tabIndex: -1, + ref: composedRefs, + style: { + ...props.style, + ...controlSize, + position: "absolute", + pointerEvents: "none", + opacity: 0, + margin: 0 + } + } + ); + } +); +SwitchBubbleInput.displayName = BUBBLE_INPUT_NAME; +function getState(checked) { + return checked ? "checked" : "unchecked"; +} +var Root = Switch; +var Thumb = SwitchThumb; +export { + Root, + Switch, + SwitchThumb, + Thumb, + createSwitchScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..2bf7a950e6efa87d4155edc3a60ae9a5f041795d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/switch.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Switch\n * -----------------------------------------------------------------------------------------------*/\n\nconst SWITCH_NAME = 'Switch';\n\ntype ScopedProps

= P & { __scopeSwitch?: Scope };\nconst [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\n\ntype SwitchContextValue = { checked: boolean; disabled?: boolean };\nconst [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);\n\ntype SwitchElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface SwitchProps extends PrimitiveButtonProps {\n checked?: boolean;\n defaultChecked?: boolean;\n required?: boolean;\n onCheckedChange?(checked: boolean): void;\n}\n\nconst Switch = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeSwitch,\n name,\n checked: checkedProp,\n defaultChecked,\n required,\n disabled,\n value = 'on',\n onCheckedChange,\n form,\n ...switchProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = button ? form || !!button.closest('form') : true;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: SWITCH_NAME,\n });\n\n return (\n \n {\n setChecked((prevChecked) => !prevChecked);\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n // if switch is in a form, stop propagation from the button so that we only propagate\n // one click event (from the input). We propagate changes from an input so that native\n // form validation works and form events reflect switch updates.\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })}\n />\n {isFormControl && (\n \n )}\n \n );\n }\n);\n\nSwitch.displayName = SWITCH_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SwitchThumb\n * -----------------------------------------------------------------------------------------------*/\n\nconst THUMB_NAME = 'SwitchThumb';\n\ntype SwitchThumbElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface SwitchThumbProps extends PrimitiveSpanProps {}\n\nconst SwitchThumb = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return (\n \n );\n }\n);\n\nSwitchThumb.displayName = THUMB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SwitchBubbleInput\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUBBLE_INPUT_NAME = 'SwitchBubbleInput';\n\ntype InputProps = React.ComponentPropsWithoutRef;\ninterface SwitchBubbleInputProps extends Omit {\n checked: boolean;\n control: HTMLElement | null;\n bubbles: boolean;\n}\n\nconst SwitchBubbleInput = React.forwardRef(\n (\n {\n __scopeSwitch,\n control,\n checked,\n bubbles = true,\n ...props\n }: ScopedProps,\n forwardedRef\n ) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n\n // Bubble checked change to parents (e.g form change event)\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n 'checked'\n ) as PropertyDescriptor;\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event('click', { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n\n return (\n \n );\n }\n);\n\nSwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(checked: boolean) {\n return checked ? 'checked' : 'unchecked';\n}\n\nconst Root = Switch;\nconst Thumb = SwitchThumb;\n\nexport {\n createSwitchScope,\n //\n Switch,\n SwitchThumb,\n //\n Root,\n Thumb,\n};\nexport type { SwitchProps, SwitchThumbProps };\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAA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AAI,gBAAgB,WAAW,YAAY;AACzC,cAAM,QAAQ,IAAI,MAAM,SAAS,EAAE,QAAQ,CAAC;AAC5C,mBAAW,KAAK,OAAO,OAAO;AAC9B,cAAM,cAAc,KAAK;AAAA,MAC3B;AAAA,IACF,GAAG,CAAC,aAAa,SAAS,OAAO,CAAC;AAElC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,eAAW;AAAA,QACX,gBAAgB;AAAA,QACf,GAAG;AAAA,QACJ,UAAU;AAAA,QACV,KAAK;AAAA,QACL,OAAO;AAAA,UACL,GAAG,MAAM;AAAA,UACT,GAAG;AAAA,UACH,UAAU;AAAA,UACV,eAAe;AAAA,UACf,SAAS;AAAA,UACT,QAAQ;AAAA,QACV;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;AAIhC,SAAS,SAAS,SAAkB;AAClC,SAAO,UAAU,YAAY;AAC/B;AAEA,IAAM,OAAO;AACb,IAAM,QAAQ;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/package.json b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/package.json new file mode 100644 index 0000000000000000000000000000000000000000..539003583f605740c4520e63c9354c7e57d33b00 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_db59220afc53aaabe39f3dc79271c5ca/node_modules/@radix-ui/react-switch/package.json @@ -0,0 +1,74 @@ +{ + "name": "@radix-ui/react-switch", + "version": "1.2.5", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.2", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-use-previous": "1.1.1", + "@radix-ui/react-use-size": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/LICENSE b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/README.md b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/README.md new file mode 100644 index 0000000000000000000000000000000000000000..15546d90c3d5bdde481fb58a1f31c0439e09ef64 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/README.md @@ -0,0 +1,3 @@ +# `react-tabs` + +View docs [here](https://radix-ui.com/primitives/docs/components/tabs). diff --git a/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c3a25e48f665d28c24a054f6244198362b93b1c0 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.d.mts @@ -0,0 +1,56 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as RovingFocusGroup from '@radix-ui/react-roving-focus'; + +declare const createTabsScope: _radix_ui_react_context.CreateScope; +type RovingFocusGroupProps = React.ComponentPropsWithoutRef; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface TabsProps extends PrimitiveDivProps { + /** The value for the selected tab, if controlled */ + value?: string; + /** The value of the tab to select by default, if uncontrolled */ + defaultValue?: string; + /** A function called when a new tab is selected */ + onValueChange?: (value: string) => void; + /** + * The orientation the tabs are layed out. + * Mainly so arrow navigation is done accordingly (left & right vs. up & down) + * @defaultValue horizontal + */ + orientation?: RovingFocusGroupProps['orientation']; + /** + * The direction of navigation between toolbar items. + */ + dir?: RovingFocusGroupProps['dir']; + /** + * Whether a tab is activated automatically or manually. + * @defaultValue automatic + * */ + activationMode?: 'automatic' | 'manual'; +} +declare const Tabs: React.ForwardRefExoticComponent>; +interface TabsListProps extends PrimitiveDivProps { + loop?: RovingFocusGroupProps['loop']; +} +declare const TabsList: React.ForwardRefExoticComponent>; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface TabsTriggerProps extends PrimitiveButtonProps { + value: string; +} +declare const TabsTrigger: React.ForwardRefExoticComponent>; +interface TabsContentProps extends PrimitiveDivProps { + value: string; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const TabsContent: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const List: React.ForwardRefExoticComponent>; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; + +export { Content, List, Root, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Trigger, createTabsScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c3a25e48f665d28c24a054f6244198362b93b1c0 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.d.ts @@ -0,0 +1,56 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as RovingFocusGroup from '@radix-ui/react-roving-focus'; + +declare const createTabsScope: _radix_ui_react_context.CreateScope; +type RovingFocusGroupProps = React.ComponentPropsWithoutRef; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface TabsProps extends PrimitiveDivProps { + /** The value for the selected tab, if controlled */ + value?: string; + /** The value of the tab to select by default, if uncontrolled */ + defaultValue?: string; + /** A function called when a new tab is selected */ + onValueChange?: (value: string) => void; + /** + * The orientation the tabs are layed out. + * Mainly so arrow navigation is done accordingly (left & right vs. up & down) + * @defaultValue horizontal + */ + orientation?: RovingFocusGroupProps['orientation']; + /** + * The direction of navigation between toolbar items. + */ + dir?: RovingFocusGroupProps['dir']; + /** + * Whether a tab is activated automatically or manually. + * @defaultValue automatic + * */ + activationMode?: 'automatic' | 'manual'; +} +declare const Tabs: React.ForwardRefExoticComponent>; +interface TabsListProps extends PrimitiveDivProps { + loop?: RovingFocusGroupProps['loop']; +} +declare const TabsList: React.ForwardRefExoticComponent>; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface TabsTriggerProps extends PrimitiveButtonProps { + value: string; +} +declare const TabsTrigger: React.ForwardRefExoticComponent>; +interface TabsContentProps extends PrimitiveDivProps { + value: string; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const TabsContent: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const List: React.ForwardRefExoticComponent>; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Content: React.ForwardRefExoticComponent>; + +export { Content, List, Root, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Trigger, createTabsScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.js b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..15fb93493f5860bc0f85c4c03920a556d0f91812 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.js @@ -0,0 +1,232 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Content: () => Content, + List: () => List, + Root: () => Root2, + Tabs: () => Tabs, + TabsContent: () => TabsContent, + TabsList: () => TabsList, + TabsTrigger: () => TabsTrigger, + Trigger: () => Trigger, + createTabsScope: () => createTabsScope +}); +module.exports = __toCommonJS(index_exports); + +// src/tabs.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_roving_focus = require("@radix-ui/react-roving-focus"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var RovingFocusGroup = __toESM(require("@radix-ui/react-roving-focus")); +var import_react_direction = require("@radix-ui/react-direction"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_id = require("@radix-ui/react-id"); +var import_jsx_runtime = require("react/jsx-runtime"); +var TABS_NAME = "Tabs"; +var [createTabsContext, createTabsScope] = (0, import_react_context.createContextScope)(TABS_NAME, [ + import_react_roving_focus.createRovingFocusGroupScope +]); +var useRovingFocusGroupScope = (0, import_react_roving_focus.createRovingFocusGroupScope)(); +var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME); +var Tabs = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeTabs, + value: valueProp, + onValueChange, + defaultValue, + orientation = "horizontal", + dir, + activationMode = "automatic", + ...tabsProps + } = props; + const direction = (0, import_react_direction.useDirection)(dir); + const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({ + prop: valueProp, + onChange: onValueChange, + defaultProp: defaultValue ?? "", + caller: TABS_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + TabsProvider, + { + scope: __scopeTabs, + baseId: (0, import_react_id.useId)(), + value, + onValueChange: setValue, + orientation, + dir: direction, + activationMode, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + dir: direction, + "data-orientation": orientation, + ...tabsProps, + ref: forwardedRef + } + ) + } + ); + } +); +Tabs.displayName = TABS_NAME; +var TAB_LIST_NAME = "TabsList"; +var TabsList = React.forwardRef( + (props, forwardedRef) => { + const { __scopeTabs, loop = true, ...listProps } = props; + const context = useTabsContext(TAB_LIST_NAME, __scopeTabs); + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + RovingFocusGroup.Root, + { + asChild: true, + ...rovingFocusGroupScope, + orientation: context.orientation, + dir: context.dir, + loop, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + role: "tablist", + "aria-orientation": context.orientation, + ...listProps, + ref: forwardedRef + } + ) + } + ); + } +); +TabsList.displayName = TAB_LIST_NAME; +var TRIGGER_NAME = "TabsTrigger"; +var TabsTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeTabs, value, disabled = false, ...triggerProps } = props; + const context = useTabsContext(TRIGGER_NAME, __scopeTabs); + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs); + const triggerId = makeTriggerId(context.baseId, value); + const contentId = makeContentId(context.baseId, value); + const isSelected = value === context.value; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + RovingFocusGroup.Item, + { + asChild: true, + ...rovingFocusGroupScope, + focusable: !disabled, + active: isSelected, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + role: "tab", + "aria-selected": isSelected, + "aria-controls": contentId, + "data-state": isSelected ? "active" : "inactive", + "data-disabled": disabled ? "" : void 0, + disabled, + id: triggerId, + ...triggerProps, + ref: forwardedRef, + onMouseDown: (0, import_primitive.composeEventHandlers)(props.onMouseDown, (event) => { + if (!disabled && event.button === 0 && event.ctrlKey === false) { + context.onValueChange(value); + } else { + event.preventDefault(); + } + }), + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + if ([" ", "Enter"].includes(event.key)) context.onValueChange(value); + }), + onFocus: (0, import_primitive.composeEventHandlers)(props.onFocus, () => { + const isAutomaticActivation = context.activationMode !== "manual"; + if (!isSelected && !disabled && isAutomaticActivation) { + context.onValueChange(value); + } + }) + } + ) + } + ); + } +); +TabsTrigger.displayName = TRIGGER_NAME; +var CONTENT_NAME = "TabsContent"; +var TabsContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeTabs, value, forceMount, children, ...contentProps } = props; + const context = useTabsContext(CONTENT_NAME, __scopeTabs); + const triggerId = makeTriggerId(context.baseId, value); + const contentId = makeContentId(context.baseId, value); + const isSelected = value === context.value; + const isMountAnimationPreventedRef = React.useRef(isSelected); + React.useEffect(() => { + const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false); + return () => cancelAnimationFrame(rAF); + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "data-state": isSelected ? "active" : "inactive", + "data-orientation": context.orientation, + role: "tabpanel", + "aria-labelledby": triggerId, + hidden: !present, + id: contentId, + tabIndex: 0, + ...contentProps, + ref: forwardedRef, + style: { + ...props.style, + animationDuration: isMountAnimationPreventedRef.current ? "0s" : void 0 + }, + children: present && children + } + ) }); + } +); +TabsContent.displayName = CONTENT_NAME; +function makeTriggerId(baseId, value) { + return `${baseId}-trigger-${value}`; +} +function makeContentId(baseId, value) { + return `${baseId}-content-${value}`; +} +var Root2 = Tabs; +var List = TabsList; +var Trigger = TabsTrigger; +var Content = TabsContent; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ea68afd612ac7113c7491bd87042c879149a8ee2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/tabs.tsx"], + "sourcesContent": ["'use client';\nexport {\n createTabsScope,\n //\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n //\n Root,\n List,\n Trigger,\n Content,\n} from './tabs';\nexport type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps } from './tabs';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useId } from '@radix-ui/react-id';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Tabs\n * -----------------------------------------------------------------------------------------------*/\n\nconst TABS_NAME = 'Tabs';\n\ntype ScopedProps

= P & { __scopeTabs?: Scope };\nconst [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [\n createRovingFocusGroupScope,\n]);\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\n\ntype TabsContextValue = {\n baseId: string;\n value: string;\n onValueChange: (value: string) => void;\n orientation?: TabsProps['orientation'];\n dir?: TabsProps['dir'];\n activationMode?: TabsProps['activationMode'];\n};\n\nconst [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);\n\ntype TabsElement = React.ComponentRef;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface TabsProps extends PrimitiveDivProps {\n /** The value for the selected tab, if controlled */\n value?: string;\n /** The value of the tab to select by default, if uncontrolled */\n defaultValue?: string;\n /** A function called when a new tab is selected */\n onValueChange?: (value: string) => void;\n /**\n * The orientation the tabs are layed out.\n * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n * @defaultValue horizontal\n */\n orientation?: RovingFocusGroupProps['orientation'];\n /**\n * The direction of navigation between toolbar items.\n */\n dir?: RovingFocusGroupProps['dir'];\n /**\n * Whether a tab is activated automatically or manually.\n * @defaultValue automatic\n * */\n activationMode?: 'automatic' | 'manual';\n}\n\nconst Tabs = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeTabs,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = 'horizontal',\n dir,\n activationMode = 'automatic',\n ...tabsProps\n } = props;\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? '',\n caller: TABS_NAME,\n });\n\n return (\n \n \n \n );\n }\n);\n\nTabs.displayName = TABS_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TabsList\n * -----------------------------------------------------------------------------------------------*/\n\nconst TAB_LIST_NAME = 'TabsList';\n\ntype TabsListElement = React.ComponentRef;\ninterface TabsListProps extends PrimitiveDivProps {\n loop?: RovingFocusGroupProps['loop'];\n}\n\nconst TabsList = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeTabs, loop = true, ...listProps } = props;\n const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n return (\n \n \n \n );\n }\n);\n\nTabsList.displayName = TAB_LIST_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TabsTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'TabsTrigger';\n\ntype TabsTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface TabsTriggerProps extends PrimitiveButtonProps {\n value: string;\n}\n\nconst TabsTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeTabs, value, disabled = false, ...triggerProps } = props;\n const context = useTabsContext(TRIGGER_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n return (\n \n {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onValueChange(value);\n } else {\n // prevent focus to avoid accidental activation\n event.preventDefault();\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if ([' ', 'Enter'].includes(event.key)) context.onValueChange(value);\n })}\n onFocus={composeEventHandlers(props.onFocus, () => {\n // handle \"automatic\" activation if necessary\n // ie. activate tab following focus\n const isAutomaticActivation = context.activationMode !== 'manual';\n if (!isSelected && !disabled && isAutomaticActivation) {\n context.onValueChange(value);\n }\n })}\n />\n \n );\n }\n);\n\nTabsTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TabsContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'TabsContent';\n\ntype TabsContentElement = React.ComponentRef;\ninterface TabsContentProps extends PrimitiveDivProps {\n value: string;\n\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst TabsContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeTabs, value, forceMount, children, ...contentProps } = props;\n const context = useTabsContext(CONTENT_NAME, __scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n const isMountAnimationPreventedRef = React.useRef(isSelected);\n\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => (isMountAnimationPreventedRef.current = false));\n return () => cancelAnimationFrame(rAF);\n }, []);\n\n return (\n \n {({ present }) => (\n \n );\n }\n);\n\nTabsContent.displayName = CONTENT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction makeTriggerId(baseId: string, value: string) {\n return `${baseId}-trigger-${value}`;\n}\n\nfunction makeContentId(baseId: string, value: string) {\n return `${baseId}-content-${value}`;\n}\n\nconst Root = Tabs;\nconst List = TabsList;\nconst Trigger = TabsTrigger;\nconst Content = TabsContent;\n\nexport {\n createTabsScope,\n //\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n //\n Root,\n List,\n Trigger,\n Content,\n};\nexport type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,2BAAmC;AACnC,gCAA4C;AAC5C,4BAAyB;AACzB,6BAA0B;AAC1B,uBAAkC;AAClC,6BAA6B;AAC7B,0CAAqC;AACrC,sBAAsB;AAoFd;AA5ER,IAAM,YAAY;AAGlB,IAAM,CAAC,mBAAmB,eAAe,QAAI,yCAAmB,WAAW;AAAA,EACzE;AACF,CAAC;AACD,IAAM,+BAA2B,uDAA4B;AAW7D,IAAM,CAAC,cAAc,cAAc,IAAI,kBAAoC,SAAS;AA6BpF,IAAM,OAAa;AAAA,EACjB,CAAC,OAA+B,iBAAiB;AAC/C,UAAM;AAAA,MACJ;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA,cAAc;AAAA,MACd;AAAA,MACA,iBAAiB;AAAA,MACjB,GAAG;AAAA,IACL,IAAI;AACJ,UAAM,gBAAY,qCAAa,GAAG;AAClC,UAAM,CAAC,OAAO,QAAQ,QAAI,0DAAqB;AAAA,MAC7C,MAAM;AAAA,MACN,UAAU;AAAA,MACV,aAAa,gBAAgB;AAAA,MAC7B,QAAQ;AAAA,IACV,CAAC;AAED,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP,YAAQ,uBAAM;AAAA,QACd;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA,KAAK;AAAA,QACL;AAAA,QAEA;AAAA,UAAC,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AAS,cAAc,YAC9B,WAAC,EAAE,QAAQ,MACV;AAAA,MAAC,iCAAU;AAAA,MAAV;AAAA,QACC,cAAY,aAAa,WAAW;AAAA,QACpC,oBAAkB,QAAQ;AAAA,QAC1B,MAAK;AAAA,QACL,mBAAiB;AAAA,QACjB,QAAQ,CAAC;AAAA,QACT,IAAI;AAAA,QACJ,UAAU;AAAA,QACT,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,OAAO;AAAA,UACL,GAAG,MAAM;AAAA,UACT,mBAAmB,6BAA6B,UAAU,OAAO;AAAA,QACnE;AAAA,QAEC,qBAAW;AAAA;AAAA,IACd,GAEJ;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAI1B,SAAS,cAAc,QAAgB,OAAe;AACpD,SAAO,GAAG,MAAM,YAAY,KAAK;AACnC;AAEA,SAAS,cAAc,QAAgB,OAAe;AACpD,SAAO,GAAG,MAAM,YAAY,KAAK;AACnC;AAEA,IAAMC,QAAO;AACb,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAM,UAAU;", + "names": ["Root", "Root"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ba2c4bd6218866fb89949f7576a3a2bd172d78fe --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.mjs @@ -0,0 +1,200 @@ +"use client"; + +// src/tabs.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { createContextScope } from "@radix-ui/react-context"; +import { createRovingFocusGroupScope } from "@radix-ui/react-roving-focus"; +import { Presence } from "@radix-ui/react-presence"; +import { Primitive } from "@radix-ui/react-primitive"; +import * as RovingFocusGroup from "@radix-ui/react-roving-focus"; +import { useDirection } from "@radix-ui/react-direction"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { useId } from "@radix-ui/react-id"; +import { jsx } from "react/jsx-runtime"; +var TABS_NAME = "Tabs"; +var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [ + createRovingFocusGroupScope +]); +var useRovingFocusGroupScope = createRovingFocusGroupScope(); +var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME); +var Tabs = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeTabs, + value: valueProp, + onValueChange, + defaultValue, + orientation = "horizontal", + dir, + activationMode = "automatic", + ...tabsProps + } = props; + const direction = useDirection(dir); + const [value, setValue] = useControllableState({ + prop: valueProp, + onChange: onValueChange, + defaultProp: defaultValue ?? "", + caller: TABS_NAME + }); + return /* @__PURE__ */ jsx( + TabsProvider, + { + scope: __scopeTabs, + baseId: useId(), + value, + onValueChange: setValue, + orientation, + dir: direction, + activationMode, + children: /* @__PURE__ */ jsx( + Primitive.div, + { + dir: direction, + "data-orientation": orientation, + ...tabsProps, + ref: forwardedRef + } + ) + } + ); + } +); +Tabs.displayName = TABS_NAME; +var TAB_LIST_NAME = "TabsList"; +var TabsList = React.forwardRef( + (props, forwardedRef) => { + const { __scopeTabs, loop = true, ...listProps } = props; + const context = useTabsContext(TAB_LIST_NAME, __scopeTabs); + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs); + return /* @__PURE__ */ jsx( + RovingFocusGroup.Root, + { + asChild: true, + ...rovingFocusGroupScope, + orientation: context.orientation, + dir: context.dir, + loop, + children: /* @__PURE__ */ jsx( + Primitive.div, + { + role: "tablist", + "aria-orientation": context.orientation, + ...listProps, + ref: forwardedRef + } + ) + } + ); + } +); +TabsList.displayName = TAB_LIST_NAME; +var TRIGGER_NAME = "TabsTrigger"; +var TabsTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeTabs, value, disabled = false, ...triggerProps } = props; + const context = useTabsContext(TRIGGER_NAME, __scopeTabs); + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs); + const triggerId = makeTriggerId(context.baseId, value); + const contentId = makeContentId(context.baseId, value); + const isSelected = value === context.value; + return /* @__PURE__ */ jsx( + RovingFocusGroup.Item, + { + asChild: true, + ...rovingFocusGroupScope, + focusable: !disabled, + active: isSelected, + children: /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + role: "tab", + "aria-selected": isSelected, + "aria-controls": contentId, + "data-state": isSelected ? "active" : "inactive", + "data-disabled": disabled ? "" : void 0, + disabled, + id: triggerId, + ...triggerProps, + ref: forwardedRef, + onMouseDown: composeEventHandlers(props.onMouseDown, (event) => { + if (!disabled && event.button === 0 && event.ctrlKey === false) { + context.onValueChange(value); + } else { + event.preventDefault(); + } + }), + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + if ([" ", "Enter"].includes(event.key)) context.onValueChange(value); + }), + onFocus: composeEventHandlers(props.onFocus, () => { + const isAutomaticActivation = context.activationMode !== "manual"; + if (!isSelected && !disabled && isAutomaticActivation) { + context.onValueChange(value); + } + }) + } + ) + } + ); + } +); +TabsTrigger.displayName = TRIGGER_NAME; +var CONTENT_NAME = "TabsContent"; +var TabsContent = React.forwardRef( + (props, forwardedRef) => { + const { __scopeTabs, value, forceMount, children, ...contentProps } = props; + const context = useTabsContext(CONTENT_NAME, __scopeTabs); + const triggerId = makeTriggerId(context.baseId, value); + const contentId = makeContentId(context.baseId, value); + const isSelected = value === context.value; + const isMountAnimationPreventedRef = React.useRef(isSelected); + React.useEffect(() => { + const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false); + return () => cancelAnimationFrame(rAF); + }, []); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx( + Primitive.div, + { + "data-state": isSelected ? "active" : "inactive", + "data-orientation": context.orientation, + role: "tabpanel", + "aria-labelledby": triggerId, + hidden: !present, + id: contentId, + tabIndex: 0, + ...contentProps, + ref: forwardedRef, + style: { + ...props.style, + animationDuration: isMountAnimationPreventedRef.current ? "0s" : void 0 + }, + children: present && children + } + ) }); + } +); +TabsContent.displayName = CONTENT_NAME; +function makeTriggerId(baseId, value) { + return `${baseId}-trigger-${value}`; +} +function makeContentId(baseId, value) { + return `${baseId}-content-${value}`; +} +var Root2 = Tabs; +var List = TabsList; +var Trigger = TabsTrigger; +var Content = TabsContent; +export { + Content, + List, + Root2 as Root, + Tabs, + TabsContent, + TabsList, + TabsTrigger, + Trigger, + createTabsScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..a7971e1542c40c502055210fe0353aa3a678b093 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/tabs.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useId } from '@radix-ui/react-id';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Tabs\n * -----------------------------------------------------------------------------------------------*/\n\nconst TABS_NAME = 'Tabs';\n\ntype ScopedProps

= P & { __scopeTabs?: Scope };\nconst [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [\n createRovingFocusGroupScope,\n]);\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\n\ntype TabsContextValue = {\n baseId: string;\n value: string;\n onValueChange: (value: string) => void;\n orientation?: TabsProps['orientation'];\n dir?: TabsProps['dir'];\n activationMode?: TabsProps['activationMode'];\n};\n\nconst [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);\n\ntype TabsElement = React.ComponentRef;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface TabsProps extends PrimitiveDivProps {\n /** The value for the selected tab, if controlled */\n value?: string;\n /** The value of the tab to select by default, if uncontrolled */\n defaultValue?: string;\n /** A function called when a new tab is selected */\n onValueChange?: (value: string) => void;\n /**\n * The orientation the tabs are layed out.\n * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n * @defaultValue horizontal\n */\n orientation?: RovingFocusGroupProps['orientation'];\n /**\n * The direction of navigation between toolbar items.\n */\n dir?: RovingFocusGroupProps['dir'];\n /**\n * Whether a tab is activated automatically or manually.\n * @defaultValue automatic\n * */\n activationMode?: 'automatic' | 'manual';\n}\n\nconst Tabs = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeTabs,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = 'horizontal',\n dir,\n activationMode = 'automatic',\n ...tabsProps\n } = props;\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? '',\n caller: TABS_NAME,\n });\n\n return (\n \n \n \n );\n }\n);\n\nTabs.displayName = TABS_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TabsList\n * -----------------------------------------------------------------------------------------------*/\n\nconst TAB_LIST_NAME = 'TabsList';\n\ntype TabsListElement = React.ComponentRef;\ninterface TabsListProps extends PrimitiveDivProps {\n loop?: RovingFocusGroupProps['loop'];\n}\n\nconst TabsList = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeTabs, loop = true, ...listProps } = props;\n const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n return (\n \n \n \n );\n }\n);\n\nTabsList.displayName = TAB_LIST_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TabsTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'TabsTrigger';\n\ntype TabsTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface TabsTriggerProps extends PrimitiveButtonProps {\n value: string;\n}\n\nconst TabsTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeTabs, value, disabled = false, ...triggerProps } = props;\n const context = useTabsContext(TRIGGER_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n return (\n \n {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onValueChange(value);\n } else {\n // prevent focus to avoid accidental activation\n event.preventDefault();\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if ([' ', 'Enter'].includes(event.key)) context.onValueChange(value);\n })}\n onFocus={composeEventHandlers(props.onFocus, () => {\n // handle \"automatic\" activation if necessary\n // ie. activate tab following focus\n const isAutomaticActivation = context.activationMode !== 'manual';\n if (!isSelected && !disabled && isAutomaticActivation) {\n context.onValueChange(value);\n }\n })}\n />\n \n );\n }\n);\n\nTabsTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TabsContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'TabsContent';\n\ntype TabsContentElement = React.ComponentRef;\ninterface TabsContentProps extends PrimitiveDivProps {\n value: string;\n\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst TabsContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeTabs, value, forceMount, children, ...contentProps } = props;\n const context = useTabsContext(CONTENT_NAME, __scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n const isMountAnimationPreventedRef = React.useRef(isSelected);\n\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => (isMountAnimationPreventedRef.current = false));\n return () => cancelAnimationFrame(rAF);\n }, []);\n\n return (\n \n {({ present }) => (\n \n );\n }\n);\n\nTabsContent.displayName = CONTENT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction makeTriggerId(baseId: string, value: string) {\n return `${baseId}-trigger-${value}`;\n}\n\nfunction makeContentId(baseId: string, value: string) {\n return `${baseId}-content-${value}`;\n}\n\nconst Root = Tabs;\nconst List = TabsList;\nconst Trigger = TabsTrigger;\nconst Content = TabsContent;\n\nexport {\n createTabsScope,\n //\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n //\n Root,\n List,\n Trigger,\n Content,\n};\nexport type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps };\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,0BAA0B;AACnC,SAAS,mCAAmC;AAC5C,SA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;AACF;AAEA,YAAY,cAAc;AAI1B,SAAS,cAAc,QAAgB,OAAe;AACpD,SAAO,GAAG,MAAM,YAAY,KAAK;AACnC;AAEA,SAAS,cAAc,QAAgB,OAAe;AACpD,SAAO,GAAG,MAAM,YAAY,KAAK;AACnC;AAEA,IAAMA,QAAO;AACb,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAM,UAAU;", + "names": ["Root"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/package.json b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/package.json new file mode 100644 index 0000000000000000000000000000000000000000..70c887677f2fc9e545ae8a916cc27fb6f366fdc1 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@1_e3197d18765d0288b866d48fa04ac39a/node_modules/@radix-ui/react-tabs/package.json @@ -0,0 +1,75 @@ +{ + "name": "@radix-ui/react-tabs", + "version": "1.1.13", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-roving-focus": "1.1.11", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/LICENSE b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/README.md b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/README.md new file mode 100644 index 0000000000000000000000000000000000000000..aa47590f67e0b441397754aaa5ca65dd7b6e491f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/README.md @@ -0,0 +1,3 @@ +# `react-toast` + +View docs [here](https://radix-ui.com/primitives/docs/components/toast). diff --git a/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..11f67cecb2d6c8d0dadf34cc0db036e878271938 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.d.mts @@ -0,0 +1,120 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import * as DismissableLayer from '@radix-ui/react-dismissable-layer'; +import { Primitive } from '@radix-ui/react-primitive'; + +type SwipeDirection = 'up' | 'down' | 'left' | 'right'; +declare const createToastScope: _radix_ui_react_context.CreateScope; +interface ToastProviderProps { + children?: React.ReactNode; + /** + * An author-localized label for each toast. Used to help screen reader users + * associate the interruption with a toast. + * @defaultValue 'Notification' + */ + label?: string; + /** + * Time in milliseconds that each toast should remain visible for. + * @defaultValue 5000 + */ + duration?: number; + /** + * Direction of pointer swipe that should close the toast. + * @defaultValue 'right' + */ + swipeDirection?: SwipeDirection; + /** + * Distance in pixels that the swipe must pass before a close is triggered. + * @defaultValue 50 + */ + swipeThreshold?: number; +} +declare const ToastProvider: React.FC; +type PrimitiveOrderedListProps = React.ComponentPropsWithoutRef; +interface ToastViewportProps extends PrimitiveOrderedListProps { + /** + * The keys to use as the keyboard shortcut that will move focus to the toast viewport. + * @defaultValue ['F8'] + */ + hotkey?: string[]; + /** + * An author-localized label for the toast viewport to provide context for screen reader users + * when navigating page landmarks. The available `{hotkey}` placeholder will be replaced for you. + * @defaultValue 'Notifications ({hotkey})' + */ + label?: string; +} +declare const ToastViewport: React.ForwardRefExoticComponent>; +type ToastElement = ToastImplElement; +interface ToastProps extends Omit { + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const Toast: React.ForwardRefExoticComponent>; +type SwipeEvent = { + currentTarget: EventTarget & ToastElement; +} & Omit, 'currentTarget'>; +type ToastImplElement = React.ComponentRef; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type ToastImplPrivateProps = { + open: boolean; + onClose(): void; +}; +type PrimitiveListItemProps = React.ComponentPropsWithoutRef; +interface ToastImplProps extends ToastImplPrivateProps, PrimitiveListItemProps { + type?: 'foreground' | 'background'; + /** + * Time in milliseconds that toast should remain visible for. Overrides value + * given to `ToastProvider`. + */ + duration?: number; + onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; + onPause?(): void; + onResume?(): void; + onSwipeStart?(event: SwipeEvent): void; + onSwipeMove?(event: SwipeEvent): void; + onSwipeCancel?(event: SwipeEvent): void; + onSwipeEnd?(event: SwipeEvent): void; +} +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface ToastTitleProps extends PrimitiveDivProps { +} +declare const ToastTitle: React.ForwardRefExoticComponent>; +interface ToastDescriptionProps extends PrimitiveDivProps { +} +declare const ToastDescription: React.ForwardRefExoticComponent>; +interface ToastActionProps extends ToastCloseProps { + /** + * A short description for an alternate way to carry out the action. For screen reader users + * who will not be able to navigate to the button easily/quickly. + * @example Upgrade + * @example Undo + */ + altText: string; +} +declare const ToastAction: React.ForwardRefExoticComponent>; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface ToastCloseProps extends PrimitiveButtonProps { +} +declare const ToastClose: React.ForwardRefExoticComponent>; +declare const Provider: React.FC; +declare const Viewport: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Title: React.ForwardRefExoticComponent>; +declare const Description: React.ForwardRefExoticComponent>; +declare const Action: React.ForwardRefExoticComponent>; +declare const Close: React.ForwardRefExoticComponent>; + +export { Action, Close, Description, Provider, Root, Title, Toast, ToastAction, type ToastActionProps, ToastClose, type ToastCloseProps, ToastDescription, type ToastDescriptionProps, type ToastProps, ToastProvider, type ToastProviderProps, ToastTitle, type ToastTitleProps, ToastViewport, type ToastViewportProps, Viewport, createToastScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..11f67cecb2d6c8d0dadf34cc0db036e878271938 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.d.ts @@ -0,0 +1,120 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import * as DismissableLayer from '@radix-ui/react-dismissable-layer'; +import { Primitive } from '@radix-ui/react-primitive'; + +type SwipeDirection = 'up' | 'down' | 'left' | 'right'; +declare const createToastScope: _radix_ui_react_context.CreateScope; +interface ToastProviderProps { + children?: React.ReactNode; + /** + * An author-localized label for each toast. Used to help screen reader users + * associate the interruption with a toast. + * @defaultValue 'Notification' + */ + label?: string; + /** + * Time in milliseconds that each toast should remain visible for. + * @defaultValue 5000 + */ + duration?: number; + /** + * Direction of pointer swipe that should close the toast. + * @defaultValue 'right' + */ + swipeDirection?: SwipeDirection; + /** + * Distance in pixels that the swipe must pass before a close is triggered. + * @defaultValue 50 + */ + swipeThreshold?: number; +} +declare const ToastProvider: React.FC; +type PrimitiveOrderedListProps = React.ComponentPropsWithoutRef; +interface ToastViewportProps extends PrimitiveOrderedListProps { + /** + * The keys to use as the keyboard shortcut that will move focus to the toast viewport. + * @defaultValue ['F8'] + */ + hotkey?: string[]; + /** + * An author-localized label for the toast viewport to provide context for screen reader users + * when navigating page landmarks. The available `{hotkey}` placeholder will be replaced for you. + * @defaultValue 'Notifications ({hotkey})' + */ + label?: string; +} +declare const ToastViewport: React.ForwardRefExoticComponent>; +type ToastElement = ToastImplElement; +interface ToastProps extends Omit { + open?: boolean; + defaultOpen?: boolean; + onOpenChange?(open: boolean): void; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const Toast: React.ForwardRefExoticComponent>; +type SwipeEvent = { + currentTarget: EventTarget & ToastElement; +} & Omit, 'currentTarget'>; +type ToastImplElement = React.ComponentRef; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type ToastImplPrivateProps = { + open: boolean; + onClose(): void; +}; +type PrimitiveListItemProps = React.ComponentPropsWithoutRef; +interface ToastImplProps extends ToastImplPrivateProps, PrimitiveListItemProps { + type?: 'foreground' | 'background'; + /** + * Time in milliseconds that toast should remain visible for. Overrides value + * given to `ToastProvider`. + */ + duration?: number; + onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; + onPause?(): void; + onResume?(): void; + onSwipeStart?(event: SwipeEvent): void; + onSwipeMove?(event: SwipeEvent): void; + onSwipeCancel?(event: SwipeEvent): void; + onSwipeEnd?(event: SwipeEvent): void; +} +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface ToastTitleProps extends PrimitiveDivProps { +} +declare const ToastTitle: React.ForwardRefExoticComponent>; +interface ToastDescriptionProps extends PrimitiveDivProps { +} +declare const ToastDescription: React.ForwardRefExoticComponent>; +interface ToastActionProps extends ToastCloseProps { + /** + * A short description for an alternate way to carry out the action. For screen reader users + * who will not be able to navigate to the button easily/quickly. + * @example Upgrade + * @example Undo + */ + altText: string; +} +declare const ToastAction: React.ForwardRefExoticComponent>; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface ToastCloseProps extends PrimitiveButtonProps { +} +declare const ToastClose: React.ForwardRefExoticComponent>; +declare const Provider: React.FC; +declare const Viewport: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; +declare const Title: React.ForwardRefExoticComponent>; +declare const Description: React.ForwardRefExoticComponent>; +declare const Action: React.ForwardRefExoticComponent>; +declare const Close: React.ForwardRefExoticComponent>; + +export { Action, Close, Description, Provider, Root, Title, Toast, ToastAction, type ToastActionProps, ToastClose, type ToastCloseProps, ToastDescription, type ToastDescriptionProps, type ToastProps, ToastProvider, type ToastProviderProps, ToastTitle, type ToastTitleProps, ToastViewport, type ToastViewportProps, Viewport, createToastScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.js b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..89b40c46b070a7ec3264bf87fa157be7f1ac174b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.js @@ -0,0 +1,677 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Action: () => Action, + Close: () => Close, + Description: () => Description, + Provider: () => Provider, + Root: () => Root2, + Title: () => Title, + Toast: () => Toast, + ToastAction: () => ToastAction, + ToastClose: () => ToastClose, + ToastDescription: () => ToastDescription, + ToastProvider: () => ToastProvider, + ToastTitle: () => ToastTitle, + ToastViewport: () => ToastViewport, + Viewport: () => Viewport, + createToastScope: () => createToastScope +}); +module.exports = __toCommonJS(index_exports); + +// src/toast.tsx +var React = __toESM(require("react")); +var ReactDOM = __toESM(require("react-dom")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_collection = require("@radix-ui/react-collection"); +var import_react_context = require("@radix-ui/react-context"); +var DismissableLayer = __toESM(require("@radix-ui/react-dismissable-layer")); +var import_react_portal = require("@radix-ui/react-portal"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect"); +var import_react_visually_hidden = require("@radix-ui/react-visually-hidden"); +var import_jsx_runtime = require("react/jsx-runtime"); +var PROVIDER_NAME = "ToastProvider"; +var [Collection, useCollection, createCollectionScope] = (0, import_react_collection.createCollection)("Toast"); +var [createToastContext, createToastScope] = (0, import_react_context.createContextScope)("Toast", [createCollectionScope]); +var [ToastProviderProvider, useToastProviderContext] = createToastContext(PROVIDER_NAME); +var ToastProvider = (props) => { + const { + __scopeToast, + label = "Notification", + duration = 5e3, + swipeDirection = "right", + swipeThreshold = 50, + children + } = props; + const [viewport, setViewport] = React.useState(null); + const [toastCount, setToastCount] = React.useState(0); + const isFocusedToastEscapeKeyDownRef = React.useRef(false); + const isClosePausedRef = React.useRef(false); + if (!label.trim()) { + console.error( + `Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.` + ); + } + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: __scopeToast, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ToastProviderProvider, + { + scope: __scopeToast, + label, + duration, + swipeDirection, + swipeThreshold, + toastCount, + viewport, + onViewportChange: setViewport, + onToastAdd: React.useCallback(() => setToastCount((prevCount) => prevCount + 1), []), + onToastRemove: React.useCallback(() => setToastCount((prevCount) => prevCount - 1), []), + isFocusedToastEscapeKeyDownRef, + isClosePausedRef, + children + } + ) }); +}; +ToastProvider.displayName = PROVIDER_NAME; +var VIEWPORT_NAME = "ToastViewport"; +var VIEWPORT_DEFAULT_HOTKEY = ["F8"]; +var VIEWPORT_PAUSE = "toast.viewportPause"; +var VIEWPORT_RESUME = "toast.viewportResume"; +var ToastViewport = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeToast, + hotkey = VIEWPORT_DEFAULT_HOTKEY, + label = "Notifications ({hotkey})", + ...viewportProps + } = props; + const context = useToastProviderContext(VIEWPORT_NAME, __scopeToast); + const getItems = useCollection(__scopeToast); + const wrapperRef = React.useRef(null); + const headFocusProxyRef = React.useRef(null); + const tailFocusProxyRef = React.useRef(null); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref, context.onViewportChange); + const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, ""); + const hasToasts = context.toastCount > 0; + React.useEffect(() => { + const handleKeyDown = (event) => { + const isHotkeyPressed = hotkey.length !== 0 && hotkey.every((key) => event[key] || event.code === key); + if (isHotkeyPressed) ref.current?.focus(); + }; + document.addEventListener("keydown", handleKeyDown); + return () => document.removeEventListener("keydown", handleKeyDown); + }, [hotkey]); + React.useEffect(() => { + const wrapper = wrapperRef.current; + const viewport = ref.current; + if (hasToasts && wrapper && viewport) { + const handlePause = () => { + if (!context.isClosePausedRef.current) { + const pauseEvent = new CustomEvent(VIEWPORT_PAUSE); + viewport.dispatchEvent(pauseEvent); + context.isClosePausedRef.current = true; + } + }; + const handleResume = () => { + if (context.isClosePausedRef.current) { + const resumeEvent = new CustomEvent(VIEWPORT_RESUME); + viewport.dispatchEvent(resumeEvent); + context.isClosePausedRef.current = false; + } + }; + const handleFocusOutResume = (event) => { + const isFocusMovingOutside = !wrapper.contains(event.relatedTarget); + if (isFocusMovingOutside) handleResume(); + }; + const handlePointerLeaveResume = () => { + const isFocusInside = wrapper.contains(document.activeElement); + if (!isFocusInside) handleResume(); + }; + wrapper.addEventListener("focusin", handlePause); + wrapper.addEventListener("focusout", handleFocusOutResume); + wrapper.addEventListener("pointermove", handlePause); + wrapper.addEventListener("pointerleave", handlePointerLeaveResume); + window.addEventListener("blur", handlePause); + window.addEventListener("focus", handleResume); + return () => { + wrapper.removeEventListener("focusin", handlePause); + wrapper.removeEventListener("focusout", handleFocusOutResume); + wrapper.removeEventListener("pointermove", handlePause); + wrapper.removeEventListener("pointerleave", handlePointerLeaveResume); + window.removeEventListener("blur", handlePause); + window.removeEventListener("focus", handleResume); + }; + } + }, [hasToasts, context.isClosePausedRef]); + const getSortedTabbableCandidates = React.useCallback( + ({ tabbingDirection }) => { + const toastItems = getItems(); + const tabbableCandidates = toastItems.map((toastItem) => { + const toastNode = toastItem.ref.current; + const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)]; + return tabbingDirection === "forwards" ? toastTabbableCandidates : toastTabbableCandidates.reverse(); + }); + return (tabbingDirection === "forwards" ? tabbableCandidates.reverse() : tabbableCandidates).flat(); + }, + [getItems] + ); + React.useEffect(() => { + const viewport = ref.current; + if (viewport) { + const handleKeyDown = (event) => { + const isMetaKey = event.altKey || event.ctrlKey || event.metaKey; + const isTabKey = event.key === "Tab" && !isMetaKey; + if (isTabKey) { + const focusedElement = document.activeElement; + const isTabbingBackwards = event.shiftKey; + const targetIsViewport = event.target === viewport; + if (targetIsViewport && isTabbingBackwards) { + headFocusProxyRef.current?.focus(); + return; + } + const tabbingDirection = isTabbingBackwards ? "backwards" : "forwards"; + const sortedCandidates = getSortedTabbableCandidates({ tabbingDirection }); + const index = sortedCandidates.findIndex((candidate) => candidate === focusedElement); + if (focusFirst(sortedCandidates.slice(index + 1))) { + event.preventDefault(); + } else { + isTabbingBackwards ? headFocusProxyRef.current?.focus() : tailFocusProxyRef.current?.focus(); + } + } + }; + viewport.addEventListener("keydown", handleKeyDown); + return () => viewport.removeEventListener("keydown", handleKeyDown); + } + }, [getItems, getSortedTabbableCandidates]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)( + DismissableLayer.Branch, + { + ref: wrapperRef, + role: "region", + "aria-label": label.replace("{hotkey}", hotkeyLabel), + tabIndex: -1, + style: { pointerEvents: hasToasts ? void 0 : "none" }, + children: [ + hasToasts && /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + FocusProxy, + { + ref: headFocusProxyRef, + onFocusFromOutsideViewport: () => { + const tabbableCandidates = getSortedTabbableCandidates({ + tabbingDirection: "forwards" + }); + focusFirst(tabbableCandidates); + } + } + ), + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: __scopeToast, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.ol, { tabIndex: -1, ...viewportProps, ref: composedRefs }) }), + hasToasts && /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + FocusProxy, + { + ref: tailFocusProxyRef, + onFocusFromOutsideViewport: () => { + const tabbableCandidates = getSortedTabbableCandidates({ + tabbingDirection: "backwards" + }); + focusFirst(tabbableCandidates); + } + } + ) + ] + } + ); + } +); +ToastViewport.displayName = VIEWPORT_NAME; +var FOCUS_PROXY_NAME = "ToastFocusProxy"; +var FocusProxy = React.forwardRef( + (props, forwardedRef) => { + const { __scopeToast, onFocusFromOutsideViewport, ...proxyProps } = props; + const context = useToastProviderContext(FOCUS_PROXY_NAME, __scopeToast); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_visually_hidden.VisuallyHidden, + { + tabIndex: 0, + ...proxyProps, + ref: forwardedRef, + style: { position: "fixed" }, + onFocus: (event) => { + const prevFocusedElement = event.relatedTarget; + const isFocusFromOutsideViewport = !context.viewport?.contains(prevFocusedElement); + if (isFocusFromOutsideViewport) onFocusFromOutsideViewport(); + } + } + ); + } +); +FocusProxy.displayName = FOCUS_PROXY_NAME; +var TOAST_NAME = "Toast"; +var TOAST_SWIPE_START = "toast.swipeStart"; +var TOAST_SWIPE_MOVE = "toast.swipeMove"; +var TOAST_SWIPE_CANCEL = "toast.swipeCancel"; +var TOAST_SWIPE_END = "toast.swipeEnd"; +var Toast = React.forwardRef( + (props, forwardedRef) => { + const { forceMount, open: openProp, defaultOpen, onOpenChange, ...toastProps } = props; + const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({ + prop: openProp, + defaultProp: defaultOpen ?? true, + onChange: onOpenChange, + caller: TOAST_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ToastImpl, + { + open, + ...toastProps, + ref: forwardedRef, + onClose: () => setOpen(false), + onPause: (0, import_react_use_callback_ref.useCallbackRef)(props.onPause), + onResume: (0, import_react_use_callback_ref.useCallbackRef)(props.onResume), + onSwipeStart: (0, import_primitive.composeEventHandlers)(props.onSwipeStart, (event) => { + event.currentTarget.setAttribute("data-swipe", "start"); + }), + onSwipeMove: (0, import_primitive.composeEventHandlers)(props.onSwipeMove, (event) => { + const { x, y } = event.detail.delta; + event.currentTarget.setAttribute("data-swipe", "move"); + event.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${x}px`); + event.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${y}px`); + }), + onSwipeCancel: (0, import_primitive.composeEventHandlers)(props.onSwipeCancel, (event) => { + event.currentTarget.setAttribute("data-swipe", "cancel"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-end-y"); + }), + onSwipeEnd: (0, import_primitive.composeEventHandlers)(props.onSwipeEnd, (event) => { + const { x, y } = event.detail.delta; + event.currentTarget.setAttribute("data-swipe", "end"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"); + event.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${x}px`); + event.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${y}px`); + setOpen(false); + }) + } + ) }); + } +); +Toast.displayName = TOAST_NAME; +var [ToastInteractiveProvider, useToastInteractiveContext] = createToastContext(TOAST_NAME, { + onClose() { + } +}); +var ToastImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeToast, + type = "foreground", + duration: durationProp, + open, + onClose, + onEscapeKeyDown, + onPause, + onResume, + onSwipeStart, + onSwipeMove, + onSwipeCancel, + onSwipeEnd, + ...toastProps + } = props; + const context = useToastProviderContext(TOAST_NAME, __scopeToast); + const [node, setNode] = React.useState(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node2) => setNode(node2)); + const pointerStartRef = React.useRef(null); + const swipeDeltaRef = React.useRef(null); + const duration = durationProp || context.duration; + const closeTimerStartTimeRef = React.useRef(0); + const closeTimerRemainingTimeRef = React.useRef(duration); + const closeTimerRef = React.useRef(0); + const { onToastAdd, onToastRemove } = context; + const handleClose = (0, import_react_use_callback_ref.useCallbackRef)(() => { + const isFocusInToast = node?.contains(document.activeElement); + if (isFocusInToast) context.viewport?.focus(); + onClose(); + }); + const startTimer = React.useCallback( + (duration2) => { + if (!duration2 || duration2 === Infinity) return; + window.clearTimeout(closeTimerRef.current); + closeTimerStartTimeRef.current = (/* @__PURE__ */ new Date()).getTime(); + closeTimerRef.current = window.setTimeout(handleClose, duration2); + }, + [handleClose] + ); + React.useEffect(() => { + const viewport = context.viewport; + if (viewport) { + const handleResume = () => { + startTimer(closeTimerRemainingTimeRef.current); + onResume?.(); + }; + const handlePause = () => { + const elapsedTime = (/* @__PURE__ */ new Date()).getTime() - closeTimerStartTimeRef.current; + closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime; + window.clearTimeout(closeTimerRef.current); + onPause?.(); + }; + viewport.addEventListener(VIEWPORT_PAUSE, handlePause); + viewport.addEventListener(VIEWPORT_RESUME, handleResume); + return () => { + viewport.removeEventListener(VIEWPORT_PAUSE, handlePause); + viewport.removeEventListener(VIEWPORT_RESUME, handleResume); + }; + } + }, [context.viewport, duration, onPause, onResume, startTimer]); + React.useEffect(() => { + if (open && !context.isClosePausedRef.current) startTimer(duration); + }, [open, duration, context.isClosePausedRef, startTimer]); + React.useEffect(() => { + onToastAdd(); + return () => onToastRemove(); + }, [onToastAdd, onToastRemove]); + const announceTextContent = React.useMemo(() => { + return node ? getAnnounceTextContent(node) : null; + }, [node]); + if (!context.viewport) return null; + return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ + announceTextContent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ToastAnnounce, + { + __scopeToast, + role: "status", + "aria-live": type === "foreground" ? "assertive" : "polite", + children: announceTextContent + } + ), + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastInteractiveProvider, { scope: __scopeToast, onClose: handleClose, children: ReactDOM.createPortal( + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.ItemSlot, { scope: __scopeToast, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + DismissableLayer.Root, + { + asChild: true, + onEscapeKeyDown: (0, import_primitive.composeEventHandlers)(onEscapeKeyDown, () => { + if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose(); + context.isFocusedToastEscapeKeyDownRef.current = false; + }), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.li, + { + tabIndex: 0, + "data-state": open ? "open" : "closed", + "data-swipe-direction": context.swipeDirection, + ...toastProps, + ref: composedRefs, + style: { userSelect: "none", touchAction: "none", ...props.style }, + onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => { + if (event.key !== "Escape") return; + onEscapeKeyDown?.(event.nativeEvent); + if (!event.nativeEvent.defaultPrevented) { + context.isFocusedToastEscapeKeyDownRef.current = true; + handleClose(); + } + }), + onPointerDown: (0, import_primitive.composeEventHandlers)(props.onPointerDown, (event) => { + if (event.button !== 0) return; + pointerStartRef.current = { x: event.clientX, y: event.clientY }; + }), + onPointerMove: (0, import_primitive.composeEventHandlers)(props.onPointerMove, (event) => { + if (!pointerStartRef.current) return; + const x = event.clientX - pointerStartRef.current.x; + const y = event.clientY - pointerStartRef.current.y; + const hasSwipeMoveStarted = Boolean(swipeDeltaRef.current); + const isHorizontalSwipe = ["left", "right"].includes(context.swipeDirection); + const clamp = ["left", "up"].includes(context.swipeDirection) ? Math.min : Math.max; + const clampedX = isHorizontalSwipe ? clamp(0, x) : 0; + const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0; + const moveStartBuffer = event.pointerType === "touch" ? 10 : 2; + const delta = { x: clampedX, y: clampedY }; + const eventDetail = { originalEvent: event, delta }; + if (hasSwipeMoveStarted) { + swipeDeltaRef.current = delta; + handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE, onSwipeMove, eventDetail, { + discrete: false + }); + } else if (isDeltaInDirection(delta, context.swipeDirection, moveStartBuffer)) { + swipeDeltaRef.current = delta; + handleAndDispatchCustomEvent(TOAST_SWIPE_START, onSwipeStart, eventDetail, { + discrete: false + }); + event.target.setPointerCapture(event.pointerId); + } else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) { + pointerStartRef.current = null; + } + }), + onPointerUp: (0, import_primitive.composeEventHandlers)(props.onPointerUp, (event) => { + const delta = swipeDeltaRef.current; + const target = event.target; + if (target.hasPointerCapture(event.pointerId)) { + target.releasePointerCapture(event.pointerId); + } + swipeDeltaRef.current = null; + pointerStartRef.current = null; + if (delta) { + const toast = event.currentTarget; + const eventDetail = { originalEvent: event, delta }; + if (isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)) { + handleAndDispatchCustomEvent(TOAST_SWIPE_END, onSwipeEnd, eventDetail, { + discrete: true + }); + } else { + handleAndDispatchCustomEvent( + TOAST_SWIPE_CANCEL, + onSwipeCancel, + eventDetail, + { + discrete: true + } + ); + } + toast.addEventListener("click", (event2) => event2.preventDefault(), { + once: true + }); + } + }) + } + ) + } + ) }), + context.viewport + ) }) + ] }); + } +); +var ToastAnnounce = (props) => { + const { __scopeToast, children, ...announceProps } = props; + const context = useToastProviderContext(TOAST_NAME, __scopeToast); + const [renderAnnounceText, setRenderAnnounceText] = React.useState(false); + const [isAnnounced, setIsAnnounced] = React.useState(false); + useNextFrame(() => setRenderAnnounceText(true)); + React.useEffect(() => { + const timer = window.setTimeout(() => setIsAnnounced(true), 1e3); + return () => window.clearTimeout(timer); + }, []); + return isAnnounced ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_portal.Portal, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_visually_hidden.VisuallyHidden, { ...announceProps, children: renderAnnounceText && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ + context.label, + " ", + children + ] }) }) }); +}; +var TITLE_NAME = "ToastTitle"; +var ToastTitle = React.forwardRef( + (props, forwardedRef) => { + const { __scopeToast, ...titleProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { ...titleProps, ref: forwardedRef }); + } +); +ToastTitle.displayName = TITLE_NAME; +var DESCRIPTION_NAME = "ToastDescription"; +var ToastDescription = React.forwardRef( + (props, forwardedRef) => { + const { __scopeToast, ...descriptionProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { ...descriptionProps, ref: forwardedRef }); + } +); +ToastDescription.displayName = DESCRIPTION_NAME; +var ACTION_NAME = "ToastAction"; +var ToastAction = React.forwardRef( + (props, forwardedRef) => { + const { altText, ...actionProps } = props; + if (!altText.trim()) { + console.error( + `Invalid prop \`altText\` supplied to \`${ACTION_NAME}\`. Expected non-empty \`string\`.` + ); + return null; + } + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastAnnounceExclude, { altText, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastClose, { ...actionProps, ref: forwardedRef }) }); + } +); +ToastAction.displayName = ACTION_NAME; +var CLOSE_NAME = "ToastClose"; +var ToastClose = React.forwardRef( + (props, forwardedRef) => { + const { __scopeToast, ...closeProps } = props; + const interactiveContext = useToastInteractiveContext(CLOSE_NAME, __scopeToast); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastAnnounceExclude, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + ...closeProps, + ref: forwardedRef, + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, interactiveContext.onClose) + } + ) }); + } +); +ToastClose.displayName = CLOSE_NAME; +var ToastAnnounceExclude = React.forwardRef((props, forwardedRef) => { + const { __scopeToast, altText, ...announceExcludeProps } = props; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.div, + { + "data-radix-toast-announce-exclude": "", + "data-radix-toast-announce-alt": altText || void 0, + ...announceExcludeProps, + ref: forwardedRef + } + ); +}); +function getAnnounceTextContent(container) { + const textContent = []; + const childNodes = Array.from(container.childNodes); + childNodes.forEach((node) => { + if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent); + if (isHTMLElement(node)) { + const isHidden = node.ariaHidden || node.hidden || node.style.display === "none"; + const isExcluded = node.dataset.radixToastAnnounceExclude === ""; + if (!isHidden) { + if (isExcluded) { + const altText = node.dataset.radixToastAnnounceAlt; + if (altText) textContent.push(altText); + } else { + textContent.push(...getAnnounceTextContent(node)); + } + } + } + }); + return textContent; +} +function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) { + const currentTarget = detail.originalEvent.currentTarget; + const event = new CustomEvent(name, { bubbles: true, cancelable: true, detail }); + if (handler) currentTarget.addEventListener(name, handler, { once: true }); + if (discrete) { + (0, import_react_primitive.dispatchDiscreteCustomEvent)(currentTarget, event); + } else { + currentTarget.dispatchEvent(event); + } +} +var isDeltaInDirection = (delta, direction, threshold = 0) => { + const deltaX = Math.abs(delta.x); + const deltaY = Math.abs(delta.y); + const isDeltaX = deltaX > deltaY; + if (direction === "left" || direction === "right") { + return isDeltaX && deltaX > threshold; + } else { + return !isDeltaX && deltaY > threshold; + } +}; +function useNextFrame(callback = () => { +}) { + const fn = (0, import_react_use_callback_ref.useCallbackRef)(callback); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + let raf1 = 0; + let raf2 = 0; + raf1 = window.requestAnimationFrame(() => raf2 = window.requestAnimationFrame(fn)); + return () => { + window.cancelAnimationFrame(raf1); + window.cancelAnimationFrame(raf2); + }; + }, [fn]); +} +function isHTMLElement(node) { + return node.nodeType === node.ELEMENT_NODE; +} +function getTabbableCandidates(container) { + const nodes = []; + const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { + acceptNode: (node) => { + const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden"; + if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; + return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; + } + }); + while (walker.nextNode()) nodes.push(walker.currentNode); + return nodes; +} +function focusFirst(candidates) { + const previouslyFocusedElement = document.activeElement; + return candidates.some((candidate) => { + if (candidate === previouslyFocusedElement) return true; + candidate.focus(); + return document.activeElement !== previouslyFocusedElement; + }); +} +var Provider = ToastProvider; +var Viewport = ToastViewport; +var Root2 = Toast; +var Title = ToastTitle; +var Description = ToastDescription; +var Action = ToastAction; +var Close = ToastClose; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2e74bad23ed7607c790dd2a3c39040dc2d22d0b6 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/toast.tsx"], + "sourcesContent": ["'use client';\nexport {\n createToastScope,\n //\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastAction,\n ToastClose,\n //\n Provider,\n Viewport,\n Root,\n Title,\n Description,\n Action,\n Close,\n} from './toast';\nexport type {\n ToastProviderProps,\n ToastViewportProps,\n ToastProps,\n ToastTitleProps,\n ToastDescriptionProps,\n ToastActionProps,\n ToastCloseProps,\n} from './toast';\n", "import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { createContextScope } from '@radix-ui/react-context';\nimport * as DismissableLayer from '@radix-ui/react-dismissable-layer';\nimport { Portal } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * ToastProvider\n * -----------------------------------------------------------------------------------------------*/\n\nconst PROVIDER_NAME = 'ToastProvider';\n\nconst [Collection, useCollection, createCollectionScope] = createCollection('Toast');\n\ntype SwipeDirection = 'up' | 'down' | 'left' | 'right';\ntype ToastProviderContextValue = {\n label: string;\n duration: number;\n swipeDirection: SwipeDirection;\n swipeThreshold: number;\n toastCount: number;\n viewport: ToastViewportElement | null;\n onViewportChange(viewport: ToastViewportElement): void;\n onToastAdd(): void;\n onToastRemove(): void;\n isFocusedToastEscapeKeyDownRef: React.MutableRefObject;\n isClosePausedRef: React.MutableRefObject;\n};\n\ntype ScopedProps

= P & { __scopeToast?: Scope };\nconst [createToastContext, createToastScope] = createContextScope('Toast', [createCollectionScope]);\nconst [ToastProviderProvider, useToastProviderContext] =\n createToastContext(PROVIDER_NAME);\n\ninterface ToastProviderProps {\n children?: React.ReactNode;\n /**\n * An author-localized label for each toast. Used to help screen reader users\n * associate the interruption with a toast.\n * @defaultValue 'Notification'\n */\n label?: string;\n /**\n * Time in milliseconds that each toast should remain visible for.\n * @defaultValue 5000\n */\n duration?: number;\n /**\n * Direction of pointer swipe that should close the toast.\n * @defaultValue 'right'\n */\n swipeDirection?: SwipeDirection;\n /**\n * Distance in pixels that the swipe must pass before a close is triggered.\n * @defaultValue 50\n */\n swipeThreshold?: number;\n}\n\nconst ToastProvider: React.FC = (props: ScopedProps) => {\n const {\n __scopeToast,\n label = 'Notification',\n duration = 5000,\n swipeDirection = 'right',\n swipeThreshold = 50,\n children,\n } = props;\n const [viewport, setViewport] = React.useState(null);\n const [toastCount, setToastCount] = React.useState(0);\n const isFocusedToastEscapeKeyDownRef = React.useRef(false);\n const isClosePausedRef = React.useRef(false);\n\n if (!label.trim()) {\n console.error(\n `Invalid prop \\`label\\` supplied to \\`${PROVIDER_NAME}\\`. Expected non-empty \\`string\\`.`\n );\n }\n\n return (\n \n setToastCount((prevCount) => prevCount + 1), [])}\n onToastRemove={React.useCallback(() => setToastCount((prevCount) => prevCount - 1), [])}\n isFocusedToastEscapeKeyDownRef={isFocusedToastEscapeKeyDownRef}\n isClosePausedRef={isClosePausedRef}\n >\n {children}\n \n \n );\n};\n\nToastProvider.displayName = PROVIDER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastViewport\n * -----------------------------------------------------------------------------------------------*/\n\nconst VIEWPORT_NAME = 'ToastViewport';\nconst VIEWPORT_DEFAULT_HOTKEY = ['F8'];\nconst VIEWPORT_PAUSE = 'toast.viewportPause';\nconst VIEWPORT_RESUME = 'toast.viewportResume';\n\ntype ToastViewportElement = React.ComponentRef;\ntype PrimitiveOrderedListProps = React.ComponentPropsWithoutRef;\ninterface ToastViewportProps extends PrimitiveOrderedListProps {\n /**\n * The keys to use as the keyboard shortcut that will move focus to the toast viewport.\n * @defaultValue ['F8']\n */\n hotkey?: string[];\n /**\n * An author-localized label for the toast viewport to provide context for screen reader users\n * when navigating page landmarks. The available `{hotkey}` placeholder will be replaced for you.\n * @defaultValue 'Notifications ({hotkey})'\n */\n label?: string;\n}\n\nconst ToastViewport = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeToast,\n hotkey = VIEWPORT_DEFAULT_HOTKEY,\n label = 'Notifications ({hotkey})',\n ...viewportProps\n } = props;\n const context = useToastProviderContext(VIEWPORT_NAME, __scopeToast);\n const getItems = useCollection(__scopeToast);\n const wrapperRef = React.useRef(null);\n const headFocusProxyRef = React.useRef(null);\n const tailFocusProxyRef = React.useRef(null);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n const hotkeyLabel = hotkey.join('+').replace(/Key/g, '').replace(/Digit/g, '');\n const hasToasts = context.toastCount > 0;\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n // we use `event.code` as it is consistent regardless of meta keys that were pressed.\n // for example, `event.key` for `Control+Alt+t` is `\u2020` and `t !== \u2020`\n const isHotkeyPressed =\n hotkey.length !== 0 && hotkey.every((key) => (event as any)[key] || event.code === key);\n if (isHotkeyPressed) ref.current?.focus();\n };\n document.addEventListener('keydown', handleKeyDown);\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [hotkey]);\n\n React.useEffect(() => {\n const wrapper = wrapperRef.current;\n const viewport = ref.current;\n if (hasToasts && wrapper && viewport) {\n const handlePause = () => {\n if (!context.isClosePausedRef.current) {\n const pauseEvent = new CustomEvent(VIEWPORT_PAUSE);\n viewport.dispatchEvent(pauseEvent);\n context.isClosePausedRef.current = true;\n }\n };\n\n const handleResume = () => {\n if (context.isClosePausedRef.current) {\n const resumeEvent = new CustomEvent(VIEWPORT_RESUME);\n viewport.dispatchEvent(resumeEvent);\n context.isClosePausedRef.current = false;\n }\n };\n\n const handleFocusOutResume = (event: FocusEvent) => {\n const isFocusMovingOutside = !wrapper.contains(event.relatedTarget as HTMLElement);\n if (isFocusMovingOutside) handleResume();\n };\n\n const handlePointerLeaveResume = () => {\n const isFocusInside = wrapper.contains(document.activeElement);\n if (!isFocusInside) handleResume();\n };\n\n // Toasts are not in the viewport React tree so we need to bind DOM events\n wrapper.addEventListener('focusin', handlePause);\n wrapper.addEventListener('focusout', handleFocusOutResume);\n wrapper.addEventListener('pointermove', handlePause);\n wrapper.addEventListener('pointerleave', handlePointerLeaveResume);\n window.addEventListener('blur', handlePause);\n window.addEventListener('focus', handleResume);\n return () => {\n wrapper.removeEventListener('focusin', handlePause);\n wrapper.removeEventListener('focusout', handleFocusOutResume);\n wrapper.removeEventListener('pointermove', handlePause);\n wrapper.removeEventListener('pointerleave', handlePointerLeaveResume);\n window.removeEventListener('blur', handlePause);\n window.removeEventListener('focus', handleResume);\n };\n }\n }, [hasToasts, context.isClosePausedRef]);\n\n const getSortedTabbableCandidates = React.useCallback(\n ({ tabbingDirection }: { tabbingDirection: 'forwards' | 'backwards' }) => {\n const toastItems = getItems();\n const tabbableCandidates = toastItems.map((toastItem) => {\n const toastNode = toastItem.ref.current!;\n const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)];\n return tabbingDirection === 'forwards'\n ? toastTabbableCandidates\n : toastTabbableCandidates.reverse();\n });\n return (\n tabbingDirection === 'forwards' ? tabbableCandidates.reverse() : tabbableCandidates\n ).flat();\n },\n [getItems]\n );\n\n React.useEffect(() => {\n const viewport = ref.current;\n // We programmatically manage tabbing as we are unable to influence\n // the source order with portals, this allows us to reverse the\n // tab order so that it runs from most recent toast to least\n if (viewport) {\n const handleKeyDown = (event: KeyboardEvent) => {\n const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;\n const isTabKey = event.key === 'Tab' && !isMetaKey;\n\n if (isTabKey) {\n const focusedElement = document.activeElement;\n const isTabbingBackwards = event.shiftKey;\n const targetIsViewport = event.target === viewport;\n\n // If we're back tabbing after jumping to the viewport then we simply\n // proxy focus out to the preceding document\n if (targetIsViewport && isTabbingBackwards) {\n headFocusProxyRef.current?.focus();\n return;\n }\n\n const tabbingDirection = isTabbingBackwards ? 'backwards' : 'forwards';\n const sortedCandidates = getSortedTabbableCandidates({ tabbingDirection });\n const index = sortedCandidates.findIndex((candidate) => candidate === focusedElement);\n if (focusFirst(sortedCandidates.slice(index + 1))) {\n event.preventDefault();\n } else {\n // If we can't focus that means we're at the edges so we\n // proxy to the corresponding exit point and let the browser handle\n // tab/shift+tab keypress and implicitly pass focus to the next valid element in the document\n isTabbingBackwards\n ? headFocusProxyRef.current?.focus()\n : tailFocusProxyRef.current?.focus();\n }\n }\n };\n\n // Toasts are not in the viewport React tree so we need to bind DOM events\n viewport.addEventListener('keydown', handleKeyDown);\n return () => viewport.removeEventListener('keydown', handleKeyDown);\n }\n }, [getItems, getSortedTabbableCandidates]);\n\n return (\n \n {hasToasts && (\n {\n const tabbableCandidates = getSortedTabbableCandidates({\n tabbingDirection: 'forwards',\n });\n focusFirst(tabbableCandidates);\n }}\n />\n )}\n {/**\n * tabindex on the the list so that it can be focused when items are removed. we focus\n * the list instead of the viewport so it announces number of items remaining.\n */}\n \n \n \n {hasToasts && (\n {\n const tabbableCandidates = getSortedTabbableCandidates({\n tabbingDirection: 'backwards',\n });\n focusFirst(tabbableCandidates);\n }}\n />\n )}\n \n );\n }\n);\n\nToastViewport.displayName = VIEWPORT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst FOCUS_PROXY_NAME = 'ToastFocusProxy';\n\ntype FocusProxyElement = React.ComponentRef;\ntype VisuallyHiddenProps = React.ComponentPropsWithoutRef;\ninterface FocusProxyProps extends VisuallyHiddenProps {\n onFocusFromOutsideViewport(): void;\n}\n\nconst FocusProxy = React.forwardRef>(\n (props, forwardedRef) => {\n const { __scopeToast, onFocusFromOutsideViewport, ...proxyProps } = props;\n const context = useToastProviderContext(FOCUS_PROXY_NAME, __scopeToast);\n\n return (\n {\n const prevFocusedElement = event.relatedTarget as HTMLElement | null;\n const isFocusFromOutsideViewport = !context.viewport?.contains(prevFocusedElement);\n if (isFocusFromOutsideViewport) onFocusFromOutsideViewport();\n }}\n />\n );\n }\n);\n\nFocusProxy.displayName = FOCUS_PROXY_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Toast\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOAST_NAME = 'Toast';\nconst TOAST_SWIPE_START = 'toast.swipeStart';\nconst TOAST_SWIPE_MOVE = 'toast.swipeMove';\nconst TOAST_SWIPE_CANCEL = 'toast.swipeCancel';\nconst TOAST_SWIPE_END = 'toast.swipeEnd';\n\ntype ToastElement = ToastImplElement;\ninterface ToastProps extends Omit {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst Toast = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { forceMount, open: openProp, defaultOpen, onOpenChange, ...toastProps } = props;\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? true,\n onChange: onOpenChange,\n caller: TOAST_NAME,\n });\n return (\n \n setOpen(false)}\n onPause={useCallbackRef(props.onPause)}\n onResume={useCallbackRef(props.onResume)}\n onSwipeStart={composeEventHandlers(props.onSwipeStart, (event) => {\n event.currentTarget.setAttribute('data-swipe', 'start');\n })}\n onSwipeMove={composeEventHandlers(props.onSwipeMove, (event) => {\n const { x, y } = event.detail.delta;\n event.currentTarget.setAttribute('data-swipe', 'move');\n event.currentTarget.style.setProperty('--radix-toast-swipe-move-x', `${x}px`);\n event.currentTarget.style.setProperty('--radix-toast-swipe-move-y', `${y}px`);\n })}\n onSwipeCancel={composeEventHandlers(props.onSwipeCancel, (event) => {\n event.currentTarget.setAttribute('data-swipe', 'cancel');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-x');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-y');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-end-x');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-end-y');\n })}\n onSwipeEnd={composeEventHandlers(props.onSwipeEnd, (event) => {\n const { x, y } = event.detail.delta;\n event.currentTarget.setAttribute('data-swipe', 'end');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-x');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-y');\n event.currentTarget.style.setProperty('--radix-toast-swipe-end-x', `${x}px`);\n event.currentTarget.style.setProperty('--radix-toast-swipe-end-y', `${y}px`);\n setOpen(false);\n })}\n />\n \n );\n }\n);\n\nToast.displayName = TOAST_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype SwipeEvent = { currentTarget: EventTarget & ToastElement } & Omit<\n CustomEvent<{ originalEvent: React.PointerEvent; delta: { x: number; y: number } }>,\n 'currentTarget'\n>;\n\nconst [ToastInteractiveProvider, useToastInteractiveContext] = createToastContext(TOAST_NAME, {\n onClose() {},\n});\n\ntype ToastImplElement = React.ComponentRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype ToastImplPrivateProps = { open: boolean; onClose(): void };\ntype PrimitiveListItemProps = React.ComponentPropsWithoutRef;\ninterface ToastImplProps extends ToastImplPrivateProps, PrimitiveListItemProps {\n type?: 'foreground' | 'background';\n /**\n * Time in milliseconds that toast should remain visible for. Overrides value\n * given to `ToastProvider`.\n */\n duration?: number;\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n onPause?(): void;\n onResume?(): void;\n onSwipeStart?(event: SwipeEvent): void;\n onSwipeMove?(event: SwipeEvent): void;\n onSwipeCancel?(event: SwipeEvent): void;\n onSwipeEnd?(event: SwipeEvent): void;\n}\n\nconst ToastImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeToast,\n type = 'foreground',\n duration: durationProp,\n open,\n onClose,\n onEscapeKeyDown,\n onPause,\n onResume,\n onSwipeStart,\n onSwipeMove,\n onSwipeCancel,\n onSwipeEnd,\n ...toastProps\n } = props;\n const context = useToastProviderContext(TOAST_NAME, __scopeToast);\n const [node, setNode] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setNode(node));\n const pointerStartRef = React.useRef<{ x: number; y: number } | null>(null);\n const swipeDeltaRef = React.useRef<{ x: number; y: number } | null>(null);\n const duration = durationProp || context.duration;\n const closeTimerStartTimeRef = React.useRef(0);\n const closeTimerRemainingTimeRef = React.useRef(duration);\n const closeTimerRef = React.useRef(0);\n const { onToastAdd, onToastRemove } = context;\n const handleClose = useCallbackRef(() => {\n // focus viewport if focus is within toast to read the remaining toast\n // count to SR users and ensure focus isn't lost\n const isFocusInToast = node?.contains(document.activeElement);\n if (isFocusInToast) context.viewport?.focus();\n onClose();\n });\n\n const startTimer = React.useCallback(\n (duration: number) => {\n if (!duration || duration === Infinity) return;\n window.clearTimeout(closeTimerRef.current);\n closeTimerStartTimeRef.current = new Date().getTime();\n closeTimerRef.current = window.setTimeout(handleClose, duration);\n },\n [handleClose]\n );\n\n React.useEffect(() => {\n const viewport = context.viewport;\n if (viewport) {\n const handleResume = () => {\n startTimer(closeTimerRemainingTimeRef.current);\n onResume?.();\n };\n const handlePause = () => {\n const elapsedTime = new Date().getTime() - closeTimerStartTimeRef.current;\n closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime;\n window.clearTimeout(closeTimerRef.current);\n onPause?.();\n };\n viewport.addEventListener(VIEWPORT_PAUSE, handlePause);\n viewport.addEventListener(VIEWPORT_RESUME, handleResume);\n return () => {\n viewport.removeEventListener(VIEWPORT_PAUSE, handlePause);\n viewport.removeEventListener(VIEWPORT_RESUME, handleResume);\n };\n }\n }, [context.viewport, duration, onPause, onResume, startTimer]);\n\n // start timer when toast opens or duration changes.\n // we include `open` in deps because closed !== unmounted when animating\n // so it could reopen before being completely unmounted\n React.useEffect(() => {\n if (open && !context.isClosePausedRef.current) startTimer(duration);\n }, [open, duration, context.isClosePausedRef, startTimer]);\n\n React.useEffect(() => {\n onToastAdd();\n return () => onToastRemove();\n }, [onToastAdd, onToastRemove]);\n\n const announceTextContent = React.useMemo(() => {\n return node ? getAnnounceTextContent(node) : null;\n }, [node]);\n\n if (!context.viewport) return null;\n\n return (\n <>\n {announceTextContent && (\n \n {announceTextContent}\n \n )}\n\n \n {ReactDOM.createPortal(\n \n {\n if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose();\n context.isFocusedToastEscapeKeyDownRef.current = false;\n })}\n >\n {\n if (event.key !== 'Escape') return;\n onEscapeKeyDown?.(event.nativeEvent);\n if (!event.nativeEvent.defaultPrevented) {\n context.isFocusedToastEscapeKeyDownRef.current = true;\n handleClose();\n }\n })}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n if (event.button !== 0) return;\n pointerStartRef.current = { x: event.clientX, y: event.clientY };\n })}\n onPointerMove={composeEventHandlers(props.onPointerMove, (event) => {\n if (!pointerStartRef.current) return;\n const x = event.clientX - pointerStartRef.current.x;\n const y = event.clientY - pointerStartRef.current.y;\n const hasSwipeMoveStarted = Boolean(swipeDeltaRef.current);\n const isHorizontalSwipe = ['left', 'right'].includes(context.swipeDirection);\n const clamp = ['left', 'up'].includes(context.swipeDirection)\n ? Math.min\n : Math.max;\n const clampedX = isHorizontalSwipe ? clamp(0, x) : 0;\n const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;\n const moveStartBuffer = event.pointerType === 'touch' ? 10 : 2;\n const delta = { x: clampedX, y: clampedY };\n const eventDetail = { originalEvent: event, delta };\n if (hasSwipeMoveStarted) {\n swipeDeltaRef.current = delta;\n handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE, onSwipeMove, eventDetail, {\n discrete: false,\n });\n } else if (isDeltaInDirection(delta, context.swipeDirection, moveStartBuffer)) {\n swipeDeltaRef.current = delta;\n handleAndDispatchCustomEvent(TOAST_SWIPE_START, onSwipeStart, eventDetail, {\n discrete: false,\n });\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n } else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) {\n // User is swiping in wrong direction so we disable swipe gesture\n // for the current pointer down interaction\n pointerStartRef.current = null;\n }\n })}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n const delta = swipeDeltaRef.current;\n const target = event.target as HTMLElement;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n }\n swipeDeltaRef.current = null;\n pointerStartRef.current = null;\n if (delta) {\n const toast = event.currentTarget;\n const eventDetail = { originalEvent: event, delta };\n if (\n isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)\n ) {\n handleAndDispatchCustomEvent(TOAST_SWIPE_END, onSwipeEnd, eventDetail, {\n discrete: true,\n });\n } else {\n handleAndDispatchCustomEvent(\n TOAST_SWIPE_CANCEL,\n onSwipeCancel,\n eventDetail,\n {\n discrete: true,\n }\n );\n }\n // Prevent click event from triggering on items within the toast when\n // pointer up is part of a swipe gesture\n toast.addEventListener('click', (event) => event.preventDefault(), {\n once: true,\n });\n }\n })}\n />\n \n ,\n context.viewport\n )}\n \n \n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ninterface ToastAnnounceProps\n extends Omit, 'children'>,\n ScopedProps<{ children: string[] }> {}\n\nconst ToastAnnounce: React.FC = (props: ScopedProps) => {\n const { __scopeToast, children, ...announceProps } = props;\n const context = useToastProviderContext(TOAST_NAME, __scopeToast);\n const [renderAnnounceText, setRenderAnnounceText] = React.useState(false);\n const [isAnnounced, setIsAnnounced] = React.useState(false);\n\n // render text content in the next frame to ensure toast is announced in NVDA\n useNextFrame(() => setRenderAnnounceText(true));\n\n // cleanup after announcing\n React.useEffect(() => {\n const timer = window.setTimeout(() => setIsAnnounced(true), 1000);\n return () => window.clearTimeout(timer);\n }, []);\n\n return isAnnounced ? null : (\n \n \n {renderAnnounceText && (\n <>\n {context.label} {children}\n \n )}\n \n \n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ToastTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'ToastTitle';\n\ntype ToastTitleElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface ToastTitleProps extends PrimitiveDivProps {}\n\nconst ToastTitle = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeToast, ...titleProps } = props;\n return ;\n }\n);\n\nToastTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'ToastDescription';\n\ntype ToastDescriptionElement = React.ComponentRef;\ninterface ToastDescriptionProps extends PrimitiveDivProps {}\n\nconst ToastDescription = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeToast, ...descriptionProps } = props;\n return ;\n }\n);\n\nToastDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACTION_NAME = 'ToastAction';\n\ntype ToastActionElement = ToastCloseElement;\ninterface ToastActionProps extends ToastCloseProps {\n /**\n * A short description for an alternate way to carry out the action. For screen reader users\n * who will not be able to navigate to the button easily/quickly.\n * @example Upgrade\n * @example Undo\n */\n altText: string;\n}\n\nconst ToastAction = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { altText, ...actionProps } = props;\n\n if (!altText.trim()) {\n console.error(\n `Invalid prop \\`altText\\` supplied to \\`${ACTION_NAME}\\`. Expected non-empty \\`string\\`.`\n );\n return null;\n }\n\n return (\n \n \n \n );\n }\n);\n\nToastAction.displayName = ACTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'ToastClose';\n\ntype ToastCloseElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface ToastCloseProps extends PrimitiveButtonProps {}\n\nconst ToastClose = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeToast, ...closeProps } = props;\n const interactiveContext = useToastInteractiveContext(CLOSE_NAME, __scopeToast);\n\n return (\n \n \n \n );\n }\n);\n\nToastClose.displayName = CLOSE_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype ToastAnnounceExcludeElement = React.ComponentRef;\ninterface ToastAnnounceExcludeProps extends PrimitiveDivProps {\n altText?: string;\n}\n\nconst ToastAnnounceExclude = React.forwardRef<\n ToastAnnounceExcludeElement,\n ToastAnnounceExcludeProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeToast, altText, ...announceExcludeProps } = props;\n\n return (\n \n );\n});\n\nfunction getAnnounceTextContent(container: HTMLElement) {\n const textContent: string[] = [];\n const childNodes = Array.from(container.childNodes);\n\n childNodes.forEach((node) => {\n if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent);\n if (isHTMLElement(node)) {\n const isHidden = node.ariaHidden || node.hidden || node.style.display === 'none';\n const isExcluded = node.dataset.radixToastAnnounceExclude === '';\n\n if (!isHidden) {\n if (isExcluded) {\n const altText = node.dataset.radixToastAnnounceAlt;\n if (altText) textContent.push(altText);\n } else {\n textContent.push(...getAnnounceTextContent(node));\n }\n }\n }\n });\n\n // We return a collection of text rather than a single concatenated string.\n // This allows SR VO to naturally pause break between nodes while announcing.\n return textContent;\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction handleAndDispatchCustomEvent<\n E extends CustomEvent,\n ReactEvent extends React.SyntheticEvent,\n>(\n name: string,\n handler: ((event: E) => void) | undefined,\n detail: { originalEvent: ReactEvent } & (E extends CustomEvent ? D : never),\n { discrete }: { discrete: boolean }\n) {\n const currentTarget = detail.originalEvent.currentTarget as HTMLElement;\n const event = new CustomEvent(name, { bubbles: true, cancelable: true, detail });\n if (handler) currentTarget.addEventListener(name, handler as EventListener, { once: true });\n\n if (discrete) {\n dispatchDiscreteCustomEvent(currentTarget, event);\n } else {\n currentTarget.dispatchEvent(event);\n }\n}\n\nconst isDeltaInDirection = (\n delta: { x: number; y: number },\n direction: SwipeDirection,\n threshold = 0\n) => {\n const deltaX = Math.abs(delta.x);\n const deltaY = Math.abs(delta.y);\n const isDeltaX = deltaX > deltaY;\n if (direction === 'left' || direction === 'right') {\n return isDeltaX && deltaX > threshold;\n } else {\n return !isDeltaX && deltaY > threshold;\n }\n};\n\nfunction useNextFrame(callback = () => {}) {\n const fn = useCallbackRef(callback);\n useLayoutEffect(() => {\n let raf1 = 0;\n let raf2 = 0;\n raf1 = window.requestAnimationFrame(() => (raf2 = window.requestAnimationFrame(fn)));\n return () => {\n window.cancelAnimationFrame(raf1);\n window.cancelAnimationFrame(raf2);\n };\n }, [fn]);\n}\n\nfunction isHTMLElement(node: any): node is HTMLElement {\n return node.nodeType === node.ELEMENT_NODE;\n}\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nfunction getTabbableCandidates(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n\nfunction focusFirst(candidates: HTMLElement[]) {\n const previouslyFocusedElement = document.activeElement;\n return candidates.some((candidate) => {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === previouslyFocusedElement) return true;\n candidate.focus();\n return document.activeElement !== previouslyFocusedElement;\n });\n}\n\nconst Provider = ToastProvider;\nconst Viewport = ToastViewport;\nconst Root = Toast;\nconst Title = ToastTitle;\nconst Description = ToastDescription;\nconst Action = ToastAction;\nconst Close = ToastClose;\n\nexport {\n createToastScope,\n //\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastAction,\n ToastClose,\n //\n Provider,\n Viewport,\n Root,\n Title,\n Description,\n Action,\n Close,\n};\nexport type {\n ToastProviderProps,\n ToastViewportProps,\n ToastProps,\n ToastTitleProps,\n ToastDescriptionProps,\n ToastActionProps,\n ToastCloseProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,eAA0B;AAC1B,uBAAqC;AACrC,gCAAgC;AAChC,8BAAiC;AACjC,2BAAmC;AACnC,uBAAkC;AAClC,0BAAuB;AACvB,4BAAyB;AACzB,6BAAuD;AACvD,oCAA+B;AAC/B,0CAAqC;AACrC,qCAAgC;AAChC,mCAA+B;AA+EzB;AAvEN,IAAM,gBAAgB;AAEtB,IAAM,CAAC,YAAY,eAAe,qBAAqB,QAAI,0CAA+B,OAAO;AAkBjG,IAAM,CAAC,oBAAoB,gBAAgB,QAAI,yCAAmB,SAAS,CAAC,qBAAqB,CAAC;AAClG,IAAM,CAAC,uBAAuB,uBAAuB,IACnD,mBAA8C,aAAa;AA2B7D,IAAM,gBAA8C,CAAC,UAA2C;AAC9F,QAAM;AAAA,IACJ;AAAA,IACA,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB;AAAA,EACF,IAAI;AACJ,QAAM,CAAC,UAAU,WAAW,IAAU,eAAsC,IAAI;AAChF,QAAM,CAAC,YAAY,aAAa,IAAU,eAAS,CAAC;AACpD,QAAM,iCAAuC,aAAO,KAAK;AACzD,QAAM,mBAAyB,aAAO,KAAK;AAE3C,MAAI,CAAC,MAAM,KAAK,GAAG;AACjB,YAAQ;AAAA,MACN,wCAAwC,aAAa;AAAA,IACvD;AAAA,EACF;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,IAAMC,QAAO;AACb,IAAM,QAAQ;AACd,IAAM,cAAc;AACpB,IAAM,SAAS;AACf,IAAM,QAAQ;", + "names": ["Root", "node", "duration", "event", "Root"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cca1a95f8687577a8d86b213ab735e32221139ef --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.mjs @@ -0,0 +1,645 @@ +"use client"; + +// src/toast.tsx +import * as React from "react"; +import * as ReactDOM from "react-dom"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { createCollection } from "@radix-ui/react-collection"; +import { createContextScope } from "@radix-ui/react-context"; +import * as DismissableLayer from "@radix-ui/react-dismissable-layer"; +import { Portal } from "@radix-ui/react-portal"; +import { Presence } from "@radix-ui/react-presence"; +import { Primitive, dispatchDiscreteCustomEvent } from "@radix-ui/react-primitive"; +import { useCallbackRef } from "@radix-ui/react-use-callback-ref"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { useLayoutEffect } from "@radix-ui/react-use-layout-effect"; +import { VisuallyHidden } from "@radix-ui/react-visually-hidden"; +import { Fragment, jsx, jsxs } from "react/jsx-runtime"; +var PROVIDER_NAME = "ToastProvider"; +var [Collection, useCollection, createCollectionScope] = createCollection("Toast"); +var [createToastContext, createToastScope] = createContextScope("Toast", [createCollectionScope]); +var [ToastProviderProvider, useToastProviderContext] = createToastContext(PROVIDER_NAME); +var ToastProvider = (props) => { + const { + __scopeToast, + label = "Notification", + duration = 5e3, + swipeDirection = "right", + swipeThreshold = 50, + children + } = props; + const [viewport, setViewport] = React.useState(null); + const [toastCount, setToastCount] = React.useState(0); + const isFocusedToastEscapeKeyDownRef = React.useRef(false); + const isClosePausedRef = React.useRef(false); + if (!label.trim()) { + console.error( + `Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.` + ); + } + return /* @__PURE__ */ jsx(Collection.Provider, { scope: __scopeToast, children: /* @__PURE__ */ jsx( + ToastProviderProvider, + { + scope: __scopeToast, + label, + duration, + swipeDirection, + swipeThreshold, + toastCount, + viewport, + onViewportChange: setViewport, + onToastAdd: React.useCallback(() => setToastCount((prevCount) => prevCount + 1), []), + onToastRemove: React.useCallback(() => setToastCount((prevCount) => prevCount - 1), []), + isFocusedToastEscapeKeyDownRef, + isClosePausedRef, + children + } + ) }); +}; +ToastProvider.displayName = PROVIDER_NAME; +var VIEWPORT_NAME = "ToastViewport"; +var VIEWPORT_DEFAULT_HOTKEY = ["F8"]; +var VIEWPORT_PAUSE = "toast.viewportPause"; +var VIEWPORT_RESUME = "toast.viewportResume"; +var ToastViewport = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeToast, + hotkey = VIEWPORT_DEFAULT_HOTKEY, + label = "Notifications ({hotkey})", + ...viewportProps + } = props; + const context = useToastProviderContext(VIEWPORT_NAME, __scopeToast); + const getItems = useCollection(__scopeToast); + const wrapperRef = React.useRef(null); + const headFocusProxyRef = React.useRef(null); + const tailFocusProxyRef = React.useRef(null); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange); + const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, ""); + const hasToasts = context.toastCount > 0; + React.useEffect(() => { + const handleKeyDown = (event) => { + const isHotkeyPressed = hotkey.length !== 0 && hotkey.every((key) => event[key] || event.code === key); + if (isHotkeyPressed) ref.current?.focus(); + }; + document.addEventListener("keydown", handleKeyDown); + return () => document.removeEventListener("keydown", handleKeyDown); + }, [hotkey]); + React.useEffect(() => { + const wrapper = wrapperRef.current; + const viewport = ref.current; + if (hasToasts && wrapper && viewport) { + const handlePause = () => { + if (!context.isClosePausedRef.current) { + const pauseEvent = new CustomEvent(VIEWPORT_PAUSE); + viewport.dispatchEvent(pauseEvent); + context.isClosePausedRef.current = true; + } + }; + const handleResume = () => { + if (context.isClosePausedRef.current) { + const resumeEvent = new CustomEvent(VIEWPORT_RESUME); + viewport.dispatchEvent(resumeEvent); + context.isClosePausedRef.current = false; + } + }; + const handleFocusOutResume = (event) => { + const isFocusMovingOutside = !wrapper.contains(event.relatedTarget); + if (isFocusMovingOutside) handleResume(); + }; + const handlePointerLeaveResume = () => { + const isFocusInside = wrapper.contains(document.activeElement); + if (!isFocusInside) handleResume(); + }; + wrapper.addEventListener("focusin", handlePause); + wrapper.addEventListener("focusout", handleFocusOutResume); + wrapper.addEventListener("pointermove", handlePause); + wrapper.addEventListener("pointerleave", handlePointerLeaveResume); + window.addEventListener("blur", handlePause); + window.addEventListener("focus", handleResume); + return () => { + wrapper.removeEventListener("focusin", handlePause); + wrapper.removeEventListener("focusout", handleFocusOutResume); + wrapper.removeEventListener("pointermove", handlePause); + wrapper.removeEventListener("pointerleave", handlePointerLeaveResume); + window.removeEventListener("blur", handlePause); + window.removeEventListener("focus", handleResume); + }; + } + }, [hasToasts, context.isClosePausedRef]); + const getSortedTabbableCandidates = React.useCallback( + ({ tabbingDirection }) => { + const toastItems = getItems(); + const tabbableCandidates = toastItems.map((toastItem) => { + const toastNode = toastItem.ref.current; + const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)]; + return tabbingDirection === "forwards" ? toastTabbableCandidates : toastTabbableCandidates.reverse(); + }); + return (tabbingDirection === "forwards" ? tabbableCandidates.reverse() : tabbableCandidates).flat(); + }, + [getItems] + ); + React.useEffect(() => { + const viewport = ref.current; + if (viewport) { + const handleKeyDown = (event) => { + const isMetaKey = event.altKey || event.ctrlKey || event.metaKey; + const isTabKey = event.key === "Tab" && !isMetaKey; + if (isTabKey) { + const focusedElement = document.activeElement; + const isTabbingBackwards = event.shiftKey; + const targetIsViewport = event.target === viewport; + if (targetIsViewport && isTabbingBackwards) { + headFocusProxyRef.current?.focus(); + return; + } + const tabbingDirection = isTabbingBackwards ? "backwards" : "forwards"; + const sortedCandidates = getSortedTabbableCandidates({ tabbingDirection }); + const index = sortedCandidates.findIndex((candidate) => candidate === focusedElement); + if (focusFirst(sortedCandidates.slice(index + 1))) { + event.preventDefault(); + } else { + isTabbingBackwards ? headFocusProxyRef.current?.focus() : tailFocusProxyRef.current?.focus(); + } + } + }; + viewport.addEventListener("keydown", handleKeyDown); + return () => viewport.removeEventListener("keydown", handleKeyDown); + } + }, [getItems, getSortedTabbableCandidates]); + return /* @__PURE__ */ jsxs( + DismissableLayer.Branch, + { + ref: wrapperRef, + role: "region", + "aria-label": label.replace("{hotkey}", hotkeyLabel), + tabIndex: -1, + style: { pointerEvents: hasToasts ? void 0 : "none" }, + children: [ + hasToasts && /* @__PURE__ */ jsx( + FocusProxy, + { + ref: headFocusProxyRef, + onFocusFromOutsideViewport: () => { + const tabbableCandidates = getSortedTabbableCandidates({ + tabbingDirection: "forwards" + }); + focusFirst(tabbableCandidates); + } + } + ), + /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeToast, children: /* @__PURE__ */ jsx(Primitive.ol, { tabIndex: -1, ...viewportProps, ref: composedRefs }) }), + hasToasts && /* @__PURE__ */ jsx( + FocusProxy, + { + ref: tailFocusProxyRef, + onFocusFromOutsideViewport: () => { + const tabbableCandidates = getSortedTabbableCandidates({ + tabbingDirection: "backwards" + }); + focusFirst(tabbableCandidates); + } + } + ) + ] + } + ); + } +); +ToastViewport.displayName = VIEWPORT_NAME; +var FOCUS_PROXY_NAME = "ToastFocusProxy"; +var FocusProxy = React.forwardRef( + (props, forwardedRef) => { + const { __scopeToast, onFocusFromOutsideViewport, ...proxyProps } = props; + const context = useToastProviderContext(FOCUS_PROXY_NAME, __scopeToast); + return /* @__PURE__ */ jsx( + VisuallyHidden, + { + tabIndex: 0, + ...proxyProps, + ref: forwardedRef, + style: { position: "fixed" }, + onFocus: (event) => { + const prevFocusedElement = event.relatedTarget; + const isFocusFromOutsideViewport = !context.viewport?.contains(prevFocusedElement); + if (isFocusFromOutsideViewport) onFocusFromOutsideViewport(); + } + } + ); + } +); +FocusProxy.displayName = FOCUS_PROXY_NAME; +var TOAST_NAME = "Toast"; +var TOAST_SWIPE_START = "toast.swipeStart"; +var TOAST_SWIPE_MOVE = "toast.swipeMove"; +var TOAST_SWIPE_CANCEL = "toast.swipeCancel"; +var TOAST_SWIPE_END = "toast.swipeEnd"; +var Toast = React.forwardRef( + (props, forwardedRef) => { + const { forceMount, open: openProp, defaultOpen, onOpenChange, ...toastProps } = props; + const [open, setOpen] = useControllableState({ + prop: openProp, + defaultProp: defaultOpen ?? true, + onChange: onOpenChange, + caller: TOAST_NAME + }); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || open, children: /* @__PURE__ */ jsx( + ToastImpl, + { + open, + ...toastProps, + ref: forwardedRef, + onClose: () => setOpen(false), + onPause: useCallbackRef(props.onPause), + onResume: useCallbackRef(props.onResume), + onSwipeStart: composeEventHandlers(props.onSwipeStart, (event) => { + event.currentTarget.setAttribute("data-swipe", "start"); + }), + onSwipeMove: composeEventHandlers(props.onSwipeMove, (event) => { + const { x, y } = event.detail.delta; + event.currentTarget.setAttribute("data-swipe", "move"); + event.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${x}px`); + event.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${y}px`); + }), + onSwipeCancel: composeEventHandlers(props.onSwipeCancel, (event) => { + event.currentTarget.setAttribute("data-swipe", "cancel"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-end-y"); + }), + onSwipeEnd: composeEventHandlers(props.onSwipeEnd, (event) => { + const { x, y } = event.detail.delta; + event.currentTarget.setAttribute("data-swipe", "end"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"); + event.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"); + event.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${x}px`); + event.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${y}px`); + setOpen(false); + }) + } + ) }); + } +); +Toast.displayName = TOAST_NAME; +var [ToastInteractiveProvider, useToastInteractiveContext] = createToastContext(TOAST_NAME, { + onClose() { + } +}); +var ToastImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeToast, + type = "foreground", + duration: durationProp, + open, + onClose, + onEscapeKeyDown, + onPause, + onResume, + onSwipeStart, + onSwipeMove, + onSwipeCancel, + onSwipeEnd, + ...toastProps + } = props; + const context = useToastProviderContext(TOAST_NAME, __scopeToast); + const [node, setNode] = React.useState(null); + const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2)); + const pointerStartRef = React.useRef(null); + const swipeDeltaRef = React.useRef(null); + const duration = durationProp || context.duration; + const closeTimerStartTimeRef = React.useRef(0); + const closeTimerRemainingTimeRef = React.useRef(duration); + const closeTimerRef = React.useRef(0); + const { onToastAdd, onToastRemove } = context; + const handleClose = useCallbackRef(() => { + const isFocusInToast = node?.contains(document.activeElement); + if (isFocusInToast) context.viewport?.focus(); + onClose(); + }); + const startTimer = React.useCallback( + (duration2) => { + if (!duration2 || duration2 === Infinity) return; + window.clearTimeout(closeTimerRef.current); + closeTimerStartTimeRef.current = (/* @__PURE__ */ new Date()).getTime(); + closeTimerRef.current = window.setTimeout(handleClose, duration2); + }, + [handleClose] + ); + React.useEffect(() => { + const viewport = context.viewport; + if (viewport) { + const handleResume = () => { + startTimer(closeTimerRemainingTimeRef.current); + onResume?.(); + }; + const handlePause = () => { + const elapsedTime = (/* @__PURE__ */ new Date()).getTime() - closeTimerStartTimeRef.current; + closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime; + window.clearTimeout(closeTimerRef.current); + onPause?.(); + }; + viewport.addEventListener(VIEWPORT_PAUSE, handlePause); + viewport.addEventListener(VIEWPORT_RESUME, handleResume); + return () => { + viewport.removeEventListener(VIEWPORT_PAUSE, handlePause); + viewport.removeEventListener(VIEWPORT_RESUME, handleResume); + }; + } + }, [context.viewport, duration, onPause, onResume, startTimer]); + React.useEffect(() => { + if (open && !context.isClosePausedRef.current) startTimer(duration); + }, [open, duration, context.isClosePausedRef, startTimer]); + React.useEffect(() => { + onToastAdd(); + return () => onToastRemove(); + }, [onToastAdd, onToastRemove]); + const announceTextContent = React.useMemo(() => { + return node ? getAnnounceTextContent(node) : null; + }, [node]); + if (!context.viewport) return null; + return /* @__PURE__ */ jsxs(Fragment, { children: [ + announceTextContent && /* @__PURE__ */ jsx( + ToastAnnounce, + { + __scopeToast, + role: "status", + "aria-live": type === "foreground" ? "assertive" : "polite", + children: announceTextContent + } + ), + /* @__PURE__ */ jsx(ToastInteractiveProvider, { scope: __scopeToast, onClose: handleClose, children: ReactDOM.createPortal( + /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeToast, children: /* @__PURE__ */ jsx( + DismissableLayer.Root, + { + asChild: true, + onEscapeKeyDown: composeEventHandlers(onEscapeKeyDown, () => { + if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose(); + context.isFocusedToastEscapeKeyDownRef.current = false; + }), + children: /* @__PURE__ */ jsx( + Primitive.li, + { + tabIndex: 0, + "data-state": open ? "open" : "closed", + "data-swipe-direction": context.swipeDirection, + ...toastProps, + ref: composedRefs, + style: { userSelect: "none", touchAction: "none", ...props.style }, + onKeyDown: composeEventHandlers(props.onKeyDown, (event) => { + if (event.key !== "Escape") return; + onEscapeKeyDown?.(event.nativeEvent); + if (!event.nativeEvent.defaultPrevented) { + context.isFocusedToastEscapeKeyDownRef.current = true; + handleClose(); + } + }), + onPointerDown: composeEventHandlers(props.onPointerDown, (event) => { + if (event.button !== 0) return; + pointerStartRef.current = { x: event.clientX, y: event.clientY }; + }), + onPointerMove: composeEventHandlers(props.onPointerMove, (event) => { + if (!pointerStartRef.current) return; + const x = event.clientX - pointerStartRef.current.x; + const y = event.clientY - pointerStartRef.current.y; + const hasSwipeMoveStarted = Boolean(swipeDeltaRef.current); + const isHorizontalSwipe = ["left", "right"].includes(context.swipeDirection); + const clamp = ["left", "up"].includes(context.swipeDirection) ? Math.min : Math.max; + const clampedX = isHorizontalSwipe ? clamp(0, x) : 0; + const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0; + const moveStartBuffer = event.pointerType === "touch" ? 10 : 2; + const delta = { x: clampedX, y: clampedY }; + const eventDetail = { originalEvent: event, delta }; + if (hasSwipeMoveStarted) { + swipeDeltaRef.current = delta; + handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE, onSwipeMove, eventDetail, { + discrete: false + }); + } else if (isDeltaInDirection(delta, context.swipeDirection, moveStartBuffer)) { + swipeDeltaRef.current = delta; + handleAndDispatchCustomEvent(TOAST_SWIPE_START, onSwipeStart, eventDetail, { + discrete: false + }); + event.target.setPointerCapture(event.pointerId); + } else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) { + pointerStartRef.current = null; + } + }), + onPointerUp: composeEventHandlers(props.onPointerUp, (event) => { + const delta = swipeDeltaRef.current; + const target = event.target; + if (target.hasPointerCapture(event.pointerId)) { + target.releasePointerCapture(event.pointerId); + } + swipeDeltaRef.current = null; + pointerStartRef.current = null; + if (delta) { + const toast = event.currentTarget; + const eventDetail = { originalEvent: event, delta }; + if (isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)) { + handleAndDispatchCustomEvent(TOAST_SWIPE_END, onSwipeEnd, eventDetail, { + discrete: true + }); + } else { + handleAndDispatchCustomEvent( + TOAST_SWIPE_CANCEL, + onSwipeCancel, + eventDetail, + { + discrete: true + } + ); + } + toast.addEventListener("click", (event2) => event2.preventDefault(), { + once: true + }); + } + }) + } + ) + } + ) }), + context.viewport + ) }) + ] }); + } +); +var ToastAnnounce = (props) => { + const { __scopeToast, children, ...announceProps } = props; + const context = useToastProviderContext(TOAST_NAME, __scopeToast); + const [renderAnnounceText, setRenderAnnounceText] = React.useState(false); + const [isAnnounced, setIsAnnounced] = React.useState(false); + useNextFrame(() => setRenderAnnounceText(true)); + React.useEffect(() => { + const timer = window.setTimeout(() => setIsAnnounced(true), 1e3); + return () => window.clearTimeout(timer); + }, []); + return isAnnounced ? null : /* @__PURE__ */ jsx(Portal, { asChild: true, children: /* @__PURE__ */ jsx(VisuallyHidden, { ...announceProps, children: renderAnnounceText && /* @__PURE__ */ jsxs(Fragment, { children: [ + context.label, + " ", + children + ] }) }) }); +}; +var TITLE_NAME = "ToastTitle"; +var ToastTitle = React.forwardRef( + (props, forwardedRef) => { + const { __scopeToast, ...titleProps } = props; + return /* @__PURE__ */ jsx(Primitive.div, { ...titleProps, ref: forwardedRef }); + } +); +ToastTitle.displayName = TITLE_NAME; +var DESCRIPTION_NAME = "ToastDescription"; +var ToastDescription = React.forwardRef( + (props, forwardedRef) => { + const { __scopeToast, ...descriptionProps } = props; + return /* @__PURE__ */ jsx(Primitive.div, { ...descriptionProps, ref: forwardedRef }); + } +); +ToastDescription.displayName = DESCRIPTION_NAME; +var ACTION_NAME = "ToastAction"; +var ToastAction = React.forwardRef( + (props, forwardedRef) => { + const { altText, ...actionProps } = props; + if (!altText.trim()) { + console.error( + `Invalid prop \`altText\` supplied to \`${ACTION_NAME}\`. Expected non-empty \`string\`.` + ); + return null; + } + return /* @__PURE__ */ jsx(ToastAnnounceExclude, { altText, asChild: true, children: /* @__PURE__ */ jsx(ToastClose, { ...actionProps, ref: forwardedRef }) }); + } +); +ToastAction.displayName = ACTION_NAME; +var CLOSE_NAME = "ToastClose"; +var ToastClose = React.forwardRef( + (props, forwardedRef) => { + const { __scopeToast, ...closeProps } = props; + const interactiveContext = useToastInteractiveContext(CLOSE_NAME, __scopeToast); + return /* @__PURE__ */ jsx(ToastAnnounceExclude, { asChild: true, children: /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + ...closeProps, + ref: forwardedRef, + onClick: composeEventHandlers(props.onClick, interactiveContext.onClose) + } + ) }); + } +); +ToastClose.displayName = CLOSE_NAME; +var ToastAnnounceExclude = React.forwardRef((props, forwardedRef) => { + const { __scopeToast, altText, ...announceExcludeProps } = props; + return /* @__PURE__ */ jsx( + Primitive.div, + { + "data-radix-toast-announce-exclude": "", + "data-radix-toast-announce-alt": altText || void 0, + ...announceExcludeProps, + ref: forwardedRef + } + ); +}); +function getAnnounceTextContent(container) { + const textContent = []; + const childNodes = Array.from(container.childNodes); + childNodes.forEach((node) => { + if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent); + if (isHTMLElement(node)) { + const isHidden = node.ariaHidden || node.hidden || node.style.display === "none"; + const isExcluded = node.dataset.radixToastAnnounceExclude === ""; + if (!isHidden) { + if (isExcluded) { + const altText = node.dataset.radixToastAnnounceAlt; + if (altText) textContent.push(altText); + } else { + textContent.push(...getAnnounceTextContent(node)); + } + } + } + }); + return textContent; +} +function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) { + const currentTarget = detail.originalEvent.currentTarget; + const event = new CustomEvent(name, { bubbles: true, cancelable: true, detail }); + if (handler) currentTarget.addEventListener(name, handler, { once: true }); + if (discrete) { + dispatchDiscreteCustomEvent(currentTarget, event); + } else { + currentTarget.dispatchEvent(event); + } +} +var isDeltaInDirection = (delta, direction, threshold = 0) => { + const deltaX = Math.abs(delta.x); + const deltaY = Math.abs(delta.y); + const isDeltaX = deltaX > deltaY; + if (direction === "left" || direction === "right") { + return isDeltaX && deltaX > threshold; + } else { + return !isDeltaX && deltaY > threshold; + } +}; +function useNextFrame(callback = () => { +}) { + const fn = useCallbackRef(callback); + useLayoutEffect(() => { + let raf1 = 0; + let raf2 = 0; + raf1 = window.requestAnimationFrame(() => raf2 = window.requestAnimationFrame(fn)); + return () => { + window.cancelAnimationFrame(raf1); + window.cancelAnimationFrame(raf2); + }; + }, [fn]); +} +function isHTMLElement(node) { + return node.nodeType === node.ELEMENT_NODE; +} +function getTabbableCandidates(container) { + const nodes = []; + const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { + acceptNode: (node) => { + const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden"; + if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; + return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; + } + }); + while (walker.nextNode()) nodes.push(walker.currentNode); + return nodes; +} +function focusFirst(candidates) { + const previouslyFocusedElement = document.activeElement; + return candidates.some((candidate) => { + if (candidate === previouslyFocusedElement) return true; + candidate.focus(); + return document.activeElement !== previouslyFocusedElement; + }); +} +var Provider = ToastProvider; +var Viewport = ToastViewport; +var Root2 = Toast; +var Title = ToastTitle; +var Description = ToastDescription; +var Action = ToastAction; +var Close = ToastClose; +export { + Action, + Close, + Description, + Provider, + Root2 as Root, + Title, + Toast, + ToastAction, + ToastClose, + ToastDescription, + ToastProvider, + ToastTitle, + ToastViewport, + Viewport, + createToastScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..040315825a7bd535e917290d186b7162051f9d7b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/toast.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { createContextScope } from '@radix-ui/react-context';\nimport * as DismissableLayer from '@radix-ui/react-dismissable-layer';\nimport { Portal } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * ToastProvider\n * -----------------------------------------------------------------------------------------------*/\n\nconst PROVIDER_NAME = 'ToastProvider';\n\nconst [Collection, useCollection, createCollectionScope] = createCollection('Toast');\n\ntype SwipeDirection = 'up' | 'down' | 'left' | 'right';\ntype ToastProviderContextValue = {\n label: string;\n duration: number;\n swipeDirection: SwipeDirection;\n swipeThreshold: number;\n toastCount: number;\n viewport: ToastViewportElement | null;\n onViewportChange(viewport: ToastViewportElement): void;\n onToastAdd(): void;\n onToastRemove(): void;\n isFocusedToastEscapeKeyDownRef: React.MutableRefObject;\n isClosePausedRef: React.MutableRefObject;\n};\n\ntype ScopedProps

= P & { __scopeToast?: Scope };\nconst [createToastContext, createToastScope] = createContextScope('Toast', [createCollectionScope]);\nconst [ToastProviderProvider, useToastProviderContext] =\n createToastContext(PROVIDER_NAME);\n\ninterface ToastProviderProps {\n children?: React.ReactNode;\n /**\n * An author-localized label for each toast. Used to help screen reader users\n * associate the interruption with a toast.\n * @defaultValue 'Notification'\n */\n label?: string;\n /**\n * Time in milliseconds that each toast should remain visible for.\n * @defaultValue 5000\n */\n duration?: number;\n /**\n * Direction of pointer swipe that should close the toast.\n * @defaultValue 'right'\n */\n swipeDirection?: SwipeDirection;\n /**\n * Distance in pixels that the swipe must pass before a close is triggered.\n * @defaultValue 50\n */\n swipeThreshold?: number;\n}\n\nconst ToastProvider: React.FC = (props: ScopedProps) => {\n const {\n __scopeToast,\n label = 'Notification',\n duration = 5000,\n swipeDirection = 'right',\n swipeThreshold = 50,\n children,\n } = props;\n const [viewport, setViewport] = React.useState(null);\n const [toastCount, setToastCount] = React.useState(0);\n const isFocusedToastEscapeKeyDownRef = React.useRef(false);\n const isClosePausedRef = React.useRef(false);\n\n if (!label.trim()) {\n console.error(\n `Invalid prop \\`label\\` supplied to \\`${PROVIDER_NAME}\\`. Expected non-empty \\`string\\`.`\n );\n }\n\n return (\n \n setToastCount((prevCount) => prevCount + 1), [])}\n onToastRemove={React.useCallback(() => setToastCount((prevCount) => prevCount - 1), [])}\n isFocusedToastEscapeKeyDownRef={isFocusedToastEscapeKeyDownRef}\n isClosePausedRef={isClosePausedRef}\n >\n {children}\n \n \n );\n};\n\nToastProvider.displayName = PROVIDER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastViewport\n * -----------------------------------------------------------------------------------------------*/\n\nconst VIEWPORT_NAME = 'ToastViewport';\nconst VIEWPORT_DEFAULT_HOTKEY = ['F8'];\nconst VIEWPORT_PAUSE = 'toast.viewportPause';\nconst VIEWPORT_RESUME = 'toast.viewportResume';\n\ntype ToastViewportElement = React.ComponentRef;\ntype PrimitiveOrderedListProps = React.ComponentPropsWithoutRef;\ninterface ToastViewportProps extends PrimitiveOrderedListProps {\n /**\n * The keys to use as the keyboard shortcut that will move focus to the toast viewport.\n * @defaultValue ['F8']\n */\n hotkey?: string[];\n /**\n * An author-localized label for the toast viewport to provide context for screen reader users\n * when navigating page landmarks. The available `{hotkey}` placeholder will be replaced for you.\n * @defaultValue 'Notifications ({hotkey})'\n */\n label?: string;\n}\n\nconst ToastViewport = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeToast,\n hotkey = VIEWPORT_DEFAULT_HOTKEY,\n label = 'Notifications ({hotkey})',\n ...viewportProps\n } = props;\n const context = useToastProviderContext(VIEWPORT_NAME, __scopeToast);\n const getItems = useCollection(__scopeToast);\n const wrapperRef = React.useRef(null);\n const headFocusProxyRef = React.useRef(null);\n const tailFocusProxyRef = React.useRef(null);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n const hotkeyLabel = hotkey.join('+').replace(/Key/g, '').replace(/Digit/g, '');\n const hasToasts = context.toastCount > 0;\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n // we use `event.code` as it is consistent regardless of meta keys that were pressed.\n // for example, `event.key` for `Control+Alt+t` is `\u2020` and `t !== \u2020`\n const isHotkeyPressed =\n hotkey.length !== 0 && hotkey.every((key) => (event as any)[key] || event.code === key);\n if (isHotkeyPressed) ref.current?.focus();\n };\n document.addEventListener('keydown', handleKeyDown);\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [hotkey]);\n\n React.useEffect(() => {\n const wrapper = wrapperRef.current;\n const viewport = ref.current;\n if (hasToasts && wrapper && viewport) {\n const handlePause = () => {\n if (!context.isClosePausedRef.current) {\n const pauseEvent = new CustomEvent(VIEWPORT_PAUSE);\n viewport.dispatchEvent(pauseEvent);\n context.isClosePausedRef.current = true;\n }\n };\n\n const handleResume = () => {\n if (context.isClosePausedRef.current) {\n const resumeEvent = new CustomEvent(VIEWPORT_RESUME);\n viewport.dispatchEvent(resumeEvent);\n context.isClosePausedRef.current = false;\n }\n };\n\n const handleFocusOutResume = (event: FocusEvent) => {\n const isFocusMovingOutside = !wrapper.contains(event.relatedTarget as HTMLElement);\n if (isFocusMovingOutside) handleResume();\n };\n\n const handlePointerLeaveResume = () => {\n const isFocusInside = wrapper.contains(document.activeElement);\n if (!isFocusInside) handleResume();\n };\n\n // Toasts are not in the viewport React tree so we need to bind DOM events\n wrapper.addEventListener('focusin', handlePause);\n wrapper.addEventListener('focusout', handleFocusOutResume);\n wrapper.addEventListener('pointermove', handlePause);\n wrapper.addEventListener('pointerleave', handlePointerLeaveResume);\n window.addEventListener('blur', handlePause);\n window.addEventListener('focus', handleResume);\n return () => {\n wrapper.removeEventListener('focusin', handlePause);\n wrapper.removeEventListener('focusout', handleFocusOutResume);\n wrapper.removeEventListener('pointermove', handlePause);\n wrapper.removeEventListener('pointerleave', handlePointerLeaveResume);\n window.removeEventListener('blur', handlePause);\n window.removeEventListener('focus', handleResume);\n };\n }\n }, [hasToasts, context.isClosePausedRef]);\n\n const getSortedTabbableCandidates = React.useCallback(\n ({ tabbingDirection }: { tabbingDirection: 'forwards' | 'backwards' }) => {\n const toastItems = getItems();\n const tabbableCandidates = toastItems.map((toastItem) => {\n const toastNode = toastItem.ref.current!;\n const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)];\n return tabbingDirection === 'forwards'\n ? toastTabbableCandidates\n : toastTabbableCandidates.reverse();\n });\n return (\n tabbingDirection === 'forwards' ? tabbableCandidates.reverse() : tabbableCandidates\n ).flat();\n },\n [getItems]\n );\n\n React.useEffect(() => {\n const viewport = ref.current;\n // We programmatically manage tabbing as we are unable to influence\n // the source order with portals, this allows us to reverse the\n // tab order so that it runs from most recent toast to least\n if (viewport) {\n const handleKeyDown = (event: KeyboardEvent) => {\n const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;\n const isTabKey = event.key === 'Tab' && !isMetaKey;\n\n if (isTabKey) {\n const focusedElement = document.activeElement;\n const isTabbingBackwards = event.shiftKey;\n const targetIsViewport = event.target === viewport;\n\n // If we're back tabbing after jumping to the viewport then we simply\n // proxy focus out to the preceding document\n if (targetIsViewport && isTabbingBackwards) {\n headFocusProxyRef.current?.focus();\n return;\n }\n\n const tabbingDirection = isTabbingBackwards ? 'backwards' : 'forwards';\n const sortedCandidates = getSortedTabbableCandidates({ tabbingDirection });\n const index = sortedCandidates.findIndex((candidate) => candidate === focusedElement);\n if (focusFirst(sortedCandidates.slice(index + 1))) {\n event.preventDefault();\n } else {\n // If we can't focus that means we're at the edges so we\n // proxy to the corresponding exit point and let the browser handle\n // tab/shift+tab keypress and implicitly pass focus to the next valid element in the document\n isTabbingBackwards\n ? headFocusProxyRef.current?.focus()\n : tailFocusProxyRef.current?.focus();\n }\n }\n };\n\n // Toasts are not in the viewport React tree so we need to bind DOM events\n viewport.addEventListener('keydown', handleKeyDown);\n return () => viewport.removeEventListener('keydown', handleKeyDown);\n }\n }, [getItems, getSortedTabbableCandidates]);\n\n return (\n \n {hasToasts && (\n {\n const tabbableCandidates = getSortedTabbableCandidates({\n tabbingDirection: 'forwards',\n });\n focusFirst(tabbableCandidates);\n }}\n />\n )}\n {/**\n * tabindex on the the list so that it can be focused when items are removed. we focus\n * the list instead of the viewport so it announces number of items remaining.\n */}\n \n \n \n {hasToasts && (\n {\n const tabbableCandidates = getSortedTabbableCandidates({\n tabbingDirection: 'backwards',\n });\n focusFirst(tabbableCandidates);\n }}\n />\n )}\n \n );\n }\n);\n\nToastViewport.displayName = VIEWPORT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst FOCUS_PROXY_NAME = 'ToastFocusProxy';\n\ntype FocusProxyElement = React.ComponentRef;\ntype VisuallyHiddenProps = React.ComponentPropsWithoutRef;\ninterface FocusProxyProps extends VisuallyHiddenProps {\n onFocusFromOutsideViewport(): void;\n}\n\nconst FocusProxy = React.forwardRef>(\n (props, forwardedRef) => {\n const { __scopeToast, onFocusFromOutsideViewport, ...proxyProps } = props;\n const context = useToastProviderContext(FOCUS_PROXY_NAME, __scopeToast);\n\n return (\n {\n const prevFocusedElement = event.relatedTarget as HTMLElement | null;\n const isFocusFromOutsideViewport = !context.viewport?.contains(prevFocusedElement);\n if (isFocusFromOutsideViewport) onFocusFromOutsideViewport();\n }}\n />\n );\n }\n);\n\nFocusProxy.displayName = FOCUS_PROXY_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Toast\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOAST_NAME = 'Toast';\nconst TOAST_SWIPE_START = 'toast.swipeStart';\nconst TOAST_SWIPE_MOVE = 'toast.swipeMove';\nconst TOAST_SWIPE_CANCEL = 'toast.swipeCancel';\nconst TOAST_SWIPE_END = 'toast.swipeEnd';\n\ntype ToastElement = ToastImplElement;\ninterface ToastProps extends Omit {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst Toast = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { forceMount, open: openProp, defaultOpen, onOpenChange, ...toastProps } = props;\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? true,\n onChange: onOpenChange,\n caller: TOAST_NAME,\n });\n return (\n \n setOpen(false)}\n onPause={useCallbackRef(props.onPause)}\n onResume={useCallbackRef(props.onResume)}\n onSwipeStart={composeEventHandlers(props.onSwipeStart, (event) => {\n event.currentTarget.setAttribute('data-swipe', 'start');\n })}\n onSwipeMove={composeEventHandlers(props.onSwipeMove, (event) => {\n const { x, y } = event.detail.delta;\n event.currentTarget.setAttribute('data-swipe', 'move');\n event.currentTarget.style.setProperty('--radix-toast-swipe-move-x', `${x}px`);\n event.currentTarget.style.setProperty('--radix-toast-swipe-move-y', `${y}px`);\n })}\n onSwipeCancel={composeEventHandlers(props.onSwipeCancel, (event) => {\n event.currentTarget.setAttribute('data-swipe', 'cancel');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-x');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-y');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-end-x');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-end-y');\n })}\n onSwipeEnd={composeEventHandlers(props.onSwipeEnd, (event) => {\n const { x, y } = event.detail.delta;\n event.currentTarget.setAttribute('data-swipe', 'end');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-x');\n event.currentTarget.style.removeProperty('--radix-toast-swipe-move-y');\n event.currentTarget.style.setProperty('--radix-toast-swipe-end-x', `${x}px`);\n event.currentTarget.style.setProperty('--radix-toast-swipe-end-y', `${y}px`);\n setOpen(false);\n })}\n />\n \n );\n }\n);\n\nToast.displayName = TOAST_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype SwipeEvent = { currentTarget: EventTarget & ToastElement } & Omit<\n CustomEvent<{ originalEvent: React.PointerEvent; delta: { x: number; y: number } }>,\n 'currentTarget'\n>;\n\nconst [ToastInteractiveProvider, useToastInteractiveContext] = createToastContext(TOAST_NAME, {\n onClose() {},\n});\n\ntype ToastImplElement = React.ComponentRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype ToastImplPrivateProps = { open: boolean; onClose(): void };\ntype PrimitiveListItemProps = React.ComponentPropsWithoutRef;\ninterface ToastImplProps extends ToastImplPrivateProps, PrimitiveListItemProps {\n type?: 'foreground' | 'background';\n /**\n * Time in milliseconds that toast should remain visible for. Overrides value\n * given to `ToastProvider`.\n */\n duration?: number;\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n onPause?(): void;\n onResume?(): void;\n onSwipeStart?(event: SwipeEvent): void;\n onSwipeMove?(event: SwipeEvent): void;\n onSwipeCancel?(event: SwipeEvent): void;\n onSwipeEnd?(event: SwipeEvent): void;\n}\n\nconst ToastImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeToast,\n type = 'foreground',\n duration: durationProp,\n open,\n onClose,\n onEscapeKeyDown,\n onPause,\n onResume,\n onSwipeStart,\n onSwipeMove,\n onSwipeCancel,\n onSwipeEnd,\n ...toastProps\n } = props;\n const context = useToastProviderContext(TOAST_NAME, __scopeToast);\n const [node, setNode] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setNode(node));\n const pointerStartRef = React.useRef<{ x: number; y: number } | null>(null);\n const swipeDeltaRef = React.useRef<{ x: number; y: number } | null>(null);\n const duration = durationProp || context.duration;\n const closeTimerStartTimeRef = React.useRef(0);\n const closeTimerRemainingTimeRef = React.useRef(duration);\n const closeTimerRef = React.useRef(0);\n const { onToastAdd, onToastRemove } = context;\n const handleClose = useCallbackRef(() => {\n // focus viewport if focus is within toast to read the remaining toast\n // count to SR users and ensure focus isn't lost\n const isFocusInToast = node?.contains(document.activeElement);\n if (isFocusInToast) context.viewport?.focus();\n onClose();\n });\n\n const startTimer = React.useCallback(\n (duration: number) => {\n if (!duration || duration === Infinity) return;\n window.clearTimeout(closeTimerRef.current);\n closeTimerStartTimeRef.current = new Date().getTime();\n closeTimerRef.current = window.setTimeout(handleClose, duration);\n },\n [handleClose]\n );\n\n React.useEffect(() => {\n const viewport = context.viewport;\n if (viewport) {\n const handleResume = () => {\n startTimer(closeTimerRemainingTimeRef.current);\n onResume?.();\n };\n const handlePause = () => {\n const elapsedTime = new Date().getTime() - closeTimerStartTimeRef.current;\n closeTimerRemainingTimeRef.current = closeTimerRemainingTimeRef.current - elapsedTime;\n window.clearTimeout(closeTimerRef.current);\n onPause?.();\n };\n viewport.addEventListener(VIEWPORT_PAUSE, handlePause);\n viewport.addEventListener(VIEWPORT_RESUME, handleResume);\n return () => {\n viewport.removeEventListener(VIEWPORT_PAUSE, handlePause);\n viewport.removeEventListener(VIEWPORT_RESUME, handleResume);\n };\n }\n }, [context.viewport, duration, onPause, onResume, startTimer]);\n\n // start timer when toast opens or duration changes.\n // we include `open` in deps because closed !== unmounted when animating\n // so it could reopen before being completely unmounted\n React.useEffect(() => {\n if (open && !context.isClosePausedRef.current) startTimer(duration);\n }, [open, duration, context.isClosePausedRef, startTimer]);\n\n React.useEffect(() => {\n onToastAdd();\n return () => onToastRemove();\n }, [onToastAdd, onToastRemove]);\n\n const announceTextContent = React.useMemo(() => {\n return node ? getAnnounceTextContent(node) : null;\n }, [node]);\n\n if (!context.viewport) return null;\n\n return (\n <>\n {announceTextContent && (\n \n {announceTextContent}\n \n )}\n\n \n {ReactDOM.createPortal(\n \n {\n if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose();\n context.isFocusedToastEscapeKeyDownRef.current = false;\n })}\n >\n {\n if (event.key !== 'Escape') return;\n onEscapeKeyDown?.(event.nativeEvent);\n if (!event.nativeEvent.defaultPrevented) {\n context.isFocusedToastEscapeKeyDownRef.current = true;\n handleClose();\n }\n })}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n if (event.button !== 0) return;\n pointerStartRef.current = { x: event.clientX, y: event.clientY };\n })}\n onPointerMove={composeEventHandlers(props.onPointerMove, (event) => {\n if (!pointerStartRef.current) return;\n const x = event.clientX - pointerStartRef.current.x;\n const y = event.clientY - pointerStartRef.current.y;\n const hasSwipeMoveStarted = Boolean(swipeDeltaRef.current);\n const isHorizontalSwipe = ['left', 'right'].includes(context.swipeDirection);\n const clamp = ['left', 'up'].includes(context.swipeDirection)\n ? Math.min\n : Math.max;\n const clampedX = isHorizontalSwipe ? clamp(0, x) : 0;\n const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;\n const moveStartBuffer = event.pointerType === 'touch' ? 10 : 2;\n const delta = { x: clampedX, y: clampedY };\n const eventDetail = { originalEvent: event, delta };\n if (hasSwipeMoveStarted) {\n swipeDeltaRef.current = delta;\n handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE, onSwipeMove, eventDetail, {\n discrete: false,\n });\n } else if (isDeltaInDirection(delta, context.swipeDirection, moveStartBuffer)) {\n swipeDeltaRef.current = delta;\n handleAndDispatchCustomEvent(TOAST_SWIPE_START, onSwipeStart, eventDetail, {\n discrete: false,\n });\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n } else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) {\n // User is swiping in wrong direction so we disable swipe gesture\n // for the current pointer down interaction\n pointerStartRef.current = null;\n }\n })}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n const delta = swipeDeltaRef.current;\n const target = event.target as HTMLElement;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n }\n swipeDeltaRef.current = null;\n pointerStartRef.current = null;\n if (delta) {\n const toast = event.currentTarget;\n const eventDetail = { originalEvent: event, delta };\n if (\n isDeltaInDirection(delta, context.swipeDirection, context.swipeThreshold)\n ) {\n handleAndDispatchCustomEvent(TOAST_SWIPE_END, onSwipeEnd, eventDetail, {\n discrete: true,\n });\n } else {\n handleAndDispatchCustomEvent(\n TOAST_SWIPE_CANCEL,\n onSwipeCancel,\n eventDetail,\n {\n discrete: true,\n }\n );\n }\n // Prevent click event from triggering on items within the toast when\n // pointer up is part of a swipe gesture\n toast.addEventListener('click', (event) => event.preventDefault(), {\n once: true,\n });\n }\n })}\n />\n \n ,\n context.viewport\n )}\n \n \n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\ninterface ToastAnnounceProps\n extends Omit, 'children'>,\n ScopedProps<{ children: string[] }> {}\n\nconst ToastAnnounce: React.FC = (props: ScopedProps) => {\n const { __scopeToast, children, ...announceProps } = props;\n const context = useToastProviderContext(TOAST_NAME, __scopeToast);\n const [renderAnnounceText, setRenderAnnounceText] = React.useState(false);\n const [isAnnounced, setIsAnnounced] = React.useState(false);\n\n // render text content in the next frame to ensure toast is announced in NVDA\n useNextFrame(() => setRenderAnnounceText(true));\n\n // cleanup after announcing\n React.useEffect(() => {\n const timer = window.setTimeout(() => setIsAnnounced(true), 1000);\n return () => window.clearTimeout(timer);\n }, []);\n\n return isAnnounced ? null : (\n \n \n {renderAnnounceText && (\n <>\n {context.label} {children}\n \n )}\n \n \n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ToastTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'ToastTitle';\n\ntype ToastTitleElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface ToastTitleProps extends PrimitiveDivProps {}\n\nconst ToastTitle = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeToast, ...titleProps } = props;\n return ;\n }\n);\n\nToastTitle.displayName = TITLE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DESCRIPTION_NAME = 'ToastDescription';\n\ntype ToastDescriptionElement = React.ComponentRef;\ninterface ToastDescriptionProps extends PrimitiveDivProps {}\n\nconst ToastDescription = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeToast, ...descriptionProps } = props;\n return ;\n }\n);\n\nToastDescription.displayName = DESCRIPTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastAction\n * -----------------------------------------------------------------------------------------------*/\n\nconst ACTION_NAME = 'ToastAction';\n\ntype ToastActionElement = ToastCloseElement;\ninterface ToastActionProps extends ToastCloseProps {\n /**\n * A short description for an alternate way to carry out the action. For screen reader users\n * who will not be able to navigate to the button easily/quickly.\n * @example Upgrade\n * @example Undo\n */\n altText: string;\n}\n\nconst ToastAction = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { altText, ...actionProps } = props;\n\n if (!altText.trim()) {\n console.error(\n `Invalid prop \\`altText\\` supplied to \\`${ACTION_NAME}\\`. Expected non-empty \\`string\\`.`\n );\n return null;\n }\n\n return (\n \n \n \n );\n }\n);\n\nToastAction.displayName = ACTION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToastClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'ToastClose';\n\ntype ToastCloseElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface ToastCloseProps extends PrimitiveButtonProps {}\n\nconst ToastClose = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeToast, ...closeProps } = props;\n const interactiveContext = useToastInteractiveContext(CLOSE_NAME, __scopeToast);\n\n return (\n \n \n \n );\n }\n);\n\nToastClose.displayName = CLOSE_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype ToastAnnounceExcludeElement = React.ComponentRef;\ninterface ToastAnnounceExcludeProps extends PrimitiveDivProps {\n altText?: string;\n}\n\nconst ToastAnnounceExclude = React.forwardRef<\n ToastAnnounceExcludeElement,\n ToastAnnounceExcludeProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeToast, altText, ...announceExcludeProps } = props;\n\n return (\n \n );\n});\n\nfunction getAnnounceTextContent(container: HTMLElement) {\n const textContent: string[] = [];\n const childNodes = Array.from(container.childNodes);\n\n childNodes.forEach((node) => {\n if (node.nodeType === node.TEXT_NODE && node.textContent) textContent.push(node.textContent);\n if (isHTMLElement(node)) {\n const isHidden = node.ariaHidden || node.hidden || node.style.display === 'none';\n const isExcluded = node.dataset.radixToastAnnounceExclude === '';\n\n if (!isHidden) {\n if (isExcluded) {\n const altText = node.dataset.radixToastAnnounceAlt;\n if (altText) textContent.push(altText);\n } else {\n textContent.push(...getAnnounceTextContent(node));\n }\n }\n }\n });\n\n // We return a collection of text rather than a single concatenated string.\n // This allows SR VO to naturally pause break between nodes while announcing.\n return textContent;\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction handleAndDispatchCustomEvent<\n E extends CustomEvent,\n ReactEvent extends React.SyntheticEvent,\n>(\n name: string,\n handler: ((event: E) => void) | undefined,\n detail: { originalEvent: ReactEvent } & (E extends CustomEvent ? D : never),\n { discrete }: { discrete: boolean }\n) {\n const currentTarget = detail.originalEvent.currentTarget as HTMLElement;\n const event = new CustomEvent(name, { bubbles: true, cancelable: true, detail });\n if (handler) currentTarget.addEventListener(name, handler as EventListener, { once: true });\n\n if (discrete) {\n dispatchDiscreteCustomEvent(currentTarget, event);\n } else {\n currentTarget.dispatchEvent(event);\n }\n}\n\nconst isDeltaInDirection = (\n delta: { x: number; y: number },\n direction: SwipeDirection,\n threshold = 0\n) => {\n const deltaX = Math.abs(delta.x);\n const deltaY = Math.abs(delta.y);\n const isDeltaX = deltaX > deltaY;\n if (direction === 'left' || direction === 'right') {\n return isDeltaX && deltaX > threshold;\n } else {\n return !isDeltaX && deltaY > threshold;\n }\n};\n\nfunction useNextFrame(callback = () => {}) {\n const fn = useCallbackRef(callback);\n useLayoutEffect(() => {\n let raf1 = 0;\n let raf2 = 0;\n raf1 = window.requestAnimationFrame(() => (raf2 = window.requestAnimationFrame(fn)));\n return () => {\n window.cancelAnimationFrame(raf1);\n window.cancelAnimationFrame(raf2);\n };\n }, [fn]);\n}\n\nfunction isHTMLElement(node: any): node is HTMLElement {\n return node.nodeType === node.ELEMENT_NODE;\n}\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nfunction getTabbableCandidates(container: HTMLElement) {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: any) => {\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n\nfunction focusFirst(candidates: HTMLElement[]) {\n const previouslyFocusedElement = document.activeElement;\n return candidates.some((candidate) => {\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === previouslyFocusedElement) return true;\n candidate.focus();\n return document.activeElement !== previouslyFocusedElement;\n });\n}\n\nconst Provider = ToastProvider;\nconst Viewport = ToastViewport;\nconst Root = Toast;\nconst Title = ToastTitle;\nconst Description = ToastDescription;\nconst Action = ToastAction;\nconst Close = ToastClose;\n\nexport {\n createToastScope,\n //\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastAction,\n ToastClose,\n //\n Provider,\n Viewport,\n Root,\n Title,\n Description,\n Action,\n Close,\n};\nexport type {\n ToastProviderProps,\n ToastViewportProps,\n ToastProps,\n ToastTitleProps,\n ToastDescriptionProps,\n ToastActionProps,\n ToastCloseProps,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,YAAY,cAAc;AAC1B,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC,YAAY,sBAAsB;AAClC,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,WAAW,mCAAmC;AACvD,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AA+EzB,SAycA,UAzcA,KA2LA,YA3LA;AAvEN,IAAM,gBAAgB;AAEtB,IAAM,CAAC,YAAY,eAAe,qBAAqB,IAAI,iBAA+B,OAAO;AAkBjG,IAAM,CAAC,oBAAoB,gBAAgB,IAAI,mBAAmB,SAAS,CAAC,qBAAqB,CAAC;AAClG,IAAM,CAAC,uBAAuB,uBAAuB,IACnD,mBAA8C,aAAa;AA2B7D,IAAM,gBAA8C,CAAC,UAA2C;AAC9F,QAAM;AAAA,IACJ;AAAA,IACA,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB;AAAA,EACF,IAAI;AACJ,QAAM,CAAC,UAAU,WAAW,IAAU,eAA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,2BAA2B,SAAS;AAC1C,SAAO,WAAW,KAAK,CAAC,cAAc;AAEpC,QAAI,cAAc,yBAA0B,QAAO;AACnD,cAAU,MAAM;AAChB,WAAO,SAAS,kBAAkB;AAAA,EACpC,CAAC;AACH;AAEA,IAAM,WAAW;AACjB,IAAM,WAAW;AACjB,IAAMC,QAAO;AACb,IAAM,QAAQ;AACd,IAAM,cAAc;AACpB,IAAM,SAAS;AACf,IAAM,QAAQ;", + "names": ["node", "duration", "event", "Root"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/package.json b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/package.json new file mode 100644 index 0000000000000000000000000000000000000000..83871be68d40e3474f6d987bdab70f86458300d3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toast@1.2.15_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react@_14afd76ec3f11fe92c31d3a7df00acbf/node_modules/@radix-ui/react-toast/package.json @@ -0,0 +1,79 @@ +{ + "name": "@radix-ui/react-toast", + "version": "1.2.15", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-collection": "1.1.7", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-dismissable-layer": "1.1.11", + "@radix-ui/react-portal": "1.1.9", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-callback-ref": "1.1.1", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-visually-hidden": "1.2.3", + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/LICENSE b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/README.md b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c03ede62997a061f6cc87abeaed0bc8d94bcda51 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/README.md @@ -0,0 +1,3 @@ +# `react-toggle-group` + +View docs [here](https://radix-ui.com/primitives/docs/components/toggle-group). diff --git a/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..41318b021a7cf7eab76fd522e914639dc7a689d7 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.d.mts @@ -0,0 +1,75 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as RovingFocusGroup from '@radix-ui/react-roving-focus'; +import { Toggle } from '@radix-ui/react-toggle'; + +declare const createToggleGroupScope: _radix_ui_react_context.CreateScope; +interface ToggleGroupSingleProps extends ToggleGroupImplSingleProps { + type: 'single'; +} +interface ToggleGroupMultipleProps extends ToggleGroupImplMultipleProps { + type: 'multiple'; +} +declare const ToggleGroup: React.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React.RefAttributes>; +interface ToggleGroupImplSingleProps extends ToggleGroupImplProps { + /** + * The controlled stateful value of the item that is pressed. + */ + value?: string; + /** + * The value of the item that is pressed when initially rendered. Use + * `defaultValue` if you do not need to control the state of a toggle group. + */ + defaultValue?: string; + /** + * The callback that fires when the value of the toggle group changes. + */ + onValueChange?(value: string): void; +} +interface ToggleGroupImplMultipleProps extends ToggleGroupImplProps { + /** + * The controlled stateful value of the items that are pressed. + */ + value?: string[]; + /** + * The value of the items that are pressed when initially rendered. Use + * `defaultValue` if you do not need to control the state of a toggle group. + */ + defaultValue?: string[]; + /** + * The callback that fires when the state of the toggle group changes. + */ + onValueChange?(value: string[]): void; +} +type RovingFocusGroupProps = React.ComponentPropsWithoutRef; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface ToggleGroupImplProps extends PrimitiveDivProps { + /** + * Whether the group is disabled from user interaction. + * @defaultValue false + */ + disabled?: boolean; + /** + * Whether the group should maintain roving focus of its buttons. + * @defaultValue true + */ + rovingFocus?: boolean; + loop?: RovingFocusGroupProps['loop']; + orientation?: RovingFocusGroupProps['orientation']; + dir?: RovingFocusGroupProps['dir']; +} +interface ToggleGroupItemProps extends Omit { +} +declare const ToggleGroupItem: React.ForwardRefExoticComponent>; +type ToggleProps = React.ComponentPropsWithoutRef; +interface ToggleGroupItemImplProps extends Omit { + /** + * A string value for the toggle group item. All items within a toggle group should use a unique value. + */ + value: string; +} +declare const Root: React.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React.RefAttributes>; +declare const Item: React.ForwardRefExoticComponent>; + +export { Item, Root, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupMultipleProps, type ToggleGroupSingleProps, createToggleGroupScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..41318b021a7cf7eab76fd522e914639dc7a689d7 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.d.ts @@ -0,0 +1,75 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; +import * as RovingFocusGroup from '@radix-ui/react-roving-focus'; +import { Toggle } from '@radix-ui/react-toggle'; + +declare const createToggleGroupScope: _radix_ui_react_context.CreateScope; +interface ToggleGroupSingleProps extends ToggleGroupImplSingleProps { + type: 'single'; +} +interface ToggleGroupMultipleProps extends ToggleGroupImplMultipleProps { + type: 'multiple'; +} +declare const ToggleGroup: React.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React.RefAttributes>; +interface ToggleGroupImplSingleProps extends ToggleGroupImplProps { + /** + * The controlled stateful value of the item that is pressed. + */ + value?: string; + /** + * The value of the item that is pressed when initially rendered. Use + * `defaultValue` if you do not need to control the state of a toggle group. + */ + defaultValue?: string; + /** + * The callback that fires when the value of the toggle group changes. + */ + onValueChange?(value: string): void; +} +interface ToggleGroupImplMultipleProps extends ToggleGroupImplProps { + /** + * The controlled stateful value of the items that are pressed. + */ + value?: string[]; + /** + * The value of the items that are pressed when initially rendered. Use + * `defaultValue` if you do not need to control the state of a toggle group. + */ + defaultValue?: string[]; + /** + * The callback that fires when the state of the toggle group changes. + */ + onValueChange?(value: string[]): void; +} +type RovingFocusGroupProps = React.ComponentPropsWithoutRef; +type PrimitiveDivProps = React.ComponentPropsWithoutRef; +interface ToggleGroupImplProps extends PrimitiveDivProps { + /** + * Whether the group is disabled from user interaction. + * @defaultValue false + */ + disabled?: boolean; + /** + * Whether the group should maintain roving focus of its buttons. + * @defaultValue true + */ + rovingFocus?: boolean; + loop?: RovingFocusGroupProps['loop']; + orientation?: RovingFocusGroupProps['orientation']; + dir?: RovingFocusGroupProps['dir']; +} +interface ToggleGroupItemProps extends Omit { +} +declare const ToggleGroupItem: React.ForwardRefExoticComponent>; +type ToggleProps = React.ComponentPropsWithoutRef; +interface ToggleGroupItemImplProps extends Omit { + /** + * A string value for the toggle group item. All items within a toggle group should use a unique value. + */ + value: string; +} +declare const Root: React.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React.RefAttributes>; +declare const Item: React.ForwardRefExoticComponent>; + +export { Item, Root, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupMultipleProps, type ToggleGroupSingleProps, createToggleGroupScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.js b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..9a65fbb3752f04be8cb2b27dc543412e993de0dd --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.js @@ -0,0 +1,209 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Item: () => Item2, + Root: () => Root2, + ToggleGroup: () => ToggleGroup, + ToggleGroupItem: () => ToggleGroupItem, + createToggleGroupScope: () => createToggleGroupScope +}); +module.exports = __toCommonJS(index_exports); + +// src/toggle-group.tsx +var import_react = __toESM(require("react")); +var import_react_context = require("@radix-ui/react-context"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var RovingFocusGroup = __toESM(require("@radix-ui/react-roving-focus")); +var import_react_roving_focus = require("@radix-ui/react-roving-focus"); +var import_react_toggle = require("@radix-ui/react-toggle"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_direction = require("@radix-ui/react-direction"); +var import_jsx_runtime = require("react/jsx-runtime"); +var TOGGLE_GROUP_NAME = "ToggleGroup"; +var [createToggleGroupContext, createToggleGroupScope] = (0, import_react_context.createContextScope)(TOGGLE_GROUP_NAME, [ + import_react_roving_focus.createRovingFocusGroupScope +]); +var useRovingFocusGroupScope = (0, import_react_roving_focus.createRovingFocusGroupScope)(); +var ToggleGroup = import_react.default.forwardRef((props, forwardedRef) => { + const { type, ...toggleGroupProps } = props; + if (type === "single") { + const singleProps = toggleGroupProps; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupImplSingle, { ...singleProps, ref: forwardedRef }); + } + if (type === "multiple") { + const multipleProps = toggleGroupProps; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupImplMultiple, { ...multipleProps, ref: forwardedRef }); + } + throw new Error(`Missing prop \`type\` expected on \`${TOGGLE_GROUP_NAME}\``); +}); +ToggleGroup.displayName = TOGGLE_GROUP_NAME; +var [ToggleGroupValueProvider, useToggleGroupValueContext] = createToggleGroupContext(TOGGLE_GROUP_NAME); +var ToggleGroupImplSingle = import_react.default.forwardRef((props, forwardedRef) => { + const { + value: valueProp, + defaultValue, + onValueChange = () => { + }, + ...toggleGroupSingleProps + } = props; + const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({ + prop: valueProp, + defaultProp: defaultValue ?? "", + onChange: onValueChange, + caller: TOGGLE_GROUP_NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ToggleGroupValueProvider, + { + scope: props.__scopeToggleGroup, + type: "single", + value: import_react.default.useMemo(() => value ? [value] : [], [value]), + onItemActivate: setValue, + onItemDeactivate: import_react.default.useCallback(() => setValue(""), [setValue]), + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupImpl, { ...toggleGroupSingleProps, ref: forwardedRef }) + } + ); +}); +var ToggleGroupImplMultiple = import_react.default.forwardRef((props, forwardedRef) => { + const { + value: valueProp, + defaultValue, + onValueChange = () => { + }, + ...toggleGroupMultipleProps + } = props; + const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({ + prop: valueProp, + defaultProp: defaultValue ?? [], + onChange: onValueChange, + caller: TOGGLE_GROUP_NAME + }); + const handleButtonActivate = import_react.default.useCallback( + (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]), + [setValue] + ); + const handleButtonDeactivate = import_react.default.useCallback( + (itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)), + [setValue] + ); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + ToggleGroupValueProvider, + { + scope: props.__scopeToggleGroup, + type: "multiple", + value, + onItemActivate: handleButtonActivate, + onItemDeactivate: handleButtonDeactivate, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupImpl, { ...toggleGroupMultipleProps, ref: forwardedRef }) + } + ); +}); +ToggleGroup.displayName = TOGGLE_GROUP_NAME; +var [ToggleGroupContext, useToggleGroupContext] = createToggleGroupContext(TOGGLE_GROUP_NAME); +var ToggleGroupImpl = import_react.default.forwardRef( + (props, forwardedRef) => { + const { + __scopeToggleGroup, + disabled = false, + rovingFocus = true, + orientation, + dir, + loop = true, + ...toggleGroupProps + } = props; + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToggleGroup); + const direction = (0, import_react_direction.useDirection)(dir); + const commonProps = { role: "group", dir: direction, ...toggleGroupProps }; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupContext, { scope: __scopeToggleGroup, rovingFocus, disabled, children: rovingFocus ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + RovingFocusGroup.Root, + { + asChild: true, + ...rovingFocusGroupScope, + orientation, + dir: direction, + loop, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { ...commonProps, ref: forwardedRef }) + } + ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.div, { ...commonProps, ref: forwardedRef }) }); + } +); +var ITEM_NAME = "ToggleGroupItem"; +var ToggleGroupItem = import_react.default.forwardRef( + (props, forwardedRef) => { + const valueContext = useToggleGroupValueContext(ITEM_NAME, props.__scopeToggleGroup); + const context = useToggleGroupContext(ITEM_NAME, props.__scopeToggleGroup); + const rovingFocusGroupScope = useRovingFocusGroupScope(props.__scopeToggleGroup); + const pressed = valueContext.value.includes(props.value); + const disabled = context.disabled || props.disabled; + const commonProps = { ...props, pressed, disabled }; + const ref = import_react.default.useRef(null); + return context.rovingFocus ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + RovingFocusGroup.Item, + { + asChild: true, + ...rovingFocusGroupScope, + focusable: !disabled, + active: pressed, + ref, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupItemImpl, { ...commonProps, ref: forwardedRef }) + } + ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupItemImpl, { ...commonProps, ref: forwardedRef }); + } +); +ToggleGroupItem.displayName = ITEM_NAME; +var ToggleGroupItemImpl = import_react.default.forwardRef( + (props, forwardedRef) => { + const { __scopeToggleGroup, value, ...itemProps } = props; + const valueContext = useToggleGroupValueContext(ITEM_NAME, __scopeToggleGroup); + const singleProps = { role: "radio", "aria-checked": props.pressed, "aria-pressed": void 0 }; + const typeProps = valueContext.type === "single" ? singleProps : void 0; + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_toggle.Toggle, + { + ...typeProps, + ...itemProps, + ref: forwardedRef, + onPressedChange: (pressed) => { + if (pressed) { + valueContext.onItemActivate(value); + } else { + valueContext.onItemDeactivate(value); + } + } + } + ); + } +); +var Root2 = ToggleGroup; +var Item2 = ToggleGroupItem; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a37b7724756ac90238336947bff646fc513f8e9f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/toggle-group.tsx"], + "sourcesContent": ["'use client';\nexport {\n createToggleGroupScope,\n //\n ToggleGroup,\n ToggleGroupItem,\n //\n Root,\n Item,\n} from './toggle-group';\nexport type {\n ToggleGroupSingleProps,\n ToggleGroupMultipleProps,\n ToggleGroupItemProps,\n} from './toggle-group';\n", "import React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Toggle } from '@radix-ui/react-toggle';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * ToggleGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOGGLE_GROUP_NAME = 'ToggleGroup';\n\ntype ScopedProps

= P & { __scopeToggleGroup?: Scope };\nconst [createToggleGroupContext, createToggleGroupScope] = createContextScope(TOGGLE_GROUP_NAME, [\n createRovingFocusGroupScope,\n]);\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\n\ntype ToggleGroupElement = ToggleGroupImplSingleElement | ToggleGroupImplMultipleElement;\ninterface ToggleGroupSingleProps extends ToggleGroupImplSingleProps {\n type: 'single';\n}\ninterface ToggleGroupMultipleProps extends ToggleGroupImplMultipleProps {\n type: 'multiple';\n}\n\nconst ToggleGroup = React.forwardRef<\n ToggleGroupElement,\n ToggleGroupSingleProps | ToggleGroupMultipleProps\n>((props, forwardedRef) => {\n const { type, ...toggleGroupProps } = props;\n\n if (type === 'single') {\n const singleProps = toggleGroupProps as ToggleGroupImplSingleProps;\n return ;\n }\n\n if (type === 'multiple') {\n const multipleProps = toggleGroupProps as ToggleGroupImplMultipleProps;\n return ;\n }\n\n throw new Error(`Missing prop \\`type\\` expected on \\`${TOGGLE_GROUP_NAME}\\``);\n});\n\nToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ToggleGroupValueContextValue = {\n type: 'single' | 'multiple';\n value: string[];\n onItemActivate(value: string): void;\n onItemDeactivate(value: string): void;\n};\n\nconst [ToggleGroupValueProvider, useToggleGroupValueContext] =\n createToggleGroupContext(TOGGLE_GROUP_NAME);\n\ntype ToggleGroupImplSingleElement = ToggleGroupImplElement;\ninterface ToggleGroupImplSingleProps extends ToggleGroupImplProps {\n /**\n * The controlled stateful value of the item that is pressed.\n */\n value?: string;\n /**\n * The value of the item that is pressed when initially rendered. Use\n * `defaultValue` if you do not need to control the state of a toggle group.\n */\n defaultValue?: string;\n /**\n * The callback that fires when the value of the toggle group changes.\n */\n onValueChange?(value: string): void;\n}\n\nconst ToggleGroupImplSingle = React.forwardRef<\n ToggleGroupImplSingleElement,\n ToggleGroupImplSingleProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {},\n ...toggleGroupSingleProps\n } = props;\n\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? '',\n onChange: onValueChange,\n caller: TOGGLE_GROUP_NAME,\n });\n\n return (\n (value ? [value] : []), [value])}\n onItemActivate={setValue}\n onItemDeactivate={React.useCallback(() => setValue(''), [setValue])}\n >\n \n \n );\n});\n\ntype ToggleGroupImplMultipleElement = ToggleGroupImplElement;\ninterface ToggleGroupImplMultipleProps extends ToggleGroupImplProps {\n /**\n * The controlled stateful value of the items that are pressed.\n */\n value?: string[];\n /**\n * The value of the items that are pressed when initially rendered. Use\n * `defaultValue` if you do not need to control the state of a toggle group.\n */\n defaultValue?: string[];\n /**\n * The callback that fires when the state of the toggle group changes.\n */\n onValueChange?(value: string[]): void;\n}\n\nconst ToggleGroupImplMultiple = React.forwardRef<\n ToggleGroupImplMultipleElement,\n ToggleGroupImplMultipleProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {},\n ...toggleGroupMultipleProps\n } = props;\n\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n caller: TOGGLE_GROUP_NAME,\n });\n\n const handleButtonActivate = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue]\n );\n\n const handleButtonDeactivate = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter((value) => value !== itemValue)),\n [setValue]\n );\n\n return (\n \n \n \n );\n});\n\nToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ToggleGroupContextValue = { rovingFocus: boolean; disabled: boolean };\n\nconst [ToggleGroupContext, useToggleGroupContext] =\n createToggleGroupContext(TOGGLE_GROUP_NAME);\n\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef;\ntype ToggleGroupImplElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface ToggleGroupImplProps extends PrimitiveDivProps {\n /**\n * Whether the group is disabled from user interaction.\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Whether the group should maintain roving focus of its buttons.\n * @defaultValue true\n */\n rovingFocus?: boolean;\n loop?: RovingFocusGroupProps['loop'];\n orientation?: RovingFocusGroupProps['orientation'];\n dir?: RovingFocusGroupProps['dir'];\n}\n\nconst ToggleGroupImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeToggleGroup,\n disabled = false,\n rovingFocus = true,\n orientation,\n dir,\n loop = true,\n ...toggleGroupProps\n } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToggleGroup);\n const direction = useDirection(dir);\n const commonProps = { role: 'group', dir: direction, ...toggleGroupProps };\n return (\n \n {rovingFocus ? (\n \n \n \n ) : (\n \n )}\n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ToggleGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'ToggleGroupItem';\n\ntype ToggleGroupItemElement = ToggleGroupItemImplElement;\ninterface ToggleGroupItemProps extends Omit {}\n\nconst ToggleGroupItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const valueContext = useToggleGroupValueContext(ITEM_NAME, props.__scopeToggleGroup);\n const context = useToggleGroupContext(ITEM_NAME, props.__scopeToggleGroup);\n const rovingFocusGroupScope = useRovingFocusGroupScope(props.__scopeToggleGroup);\n const pressed = valueContext.value.includes(props.value);\n const disabled = context.disabled || props.disabled;\n const commonProps = { ...props, pressed, disabled };\n const ref = React.useRef(null);\n return context.rovingFocus ? (\n \n \n \n ) : (\n \n );\n }\n);\n\nToggleGroupItem.displayName = ITEM_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ToggleGroupItemImplElement = React.ComponentRef;\ntype ToggleProps = React.ComponentPropsWithoutRef;\ninterface ToggleGroupItemImplProps extends Omit {\n /**\n * A string value for the toggle group item. All items within a toggle group should use a unique value.\n */\n value: string;\n}\n\nconst ToggleGroupItemImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeToggleGroup, value, ...itemProps } = props;\n const valueContext = useToggleGroupValueContext(ITEM_NAME, __scopeToggleGroup);\n const singleProps = { role: 'radio', 'aria-checked': props.pressed, 'aria-pressed': undefined };\n const typeProps = valueContext.type === 'single' ? singleProps : undefined;\n return (\n {\n if (pressed) {\n valueContext.onItemActivate(value);\n } else {\n valueContext.onItemDeactivate(value);\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = ToggleGroup;\nconst Item = ToggleGroupItem;\n\nexport {\n createToggleGroupScope,\n //\n ToggleGroup,\n ToggleGroupItem,\n //\n Root,\n Item,\n};\nexport type { ToggleGroupSingleProps, ToggleGroupMultipleProps, ToggleGroupItemProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,cAAAA;AAAA,EAAA,YAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;AAClB,2BAAmC;AACnC,6BAA0B;AAC1B,uBAAkC;AAClC,gCAA4C;AAC5C,0BAAuB;AACvB,0CAAqC;AACrC,6BAA6B;AAgClB;AAxBX,IAAM,oBAAoB;AAG1B,IAAM,CAAC,0BAA0B,sBAAsB,QAAI,yCAAmB,mBAAmB;AAAA,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gB,OAAU;AAC9F,UAAM,YAAY,aAAa,SAAS,WAAW,cAAc;AACjE,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACH,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,iBAAiB,CAAC,YAAY;AAC5B,cAAI,SAAS;AACX,yBAAa,eAAe,KAAK;AAAA,UACnC,OAAO;AACL,yBAAa,iBAAiB,KAAK;AAAA,UACrC;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAIA,IAAME,QAAO;AACb,IAAMC,QAAO;", + "names": ["Item", "Root", "React", "value", "Root", "Item"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..56fd62b404fc0ef174d24576e7eac3cbf2f1e2a4 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.mjs @@ -0,0 +1,177 @@ +"use client"; + +// src/toggle-group.tsx +import React from "react"; +import { createContextScope } from "@radix-ui/react-context"; +import { Primitive } from "@radix-ui/react-primitive"; +import * as RovingFocusGroup from "@radix-ui/react-roving-focus"; +import { createRovingFocusGroupScope } from "@radix-ui/react-roving-focus"; +import { Toggle } from "@radix-ui/react-toggle"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { useDirection } from "@radix-ui/react-direction"; +import { jsx } from "react/jsx-runtime"; +var TOGGLE_GROUP_NAME = "ToggleGroup"; +var [createToggleGroupContext, createToggleGroupScope] = createContextScope(TOGGLE_GROUP_NAME, [ + createRovingFocusGroupScope +]); +var useRovingFocusGroupScope = createRovingFocusGroupScope(); +var ToggleGroup = React.forwardRef((props, forwardedRef) => { + const { type, ...toggleGroupProps } = props; + if (type === "single") { + const singleProps = toggleGroupProps; + return /* @__PURE__ */ jsx(ToggleGroupImplSingle, { ...singleProps, ref: forwardedRef }); + } + if (type === "multiple") { + const multipleProps = toggleGroupProps; + return /* @__PURE__ */ jsx(ToggleGroupImplMultiple, { ...multipleProps, ref: forwardedRef }); + } + throw new Error(`Missing prop \`type\` expected on \`${TOGGLE_GROUP_NAME}\``); +}); +ToggleGroup.displayName = TOGGLE_GROUP_NAME; +var [ToggleGroupValueProvider, useToggleGroupValueContext] = createToggleGroupContext(TOGGLE_GROUP_NAME); +var ToggleGroupImplSingle = React.forwardRef((props, forwardedRef) => { + const { + value: valueProp, + defaultValue, + onValueChange = () => { + }, + ...toggleGroupSingleProps + } = props; + const [value, setValue] = useControllableState({ + prop: valueProp, + defaultProp: defaultValue ?? "", + onChange: onValueChange, + caller: TOGGLE_GROUP_NAME + }); + return /* @__PURE__ */ jsx( + ToggleGroupValueProvider, + { + scope: props.__scopeToggleGroup, + type: "single", + value: React.useMemo(() => value ? [value] : [], [value]), + onItemActivate: setValue, + onItemDeactivate: React.useCallback(() => setValue(""), [setValue]), + children: /* @__PURE__ */ jsx(ToggleGroupImpl, { ...toggleGroupSingleProps, ref: forwardedRef }) + } + ); +}); +var ToggleGroupImplMultiple = React.forwardRef((props, forwardedRef) => { + const { + value: valueProp, + defaultValue, + onValueChange = () => { + }, + ...toggleGroupMultipleProps + } = props; + const [value, setValue] = useControllableState({ + prop: valueProp, + defaultProp: defaultValue ?? [], + onChange: onValueChange, + caller: TOGGLE_GROUP_NAME + }); + const handleButtonActivate = React.useCallback( + (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]), + [setValue] + ); + const handleButtonDeactivate = React.useCallback( + (itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)), + [setValue] + ); + return /* @__PURE__ */ jsx( + ToggleGroupValueProvider, + { + scope: props.__scopeToggleGroup, + type: "multiple", + value, + onItemActivate: handleButtonActivate, + onItemDeactivate: handleButtonDeactivate, + children: /* @__PURE__ */ jsx(ToggleGroupImpl, { ...toggleGroupMultipleProps, ref: forwardedRef }) + } + ); +}); +ToggleGroup.displayName = TOGGLE_GROUP_NAME; +var [ToggleGroupContext, useToggleGroupContext] = createToggleGroupContext(TOGGLE_GROUP_NAME); +var ToggleGroupImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeToggleGroup, + disabled = false, + rovingFocus = true, + orientation, + dir, + loop = true, + ...toggleGroupProps + } = props; + const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToggleGroup); + const direction = useDirection(dir); + const commonProps = { role: "group", dir: direction, ...toggleGroupProps }; + return /* @__PURE__ */ jsx(ToggleGroupContext, { scope: __scopeToggleGroup, rovingFocus, disabled, children: rovingFocus ? /* @__PURE__ */ jsx( + RovingFocusGroup.Root, + { + asChild: true, + ...rovingFocusGroupScope, + orientation, + dir: direction, + loop, + children: /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef }) + } + ) : /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef }) }); + } +); +var ITEM_NAME = "ToggleGroupItem"; +var ToggleGroupItem = React.forwardRef( + (props, forwardedRef) => { + const valueContext = useToggleGroupValueContext(ITEM_NAME, props.__scopeToggleGroup); + const context = useToggleGroupContext(ITEM_NAME, props.__scopeToggleGroup); + const rovingFocusGroupScope = useRovingFocusGroupScope(props.__scopeToggleGroup); + const pressed = valueContext.value.includes(props.value); + const disabled = context.disabled || props.disabled; + const commonProps = { ...props, pressed, disabled }; + const ref = React.useRef(null); + return context.rovingFocus ? /* @__PURE__ */ jsx( + RovingFocusGroup.Item, + { + asChild: true, + ...rovingFocusGroupScope, + focusable: !disabled, + active: pressed, + ref, + children: /* @__PURE__ */ jsx(ToggleGroupItemImpl, { ...commonProps, ref: forwardedRef }) + } + ) : /* @__PURE__ */ jsx(ToggleGroupItemImpl, { ...commonProps, ref: forwardedRef }); + } +); +ToggleGroupItem.displayName = ITEM_NAME; +var ToggleGroupItemImpl = React.forwardRef( + (props, forwardedRef) => { + const { __scopeToggleGroup, value, ...itemProps } = props; + const valueContext = useToggleGroupValueContext(ITEM_NAME, __scopeToggleGroup); + const singleProps = { role: "radio", "aria-checked": props.pressed, "aria-pressed": void 0 }; + const typeProps = valueContext.type === "single" ? singleProps : void 0; + return /* @__PURE__ */ jsx( + Toggle, + { + ...typeProps, + ...itemProps, + ref: forwardedRef, + onPressedChange: (pressed) => { + if (pressed) { + valueContext.onItemActivate(value); + } else { + valueContext.onItemDeactivate(value); + } + } + } + ); + } +); +var Root2 = ToggleGroup; +var Item2 = ToggleGroupItem; +export { + Item2 as Item, + Root2 as Root, + ToggleGroup, + ToggleGroupItem, + createToggleGroupScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..24b5d4d58db896d0c835e4e7bfca164e0167a587 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/toggle-group.tsx"], + "sourcesContent": ["import React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Toggle } from '@radix-ui/react-toggle';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * ToggleGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOGGLE_GROUP_NAME = 'ToggleGroup';\n\ntype ScopedProps

= P & { __scopeToggleGroup?: Scope };\nconst [createToggleGroupContext, createToggleGroupScope] = createContextScope(TOGGLE_GROUP_NAME, [\n createRovingFocusGroupScope,\n]);\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\n\ntype ToggleGroupElement = ToggleGroupImplSingleElement | ToggleGroupImplMultipleElement;\ninterface ToggleGroupSingleProps extends ToggleGroupImplSingleProps {\n type: 'single';\n}\ninterface ToggleGroupMultipleProps extends ToggleGroupImplMultipleProps {\n type: 'multiple';\n}\n\nconst ToggleGroup = React.forwardRef<\n ToggleGroupElement,\n ToggleGroupSingleProps | ToggleGroupMultipleProps\n>((props, forwardedRef) => {\n const { type, ...toggleGroupProps } = props;\n\n if (type === 'single') {\n const singleProps = toggleGroupProps as ToggleGroupImplSingleProps;\n return ;\n }\n\n if (type === 'multiple') {\n const multipleProps = toggleGroupProps as ToggleGroupImplMultipleProps;\n return ;\n }\n\n throw new Error(`Missing prop \\`type\\` expected on \\`${TOGGLE_GROUP_NAME}\\``);\n});\n\nToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ToggleGroupValueContextValue = {\n type: 'single' | 'multiple';\n value: string[];\n onItemActivate(value: string): void;\n onItemDeactivate(value: string): void;\n};\n\nconst [ToggleGroupValueProvider, useToggleGroupValueContext] =\n createToggleGroupContext(TOGGLE_GROUP_NAME);\n\ntype ToggleGroupImplSingleElement = ToggleGroupImplElement;\ninterface ToggleGroupImplSingleProps extends ToggleGroupImplProps {\n /**\n * The controlled stateful value of the item that is pressed.\n */\n value?: string;\n /**\n * The value of the item that is pressed when initially rendered. Use\n * `defaultValue` if you do not need to control the state of a toggle group.\n */\n defaultValue?: string;\n /**\n * The callback that fires when the value of the toggle group changes.\n */\n onValueChange?(value: string): void;\n}\n\nconst ToggleGroupImplSingle = React.forwardRef<\n ToggleGroupImplSingleElement,\n ToggleGroupImplSingleProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {},\n ...toggleGroupSingleProps\n } = props;\n\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? '',\n onChange: onValueChange,\n caller: TOGGLE_GROUP_NAME,\n });\n\n return (\n (value ? [value] : []), [value])}\n onItemActivate={setValue}\n onItemDeactivate={React.useCallback(() => setValue(''), [setValue])}\n >\n \n \n );\n});\n\ntype ToggleGroupImplMultipleElement = ToggleGroupImplElement;\ninterface ToggleGroupImplMultipleProps extends ToggleGroupImplProps {\n /**\n * The controlled stateful value of the items that are pressed.\n */\n value?: string[];\n /**\n * The value of the items that are pressed when initially rendered. Use\n * `defaultValue` if you do not need to control the state of a toggle group.\n */\n defaultValue?: string[];\n /**\n * The callback that fires when the state of the toggle group changes.\n */\n onValueChange?(value: string[]): void;\n}\n\nconst ToggleGroupImplMultiple = React.forwardRef<\n ToggleGroupImplMultipleElement,\n ToggleGroupImplMultipleProps\n>((props: ScopedProps, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {},\n ...toggleGroupMultipleProps\n } = props;\n\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n caller: TOGGLE_GROUP_NAME,\n });\n\n const handleButtonActivate = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue]\n );\n\n const handleButtonDeactivate = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter((value) => value !== itemValue)),\n [setValue]\n );\n\n return (\n \n \n \n );\n});\n\nToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ToggleGroupContextValue = { rovingFocus: boolean; disabled: boolean };\n\nconst [ToggleGroupContext, useToggleGroupContext] =\n createToggleGroupContext(TOGGLE_GROUP_NAME);\n\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef;\ntype ToggleGroupImplElement = React.ComponentRef;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef;\ninterface ToggleGroupImplProps extends PrimitiveDivProps {\n /**\n * Whether the group is disabled from user interaction.\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Whether the group should maintain roving focus of its buttons.\n * @defaultValue true\n */\n rovingFocus?: boolean;\n loop?: RovingFocusGroupProps['loop'];\n orientation?: RovingFocusGroupProps['orientation'];\n dir?: RovingFocusGroupProps['dir'];\n}\n\nconst ToggleGroupImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeToggleGroup,\n disabled = false,\n rovingFocus = true,\n orientation,\n dir,\n loop = true,\n ...toggleGroupProps\n } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToggleGroup);\n const direction = useDirection(dir);\n const commonProps = { role: 'group', dir: direction, ...toggleGroupProps };\n return (\n \n {rovingFocus ? (\n \n \n \n ) : (\n \n )}\n \n );\n }\n);\n\n/* -------------------------------------------------------------------------------------------------\n * ToggleGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'ToggleGroupItem';\n\ntype ToggleGroupItemElement = ToggleGroupItemImplElement;\ninterface ToggleGroupItemProps extends Omit {}\n\nconst ToggleGroupItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const valueContext = useToggleGroupValueContext(ITEM_NAME, props.__scopeToggleGroup);\n const context = useToggleGroupContext(ITEM_NAME, props.__scopeToggleGroup);\n const rovingFocusGroupScope = useRovingFocusGroupScope(props.__scopeToggleGroup);\n const pressed = valueContext.value.includes(props.value);\n const disabled = context.disabled || props.disabled;\n const commonProps = { ...props, pressed, disabled };\n const ref = React.useRef(null);\n return context.rovingFocus ? (\n \n \n \n ) : (\n \n );\n }\n);\n\nToggleGroupItem.displayName = ITEM_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ToggleGroupItemImplElement = React.ComponentRef;\ntype ToggleProps = React.ComponentPropsWithoutRef;\ninterface ToggleGroupItemImplProps extends Omit {\n /**\n * A string value for the toggle group item. All items within a toggle group should use a unique value.\n */\n value: string;\n}\n\nconst ToggleGroupItemImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeToggleGroup, value, ...itemProps } = props;\n const valueContext = useToggleGroupValueContext(ITEM_NAME, __scopeToggleGroup);\n const singleProps = { role: 'radio', 'aria-checked': props.pressed, 'aria-pressed': undefined };\n const typeProps = valueContext.type === 'single' ? singleProps : undefined;\n return (\n {\n if (pressed) {\n valueContext.onItemActivate(value);\n } else {\n valueContext.onItemDeactivate(value);\n }\n }}\n />\n );\n }\n);\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = ToggleGroup;\nconst Item = ToggleGroupItem;\n\nexport {\n createToggleGroupScope,\n //\n ToggleGroup,\n ToggleGroupItem,\n //\n Root,\n Item,\n};\nexport type { ToggleGroupSingleProps, ToggleGroupMultipleProps, ToggleGroupItemProps };\n"], + "mappings": ";;;AAAA,OAAO,WAAW;AAClB,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAC1B,YAAY,sBAAsB;AAClC,SAAS,mCAAmC;AAC5C,SAAS,cAAc;AACvB,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAgClB;AAxBX,IAAM,oBAAoB;AAG1B,IAAM,CAAC,0BAA0B,sBAAsB,IAAI,mBAAmB,mBAAmB;AAAA,EAC/F;AACF,CAAC;AACD,IAAM,2BA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AAA,QACJ,KAAK;AAAA,QACL,iBAAiB,CAAC,YAAY;AAC5B,cAAI,SAAS;AACX,yBAAa,eAAe,KAAK;AAAA,UACnC,OAAO;AACL,yBAAa,iBAAiB,KAAK;AAAA,UACrC;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAIA,IAAMC,QAAO;AACb,IAAMC,QAAO;", + "names": ["value", "Root", "Item"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/package.json b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d2b91ed6e3957257503f4ce086564d489590123b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.11_@types+react-dom@19.1.7_@types+react@19.1.9__@types_3e89c3c1b7d9e22c33aded1921c5d6bc/node_modules/@radix-ui/react-toggle-group/package.json @@ -0,0 +1,74 @@ +{ + "name": "@radix-ui/react-toggle-group", + "version": "1.1.11", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-context": "1.1.2", + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-direction": "1.1.1", + "@radix-ui/react-toggle": "1.1.10", + "@radix-ui/react-roving-focus": "1.1.11", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@repo/builder": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/LICENSE b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/README.md b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9bb49c33922d23c49fb22d61d25abe59af3e86b1 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/README.md @@ -0,0 +1,3 @@ +# `react-toggle` + +View docs [here](https://radix-ui.com/primitives/docs/components/toggle). diff --git a/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..eb13631b7a04bed160103cb0a69c2fb1837267ca --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.d.mts @@ -0,0 +1,24 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface ToggleProps extends PrimitiveButtonProps { + /** + * The controlled state of the toggle. + */ + pressed?: boolean; + /** + * The state of the toggle when initially rendered. Use `defaultPressed` + * if you do not need to control the state of the toggle. + * @defaultValue false + */ + defaultPressed?: boolean; + /** + * The callback that fires when the state of the toggle changes. + */ + onPressedChange?(pressed: boolean): void; +} +declare const Toggle: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { Root, Toggle, type ToggleProps }; diff --git a/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..eb13631b7a04bed160103cb0a69c2fb1837267ca --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.d.ts @@ -0,0 +1,24 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface ToggleProps extends PrimitiveButtonProps { + /** + * The controlled state of the toggle. + */ + pressed?: boolean; + /** + * The state of the toggle when initially rendered. Use `defaultPressed` + * if you do not need to control the state of the toggle. + * @defaultValue false + */ + defaultPressed?: boolean; + /** + * The callback that fires when the state of the toggle changes. + */ + onPressedChange?(pressed: boolean): void; +} +declare const Toggle: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { Root, Toggle, type ToggleProps }; diff --git a/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.js b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e818e6c20235e3c9b548d30e4260a3d60cb900de --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.js @@ -0,0 +1,73 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Root: () => Root, + Toggle: () => Toggle +}); +module.exports = __toCommonJS(index_exports); + +// src/toggle.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_jsx_runtime = require("react/jsx-runtime"); +var NAME = "Toggle"; +var Toggle = React.forwardRef((props, forwardedRef) => { + const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props; + const [pressed, setPressed] = (0, import_react_use_controllable_state.useControllableState)({ + prop: pressedProp, + onChange: onPressedChange, + defaultProp: defaultPressed ?? false, + caller: NAME + }); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + type: "button", + "aria-pressed": pressed, + "data-state": pressed ? "on" : "off", + "data-disabled": props.disabled ? "" : void 0, + ...buttonProps, + ref: forwardedRef, + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, () => { + if (!props.disabled) { + setPressed(!pressed); + } + }) + } + ); +}); +Toggle.displayName = NAME; +var Root = Toggle; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..33c6cfad0ee357b4df3850626b0c30b8ee5c367e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/toggle.tsx"], + "sourcesContent": ["'use client';\nexport {\n Toggle,\n //\n Root,\n} from './toggle';\nexport type { ToggleProps } from './toggle';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle';\n\ntype ToggleElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface ToggleProps extends PrimitiveButtonProps {\n /**\n * The controlled state of the toggle.\n */\n pressed?: boolean;\n /**\n * The state of the toggle when initially rendered. Use `defaultPressed`\n * if you do not need to control the state of the toggle.\n * @defaultValue false\n */\n defaultPressed?: boolean;\n /**\n * The callback that fires when the state of the toggle changes.\n */\n onPressedChange?(pressed: boolean): void;\n}\n\nconst Toggle = React.forwardRef((props, forwardedRef) => {\n const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props;\n\n const [pressed, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed ?? false,\n caller: NAME,\n });\n\n return (\n {\n if (!props.disabled) {\n setPressed(!pressed);\n }\n })}\n />\n );\n});\n\nToggle.displayName = NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = Toggle;\n\nexport {\n Toggle,\n //\n Root,\n};\nexport type { ToggleProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,0CAAqC;AACrC,6BAA0B;AAsCtB;AAhCJ,IAAM,OAAO;AAqBb,IAAM,SAAe,iBAAuC,CAAC,OAAO,iBAAiB;AACnF,QAAM,EAAE,SAAS,aAAa,gBAAgB,iBAAiB,GAAG,YAAY,IAAI;AAElF,QAAM,CAAC,SAAS,UAAU,QAAI,0DAAqB;AAAA,IACjD,MAAM;AAAA,IACN,UAAU;AAAA,IACV,aAAa,kBAAkB;AAAA,IAC/B,QAAQ;AAAA,EACV,CAAC;AAED,SACE;AAAA,IAAC,iCAAU;AAAA,IAAV;AAAA,MACC,MAAK;AAAA,MACL,gBAAc;AAAA,MACd,cAAY,UAAU,OAAO;AAAA,MAC7B,iBAAe,MAAM,WAAW,KAAK;AAAA,MACpC,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,aAAS,uCAAqB,MAAM,SAAS,MAAM;AACjD,YAAI,CAAC,MAAM,UAAU;AACnB,qBAAW,CAAC,OAAO;AAAA,QACrB;AAAA,MACF,CAAC;AAAA;AAAA,EACH;AAEJ,CAAC;AAED,OAAO,cAAc;AAIrB,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2ca9483e4bae713bb9f3d0e5f7d65bfa55c11e0a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.mjs @@ -0,0 +1,41 @@ +"use client"; + +// src/toggle.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import { Primitive } from "@radix-ui/react-primitive"; +import { jsx } from "react/jsx-runtime"; +var NAME = "Toggle"; +var Toggle = React.forwardRef((props, forwardedRef) => { + const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props; + const [pressed, setPressed] = useControllableState({ + prop: pressedProp, + onChange: onPressedChange, + defaultProp: defaultPressed ?? false, + caller: NAME + }); + return /* @__PURE__ */ jsx( + Primitive.button, + { + type: "button", + "aria-pressed": pressed, + "data-state": pressed ? "on" : "off", + "data-disabled": props.disabled ? "" : void 0, + ...buttonProps, + ref: forwardedRef, + onClick: composeEventHandlers(props.onClick, () => { + if (!props.disabled) { + setPressed(!pressed); + } + }) + } + ); +}); +Toggle.displayName = NAME; +var Root = Toggle; +export { + Root, + Toggle +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..d33ce4a0e2e689958f3c16ce90654f2668f4cf71 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/toggle.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle';\n\ntype ToggleElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface ToggleProps extends PrimitiveButtonProps {\n /**\n * The controlled state of the toggle.\n */\n pressed?: boolean;\n /**\n * The state of the toggle when initially rendered. Use `defaultPressed`\n * if you do not need to control the state of the toggle.\n * @defaultValue false\n */\n defaultPressed?: boolean;\n /**\n * The callback that fires when the state of the toggle changes.\n */\n onPressedChange?(pressed: boolean): void;\n}\n\nconst Toggle = React.forwardRef((props, forwardedRef) => {\n const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props;\n\n const [pressed, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed ?? false,\n caller: NAME,\n });\n\n return (\n {\n if (!props.disabled) {\n setPressed(!pressed);\n }\n })}\n />\n );\n});\n\nToggle.displayName = NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = Toggle;\n\nexport {\n Toggle,\n //\n Root,\n};\nexport type { ToggleProps };\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,4BAA4B;AACrC,SAAS,iBAAiB;AAsCtB;AAhCJ,IAAM,OAAO;AAqBb,IAAM,SAAe,iBAAuC,CAAC,OAAO,iBAAiB;AACnF,QAAM,EAAE,SAAS,aAAa,gBAAgB,iBAAiB,GAAG,YAAY,IAAI;AAElF,QAAM,CAAC,SAAS,UAAU,IAAI,qBAAqB;AAAA,IACjD,MAAM;AAAA,IACN,UAAU;AAAA,IACV,aAAa,kBAAkB;AAAA,IAC/B,QAAQ;AAAA,EACV,CAAC;AAED,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACC,MAAK;AAAA,MACL,gBAAc;AAAA,MACd,cAAY,UAAU,OAAO;AAAA,MAC7B,iBAAe,MAAM,WAAW,KAAK;AAAA,MACpC,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,SAAS,qBAAqB,MAAM,SAAS,MAAM;AACjD,YAAI,CAAC,MAAM,UAAU;AACnB,qBAAW,CAAC,OAAO;AAAA,QACrB;AAAA,MACF,CAAC;AAAA;AAAA,EACH;AAEJ,CAAC;AAED,OAAO,cAAc;AAIrB,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/package.json b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/package.json new file mode 100644 index 0000000000000000000000000000000000000000..03c1385c42e5329b969bfa8f32bc4d8f3c41fe8c --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-toggle@1.1.10_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_0d780b44f30303e35bfe97375c245437/node_modules/@radix-ui/react-toggle/package.json @@ -0,0 +1,70 @@ +{ + "name": "@radix-ui/react-toggle", + "version": "1.1.10", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/primitive": "1.1.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/LICENSE b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/README.md b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/README.md new file mode 100644 index 0000000000000000000000000000000000000000..06bbad3f72b04e74c36e0cc585298e4fa1b02f7c --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/README.md @@ -0,0 +1,3 @@ +# `react-tooltip` + +View docs [here](https://radix-ui.com/primitives/docs/components/tooltip). diff --git a/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c89a9e709715d9b48f0e883c5265c917c1da6e9f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.d.mts @@ -0,0 +1,101 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import * as PopperPrimitive from '@radix-ui/react-popper'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createTooltipScope: _radix_ui_react_context.CreateScope; +interface TooltipProviderProps { + children: React.ReactNode; + /** + * The duration from when the pointer enters the trigger until the tooltip gets opened. + * @defaultValue 700 + */ + delayDuration?: number; + /** + * How much time a user has to enter another trigger without incurring a delay again. + * @defaultValue 300 + */ + skipDelayDuration?: number; + /** + * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger. + * @defaultValue false + */ + disableHoverableContent?: boolean; +} +declare const TooltipProvider: React.FC; +interface TooltipProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?: (open: boolean) => void; + /** + * The duration from when the pointer enters the trigger until the tooltip gets opened. This will + * override the prop with the same name passed to Provider. + * @defaultValue 700 + */ + delayDuration?: number; + /** + * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger. + * @defaultValue false + */ + disableHoverableContent?: boolean; +} +declare const Tooltip: React.FC; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface TooltipTriggerProps extends PrimitiveButtonProps { +} +declare const TooltipTrigger: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface TooltipPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const TooltipPortal: React.FC; +interface TooltipContentProps extends TooltipContentImplProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const TooltipContent: React.ForwardRefExoticComponent>; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type PopperContentProps = React.ComponentPropsWithoutRef; +interface TooltipContentImplProps extends Omit { + /** + * A more descriptive label for accessibility purpose + */ + 'aria-label'?: string; + /** + * Event handler called when the escape key is down. + * Can be prevented. + */ + onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; + /** + * Event handler called when the a `pointerdown` event happens outside of the `Tooltip`. + * Can be prevented. + */ + onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside']; +} +type PopperArrowProps = React.ComponentPropsWithoutRef; +interface TooltipArrowProps extends PopperArrowProps { +} +declare const TooltipArrow: React.ForwardRefExoticComponent>; +declare const Provider: React.FC; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; + +export { Arrow, Content, Portal, Provider, Root, Tooltip, TooltipArrow, type TooltipArrowProps, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipPortalProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, Trigger, createTooltipScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c89a9e709715d9b48f0e883c5265c917c1da6e9f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.d.ts @@ -0,0 +1,101 @@ +import * as _radix_ui_react_context from '@radix-ui/react-context'; +import * as React from 'react'; +import { DismissableLayer } from '@radix-ui/react-dismissable-layer'; +import * as PopperPrimitive from '@radix-ui/react-popper'; +import { Portal as Portal$1 } from '@radix-ui/react-portal'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const createTooltipScope: _radix_ui_react_context.CreateScope; +interface TooltipProviderProps { + children: React.ReactNode; + /** + * The duration from when the pointer enters the trigger until the tooltip gets opened. + * @defaultValue 700 + */ + delayDuration?: number; + /** + * How much time a user has to enter another trigger without incurring a delay again. + * @defaultValue 300 + */ + skipDelayDuration?: number; + /** + * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger. + * @defaultValue false + */ + disableHoverableContent?: boolean; +} +declare const TooltipProvider: React.FC; +interface TooltipProps { + children?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?: (open: boolean) => void; + /** + * The duration from when the pointer enters the trigger until the tooltip gets opened. This will + * override the prop with the same name passed to Provider. + * @defaultValue 700 + */ + delayDuration?: number; + /** + * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger. + * @defaultValue false + */ + disableHoverableContent?: boolean; +} +declare const Tooltip: React.FC; +type PrimitiveButtonProps = React.ComponentPropsWithoutRef; +interface TooltipTriggerProps extends PrimitiveButtonProps { +} +declare const TooltipTrigger: React.ForwardRefExoticComponent>; +type PortalProps = React.ComponentPropsWithoutRef; +interface TooltipPortalProps { + children?: React.ReactNode; + /** + * Specify a container element to portal the content into. + */ + container?: PortalProps['container']; + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const TooltipPortal: React.FC; +interface TooltipContentProps extends TooltipContentImplProps { + /** + * Used to force mounting when more control is needed. Useful when + * controlling animation with React animation libraries. + */ + forceMount?: true; +} +declare const TooltipContent: React.ForwardRefExoticComponent>; +type DismissableLayerProps = React.ComponentPropsWithoutRef; +type PopperContentProps = React.ComponentPropsWithoutRef; +interface TooltipContentImplProps extends Omit { + /** + * A more descriptive label for accessibility purpose + */ + 'aria-label'?: string; + /** + * Event handler called when the escape key is down. + * Can be prevented. + */ + onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; + /** + * Event handler called when the a `pointerdown` event happens outside of the `Tooltip`. + * Can be prevented. + */ + onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside']; +} +type PopperArrowProps = React.ComponentPropsWithoutRef; +interface TooltipArrowProps extends PopperArrowProps { +} +declare const TooltipArrow: React.ForwardRefExoticComponent>; +declare const Provider: React.FC; +declare const Root: React.FC; +declare const Trigger: React.ForwardRefExoticComponent>; +declare const Portal: React.FC; +declare const Content: React.ForwardRefExoticComponent>; +declare const Arrow: React.ForwardRefExoticComponent>; + +export { Arrow, Content, Portal, Provider, Root, Tooltip, TooltipArrow, type TooltipArrowProps, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipPortalProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, Trigger, createTooltipScope }; diff --git a/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.js b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..2d0d314a00082c458d2f551d715572cd1fa1b5c3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.js @@ -0,0 +1,540 @@ +"use strict"; +"use client"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Arrow: () => Arrow2, + Content: () => Content2, + Portal: () => Portal, + Provider: () => Provider, + Root: () => Root3, + Tooltip: () => Tooltip, + TooltipArrow: () => TooltipArrow, + TooltipContent: () => TooltipContent, + TooltipPortal: () => TooltipPortal, + TooltipProvider: () => TooltipProvider, + TooltipTrigger: () => TooltipTrigger, + Trigger: () => Trigger, + createTooltipScope: () => createTooltipScope +}); +module.exports = __toCommonJS(index_exports); + +// src/tooltip.tsx +var React = __toESM(require("react")); +var import_primitive = require("@radix-ui/primitive"); +var import_react_compose_refs = require("@radix-ui/react-compose-refs"); +var import_react_context = require("@radix-ui/react-context"); +var import_react_dismissable_layer = require("@radix-ui/react-dismissable-layer"); +var import_react_id = require("@radix-ui/react-id"); +var PopperPrimitive = __toESM(require("@radix-ui/react-popper")); +var import_react_popper = require("@radix-ui/react-popper"); +var import_react_portal = require("@radix-ui/react-portal"); +var import_react_presence = require("@radix-ui/react-presence"); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_react_slot = require("@radix-ui/react-slot"); +var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state"); +var VisuallyHiddenPrimitive = __toESM(require("@radix-ui/react-visually-hidden")); +var import_jsx_runtime = require("react/jsx-runtime"); +var [createTooltipContext, createTooltipScope] = (0, import_react_context.createContextScope)("Tooltip", [ + import_react_popper.createPopperScope +]); +var usePopperScope = (0, import_react_popper.createPopperScope)(); +var PROVIDER_NAME = "TooltipProvider"; +var DEFAULT_DELAY_DURATION = 700; +var TOOLTIP_OPEN = "tooltip.open"; +var [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME); +var TooltipProvider = (props) => { + const { + __scopeTooltip, + delayDuration = DEFAULT_DELAY_DURATION, + skipDelayDuration = 300, + disableHoverableContent = false, + children + } = props; + const isOpenDelayedRef = React.useRef(true); + const isPointerInTransitRef = React.useRef(false); + const skipDelayTimerRef = React.useRef(0); + React.useEffect(() => { + const skipDelayTimer = skipDelayTimerRef.current; + return () => window.clearTimeout(skipDelayTimer); + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + TooltipProviderContextProvider, + { + scope: __scopeTooltip, + isOpenDelayedRef, + delayDuration, + onOpen: React.useCallback(() => { + window.clearTimeout(skipDelayTimerRef.current); + isOpenDelayedRef.current = false; + }, []), + onClose: React.useCallback(() => { + window.clearTimeout(skipDelayTimerRef.current); + skipDelayTimerRef.current = window.setTimeout( + () => isOpenDelayedRef.current = true, + skipDelayDuration + ); + }, [skipDelayDuration]), + isPointerInTransitRef, + onPointerInTransitChange: React.useCallback((inTransit) => { + isPointerInTransitRef.current = inTransit; + }, []), + disableHoverableContent, + children + } + ); +}; +TooltipProvider.displayName = PROVIDER_NAME; +var TOOLTIP_NAME = "Tooltip"; +var [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME); +var Tooltip = (props) => { + const { + __scopeTooltip, + children, + open: openProp, + defaultOpen, + onOpenChange, + disableHoverableContent: disableHoverableContentProp, + delayDuration: delayDurationProp + } = props; + const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip); + const popperScope = usePopperScope(__scopeTooltip); + const [trigger, setTrigger] = React.useState(null); + const contentId = (0, import_react_id.useId)(); + const openTimerRef = React.useRef(0); + const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent; + const delayDuration = delayDurationProp ?? providerContext.delayDuration; + const wasOpenDelayedRef = React.useRef(false); + const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: (open2) => { + if (open2) { + providerContext.onOpen(); + document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN)); + } else { + providerContext.onClose(); + } + onOpenChange?.(open2); + }, + caller: TOOLTIP_NAME + }); + const stateAttribute = React.useMemo(() => { + return open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed"; + }, [open]); + const handleOpen = React.useCallback(() => { + window.clearTimeout(openTimerRef.current); + openTimerRef.current = 0; + wasOpenDelayedRef.current = false; + setOpen(true); + }, [setOpen]); + const handleClose = React.useCallback(() => { + window.clearTimeout(openTimerRef.current); + openTimerRef.current = 0; + setOpen(false); + }, [setOpen]); + const handleDelayedOpen = React.useCallback(() => { + window.clearTimeout(openTimerRef.current); + openTimerRef.current = window.setTimeout(() => { + wasOpenDelayedRef.current = true; + setOpen(true); + openTimerRef.current = 0; + }, delayDuration); + }, [delayDuration, setOpen]); + React.useEffect(() => { + return () => { + if (openTimerRef.current) { + window.clearTimeout(openTimerRef.current); + openTimerRef.current = 0; + } + }; + }, []); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + TooltipContextProvider, + { + scope: __scopeTooltip, + contentId, + open, + stateAttribute, + trigger, + onTriggerChange: setTrigger, + onTriggerEnter: React.useCallback(() => { + if (providerContext.isOpenDelayedRef.current) handleDelayedOpen(); + else handleOpen(); + }, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen]), + onTriggerLeave: React.useCallback(() => { + if (disableHoverableContent) { + handleClose(); + } else { + window.clearTimeout(openTimerRef.current); + openTimerRef.current = 0; + } + }, [handleClose, disableHoverableContent]), + onOpen: handleOpen, + onClose: handleClose, + disableHoverableContent, + children + } + ) }); +}; +Tooltip.displayName = TOOLTIP_NAME; +var TRIGGER_NAME = "TooltipTrigger"; +var TooltipTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeTooltip, ...triggerProps } = props; + const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip); + const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip); + const popperScope = usePopperScope(__scopeTooltip); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref, context.onTriggerChange); + const isPointerDownRef = React.useRef(false); + const hasPointerMoveOpenedRef = React.useRef(false); + const handlePointerUp = React.useCallback(() => isPointerDownRef.current = false, []); + React.useEffect(() => { + return () => document.removeEventListener("pointerup", handlePointerUp); + }, [handlePointerUp]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.button, + { + "aria-describedby": context.open ? context.contentId : void 0, + "data-state": context.stateAttribute, + ...triggerProps, + ref: composedRefs, + onPointerMove: (0, import_primitive.composeEventHandlers)(props.onPointerMove, (event) => { + if (event.pointerType === "touch") return; + if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) { + context.onTriggerEnter(); + hasPointerMoveOpenedRef.current = true; + } + }), + onPointerLeave: (0, import_primitive.composeEventHandlers)(props.onPointerLeave, () => { + context.onTriggerLeave(); + hasPointerMoveOpenedRef.current = false; + }), + onPointerDown: (0, import_primitive.composeEventHandlers)(props.onPointerDown, () => { + if (context.open) { + context.onClose(); + } + isPointerDownRef.current = true; + document.addEventListener("pointerup", handlePointerUp, { once: true }); + }), + onFocus: (0, import_primitive.composeEventHandlers)(props.onFocus, () => { + if (!isPointerDownRef.current) context.onOpen(); + }), + onBlur: (0, import_primitive.composeEventHandlers)(props.onBlur, context.onClose), + onClick: (0, import_primitive.composeEventHandlers)(props.onClick, context.onClose) + } + ) }); + } +); +TooltipTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "TooltipPortal"; +var [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, { + forceMount: void 0 +}); +var TooltipPortal = (props) => { + const { __scopeTooltip, forceMount, children, container } = props; + const context = useTooltipContext(PORTAL_NAME, __scopeTooltip); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PortalProvider, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_portal.Portal, { asChild: true, container, children }) }) }); +}; +TooltipPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "TooltipContent"; +var TooltipContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip); + const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props; + const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) }); + } +); +var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => { + const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip); + const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip); + const ref = React.useRef(null); + const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref); + const [pointerGraceArea, setPointerGraceArea] = React.useState(null); + const { trigger, onClose } = context; + const content = ref.current; + const { onPointerInTransitChange } = providerContext; + const handleRemoveGraceArea = React.useCallback(() => { + setPointerGraceArea(null); + onPointerInTransitChange(false); + }, [onPointerInTransitChange]); + const handleCreateGraceArea = React.useCallback( + (event, hoverTarget) => { + const currentTarget = event.currentTarget; + const exitPoint = { x: event.clientX, y: event.clientY }; + const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect()); + const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide); + const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect()); + const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]); + setPointerGraceArea(graceArea); + onPointerInTransitChange(true); + }, + [onPointerInTransitChange] + ); + React.useEffect(() => { + return () => handleRemoveGraceArea(); + }, [handleRemoveGraceArea]); + React.useEffect(() => { + if (trigger && content) { + const handleTriggerLeave = (event) => handleCreateGraceArea(event, content); + const handleContentLeave = (event) => handleCreateGraceArea(event, trigger); + trigger.addEventListener("pointerleave", handleTriggerLeave); + content.addEventListener("pointerleave", handleContentLeave); + return () => { + trigger.removeEventListener("pointerleave", handleTriggerLeave); + content.removeEventListener("pointerleave", handleContentLeave); + }; + } + }, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]); + React.useEffect(() => { + if (pointerGraceArea) { + const handleTrackPointerGrace = (event) => { + const target = event.target; + const pointerPosition = { x: event.clientX, y: event.clientY }; + const hasEnteredTarget = trigger?.contains(target) || content?.contains(target); + const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea); + if (hasEnteredTarget) { + handleRemoveGraceArea(); + } else if (isPointerOutsideGraceArea) { + handleRemoveGraceArea(); + onClose(); + } + }; + document.addEventListener("pointermove", handleTrackPointerGrace); + return () => document.removeEventListener("pointermove", handleTrackPointerGrace); + } + }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipContentImpl, { ...props, ref: composedRefs }); +}); +var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false }); +var Slottable = (0, import_react_slot.createSlottable)("TooltipContent"); +var TooltipContentImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeTooltip, + children, + "aria-label": ariaLabel, + onEscapeKeyDown, + onPointerDownOutside, + ...contentProps + } = props; + const context = useTooltipContext(CONTENT_NAME, __scopeTooltip); + const popperScope = usePopperScope(__scopeTooltip); + const { onClose } = context; + React.useEffect(() => { + document.addEventListener(TOOLTIP_OPEN, onClose); + return () => document.removeEventListener(TOOLTIP_OPEN, onClose); + }, [onClose]); + React.useEffect(() => { + if (context.trigger) { + const handleScroll = (event) => { + const target = event.target; + if (target?.contains(context.trigger)) onClose(); + }; + window.addEventListener("scroll", handleScroll, { capture: true }); + return () => window.removeEventListener("scroll", handleScroll, { capture: true }); + } + }, [context.trigger, onClose]); + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_dismissable_layer.DismissableLayer, + { + asChild: true, + disableOutsidePointerEvents: false, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside: (event) => event.preventDefault(), + onDismiss: onClose, + children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)( + PopperPrimitive.Content, + { + "data-state": context.stateAttribute, + ...popperScope, + ...contentProps, + ref: forwardedRef, + style: { + ...contentProps.style, + // re-namespace exposed content custom properties + ...{ + "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)", + "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)", + "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)" + } + }, + children: [ + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Slottable, { children }), + /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VisuallyHiddenPrimitive.Root, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) }) + ] + } + ) + } + ); + } +); +TooltipContent.displayName = CONTENT_NAME; +var ARROW_NAME = "TooltipArrow"; +var TooltipArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeTooltip, ...arrowProps } = props; + const popperScope = usePopperScope(__scopeTooltip); + const visuallyHiddenContentContext = useVisuallyHiddenContentContext( + ARROW_NAME, + __scopeTooltip + ); + return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }); + } +); +TooltipArrow.displayName = ARROW_NAME; +function getExitSideFromRect(point, rect) { + const top = Math.abs(rect.top - point.y); + const bottom = Math.abs(rect.bottom - point.y); + const right = Math.abs(rect.right - point.x); + const left = Math.abs(rect.left - point.x); + switch (Math.min(top, bottom, right, left)) { + case left: + return "left"; + case right: + return "right"; + case top: + return "top"; + case bottom: + return "bottom"; + default: + throw new Error("unreachable"); + } +} +function getPaddedExitPoints(exitPoint, exitSide, padding = 5) { + const paddedExitPoints = []; + switch (exitSide) { + case "top": + paddedExitPoints.push( + { x: exitPoint.x - padding, y: exitPoint.y + padding }, + { x: exitPoint.x + padding, y: exitPoint.y + padding } + ); + break; + case "bottom": + paddedExitPoints.push( + { x: exitPoint.x - padding, y: exitPoint.y - padding }, + { x: exitPoint.x + padding, y: exitPoint.y - padding } + ); + break; + case "left": + paddedExitPoints.push( + { x: exitPoint.x + padding, y: exitPoint.y - padding }, + { x: exitPoint.x + padding, y: exitPoint.y + padding } + ); + break; + case "right": + paddedExitPoints.push( + { x: exitPoint.x - padding, y: exitPoint.y - padding }, + { x: exitPoint.x - padding, y: exitPoint.y + padding } + ); + break; + } + return paddedExitPoints; +} +function getPointsFromRect(rect) { + const { top, right, bottom, left } = rect; + return [ + { x: left, y: top }, + { x: right, y: top }, + { x: right, y: bottom }, + { x: left, y: bottom } + ]; +} +function isPointInPolygon(point, polygon) { + const { x, y } = point; + let inside = false; + for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) { + const ii = polygon[i]; + const jj = polygon[j]; + const xi = ii.x; + const yi = ii.y; + const xj = jj.x; + const yj = jj.y; + const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi; + if (intersect) inside = !inside; + } + return inside; +} +function getHull(points) { + const newPoints = points.slice(); + newPoints.sort((a, b) => { + if (a.x < b.x) return -1; + else if (a.x > b.x) return 1; + else if (a.y < b.y) return -1; + else if (a.y > b.y) return 1; + else return 0; + }); + return getHullPresorted(newPoints); +} +function getHullPresorted(points) { + if (points.length <= 1) return points.slice(); + const upperHull = []; + for (let i = 0; i < points.length; i++) { + const p = points[i]; + while (upperHull.length >= 2) { + const q = upperHull[upperHull.length - 1]; + const r = upperHull[upperHull.length - 2]; + if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop(); + else break; + } + upperHull.push(p); + } + upperHull.pop(); + const lowerHull = []; + for (let i = points.length - 1; i >= 0; i--) { + const p = points[i]; + while (lowerHull.length >= 2) { + const q = lowerHull[lowerHull.length - 1]; + const r = lowerHull[lowerHull.length - 2]; + if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop(); + else break; + } + lowerHull.push(p); + } + lowerHull.pop(); + if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) { + return upperHull; + } else { + return upperHull.concat(lowerHull); + } +} +var Provider = TooltipProvider; +var Root3 = Tooltip; +var Trigger = TooltipTrigger; +var Portal = TooltipPortal; +var Content2 = TooltipContent; +var Arrow2 = TooltipArrow; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b291159aa981a324fe1989e16650d4c94cb1481a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/tooltip.tsx"], + "sourcesContent": ["'use client';\nexport {\n createTooltipScope,\n //\n TooltipProvider,\n Tooltip,\n TooltipTrigger,\n TooltipPortal,\n TooltipContent,\n TooltipArrow,\n //\n Provider,\n Root,\n Trigger,\n Portal,\n Content,\n Arrow,\n} from './tooltip';\nexport type {\n TooltipProps,\n TooltipProviderProps,\n TooltipTriggerProps,\n TooltipPortalProps,\n TooltipContentProps,\n TooltipArrowProps,\n} from './tooltip';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createSlottable } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype ScopedProps

= P & { __scopeTooltip?: Scope };\nconst [createTooltipContext, createTooltipScope] = createContextScope('Tooltip', [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipProvider\n * -----------------------------------------------------------------------------------------------*/\n\nconst PROVIDER_NAME = 'TooltipProvider';\nconst DEFAULT_DELAY_DURATION = 700;\nconst TOOLTIP_OPEN = 'tooltip.open';\n\ntype TooltipProviderContextValue = {\n isOpenDelayedRef: React.MutableRefObject;\n delayDuration: number;\n onOpen(): void;\n onClose(): void;\n onPointerInTransitChange(inTransit: boolean): void;\n isPointerInTransitRef: React.MutableRefObject;\n disableHoverableContent: boolean;\n};\n\nconst [TooltipProviderContextProvider, useTooltipProviderContext] =\n createTooltipContext(PROVIDER_NAME);\n\ninterface TooltipProviderProps {\n children: React.ReactNode;\n /**\n * The duration from when the pointer enters the trigger until the tooltip gets opened.\n * @defaultValue 700\n */\n delayDuration?: number;\n /**\n * How much time a user has to enter another trigger without incurring a delay again.\n * @defaultValue 300\n */\n skipDelayDuration?: number;\n /**\n * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.\n * @defaultValue false\n */\n disableHoverableContent?: boolean;\n}\n\nconst TooltipProvider: React.FC = (\n props: ScopedProps\n) => {\n const {\n __scopeTooltip,\n delayDuration = DEFAULT_DELAY_DURATION,\n skipDelayDuration = 300,\n disableHoverableContent = false,\n children,\n } = props;\n const isOpenDelayedRef = React.useRef(true);\n const isPointerInTransitRef = React.useRef(false);\n const skipDelayTimerRef = React.useRef(0);\n\n React.useEffect(() => {\n const skipDelayTimer = skipDelayTimerRef.current;\n return () => window.clearTimeout(skipDelayTimer);\n }, []);\n\n return (\n {\n window.clearTimeout(skipDelayTimerRef.current);\n isOpenDelayedRef.current = false;\n }, [])}\n onClose={React.useCallback(() => {\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(\n () => (isOpenDelayedRef.current = true),\n skipDelayDuration\n );\n }, [skipDelayDuration])}\n isPointerInTransitRef={isPointerInTransitRef}\n onPointerInTransitChange={React.useCallback((inTransit: boolean) => {\n isPointerInTransitRef.current = inTransit;\n }, [])}\n disableHoverableContent={disableHoverableContent}\n >\n {children}\n \n );\n};\n\nTooltipProvider.displayName = PROVIDER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Tooltip\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOOLTIP_NAME = 'Tooltip';\n\ntype TooltipContextValue = {\n contentId: string;\n open: boolean;\n stateAttribute: 'closed' | 'delayed-open' | 'instant-open';\n trigger: TooltipTriggerElement | null;\n onTriggerChange(trigger: TooltipTriggerElement | null): void;\n onTriggerEnter(): void;\n onTriggerLeave(): void;\n onOpen(): void;\n onClose(): void;\n disableHoverableContent: boolean;\n};\n\nconst [TooltipContextProvider, useTooltipContext] =\n createTooltipContext(TOOLTIP_NAME);\n\ninterface TooltipProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /**\n * The duration from when the pointer enters the trigger until the tooltip gets opened. This will\n * override the prop with the same name passed to Provider.\n * @defaultValue 700\n */\n delayDuration?: number;\n /**\n * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.\n * @defaultValue false\n */\n disableHoverableContent?: boolean;\n}\n\nconst Tooltip: React.FC = (props: ScopedProps) => {\n const {\n __scopeTooltip,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n disableHoverableContent: disableHoverableContentProp,\n delayDuration: delayDurationProp,\n } = props;\n const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const [trigger, setTrigger] = React.useState(null);\n const contentId = useId();\n const openTimerRef = React.useRef(0);\n const disableHoverableContent =\n disableHoverableContentProp ?? providerContext.disableHoverableContent;\n const delayDuration = delayDurationProp ?? providerContext.delayDuration;\n const wasOpenDelayedRef = React.useRef(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: (open) => {\n if (open) {\n providerContext.onOpen();\n\n // as `onChange` is called within a lifecycle method we\n // avoid dispatching via `dispatchDiscreteCustomEvent`.\n document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));\n } else {\n providerContext.onClose();\n }\n onOpenChange?.(open);\n },\n caller: TOOLTIP_NAME,\n });\n const stateAttribute = React.useMemo(() => {\n return open ? (wasOpenDelayedRef.current ? 'delayed-open' : 'instant-open') : 'closed';\n }, [open]);\n\n const handleOpen = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n wasOpenDelayedRef.current = false;\n setOpen(true);\n }, [setOpen]);\n\n const handleClose = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n setOpen(false);\n }, [setOpen]);\n\n const handleDelayedOpen = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = window.setTimeout(() => {\n wasOpenDelayedRef.current = true;\n setOpen(true);\n openTimerRef.current = 0;\n }, delayDuration);\n }, [delayDuration, setOpen]);\n\n React.useEffect(() => {\n return () => {\n if (openTimerRef.current) {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n };\n }, []);\n\n return (\n \n {\n if (providerContext.isOpenDelayedRef.current) handleDelayedOpen();\n else handleOpen();\n }, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen])}\n onTriggerLeave={React.useCallback(() => {\n if (disableHoverableContent) {\n handleClose();\n } else {\n // Clear the timer in case the pointer leaves the trigger before the tooltip is opened.\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n }, [handleClose, disableHoverableContent])}\n onOpen={handleOpen}\n onClose={handleClose}\n disableHoverableContent={disableHoverableContent}\n >\n {children}\n \n \n );\n};\n\nTooltip.displayName = TOOLTIP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'TooltipTrigger';\n\ntype TooltipTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface TooltipTriggerProps extends PrimitiveButtonProps {}\n\nconst TooltipTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeTooltip, ...triggerProps } = props;\n const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip);\n const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange);\n const isPointerDownRef = React.useRef(false);\n const hasPointerMoveOpenedRef = React.useRef(false);\n const handlePointerUp = React.useCallback(() => (isPointerDownRef.current = false), []);\n\n React.useEffect(() => {\n return () => document.removeEventListener('pointerup', handlePointerUp);\n }, [handlePointerUp]);\n\n return (\n \n {\n if (event.pointerType === 'touch') return;\n if (\n !hasPointerMoveOpenedRef.current &&\n !providerContext.isPointerInTransitRef.current\n ) {\n context.onTriggerEnter();\n hasPointerMoveOpenedRef.current = true;\n }\n })}\n onPointerLeave={composeEventHandlers(props.onPointerLeave, () => {\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n })}\n onPointerDown={composeEventHandlers(props.onPointerDown, () => {\n if (context.open) {\n context.onClose();\n }\n isPointerDownRef.current = true;\n document.addEventListener('pointerup', handlePointerUp, { once: true });\n })}\n onFocus={composeEventHandlers(props.onFocus, () => {\n if (!isPointerDownRef.current) context.onOpen();\n })}\n onBlur={composeEventHandlers(props.onBlur, context.onClose)}\n onClick={composeEventHandlers(props.onClick, context.onClose)}\n />\n \n );\n }\n);\n\nTooltipTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'TooltipPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface TooltipPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst TooltipPortal: React.FC = (props: ScopedProps) => {\n const { __scopeTooltip, forceMount, children, container } = props;\n const context = useTooltipContext(PORTAL_NAME, __scopeTooltip);\n return (\n \n \n \n {children}\n \n \n \n );\n};\n\nTooltipPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'TooltipContent';\n\ntype TooltipContentElement = TooltipContentImplElement;\ninterface TooltipContentProps extends TooltipContentImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst TooltipContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip);\n const { forceMount = portalContext.forceMount, side = 'top', ...contentProps } = props;\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n\n return (\n \n {context.disableHoverableContent ? (\n \n ) : (\n \n )}\n \n );\n }\n);\n\ntype Point = { x: number; y: number };\ntype Polygon = Point[];\n\ntype TooltipContentHoverableElement = TooltipContentImplElement;\ninterface TooltipContentHoverableProps extends TooltipContentImplProps {}\n\nconst TooltipContentHoverable = React.forwardRef<\n TooltipContentHoverableElement,\n TooltipContentHoverableProps\n>((props: ScopedProps, forwardedRef) => {\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [pointerGraceArea, setPointerGraceArea] = React.useState(null);\n\n const { trigger, onClose } = context;\n const content = ref.current;\n\n const { onPointerInTransitChange } = providerContext;\n\n const handleRemoveGraceArea = React.useCallback(() => {\n setPointerGraceArea(null);\n onPointerInTransitChange(false);\n }, [onPointerInTransitChange]);\n\n const handleCreateGraceArea = React.useCallback(\n (event: PointerEvent, hoverTarget: HTMLElement) => {\n const currentTarget = event.currentTarget as HTMLElement;\n const exitPoint = { x: event.clientX, y: event.clientY };\n const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());\n const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide);\n const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());\n const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]);\n setPointerGraceArea(graceArea);\n onPointerInTransitChange(true);\n },\n [onPointerInTransitChange]\n );\n\n React.useEffect(() => {\n return () => handleRemoveGraceArea();\n }, [handleRemoveGraceArea]);\n\n React.useEffect(() => {\n if (trigger && content) {\n const handleTriggerLeave = (event: PointerEvent) => handleCreateGraceArea(event, content);\n const handleContentLeave = (event: PointerEvent) => handleCreateGraceArea(event, trigger);\n\n trigger.addEventListener('pointerleave', handleTriggerLeave);\n content.addEventListener('pointerleave', handleContentLeave);\n return () => {\n trigger.removeEventListener('pointerleave', handleTriggerLeave);\n content.removeEventListener('pointerleave', handleContentLeave);\n };\n }\n }, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);\n\n React.useEffect(() => {\n if (pointerGraceArea) {\n const handleTrackPointerGrace = (event: PointerEvent) => {\n const target = event.target as HTMLElement;\n const pointerPosition = { x: event.clientX, y: event.clientY };\n const hasEnteredTarget = trigger?.contains(target) || content?.contains(target);\n const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea);\n\n if (hasEnteredTarget) {\n handleRemoveGraceArea();\n } else if (isPointerOutsideGraceArea) {\n handleRemoveGraceArea();\n onClose();\n }\n };\n document.addEventListener('pointermove', handleTrackPointerGrace);\n return () => document.removeEventListener('pointermove', handleTrackPointerGrace);\n }\n }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);\n\n return ;\n});\n\nconst [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] =\n createTooltipContext(TOOLTIP_NAME, { isInside: false });\n\ntype TooltipContentImplElement = React.ComponentRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype PopperContentProps = React.ComponentPropsWithoutRef;\ninterface TooltipContentImplProps extends Omit {\n /**\n * A more descriptive label for accessibility purpose\n */\n 'aria-label'?: string;\n\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `Tooltip`.\n * Can be prevented.\n */\n onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n}\n\nconst Slottable = createSlottable('TooltipContent');\n\nconst TooltipContentImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeTooltip,\n children,\n 'aria-label': ariaLabel,\n onEscapeKeyDown,\n onPointerDownOutside,\n ...contentProps\n } = props;\n const context = useTooltipContext(CONTENT_NAME, __scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const { onClose } = context;\n\n // Close this tooltip if another one opens\n React.useEffect(() => {\n document.addEventListener(TOOLTIP_OPEN, onClose);\n return () => document.removeEventListener(TOOLTIP_OPEN, onClose);\n }, [onClose]);\n\n // Close the tooltip if the trigger is scrolled\n React.useEffect(() => {\n if (context.trigger) {\n const handleScroll = (event: Event) => {\n const target = event.target as HTMLElement;\n if (target?.contains(context.trigger)) onClose();\n };\n window.addEventListener('scroll', handleScroll, { capture: true });\n return () => window.removeEventListener('scroll', handleScroll, { capture: true });\n }\n }, [context.trigger, onClose]);\n\n return (\n event.preventDefault()}\n onDismiss={onClose}\n >\n \n {children}\n \n \n {ariaLabel || children}\n \n \n \n \n );\n }\n);\n\nTooltipContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'TooltipArrow';\n\ntype TooltipArrowElement = React.ComponentRef;\ntype PopperArrowProps = React.ComponentPropsWithoutRef;\ninterface TooltipArrowProps extends PopperArrowProps {}\n\nconst TooltipArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeTooltip, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeTooltip);\n const visuallyHiddenContentContext = useVisuallyHiddenContentContext(\n ARROW_NAME,\n __scopeTooltip\n );\n // if the arrow is inside the `VisuallyHidden`, we don't want to render it all to\n // prevent issues in positioning the arrow due to the duplicate\n return visuallyHiddenContentContext.isInside ? null : (\n \n );\n }\n);\n\nTooltipArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype Side = NonNullable;\n\nfunction getExitSideFromRect(point: Point, rect: DOMRect): Side {\n const top = Math.abs(rect.top - point.y);\n const bottom = Math.abs(rect.bottom - point.y);\n const right = Math.abs(rect.right - point.x);\n const left = Math.abs(rect.left - point.x);\n\n switch (Math.min(top, bottom, right, left)) {\n case left:\n return 'left';\n case right:\n return 'right';\n case top:\n return 'top';\n case bottom:\n return 'bottom';\n default:\n throw new Error('unreachable');\n }\n}\n\nfunction getPaddedExitPoints(exitPoint: Point, exitSide: Side, padding = 5) {\n const paddedExitPoints: Point[] = [];\n switch (exitSide) {\n case 'top':\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y + padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case 'bottom':\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y - padding }\n );\n break;\n case 'left':\n paddedExitPoints.push(\n { x: exitPoint.x + padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case 'right':\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x - padding, y: exitPoint.y + padding }\n );\n break;\n }\n return paddedExitPoints;\n}\n\nfunction getPointsFromRect(rect: DOMRect) {\n const { top, right, bottom, left } = rect;\n return [\n { x: left, y: top },\n { x: right, y: top },\n { x: right, y: bottom },\n { x: left, y: bottom },\n ];\n}\n\n// Determine if a point is inside of a polygon.\n// Based on https://github.com/substack/point-in-polygon\nfunction isPointInPolygon(point: Point, polygon: Polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i]!;\n const jj = polygon[j]!;\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n\n // prettier-ignore\n const intersect = ((yi > y) !== (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\n if (intersect) inside = !inside;\n }\n\n return inside;\n}\n\n// Returns a new array of points representing the convex hull of the given set of points.\n// https://www.nayuki.io/page/convex-hull-algorithm\nfunction getHull

(points: Readonly>): Array

{\n const newPoints: Array

= points.slice();\n newPoints.sort((a: Point, b: Point) => {\n if (a.x < b.x) return -1;\n else if (a.x > b.x) return +1;\n else if (a.y < b.y) return -1;\n else if (a.y > b.y) return +1;\n else return 0;\n });\n return getHullPresorted(newPoints);\n}\n\n// Returns the convex hull, assuming that each points[i] <= points[i + 1]. Runs in O(n) time.\nfunction getHullPresorted

(points: Readonly>): Array

{\n if (points.length <= 1) return points.slice();\n\n const upperHull: Array

= [];\n for (let i = 0; i < points.length; i++) {\n const p = points[i]!;\n while (upperHull.length >= 2) {\n const q = upperHull[upperHull.length - 1]!;\n const r = upperHull[upperHull.length - 2]!;\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop();\n else break;\n }\n upperHull.push(p);\n }\n upperHull.pop();\n\n const lowerHull: Array

= [];\n for (let i = points.length - 1; i >= 0; i--) {\n const p = points[i]!;\n while (lowerHull.length >= 2) {\n const q = lowerHull[lowerHull.length - 1]!;\n const r = lowerHull[lowerHull.length - 2]!;\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop();\n else break;\n }\n lowerHull.push(p);\n }\n lowerHull.pop();\n\n if (\n upperHull.length === 1 &&\n lowerHull.length === 1 &&\n upperHull[0]!.x === lowerHull[0]!.x &&\n upperHull[0]!.y === lowerHull[0]!.y\n ) {\n return upperHull;\n } else {\n return upperHull.concat(lowerHull);\n }\n}\n\nconst Provider = TooltipProvider;\nconst Root = Tooltip;\nconst Trigger = TooltipTrigger;\nconst Portal = TooltipPortal;\nconst Content = TooltipContent;\nconst Arrow = TooltipArrow;\n\nexport {\n createTooltipScope,\n //\n TooltipProvider,\n Tooltip,\n TooltipTrigger,\n TooltipPortal,\n TooltipContent,\n TooltipArrow,\n //\n Provider,\n Root,\n Trigger,\n Portal,\n Content,\n Arrow,\n};\nexport type {\n TooltipProviderProps,\n TooltipProps,\n TooltipTriggerProps,\n TooltipPortalProps,\n TooltipContentProps,\n TooltipArrowProps,\n};\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA,eAAAC;AAAA,EAAA;AAAA;AAAA,cAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,gCAAgC;AAChC,2BAAmC;AACnC,qCAAiC;AACjC,sBAAsB;AACtB,sBAAiC;AACjC,0BAAkC;AAClC,0BAA0C;AAC1C,4BAAyB;AACzB,6BAA0B;AAC1B,wBAAgC;AAChC,0CAAqC;AACrC,8BAAyC;AAsErC;AAjEJ,IAAM,CAAC,sBAAsB,kBAAkB,QAAI,yCAAmB,WAAW;AAAA,EAC/E;AACF,CAAC;AACD,IAAM,qBAAiB,uCAAkB;AAMzC,IAAM,gBAAgB;AACt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ACxC,WAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAI,WAAU,IAAI;AAAA,UACrE;AAAA,IACP;AACA,cAAU,KAAK,CAAC;AAAA,EAClB;AACA,YAAU,IAAI;AAEd,QAAM,YAAsB,CAAC;AAC7B,WAAS,IAAI,OAAO,SAAS,GAAG,KAAK,GAAG,KAAK;AAC3C,UAAM,IAAI,OAAO,CAAC;AAClB,WAAO,UAAU,UAAU,GAAG;AAC5B,YAAM,IAAI,UAAU,UAAU,SAAS,CAAC;AACxC,YAAM,IAAI,UAAU,UAAU,SAAS,CAAC;AACxC,WAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAI,WAAU,IAAI;AAAA,UACrE;AAAA,IACP;AACA,cAAU,KAAK,CAAC;AAAA,EAClB;AACA,YAAU,IAAI;AAEd,MACE,UAAU,WAAW,KACrB,UAAU,WAAW,KACrB,UAAU,CAAC,EAAG,MAAM,UAAU,CAAC,EAAG,KAClC,UAAU,CAAC,EAAG,MAAM,UAAU,CAAC,EAAG,GAClC;AACA,WAAO;AAAA,EACT,OAAO;AACL,WAAO,UAAU,OAAO,SAAS;AAAA,EACnC;AACF;AAEA,IAAM,WAAW;AACjB,IAAMC,QAAO;AACb,IAAM,UAAU;AAChB,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;", + "names": ["Arrow", "Content", "Root", "open", "PortalPrimitive", "Root", "Content", "Arrow"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..568389bf3ce8123fa6de6d298878b32d613e25cf --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.mjs @@ -0,0 +1,508 @@ +"use client"; + +// src/tooltip.tsx +import * as React from "react"; +import { composeEventHandlers } from "@radix-ui/primitive"; +import { useComposedRefs } from "@radix-ui/react-compose-refs"; +import { createContextScope } from "@radix-ui/react-context"; +import { DismissableLayer } from "@radix-ui/react-dismissable-layer"; +import { useId } from "@radix-ui/react-id"; +import * as PopperPrimitive from "@radix-ui/react-popper"; +import { createPopperScope } from "@radix-ui/react-popper"; +import { Portal as PortalPrimitive } from "@radix-ui/react-portal"; +import { Presence } from "@radix-ui/react-presence"; +import { Primitive } from "@radix-ui/react-primitive"; +import { createSlottable } from "@radix-ui/react-slot"; +import { useControllableState } from "@radix-ui/react-use-controllable-state"; +import * as VisuallyHiddenPrimitive from "@radix-ui/react-visually-hidden"; +import { jsx, jsxs } from "react/jsx-runtime"; +var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [ + createPopperScope +]); +var usePopperScope = createPopperScope(); +var PROVIDER_NAME = "TooltipProvider"; +var DEFAULT_DELAY_DURATION = 700; +var TOOLTIP_OPEN = "tooltip.open"; +var [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME); +var TooltipProvider = (props) => { + const { + __scopeTooltip, + delayDuration = DEFAULT_DELAY_DURATION, + skipDelayDuration = 300, + disableHoverableContent = false, + children + } = props; + const isOpenDelayedRef = React.useRef(true); + const isPointerInTransitRef = React.useRef(false); + const skipDelayTimerRef = React.useRef(0); + React.useEffect(() => { + const skipDelayTimer = skipDelayTimerRef.current; + return () => window.clearTimeout(skipDelayTimer); + }, []); + return /* @__PURE__ */ jsx( + TooltipProviderContextProvider, + { + scope: __scopeTooltip, + isOpenDelayedRef, + delayDuration, + onOpen: React.useCallback(() => { + window.clearTimeout(skipDelayTimerRef.current); + isOpenDelayedRef.current = false; + }, []), + onClose: React.useCallback(() => { + window.clearTimeout(skipDelayTimerRef.current); + skipDelayTimerRef.current = window.setTimeout( + () => isOpenDelayedRef.current = true, + skipDelayDuration + ); + }, [skipDelayDuration]), + isPointerInTransitRef, + onPointerInTransitChange: React.useCallback((inTransit) => { + isPointerInTransitRef.current = inTransit; + }, []), + disableHoverableContent, + children + } + ); +}; +TooltipProvider.displayName = PROVIDER_NAME; +var TOOLTIP_NAME = "Tooltip"; +var [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME); +var Tooltip = (props) => { + const { + __scopeTooltip, + children, + open: openProp, + defaultOpen, + onOpenChange, + disableHoverableContent: disableHoverableContentProp, + delayDuration: delayDurationProp + } = props; + const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip); + const popperScope = usePopperScope(__scopeTooltip); + const [trigger, setTrigger] = React.useState(null); + const contentId = useId(); + const openTimerRef = React.useRef(0); + const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent; + const delayDuration = delayDurationProp ?? providerContext.delayDuration; + const wasOpenDelayedRef = React.useRef(false); + const [open, setOpen] = useControllableState({ + prop: openProp, + defaultProp: defaultOpen ?? false, + onChange: (open2) => { + if (open2) { + providerContext.onOpen(); + document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN)); + } else { + providerContext.onClose(); + } + onOpenChange?.(open2); + }, + caller: TOOLTIP_NAME + }); + const stateAttribute = React.useMemo(() => { + return open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed"; + }, [open]); + const handleOpen = React.useCallback(() => { + window.clearTimeout(openTimerRef.current); + openTimerRef.current = 0; + wasOpenDelayedRef.current = false; + setOpen(true); + }, [setOpen]); + const handleClose = React.useCallback(() => { + window.clearTimeout(openTimerRef.current); + openTimerRef.current = 0; + setOpen(false); + }, [setOpen]); + const handleDelayedOpen = React.useCallback(() => { + window.clearTimeout(openTimerRef.current); + openTimerRef.current = window.setTimeout(() => { + wasOpenDelayedRef.current = true; + setOpen(true); + openTimerRef.current = 0; + }, delayDuration); + }, [delayDuration, setOpen]); + React.useEffect(() => { + return () => { + if (openTimerRef.current) { + window.clearTimeout(openTimerRef.current); + openTimerRef.current = 0; + } + }; + }, []); + return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx( + TooltipContextProvider, + { + scope: __scopeTooltip, + contentId, + open, + stateAttribute, + trigger, + onTriggerChange: setTrigger, + onTriggerEnter: React.useCallback(() => { + if (providerContext.isOpenDelayedRef.current) handleDelayedOpen(); + else handleOpen(); + }, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen]), + onTriggerLeave: React.useCallback(() => { + if (disableHoverableContent) { + handleClose(); + } else { + window.clearTimeout(openTimerRef.current); + openTimerRef.current = 0; + } + }, [handleClose, disableHoverableContent]), + onOpen: handleOpen, + onClose: handleClose, + disableHoverableContent, + children + } + ) }); +}; +Tooltip.displayName = TOOLTIP_NAME; +var TRIGGER_NAME = "TooltipTrigger"; +var TooltipTrigger = React.forwardRef( + (props, forwardedRef) => { + const { __scopeTooltip, ...triggerProps } = props; + const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip); + const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip); + const popperScope = usePopperScope(__scopeTooltip); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange); + const isPointerDownRef = React.useRef(false); + const hasPointerMoveOpenedRef = React.useRef(false); + const handlePointerUp = React.useCallback(() => isPointerDownRef.current = false, []); + React.useEffect(() => { + return () => document.removeEventListener("pointerup", handlePointerUp); + }, [handlePointerUp]); + return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx( + Primitive.button, + { + "aria-describedby": context.open ? context.contentId : void 0, + "data-state": context.stateAttribute, + ...triggerProps, + ref: composedRefs, + onPointerMove: composeEventHandlers(props.onPointerMove, (event) => { + if (event.pointerType === "touch") return; + if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) { + context.onTriggerEnter(); + hasPointerMoveOpenedRef.current = true; + } + }), + onPointerLeave: composeEventHandlers(props.onPointerLeave, () => { + context.onTriggerLeave(); + hasPointerMoveOpenedRef.current = false; + }), + onPointerDown: composeEventHandlers(props.onPointerDown, () => { + if (context.open) { + context.onClose(); + } + isPointerDownRef.current = true; + document.addEventListener("pointerup", handlePointerUp, { once: true }); + }), + onFocus: composeEventHandlers(props.onFocus, () => { + if (!isPointerDownRef.current) context.onOpen(); + }), + onBlur: composeEventHandlers(props.onBlur, context.onClose), + onClick: composeEventHandlers(props.onClick, context.onClose) + } + ) }); + } +); +TooltipTrigger.displayName = TRIGGER_NAME; +var PORTAL_NAME = "TooltipPortal"; +var [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, { + forceMount: void 0 +}); +var TooltipPortal = (props) => { + const { __scopeTooltip, forceMount, children, container } = props; + const context = useTooltipContext(PORTAL_NAME, __scopeTooltip); + return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) }); +}; +TooltipPortal.displayName = PORTAL_NAME; +var CONTENT_NAME = "TooltipContent"; +var TooltipContent = React.forwardRef( + (props, forwardedRef) => { + const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip); + const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props; + const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip); + return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsx(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) }); + } +); +var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => { + const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip); + const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip); + const ref = React.useRef(null); + const composedRefs = useComposedRefs(forwardedRef, ref); + const [pointerGraceArea, setPointerGraceArea] = React.useState(null); + const { trigger, onClose } = context; + const content = ref.current; + const { onPointerInTransitChange } = providerContext; + const handleRemoveGraceArea = React.useCallback(() => { + setPointerGraceArea(null); + onPointerInTransitChange(false); + }, [onPointerInTransitChange]); + const handleCreateGraceArea = React.useCallback( + (event, hoverTarget) => { + const currentTarget = event.currentTarget; + const exitPoint = { x: event.clientX, y: event.clientY }; + const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect()); + const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide); + const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect()); + const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]); + setPointerGraceArea(graceArea); + onPointerInTransitChange(true); + }, + [onPointerInTransitChange] + ); + React.useEffect(() => { + return () => handleRemoveGraceArea(); + }, [handleRemoveGraceArea]); + React.useEffect(() => { + if (trigger && content) { + const handleTriggerLeave = (event) => handleCreateGraceArea(event, content); + const handleContentLeave = (event) => handleCreateGraceArea(event, trigger); + trigger.addEventListener("pointerleave", handleTriggerLeave); + content.addEventListener("pointerleave", handleContentLeave); + return () => { + trigger.removeEventListener("pointerleave", handleTriggerLeave); + content.removeEventListener("pointerleave", handleContentLeave); + }; + } + }, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]); + React.useEffect(() => { + if (pointerGraceArea) { + const handleTrackPointerGrace = (event) => { + const target = event.target; + const pointerPosition = { x: event.clientX, y: event.clientY }; + const hasEnteredTarget = trigger?.contains(target) || content?.contains(target); + const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea); + if (hasEnteredTarget) { + handleRemoveGraceArea(); + } else if (isPointerOutsideGraceArea) { + handleRemoveGraceArea(); + onClose(); + } + }; + document.addEventListener("pointermove", handleTrackPointerGrace); + return () => document.removeEventListener("pointermove", handleTrackPointerGrace); + } + }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]); + return /* @__PURE__ */ jsx(TooltipContentImpl, { ...props, ref: composedRefs }); +}); +var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false }); +var Slottable = createSlottable("TooltipContent"); +var TooltipContentImpl = React.forwardRef( + (props, forwardedRef) => { + const { + __scopeTooltip, + children, + "aria-label": ariaLabel, + onEscapeKeyDown, + onPointerDownOutside, + ...contentProps + } = props; + const context = useTooltipContext(CONTENT_NAME, __scopeTooltip); + const popperScope = usePopperScope(__scopeTooltip); + const { onClose } = context; + React.useEffect(() => { + document.addEventListener(TOOLTIP_OPEN, onClose); + return () => document.removeEventListener(TOOLTIP_OPEN, onClose); + }, [onClose]); + React.useEffect(() => { + if (context.trigger) { + const handleScroll = (event) => { + const target = event.target; + if (target?.contains(context.trigger)) onClose(); + }; + window.addEventListener("scroll", handleScroll, { capture: true }); + return () => window.removeEventListener("scroll", handleScroll, { capture: true }); + } + }, [context.trigger, onClose]); + return /* @__PURE__ */ jsx( + DismissableLayer, + { + asChild: true, + disableOutsidePointerEvents: false, + onEscapeKeyDown, + onPointerDownOutside, + onFocusOutside: (event) => event.preventDefault(), + onDismiss: onClose, + children: /* @__PURE__ */ jsxs( + PopperPrimitive.Content, + { + "data-state": context.stateAttribute, + ...popperScope, + ...contentProps, + ref: forwardedRef, + style: { + ...contentProps.style, + // re-namespace exposed content custom properties + ...{ + "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)", + "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)", + "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)", + "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)", + "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)" + } + }, + children: [ + /* @__PURE__ */ jsx(Slottable, { children }), + /* @__PURE__ */ jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx(VisuallyHiddenPrimitive.Root, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) }) + ] + } + ) + } + ); + } +); +TooltipContent.displayName = CONTENT_NAME; +var ARROW_NAME = "TooltipArrow"; +var TooltipArrow = React.forwardRef( + (props, forwardedRef) => { + const { __scopeTooltip, ...arrowProps } = props; + const popperScope = usePopperScope(__scopeTooltip); + const visuallyHiddenContentContext = useVisuallyHiddenContentContext( + ARROW_NAME, + __scopeTooltip + ); + return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }); + } +); +TooltipArrow.displayName = ARROW_NAME; +function getExitSideFromRect(point, rect) { + const top = Math.abs(rect.top - point.y); + const bottom = Math.abs(rect.bottom - point.y); + const right = Math.abs(rect.right - point.x); + const left = Math.abs(rect.left - point.x); + switch (Math.min(top, bottom, right, left)) { + case left: + return "left"; + case right: + return "right"; + case top: + return "top"; + case bottom: + return "bottom"; + default: + throw new Error("unreachable"); + } +} +function getPaddedExitPoints(exitPoint, exitSide, padding = 5) { + const paddedExitPoints = []; + switch (exitSide) { + case "top": + paddedExitPoints.push( + { x: exitPoint.x - padding, y: exitPoint.y + padding }, + { x: exitPoint.x + padding, y: exitPoint.y + padding } + ); + break; + case "bottom": + paddedExitPoints.push( + { x: exitPoint.x - padding, y: exitPoint.y - padding }, + { x: exitPoint.x + padding, y: exitPoint.y - padding } + ); + break; + case "left": + paddedExitPoints.push( + { x: exitPoint.x + padding, y: exitPoint.y - padding }, + { x: exitPoint.x + padding, y: exitPoint.y + padding } + ); + break; + case "right": + paddedExitPoints.push( + { x: exitPoint.x - padding, y: exitPoint.y - padding }, + { x: exitPoint.x - padding, y: exitPoint.y + padding } + ); + break; + } + return paddedExitPoints; +} +function getPointsFromRect(rect) { + const { top, right, bottom, left } = rect; + return [ + { x: left, y: top }, + { x: right, y: top }, + { x: right, y: bottom }, + { x: left, y: bottom } + ]; +} +function isPointInPolygon(point, polygon) { + const { x, y } = point; + let inside = false; + for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) { + const ii = polygon[i]; + const jj = polygon[j]; + const xi = ii.x; + const yi = ii.y; + const xj = jj.x; + const yj = jj.y; + const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi; + if (intersect) inside = !inside; + } + return inside; +} +function getHull(points) { + const newPoints = points.slice(); + newPoints.sort((a, b) => { + if (a.x < b.x) return -1; + else if (a.x > b.x) return 1; + else if (a.y < b.y) return -1; + else if (a.y > b.y) return 1; + else return 0; + }); + return getHullPresorted(newPoints); +} +function getHullPresorted(points) { + if (points.length <= 1) return points.slice(); + const upperHull = []; + for (let i = 0; i < points.length; i++) { + const p = points[i]; + while (upperHull.length >= 2) { + const q = upperHull[upperHull.length - 1]; + const r = upperHull[upperHull.length - 2]; + if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop(); + else break; + } + upperHull.push(p); + } + upperHull.pop(); + const lowerHull = []; + for (let i = points.length - 1; i >= 0; i--) { + const p = points[i]; + while (lowerHull.length >= 2) { + const q = lowerHull[lowerHull.length - 1]; + const r = lowerHull[lowerHull.length - 2]; + if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop(); + else break; + } + lowerHull.push(p); + } + lowerHull.pop(); + if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) { + return upperHull; + } else { + return upperHull.concat(lowerHull); + } +} +var Provider = TooltipProvider; +var Root3 = Tooltip; +var Trigger = TooltipTrigger; +var Portal = TooltipPortal; +var Content2 = TooltipContent; +var Arrow2 = TooltipArrow; +export { + Arrow2 as Arrow, + Content2 as Content, + Portal, + Provider, + Root3 as Root, + Tooltip, + TooltipArrow, + TooltipContent, + TooltipPortal, + TooltipProvider, + TooltipTrigger, + Trigger, + createTooltipScope +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..c12ae7d62ff26482559c1c2804e71620cc57fc5b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/tooltip.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createSlottable } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype ScopedProps

= P & { __scopeTooltip?: Scope };\nconst [createTooltipContext, createTooltipScope] = createContextScope('Tooltip', [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipProvider\n * -----------------------------------------------------------------------------------------------*/\n\nconst PROVIDER_NAME = 'TooltipProvider';\nconst DEFAULT_DELAY_DURATION = 700;\nconst TOOLTIP_OPEN = 'tooltip.open';\n\ntype TooltipProviderContextValue = {\n isOpenDelayedRef: React.MutableRefObject;\n delayDuration: number;\n onOpen(): void;\n onClose(): void;\n onPointerInTransitChange(inTransit: boolean): void;\n isPointerInTransitRef: React.MutableRefObject;\n disableHoverableContent: boolean;\n};\n\nconst [TooltipProviderContextProvider, useTooltipProviderContext] =\n createTooltipContext(PROVIDER_NAME);\n\ninterface TooltipProviderProps {\n children: React.ReactNode;\n /**\n * The duration from when the pointer enters the trigger until the tooltip gets opened.\n * @defaultValue 700\n */\n delayDuration?: number;\n /**\n * How much time a user has to enter another trigger without incurring a delay again.\n * @defaultValue 300\n */\n skipDelayDuration?: number;\n /**\n * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.\n * @defaultValue false\n */\n disableHoverableContent?: boolean;\n}\n\nconst TooltipProvider: React.FC = (\n props: ScopedProps\n) => {\n const {\n __scopeTooltip,\n delayDuration = DEFAULT_DELAY_DURATION,\n skipDelayDuration = 300,\n disableHoverableContent = false,\n children,\n } = props;\n const isOpenDelayedRef = React.useRef(true);\n const isPointerInTransitRef = React.useRef(false);\n const skipDelayTimerRef = React.useRef(0);\n\n React.useEffect(() => {\n const skipDelayTimer = skipDelayTimerRef.current;\n return () => window.clearTimeout(skipDelayTimer);\n }, []);\n\n return (\n {\n window.clearTimeout(skipDelayTimerRef.current);\n isOpenDelayedRef.current = false;\n }, [])}\n onClose={React.useCallback(() => {\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(\n () => (isOpenDelayedRef.current = true),\n skipDelayDuration\n );\n }, [skipDelayDuration])}\n isPointerInTransitRef={isPointerInTransitRef}\n onPointerInTransitChange={React.useCallback((inTransit: boolean) => {\n isPointerInTransitRef.current = inTransit;\n }, [])}\n disableHoverableContent={disableHoverableContent}\n >\n {children}\n \n );\n};\n\nTooltipProvider.displayName = PROVIDER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * Tooltip\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOOLTIP_NAME = 'Tooltip';\n\ntype TooltipContextValue = {\n contentId: string;\n open: boolean;\n stateAttribute: 'closed' | 'delayed-open' | 'instant-open';\n trigger: TooltipTriggerElement | null;\n onTriggerChange(trigger: TooltipTriggerElement | null): void;\n onTriggerEnter(): void;\n onTriggerLeave(): void;\n onOpen(): void;\n onClose(): void;\n disableHoverableContent: boolean;\n};\n\nconst [TooltipContextProvider, useTooltipContext] =\n createTooltipContext(TOOLTIP_NAME);\n\ninterface TooltipProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /**\n * The duration from when the pointer enters the trigger until the tooltip gets opened. This will\n * override the prop with the same name passed to Provider.\n * @defaultValue 700\n */\n delayDuration?: number;\n /**\n * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.\n * @defaultValue false\n */\n disableHoverableContent?: boolean;\n}\n\nconst Tooltip: React.FC = (props: ScopedProps) => {\n const {\n __scopeTooltip,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n disableHoverableContent: disableHoverableContentProp,\n delayDuration: delayDurationProp,\n } = props;\n const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const [trigger, setTrigger] = React.useState(null);\n const contentId = useId();\n const openTimerRef = React.useRef(0);\n const disableHoverableContent =\n disableHoverableContentProp ?? providerContext.disableHoverableContent;\n const delayDuration = delayDurationProp ?? providerContext.delayDuration;\n const wasOpenDelayedRef = React.useRef(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: (open) => {\n if (open) {\n providerContext.onOpen();\n\n // as `onChange` is called within a lifecycle method we\n // avoid dispatching via `dispatchDiscreteCustomEvent`.\n document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));\n } else {\n providerContext.onClose();\n }\n onOpenChange?.(open);\n },\n caller: TOOLTIP_NAME,\n });\n const stateAttribute = React.useMemo(() => {\n return open ? (wasOpenDelayedRef.current ? 'delayed-open' : 'instant-open') : 'closed';\n }, [open]);\n\n const handleOpen = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n wasOpenDelayedRef.current = false;\n setOpen(true);\n }, [setOpen]);\n\n const handleClose = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n setOpen(false);\n }, [setOpen]);\n\n const handleDelayedOpen = React.useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = window.setTimeout(() => {\n wasOpenDelayedRef.current = true;\n setOpen(true);\n openTimerRef.current = 0;\n }, delayDuration);\n }, [delayDuration, setOpen]);\n\n React.useEffect(() => {\n return () => {\n if (openTimerRef.current) {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n };\n }, []);\n\n return (\n \n {\n if (providerContext.isOpenDelayedRef.current) handleDelayedOpen();\n else handleOpen();\n }, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen])}\n onTriggerLeave={React.useCallback(() => {\n if (disableHoverableContent) {\n handleClose();\n } else {\n // Clear the timer in case the pointer leaves the trigger before the tooltip is opened.\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n }, [handleClose, disableHoverableContent])}\n onOpen={handleOpen}\n onClose={handleClose}\n disableHoverableContent={disableHoverableContent}\n >\n {children}\n \n \n );\n};\n\nTooltip.displayName = TOOLTIP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'TooltipTrigger';\n\ntype TooltipTriggerElement = React.ComponentRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface TooltipTriggerProps extends PrimitiveButtonProps {}\n\nconst TooltipTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeTooltip, ...triggerProps } = props;\n const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip);\n const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange);\n const isPointerDownRef = React.useRef(false);\n const hasPointerMoveOpenedRef = React.useRef(false);\n const handlePointerUp = React.useCallback(() => (isPointerDownRef.current = false), []);\n\n React.useEffect(() => {\n return () => document.removeEventListener('pointerup', handlePointerUp);\n }, [handlePointerUp]);\n\n return (\n \n {\n if (event.pointerType === 'touch') return;\n if (\n !hasPointerMoveOpenedRef.current &&\n !providerContext.isPointerInTransitRef.current\n ) {\n context.onTriggerEnter();\n hasPointerMoveOpenedRef.current = true;\n }\n })}\n onPointerLeave={composeEventHandlers(props.onPointerLeave, () => {\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n })}\n onPointerDown={composeEventHandlers(props.onPointerDown, () => {\n if (context.open) {\n context.onClose();\n }\n isPointerDownRef.current = true;\n document.addEventListener('pointerup', handlePointerUp, { once: true });\n })}\n onFocus={composeEventHandlers(props.onFocus, () => {\n if (!isPointerDownRef.current) context.onOpen();\n })}\n onBlur={composeEventHandlers(props.onBlur, context.onClose)}\n onClick={composeEventHandlers(props.onClick, context.onClose)}\n />\n \n );\n }\n);\n\nTooltipTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'TooltipPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = React.ComponentPropsWithoutRef;\ninterface TooltipPortalProps {\n children?: React.ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst TooltipPortal: React.FC = (props: ScopedProps) => {\n const { __scopeTooltip, forceMount, children, container } = props;\n const context = useTooltipContext(PORTAL_NAME, __scopeTooltip);\n return (\n \n \n \n {children}\n \n \n \n );\n};\n\nTooltipPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'TooltipContent';\n\ntype TooltipContentElement = TooltipContentImplElement;\ninterface TooltipContentProps extends TooltipContentImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst TooltipContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip);\n const { forceMount = portalContext.forceMount, side = 'top', ...contentProps } = props;\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n\n return (\n \n {context.disableHoverableContent ? (\n \n ) : (\n \n )}\n \n );\n }\n);\n\ntype Point = { x: number; y: number };\ntype Polygon = Point[];\n\ntype TooltipContentHoverableElement = TooltipContentImplElement;\ninterface TooltipContentHoverableProps extends TooltipContentImplProps {}\n\nconst TooltipContentHoverable = React.forwardRef<\n TooltipContentHoverableElement,\n TooltipContentHoverableProps\n>((props: ScopedProps, forwardedRef) => {\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [pointerGraceArea, setPointerGraceArea] = React.useState(null);\n\n const { trigger, onClose } = context;\n const content = ref.current;\n\n const { onPointerInTransitChange } = providerContext;\n\n const handleRemoveGraceArea = React.useCallback(() => {\n setPointerGraceArea(null);\n onPointerInTransitChange(false);\n }, [onPointerInTransitChange]);\n\n const handleCreateGraceArea = React.useCallback(\n (event: PointerEvent, hoverTarget: HTMLElement) => {\n const currentTarget = event.currentTarget as HTMLElement;\n const exitPoint = { x: event.clientX, y: event.clientY };\n const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());\n const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide);\n const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());\n const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]);\n setPointerGraceArea(graceArea);\n onPointerInTransitChange(true);\n },\n [onPointerInTransitChange]\n );\n\n React.useEffect(() => {\n return () => handleRemoveGraceArea();\n }, [handleRemoveGraceArea]);\n\n React.useEffect(() => {\n if (trigger && content) {\n const handleTriggerLeave = (event: PointerEvent) => handleCreateGraceArea(event, content);\n const handleContentLeave = (event: PointerEvent) => handleCreateGraceArea(event, trigger);\n\n trigger.addEventListener('pointerleave', handleTriggerLeave);\n content.addEventListener('pointerleave', handleContentLeave);\n return () => {\n trigger.removeEventListener('pointerleave', handleTriggerLeave);\n content.removeEventListener('pointerleave', handleContentLeave);\n };\n }\n }, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);\n\n React.useEffect(() => {\n if (pointerGraceArea) {\n const handleTrackPointerGrace = (event: PointerEvent) => {\n const target = event.target as HTMLElement;\n const pointerPosition = { x: event.clientX, y: event.clientY };\n const hasEnteredTarget = trigger?.contains(target) || content?.contains(target);\n const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea);\n\n if (hasEnteredTarget) {\n handleRemoveGraceArea();\n } else if (isPointerOutsideGraceArea) {\n handleRemoveGraceArea();\n onClose();\n }\n };\n document.addEventListener('pointermove', handleTrackPointerGrace);\n return () => document.removeEventListener('pointermove', handleTrackPointerGrace);\n }\n }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);\n\n return ;\n});\n\nconst [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] =\n createTooltipContext(TOOLTIP_NAME, { isInside: false });\n\ntype TooltipContentImplElement = React.ComponentRef;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef;\ntype PopperContentProps = React.ComponentPropsWithoutRef;\ninterface TooltipContentImplProps extends Omit {\n /**\n * A more descriptive label for accessibility purpose\n */\n 'aria-label'?: string;\n\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `Tooltip`.\n * Can be prevented.\n */\n onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n}\n\nconst Slottable = createSlottable('TooltipContent');\n\nconst TooltipContentImpl = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeTooltip,\n children,\n 'aria-label': ariaLabel,\n onEscapeKeyDown,\n onPointerDownOutside,\n ...contentProps\n } = props;\n const context = useTooltipContext(CONTENT_NAME, __scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const { onClose } = context;\n\n // Close this tooltip if another one opens\n React.useEffect(() => {\n document.addEventListener(TOOLTIP_OPEN, onClose);\n return () => document.removeEventListener(TOOLTIP_OPEN, onClose);\n }, [onClose]);\n\n // Close the tooltip if the trigger is scrolled\n React.useEffect(() => {\n if (context.trigger) {\n const handleScroll = (event: Event) => {\n const target = event.target as HTMLElement;\n if (target?.contains(context.trigger)) onClose();\n };\n window.addEventListener('scroll', handleScroll, { capture: true });\n return () => window.removeEventListener('scroll', handleScroll, { capture: true });\n }\n }, [context.trigger, onClose]);\n\n return (\n event.preventDefault()}\n onDismiss={onClose}\n >\n \n {children}\n \n \n {ariaLabel || children}\n \n \n \n \n );\n }\n);\n\nTooltipContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'TooltipArrow';\n\ntype TooltipArrowElement = React.ComponentRef;\ntype PopperArrowProps = React.ComponentPropsWithoutRef;\ninterface TooltipArrowProps extends PopperArrowProps {}\n\nconst TooltipArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeTooltip, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeTooltip);\n const visuallyHiddenContentContext = useVisuallyHiddenContentContext(\n ARROW_NAME,\n __scopeTooltip\n );\n // if the arrow is inside the `VisuallyHidden`, we don't want to render it all to\n // prevent issues in positioning the arrow due to the duplicate\n return visuallyHiddenContentContext.isInside ? null : (\n \n );\n }\n);\n\nTooltipArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype Side = NonNullable;\n\nfunction getExitSideFromRect(point: Point, rect: DOMRect): Side {\n const top = Math.abs(rect.top - point.y);\n const bottom = Math.abs(rect.bottom - point.y);\n const right = Math.abs(rect.right - point.x);\n const left = Math.abs(rect.left - point.x);\n\n switch (Math.min(top, bottom, right, left)) {\n case left:\n return 'left';\n case right:\n return 'right';\n case top:\n return 'top';\n case bottom:\n return 'bottom';\n default:\n throw new Error('unreachable');\n }\n}\n\nfunction getPaddedExitPoints(exitPoint: Point, exitSide: Side, padding = 5) {\n const paddedExitPoints: Point[] = [];\n switch (exitSide) {\n case 'top':\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y + padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case 'bottom':\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y - padding }\n );\n break;\n case 'left':\n paddedExitPoints.push(\n { x: exitPoint.x + padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case 'right':\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x - padding, y: exitPoint.y + padding }\n );\n break;\n }\n return paddedExitPoints;\n}\n\nfunction getPointsFromRect(rect: DOMRect) {\n const { top, right, bottom, left } = rect;\n return [\n { x: left, y: top },\n { x: right, y: top },\n { x: right, y: bottom },\n { x: left, y: bottom },\n ];\n}\n\n// Determine if a point is inside of a polygon.\n// Based on https://github.com/substack/point-in-polygon\nfunction isPointInPolygon(point: Point, polygon: Polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const ii = polygon[i]!;\n const jj = polygon[j]!;\n const xi = ii.x;\n const yi = ii.y;\n const xj = jj.x;\n const yj = jj.y;\n\n // prettier-ignore\n const intersect = ((yi > y) !== (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\n if (intersect) inside = !inside;\n }\n\n return inside;\n}\n\n// Returns a new array of points representing the convex hull of the given set of points.\n// https://www.nayuki.io/page/convex-hull-algorithm\nfunction getHull

(points: Readonly>): Array

{\n const newPoints: Array

= points.slice();\n newPoints.sort((a: Point, b: Point) => {\n if (a.x < b.x) return -1;\n else if (a.x > b.x) return +1;\n else if (a.y < b.y) return -1;\n else if (a.y > b.y) return +1;\n else return 0;\n });\n return getHullPresorted(newPoints);\n}\n\n// Returns the convex hull, assuming that each points[i] <= points[i + 1]. Runs in O(n) time.\nfunction getHullPresorted

(points: Readonly>): Array

{\n if (points.length <= 1) return points.slice();\n\n const upperHull: Array

= [];\n for (let i = 0; i < points.length; i++) {\n const p = points[i]!;\n while (upperHull.length >= 2) {\n const q = upperHull[upperHull.length - 1]!;\n const r = upperHull[upperHull.length - 2]!;\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop();\n else break;\n }\n upperHull.push(p);\n }\n upperHull.pop();\n\n const lowerHull: Array

= [];\n for (let i = points.length - 1; i >= 0; i--) {\n const p = points[i]!;\n while (lowerHull.length >= 2) {\n const q = lowerHull[lowerHull.length - 1]!;\n const r = lowerHull[lowerHull.length - 2]!;\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop();\n else break;\n }\n lowerHull.push(p);\n }\n lowerHull.pop();\n\n if (\n upperHull.length === 1 &&\n lowerHull.length === 1 &&\n upperHull[0]!.x === lowerHull[0]!.x &&\n upperHull[0]!.y === lowerHull[0]!.y\n ) {\n return upperHull;\n } else {\n return upperHull.concat(lowerHull);\n }\n}\n\nconst Provider = TooltipProvider;\nconst Root = Tooltip;\nconst Trigger = TooltipTrigger;\nconst Portal = TooltipPortal;\nconst Content = TooltipContent;\nconst Arrow = TooltipArrow;\n\nexport {\n createTooltipScope,\n //\n TooltipProvider,\n Tooltip,\n TooltipTrigger,\n TooltipPortal,\n TooltipContent,\n TooltipArrow,\n //\n Provider,\n Root,\n Trigger,\n Portal,\n Content,\n Arrow,\n};\nexport type {\n TooltipProviderProps,\n TooltipProps,\n TooltipTriggerProps,\n TooltipPortalProps,\n TooltipContentProps,\n TooltipArrowProps,\n};\n"], + "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AACjC,SAAS,aAAa;AACtB,YAAY,qBAAqB;AACjC,SAAS,yBAAyB;AAClC,SAAS,UAAU,uBAAuB;AAC1C,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AACrC,YAAY,6BAA6B;AAsErC,cAgdI,YAhdJ;AAjEJ,IAAM,CAAC,sBAAsB,kBAAkB,IAAI,mBAAmB,WAAW;AAAA,EAC/E;AACF,CAAC;AACD,IAAM,iBAAiB,kBAAkB;AAMzC,IAAM,gBAAgB;AACtB,IAAM,yBAAyB;AAC/B,IAAM,eAAe;AAYrB,IAAM,CAAC,gCAAgC,yBAAyB,IAC9D,qBAAkD,aAAa;AAqBjE,IAAM,kBAAkD,CAC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A,cAAU,KAAK,CAAC;AAAA,EAClB;AACA,YAAU,IAAI;AAEd,QAAM,YAAsB,CAAC;AAC7B,WAAS,IAAI,OAAO,SAAS,GAAG,KAAK,GAAG,KAAK;AAC3C,UAAM,IAAI,OAAO,CAAC;AAClB,WAAO,UAAU,UAAU,GAAG;AAC5B,YAAM,IAAI,UAAU,UAAU,SAAS,CAAC;AACxC,YAAM,IAAI,UAAU,UAAU,SAAS,CAAC;AACxC,WAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAI,WAAU,IAAI;AAAA,UACrE;AAAA,IACP;AACA,cAAU,KAAK,CAAC;AAAA,EAClB;AACA,YAAU,IAAI;AAEd,MACE,UAAU,WAAW,KACrB,UAAU,WAAW,KACrB,UAAU,CAAC,EAAG,MAAM,UAAU,CAAC,EAAG,KAClC,UAAU,CAAC,EAAG,MAAM,UAAU,CAAC,EAAG,GAClC;AACA,WAAO;AAAA,EACT,OAAO;AACL,WAAO,UAAU,OAAO,SAAS;AAAA,EACnC;AACF;AAEA,IAAM,WAAW;AACjB,IAAMC,QAAO;AACb,IAAM,UAAU;AAChB,IAAM,SAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;", + "names": ["open", "Root", "Content", "Arrow"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/package.json b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/package.json new file mode 100644 index 0000000000000000000000000000000000000000..063989a296e940eb204fc26c3e6c6f33fe9f324a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.1.7_@types+react@19.1.9__@types+react_d7d11436e196c21603ab6d0860129fca/node_modules/@radix-ui/react-tooltip/package.json @@ -0,0 +1,79 @@ +{ + "name": "@radix-ui/react-tooltip", + "version": "1.2.8", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-compose-refs": "1.1.2", + "@radix-ui/react-context": "1.1.2", + "@radix-ui/react-dismissable-layer": "1.1.11", + "@radix-ui/react-id": "1.1.1", + "@radix-ui/react-popper": "1.2.8", + "@radix-ui/react-portal": "1.1.9", + "@radix-ui/react-presence": "1.1.5", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-slot": "1.2.3", + "@radix-ui/react-use-controllable-state": "1.2.2", + "@radix-ui/react-visually-hidden": "1.2.3" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/README.md b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fbfdae923d451cf4bf0dac8ce926ed2ce3e49a84 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/README.md @@ -0,0 +1,13 @@ +# `react-use-callback-ref` + +## Installation + +```sh +$ yarn add @radix-ui/react-use-callback-ref +# or +$ npm install @radix-ui/react-use-callback-ref +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..9d20cd6020ac3c3560dfee95e67dc0e9552b5c2c --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.mts @@ -0,0 +1,7 @@ +/** + * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a + * prop or avoid re-executing effects when passed as a dependency + */ +declare function useCallbackRef any>(callback: T | undefined): T; + +export { useCallbackRef }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9d20cd6020ac3c3560dfee95e67dc0e9552b5c2c --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts @@ -0,0 +1,7 @@ +/** + * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a + * prop or avoid re-executing effects when passed as a dependency + */ +declare function useCallbackRef any>(callback: T | undefined): T; + +export { useCallbackRef }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..76f1bfc00baff66d659b86513e3eb37b8f8e3525 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js @@ -0,0 +1,46 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/react/use-callback-ref/src/index.ts +var index_exports = {}; +__export(index_exports, { + useCallbackRef: () => useCallbackRef +}); +module.exports = __toCommonJS(index_exports); + +// packages/react/use-callback-ref/src/use-callback-ref.tsx +var React = __toESM(require("react")); +function useCallbackRef(callback) { + const callbackRef = React.useRef(callback); + React.useEffect(() => { + callbackRef.current = callback; + }); + return React.useMemo(() => (...args) => callbackRef.current?.(...args), []); +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..af29c34977c2a51ed0f6893426e8499e5270e2ab --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/use-callback-ref.tsx"], + "sourcesContent": ["export { useCallbackRef } from './use-callback-ref';\n", "import * as React from 'react';\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\nfunction useCallbackRef any>(callback: T | undefined): T {\n const callbackRef = React.useRef(callback);\n\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n\n // https://github.com/facebook/react/issues/19240\n return React.useMemo(() => ((...args) => callbackRef.current?.(...args)) as T, []);\n}\n\nexport { useCallbackRef };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAMvB,SAAS,eAAkD,UAA4B;AACrF,QAAM,cAAoB,aAAO,QAAQ;AAEzC,EAAM,gBAAU,MAAM;AACpB,gBAAY,UAAU;AAAA,EACxB,CAAC;AAGD,SAAa,cAAQ,MAAO,IAAI,SAAS,YAAY,UAAU,GAAG,IAAI,GAAS,CAAC,CAAC;AACnF;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a53d5eda72893f555fa2c2d8342db6dd349f1e4b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs @@ -0,0 +1,13 @@ +// packages/react/use-callback-ref/src/use-callback-ref.tsx +import * as React from "react"; +function useCallbackRef(callback) { + const callbackRef = React.useRef(callback); + React.useEffect(() => { + callbackRef.current = callback; + }); + return React.useMemo(() => (...args) => callbackRef.current?.(...args), []); +} +export { + useCallbackRef +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..d0d07c6869ff35a32632a2325c7c97f76c667c74 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/use-callback-ref.tsx"], + "sourcesContent": ["import * as React from 'react';\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\nfunction useCallbackRef any>(callback: T | undefined): T {\n const callbackRef = React.useRef(callback);\n\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n\n // https://github.com/facebook/react/issues/19240\n return React.useMemo(() => ((...args) => callbackRef.current?.(...args)) as T, []);\n}\n\nexport { useCallbackRef };\n"], + "mappings": ";AAAA,YAAY,WAAW;AAMvB,SAAS,eAAkD,UAA4B;AACrF,QAAM,cAAoB,aAAO,QAAQ;AAEzC,EAAM,gBAAU,MAAM;AACpB,gBAAY,UAAU;AAAA,EACxB,CAAC;AAGD,SAAa,cAAQ,MAAO,IAAI,SAAS,YAAY,UAAU,GAAG,IAAI,GAAS,CAAC,CAAC;AACnF;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/package.json b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/package.json new file mode 100644 index 0000000000000000000000000000000000000000..dab1c0dd7add63aab17653ff60fe22e8e4937baa --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/package.json @@ -0,0 +1,75 @@ +{ + "name": "@radix-ui/react-use-callback-ref", + "version": "1.1.1", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "typescript": "^5.7.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/LICENSE b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/README.md b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c6197cdd8a4e786098ed6f08ef5a980e7d881ac2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/README.md @@ -0,0 +1,3 @@ +# `react-use-controllable-state` + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ce96359fce01d4acd8d4b492005e7730ab14b07d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts @@ -0,0 +1,40 @@ +import * as React from 'react'; + +type ChangeHandler$1 = (state: T) => void; +type SetStateFn = React.Dispatch>; +interface UseControllableStateParams$1 { + prop?: T | undefined; + defaultProp: T; + onChange?: ChangeHandler$1; + caller?: string; +} +declare function useControllableState({ prop, defaultProp, onChange, caller, }: UseControllableStateParams$1): [T, SetStateFn]; + +type ChangeHandler = (state: T) => void; +interface UseControllableStateParams { + prop: T | undefined; + defaultProp: T; + onChange: ChangeHandler | undefined; + caller: string; +} +interface AnyAction { + type: string; +} +declare function useControllableStateReducer(reducer: (prevState: S & { + state: T; +}, action: A) => S & { + state: T; +}, userArgs: UseControllableStateParams, initialState: S): [S & { + state: T; +}, React.Dispatch]; +declare function useControllableStateReducer(reducer: (prevState: S & { + state: T; +}, action: A) => S & { + state: T; +}, userArgs: UseControllableStateParams, initialArg: I, init: (i: I & { + state: T; +}) => S): [S & { + state: T; +}, React.Dispatch]; + +export { useControllableState, useControllableStateReducer }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ce96359fce01d4acd8d4b492005e7730ab14b07d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts @@ -0,0 +1,40 @@ +import * as React from 'react'; + +type ChangeHandler$1 = (state: T) => void; +type SetStateFn = React.Dispatch>; +interface UseControllableStateParams$1 { + prop?: T | undefined; + defaultProp: T; + onChange?: ChangeHandler$1; + caller?: string; +} +declare function useControllableState({ prop, defaultProp, onChange, caller, }: UseControllableStateParams$1): [T, SetStateFn]; + +type ChangeHandler = (state: T) => void; +interface UseControllableStateParams { + prop: T | undefined; + defaultProp: T; + onChange: ChangeHandler | undefined; + caller: string; +} +interface AnyAction { + type: string; +} +declare function useControllableStateReducer(reducer: (prevState: S & { + state: T; +}, action: A) => S & { + state: T; +}, userArgs: UseControllableStateParams, initialState: S): [S & { + state: T; +}, React.Dispatch]; +declare function useControllableStateReducer(reducer: (prevState: S & { + state: T; +}, action: A) => S & { + state: T; +}, userArgs: UseControllableStateParams, initialArg: I, init: (i: I & { + state: T; +}) => S): [S & { + state: T; +}, React.Dispatch]; + +export { useControllableState, useControllableStateReducer }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..fa560a606da258ad101291c024f4a9a3a6eab4fc --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js @@ -0,0 +1,169 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + useControllableState: () => useControllableState, + useControllableStateReducer: () => useControllableStateReducer +}); +module.exports = __toCommonJS(index_exports); + +// src/use-controllable-state.tsx +var React = __toESM(require("react")); +var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect"); +var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || import_react_use_layout_effect.useLayoutEffect; +function useControllableState({ + prop, + defaultProp, + onChange = () => { + }, + caller +}) { + const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({ + defaultProp, + onChange + }); + const isControlled = prop !== void 0; + const value = isControlled ? prop : uncontrolledProp; + if (true) { + const isControlledRef = React.useRef(prop !== void 0); + React.useEffect(() => { + const wasControlled = isControlledRef.current; + if (wasControlled !== isControlled) { + const from = wasControlled ? "controlled" : "uncontrolled"; + const to = isControlled ? "controlled" : "uncontrolled"; + console.warn( + `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.` + ); + } + isControlledRef.current = isControlled; + }, [isControlled, caller]); + } + const setValue = React.useCallback( + (nextValue) => { + if (isControlled) { + const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue; + if (value2 !== prop) { + onChangeRef.current?.(value2); + } + } else { + setUncontrolledProp(nextValue); + } + }, + [isControlled, prop, setUncontrolledProp, onChangeRef] + ); + return [value, setValue]; +} +function useUncontrolledState({ + defaultProp, + onChange +}) { + const [value, setValue] = React.useState(defaultProp); + const prevValueRef = React.useRef(value); + const onChangeRef = React.useRef(onChange); + useInsertionEffect(() => { + onChangeRef.current = onChange; + }, [onChange]); + React.useEffect(() => { + if (prevValueRef.current !== value) { + onChangeRef.current?.(value); + prevValueRef.current = value; + } + }, [value, prevValueRef]); + return [value, setValue, onChangeRef]; +} +function isFunction(value) { + return typeof value === "function"; +} + +// src/use-controllable-state-reducer.tsx +var React2 = __toESM(require("react")); +var import_react_use_effect_event = require("@radix-ui/react-use-effect-event"); +var SYNC_STATE = Symbol("RADIX:SYNC_STATE"); +function useControllableStateReducer(reducer, userArgs, initialArg, init) { + const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs; + const isControlled = controlledState !== void 0; + const onChange = (0, import_react_use_effect_event.useEffectEvent)(onChangeProp); + if (true) { + const isControlledRef = React2.useRef(controlledState !== void 0); + React2.useEffect(() => { + const wasControlled = isControlledRef.current; + if (wasControlled !== isControlled) { + const from = wasControlled ? "controlled" : "uncontrolled"; + const to = isControlled ? "controlled" : "uncontrolled"; + console.warn( + `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.` + ); + } + isControlledRef.current = isControlled; + }, [isControlled, caller]); + } + const args = [{ ...initialArg, state: defaultProp }]; + if (init) { + args.push(init); + } + const [internalState, dispatch] = React2.useReducer( + (state2, action) => { + if (action.type === SYNC_STATE) { + return { ...state2, state: action.state }; + } + const next = reducer(state2, action); + if (isControlled && !Object.is(next.state, state2.state)) { + onChange(next.state); + } + return next; + }, + ...args + ); + const uncontrolledState = internalState.state; + const prevValueRef = React2.useRef(uncontrolledState); + React2.useEffect(() => { + if (prevValueRef.current !== uncontrolledState) { + prevValueRef.current = uncontrolledState; + if (!isControlled) { + onChange(uncontrolledState); + } + } + }, [onChange, uncontrolledState, prevValueRef, isControlled]); + const state = React2.useMemo(() => { + const isControlled2 = controlledState !== void 0; + if (isControlled2) { + return { ...internalState, state: controlledState }; + } + return internalState; + }, [internalState, controlledState]); + React2.useEffect(() => { + if (isControlled && !Object.is(controlledState, internalState.state)) { + dispatch({ type: SYNC_STATE, state: controlledState }); + } + }, [controlledState, internalState.state, isControlled]); + return [state, dispatch]; +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..60fa538394ebfb871a4be91e20aa703ddbdf8317 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/use-controllable-state.tsx", "../src/use-controllable-state-reducer.tsx"], + "sourcesContent": ["export { useControllableState } from './use-controllable-state';\nexport { useControllableStateReducer } from './use-controllable-state-reducer';\n", "import * as React from 'react';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n// Prevent bundlers from trying to optimize the import\nconst useInsertionEffect: typeof useLayoutEffect =\n (React as any)[' useInsertionEffect '.trim().toString()] || useLayoutEffect;\n\ntype ChangeHandler = (state: T) => void;\ntype SetStateFn = React.Dispatch>;\n\ninterface UseControllableStateParams {\n prop?: T | undefined;\n defaultProp: T;\n onChange?: ChangeHandler;\n caller?: string;\n}\n\nexport function useControllableState({\n prop,\n defaultProp,\n onChange = () => {},\n caller,\n}: UseControllableStateParams): [T, SetStateFn] {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange,\n });\n const isControlled = prop !== undefined;\n const value = isControlled ? prop : uncontrolledProp;\n\n // OK to disable conditionally calling hooks here because they will always run\n // consistently in the same environment. Bundlers should be able to remove the\n // code block entirely in production.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (process.env.NODE_ENV !== 'production') {\n const isControlledRef = React.useRef(prop !== undefined);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? 'controlled' : 'uncontrolled';\n const to = isControlled ? 'controlled' : 'uncontrolled';\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n /* eslint-enable react-hooks/rules-of-hooks */\n\n const setValue = React.useCallback>(\n (nextValue) => {\n if (isControlled) {\n const value = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value !== prop) {\n onChangeRef.current?.(value);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n\n return [value, setValue];\n}\n\nfunction useUncontrolledState({\n defaultProp,\n onChange,\n}: Omit, 'prop'>): [\n Value: T,\n setValue: React.Dispatch>,\n OnChangeRef: React.RefObject | undefined>,\n] {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n\n return [value, setValue, onChangeRef];\n}\n\nfunction isFunction(value: unknown): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n", "import * as React from 'react';\nimport { useEffectEvent } from '@radix-ui/react-use-effect-event';\n\ntype ChangeHandler = (state: T) => void;\n\ninterface UseControllableStateParams {\n prop: T | undefined;\n defaultProp: T;\n onChange: ChangeHandler | undefined;\n caller: string;\n}\n\ninterface AnyAction {\n type: string;\n}\n\nconst SYNC_STATE = Symbol('RADIX:SYNC_STATE');\n\ninterface SyncStateAction {\n type: typeof SYNC_STATE;\n state: T;\n}\n\nexport function useControllableStateReducer(\n reducer: (prevState: S & { state: T }, action: A) => S & { state: T },\n userArgs: UseControllableStateParams,\n initialState: S\n): [S & { state: T }, React.Dispatch];\n\nexport function useControllableStateReducer(\n reducer: (prevState: S & { state: T }, action: A) => S & { state: T },\n userArgs: UseControllableStateParams,\n initialArg: I,\n init: (i: I & { state: T }) => S\n): [S & { state: T }, React.Dispatch];\n\nexport function useControllableStateReducer(\n reducer: (prevState: S & { state: T }, action: A) => S & { state: T },\n userArgs: UseControllableStateParams,\n initialArg: any,\n init?: (i: any) => Omit\n): [S & { state: T }, React.Dispatch] {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== undefined;\n\n const onChange = useEffectEvent(onChangeProp);\n\n // OK to disable conditionally calling hooks here because they will always run\n // consistently in the same environment. Bundlers should be able to remove the\n // code block entirely in production.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (process.env.NODE_ENV !== 'production') {\n const isControlledRef = React.useRef(controlledState !== undefined);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? 'controlled' : 'uncontrolled';\n const to = isControlled ? 'controlled' : 'uncontrolled';\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n /* eslint-enable react-hooks/rules-of-hooks */\n\n type InternalState = S & { state: T };\n const args: [InternalState] = [{ ...initialArg, state: defaultProp }];\n if (init) {\n // @ts-expect-error\n args.push(init);\n }\n\n const [internalState, dispatch] = React.useReducer(\n (state: InternalState, action: A | SyncStateAction): InternalState => {\n if (action.type === SYNC_STATE) {\n return { ...state, state: action.state };\n }\n\n const next = reducer(state, action);\n if (isControlled && !Object.is(next.state, state.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n\n const uncontrolledState = internalState.state;\n const prevValueRef = React.useRef(uncontrolledState);\n React.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n\n const state = React.useMemo(() => {\n const isControlled = controlledState !== undefined;\n if (isControlled) {\n return { ...internalState, state: controlledState };\n }\n\n return internalState;\n }, [internalState, controlledState]);\n\n React.useEffect(() => {\n // Sync internal state for controlled components so that reducer is called\n // with the correct state values\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n\n return [state, dispatch as React.Dispatch];\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,qCAAgC;AAGhC,IAAM,qBACH,MAAc,uBAAuB,KAAK,EAAE,SAAS,CAAC,KAAK;AAYvD,SAAS,qBAAwB;AAAA,EACtC;AAAA,EACA;AAAA,EACA,WAAW,MAAM;AAAA,EAAC;AAAA,EAClB;AACF,GAAsD;AACpD,QAAM,CAAC,kBAAkB,qBAAqB,WAAW,IAAI,qBAAqB;AAAA,IAChF;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,eAAe,SAAS;AAC9B,QAAM,QAAQ,eAAe,OAAO;AAMpC,MAAI,MAAuC;AACzC,UAAM,kBAAwB,aAAO,SAAS,MAAS;AACvD,IAAM,gBAAU,MAAM;AACpB,YAAM,gBAAgB,gBAAgB;AACtC,UAAI,kBAAkB,cAAc;AAClC,cAAM,OAAO,gBAAg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AO,EAAE,GAAG,eAAe,OAAO,gBAAgB;AAAA,IACpD;AAEA,WAAO;AAAA,EACT,GAAG,CAAC,eAAe,eAAe,CAAC;AAEnC,EAAM,iBAAU,MAAM;AAGpB,QAAI,gBAAgB,CAAC,OAAO,GAAG,iBAAiB,cAAc,KAAK,GAAG;AACpE,eAAS,EAAE,MAAM,YAAY,OAAO,gBAAgB,CAAC;AAAA,IACvD;AAAA,EACF,GAAG,CAAC,iBAAiB,cAAc,OAAO,YAAY,CAAC;AAEvD,SAAO,CAAC,OAAO,QAA6B;AAC9C;", + "names": ["value", "React", "state", "isControlled"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e6232154110ab9d91f31576eeb51345ac02ce0e2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs @@ -0,0 +1,136 @@ +// src/use-controllable-state.tsx +import * as React from "react"; +import { useLayoutEffect } from "@radix-ui/react-use-layout-effect"; +var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect; +function useControllableState({ + prop, + defaultProp, + onChange = () => { + }, + caller +}) { + const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({ + defaultProp, + onChange + }); + const isControlled = prop !== void 0; + const value = isControlled ? prop : uncontrolledProp; + if (true) { + const isControlledRef = React.useRef(prop !== void 0); + React.useEffect(() => { + const wasControlled = isControlledRef.current; + if (wasControlled !== isControlled) { + const from = wasControlled ? "controlled" : "uncontrolled"; + const to = isControlled ? "controlled" : "uncontrolled"; + console.warn( + `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.` + ); + } + isControlledRef.current = isControlled; + }, [isControlled, caller]); + } + const setValue = React.useCallback( + (nextValue) => { + if (isControlled) { + const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue; + if (value2 !== prop) { + onChangeRef.current?.(value2); + } + } else { + setUncontrolledProp(nextValue); + } + }, + [isControlled, prop, setUncontrolledProp, onChangeRef] + ); + return [value, setValue]; +} +function useUncontrolledState({ + defaultProp, + onChange +}) { + const [value, setValue] = React.useState(defaultProp); + const prevValueRef = React.useRef(value); + const onChangeRef = React.useRef(onChange); + useInsertionEffect(() => { + onChangeRef.current = onChange; + }, [onChange]); + React.useEffect(() => { + if (prevValueRef.current !== value) { + onChangeRef.current?.(value); + prevValueRef.current = value; + } + }, [value, prevValueRef]); + return [value, setValue, onChangeRef]; +} +function isFunction(value) { + return typeof value === "function"; +} + +// src/use-controllable-state-reducer.tsx +import * as React2 from "react"; +import { useEffectEvent } from "@radix-ui/react-use-effect-event"; +var SYNC_STATE = Symbol("RADIX:SYNC_STATE"); +function useControllableStateReducer(reducer, userArgs, initialArg, init) { + const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs; + const isControlled = controlledState !== void 0; + const onChange = useEffectEvent(onChangeProp); + if (true) { + const isControlledRef = React2.useRef(controlledState !== void 0); + React2.useEffect(() => { + const wasControlled = isControlledRef.current; + if (wasControlled !== isControlled) { + const from = wasControlled ? "controlled" : "uncontrolled"; + const to = isControlled ? "controlled" : "uncontrolled"; + console.warn( + `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.` + ); + } + isControlledRef.current = isControlled; + }, [isControlled, caller]); + } + const args = [{ ...initialArg, state: defaultProp }]; + if (init) { + args.push(init); + } + const [internalState, dispatch] = React2.useReducer( + (state2, action) => { + if (action.type === SYNC_STATE) { + return { ...state2, state: action.state }; + } + const next = reducer(state2, action); + if (isControlled && !Object.is(next.state, state2.state)) { + onChange(next.state); + } + return next; + }, + ...args + ); + const uncontrolledState = internalState.state; + const prevValueRef = React2.useRef(uncontrolledState); + React2.useEffect(() => { + if (prevValueRef.current !== uncontrolledState) { + prevValueRef.current = uncontrolledState; + if (!isControlled) { + onChange(uncontrolledState); + } + } + }, [onChange, uncontrolledState, prevValueRef, isControlled]); + const state = React2.useMemo(() => { + const isControlled2 = controlledState !== void 0; + if (isControlled2) { + return { ...internalState, state: controlledState }; + } + return internalState; + }, [internalState, controlledState]); + React2.useEffect(() => { + if (isControlled && !Object.is(controlledState, internalState.state)) { + dispatch({ type: SYNC_STATE, state: controlledState }); + } + }, [controlledState, internalState.state, isControlled]); + return [state, dispatch]; +} +export { + useControllableState, + useControllableStateReducer +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..1959c8cf2e764bded148229cbd282f3eb36d5f1f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/use-controllable-state.tsx", "../src/use-controllable-state-reducer.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\n// Prevent bundlers from trying to optimize the import\nconst useInsertionEffect: typeof useLayoutEffect =\n (React as any)[' useInsertionEffect '.trim().toString()] || useLayoutEffect;\n\ntype ChangeHandler = (state: T) => void;\ntype SetStateFn = React.Dispatch>;\n\ninterface UseControllableStateParams {\n prop?: T | undefined;\n defaultProp: T;\n onChange?: ChangeHandler;\n caller?: string;\n}\n\nexport function useControllableState({\n prop,\n defaultProp,\n onChange = () => {},\n caller,\n}: UseControllableStateParams): [T, SetStateFn] {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange,\n });\n const isControlled = prop !== undefined;\n const value = isControlled ? prop : uncontrolledProp;\n\n // OK to disable conditionally calling hooks here because they will always run\n // consistently in the same environment. Bundlers should be able to remove the\n // code block entirely in production.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (process.env.NODE_ENV !== 'production') {\n const isControlledRef = React.useRef(prop !== undefined);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? 'controlled' : 'uncontrolled';\n const to = isControlled ? 'controlled' : 'uncontrolled';\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n /* eslint-enable react-hooks/rules-of-hooks */\n\n const setValue = React.useCallback>(\n (nextValue) => {\n if (isControlled) {\n const value = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value !== prop) {\n onChangeRef.current?.(value);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n\n return [value, setValue];\n}\n\nfunction useUncontrolledState({\n defaultProp,\n onChange,\n}: Omit, 'prop'>): [\n Value: T,\n setValue: React.Dispatch>,\n OnChangeRef: React.RefObject | undefined>,\n] {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n\n return [value, setValue, onChangeRef];\n}\n\nfunction isFunction(value: unknown): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n", "import * as React from 'react';\nimport { useEffectEvent } from '@radix-ui/react-use-effect-event';\n\ntype ChangeHandler = (state: T) => void;\n\ninterface UseControllableStateParams {\n prop: T | undefined;\n defaultProp: T;\n onChange: ChangeHandler | undefined;\n caller: string;\n}\n\ninterface AnyAction {\n type: string;\n}\n\nconst SYNC_STATE = Symbol('RADIX:SYNC_STATE');\n\ninterface SyncStateAction {\n type: typeof SYNC_STATE;\n state: T;\n}\n\nexport function useControllableStateReducer(\n reducer: (prevState: S & { state: T }, action: A) => S & { state: T },\n userArgs: UseControllableStateParams,\n initialState: S\n): [S & { state: T }, React.Dispatch];\n\nexport function useControllableStateReducer(\n reducer: (prevState: S & { state: T }, action: A) => S & { state: T },\n userArgs: UseControllableStateParams,\n initialArg: I,\n init: (i: I & { state: T }) => S\n): [S & { state: T }, React.Dispatch];\n\nexport function useControllableStateReducer(\n reducer: (prevState: S & { state: T }, action: A) => S & { state: T },\n userArgs: UseControllableStateParams,\n initialArg: any,\n init?: (i: any) => Omit\n): [S & { state: T }, React.Dispatch] {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== undefined;\n\n const onChange = useEffectEvent(onChangeProp);\n\n // OK to disable conditionally calling hooks here because they will always run\n // consistently in the same environment. Bundlers should be able to remove the\n // code block entirely in production.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (process.env.NODE_ENV !== 'production') {\n const isControlledRef = React.useRef(controlledState !== undefined);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? 'controlled' : 'uncontrolled';\n const to = isControlled ? 'controlled' : 'uncontrolled';\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n /* eslint-enable react-hooks/rules-of-hooks */\n\n type InternalState = S & { state: T };\n const args: [InternalState] = [{ ...initialArg, state: defaultProp }];\n if (init) {\n // @ts-expect-error\n args.push(init);\n }\n\n const [internalState, dispatch] = React.useReducer(\n (state: InternalState, action: A | SyncStateAction): InternalState => {\n if (action.type === SYNC_STATE) {\n return { ...state, state: action.state };\n }\n\n const next = reducer(state, action);\n if (isControlled && !Object.is(next.state, state.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n\n const uncontrolledState = internalState.state;\n const prevValueRef = React.useRef(uncontrolledState);\n React.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n\n const state = React.useMemo(() => {\n const isControlled = controlledState !== undefined;\n if (isControlled) {\n return { ...internalState, state: controlledState };\n }\n\n return internalState;\n }, [internalState, controlledState]);\n\n React.useEffect(() => {\n // Sync internal state for controlled components so that reducer is called\n // with the correct state values\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n\n return [state, dispatch as React.Dispatch];\n}\n"], + "mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAGhC,IAAM,qBACH,MAAc,uBAAuB,KAAK,EAAE,SAAS,CAAC,KAAK;AAYvD,SAAS,qBAAwB;AAAA,EACtC;AAAA,EACA;AAAA,EACA,WAAW,MAAM;AAAA,EAAC;AAAA,EAClB;AACF,GAAsD;AACpD,QAAM,CAAC,kBAAkB,qBAAqB,WAAW,IAAI,qBAAqB;AAAA,IAChF;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,eAAe,SAAS;AAC9B,QAAM,QAAQ,eAAe,OAAO;AAMpC,MAAI,MAAuC;AACzC,UAAM,kBAAwB,aAA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,UAAU,mBAAmB,cAAc,YAAY,CAAC;AAE5D,QAAM,QAAc,eAAQ,MAAM;AAChC,UAAMC,gBAAe,oBAAoB;AACzC,QAAIA,eAAc;AAChB,aAAO,EAAE,GAAG,eAAe,OAAO,gBAAgB;AAAA,IACpD;AAEA,WAAO;AAAA,EACT,GAAG,CAAC,eAAe,eAAe,CAAC;AAEnC,EAAM,iBAAU,MAAM;AAGpB,QAAI,gBAAgB,CAAC,OAAO,GAAG,iBAAiB,cAAc,KAAK,GAAG;AACpE,eAAS,EAAE,MAAM,YAAY,OAAO,gBAAgB,CAAC;AAAA,IACvD;AAAA,EACF,GAAG,CAAC,iBAAiB,cAAc,OAAO,YAAY,CAAC;AAEvD,SAAO,CAAC,OAAO,QAA6B;AAC9C;", + "names": ["value", "React", "state", "isControlled"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/package.json b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/package.json new file mode 100644 index 0000000000000000000000000000000000000000..db01eeb90f42ef52e371f079208bc3322c35f553 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/package.json @@ -0,0 +1,64 @@ +{ + "name": "@radix-ui/react-use-controllable-state", + "version": "1.2.2", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-use-effect-event": "0.0.2", + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/LICENSE b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/README.md b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/README.md new file mode 100644 index 0000000000000000000000000000000000000000..31124b600ec01189a1b45e14d628535ce25b4278 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/README.md @@ -0,0 +1,5 @@ +# `react-use-is-hydrated` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..344ec7e5c85b5529d214e9e564d93c90605419ec --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.d.mts @@ -0,0 +1,8 @@ +type AnyFunction = (...args: any[]) => any; +/** + * Designed to approximate the behavior on `experimental_useEffectEvent` as best + * as possible until its stable release, and back-fill it as a shim as needed. + */ +declare function useEffectEvent(callback?: T): T; + +export { useEffectEvent }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..344ec7e5c85b5529d214e9e564d93c90605419ec --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.d.ts @@ -0,0 +1,8 @@ +type AnyFunction = (...args: any[]) => any; +/** + * Designed to approximate the behavior on `experimental_useEffectEvent` as best + * as possible until its stable release, and back-fill it as a shim as needed. + */ +declare function useEffectEvent(callback?: T): T; + +export { useEffectEvent }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.js b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..1aedce7a29a979136be2c8ad6d84a05d5e2c4894 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.js @@ -0,0 +1,60 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + useEffectEvent: () => useEffectEvent +}); +module.exports = __toCommonJS(index_exports); + +// src/use-effect-event.tsx +var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect"); +var React = __toESM(require("react")); +var useReactEffectEvent = React[" useEffectEvent ".trim().toString()]; +var useReactInsertionEffect = React[" useInsertionEffect ".trim().toString()]; +function useEffectEvent(callback) { + if (typeof useReactEffectEvent === "function") { + return useReactEffectEvent(callback); + } + const ref = React.useRef(() => { + throw new Error("Cannot call an event handler while rendering."); + }); + if (typeof useReactInsertionEffect === "function") { + useReactInsertionEffect(() => { + ref.current = callback; + }); + } else { + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + ref.current = callback; + }); + } + return React.useMemo(() => (...args) => ref.current?.(...args), []); +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c6270effb6e6a314e87a51b90661dad465279e29 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/use-effect-event.tsx"], + "sourcesContent": ["export { useEffectEvent } from './use-effect-event';\n", "/* eslint-disable react-hooks/rules-of-hooks */\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport * as React from 'react';\n\ntype AnyFunction = (...args: any[]) => any;\n\n// See https://github.com/webpack/webpack/issues/14814\nconst useReactEffectEvent = (React as any)[' useEffectEvent '.trim().toString()];\nconst useReactInsertionEffect = (React as any)[' useInsertionEffect '.trim().toString()];\n\n/**\n * Designed to approximate the behavior on `experimental_useEffectEvent` as best\n * as possible until its stable release, and back-fill it as a shim as needed.\n */\nexport function useEffectEvent(callback?: T): T {\n if (typeof useReactEffectEvent === 'function') {\n return useReactEffectEvent(callback);\n }\n\n const ref = React.useRef(() => {\n throw new Error('Cannot call an event handler while rendering.');\n });\n // See https://github.com/webpack/webpack/issues/14814\n if (typeof useReactInsertionEffect === 'function') {\n useReactInsertionEffect(() => {\n ref.current = callback;\n });\n } else {\n useLayoutEffect(() => {\n ref.current = callback;\n });\n }\n\n // https://github.com/facebook/react/issues/19240\n return React.useMemo(() => ((...args) => ref.current?.(...args)) as T, []);\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,qCAAgC;AAChC,YAAuB;AAKvB,IAAM,sBAAuB,MAAc,mBAAmB,KAAK,EAAE,SAAS,CAAC;AAC/E,IAAM,0BAA2B,MAAc,uBAAuB,KAAK,EAAE,SAAS,CAAC;AAMhF,SAAS,eAAsC,UAAiB;AACrE,MAAI,OAAO,wBAAwB,YAAY;AAC7C,WAAO,oBAAoB,QAAQ;AAAA,EACrC;AAEA,QAAM,MAAY,aAAgC,MAAM;AACtD,UAAM,IAAI,MAAM,+CAA+C;AAAA,EACjE,CAAC;AAED,MAAI,OAAO,4BAA4B,YAAY;AACjD,4BAAwB,MAAM;AAC5B,UAAI,UAAU;AAAA,IAChB,CAAC;AAAA,EACH,OAAO;AACL,wDAAgB,MAAM;AACpB,UAAI,UAAU;AAAA,IAChB,CAAC;AAAA,EACH;AAGA,SAAa,cAAQ,MAAO,IAAI,SAAS,IAAI,UAAU,GAAG,IAAI,GAAS,CAAC,CAAC;AAC3E;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5d1354916f488d599a55816ec4b0c6c215010ac9 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs @@ -0,0 +1,27 @@ +// src/use-effect-event.tsx +import { useLayoutEffect } from "@radix-ui/react-use-layout-effect"; +import * as React from "react"; +var useReactEffectEvent = React[" useEffectEvent ".trim().toString()]; +var useReactInsertionEffect = React[" useInsertionEffect ".trim().toString()]; +function useEffectEvent(callback) { + if (typeof useReactEffectEvent === "function") { + return useReactEffectEvent(callback); + } + const ref = React.useRef(() => { + throw new Error("Cannot call an event handler while rendering."); + }); + if (typeof useReactInsertionEffect === "function") { + useReactInsertionEffect(() => { + ref.current = callback; + }); + } else { + useLayoutEffect(() => { + ref.current = callback; + }); + } + return React.useMemo(() => (...args) => ref.current?.(...args), []); +} +export { + useEffectEvent +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..1e60857ddad45b970d183d6d729806810be5c474 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/use-effect-event.tsx"], + "sourcesContent": ["/* eslint-disable react-hooks/rules-of-hooks */\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport * as React from 'react';\n\ntype AnyFunction = (...args: any[]) => any;\n\n// See https://github.com/webpack/webpack/issues/14814\nconst useReactEffectEvent = (React as any)[' useEffectEvent '.trim().toString()];\nconst useReactInsertionEffect = (React as any)[' useInsertionEffect '.trim().toString()];\n\n/**\n * Designed to approximate the behavior on `experimental_useEffectEvent` as best\n * as possible until its stable release, and back-fill it as a shim as needed.\n */\nexport function useEffectEvent(callback?: T): T {\n if (typeof useReactEffectEvent === 'function') {\n return useReactEffectEvent(callback);\n }\n\n const ref = React.useRef(() => {\n throw new Error('Cannot call an event handler while rendering.');\n });\n // See https://github.com/webpack/webpack/issues/14814\n if (typeof useReactInsertionEffect === 'function') {\n useReactInsertionEffect(() => {\n ref.current = callback;\n });\n } else {\n useLayoutEffect(() => {\n ref.current = callback;\n });\n }\n\n // https://github.com/facebook/react/issues/19240\n return React.useMemo(() => ((...args) => ref.current?.(...args)) as T, []);\n}\n"], + "mappings": ";AACA,SAAS,uBAAuB;AAChC,YAAY,WAAW;AAKvB,IAAM,sBAAuB,MAAc,mBAAmB,KAAK,EAAE,SAAS,CAAC;AAC/E,IAAM,0BAA2B,MAAc,uBAAuB,KAAK,EAAE,SAAS,CAAC;AAMhF,SAAS,eAAsC,UAAiB;AACrE,MAAI,OAAO,wBAAwB,YAAY;AAC7C,WAAO,oBAAoB,QAAQ;AAAA,EACrC;AAEA,QAAM,MAAY,aAAgC,MAAM;AACtD,UAAM,IAAI,MAAM,+CAA+C;AAAA,EACjE,CAAC;AAED,MAAI,OAAO,4BAA4B,YAAY;AACjD,4BAAwB,MAAM;AAC5B,UAAI,UAAU;AAAA,IAChB,CAAC;AAAA,EACH,OAAO;AACL,oBAAgB,MAAM;AACpB,UAAI,UAAU;AAAA,IAChB,CAAC;AAAA,EACH;AAGA,SAAa,cAAQ,MAAO,IAAI,SAAS,IAAI,UAAU,GAAG,IAAI,GAAS,CAAC,CAAC;AAC3E;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/package.json b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f8122f9bf80f2876b9178329949fb2f236752f03 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/package.json @@ -0,0 +1,65 @@ +{ + "name": "@radix-ui/react-use-effect-event", + "version": "0.0.2", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "src", + "dist", + "README.md" + ], + "sideEffects": false, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "@types/use-sync-external-store": "^0.0.6", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/typescript-config": "0.0.0", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0" + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/src/index.ts b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..1a34bd02cc4ab493f8615dbf72a2b6ce311ff13d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/src/index.ts @@ -0,0 +1 @@ +export { useEffectEvent } from './use-effect-event'; diff --git a/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/src/use-effect-event.tsx b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/src/use-effect-event.tsx new file mode 100644 index 0000000000000000000000000000000000000000..24409222644d288b7a0fc878f573fc66df85c12f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-effect-event@0.0.2_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-effect-event/src/use-effect-event.tsx @@ -0,0 +1,36 @@ +/* eslint-disable react-hooks/rules-of-hooks */ +import { useLayoutEffect } from '@radix-ui/react-use-layout-effect'; +import * as React from 'react'; + +type AnyFunction = (...args: any[]) => any; + +// See https://github.com/webpack/webpack/issues/14814 +const useReactEffectEvent = (React as any)[' useEffectEvent '.trim().toString()]; +const useReactInsertionEffect = (React as any)[' useInsertionEffect '.trim().toString()]; + +/** + * Designed to approximate the behavior on `experimental_useEffectEvent` as best + * as possible until its stable release, and back-fill it as a shim as needed. + */ +export function useEffectEvent(callback?: T): T { + if (typeof useReactEffectEvent === 'function') { + return useReactEffectEvent(callback); + } + + const ref = React.useRef(() => { + throw new Error('Cannot call an event handler while rendering.'); + }); + // See https://github.com/webpack/webpack/issues/14814 + if (typeof useReactInsertionEffect === 'function') { + useReactInsertionEffect(() => { + ref.current = callback; + }); + } else { + useLayoutEffect(() => { + ref.current = callback; + }); + } + + // https://github.com/facebook/react/issues/19240 + return React.useMemo(() => ((...args) => ref.current?.(...args)) as T, []); +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/README.md b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fb08ecb9a79e0a80fe217ff8f78e26a744c32506 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/README.md @@ -0,0 +1,13 @@ +# `react-use-escape-keydown` + +## Installation + +```sh +$ yarn add @radix-ui/react-use-escape-keydown +# or +$ npm install @radix-ui/react-use-escape-keydown +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1d0324b1584f145bca15cefebac5da9bb8f5d774 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.mts @@ -0,0 +1,6 @@ +/** + * Listens for when the escape key is down + */ +declare function useEscapeKeydown(onEscapeKeyDownProp?: (event: KeyboardEvent) => void, ownerDocument?: Document): void; + +export { useEscapeKeydown }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1d0324b1584f145bca15cefebac5da9bb8f5d774 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts @@ -0,0 +1,6 @@ +/** + * Listens for when the escape key is down + */ +declare function useEscapeKeydown(onEscapeKeyDownProp?: (event: KeyboardEvent) => void, ownerDocument?: Document): void; + +export { useEscapeKeydown }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..81f0a660b53bd05517be201eece8e1b4f2000e96 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js @@ -0,0 +1,52 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/react/use-escape-keydown/src/index.ts +var index_exports = {}; +__export(index_exports, { + useEscapeKeydown: () => useEscapeKeydown +}); +module.exports = __toCommonJS(index_exports); + +// packages/react/use-escape-keydown/src/use-escape-keydown.tsx +var React = __toESM(require("react")); +var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref"); +function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) { + const onEscapeKeyDown = (0, import_react_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp); + React.useEffect(() => { + const handleKeyDown = (event) => { + if (event.key === "Escape") { + onEscapeKeyDown(event); + } + }; + ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true }); + return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true }); + }, [onEscapeKeyDown, ownerDocument]); +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d1678ef1f245f454f522d506baf86996e5f6fbe2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/use-escape-keydown.tsx"], + "sourcesContent": ["export { useEscapeKeydown } from './use-escape-keydown';\n", "import * as React from 'react';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\n\n/**\n * Listens for when the escape key is down\n */\nfunction useEscapeKeydown(\n onEscapeKeyDownProp?: (event: KeyboardEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener('keydown', handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\n\nexport { useEscapeKeydown };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,oCAA+B;AAK/B,SAAS,iBACP,qBACA,gBAA0B,YAAY,UACtC;AACA,QAAM,sBAAkB,8CAAe,mBAAmB;AAE1D,EAAM,gBAAU,MAAM;AACpB,UAAM,gBAAgB,CAAC,UAAyB;AAC9C,UAAI,MAAM,QAAQ,UAAU;AAC1B,wBAAgB,KAAK;AAAA,MACvB;AAAA,IACF;AACA,kBAAc,iBAAiB,WAAW,eAAe,EAAE,SAAS,KAAK,CAAC;AAC1E,WAAO,MAAM,cAAc,oBAAoB,WAAW,eAAe,EAAE,SAAS,KAAK,CAAC;AAAA,EAC5F,GAAG,CAAC,iBAAiB,aAAa,CAAC;AACrC;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bd8820dade5165a634ebcd7af8b0db8a874212d3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs @@ -0,0 +1,19 @@ +// packages/react/use-escape-keydown/src/use-escape-keydown.tsx +import * as React from "react"; +import { useCallbackRef } from "@radix-ui/react-use-callback-ref"; +function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) { + const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp); + React.useEffect(() => { + const handleKeyDown = (event) => { + if (event.key === "Escape") { + onEscapeKeyDown(event); + } + }; + ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true }); + return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true }); + }, [onEscapeKeyDown, ownerDocument]); +} +export { + useEscapeKeydown +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..82994e9ac0f7107d6115629d19f96e865ecf9bd8 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/use-escape-keydown.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\n\n/**\n * Listens for when the escape key is down\n */\nfunction useEscapeKeydown(\n onEscapeKeyDownProp?: (event: KeyboardEvent) => void,\n ownerDocument: Document = globalThis?.document\n) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener('keydown', handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\n\nexport { useEscapeKeydown };\n"], + "mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,sBAAsB;AAK/B,SAAS,iBACP,qBACA,gBAA0B,YAAY,UACtC;AACA,QAAM,kBAAkB,eAAe,mBAAmB;AAE1D,EAAM,gBAAU,MAAM;AACpB,UAAM,gBAAgB,CAAC,UAAyB;AAC9C,UAAI,MAAM,QAAQ,UAAU;AAC1B,wBAAgB,KAAK;AAAA,MACvB;AAAA,IACF;AACA,kBAAc,iBAAiB,WAAW,eAAe,EAAE,SAAS,KAAK,CAAC;AAC1E,WAAO,MAAM,cAAc,oBAAoB,WAAW,eAAe,EAAE,SAAS,KAAK,CAAC;AAAA,EAC5F,GAAG,CAAC,iBAAiB,aAAa,CAAC;AACrC;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/package.json b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0525cb80fc9ff6db812debde4187935ee6f26342 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/package.json @@ -0,0 +1,78 @@ +{ + "name": "@radix-ui/react-use-escape-keydown", + "version": "1.1.1", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.1" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "typescript": "^5.7.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/LICENSE b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/README.md b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/README.md new file mode 100644 index 0000000000000000000000000000000000000000..31124b600ec01189a1b45e14d628535ce25b4278 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/README.md @@ -0,0 +1,5 @@ +# `react-use-is-hydrated` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c09bf1ab48bab10de857d7ab323ebea2722762a3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.d.mts @@ -0,0 +1,6 @@ +/** + * Determines whether or not the component tree has been hydrated. + */ +declare function useIsHydrated(): boolean; + +export { useIsHydrated }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c09bf1ab48bab10de857d7ab323ebea2722762a3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.d.ts @@ -0,0 +1,6 @@ +/** + * Determines whether or not the component tree has been hydrated. + */ +declare function useIsHydrated(): boolean; + +export { useIsHydrated }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..494fe1d6076b79034fb6e8e1bf4e7a3f07fa5d8e --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js @@ -0,0 +1,40 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + useIsHydrated: () => useIsHydrated +}); +module.exports = __toCommonJS(index_exports); + +// src/use-is-hydrated.tsx +var import_shim = require("use-sync-external-store/shim"); +function useIsHydrated() { + return (0, import_shim.useSyncExternalStore)( + subscribe, + () => true, + () => false + ); +} +function subscribe() { + return () => { + }; +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..fdbdeb7d899d9b35819ec9dc1e1451e4f66946ab --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/use-is-hydrated.tsx"], + "sourcesContent": ["export { useIsHydrated } from './use-is-hydrated';\n", "import { useSyncExternalStore } from 'use-sync-external-store/shim';\n\n/**\n * Determines whether or not the component tree has been hydrated.\n */\nexport function useIsHydrated() {\n return useSyncExternalStore(\n subscribe,\n () => true,\n () => false\n );\n}\n\nfunction subscribe() {\n return () => {};\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAqC;AAK9B,SAAS,gBAAgB;AAC9B,aAAO;AAAA,IACL;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AACF;AAEA,SAAS,YAAY;AACnB,SAAO,MAAM;AAAA,EAAC;AAChB;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d14db782c1127a636112b5e5bb6663aa18317420 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs @@ -0,0 +1,17 @@ +// src/use-is-hydrated.tsx +import { useSyncExternalStore } from "use-sync-external-store/shim"; +function useIsHydrated() { + return useSyncExternalStore( + subscribe, + () => true, + () => false + ); +} +function subscribe() { + return () => { + }; +} +export { + useIsHydrated +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..e3ac9b2ca4707ce9426cedf3ccff04783836a8da --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/use-is-hydrated.tsx"], + "sourcesContent": ["import { useSyncExternalStore } from 'use-sync-external-store/shim';\n\n/**\n * Determines whether or not the component tree has been hydrated.\n */\nexport function useIsHydrated() {\n return useSyncExternalStore(\n subscribe,\n () => true,\n () => false\n );\n}\n\nfunction subscribe() {\n return () => {};\n}\n"], + "mappings": ";AAAA,SAAS,4BAA4B;AAK9B,SAAS,gBAAgB;AAC9B,SAAO;AAAA,IACL;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AACF;AAEA,SAAS,YAAY;AACnB,SAAO,MAAM;AAAA,EAAC;AAChB;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/package.json b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5ac7ce8e92d8ed5b144689ed140df7eb5df03e60 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/package.json @@ -0,0 +1,65 @@ +{ + "name": "@radix-ui/react-use-is-hydrated", + "version": "0.1.0", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "src", + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "use-sync-external-store": "^1.5.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "@types/use-sync-external-store": "^0.0.6", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/builder": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0" + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/src/index.ts b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..5d8fbc718da3f9307a4db92024510b5a212f6c63 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/src/index.ts @@ -0,0 +1 @@ +export { useIsHydrated } from './use-is-hydrated'; diff --git a/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/src/use-is-hydrated.tsx b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/src/use-is-hydrated.tsx new file mode 100644 index 0000000000000000000000000000000000000000..52e708407d461346ce0211c419a151e21c64e93a --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-is-hydrated@0.1.0_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-is-hydrated/src/use-is-hydrated.tsx @@ -0,0 +1,16 @@ +import { useSyncExternalStore } from 'use-sync-external-store/shim'; + +/** + * Determines whether or not the component tree has been hydrated. + */ +export function useIsHydrated() { + return useSyncExternalStore( + subscribe, + () => true, + () => false + ); +} + +function subscribe() { + return () => {}; +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/README.md b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6dc82d79e51040c6625c0700271ff60b1f80e1cb --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/README.md @@ -0,0 +1,13 @@ +# `react-use-layout-effect` + +## Installation + +```sh +$ yarn add @radix-ui/react-use-layout-effect +# or +$ npm install @radix-ui/react-use-layout-effect +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..11166f132e98fb717ac47cb32409865a97d8a650 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts @@ -0,0 +1,12 @@ +import * as React from 'react'; + +/** + * On the server, React emits a warning when calling `useLayoutEffect`. + * This is because neither `useLayoutEffect` nor `useEffect` run on the server. + * We use this safe version which suppresses the warning by replacing it with a noop on the server. + * + * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect + */ +declare const useLayoutEffect: typeof React.useLayoutEffect; + +export { useLayoutEffect }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..11166f132e98fb717ac47cb32409865a97d8a650 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; + +/** + * On the server, React emits a warning when calling `useLayoutEffect`. + * This is because neither `useLayoutEffect` nor `useEffect` run on the server. + * We use this safe version which suppresses the warning by replacing it with a noop on the server. + * + * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect + */ +declare const useLayoutEffect: typeof React.useLayoutEffect; + +export { useLayoutEffect }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..2995cd4b2299efbec7bc2851452a4e89922381d9 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js @@ -0,0 +1,41 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/react/use-layout-effect/src/index.ts +var index_exports = {}; +__export(index_exports, { + useLayoutEffect: () => useLayoutEffect2 +}); +module.exports = __toCommonJS(index_exports); + +// packages/react/use-layout-effect/src/use-layout-effect.tsx +var React = __toESM(require("react")); +var useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => { +}; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8a81d787374e349de6420a3c30634de37dbbe626 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/use-layout-effect.tsx"], + "sourcesContent": ["export { useLayoutEffect } from './use-layout-effect';\n", "import * as React from 'react';\n\n/**\n * On the server, React emits a warning when calling `useLayoutEffect`.\n * This is because neither `useLayoutEffect` nor `useEffect` run on the server.\n * We use this safe version which suppresses the warning by replacing it with a noop on the server.\n *\n * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nconst useLayoutEffect = globalThis?.document ? React.useLayoutEffect : () => {};\n\nexport { useLayoutEffect };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,yBAAAA;AAAA;AAAA;;;ACAA,YAAuB;AASvB,IAAMC,mBAAkB,YAAY,WAAiB,wBAAkB,MAAM;AAAC;", + "names": ["useLayoutEffect", "useLayoutEffect"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..aa11be1c0d6dc3431a9b674ec1b94184ff373579 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs @@ -0,0 +1,8 @@ +// packages/react/use-layout-effect/src/use-layout-effect.tsx +import * as React from "react"; +var useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => { +}; +export { + useLayoutEffect2 as useLayoutEffect +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..d2770e11c21d3b8eb657d350ee8bcb388c1efcca --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/use-layout-effect.tsx"], + "sourcesContent": ["import * as React from 'react';\n\n/**\n * On the server, React emits a warning when calling `useLayoutEffect`.\n * This is because neither `useLayoutEffect` nor `useEffect` run on the server.\n * We use this safe version which suppresses the warning by replacing it with a noop on the server.\n *\n * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nconst useLayoutEffect = globalThis?.document ? React.useLayoutEffect : () => {};\n\nexport { useLayoutEffect };\n"], + "mappings": ";AAAA,YAAY,WAAW;AASvB,IAAMA,mBAAkB,YAAY,WAAiB,wBAAkB,MAAM;AAAC;", + "names": ["useLayoutEffect"] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/package.json b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/package.json new file mode 100644 index 0000000000000000000000000000000000000000..2e706b215198ef518a491cbe289381450a76cfab --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/package.json @@ -0,0 +1,75 @@ +{ + "name": "@radix-ui/react-use-layout-effect", + "version": "1.1.1", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "typescript": "^5.7.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/README.md b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b4031048b1fa9ab9be155a8d02491935986b9df8 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/README.md @@ -0,0 +1,13 @@ +# `react-use-previous` + +## Installation + +```sh +$ yarn add @radix-ui/react-use-previous +# or +$ npm install @radix-ui/react-use-previous +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..772d86a1e2bd12bd9c59eed65cf42ed7f1dfa9e2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.d.mts @@ -0,0 +1,3 @@ +declare function usePrevious(value: T): T; + +export { usePrevious }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..772d86a1e2bd12bd9c59eed65cf42ed7f1dfa9e2 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.d.ts @@ -0,0 +1,3 @@ +declare function usePrevious(value: T): T; + +export { usePrevious }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.js b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..62d21457fbfc3be110343c153e7d24a1bbba73f6 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.js @@ -0,0 +1,49 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/react/use-previous/src/index.ts +var index_exports = {}; +__export(index_exports, { + usePrevious: () => usePrevious +}); +module.exports = __toCommonJS(index_exports); + +// packages/react/use-previous/src/use-previous.tsx +var React = __toESM(require("react")); +function usePrevious(value) { + const ref = React.useRef({ value, previous: value }); + return React.useMemo(() => { + if (ref.current.value !== value) { + ref.current.previous = ref.current.value; + ref.current.value = value; + } + return ref.current.previous; + }, [value]); +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..483c854fa76e724655e15618b5e4fb952783e1d1 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/use-previous.tsx"], + "sourcesContent": ["export { usePrevious } from './use-previous';\n", "import * as React from 'react';\n\nfunction usePrevious(value: T) {\n const ref = React.useRef({ value, previous: value });\n\n // We compare values before making an update to ensure that\n // a change has been made. This ensures the previous value is\n // persisted correctly between renders.\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\n\nexport { usePrevious };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAEvB,SAAS,YAAe,OAAU;AAChC,QAAM,MAAY,aAAO,EAAE,OAAO,UAAU,MAAM,CAAC;AAKnD,SAAa,cAAQ,MAAM;AACzB,QAAI,IAAI,QAAQ,UAAU,OAAO;AAC/B,UAAI,QAAQ,WAAW,IAAI,QAAQ;AACnC,UAAI,QAAQ,QAAQ;AAAA,IACtB;AACA,WAAO,IAAI,QAAQ;AAAA,EACrB,GAAG,CAAC,KAAK,CAAC;AACZ;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c3c2137e91fd1d49a630eb4d8ecb2d8aa22c574b --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs @@ -0,0 +1,16 @@ +// packages/react/use-previous/src/use-previous.tsx +import * as React from "react"; +function usePrevious(value) { + const ref = React.useRef({ value, previous: value }); + return React.useMemo(() => { + if (ref.current.value !== value) { + ref.current.previous = ref.current.value; + ref.current.value = value; + } + return ref.current.previous; + }, [value]); +} +export { + usePrevious +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..832d39f1162534a36d67033e59cc23949d86216d --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/use-previous.tsx"], + "sourcesContent": ["import * as React from 'react';\n\nfunction usePrevious(value: T) {\n const ref = React.useRef({ value, previous: value });\n\n // We compare values before making an update to ensure that\n // a change has been made. This ensures the previous value is\n // persisted correctly between renders.\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\n\nexport { usePrevious };\n"], + "mappings": ";AAAA,YAAY,WAAW;AAEvB,SAAS,YAAe,OAAU;AAChC,QAAM,MAAY,aAAO,EAAE,OAAO,UAAU,MAAM,CAAC;AAKnD,SAAa,cAAQ,MAAM;AACzB,QAAI,IAAI,QAAQ,UAAU,OAAO;AAC/B,UAAI,QAAQ,WAAW,IAAI,QAAQ;AACnC,UAAI,QAAQ,QAAQ;AAAA,IACtB;AACA,WAAO,IAAI,QAAQ;AAAA,EACrB,GAAG,CAAC,KAAK,CAAC;AACZ;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/package.json b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/package.json new file mode 100644 index 0000000000000000000000000000000000000000..39acb5c45c0c2addc58cff068fbfbeb2b58d2c9f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-previous/package.json @@ -0,0 +1,75 @@ +{ + "name": "@radix-ui/react-use-previous", + "version": "1.1.1", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "typescript": "^5.7.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/README.md b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5e2791636e1645bb8a52b90da462f340527f439f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/README.md @@ -0,0 +1,13 @@ +# `react-use-rect` + +## Installation + +```sh +$ yarn add @radix-ui/react-use-rect +# or +$ npm install @radix-ui/react-use-rect +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..95a2b0456237962c762af2d8786569a891f65e69 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.d.mts @@ -0,0 +1,9 @@ +import { Measurable } from '@radix-ui/rect'; + +/** + * Use this custom hook to get access to an element's rect (getBoundingClientRect) + * and observe it along time. + */ +declare function useRect(measurable: Measurable | null): DOMRect | undefined; + +export { useRect }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..95a2b0456237962c762af2d8786569a891f65e69 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.d.ts @@ -0,0 +1,9 @@ +import { Measurable } from '@radix-ui/rect'; + +/** + * Use this custom hook to get access to an element's rect (getBoundingClientRect) + * and observe it along time. + */ +declare function useRect(measurable: Measurable | null): DOMRect | undefined; + +export { useRect }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.js b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..97fe447b679ad5b0f31df719e290df2674a388ed --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.js @@ -0,0 +1,54 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/react/use-rect/src/index.ts +var index_exports = {}; +__export(index_exports, { + useRect: () => useRect +}); +module.exports = __toCommonJS(index_exports); + +// packages/react/use-rect/src/use-rect.tsx +var React = __toESM(require("react")); +var import_rect = require("@radix-ui/rect"); +function useRect(measurable) { + const [rect, setRect] = React.useState(); + React.useEffect(() => { + if (measurable) { + const unobserve = (0, import_rect.observeElementRect)(measurable, setRect); + return () => { + setRect(void 0); + unobserve(); + }; + } + return; + }, [measurable]); + return rect; +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5a64c53be1b5f01786143399b28033ae21f6cfee --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/use-rect.tsx"], + "sourcesContent": ["export { useRect } from './use-rect';\n", "import * as React from 'react';\nimport { observeElementRect } from '@radix-ui/rect';\n\nimport type { Measurable } from '@radix-ui/rect';\n\n/**\n * Use this custom hook to get access to an element's rect (getBoundingClientRect)\n * and observe it along time.\n */\nfunction useRect(measurable: Measurable | null) {\n const [rect, setRect] = React.useState();\n React.useEffect(() => {\n if (measurable) {\n const unobserve = observeElementRect(measurable, setRect);\n return () => {\n setRect(undefined);\n unobserve();\n };\n }\n return;\n }, [measurable]);\n return rect;\n}\n\nexport { useRect };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,kBAAmC;AAQnC,SAAS,QAAQ,YAA+B;AAC9C,QAAM,CAAC,MAAM,OAAO,IAAU,eAAkB;AAChD,EAAM,gBAAU,MAAM;AACpB,QAAI,YAAY;AACd,YAAM,gBAAY,gCAAmB,YAAY,OAAO;AACxD,aAAO,MAAM;AACX,gBAAQ,MAAS;AACjB,kBAAU;AAAA,MACZ;AAAA,IACF;AACA;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AACf,SAAO;AACT;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..46e9ba745ffdc9b0547122fb58522872fcfbf4f0 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.mjs @@ -0,0 +1,21 @@ +// packages/react/use-rect/src/use-rect.tsx +import * as React from "react"; +import { observeElementRect } from "@radix-ui/rect"; +function useRect(measurable) { + const [rect, setRect] = React.useState(); + React.useEffect(() => { + if (measurable) { + const unobserve = observeElementRect(measurable, setRect); + return () => { + setRect(void 0); + unobserve(); + }; + } + return; + }, [measurable]); + return rect; +} +export { + useRect +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..77e9ef59e479a530669d68c6baaf84c2068f9c73 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/use-rect.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { observeElementRect } from '@radix-ui/rect';\n\nimport type { Measurable } from '@radix-ui/rect';\n\n/**\n * Use this custom hook to get access to an element's rect (getBoundingClientRect)\n * and observe it along time.\n */\nfunction useRect(measurable: Measurable | null) {\n const [rect, setRect] = React.useState();\n React.useEffect(() => {\n if (measurable) {\n const unobserve = observeElementRect(measurable, setRect);\n return () => {\n setRect(undefined);\n unobserve();\n };\n }\n return;\n }, [measurable]);\n return rect;\n}\n\nexport { useRect };\n"], + "mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,0BAA0B;AAQnC,SAAS,QAAQ,YAA+B;AAC9C,QAAM,CAAC,MAAM,OAAO,IAAU,eAAkB;AAChD,EAAM,gBAAU,MAAM;AACpB,QAAI,YAAY;AACd,YAAM,YAAY,mBAAmB,YAAY,OAAO;AACxD,aAAO,MAAM;AACX,gBAAQ,MAAS;AACjB,kBAAU;AAAA,MACZ;AAAA,IACF;AACA;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AACf,SAAO;AACT;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/package.json b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ad6b485f0d93ef1559672e6d47aa460f0abf1f6f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-rect@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-rect/package.json @@ -0,0 +1,78 @@ +{ + "name": "@radix-ui/react-use-rect", + "version": "1.1.1", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "dependencies": { + "@radix-ui/rect": "1.1.1" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "typescript": "^5.7.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/README.md b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c63599e8b890214ad7e48980c1af1f4c6cfe8174 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/README.md @@ -0,0 +1,13 @@ +# `react-use-size` + +## Installation + +```sh +$ yarn add @radix-ui/react-use-size +# or +$ npm install @radix-ui/react-use-size +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8416885928f2ec69e2db87ccaa3e74fb1f0c9560 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.d.mts @@ -0,0 +1,6 @@ +declare function useSize(element: HTMLElement | null): { + width: number; + height: number; +} | undefined; + +export { useSize }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8416885928f2ec69e2db87ccaa3e74fb1f0c9560 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.d.ts @@ -0,0 +1,6 @@ +declare function useSize(element: HTMLElement | null): { + width: number; + height: number; +} | undefined; + +export { useSize }; diff --git a/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.js b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..df42f9dc4e3566be7ac2e822cd1c9c171e7fbc4f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.js @@ -0,0 +1,74 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/react/use-size/src/index.ts +var index_exports = {}; +__export(index_exports, { + useSize: () => useSize +}); +module.exports = __toCommonJS(index_exports); + +// packages/react/use-size/src/use-size.tsx +var React = __toESM(require("react")); +var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect"); +function useSize(element) { + const [size, setSize] = React.useState(void 0); + (0, import_react_use_layout_effect.useLayoutEffect)(() => { + if (element) { + setSize({ width: element.offsetWidth, height: element.offsetHeight }); + const resizeObserver = new ResizeObserver((entries) => { + if (!Array.isArray(entries)) { + return; + } + if (!entries.length) { + return; + } + const entry = entries[0]; + let width; + let height; + if ("borderBoxSize" in entry) { + const borderSizeEntry = entry["borderBoxSize"]; + const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry; + width = borderSize["inlineSize"]; + height = borderSize["blockSize"]; + } else { + width = element.offsetWidth; + height = element.offsetHeight; + } + setSize({ width, height }); + }); + resizeObserver.observe(element, { box: "border-box" }); + return () => resizeObserver.unobserve(element); + } else { + setSize(void 0); + } + }, [element]); + return size; +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c87868ff9c4fc88693584addd1bc30607cb528bb --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/use-size.tsx"], + "sourcesContent": ["export { useSize } from './use-size';\n", "/// \n\nimport * as React from 'react';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\nfunction useSize(element: HTMLElement | null) {\n const [size, setSize] = React.useState<{ width: number; height: number } | undefined>(undefined);\n\n useLayoutEffect(() => {\n if (element) {\n // provide size as early as possible\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n\n // Since we only observe the one element, we don't need to loop over the\n // array\n if (!entries.length) {\n return;\n }\n\n const entry = entries[0];\n let width: number;\n let height: number;\n\n if ('borderBoxSize' in entry) {\n const borderSizeEntry = entry['borderBoxSize'];\n // iron out differences between browsers\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize['inlineSize'];\n height = borderSize['blockSize'];\n } else {\n // for browsers that don't support `borderBoxSize`\n // we calculate it ourselves to get the correct border box.\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n\n setSize({ width, height });\n });\n\n resizeObserver.observe(element, { box: 'border-box' });\n\n return () => resizeObserver.unobserve(element);\n } else {\n // We only want to reset to `undefined` when the element becomes `null`,\n // not if it changes to another element.\n setSize(undefined);\n }\n }, [element]);\n\n return size;\n}\n\nexport { useSize };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,YAAuB;AACvB,qCAAgC;AAEhC,SAAS,QAAQ,SAA6B;AAC5C,QAAM,CAAC,MAAM,OAAO,IAAU,eAAwD,MAAS;AAE/F,sDAAgB,MAAM;AACpB,QAAI,SAAS;AAEX,cAAQ,EAAE,OAAO,QAAQ,aAAa,QAAQ,QAAQ,aAAa,CAAC;AAEpE,YAAM,iBAAiB,IAAI,eAAe,CAAC,YAAY;AACrD,YAAI,CAAC,MAAM,QAAQ,OAAO,GAAG;AAC3B;AAAA,QACF;AAIA,YAAI,CAAC,QAAQ,QAAQ;AACnB;AAAA,QACF;AAEA,cAAM,QAAQ,QAAQ,CAAC;AACvB,YAAI;AACJ,YAAI;AAEJ,YAAI,mBAAmB,OAAO;AAC5B,gBAAM,kBAAkB,MAAM,eAAe;AAE7C,gBAAM,aAAa,MAAM,QAAQ,eAAe,IAAI,gBAAgB,CAAC,IAAI;AACzE,kBAAQ,WAAW,YAAY;AAC/B,mBAAS,WAAW,WAAW;AAAA,QACjC,OAAO;AAGL,kBAAQ,QAAQ;AAChB,mBAAS,QAAQ;AAAA,QACnB;AAEA,gBAAQ,EAAE,OAAO,OAAO,CAAC;AAAA,MAC3B,CAAC;AAED,qBAAe,QAAQ,SAAS,EAAE,KAAK,aAAa,CAAC;AAErD,aAAO,MAAM,eAAe,UAAU,OAAO;AAAA,IAC/C,OAAO;AAGL,cAAQ,MAAS;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,OAAO,CAAC;AAEZ,SAAO;AACT;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..026d5aa0f42304832c622f835e6118416f3567bb --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.mjs @@ -0,0 +1,41 @@ +// packages/react/use-size/src/use-size.tsx +import * as React from "react"; +import { useLayoutEffect } from "@radix-ui/react-use-layout-effect"; +function useSize(element) { + const [size, setSize] = React.useState(void 0); + useLayoutEffect(() => { + if (element) { + setSize({ width: element.offsetWidth, height: element.offsetHeight }); + const resizeObserver = new ResizeObserver((entries) => { + if (!Array.isArray(entries)) { + return; + } + if (!entries.length) { + return; + } + const entry = entries[0]; + let width; + let height; + if ("borderBoxSize" in entry) { + const borderSizeEntry = entry["borderBoxSize"]; + const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry; + width = borderSize["inlineSize"]; + height = borderSize["blockSize"]; + } else { + width = element.offsetWidth; + height = element.offsetHeight; + } + setSize({ width, height }); + }); + resizeObserver.observe(element, { box: "border-box" }); + return () => resizeObserver.unobserve(element); + } else { + setSize(void 0); + } + }, [element]); + return size; +} +export { + useSize +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..767ac3051c332f4d952218aab053058699dfb693 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/use-size.tsx"], + "sourcesContent": ["/// \n\nimport * as React from 'react';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\n\nfunction useSize(element: HTMLElement | null) {\n const [size, setSize] = React.useState<{ width: number; height: number } | undefined>(undefined);\n\n useLayoutEffect(() => {\n if (element) {\n // provide size as early as possible\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n\n // Since we only observe the one element, we don't need to loop over the\n // array\n if (!entries.length) {\n return;\n }\n\n const entry = entries[0];\n let width: number;\n let height: number;\n\n if ('borderBoxSize' in entry) {\n const borderSizeEntry = entry['borderBoxSize'];\n // iron out differences between browsers\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize['inlineSize'];\n height = borderSize['blockSize'];\n } else {\n // for browsers that don't support `borderBoxSize`\n // we calculate it ourselves to get the correct border box.\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n\n setSize({ width, height });\n });\n\n resizeObserver.observe(element, { box: 'border-box' });\n\n return () => resizeObserver.unobserve(element);\n } else {\n // We only want to reset to `undefined` when the element becomes `null`,\n // not if it changes to another element.\n setSize(undefined);\n }\n }, [element]);\n\n return size;\n}\n\nexport { useSize };\n"], + "mappings": ";AAEA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAEhC,SAAS,QAAQ,SAA6B;AAC5C,QAAM,CAAC,MAAM,OAAO,IAAU,eAAwD,MAAS;AAE/F,kBAAgB,MAAM;AACpB,QAAI,SAAS;AAEX,cAAQ,EAAE,OAAO,QAAQ,aAAa,QAAQ,QAAQ,aAAa,CAAC;AAEpE,YAAM,iBAAiB,IAAI,eAAe,CAAC,YAAY;AACrD,YAAI,CAAC,MAAM,QAAQ,OAAO,GAAG;AAC3B;AAAA,QACF;AAIA,YAAI,CAAC,QAAQ,QAAQ;AACnB;AAAA,QACF;AAEA,cAAM,QAAQ,QAAQ,CAAC;AACvB,YAAI;AACJ,YAAI;AAEJ,YAAI,mBAAmB,OAAO;AAC5B,gBAAM,kBAAkB,MAAM,eAAe;AAE7C,gBAAM,aAAa,MAAM,QAAQ,eAAe,IAAI,gBAAgB,CAAC,IAAI;AACzE,kBAAQ,WAAW,YAAY;AAC/B,mBAAS,WAAW,WAAW;AAAA,QACjC,OAAO;AAGL,kBAAQ,QAAQ;AAChB,mBAAS,QAAQ;AAAA,QACnB;AAEA,gBAAQ,EAAE,OAAO,OAAO,CAAC;AAAA,MAC3B,CAAC;AAED,qBAAe,QAAQ,SAAS,EAAE,KAAK,aAAa,CAAC;AAErD,aAAO,MAAM,eAAe,UAAU,OAAO;AAAA,IAC/C,OAAO;AAGL,cAAQ,MAAS;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,OAAO,CAAC;AAEZ,SAAO;AACT;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/package.json b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/package.json new file mode 100644 index 0000000000000000000000000000000000000000..34ee0e4932a2086b7406392dbcf4f49f6a4eb2f3 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.9_react@19.1.0/node_modules/@radix-ui/react-use-size/package.json @@ -0,0 +1,79 @@ +{ + "name": "@radix-ui/react-use-size", + "version": "1.1.1", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "@types/resize-observer-browser": "^0.1.4", + "eslint": "^9.18.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "typescript": "^5.7.3" + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/LICENSE b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a18858fb7b014098cba85703e66609be66a26ef5 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 WorkOS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/README.md b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c79a31e9408a6a65e1d821c3aedc4b6a7cb2a933 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/README.md @@ -0,0 +1,3 @@ +# `react-visually-hidden` + +View docs [here](https://radix-ui.com/primitives/docs/utilities/visually-hidden). diff --git a/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6716e6941befd0576a1b5a2a1c647b04a2478801 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.d.mts @@ -0,0 +1,22 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const VISUALLY_HIDDEN_STYLES: Readonly<{ + position: "absolute"; + border: 0; + width: 1; + height: 1; + padding: 0; + margin: -1; + overflow: "hidden"; + clip: "rect(0, 0, 0, 0)"; + whiteSpace: "nowrap"; + wordWrap: "normal"; +}>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface VisuallyHiddenProps extends PrimitiveSpanProps { +} +declare const VisuallyHidden: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { Root, VISUALLY_HIDDEN_STYLES, VisuallyHidden, type VisuallyHiddenProps }; diff --git a/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6716e6941befd0576a1b5a2a1c647b04a2478801 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts @@ -0,0 +1,22 @@ +import * as React from 'react'; +import { Primitive } from '@radix-ui/react-primitive'; + +declare const VISUALLY_HIDDEN_STYLES: Readonly<{ + position: "absolute"; + border: 0; + width: 1; + height: 1; + padding: 0; + margin: -1; + overflow: "hidden"; + clip: "rect(0, 0, 0, 0)"; + whiteSpace: "nowrap"; + wordWrap: "normal"; +}>; +type PrimitiveSpanProps = React.ComponentPropsWithoutRef; +interface VisuallyHiddenProps extends PrimitiveSpanProps { +} +declare const VisuallyHidden: React.ForwardRefExoticComponent>; +declare const Root: React.ForwardRefExoticComponent>; + +export { Root, VISUALLY_HIDDEN_STYLES, VisuallyHidden, type VisuallyHiddenProps }; diff --git a/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.js b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..50ef26a6207e912a144ea4c2d0b15ba14f4d1de4 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.js @@ -0,0 +1,71 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + Root: () => Root, + VISUALLY_HIDDEN_STYLES: () => VISUALLY_HIDDEN_STYLES, + VisuallyHidden: () => VisuallyHidden +}); +module.exports = __toCommonJS(index_exports); + +// src/visually-hidden.tsx +var React = __toESM(require("react")); +var import_react_primitive = require("@radix-ui/react-primitive"); +var import_jsx_runtime = require("react/jsx-runtime"); +var VISUALLY_HIDDEN_STYLES = Object.freeze({ + // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss + position: "absolute", + border: 0, + width: 1, + height: 1, + padding: 0, + margin: -1, + overflow: "hidden", + clip: "rect(0, 0, 0, 0)", + whiteSpace: "nowrap", + wordWrap: "normal" +}); +var NAME = "VisuallyHidden"; +var VisuallyHidden = React.forwardRef( + (props, forwardedRef) => { + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( + import_react_primitive.Primitive.span, + { + ...props, + ref: forwardedRef, + style: { ...VISUALLY_HIDDEN_STYLES, ...props.style } + } + ); + } +); +VisuallyHidden.displayName = NAME; +var Root = VisuallyHidden; +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1252c7f71dbd0218cf48504aac2153b91e7b4fcc --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/visually-hidden.tsx"], + "sourcesContent": ["export {\n VisuallyHidden,\n //\n Root,\n //\n VISUALLY_HIDDEN_STYLES,\n} from './visually-hidden';\nexport type { VisuallyHiddenProps } from './visually-hidden';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * VisuallyHidden\n * -----------------------------------------------------------------------------------------------*/\n\nconst VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: 'absolute',\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n}) satisfies React.CSSProperties;\n\nconst NAME = 'VisuallyHidden';\n\ntype VisuallyHiddenElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface VisuallyHiddenProps extends PrimitiveSpanProps {}\n\nconst VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return (\n \n );\n }\n);\n\nVisuallyHidden.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = VisuallyHidden;\n\nexport {\n VisuallyHidden,\n //\n Root,\n //\n VISUALLY_HIDDEN_STYLES,\n};\nexport type { VisuallyHiddenProps };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AA6BpB;AAvBN,IAAM,yBAAyB,OAAO,OAAO;AAAA;AAAA,EAE3C,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,UAAU;AACZ,CAAC;AAED,IAAM,OAAO;AAMb,IAAM,iBAAuB;AAAA,EAC3B,CAAC,OAAO,iBAAiB;AACvB,WACE;AAAA,MAAC,iCAAU;AAAA,MAAV;AAAA,QACE,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,OAAO,EAAE,GAAG,wBAAwB,GAAG,MAAM,MAAM;AAAA;AAAA,IACrD;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;AAI7B,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..55dd6895c69c3aae5e61ed0f77e5a1f819b37317 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs @@ -0,0 +1,38 @@ +// src/visually-hidden.tsx +import * as React from "react"; +import { Primitive } from "@radix-ui/react-primitive"; +import { jsx } from "react/jsx-runtime"; +var VISUALLY_HIDDEN_STYLES = Object.freeze({ + // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss + position: "absolute", + border: 0, + width: 1, + height: 1, + padding: 0, + margin: -1, + overflow: "hidden", + clip: "rect(0, 0, 0, 0)", + whiteSpace: "nowrap", + wordWrap: "normal" +}); +var NAME = "VisuallyHidden"; +var VisuallyHidden = React.forwardRef( + (props, forwardedRef) => { + return /* @__PURE__ */ jsx( + Primitive.span, + { + ...props, + ref: forwardedRef, + style: { ...VISUALLY_HIDDEN_STYLES, ...props.style } + } + ); + } +); +VisuallyHidden.displayName = NAME; +var Root = VisuallyHidden; +export { + Root, + VISUALLY_HIDDEN_STYLES, + VisuallyHidden +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..05bbb71caee13195871d1a3759294637afe0b844 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/visually-hidden.tsx"], + "sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * VisuallyHidden\n * -----------------------------------------------------------------------------------------------*/\n\nconst VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: 'absolute',\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n}) satisfies React.CSSProperties;\n\nconst NAME = 'VisuallyHidden';\n\ntype VisuallyHiddenElement = React.ComponentRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface VisuallyHiddenProps extends PrimitiveSpanProps {}\n\nconst VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return (\n \n );\n }\n);\n\nVisuallyHidden.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = VisuallyHidden;\n\nexport {\n VisuallyHidden,\n //\n Root,\n //\n VISUALLY_HIDDEN_STYLES,\n};\nexport type { VisuallyHiddenProps };\n"], + "mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AA6BpB;AAvBN,IAAM,yBAAyB,OAAO,OAAO;AAAA;AAAA,EAE3C,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,UAAU;AACZ,CAAC;AAED,IAAM,OAAO;AAMb,IAAM,iBAAuB;AAAA,EAC3B,CAAC,OAAO,iBAAiB;AACvB,WACE;AAAA,MAAC,UAAU;AAAA,MAAV;AAAA,QACE,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,OAAO,EAAE,GAAG,wBAAwB,GAAG,MAAM,MAAM;AAAA;AAAA,IACrD;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;AAI7B,IAAM,OAAO;", + "names": [] +} diff --git a/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/package.json b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6055ccbbf3e8776a63bfb0baff18d579fd7d8f75 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.1.7_@types+react@19.1.9__@typ_3e00cf61a4977f9c0df2f5eed20e4061/node_modules/@radix-ui/react-visually-hidden/package.json @@ -0,0 +1,68 @@ +{ + "name": "@radix-ui/react-visually-hidden", + "version": "1.2.3", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "dependencies": { + "@radix-ui/react-primitive": "2.1.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + }, + "devDependencies": { + "@types/react": "^19.0.7", + "@types/react-dom": "^19.0.3", + "eslint": "^9.18.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "typescript": "^5.7.3", + "@repo/typescript-config": "0.0.0", + "@repo/eslint-config": "0.0.0", + "@repo/builder": "0.0.0" + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit", + "build": "radix-build" + }, + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/README.md b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/README.md new file mode 100644 index 0000000000000000000000000000000000000000..776375cc19e1e884ccc81794a1ca98e8ba59f66f --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/README.md @@ -0,0 +1,13 @@ +# `rect` + +## Installation + +```sh +$ yarn add @radix-ui/rect +# or +$ npm install @radix-ui/rect +``` + +## Usage + +This is an internal utility, not intended for public usage. diff --git a/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.d.mts b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2d506ad9e96dfbc6c519d7c01b49a857b53ec090 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.d.mts @@ -0,0 +1,16 @@ +type Measurable = { + getBoundingClientRect(): DOMRect; +}; +/** + * Observes an element's rectangle on screen (getBoundingClientRect) + * This is useful to track elements on the screen and attach other elements + * that might be in different layers, etc. + */ +declare function observeElementRect( +/** The element whose rect to observe */ +elementToObserve: Measurable, +/** The callback which will be called when the rect changes */ +callback: CallbackFn): () => void; +type CallbackFn = (rect: DOMRect) => void; + +export { type Measurable, observeElementRect }; diff --git a/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.d.ts b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2d506ad9e96dfbc6c519d7c01b49a857b53ec090 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.d.ts @@ -0,0 +1,16 @@ +type Measurable = { + getBoundingClientRect(): DOMRect; +}; +/** + * Observes an element's rectangle on screen (getBoundingClientRect) + * This is useful to track elements on the screen and attach other elements + * that might be in different layers, etc. + */ +declare function observeElementRect( +/** The element whose rect to observe */ +elementToObserve: Measurable, +/** The callback which will be called when the rect changes */ +callback: CallbackFn): () => void; +type CallbackFn = (rect: DOMRect) => void; + +export { type Measurable, observeElementRect }; diff --git a/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.js b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c132759f51272c8353a05c332fbb9b8a4b5fd233 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.js @@ -0,0 +1,73 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// packages/core/rect/src/index.ts +var index_exports = {}; +__export(index_exports, { + observeElementRect: () => observeElementRect +}); +module.exports = __toCommonJS(index_exports); + +// packages/core/rect/src/observe-element-rect.ts +function observeElementRect(elementToObserve, callback) { + const observedData = observedElements.get(elementToObserve); + if (observedData === void 0) { + observedElements.set(elementToObserve, { rect: {}, callbacks: [callback] }); + if (observedElements.size === 1) { + rafId = requestAnimationFrame(runLoop); + } + } else { + observedData.callbacks.push(callback); + callback(elementToObserve.getBoundingClientRect()); + } + return () => { + const observedData2 = observedElements.get(elementToObserve); + if (observedData2 === void 0) return; + const index = observedData2.callbacks.indexOf(callback); + if (index > -1) { + observedData2.callbacks.splice(index, 1); + } + if (observedData2.callbacks.length === 0) { + observedElements.delete(elementToObserve); + if (observedElements.size === 0) { + cancelAnimationFrame(rafId); + } + } + }; +} +var rafId; +var observedElements = /* @__PURE__ */ new Map(); +function runLoop() { + const changedRectsData = []; + observedElements.forEach((data, element) => { + const newRect = element.getBoundingClientRect(); + if (!rectEquals(data.rect, newRect)) { + data.rect = newRect; + changedRectsData.push(data); + } + }); + changedRectsData.forEach((data) => { + data.callbacks.forEach((callback) => callback(data.rect)); + }); + rafId = requestAnimationFrame(runLoop); +} +function rectEquals(rect1, rect2) { + return rect1.width === rect2.width && rect1.height === rect2.height && rect1.top === rect2.top && rect1.right === rect2.right && rect1.bottom === rect2.bottom && rect1.left === rect2.left; +} +//# sourceMappingURL=index.js.map diff --git a/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.js.map b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..80e46396f52cd8c5d97a3f47274b7f1f26147d27 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/index.ts", "../src/observe-element-rect.ts"], + "sourcesContent": ["export { observeElementRect } from './observe-element-rect';\nexport type { Measurable } from './observe-element-rect';\n", "type Measurable = { getBoundingClientRect(): DOMRect };\n\n/**\n * Observes an element's rectangle on screen (getBoundingClientRect)\n * This is useful to track elements on the screen and attach other elements\n * that might be in different layers, etc.\n */\nfunction observeElementRect(\n /** The element whose rect to observe */\n elementToObserve: Measurable,\n /** The callback which will be called when the rect changes */\n callback: CallbackFn\n) {\n const observedData = observedElements.get(elementToObserve);\n\n if (observedData === undefined) {\n // add the element to the map of observed elements with its first callback\n // because this is the first time this element is observed\n observedElements.set(elementToObserve, { rect: {} as DOMRect, callbacks: [callback] });\n\n if (observedElements.size === 1) {\n // start the internal loop once at least 1 element is observed\n rafId = requestAnimationFrame(runLoop);\n }\n } else {\n // only add a callback for this element as it's already observed\n observedData.callbacks.push(callback);\n callback(elementToObserve.getBoundingClientRect());\n }\n\n return () => {\n const observedData = observedElements.get(elementToObserve);\n if (observedData === undefined) return;\n\n // start by removing the callback\n const index = observedData.callbacks.indexOf(callback);\n if (index > -1) {\n observedData.callbacks.splice(index, 1);\n }\n\n if (observedData.callbacks.length === 0) {\n // stop observing this element because there are no\n // callbacks registered for it anymore\n observedElements.delete(elementToObserve);\n\n if (observedElements.size === 0) {\n // stop the internal loop once no elements are observed anymore\n cancelAnimationFrame(rafId);\n }\n }\n };\n}\n\n// ========================================================================\n// module internals\n\ntype CallbackFn = (rect: DOMRect) => void;\n\ntype ObservedData = {\n rect: DOMRect;\n callbacks: Array;\n};\n\nlet rafId: number;\nconst observedElements: Map = new Map();\n\nfunction runLoop() {\n const changedRectsData: Array = [];\n\n // process all DOM reads first (getBoundingClientRect)\n observedElements.forEach((data, element) => {\n const newRect = element.getBoundingClientRect();\n\n // gather all the data for elements whose rects have changed\n if (!rectEquals(data.rect, newRect)) {\n data.rect = newRect;\n changedRectsData.push(data);\n }\n });\n\n // group DOM writes here after the DOM reads (getBoundingClientRect)\n // as DOM writes will most likely happen with the callbacks\n changedRectsData.forEach((data) => {\n data.callbacks.forEach((callback) => callback(data.rect));\n });\n\n rafId = requestAnimationFrame(runLoop);\n}\n// ========================================================================\n\n/**\n * Returns whether 2 rects are equal in values\n */\nfunction rectEquals(rect1: DOMRect, rect2: DOMRect) {\n return (\n rect1.width === rect2.width &&\n rect1.height === rect2.height &&\n rect1.top === rect2.top &&\n rect1.right === rect2.right &&\n rect1.bottom === rect2.bottom &&\n rect1.left === rect2.left\n );\n}\n\nexport { observeElementRect };\nexport type { Measurable };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,SAAS,mBAEP,kBAEA,UACA;AACA,QAAM,eAAe,iBAAiB,IAAI,gBAAgB;AAE1D,MAAI,iBAAiB,QAAW;AAG9B,qBAAiB,IAAI,kBAAkB,EAAE,MAAM,CAAC,GAAc,WAAW,CAAC,QAAQ,EAAE,CAAC;AAErF,QAAI,iBAAiB,SAAS,GAAG;AAE/B,cAAQ,sBAAsB,OAAO;AAAA,IACvC;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/rect/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..17b4b50d6a79ff1de59a7b40846f986e595f7826 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.mjs @@ -0,0 +1,50 @@ +// packages/core/rect/src/observe-element-rect.ts +function observeElementRect(elementToObserve, callback) { + const observedData = observedElements.get(elementToObserve); + if (observedData === void 0) { + observedElements.set(elementToObserve, { rect: {}, callbacks: [callback] }); + if (observedElements.size === 1) { + rafId = requestAnimationFrame(runLoop); + } + } else { + observedData.callbacks.push(callback); + callback(elementToObserve.getBoundingClientRect()); + } + return () => { + const observedData2 = observedElements.get(elementToObserve); + if (observedData2 === void 0) return; + const index = observedData2.callbacks.indexOf(callback); + if (index > -1) { + observedData2.callbacks.splice(index, 1); + } + if (observedData2.callbacks.length === 0) { + observedElements.delete(elementToObserve); + if (observedElements.size === 0) { + cancelAnimationFrame(rafId); + } + } + }; +} +var rafId; +var observedElements = /* @__PURE__ */ new Map(); +function runLoop() { + const changedRectsData = []; + observedElements.forEach((data, element) => { + const newRect = element.getBoundingClientRect(); + if (!rectEquals(data.rect, newRect)) { + data.rect = newRect; + changedRectsData.push(data); + } + }); + changedRectsData.forEach((data) => { + data.callbacks.forEach((callback) => callback(data.rect)); + }); + rafId = requestAnimationFrame(runLoop); +} +function rectEquals(rect1, rect2) { + return rect1.width === rect2.width && rect1.height === rect2.height && rect1.top === rect2.top && rect1.right === rect2.right && rect1.bottom === rect2.bottom && rect1.left === rect2.left; +} +export { + observeElementRect +}; +//# sourceMappingURL=index.mjs.map diff --git a/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.mjs.map b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..46fd79e253e94ef871523b586420102757105066 --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/dist/index.mjs.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../src/observe-element-rect.ts"], + "sourcesContent": ["type Measurable = { getBoundingClientRect(): DOMRect };\n\n/**\n * Observes an element's rectangle on screen (getBoundingClientRect)\n * This is useful to track elements on the screen and attach other elements\n * that might be in different layers, etc.\n */\nfunction observeElementRect(\n /** The element whose rect to observe */\n elementToObserve: Measurable,\n /** The callback which will be called when the rect changes */\n callback: CallbackFn\n) {\n const observedData = observedElements.get(elementToObserve);\n\n if (observedData === undefined) {\n // add the element to the map of observed elements with its first callback\n // because this is the first time this element is observed\n observedElements.set(elementToObserve, { rect: {} as DOMRect, callbacks: [callback] });\n\n if (observedElements.size === 1) {\n // start the internal loop once at least 1 element is observed\n rafId = requestAnimationFrame(runLoop);\n }\n } else {\n // only add a callback for this element as it's already observed\n observedData.callbacks.push(callback);\n callback(elementToObserve.getBoundingClientRect());\n }\n\n return () => {\n const observedData = observedElements.get(elementToObserve);\n if (observedData === undefined) return;\n\n // start by removing the callback\n const index = observedData.callbacks.indexOf(callback);\n if (index > -1) {\n observedData.callbacks.splice(index, 1);\n }\n\n if (observedData.callbacks.length === 0) {\n // stop observing this element because there are no\n // callbacks registered for it anymore\n observedElements.delete(elementToObserve);\n\n if (observedElements.size === 0) {\n // stop the internal loop once no elements are observed anymore\n cancelAnimationFrame(rafId);\n }\n }\n };\n}\n\n// ========================================================================\n// module internals\n\ntype CallbackFn = (rect: DOMRect) => void;\n\ntype ObservedData = {\n rect: DOMRect;\n callbacks: Array;\n};\n\nlet rafId: number;\nconst observedElements: Map = new Map();\n\nfunction runLoop() {\n const changedRectsData: Array = [];\n\n // process all DOM reads first (getBoundingClientRect)\n observedElements.forEach((data, element) => {\n const newRect = element.getBoundingClientRect();\n\n // gather all the data for elements whose rects have changed\n if (!rectEquals(data.rect, newRect)) {\n data.rect = newRect;\n changedRectsData.push(data);\n }\n });\n\n // group DOM writes here after the DOM reads (getBoundingClientRect)\n // as DOM writes will most likely happen with the callbacks\n changedRectsData.forEach((data) => {\n data.callbacks.forEach((callback) => callback(data.rect));\n });\n\n rafId = requestAnimationFrame(runLoop);\n}\n// ========================================================================\n\n/**\n * Returns whether 2 rects are equal in values\n */\nfunction rectEquals(rect1: DOMRect, rect2: DOMRect) {\n return (\n rect1.width === rect2.width &&\n rect1.height === rect2.height &&\n rect1.top === rect2.top &&\n rect1.right === rect2.right &&\n rect1.bottom === rect2.bottom &&\n rect1.left === rect2.left\n );\n}\n\nexport { observeElementRect };\nexport type { Measurable };\n"], + "mappings": ";AAOA,SAAS,mBAEP,kBAEA,UACA;AACA,QAAM,eAAe,iBAAiB,IAAI,gBAAgB;AAE1D,MAAI,iBAAiB,QAAW;AAG9B,qBAAiB,IAAI,kBAAkB,EAAE,MAAM,CAAC,GAAc,WAAW,CAAC,QAAQ,EAAE,CAAC;AAErF,QAAI,iBAAiB,SAAS,GAAG;AAE/B,cAAQ,sBAAsB,OAAO;AAAA,IACvC;AAAA,EACF,OAAO;AAEL,iBAAa,UAAU,KAAK,QAAQ;AACpC,aAAS,iBAAiB,sBAAsB,CAAC;AAAA,EACnD;AAEA,SAAO,MAAM;AACX,UAAMA,gBAAe,iBAAiB,IAAI,gBAAgB;AAC1D,QAAIA,kBAAiB,OAAW;AAGhC,UAAM,QAAQA,cAAa,UAAU,QAAQ,QAAQ;AACrD,QAAI,QAAQ,IAAI;AACd,MAAAA,cAAa,UAAU,OAAO,OAAO,CAAC;AAAA,IACxC;AAEA,QAAIA,cAAa,UAAU,WAAW,GAAG;AAGvC,uBAAiB,OAAO,gBAAgB;AAExC,UAAI,iBAAiB,SAAS,GAAG;AAE/B,6BAAqB,KAAK;AAAA,MAC5B;AAAA,IACF;AAAA,EACF;AACF;AAYA,IAAI;AACJ,IAAM,mBAAkD,oBAAI,IAAI;AAEhE,SAAS,UAAU;AACjB,QAAM,mBAAwC,CAAC;AAG/C,mBAAiB,QAAQ,CAAC,MAAM,YAAY;AAC1C,UAAM,UAAU,QAAQ,sBAAsB;AAG9C,QAAI,CAAC,WAAW,KAAK,MAAM,OAAO,GAAG;AACnC,WAAK,OAAO;AACZ,uBAAiB,KAAK,IAAI;AAAA,IAC5B;AAAA,EACF,CAAC;AAID,mBAAiB,QAAQ,CAAC,SAAS;AACjC,SAAK,UAAU,QAAQ,CAAC,aAAa,SAAS,KAAK,IAAI,CAAC;AAAA,EAC1D,CAAC;AAED,UAAQ,sBAAsB,OAAO;AACvC;AAMA,SAAS,WAAW,OAAgB,OAAgB;AAClD,SACE,MAAM,UAAU,MAAM,SACtB,MAAM,WAAW,MAAM,UACvB,MAAM,QAAQ,MAAM,OACpB,MAAM,UAAU,MAAM,SACtB,MAAM,WAAW,MAAM,UACvB,MAAM,SAAS,MAAM;AAEzB;", + "names": ["observedData"] +} diff --git a/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/package.json b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0ad4dc2d3535dfc058936847954d8510235a7f1c --- /dev/null +++ b/node_modules/.pnpm/@radix-ui+rect@1.1.1/node_modules/@radix-ui/rect/package.json @@ -0,0 +1,62 @@ +{ + "name": "@radix-ui/rect", + "version": "1.1.1", + "license": "MIT", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "publishConfig": { + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + } + }, + "files": [ + "dist", + "README.md" + ], + "sideEffects": false, + "scripts": { + "lint": "eslint --max-warnings 0 src", + "clean": "rm -rf dist", + "version": "yarn version" + }, + "devDependencies": { + "@repo/eslint-config": "0.0.0", + "@repo/typescript-config": "0.0.0", + "eslint": "^9.18.0", + "typescript": "^5.7.3" + }, + "homepage": "https://radix-ui.com/primitives", + "repository": { + "type": "git", + "url": "git+https://github.com/radix-ui/primitives.git" + }, + "bugs": { + "url": "https://github.com/radix-ui/primitives/issues" + }, + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "types": "./dist/index.d.ts" +} \ No newline at end of file diff --git a/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/LICENSE b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a7cb450bed24317e46722f17e3bab718c64f30c4 --- /dev/null +++ b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Ryan Tsao + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/README.md b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4697edd2ef6aafed8bf123df47b7ee90a5431741 --- /dev/null +++ b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/README.md @@ -0,0 +1,49 @@ +# `@rtsao/scc` + +Find strongly connected components of a directed graph using [Tarjan's algorithm](https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm). + +This algorithm efficiently yields both a topological order and list of any cycles. + +## Installation + +``` +yarn add @rtsao/scc +``` + +``` +npm install @rtsao/scc +``` + +## Usage + +```js +const scc = require("@rtsao/scc"); + +const digraph = new Map([ + ["a", new Set(["c", "d"])], + ["b", new Set(["a"])], + ["c", new Set(["b"])], + ["d", new Set(["e"])], + ["e", new Set()] +]); + +const components = scc(digraph); +// [ Set { 'e' }, Set { 'd' }, Set { 'b', 'c', 'a' } ] +``` + +#### Illustration of example input digraph +``` +┌───┐ ┌───┐ +│ d │ ◀── │ a │ ◀┐ +└───┘ └───┘ │ + │ │ │ + ▼ ▼ │ +┌───┐ ┌───┐ │ +│ e │ │ c │ │ +└───┘ └───┘ │ + │ │ + ▼ │ + ┌───┐ │ + │ b │ ─┘ + └───┘ +``` diff --git a/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/index.d.ts b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ed46b8bc09280f992ae1c54ed55ed43d4d311003 --- /dev/null +++ b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/index.d.ts @@ -0,0 +1 @@ +export default function tarjan(graph: Map>): Array> diff --git a/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/index.js b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b7dd5bb479e809b93245cfcf8a345312a8c8dbbe --- /dev/null +++ b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/index.js @@ -0,0 +1,51 @@ +"use strict"; + +module.exports = tarjan; + +// Adapted from https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm#The_algorithm_in_pseudocode + +function tarjan(graph) { + const indices = new Map(); + const lowlinks = new Map(); + const onStack = new Set(); + const stack = []; + const scc = []; + let idx = 0; + + function strongConnect(v) { + indices.set(v, idx); + lowlinks.set(v, idx); + idx++; + stack.push(v); + onStack.add(v); + + const deps = graph.get(v); + for (const dep of deps) { + if (!indices.has(dep)) { + strongConnect(dep); + lowlinks.set(v, Math.min(lowlinks.get(v), lowlinks.get(dep))); + } else if (onStack.has(dep)) { + lowlinks.set(v, Math.min(lowlinks.get(v), indices.get(dep))); + } + } + + if (lowlinks.get(v) === indices.get(v)) { + const vertices = new Set(); + let w = null; + while (v !== w) { + w = stack.pop(); + onStack.delete(w); + vertices.add(w); + } + scc.push(vertices); + } + } + + for (const v of graph.keys()) { + if (!indices.has(v)) { + strongConnect(v); + } + } + + return scc; +} diff --git a/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/index.js.flow b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/index.js.flow new file mode 100644 index 0000000000000000000000000000000000000000..479ff4ff6a7316810ec6e8b41a98fc17b2e83064 --- /dev/null +++ b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/index.js.flow @@ -0,0 +1,5 @@ +// @flow + +declare function tarjan(graph: Map>): Array>; + +declare module.exports: typeof tarjan; diff --git a/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/package.json b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/package.json new file mode 100644 index 0000000000000000000000000000000000000000..67f67ccd99820e1157b30b82229f412edc8f3f6b --- /dev/null +++ b/node_modules/.pnpm/@rtsao+scc@1.1.0/node_modules/@rtsao/scc/package.json @@ -0,0 +1,7 @@ +{ + "name": "@rtsao/scc", + "version": "1.1.0", + "repository": "rtsao/scc", + "main": "index.js", + "license": "MIT" +} diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/.eslintrc.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/.eslintrc.js new file mode 100644 index 0000000000000000000000000000000000000000..6f8b27daf8a88d898e7acbb57e30a746864c3c51 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/.eslintrc.js @@ -0,0 +1,22 @@ +// This is a workaround for https://github.com/eslint/eslint/issues/3458 +require('decoupled-local-node-rig/profiles/default/includes/eslint/patch/modern-module-resolution'); +// This is a workaround for https://github.com/microsoft/rushstack/issues/3021 +require('decoupled-local-node-rig/profiles/default/includes/eslint/patch/custom-config-package-names'); + +module.exports = { + extends: [ + 'decoupled-local-node-rig/profiles/default/includes/eslint/profile/node', + 'decoupled-local-node-rig/profiles/default/includes/eslint/mixins/friendly-locals', + 'decoupled-local-node-rig/profiles/default/includes/eslint/mixins/tsdoc' + ], + parserOptions: { tsconfigRootDir: __dirname }, + + overrides: [ + { + files: ['*.ts', '*.tsx'], + rules: { + 'no-console': 'off' + } + } + ] +}; diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/CHANGELOG.json b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/CHANGELOG.json new file mode 100644 index 0000000000000000000000000000000000000000..f1c2fbb8326dddc8ed7c47be22f5e5678b03e40a --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/CHANGELOG.json @@ -0,0 +1,462 @@ +{ + "name": "@rushstack/eslint-patch", + "entries": [ + { + "version": "1.12.0", + "tag": "@rushstack/eslint-patch_v1.12.0", + "date": "Thu, 26 Jun 2025 18:57:04 GMT", + "comments": { + "minor": [ + { + "comment": "Update for compatibility with ESLint 9" + } + ] + } + }, + { + "version": "1.11.0", + "tag": "@rushstack/eslint-patch_v1.11.0", + "date": "Tue, 11 Mar 2025 02:12:33 GMT", + "comments": { + "minor": [ + { + "comment": "Bump the `@typescript-eslint/*` packages to add support for TypeScript 5.8." + } + ] + } + }, + { + "version": "1.10.5", + "tag": "@rushstack/eslint-patch_v1.10.5", + "date": "Tue, 07 Jan 2025 16:11:06 GMT", + "comments": { + "patch": [ + { + "comment": "Fix a performance issue when locating \".eslint-bulk-suppressions.json\"." + } + ] + } + }, + { + "version": "1.10.4", + "tag": "@rushstack/eslint-patch_v1.10.4", + "date": "Sat, 27 Jul 2024 00:10:27 GMT", + "comments": { + "patch": [ + { + "comment": "Include CHANGELOG.md in published releases again" + } + ] + } + }, + { + "version": "1.10.3", + "tag": "@rushstack/eslint-patch_v1.10.3", + "date": "Fri, 17 May 2024 00:10:40 GMT", + "comments": { + "patch": [ + { + "comment": "[eslint-patch] Allow use of ESLint v9" + } + ] + } + }, + { + "version": "1.10.2", + "tag": "@rushstack/eslint-patch_v1.10.2", + "date": "Wed, 10 Apr 2024 21:59:39 GMT", + "comments": { + "patch": [ + { + "comment": "Bump maximum supported ESLint version for the bulk-suppressions tool to `8.57.0`." + } + ] + } + }, + { + "version": "1.10.1", + "tag": "@rushstack/eslint-patch_v1.10.1", + "date": "Fri, 29 Mar 2024 05:46:41 GMT", + "comments": { + "patch": [ + { + "comment": "Fix an issue where the `eslint-bulk prune` command would crash if a bulk suppressions file exists that speicifies no suppressions." + }, + { + "comment": "Exit with success under normal conditions." + } + ] + } + }, + { + "version": "1.10.0", + "tag": "@rushstack/eslint-patch_v1.10.0", + "date": "Thu, 28 Mar 2024 18:11:12 GMT", + "comments": { + "patch": [ + { + "comment": "Fix an issue with running `eslint-bulk prune` in a project with suppressions that refer to deleted files." + } + ], + "minor": [ + { + "comment": "Delete the `.eslint-bulk-suppressions.json` file during pruning if all suppressions have been eliminated." + } + ] + } + }, + { + "version": "1.9.0", + "tag": "@rushstack/eslint-patch_v1.9.0", + "date": "Wed, 27 Mar 2024 19:47:21 GMT", + "comments": { + "minor": [ + { + "comment": "Fix an issue where `eslint-bulk prune` does not work if there are no files to lint in the project root." + } + ] + } + }, + { + "version": "1.8.0", + "tag": "@rushstack/eslint-patch_v1.8.0", + "date": "Wed, 20 Mar 2024 02:09:14 GMT", + "comments": { + "minor": [ + { + "comment": "Refactor the bulk-suppressions feature to fix some performance issues." + } + ], + "patch": [ + { + "comment": "Fix an issue where linting issues that were already suppressed via suppression comments were recorded in the bulk suppressions list." + } + ] + } + }, + { + "version": "1.7.2", + "tag": "@rushstack/eslint-patch_v1.7.2", + "date": "Thu, 25 Jan 2024 23:03:57 GMT", + "comments": { + "patch": [ + { + "comment": "Some minor documentation updates" + } + ] + } + }, + { + "version": "1.7.1", + "tag": "@rushstack/eslint-patch_v1.7.1", + "date": "Wed, 24 Jan 2024 07:38:34 GMT", + "comments": { + "patch": [ + { + "comment": "Update documentation" + } + ] + } + }, + { + "version": "1.7.0", + "tag": "@rushstack/eslint-patch_v1.7.0", + "date": "Tue, 16 Jan 2024 18:30:10 GMT", + "comments": { + "minor": [ + { + "comment": "Add support for TypeScript 5.3 with @typescript-eslint 6.19.x" + } + ] + } + }, + { + "version": "1.6.1", + "tag": "@rushstack/eslint-patch_v1.6.1", + "date": "Fri, 15 Dec 2023 01:10:06 GMT", + "comments": { + "patch": [ + { + "comment": "Fix bulk suppression patch's eslintrc detection in polyrepos" + } + ] + } + }, + { + "version": "1.6.0", + "tag": "@rushstack/eslint-patch_v1.6.0", + "date": "Wed, 22 Nov 2023 01:45:18 GMT", + "comments": { + "minor": [ + { + "comment": "Add an experimental new feature for ESLint bulk suppressions; for details see GitHub #4303" + } + ] + } + }, + { + "version": "1.5.1", + "tag": "@rushstack/eslint-patch_v1.5.1", + "date": "Sun, 01 Oct 2023 02:56:29 GMT", + "comments": { + "patch": [ + { + "comment": "Fix patch compatibility with ESLint 7 for versions matching <7.12.0" + } + ] + } + }, + { + "version": "1.5.0", + "tag": "@rushstack/eslint-patch_v1.5.0", + "date": "Tue, 26 Sep 2023 09:30:33 GMT", + "comments": { + "minor": [ + { + "comment": "Add an optional patch which can be used to allow ESLint to extend configurations from packages that do not have the \"eslint-config-\" prefix" + } + ] + } + }, + { + "version": "1.4.0", + "tag": "@rushstack/eslint-patch_v1.4.0", + "date": "Fri, 15 Sep 2023 00:36:58 GMT", + "comments": { + "minor": [ + { + "comment": "Update @types/node from 14 to 18" + } + ] + } + }, + { + "version": "1.3.3", + "tag": "@rushstack/eslint-patch_v1.3.3", + "date": "Tue, 08 Aug 2023 07:10:39 GMT", + "comments": { + "patch": [ + { + "comment": "Fix patching for running eslint via eslint/use-at-your-own-risk, which VS Code's eslint extension does when enabling flat config support" + } + ] + } + }, + { + "version": "1.3.2", + "tag": "@rushstack/eslint-patch_v1.3.2", + "date": "Thu, 15 Jun 2023 00:21:01 GMT", + "comments": { + "patch": [ + { + "comment": "[eslint-patch] add invalid importer path test to ESLint 7.x || 8.x block" + } + ] + } + }, + { + "version": "1.3.1", + "tag": "@rushstack/eslint-patch_v1.3.1", + "date": "Wed, 07 Jun 2023 22:45:16 GMT", + "comments": { + "patch": [ + { + "comment": "Add test for invalid importer path to fallback to relative path when loading eslint 6 plugins" + } + ] + } + }, + { + "version": "1.3.0", + "tag": "@rushstack/eslint-patch_v1.3.0", + "date": "Mon, 22 May 2023 06:34:32 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade the @typescript-eslint/* dependencies to ~5.59.2" + } + ] + } + }, + { + "version": "1.2.0", + "tag": "@rushstack/eslint-patch_v1.2.0", + "date": "Thu, 15 Sep 2022 00:18:51 GMT", + "comments": { + "minor": [ + { + "comment": "Use original resolver if patched resolver fails." + } + ] + } + }, + { + "version": "1.1.4", + "tag": "@rushstack/eslint-patch_v1.1.4", + "date": "Tue, 28 Jun 2022 00:23:32 GMT", + "comments": { + "patch": [ + { + "comment": "Update the README to mention support for ESLint 8." + } + ] + } + }, + { + "version": "1.1.3", + "tag": "@rushstack/eslint-patch_v1.1.3", + "date": "Fri, 15 Apr 2022 00:12:36 GMT", + "comments": { + "patch": [ + { + "comment": "Fix an issue where tools could not determine the module type as CommonJS" + } + ] + } + }, + { + "version": "1.1.2", + "tag": "@rushstack/eslint-patch_v1.1.2", + "date": "Sat, 09 Apr 2022 02:24:26 GMT", + "comments": { + "patch": [ + { + "comment": "Rename the \"master\" branch to \"main\"." + } + ] + } + }, + { + "version": "1.1.1", + "tag": "@rushstack/eslint-patch_v1.1.1", + "date": "Tue, 15 Mar 2022 19:15:53 GMT", + "comments": { + "patch": [ + { + "comment": "Fix the path in the package.json \"directory\" field." + } + ] + } + }, + { + "version": "1.1.0", + "tag": "@rushstack/eslint-patch_v1.1.0", + "date": "Fri, 05 Nov 2021 15:09:18 GMT", + "comments": { + "minor": [ + { + "comment": "feat(eslint-patch): Find patch targets independently of disk layout" + } + ] + } + }, + { + "version": "1.0.9", + "tag": "@rushstack/eslint-patch_v1.0.9", + "date": "Wed, 27 Oct 2021 00:08:15 GMT", + "comments": { + "patch": [ + { + "comment": "Update the package.json repository field to include the directory property." + } + ] + } + }, + { + "version": "1.0.8", + "tag": "@rushstack/eslint-patch_v1.0.8", + "date": "Wed, 13 Oct 2021 15:09:54 GMT", + "comments": { + "patch": [ + { + "comment": "Add support for ESLint 8.0.0" + } + ] + } + }, + { + "version": "1.0.7", + "tag": "@rushstack/eslint-patch_v1.0.7", + "date": "Thu, 23 Sep 2021 00:10:40 GMT", + "comments": { + "patch": [ + { + "comment": "Upgrade the `@types/node` dependency to version to version 12." + } + ] + } + }, + { + "version": "1.0.6", + "tag": "@rushstack/eslint-patch_v1.0.6", + "date": "Fri, 30 Oct 2020 00:10:14 GMT", + "comments": { + "patch": [ + { + "comment": "Update the \"modern-module-resolution\" patch to support ESLint 7.8.0 and newer" + } + ] + } + }, + { + "version": "1.0.5", + "tag": "@rushstack/eslint-patch_v1.0.5", + "date": "Wed, 30 Sep 2020 18:39:17 GMT", + "comments": { + "patch": [ + { + "comment": "Update to build with @rushstack/heft-node-rig" + } + ] + } + }, + { + "version": "1.0.4", + "tag": "@rushstack/eslint-patch_v1.0.4", + "date": "Wed, 30 Sep 2020 06:53:53 GMT", + "comments": { + "patch": [ + { + "comment": "Update README.md" + } + ] + } + }, + { + "version": "1.0.3", + "tag": "@rushstack/eslint-patch_v1.0.3", + "date": "Wed, 12 Aug 2020 00:10:05 GMT", + "comments": { + "patch": [ + { + "comment": "Updated project to build with Heft" + } + ] + } + }, + { + "version": "1.0.2", + "tag": "@rushstack/eslint-patch_v1.0.2", + "date": "Wed, 24 Jun 2020 09:50:48 GMT", + "comments": { + "patch": [ + { + "comment": "Fix an issue with the published file set" + } + ] + } + }, + { + "version": "1.0.1", + "tag": "@rushstack/eslint-patch_v1.0.1", + "date": "Wed, 24 Jun 2020 09:04:28 GMT", + "comments": { + "patch": [ + { + "comment": "Initial release" + } + ] + } + } + ] +} diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/CHANGELOG.md b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..bfe83b95ad2e29a1ba8e66ab0b95bcc962a1cd02 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/CHANGELOG.md @@ -0,0 +1,272 @@ +# Change Log - @rushstack/eslint-patch + +This log was last generated on Thu, 26 Jun 2025 18:57:04 GMT and should not be manually modified. + +## 1.12.0 +Thu, 26 Jun 2025 18:57:04 GMT + +### Minor changes + +- Update for compatibility with ESLint 9 + +## 1.11.0 +Tue, 11 Mar 2025 02:12:33 GMT + +### Minor changes + +- Bump the `@typescript-eslint/*` packages to add support for TypeScript 5.8. + +## 1.10.5 +Tue, 07 Jan 2025 16:11:06 GMT + +### Patches + +- Fix a performance issue when locating ".eslint-bulk-suppressions.json". + +## 1.10.4 +Sat, 27 Jul 2024 00:10:27 GMT + +### Patches + +- Include CHANGELOG.md in published releases again + +## 1.10.3 +Fri, 17 May 2024 00:10:40 GMT + +### Patches + +- [eslint-patch] Allow use of ESLint v9 + +## 1.10.2 +Wed, 10 Apr 2024 21:59:39 GMT + +### Patches + +- Bump maximum supported ESLint version for the bulk-suppressions tool to `8.57.0`. + +## 1.10.1 +Fri, 29 Mar 2024 05:46:41 GMT + +### Patches + +- Fix an issue where the `eslint-bulk prune` command would crash if a bulk suppressions file exists that speicifies no suppressions. +- Exit with success under normal conditions. + +## 1.10.0 +Thu, 28 Mar 2024 18:11:12 GMT + +### Minor changes + +- Delete the `.eslint-bulk-suppressions.json` file during pruning if all suppressions have been eliminated. + +### Patches + +- Fix an issue with running `eslint-bulk prune` in a project with suppressions that refer to deleted files. + +## 1.9.0 +Wed, 27 Mar 2024 19:47:21 GMT + +### Minor changes + +- Fix an issue where `eslint-bulk prune` does not work if there are no files to lint in the project root. + +## 1.8.0 +Wed, 20 Mar 2024 02:09:14 GMT + +### Minor changes + +- Refactor the bulk-suppressions feature to fix some performance issues. + +### Patches + +- Fix an issue where linting issues that were already suppressed via suppression comments were recorded in the bulk suppressions list. + +## 1.7.2 +Thu, 25 Jan 2024 23:03:57 GMT + +### Patches + +- Some minor documentation updates + +## 1.7.1 +Wed, 24 Jan 2024 07:38:34 GMT + +### Patches + +- Update documentation + +## 1.7.0 +Tue, 16 Jan 2024 18:30:10 GMT + +### Minor changes + +- Add support for TypeScript 5.3 with @typescript-eslint 6.19.x + +## 1.6.1 +Fri, 15 Dec 2023 01:10:06 GMT + +### Patches + +- Fix bulk suppression patch's eslintrc detection in polyrepos + +## 1.6.0 +Wed, 22 Nov 2023 01:45:18 GMT + +### Minor changes + +- Add an experimental new feature for ESLint bulk suppressions; for details see GitHub #4303 + +## 1.5.1 +Sun, 01 Oct 2023 02:56:29 GMT + +### Patches + +- Fix patch compatibility with ESLint 7 for versions matching <7.12.0 + +## 1.5.0 +Tue, 26 Sep 2023 09:30:33 GMT + +### Minor changes + +- Add an optional patch which can be used to allow ESLint to extend configurations from packages that do not have the "eslint-config-" prefix + +## 1.4.0 +Fri, 15 Sep 2023 00:36:58 GMT + +### Minor changes + +- Update @types/node from 14 to 18 + +## 1.3.3 +Tue, 08 Aug 2023 07:10:39 GMT + +### Patches + +- Fix patching for running eslint via eslint/use-at-your-own-risk, which VS Code's eslint extension does when enabling flat config support + +## 1.3.2 +Thu, 15 Jun 2023 00:21:01 GMT + +### Patches + +- [eslint-patch] add invalid importer path test to ESLint 7.x || 8.x block + +## 1.3.1 +Wed, 07 Jun 2023 22:45:16 GMT + +### Patches + +- Add test for invalid importer path to fallback to relative path when loading eslint 6 plugins + +## 1.3.0 +Mon, 22 May 2023 06:34:32 GMT + +### Minor changes + +- Upgrade the @typescript-eslint/* dependencies to ~5.59.2 + +## 1.2.0 +Thu, 15 Sep 2022 00:18:51 GMT + +### Minor changes + +- Use original resolver if patched resolver fails. + +## 1.1.4 +Tue, 28 Jun 2022 00:23:32 GMT + +### Patches + +- Update the README to mention support for ESLint 8. + +## 1.1.3 +Fri, 15 Apr 2022 00:12:36 GMT + +### Patches + +- Fix an issue where tools could not determine the module type as CommonJS + +## 1.1.2 +Sat, 09 Apr 2022 02:24:26 GMT + +### Patches + +- Rename the "master" branch to "main". + +## 1.1.1 +Tue, 15 Mar 2022 19:15:53 GMT + +### Patches + +- Fix the path in the package.json "directory" field. + +## 1.1.0 +Fri, 05 Nov 2021 15:09:18 GMT + +### Minor changes + +- feat(eslint-patch): Find patch targets independently of disk layout + +## 1.0.9 +Wed, 27 Oct 2021 00:08:15 GMT + +### Patches + +- Update the package.json repository field to include the directory property. + +## 1.0.8 +Wed, 13 Oct 2021 15:09:54 GMT + +### Patches + +- Add support for ESLint 8.0.0 + +## 1.0.7 +Thu, 23 Sep 2021 00:10:40 GMT + +### Patches + +- Upgrade the `@types/node` dependency to version to version 12. + +## 1.0.6 +Fri, 30 Oct 2020 00:10:14 GMT + +### Patches + +- Update the "modern-module-resolution" patch to support ESLint 7.8.0 and newer + +## 1.0.5 +Wed, 30 Sep 2020 18:39:17 GMT + +### Patches + +- Update to build with @rushstack/heft-node-rig + +## 1.0.4 +Wed, 30 Sep 2020 06:53:53 GMT + +### Patches + +- Update README.md + +## 1.0.3 +Wed, 12 Aug 2020 00:10:05 GMT + +### Patches + +- Updated project to build with Heft + +## 1.0.2 +Wed, 24 Jun 2020 09:50:48 GMT + +### Patches + +- Fix an issue with the published file set + +## 1.0.1 +Wed, 24 Jun 2020 09:04:28 GMT + +### Patches + +- Initial release + diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/LICENSE b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..838114d971bd0157c694c5ae0445ac69166980bc --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/LICENSE @@ -0,0 +1,24 @@ +@rushstack/eslint-patch + +Copyright (c) Microsoft Corporation. All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/README.md b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/README.md new file mode 100644 index 0000000000000000000000000000000000000000..36fa492281678ff5e0d55de2c4969f560402191d --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/README.md @@ -0,0 +1,252 @@ +# @rushstack/eslint-patch + +Enhance [ESLint](https://eslint.org/) with better support for large scale monorepos! + +This is a runtime patch that enables new/experimental features for ESLint. It operates as a "monkey patch" +that gets loaded with **.eslintrc.js** and modifies the ESLint engine in memory. This approach works +with your existing ESLint version (no need to install a forked ESLint), and is fully interoperable with +companion tools such as the ESLint extensions for VS Code and WebStorm. + +This package provides several independently loadable features: + +- **eslint-bulk-suppressions**: enables you to roll out new lint rules in your monorepo without having to + clutter up source files with thousands of machine-generated `// eslint-ignore-next-line` directives. + Instead, the "bulk suppressions" for legacy violations are managed in a separate file called + **.eslint-bulk-suppressions.json**. + +- **modern-module-resolution**: allows an ESLint config package to provide plugin dependencies, avoiding the + problem where hundreds of projects in a monorepo need to copy+paste the same `"devDependencies"` in + every **package.json** file. + + > **NOTE:** ESLint 8.21.0 has now introduced a new `ESLINT_USE_FLAT_CONFIG` mode that may reduce the need + for the `modern-module-resolution` patch. + +- **custom-config-package-names**: enables [rig packages](https://heft.rushstack.io/pages/intro/rig_packages/) + to provide shareable configs for ESLint, by removing the requirement that `eslint-config` must appear in + the NPM package name. + +Contributions welcome! If you have more ideas for experimental ESLint enhancements that might benefit +large scale monorepos, consider adding them to this patch. + + +# eslint-bulk-suppressions feature + + + +### What it does + +As your monorepo evolves and grows, there's an ongoing need to expand and improve lint rules. But whenever a +new rule is enabled, there may be hundreds or thousands of "legacy violations" in existing source files. +How to handle that? We could fix the old code, but that's often prohibitively expensive and may even cause +regressions. We could disable the rule for those projects or files, but we want new code to follow the rule. +An effective solution is to inject thousands of `// eslint-ignore-next-line` lines, but these "bulk suppressions" +have an unintended side effect: It normalizes the practice of suppressing lint rules. If people get used to +seeing `// eslint-ignore-next-line` everywhere, nobody will notice when humans suppress the rules for new code. +That would undermine the mission of establishing better code standards. + +The `eslint-bulk-suppressions` feature introduces a way to store machine-generated suppressions in a separate +file **.eslint-bulk-suppressions.json** which can even be protected using `CODEOWNERS` policies, since that file +will generally only change when new lint rules are introduced, or in occasional circumstances when existing files +are being moved or renamed. In this way `// eslint-ignore-next-line` remains a directive written by humans +and hopefully rarely needed. + + +### Why it's a patch + +As with `modern-module-resolution`, our hope is for this feature to eventually be incorporated as an official +feature of ESLint. Starting out as an unofficial patch allows faster iteration and community feedback. + + +### How to use it + +1. Add `@rushstack/eslint-patch` as a dependency of your project: + + ```bash + cd your-project + npm install --save-dev @rushstack/eslint-patch + ``` + +2. Globally install the [`@rushstack/eslint-bulk`](https://www.npmjs.com/package/@rushstack/eslint-bulk) + command line interface (CLI) package. For example: + + ```bash + npm install --global @rushstack/eslint-bulk + ``` + + This installs the `eslint-bulk` shell command for managing the **.eslint-bulk-suppressions.json** files. + With it you can generate new suppressions as well as "prune" old suppressions that are no longer needed. + +3. Load the patch by adding the following `require()` statement as the first line of + your **.eslintrc.js** file. For example: + + **.eslintrc.js** + ```js + require("@rushstack/eslint-patch/eslint-bulk-suppressions"); // 👈 add this line + + module.exports = { + rules: { + rule1: 'error', + rule2: 'warning' + }, + parserOptions: { tsconfigRootDir: __dirname } + }; + ``` + +Typical workflow: + +1. Checkout your `main` branch, which is in a clean state where ESLint reports no violations. +2. Update your configuration to enable the latest lint rules; ESLint now reports thousands of legacy violations. +3. Run `eslint-bulk suppress --all ./src` to update **.eslint-bulk-suppressions.json.** +4. ESLint now no longer reports violations, so commit the results to Git and merge your pull request. +5. Over time, engineers may improve some of the suppressed code, in which case the associated suppressions are no longer needed. +6. Run `eslint-bulk prune` periodically to find and remove unnecessary suppressions from **.eslint-bulk-suppressions.json**, ensuring that new violations will now get caught in those scopes. + +### "eslint-bulk suppress" command + +```bash +eslint-bulk suppress --rule NAME1 [--rule NAME2...] PATH1 [PATH2...] +eslint-bulk suppress --all PATH1 [PATH2...] +``` + +Use this command to automatically generate bulk suppressions for the specified lint rules and file paths. +The path argument is a [glob pattern](https://en.wikipedia.org/wiki/Glob_(programming)) with the same syntax +as path arguments for the `eslint` command. + + +### "eslint-bulk prune" command + +Use this command to automatically delete all unnecessary suppression entries in all +**.eslint-bulk-suppressions.json** files under the current working directory. + +```bash +eslint-bulk prune +``` + +### Implementation notes + +The `eslint-bulk` command is a thin wrapper whose behavior is actually provided by the patch itself. +In this way, if your monorepo contains projects using different versions of this package, the same globally +installed `eslint-bulk` command can be used under any project folder, and it will always invoke the correct +version of the engine compatible with that project. Because the patch is loaded by ESLint, the `eslint-bulk` +command must be invoked in a project folder that contains an **.eslintrc.js** configuration with correctly +installed **package.json** dependencies. + +Here's an example of the bulk suppressions file content: + +**.eslint-bulk-suppressions.json** +```js +{ + "suppressions": [ + { + "rule": "no-var", + "file": "./src/your-file.ts", + "scopeId": ".ExampleClass.exampleMethod" + } + ] +} +``` +The `rule` field is the ESLint rule name. The `file` field is the source file path, relative to the **eslintrc.js** file. The `scopeId` is a special string built from the names of containing structures. (For implementation details, take a look at the [calculateScopeId()](https://github.com/microsoft/rushstack/blob/e95c51088341f01516ee5a7639d57c3f6dce8772/eslint/eslint-patch/src/eslint-bulk-suppressions/bulk-suppressions-patch.ts#L52) function.) The `scopeId` identifies a region of code where the rule should be suppressed, while being reasonably stable across edits of the source file. + +# modern-module-resolution feature + +### What it does + +This patch is a workaround for a longstanding [ESLint feature request](https://github.com/eslint/eslint/issues/3458) +that would allow a shareable ESLint config to bring along its own plugins, rather than imposing peer dependencies +on every consumer of the config. In a monorepo scenario, this enables your lint setup to be consolidated in a +single NPM package. Doing so greatly reduces the copy+pasting and version management for all the other projects +that use your standard lint rule set, but don't want to be bothered with the details. + +> **NOTE:** ESLint 8.21.0 has now introduced a new `ESLINT_USE_FLAT_CONFIG` mode that may reduce the need +> for this patch. + + +### Why it's a patch + +We initially proposed this feature in a pull request for the official ESLint back in 2019, however the +maintainers preferred to implement a more comprehensive overhaul of the ESLint config engine. It ultimately +shipped with the experimental new `ESLINT_USE_FLAT_CONFIG` mode (still opt-in as of ESLint 8). +While waiting for that, Rush Stack's `modern-module-resolution` patch provided a reliable interim solution. +We will continue to maintain this patch as long as it is being widely used, but we encourage you to check out +`ESLINT_USE_FLAT_CONFIG` and see if it meets your needs. + + +### How to use it + +1. Add `@rushstack/eslint-patch` as a dependency of your project: + + ```bash + cd your-project + npm install --save-dev @rushstack/eslint-patch + ``` + +2. Add a `require()` call to the to top of the **.eslintrc.js** file for each project that depends + on your shareable ESLint config, for example: + + **.eslintrc.js** + ```ts + require("@rushstack/eslint-patch/modern-module-resolution"); // 👈 add this line + + // Add your "extends" boilerplate here, for example: + module.exports = { + extends: ['@your-company/eslint-config'], + parserOptions: { tsconfigRootDir: __dirname } + }; + ``` + +With this change, the local project no longer needs any ESLint plugins in its **package.json** file. +Instead, the hypothetical `@your-company/eslint-config` NPM package would declare the plugins as its +own dependencies. + +This patch works by modifying the ESLint engine so that its module resolver will load relative to the folder of +the referencing config file, rather than the project folder. The patch is compatible with ESLint 6, 7, and 8. +It also works with any editor extensions that load ESLint as a library. + +For an even leaner setup, `@your-company/eslint-config` can provide the patches as its own dependency. +See [@rushstack/eslint-config](https://github.com/microsoft/rushstack/blob/main/eslint/eslint-config/patch/modern-module-resolution.js) for a real world example. + + +# custom-config-package-names feature + +### What it does + +Load the `custom-config-package-names` patch to remove ESLint's +[naming requirement](https://eslint.org/docs/latest/extend/shareable-configs) +that `eslint-config` must be part of the NPM package name for shareable configs. + +This is useful because Rush Stack's [rig package](https://heft.rushstack.io/pages/intro/rig_packages/) +specification defines a way for many different tooling configurations and dependencies to be shared +via a single NPM package, for example +[`@rushstack/heft-web-rig`](https://www.npmjs.com/package/@rushstack/heft-web-rig). +Rigs avoid a lot of copy+pasting of dependencies in a large scale monorepo. +Rig packages always include the `-rig` suffix in their name. It doesn't make sense to enforce +that `eslint-config` should also appear in the name of a package that includes shareable configs +for many other tools besides ESLint. + +### How to use it + +Continuing the example above, to load this patch you would add a second line to your config file: + +**.eslintrc.js** +```ts +require("@rushstack/eslint-patch/modern-module-resolution"); +require("@rushstack/eslint-patch/custom-config-package-names"); // 👈 add this line + +// Add your "extends" boilerplate here, for example: +module.exports = { + extends: [ + '@your-company/build-rig/profile/default/includes/eslint/node' // Notice the package name does not start with "eslint-config-" + ], + parserOptions: { tsconfigRootDir: __dirname } +}; +``` + + +# Links + +- [CHANGELOG.md](https://github.com/microsoft/rushstack/blob/main/eslint/eslint-patch/CHANGELOG.md) - Find + out what's new in the latest version + +- [`@rushstack/eslint-bulk`](https://www.npmjs.com/package/@rushstack/eslint-bulk) CLI package + +`@rushstack/eslint-patch` is part of the [Rush Stack](https://rushstack.io/) family of projects. diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/custom-config-package-names.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/custom-config-package-names.js new file mode 100644 index 0000000000000000000000000000000000000000..8897e869792fba3c6626bf4e65a6f92a96f1611d --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/custom-config-package-names.js @@ -0,0 +1 @@ +require('./lib/custom-config-package-names'); diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/eslint-bulk-suppressions.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/eslint-bulk-suppressions.js new file mode 100644 index 0000000000000000000000000000000000000000..b1236d4e449870772517bca730117763165e4a2c --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/eslint-bulk-suppressions.js @@ -0,0 +1 @@ +require('./lib/eslint-bulk-suppressions'); diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7401a7a2be98d382b8f76745d412106b30deeacf --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.d.ts @@ -0,0 +1,13 @@ +declare const isModuleResolutionError: (ex: unknown) => boolean; +declare let eslintFolder: string | undefined; +export declare const eslintPackageVersion: string; +declare const ESLINT_MAJOR_VERSION: number; +declare let configArrayFactory: any; +declare let ModuleResolver: { + resolve: any; +}; +declare let Naming: { + normalizePackageName: any; +}; +export { eslintFolder, configArrayFactory, ModuleResolver, Naming, ESLINT_MAJOR_VERSION, isModuleResolutionError }; +//# sourceMappingURL=_patch-base.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9ba761a25b2cf2b3c8b7e6681ea227a3a81a3880 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_patch-base.d.ts","sourceRoot":"","sources":["../src/_patch-base.ts"],"names":[],"mappings":"AAYA,QAAA,MAAM,uBAAuB,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,OACyD,CAAC;AAuE1G,QAAA,IAAI,YAAY,EAAE,MAAM,GAAG,SAAqB,CAAC;AAqNjD,eAAO,MAAM,oBAAoB,EAAE,MAAoC,CAAC;AACxE,QAAA,MAAM,oBAAoB,EAAE,MAA2C,CAAC;AAiBxE,QAAA,IAAI,kBAAkB,EAAE,GAAG,CAAC;AAQ5B,QAAA,IAAI,cAAc,EAAE;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,CAAC;AAErC,QAAA,IAAI,MAAM,EAAE;IAAE,oBAAoB,EAAE,GAAG,CAAA;CAAE,CAAC;AAS1C,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,MAAM,EACN,oBAAoB,EACpB,uBAAuB,EACxB,CAAC"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.js new file mode 100644 index 0000000000000000000000000000000000000000..d62619e4001d1c39cb570df3bb0e4c338096e94d --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.js @@ -0,0 +1,286 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isModuleResolutionError = exports.ESLINT_MAJOR_VERSION = exports.Naming = exports.ModuleResolver = exports.configArrayFactory = exports.eslintFolder = exports.eslintPackageVersion = void 0; +// This is a workaround for https://github.com/eslint/eslint/issues/3458 +// +// To correct how ESLint searches for plugin packages, add this line to the top of your project's .eslintrc.js file: +// +// require("@rushstack/eslint-patch/modern-module-resolution"); +// +const path_1 = __importDefault(require("path")); +const isModuleResolutionError = (ex) => typeof ex === 'object' && !!ex && 'code' in ex && ex.code === 'MODULE_NOT_FOUND'; +exports.isModuleResolutionError = isModuleResolutionError; +const FLAT_CONFIG_REGEX = /eslint\.config\.(cjs|mjs|js)$/i; +// Ex: +// at async ESLint.lintFiles (C:\\path\\to\\\\eslint\\lib\\eslint\\eslint.js:720:21) +const NODE_STACK_REGEX = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?)(?::(\d+)| (\d+))(?::(\d+))?\)?\s*$/i; +function parseNodeStack(stack) { + const stackTraceMatch = NODE_STACK_REGEX.exec(stack); + if (!stackTraceMatch) { + return undefined; + } + return { + file: stackTraceMatch[2], + method: stackTraceMatch[1], + lineNumber: parseInt(stackTraceMatch[3], 10), + column: stackTraceMatch[4] ? parseInt(stackTraceMatch[4], 10) : undefined + }; +} +function getStackTrace() { + const stackObj = {}; + const originalStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = Infinity; + Error.captureStackTrace(stackObj, getStackTrace); + Error.stackTraceLimit = originalStackTraceLimit; + if (!stackObj.stack) { + throw new Error('Unable to capture stack trace'); + } + const { stack } = stackObj; + const stackLines = stack.split('\n'); + const frames = []; + for (const line of stackLines) { + const frame = parseNodeStack(line); + if (frame) { + frames.push(frame); + } + } + return frames; +} +// Module path for eslintrc.cjs +// Example: ".../@eslint/eslintrc/dist/eslintrc.cjs" +let eslintrcBundlePath = undefined; +// Module path for config-array-factory.js +// Example: ".../@eslint/eslintrc/lib/config-array-factory" +let configArrayFactoryPath = undefined; +// Module path for relative-module-resolver.js +// Example: ".../@eslint/eslintrc/lib/shared/relative-module-resolver" +let moduleResolverPath = undefined; +// Module path for naming.js +// Example: ".../@eslint/eslintrc/lib/shared/naming" +let namingPath = undefined; +// Folder path where ESLint's package.json can be found +// Example: ".../node_modules/eslint" +let eslintFolder = undefined; +exports.eslintFolder = eslintFolder; +// Probe for the ESLint >=9.0.0 flat config layout: +for (let currentModule = module;;) { + if (FLAT_CONFIG_REGEX.test(currentModule.filename)) { + // Obtain the stack trace of the current module, since the + // parent module of a flat config is undefined. From the + // stack trace, we can find the ESLint folder. + const stackTrace = getStackTrace(); + const targetFrame = stackTrace.find((frame) => frame.file && frame.file.endsWith('eslint.js')); + if (targetFrame) { + // Walk up the path and continuously attempt to resolve the ESLint folder + let currentPath = targetFrame.file; + while (currentPath) { + const potentialPath = path_1.default.dirname(currentPath); + if (potentialPath === currentPath) { + break; + } + currentPath = potentialPath; + try { + exports.eslintFolder = eslintFolder = path_1.default.dirname(require.resolve('eslint/package.json', { paths: [currentPath] })); + break; + } + catch (ex) { + if (!isModuleResolutionError(ex)) { + throw ex; + } + } + } + } + if (eslintFolder) { + const eslintrcFolderPath = path_1.default.dirname(require.resolve('@eslint/eslintrc/package.json', { paths: [eslintFolder] })); + eslintrcBundlePath = path_1.default.join(eslintrcFolderPath, 'dist/eslintrc.cjs'); + } + break; + } + if (!currentModule.parent) { + break; + } + currentModule = currentModule.parent; +} +if (!eslintFolder) { + // Probe for the ESLint >=8.0.0 layout: + for (let currentModule = module;;) { + if (!eslintrcBundlePath) { + if (currentModule.filename.endsWith('eslintrc.cjs')) { + // For ESLint >=8.0.0, all @eslint/eslintrc code is bundled at this path: + // .../@eslint/eslintrc/dist/eslintrc.cjs + try { + const eslintrcFolderPath = path_1.default.dirname(require.resolve('@eslint/eslintrc/package.json', { paths: [currentModule.path] })); + // Make sure we actually resolved the module in our call path + // and not some other spurious dependency. + const resolvedEslintrcBundlePath = path_1.default.join(eslintrcFolderPath, 'dist/eslintrc.cjs'); + if (resolvedEslintrcBundlePath === currentModule.filename) { + eslintrcBundlePath = resolvedEslintrcBundlePath; + } + } + catch (ex) { + // Module resolution failures are expected, as we're walking + // up our require stack to look for eslint. All other errors + // are re-thrown. + if (!isModuleResolutionError(ex)) { + throw ex; + } + } + } + } + else { + // Next look for a file in ESLint's folder + // .../eslint/lib/cli-engine/cli-engine.js + try { + const eslintCandidateFolder = path_1.default.dirname(require.resolve('eslint/package.json', { + paths: [currentModule.path] + })); + // Make sure we actually resolved the module in our call path + // and not some other spurious dependency. + if (currentModule.filename.startsWith(eslintCandidateFolder + path_1.default.sep)) { + exports.eslintFolder = eslintFolder = eslintCandidateFolder; + break; + } + } + catch (ex) { + // Module resolution failures are expected, as we're walking + // up our require stack to look for eslint. All other errors + // are re-thrown. + if (!isModuleResolutionError(ex)) { + throw ex; + } + } + } + if (!currentModule.parent) { + break; + } + currentModule = currentModule.parent; + } +} +if (!eslintFolder) { + // Probe for the ESLint >=7.12.0 layout: + for (let currentModule = module;;) { + if (!configArrayFactoryPath) { + // For ESLint >=7.12.0, config-array-factory.js is at this path: + // .../@eslint/eslintrc/lib/config-array-factory.js + try { + const eslintrcFolder = path_1.default.dirname(require.resolve('@eslint/eslintrc/package.json', { + paths: [currentModule.path] + })); + const resolvedConfigArrayFactoryPath = path_1.default.join(eslintrcFolder, '/lib/config-array-factory.js'); + if (resolvedConfigArrayFactoryPath === currentModule.filename) { + configArrayFactoryPath = resolvedConfigArrayFactoryPath; + moduleResolverPath = `${eslintrcFolder}/lib/shared/relative-module-resolver`; + namingPath = `${eslintrcFolder}/lib/shared/naming`; + } + } + catch (ex) { + // Module resolution failures are expected, as we're walking + // up our require stack to look for eslint. All other errors + // are re-thrown. + if (!isModuleResolutionError(ex)) { + throw ex; + } + } + } + else if (currentModule.filename.endsWith('cli-engine.js')) { + // Next look for a file in ESLint's folder + // .../eslint/lib/cli-engine/cli-engine.js + try { + const eslintCandidateFolder = path_1.default.dirname(require.resolve('eslint/package.json', { + paths: [currentModule.path] + })); + if (path_1.default.join(eslintCandidateFolder, 'lib/cli-engine/cli-engine.js') === currentModule.filename) { + exports.eslintFolder = eslintFolder = eslintCandidateFolder; + break; + } + } + catch (ex) { + // Module resolution failures are expected, as we're walking + // up our require stack to look for eslint. All other errors + // are rethrown. + if (!isModuleResolutionError(ex)) { + throw ex; + } + } + } + if (!currentModule.parent) { + break; + } + currentModule = currentModule.parent; + } +} +if (!eslintFolder) { + // Probe for the <7.12.0 layout: + for (let currentModule = module;;) { + // For ESLint <7.12.0, config-array-factory.js was at this path: + // .../eslint/lib/cli-engine/config-array-factory.js + if (/[\\/]eslint[\\/]lib[\\/]cli-engine[\\/]config-array-factory\.js$/i.test(currentModule.filename)) { + exports.eslintFolder = eslintFolder = path_1.default.join(path_1.default.dirname(currentModule.filename), '../..'); + configArrayFactoryPath = `${eslintFolder}/lib/cli-engine/config-array-factory`; + moduleResolverPath = `${eslintFolder}/lib/shared/relative-module-resolver`; + // The naming module was moved to @eslint/eslintrc in ESLint 7.8.0, which is also when the @eslint/eslintrc + // package was created and added to ESLint, so we need to probe for whether it's in the old or new location. + let eslintrcFolder; + try { + eslintrcFolder = path_1.default.dirname(require.resolve('@eslint/eslintrc/package.json', { + paths: [currentModule.path] + })); + } + catch (ex) { + if (!isModuleResolutionError(ex)) { + throw ex; + } + } + namingPath = `${eslintrcFolder !== null && eslintrcFolder !== void 0 ? eslintrcFolder : eslintFolder}/lib/shared/naming`; + break; + } + if (!currentModule.parent) { + // This was tested with ESLint 6.1.0 .. 7.12.1. + throw new Error('Failed to patch ESLint because the calling module was not recognized.\n' + + 'If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:\n' + + 'https://github.com/microsoft/rushstack/issues'); + } + currentModule = currentModule.parent; + } +} +// Detect the ESLint package version +const eslintPackageJsonPath = `${eslintFolder}/package.json`; +const eslintPackageObject = require(eslintPackageJsonPath); +exports.eslintPackageVersion = eslintPackageObject.version; +const ESLINT_MAJOR_VERSION = parseInt(exports.eslintPackageVersion, 10); +exports.ESLINT_MAJOR_VERSION = ESLINT_MAJOR_VERSION; +if (isNaN(ESLINT_MAJOR_VERSION)) { + throw new Error(`Unable to parse ESLint version "${exports.eslintPackageVersion}" in file "${eslintPackageJsonPath}"`); +} +if (!(ESLINT_MAJOR_VERSION >= 6 && ESLINT_MAJOR_VERSION <= 9)) { + throw new Error('The ESLint patch script has only been tested with ESLint version 6.x, 7.x, 8.x, and 9.x.' + + ` (Your version: ${exports.eslintPackageVersion})\n` + + 'Consider reporting a GitHub issue:\n' + + 'https://github.com/microsoft/rushstack/issues'); +} +// eslint-disable-next-line @typescript-eslint/no-explicit-any +let configArrayFactory; +if (ESLINT_MAJOR_VERSION >= 8 && eslintrcBundlePath) { + exports.configArrayFactory = configArrayFactory = require(eslintrcBundlePath).Legacy.ConfigArrayFactory; +} +else if (configArrayFactoryPath) { + exports.configArrayFactory = configArrayFactory = require(configArrayFactoryPath).ConfigArrayFactory; +} +// eslint-disable-next-line @typescript-eslint/no-explicit-any +let ModuleResolver; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +let Naming; +if (ESLINT_MAJOR_VERSION >= 8 && eslintrcBundlePath) { + exports.ModuleResolver = ModuleResolver = require(eslintrcBundlePath).Legacy.ModuleResolver; + exports.Naming = Naming = require(eslintrcBundlePath).Legacy.naming; +} +else if (moduleResolverPath && namingPath) { + exports.ModuleResolver = ModuleResolver = require(moduleResolverPath); + exports.Naming = Naming = require(namingPath); +} +//# sourceMappingURL=_patch-base.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.js.map new file mode 100644 index 0000000000000000000000000000000000000000..79065e5fd44d25c6b93fb4071618a71b6d390c71 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/_patch-base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_patch-base.js","sourceRoot":"","sources":["../src/_patch-base.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;AAE3D,wEAAwE;AACxE,EAAE;AACF,oHAAoH;AACpH,EAAE;AACF,kEAAkE;AAClE,EAAE;AAEF,gDAAwB;AAExB,MAAM,uBAAuB,GAA6B,CAAC,EAAE,EAAE,EAAE,CAC/D,OAAO,EA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O,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC;AAC1E,CAAC;AAED,8DAA8D;AAC9D,IAAI,cAAgC,CAAC;AACrC,8DAA8D;AAC9D,IAAI,MAAqC,CAAC;AAC1C,IAAI,oBAAoB,IAAI,CAAC,IAAI,kBAAkB,EAAE,CAAC;IACpD,yBAAA,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC;IACnE,iBAAA,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;AACrD,CAAC;KAAM,IAAI,kBAAkB,IAAI,UAAU,EAAE,CAAC;IAC5C,yBAAA,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC7C,iBAAA,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// This is a workaround for https://github.com/eslint/eslint/issues/3458\n//\n// To correct how ESLint searches for plugin packages, add this line to the top of your project's .eslintrc.js file:\n//\n// require(\"@rushstack/eslint-patch/modern-module-resolution\");\n//\n\nimport path from 'path';\n\nconst isModuleResolutionError: (ex: unknown) => boolean = (ex) =>\n typeof ex === 'object' && !!ex && 'code' in ex && (ex as { code: unknown }).code === 'MODULE_NOT_FOUND';\n\nconst FLAT_CONFIG_REGEX: RegExp = /eslint\\.config\\.(cjs|mjs|js)$/i;\n\n// Ex:\n// at async ESLint.lintFiles (C:\\\\path\\\\to\\\\\\\\eslint\\\\lib\\\\eslint\\\\eslint.js:720:21)\nconst NODE_STACK_REGEX: RegExp =\n /^\\s*at (?:((?:\\[object object\\])?[^\\\\/]+(?: \\[as \\S+\\])?) )?\\(?(.*?)(?::(\\d+)| (\\d+))(?::(\\d+))?\\)?\\s*$/i;\n\ninterface INodeStackFrame {\n file: string;\n method?: string;\n lineNumber: number;\n column?: number;\n}\n\nfunction parseNodeStack(stack: string): INodeStackFrame | undefined {\n const stackTraceMatch: RegExpExecArray | null = NODE_STACK_REGEX.exec(stack);\n if (!stackTraceMatch) {\n return undefined;\n }\n\n return {\n file: stackTraceMatch[2],\n method: stackTraceMatch[1],\n lineNumber: parseInt(stackTraceMatch[3], 10),\n column: stackTraceMatch[4] ? parseInt(stackTraceMatch[4], 10) : undefined\n };\n}\n\nfunction getStackTrace(): INodeStackFrame[] {\n const stackObj: { stack?: string } = {};\n const originalStackTraceLimit: number = Error.stackTraceLimit;\n Error.stackTraceLimit = Infinity;\n Error.captureStackTrace(stackObj, getStackTrace);\n Error.stackTraceLimit = originalStackTraceLimit;\n if (!stackObj.stack) {\n throw new Error('Unable to capture stack trace');\n }\n\n const { stack } = stackObj;\n const stackLines: string[] = stack.split('\\n');\n const frames: INodeStackFrame[] = [];\n for (const line of stackLines) {\n const frame: INodeStackFrame | undefined = parseNodeStack(line);\n if (frame) {\n frames.push(frame);\n }\n }\n\n return frames;\n}\n\n// Module path for eslintrc.cjs\n// Example: \".../@eslint/eslintrc/dist/eslintrc.cjs\"\nlet eslintrcBundlePath: string | undefined = undefined;\n\n// Module path for config-array-factory.js\n// Example: \".../@eslint/eslintrc/lib/config-array-factory\"\nlet configArrayFactoryPath: string | undefined = undefined;\n\n// Module path for relative-module-resolver.js\n// Example: \".../@eslint/eslintrc/lib/shared/relative-module-resolver\"\nlet moduleResolverPath: string | undefined = undefined;\n\n// Module path for naming.js\n// Example: \".../@eslint/eslintrc/lib/shared/naming\"\nlet namingPath: string | undefined = undefined;\n\n// Folder path where ESLint's package.json can be found\n// Example: \".../node_modules/eslint\"\nlet eslintFolder: string | undefined = undefined;\n\n// Probe for the ESLint >=9.0.0 flat config layout:\nfor (let currentModule: NodeModule = module; ; ) {\n if (FLAT_CONFIG_REGEX.test(currentModule.filename)) {\n // Obtain the stack trace of the current module, since the\n // parent module of a flat config is undefined. From the\n // stack trace, we can find the ESLint folder.\n const stackTrace: INodeStackFrame[] = getStackTrace();\n const targetFrame: INodeStackFrame | undefined = stackTrace.find(\n (frame: INodeStackFrame) => frame.file && frame.file.endsWith('eslint.js')\n );\n if (targetFrame) {\n // Walk up the path and continuously attempt to resolve the ESLint folder\n let currentPath: string | undefined = targetFrame.file;\n while (currentPath) {\n const potentialPath: string = path.dirname(currentPath);\n if (potentialPath === currentPath) {\n break;\n }\n currentPath = potentialPath;\n try {\n eslintFolder = path.dirname(require.resolve('eslint/package.json', { paths: [currentPath] }));\n break;\n } catch (ex: unknown) {\n if (!isModuleResolutionError(ex)) {\n throw ex;\n }\n }\n }\n }\n\n if (eslintFolder) {\n const eslintrcFolderPath: string = path.dirname(\n require.resolve('@eslint/eslintrc/package.json', { paths: [eslintFolder] })\n );\n eslintrcBundlePath = path.join(eslintrcFolderPath, 'dist/eslintrc.cjs');\n }\n\n break;\n }\n\n if (!currentModule.parent) {\n break;\n }\n currentModule = currentModule.parent;\n}\n\nif (!eslintFolder) {\n // Probe for the ESLint >=8.0.0 layout:\n for (let currentModule: NodeModule = module; ; ) {\n if (!eslintrcBundlePath) {\n if (currentModule.filename.endsWith('eslintrc.cjs')) {\n // For ESLint >=8.0.0, all @eslint/eslintrc code is bundled at this path:\n // .../@eslint/eslintrc/dist/eslintrc.cjs\n try {\n const eslintrcFolderPath: string = path.dirname(\n require.resolve('@eslint/eslintrc/package.json', { paths: [currentModule.path] })\n );\n\n // Make sure we actually resolved the module in our call path\n // and not some other spurious dependency.\n const resolvedEslintrcBundlePath: string = path.join(eslintrcFolderPath, 'dist/eslintrc.cjs');\n if (resolvedEslintrcBundlePath === currentModule.filename) {\n eslintrcBundlePath = resolvedEslintrcBundlePath;\n }\n } catch (ex: unknown) {\n // Module resolution failures are expected, as we're walking\n // up our require stack to look for eslint. All other errors\n // are re-thrown.\n if (!isModuleResolutionError(ex)) {\n throw ex;\n }\n }\n }\n } else {\n // Next look for a file in ESLint's folder\n // .../eslint/lib/cli-engine/cli-engine.js\n try {\n const eslintCandidateFolder: string = path.dirname(\n require.resolve('eslint/package.json', {\n paths: [currentModule.path]\n })\n );\n\n // Make sure we actually resolved the module in our call path\n // and not some other spurious dependency.\n if (currentModule.filename.startsWith(eslintCandidateFolder + path.sep)) {\n eslintFolder = eslintCandidateFolder;\n break;\n }\n } catch (ex: unknown) {\n // Module resolution failures are expected, as we're walking\n // up our require stack to look for eslint. All other errors\n // are re-thrown.\n if (!isModuleResolutionError(ex)) {\n throw ex;\n }\n }\n }\n\n if (!currentModule.parent) {\n break;\n }\n currentModule = currentModule.parent;\n }\n}\n\nif (!eslintFolder) {\n // Probe for the ESLint >=7.12.0 layout:\n for (let currentModule: NodeModule = module; ; ) {\n if (!configArrayFactoryPath) {\n // For ESLint >=7.12.0, config-array-factory.js is at this path:\n // .../@eslint/eslintrc/lib/config-array-factory.js\n try {\n const eslintrcFolder: string = path.dirname(\n require.resolve('@eslint/eslintrc/package.json', {\n paths: [currentModule.path]\n })\n );\n\n const resolvedConfigArrayFactoryPath: string = path.join(\n eslintrcFolder,\n '/lib/config-array-factory.js'\n );\n if (resolvedConfigArrayFactoryPath === currentModule.filename) {\n configArrayFactoryPath = resolvedConfigArrayFactoryPath;\n moduleResolverPath = `${eslintrcFolder}/lib/shared/relative-module-resolver`;\n namingPath = `${eslintrcFolder}/lib/shared/naming`;\n }\n } catch (ex: unknown) {\n // Module resolution failures are expected, as we're walking\n // up our require stack to look for eslint. All other errors\n // are re-thrown.\n if (!isModuleResolutionError(ex)) {\n throw ex;\n }\n }\n } else if (currentModule.filename.endsWith('cli-engine.js')) {\n // Next look for a file in ESLint's folder\n // .../eslint/lib/cli-engine/cli-engine.js\n try {\n const eslintCandidateFolder: string = path.dirname(\n require.resolve('eslint/package.json', {\n paths: [currentModule.path]\n })\n );\n\n if (path.join(eslintCandidateFolder, 'lib/cli-engine/cli-engine.js') === currentModule.filename) {\n eslintFolder = eslintCandidateFolder;\n break;\n }\n } catch (ex: unknown) {\n // Module resolution failures are expected, as we're walking\n // up our require stack to look for eslint. All other errors\n // are rethrown.\n if (!isModuleResolutionError(ex)) {\n throw ex;\n }\n }\n }\n\n if (!currentModule.parent) {\n break;\n }\n currentModule = currentModule.parent;\n }\n}\n\nif (!eslintFolder) {\n // Probe for the <7.12.0 layout:\n for (let currentModule: NodeModule = module; ; ) {\n // For ESLint <7.12.0, config-array-factory.js was at this path:\n // .../eslint/lib/cli-engine/config-array-factory.js\n if (/[\\\\/]eslint[\\\\/]lib[\\\\/]cli-engine[\\\\/]config-array-factory\\.js$/i.test(currentModule.filename)) {\n eslintFolder = path.join(path.dirname(currentModule.filename), '../..');\n configArrayFactoryPath = `${eslintFolder}/lib/cli-engine/config-array-factory`;\n moduleResolverPath = `${eslintFolder}/lib/shared/relative-module-resolver`;\n\n // The naming module was moved to @eslint/eslintrc in ESLint 7.8.0, which is also when the @eslint/eslintrc\n // package was created and added to ESLint, so we need to probe for whether it's in the old or new location.\n let eslintrcFolder: string | undefined;\n try {\n eslintrcFolder = path.dirname(\n require.resolve('@eslint/eslintrc/package.json', {\n paths: [currentModule.path]\n })\n );\n } catch (ex: unknown) {\n if (!isModuleResolutionError(ex)) {\n throw ex;\n }\n }\n\n namingPath = `${eslintrcFolder ?? eslintFolder}/lib/shared/naming`;\n break;\n }\n\n if (!currentModule.parent) {\n // This was tested with ESLint 6.1.0 .. 7.12.1.\n throw new Error(\n 'Failed to patch ESLint because the calling module was not recognized.\\n' +\n 'If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:\\n' +\n 'https://github.com/microsoft/rushstack/issues'\n );\n }\n currentModule = currentModule.parent;\n }\n}\n\n// Detect the ESLint package version\nconst eslintPackageJsonPath: string = `${eslintFolder}/package.json`;\nconst eslintPackageObject: { version: string } = require(eslintPackageJsonPath);\nexport const eslintPackageVersion: string = eslintPackageObject.version;\nconst ESLINT_MAJOR_VERSION: number = parseInt(eslintPackageVersion, 10);\nif (isNaN(ESLINT_MAJOR_VERSION)) {\n throw new Error(\n `Unable to parse ESLint version \"${eslintPackageVersion}\" in file \"${eslintPackageJsonPath}\"`\n );\n}\n\nif (!(ESLINT_MAJOR_VERSION >= 6 && ESLINT_MAJOR_VERSION <= 9)) {\n throw new Error(\n 'The ESLint patch script has only been tested with ESLint version 6.x, 7.x, 8.x, and 9.x.' +\n ` (Your version: ${eslintPackageVersion})\\n` +\n 'Consider reporting a GitHub issue:\\n' +\n 'https://github.com/microsoft/rushstack/issues'\n );\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet configArrayFactory: any;\nif (ESLINT_MAJOR_VERSION >= 8 && eslintrcBundlePath) {\n configArrayFactory = require(eslintrcBundlePath).Legacy.ConfigArrayFactory;\n} else if (configArrayFactoryPath) {\n configArrayFactory = require(configArrayFactoryPath).ConfigArrayFactory;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet ModuleResolver: { resolve: any };\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet Naming: { normalizePackageName: any };\nif (ESLINT_MAJOR_VERSION >= 8 && eslintrcBundlePath) {\n ModuleResolver = require(eslintrcBundlePath).Legacy.ModuleResolver;\n Naming = require(eslintrcBundlePath).Legacy.naming;\n} else if (moduleResolverPath && namingPath) {\n ModuleResolver = require(moduleResolverPath);\n Naming = require(namingPath);\n}\n\nexport {\n eslintFolder,\n configArrayFactory,\n ModuleResolver,\n Naming,\n ESLINT_MAJOR_VERSION,\n isModuleResolutionError\n};\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c78fe8315eec0983ef847e1008755f289b7fbadb --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=custom-config-package-names.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..2451203eea7a01c186746ea3ba63d37f630b80a5 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"custom-config-package-names.d.ts","sourceRoot":"","sources":["../src/custom-config-package-names.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.js new file mode 100644 index 0000000000000000000000000000000000000000..65ad332ee311c4a5989aeee3c65ead4b6b80e2dd --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.js @@ -0,0 +1,47 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +Object.defineProperty(exports, "__esModule", { value: true }); +// This is a workaround for ESLint's requirement to consume shareable configurations from package names prefixed +// with "eslint-config". +// +// To remove this requirement, add this line to the top of your project's .eslintrc.js file: +// +// require("@rushstack/eslint-patch/custom-config-package-names"); +// +const _patch_base_1 = require("./_patch-base"); +if (!_patch_base_1.configArrayFactory.__loadExtendedShareableConfigPatched) { + _patch_base_1.configArrayFactory.__loadExtendedShareableConfigPatched = true; + // eslint-disable-next-line @typescript-eslint/typedef + const originalLoadExtendedShareableConfig = _patch_base_1.configArrayFactory.prototype._loadExtendedShareableConfig; + // Common between ESLint versions + // https://github.com/eslint/eslintrc/blob/242d569020dfe4f561e4503787b99ec016337457/lib/config-array-factory.js#L910 + _patch_base_1.configArrayFactory.prototype._loadExtendedShareableConfig = function (extendName) { + const originalResolve = _patch_base_1.ModuleResolver.resolve; + try { + _patch_base_1.ModuleResolver.resolve = function (moduleName, relativeToPath) { + try { + return originalResolve.call(this, moduleName, relativeToPath); + } + catch (e) { + // Only change the name we resolve if we cannot find the normalized module, since it is + // valid to rely on the normalized package name. Use the originally provided module path + // instead of the normalized module path. + if ((e === null || e === void 0 ? void 0 : e.code) === 'MODULE_NOT_FOUND' && + moduleName !== extendName && + moduleName === _patch_base_1.Naming.normalizePackageName(extendName, 'eslint-config')) { + return originalResolve.call(this, extendName, relativeToPath); + } + else { + throw e; + } + } + }; + return originalLoadExtendedShareableConfig.apply(this, arguments); + } + finally { + _patch_base_1.ModuleResolver.resolve = originalResolve; + } + }; +} +//# sourceMappingURL=custom-config-package-names.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d8355fd060dcda13e74bab5ef4692dc98d4a8c71 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/custom-config-package-names.js.map @@ -0,0 +1 @@ +{"version":3,"file":"custom-config-package-names.js","sourceRoot":"","sources":["../src/custom-config-package-names.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,gHAAgH;AAChH,wBAAwB;AACxB,EAAE;AACF,4FAA4F;AAC5F,EAAE;AACF,qEAAqE;AACrE,EAAE;AACF,+CAA2E;AAE3E,IAAI,CAAC,gCAAkB,CAAC,oCAAoC,EAAE,CAAC;IAC7D,gCAAkB,CAAC,oCAAoC,GAAG,IAAI,CAAC;IAC/D,sDAAsD;IACtD,MAAM,mCAAmC,GAAG,gCAAkB,CAAC,SAAS,CAAC,4BAA4B,CAAC;IAEtG,iCAAiC;IACjC,oHAAoH;IACpH,gCAAkB,CAAC,SAAS,CAAC,4BAA4B,GAAG,UAAU,UAAkB;QACtF,MAAM,eAAe,GAA2D,4BAAc,CAAC,OAAO,CAAC;QACvG,IAAI,CAAC;YACH,4BAAc,CAAC,OAAO,GAAG,UAAU,UAAkB,EAAE,cAAsB;gBAC3E,IAAI,CAAC;oBACH,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;gBAChE,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,uFAAuF;oBACvF,wFAAwF;oBACxF,yCAAyC;oBACzC,IACE,CAAC,CAA2B,aAA3B,CAAC,uBAAD,CAAC,CAA4B,IAAI,MAAK,kBAAkB;wBACzD,UAAU,KAAK,UAAU;wBACzB,UAAU,KAAK,oBAAM,CAAC,oBAAoB,CAAC,UAAU,EAAE,eAAe,CAAC,EACvE,CAAC;wBACD,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;oBAChE,CAAC;yBAAM,CAAC;wBACN,MAAM,CAAC,CAAC;oBACV,CAAC;gBACH,CAAC;YACH,CAAC,CAAC;YACF,OAAO,mCAAmC,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACpE,CAAC;gBAAS,CAAC;YACT,4BAAc,CAAC,OAAO,GAAG,eAAe,CAAC;QAC3C,CAAC;IACH,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// This is a workaround for ESLint's requirement to consume shareable configurations from package names prefixed\n// with \"eslint-config\".\n//\n// To remove this requirement, add this line to the top of your project's .eslintrc.js file:\n//\n// require(\"@rushstack/eslint-patch/custom-config-package-names\");\n//\nimport { configArrayFactory, ModuleResolver, Naming } from './_patch-base';\n\nif (!configArrayFactory.__loadExtendedShareableConfigPatched) {\n configArrayFactory.__loadExtendedShareableConfigPatched = true;\n // eslint-disable-next-line @typescript-eslint/typedef\n const originalLoadExtendedShareableConfig = configArrayFactory.prototype._loadExtendedShareableConfig;\n\n // Common between ESLint versions\n // https://github.com/eslint/eslintrc/blob/242d569020dfe4f561e4503787b99ec016337457/lib/config-array-factory.js#L910\n configArrayFactory.prototype._loadExtendedShareableConfig = function (extendName: string): unknown {\n const originalResolve: (moduleName: string, relativeToPath: string) => string = ModuleResolver.resolve;\n try {\n ModuleResolver.resolve = function (moduleName: string, relativeToPath: string): string {\n try {\n return originalResolve.call(this, moduleName, relativeToPath);\n } catch (e) {\n // Only change the name we resolve if we cannot find the normalized module, since it is\n // valid to rely on the normalized package name. Use the originally provided module path\n // instead of the normalized module path.\n if (\n (e as NodeJS.ErrnoException)?.code === 'MODULE_NOT_FOUND' &&\n moduleName !== extendName &&\n moduleName === Naming.normalizePackageName(extendName, 'eslint-config')\n ) {\n return originalResolve.call(this, extendName, relativeToPath);\n } else {\n throw e;\n }\n }\n };\n return originalLoadExtendedShareableConfig.apply(this, arguments);\n } finally {\n ModuleResolver.resolve = originalResolve;\n }\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6675b00667c0fe039eb4c20c98af0138006987b3 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.d.ts @@ -0,0 +1,81 @@ +import type { TSESTree } from '@typescript-eslint/types'; +export declare function isArrayExpression(node: TSESTree.Node): node is TSESTree.ArrayExpression; +export declare function isArrowFunctionExpression(node: TSESTree.Node): node is TSESTree.ArrowFunctionExpression; +/** default parameters */ +export declare function isAssignmentPattern(node: TSESTree.Node): node is TSESTree.AssignmentPattern; +export declare function isClassDeclaration(node: TSESTree.Node): node is TSESTree.ClassDeclaration; +export declare function isClassExpression(node: TSESTree.Node): node is TSESTree.ClassExpression; +export declare function isExportDefaultDeclaration(node: TSESTree.Node): node is TSESTree.ExportDefaultDeclaration; +export declare function isExpression(node: TSESTree.Node): node is TSESTree.Expression; +export declare function isFunctionDeclaration(node: TSESTree.Node): node is TSESTree.FunctionDeclaration; +export declare function isFunctionExpression(node: TSESTree.Node): node is TSESTree.FunctionExpression; +export declare function isIdentifier(node: TSESTree.Node): node is TSESTree.Identifier; +export declare function isLiteral(node: TSESTree.Node): node is TSESTree.Literal; +export declare function isMethodDefinition(node: TSESTree.Node): node is TSESTree.MethodDefinition; +export declare function isObjectExpression(node: TSESTree.Node): node is TSESTree.ObjectExpression; +export declare function isPrivateIdentifier(node: TSESTree.Node): node is TSESTree.PrivateIdentifier; +export declare function isProperty(node: TSESTree.Node): node is TSESTree.Property; +export declare function isPropertyDefinition(node: TSESTree.Node): node is TSESTree.PropertyDefinition; +export declare function isTSEnumDeclaration(node: TSESTree.Node): node is TSESTree.TSEnumDeclaration; +export declare function isTSInterfaceDeclaration(node: TSESTree.Node): node is TSESTree.TSInterfaceDeclaration; +export declare function isTSModuleDeclaration(node: TSESTree.Node): node is TSESTree.TSModuleDeclaration; +export declare function isTSQualifiedName(node: TSESTree.Node): node is TSESTree.TSQualifiedName; +export declare function isTSTypeAliasDeclaration(node: TSESTree.Node): node is TSESTree.TSTypeAliasDeclaration; +export declare function isVariableDeclarator(node: TSESTree.Node): node is TSESTree.VariableDeclarator; +export declare function isClassDeclarationWithName(node: TSESTree.Node): node is TSESTree.ClassDeclarationWithName; +export declare function isClassPropertyNameNonComputed(node: TSESTree.Node): node is TSESTree.ClassPropertyNameNonComputed; +export declare function isFunctionDeclarationWithName(node: TSESTree.Node): node is TSESTree.FunctionDeclarationWithName; +export declare function isNumberLiteral(node: TSESTree.Node): node is TSESTree.NumberLiteral; +export declare function isPropertyNameNonComputed(node: TSESTree.Node): node is TSESTree.PropertyNameNonComputed; +export declare function isStringLiteral(node: TSESTree.Node): node is TSESTree.StringLiteral; +export interface IClassExpressionWithName extends TSESTree.ClassExpression { + id: TSESTree.Identifier; +} +export declare function isClassExpressionWithName(node: TSESTree.Node): node is IClassExpressionWithName; +export interface IFunctionExpressionWithName extends TSESTree.FunctionExpression { + id: TSESTree.Identifier; +} +export declare function isFunctionExpressionWithName(node: TSESTree.Node): node is IFunctionExpressionWithName; +export type NormalAnonymousExpression = TSESTree.ArrowFunctionExpression | TSESTree.ClassExpression | TSESTree.FunctionExpression | TSESTree.ObjectExpression; +export declare function isNormalAnonymousExpression(node: TSESTree.Node): node is NormalAnonymousExpression; +export interface INormalAssignmentPattern extends TSESTree.AssignmentPattern { + left: TSESTree.Identifier; +} +export declare function isNormalAssignmentPattern(node: TSESTree.Node): node is INormalAssignmentPattern; +export interface INormalClassPropertyDefinition extends TSESTree.PropertyDefinitionNonComputedName { + key: TSESTree.PrivateIdentifier | TSESTree.Identifier; + value: TSESTree.Expression; +} +export declare function isNormalClassPropertyDefinition(node: TSESTree.Node): node is INormalClassPropertyDefinition; +export interface INormalMethodDefinition extends TSESTree.MethodDefinitionNonComputedName { + key: TSESTree.PrivateIdentifier | TSESTree.Identifier; +} +export declare function isNormalMethodDefinition(node: TSESTree.Node): node is INormalMethodDefinition; +export interface INormalObjectProperty extends TSESTree.PropertyNonComputedName { + key: TSESTree.Identifier; +} +export declare function isNormalObjectProperty(node: TSESTree.Node): node is INormalObjectProperty; +export type INormalVariableDeclarator = TSESTree.LetOrConstOrVarDeclaration & { + id: TSESTree.Identifier; + init: TSESTree.Expression; +}; +export declare function isNormalVariableDeclarator(node: TSESTree.Node): node is INormalVariableDeclarator; +export interface INormalAssignmentPatternWithAnonymousExpressionAssigned extends INormalAssignmentPattern { + right: NormalAnonymousExpression; +} +export declare function isNormalAssignmentPatternWithAnonymousExpressionAssigned(node: TSESTree.Node): node is INormalAssignmentPatternWithAnonymousExpressionAssigned; +export type INormalVariableDeclaratorWithAnonymousExpressionAssigned = INormalVariableDeclarator & { + init: NormalAnonymousExpression; +}; +export declare function isNormalVariableDeclaratorWithAnonymousExpressionAssigned(node: TSESTree.Node): node is INormalVariableDeclaratorWithAnonymousExpressionAssigned; +export interface INormalObjectPropertyWithAnonymousExpressionAssigned extends INormalObjectProperty { + value: NormalAnonymousExpression; +} +export declare function isNormalObjectPropertyWithAnonymousExpressionAssigned(node: TSESTree.Node): node is INormalObjectPropertyWithAnonymousExpressionAssigned; +export interface INormalClassPropertyDefinitionWithAnonymousExpressionAssigned extends INormalClassPropertyDefinition { + value: NormalAnonymousExpression; +} +export declare function isNormalClassPropertyDefinitionWithAnonymousExpressionAssigned(node: TSESTree.Node): node is INormalClassPropertyDefinitionWithAnonymousExpressionAssigned; +export type NodeWithName = TSESTree.ClassDeclarationWithName | TSESTree.FunctionDeclarationWithName | IClassExpressionWithName | IFunctionExpressionWithName | INormalVariableDeclaratorWithAnonymousExpressionAssigned | INormalObjectPropertyWithAnonymousExpressionAssigned | INormalClassPropertyDefinitionWithAnonymousExpressionAssigned | INormalAssignmentPatternWithAnonymousExpressionAssigned | INormalMethodDefinition | TSESTree.TSEnumDeclaration | TSESTree.TSInterfaceDeclaration | TSESTree.TSTypeAliasDeclaration; +export declare function isNodeWithName(node: TSESTree.Node): node is NodeWithName; +//# sourceMappingURL=ast-guards.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..96971955ea1b27b78f8f8fb9b5da6c0c08ac7654 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ast-guards.d.ts","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/ast-guards.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,eAAe,CAEvF;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,uBAAuB,CAEvG;AAED,yBAAyB;AACzB,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,iBAAiB,CAE3F;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,gBAAgB,CAEzF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,eAAe,CAEvF;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,wBAAwB,CAEzG;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,UAAU,CAE7E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,IAAI,QAAQ,CAAC,mBAAmB,CAE/F;AAED,wBAAgB,oBAAoB,CAAC,IAA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stack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.js new file mode 100644 index 0000000000000000000000000000000000000000..874e8bd3cbd0d84d08b6c17c363563d37b6f1765 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.js @@ -0,0 +1,190 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isArrayExpression = isArrayExpression; +exports.isArrowFunctionExpression = isArrowFunctionExpression; +exports.isAssignmentPattern = isAssignmentPattern; +exports.isClassDeclaration = isClassDeclaration; +exports.isClassExpression = isClassExpression; +exports.isExportDefaultDeclaration = isExportDefaultDeclaration; +exports.isExpression = isExpression; +exports.isFunctionDeclaration = isFunctionDeclaration; +exports.isFunctionExpression = isFunctionExpression; +exports.isIdentifier = isIdentifier; +exports.isLiteral = isLiteral; +exports.isMethodDefinition = isMethodDefinition; +exports.isObjectExpression = isObjectExpression; +exports.isPrivateIdentifier = isPrivateIdentifier; +exports.isProperty = isProperty; +exports.isPropertyDefinition = isPropertyDefinition; +exports.isTSEnumDeclaration = isTSEnumDeclaration; +exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration; +exports.isTSModuleDeclaration = isTSModuleDeclaration; +exports.isTSQualifiedName = isTSQualifiedName; +exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; +exports.isVariableDeclarator = isVariableDeclarator; +exports.isClassDeclarationWithName = isClassDeclarationWithName; +exports.isClassPropertyNameNonComputed = isClassPropertyNameNonComputed; +exports.isFunctionDeclarationWithName = isFunctionDeclarationWithName; +exports.isNumberLiteral = isNumberLiteral; +exports.isPropertyNameNonComputed = isPropertyNameNonComputed; +exports.isStringLiteral = isStringLiteral; +exports.isClassExpressionWithName = isClassExpressionWithName; +exports.isFunctionExpressionWithName = isFunctionExpressionWithName; +exports.isNormalAnonymousExpression = isNormalAnonymousExpression; +exports.isNormalAssignmentPattern = isNormalAssignmentPattern; +exports.isNormalClassPropertyDefinition = isNormalClassPropertyDefinition; +exports.isNormalMethodDefinition = isNormalMethodDefinition; +exports.isNormalObjectProperty = isNormalObjectProperty; +exports.isNormalVariableDeclarator = isNormalVariableDeclarator; +exports.isNormalAssignmentPatternWithAnonymousExpressionAssigned = isNormalAssignmentPatternWithAnonymousExpressionAssigned; +exports.isNormalVariableDeclaratorWithAnonymousExpressionAssigned = isNormalVariableDeclaratorWithAnonymousExpressionAssigned; +exports.isNormalObjectPropertyWithAnonymousExpressionAssigned = isNormalObjectPropertyWithAnonymousExpressionAssigned; +exports.isNormalClassPropertyDefinitionWithAnonymousExpressionAssigned = isNormalClassPropertyDefinitionWithAnonymousExpressionAssigned; +exports.isNodeWithName = isNodeWithName; +function isArrayExpression(node) { + return node.type === 'ArrayExpression'; +} +function isArrowFunctionExpression(node) { + return node.type === 'ArrowFunctionExpression'; +} +/** default parameters */ +function isAssignmentPattern(node) { + return node.type === 'AssignmentPattern'; +} +function isClassDeclaration(node) { + return node.type === 'ClassDeclaration'; +} +function isClassExpression(node) { + return node.type === 'ClassExpression'; +} +function isExportDefaultDeclaration(node) { + return node.type === 'ExportDefaultDeclaration'; +} +function isExpression(node) { + return node.type.includes('Expression'); +} +function isFunctionDeclaration(node) { + return node.type === 'FunctionDeclaration'; +} +function isFunctionExpression(node) { + return node.type === 'FunctionExpression'; +} +function isIdentifier(node) { + return node.type === 'Identifier'; +} +function isLiteral(node) { + return node.type === 'Literal'; +} +function isMethodDefinition(node) { + return node.type === 'MethodDefinition'; +} +function isObjectExpression(node) { + return node.type === 'ObjectExpression'; +} +function isPrivateIdentifier(node) { + return node.type === 'PrivateIdentifier'; +} +function isProperty(node) { + return node.type === 'Property'; +} +function isPropertyDefinition(node) { + return node.type === 'PropertyDefinition'; +} +function isTSEnumDeclaration(node) { + return node.type === 'TSEnumDeclaration'; +} +function isTSInterfaceDeclaration(node) { + return node.type === 'TSInterfaceDeclaration'; +} +function isTSModuleDeclaration(node) { + return node.type === 'TSModuleDeclaration'; +} +function isTSQualifiedName(node) { + return node.type === 'TSQualifiedName'; +} +function isTSTypeAliasDeclaration(node) { + return node.type === 'TSTypeAliasDeclaration'; +} +function isVariableDeclarator(node) { + return node.type === 'VariableDeclarator'; +} +// Compound Type Guards for @typescript-eslint/types ast-spec compound types +function isClassDeclarationWithName(node) { + return isClassDeclaration(node) && node.id !== null; +} +function isClassPropertyNameNonComputed(node) { + return isPrivateIdentifier(node) || isPropertyNameNonComputed(node); +} +function isFunctionDeclarationWithName(node) { + return isFunctionDeclaration(node) && node.id !== null; +} +function isNumberLiteral(node) { + return isLiteral(node) && typeof node.value === 'number'; +} +function isPropertyNameNonComputed(node) { + return isIdentifier(node) || isNumberLiteral(node) || isStringLiteral(node); +} +function isStringLiteral(node) { + return isLiteral(node) && typeof node.value === 'string'; +} +function isClassExpressionWithName(node) { + return isClassExpression(node) && node.id !== null; +} +function isFunctionExpressionWithName(node) { + return isFunctionExpression(node) && node.id !== null; +} +function isNormalAnonymousExpression(node) { + const ANONYMOUS_EXPRESSION_GUARDS = [ + isArrowFunctionExpression, + isClassExpression, + isFunctionExpression, + isObjectExpression + ]; + return ANONYMOUS_EXPRESSION_GUARDS.some((guard) => guard(node)); +} +function isNormalAssignmentPattern(node) { + return isAssignmentPattern(node) && isIdentifier(node.left); +} +function isNormalClassPropertyDefinition(node) { + return (isPropertyDefinition(node) && + (isIdentifier(node.key) || isPrivateIdentifier(node.key)) && + node.value !== null); +} +function isNormalMethodDefinition(node) { + return isMethodDefinition(node) && (isIdentifier(node.key) || isPrivateIdentifier(node.key)); +} +function isNormalObjectProperty(node) { + return isProperty(node) && (isIdentifier(node.key) || isPrivateIdentifier(node.key)); +} +function isNormalVariableDeclarator(node) { + return isVariableDeclarator(node) && isIdentifier(node.id) && node.init !== null; +} +function isNormalAssignmentPatternWithAnonymousExpressionAssigned(node) { + return isNormalAssignmentPattern(node) && isNormalAnonymousExpression(node.right); +} +function isNormalVariableDeclaratorWithAnonymousExpressionAssigned(node) { + return isNormalVariableDeclarator(node) && isNormalAnonymousExpression(node.init); +} +function isNormalObjectPropertyWithAnonymousExpressionAssigned(node) { + return isNormalObjectProperty(node) && isNormalAnonymousExpression(node.value); +} +function isNormalClassPropertyDefinitionWithAnonymousExpressionAssigned(node) { + return isNormalClassPropertyDefinition(node) && isNormalAnonymousExpression(node.value); +} +function isNodeWithName(node) { + return (isClassDeclarationWithName(node) || + isFunctionDeclarationWithName(node) || + isClassExpressionWithName(node) || + isFunctionExpressionWithName(node) || + isNormalVariableDeclaratorWithAnonymousExpressionAssigned(node) || + isNormalObjectPropertyWithAnonymousExpressionAssigned(node) || + isNormalClassPropertyDefinitionWithAnonymousExpressionAssigned(node) || + isNormalAssignmentPatternWithAnonymousExpressionAssigned(node) || + isNormalMethodDefinition(node) || + isTSEnumDeclaration(node) || + isTSInterfaceDeclaration(node) || + isTSTypeAliasDeclaration(node)); +} +//# sourceMappingURL=ast-guards.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.js.map new file mode 100644 index 0000000000000000000000000000000000000000..384d6545eac33d7269344cf318c8a69f2f5d59c1 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/ast-guards.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ast-guards.js","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/ast-guards.ts"],"names":[],"mappings":";AAAA,4FAA4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AC;AAMD,SAAgB,wDAAwD,CACtE,IAAmB;IAEnB,OAAO,yBAAyB,CAAC,IAAI,CAAC,IAAI,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpF,CAAC;AAMD,SAAgB,yDAAyD,CACvE,IAAmB;IAEnB,OAAO,0BAA0B,CAAC,IAAI,CAAC,IAAI,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpF,CAAC;AAMD,SAAgB,qDAAqD,CACnE,IAAmB;IAEnB,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAI,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACjF,CAAC;AAOD,SAAgB,8DAA8D,CAC5E,IAAmB;IAEnB,OAAO,+BAA+B,CAAC,IAAI,CAAC,IAAI,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1F,CAAC;AAgBD,SAAgB,cAAc,CAAC,IAAmB;IAChD,OAAO,CACL,0BAA0B,CAAC,IAAI,CAAC;QAChC,6BAA6B,CAAC,IAAI,CAAC;QACnC,yBAAyB,CAAC,IAAI,CAAC;QAC/B,4BAA4B,CAAC,IAAI,CAAC;QAClC,yDAAyD,CAAC,IAAI,CAAC;QAC/D,qDAAqD,CAAC,IAAI,CAAC;QAC3D,8DAA8D,CAAC,IAAI,CAAC;QACpE,wDAAwD,CAAC,IAAI,CAAC;QAC9D,wBAAwB,CAAC,IAAI,CAAC;QAC9B,mBAAmB,CAAC,IAAI,CAAC;QACzB,wBAAwB,CAAC,IAAI,CAAC;QAC9B,wBAAwB,CAAC,IAAI,CAAC,CAC/B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type { TSESTree } from '@typescript-eslint/types';\n\nexport function isArrayExpression(node: TSESTree.Node): node is TSESTree.ArrayExpression {\n return node.type === 'ArrayExpression';\n}\n\nexport function isArrowFunctionExpression(node: TSESTree.Node): node is TSESTree.ArrowFunctionExpression {\n return node.type === 'ArrowFunctionExpression';\n}\n\n/** default parameters */\nexport function isAssignmentPattern(node: TSESTree.Node): node is TSESTree.AssignmentPattern {\n return node.type === 'AssignmentPattern';\n}\n\nexport function isClassDeclaration(node: TSESTree.Node): node is TSESTree.ClassDeclaration {\n return node.type === 'ClassDeclaration';\n}\n\nexport function isClassExpression(node: TSESTree.Node): node is TSESTree.ClassExpression {\n return node.type === 'ClassExpression';\n}\n\nexport function isExportDefaultDeclaration(node: TSESTree.Node): node is TSESTree.ExportDefaultDeclaration {\n return node.type === 'ExportDefaultDeclaration';\n}\n\nexport function isExpression(node: TSESTree.Node): node is TSESTree.Expression {\n return node.type.includes('Expression');\n}\n\nexport function isFunctionDeclaration(node: TSESTree.Node): node is TSESTree.FunctionDeclaration {\n return node.type === 'FunctionDeclaration';\n}\n\nexport function isFunctionExpression(node: TSESTree.Node): node is TSESTree.FunctionExpression {\n return node.type === 'FunctionExpression';\n}\n\nexport function isIdentifier(node: TSESTree.Node): node is TSESTree.Identifier {\n return node.type === 'Identifier';\n}\n\nexport function isLiteral(node: TSESTree.Node): node is TSESTree.Literal {\n return node.type === 'Literal';\n}\n\nexport function isMethodDefinition(node: TSESTree.Node): node is TSESTree.MethodDefinition {\n return node.type === 'MethodDefinition';\n}\n\nexport function isObjectExpression(node: TSESTree.Node): node is TSESTree.ObjectExpression {\n return node.type === 'ObjectExpression';\n}\n\nexport function isPrivateIdentifier(node: TSESTree.Node): node is TSESTree.PrivateIdentifier {\n return node.type === 'PrivateIdentifier';\n}\n\nexport function isProperty(node: TSESTree.Node): node is TSESTree.Property {\n return node.type === 'Property';\n}\n\nexport function isPropertyDefinition(node: TSESTree.Node): node is TSESTree.PropertyDefinition {\n return node.type === 'PropertyDefinition';\n}\n\nexport function isTSEnumDeclaration(node: TSESTree.Node): node is TSESTree.TSEnumDeclaration {\n return node.type === 'TSEnumDeclaration';\n}\n\nexport function isTSInterfaceDeclaration(node: TSESTree.Node): node is TSESTree.TSInterfaceDeclaration {\n return node.type === 'TSInterfaceDeclaration';\n}\n\nexport function isTSModuleDeclaration(node: TSESTree.Node): node is TSESTree.TSModuleDeclaration {\n return node.type === 'TSModuleDeclaration';\n}\n\nexport function isTSQualifiedName(node: TSESTree.Node): node is TSESTree.TSQualifiedName {\n return node.type === 'TSQualifiedName';\n}\n\nexport function isTSTypeAliasDeclaration(node: TSESTree.Node): node is TSESTree.TSTypeAliasDeclaration {\n return node.type === 'TSTypeAliasDeclaration';\n}\n\nexport function isVariableDeclarator(node: TSESTree.Node): node is TSESTree.VariableDeclarator {\n return node.type === 'VariableDeclarator';\n}\n\n// Compound Type Guards for @typescript-eslint/types ast-spec compound types\nexport function isClassDeclarationWithName(node: TSESTree.Node): node is TSESTree.ClassDeclarationWithName {\n return isClassDeclaration(node) && node.id !== null;\n}\n\nexport function isClassPropertyNameNonComputed(\n node: TSESTree.Node\n): node is TSESTree.ClassPropertyNameNonComputed {\n return isPrivateIdentifier(node) || isPropertyNameNonComputed(node);\n}\n\nexport function isFunctionDeclarationWithName(\n node: TSESTree.Node\n): node is TSESTree.FunctionDeclarationWithName {\n return isFunctionDeclaration(node) && node.id !== null;\n}\n\nexport function isNumberLiteral(node: TSESTree.Node): node is TSESTree.NumberLiteral {\n return isLiteral(node) && typeof node.value === 'number';\n}\n\nexport function isPropertyNameNonComputed(node: TSESTree.Node): node is TSESTree.PropertyNameNonComputed {\n return isIdentifier(node) || isNumberLiteral(node) || isStringLiteral(node);\n}\n\nexport function isStringLiteral(node: TSESTree.Node): node is TSESTree.StringLiteral {\n return isLiteral(node) && typeof node.value === 'string';\n}\n\n// Custom compound types\nexport interface IClassExpressionWithName extends TSESTree.ClassExpression {\n id: TSESTree.Identifier;\n}\n\nexport function isClassExpressionWithName(node: TSESTree.Node): node is IClassExpressionWithName {\n return isClassExpression(node) && node.id !== null;\n}\nexport interface IFunctionExpressionWithName extends TSESTree.FunctionExpression {\n id: TSESTree.Identifier;\n}\n\nexport function isFunctionExpressionWithName(node: TSESTree.Node): node is IFunctionExpressionWithName {\n return isFunctionExpression(node) && node.id !== null;\n}\n\nexport type NormalAnonymousExpression =\n | TSESTree.ArrowFunctionExpression\n | TSESTree.ClassExpression\n | TSESTree.FunctionExpression\n | TSESTree.ObjectExpression;\n\nexport function isNormalAnonymousExpression(node: TSESTree.Node): node is NormalAnonymousExpression {\n const ANONYMOUS_EXPRESSION_GUARDS: ((node: TSESTree.Node) => boolean)[] = [\n isArrowFunctionExpression,\n isClassExpression,\n isFunctionExpression,\n isObjectExpression\n ];\n return ANONYMOUS_EXPRESSION_GUARDS.some((guard) => guard(node));\n}\n\nexport interface INormalAssignmentPattern extends TSESTree.AssignmentPattern {\n left: TSESTree.Identifier;\n}\n\nexport function isNormalAssignmentPattern(node: TSESTree.Node): node is INormalAssignmentPattern {\n return isAssignmentPattern(node) && isIdentifier(node.left);\n}\n\nexport interface INormalClassPropertyDefinition extends TSESTree.PropertyDefinitionNonComputedName {\n key: TSESTree.PrivateIdentifier | TSESTree.Identifier;\n value: TSESTree.Expression;\n}\n\nexport function isNormalClassPropertyDefinition(node: TSESTree.Node): node is INormalClassPropertyDefinition {\n return (\n isPropertyDefinition(node) &&\n (isIdentifier(node.key) || isPrivateIdentifier(node.key)) &&\n node.value !== null\n );\n}\n\nexport interface INormalMethodDefinition extends TSESTree.MethodDefinitionNonComputedName {\n key: TSESTree.PrivateIdentifier | TSESTree.Identifier;\n}\n\nexport function isNormalMethodDefinition(node: TSESTree.Node): node is INormalMethodDefinition {\n return isMethodDefinition(node) && (isIdentifier(node.key) || isPrivateIdentifier(node.key));\n}\n\nexport interface INormalObjectProperty extends TSESTree.PropertyNonComputedName {\n key: TSESTree.Identifier;\n}\n\nexport function isNormalObjectProperty(node: TSESTree.Node): node is INormalObjectProperty {\n return isProperty(node) && (isIdentifier(node.key) || isPrivateIdentifier(node.key));\n}\n\nexport type INormalVariableDeclarator = TSESTree.LetOrConstOrVarDeclaration & {\n id: TSESTree.Identifier;\n init: TSESTree.Expression;\n};\n\nexport function isNormalVariableDeclarator(node: TSESTree.Node): node is INormalVariableDeclarator {\n return isVariableDeclarator(node) && isIdentifier(node.id) && node.init !== null;\n}\n\nexport interface INormalAssignmentPatternWithAnonymousExpressionAssigned extends INormalAssignmentPattern {\n right: NormalAnonymousExpression;\n}\n\nexport function isNormalAssignmentPatternWithAnonymousExpressionAssigned(\n node: TSESTree.Node\n): node is INormalAssignmentPatternWithAnonymousExpressionAssigned {\n return isNormalAssignmentPattern(node) && isNormalAnonymousExpression(node.right);\n}\n\nexport type INormalVariableDeclaratorWithAnonymousExpressionAssigned = INormalVariableDeclarator & {\n init: NormalAnonymousExpression;\n};\n\nexport function isNormalVariableDeclaratorWithAnonymousExpressionAssigned(\n node: TSESTree.Node\n): node is INormalVariableDeclaratorWithAnonymousExpressionAssigned {\n return isNormalVariableDeclarator(node) && isNormalAnonymousExpression(node.init);\n}\n\nexport interface INormalObjectPropertyWithAnonymousExpressionAssigned extends INormalObjectProperty {\n value: NormalAnonymousExpression;\n}\n\nexport function isNormalObjectPropertyWithAnonymousExpressionAssigned(\n node: TSESTree.Node\n): node is INormalObjectPropertyWithAnonymousExpressionAssigned {\n return isNormalObjectProperty(node) && isNormalAnonymousExpression(node.value);\n}\n\nexport interface INormalClassPropertyDefinitionWithAnonymousExpressionAssigned\n extends INormalClassPropertyDefinition {\n value: NormalAnonymousExpression;\n}\n\nexport function isNormalClassPropertyDefinitionWithAnonymousExpressionAssigned(\n node: TSESTree.Node\n): node is INormalClassPropertyDefinitionWithAnonymousExpressionAssigned {\n return isNormalClassPropertyDefinition(node) && isNormalAnonymousExpression(node.value);\n}\n\nexport type NodeWithName =\n | TSESTree.ClassDeclarationWithName\n | TSESTree.FunctionDeclarationWithName\n | IClassExpressionWithName\n | IFunctionExpressionWithName\n | INormalVariableDeclaratorWithAnonymousExpressionAssigned\n | INormalObjectPropertyWithAnonymousExpressionAssigned\n | INormalClassPropertyDefinitionWithAnonymousExpressionAssigned\n | INormalAssignmentPatternWithAnonymousExpressionAssigned\n | INormalMethodDefinition\n | TSESTree.TSEnumDeclaration\n | TSESTree.TSInterfaceDeclaration\n | TSESTree.TSTypeAliasDeclaration;\n\nexport function isNodeWithName(node: TSESTree.Node): node is NodeWithName {\n return (\n isClassDeclarationWithName(node) ||\n isFunctionDeclarationWithName(node) ||\n isClassExpressionWithName(node) ||\n isFunctionExpressionWithName(node) ||\n isNormalVariableDeclaratorWithAnonymousExpressionAssigned(node) ||\n isNormalObjectPropertyWithAnonymousExpressionAssigned(node) ||\n isNormalClassPropertyDefinitionWithAnonymousExpressionAssigned(node) ||\n isNormalAssignmentPatternWithAnonymousExpressionAssigned(node) ||\n isNormalMethodDefinition(node) ||\n isTSEnumDeclaration(node) ||\n isTSInterfaceDeclaration(node) ||\n isTSTypeAliasDeclaration(node)\n );\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b9f918b356a199476ea80deeafdaabd2f7718a6c --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.d.ts @@ -0,0 +1,20 @@ +export interface ISuppression { + file: string; + scopeId: string; + rule: string; +} +export interface IBulkSuppressionsConfig { + serializedSuppressions: Set; + jsonObject: IBulkSuppressionsJson; + newSerializedSuppressions: Set; + newJsonObject: IBulkSuppressionsJson; +} +export interface IBulkSuppressionsJson { + suppressions: ISuppression[]; +} +export declare function getSuppressionsConfigForEslintConfigFolderPath(eslintConfigFolderPath: string): IBulkSuppressionsConfig; +export declare function getAllBulkSuppressionsConfigsByEslintConfigFolderPath(): [string, IBulkSuppressionsConfig][]; +export declare function writeSuppressionsJsonToFile(eslintConfigFolderPath: string, suppressionsConfig: IBulkSuppressionsConfig): void; +export declare function deleteBulkSuppressionsFileInEslintConfigFolder(eslintConfigFolderPath: string): void; +export declare function serializeSuppression({ file, scopeId, rule }: ISuppression): string; +//# sourceMappingURL=bulk-suppressions-file.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..3bb1dfd14a7ff39bf93672d9cdc886cd2f1656da --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bulk-suppressions-file.d.ts","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/bulk-suppressions-file.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,uBAAuB;IACtC,sBAAsB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACpC,UAAU,EAAE,qBAAqB,CAAC;IAClC,yBAAyB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvC,aAAa,EAAE,qBAAqB,CAAC;CACtC;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,YAAY,EAAE,CAAC;CAC9B;AAkBD,wBAAgB,8CAA8C,CAC5D,sBAAsB,EAAE,MAAM,GAC7B,uBAAuB,CAkDzB;AAED,wBAAgB,qDAAqD,IAAI,CAAC,MAAM,EAAE,uBAAuB,CAAC,EAAE,CAO3G;AAED,wBAAgB,2BAA2B,CACzC,sBAAsB,EAAE,MAAM,EAC9B,kBAAkB,EAAE,uBAAuB,GAC1C,IAAI,CASN;AAED,wBAAgB,8CAA8C,CAAC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAGnG;AAUD,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,YAAY,GAAG,MAAM,CAElF"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.js new file mode 100644 index 0000000000000000000000000000000000000000..1ebd94f49e72b40f0c68ba8ce2bc700d3cec9caa --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.js @@ -0,0 +1,171 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getSuppressionsConfigForEslintConfigFolderPath = getSuppressionsConfigForEslintConfigFolderPath; +exports.getAllBulkSuppressionsConfigsByEslintConfigFolderPath = getAllBulkSuppressionsConfigsByEslintConfigFolderPath; +exports.writeSuppressionsJsonToFile = writeSuppressionsJsonToFile; +exports.deleteBulkSuppressionsFileInEslintConfigFolder = deleteBulkSuppressionsFileInEslintConfigFolder; +exports.serializeSuppression = serializeSuppression; +const fs_1 = __importDefault(require("fs")); +const constants_1 = require("./constants"); +const IS_RUNNING_IN_VSCODE = process.env[constants_1.VSCODE_PID_ENV_VAR_NAME] !== undefined; +const TEN_SECONDS_MS = 10 * 1000; +const SUPPRESSIONS_JSON_FILENAME = '.eslint-bulk-suppressions.json'; +function throwIfAnythingOtherThanNotExistError(e) { + if ((e === null || e === void 0 ? void 0 : e.code) !== 'ENOENT') { + // Throw an error if any other error than file not found + throw e; + } +} +const suppressionsJsonByFolderPath = new Map(); +function getSuppressionsConfigForEslintConfigFolderPath(eslintConfigFolderPath) { + const cachedSuppressionsConfig = suppressionsJsonByFolderPath.get(eslintConfigFolderPath); + let shouldLoad; + let suppressionsConfig; + if (cachedSuppressionsConfig) { + shouldLoad = IS_RUNNING_IN_VSCODE && cachedSuppressionsConfig.readTime < Date.now() - TEN_SECONDS_MS; + suppressionsConfig = cachedSuppressionsConfig.suppressionsConfig; + } + else { + shouldLoad = true; + } + if (shouldLoad) { + const suppressionsPath = `${eslintConfigFolderPath}/${SUPPRESSIONS_JSON_FILENAME}`; + let rawJsonFile; + try { + rawJsonFile = fs_1.default.readFileSync(suppressionsPath).toString(); + } + catch (e) { + throwIfAnythingOtherThanNotExistError(e); + } + if (!rawJsonFile) { + suppressionsConfig = { + serializedSuppressions: new Set(), + jsonObject: { suppressions: [] }, + newSerializedSuppressions: new Set(), + newJsonObject: { suppressions: [] } + }; + } + else { + const jsonObject = JSON.parse(rawJsonFile); + validateSuppressionsJson(jsonObject); + const serializedSuppressions = new Set(); + for (const suppression of jsonObject.suppressions) { + serializedSuppressions.add(serializeSuppression(suppression)); + } + suppressionsConfig = { + serializedSuppressions, + jsonObject, + newSerializedSuppressions: new Set(), + newJsonObject: { suppressions: [] } + }; + } + suppressionsJsonByFolderPath.set(eslintConfigFolderPath, { readTime: Date.now(), suppressionsConfig }); + } + return suppressionsConfig; +} +function getAllBulkSuppressionsConfigsByEslintConfigFolderPath() { + const result = []; + for (const [eslintConfigFolderPath, { suppressionsConfig }] of suppressionsJsonByFolderPath) { + result.push([eslintConfigFolderPath, suppressionsConfig]); + } + return result; +} +function writeSuppressionsJsonToFile(eslintConfigFolderPath, suppressionsConfig) { + suppressionsJsonByFolderPath.set(eslintConfigFolderPath, { readTime: Date.now(), suppressionsConfig }); + const suppressionsPath = `${eslintConfigFolderPath}/${SUPPRESSIONS_JSON_FILENAME}`; + if (suppressionsConfig.jsonObject.suppressions.length === 0) { + deleteFile(suppressionsPath); + } + else { + suppressionsConfig.jsonObject.suppressions.sort(compareSuppressions); + fs_1.default.writeFileSync(suppressionsPath, JSON.stringify(suppressionsConfig.jsonObject, undefined, 2)); + } +} +function deleteBulkSuppressionsFileInEslintConfigFolder(eslintConfigFolderPath) { + const suppressionsPath = `${eslintConfigFolderPath}/${SUPPRESSIONS_JSON_FILENAME}`; + deleteFile(suppressionsPath); +} +function deleteFile(filePath) { + try { + fs_1.default.unlinkSync(filePath); + } + catch (e) { + throwIfAnythingOtherThanNotExistError(e); + } +} +function serializeSuppression({ file, scopeId, rule }) { + return `${file}|${scopeId}|${rule}`; +} +function compareSuppressions(a, b) { + if (a.file < b.file) { + return -1; + } + else if (a.file > b.file) { + return 1; + } + else if (a.scopeId < b.scopeId) { + return -1; + } + else if (a.scopeId > b.scopeId) { + return 1; + } + else if (a.rule < b.rule) { + return -1; + } + else if (a.rule > b.rule) { + return 1; + } + else { + return 0; + } +} +function validateSuppressionsJson(json) { + if (typeof json !== 'object') { + throw new Error(`Invalid JSON object: ${JSON.stringify(json, null, 2)}`); + } + if (!json) { + throw new Error('JSON object is null.'); + } + const EXPECTED_ROOT_PROPERTY_NAMES = new Set(['suppressions']); + for (const propertyName of Object.getOwnPropertyNames(json)) { + if (!EXPECTED_ROOT_PROPERTY_NAMES.has(propertyName)) { + throw new Error(`Unexpected property name: ${propertyName}`); + } + } + const { suppressions } = json; + if (!suppressions) { + throw new Error('Missing "suppressions" property.'); + } + if (!Array.isArray(suppressions)) { + throw new Error('"suppressions" property is not an array.'); + } + const EXPECTED_SUPPRESSION_PROPERTY_NAMES = new Set(['file', 'scopeId', 'rule']); + for (const suppression of suppressions) { + if (typeof suppression !== 'object') { + throw new Error(`Invalid suppression: ${JSON.stringify(suppression, null, 2)}`); + } + if (!suppression) { + throw new Error(`Suppression is null: ${JSON.stringify(suppression, null, 2)}`); + } + for (const propertyName of Object.getOwnPropertyNames(suppression)) { + if (!EXPECTED_SUPPRESSION_PROPERTY_NAMES.has(propertyName)) { + throw new Error(`Unexpected property name: ${propertyName}`); + } + } + for (const propertyName of EXPECTED_SUPPRESSION_PROPERTY_NAMES) { + if (!suppression.hasOwnProperty(propertyName)) { + throw new Error(`Missing "${propertyName}" property in suppression: ${JSON.stringify(suppression, null, 2)}`); + } + else if (typeof suppression[propertyName] !== 'string') { + throw new Error(`"${propertyName}" property in suppression is not a string: ${JSON.stringify(suppression, null, 2)}`); + } + } + } + return true; +} +//# sourceMappingURL=bulk-suppressions-file.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.js.map new file mode 100644 index 0000000000000000000000000000000000000000..284b3d7ce9ffb1bb60280572274a76950eab08e5 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-file.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bulk-suppressions-file.js","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/bulk-suppressions-file.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;AAsC3D,wGAoDC;AAED,sHAOC;AAED,kEAYC;AAED,wGAGC;AAUD,oDAEC;AAhID,4CAAoB;AACpB,2CAAsD;AAmBtD,MAAM,oBAAoB,GAAY,OAAO,CAAC,GAAG,CAAC,mCAAuB,CAAC,KAAK,SAAS,CAAC;AACzF,MAAM,cAAc,GAAW,EAAE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;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport fs from 'fs';\nimport { VSCODE_PID_ENV_VAR_NAME } from './constants';\n\nexport interface ISuppression {\n file: string;\n scopeId: string;\n rule: string;\n}\n\nexport interface IBulkSuppressionsConfig {\n serializedSuppressions: Set;\n jsonObject: IBulkSuppressionsJson;\n newSerializedSuppressions: Set;\n newJsonObject: IBulkSuppressionsJson;\n}\n\nexport interface IBulkSuppressionsJson {\n suppressions: ISuppression[];\n}\n\nconst IS_RUNNING_IN_VSCODE: boolean = process.env[VSCODE_PID_ENV_VAR_NAME] !== undefined;\nconst TEN_SECONDS_MS: number = 10 * 1000;\nconst SUPPRESSIONS_JSON_FILENAME: string = '.eslint-bulk-suppressions.json';\n\nfunction throwIfAnythingOtherThanNotExistError(e: NodeJS.ErrnoException): void | never {\n if (e?.code !== 'ENOENT') {\n // Throw an error if any other error than file not found\n throw e;\n }\n}\n\ninterface ICachedBulkSuppressionsConfig {\n readTime: number;\n suppressionsConfig: IBulkSuppressionsConfig;\n}\nconst suppressionsJsonByFolderPath: Map = new Map();\nexport function getSuppressionsConfigForEslintConfigFolderPath(\n eslintConfigFolderPath: string\n): IBulkSuppressionsConfig {\n const cachedSuppressionsConfig: ICachedBulkSuppressionsConfig | undefined =\n suppressionsJsonByFolderPath.get(eslintConfigFolderPath);\n\n let shouldLoad: boolean;\n let suppressionsConfig: IBulkSuppressionsConfig;\n if (cachedSuppressionsConfig) {\n shouldLoad = IS_RUNNING_IN_VSCODE && cachedSuppressionsConfig.readTime < Date.now() - TEN_SECONDS_MS;\n suppressionsConfig = cachedSuppressionsConfig.suppressionsConfig;\n } else {\n shouldLoad = true;\n }\n\n if (shouldLoad) {\n const suppressionsPath: string = `${eslintConfigFolderPath}/${SUPPRESSIONS_JSON_FILENAME}`;\n let rawJsonFile: string | undefined;\n try {\n rawJsonFile = fs.readFileSync(suppressionsPath).toString();\n } catch (e) {\n throwIfAnythingOtherThanNotExistError(e);\n }\n\n if (!rawJsonFile) {\n suppressionsConfig = {\n serializedSuppressions: new Set(),\n jsonObject: { suppressions: [] },\n newSerializedSuppressions: new Set(),\n newJsonObject: { suppressions: [] }\n };\n } else {\n const jsonObject: IBulkSuppressionsJson = JSON.parse(rawJsonFile);\n validateSuppressionsJson(jsonObject);\n\n const serializedSuppressions: Set = new Set();\n for (const suppression of jsonObject.suppressions) {\n serializedSuppressions.add(serializeSuppression(suppression));\n }\n\n suppressionsConfig = {\n serializedSuppressions,\n jsonObject,\n newSerializedSuppressions: new Set(),\n newJsonObject: { suppressions: [] }\n };\n }\n\n suppressionsJsonByFolderPath.set(eslintConfigFolderPath, { readTime: Date.now(), suppressionsConfig });\n }\n\n return suppressionsConfig!;\n}\n\nexport function getAllBulkSuppressionsConfigsByEslintConfigFolderPath(): [string, IBulkSuppressionsConfig][] {\n const result: [string, IBulkSuppressionsConfig][] = [];\n for (const [eslintConfigFolderPath, { suppressionsConfig }] of suppressionsJsonByFolderPath) {\n result.push([eslintConfigFolderPath, suppressionsConfig]);\n }\n\n return result;\n}\n\nexport function writeSuppressionsJsonToFile(\n eslintConfigFolderPath: string,\n suppressionsConfig: IBulkSuppressionsConfig\n): void {\n suppressionsJsonByFolderPath.set(eslintConfigFolderPath, { readTime: Date.now(), suppressionsConfig });\n const suppressionsPath: string = `${eslintConfigFolderPath}/${SUPPRESSIONS_JSON_FILENAME}`;\n if (suppressionsConfig.jsonObject.suppressions.length === 0) {\n deleteFile(suppressionsPath);\n } else {\n suppressionsConfig.jsonObject.suppressions.sort(compareSuppressions);\n fs.writeFileSync(suppressionsPath, JSON.stringify(suppressionsConfig.jsonObject, undefined, 2));\n }\n}\n\nexport function deleteBulkSuppressionsFileInEslintConfigFolder(eslintConfigFolderPath: string): void {\n const suppressionsPath: string = `${eslintConfigFolderPath}/${SUPPRESSIONS_JSON_FILENAME}`;\n deleteFile(suppressionsPath);\n}\n\nfunction deleteFile(filePath: string): void {\n try {\n fs.unlinkSync(filePath);\n } catch (e) {\n throwIfAnythingOtherThanNotExistError(e);\n }\n}\n\nexport function serializeSuppression({ file, scopeId, rule }: ISuppression): string {\n return `${file}|${scopeId}|${rule}`;\n}\n\nfunction compareSuppressions(a: ISuppression, b: ISuppression): -1 | 0 | 1 {\n if (a.file < b.file) {\n return -1;\n } else if (a.file > b.file) {\n return 1;\n } else if (a.scopeId < b.scopeId) {\n return -1;\n } else if (a.scopeId > b.scopeId) {\n return 1;\n } else if (a.rule < b.rule) {\n return -1;\n } else if (a.rule > b.rule) {\n return 1;\n } else {\n return 0;\n }\n}\n\nfunction validateSuppressionsJson(json: IBulkSuppressionsJson): json is IBulkSuppressionsJson {\n if (typeof json !== 'object') {\n throw new Error(`Invalid JSON object: ${JSON.stringify(json, null, 2)}`);\n }\n\n if (!json) {\n throw new Error('JSON object is null.');\n }\n\n const EXPECTED_ROOT_PROPERTY_NAMES: Set = new Set(['suppressions']);\n\n for (const propertyName of Object.getOwnPropertyNames(json)) {\n if (!EXPECTED_ROOT_PROPERTY_NAMES.has(propertyName as keyof IBulkSuppressionsJson)) {\n throw new Error(`Unexpected property name: ${propertyName}`);\n }\n }\n\n const { suppressions } = json;\n if (!suppressions) {\n throw new Error('Missing \"suppressions\" property.');\n }\n\n if (!Array.isArray(suppressions)) {\n throw new Error('\"suppressions\" property is not an array.');\n }\n\n const EXPECTED_SUPPRESSION_PROPERTY_NAMES: Set = new Set(['file', 'scopeId', 'rule']);\n for (const suppression of suppressions) {\n if (typeof suppression !== 'object') {\n throw new Error(`Invalid suppression: ${JSON.stringify(suppression, null, 2)}`);\n }\n\n if (!suppression) {\n throw new Error(`Suppression is null: ${JSON.stringify(suppression, null, 2)}`);\n }\n\n for (const propertyName of Object.getOwnPropertyNames(suppression)) {\n if (!EXPECTED_SUPPRESSION_PROPERTY_NAMES.has(propertyName as keyof ISuppression)) {\n throw new Error(`Unexpected property name: ${propertyName}`);\n }\n }\n\n for (const propertyName of EXPECTED_SUPPRESSION_PROPERTY_NAMES) {\n if (!suppression.hasOwnProperty(propertyName)) {\n throw new Error(\n `Missing \"${propertyName}\" property in suppression: ${JSON.stringify(suppression, null, 2)}`\n );\n } else if (typeof suppression[propertyName] !== 'string') {\n throw new Error(\n `\"${propertyName}\" property in suppression is not a string: ${JSON.stringify(suppression, null, 2)}`\n );\n }\n }\n }\n\n return true;\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c624fedaa419702bce5a6495ab938bab8c3969c9 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.d.ts @@ -0,0 +1,29 @@ +import type { TSESTree } from '@typescript-eslint/types'; +import { type IBulkSuppressionsConfig, type ISuppression } from './bulk-suppressions-file'; +declare const SUPPRESSION_SYMBOL: unique symbol; +interface IProblem { + [SUPPRESSION_SYMBOL]?: { + config: IBulkSuppressionsConfig; + suppression: ISuppression; + serializedSuppression: string; + }; +} +export declare function shouldBulkSuppress(params: { + filename: string; + currentNode: TSESTree.Node; + ruleId: string; + problem: IProblem; +}): boolean; +export declare function prune(): void; +export declare function write(): void; +export declare function requireFromPathToLinterJS(importPath: string): import('eslint-9').Linter | import('eslint-8').Linter; +export declare function patchClass(originalClass: new () => T, patchedClass: new () => U): void; +/** + * This returns a wrapped version of the "verify" function from ESLint's Linter class + * that postprocesses rule violations that weren't suppressed by comments. This postprocessing + * records suppressions that weren't otherwise suppressed by comments to be used + * by the "suppress" and "prune" commands. + */ +export declare function extendVerifyFunction(originalFn: (this: unknown, ...args: unknown[]) => IProblem[] | undefined): (this: unknown, ...args: unknown[]) => IProblem[] | undefined; +export {}; +//# sourceMappingURL=bulk-suppressions-patch.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ab6e23370bf4c77fa015f84196a145e6da34a5db --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bulk-suppressions-patch.d.ts","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/bulk-suppressions-patch.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAWzD,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EAGlB,MAAM,0BAA0B,CAAC;AAWlC,QAAA,MAAM,kBAAkB,EAAE,OAAO,MAA8B,CAAC;AAOhE,UAAU,QAAQ;IAChB,CAAC,kBAAkB,CAAC,CAAC,EAAE;QACrB,MAAM,EAAE,uBAAuB,CAAC;QAChC,WAAW,EAAE,YAAY,CAAC;QAC1B,qBAAqB,EAAE,MAAM,CAAC;KAC/B,CAAC;CACH;AAiGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,QAAQ,CAAC;CACnB,GAAG,OAAO,CA4BV;AAED,wBAAgB,KAAK,IAAI,IAAI,CAiB5B;AAED,wBAAgB,KAAK,IAAI,IAAI,CAS5B;AAGD,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GACjB,OAAO,UAAU,EAAE,MAAM,GAAG,OAAO,UAAU,EAAE,MAAM,CAQvD;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,UAAU,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC,GAAG,IAAI,CAgBtG;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,EAAE,GAAG,SAAS,GACxE,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,EAAE,GAAG,SAAS,CA0B/D"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.js new file mode 100644 index 0000000000000000000000000000000000000000..a6cde70a7e8eb34c3ff0ffe2479e5a961081f578 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.js @@ -0,0 +1,248 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.shouldBulkSuppress = shouldBulkSuppress; +exports.prune = prune; +exports.write = write; +exports.requireFromPathToLinterJS = requireFromPathToLinterJS; +exports.patchClass = patchClass; +exports.extendVerifyFunction = extendVerifyFunction; +const fs_1 = __importDefault(require("fs")); +const Guards = __importStar(require("./ast-guards")); +const _patch_base_1 = require("../_patch-base"); +const constants_1 = require("./constants"); +const bulk_suppressions_file_1 = require("./bulk-suppressions-file"); +const ESLINT_CONFIG_FILENAMES = [ + 'eslint.config.js', + 'eslint.config.cjs', + 'eslint.config.mjs', + '.eslintrc.js', + '.eslintrc.cjs' + // Several other filenames are allowed, but this patch requires that it be loaded via a JS config file, + // so we only need to check for the JS-based filenames +]; +const SUPPRESSION_SYMBOL = Symbol('suppression'); +const ESLINT_BULK_SUPPRESS_ENV_VAR_VALUE = process.env[constants_1.ESLINT_BULK_SUPPRESS_ENV_VAR_NAME]; +const SUPPRESS_ALL_RULES = ESLINT_BULK_SUPPRESS_ENV_VAR_VALUE === '*'; +const RULES_TO_SUPPRESS = ESLINT_BULK_SUPPRESS_ENV_VAR_VALUE + ? new Set(ESLINT_BULK_SUPPRESS_ENV_VAR_VALUE.split(',')) + : undefined; +function getNodeName(node) { + if (Guards.isClassDeclarationWithName(node)) { + return node.id.name; + } + else if (Guards.isFunctionDeclarationWithName(node)) { + return node.id.name; + } + else if (Guards.isClassExpressionWithName(node)) { + return node.id.name; + } + else if (Guards.isFunctionExpressionWithName(node)) { + return node.id.name; + } + else if (Guards.isNormalVariableDeclaratorWithAnonymousExpressionAssigned(node)) { + return node.id.name; + } + else if (Guards.isNormalObjectPropertyWithAnonymousExpressionAssigned(node)) { + return node.key.name; + } + else if (Guards.isNormalClassPropertyDefinitionWithAnonymousExpressionAssigned(node)) { + return node.key.name; + } + else if (Guards.isNormalAssignmentPatternWithAnonymousExpressionAssigned(node)) { + return node.left.name; + } + else if (Guards.isNormalMethodDefinition(node)) { + return node.key.name; + } + else if (Guards.isTSEnumDeclaration(node)) { + return node.id.name; + } + else if (Guards.isTSInterfaceDeclaration(node)) { + return node.id.name; + } + else if (Guards.isTSTypeAliasDeclaration(node)) { + return node.id.name; + } +} +function calculateScopeId(node) { + const scopeIds = []; + for (let current = node; current; current = current.parent) { + const scopeIdForASTNode = getNodeName(current); + if (scopeIdForASTNode !== undefined) { + scopeIds.unshift(scopeIdForASTNode); + } + } + if (scopeIds.length === 0) { + return '.'; + } + else { + return '.' + scopeIds.join('.'); + } +} +const eslintConfigPathByFileOrFolderPath = new Map(); +function findEslintConfigFolderPathForNormalizedFileAbsolutePath(normalizedFilePath) { + const cachedFolderPathForFilePath = eslintConfigPathByFileOrFolderPath.get(normalizedFilePath); + if (cachedFolderPathForFilePath) { + return cachedFolderPathForFilePath; + } + const normalizedFileFolderPath = normalizedFilePath.substring(0, normalizedFilePath.lastIndexOf('/')); + const pathsToCache = [normalizedFilePath]; + let eslintConfigFolderPath; + findEslintConfigFileLoop: for (let currentFolder = normalizedFileFolderPath; currentFolder; // 'something'.substring(0, -1) is '' + currentFolder = currentFolder.substring(0, currentFolder.lastIndexOf('/'))) { + const cachedEslintrcFolderPath = eslintConfigPathByFileOrFolderPath.get(currentFolder); + if (cachedEslintrcFolderPath) { + // Need to cache this result into the intermediate paths + eslintConfigFolderPath = cachedEslintrcFolderPath; + break; + } + pathsToCache.push(currentFolder); + for (const eslintConfigFilename of ESLINT_CONFIG_FILENAMES) { + if (fs_1.default.existsSync(`${currentFolder}/${eslintConfigFilename}`)) { + eslintConfigFolderPath = currentFolder; + break findEslintConfigFileLoop; + } + } + } + if (eslintConfigFolderPath) { + for (const checkedFolder of pathsToCache) { + eslintConfigPathByFileOrFolderPath.set(checkedFolder, eslintConfigFolderPath); + } + return eslintConfigFolderPath; + } + else { + throw new Error(`Cannot locate an ESLint configuration file for ${normalizedFilePath}`); + } +} +// One-line insert into the ruleContext report method to prematurely exit if the ESLint problem has been suppressed +function shouldBulkSuppress(params) { + // Use this ENV variable to turn off eslint-bulk-suppressions functionality, default behavior is on + if (process.env[constants_1.ESLINT_BULK_ENABLE_ENV_VAR_NAME] === 'false') { + return false; + } + const { filename: fileAbsolutePath, currentNode, ruleId: rule, problem } = params; + const normalizedFileAbsolutePath = fileAbsolutePath.replace(/\\/g, '/'); + const eslintConfigDirectory = findEslintConfigFolderPathForNormalizedFileAbsolutePath(normalizedFileAbsolutePath); + const fileRelativePath = normalizedFileAbsolutePath.substring(eslintConfigDirectory.length + 1); + const scopeId = calculateScopeId(currentNode); + const suppression = { file: fileRelativePath, scopeId, rule }; + const config = (0, bulk_suppressions_file_1.getSuppressionsConfigForEslintConfigFolderPath)(eslintConfigDirectory); + const serializedSuppression = (0, bulk_suppressions_file_1.serializeSuppression)(suppression); + const currentNodeIsSuppressed = config.serializedSuppressions.has(serializedSuppression); + if (currentNodeIsSuppressed || SUPPRESS_ALL_RULES || (RULES_TO_SUPPRESS === null || RULES_TO_SUPPRESS === void 0 ? void 0 : RULES_TO_SUPPRESS.has(suppression.rule))) { + problem[SUPPRESSION_SYMBOL] = { + suppression, + serializedSuppression, + config + }; + } + return process.env[constants_1.ESLINT_BULK_PRUNE_ENV_VAR_NAME] !== '1' && currentNodeIsSuppressed; +} +function prune() { + for (const [eslintConfigFolderPath, suppressionsConfig] of (0, bulk_suppressions_file_1.getAllBulkSuppressionsConfigsByEslintConfigFolderPath)()) { + if (suppressionsConfig) { + const { newSerializedSuppressions, newJsonObject } = suppressionsConfig; + const newSuppressionsConfig = { + serializedSuppressions: newSerializedSuppressions, + jsonObject: newJsonObject, + newSerializedSuppressions: new Set(), + newJsonObject: { suppressions: [] } + }; + (0, bulk_suppressions_file_1.writeSuppressionsJsonToFile)(eslintConfigFolderPath, newSuppressionsConfig); + } + } +} +function write() { + for (const [eslintrcFolderPath, suppressionsConfig] of (0, bulk_suppressions_file_1.getAllBulkSuppressionsConfigsByEslintConfigFolderPath)()) { + if (suppressionsConfig) { + (0, bulk_suppressions_file_1.writeSuppressionsJsonToFile)(eslintrcFolderPath, suppressionsConfig); + } + } +} +// utility function for linter-patch.js to make require statements that use relative paths in linter.js work in linter-patch.js +function requireFromPathToLinterJS(importPath) { + if (!_patch_base_1.eslintFolder) { + return require(importPath); + } + const pathToLinterFolder = `${_patch_base_1.eslintFolder}/lib/linter`; + const moduleAbsolutePath = require.resolve(importPath, { paths: [pathToLinterFolder] }); + return require(moduleAbsolutePath); +} +function patchClass(originalClass, patchedClass) { + // Get all the property names of the patched class prototype + const patchedProperties = Object.getOwnPropertyNames(patchedClass.prototype); + // Loop through all the properties + for (const prop of patchedProperties) { + // Override the property in the original class + originalClass.prototype[prop] = patchedClass.prototype[prop]; + } + // Handle getters and setters + for (const [prop, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(patchedClass.prototype))) { + if (descriptor.get || descriptor.set) { + Object.defineProperty(originalClass.prototype, prop, descriptor); + } + } +} +/** + * This returns a wrapped version of the "verify" function from ESLint's Linter class + * that postprocesses rule violations that weren't suppressed by comments. This postprocessing + * records suppressions that weren't otherwise suppressed by comments to be used + * by the "suppress" and "prune" commands. + */ +function extendVerifyFunction(originalFn) { + return function (...args) { + const problems = originalFn.apply(this, args); + if (problems) { + for (const problem of problems) { + if (problem[SUPPRESSION_SYMBOL]) { + const { serializedSuppression, suppression, config: { newSerializedSuppressions, jsonObject: { suppressions }, newJsonObject: { suppressions: newSuppressions } } } = problem[SUPPRESSION_SYMBOL]; + if (!newSerializedSuppressions.has(serializedSuppression)) { + newSerializedSuppressions.add(serializedSuppression); + newSuppressions.push(suppression); + suppressions.push(suppression); + } + } + } + } + return problems; + }; +} +//# sourceMappingURL=bulk-suppressions-patch.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.js.map new file mode 100644 index 0000000000000000000000000000000000000000..44f3ceb43f3d5ecd2eaac357380b946b2e27750a --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/bulk-suppressions-patch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bulk-suppressions-patch.js","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/bulk-suppressions-patch.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6I3D,gDAiCC;AAED,sBAiBC;AAED,sBASC;AAGD,8DAUC;AAED,gCAgBC;AAQD,oDA4BC;AA5QD,4CAAoB;AAEpB,qDAAuC;AAEvC,gDAA8C;AAC9C,2CAIqB;AACrB,qEAOkC;AAElC,MAAM,uBAAuB,GAAa;IACxC,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,uGAAuG;IACvG,sDAAsD;CACvD,CAAC;AACF,MAAM,kBAAkB,GAAkB,MAAM,CAAC,aAAa,CAA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,IAAI,CAAC,WAAW,CAAC,CAAC;oBACjC,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type { TSESTree } from '@typescript-eslint/types';\nimport fs from 'fs';\n\nimport * as Guards from './ast-guards';\n\nimport { eslintFolder } from '../_patch-base';\nimport {\n ESLINT_BULK_ENABLE_ENV_VAR_NAME,\n ESLINT_BULK_PRUNE_ENV_VAR_NAME,\n ESLINT_BULK_SUPPRESS_ENV_VAR_NAME\n} from './constants';\nimport {\n getSuppressionsConfigForEslintConfigFolderPath,\n serializeSuppression,\n type IBulkSuppressionsConfig,\n type ISuppression,\n writeSuppressionsJsonToFile,\n getAllBulkSuppressionsConfigsByEslintConfigFolderPath\n} from './bulk-suppressions-file';\n\nconst ESLINT_CONFIG_FILENAMES: string[] = [\n 'eslint.config.js',\n 'eslint.config.cjs',\n 'eslint.config.mjs',\n '.eslintrc.js',\n '.eslintrc.cjs'\n // Several other filenames are allowed, but this patch requires that it be loaded via a JS config file,\n // so we only need to check for the JS-based filenames\n];\nconst SUPPRESSION_SYMBOL: unique symbol = Symbol('suppression');\nconst ESLINT_BULK_SUPPRESS_ENV_VAR_VALUE: string | undefined = process.env[ESLINT_BULK_SUPPRESS_ENV_VAR_NAME];\nconst SUPPRESS_ALL_RULES: boolean = ESLINT_BULK_SUPPRESS_ENV_VAR_VALUE === '*';\nconst RULES_TO_SUPPRESS: Set | undefined = ESLINT_BULK_SUPPRESS_ENV_VAR_VALUE\n ? new Set(ESLINT_BULK_SUPPRESS_ENV_VAR_VALUE.split(','))\n : undefined;\n\ninterface IProblem {\n [SUPPRESSION_SYMBOL]?: {\n config: IBulkSuppressionsConfig;\n suppression: ISuppression;\n serializedSuppression: string;\n };\n}\n\nfunction getNodeName(node: TSESTree.Node): string | undefined {\n if (Guards.isClassDeclarationWithName(node)) {\n return node.id.name;\n } else if (Guards.isFunctionDeclarationWithName(node)) {\n return node.id.name;\n } else if (Guards.isClassExpressionWithName(node)) {\n return node.id.name;\n } else if (Guards.isFunctionExpressionWithName(node)) {\n return node.id.name;\n } else if (Guards.isNormalVariableDeclaratorWithAnonymousExpressionAssigned(node)) {\n return node.id.name;\n } else if (Guards.isNormalObjectPropertyWithAnonymousExpressionAssigned(node)) {\n return node.key.name;\n } else if (Guards.isNormalClassPropertyDefinitionWithAnonymousExpressionAssigned(node)) {\n return node.key.name;\n } else if (Guards.isNormalAssignmentPatternWithAnonymousExpressionAssigned(node)) {\n return node.left.name;\n } else if (Guards.isNormalMethodDefinition(node)) {\n return node.key.name;\n } else if (Guards.isTSEnumDeclaration(node)) {\n return node.id.name;\n } else if (Guards.isTSInterfaceDeclaration(node)) {\n return node.id.name;\n } else if (Guards.isTSTypeAliasDeclaration(node)) {\n return node.id.name;\n }\n}\n\ntype NodeWithParent = TSESTree.Node & { parent?: TSESTree.Node };\n\nfunction calculateScopeId(node: NodeWithParent | undefined): string {\n const scopeIds: string[] = [];\n for (let current: NodeWithParent | undefined = node; current; current = current.parent) {\n const scopeIdForASTNode: string | undefined = getNodeName(current);\n if (scopeIdForASTNode !== undefined) {\n scopeIds.unshift(scopeIdForASTNode);\n }\n }\n\n if (scopeIds.length === 0) {\n return '.';\n } else {\n return '.' + scopeIds.join('.');\n }\n}\n\nconst eslintConfigPathByFileOrFolderPath: Map = new Map();\n\nfunction findEslintConfigFolderPathForNormalizedFileAbsolutePath(normalizedFilePath: string): string {\n const cachedFolderPathForFilePath: string | undefined =\n eslintConfigPathByFileOrFolderPath.get(normalizedFilePath);\n if (cachedFolderPathForFilePath) {\n return cachedFolderPathForFilePath;\n }\n const normalizedFileFolderPath: string = normalizedFilePath.substring(\n 0,\n normalizedFilePath.lastIndexOf('/')\n );\n\n const pathsToCache: string[] = [normalizedFilePath];\n let eslintConfigFolderPath: string | undefined;\n findEslintConfigFileLoop: for (\n let currentFolder: string = normalizedFileFolderPath;\n currentFolder; // 'something'.substring(0, -1) is ''\n currentFolder = currentFolder.substring(0, currentFolder.lastIndexOf('/'))\n ) {\n const cachedEslintrcFolderPath: string | undefined =\n eslintConfigPathByFileOrFolderPath.get(currentFolder);\n if (cachedEslintrcFolderPath) {\n // Need to cache this result into the intermediate paths\n eslintConfigFolderPath = cachedEslintrcFolderPath;\n break;\n }\n\n pathsToCache.push(currentFolder);\n for (const eslintConfigFilename of ESLINT_CONFIG_FILENAMES) {\n if (fs.existsSync(`${currentFolder}/${eslintConfigFilename}`)) {\n eslintConfigFolderPath = currentFolder;\n break findEslintConfigFileLoop;\n }\n }\n }\n\n if (eslintConfigFolderPath) {\n for (const checkedFolder of pathsToCache) {\n eslintConfigPathByFileOrFolderPath.set(checkedFolder, eslintConfigFolderPath);\n }\n\n return eslintConfigFolderPath;\n } else {\n throw new Error(`Cannot locate an ESLint configuration file for ${normalizedFilePath}`);\n }\n}\n\n// One-line insert into the ruleContext report method to prematurely exit if the ESLint problem has been suppressed\nexport function shouldBulkSuppress(params: {\n filename: string;\n currentNode: TSESTree.Node;\n ruleId: string;\n problem: IProblem;\n}): boolean {\n // Use this ENV variable to turn off eslint-bulk-suppressions functionality, default behavior is on\n if (process.env[ESLINT_BULK_ENABLE_ENV_VAR_NAME] === 'false') {\n return false;\n }\n\n const { filename: fileAbsolutePath, currentNode, ruleId: rule, problem } = params;\n const normalizedFileAbsolutePath: string = fileAbsolutePath.replace(/\\\\/g, '/');\n const eslintConfigDirectory: string =\n findEslintConfigFolderPathForNormalizedFileAbsolutePath(normalizedFileAbsolutePath);\n const fileRelativePath: string = normalizedFileAbsolutePath.substring(eslintConfigDirectory.length + 1);\n const scopeId: string = calculateScopeId(currentNode);\n const suppression: ISuppression = { file: fileRelativePath, scopeId, rule };\n\n const config: IBulkSuppressionsConfig =\n getSuppressionsConfigForEslintConfigFolderPath(eslintConfigDirectory);\n const serializedSuppression: string = serializeSuppression(suppression);\n const currentNodeIsSuppressed: boolean = config.serializedSuppressions.has(serializedSuppression);\n\n if (currentNodeIsSuppressed || SUPPRESS_ALL_RULES || RULES_TO_SUPPRESS?.has(suppression.rule)) {\n problem[SUPPRESSION_SYMBOL] = {\n suppression,\n serializedSuppression,\n config\n };\n }\n\n return process.env[ESLINT_BULK_PRUNE_ENV_VAR_NAME] !== '1' && currentNodeIsSuppressed;\n}\n\nexport function prune(): void {\n for (const [\n eslintConfigFolderPath,\n suppressionsConfig\n ] of getAllBulkSuppressionsConfigsByEslintConfigFolderPath()) {\n if (suppressionsConfig) {\n const { newSerializedSuppressions, newJsonObject } = suppressionsConfig;\n const newSuppressionsConfig: IBulkSuppressionsConfig = {\n serializedSuppressions: newSerializedSuppressions,\n jsonObject: newJsonObject,\n newSerializedSuppressions: new Set(),\n newJsonObject: { suppressions: [] }\n };\n\n writeSuppressionsJsonToFile(eslintConfigFolderPath, newSuppressionsConfig);\n }\n }\n}\n\nexport function write(): void {\n for (const [\n eslintrcFolderPath,\n suppressionsConfig\n ] of getAllBulkSuppressionsConfigsByEslintConfigFolderPath()) {\n if (suppressionsConfig) {\n writeSuppressionsJsonToFile(eslintrcFolderPath, suppressionsConfig);\n }\n }\n}\n\n// utility function for linter-patch.js to make require statements that use relative paths in linter.js work in linter-patch.js\nexport function requireFromPathToLinterJS(\n importPath: string\n): import('eslint-9').Linter | import('eslint-8').Linter {\n if (!eslintFolder) {\n return require(importPath);\n }\n\n const pathToLinterFolder: string = `${eslintFolder}/lib/linter`;\n const moduleAbsolutePath: string = require.resolve(importPath, { paths: [pathToLinterFolder] });\n return require(moduleAbsolutePath);\n}\n\nexport function patchClass(originalClass: new () => T, patchedClass: new () => U): void {\n // Get all the property names of the patched class prototype\n const patchedProperties: string[] = Object.getOwnPropertyNames(patchedClass.prototype);\n\n // Loop through all the properties\n for (const prop of patchedProperties) {\n // Override the property in the original class\n originalClass.prototype[prop] = patchedClass.prototype[prop];\n }\n\n // Handle getters and setters\n for (const [prop, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(patchedClass.prototype))) {\n if (descriptor.get || descriptor.set) {\n Object.defineProperty(originalClass.prototype, prop, descriptor);\n }\n }\n}\n\n/**\n * This returns a wrapped version of the \"verify\" function from ESLint's Linter class\n * that postprocesses rule violations that weren't suppressed by comments. This postprocessing\n * records suppressions that weren't otherwise suppressed by comments to be used\n * by the \"suppress\" and \"prune\" commands.\n */\nexport function extendVerifyFunction(\n originalFn: (this: unknown, ...args: unknown[]) => IProblem[] | undefined\n): (this: unknown, ...args: unknown[]) => IProblem[] | undefined {\n return function (this: unknown, ...args: unknown[]): IProblem[] | undefined {\n const problems: IProblem[] | undefined = originalFn.apply(this, args);\n if (problems) {\n for (const problem of problems) {\n if (problem[SUPPRESSION_SYMBOL]) {\n const {\n serializedSuppression,\n suppression,\n config: {\n newSerializedSuppressions,\n jsonObject: { suppressions },\n newJsonObject: { suppressions: newSuppressions }\n }\n } = problem[SUPPRESSION_SYMBOL];\n if (!newSerializedSuppressions.has(serializedSuppression)) {\n newSerializedSuppressions.add(serializedSuppression);\n newSuppressions.push(suppression);\n suppressions.push(suppression);\n }\n }\n }\n }\n\n return problems;\n };\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..31c49b8650ce632eb171231aad8fbde94ae7e647 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.d.ts @@ -0,0 +1,2 @@ +export declare function pruneAsync(): Promise; +//# sourceMappingURL=prune.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..8efd4b75287a6cfe2e739b2b645822890e906061 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"prune.d.ts","sourceRoot":"","sources":["../../../src/eslint-bulk-suppressions/cli/prune.ts"],"names":[],"mappings":"AAaA,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAsBhD"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.js new file mode 100644 index 0000000000000000000000000000000000000000..b9251eb89e7994e79235da40a1bef205b14ff81c --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.js @@ -0,0 +1,60 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pruneAsync = pruneAsync; +const fs_1 = __importDefault(require("fs")); +const print_help_1 = require("./utils/print-help"); +const runEslint_1 = require("./runEslint"); +const constants_1 = require("../constants"); +const bulk_suppressions_file_1 = require("../bulk-suppressions-file"); +async function pruneAsync() { + const args = process.argv.slice(3); + if (args.includes('--help') || args.includes('-h')) { + (0, print_help_1.printPruneHelp)(); + process.exit(0); + } + if (args.length > 0) { + throw new Error(`@rushstack/eslint-bulk: Unknown arguments: ${args.join(' ')}`); + } + const normalizedCwd = process.cwd().replace(/\\/g, '/'); + const allFiles = await getAllFilesWithExistingSuppressionsForCwdAsync(normalizedCwd); + if (allFiles.length > 0) { + process.env[constants_1.ESLINT_BULK_PRUNE_ENV_VAR_NAME] = '1'; + console.log(`Pruning suppressions for ${allFiles.length} files...`); + await (0, runEslint_1.runEslintAsync)(allFiles, 'prune'); + } + else { + console.log('No files with existing suppressions found.'); + (0, bulk_suppressions_file_1.deleteBulkSuppressionsFileInEslintConfigFolder)(normalizedCwd); + } +} +async function getAllFilesWithExistingSuppressionsForCwdAsync(normalizedCwd) { + const { jsonObject: bulkSuppressionsConfigJson } = (0, bulk_suppressions_file_1.getSuppressionsConfigForEslintConfigFolderPath)(normalizedCwd); + const allFiles = new Set(); + for (const { file: filePath } of bulkSuppressionsConfigJson.suppressions) { + allFiles.add(filePath); + } + const allFilesArray = Array.from(allFiles); + const allExistingFiles = []; + // TODO: limit parallelism here with something similar to `Async.forEachAsync` from `node-core-library`. + await Promise.all(allFilesArray.map(async (filePath) => { + try { + await fs_1.default.promises.access(filePath, fs_1.default.constants.F_OK); + allExistingFiles.push(filePath); + } + catch (_a) { + // Doesn't exist - ignore + } + })); + console.log(`Found ${allExistingFiles.length} files with existing suppressions.`); + const deletedCount = allFilesArray.length - allExistingFiles.length; + if (deletedCount > 0) { + console.log(`${deletedCount} files with suppressions were deleted.`); + } + return allExistingFiles; +} +//# sourceMappingURL=prune.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1776f0dc63d03faed7fa82b8321db7ac49709766 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/prune.js.map @@ -0,0 +1 @@ +{"version":3,"file":"prune.js","sourceRoot":"","sources":["../../../src/eslint-bulk-suppressions/cli/prune.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;AAY3D,gCAsBC;AAhCD,4CAAoB;AAEpB,mDAAoD;AACpD,2CAA6C;AAC7C,4CAA8D;AAC9D,sEAGmC;AAE5B,KAAK,UAAU,UAAU;IAC9B,MAAM,IAAI,GAAa,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE7C,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACnD,IAAA,2BAAc,GAAE,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,8CAA8C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClF,CAAC;IAED,MAAM,aAAa,GAAW,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAa,MAAM,8CAA8C,CAAC,aAAa,CAAC,CAAC;IAC/F,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,CAAC,GAAG,CAAC,0CAA8B,CAAC,GAAG,GAAG,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,4BAA4B,QAAQ,CAAC,MAAM,WAAW,CAAC,CAAC;QACpE,MAAM,IAAA,0BAAc,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;SAAM,CAAC;QAC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Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport fs from 'fs';\n\nimport { printPruneHelp } from './utils/print-help';\nimport { runEslintAsync } from './runEslint';\nimport { ESLINT_BULK_PRUNE_ENV_VAR_NAME } from '../constants';\nimport {\n deleteBulkSuppressionsFileInEslintConfigFolder,\n getSuppressionsConfigForEslintConfigFolderPath\n} from '../bulk-suppressions-file';\n\nexport async function pruneAsync(): Promise {\n const args: string[] = process.argv.slice(3);\n\n if (args.includes('--help') || args.includes('-h')) {\n printPruneHelp();\n process.exit(0);\n }\n\n if (args.length > 0) {\n throw new Error(`@rushstack/eslint-bulk: Unknown arguments: ${args.join(' ')}`);\n }\n\n const normalizedCwd: string = process.cwd().replace(/\\\\/g, '/');\n const allFiles: string[] = await getAllFilesWithExistingSuppressionsForCwdAsync(normalizedCwd);\n if (allFiles.length > 0) {\n process.env[ESLINT_BULK_PRUNE_ENV_VAR_NAME] = '1';\n console.log(`Pruning suppressions for ${allFiles.length} files...`);\n await runEslintAsync(allFiles, 'prune');\n } else {\n console.log('No files with existing suppressions found.');\n deleteBulkSuppressionsFileInEslintConfigFolder(normalizedCwd);\n }\n}\n\nasync function getAllFilesWithExistingSuppressionsForCwdAsync(normalizedCwd: string): Promise {\n const { jsonObject: bulkSuppressionsConfigJson } =\n getSuppressionsConfigForEslintConfigFolderPath(normalizedCwd);\n const allFiles: Set = new Set();\n for (const { file: filePath } of bulkSuppressionsConfigJson.suppressions) {\n allFiles.add(filePath);\n }\n\n const allFilesArray: string[] = Array.from(allFiles);\n\n const allExistingFiles: string[] = [];\n // TODO: limit parallelism here with something similar to `Async.forEachAsync` from `node-core-library`.\n await Promise.all(\n allFilesArray.map(async (filePath: string) => {\n try {\n await fs.promises.access(filePath, fs.constants.F_OK);\n allExistingFiles.push(filePath);\n } catch {\n // Doesn't exist - ignore\n }\n })\n );\n\n console.log(`Found ${allExistingFiles.length} files with existing suppressions.`);\n const deletedCount: number = allFilesArray.length - allExistingFiles.length;\n if (deletedCount > 0) {\n console.log(`${deletedCount} files with suppressions were deleted.`);\n }\n\n return allExistingFiles;\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c4058fdd515b70732f118133929d7e49b072b433 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.d.ts @@ -0,0 +1,2 @@ +export declare function runEslintAsync(files: string[], mode: 'suppress' | 'prune'): Promise; +//# sourceMappingURL=runEslint.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..1efb86561084cc6d3b73ce48991421ac22207cc2 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"runEslint.d.ts","sourceRoot":"","sources":["../../../src/eslint-bulk-suppressions/cli/runEslint.ts"],"names":[],"mappings":"AAOA,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA4C/F"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.js new file mode 100644 index 0000000000000000000000000000000000000000..454fd9e0c03c7bc94cf81199bcb8080d887a53f2 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.js @@ -0,0 +1,79 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.runEslintAsync = runEslintAsync; +const get_eslint_cli_1 = require("./utils/get-eslint-cli"); +async function runEslintAsync(files, mode) { + const cwd = process.cwd(); + const [eslintPath, eslintVersion] = (0, get_eslint_cli_1.getEslintPathAndVersion)(cwd); + const { ESLint } = require(eslintPath); + let eslint; + const majorVersion = parseInt(eslintVersion, 10); + if (majorVersion < 9) { + eslint = new ESLint({ cwd, useEslintrc: true }); + } + else { + eslint = new ESLint({ cwd }); + } + let results; + try { + results = await eslint.lintFiles(files); + } + catch (e) { + throw new Error(`@rushstack/eslint-bulk execution error: ${e.message}`); + } + const { write, prune } = await Promise.resolve().then(() => __importStar(require('../bulk-suppressions-patch'))); + switch (mode) { + case 'suppress': { + await write(); + break; + } + case 'prune': { + await prune(); + break; + } + } + if (results.length > 0) { + const stylishFormatter = await eslint.loadFormatter(); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const formattedResults = await Promise.resolve(stylishFormatter.format(results)); + console.log(formattedResults); + } + console.log('@rushstack/eslint-bulk: Successfully pruned unused suppressions in all .eslint-bulk-suppressions.json ' + + `files under directory ${cwd}`); +} +//# sourceMappingURL=runEslint.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0eb3a63a332d4f6423f6da1d11df381b4a5bcab9 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/runEslint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"runEslint.js","sourceRoot":"","sources":["../../../src/eslint-bulk-suppressions/cli/runEslint.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAM3D,wCA4CC;AA9CD,2DAAiE;AAE1D,KAAK,UAAU,cAAc,CAAC,KAAe,EAAE,IAA0B;IAC9E,MAAM,GAAG,GAAW,OAA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,CAAC,MAAM,CAAC,OAAc,CAAC,CAAC,CAAC;QAChG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,CAAC,GAAG,CACT,wGAAwG;QACtG,yBAAyB,GAAG,EAAE,CACjC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type { ESLint as TEslintLegacy } from 'eslint-8';\nimport type { ESLint as TEslint } from 'eslint-9';\nimport { getEslintPathAndVersion } from './utils/get-eslint-cli';\n\nexport async function runEslintAsync(files: string[], mode: 'suppress' | 'prune'): Promise {\n const cwd: string = process.cwd();\n const [eslintPath, eslintVersion] = getEslintPathAndVersion(cwd);\n const { ESLint }: typeof import('eslint-9') | typeof import('eslint-8') = require(eslintPath);\n\n let eslint: TEslint | TEslintLegacy;\n const majorVersion: number = parseInt(eslintVersion, 10);\n if (majorVersion < 9) {\n eslint = new ESLint({ cwd, useEslintrc: true });\n } else {\n eslint = new ESLint({ cwd });\n }\n\n let results: (TEslint.LintResult | TEslintLegacy.LintResult)[];\n try {\n results = await eslint.lintFiles(files);\n } catch (e) {\n throw new Error(`@rushstack/eslint-bulk execution error: ${e.message}`);\n }\n\n const { write, prune } = await import('../bulk-suppressions-patch');\n switch (mode) {\n case 'suppress': {\n await write();\n break;\n }\n\n case 'prune': {\n await prune();\n break;\n }\n }\n\n if (results.length > 0) {\n const stylishFormatter: TEslint.Formatter | TEslintLegacy.Formatter = await eslint.loadFormatter();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const formattedResults: string = await Promise.resolve(stylishFormatter.format(results as any));\n console.log(formattedResults);\n }\n\n console.log(\n '@rushstack/eslint-bulk: Successfully pruned unused suppressions in all .eslint-bulk-suppressions.json ' +\n `files under directory ${cwd}`\n );\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e1ad5caf1526e498a04acc99ea032ac5b93f1fe0 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=start.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..6c4dbe977ab59bf2d6868f06bdc086d3b5589086 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/eslint-bulk-suppressions/cli/start.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.js new file mode 100644 index 0000000000000000000000000000000000000000..3b3af07ebc4a6b423f08814ac3f417d62b434d94 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.js @@ -0,0 +1,44 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +Object.defineProperty(exports, "__esModule", { value: true }); +const prune_1 = require("./prune"); +const suppress_1 = require("./suppress"); +const is_correct_cwd_1 = require("./utils/is-correct-cwd"); +const print_help_1 = require("./utils/print-help"); +if (process.argv.includes('-h') || process.argv.includes('-H') || process.argv.includes('--help')) { + (0, print_help_1.printHelp)(); + process.exit(0); +} +if (process.argv.length < 3) { + (0, print_help_1.printHelp)(); + process.exit(1); +} +if (!(0, is_correct_cwd_1.isCorrectCwd)(process.cwd())) { + console.error('@rushstack/eslint-bulk: Please call this command from the directory that contains .eslintrc.js or .eslintrc.cjs'); + process.exit(1); +} +const subcommand = process.argv[2]; +let processPromise; +switch (subcommand) { + case 'suppress': { + processPromise = (0, suppress_1.suppressAsync)(); + break; + } + case 'prune': { + processPromise = (0, prune_1.pruneAsync)(); + break; + } + default: { + console.error('@rushstack/eslint-bulk: Unknown subcommand: ' + subcommand); + process.exit(1); + } +} +processPromise.catch((e) => { + if (e instanceof Error) { + console.error(e.message); + process.exit(1); + } + throw e; +}); +//# sourceMappingURL=start.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5e67d94e379c104b7fd977a6b4d79a1aeba165c6 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/start.js.map @@ -0,0 +1 @@ +{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../src/eslint-bulk-suppressions/cli/start.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,mCAAqC;AACrC,yCAA2C;AAC3C,2DAAsD;AACtD,mDAA+C;AAE/C,IAAI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AC,OAAO,CAAC,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,CAAC;AACV,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { pruneAsync } from './prune';\nimport { suppressAsync } from './suppress';\nimport { isCorrectCwd } from './utils/is-correct-cwd';\nimport { printHelp } from './utils/print-help';\n\nif (process.argv.includes('-h') || process.argv.includes('-H') || process.argv.includes('--help')) {\n printHelp();\n process.exit(0);\n}\n\nif (process.argv.length < 3) {\n printHelp();\n process.exit(1);\n}\n\nif (!isCorrectCwd(process.cwd())) {\n console.error(\n '@rushstack/eslint-bulk: Please call this command from the directory that contains .eslintrc.js or .eslintrc.cjs'\n );\n process.exit(1);\n}\n\nconst subcommand: string = process.argv[2];\nlet processPromise: Promise;\nswitch (subcommand) {\n case 'suppress': {\n processPromise = suppressAsync();\n break;\n }\n\n case 'prune': {\n processPromise = pruneAsync();\n break;\n }\n\n default: {\n console.error('@rushstack/eslint-bulk: Unknown subcommand: ' + subcommand);\n process.exit(1);\n }\n}\n\nprocessPromise.catch((e) => {\n if (e instanceof Error) {\n console.error(e.message);\n process.exit(1);\n }\n\n throw e;\n});\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2cef5c481e7fbdec4fc77b0e6e911778fe4ed998 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.d.ts @@ -0,0 +1,2 @@ +export declare function suppressAsync(): Promise; +//# sourceMappingURL=suppress.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ae2a46f054914235e0b4b69ed7feb076cc1474b4 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"suppress.d.ts","sourceRoot":"","sources":["../../../src/eslint-bulk-suppressions/cli/suppress.ts"],"names":[],"mappings":"AAaA,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAuEnD"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.js new file mode 100644 index 0000000000000000000000000000000000000000..d0332cb96c0f89407c86f13a9cbfeac369ced22a --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.js @@ -0,0 +1,63 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.suppressAsync = suppressAsync; +const print_help_1 = require("./utils/print-help"); +const runEslint_1 = require("./runEslint"); +const constants_1 = require("../constants"); +async function suppressAsync() { + const args = process.argv.slice(3); + if (args.includes('--help') || args.includes('-h')) { + (0, print_help_1.printSuppressHelp)(); + process.exit(0); + } + // Use reduce to create an object with all the parsed arguments + const parsedArgs = args.reduce((acc, arg, index, arr) => { + if (arg === '--rule') { + // continue because next arg should be the rule + } + else if (index > 0 && arr[index - 1] === '--rule' && arr[index + 1]) { + acc.rules.push(arg); + } + else if (arg === '--all') { + acc.all = true; + } + else if (arg.startsWith('--')) { + throw new Error(`@rushstack/eslint-bulk: Unknown option: ${arg}`); + } + else { + acc.files.push(arg); + } + return acc; + }, { rules: [], all: false, files: [] }); + if (parsedArgs.files.length === 0) { + throw new Error('@rushstack/eslint-bulk: Files argument is required. Use glob patterns to specify files or use ' + + '`.` to suppress all files for the specified rules.'); + } + if (parsedArgs.rules.length === 0 && !parsedArgs.all) { + throw new Error('@rushstack/eslint-bulk: Please specify at least one rule to suppress. Use --all to suppress all rules.'); + } + // Find the index of the last argument that starts with '--' + const lastOptionIndex = args + .map((arg, i) => (arg.startsWith('--') ? i : -1)) + .reduce((lastIndex, currentIndex) => Math.max(lastIndex, currentIndex), -1); + // Check if options come before files + if (parsedArgs.files.some((file) => args.indexOf(file) < lastOptionIndex)) { + throw new Error('@rushstack/eslint-bulk: Unable to parse command line arguments. All options should come before files argument.'); + } + if (parsedArgs.all) { + process.env[constants_1.ESLINT_BULK_SUPPRESS_ENV_VAR_NAME] = '*'; + } + else if (parsedArgs.rules.length > 0) { + process.env[constants_1.ESLINT_BULK_SUPPRESS_ENV_VAR_NAME] = parsedArgs.rules.join(','); + } + await (0, runEslint_1.runEslintAsync)(parsedArgs.files, 'suppress'); + if (parsedArgs.all) { + console.log(`@rushstack/eslint-bulk: Successfully suppressed all rules for file(s) ${parsedArgs.files}`); + } + else if (parsedArgs.rules.length > 0) { + console.log(`@rushstack/eslint-bulk: Successfully suppressed rules ${parsedArgs.rules} for file(s) ${parsedArgs.files}`); + } +} +//# sourceMappingURL=suppress.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c5c97fc543aab1629411843e109e935e378a60b6 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/suppress.js.map @@ -0,0 +1 @@ +{"version":3,"file":"suppress.js","sourceRoot":"","sources":["../../../src/eslint-bulk-suppressions/cli/suppress.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAY3D,sCAuEC;AAjFD,mDAAuD;AACvD,2CAA6C;AAC7C,4CAAiE;AAQ1D,KAAK,UAAU,aAAa;IACjC,MAAM,IAAI,GAAa,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE7C,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACnD,IAAA,8BAAiB,GAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,+DAA+D;IAC/D,MAAM,UAAU,GAAgB,IAAI,CAAC,MAAM,CAKzC,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACvB,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;YACrB,+CAA+C;QACjD,CAAC;aAAM,IAAI,KAAK,GAAG,CAAC,IAAI,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;YACtE,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtB,CAAC;aAAM,IAAI,GAAG,KAAK,OAAO,EAAE,CAAC;YAC3B,GAAG,CAAC,GAAG,GAAG,IAAI,C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AAC;IAED,IAAI,UAAU,CAAC,GAAG,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,CAAC,6CAAiC,CAAC,GAAG,GAAG,CAAC;IACvD,CAAC;SAAM,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,6CAAiC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,IAAA,0BAAc,EAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAEnD,IAAI,UAAU,CAAC,GAAG,EAAE,CAAC;QACnB,OAAO,CAAC,GAAG,CAAC,yEAAyE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;IAC3G,CAAC;SAAM,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvC,OAAO,CAAC,GAAG,CACT,yDAAyD,UAAU,CAAC,KAAK,gBAAgB,UAAU,CAAC,KAAK,EAAE,CAC5G,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { printSuppressHelp } from './utils/print-help';\nimport { runEslintAsync } from './runEslint';\nimport { ESLINT_BULK_SUPPRESS_ENV_VAR_NAME } from '../constants';\n\ninterface IParsedArgs {\n rules: string[];\n all: boolean;\n files: string[];\n}\n\nexport async function suppressAsync(): Promise {\n const args: string[] = process.argv.slice(3);\n\n if (args.includes('--help') || args.includes('-h')) {\n printSuppressHelp();\n process.exit(0);\n }\n\n // Use reduce to create an object with all the parsed arguments\n const parsedArgs: IParsedArgs = args.reduce<{\n rules: string[];\n all: boolean;\n files: string[];\n }>(\n (acc, arg, index, arr) => {\n if (arg === '--rule') {\n // continue because next arg should be the rule\n } else if (index > 0 && arr[index - 1] === '--rule' && arr[index + 1]) {\n acc.rules.push(arg);\n } else if (arg === '--all') {\n acc.all = true;\n } else if (arg.startsWith('--')) {\n throw new Error(`@rushstack/eslint-bulk: Unknown option: ${arg}`);\n } else {\n acc.files.push(arg);\n }\n return acc;\n },\n { rules: [], all: false, files: [] }\n );\n\n if (parsedArgs.files.length === 0) {\n throw new Error(\n '@rushstack/eslint-bulk: Files argument is required. Use glob patterns to specify files or use ' +\n '`.` to suppress all files for the specified rules.'\n );\n }\n\n if (parsedArgs.rules.length === 0 && !parsedArgs.all) {\n throw new Error(\n '@rushstack/eslint-bulk: Please specify at least one rule to suppress. Use --all to suppress all rules.'\n );\n }\n\n // Find the index of the last argument that starts with '--'\n const lastOptionIndex: number = args\n .map((arg, i) => (arg.startsWith('--') ? i : -1))\n .reduce((lastIndex, currentIndex) => Math.max(lastIndex, currentIndex), -1);\n\n // Check if options come before files\n if (parsedArgs.files.some((file) => args.indexOf(file) < lastOptionIndex)) {\n throw new Error(\n '@rushstack/eslint-bulk: Unable to parse command line arguments. All options should come before files argument.'\n );\n }\n\n if (parsedArgs.all) {\n process.env[ESLINT_BULK_SUPPRESS_ENV_VAR_NAME] = '*';\n } else if (parsedArgs.rules.length > 0) {\n process.env[ESLINT_BULK_SUPPRESS_ENV_VAR_NAME] = parsedArgs.rules.join(',');\n }\n\n await runEslintAsync(parsedArgs.files, 'suppress');\n\n if (parsedArgs.all) {\n console.log(`@rushstack/eslint-bulk: Successfully suppressed all rules for file(s) ${parsedArgs.files}`);\n } else if (parsedArgs.rules.length > 0) {\n console.log(\n `@rushstack/eslint-bulk: Successfully suppressed rules ${parsedArgs.rules} for file(s) ${parsedArgs.files}`\n );\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..481bf94550bafc8bae9e5ff3cd3743abe2900a60 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.d.ts @@ -0,0 +1,2 @@ +export declare function getEslintPathAndVersion(packagePath: string): [string, string]; +//# sourceMappingURL=get-eslint-cli.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..d239891690415cf83a2a7b8c12317955a922c387 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"get-eslint-cli.d.ts","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/get-eslint-cli.ts"],"names":[],"mappings":"AAmBA,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA8C7E"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.js new file mode 100644 index 0000000000000000000000000000000000000000..aca8e1f7632f614890e12ddf4fe167fb5198f295 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.js @@ -0,0 +1,57 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getEslintPathAndVersion = getEslintPathAndVersion; +const path_1 = __importDefault(require("path")); +const constants_1 = require("../../constants"); +// When this list is updated, update the `eslint-bulk-suppressions-newest-test` +// and/or the `eslint-bulk-suppressions-newest-test` projects' eslint dependencies. +const TESTED_VERSIONS = new Set([ + '8.6.0', + '8.7.0', + '8.21.0', + '8.22.0', + '8.23.0', + '8.23.1', + '8.57.0', + '9.25.1' +]); +function getEslintPathAndVersion(packagePath) { + // Try to find a local ESLint installation, the one that should be listed as a dev dependency in package.json + // and installed in node_modules + try { + const localEslintApiPath = require.resolve(constants_1.BULK_SUPPRESSIONS_CLI_ESLINT_PACKAGE_NAME, { + paths: [packagePath] + }); + const localEslintPath = path_1.default.dirname(path_1.default.dirname(localEslintApiPath)); + const { version: localEslintVersion } = require(`${localEslintPath}/package.json`); + if (!TESTED_VERSIONS.has(localEslintVersion)) { + console.warn('@rushstack/eslint-bulk: Be careful, the installed ESLint version has not been tested with eslint-bulk.'); + } + return [localEslintApiPath, localEslintVersion]; + } + catch (e1) { + try { + const { dependencies, devDependencies } = require(`${packagePath}/package.json`); + if (devDependencies === null || devDependencies === void 0 ? void 0 : devDependencies.eslint) { + throw new Error('@rushstack/eslint-bulk: eslint is specified as a dev dependency in package.json, ' + + 'but eslint-bulk cannot find it in node_modules.'); + } + else if (dependencies === null || dependencies === void 0 ? void 0 : dependencies.eslint) { + throw new Error('@rushstack/eslint-bulk: eslint is specified as a dependency in package.json, ' + + 'but eslint-bulk cannot find it in node_modules.'); + } + else { + throw new Error('@rushstack/eslint-bulk: eslint is not specified as a dependency in package.json.'); + } + } + catch (e2) { + throw new Error("@rushstack/eslint-bulk: This command must be run in the same folder as a project's package.json file."); + } + } +} +//# sourceMappingURL=get-eslint-cli.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6313ca5f71d2bb4e43677fcf81fe7ac13a465889 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/get-eslint-cli.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-eslint-cli.js","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/get-eslint-cli.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;AAkB3D,0DA8CC;AA9DD,gDAAwB;AACxB,+CAA4E;AAE5E,+EAA+E;AAC/E,mFAAmF;AACnF,MAAM,eAAe,GAAgB,IAAI,GAAG,CAAC;IAC3C,OAAO;IACP,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;CACT,CAAC,CAAC;AAEH,SAAgB,uBAAuB,CAAC,WAAmB;IACzD,6GAA6G;IAC7G,gCAAgC;IAChC,IAAI,CAAC;QACH,MAAM,kBAAkB,GAAW,OAAO,CAAC,OAAO,CAAC,qDAAyC,EAAE;YAC5F,KAAK,EAAE,CAAC,WAAW,CAAC;SACrB,CAAC,CAAC;QACH,MAAM,eAAe,GAAW,cAAI,CAAC,OAAO,CAAC,cAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC/E,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,GAAG,eAAe,eAAe,CAAC,CAAC;QAEnF,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAC7C,OAAO,CAAC,IAAI,CACV,wGAAwG,CACzG,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;IAClD,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,IAAI,CAAC;YACH,MAAM,EACJ,YAAY,EACZ,eAAe,EAChB,GAGG,OAAO,CAAC,GAAG,WAAW,eAAe,CAAC,CAAC;YAE3C,IAAI,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CACb,mFAAmF;oBACjF,iDAAiD,CACpD,CAAC;YACJ,CAAC;iBAAM,IAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,EAAE,CAAC;gBAChC,MAAM,IAAI,KAAK,CACb,+EAA+E;oBAC7E,iDAAiD,CACpD,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;YACtG,CAAC;QACH,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,uGAAuG,CACxG,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport path from 'path';\nimport { BULK_SUPPRESSIONS_CLI_ESLINT_PACKAGE_NAME } from '../../constants';\n\n// When this list is updated, update the `eslint-bulk-suppressions-newest-test`\n// and/or the `eslint-bulk-suppressions-newest-test` projects' eslint dependencies.\nconst TESTED_VERSIONS: Set = new Set([\n '8.6.0',\n '8.7.0',\n '8.21.0',\n '8.22.0',\n '8.23.0',\n '8.23.1',\n '8.57.0',\n '9.25.1'\n]);\n\nexport function getEslintPathAndVersion(packagePath: string): [string, string] {\n // Try to find a local ESLint installation, the one that should be listed as a dev dependency in package.json\n // and installed in node_modules\n try {\n const localEslintApiPath: string = require.resolve(BULK_SUPPRESSIONS_CLI_ESLINT_PACKAGE_NAME, {\n paths: [packagePath]\n });\n const localEslintPath: string = path.dirname(path.dirname(localEslintApiPath));\n const { version: localEslintVersion } = require(`${localEslintPath}/package.json`);\n\n if (!TESTED_VERSIONS.has(localEslintVersion)) {\n console.warn(\n '@rushstack/eslint-bulk: Be careful, the installed ESLint version has not been tested with eslint-bulk.'\n );\n }\n\n return [localEslintApiPath, localEslintVersion];\n } catch (e1) {\n try {\n const {\n dependencies,\n devDependencies\n }: {\n dependencies: Record | undefined;\n devDependencies: Record | undefined;\n } = require(`${packagePath}/package.json`);\n\n if (devDependencies?.eslint) {\n throw new Error(\n '@rushstack/eslint-bulk: eslint is specified as a dev dependency in package.json, ' +\n 'but eslint-bulk cannot find it in node_modules.'\n );\n } else if (dependencies?.eslint) {\n throw new Error(\n '@rushstack/eslint-bulk: eslint is specified as a dependency in package.json, ' +\n 'but eslint-bulk cannot find it in node_modules.'\n );\n } else {\n throw new Error('@rushstack/eslint-bulk: eslint is not specified as a dependency in package.json.');\n }\n } catch (e2) {\n throw new Error(\n \"@rushstack/eslint-bulk: This command must be run in the same folder as a project's package.json file.\"\n );\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4330324578652430fa02d6fc0f7f51e2243b0a5d --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.d.ts @@ -0,0 +1,2 @@ +export declare function isCorrectCwd(cwd: string): boolean; +//# sourceMappingURL=is-correct-cwd.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e1707ff9bc853b68df79474cf926bc60e5934ae5 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"is-correct-cwd.d.ts","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/is-correct-cwd.ts"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAQjD"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.js new file mode 100644 index 0000000000000000000000000000000000000000..d9a3538d84b49753caa43e9ef762436566e36cb3 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.js @@ -0,0 +1,17 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isCorrectCwd = isCorrectCwd; +const fs_1 = __importDefault(require("fs")); +function isCorrectCwd(cwd) { + return (fs_1.default.existsSync(`${cwd}/eslint.config.js`) || + fs_1.default.existsSync(`${cwd}/eslint.config.cjs`) || + fs_1.default.existsSync(`${cwd}/eslint.config.mjs`) || + fs_1.default.existsSync(`${cwd}/.eslintrc.js`) || + fs_1.default.existsSync(`${cwd}/.eslintrc.cjs`)); +} +//# sourceMappingURL=is-correct-cwd.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.js.map new file mode 100644 index 0000000000000000000000000000000000000000..259a5409c4114d85af23420ed6b584b317779d7a --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/is-correct-cwd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"is-correct-cwd.js","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/is-correct-cwd.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;AAI3D,oCAQC;AAVD,4CAAoB;AAEpB,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,CACL,YAAE,CAAC,UAAU,CAAC,GAAG,GAAG,mBAAmB,CAAC;QACxC,YAAE,CAAC,UAAU,CAAC,GAAG,GAAG,oBAAoB,CAAC;QACzC,YAAE,CAAC,UAAU,CAAC,GAAG,GAAG,oBAAoB,CAAC;QACzC,YAAE,CAAC,UAAU,CAAC,GAAG,GAAG,eAAe,CAAC;QACpC,YAAE,CAAC,UAAU,CAAC,GAAG,GAAG,gBAAgB,CAAC,CACtC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport fs from 'fs';\n\nexport function isCorrectCwd(cwd: string): boolean {\n return (\n fs.existsSync(`${cwd}/eslint.config.js`) ||\n fs.existsSync(`${cwd}/eslint.config.cjs`) ||\n fs.existsSync(`${cwd}/eslint.config.mjs`) ||\n fs.existsSync(`${cwd}/.eslintrc.js`) ||\n fs.existsSync(`${cwd}/.eslintrc.cjs`)\n );\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b123b60fff52659f9911a639d390bea09810072b --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.d.ts @@ -0,0 +1,4 @@ +export declare function printPruneHelp(): void; +export declare function printHelp(): void; +export declare function printSuppressHelp(): void; +//# sourceMappingURL=print-help.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b8f6c9e71fbc6dac402e2d2f287646ea5f7d14da --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"print-help.d.ts","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/print-help.ts"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,IAAI,IAAI,CAarC;AAED,wBAAgB,SAAS,IAAI,IAAI,CA8BhC;AAED,wBAAgB,iBAAiB,IAAI,IAAI,CA6BxC"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.js new file mode 100644 index 0000000000000000000000000000000000000000..20bd8d5bf503c58cb4a4ed504e4bde8aa61258fa --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.js @@ -0,0 +1,81 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.printPruneHelp = printPruneHelp; +exports.printHelp = printHelp; +exports.printSuppressHelp = printSuppressHelp; +const wrap_words_to_lines_1 = require("./wrap-words-to-lines"); +function printPruneHelp() { + const help = `eslint-bulk prune + +Usage: + +eslint-bulk prune + +This command is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to delete all unused suppression entries in all .eslint-bulk-suppressions.json files under the current working directory.`; + const wrapped = (0, wrap_words_to_lines_1.wrapWordsToLines)(help); + for (const line of wrapped) { + console.log(line); + } +} +function printHelp() { + const help = `eslint-bulk + +Usage: + +eslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...] +eslint-bulk suppress --all PATH1 [PATH2...] +eslint-bulk suppress --help + +eslint-bulk prune +eslint-bulk prune --help + +eslint-bulk --help + +This command line tool is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to suppress or prune unused suppressions in the local .eslint-bulk-suppressions.json file. + +Commands: + eslint-bulk suppress [options] + Use this command to generate a new .eslint-bulk-suppressions.json file or add suppression entries to the existing file. Specify the files and rules you want to suppress. + Please run "eslint-bulk suppress --help" to learn more. + + eslint-bulk prune + Use this command to delete all unused suppression entries in all .eslint-bulk-suppressions.json files under the current working directory. + Please run "eslint-bulk prune --help" to learn more. +`; + const wrapped = (0, wrap_words_to_lines_1.wrapWordsToLines)(help); + for (const line of wrapped) { + console.log(line); + } +} +function printSuppressHelp() { + const help = `eslint-bulk suppress [options] + +Usage: + +eslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...] +eslint-bulk suppress --all PATH1 [PATH2...] +eslint-bulk suppress --help + +This command is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to either generate a new .eslint-bulk-suppressions.json file or add suppression entries to the existing file. Specify the files and rules you want to suppress. + +Argument: + + Glob patterns for paths to suppress, same as eslint files argument. Should be relative to the project root. + +Options: + -h, -H, --help + Display this help message. + + -R, --rule + The full name of the ESLint rule you want to bulk-suppress. Specify multiple rules with --rule NAME1 --rule RULENAME2. + + -A, --all + Bulk-suppress all rules in the specified file patterns.`; + const wrapped = (0, wrap_words_to_lines_1.wrapWordsToLines)(help); + for (const line of wrapped) { + console.log(line); + } +} +//# sourceMappingURL=print-help.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f23e1224dda82c9d4cea1d93ba5d9acda53aa17b --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/print-help.js.map @@ -0,0 +1 @@ +{"version":3,"file":"print-help.js","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/print-help.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAI3D,wCAaC;AAED,8BA8BC;AAED,8CA6BC;AA9ED,+DAAyD;AAEzD,SAAgB,cAAc;IAC5B,MAAM,IAAI,GAAW;;;;;;sNAM+L,CAAC;IAErN,MAAM,OAAO,GAAa,IAAA,sCAAgB,EAAC,IAAI,CAAC,CAAC;IACjD,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AAED,SAAgB,SAAS;IACvB,MAAM,IAAI,GAAW;;;;;;;;;;;;;;;;;;;;;;;CAuBtB,CAAC;IAEA,MAAM,OAAO,GAAa,IAAA,sCAAgB,EAAC,IAAI,CAAC,CAAC;IACjD,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AAED,SAAgB,iBAAiB;IAC/B,MAAM,IAAI,GAAW;;;;;;;;;;;;;;;;;;;;;;4DAsBqC,CAAC;IAE3D,MAAM,OAAO,GAAa,IAAA,sCAAgB,EAAC,IAAI,CAAC,CAAC;IACjD,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { wrapWordsToLines } from './wrap-words-to-lines';\n\nexport function printPruneHelp(): void {\n const help: string = `eslint-bulk prune\n\nUsage:\n\neslint-bulk prune\n\nThis command is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to delete all unused suppression entries in all .eslint-bulk-suppressions.json files under the current working directory.`;\n\n const wrapped: string[] = wrapWordsToLines(help);\n for (const line of wrapped) {\n console.log(line);\n }\n}\n\nexport function printHelp(): void {\n const help: string = `eslint-bulk \n\nUsage:\n\neslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]\neslint-bulk suppress --all PATH1 [PATH2...]\neslint-bulk suppress --help\n\neslint-bulk prune\neslint-bulk prune --help\n\neslint-bulk --help\n\nThis command line tool is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to suppress or prune unused suppressions in the local .eslint-bulk-suppressions.json file.\n\nCommands:\n eslint-bulk suppress [options] \n Use this command to generate a new .eslint-bulk-suppressions.json file or add suppression entries to the existing file. Specify the files and rules you want to suppress.\n Please run \"eslint-bulk suppress --help\" to learn more.\n\n eslint-bulk prune\n Use this command to delete all unused suppression entries in all .eslint-bulk-suppressions.json files under the current working directory.\n Please run \"eslint-bulk prune --help\" to learn more.\n`;\n\n const wrapped: string[] = wrapWordsToLines(help);\n for (const line of wrapped) {\n console.log(line);\n }\n}\n\nexport function printSuppressHelp(): void {\n const help: string = `eslint-bulk suppress [options] \n\nUsage:\n\neslint-bulk suppress --rule RULENAME1 [--rule RULENAME2...] PATH1 [PATH2...]\neslint-bulk suppress --all PATH1 [PATH2...]\neslint-bulk suppress --help\n\nThis command is a thin wrapper around ESLint that communicates with @rushstack/eslint-patch to either generate a new .eslint-bulk-suppressions.json file or add suppression entries to the existing file. Specify the files and rules you want to suppress.\n\nArgument:\n \n Glob patterns for paths to suppress, same as eslint files argument. Should be relative to the project root.\n\nOptions:\n -h, -H, --help\n Display this help message.\n\n -R, --rule\n The full name of the ESLint rule you want to bulk-suppress. Specify multiple rules with --rule NAME1 --rule RULENAME2.\n\n -A, --all\n Bulk-suppress all rules in the specified file patterns.`;\n\n const wrapped: string[] = wrapWordsToLines(help);\n for (const line of wrapped) {\n console.log(line);\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..250f852d00e69b88b598e90f540bdfdf9b9d2a53 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.d.ts @@ -0,0 +1,26 @@ +/** + * Applies word wrapping and returns an array of lines. + * + * @param text - The text to wrap + * @param maxLineLength - The maximum length of a line, defaults to the console width + * @param indent - The number of spaces to indent the wrapped lines, defaults to 0 + */ +export declare function wrapWordsToLines(text: string, maxLineLength?: number, indent?: number): string[]; +/** + * Applies word wrapping and returns an array of lines. + * + * @param text - The text to wrap + * @param maxLineLength - The maximum length of a line, defaults to the console width + * @param linePrefix - The string to prefix each line with, defaults to '' + */ +export declare function wrapWordsToLines(text: string, maxLineLength?: number, linePrefix?: string): string[]; +/** + * Applies word wrapping and returns an array of lines. + * + * @param text - The text to wrap + * @param maxLineLength - The maximum length of a line, defaults to the console width + * @param indentOrLinePrefix - The number of spaces to indent the wrapped lines or the string to prefix + * each line with, defaults to no prefix + */ +export declare function wrapWordsToLines(text: string, maxLineLength?: number, indentOrLinePrefix?: number | string): string[]; +//# sourceMappingURL=wrap-words-to-lines.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..a27c2ebcb3e1d24a5381cd1927574d38e00d6b8f --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"wrap-words-to-lines.d.ts","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.ts"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;AAClG;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;AACtG;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,aAAa,CAAC,EAAE,MAAM,EACtB,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,GACnC,MAAM,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.js new file mode 100644 index 0000000000000000000000000000000000000000..0ae86227783aff1bd8545f5fdf85c8929aa90d49 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.js @@ -0,0 +1,68 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.wrapWordsToLines = wrapWordsToLines; +function wrapWordsToLines(text, maxLineLength, indentOrLinePrefix) { + var _a; + let linePrefix; + switch (typeof indentOrLinePrefix) { + case 'number': + linePrefix = ' '.repeat(indentOrLinePrefix); + break; + case 'string': + linePrefix = indentOrLinePrefix; + break; + default: + linePrefix = ''; + break; + } + const linePrefixLength = linePrefix.length; + if (!maxLineLength) { + maxLineLength = process.stdout.getWindowSize()[0]; + } + // Apply word wrapping and the provided line prefix, while also respecting existing newlines + // and prefix spaces that may exist in the text string already. + const lines = text.split(/\r?\n/); + const wrappedLines = []; + for (const line of lines) { + if (line.length + linePrefixLength <= maxLineLength) { + wrappedLines.push(linePrefix + line); + } + else { + const lineAdditionalPrefix = ((_a = line.match(/^\s*/)) === null || _a === void 0 ? void 0 : _a[0]) || ''; + const whitespaceRegexp = /\s+/g; + let currentWhitespaceMatch = null; + let previousWhitespaceMatch; + let currentLineStartIndex = lineAdditionalPrefix.length; + let previousBreakRanOver = false; + while ((currentWhitespaceMatch = whitespaceRegexp.exec(line)) !== null) { + if (currentWhitespaceMatch.index + linePrefixLength - currentLineStartIndex > maxLineLength) { + let whitespaceToSplitAt; + if (!previousWhitespaceMatch || + // Handle the case where there are two words longer than the maxLineLength in a row + previousBreakRanOver) { + whitespaceToSplitAt = currentWhitespaceMatch; + } + else { + whitespaceToSplitAt = previousWhitespaceMatch; + } + wrappedLines.push(linePrefix + + lineAdditionalPrefix + + line.substring(currentLineStartIndex, whitespaceToSplitAt.index)); + previousBreakRanOver = whitespaceToSplitAt.index - currentLineStartIndex > maxLineLength; + currentLineStartIndex = whitespaceToSplitAt.index + whitespaceToSplitAt[0].length; + } + else { + previousBreakRanOver = false; + } + previousWhitespaceMatch = currentWhitespaceMatch; + } + if (currentLineStartIndex < line.length) { + wrappedLines.push(linePrefix + lineAdditionalPrefix + line.substring(currentLineStartIndex)); + } + } + } + return wrappedLines; +} +//# sourceMappingURL=wrap-words-to-lines.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4e63c4b5ca59d865f0e650882a5991dee049462b --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wrap-words-to-lines.js","sourceRoot":"","sources":["../../../../src/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAuC3D,4CAyEC;AAzED,SAAgB,gBAAgB,CAC9B,IAAY,EACZ,aAAsB,EACtB,kBAAoC;;IAEpC,IAAI,UAAkB,CAAC;IACvB,QAAQ,OAAO,kBAAkB,EAAE,CAAC;QAClC,KAAK,QAAQ;YACX,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;YAC5C,MAAM;QACR,KAAK,QAAQ;YACX,UAAU,GAAG,kBAAkB,CAAC;YAChC,MAAM;QACR;YACE,UAAU,GAAG,EAAE,CAAC;YAChB,MAAM;IACV,CAAC;IAED,MAAM,gBAAgB,GAAW,UAAU,CAAC,MAAM,CAAC;IAEnD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,4FAA4F;IAC5F,+DAA+D;IAC/D,MAAM,KAAK,GAAa,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,MAAM,GAAG,gBAAgB,IAAI,aA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AAI,qBAAqB,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;gBACxC,YAAY,CAAC,IAAI,CAAC,UAAU,GAAG,oBAAoB,GAAG,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC;YAC/F,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// ----------------------------------------------------------------------------------------------------------\n// TO AVOID EXTRA DEPENDENCIES, THE CODE IN THIS FILE WAS BORROWED FROM:\n//\n// rushstack/libraries/terminal/src/PrintUtilities.ts\n//\n// KEEP IT IN SYNC WITH THAT FILE.\n// ----------------------------------------------------------------------------------------------------------\n\n/**\n * Applies word wrapping and returns an array of lines.\n *\n * @param text - The text to wrap\n * @param maxLineLength - The maximum length of a line, defaults to the console width\n * @param indent - The number of spaces to indent the wrapped lines, defaults to 0\n */\nexport function wrapWordsToLines(text: string, maxLineLength?: number, indent?: number): string[];\n/**\n * Applies word wrapping and returns an array of lines.\n *\n * @param text - The text to wrap\n * @param maxLineLength - The maximum length of a line, defaults to the console width\n * @param linePrefix - The string to prefix each line with, defaults to ''\n */\nexport function wrapWordsToLines(text: string, maxLineLength?: number, linePrefix?: string): string[];\n/**\n * Applies word wrapping and returns an array of lines.\n *\n * @param text - The text to wrap\n * @param maxLineLength - The maximum length of a line, defaults to the console width\n * @param indentOrLinePrefix - The number of spaces to indent the wrapped lines or the string to prefix\n * each line with, defaults to no prefix\n */\nexport function wrapWordsToLines(\n text: string,\n maxLineLength?: number,\n indentOrLinePrefix?: number | string\n): string[];\nexport function wrapWordsToLines(\n text: string,\n maxLineLength?: number,\n indentOrLinePrefix?: number | string\n): string[] {\n let linePrefix: string;\n switch (typeof indentOrLinePrefix) {\n case 'number':\n linePrefix = ' '.repeat(indentOrLinePrefix);\n break;\n case 'string':\n linePrefix = indentOrLinePrefix;\n break;\n default:\n linePrefix = '';\n break;\n }\n\n const linePrefixLength: number = linePrefix.length;\n\n if (!maxLineLength) {\n maxLineLength = process.stdout.getWindowSize()[0];\n }\n\n // Apply word wrapping and the provided line prefix, while also respecting existing newlines\n // and prefix spaces that may exist in the text string already.\n const lines: string[] = text.split(/\\r?\\n/);\n\n const wrappedLines: string[] = [];\n for (const line of lines) {\n if (line.length + linePrefixLength <= maxLineLength) {\n wrappedLines.push(linePrefix + line);\n } else {\n const lineAdditionalPrefix: string = line.match(/^\\s*/)?.[0] || '';\n const whitespaceRegexp: RegExp = /\\s+/g;\n let currentWhitespaceMatch: RegExpExecArray | null = null;\n let previousWhitespaceMatch: RegExpExecArray | undefined;\n let currentLineStartIndex: number = lineAdditionalPrefix.length;\n let previousBreakRanOver: boolean = false;\n while ((currentWhitespaceMatch = whitespaceRegexp.exec(line)) !== null) {\n if (currentWhitespaceMatch.index + linePrefixLength - currentLineStartIndex > maxLineLength) {\n let whitespaceToSplitAt: RegExpExecArray | undefined;\n if (\n !previousWhitespaceMatch ||\n // Handle the case where there are two words longer than the maxLineLength in a row\n previousBreakRanOver\n ) {\n whitespaceToSplitAt = currentWhitespaceMatch;\n } else {\n whitespaceToSplitAt = previousWhitespaceMatch;\n }\n\n wrappedLines.push(\n linePrefix +\n lineAdditionalPrefix +\n line.substring(currentLineStartIndex, whitespaceToSplitAt.index)\n );\n previousBreakRanOver = whitespaceToSplitAt.index - currentLineStartIndex > maxLineLength;\n currentLineStartIndex = whitespaceToSplitAt.index + whitespaceToSplitAt[0].length;\n } else {\n previousBreakRanOver = false;\n }\n\n previousWhitespaceMatch = currentWhitespaceMatch;\n }\n\n if (currentLineStartIndex < line.length) {\n wrappedLines.push(linePrefix + lineAdditionalPrefix + line.substring(currentLineStartIndex));\n }\n }\n }\n\n return wrappedLines;\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ef3bf8e1e22bc0cf97b6c3695d05da01dfc00c58 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.d.ts @@ -0,0 +1,10 @@ +export declare const ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME: 'RUSHSTACK_ESLINT_BULK_PATCH_PATH'; +export declare const ESLINT_BULK_SUPPRESS_ENV_VAR_NAME: 'RUSHSTACK_ESLINT_BULK_SUPPRESS'; +export declare const ESLINT_BULK_ENABLE_ENV_VAR_NAME: 'ESLINT_BULK_ENABLE'; +export declare const ESLINT_BULK_PRUNE_ENV_VAR_NAME: 'ESLINT_BULK_PRUNE'; +export declare const ESLINT_BULK_DETECT_ENV_VAR_NAME: '_RUSHSTACK_ESLINT_BULK_DETECT'; +export declare const ESLINT_BULK_FORCE_REGENERATE_PATCH_ENV_VAR_NAME: 'RUSHSTACK_ESLINT_BULK_FORCE_REGENERATE_PATCH'; +export declare const VSCODE_PID_ENV_VAR_NAME: 'VSCODE_PID'; +export declare const ESLINT_PACKAGE_NAME_ENV_VAR_NAME: '_RUSHSTACK_ESLINT_PACKAGE_NAME'; +export declare const BULK_SUPPRESSIONS_CLI_ESLINT_PACKAGE_NAME: string; +//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..073b00eacc77f1a89f281e4f4c1adfb2614e607c --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mCAAmC,EAAE,kCACd,CAAC;AACrC,eAAO,MAAM,iCAAiC,EAAE,gCACd,CAAC;AACnC,eAAO,MAAM,+BAA+B,EAAE,oBAA2C,CAAC;AAC1F,eAAO,MAAM,8BAA8B,EAAE,mBAAyC,CAAC;AACvF,eAAO,MAAM,+BAA+B,EAAE,+BACb,CAAC;AAClC,eAAO,MAAM,+CAA+C,EAAE,8CACd,CAAC;AACjD,eAAO,MAAM,uBAAuB,EAAE,YAA2B,CAAC;AAElE,eAAO,MAAM,gCAAgC,EAAE,gCACb,CAAC;AAEnC,eAAO,MAAM,yCAAyC,EAAE,MACG,CAAC"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.js new file mode 100644 index 0000000000000000000000000000000000000000..745b5e2d9ef346cdf5376c02394bb888febcb9d9 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.js @@ -0,0 +1,16 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BULK_SUPPRESSIONS_CLI_ESLINT_PACKAGE_NAME = exports.ESLINT_PACKAGE_NAME_ENV_VAR_NAME = exports.VSCODE_PID_ENV_VAR_NAME = exports.ESLINT_BULK_FORCE_REGENERATE_PATCH_ENV_VAR_NAME = exports.ESLINT_BULK_DETECT_ENV_VAR_NAME = exports.ESLINT_BULK_PRUNE_ENV_VAR_NAME = exports.ESLINT_BULK_ENABLE_ENV_VAR_NAME = exports.ESLINT_BULK_SUPPRESS_ENV_VAR_NAME = exports.ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME = void 0; +exports.ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME = 'RUSHSTACK_ESLINT_BULK_PATCH_PATH'; +exports.ESLINT_BULK_SUPPRESS_ENV_VAR_NAME = 'RUSHSTACK_ESLINT_BULK_SUPPRESS'; +exports.ESLINT_BULK_ENABLE_ENV_VAR_NAME = 'ESLINT_BULK_ENABLE'; +exports.ESLINT_BULK_PRUNE_ENV_VAR_NAME = 'ESLINT_BULK_PRUNE'; +exports.ESLINT_BULK_DETECT_ENV_VAR_NAME = '_RUSHSTACK_ESLINT_BULK_DETECT'; +exports.ESLINT_BULK_FORCE_REGENERATE_PATCH_ENV_VAR_NAME = 'RUSHSTACK_ESLINT_BULK_FORCE_REGENERATE_PATCH'; +exports.VSCODE_PID_ENV_VAR_NAME = 'VSCODE_PID'; +exports.ESLINT_PACKAGE_NAME_ENV_VAR_NAME = '_RUSHSTACK_ESLINT_PACKAGE_NAME'; +exports.BULK_SUPPRESSIONS_CLI_ESLINT_PACKAGE_NAME = (_a = process.env[exports.ESLINT_PACKAGE_NAME_ENV_VAR_NAME]) !== null && _a !== void 0 ? _a : 'eslint'; +//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.js.map new file mode 100644 index 0000000000000000000000000000000000000000..370668d511bccf597f5861099a31132bd60c97f7 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/constants.js.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/constants.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;AAE9C,QAAA,mCAAmC,GAC9C,kCAAkC,CAAC;AACxB,QAAA,iCAAiC,GAC5C,gCAAgC,CAAC;AACtB,QAAA,+BAA+B,GAAyB,oBAAoB,CAAC;AAC7E,QAAA,8BAA8B,GAAwB,mBAAmB,CAAC;AAC1E,QAAA,+BAA+B,GAC1C,+BAA+B,CAAC;AACrB,QAAA,+CAA+C,GAC1D,8CAA8C,CAAC;AACpC,QAAA,uBAAuB,GAAiB,YAAY,CAAC;AAErD,QAAA,gCAAgC,GAC3C,gCAAgC,CAAC;AAEtB,QAAA,yCAAyC,GACpD,MAAA,OAAO,CAAC,GAAG,CAAC,wCAAgC,CAAC,mCAAI,QAAQ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nexport const ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME: 'RUSHSTACK_ESLINT_BULK_PATCH_PATH' =\n 'RUSHSTACK_ESLINT_BULK_PATCH_PATH';\nexport const ESLINT_BULK_SUPPRESS_ENV_VAR_NAME: 'RUSHSTACK_ESLINT_BULK_SUPPRESS' =\n 'RUSHSTACK_ESLINT_BULK_SUPPRESS';\nexport const ESLINT_BULK_ENABLE_ENV_VAR_NAME: 'ESLINT_BULK_ENABLE' = 'ESLINT_BULK_ENABLE';\nexport const ESLINT_BULK_PRUNE_ENV_VAR_NAME: 'ESLINT_BULK_PRUNE' = 'ESLINT_BULK_PRUNE';\nexport const ESLINT_BULK_DETECT_ENV_VAR_NAME: '_RUSHSTACK_ESLINT_BULK_DETECT' =\n '_RUSHSTACK_ESLINT_BULK_DETECT';\nexport const ESLINT_BULK_FORCE_REGENERATE_PATCH_ENV_VAR_NAME: 'RUSHSTACK_ESLINT_BULK_FORCE_REGENERATE_PATCH' =\n 'RUSHSTACK_ESLINT_BULK_FORCE_REGENERATE_PATCH';\nexport const VSCODE_PID_ENV_VAR_NAME: 'VSCODE_PID' = 'VSCODE_PID';\n\nexport const ESLINT_PACKAGE_NAME_ENV_VAR_NAME: '_RUSHSTACK_ESLINT_PACKAGE_NAME' =\n '_RUSHSTACK_ESLINT_PACKAGE_NAME';\n\nexport const BULK_SUPPRESSIONS_CLI_ESLINT_PACKAGE_NAME: string =\n process.env[ESLINT_PACKAGE_NAME_ENV_VAR_NAME] ?? 'eslint';\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e19125d72d4ed19f760999a21131429ea243d1e1 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.d.ts @@ -0,0 +1,7 @@ +/** + * Dynamically generate file to properly patch many versions of ESLint + * @param inputFilePath - Must be an iteration of https://github.com/eslint/eslint/blob/main/lib/linter/linter.js + * @param outputFilePath - Some small changes to linter.js + */ +export declare function generatePatchedLinterJsFileIfDoesNotExist(inputFilePath: string, outputFilePath: string, eslintPackageVersion: string): void; +//# sourceMappingURL=generate-patched-file.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..72e0ab830082cfa34d9d339e18334f5240c53acb --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"generate-patched-file.d.ts","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/generate-patched-file.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,wBAAgB,yCAAyC,CACvD,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,oBAAoB,EAAE,MAAM,GAC3B,IAAI,CAkTN"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.js new file mode 100644 index 0000000000000000000000000000000000000000..4deee548443ef38584f68156651d157e7b612ce4 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.js @@ -0,0 +1,283 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generatePatchedLinterJsFileIfDoesNotExist = generatePatchedLinterJsFileIfDoesNotExist; +const fs_1 = __importDefault(require("fs")); +const constants_1 = require("./constants"); +/** + * Dynamically generate file to properly patch many versions of ESLint + * @param inputFilePath - Must be an iteration of https://github.com/eslint/eslint/blob/main/lib/linter/linter.js + * @param outputFilePath - Some small changes to linter.js + */ +function generatePatchedLinterJsFileIfDoesNotExist(inputFilePath, outputFilePath, eslintPackageVersion) { + const generateEnvVarValue = process.env[constants_1.ESLINT_BULK_FORCE_REGENERATE_PATCH_ENV_VAR_NAME]; + if (generateEnvVarValue !== 'true' && generateEnvVarValue !== '1' && fs_1.default.existsSync(outputFilePath)) { + return; + } + const majorVersion = parseInt(eslintPackageVersion, 10); + const inputFile = fs_1.default.readFileSync(inputFilePath).toString(); + let inputIndex = 0; + /** + * Extract from the stream until marker is reached. When matching marker, + * ignore whitespace in the stream and in the marker. Return the extracted text. + */ + function scanUntilMarker(marker) { + const trimmedMarker = marker.replace(/\s/g, ''); + let output = ''; + let trimmed = ''; + while (inputIndex < inputFile.length) { + const char = inputFile[inputIndex++]; + output += char; + if (!/^\s$/.test(char)) { + trimmed += char; + } + if (trimmed.endsWith(trimmedMarker)) { + return output; + } + } + throw new Error('Unexpected end of input while looking for ' + JSON.stringify(marker)); + } + function scanUntilNewline() { + let output = ''; + while (inputIndex < inputFile.length) { + const char = inputFile[inputIndex++]; + output += char; + if (char === '\n') { + return output; + } + } + throw new Error('Unexpected end of input while looking for new line'); + } + function scanUntilEnd() { + const output = inputFile.substring(inputIndex); + inputIndex = inputFile.length; + return output; + } + const markerForStartOfClassMethodSpaces = '\n */\n '; + const markerForStartOfClassMethodTabs = '\n\t */\n\t'; + function indexOfStartOfClassMethod(input, position) { + let startOfClassMethodIndex = input.indexOf(markerForStartOfClassMethodSpaces, position); + if (startOfClassMethodIndex === -1) { + startOfClassMethodIndex = input.indexOf(markerForStartOfClassMethodTabs, position); + if (startOfClassMethodIndex === -1) { + return { index: startOfClassMethodIndex }; + } + return { index: startOfClassMethodIndex, marker: markerForStartOfClassMethodTabs }; + } + return { index: startOfClassMethodIndex, marker: markerForStartOfClassMethodSpaces }; + } + /** + * Returns index of next public method + * @param fromIndex - index of inputFile to search if public method still exists + * @returns -1 if public method does not exist or index of next public method + */ + function getIndexOfNextMethod(fromIndex) { + const rest = inputFile.substring(fromIndex); + const endOfClassIndex = rest.indexOf('\n}'); + const { index: startOfClassMethodIndex, marker: startOfClassMethodMarker } = indexOfStartOfClassMethod(rest); + if (startOfClassMethodIndex === -1 || + !startOfClassMethodMarker || + startOfClassMethodIndex > endOfClassIndex) { + return { index: -1 }; + } + const afterMarkerIndex = startOfClassMethodIndex + startOfClassMethodMarker.length; + const isPublicMethod = rest[afterMarkerIndex] !== '_' && + rest[afterMarkerIndex] !== '#' && + !rest.substring(afterMarkerIndex, rest.indexOf('\n', afterMarkerIndex)).includes('static') && + !rest.substring(afterMarkerIndex, rest.indexOf('\n', afterMarkerIndex)).includes('constructor'); + return { index: fromIndex + afterMarkerIndex, isPublic: isPublicMethod }; + } + function scanUntilIndex(indexToScanTo) { + const output = inputFile.substring(inputIndex, indexToScanTo); + inputIndex = indexToScanTo; + return output; + } + let outputFile = ''; + // Match this: + // //------------------------------------------------------------------------------ + // // Requirements + // //------------------------------------------------------------------------------ + outputFile += scanUntilMarker('// Requirements'); + outputFile += scanUntilMarker('//--'); + outputFile += scanUntilNewline(); + outputFile += ` +// --- BEGIN MONKEY PATCH --- +const bulkSuppressionsPatch = require(process.env.${constants_1.ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME}); +const requireFromPathToLinterJS = bulkSuppressionsPatch.requireFromPathToLinterJS; +`; + // Match this: + // //------------------------------------------------------------------------------ + // // Typedefs + // //------------------------------------------------------------------------------ + const requireSection = scanUntilMarker('// Typedefs'); + // Match something like this: + // + // const path = require('path'), + // eslintScope = require('eslint-scope'), + // evk = require('eslint-visitor-keys'), + // + // Convert to something like this: + // + // const path = require('path'), + // eslintScope = requireFromPathToLinterJS('eslint-scope'), + // evk = requireFromPathToLinterJS('eslint-visitor-keys'), + // + outputFile += requireSection.replace(/require\s*\((?:'([^']+)'|"([^"]+)")\)/g, (match, p1, p2) => { + var _a; + const importPath = (_a = p1 !== null && p1 !== void 0 ? p1 : p2) !== null && _a !== void 0 ? _a : ''; + if (importPath !== 'path') { + if (p1) { + return `requireFromPathToLinterJS('${p1}')`; + } + if (p2) { + return `requireFromPathToLinterJS("${p2}")`; + } + } + // Keep as-is + return match; + }); + outputFile += `--- END MONKEY PATCH --- +`; + if (majorVersion >= 9) { + outputFile += scanUntilMarker('const emitter = createEmitter();'); + outputFile += ` + // --- BEGIN MONKEY PATCH --- + let currentNode = undefined; + // --- END MONKEY PATCH ---`; + } + // Match this: + // ``` + // if (reportTranslator === null) { + // reportTranslator = createReportTranslator({ + // ruleId, + // severity, + // sourceCode, + // messageIds, + // disableFixes + // }); + // } + // const problem = reportTranslator(...args); + // + // if (problem.fix && !(rule.meta && rule.meta.fixable)) { + // throw new Error("Fixable rules must set the `meta.fixable` property to \"code\" or \"whitespace\"."); + // } + // ``` + // + // Convert to something like this: + // ``` + // if (reportTranslator === null) { + // reportTranslator = createReportTranslator({ + // ruleId, + // severity, + // sourceCode, + // messageIds, + // disableFixes + // }); + // } + // const problem = reportTranslator(...args); + // // --- BEGIN MONKEY PATCH --- + // if (bulkSuppressionsPatch.shouldBulkSuppress({ filename, currentNode: args[0]?.node ?? currentNode, ruleId, problem })) return; + // // --- END MONKEY PATCH --- + // + // if (problem.fix && !(rule.meta && rule.meta.fixable)) { + // throw new Error("Fixable rules must set the `meta.fixable` property to \"code\" or \"whitespace\"."); + // } + // ``` + outputFile += scanUntilMarker('const problem = reportTranslator(...args);'); + outputFile += ` + // --- BEGIN MONKEY PATCH --- + if (bulkSuppressionsPatch.shouldBulkSuppress({ filename, currentNode: args[0]?.node ?? currentNode, ruleId, problem })) return; + // --- END MONKEY PATCH ---`; + // + // Match this: + // ``` + // Object.keys(ruleListeners).forEach(selector => { + // ... + // }); + // ``` + // + // Convert to something like this: + // ``` + // Object.keys(ruleListeners).forEach(selector => { + // // --- BEGIN MONKEY PATCH --- + // emitter.on(selector, (...args) => { currentNode = args[args.length - 1]; }); + // // --- END MONKEY PATCH --- + // ... + // }); + // ``` + if (majorVersion >= 9) { + outputFile += scanUntilMarker('Object.keys(ruleListeners).forEach(selector => {'); + outputFile += ` + // --- BEGIN MONKEY PATCH --- + emitter.on(selector, (...args) => { currentNode = args[args.length - 1]; }); + // --- END MONKEY PATCH ---`; + } + outputFile += scanUntilMarker('class Linter {'); + outputFile += scanUntilNewline(); + outputFile += ` + // --- BEGIN MONKEY PATCH --- + /** + * We intercept ESLint execution at the .eslintrc.js file, but unfortunately the Linter class is + * initialized before the .eslintrc.js file is executed. This means the internalSlotsMap that all + * the patched methods refer to is not initialized. This method checks if the internalSlotsMap is + * initialized, and if not, initializes it. + */ + _conditionallyReinitialize({ cwd, configType } = {}) { + if (internalSlotsMap.get(this) === undefined) { + internalSlotsMap.set(this, { + cwd: normalizeCwd(cwd), + lastConfigArray: null, + lastSourceCode: null, + lastSuppressedMessages: [], + configType, // TODO: Remove after flat config conversion + parserMap: new Map([['espree', espree]]), + ruleMap: new Rules() + }); + + this.version = pkg.version; + } + } + // --- END MONKEY PATCH --- +`; + const privateMethodNames = []; + let { index: indexOfNextMethod, isPublic } = getIndexOfNextMethod(inputIndex); + while (indexOfNextMethod !== -1) { + outputFile += scanUntilIndex(indexOfNextMethod); + if (isPublic) { + // Inject the monkey patch at the start of the public method + outputFile += scanUntilNewline(); + outputFile += ` // --- BEGIN MONKEY PATCH --- + this._conditionallyReinitialize(); + // --- END MONKEY PATCH --- +`; + } + else if (inputFile[inputIndex] === '#') { + // Replace the '#' private method with a '_' private method, so that our monkey patch + // can still call it. Otherwise, we get the following error during execution: + // TypeError: Receiver must be an instance of class Linter + const privateMethodName = scanUntilMarker('('); + // Remove the '(' at the end and stash it, since we need to escape it for the regex later + privateMethodNames.push(privateMethodName.slice(0, -1)); + outputFile += `_${privateMethodName.slice(1)}`; + } + const indexResult = getIndexOfNextMethod(inputIndex); + indexOfNextMethod = indexResult.index; + isPublic = indexResult.isPublic; + } + outputFile += scanUntilEnd(); + // Do a second pass to find and replace all calls to private methods with the patched versions. + if (privateMethodNames.length) { + // eslint-disable-next-line @rushstack/security/no-unsafe-regexp + const privateMethodCallRegex = new RegExp(`\.(${privateMethodNames.join('|')})\\(`, 'g'); + outputFile = outputFile.replace(privateMethodCallRegex, (match, privateMethodName) => { + // Replace the leading '#' with a leading '_' + return `._${privateMethodName.slice(1)}(`; + }); + } + fs_1.default.writeFileSync(outputFilePath, outputFile); +} +//# sourceMappingURL=generate-patched-file.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4a71e193ae5211bff1e5320d4542804d54053efb --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/generate-patched-file.js.map @@ -0,0 +1 @@ +{"version":3,"file":"generate-patched-file.js","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/generate-patched-file.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;AAa3D,8FAsTC;AAjUD,4CAAoB;AACpB,2CAGqB;AAErB;;;;GAIG;AACH,SAAgB,yCAAyC,CACvD,aAAqB,EACrB,cAAsB,EACtB,oBAA4B;IAE5B,MAAM,mBAAmB,GACvB,OAAO,CAAC,GAAG,CAAC,2DAA+C,CAAC,CAAC;IAC/D,IAAI,mBAAmB,KAAK,MAAM,IAAI,mBAAmB,KAAK,GAAG,IAAI,YAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;QACnG,OAAO;IACT,CAAC;IAED,MAAM,YAAY,GAAW,QAAQ,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;IAEhE,MAAM,SAAS,GAAW,YAAE,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE,CAAC;IAEpE,IAAI,UAAU,GAAW,CAAC,CAAC;IAE3B;;;OAGG;IACH,SAAS,eAAe,CAAC,MAAc;QACrC,MAAM,aAAa,GAAW,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CA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AgE;QAChE,MAAM,sBAAsB,GAAW,IAAI,MAAM,CAAC,MAAM,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACjG,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,sBAAsB,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,EAAE;YACnF,6CAA6C;YAC7C,OAAO,KAAK,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC;IAED,YAAE,CAAC,aAAa,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport fs from 'fs';\nimport {\n ESLINT_BULK_FORCE_REGENERATE_PATCH_ENV_VAR_NAME,\n ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME\n} from './constants';\n\n/**\n * Dynamically generate file to properly patch many versions of ESLint\n * @param inputFilePath - Must be an iteration of https://github.com/eslint/eslint/blob/main/lib/linter/linter.js\n * @param outputFilePath - Some small changes to linter.js\n */\nexport function generatePatchedLinterJsFileIfDoesNotExist(\n inputFilePath: string,\n outputFilePath: string,\n eslintPackageVersion: string\n): void {\n const generateEnvVarValue: string | undefined =\n process.env[ESLINT_BULK_FORCE_REGENERATE_PATCH_ENV_VAR_NAME];\n if (generateEnvVarValue !== 'true' && generateEnvVarValue !== '1' && fs.existsSync(outputFilePath)) {\n return;\n }\n\n const majorVersion: number = parseInt(eslintPackageVersion, 10);\n\n const inputFile: string = fs.readFileSync(inputFilePath).toString();\n\n let inputIndex: number = 0;\n\n /**\n * Extract from the stream until marker is reached. When matching marker,\n * ignore whitespace in the stream and in the marker. Return the extracted text.\n */\n function scanUntilMarker(marker: string): string {\n const trimmedMarker: string = marker.replace(/\\s/g, '');\n\n let output: string = '';\n let trimmed: string = '';\n\n while (inputIndex < inputFile.length) {\n const char: string = inputFile[inputIndex++];\n output += char;\n if (!/^\\s$/.test(char)) {\n trimmed += char;\n }\n if (trimmed.endsWith(trimmedMarker)) {\n return output;\n }\n }\n\n throw new Error('Unexpected end of input while looking for ' + JSON.stringify(marker));\n }\n\n function scanUntilNewline(): string {\n let output: string = '';\n\n while (inputIndex < inputFile.length) {\n const char: string = inputFile[inputIndex++];\n output += char;\n if (char === '\\n') {\n return output;\n }\n }\n\n throw new Error('Unexpected end of input while looking for new line');\n }\n\n function scanUntilEnd(): string {\n const output: string = inputFile.substring(inputIndex);\n inputIndex = inputFile.length;\n return output;\n }\n\n const markerForStartOfClassMethodSpaces: string = '\\n */\\n ';\n const markerForStartOfClassMethodTabs: string = '\\n\\t */\\n\\t';\n function indexOfStartOfClassMethod(input: string, position?: number): { index: number; marker?: string } {\n let startOfClassMethodIndex: number = input.indexOf(markerForStartOfClassMethodSpaces, position);\n if (startOfClassMethodIndex === -1) {\n startOfClassMethodIndex = input.indexOf(markerForStartOfClassMethodTabs, position);\n if (startOfClassMethodIndex === -1) {\n return { index: startOfClassMethodIndex };\n }\n return { index: startOfClassMethodIndex, marker: markerForStartOfClassMethodTabs };\n }\n return { index: startOfClassMethodIndex, marker: markerForStartOfClassMethodSpaces };\n }\n\n /**\n * Returns index of next public method\n * @param fromIndex - index of inputFile to search if public method still exists\n * @returns -1 if public method does not exist or index of next public method\n */\n function getIndexOfNextMethod(fromIndex: number): { index: number; isPublic?: boolean } {\n const rest: string = inputFile.substring(fromIndex);\n\n const endOfClassIndex: number = rest.indexOf('\\n}');\n\n const { index: startOfClassMethodIndex, marker: startOfClassMethodMarker } =\n indexOfStartOfClassMethod(rest);\n\n if (\n startOfClassMethodIndex === -1 ||\n !startOfClassMethodMarker ||\n startOfClassMethodIndex > endOfClassIndex\n ) {\n return { index: -1 };\n }\n\n const afterMarkerIndex: number = startOfClassMethodIndex + startOfClassMethodMarker.length;\n\n const isPublicMethod: boolean =\n rest[afterMarkerIndex] !== '_' &&\n rest[afterMarkerIndex] !== '#' &&\n !rest.substring(afterMarkerIndex, rest.indexOf('\\n', afterMarkerIndex)).includes('static') &&\n !rest.substring(afterMarkerIndex, rest.indexOf('\\n', afterMarkerIndex)).includes('constructor');\n\n return { index: fromIndex + afterMarkerIndex, isPublic: isPublicMethod };\n }\n\n function scanUntilIndex(indexToScanTo: number): string {\n const output: string = inputFile.substring(inputIndex, indexToScanTo);\n inputIndex = indexToScanTo;\n return output;\n }\n\n let outputFile: string = '';\n\n // Match this:\n // //------------------------------------------------------------------------------\n // // Requirements\n // //------------------------------------------------------------------------------\n outputFile += scanUntilMarker('// Requirements');\n outputFile += scanUntilMarker('//--');\n outputFile += scanUntilNewline();\n\n outputFile += `\n// --- BEGIN MONKEY PATCH ---\nconst bulkSuppressionsPatch = require(process.env.${ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME});\nconst requireFromPathToLinterJS = bulkSuppressionsPatch.requireFromPathToLinterJS;\n`;\n\n // Match this:\n // //------------------------------------------------------------------------------\n // // Typedefs\n // //------------------------------------------------------------------------------\n const requireSection: string = scanUntilMarker('// Typedefs');\n\n // Match something like this:\n //\n // const path = require('path'),\n // eslintScope = require('eslint-scope'),\n // evk = require('eslint-visitor-keys'),\n //\n // Convert to something like this:\n //\n // const path = require('path'),\n // eslintScope = requireFromPathToLinterJS('eslint-scope'),\n // evk = requireFromPathToLinterJS('eslint-visitor-keys'),\n //\n outputFile += requireSection.replace(/require\\s*\\((?:'([^']+)'|\"([^\"]+)\")\\)/g, (match, p1, p2) => {\n const importPath: string = p1 ?? p2 ?? '';\n\n if (importPath !== 'path') {\n if (p1) {\n return `requireFromPathToLinterJS('${p1}')`;\n }\n if (p2) {\n return `requireFromPathToLinterJS(\"${p2}\")`;\n }\n }\n\n // Keep as-is\n return match;\n });\n outputFile += `--- END MONKEY PATCH ---\n`;\n\n if (majorVersion >= 9) {\n outputFile += scanUntilMarker('const emitter = createEmitter();');\n outputFile += `\n // --- BEGIN MONKEY PATCH ---\n let currentNode = undefined;\n // --- END MONKEY PATCH ---`;\n }\n\n // Match this:\n // ```\n // if (reportTranslator === null) {\n // reportTranslator = createReportTranslator({\n // ruleId,\n // severity,\n // sourceCode,\n // messageIds,\n // disableFixes\n // });\n // }\n // const problem = reportTranslator(...args);\n //\n // if (problem.fix && !(rule.meta && rule.meta.fixable)) {\n // throw new Error(\"Fixable rules must set the `meta.fixable` property to \\\"code\\\" or \\\"whitespace\\\".\");\n // }\n // ```\n //\n // Convert to something like this:\n // ```\n // if (reportTranslator === null) {\n // reportTranslator = createReportTranslator({\n // ruleId,\n // severity,\n // sourceCode,\n // messageIds,\n // disableFixes\n // });\n // }\n // const problem = reportTranslator(...args);\n // // --- BEGIN MONKEY PATCH ---\n // if (bulkSuppressionsPatch.shouldBulkSuppress({ filename, currentNode: args[0]?.node ?? currentNode, ruleId, problem })) return;\n // // --- END MONKEY PATCH ---\n //\n // if (problem.fix && !(rule.meta && rule.meta.fixable)) {\n // throw new Error(\"Fixable rules must set the `meta.fixable` property to \\\"code\\\" or \\\"whitespace\\\".\");\n // }\n // ```\n outputFile += scanUntilMarker('const problem = reportTranslator(...args);');\n outputFile += `\n // --- BEGIN MONKEY PATCH ---\n if (bulkSuppressionsPatch.shouldBulkSuppress({ filename, currentNode: args[0]?.node ?? currentNode, ruleId, problem })) return;\n // --- END MONKEY PATCH ---`;\n\n //\n // Match this:\n // ```\n // Object.keys(ruleListeners).forEach(selector => {\n // ...\n // });\n // ```\n //\n // Convert to something like this:\n // ```\n // Object.keys(ruleListeners).forEach(selector => {\n // // --- BEGIN MONKEY PATCH ---\n // emitter.on(selector, (...args) => { currentNode = args[args.length - 1]; });\n // // --- END MONKEY PATCH ---\n // ...\n // });\n // ```\n if (majorVersion >= 9) {\n outputFile += scanUntilMarker('Object.keys(ruleListeners).forEach(selector => {');\n outputFile += `\n // --- BEGIN MONKEY PATCH ---\n emitter.on(selector, (...args) => { currentNode = args[args.length - 1]; });\n // --- END MONKEY PATCH ---`;\n }\n\n outputFile += scanUntilMarker('class Linter {');\n outputFile += scanUntilNewline();\n outputFile += `\n // --- BEGIN MONKEY PATCH ---\n /**\n * We intercept ESLint execution at the .eslintrc.js file, but unfortunately the Linter class is\n * initialized before the .eslintrc.js file is executed. This means the internalSlotsMap that all\n * the patched methods refer to is not initialized. This method checks if the internalSlotsMap is\n * initialized, and if not, initializes it.\n */\n _conditionallyReinitialize({ cwd, configType } = {}) {\n if (internalSlotsMap.get(this) === undefined) {\n internalSlotsMap.set(this, {\n cwd: normalizeCwd(cwd),\n lastConfigArray: null,\n lastSourceCode: null,\n lastSuppressedMessages: [],\n configType, // TODO: Remove after flat config conversion\n parserMap: new Map([['espree', espree]]),\n ruleMap: new Rules()\n });\n\n this.version = pkg.version;\n }\n }\n // --- END MONKEY PATCH ---\n`;\n\n const privateMethodNames: string[] = [];\n let { index: indexOfNextMethod, isPublic } = getIndexOfNextMethod(inputIndex);\n\n while (indexOfNextMethod !== -1) {\n outputFile += scanUntilIndex(indexOfNextMethod);\n if (isPublic) {\n // Inject the monkey patch at the start of the public method\n outputFile += scanUntilNewline();\n outputFile += ` // --- BEGIN MONKEY PATCH ---\n this._conditionallyReinitialize();\n // --- END MONKEY PATCH ---\n`;\n } else if (inputFile[inputIndex] === '#') {\n // Replace the '#' private method with a '_' private method, so that our monkey patch\n // can still call it. Otherwise, we get the following error during execution:\n // TypeError: Receiver must be an instance of class Linter\n const privateMethodName: string = scanUntilMarker('(');\n // Remove the '(' at the end and stash it, since we need to escape it for the regex later\n privateMethodNames.push(privateMethodName.slice(0, -1));\n outputFile += `_${privateMethodName.slice(1)}`;\n }\n\n const indexResult: { index: number; isPublic?: boolean } = getIndexOfNextMethod(inputIndex);\n indexOfNextMethod = indexResult.index;\n isPublic = indexResult.isPublic;\n }\n\n outputFile += scanUntilEnd();\n\n // Do a second pass to find and replace all calls to private methods with the patched versions.\n if (privateMethodNames.length) {\n // eslint-disable-next-line @rushstack/security/no-unsafe-regexp\n const privateMethodCallRegex: RegExp = new RegExp(`\\.(${privateMethodNames.join('|')})\\\\(`, 'g');\n outputFile = outputFile.replace(privateMethodCallRegex, (match, privateMethodName) => {\n // Replace the leading '#' with a leading '_'\n return `._${privateMethodName.slice(1)}(`;\n });\n }\n\n fs.writeFileSync(outputFilePath, outputFile);\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e26a57a8ca84c682b2b77b57b9d6e340ffd33436 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e0f3f392adc03bef7ba8b1fcc4bfbd4a6e4e2ca4 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/index.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.js new file mode 100644 index 0000000000000000000000000000000000000000..d3468c9ae56b153ffe34648a44e43bba04419bb6 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.js @@ -0,0 +1,27 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +Object.defineProperty(exports, "__esModule", { value: true }); +const _patch_base_1 = require("../_patch-base"); +const path_utils_1 = require("./path-utils"); +const bulk_suppressions_patch_1 = require("./bulk-suppressions-patch"); +const generate_patched_file_1 = require("./generate-patched-file"); +const constants_1 = require("./constants"); +if (!_patch_base_1.eslintFolder) { + console.error('@rushstack/eslint-patch/eslint-bulk-suppressions: Could not find ESLint installation to patch.'); + process.exit(1); +} +const eslintBulkDetectEnvVarValue = process.env[constants_1.ESLINT_BULK_DETECT_ENV_VAR_NAME]; +if (eslintBulkDetectEnvVarValue === 'true' || eslintBulkDetectEnvVarValue === '1') { + (0, path_utils_1.findAndConsoleLogPatchPathCli)(); + process.exit(0); +} +const pathToLinterJS = (0, path_utils_1.getPathToLinterJS)(); +process.env[constants_1.ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME] = require.resolve('./bulk-suppressions-patch'); +const pathToGeneratedPatch = (0, path_utils_1.ensurePathToGeneratedPatch)(); +(0, generate_patched_file_1.generatePatchedLinterJsFileIfDoesNotExist)(pathToLinterJS, pathToGeneratedPatch, _patch_base_1.eslintPackageVersion); +const { Linter: LinterPatch } = require(pathToGeneratedPatch); +LinterPatch.prototype.verify = (0, bulk_suppressions_patch_1.extendVerifyFunction)(LinterPatch.prototype.verify); +const { Linter } = require(pathToLinterJS); +(0, bulk_suppressions_patch_1.patchClass)(Linter, LinterPatch); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4f00fedfe853bcec6fb0c552f9e15c232486e317 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,gDAAoE;AACpE,6CAA4G;AAC5G,uEAA6E;AAC7E,mEAAoF;AACpF,2CAAmG;AAEnG,IAAI,CAAC,0BAAY,EAAE,CAAC;IAClB,OAAO,CAAC,KAAK,CACX,gGAAgG,CACjG,CAAC;IAEF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,2BAA2B,GAAuB,OAAO,CAAC,GAAG,CAAC,2CAA+B,CAAC,CAAC;AACrG,IAAI,2BAA2B,KAAK,MAAM,IAAI,2BAA2B,KAAK,GAAG,EAAE,CAAC;IAClF,IAAA,0CAA6B,GAAE,CAAC;IAChC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,cAAc,GAAW,IAAA,8BAAiB,GAAE,CAAC;AAEnD,OAAO,CAAC,GAAG,CAAC,+CAAmC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAEhG,MAAM,oBAAoB,GAAW,IAAA,uCAA0B,GAAE,CAAC;AAClE,IAAA,iEAAyC,EAAC,cAAc,EAAE,oBAAoB,EAAE,kCAAoB,CAAC,CAAC;AACtG,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAC9D,WAAW,CAAC,SAAS,CAAC,MAAM,GAAG,IAAA,8CAAoB,EAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAElF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAE3C,IAAA,oCAAU,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { eslintFolder, eslintPackageVersion } from '../_patch-base';\nimport { findAndConsoleLogPatchPathCli, getPathToLinterJS, ensurePathToGeneratedPatch } from './path-utils';\nimport { patchClass, extendVerifyFunction } from './bulk-suppressions-patch';\nimport { generatePatchedLinterJsFileIfDoesNotExist } from './generate-patched-file';\nimport { ESLINT_BULK_DETECT_ENV_VAR_NAME, ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME } from './constants';\n\nif (!eslintFolder) {\n console.error(\n '@rushstack/eslint-patch/eslint-bulk-suppressions: Could not find ESLint installation to patch.'\n );\n\n process.exit(1);\n}\n\nconst eslintBulkDetectEnvVarValue: string | undefined = process.env[ESLINT_BULK_DETECT_ENV_VAR_NAME];\nif (eslintBulkDetectEnvVarValue === 'true' || eslintBulkDetectEnvVarValue === '1') {\n findAndConsoleLogPatchPathCli();\n process.exit(0);\n}\n\nconst pathToLinterJS: string = getPathToLinterJS();\n\nprocess.env[ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME] = require.resolve('./bulk-suppressions-patch');\n\nconst pathToGeneratedPatch: string = ensurePathToGeneratedPatch();\ngeneratePatchedLinterJsFileIfDoesNotExist(pathToLinterJS, pathToGeneratedPatch, eslintPackageVersion);\nconst { Linter: LinterPatch } = require(pathToGeneratedPatch);\nLinterPatch.prototype.verify = extendVerifyFunction(LinterPatch.prototype.verify);\n\nconst { Linter } = require(pathToLinterJS);\n\npatchClass(Linter, LinterPatch);\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f0ff8ba4cbb0f10873bbca32914a9a62bb2cc9af --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.d.ts @@ -0,0 +1,4 @@ +export declare function findAndConsoleLogPatchPathCli(): void; +export declare function getPathToLinterJS(): string; +export declare function ensurePathToGeneratedPatch(): string; +//# sourceMappingURL=path-utils.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..1dc3c42f10a07dcc61ee9521e526773477baf0dc --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"path-utils.d.ts","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/path-utils.ts"],"names":[],"mappings":"AAgBA,wBAAgB,6BAA6B,IAAI,IAAI,CAqBpD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAM1C;AAED,wBAAgB,0BAA0B,IAAI,MAAM,CAKnD"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.js new file mode 100644 index 0000000000000000000000000000000000000000..49b6fc0a74276304be664804cac07593087f7e2a --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.js @@ -0,0 +1,48 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.findAndConsoleLogPatchPathCli = findAndConsoleLogPatchPathCli; +exports.getPathToLinterJS = getPathToLinterJS; +exports.ensurePathToGeneratedPatch = ensurePathToGeneratedPatch; +const fs_1 = __importDefault(require("fs")); +const os_1 = __importDefault(require("os")); +const _patch_base_1 = require("../_patch-base"); +const constants_1 = require("./constants"); +const package_json_1 = __importDefault(require("../../package.json")); +const CURRENT_PACKAGE_VERSION = package_json_1.default.version; +function findAndConsoleLogPatchPathCli() { + const eslintBulkDetectEnvVarValue = process.env[constants_1.ESLINT_BULK_DETECT_ENV_VAR_NAME]; + if (eslintBulkDetectEnvVarValue !== 'true' && eslintBulkDetectEnvVarValue !== '1') { + return; + } + const startDelimiter = 'RUSHSTACK_ESLINT_BULK_START'; + const endDelimiter = 'RUSHSTACK_ESLINT_BULK_END'; + const configuration = { + /** + * `@rushstack/eslint-bulk` should report an error if its package.json is older than this number + */ + minCliVersion: '0.0.0', + /** + * `@rushstack/eslint-bulk` will invoke this entry point + */ + cliEntryPoint: require.resolve('../exports/eslint-bulk') + }; + console.log(startDelimiter + JSON.stringify(configuration) + endDelimiter); +} +function getPathToLinterJS() { + if (!_patch_base_1.eslintFolder) { + throw new Error('Cannot find ESLint installation to patch.'); + } + return `${_patch_base_1.eslintFolder}/lib/linter/linter.js`; +} +function ensurePathToGeneratedPatch() { + const patchesFolderPath = `${os_1.default.tmpdir()}/rushstack-eslint-bulk-${CURRENT_PACKAGE_VERSION}/patches`; + fs_1.default.mkdirSync(patchesFolderPath, { recursive: true }); + const pathToGeneratedPatch = `${patchesFolderPath}/linter-patch-v${_patch_base_1.eslintPackageVersion}.js`; + return pathToGeneratedPatch; +} +//# sourceMappingURL=path-utils.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.js.map new file mode 100644 index 0000000000000000000000000000000000000000..759b0abb7d0742d59b9c528659be14e62f73de9c --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/eslint-bulk-suppressions/path-utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path-utils.js","sourceRoot":"","sources":["../../src/eslint-bulk-suppressions/path-utils.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;AAe3D,sEAqBC;AAED,8CAMC;AAED,gEAKC;AAjDD,4CAAoB;AACpB,4CAAoB;AACpB,gDAAoE;AACpE,2CAA8D;AAC9D,sEAAoD;AAOpD,MAAM,uBAAuB,GAAW,sBAAkB,CAAC,OAAO,CAAC;AAEnE,SAAgB,6BAA6B;IAC3C,MAAM,2BAA2B,GAAuB,OAAO,CAAC,GAAG,CAAC,2CAA+B,CAAC,CAAC;IACrG,IAAI,2BAA2B,KAAK,MAAM,IAAI,2BAA2B,KAAK,GAAG,EAAE,CAAC;QAClF,OAAO;IACT,CAAC;IAED,MAAM,cAAc,GAAW,6BAA6B,CAAC;IAC7D,MAAM,YAAY,GAAW,2BAA2B,CAAC;IAEzD,MAAM,aAAa,GAAmB;QACpC;;WAEG;QACH,aAAa,EAAE,OAAO;QACtB;;WAEG;QACH,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC;KACzD,CAAC;IAEF,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,YAAY,CAAC,CAAC;AAC7E,CAAC;AAED,SAAgB,iBAAiB;IAC/B,IAAI,CAAC,0BAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,GAAG,0BAAY,uBAAuB,CAAC;AAChD,CAAC;AAED,SAAgB,0BAA0B;IACxC,MAAM,iBAAiB,GAAW,GAAG,YAAE,CAAC,MAAM,EAAE,0BAA0B,uBAAuB,UAAU,CAAC;IAC5G,YAAE,CAAC,SAAS,CAAC,iBAAiB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACrD,MAAM,oBAAoB,GAAW,GAAG,iBAAiB,kBAAkB,kCAAoB,KAAK,CAAC;IACrG,OAAO,oBAAoB,CAAC;AAC9B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport fs from 'fs';\nimport os from 'os';\nimport { eslintFolder, eslintPackageVersion } from '../_patch-base';\nimport { ESLINT_BULK_DETECT_ENV_VAR_NAME } from './constants';\nimport currentPackageJson from '../../package.json';\n\ninterface IConfiguration {\n minCliVersion: string;\n cliEntryPoint: string;\n}\n\nconst CURRENT_PACKAGE_VERSION: string = currentPackageJson.version;\n\nexport function findAndConsoleLogPatchPathCli(): void {\n const eslintBulkDetectEnvVarValue: string | undefined = process.env[ESLINT_BULK_DETECT_ENV_VAR_NAME];\n if (eslintBulkDetectEnvVarValue !== 'true' && eslintBulkDetectEnvVarValue !== '1') {\n return;\n }\n\n const startDelimiter: string = 'RUSHSTACK_ESLINT_BULK_START';\n const endDelimiter: string = 'RUSHSTACK_ESLINT_BULK_END';\n\n const configuration: IConfiguration = {\n /**\n * `@rushstack/eslint-bulk` should report an error if its package.json is older than this number\n */\n minCliVersion: '0.0.0',\n /**\n * `@rushstack/eslint-bulk` will invoke this entry point\n */\n cliEntryPoint: require.resolve('../exports/eslint-bulk')\n };\n\n console.log(startDelimiter + JSON.stringify(configuration) + endDelimiter);\n}\n\nexport function getPathToLinterJS(): string {\n if (!eslintFolder) {\n throw new Error('Cannot find ESLint installation to patch.');\n }\n\n return `${eslintFolder}/lib/linter/linter.js`;\n}\n\nexport function ensurePathToGeneratedPatch(): string {\n const patchesFolderPath: string = `${os.tmpdir()}/rushstack-eslint-bulk-${CURRENT_PACKAGE_VERSION}/patches`;\n fs.mkdirSync(patchesFolderPath, { recursive: true });\n const pathToGeneratedPatch: string = `${patchesFolderPath}/linter-patch-v${eslintPackageVersion}.js`;\n return pathToGeneratedPatch;\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c2b5b0ae38e10a69fbe3efc708e11926b71bc9fd --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.d.ts @@ -0,0 +1,2 @@ +import '../eslint-bulk-suppressions/cli/start'; +//# sourceMappingURL=eslint-bulk.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..283b20b2337afca1a95bd630a511b5b32d106ca6 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"eslint-bulk.d.ts","sourceRoot":"","sources":["../../src/exports/eslint-bulk.ts"],"names":[],"mappings":"AAKA,OAAO,uCAAuC,CAAC"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.js new file mode 100644 index 0000000000000000000000000000000000000000..967a1c3759e397371ec9f0f38279b234028a0632 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.js @@ -0,0 +1,7 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +Object.defineProperty(exports, "__esModule", { value: true }); +// "lib/exports/eslint-bulk" is the entry point for the @rushstack/eslint-bulk command line front end. +require("../eslint-bulk-suppressions/cli/start"); +//# sourceMappingURL=eslint-bulk.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0c89d0889b7094f6723f59c62ef943d70f25330c --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/exports/eslint-bulk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"eslint-bulk.js","sourceRoot":"","sources":["../../src/exports/eslint-bulk.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,sGAAsG;AAEtG,iDAA+C","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// \"lib/exports/eslint-bulk\" is the entry point for the @rushstack/eslint-bulk command line front end.\n\nimport '../eslint-bulk-suppressions/cli/start';\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..83db426ffd4e145b7a0bf0d72c0c27049826157c --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=modern-module-resolution.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f88e8958ce12dd874b50f6c8e50f323729f3f65e --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"modern-module-resolution.d.ts","sourceRoot":"","sources":["../src/modern-module-resolution.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.js new file mode 100644 index 0000000000000000000000000000000000000000..417a748579e4ac4167856a3fce4458406e1ef9b1 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.js @@ -0,0 +1,69 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +Object.defineProperty(exports, "__esModule", { value: true }); +// This is a workaround for https://github.com/eslint/eslint/issues/3458 +// +// To correct how ESLint searches for plugin packages, add this line to the top of your project's .eslintrc.js file: +// +// require("@rushstack/eslint-patch/modern-module-resolution"); +// +const _patch_base_1 = require("./_patch-base"); +// error: "The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received ''" +const isInvalidImporterPath = (ex) => (ex === null || ex === void 0 ? void 0 : ex.code) === 'ERR_INVALID_ARG_VALUE'; +if (!_patch_base_1.configArrayFactory.__loadPluginPatched) { + _patch_base_1.configArrayFactory.__loadPluginPatched = true; + // eslint-disable-next-line @typescript-eslint/typedef + const originalLoadPlugin = _patch_base_1.configArrayFactory.prototype._loadPlugin; + if (_patch_base_1.ESLINT_MAJOR_VERSION === 6) { + // ESLint 6.x + // https://github.com/eslint/eslint/blob/9738f8cc864d769988ccf42bb70f524444df1349/lib/cli-engine/config-array-factory.js#L915 + _patch_base_1.configArrayFactory.prototype._loadPlugin = function (name, importerPath, importerName) { + const originalResolve = _patch_base_1.ModuleResolver.resolve; + try { + _patch_base_1.ModuleResolver.resolve = function (moduleName, relativeToPath) { + try { + // resolve using importerPath instead of relativeToPath + return originalResolve.call(this, moduleName, importerPath); + } + catch (e) { + if ((0, _patch_base_1.isModuleResolutionError)(e) || isInvalidImporterPath(e)) { + return originalResolve.call(this, moduleName, relativeToPath); + } + throw e; + } + }; + return originalLoadPlugin.apply(this, arguments); + } + finally { + _patch_base_1.ModuleResolver.resolve = originalResolve; + } + }; + } + else { + // ESLint 7.x || 8.x + // https://github.com/eslint/eslintrc/blob/242d569020dfe4f561e4503787b99ec016337457/lib/config-array-factory.js#L1023 + _patch_base_1.configArrayFactory.prototype._loadPlugin = function (name, ctx) { + const originalResolve = _patch_base_1.ModuleResolver.resolve; + try { + _patch_base_1.ModuleResolver.resolve = function (moduleName, relativeToPath) { + try { + // resolve using ctx.filePath instead of relativeToPath + return originalResolve.call(this, moduleName, ctx.filePath); + } + catch (e) { + if ((0, _patch_base_1.isModuleResolutionError)(e) || isInvalidImporterPath(e)) { + return originalResolve.call(this, moduleName, relativeToPath); + } + throw e; + } + }; + return originalLoadPlugin.apply(this, arguments); + } + finally { + _patch_base_1.ModuleResolver.resolve = originalResolve; + } + }; + } +} +//# sourceMappingURL=modern-module-resolution.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.js.map new file mode 100644 index 0000000000000000000000000000000000000000..43adaf44b320783bd8b742ac6af5d3c16342b172 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.js.map @@ -0,0 +1 @@ +{"version":3,"file":"modern-module-resolution.js","sourceRoot":"","sources":["../src/modern-module-resolution.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,wEAAwE;AACxE,EAAE;AACF,oHAAoH;AACpH,EAAE;AACF,kEAAkE;AAClE,EAAE;AAEF,+CAKuB;AAEvB,oHAAoH;AACpH,MAAM,qBAAqB,GAA6B,CAAC,EAAE,EAAE,EAAE,CAC7D,CAAC,EAAoC,aAApC,EAAE,uBAAF,EAAE,CAAoC,IAAI,MAAK,uBAAuB,CAAC;AAE1E,IAAI,CAAC,gCAAkB,CAAC,mBAAmB,EAAE,CAAC;IAC5C,gCAAkB,CAAC,mBAAmB,GAAG,IAAI,CAAC;IAC9C,sDAAsD;IACtD,MAAM,kBAAkB,GAAG,gCAAkB,CAAC,SAAS,CAAC,WAAW,CAAC;IAEpE,IAAI,kCAAoB,KAAK,CAAC,EAAE,CAAC;QAC/B,aAAa;QACb,6HAA6H;QAC7H,gCAAkB,CAAC,SAAS,CAAC,WAAW,GAAG,UACzC,IAAY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AC3D,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;wBAChE,CAAC;wBACD,MAAM,CAAC,CAAC;oBACV,CAAC;gBACH,CAAC,CAAC;gBACF,OAAO,kBAAkB,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YACnD,CAAC;oBAAS,CAAC;gBACT,4BAAc,CAAC,OAAO,GAAG,eAAe,CAAC;YAC3C,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// This is a workaround for https://github.com/eslint/eslint/issues/3458\n//\n// To correct how ESLint searches for plugin packages, add this line to the top of your project's .eslintrc.js file:\n//\n// require(\"@rushstack/eslint-patch/modern-module-resolution\");\n//\n\nimport {\n configArrayFactory,\n ModuleResolver,\n isModuleResolutionError,\n ESLINT_MAJOR_VERSION\n} from './_patch-base';\n\n// error: \"The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received ''\"\nconst isInvalidImporterPath: (ex: unknown) => boolean = (ex) =>\n (ex as { code: unknown } | undefined)?.code === 'ERR_INVALID_ARG_VALUE';\n\nif (!configArrayFactory.__loadPluginPatched) {\n configArrayFactory.__loadPluginPatched = true;\n // eslint-disable-next-line @typescript-eslint/typedef\n const originalLoadPlugin = configArrayFactory.prototype._loadPlugin;\n\n if (ESLINT_MAJOR_VERSION === 6) {\n // ESLint 6.x\n // https://github.com/eslint/eslint/blob/9738f8cc864d769988ccf42bb70f524444df1349/lib/cli-engine/config-array-factory.js#L915\n configArrayFactory.prototype._loadPlugin = function (\n name: string,\n importerPath: string,\n importerName: string\n ) {\n const originalResolve: (moduleName: string, relativeToPath: string) => string = ModuleResolver.resolve;\n try {\n ModuleResolver.resolve = function (moduleName: string, relativeToPath: string) {\n try {\n // resolve using importerPath instead of relativeToPath\n return originalResolve.call(this, moduleName, importerPath);\n } catch (e) {\n if (isModuleResolutionError(e) || isInvalidImporterPath(e)) {\n return originalResolve.call(this, moduleName, relativeToPath);\n }\n throw e;\n }\n };\n return originalLoadPlugin.apply(this, arguments);\n } finally {\n ModuleResolver.resolve = originalResolve;\n }\n };\n } else {\n // ESLint 7.x || 8.x\n // https://github.com/eslint/eslintrc/blob/242d569020dfe4f561e4503787b99ec016337457/lib/config-array-factory.js#L1023\n configArrayFactory.prototype._loadPlugin = function (name: string, ctx: Record) {\n const originalResolve: (moduleName: string, relativeToPath: string | unknown) => string =\n ModuleResolver.resolve;\n try {\n ModuleResolver.resolve = function (moduleName: string, relativeToPath: string) {\n try {\n // resolve using ctx.filePath instead of relativeToPath\n return originalResolve.call(this, moduleName, ctx.filePath);\n } catch (e) {\n if (isModuleResolutionError(e) || isInvalidImporterPath(e)) {\n return originalResolve.call(this, moduleName, relativeToPath);\n }\n throw e;\n }\n };\n return originalLoadPlugin.apply(this, arguments);\n } finally {\n ModuleResolver.resolve = originalResolve;\n }\n };\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.d.ts b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c343784126aae06ff96d0772cd1432a95a5852f1 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=usage.d.ts.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.d.ts.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..9fb334d81157251a011851f29d98e3ff297e121d --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../src/usage.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.js new file mode 100644 index 0000000000000000000000000000000000000000..7268030e0207d76eeca42486e99c886acf0e7888 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.js @@ -0,0 +1,7 @@ +"use strict"; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +Object.defineProperty(exports, "__esModule", { value: true }); +throw new Error('The @rushstack/eslint-patch package does not have a default entry point.' + + ' See README.md for usage instructions.'); +//# sourceMappingURL=usage.js.map \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.js.map b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1815c94cc003f343f8e9d3040df4c93b5a6f33bb --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/lib/usage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"usage.js","sourceRoot":"","sources":["../src/usage.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAE3D,MAAM,IAAI,KAAK,CACb,0EAA0E;IACxE,wCAAwC,CAC3C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nthrow new Error(\n 'The @rushstack/eslint-patch package does not have a default entry point.' +\n ' See README.md for usage instructions.'\n);\n\nexport {};\n"]} \ No newline at end of file diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/modern-module-resolution.js b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/modern-module-resolution.js new file mode 100644 index 0000000000000000000000000000000000000000..921317824f48c3780f6ab6e1c922126b75ab4e39 --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/modern-module-resolution.js @@ -0,0 +1 @@ +require('./lib/modern-module-resolution'); diff --git a/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/package.json b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f454854711a97af544203e81e52c1b015fff5b9c --- /dev/null +++ b/node_modules/.pnpm/@rushstack+eslint-patch@1.12.0/node_modules/@rushstack/eslint-patch/package.json @@ -0,0 +1,42 @@ +{ + "name": "@rushstack/eslint-patch", + "version": "1.12.0", + "description": "Enhance ESLint with better support for large scale monorepos", + "main": "lib/usage.js", + "license": "MIT", + "repository": { + "url": "https://github.com/microsoft/rushstack.git", + "type": "git", + "directory": "eslint/eslint-patch" + }, + "homepage": "https://rushstack.io", + "keywords": [ + "eslintrc", + "config", + "module", + "resolve", + "resolver", + "plugin", + "relative", + "package", + "bulk", + "suppressions", + "monorepo", + "monkey", + "patch" + ], + "devDependencies": { + "@rushstack/heft": "0.73.2", + "@types/eslint-8": "npm:@types/eslint@8.56.10", + "@types/eslint-9": "npm:@types/eslint@9.6.1", + "@typescript-eslint/types": "~8.31.0", + "eslint-9": "npm:eslint@~9.25.1", + "eslint-8": "npm:eslint@~8.57.0", + "typescript": "~5.8.2", + "decoupled-local-node-rig": "1.0.0" + }, + "scripts": { + "build": "heft build --clean", + "_phase:build": "heft run --only build -- --clean" + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/LICENSE b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ea54e0ddad405b2ee635d687a876613214160ba2 --- /dev/null +++ b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Colin McDonnell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/README.md b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/README.md new file mode 100644 index 0000000000000000000000000000000000000000..58c83ecc5bd315cb3be78b565e8de8e4df304b10 --- /dev/null +++ b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/README.md @@ -0,0 +1,279 @@ +

+ Standard Schema fire logo +
+ Standard Schema

+

+ A common interface for TypeScript validation libraries +
+
standardschema.dev +

+
+ + + +Standard Schema is a common interface designed to be implemented by JavaScript and TypeScript schema libraries. + +The goal is to make it easier for ecosystem tools to accept user-defined type validators, without needing to write custom logic or adapters for each supported library. And since Standard Schema is a specification, they can do so with no additional runtime dependencies. Integrate once, validate anywhere. + +## Who designed it? + +The spec was designed by the creators of Zod, Valibot, and ArkType. Recent versions of these libraries already implement the spec (see the [full list of compatible libraries](#what-schema-libraries-implement-the-spec) below). + +## The interface + +The specification consists of a single TypeScript interface `StandardSchemaV1` to be implemented by any schema library wishing to be spec-compliant. + +This interface can be found below in its entirety. Libraries wishing to implement the spec can copy/paste the code block below into their codebase. It's also available at `@standard-schema/spec` on [npm](https://www.npmjs.com/package/@standard-schema/spec) and [JSR](https://jsr.io/@standard-schema/spec). There will be zero changes without a major version bump. + +```ts +/** The Standard Schema interface. */ +export interface StandardSchemaV1 { + /** The Standard Schema properties. */ + readonly '~standard': StandardSchemaV1.Props; +} + +export declare namespace StandardSchemaV1 { + /** The Standard Schema properties interface. */ + export interface Props { + /** The version number of the standard. */ + readonly version: 1; + /** The vendor name of the schema library. */ + readonly vendor: string; + /** Validates unknown input values. */ + readonly validate: ( + value: unknown + ) => Result | Promise>; + /** Inferred types associated with the schema. */ + readonly types?: Types | undefined; + } + + /** The result interface of the validate function. */ + export type Result = SuccessResult | FailureResult; + + /** The result interface if validation succeeds. */ + export interface SuccessResult { + /** The typed output value. */ + readonly value: Output; + /** The non-existent issues. */ + readonly issues?: undefined; + } + + /** The result interface if validation fails. */ + export interface FailureResult { + /** The issues of failed validation. */ + readonly issues: ReadonlyArray; + } + + /** The issue interface of the failure output. */ + export interface Issue { + /** The error message of the issue. */ + readonly message: string; + /** The path of the issue, if any. */ + readonly path?: ReadonlyArray | undefined; + } + + /** The path segment interface of the issue. */ + export interface PathSegment { + /** The key representing a path segment. */ + readonly key: PropertyKey; + } + + /** The Standard Schema types interface. */ + export interface Types { + /** The input type of the schema. */ + readonly input: Input; + /** The output type of the schema. */ + readonly output: Output; + } + + /** Infers the input type of a Standard Schema. */ + export type InferInput = NonNullable< + Schema['~standard']['types'] + >['input']; + + /** Infers the output type of a Standard Schema. */ + export type InferOutput = NonNullable< + Schema['~standard']['types'] + >['output']; +} +``` + +## Design goals + +The specification meets a few primary design objectives: + +- **Support runtime validation.** Given a Standard Schema compatible validator, you should be able to validate data with it (duh). Any validation errors should be presented in a standardized format. +- **Support static type inference.** For TypeScript libraries that do type inference, the specification provides a standard way for them to "advertise" their inferred type, so it can be extracted and used by external tools. +- **Minimal.** It should be easy for libraries to implement this spec in a few lines of code that call their existing functions/methods. +- **Avoid API conflicts.** The entire spec is tucked inside a single object property called `~standard`, which avoids potential naming conflicts with the API surface of existing libraries. +- **Do no harm to DX.** The `~standard` property is tilde-prefixed to [de-prioritize it in autocompletion](https://x.com/colinhacks/status/1816860780459073933). By contrast, an underscore-prefixed property would show up before properties/methods with alphanumeric names. + +## What schema libraries implement the spec? + +These are the libraries that have already implemented the Standard Schema interface. (If you maintain a library that implements the spec, [create a PR](https://github.com/standard-schema/standard-schema/compare) to add yourself!) + +| Implementer | Version(s) | Docs | +| ----------- | ---------- | -------------------------------------------------------------------------- | +| Zod | 3.24.0+ | [zod.dev](https://zod.dev/) | +| Valibot | v1.0+ | [valibot.dev](https://valibot.dev/) | +| ArkType | v2.0+ | [arktype.io](https://arktype.io/) | +| Arri Schema | v0.71.0+ | [github.com/modiimedia/arri](https://github.com/modiimedia/arri) | +| TypeMap | v0.8.0+ | [github.com/sinclairzx81/typemap](https://github.com/sinclairzx81/typemap) | + +## What tools / frameworks accept spec-compliant schemas? + +The following tools accept user-defined schemas conforming to the Standard Schema spec. (If you maintain a tool that supports Standard Schemas, [create a PR](https://github.com/standard-schema/standard-schema/compare) to add yourself!) + +| Integrator | Description | Link | +| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| [tRPC](https://trpc.io) | 🧙‍♀️ Move fast and break nothing. End-to-end typesafe APIs made easy | [PR](https://github.com/trpc/trpc/pull/6079) | +| [TanStack Form](https://github.com/TanStack/form) | 🤖 Headless, performant, and type-safe form state management for TS/JS, React, Vue, Angular, Solid, and Lit | [PR](https://github.com/TanStack/form/issues/1015) | +| [TanStack Router](https://github.com/tanstack/router) | A fully type-safe React router with built-in data fetching, stale-while revalidate caching and first-class search-param APIs | [PR](https://github.com/TanStack/router/pull/2602) | +| [Hono Middleware 🚧](https://hono.dev) | Fast, lightweight server, built on Web Standards | [PR](https://github.com/honojs/middleware/pull/887) | +| [Qwik 🚧](https://github.com/QwikDev/qwik) | Instant-loading web apps, without effort | [PR](https://github.com/QwikDev/qwik/pull/7281) | +| [UploadThing](https://github.com/pingdotgg/uploadthing) | File uploads for modern web devs | [Docs](https://docs.uploadthing.com/file-routes#input) | +| [T3 Env](https://github.com/t3-oss/t3-env) | Framework agnostic validation for type-safe environment variables | [PR](https://github.com/t3-oss/t3-env/pull/299) | +| [OpenAuth](https://github.com/openauthjs/openauth) | Universal, standards-based auth provider | [Docs](https://openauth.js.org/docs/#server) | +| [renoun](https://www.renoun.dev/) | The Documentation Toolkit for React | [Docs](https://www.renoun.dev/utilities/file-system#schema-validation) | +| [Formwerk](https://github.com/formwerkjs/formwerk) | A Vue.js Framework for building high-quality, accessible, delightful forms. | [PR](https://github.com/formwerkjs/formwerk/pull/68) | +| [GQLoom](https://github.com/modevol-com/gqloom) | Weave GraphQL schema and resolvers using Standard Schema | [PR](https://github.com/modevol-com/gqloom/pull/7) | +| [Nuxt UI (v3)](https://github.com/nuxt/ui) | A UI Library for modern web apps, powered by Vue & Tailwind CSS | [PR](https://github.com/nuxt/ui/pull/2303) | +| [oRPC](https://github.com/unnoq/orpc) | Typesafe APIs made simple 🪄 | [PR](https://github.com/unnoq/orpc/pull/50) | +| [Regle](https://github.com/victorgarciaesgi/regle) | Type-safe model-based form validation library for Vue.js | [PR](https://github.com/victorgarciaesgi/regle/pull/46) | + +## How can my schema library implement the spec? + +Schemas libraries that want to support Standard Schema must implement the `StandardSchemaV1` interface. Start by copying the specification file above into your library. It consists of types only. + +Then implement the spec by adding the `~standard` property to your validator objects/instances. We recommend using `extends` / `implements` to ensure static agreement with the interface. It doesn't matter whether your schema library returns plain objects, functions, or class instances. The only thing that matters is that the `~standard` property is defined somehow. + +Here's a simple worked example of a string validator that implements the spec. + +```ts +import type {StandardSchemaV1} from '@standard-schema/spec'; + +// Step 1: Define the schema interface +interface StringSchema extends StandardSchemaV1 { + type: 'string'; + message: string; +} + +// Step 2: Implement the schema interface +function string(message: string = 'Invalid type'): StringSchema { + return { + type: 'string', + message, + '~standard': { + version: 1, + vendor: 'valizod', + validate(value) { + return typeof value === 'string' ? {value} : {issues: [{message}]}; + }, + }, + }; +} +``` + +We recommend defining the `~standard.validate()` function in terms of your library's existing validation functions/methods. Ideally implementing the spec only requires a handful of lines of code. + +Avoid returning `Promise` from `~standard.validate()` unless absolutely necessary. Some third-party libraries may not support async validation. + +## How do I accept Standard Schemas in my library? + +Third-party libraries and frameworks can leverage the Standard Schema spec to accept user-defined schemas in a type-safe way. + +To get started, copy and paste the specification file into your project. Alternatively (if you are okay with the extra dependency), you can install the `@standard-schema/spec` package from [npm](https://www.npmjs.com/package/@standard-schema/spec) or [JSR](https://jsr.io/@standard-schema/spec) as a dependency. _It is not recommended to install as a dev dependency, see the [associated FAQ](#can-i-add-it-as-a-dev-dependency) for details_. + +```sh +npm install @standard-schema/spec # npm +yarn add @standard-schema/spec # yarn +pnpm add @standard-schema/spec # pnpm +bun add @standard-schema/spec # bun +deno add jsr:@standard-schema/spec # deno +``` + +Here's is an simple example of a generic function that accepts an arbitrary spec-compliant validator and uses it to parse some data. + +```ts +import type {StandardSchemaV1} from '@standard-schema/spec'; + +export async function standardValidate( + schema: T, + input: StandardSchemaV1.InferInput +): Promise> { + let result = schema['~standard'].validate(input); + if (result instanceof Promise) result = await result; + + // if the `issues` field exists, the validation failed + if (result.issues) { + throw new Error(JSON.stringify(result.issues, null, 2)); + } + + return result.value; +} +``` + +This concise function can accept inputs from any spec-compliant schema library. + +```ts +import * as z from 'zod'; +import * as v from 'valibot'; +import {type} from 'arktype'; + +const zodResult = await standardValidate(z.string(), 'hello'); +const valibotResult = await standardValidate(v.string(), 'hello'); +const arktypeResult = await standardValidate(type('string'), 'hello'); +``` + +## FAQ + +These are the most frequently asked questions about Standard Schema. If your question is not listed, feel free to create an issue. + +### Do I need to add `@standard-schema/spec` as a dependency? + +No. The `@standard-schema/spec` package is completely optional. You can just copy and paste the types into your project. We guarantee no breaking changes without a major version bump. + +If you don't mind additional dependencies, you can add `@standard-schema/spec` as a dependency and consume it with `import type`. The `@standard-schema/spec` package contains no runtime code and only exports types. + +### Can I add it as a dev dependency? + +Despite being types-only, you should _not_ install `@standard-schema/spec` as a dev dependency. By accepting Standard Schemas as part of your public API, the Standard Schema interface becomes a part of your library's public API. As such, it _must_ be available whenever/wherever your library gets installed, even in production installs. For this to happen, it must be installed as a regular dependency. + +### Why did you prefix the `~standard` property with `~`? + +The goal of prefixing the key with `~` is to both avoid conflicts with existing API surfaces and to de-prioritize these keys in auto-complete. The `~` character is one of the few ASCII characters that occurs after `A-Za-z0-9` lexicographically, so VS Code puts these suggestions at the bottom of the list. + +![Screenshot showing the de-prioritization of the `~` prefix keys in VS Code.](https://github.com/standard-schema/standard-schema/assets/3084745/5dfc0219-7531-481e-9691-cff5bc471378) + +### Why not use a symbol key? + +In TypeScript, using a plain `Symbol` inline as a key always collapses to a simple `symbol` type. This would cause conflicts with other schema properties that use symbols. + +```ts +const object = { + [Symbol.for('~output')]: 'some data', +}; +// { [k: symbol]: string } +``` + +Unique symbols can also be declared in a "nominal" way that won't collapse. In this case the symbol key is sorted alphabetically in autocomplete according to the symbol's variable name. + +![Screenshot showing the prioritization of external symbols in VS Code](https://github.com/standard-schema/standard-schema/assets/3084745/82c47820-90c3-4163-a838-858b987a6bea) + +Thus, these symbol keys don't get sorted to the bottom of the autocomplete list, unlike tilde-prefixed string keys. + +### How to only allow synchronous validation? + +The `~validate` function might return a synchronous value _or_ a `Promise`. If you only accept synchronous validation, you can simply throw an error if the returned value is an instance of `Promise`. Libraries are encouraged to preferentially use synchronous validation whenever possible. + +```ts +import type {StandardSchemaV1} from '@standard-schema/spec'; + +function validateInput(schema: StandardSchemaV1, data: unknown) { + const result = schema['~standard'].validate(data); + if (result instanceof Promise) { + throw new TypeError('Schema validation must be synchronous'); + } + // ... +} +``` diff --git a/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.cjs b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.cjs new file mode 100644 index 0000000000000000000000000000000000000000..321666eb3e061c8fa6e38f0d5ce040591cd19da4 --- /dev/null +++ b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.cjs @@ -0,0 +1,18 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +module.exports = __toCommonJS(src_exports); diff --git a/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.d.cts b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.d.cts new file mode 100644 index 0000000000000000000000000000000000000000..e9b97e2d4203bcd52545f27cc99d9f6a478a8c88 --- /dev/null +++ b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.d.cts @@ -0,0 +1,58 @@ +/** The Standard Schema interface. */ +interface StandardSchemaV1 { + /** The Standard Schema properties. */ + readonly "~standard": StandardSchemaV1.Props; +} +declare namespace StandardSchemaV1 { + /** The Standard Schema properties interface. */ + export interface Props { + /** The version number of the standard. */ + readonly version: 1; + /** The vendor name of the schema library. */ + readonly vendor: string; + /** Validates unknown input values. */ + readonly validate: (value: unknown) => Result | Promise>; + /** Inferred types associated with the schema. */ + readonly types?: Types | undefined; + } + /** The result interface of the validate function. */ + export type Result = SuccessResult | FailureResult; + /** The result interface if validation succeeds. */ + export interface SuccessResult { + /** The typed output value. */ + readonly value: Output; + /** The non-existent issues. */ + readonly issues?: undefined; + } + /** The result interface if validation fails. */ + export interface FailureResult { + /** The issues of failed validation. */ + readonly issues: ReadonlyArray; + } + /** The issue interface of the failure output. */ + export interface Issue { + /** The error message of the issue. */ + readonly message: string; + /** The path of the issue, if any. */ + readonly path?: ReadonlyArray | undefined; + } + /** The path segment interface of the issue. */ + export interface PathSegment { + /** The key representing a path segment. */ + readonly key: PropertyKey; + } + /** The Standard Schema types interface. */ + export interface Types { + /** The input type of the schema. */ + readonly input: Input; + /** The output type of the schema. */ + readonly output: Output; + } + /** Infers the input type of a Standard Schema. */ + export type InferInput = NonNullable["input"]; + /** Infers the output type of a Standard Schema. */ + export type InferOutput = NonNullable["output"]; + export { }; +} + +export { StandardSchemaV1 }; diff --git a/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.d.ts b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e9b97e2d4203bcd52545f27cc99d9f6a478a8c88 --- /dev/null +++ b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.d.ts @@ -0,0 +1,58 @@ +/** The Standard Schema interface. */ +interface StandardSchemaV1 { + /** The Standard Schema properties. */ + readonly "~standard": StandardSchemaV1.Props; +} +declare namespace StandardSchemaV1 { + /** The Standard Schema properties interface. */ + export interface Props { + /** The version number of the standard. */ + readonly version: 1; + /** The vendor name of the schema library. */ + readonly vendor: string; + /** Validates unknown input values. */ + readonly validate: (value: unknown) => Result | Promise>; + /** Inferred types associated with the schema. */ + readonly types?: Types | undefined; + } + /** The result interface of the validate function. */ + export type Result = SuccessResult | FailureResult; + /** The result interface if validation succeeds. */ + export interface SuccessResult { + /** The typed output value. */ + readonly value: Output; + /** The non-existent issues. */ + readonly issues?: undefined; + } + /** The result interface if validation fails. */ + export interface FailureResult { + /** The issues of failed validation. */ + readonly issues: ReadonlyArray; + } + /** The issue interface of the failure output. */ + export interface Issue { + /** The error message of the issue. */ + readonly message: string; + /** The path of the issue, if any. */ + readonly path?: ReadonlyArray | undefined; + } + /** The path segment interface of the issue. */ + export interface PathSegment { + /** The key representing a path segment. */ + readonly key: PropertyKey; + } + /** The Standard Schema types interface. */ + export interface Types { + /** The input type of the schema. */ + readonly input: Input; + /** The output type of the schema. */ + readonly output: Output; + } + /** Infers the input type of a Standard Schema. */ + export type InferInput = NonNullable["input"]; + /** Infers the output type of a Standard Schema. */ + export type InferOutput = NonNullable["output"]; + export { }; +} + +export { StandardSchemaV1 }; diff --git a/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.js b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/package.json b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/package.json new file mode 100644 index 0000000000000000000000000000000000000000..595165045ce99b3f2d601689f7c8648566a04dc8 --- /dev/null +++ b/node_modules/.pnpm/@standard-schema+spec@1.0.0/node_modules/@standard-schema/spec/package.json @@ -0,0 +1,51 @@ +{ + "name": "@standard-schema/spec", + "description": "A standard interface for TypeScript schema validation libraries", + "version": "1.0.0", + "license": "MIT", + "author": "Colin McDonnell", + "homepage": "https://standardschema.dev", + "repository": { + "type": "git", + "url": "https://github.com/standard-schema/standard-schema" + }, + "keywords": [ + "typescript", + "schema", + "validation", + "standard", + "interface" + ], + "type": "module", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } + } + }, + "sideEffects": false, + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "devDependencies": { + "tsup": "^8.3.0", + "typescript": "^5.6.2" + }, + "scripts": { + "lint": "pnpm biome lint ./src", + "format": "pnpm biome format --write ./src", + "check": "pnpm biome check ./src", + "build": "tsup" + } +} \ No newline at end of file diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/LICENSE b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..6a08504909fe063aedf79b9113c240dec13858d5 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2024 SWC contributors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_apply_decorated_descriptor/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_apply_decorated_descriptor/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7d6b95480d48bdd780e19d3f377bbcfa4031cd1d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_apply_decorated_descriptor/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_apply_decorated_descriptor.cjs", + "module": "../../esm/_apply_decorated_descriptor.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_apply_decs_2203_r/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_apply_decs_2203_r/package.json new file mode 100644 index 0000000000000000000000000000000000000000..80f208cbd79badcc60af095b86a4c49214a2ccd8 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_apply_decs_2203_r/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_apply_decs_2203_r.cjs", + "module": "../../esm/_apply_decs_2203_r.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_array_like_to_array/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_array_like_to_array/package.json new file mode 100644 index 0000000000000000000000000000000000000000..37bd07fb46740870a00a7f278e9c246f056281b4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_array_like_to_array/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_array_like_to_array.cjs", + "module": "../../esm/_array_like_to_array.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_array_with_holes/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_array_with_holes/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7f602bcb0c17f09b21edab35c80e46c39b15d334 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_array_with_holes/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_array_with_holes.cjs", + "module": "../../esm/_array_with_holes.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_array_without_holes/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_array_without_holes/package.json new file mode 100644 index 0000000000000000000000000000000000000000..aeefbfce82e47a368e0f54b3d6213a8209bdfe29 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_array_without_holes/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_array_without_holes.cjs", + "module": "../../esm/_array_without_holes.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_assert_this_initialized/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_assert_this_initialized/package.json new file mode 100644 index 0000000000000000000000000000000000000000..fab7d972f50cc6a823435803b3cc77d2848fe30a --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_assert_this_initialized/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_assert_this_initialized.cjs", + "module": "../../esm/_assert_this_initialized.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_generator/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_generator/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6c3674070396578142f4b7397f7b71a757dfc6b1 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_generator/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_async_generator.cjs", + "module": "../../esm/_async_generator.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_generator_delegate/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_generator_delegate/package.json new file mode 100644 index 0000000000000000000000000000000000000000..aa2450536dd1f6cf136d186828957e08c86b3bcf --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_generator_delegate/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_async_generator_delegate.cjs", + "module": "../../esm/_async_generator_delegate.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_iterator/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_iterator/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b87fa5cea85a0bad18548047c60bca7fb52791be --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_iterator/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_async_iterator.cjs", + "module": "../../esm/_async_iterator.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_to_generator/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_to_generator/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1bfa4159ce29259ae055a4d9fbf1065e9acb3b36 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_async_to_generator/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_async_to_generator.cjs", + "module": "../../esm/_async_to_generator.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_await_async_generator/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_await_async_generator/package.json new file mode 100644 index 0000000000000000000000000000000000000000..62d48a7fd18164fc91334a86b32ce66bda0d61be --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_await_async_generator/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_await_async_generator.cjs", + "module": "../../esm/_await_async_generator.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_await_value/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_await_value/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a0fe68d9381920eb2235da172ca16d317a32cc97 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_await_value/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_await_value.cjs", + "module": "../../esm/_await_value.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_call_super/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_call_super/package.json new file mode 100644 index 0000000000000000000000000000000000000000..46cf64de5f5ab994f0ae6a16ada323e9dc6a5fc0 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_call_super/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_call_super.cjs", + "module": "../../esm/_call_super.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_check_private_redeclaration/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_check_private_redeclaration/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4d8c7cf45dbf780756057068b5eadc31590c83a1 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_check_private_redeclaration/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_check_private_redeclaration.cjs", + "module": "../../esm/_check_private_redeclaration.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_destructure/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_destructure/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8322bad688e7a3c2c5681d3165dc7b096c7c5365 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_destructure/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_apply_descriptor_destructure.cjs", + "module": "../../esm/_class_apply_descriptor_destructure.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_get/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_get/package.json new file mode 100644 index 0000000000000000000000000000000000000000..eb0c92d235822f6a53240485690351c4b0d509bd --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_get/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_apply_descriptor_get.cjs", + "module": "../../esm/_class_apply_descriptor_get.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_set/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_set/package.json new file mode 100644 index 0000000000000000000000000000000000000000..68de7559a8bd5f40ffcc820f2d7941c134f476af --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_set/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_apply_descriptor_set.cjs", + "module": "../../esm/_class_apply_descriptor_set.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_update/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_update/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8b8a5c950cac00cfe702190360c46897291cead2 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_apply_descriptor_update/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_apply_descriptor_update.cjs", + "module": "../../esm/_class_apply_descriptor_update.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_call_check/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_call_check/package.json new file mode 100644 index 0000000000000000000000000000000000000000..69345d45a3d2109ec7a7287800ad851acfdf4d2f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_call_check/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_call_check.cjs", + "module": "../../esm/_class_call_check.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_check_private_static_access/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_check_private_static_access/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d69f9f582b7eb41f9e9ce1a91f3863b5193dc389 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_check_private_static_access/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_check_private_static_access.cjs", + "module": "../../esm/_class_check_private_static_access.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_check_private_static_field_descriptor/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_check_private_static_field_descriptor/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8dd77c2ea094620cec8651217c8184b0a94d6e4f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_check_private_static_field_descriptor/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_check_private_static_field_descriptor.cjs", + "module": "../../esm/_class_check_private_static_field_descriptor.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_extract_field_descriptor/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_extract_field_descriptor/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7c3965f11827fa127ea85468b708ac2d49a60228 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_extract_field_descriptor/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_extract_field_descriptor.cjs", + "module": "../../esm/_class_extract_field_descriptor.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_name_tdz_error/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_name_tdz_error/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8ac4b5173776216baa114fc2d3b214ebb64cc3ef --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_name_tdz_error/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_name_tdz_error.cjs", + "module": "../../esm/_class_name_tdz_error.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_destructure/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_destructure/package.json new file mode 100644 index 0000000000000000000000000000000000000000..044346e6db5af31a7a282dc476fdfef28a267e62 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_destructure/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_private_field_destructure.cjs", + "module": "../../esm/_class_private_field_destructure.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_get/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_get/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4650d80f4e00d0559159eb749a05927b9df0cf5e --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_get/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_private_field_get.cjs", + "module": "../../esm/_class_private_field_get.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_init/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_init/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8c57a74665c3a5c11a302d687e6e43b183651489 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_init/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_private_field_init.cjs", + "module": "../../esm/_class_private_field_init.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_loose_base/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_loose_base/package.json new file mode 100644 index 0000000000000000000000000000000000000000..07df6d88ffdfb11ea91d9d4cb6af2c81e993624e --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_loose_base/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_private_field_loose_base.cjs", + "module": "../../esm/_class_private_field_loose_base.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_loose_key/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_loose_key/package.json new file mode 100644 index 0000000000000000000000000000000000000000..abd74810347533b23fc10976d00e879fd2c6cabf --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_loose_key/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_private_field_loose_key.cjs", + "module": "../../esm/_class_private_field_loose_key.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_set/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_set/package.json new file mode 100644 index 0000000000000000000000000000000000000000..477326e3d165050182b6586c7261c7019570a2a8 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_set/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_private_field_set.cjs", + "module": "../../esm/_class_private_field_set.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_update/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_update/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ecb502fa6871a144922c6efa7354fc819863e2bd --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_field_update/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_private_field_update.cjs", + "module": "../../esm/_class_private_field_update.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_method_get/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_method_get/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4d01b2ec39a30f4e4e04a841b449c95426982e01 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_method_get/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_private_method_get.cjs", + "module": "../../esm/_class_private_method_get.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_method_init/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_method_init/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7c9e406c91e841ef20b8a4a9c48d139f292c23b0 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_method_init/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_private_method_init.cjs", + "module": "../../esm/_class_private_method_init.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_method_set/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_method_set/package.json new file mode 100644 index 0000000000000000000000000000000000000000..bc842290ae57d66087862b1e37db6237776c1d63 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_private_method_set/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_private_method_set.cjs", + "module": "../../esm/_class_private_method_set.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_destructure/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_destructure/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7cc7dc622c2bc306bdfd7edd8645f7482450a26d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_destructure/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_static_private_field_destructure.cjs", + "module": "../../esm/_class_static_private_field_destructure.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_spec_get/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_spec_get/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d626f6f2398950e44ada82e47fdf0ea70656f54d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_spec_get/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_static_private_field_spec_get.cjs", + "module": "../../esm/_class_static_private_field_spec_get.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_spec_set/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_spec_set/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7a4d0891d687276b051e0a0d60e18435a63fca8b --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_spec_set/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_static_private_field_spec_set.cjs", + "module": "../../esm/_class_static_private_field_spec_set.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_update/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_update/package.json new file mode 100644 index 0000000000000000000000000000000000000000..c10abd016298d8175735169752012628469f7919 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_field_update/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_static_private_field_update.cjs", + "module": "../../esm/_class_static_private_field_update.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_method_get/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_method_get/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1f4f139fa6f7480b1895bd83523d54c42e7fa6de --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_class_static_private_method_get/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_class_static_private_method_get.cjs", + "module": "../../esm/_class_static_private_method_get.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_construct/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_construct/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0eea254969d2076128ab827d889bbd37b7ad3df5 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_construct/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_construct.cjs", + "module": "../../esm/_construct.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_create_class/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_create_class/package.json new file mode 100644 index 0000000000000000000000000000000000000000..191f7edbb0fd5185586e08ecfa578a6a48a371dd --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_create_class/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_create_class.cjs", + "module": "../../esm/_create_class.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_create_for_of_iterator_helper_loose/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_create_for_of_iterator_helper_loose/package.json new file mode 100644 index 0000000000000000000000000000000000000000..68257867b6713208682dc7aac55b31e2c86f77a4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_create_for_of_iterator_helper_loose/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_create_for_of_iterator_helper_loose.cjs", + "module": "../../esm/_create_for_of_iterator_helper_loose.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_create_super/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_create_super/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3442b58a31d8074a7a915080cff438c8f164752f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_create_super/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_create_super.cjs", + "module": "../../esm/_create_super.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_decorate/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_decorate/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d33cc5b3e89fe958a6207172d94cc41b1c0cea03 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_decorate/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_decorate.cjs", + "module": "../../esm/_decorate.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_defaults/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_defaults/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e44774f07af4c64ae52092a470f92c7df07628fc --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_defaults/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_defaults.cjs", + "module": "../../esm/_defaults.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_define_enumerable_properties/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_define_enumerable_properties/package.json new file mode 100644 index 0000000000000000000000000000000000000000..63c488e00a2e7ffc1d8cfd4590786359013ce515 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_define_enumerable_properties/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_define_enumerable_properties.cjs", + "module": "../../esm/_define_enumerable_properties.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_define_property/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_define_property/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ac05789cdbdc964c625c19c5b554ba29e009f09a --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_define_property/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_define_property.cjs", + "module": "../../esm/_define_property.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_dispose/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_dispose/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a6e5f50538de7fd220e60580ace127cdd2763018 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_dispose/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_dispose.cjs", + "module": "../../esm/_dispose.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_export_star/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_export_star/package.json new file mode 100644 index 0000000000000000000000000000000000000000..c47d22b81afbf460ef43841aff7e24849a6b4cab --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_export_star/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_export_star.cjs", + "module": "../../esm/_export_star.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_extends/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_extends/package.json new file mode 100644 index 0000000000000000000000000000000000000000..40fc9ac4e5caa0c73540e398e6ec87cc440e7678 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_extends/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_extends.cjs", + "module": "../../esm/_extends.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_get/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_get/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f6cb810894cec7598d39718899d0ba793c24438a --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_get/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_get.cjs", + "module": "../../esm/_get.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_get_prototype_of/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_get_prototype_of/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7c4ca8e69da6359d7e5c787cb6b3f8adac55241b --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_get_prototype_of/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_get_prototype_of.cjs", + "module": "../../esm/_get_prototype_of.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_identity/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_identity/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3b45f4c7f54ab66e426e642c664e262d70c533b8 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_identity/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_identity.cjs", + "module": "../../esm/_identity.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_inherits/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_inherits/package.json new file mode 100644 index 0000000000000000000000000000000000000000..425da862f869c47eac122c0d87aca4ed2ae9b297 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_inherits/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_inherits.cjs", + "module": "../../esm/_inherits.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_inherits_loose/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_inherits_loose/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ffa67dc2eebc27997342e076f32cf704272c00f0 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_inherits_loose/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_inherits_loose.cjs", + "module": "../../esm/_inherits_loose.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_initializer_define_property/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_initializer_define_property/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b65ad3b0bb1a6e5fcb00eee7027e87a382d03944 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_initializer_define_property/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_initializer_define_property.cjs", + "module": "../../esm/_initializer_define_property.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_initializer_warning_helper/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_initializer_warning_helper/package.json new file mode 100644 index 0000000000000000000000000000000000000000..94653a8fa4a1e9adba9fad4639971b49fbf1f99c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_initializer_warning_helper/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_initializer_warning_helper.cjs", + "module": "../../esm/_initializer_warning_helper.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_instanceof/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_instanceof/package.json new file mode 100644 index 0000000000000000000000000000000000000000..523c344756f57dc31267b281db90585812fb67d6 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_instanceof/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_instanceof.cjs", + "module": "../../esm/_instanceof.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_interop_require_default/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_interop_require_default/package.json new file mode 100644 index 0000000000000000000000000000000000000000..70d438fc049238da365664c7b46b571a185f5de3 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_interop_require_default/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_interop_require_default.cjs", + "module": "../../esm/_interop_require_default.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_interop_require_wildcard/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_interop_require_wildcard/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b3469a5d300c311a1860a9af55d7c4876b9777a8 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_interop_require_wildcard/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_interop_require_wildcard.cjs", + "module": "../../esm/_interop_require_wildcard.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_is_native_function/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_is_native_function/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6380c813473098afa122f877d4560f29d177c873 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_is_native_function/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_is_native_function.cjs", + "module": "../../esm/_is_native_function.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_is_native_reflect_construct/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_is_native_reflect_construct/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9aa84b0f88f89d9ddbb87238f65ec4fb06656984 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_is_native_reflect_construct/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_is_native_reflect_construct.cjs", + "module": "../../esm/_is_native_reflect_construct.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_iterable_to_array/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_iterable_to_array/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7754bd48be4cd5a813d3a46e48c744196114d40d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_iterable_to_array/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_iterable_to_array.cjs", + "module": "../../esm/_iterable_to_array.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_iterable_to_array_limit/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_iterable_to_array_limit/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a69c45e990e6ec16582aee609b83cf5c2335d21a --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_iterable_to_array_limit/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_iterable_to_array_limit.cjs", + "module": "../../esm/_iterable_to_array_limit.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_iterable_to_array_limit_loose/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_iterable_to_array_limit_loose/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a4a392ebec00a3444c5a09dec1d0517c45d30a5c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_iterable_to_array_limit_loose/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_iterable_to_array_limit_loose.cjs", + "module": "../../esm/_iterable_to_array_limit_loose.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_jsx/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_jsx/package.json new file mode 100644 index 0000000000000000000000000000000000000000..be886148e532e1341df4490f88267f251c139440 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_jsx/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_jsx.cjs", + "module": "../../esm/_jsx.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_new_arrow_check/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_new_arrow_check/package.json new file mode 100644 index 0000000000000000000000000000000000000000..df1d9eb740a87fc0e91045baed3e1c99125b9cfa --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_new_arrow_check/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_new_arrow_check.cjs", + "module": "../../esm/_new_arrow_check.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_non_iterable_rest/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_non_iterable_rest/package.json new file mode 100644 index 0000000000000000000000000000000000000000..43d3d3a23af6893c61a014c5c8bb2e3dc1db73b8 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_non_iterable_rest/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_non_iterable_rest.cjs", + "module": "../../esm/_non_iterable_rest.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_non_iterable_spread/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_non_iterable_spread/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0df885d88ba1dfb13af3a5ed749a4c52b5d87465 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_non_iterable_spread/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_non_iterable_spread.cjs", + "module": "../../esm/_non_iterable_spread.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_destructuring_empty/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_destructuring_empty/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b9e7f60c27ce1ddfad3d75fe10f2a542cff62312 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_destructuring_empty/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_object_destructuring_empty.cjs", + "module": "../../esm/_object_destructuring_empty.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_spread/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_spread/package.json new file mode 100644 index 0000000000000000000000000000000000000000..79c030a7ede053d2e836ac8efafb581dce4a7e41 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_spread/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_object_spread.cjs", + "module": "../../esm/_object_spread.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_spread_props/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_spread_props/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1fa988bcaab428a717fbbd205f383471c8ecdc5b --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_spread_props/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_object_spread_props.cjs", + "module": "../../esm/_object_spread_props.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_without_properties/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_without_properties/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5553145d1b3f3ed61a131cc7ae25f0fa720acf23 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_without_properties/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_object_without_properties.cjs", + "module": "../../esm/_object_without_properties.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_without_properties_loose/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_without_properties_loose/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8f08da9cd7e856f216a216a8515c3d1b5b2f2efd --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_object_without_properties_loose/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_object_without_properties_loose.cjs", + "module": "../../esm/_object_without_properties_loose.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_possible_constructor_return/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_possible_constructor_return/package.json new file mode 100644 index 0000000000000000000000000000000000000000..06256ff1c88216da98b08d4a20c38e636bf4f070 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_possible_constructor_return/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_possible_constructor_return.cjs", + "module": "../../esm/_possible_constructor_return.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_read_only_error/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_read_only_error/package.json new file mode 100644 index 0000000000000000000000000000000000000000..c724d5e1f0147400204ce65c6a8c3360d65c8f7f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_read_only_error/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_read_only_error.cjs", + "module": "../../esm/_read_only_error.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_set/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_set/package.json new file mode 100644 index 0000000000000000000000000000000000000000..c90145be2754569f9563bb96c0a229298c3dd2ef --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_set/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_set.cjs", + "module": "../../esm/_set.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_set_prototype_of/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_set_prototype_of/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d08cf843325826108afea40d9d05d9e3277ed3b6 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_set_prototype_of/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_set_prototype_of.cjs", + "module": "../../esm/_set_prototype_of.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_skip_first_generator_next/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_skip_first_generator_next/package.json new file mode 100644 index 0000000000000000000000000000000000000000..cc34934ef02f8fa90a1bc8b027088792c970417a --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_skip_first_generator_next/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_skip_first_generator_next.cjs", + "module": "../../esm/_skip_first_generator_next.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_sliced_to_array/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_sliced_to_array/package.json new file mode 100644 index 0000000000000000000000000000000000000000..52b4fbba82b4b1f43998cdab6975eca92edd476b --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_sliced_to_array/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_sliced_to_array.cjs", + "module": "../../esm/_sliced_to_array.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_sliced_to_array_loose/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_sliced_to_array_loose/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ca2c35bce6b0363fff9f05b6fddb747d06b58d8b --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_sliced_to_array_loose/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_sliced_to_array_loose.cjs", + "module": "../../esm/_sliced_to_array_loose.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_super_prop_base/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_super_prop_base/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f6557ef5194f71683fd66017c15076ad0ed7b639 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_super_prop_base/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_super_prop_base.cjs", + "module": "../../esm/_super_prop_base.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_tagged_template_literal/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_tagged_template_literal/package.json new file mode 100644 index 0000000000000000000000000000000000000000..63d2a40a505c657ac3da58056c336d28117603db --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_tagged_template_literal/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_tagged_template_literal.cjs", + "module": "../../esm/_tagged_template_literal.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_tagged_template_literal_loose/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_tagged_template_literal_loose/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6a45bd377b28b60f691edf10387fc5f5b8a7dc79 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_tagged_template_literal_loose/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_tagged_template_literal_loose.cjs", + "module": "../../esm/_tagged_template_literal_loose.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_throw/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_throw/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1418ff4bac1a77ed10750c2852d68ed62922ad08 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_throw/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_throw.cjs", + "module": "../../esm/_throw.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_array/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_array/package.json new file mode 100644 index 0000000000000000000000000000000000000000..2c5ce50b4f27dd6ba8bbf0b87f8ad75f83de35ae --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_array/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_to_array.cjs", + "module": "../../esm/_to_array.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_consumable_array/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_consumable_array/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6424d11c3d1d5213af7e04aed1b51090d69518c2 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_consumable_array/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_to_consumable_array.cjs", + "module": "../../esm/_to_consumable_array.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_primitive/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_primitive/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1ee625af22c6b2a8aa99bd3f333fa2ff2a023a18 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_primitive/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_to_primitive.cjs", + "module": "../../esm/_to_primitive.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_property_key/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_property_key/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6f2e9a2d0ca11e91e5ce6bb6dd0f006772a6e050 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_to_property_key/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_to_property_key.cjs", + "module": "../../esm/_to_property_key.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_add_disposable_resource/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_add_disposable_resource/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8b20dac050ac6d9c9d3cb70889b89c192c297ab1 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_add_disposable_resource/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_ts_add_disposable_resource.cjs", + "module": "../../esm/_ts_add_disposable_resource.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_decorate/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_decorate/package.json new file mode 100644 index 0000000000000000000000000000000000000000..02279e9f058c7d01898c9d1d6336085c615be48e --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_decorate/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_ts_decorate.cjs", + "module": "../../esm/_ts_decorate.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_dispose_resources/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_dispose_resources/package.json new file mode 100644 index 0000000000000000000000000000000000000000..47841c0cb606186b1a012788a9614874d504b5ca --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_dispose_resources/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_ts_dispose_resources.cjs", + "module": "../../esm/_ts_dispose_resources.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_generator/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_generator/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0dc9588c6636a46bcd3cfd9cc8d58ae6095224b2 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_generator/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_ts_generator.cjs", + "module": "../../esm/_ts_generator.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_metadata/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_metadata/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d7c1f1c41d073768e5caaa7cacc9da0a7fbe1359 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_metadata/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_ts_metadata.cjs", + "module": "../../esm/_ts_metadata.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_param/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_param/package.json new file mode 100644 index 0000000000000000000000000000000000000000..18af8228115eb4e9344db9b503e60aa16a3ab62f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_param/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_ts_param.cjs", + "module": "../../esm/_ts_param.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_values/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_values/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5fe6a464518d62b52966e986e075cb506f5f53dd --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_ts_values/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_ts_values.cjs", + "module": "../../esm/_ts_values.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_type_of/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_type_of/package.json new file mode 100644 index 0000000000000000000000000000000000000000..620eed9e1156c47b21bece91f6020de2232397ab --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_type_of/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_type_of.cjs", + "module": "../../esm/_type_of.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_unsupported_iterable_to_array/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_unsupported_iterable_to_array/package.json new file mode 100644 index 0000000000000000000000000000000000000000..54549be92f74eea76c232ce60e3f7f9665b2c00d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_unsupported_iterable_to_array/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_unsupported_iterable_to_array.cjs", + "module": "../../esm/_unsupported_iterable_to_array.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_update/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_update/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f166b0cb93e26ce308745280adaf75eddf8814d9 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_update/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_update.cjs", + "module": "../../esm/_update.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_using/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_using/package.json new file mode 100644 index 0000000000000000000000000000000000000000..444f980f0182633fda9bed8c4889bdcc920fc3e0 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_using/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_using.cjs", + "module": "../../esm/_using.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_using_ctx/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_using_ctx/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b1aaebc9738c3cfa1b5884441229ac718fe10a7e --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_using_ctx/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_using_ctx.cjs", + "module": "../../esm/_using_ctx.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_wrap_async_generator/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_wrap_async_generator/package.json new file mode 100644 index 0000000000000000000000000000000000000000..774dcc1d16287c07ef298343559b6c42b0d6a499 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_wrap_async_generator/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_wrap_async_generator.cjs", + "module": "../../esm/_wrap_async_generator.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_wrap_native_super/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_wrap_native_super/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ce559339de81537cbd22e3bb8670e8c25140dc30 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_wrap_native_super/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_wrap_native_super.cjs", + "module": "../../esm/_wrap_native_super.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_write_only_error/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_write_only_error/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1767535ae97f9d474d084b3fd7733666cea68686 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/_write_only_error/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/_write_only_error.cjs", + "module": "../../esm/_write_only_error.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/index/package.json b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/index/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b855fe7780481dde84a45ff2087a2abfaf36c2f3 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/_/index/package.json @@ -0,0 +1,4 @@ +{ + "main": "../../cjs/index.cjs", + "module": "../../esm/index.js" +} diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_apply_decorated_descriptor.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_apply_decorated_descriptor.cjs new file mode 100644 index 0000000000000000000000000000000000000000..edd11861c695dc99e4b2a2edc47a90674c1985cd --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_apply_decorated_descriptor.cjs @@ -0,0 +1,35 @@ +"use strict"; + +function _apply_decorated_descriptor(target, property, decorators, descriptor, context) { + var desc = {}; + + Object["ke" + "ys"](descriptor).forEach(function(key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ("value" in desc || desc.initializer) desc.writable = true; + desc = decorators.slice().reverse().reduce(function(desc, decorator) { + return decorator ? decorator(target, property, desc) || desc : desc; + }, desc); + + var hasAccessor = Object.prototype.hasOwnProperty.call(desc, "get") || Object.prototype.hasOwnProperty.call(desc, "set"); + + if (context && desc.initializer !== void 0 && !hasAccessor) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + if (hasAccessor) { + delete desc.writable; + delete desc.initializer; + delete desc.value; + } + if (desc.initializer === void 0) { + Object["define" + "Property"](target, property, desc); + desc = null; + } + + return desc; +} +exports._ = _apply_decorated_descriptor; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_apply_decs_2203_r.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_apply_decs_2203_r.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c55c7867e4ef3f581ce608c6323eba9000a5a648 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_apply_decs_2203_r.cjs @@ -0,0 +1,550 @@ +"use strict"; + +/* @minVersion 7.20.0 */ + +/** + Enums are used in this file, but not assigned to vars to avoid non-hoistable values + + CONSTRUCTOR = 0; + PUBLIC = 1; + PRIVATE = 2; + + FIELD = 0; + ACCESSOR = 1; + METHOD = 2; + GETTER = 3; + SETTER = 4; + + STATIC = 5; + + CLASS = 10; // only used in assertValidReturnValue +*/ + +function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) { + function createAddInitializerMethod(initializers, decoratorFinishedRef) { + return function addInitializer(initializer) { + assertNotFinished(decoratorFinishedRef, "addInitializer"); + assertCallable(initializer, "An initializer"); + initializers.push(initializer); + }; + } + + function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) { + var kindStr; + + switch (kind) { + case 1 /* ACCESSOR */: + kindStr = "accessor"; + break; + case 2 /* METHOD */: + kindStr = "method"; + break; + case 3 /* GETTER */: + kindStr = "getter"; + break; + case 4 /* SETTER */: + kindStr = "setter"; + break; + default: + kindStr = "field"; + } + + var ctx = { kind: kindStr, name: isPrivate ? "#" + name : name, static: isStatic, private: isPrivate, metadata: metadata }; + + var decoratorFinishedRef = { v: false }; + + ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef); + + var get, set; + if (kind === 0 /* FIELD */) { + if (isPrivate) { + get = desc.get; + set = desc.set; + } else { + get = function() { + return this[name]; + }; + set = function(v) { + this[name] = v; + }; + } + } else if (kind === 2 /* METHOD */) { + get = function() { + return desc.value; + }; + } else { + // replace with values that will go through the final getter and setter + if (kind === 1 /* ACCESSOR */ || kind === 3 /* GETTER */) { + get = function() { + return desc.get.call(this); + }; + } + + if (kind === 1 /* ACCESSOR */ || kind === 4 /* SETTER */) { + set = function(v) { + desc.set.call(this, v); + }; + } + } + ctx.access = get && set ? { get: get, set: set } : get ? { get: get } : { set: set }; + + try { + return dec(value, ctx); + } finally { + decoratorFinishedRef.v = true; + } + } + + function assertNotFinished(decoratorFinishedRef, fnName) { + if (decoratorFinishedRef.v) { + throw new Error("attempted to call " + fnName + " after decoration was finished"); + } + } + + function assertCallable(fn, hint) { + if (typeof fn !== "function") { + throw new TypeError(hint + " must be a function"); + } + } + + function assertValidReturnValue(kind, value) { + var type = typeof value; + + if (kind === 1 /* ACCESSOR */) { + if (type !== "object" || value === null) { + throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); + } + if (value.get !== undefined) { + assertCallable(value.get, "accessor.get"); + } + if (value.set !== undefined) { + assertCallable(value.set, "accessor.set"); + } + if (value.init !== undefined) { + assertCallable(value.init, "accessor.init"); + } + } else if (type !== "function") { + var hint; + if (kind === 0 /* FIELD */) { + hint = "field"; + } else if (kind === 10 /* CLASS */) { + hint = "class"; + } else { + hint = "method"; + } + throw new TypeError(hint + " decorators must return a function or void 0"); + } + } + + function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) { + var decs = decInfo[0]; + + var desc, init, value; + + if (isPrivate) { + if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) { + desc = { get: decInfo[3], set: decInfo[4] }; + } else if (kind === 3 /* GETTER */) { + desc = { get: decInfo[3] }; + } else if (kind === 4 /* SETTER */) { + desc = { set: decInfo[3] }; + } else { + desc = { value: decInfo[3] }; + } + } else if (kind !== 0 /* FIELD */) { + desc = Object.getOwnPropertyDescriptor(base, name); + } + + if (kind === 1 /* ACCESSOR */) { + value = { get: desc.get, set: desc.set }; + } else if (kind === 2 /* METHOD */) { + value = desc.value; + } else if (kind === 3 /* GETTER */) { + value = desc.get; + } else if (kind === 4 /* SETTER */) { + value = desc.set; + } + + var newValue, get, set; + + if (typeof decs === "function") { + newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value); + + if (newValue !== void 0) { + assertValidReturnValue(kind, newValue); + + if (kind === 0 /* FIELD */) { + init = newValue; + } else if (kind === 1 /* ACCESSOR */) { + init = newValue.init; + get = newValue.get || value.get; + set = newValue.set || value.set; + + value = { get: get, set: set }; + } else { + value = newValue; + } + } + } else { + for (var i = decs.length - 1; i >= 0; i--) { + var dec = decs[i]; + + newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value); + + if (newValue !== void 0) { + assertValidReturnValue(kind, newValue); + var newInit; + + if (kind === 0 /* FIELD */) { + newInit = newValue; + } else if (kind === 1 /* ACCESSOR */) { + newInit = newValue.init; + get = newValue.get || value.get; + set = newValue.set || value.set; + + value = { get: get, set: set }; + } else { + value = newValue; + } + + if (newInit !== void 0) { + if (init === void 0) { + init = newInit; + } else if (typeof init === "function") { + init = [init, newInit]; + } else { + init.push(newInit); + } + } + } + } + } + + if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) { + if (init === void 0) { + // If the initializer was void 0, sub in a dummy initializer + init = function(instance, init) { + return init; + }; + } else if (typeof init !== "function") { + var ownInitializers = init; + + init = function(instance, init) { + var value = init; + + for (var i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value); + + return value; + }; + } else { + var originalInitializer = init; + + init = function(instance, init) { + return originalInitializer.call(instance, init); + }; + } + + ret.push(init); + } + + if (kind !== 0 /* FIELD */) { + if (kind === 1 /* ACCESSOR */) { + desc.get = value.get; + desc.set = value.set; + } else if (kind === 2 /* METHOD */) { + desc.value = value; + } else if (kind === 3 /* GETTER */) { + desc.get = value; + } else if (kind === 4 /* SETTER */) { + desc.set = value; + } + + if (isPrivate) { + if (kind === 1 /* ACCESSOR */) { + ret.push(function(instance, args) { + return value.get.call(instance, args); + }); + ret.push(function(instance, args) { + return value.set.call(instance, args); + }); + } else if (kind === 2 /* METHOD */) { + ret.push(value); + } else { + ret.push(function(instance, args) { + return value.call(instance, args); + }); + } + } else { + Object.defineProperty(base, name, desc); + } + } + } + + function applyMemberDecs(Class, decInfos, metadata) { + var ret = []; + var protoInitializers; + var staticInitializers; + + var existingProtoNonFields = new Map(); + var existingStaticNonFields = new Map(); + + for (var i = 0; i < decInfos.length; i++) { + var decInfo = decInfos[i]; + + // skip computed property names + if (!Array.isArray(decInfo)) continue; + + var kind = decInfo[1]; + var name = decInfo[2]; + var isPrivate = decInfo.length > 3; + + var isStatic = kind >= 5; /* STATIC */ + var base; + var initializers; + + if (isStatic) { + base = Class; + kind = kind - 5 /* STATIC */; + // initialize staticInitializers when we see a non-field static member + staticInitializers = staticInitializers || []; + initializers = staticInitializers; + } else { + base = Class.prototype; + // initialize protoInitializers when we see a non-field member + protoInitializers = protoInitializers || []; + initializers = protoInitializers; + } + + if (kind !== 0 /* FIELD */ && !isPrivate) { + var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields; + + var existingKind = existingNonFields.get(name) || 0; + + if (existingKind === true || (existingKind === 3 /* GETTER */ && kind !== 4) /* SETTER */ || (existingKind === 4 /* SETTER */ && kind !== 3) /* GETTER */) { + throw new Error( + "Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + + name + ); + } else if (!existingKind && kind > 2 /* METHOD */) { + existingNonFields.set(name, kind); + } else { + existingNonFields.set(name, true); + } + } + + applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata); + } + + pushInitializers(ret, protoInitializers); + pushInitializers(ret, staticInitializers); + return ret; + } + + function pushInitializers(ret, initializers) { + if (initializers) { + ret.push(function(instance) { + for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); + return instance; + }); + } + } + + function applyClassDecs(targetClass, classDecs, metadata) { + if (classDecs.length > 0) { + var initializers = []; + var newClass = targetClass; + var name = targetClass.name; + + for (var i = classDecs.length - 1; i >= 0; i--) { + var decoratorFinishedRef = { v: false }; + + try { + var nextNewClass = classDecs[i](newClass, { kind: "class", name: name, addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef), metadata }); + } finally { + decoratorFinishedRef.v = true; + } + + if (nextNewClass !== undefined) { + assertValidReturnValue(10, /* CLASS */ nextNewClass); + newClass = nextNewClass; + } + } + + return [defineMetadata(newClass, metadata), function() { + for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); + }]; + } + // The transformer will not emit assignment when there are no class decorators, + // so we don't have to return an empty array here. + } + + function defineMetadata(Class, metadata) { + return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: true, enumerable: true, value: metadata }); + } + + /** + Basic usage: + + applyDecs( + Class, + [ + // member decorators + [ + dec, // dec or array of decs + 0, // kind of value being decorated + 'prop', // name of public prop on class containing the value being decorated, + '#p', // the name of the private property (if is private, void 0 otherwise), + ] + ], + [ + // class decorators + dec1, dec2 + ] + ) + ``` + + Fully transpiled example: + + ```js + @dec + class Class { + @dec + a = 123; + + @dec + #a = 123; + + @dec + @dec2 + accessor b = 123; + + @dec + accessor #b = 123; + + @dec + c() { console.log('c'); } + + @dec + #c() { console.log('privC'); } + + @dec + get d() { console.log('d'); } + + @dec + get #d() { console.log('privD'); } + + @dec + set e(v) { console.log('e'); } + + @dec + set #e(v) { console.log('privE'); } + } + + + // becomes + let initializeInstance; + let initializeClass; + + let initA; + let initPrivA; + + let initB; + let initPrivB, getPrivB, setPrivB; + + let privC; + let privD; + let privE; + + let Class; + class _Class { + static { + let ret = applyDecs( + this, + [ + [dec, 0, 'a'], + [dec, 0, 'a', (i) => i.#a, (i, v) => i.#a = v], + [[dec, dec2], 1, 'b'], + [dec, 1, 'b', (i) => i.#privBData, (i, v) => i.#privBData = v], + [dec, 2, 'c'], + [dec, 2, 'c', () => console.log('privC')], + [dec, 3, 'd'], + [dec, 3, 'd', () => console.log('privD')], + [dec, 4, 'e'], + [dec, 4, 'e', () => console.log('privE')], + ], + [ + dec + ] + ) + + initA = ret[0]; + + initPrivA = ret[1]; + + initB = ret[2]; + + initPrivB = ret[3]; + getPrivB = ret[4]; + setPrivB = ret[5]; + + privC = ret[6]; + + privD = ret[7]; + + privE = ret[8]; + + initializeInstance = ret[9]; + + Class = ret[10] + + initializeClass = ret[11]; + } + + a = (initializeInstance(this), initA(this, 123)); + + #a = initPrivA(this, 123); + + #bData = initB(this, 123); + get b() { return this.#bData } + set b(v) { this.#bData = v } + + #privBData = initPrivB(this, 123); + get #b() { return getPrivB(this); } + set #b(v) { setPrivB(this, v); } + + c() { console.log('c'); } + + #c(...args) { return privC(this, ...args) } + + get d() { console.log('d'); } + + get #d() { return privD(this); } + + set e(v) { console.log('e'); } + + set #e(v) { privE(this, v); } + } + + initializeClass(Class); + */ + + exports._ = _apply_decs_2203_r = function(targetClass, memberDecs, classDecs, parentClass) { + if (parentClass !== void 0) { + var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")]; + } + var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata); + var e = applyMemberDecs(targetClass, memberDecs, metadata); + if (!classDecs.length) defineMetadata(targetClass, metadata); + return { + e: e, + // Lazily apply class decorations so that member init locals can be properly bound. + get c() { + return applyClassDecs(targetClass, classDecs, metadata); + } + }; + }; + + return _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass); +} + +exports._ = _apply_decs_2203_r; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_array_like_to_array.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_array_like_to_array.cjs new file mode 100644 index 0000000000000000000000000000000000000000..0f7d69d9e76e7ca53d41f29f4a3d864e1e335249 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_array_like_to_array.cjs @@ -0,0 +1,10 @@ +"use strict"; + +function _array_like_to_array(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} +exports._ = _array_like_to_array; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_array_with_holes.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_array_with_holes.cjs new file mode 100644 index 0000000000000000000000000000000000000000..42f4e1b26973086051c1467889140adc791025b0 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_array_with_holes.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _array_with_holes(arr) { + if (Array.isArray(arr)) return arr; +} +exports._ = _array_with_holes; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_array_without_holes.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_array_without_holes.cjs new file mode 100644 index 0000000000000000000000000000000000000000..7b3f62339149e229e028447506364d661ce60851 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_array_without_holes.cjs @@ -0,0 +1,8 @@ +"use strict"; + +var _array_like_to_array = require("./_array_like_to_array.cjs"); + +function _array_without_holes(arr) { + if (Array.isArray(arr)) return _array_like_to_array._(arr); +} +exports._ = _array_without_holes; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_assert_this_initialized.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_assert_this_initialized.cjs new file mode 100644 index 0000000000000000000000000000000000000000..e7e220c7cbb9fc0338030bb6aeb46611bf888bde --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_assert_this_initialized.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _assert_this_initialized(self) { + if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + + return self; +} +exports._ = _assert_this_initialized; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_generator.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_generator.cjs new file mode 100644 index 0000000000000000000000000000000000000000..d806ca21dee8ffa5cb2321cfdae598405f1c2b07 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_generator.cjs @@ -0,0 +1,78 @@ +"use strict"; + +var _await_value = require("./_await_value.cjs"); + +function _async_generator(gen) { + var front, back; + + function send(key, arg) { + return new Promise(function(resolve, reject) { + var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null }; + if (back) back = back.next = request; + else { + front = back = request; + resume(key, arg); + } + }); + } + + function resume(key, arg) { + try { + var result = gen[key](arg); + var value = result.value; + var wrappedAwait = value instanceof _await_value._; + Promise.resolve(wrappedAwait ? value.wrapped : value).then(function(arg) { + if (wrappedAwait) { + resume("next", arg); + + return; + } + settle(result.done ? "return" : "normal", arg); + }, function(err) { + resume("throw", err); + }); + } catch (err) { + settle("throw", err); + } + } + + function settle(type, value) { + switch (type) { + case "return": + front.resolve({ value: value, done: true }); + break; + case "throw": + front.reject(value); + break; + default: + front.resolve({ value: value, done: false }); + break; + } + front = front.next; + if (front) resume(front.key, front.arg); + else back = null; + } + + this._invoke = send; + + if (typeof gen.return !== "function") this.return = undefined; +} + +if (typeof Symbol === "function" && Symbol.asyncIterator) { + _async_generator.prototype[Symbol.asyncIterator] = function() { + return this; + }; +} + +_async_generator.prototype.next = function(arg) { + return this._invoke("next", arg); +}; + +_async_generator.prototype.throw = function(arg) { + return this._invoke("throw", arg); +}; + +_async_generator.prototype.return = function(arg) { + return this._invoke("return", arg); +}; +exports._ = _async_generator; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_generator_delegate.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_generator_delegate.cjs new file mode 100644 index 0000000000000000000000000000000000000000..f14d2deb06fd5bc511087ea3228eddcd4506e2a4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_generator_delegate.cjs @@ -0,0 +1,49 @@ +"use strict"; + +function _async_generator_delegate(inner, awaitWrap) { + var iter = {}, waiting = false; + + function pump(key, value) { + waiting = true; + value = new Promise(function(resolve) { + resolve(inner[key](value)); + }); + + return { done: false, value: awaitWrap(value) }; + } + + if (typeof Symbol === "function" && Symbol.iterator) { + iter[Symbol.iterator] = function() { + return this; + }; + } + + iter.next = function(value) { + if (waiting) { + waiting = false; + + return value; + } + + return pump("next", value); + }; + + if (typeof inner.throw === "function") { + iter.throw = function(value) { + if (waiting) { + waiting = false; + throw value; + } + + return pump("throw", value); + }; + } + if (typeof inner.return === "function") { + iter.return = function(value) { + return pump("return", value); + }; + } + + return iter; +} +exports._ = _async_generator_delegate; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_iterator.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_iterator.cjs new file mode 100644 index 0000000000000000000000000000000000000000..aef72537fc79b10c0abfd1f157479bb5b9a60b79 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_iterator.cjs @@ -0,0 +1,46 @@ +"use strict"; + +function _async_iterator(iterable) { + var method, async, sync, retry = 2; + for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { + if (async && null != (method = iterable[async])) return method.call(iterable); + if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); + async = "@@asyncIterator", sync = "@@iterator"; + } + throw new TypeError("Object is not async iterable"); +} +function AsyncFromSyncIterator(s) { + function AsyncFromSyncIteratorContinuation(r) { + if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); + + var done = r.done; + + return Promise.resolve(r.value).then(function(value) { + return { value: value, done: done }; + }); + } + + return AsyncFromSyncIterator = function(s) { + this.s = s, this.n = s.next; + }, + AsyncFromSyncIterator.prototype = { + s: null, + n: null, + + next: function() { + return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); + }, + return: function(value) { + var ret = this.s.return; + + return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); + }, + throw: function(value) { + var thr = this.s.return; + + return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); + } + }, + new AsyncFromSyncIterator(s); +} +exports._ = _async_iterator; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_to_generator.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_to_generator.cjs new file mode 100644 index 0000000000000000000000000000000000000000..b838d476ab9a4bdbc251dfe0cc507436f894e025 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_async_to_generator.cjs @@ -0,0 +1,33 @@ +"use strict"; + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) resolve(value); + else Promise.resolve(value).then(_next, _throw); +} +function _async_to_generator(fn) { + return function() { + var self = this, args = arguments; + + return new Promise(function(resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; +} +exports._ = _async_to_generator; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_await_async_generator.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_await_async_generator.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c7ee729def6d09b2d8e0eb5c59c9eb9b8a4dee2d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_await_async_generator.cjs @@ -0,0 +1,8 @@ +"use strict"; + +var _await_value = require("./_await_value.cjs"); + +function _await_async_generator(value) { + return new _await_value._(value); +} +exports._ = _await_async_generator; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_await_value.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_await_value.cjs new file mode 100644 index 0000000000000000000000000000000000000000..f82ebcdeff69825b5194160feba0ead28d51a370 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_await_value.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _await_value(value) { + this.wrapped = value; +} +exports._ = _await_value; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_call_super.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_call_super.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c4e773346f8921501978757c3be07ab1dabbee85 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_call_super.cjs @@ -0,0 +1,19 @@ +"use strict"; + +var _get_prototype_of = require("./_get_prototype_of.cjs"); +var _is_native_reflect_construct = require("./_is_native_reflect_construct.cjs"); +var _possible_constructor_return = require("./_possible_constructor_return.cjs"); + +function _call_super(_this, derived, args) { + // Super + derived = _get_prototype_of._(derived); + return _possible_constructor_return._( + _this, + _is_native_reflect_construct._() + // NOTE: This doesn't work if this.__proto__.constructor has been modified. + ? Reflect.construct(derived, args || [], _get_prototype_of._(_this).constructor) + : derived.apply(_this, args) + ); +} + +exports._ = _call_super; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_check_private_redeclaration.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_check_private_redeclaration.cjs new file mode 100644 index 0000000000000000000000000000000000000000..40390b827ea1a1424be0563a7d2458ec3882f8f5 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_check_private_redeclaration.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _check_private_redeclaration(obj, privateCollection) { + if (privateCollection.has(obj)) { + throw new TypeError("Cannot initialize the same private elements twice on an object"); + } +} +exports._ = _check_private_redeclaration; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_destructure.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_destructure.cjs new file mode 100644 index 0000000000000000000000000000000000000000..874289ff45ebebe15edcd6a3d3e8b0d1cf8041bf --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_destructure.cjs @@ -0,0 +1,25 @@ +"use strict"; + +function _class_apply_descriptor_destructure(receiver, descriptor) { + if (descriptor.set) { + if (!("__destrObj" in descriptor)) { + descriptor.__destrObj = { + set value(v) { + descriptor.set.call(receiver, v); + } + }; + } + + return descriptor.__destrObj; + } else { + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + + return descriptor; + } +} +exports._ = _class_apply_descriptor_destructure; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_get.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_get.cjs new file mode 100644 index 0000000000000000000000000000000000000000..b9a3f78edbc750ca32f238512ee5ab52effa5c86 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_get.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _class_apply_descriptor_get(receiver, descriptor) { + if (descriptor.get) return descriptor.get.call(receiver); + + return descriptor.value; +} +exports._ = _class_apply_descriptor_get; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_set.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_set.cjs new file mode 100644 index 0000000000000000000000000000000000000000..bcd2c75d877154d17a1261a5e6c8e70d68a85196 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_set.cjs @@ -0,0 +1,15 @@ +"use strict"; + +function _class_apply_descriptor_set(receiver, descriptor, value) { + if (descriptor.set) descriptor.set.call(receiver, value); + else { + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + descriptor.value = value; + } +} +exports._ = _class_apply_descriptor_set; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_update.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_update.cjs new file mode 100644 index 0000000000000000000000000000000000000000..2c3e40fb9e8eb04c7f8b86f59ed83aad19ab4e48 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_apply_descriptor_update.cjs @@ -0,0 +1,30 @@ +"use strict"; + +function _class_apply_descriptor_update(receiver, descriptor) { + if (descriptor.set) { + if (!descriptor.get) throw new TypeError("attempted to read set only private field"); + + if (!("__destrWrapper" in descriptor)) { + descriptor.__destrWrapper = { + set value(v) { + descriptor.set.call(receiver, v); + }, + get value() { + return descriptor.get.call(receiver); + } + }; + } + + return descriptor.__destrWrapper; + } else { + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + + return descriptor; + } +} +exports._ = _class_apply_descriptor_update; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_call_check.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_call_check.cjs new file mode 100644 index 0000000000000000000000000000000000000000..7d41f0d71fc3c9d2c481c0d9a2e7fff8009c03ae --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_call_check.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _class_call_check(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); +} +exports._ = _class_call_check; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_check_private_static_access.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_check_private_static_access.cjs new file mode 100644 index 0000000000000000000000000000000000000000..9adf4d4ba443f6bbe6b1279caade992b4050a669 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_check_private_static_access.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _class_check_private_static_access(receiver, classConstructor) { + if (receiver !== classConstructor) throw new TypeError("Private static access of wrong provenance"); +} +exports._ = _class_check_private_static_access; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_check_private_static_field_descriptor.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_check_private_static_field_descriptor.cjs new file mode 100644 index 0000000000000000000000000000000000000000..e73dce11590c9d2af02b2ec5fd9018c28250131e --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_check_private_static_field_descriptor.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _class_check_private_static_field_descriptor(descriptor, action) { + if (descriptor === undefined) { + throw new TypeError("attempted to " + action + " private static field before its declaration"); + } +} +exports._ = _class_check_private_static_field_descriptor; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_extract_field_descriptor.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_extract_field_descriptor.cjs new file mode 100644 index 0000000000000000000000000000000000000000..16e5106b7f97cce089a840880c6e4b8c5562f3a3 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_extract_field_descriptor.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _class_extract_field_descriptor(receiver, privateMap, action) { + if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance"); + + return privateMap.get(receiver); +} +exports._ = _class_extract_field_descriptor; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_name_tdz_error.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_name_tdz_error.cjs new file mode 100644 index 0000000000000000000000000000000000000000..dfcebae75901e4bf3d518fbb8ce259dcbbc528cf --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_name_tdz_error.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _class_name_tdz_error(name) { + throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys."); +} +exports._ = _class_name_tdz_error; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_destructure.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_destructure.cjs new file mode 100644 index 0000000000000000000000000000000000000000..21a35f73f4f994af6777b399fb512feb6308fd05 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_destructure.cjs @@ -0,0 +1,10 @@ +"use strict"; + +var _class_apply_descriptor_destructure = require("./_class_apply_descriptor_destructure.cjs"); +var _class_extract_field_descriptor = require("./_class_extract_field_descriptor.cjs"); + +function _class_private_field_destructure(receiver, privateMap) { + var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "set"); + return _class_apply_descriptor_destructure._(receiver, descriptor); +} +exports._ = _class_private_field_destructure; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_get.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_get.cjs new file mode 100644 index 0000000000000000000000000000000000000000..8a23b3461c983de7cb4ffa683c230672fd038aa4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_get.cjs @@ -0,0 +1,10 @@ +"use strict"; + +var _class_apply_descriptor_get = require("./_class_apply_descriptor_get.cjs"); +var _class_extract_field_descriptor = require("./_class_extract_field_descriptor.cjs"); + +function _class_private_field_get(receiver, privateMap) { + var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "get"); + return _class_apply_descriptor_get._(receiver, descriptor); +} +exports._ = _class_private_field_get; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_init.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_init.cjs new file mode 100644 index 0000000000000000000000000000000000000000..0b208a0054987a298be54889920743ec370eb364 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_init.cjs @@ -0,0 +1,9 @@ +"use strict"; + +var _check_private_redeclaration = require("./_check_private_redeclaration.cjs"); + +function _class_private_field_init(obj, privateMap, value) { + _check_private_redeclaration._(obj, privateMap); + privateMap.set(obj, value); +} +exports._ = _class_private_field_init; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_loose_base.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_loose_base.cjs new file mode 100644 index 0000000000000000000000000000000000000000..cb0ba0623c29dd134b8a7379c098b1aa6d647086 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_loose_base.cjs @@ -0,0 +1,10 @@ +"use strict"; + +function _class_private_field_loose_base(receiver, privateKey) { + if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { + throw new TypeError("attempted to use private field on non-instance"); + } + + return receiver; +} +exports._ = _class_private_field_loose_base; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_loose_key.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_loose_key.cjs new file mode 100644 index 0000000000000000000000000000000000000000..8301830c0ac352909c9dd07c1b335ccec009eb2d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_loose_key.cjs @@ -0,0 +1,8 @@ +"use strict"; + +var id = 0; + +function _class_private_field_loose_key(name) { + return "__private_" + id++ + "_" + name; +} +exports._ = _class_private_field_loose_key; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_set.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_set.cjs new file mode 100644 index 0000000000000000000000000000000000000000..317e878b64c0b63ee1e132a6b11a08cf5da34f04 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_set.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _class_apply_descriptor_set = require("./_class_apply_descriptor_set.cjs"); +var _class_extract_field_descriptor = require("./_class_extract_field_descriptor.cjs"); + +function _class_private_field_set(receiver, privateMap, value) { + var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "set"); + _class_apply_descriptor_set._(receiver, descriptor, value); + return value; +} +exports._ = _class_private_field_set; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_update.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_update.cjs new file mode 100644 index 0000000000000000000000000000000000000000..2e713fa4f457d1c7756ad8ef9f46b82d04dbd7be --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_field_update.cjs @@ -0,0 +1,10 @@ +"use strict"; + +var _class_apply_descriptor_update = require("./_class_apply_descriptor_update.cjs"); +var _class_extract_field_descriptor = require("./_class_extract_field_descriptor.cjs"); + +function _class_private_field_update(receiver, privateMap) { + var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "update"); + return _class_apply_descriptor_update._(receiver, descriptor); +} +exports._ = _class_private_field_update; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_method_get.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_method_get.cjs new file mode 100644 index 0000000000000000000000000000000000000000..b5ee8b4f4d4c030819c37ae1613eefb79b32bf61 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_method_get.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _class_private_method_get(receiver, privateSet, fn) { + if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance"); + + return fn; +} +exports._ = _class_private_method_get; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_method_init.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_method_init.cjs new file mode 100644 index 0000000000000000000000000000000000000000..1d84b51fce13c9c0b330df607c65e0f3565c384d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_method_init.cjs @@ -0,0 +1,9 @@ +"use strict"; + +var _check_private_redeclaration = require("./_check_private_redeclaration.cjs"); + +function _class_private_method_init(obj, privateSet) { + _check_private_redeclaration._(obj, privateSet); + privateSet.add(obj); +} +exports._ = _class_private_method_init; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_method_set.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_method_set.cjs new file mode 100644 index 0000000000000000000000000000000000000000..db06178e306efe294c7cb0a759f2827e46222ca4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_private_method_set.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _class_private_method_set() { + throw new TypeError("attempted to reassign private method"); +} +exports._ = _class_private_method_set; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_destructure.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_destructure.cjs new file mode 100644 index 0000000000000000000000000000000000000000..512a2e38962e6702a2dcf27496e1e7c2610eff1b --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_destructure.cjs @@ -0,0 +1,13 @@ +"use strict"; + +var _class_apply_descriptor_destructure = require("./_class_apply_descriptor_destructure.cjs"); +var _class_check_private_static_access = require("./_class_check_private_static_access.cjs"); +var _class_check_private_static_field_descriptor = require("./_class_check_private_static_field_descriptor.cjs"); + +function _class_static_private_field_destructure(receiver, classConstructor, descriptor) { + _class_check_private_static_access._(receiver, classConstructor); + _class_check_private_static_field_descriptor._(descriptor, "set"); + + return _class_apply_descriptor_destructure._(receiver, descriptor); +} +exports._ = _class_static_private_field_destructure; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_spec_get.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_spec_get.cjs new file mode 100644 index 0000000000000000000000000000000000000000..43a1f0d00b5c67f2f56097090c53193708e54d51 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_spec_get.cjs @@ -0,0 +1,13 @@ +"use strict"; + +var _class_apply_descriptor_get = require("./_class_apply_descriptor_get.cjs"); +var _class_check_private_static_access = require("./_class_check_private_static_access.cjs"); +var _class_check_private_static_field_descriptor = require("./_class_check_private_static_field_descriptor.cjs"); + +function _class_static_private_field_spec_get(receiver, classConstructor, descriptor) { + _class_check_private_static_access._(receiver, classConstructor); + _class_check_private_static_field_descriptor._(descriptor, "get"); + + return _class_apply_descriptor_get._(receiver, descriptor); +} +exports._ = _class_static_private_field_spec_get; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_spec_set.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_spec_set.cjs new file mode 100644 index 0000000000000000000000000000000000000000..93a69822241d8dfbaab83be35950410a57abc9de --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_spec_set.cjs @@ -0,0 +1,14 @@ +"use strict"; + +var _class_apply_descriptor_set = require("./_class_apply_descriptor_set.cjs"); +var _class_check_private_static_access = require("./_class_check_private_static_access.cjs"); +var _class_check_private_static_field_descriptor = require("./_class_check_private_static_field_descriptor.cjs"); + +function _class_static_private_field_spec_set(receiver, classConstructor, descriptor, value) { + _class_check_private_static_access._(receiver, classConstructor); + _class_check_private_static_field_descriptor._(descriptor, "set"); + _class_apply_descriptor_set._(receiver, descriptor, value); + + return value; +} +exports._ = _class_static_private_field_spec_set; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_update.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_update.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c8ae667865aaeae12336e3e448cecd32aa4ea577 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_field_update.cjs @@ -0,0 +1,13 @@ +"use strict"; + +var _class_apply_descriptor_update = require("./_class_apply_descriptor_update.cjs"); +var _class_check_private_static_access = require("./_class_check_private_static_access.cjs"); +var _class_check_private_static_field_descriptor = require("./_class_check_private_static_field_descriptor.cjs"); + +function _class_static_private_field_update(receiver, classConstructor, descriptor) { + _class_check_private_static_access._(receiver, classConstructor); + _class_check_private_static_field_descriptor._(descriptor, "update"); + + return _class_apply_descriptor_update._(receiver, descriptor); +} +exports._ = _class_static_private_field_update; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_method_get.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_method_get.cjs new file mode 100644 index 0000000000000000000000000000000000000000..3c1506faf5566397df5adcd2b288d9637987ab0f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_class_static_private_method_get.cjs @@ -0,0 +1,10 @@ +"use strict"; + +var _class_check_private_static_access = require("./_class_check_private_static_access.cjs"); + +function _class_static_private_method_get(receiver, classConstructor, method) { + _class_check_private_static_access._(receiver, classConstructor); + + return method; +} +exports._ = _class_static_private_method_get; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_construct.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_construct.cjs new file mode 100644 index 0000000000000000000000000000000000000000..cfd7277d374b269699f54237b495d07bdd1002be --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_construct.cjs @@ -0,0 +1,22 @@ +"use strict"; + +var _is_native_reflect_construct = require("./_is_native_reflect_construct.cjs"); +var _set_prototype_of = require("./_set_prototype_of.cjs"); +function _construct(Parent, args, Class) { + if (_is_native_reflect_construct._()) exports._ = _construct = Reflect.construct; + else { + exports._ = _construct = function construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + + if (Class) _set_prototype_of._(instance, Class.prototype); + + return instance; + }; + } + + return _construct.apply(null, arguments); +} +exports._ = _construct; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_create_class.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_create_class.cjs new file mode 100644 index 0000000000000000000000000000000000000000..1c3fe74a53de887653482cc9801317f3b455fe75 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_create_class.cjs @@ -0,0 +1,20 @@ +"use strict"; + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + + if ("value" in descriptor) descriptor.writable = true; + + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function _create_class(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + + return Constructor; +} +exports._ = _create_class; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_create_for_of_iterator_helper_loose.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_create_for_of_iterator_helper_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..9a5042d3419ab752053858715c3b07dfda0d5225 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_create_for_of_iterator_helper_loose.cjs @@ -0,0 +1,24 @@ +"use strict"; + +var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs"); + +function _create_for_of_iterator_helper_loose(o, allowArrayLike) { + var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; + + if (it) return (it = it.call(o)).next.bind(it); + // Fallback for engines without symbol support + if (Array.isArray(o) || (it = _unsupported_iterable_to_array._(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; + + var i = 0; + + return function() { + if (i >= o.length) return { done: true }; + + return { done: false, value: o[i++] }; + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +exports._ = _create_for_of_iterator_helper_loose; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_create_super.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_create_super.cjs new file mode 100644 index 0000000000000000000000000000000000000000..dc7f3cbd6ed02332a120373ffb8acfbb677fdbef --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_create_super.cjs @@ -0,0 +1,23 @@ +"use strict"; + +var _get_prototype_of = require("./_get_prototype_of.cjs"); +var _is_native_reflect_construct = require("./_is_native_reflect_construct.cjs"); +var _possible_constructor_return = require("./_possible_constructor_return.cjs"); + +function _create_super(Derived) { + var hasNativeReflectConstruct = _is_native_reflect_construct._(); + + return function _createSuperInternal() { + var Super = _get_prototype_of._(Derived), result; + + if (hasNativeReflectConstruct) { + var NewTarget = _get_prototype_of._(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possible_constructor_return._(this, result); + }; +} +exports._ = _create_super; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_decorate.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_decorate.cjs new file mode 100644 index 0000000000000000000000000000000000000000..13b171dacd19eb2db3e8c394510c3358c8a041f5 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_decorate.cjs @@ -0,0 +1,270 @@ +"use strict"; + +var _to_array = require("./_to_array.cjs"); +var _to_property_key = require("./_to_property_key.cjs"); +var _type_of = require("./_type_of.cjs"); + +function _decorate(decorators, factory, superClass) { + var r = factory(function initialize(O) { + _initializeInstanceElements(O, decorated.elements); + }, superClass); + var decorated = _decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators); + _initializeClassElements(r.F, decorated.elements); + + return _runClassFinishers(r.F, decorated.finishers); +} + +function _createElementDescriptor(def) { + var key = _to_property_key._(def.key); + var descriptor; + + if (def.kind === "method") { + descriptor = { value: def.value, writable: true, configurable: true, enumerable: false }; + Object.defineProperty(def.value, "name", { value: _type_of._(key) === "symbol" ? "" : key, configurable: true }); + } else if (def.kind === "get") descriptor = { get: def.value, configurable: true, enumerable: false }; + else if (def.kind === "set") descriptor = { set: def.value, configurable: true, enumerable: false }; + else if (def.kind === "field") descriptor = { configurable: true, writable: true, enumerable: true }; + + var element = { kind: def.kind === "field" ? "field" : "method", key: key, placement: def.static ? "static" : def.kind === "field" ? "own" : "prototype", descriptor: descriptor }; + + if (def.decorators) element.decorators = def.decorators; + + if (def.kind === "field") element.initializer = def.value; + + return element; +} +function _coalesceGetterSetter(element, other) { + if (element.descriptor.get !== undefined) other.descriptor.get = element.descriptor.get; + else other.descriptor.set = element.descriptor.set; +} +function _coalesceClassElements(elements) { + var newElements = []; + var isSameElement = function isSameElement(other) { + return other.kind === "method" && other.key === element.key && other.placement === element.placement; + }; + + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + var other; + + if (element.kind === "method" && (other = newElements.find(isSameElement))) { + if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) { + if (_hasDecorators(element) || _hasDecorators(other)) { + throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated."); + } + other.descriptor = element.descriptor; + } else { + if (_hasDecorators(element)) { + if (_hasDecorators(other)) { + throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ")."); + } + other.decorators = element.decorators; + } + _coalesceGetterSetter(element, other); + } + } else { + newElements.push(element); + } + } + + return newElements; +} +function _hasDecorators(element) { + return element.decorators && element.decorators.length; +} +function _isDataDescriptor(desc) { + return desc !== undefined && !(desc.value === undefined && desc.writable === undefined); +} +function _initializeClassElements(F, elements) { + var proto = F.prototype; + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element) { + var placement = element.placement; + if (element.kind === kind && (placement === "static" || placement === "prototype")) { + var receiver = placement === "static" ? F : proto; + _defineClassElement(receiver, element); + } + }); + }); +} +function _initializeInstanceElements(O, elements) { + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element) { + if (element.kind === kind && element.placement === "own") _defineClassElement(O, element); + }); + }); +} +function _defineClassElement(receiver, element) { + var descriptor = element.descriptor; + if (element.kind === "field") { + var initializer = element.initializer; + descriptor = { enumerable: descriptor.enumerable, writable: descriptor.writable, configurable: descriptor.configurable, value: initializer === void 0 ? void 0 : initializer.call(receiver) }; + } + Object.defineProperty(receiver, element.key, descriptor); +} +function _decorateClass(elements, decorators) { + var newElements = []; + var finishers = []; + var placements = { static: [], prototype: [], own: [] }; + elements.forEach(function(element) { + _addElementPlacement(element, placements); + }); + elements.forEach(function(element) { + if (!_hasDecorators(element)) return newElements.push(element); + var elementFinishersExtras = _decorateElement(element, placements); + newElements.push(elementFinishersExtras.element); + newElements.push.apply(newElements, elementFinishersExtras.extras); + finishers.push.apply(finishers, elementFinishersExtras.finishers); + }); + if (!decorators) return { elements: newElements, finishers: finishers }; + var result = _decorateConstructor(newElements, decorators); + finishers.push.apply(finishers, result.finishers); + result.finishers = finishers; + + return result; +} +function _addElementPlacement(element, placements, silent) { + var keys = placements[element.placement]; + if (!silent && keys.indexOf(element.key) !== -1) throw new TypeError("Duplicated element (" + element.key + ")"); + keys.push(element.key); +} +function _decorateElement(element, placements) { + var extras = []; + var finishers = []; + for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) { + var keys = placements[element.placement]; + keys.splice(keys.indexOf(element.key), 1); + var elementObject = _fromElementDescriptor(element); + var elementFinisherExtras = _toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject); + element = elementFinisherExtras.element; + _addElementPlacement(element, placements); + if (elementFinisherExtras.finisher) finishers.push(elementFinisherExtras.finisher); + var newExtras = elementFinisherExtras.extras; + if (newExtras) { + for (var j = 0; j < newExtras.length; j++) _addElementPlacement(newExtras[j], placements); + extras.push.apply(extras, newExtras); + } + } + + return { element: element, finishers: finishers, extras: extras }; +} +function _decorateConstructor(elements, decorators) { + var finishers = []; + for (var i = decorators.length - 1; i >= 0; i--) { + var obj = _fromClassDescriptor(elements); + var elementsAndFinisher = _toClassDescriptor((0, decorators[i])(obj) || obj); + if (elementsAndFinisher.finisher !== undefined) finishers.push(elementsAndFinisher.finisher); + if (elementsAndFinisher.elements !== undefined) { + elements = elementsAndFinisher.elements; + for (var j = 0; j < elements.length - 1; j++) { + for (var k = j + 1; k < elements.length; k++) { + if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) { + throw new TypeError("Duplicated element (" + elements[j].key + ")"); + } + } + } + } + } + + return { elements: elements, finishers: finishers }; +} +function _fromElementDescriptor(element) { + var obj = { kind: element.kind, key: element.key, placement: element.placement, descriptor: element.descriptor }; + var desc = { value: "Descriptor", configurable: true }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + if (element.kind === "field") obj.initializer = element.initializer; + + return obj; +} +function _toElementDescriptors(elementObjects) { + if (elementObjects === undefined) return; + + return _to_array._(elementObjects).map(function(elementObject) { + var element = _toElementDescriptor(elementObject); + _disallowProperty(elementObject, "finisher", "An element descriptor"); + _disallowProperty(elementObject, "extras", "An element descriptor"); + + return element; + }); +} +function _toElementDescriptor(elementObject) { + var kind = String(elementObject.kind); + if (kind !== "method" && kind !== "field") { + throw new TypeError("An element descriptor's .kind property must be either \"method\" or" + " \"field\", but a decorator created an element descriptor with" + " .kind \"" + kind + "\""); + } + var key = _to_property_key._(elementObject.key); + var placement = String(elementObject.placement); + if (placement !== "static" && placement !== "prototype" && placement !== "own") { + throw new TypeError( + "An element descriptor's .placement property must be one of \"static\"," + + " \"prototype\" or \"own\", but a decorator created an element descriptor" + + " with .placement \"" + + placement + + "\"" + ); + } + var descriptor = elementObject.descriptor; + _disallowProperty(elementObject, "elements", "An element descriptor"); + var element = { kind: kind, key: key, placement: placement, descriptor: Object.assign({}, descriptor) }; + if (kind !== "field") _disallowProperty(elementObject, "initializer", "A method descriptor"); + else { + _disallowProperty(descriptor, "get", "The property descriptor of a field descriptor"); + _disallowProperty(descriptor, "set", "The property descriptor of a field descriptor"); + _disallowProperty(descriptor, "value", "The property descriptor of a field descriptor"); + element.initializer = elementObject.initializer; + } + + return element; +} +function _toElementFinisherExtras(elementObject) { + var element = _toElementDescriptor(elementObject); + var finisher = _optionalCallableProperty(elementObject, "finisher"); + var extras = _toElementDescriptors(elementObject.extras); + + return { element: element, finisher: finisher, extras: extras }; +} +function _fromClassDescriptor(elements) { + var obj = { kind: "class", elements: elements.map(_fromElementDescriptor) }; + var desc = { value: "Descriptor", configurable: true }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + + return obj; +} +function _toClassDescriptor(obj) { + var kind = String(obj.kind); + if (kind !== "class") { + throw new TypeError("A class descriptor's .kind property must be \"class\", but a decorator" + " created a class descriptor with .kind \"" + kind + "\""); + } + _disallowProperty(obj, "key", "A class descriptor"); + _disallowProperty(obj, "placement", "A class descriptor"); + _disallowProperty(obj, "descriptor", "A class descriptor"); + _disallowProperty(obj, "initializer", "A class descriptor"); + _disallowProperty(obj, "extras", "A class descriptor"); + var finisher = _optionalCallableProperty(obj, "finisher"); + var elements = _toElementDescriptors(obj.elements); + + return { elements: elements, finisher: finisher }; +} +function _disallowProperty(obj, name, objectType) { + if (obj[name] !== undefined) throw new TypeError(objectType + " can't have a ." + name + " property."); +} +function _optionalCallableProperty(obj, name) { + var value = obj[name]; + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + + return value; +} +function _runClassFinishers(constructor, finishers) { + for (var i = 0; i < finishers.length; i++) { + var newConstructor = (0, finishers[i])(constructor); + if (newConstructor !== undefined) { + if (typeof newConstructor !== "function") throw new TypeError("Finishers must return a constructor."); + constructor = newConstructor; + } + } + + return constructor; +} +exports._ = _decorate; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_defaults.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_defaults.cjs new file mode 100644 index 0000000000000000000000000000000000000000..eb832e9b24b118062ef36ab70a9011529bde1254 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_defaults.cjs @@ -0,0 +1,15 @@ +"use strict"; + +function _defaults(obj, defaults) { + var keys = Object.getOwnPropertyNames(defaults); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = Object.getOwnPropertyDescriptor(defaults, key); + + if (value && value.configurable && obj[key] === undefined) Object.defineProperty(obj, key, value); + } + + return obj; +} +exports._ = _defaults; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_define_enumerable_properties.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_define_enumerable_properties.cjs new file mode 100644 index 0000000000000000000000000000000000000000..6c4c3343bde30f02f7703a8b4b42835bef67416e --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_define_enumerable_properties.cjs @@ -0,0 +1,26 @@ +"use strict"; + +function _define_enumerable_properties(obj, descs) { + for (var key in descs) { + var desc = descs[key]; + desc.configurable = desc.enumerable = true; + + if ("value" in desc) desc.writable = true; + + Object.defineProperty(obj, key, desc); + } + + if (Object.getOwnPropertySymbols) { + var objectSymbols = Object.getOwnPropertySymbols(descs); + for (var i = 0; i < objectSymbols.length; i++) { + var sym = objectSymbols[i]; + var desc = descs[sym]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + Object.defineProperty(obj, sym, desc); + } + } + + return obj; +} +exports._ = _define_enumerable_properties; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_define_property.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_define_property.cjs new file mode 100644 index 0000000000000000000000000000000000000000..9063d6e99599c50b49fc5826b0777ba93c896598 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_define_property.cjs @@ -0,0 +1,10 @@ +"use strict"; + +function _define_property(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); + } else obj[key] = value; + + return obj; +} +exports._ = _define_property; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_dispose.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_dispose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..5fc3481cb24da1eaf55c08dde6492147fc089752 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_dispose.cjs @@ -0,0 +1,43 @@ +"use strict"; + +/* @minVersion 7.22.0 */ +function dispose_SuppressedError(suppressed, error) { + if (typeof SuppressedError !== "undefined") { + // eslint-disable-next-line no-undef + dispose_SuppressedError = SuppressedError; + } else { + dispose_SuppressedError = function SuppressedError(suppressed, error) { + this.suppressed = suppressed; + this.error = error; + this.stack = new Error().stack; + }; + dispose_SuppressedError.prototype = Object.create(Error.prototype, { constructor: { value: dispose_SuppressedError, writable: true, configurable: true } }); + } + return new dispose_SuppressedError(suppressed, error); +} + +function _dispose(stack, error, hasError) { + function next() { + while (stack.length > 0) { + try { + var r = stack.pop(); + var p = r.d.call(r.v); + if (r.a) return Promise.resolve(p).then(next, err); + } catch (e) { + return err(e); + } + } + if (hasError) throw error; + } + + function err(e) { + error = hasError ? new dispose_SuppressedError(e, error) : e; + hasError = true; + + return next(); + } + + return next(); +} + +exports._ = _dispose; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_export_star.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_export_star.cjs new file mode 100644 index 0000000000000000000000000000000000000000..51af20b9e994163af66aaf53cf58dfa7663e72f8 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_export_star.cjs @@ -0,0 +1,17 @@ +"use strict"; + +function _export_star(from, to) { + Object.keys(from).forEach(function(k) { + if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) { + Object.defineProperty(to, k, { + enumerable: true, + get: function() { + return from[k]; + } + }); + } + }); + + return from; +} +exports._ = _export_star; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_extends.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_extends.cjs new file mode 100644 index 0000000000000000000000000000000000000000..2bb159299b872f6e1a6dafa3e7ca18000a90c186 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_extends.cjs @@ -0,0 +1,15 @@ +"use strict"; + +function _extends() { + exports._ = _extends = Object.assign || function assign(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key]; + } + + return target; + }; + + return _extends.apply(this, arguments); +} +exports._ = _extends; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_get.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_get.cjs new file mode 100644 index 0000000000000000000000000000000000000000..1c5bfcd0044b2c43c1ef7d45b7a292471453cc1f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_get.cjs @@ -0,0 +1,23 @@ +"use strict"; + +var _super_prop_base = require("./_super_prop_base.cjs"); + +function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) exports._ = _get = Reflect.get; + else { + exports._ = _get = function get(target, property, receiver) { + var base = _super_prop_base._(target, property); + + if (!base) return; + + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) return desc.get.call(receiver || target); + + return desc.value; + }; + } + + return _get(target, property, receiver || target); +} +exports._ = _get; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_get_prototype_of.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_get_prototype_of.cjs new file mode 100644 index 0000000000000000000000000000000000000000..6ef956a17db6a42b9af3afd266d8691a010ea7b0 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_get_prototype_of.cjs @@ -0,0 +1,10 @@ +"use strict"; + +function _get_prototype_of(o) { + exports._ = _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + + return _get_prototype_of(o); +} +exports._ = _get_prototype_of; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_identity.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_identity.cjs new file mode 100644 index 0000000000000000000000000000000000000000..aab1b0da75eb0d834eb113a4c90d43932140d5c4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_identity.cjs @@ -0,0 +1,7 @@ +"use strict"; + +function _identity(x) { + return x; +} + +exports._ = _identity; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_inherits.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_inherits.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c803df5ff37af9225c61961cedaa1ef4dae77d22 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_inherits.cjs @@ -0,0 +1,14 @@ +"use strict"; + +var _set_prototype_of = require("./_set_prototype_of.cjs"); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); + + if (superClass) _set_prototype_of._(subClass, superClass); +} +exports._ = _inherits; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_inherits_loose.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_inherits_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..30f35415852b0c2caf116ea045b2d882e4b0dda4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_inherits_loose.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _inherits_loose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; +} +exports._ = _inherits_loose; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_initializer_define_property.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_initializer_define_property.cjs new file mode 100644 index 0000000000000000000000000000000000000000..ac28e5d83ae73e680072ebbca9c061beb1975ab1 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_initializer_define_property.cjs @@ -0,0 +1,13 @@ +"use strict"; + +function _initializer_define_property(target, property, descriptor, context) { + if (!descriptor) return; + + Object.defineProperty(target, property, { + enumerable: descriptor.enumerable, + configurable: descriptor.configurable, + writable: descriptor.writable, + value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 + }); +} +exports._ = _initializer_define_property; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_initializer_warning_helper.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_initializer_warning_helper.cjs new file mode 100644 index 0000000000000000000000000000000000000000..2c333dbb3f7ec41ffb18ec14efc62452ddbabc2a --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_initializer_warning_helper.cjs @@ -0,0 +1,11 @@ +"use strict"; + +function _initializer_warning_helper(descriptor, context) { + throw new Error( + "Decorating class property failed. Please ensure that " + + "proposal-class-properties is enabled and set to use loose mode. " + + "To use proposal-class-properties in spec mode with decorators, wait for " + + "the next major version of decorators in stage 2." + ); +} +exports._ = _initializer_warning_helper; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_instanceof.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_instanceof.cjs new file mode 100644 index 0000000000000000000000000000000000000000..8234b95aae51a0ebf11dbc95d03d3a877a3424dc --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_instanceof.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _instanceof(left, right) { + if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { + return !!right[Symbol.hasInstance](left); + } else return left instanceof right; +} +exports._ = _instanceof; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_default.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_default.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c9e5240c07c154593baef4918909858ab4bf3cb7 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_default.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} +exports._ = _interop_require_default; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs new file mode 100644 index 0000000000000000000000000000000000000000..9c2abcded61a6653b41a2cfece1c1397fc336619 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs @@ -0,0 +1,38 @@ +"use strict"; + +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + + return (_getRequireWildcardCache = function(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} +function _interop_require_wildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) return obj; + if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj }; + + var cache = _getRequireWildcardCache(nodeInterop); + + if (cache && cache.has(obj)) return cache.get(obj); + + var newObj = { __proto__: null }; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + + for (var key in obj) { + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); + else newObj[key] = obj[key]; + } + } + + newObj.default = obj; + + if (cache) cache.set(obj, newObj); + + return newObj; +} +exports._ = _interop_require_wildcard; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_is_native_function.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_is_native_function.cjs new file mode 100644 index 0000000000000000000000000000000000000000..920371163fef3dfac24eb5071a000fa851267055 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_is_native_function.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _is_native_function(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} +exports._ = _is_native_function; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_is_native_reflect_construct.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_is_native_reflect_construct.cjs new file mode 100644 index 0000000000000000000000000000000000000000..42ea82f5a5b4f26255d6fdea9981943b2ae2e67b --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_is_native_reflect_construct.cjs @@ -0,0 +1,18 @@ +"use strict"; + +function _is_native_reflect_construct() { + // Since Reflect.construct can't be properly polyfilled, some + // implementations (e.g. core-js@2) don't set the correct internal slots. + // Those polyfills don't allow us to subclass built-ins, so we need to + // use our fallback implementation. + try { + // If the internal slots aren't set, this throws an error similar to + // TypeError: this is not a Boolean object. + var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); + } catch (_) {} + return (exports._ = _is_native_reflect_construct = function() { + return !!result; + })(); +} + +exports._ = _is_native_reflect_construct; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_iterable_to_array.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_iterable_to_array.cjs new file mode 100644 index 0000000000000000000000000000000000000000..cc73cf5f044421344ca37d30819a69236e8b35a6 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_iterable_to_array.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _iterable_to_array(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) { + return Array.from(iter); + } +} +exports._ = _iterable_to_array; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_iterable_to_array_limit.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_iterable_to_array_limit.cjs new file mode 100644 index 0000000000000000000000000000000000000000..634876bc7ab1d292ef58f75fd308f1cfc6d2d787 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_iterable_to_array_limit.cjs @@ -0,0 +1,31 @@ +"use strict"; + +function _iterable_to_array_limit(arr, i) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + + if (_i == null) return; + + var _arr = []; + var _n = true; + var _d = false; + var _s, _e; + + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} +exports._ = _iterable_to_array_limit; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_iterable_to_array_limit_loose.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_iterable_to_array_limit_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..78ddf90baf79d65ddef6d78a39082ad9606b9e0a --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_iterable_to_array_limit_loose.cjs @@ -0,0 +1,17 @@ +"use strict"; + +function _iterable_to_array_limit_loose(arr, i) { + var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); + + if (_i == null) return; + + var _arr = []; + + for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) { + _arr.push(_step.value); + if (i && _arr.length === i) break; + } + + return _arr; +} +exports._ = _iterable_to_array_limit_loose; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_jsx.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_jsx.cjs new file mode 100644 index 0000000000000000000000000000000000000000..bf1a20b0a75541350287eaca450da98bd317c6d1 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_jsx.cjs @@ -0,0 +1,28 @@ +"use strict"; + +var REACT_ELEMENT_TYPE; +function _jsx(type, props, key, children) { + if (!REACT_ELEMENT_TYPE) { + REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; + } + + var defaultProps = type && type.defaultProps; + var childrenLength = arguments.length - 3; + + if (!props && childrenLength !== 0) props = { children: void 0 }; + if (props && defaultProps) { + for (var propName in defaultProps) { + if (props[propName] === void 0) props[propName] = defaultProps[propName]; + else if (!props) props = defaultProps || {}; + } + } + if (childrenLength === 1) props.children = children; + else if (childrenLength > 1) { + var childArray = new Array(childrenLength); + for (var i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 3]; + props.children = childArray; + } + + return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : "" + key, ref: null, props: props, _owner: null }; +} +exports._ = _jsx; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_new_arrow_check.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_new_arrow_check.cjs new file mode 100644 index 0000000000000000000000000000000000000000..2df59f9cfb0c08c8d75f3dc0e5eeab6218747c51 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_new_arrow_check.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _new_arrow_check(innerThis, boundThis) { + if (innerThis !== boundThis) throw new TypeError("Cannot instantiate an arrow function"); +} +exports._ = _new_arrow_check; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_non_iterable_rest.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_non_iterable_rest.cjs new file mode 100644 index 0000000000000000000000000000000000000000..3baab4b6c8ccb85a52e1c619f14d549dbd75c0ea --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_non_iterable_rest.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _non_iterable_rest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +exports._ = _non_iterable_rest; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_non_iterable_spread.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_non_iterable_spread.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c213de5586d0c8cf40f8f73edb7681c2f000ac2c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_non_iterable_spread.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _non_iterable_spread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +exports._ = _non_iterable_spread; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_destructuring_empty.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_destructuring_empty.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c84fb6686f9dcdfde4af9c5a8837396badb00a9c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_destructuring_empty.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _object_destructuring_empty(o) { + if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o); + + return o; +} +exports._ = _object_destructuring_empty; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_spread.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_spread.cjs new file mode 100644 index 0000000000000000000000000000000000000000..45cec7105d36b48d0a9c80a6a9b27282496393fd --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_spread.cjs @@ -0,0 +1,25 @@ +"use strict"; + +var _define_property = require("./_define_property.cjs"); + +function _object_spread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + + if (typeof Object.getOwnPropertySymbols === "function") { + ownKeys = ownKeys.concat( + Object.getOwnPropertySymbols(source).filter(function(sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + }) + ); + } + + ownKeys.forEach(function(key) { + _define_property._(target, key, source[key]); + }); + } + + return target; +} +exports._ = _object_spread; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_spread_props.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_spread_props.cjs new file mode 100644 index 0000000000000000000000000000000000000000..1c27f1c3a95d32f6ad730dc9889c63629a0b7377 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_spread_props.cjs @@ -0,0 +1,30 @@ +"use strict"; + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) { + symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + keys.push.apply(keys, symbols); + } + + return keys; +} +function _object_spread_props(target, source) { + source = source != null ? source : {}; + + if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + else { + ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + + return target; +} +exports._ = _object_spread_props; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_without_properties.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_without_properties.cjs new file mode 100644 index 0000000000000000000000000000000000000000..2cd10858fc8a04350c2d851bed3824ce1e3f0493 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_without_properties.cjs @@ -0,0 +1,23 @@ +"use strict"; + +var _object_without_properties_loose = require("./_object_without_properties_loose.cjs"); + +function _object_without_properties(source, excluded) { + if (source == null) return {}; + + var target = _object_without_properties_loose._(source, excluded); + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} +exports._ = _object_without_properties; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_without_properties_loose.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_without_properties_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..dc90d6236fa4aa29a288342796d4316e5949dbdb --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_object_without_properties_loose.cjs @@ -0,0 +1,18 @@ +"use strict"; + +function _object_without_properties_loose(source, excluded) { + if (source == null) return {}; + + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} +exports._ = _object_without_properties_loose; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_possible_constructor_return.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_possible_constructor_return.cjs new file mode 100644 index 0000000000000000000000000000000000000000..fa040185b3d5e4f00202c9f64c3817d18814fa8c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_possible_constructor_return.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _assert_this_initialized = require("./_assert_this_initialized.cjs"); +var _type_of = require("./_type_of.cjs"); + +function _possible_constructor_return(self, call) { + if (call && (_type_of._(call) === "object" || typeof call === "function")) return call; + + return _assert_this_initialized._(self); +} +exports._ = _possible_constructor_return; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_read_only_error.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_read_only_error.cjs new file mode 100644 index 0000000000000000000000000000000000000000..302cf5c70e53bd2a1fa71398c4e617afe8e9f5be --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_read_only_error.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _read_only_error(name) { + throw new TypeError("\"" + name + "\" is read-only"); +} +exports._ = _read_only_error; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_set.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_set.cjs new file mode 100644 index 0000000000000000000000000000000000000000..adbf48487a1b1056c1927fb84d8ed741192ebdc8 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_set.cjs @@ -0,0 +1,44 @@ +"use strict"; + +var _define_property = require("./_define_property.cjs"); +var _super_prop_base = require("./_super_prop_base.cjs"); + +function set(target, property, value, receiver) { + if (typeof Reflect !== "undefined" && Reflect.set) set = Reflect.set; + else { + set = function set(target, property, value, receiver) { + var base = _super_prop_base._(target, property); + var desc; + if (base) { + desc = Object.getOwnPropertyDescriptor(base, property); + if (desc.set) { + desc.set.call(receiver, value); + + return true; + } else if (!desc.writable) { + return false; + } + } + desc = Object.getOwnPropertyDescriptor(receiver, property); + if (desc) { + if (!desc.writable) return false; + desc.value = value; + Object.defineProperty(receiver, property, desc); + } else { + _define_property._(receiver, property, value); + } + + return true; + }; + } + + return set(target, property, value, receiver); +} + +function _set(target, property, value, receiver, isStrict) { + var s = set(target, property, value, receiver || target); + if (!s && isStrict) throw new Error("failed to set property"); + + return value; +} +exports._ = _set; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_set_prototype_of.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_set_prototype_of.cjs new file mode 100644 index 0000000000000000000000000000000000000000..acf501dbf761c21cee66cc5d60634d5b34264def --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_set_prototype_of.cjs @@ -0,0 +1,12 @@ +"use strict"; + +function _set_prototype_of(o, p) { + exports._ = _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) { + o.__proto__ = p; + + return o; + }; + + return _set_prototype_of(o, p); +} +exports._ = _set_prototype_of; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_skip_first_generator_next.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_skip_first_generator_next.cjs new file mode 100644 index 0000000000000000000000000000000000000000..e4c42543aa287d14de80e24252a09280a0049273 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_skip_first_generator_next.cjs @@ -0,0 +1,11 @@ +"use strict"; + +function _skip_first_generator_next(fn) { + return function() { + var it = fn.apply(this, arguments); + it.next(); + + return it; + }; +} +exports._ = _skip_first_generator_next; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_sliced_to_array.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_sliced_to_array.cjs new file mode 100644 index 0000000000000000000000000000000000000000..e9fe47e83cbee35010173c2569bb1585d11fdbe6 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_sliced_to_array.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _array_with_holes = require("./_array_with_holes.cjs"); +var _iterable_to_array_limit = require("./_iterable_to_array_limit.cjs"); +var _non_iterable_rest = require("./_non_iterable_rest.cjs"); +var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs"); + +function _sliced_to_array(arr, i) { + return _array_with_holes._(arr) || _iterable_to_array_limit._(arr, i) || _unsupported_iterable_to_array._(arr, i) || _non_iterable_rest._(); +} +exports._ = _sliced_to_array; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_sliced_to_array_loose.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_sliced_to_array_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..562dcaf9d4453037ada352f07a94e0e997034988 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_sliced_to_array_loose.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _array_with_holes = require("./_array_with_holes.cjs"); +var _iterable_to_array_limit_loose = require("./_iterable_to_array_limit_loose.cjs"); +var _non_iterable_rest = require("./_non_iterable_rest.cjs"); +var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs"); + +function _sliced_to_array_loose(arr, i) { + return _array_with_holes._(arr) || _iterable_to_array_limit_loose._(arr, i) || _unsupported_iterable_to_array._(arr, i) || _non_iterable_rest._(); +} +exports._ = _sliced_to_array_loose; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_super_prop_base.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_super_prop_base.cjs new file mode 100644 index 0000000000000000000000000000000000000000..eaf3199a890b9c58b19beba04a337f8cb4b1e926 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_super_prop_base.cjs @@ -0,0 +1,13 @@ +"use strict"; + +var _get_prototype_of = require("./_get_prototype_of.cjs"); + +function _super_prop_base(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = _get_prototype_of._(object); + if (object === null) break; + } + + return object; +} +exports._ = _super_prop_base; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_tagged_template_literal.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_tagged_template_literal.cjs new file mode 100644 index 0000000000000000000000000000000000000000..89a579de132c358b3f2fd58a71a2b9ff5f3063b2 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_tagged_template_literal.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _tagged_template_literal(strings, raw) { + if (!raw) raw = strings.slice(0); + + return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); +} +exports._ = _tagged_template_literal; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..48db14d47462231e12f26d9254d52cd192415f95 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs @@ -0,0 +1,10 @@ +"use strict"; + +function _tagged_template_literal_loose(strings, raw) { + if (!raw) raw = strings.slice(0); + + strings.raw = raw; + + return strings; +} +exports._ = _tagged_template_literal_loose; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_throw.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_throw.cjs new file mode 100644 index 0000000000000000000000000000000000000000..26f2e2ba018d0cf0f2cdb52c0b251bda9fcd3dbd --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_throw.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _throw(e) { + throw e; +} +exports._ = _throw; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_array.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_array.cjs new file mode 100644 index 0000000000000000000000000000000000000000..0887dd4060760cab0714488c9b987da826b0b2bd --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_array.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _array_with_holes = require("./_array_with_holes.cjs"); +var _iterable_to_array = require("./_iterable_to_array.cjs"); +var _non_iterable_rest = require("./_non_iterable_rest.cjs"); +var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs"); + +function _to_array(arr) { + return _array_with_holes._(arr) || _iterable_to_array._(arr) || _unsupported_iterable_to_array._(arr) || _non_iterable_rest._(); +} +exports._ = _to_array; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_consumable_array.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_consumable_array.cjs new file mode 100644 index 0000000000000000000000000000000000000000..85d19126b38d4ff60683b506f49575ccd8bbf113 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_consumable_array.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _array_without_holes = require("./_array_without_holes.cjs"); +var _iterable_to_array = require("./_iterable_to_array.cjs"); +var _non_iterable_spread = require("./_non_iterable_spread.cjs"); +var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs"); + +function _to_consumable_array(arr) { + return _array_without_holes._(arr) || _iterable_to_array._(arr) || _unsupported_iterable_to_array._(arr) || _non_iterable_spread._(); +} +exports._ = _to_consumable_array; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_primitive.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_primitive.cjs new file mode 100644 index 0000000000000000000000000000000000000000..da357948eb267720dd80b6bc6fc421bcfe83efe3 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_primitive.cjs @@ -0,0 +1,18 @@ +"use strict"; + +var _type_of = require("./_type_of.cjs"); + +function _to_primitive(input, hint) { + if (_type_of._(input) !== "object" || input === null) return input; + + var prim = input[Symbol.toPrimitive]; + + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (_type_of._(res) !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + + return (hint === "string" ? String : Number)(input); +} +exports._ = _to_primitive; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_property_key.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_property_key.cjs new file mode 100644 index 0000000000000000000000000000000000000000..86075ac1fe36b44caa437f7d25b2db9abad1b88c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_to_property_key.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _to_primitive = require("./_to_primitive.cjs"); +var _type_of = require("./_type_of.cjs"); + +function _to_property_key(arg) { + var key = _to_primitive._(arg, "string"); + + return _type_of._(key) === "symbol" ? key : String(key); +} +exports._ = _to_property_key; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_add_disposable_resource.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_add_disposable_resource.cjs new file mode 100644 index 0000000000000000000000000000000000000000..24848ca7cfea22633ec3539b67fb3d20390b7580 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_add_disposable_resource.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__addDisposableResource; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_decorate.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_decorate.cjs new file mode 100644 index 0000000000000000000000000000000000000000..9abfbda567683316b489f3bee0e549f0d36ba0e1 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_decorate.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__decorate; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_dispose_resources.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_dispose_resources.cjs new file mode 100644 index 0000000000000000000000000000000000000000..4ad32f10d3b66719e8f0045b5d71ce7cacb07ee9 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_dispose_resources.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__disposeResources; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_generator.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_generator.cjs new file mode 100644 index 0000000000000000000000000000000000000000..6ea3e34db8902e5de5a270f59e7e0b0bbe09fa02 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_generator.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__generator; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_metadata.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_metadata.cjs new file mode 100644 index 0000000000000000000000000000000000000000..d39e6e4142f75e71b49cac326ed3b56d042f8653 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_metadata.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__metadata; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_param.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_param.cjs new file mode 100644 index 0000000000000000000000000000000000000000..6e2dca6eb22386c3885055d133d141275b0290d4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_param.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__param; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_values.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_values.cjs new file mode 100644 index 0000000000000000000000000000000000000000..0696a1f4c19ccc0e955f2ff1f7e935e0f7abc3ff --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_ts_values.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__values; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_type_of.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_type_of.cjs new file mode 100644 index 0000000000000000000000000000000000000000..2749e8e747ac65d61b3c3f6c74a0f39eadf61d29 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_type_of.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _type_of(obj) { + "@swc/helpers - typeof"; + + return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; +} +exports._ = _type_of; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_unsupported_iterable_to_array.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_unsupported_iterable_to_array.cjs new file mode 100644 index 0000000000000000000000000000000000000000..a1765e15272ba0e4ce695a8ed1c11bff0d69882c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_unsupported_iterable_to_array.cjs @@ -0,0 +1,15 @@ +"use strict"; + +var _array_like_to_array = require("./_array_like_to_array.cjs"); + +function _unsupported_iterable_to_array(o, minLen) { + if (!o) return; + if (typeof o === "string") return _array_like_to_array._(o, minLen); + + var n = Object.prototype.toString.call(o).slice(8, -1); + + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(n); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array._(o, minLen); +} +exports._ = _unsupported_iterable_to_array; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_update.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_update.cjs new file mode 100644 index 0000000000000000000000000000000000000000..abb90f34e9ac6c366fba56351914941cec7ab440 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_update.cjs @@ -0,0 +1,16 @@ +"use strict"; + +var _get = require("./_get.cjs"); +var _set = require("./_set.cjs"); + +function _update(target, property, receiver, isStrict) { + return { + get _() { + return _get._(target, property, receiver); + }, + set _(value) { + _set._(target, property, value, receiver, isStrict); + } + }; +} +exports._ = _update; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_using.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_using.cjs new file mode 100644 index 0000000000000000000000000000000000000000..903837e715d5e030bf36184d64da7db430667c1d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_using.cjs @@ -0,0 +1,24 @@ +"use strict"; + +/* @minVersion 7.22.0 */ + +function _using(stack, value, isAwait) { + if (value === null || value === void 0) return value; + if (Object(value) !== value) { + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + } + // core-js-pure uses Symbol.for for polyfilling well-known symbols + if (isAwait) { + var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + } + if (dispose === null || dispose === void 0) { + dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; + } + if (typeof dispose !== "function") { + throw new TypeError(`Property [Symbol.dispose] is not a function.`); + } + stack.push({ v: value, d: dispose, a: isAwait }); + return value; +} + +exports._ = _using; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_using_ctx.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_using_ctx.cjs new file mode 100644 index 0000000000000000000000000000000000000000..921b6efccd618ba68572ba86306a177434e8c4b7 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_using_ctx.cjs @@ -0,0 +1,75 @@ +"use strict"; + +function _using_ctx() { + var _disposeSuppressedError = typeof SuppressedError === "function" + // eslint-disable-next-line no-undef + ? SuppressedError + : (function(error, suppressed) { + var err = new Error(); + err.name = "SuppressedError"; + err.suppressed = suppressed; + err.error = error; + return err; + }), + empty = {}, + stack = []; + function using(isAwait, value) { + if (value != null) { + if (Object(value) !== value) { + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + } + // core-js-pure uses Symbol.for for polyfilling well-known symbols + if (isAwait) { + var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + } + if (dispose == null) { + dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; + } + if (typeof dispose !== "function") { + throw new TypeError(`Property [Symbol.dispose] is not a function.`); + } + stack.push({ v: value, d: dispose, a: isAwait }); + } else if (isAwait) { + // provide the nullish `value` as `d` for minification gain + stack.push({ d: value, a: isAwait }); + } + return value; + } + return { + // error + e: empty, + // using + u: using.bind(null, false), + // await using + a: using.bind(null, true), + // dispose + d: function() { + var error = this.e; + + function next() { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + while ((resource = stack.pop())) { + try { + var resource, disposalResult = resource.d && resource.d.call(resource.v); + if (resource.a) { + return Promise.resolve(disposalResult).then(next, err); + } + } catch (e) { + return err(e); + } + } + if (error !== empty) throw error; + } + + function err(e) { + error = error !== empty ? new _disposeSuppressedError(error, e) : e; + + return next(); + } + + return next(); + } + }; +} + +exports._ = _using_ctx; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_wrap_async_generator.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_wrap_async_generator.cjs new file mode 100644 index 0000000000000000000000000000000000000000..09adf255bb16cc5b98ded429e7bf649df8a45213 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_wrap_async_generator.cjs @@ -0,0 +1,10 @@ +"use strict"; + +var _async_generator = require("./_async_generator.cjs"); + +function _wrap_async_generator(fn) { + return function() { + return new _async_generator._(fn.apply(this, arguments)); + }; +} +exports._ = _wrap_async_generator; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_wrap_native_super.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_wrap_native_super.cjs new file mode 100644 index 0000000000000000000000000000000000000000..6babaefdc47044ba97be92e16ac1b5b7828cc855 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_wrap_native_super.cjs @@ -0,0 +1,28 @@ +"use strict"; + +var _construct = require("./_construct.cjs"); +var _get_prototype_of = require("./_get_prototype_of.cjs"); +var _is_native_function = require("./_is_native_function.cjs"); +var _set_prototype_of = require("./_set_prototype_of.cjs"); + +function _wrap_native_super(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + exports._ = _wrap_native_super = function(Class) { + if (Class === null || !_is_native_function._(Class)) return Class; + if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function"); + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return _construct._(Class, arguments, _get_prototype_of._(this).constructor); + } + Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); + + return _set_prototype_of._(Wrapper, Class); + }; + + return _wrap_native_super(Class); +} +exports._ = _wrap_native_super; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_write_only_error.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_write_only_error.cjs new file mode 100644 index 0000000000000000000000000000000000000000..799fc3a5851d975a4b5c42d8d61145597f63d476 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_write_only_error.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _write_only_error(name) { + throw new TypeError("\"" + name + "\" is write-only"); +} +exports._ = _write_only_error; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/index.cjs b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/index.cjs new file mode 100644 index 0000000000000000000000000000000000000000..a0b5f66292fe567d8fa6e98e9d01e1f65e201deb --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/index.cjs @@ -0,0 +1,423 @@ +"use strict"; + +/* This file is automatically generated and should not be manually edited. */ +/* To modify this file, please run the `npm run build` command instead. */ + +0 && (module.exports = { + /* @Annotate_start: the CommonJS named exports for ESM import in node */ + _apply_decorated_descriptor: null, + _apply_decs_2203_r: null, + _array_like_to_array: null, + _array_with_holes: null, + _array_without_holes: null, + _assert_this_initialized: null, + _async_generator: null, + _async_generator_delegate: null, + _async_iterator: null, + _async_to_generator: null, + _await_async_generator: null, + _await_value: null, + _call_super: null, + _check_private_redeclaration: null, + _class_apply_descriptor_destructure: null, + _class_apply_descriptor_get: null, + _class_apply_descriptor_set: null, + _class_apply_descriptor_update: null, + _class_call_check: null, + _class_check_private_static_access: null, + _class_check_private_static_field_descriptor: null, + _class_extract_field_descriptor: null, + _class_name_tdz_error: null, + _class_private_field_destructure: null, + _class_private_field_get: null, + _class_private_field_init: null, + _class_private_field_loose_base: null, + _class_private_field_loose_key: null, + _class_private_field_set: null, + _class_private_field_update: null, + _class_private_method_get: null, + _class_private_method_init: null, + _class_private_method_set: null, + _class_static_private_field_destructure: null, + _class_static_private_field_spec_get: null, + _class_static_private_field_spec_set: null, + _class_static_private_field_update: null, + _class_static_private_method_get: null, + _construct: null, + _create_class: null, + _create_for_of_iterator_helper_loose: null, + _create_super: null, + _decorate: null, + _defaults: null, + _define_enumerable_properties: null, + _define_property: null, + _dispose: null, + _export_star: null, + _extends: null, + _get: null, + _get_prototype_of: null, + _identity: null, + _inherits: null, + _inherits_loose: null, + _initializer_define_property: null, + _initializer_warning_helper: null, + _instanceof: null, + _interop_require_default: null, + _interop_require_wildcard: null, + _is_native_function: null, + _is_native_reflect_construct: null, + _iterable_to_array: null, + _iterable_to_array_limit: null, + _iterable_to_array_limit_loose: null, + _jsx: null, + _new_arrow_check: null, + _non_iterable_rest: null, + _non_iterable_spread: null, + _object_destructuring_empty: null, + _object_spread: null, + _object_spread_props: null, + _object_without_properties: null, + _object_without_properties_loose: null, + _possible_constructor_return: null, + _read_only_error: null, + _set: null, + _set_prototype_of: null, + _skip_first_generator_next: null, + _sliced_to_array: null, + _sliced_to_array_loose: null, + _super_prop_base: null, + _tagged_template_literal: null, + _tagged_template_literal_loose: null, + _throw: null, + _to_array: null, + _to_consumable_array: null, + _to_primitive: null, + _to_property_key: null, + _ts_add_disposable_resource: null, + _ts_decorate: null, + _ts_dispose_resources: null, + _ts_generator: null, + _ts_metadata: null, + _ts_param: null, + _ts_values: null, + _type_of: null, + _unsupported_iterable_to_array: null, + _update: null, + _using: null, + _using_ctx: null, + _wrap_async_generator: null, + _wrap_native_super: null, + _write_only_error: null + /* @Annotate_end */ +}); +module.exports = { + get _apply_decorated_descriptor() { + return require("./_apply_decorated_descriptor.cjs")._; + }, + get _apply_decs_2203_r() { + return require("./_apply_decs_2203_r.cjs")._; + }, + get _array_like_to_array() { + return require("./_array_like_to_array.cjs")._; + }, + get _array_with_holes() { + return require("./_array_with_holes.cjs")._; + }, + get _array_without_holes() { + return require("./_array_without_holes.cjs")._; + }, + get _assert_this_initialized() { + return require("./_assert_this_initialized.cjs")._; + }, + get _async_generator() { + return require("./_async_generator.cjs")._; + }, + get _async_generator_delegate() { + return require("./_async_generator_delegate.cjs")._; + }, + get _async_iterator() { + return require("./_async_iterator.cjs")._; + }, + get _async_to_generator() { + return require("./_async_to_generator.cjs")._; + }, + get _await_async_generator() { + return require("./_await_async_generator.cjs")._; + }, + get _await_value() { + return require("./_await_value.cjs")._; + }, + get _call_super() { + return require("./_call_super.cjs")._; + }, + get _check_private_redeclaration() { + return require("./_check_private_redeclaration.cjs")._; + }, + get _class_apply_descriptor_destructure() { + return require("./_class_apply_descriptor_destructure.cjs")._; + }, + get _class_apply_descriptor_get() { + return require("./_class_apply_descriptor_get.cjs")._; + }, + get _class_apply_descriptor_set() { + return require("./_class_apply_descriptor_set.cjs")._; + }, + get _class_apply_descriptor_update() { + return require("./_class_apply_descriptor_update.cjs")._; + }, + get _class_call_check() { + return require("./_class_call_check.cjs")._; + }, + get _class_check_private_static_access() { + return require("./_class_check_private_static_access.cjs")._; + }, + get _class_check_private_static_field_descriptor() { + return require("./_class_check_private_static_field_descriptor.cjs")._; + }, + get _class_extract_field_descriptor() { + return require("./_class_extract_field_descriptor.cjs")._; + }, + get _class_name_tdz_error() { + return require("./_class_name_tdz_error.cjs")._; + }, + get _class_private_field_destructure() { + return require("./_class_private_field_destructure.cjs")._; + }, + get _class_private_field_get() { + return require("./_class_private_field_get.cjs")._; + }, + get _class_private_field_init() { + return require("./_class_private_field_init.cjs")._; + }, + get _class_private_field_loose_base() { + return require("./_class_private_field_loose_base.cjs")._; + }, + get _class_private_field_loose_key() { + return require("./_class_private_field_loose_key.cjs")._; + }, + get _class_private_field_set() { + return require("./_class_private_field_set.cjs")._; + }, + get _class_private_field_update() { + return require("./_class_private_field_update.cjs")._; + }, + get _class_private_method_get() { + return require("./_class_private_method_get.cjs")._; + }, + get _class_private_method_init() { + return require("./_class_private_method_init.cjs")._; + }, + get _class_private_method_set() { + return require("./_class_private_method_set.cjs")._; + }, + get _class_static_private_field_destructure() { + return require("./_class_static_private_field_destructure.cjs")._; + }, + get _class_static_private_field_spec_get() { + return require("./_class_static_private_field_spec_get.cjs")._; + }, + get _class_static_private_field_spec_set() { + return require("./_class_static_private_field_spec_set.cjs")._; + }, + get _class_static_private_field_update() { + return require("./_class_static_private_field_update.cjs")._; + }, + get _class_static_private_method_get() { + return require("./_class_static_private_method_get.cjs")._; + }, + get _construct() { + return require("./_construct.cjs")._; + }, + get _create_class() { + return require("./_create_class.cjs")._; + }, + get _create_for_of_iterator_helper_loose() { + return require("./_create_for_of_iterator_helper_loose.cjs")._; + }, + get _create_super() { + return require("./_create_super.cjs")._; + }, + get _decorate() { + return require("./_decorate.cjs")._; + }, + get _defaults() { + return require("./_defaults.cjs")._; + }, + get _define_enumerable_properties() { + return require("./_define_enumerable_properties.cjs")._; + }, + get _define_property() { + return require("./_define_property.cjs")._; + }, + get _dispose() { + return require("./_dispose.cjs")._; + }, + get _export_star() { + return require("./_export_star.cjs")._; + }, + get _extends() { + return require("./_extends.cjs")._; + }, + get _get() { + return require("./_get.cjs")._; + }, + get _get_prototype_of() { + return require("./_get_prototype_of.cjs")._; + }, + get _identity() { + return require("./_identity.cjs")._; + }, + get _inherits() { + return require("./_inherits.cjs")._; + }, + get _inherits_loose() { + return require("./_inherits_loose.cjs")._; + }, + get _initializer_define_property() { + return require("./_initializer_define_property.cjs")._; + }, + get _initializer_warning_helper() { + return require("./_initializer_warning_helper.cjs")._; + }, + get _instanceof() { + return require("./_instanceof.cjs")._; + }, + get _interop_require_default() { + return require("./_interop_require_default.cjs")._; + }, + get _interop_require_wildcard() { + return require("./_interop_require_wildcard.cjs")._; + }, + get _is_native_function() { + return require("./_is_native_function.cjs")._; + }, + get _is_native_reflect_construct() { + return require("./_is_native_reflect_construct.cjs")._; + }, + get _iterable_to_array() { + return require("./_iterable_to_array.cjs")._; + }, + get _iterable_to_array_limit() { + return require("./_iterable_to_array_limit.cjs")._; + }, + get _iterable_to_array_limit_loose() { + return require("./_iterable_to_array_limit_loose.cjs")._; + }, + get _jsx() { + return require("./_jsx.cjs")._; + }, + get _new_arrow_check() { + return require("./_new_arrow_check.cjs")._; + }, + get _non_iterable_rest() { + return require("./_non_iterable_rest.cjs")._; + }, + get _non_iterable_spread() { + return require("./_non_iterable_spread.cjs")._; + }, + get _object_destructuring_empty() { + return require("./_object_destructuring_empty.cjs")._; + }, + get _object_spread() { + return require("./_object_spread.cjs")._; + }, + get _object_spread_props() { + return require("./_object_spread_props.cjs")._; + }, + get _object_without_properties() { + return require("./_object_without_properties.cjs")._; + }, + get _object_without_properties_loose() { + return require("./_object_without_properties_loose.cjs")._; + }, + get _possible_constructor_return() { + return require("./_possible_constructor_return.cjs")._; + }, + get _read_only_error() { + return require("./_read_only_error.cjs")._; + }, + get _set() { + return require("./_set.cjs")._; + }, + get _set_prototype_of() { + return require("./_set_prototype_of.cjs")._; + }, + get _skip_first_generator_next() { + return require("./_skip_first_generator_next.cjs")._; + }, + get _sliced_to_array() { + return require("./_sliced_to_array.cjs")._; + }, + get _sliced_to_array_loose() { + return require("./_sliced_to_array_loose.cjs")._; + }, + get _super_prop_base() { + return require("./_super_prop_base.cjs")._; + }, + get _tagged_template_literal() { + return require("./_tagged_template_literal.cjs")._; + }, + get _tagged_template_literal_loose() { + return require("./_tagged_template_literal_loose.cjs")._; + }, + get _throw() { + return require("./_throw.cjs")._; + }, + get _to_array() { + return require("./_to_array.cjs")._; + }, + get _to_consumable_array() { + return require("./_to_consumable_array.cjs")._; + }, + get _to_primitive() { + return require("./_to_primitive.cjs")._; + }, + get _to_property_key() { + return require("./_to_property_key.cjs")._; + }, + get _ts_add_disposable_resource() { + return require("./_ts_add_disposable_resource.cjs")._; + }, + get _ts_decorate() { + return require("./_ts_decorate.cjs")._; + }, + get _ts_dispose_resources() { + return require("./_ts_dispose_resources.cjs")._; + }, + get _ts_generator() { + return require("./_ts_generator.cjs")._; + }, + get _ts_metadata() { + return require("./_ts_metadata.cjs")._; + }, + get _ts_param() { + return require("./_ts_param.cjs")._; + }, + get _ts_values() { + return require("./_ts_values.cjs")._; + }, + get _type_of() { + return require("./_type_of.cjs")._; + }, + get _unsupported_iterable_to_array() { + return require("./_unsupported_iterable_to_array.cjs")._; + }, + get _update() { + return require("./_update.cjs")._; + }, + get _using() { + return require("./_using.cjs")._; + }, + get _using_ctx() { + return require("./_using_ctx.cjs")._; + }, + get _wrap_async_generator() { + return require("./_wrap_async_generator.cjs")._; + }, + get _wrap_native_super() { + return require("./_wrap_native_super.cjs")._; + }, + get _write_only_error() { + return require("./_write_only_error.cjs")._; + } +}; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_apply_decorated_descriptor.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_apply_decorated_descriptor.js new file mode 100644 index 0000000000000000000000000000000000000000..671db1fb9df3808f32f44503c358c08a304eecfc --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_apply_decorated_descriptor.js @@ -0,0 +1,33 @@ +function _apply_decorated_descriptor(target, property, decorators, descriptor, context) { + var desc = {}; + + Object["ke" + "ys"](descriptor).forEach(function(key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ("value" in desc || desc.initializer) desc.writable = true; + desc = decorators.slice().reverse().reduce(function(desc, decorator) { + return decorator ? decorator(target, property, desc) || desc : desc; + }, desc); + + var hasAccessor = Object.prototype.hasOwnProperty.call(desc, "get") || Object.prototype.hasOwnProperty.call(desc, "set"); + + if (context && desc.initializer !== void 0 && !hasAccessor) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + if (hasAccessor) { + delete desc.writable; + delete desc.initializer; + delete desc.value; + } + if (desc.initializer === void 0) { + Object["define" + "Property"](target, property, desc); + desc = null; + } + + return desc; +} +export { _apply_decorated_descriptor as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_apply_decs_2203_r.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_apply_decs_2203_r.js new file mode 100644 index 0000000000000000000000000000000000000000..bd6d00132336bde26115d8f769610c470701cf0d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_apply_decs_2203_r.js @@ -0,0 +1,548 @@ +/* @minVersion 7.20.0 */ + +/** + Enums are used in this file, but not assigned to vars to avoid non-hoistable values + + CONSTRUCTOR = 0; + PUBLIC = 1; + PRIVATE = 2; + + FIELD = 0; + ACCESSOR = 1; + METHOD = 2; + GETTER = 3; + SETTER = 4; + + STATIC = 5; + + CLASS = 10; // only used in assertValidReturnValue +*/ + +function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) { + function createAddInitializerMethod(initializers, decoratorFinishedRef) { + return function addInitializer(initializer) { + assertNotFinished(decoratorFinishedRef, "addInitializer"); + assertCallable(initializer, "An initializer"); + initializers.push(initializer); + }; + } + + function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) { + var kindStr; + + switch (kind) { + case 1 /* ACCESSOR */: + kindStr = "accessor"; + break; + case 2 /* METHOD */: + kindStr = "method"; + break; + case 3 /* GETTER */: + kindStr = "getter"; + break; + case 4 /* SETTER */: + kindStr = "setter"; + break; + default: + kindStr = "field"; + } + + var ctx = { kind: kindStr, name: isPrivate ? "#" + name : name, static: isStatic, private: isPrivate, metadata: metadata }; + + var decoratorFinishedRef = { v: false }; + + ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef); + + var get, set; + if (kind === 0 /* FIELD */) { + if (isPrivate) { + get = desc.get; + set = desc.set; + } else { + get = function() { + return this[name]; + }; + set = function(v) { + this[name] = v; + }; + } + } else if (kind === 2 /* METHOD */) { + get = function() { + return desc.value; + }; + } else { + // replace with values that will go through the final getter and setter + if (kind === 1 /* ACCESSOR */ || kind === 3 /* GETTER */) { + get = function() { + return desc.get.call(this); + }; + } + + if (kind === 1 /* ACCESSOR */ || kind === 4 /* SETTER */) { + set = function(v) { + desc.set.call(this, v); + }; + } + } + ctx.access = get && set ? { get: get, set: set } : get ? { get: get } : { set: set }; + + try { + return dec(value, ctx); + } finally { + decoratorFinishedRef.v = true; + } + } + + function assertNotFinished(decoratorFinishedRef, fnName) { + if (decoratorFinishedRef.v) { + throw new Error("attempted to call " + fnName + " after decoration was finished"); + } + } + + function assertCallable(fn, hint) { + if (typeof fn !== "function") { + throw new TypeError(hint + " must be a function"); + } + } + + function assertValidReturnValue(kind, value) { + var type = typeof value; + + if (kind === 1 /* ACCESSOR */) { + if (type !== "object" || value === null) { + throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); + } + if (value.get !== undefined) { + assertCallable(value.get, "accessor.get"); + } + if (value.set !== undefined) { + assertCallable(value.set, "accessor.set"); + } + if (value.init !== undefined) { + assertCallable(value.init, "accessor.init"); + } + } else if (type !== "function") { + var hint; + if (kind === 0 /* FIELD */) { + hint = "field"; + } else if (kind === 10 /* CLASS */) { + hint = "class"; + } else { + hint = "method"; + } + throw new TypeError(hint + " decorators must return a function or void 0"); + } + } + + function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) { + var decs = decInfo[0]; + + var desc, init, value; + + if (isPrivate) { + if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) { + desc = { get: decInfo[3], set: decInfo[4] }; + } else if (kind === 3 /* GETTER */) { + desc = { get: decInfo[3] }; + } else if (kind === 4 /* SETTER */) { + desc = { set: decInfo[3] }; + } else { + desc = { value: decInfo[3] }; + } + } else if (kind !== 0 /* FIELD */) { + desc = Object.getOwnPropertyDescriptor(base, name); + } + + if (kind === 1 /* ACCESSOR */) { + value = { get: desc.get, set: desc.set }; + } else if (kind === 2 /* METHOD */) { + value = desc.value; + } else if (kind === 3 /* GETTER */) { + value = desc.get; + } else if (kind === 4 /* SETTER */) { + value = desc.set; + } + + var newValue, get, set; + + if (typeof decs === "function") { + newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value); + + if (newValue !== void 0) { + assertValidReturnValue(kind, newValue); + + if (kind === 0 /* FIELD */) { + init = newValue; + } else if (kind === 1 /* ACCESSOR */) { + init = newValue.init; + get = newValue.get || value.get; + set = newValue.set || value.set; + + value = { get: get, set: set }; + } else { + value = newValue; + } + } + } else { + for (var i = decs.length - 1; i >= 0; i--) { + var dec = decs[i]; + + newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value); + + if (newValue !== void 0) { + assertValidReturnValue(kind, newValue); + var newInit; + + if (kind === 0 /* FIELD */) { + newInit = newValue; + } else if (kind === 1 /* ACCESSOR */) { + newInit = newValue.init; + get = newValue.get || value.get; + set = newValue.set || value.set; + + value = { get: get, set: set }; + } else { + value = newValue; + } + + if (newInit !== void 0) { + if (init === void 0) { + init = newInit; + } else if (typeof init === "function") { + init = [init, newInit]; + } else { + init.push(newInit); + } + } + } + } + } + + if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) { + if (init === void 0) { + // If the initializer was void 0, sub in a dummy initializer + init = function(instance, init) { + return init; + }; + } else if (typeof init !== "function") { + var ownInitializers = init; + + init = function(instance, init) { + var value = init; + + for (var i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value); + + return value; + }; + } else { + var originalInitializer = init; + + init = function(instance, init) { + return originalInitializer.call(instance, init); + }; + } + + ret.push(init); + } + + if (kind !== 0 /* FIELD */) { + if (kind === 1 /* ACCESSOR */) { + desc.get = value.get; + desc.set = value.set; + } else if (kind === 2 /* METHOD */) { + desc.value = value; + } else if (kind === 3 /* GETTER */) { + desc.get = value; + } else if (kind === 4 /* SETTER */) { + desc.set = value; + } + + if (isPrivate) { + if (kind === 1 /* ACCESSOR */) { + ret.push(function(instance, args) { + return value.get.call(instance, args); + }); + ret.push(function(instance, args) { + return value.set.call(instance, args); + }); + } else if (kind === 2 /* METHOD */) { + ret.push(value); + } else { + ret.push(function(instance, args) { + return value.call(instance, args); + }); + } + } else { + Object.defineProperty(base, name, desc); + } + } + } + + function applyMemberDecs(Class, decInfos, metadata) { + var ret = []; + var protoInitializers; + var staticInitializers; + + var existingProtoNonFields = new Map(); + var existingStaticNonFields = new Map(); + + for (var i = 0; i < decInfos.length; i++) { + var decInfo = decInfos[i]; + + // skip computed property names + if (!Array.isArray(decInfo)) continue; + + var kind = decInfo[1]; + var name = decInfo[2]; + var isPrivate = decInfo.length > 3; + + var isStatic = kind >= 5; /* STATIC */ + var base; + var initializers; + + if (isStatic) { + base = Class; + kind = kind - 5 /* STATIC */; + // initialize staticInitializers when we see a non-field static member + staticInitializers = staticInitializers || []; + initializers = staticInitializers; + } else { + base = Class.prototype; + // initialize protoInitializers when we see a non-field member + protoInitializers = protoInitializers || []; + initializers = protoInitializers; + } + + if (kind !== 0 /* FIELD */ && !isPrivate) { + var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields; + + var existingKind = existingNonFields.get(name) || 0; + + if (existingKind === true || (existingKind === 3 /* GETTER */ && kind !== 4) /* SETTER */ || (existingKind === 4 /* SETTER */ && kind !== 3) /* GETTER */) { + throw new Error( + "Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + + name + ); + } else if (!existingKind && kind > 2 /* METHOD */) { + existingNonFields.set(name, kind); + } else { + existingNonFields.set(name, true); + } + } + + applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata); + } + + pushInitializers(ret, protoInitializers); + pushInitializers(ret, staticInitializers); + return ret; + } + + function pushInitializers(ret, initializers) { + if (initializers) { + ret.push(function(instance) { + for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); + return instance; + }); + } + } + + function applyClassDecs(targetClass, classDecs, metadata) { + if (classDecs.length > 0) { + var initializers = []; + var newClass = targetClass; + var name = targetClass.name; + + for (var i = classDecs.length - 1; i >= 0; i--) { + var decoratorFinishedRef = { v: false }; + + try { + var nextNewClass = classDecs[i](newClass, { kind: "class", name: name, addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef), metadata }); + } finally { + decoratorFinishedRef.v = true; + } + + if (nextNewClass !== undefined) { + assertValidReturnValue(10, /* CLASS */ nextNewClass); + newClass = nextNewClass; + } + } + + return [defineMetadata(newClass, metadata), function() { + for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); + }]; + } + // The transformer will not emit assignment when there are no class decorators, + // so we don't have to return an empty array here. + } + + function defineMetadata(Class, metadata) { + return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: true, enumerable: true, value: metadata }); + } + + /** + Basic usage: + + applyDecs( + Class, + [ + // member decorators + [ + dec, // dec or array of decs + 0, // kind of value being decorated + 'prop', // name of public prop on class containing the value being decorated, + '#p', // the name of the private property (if is private, void 0 otherwise), + ] + ], + [ + // class decorators + dec1, dec2 + ] + ) + ``` + + Fully transpiled example: + + ```js + @dec + class Class { + @dec + a = 123; + + @dec + #a = 123; + + @dec + @dec2 + accessor b = 123; + + @dec + accessor #b = 123; + + @dec + c() { console.log('c'); } + + @dec + #c() { console.log('privC'); } + + @dec + get d() { console.log('d'); } + + @dec + get #d() { console.log('privD'); } + + @dec + set e(v) { console.log('e'); } + + @dec + set #e(v) { console.log('privE'); } + } + + + // becomes + let initializeInstance; + let initializeClass; + + let initA; + let initPrivA; + + let initB; + let initPrivB, getPrivB, setPrivB; + + let privC; + let privD; + let privE; + + let Class; + class _Class { + static { + let ret = applyDecs( + this, + [ + [dec, 0, 'a'], + [dec, 0, 'a', (i) => i.#a, (i, v) => i.#a = v], + [[dec, dec2], 1, 'b'], + [dec, 1, 'b', (i) => i.#privBData, (i, v) => i.#privBData = v], + [dec, 2, 'c'], + [dec, 2, 'c', () => console.log('privC')], + [dec, 3, 'd'], + [dec, 3, 'd', () => console.log('privD')], + [dec, 4, 'e'], + [dec, 4, 'e', () => console.log('privE')], + ], + [ + dec + ] + ) + + initA = ret[0]; + + initPrivA = ret[1]; + + initB = ret[2]; + + initPrivB = ret[3]; + getPrivB = ret[4]; + setPrivB = ret[5]; + + privC = ret[6]; + + privD = ret[7]; + + privE = ret[8]; + + initializeInstance = ret[9]; + + Class = ret[10] + + initializeClass = ret[11]; + } + + a = (initializeInstance(this), initA(this, 123)); + + #a = initPrivA(this, 123); + + #bData = initB(this, 123); + get b() { return this.#bData } + set b(v) { this.#bData = v } + + #privBData = initPrivB(this, 123); + get #b() { return getPrivB(this); } + set #b(v) { setPrivB(this, v); } + + c() { console.log('c'); } + + #c(...args) { return privC(this, ...args) } + + get d() { console.log('d'); } + + get #d() { return privD(this); } + + set e(v) { console.log('e'); } + + set #e(v) { privE(this, v); } + } + + initializeClass(Class); + */ + + _apply_decs_2203_r = function(targetClass, memberDecs, classDecs, parentClass) { + if (parentClass !== void 0) { + var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")]; + } + var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata); + var e = applyMemberDecs(targetClass, memberDecs, metadata); + if (!classDecs.length) defineMetadata(targetClass, metadata); + return { + e: e, + // Lazily apply class decorations so that member init locals can be properly bound. + get c() { + return applyClassDecs(targetClass, classDecs, metadata); + } + }; + }; + + return _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass); +} + +export { _apply_decs_2203_r as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_array_like_to_array.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_array_like_to_array.js new file mode 100644 index 0000000000000000000000000000000000000000..eb80534d6f49d7f019cf76feb156c14f6079a643 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_array_like_to_array.js @@ -0,0 +1,8 @@ +function _array_like_to_array(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} +export { _array_like_to_array as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_array_with_holes.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_array_with_holes.js new file mode 100644 index 0000000000000000000000000000000000000000..2532c929d0f531129c8597f08933cf00faad8ed7 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_array_with_holes.js @@ -0,0 +1,4 @@ +function _array_with_holes(arr) { + if (Array.isArray(arr)) return arr; +} +export { _array_with_holes as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_array_without_holes.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_array_without_holes.js new file mode 100644 index 0000000000000000000000000000000000000000..cbdbc3222af81004fc0340df98436b9c2e360b76 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_array_without_holes.js @@ -0,0 +1,6 @@ +import { _ as _array_like_to_array } from "./_array_like_to_array.js"; + +function _array_without_holes(arr) { + if (Array.isArray(arr)) return _array_like_to_array(arr); +} +export { _array_without_holes as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_assert_this_initialized.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_assert_this_initialized.js new file mode 100644 index 0000000000000000000000000000000000000000..0e2830a3ff96ffd43fc14ca94de2f688ddbe468a --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_assert_this_initialized.js @@ -0,0 +1,6 @@ +function _assert_this_initialized(self) { + if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + + return self; +} +export { _assert_this_initialized as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_generator.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_generator.js new file mode 100644 index 0000000000000000000000000000000000000000..76148e32ac909d333ce97078a3a3034e8e5f36b5 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_generator.js @@ -0,0 +1,76 @@ +import { _ as _await_value } from "./_await_value.js"; + +function _async_generator(gen) { + var front, back; + + function send(key, arg) { + return new Promise(function(resolve, reject) { + var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null }; + if (back) back = back.next = request; + else { + front = back = request; + resume(key, arg); + } + }); + } + + function resume(key, arg) { + try { + var result = gen[key](arg); + var value = result.value; + var wrappedAwait = value instanceof _await_value; + Promise.resolve(wrappedAwait ? value.wrapped : value).then(function(arg) { + if (wrappedAwait) { + resume("next", arg); + + return; + } + settle(result.done ? "return" : "normal", arg); + }, function(err) { + resume("throw", err); + }); + } catch (err) { + settle("throw", err); + } + } + + function settle(type, value) { + switch (type) { + case "return": + front.resolve({ value: value, done: true }); + break; + case "throw": + front.reject(value); + break; + default: + front.resolve({ value: value, done: false }); + break; + } + front = front.next; + if (front) resume(front.key, front.arg); + else back = null; + } + + this._invoke = send; + + if (typeof gen.return !== "function") this.return = undefined; +} + +if (typeof Symbol === "function" && Symbol.asyncIterator) { + _async_generator.prototype[Symbol.asyncIterator] = function() { + return this; + }; +} + +_async_generator.prototype.next = function(arg) { + return this._invoke("next", arg); +}; + +_async_generator.prototype.throw = function(arg) { + return this._invoke("throw", arg); +}; + +_async_generator.prototype.return = function(arg) { + return this._invoke("return", arg); +}; +export { _async_generator as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_generator_delegate.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_generator_delegate.js new file mode 100644 index 0000000000000000000000000000000000000000..fb14b23c26d9fcf6d3534b5c82e4b1f463acf825 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_generator_delegate.js @@ -0,0 +1,47 @@ +function _async_generator_delegate(inner, awaitWrap) { + var iter = {}, waiting = false; + + function pump(key, value) { + waiting = true; + value = new Promise(function(resolve) { + resolve(inner[key](value)); + }); + + return { done: false, value: awaitWrap(value) }; + } + + if (typeof Symbol === "function" && Symbol.iterator) { + iter[Symbol.iterator] = function() { + return this; + }; + } + + iter.next = function(value) { + if (waiting) { + waiting = false; + + return value; + } + + return pump("next", value); + }; + + if (typeof inner.throw === "function") { + iter.throw = function(value) { + if (waiting) { + waiting = false; + throw value; + } + + return pump("throw", value); + }; + } + if (typeof inner.return === "function") { + iter.return = function(value) { + return pump("return", value); + }; + } + + return iter; +} +export { _async_generator_delegate as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_iterator.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_iterator.js new file mode 100644 index 0000000000000000000000000000000000000000..b7ffe4cc732a210d45532432bacd1ea059747e38 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_iterator.js @@ -0,0 +1,44 @@ +function _async_iterator(iterable) { + var method, async, sync, retry = 2; + for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { + if (async && null != (method = iterable[async])) return method.call(iterable); + if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); + async = "@@asyncIterator", sync = "@@iterator"; + } + throw new TypeError("Object is not async iterable"); +} +function AsyncFromSyncIterator(s) { + function AsyncFromSyncIteratorContinuation(r) { + if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); + + var done = r.done; + + return Promise.resolve(r.value).then(function(value) { + return { value: value, done: done }; + }); + } + + return AsyncFromSyncIterator = function(s) { + this.s = s, this.n = s.next; + }, + AsyncFromSyncIterator.prototype = { + s: null, + n: null, + + next: function() { + return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); + }, + return: function(value) { + var ret = this.s.return; + + return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); + }, + throw: function(value) { + var thr = this.s.return; + + return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); + } + }, + new AsyncFromSyncIterator(s); +} +export { _async_iterator as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_to_generator.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_to_generator.js new file mode 100644 index 0000000000000000000000000000000000000000..2fcf6ee883d12b1de673cc0b820939b50ae1b63f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_async_to_generator.js @@ -0,0 +1,31 @@ +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) resolve(value); + else Promise.resolve(value).then(_next, _throw); +} +function _async_to_generator(fn) { + return function() { + var self = this, args = arguments; + + return new Promise(function(resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; +} +export { _async_to_generator as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_await_async_generator.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_await_async_generator.js new file mode 100644 index 0000000000000000000000000000000000000000..1ae1df6c50d451205235dfc6e19eb28e69c032b7 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_await_async_generator.js @@ -0,0 +1,6 @@ +import { _ as _await_value } from "./_await_value.js"; + +function _await_async_generator(value) { + return new _await_value(value); +} +export { _await_async_generator as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_await_value.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_await_value.js new file mode 100644 index 0000000000000000000000000000000000000000..33a09128522c1a6e3958375eb204fa2d509cb5b0 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_await_value.js @@ -0,0 +1,4 @@ +function _await_value(value) { + this.wrapped = value; +} +export { _await_value as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_call_super.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_call_super.js new file mode 100644 index 0000000000000000000000000000000000000000..f569d6270c36acfc3c708752dfc2a43dd042257c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_call_super.js @@ -0,0 +1,17 @@ +import { _ as _get_prototype_of } from "./_get_prototype_of.js"; +import { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; +import { _ as _possible_constructor_return } from "./_possible_constructor_return.js"; + +function _call_super(_this, derived, args) { + // Super + derived = _get_prototype_of(derived); + return _possible_constructor_return( + _this, + _is_native_reflect_construct() + // NOTE: This doesn't work if this.__proto__.constructor has been modified. + ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) + : derived.apply(_this, args) + ); +} + +export { _call_super as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_check_private_redeclaration.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_check_private_redeclaration.js new file mode 100644 index 0000000000000000000000000000000000000000..21e96da1a44c80b3a68c708b89cfb54f6e70122f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_check_private_redeclaration.js @@ -0,0 +1,6 @@ +function _check_private_redeclaration(obj, privateCollection) { + if (privateCollection.has(obj)) { + throw new TypeError("Cannot initialize the same private elements twice on an object"); + } +} +export { _check_private_redeclaration as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_destructure.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_destructure.js new file mode 100644 index 0000000000000000000000000000000000000000..9bf79ee8b0d5dd7b54930c1f3ac55b81fa337aaa --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_destructure.js @@ -0,0 +1,23 @@ +function _class_apply_descriptor_destructure(receiver, descriptor) { + if (descriptor.set) { + if (!("__destrObj" in descriptor)) { + descriptor.__destrObj = { + set value(v) { + descriptor.set.call(receiver, v); + } + }; + } + + return descriptor.__destrObj; + } else { + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + + return descriptor; + } +} +export { _class_apply_descriptor_destructure as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js new file mode 100644 index 0000000000000000000000000000000000000000..15c6f2389719bcfc77bb03e6ce48e7839a4dee02 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js @@ -0,0 +1,6 @@ +function _class_apply_descriptor_get(receiver, descriptor) { + if (descriptor.get) return descriptor.get.call(receiver); + + return descriptor.value; +} +export { _class_apply_descriptor_get as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js new file mode 100644 index 0000000000000000000000000000000000000000..75091e1053bb95059ef1f3d92d58212f36b2fdd2 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js @@ -0,0 +1,13 @@ +function _class_apply_descriptor_set(receiver, descriptor, value) { + if (descriptor.set) descriptor.set.call(receiver, value); + else { + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + descriptor.value = value; + } +} +export { _class_apply_descriptor_set as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_update.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_update.js new file mode 100644 index 0000000000000000000000000000000000000000..adf62fb73c159d106abe7e855d1be0a2cc345ae2 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_apply_descriptor_update.js @@ -0,0 +1,28 @@ +function _class_apply_descriptor_update(receiver, descriptor) { + if (descriptor.set) { + if (!descriptor.get) throw new TypeError("attempted to read set only private field"); + + if (!("__destrWrapper" in descriptor)) { + descriptor.__destrWrapper = { + set value(v) { + descriptor.set.call(receiver, v); + }, + get value() { + return descriptor.get.call(receiver); + } + }; + } + + return descriptor.__destrWrapper; + } else { + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + + return descriptor; + } +} +export { _class_apply_descriptor_update as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_call_check.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_call_check.js new file mode 100644 index 0000000000000000000000000000000000000000..f0caf9e3178dde12cddc511c13537fe05afe682c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_call_check.js @@ -0,0 +1,4 @@ +function _class_call_check(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); +} +export { _class_call_check as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_check_private_static_access.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_check_private_static_access.js new file mode 100644 index 0000000000000000000000000000000000000000..380f1d9bcba22a0b884f110a649cd30ec5068355 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_check_private_static_access.js @@ -0,0 +1,4 @@ +function _class_check_private_static_access(receiver, classConstructor) { + if (receiver !== classConstructor) throw new TypeError("Private static access of wrong provenance"); +} +export { _class_check_private_static_access as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_check_private_static_field_descriptor.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_check_private_static_field_descriptor.js new file mode 100644 index 0000000000000000000000000000000000000000..a6a0a7fd6ae7894ddf48adfb1a332d87c96e3e7f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_check_private_static_field_descriptor.js @@ -0,0 +1,6 @@ +function _class_check_private_static_field_descriptor(descriptor, action) { + if (descriptor === undefined) { + throw new TypeError("attempted to " + action + " private static field before its declaration"); + } +} +export { _class_check_private_static_field_descriptor as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js new file mode 100644 index 0000000000000000000000000000000000000000..44ca9e7fbc38b787afb195a10f92092a82b5efef --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js @@ -0,0 +1,6 @@ +function _class_extract_field_descriptor(receiver, privateMap, action) { + if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance"); + + return privateMap.get(receiver); +} +export { _class_extract_field_descriptor as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_name_tdz_error.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_name_tdz_error.js new file mode 100644 index 0000000000000000000000000000000000000000..56620e8d4c63b43633ec47e2c780e7582e6fcc25 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_name_tdz_error.js @@ -0,0 +1,4 @@ +function _class_name_tdz_error(name) { + throw new Error("Class \"" + name + "\" cannot be referenced in computed property keys."); +} +export { _class_name_tdz_error as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_destructure.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_destructure.js new file mode 100644 index 0000000000000000000000000000000000000000..5c624330fee0a0c5eb73240498ae78bc019523e0 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_destructure.js @@ -0,0 +1,8 @@ +import { _ as _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js"; +import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; + +function _class_private_field_destructure(receiver, privateMap) { + var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set"); + return _class_apply_descriptor_destructure(receiver, descriptor); +} +export { _class_private_field_destructure as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_get.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_get.js new file mode 100644 index 0000000000000000000000000000000000000000..078d320a5e9674865ae0e385200a989b3f297752 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_get.js @@ -0,0 +1,8 @@ +import { _ as _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js"; +import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; + +function _class_private_field_get(receiver, privateMap) { + var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get"); + return _class_apply_descriptor_get(receiver, descriptor); +} +export { _class_private_field_get as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_init.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_init.js new file mode 100644 index 0000000000000000000000000000000000000000..3daa81a52643636429ac74afdb25093a01ad2d54 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_init.js @@ -0,0 +1,7 @@ +import { _ as _check_private_redeclaration } from "./_check_private_redeclaration.js"; + +function _class_private_field_init(obj, privateMap, value) { + _check_private_redeclaration(obj, privateMap); + privateMap.set(obj, value); +} +export { _class_private_field_init as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_loose_base.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_loose_base.js new file mode 100644 index 0000000000000000000000000000000000000000..92f4c0729615b45bd27a074830eccf8d9f03ebbd --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_loose_base.js @@ -0,0 +1,8 @@ +function _class_private_field_loose_base(receiver, privateKey) { + if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { + throw new TypeError("attempted to use private field on non-instance"); + } + + return receiver; +} +export { _class_private_field_loose_base as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_loose_key.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_loose_key.js new file mode 100644 index 0000000000000000000000000000000000000000..83e89e7d6e92587fd8d4bf89cc0c1bb67352b6da --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_loose_key.js @@ -0,0 +1,6 @@ +var id = 0; + +function _class_private_field_loose_key(name) { + return "__private_" + id++ + "_" + name; +} +export { _class_private_field_loose_key as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_set.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_set.js new file mode 100644 index 0000000000000000000000000000000000000000..7640b8ea6be6db74c9e0c17cb72084dfef20eeb1 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_set.js @@ -0,0 +1,9 @@ +import { _ as _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js"; +import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; + +function _class_private_field_set(receiver, privateMap, value) { + var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set"); + _class_apply_descriptor_set(receiver, descriptor, value); + return value; +} +export { _class_private_field_set as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_update.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_update.js new file mode 100644 index 0000000000000000000000000000000000000000..d758a17e42e3a1340569bf21cb594578c44f511c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_field_update.js @@ -0,0 +1,8 @@ +import { _ as _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js"; +import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; + +function _class_private_field_update(receiver, privateMap) { + var descriptor = _class_extract_field_descriptor(receiver, privateMap, "update"); + return _class_apply_descriptor_update(receiver, descriptor); +} +export { _class_private_field_update as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_method_get.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_method_get.js new file mode 100644 index 0000000000000000000000000000000000000000..c9d6946fcb2ff4ab321eb95d057f8e4024994ba4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_method_get.js @@ -0,0 +1,6 @@ +function _class_private_method_get(receiver, privateSet, fn) { + if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance"); + + return fn; +} +export { _class_private_method_get as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_method_init.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_method_init.js new file mode 100644 index 0000000000000000000000000000000000000000..f2f4eda710b9f4144d0f17a0e82a5bf3a81ef781 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_method_init.js @@ -0,0 +1,7 @@ +import { _ as _check_private_redeclaration } from "./_check_private_redeclaration.js"; + +function _class_private_method_init(obj, privateSet) { + _check_private_redeclaration(obj, privateSet); + privateSet.add(obj); +} +export { _class_private_method_init as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_method_set.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_method_set.js new file mode 100644 index 0000000000000000000000000000000000000000..98e3be1ca2b2c09f1326800f4fd601de8943607c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_private_method_set.js @@ -0,0 +1,4 @@ +function _class_private_method_set() { + throw new TypeError("attempted to reassign private method"); +} +export { _class_private_method_set as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_destructure.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_destructure.js new file mode 100644 index 0000000000000000000000000000000000000000..1aea463503a55d7f47263ff213febb507f8d0cf8 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_destructure.js @@ -0,0 +1,11 @@ +import { _ as _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js"; +import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; +import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; + +function _class_static_private_field_destructure(receiver, classConstructor, descriptor) { + _class_check_private_static_access(receiver, classConstructor); + _class_check_private_static_field_descriptor(descriptor, "set"); + + return _class_apply_descriptor_destructure(receiver, descriptor); +} +export { _class_static_private_field_destructure as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_spec_get.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_spec_get.js new file mode 100644 index 0000000000000000000000000000000000000000..128476cbabad2619fd9214acb1a473a24ce49e1a --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_spec_get.js @@ -0,0 +1,11 @@ +import { _ as _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js"; +import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; +import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; + +function _class_static_private_field_spec_get(receiver, classConstructor, descriptor) { + _class_check_private_static_access(receiver, classConstructor); + _class_check_private_static_field_descriptor(descriptor, "get"); + + return _class_apply_descriptor_get(receiver, descriptor); +} +export { _class_static_private_field_spec_get as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_spec_set.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_spec_set.js new file mode 100644 index 0000000000000000000000000000000000000000..0137ff7f88dc4d07c7b4fe69b81cc68794e9beec --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_spec_set.js @@ -0,0 +1,12 @@ +import { _ as _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js"; +import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; +import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; + +function _class_static_private_field_spec_set(receiver, classConstructor, descriptor, value) { + _class_check_private_static_access(receiver, classConstructor); + _class_check_private_static_field_descriptor(descriptor, "set"); + _class_apply_descriptor_set(receiver, descriptor, value); + + return value; +} +export { _class_static_private_field_spec_set as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_update.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_update.js new file mode 100644 index 0000000000000000000000000000000000000000..d53d66aed9f9a252d55c368884c552e3ca0fbe7d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_field_update.js @@ -0,0 +1,11 @@ +import { _ as _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js"; +import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; +import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; + +function _class_static_private_field_update(receiver, classConstructor, descriptor) { + _class_check_private_static_access(receiver, classConstructor); + _class_check_private_static_field_descriptor(descriptor, "update"); + + return _class_apply_descriptor_update(receiver, descriptor); +} +export { _class_static_private_field_update as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_method_get.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_method_get.js new file mode 100644 index 0000000000000000000000000000000000000000..d9309f4d9264e5fcad844d337131a2e861700744 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_class_static_private_method_get.js @@ -0,0 +1,8 @@ +import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; + +function _class_static_private_method_get(receiver, classConstructor, method) { + _class_check_private_static_access(receiver, classConstructor); + + return method; +} +export { _class_static_private_method_get as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_construct.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_construct.js new file mode 100644 index 0000000000000000000000000000000000000000..affce786612fe47cebe9bca0e9ad2f9502fcb248 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_construct.js @@ -0,0 +1,20 @@ +import { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; +import { _ as _set_prototype_of } from "./_set_prototype_of.js"; +function _construct(Parent, args, Class) { + if (_is_native_reflect_construct()) _construct = Reflect.construct; + else { + _construct = function construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + + if (Class) _set_prototype_of(instance, Class.prototype); + + return instance; + }; + } + + return _construct.apply(null, arguments); +} +export { _construct as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_create_class.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_create_class.js new file mode 100644 index 0000000000000000000000000000000000000000..f251d98bc64f6ccf67fe4e41876948f8209d1f21 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_create_class.js @@ -0,0 +1,18 @@ +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + + if ("value" in descriptor) descriptor.writable = true; + + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function _create_class(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + + return Constructor; +} +export { _create_class as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_create_for_of_iterator_helper_loose.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_create_for_of_iterator_helper_loose.js new file mode 100644 index 0000000000000000000000000000000000000000..d848f09d1e8144ded2502de2bbdbbf56c8e54af1 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_create_for_of_iterator_helper_loose.js @@ -0,0 +1,22 @@ +import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; + +function _create_for_of_iterator_helper_loose(o, allowArrayLike) { + var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; + + if (it) return (it = it.call(o)).next.bind(it); + // Fallback for engines without symbol support + if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; + + var i = 0; + + return function() { + if (i >= o.length) return { done: true }; + + return { done: false, value: o[i++] }; + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +export { _create_for_of_iterator_helper_loose as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_create_super.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_create_super.js new file mode 100644 index 0000000000000000000000000000000000000000..09b3ec024b965a715b7ede1f1b29f05d2ae1e655 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_create_super.js @@ -0,0 +1,21 @@ +import { _ as _get_prototype_of } from "./_get_prototype_of.js"; +import { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; +import { _ as _possible_constructor_return } from "./_possible_constructor_return.js"; + +function _create_super(Derived) { + var hasNativeReflectConstruct = _is_native_reflect_construct(); + + return function _createSuperInternal() { + var Super = _get_prototype_of(Derived), result; + + if (hasNativeReflectConstruct) { + var NewTarget = _get_prototype_of(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possible_constructor_return(this, result); + }; +} +export { _create_super as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_decorate.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_decorate.js new file mode 100644 index 0000000000000000000000000000000000000000..7131a6dc1a9c73d3470e1ebab981da88731b74a3 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_decorate.js @@ -0,0 +1,268 @@ +import { _ as _to_array } from "./_to_array.js"; +import { _ as _to_property_key } from "./_to_property_key.js"; +import { _ as _type_of } from "./_type_of.js"; + +function _decorate(decorators, factory, superClass) { + var r = factory(function initialize(O) { + _initializeInstanceElements(O, decorated.elements); + }, superClass); + var decorated = _decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators); + _initializeClassElements(r.F, decorated.elements); + + return _runClassFinishers(r.F, decorated.finishers); +} + +function _createElementDescriptor(def) { + var key = _to_property_key(def.key); + var descriptor; + + if (def.kind === "method") { + descriptor = { value: def.value, writable: true, configurable: true, enumerable: false }; + Object.defineProperty(def.value, "name", { value: _type_of(key) === "symbol" ? "" : key, configurable: true }); + } else if (def.kind === "get") descriptor = { get: def.value, configurable: true, enumerable: false }; + else if (def.kind === "set") descriptor = { set: def.value, configurable: true, enumerable: false }; + else if (def.kind === "field") descriptor = { configurable: true, writable: true, enumerable: true }; + + var element = { kind: def.kind === "field" ? "field" : "method", key: key, placement: def.static ? "static" : def.kind === "field" ? "own" : "prototype", descriptor: descriptor }; + + if (def.decorators) element.decorators = def.decorators; + + if (def.kind === "field") element.initializer = def.value; + + return element; +} +function _coalesceGetterSetter(element, other) { + if (element.descriptor.get !== undefined) other.descriptor.get = element.descriptor.get; + else other.descriptor.set = element.descriptor.set; +} +function _coalesceClassElements(elements) { + var newElements = []; + var isSameElement = function isSameElement(other) { + return other.kind === "method" && other.key === element.key && other.placement === element.placement; + }; + + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + var other; + + if (element.kind === "method" && (other = newElements.find(isSameElement))) { + if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) { + if (_hasDecorators(element) || _hasDecorators(other)) { + throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated."); + } + other.descriptor = element.descriptor; + } else { + if (_hasDecorators(element)) { + if (_hasDecorators(other)) { + throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ")."); + } + other.decorators = element.decorators; + } + _coalesceGetterSetter(element, other); + } + } else { + newElements.push(element); + } + } + + return newElements; +} +function _hasDecorators(element) { + return element.decorators && element.decorators.length; +} +function _isDataDescriptor(desc) { + return desc !== undefined && !(desc.value === undefined && desc.writable === undefined); +} +function _initializeClassElements(F, elements) { + var proto = F.prototype; + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element) { + var placement = element.placement; + if (element.kind === kind && (placement === "static" || placement === "prototype")) { + var receiver = placement === "static" ? F : proto; + _defineClassElement(receiver, element); + } + }); + }); +} +function _initializeInstanceElements(O, elements) { + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element) { + if (element.kind === kind && element.placement === "own") _defineClassElement(O, element); + }); + }); +} +function _defineClassElement(receiver, element) { + var descriptor = element.descriptor; + if (element.kind === "field") { + var initializer = element.initializer; + descriptor = { enumerable: descriptor.enumerable, writable: descriptor.writable, configurable: descriptor.configurable, value: initializer === void 0 ? void 0 : initializer.call(receiver) }; + } + Object.defineProperty(receiver, element.key, descriptor); +} +function _decorateClass(elements, decorators) { + var newElements = []; + var finishers = []; + var placements = { static: [], prototype: [], own: [] }; + elements.forEach(function(element) { + _addElementPlacement(element, placements); + }); + elements.forEach(function(element) { + if (!_hasDecorators(element)) return newElements.push(element); + var elementFinishersExtras = _decorateElement(element, placements); + newElements.push(elementFinishersExtras.element); + newElements.push.apply(newElements, elementFinishersExtras.extras); + finishers.push.apply(finishers, elementFinishersExtras.finishers); + }); + if (!decorators) return { elements: newElements, finishers: finishers }; + var result = _decorateConstructor(newElements, decorators); + finishers.push.apply(finishers, result.finishers); + result.finishers = finishers; + + return result; +} +function _addElementPlacement(element, placements, silent) { + var keys = placements[element.placement]; + if (!silent && keys.indexOf(element.key) !== -1) throw new TypeError("Duplicated element (" + element.key + ")"); + keys.push(element.key); +} +function _decorateElement(element, placements) { + var extras = []; + var finishers = []; + for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) { + var keys = placements[element.placement]; + keys.splice(keys.indexOf(element.key), 1); + var elementObject = _fromElementDescriptor(element); + var elementFinisherExtras = _toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject); + element = elementFinisherExtras.element; + _addElementPlacement(element, placements); + if (elementFinisherExtras.finisher) finishers.push(elementFinisherExtras.finisher); + var newExtras = elementFinisherExtras.extras; + if (newExtras) { + for (var j = 0; j < newExtras.length; j++) _addElementPlacement(newExtras[j], placements); + extras.push.apply(extras, newExtras); + } + } + + return { element: element, finishers: finishers, extras: extras }; +} +function _decorateConstructor(elements, decorators) { + var finishers = []; + for (var i = decorators.length - 1; i >= 0; i--) { + var obj = _fromClassDescriptor(elements); + var elementsAndFinisher = _toClassDescriptor((0, decorators[i])(obj) || obj); + if (elementsAndFinisher.finisher !== undefined) finishers.push(elementsAndFinisher.finisher); + if (elementsAndFinisher.elements !== undefined) { + elements = elementsAndFinisher.elements; + for (var j = 0; j < elements.length - 1; j++) { + for (var k = j + 1; k < elements.length; k++) { + if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) { + throw new TypeError("Duplicated element (" + elements[j].key + ")"); + } + } + } + } + } + + return { elements: elements, finishers: finishers }; +} +function _fromElementDescriptor(element) { + var obj = { kind: element.kind, key: element.key, placement: element.placement, descriptor: element.descriptor }; + var desc = { value: "Descriptor", configurable: true }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + if (element.kind === "field") obj.initializer = element.initializer; + + return obj; +} +function _toElementDescriptors(elementObjects) { + if (elementObjects === undefined) return; + + return _to_array(elementObjects).map(function(elementObject) { + var element = _toElementDescriptor(elementObject); + _disallowProperty(elementObject, "finisher", "An element descriptor"); + _disallowProperty(elementObject, "extras", "An element descriptor"); + + return element; + }); +} +function _toElementDescriptor(elementObject) { + var kind = String(elementObject.kind); + if (kind !== "method" && kind !== "field") { + throw new TypeError("An element descriptor's .kind property must be either \"method\" or" + " \"field\", but a decorator created an element descriptor with" + " .kind \"" + kind + "\""); + } + var key = _to_property_key(elementObject.key); + var placement = String(elementObject.placement); + if (placement !== "static" && placement !== "prototype" && placement !== "own") { + throw new TypeError( + "An element descriptor's .placement property must be one of \"static\"," + + " \"prototype\" or \"own\", but a decorator created an element descriptor" + + " with .placement \"" + + placement + + "\"" + ); + } + var descriptor = elementObject.descriptor; + _disallowProperty(elementObject, "elements", "An element descriptor"); + var element = { kind: kind, key: key, placement: placement, descriptor: Object.assign({}, descriptor) }; + if (kind !== "field") _disallowProperty(elementObject, "initializer", "A method descriptor"); + else { + _disallowProperty(descriptor, "get", "The property descriptor of a field descriptor"); + _disallowProperty(descriptor, "set", "The property descriptor of a field descriptor"); + _disallowProperty(descriptor, "value", "The property descriptor of a field descriptor"); + element.initializer = elementObject.initializer; + } + + return element; +} +function _toElementFinisherExtras(elementObject) { + var element = _toElementDescriptor(elementObject); + var finisher = _optionalCallableProperty(elementObject, "finisher"); + var extras = _toElementDescriptors(elementObject.extras); + + return { element: element, finisher: finisher, extras: extras }; +} +function _fromClassDescriptor(elements) { + var obj = { kind: "class", elements: elements.map(_fromElementDescriptor) }; + var desc = { value: "Descriptor", configurable: true }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + + return obj; +} +function _toClassDescriptor(obj) { + var kind = String(obj.kind); + if (kind !== "class") { + throw new TypeError("A class descriptor's .kind property must be \"class\", but a decorator" + " created a class descriptor with .kind \"" + kind + "\""); + } + _disallowProperty(obj, "key", "A class descriptor"); + _disallowProperty(obj, "placement", "A class descriptor"); + _disallowProperty(obj, "descriptor", "A class descriptor"); + _disallowProperty(obj, "initializer", "A class descriptor"); + _disallowProperty(obj, "extras", "A class descriptor"); + var finisher = _optionalCallableProperty(obj, "finisher"); + var elements = _toElementDescriptors(obj.elements); + + return { elements: elements, finisher: finisher }; +} +function _disallowProperty(obj, name, objectType) { + if (obj[name] !== undefined) throw new TypeError(objectType + " can't have a ." + name + " property."); +} +function _optionalCallableProperty(obj, name) { + var value = obj[name]; + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + + return value; +} +function _runClassFinishers(constructor, finishers) { + for (var i = 0; i < finishers.length; i++) { + var newConstructor = (0, finishers[i])(constructor); + if (newConstructor !== undefined) { + if (typeof newConstructor !== "function") throw new TypeError("Finishers must return a constructor."); + constructor = newConstructor; + } + } + + return constructor; +} +export { _decorate as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_defaults.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_defaults.js new file mode 100644 index 0000000000000000000000000000000000000000..de0bc0cbce96200cb9709553d2a3e31198c9ee89 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_defaults.js @@ -0,0 +1,13 @@ +function _defaults(obj, defaults) { + var keys = Object.getOwnPropertyNames(defaults); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = Object.getOwnPropertyDescriptor(defaults, key); + + if (value && value.configurable && obj[key] === undefined) Object.defineProperty(obj, key, value); + } + + return obj; +} +export { _defaults as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_define_enumerable_properties.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_define_enumerable_properties.js new file mode 100644 index 0000000000000000000000000000000000000000..7e184ef6973396c6beda4287bbb977d6ac59100c --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_define_enumerable_properties.js @@ -0,0 +1,24 @@ +function _define_enumerable_properties(obj, descs) { + for (var key in descs) { + var desc = descs[key]; + desc.configurable = desc.enumerable = true; + + if ("value" in desc) desc.writable = true; + + Object.defineProperty(obj, key, desc); + } + + if (Object.getOwnPropertySymbols) { + var objectSymbols = Object.getOwnPropertySymbols(descs); + for (var i = 0; i < objectSymbols.length; i++) { + var sym = objectSymbols[i]; + var desc = descs[sym]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + Object.defineProperty(obj, sym, desc); + } + } + + return obj; +} +export { _define_enumerable_properties as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_define_property.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_define_property.js new file mode 100644 index 0000000000000000000000000000000000000000..fe259f2a5e3b088a56f02439f2a282e42da82231 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_define_property.js @@ -0,0 +1,8 @@ +function _define_property(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); + } else obj[key] = value; + + return obj; +} +export { _define_property as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_dispose.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_dispose.js new file mode 100644 index 0000000000000000000000000000000000000000..8e0837318aed14b09cb507df61a34eb40cb594c7 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_dispose.js @@ -0,0 +1,41 @@ +/* @minVersion 7.22.0 */ +function dispose_SuppressedError(suppressed, error) { + if (typeof SuppressedError !== "undefined") { + // eslint-disable-next-line no-undef + dispose_SuppressedError = SuppressedError; + } else { + dispose_SuppressedError = function SuppressedError(suppressed, error) { + this.suppressed = suppressed; + this.error = error; + this.stack = new Error().stack; + }; + dispose_SuppressedError.prototype = Object.create(Error.prototype, { constructor: { value: dispose_SuppressedError, writable: true, configurable: true } }); + } + return new dispose_SuppressedError(suppressed, error); +} + +function _dispose(stack, error, hasError) { + function next() { + while (stack.length > 0) { + try { + var r = stack.pop(); + var p = r.d.call(r.v); + if (r.a) return Promise.resolve(p).then(next, err); + } catch (e) { + return err(e); + } + } + if (hasError) throw error; + } + + function err(e) { + error = hasError ? new dispose_SuppressedError(e, error) : e; + hasError = true; + + return next(); + } + + return next(); +} + +export { _dispose as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_export_star.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_export_star.js new file mode 100644 index 0000000000000000000000000000000000000000..98789f732c4d852ac6dc1d017dd07dba914066dc --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_export_star.js @@ -0,0 +1,15 @@ +function _export_star(from, to) { + Object.keys(from).forEach(function(k) { + if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) { + Object.defineProperty(to, k, { + enumerable: true, + get: function() { + return from[k]; + } + }); + } + }); + + return from; +} +export { _export_star as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_extends.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_extends.js new file mode 100644 index 0000000000000000000000000000000000000000..7baa58ee45c735a305b73134cb4956795d17aef0 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_extends.js @@ -0,0 +1,13 @@ +function _extends() { + _extends = Object.assign || function assign(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key]; + } + + return target; + }; + + return _extends.apply(this, arguments); +} +export { _extends as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_get.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_get.js new file mode 100644 index 0000000000000000000000000000000000000000..0d5fd28157c0ebc6df5276e1231e7b7d2cc3551f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_get.js @@ -0,0 +1,21 @@ +import { _ as _super_prop_base } from "./_super_prop_base.js"; + +function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) _get = Reflect.get; + else { + _get = function get(target, property, receiver) { + var base = _super_prop_base(target, property); + + if (!base) return; + + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) return desc.get.call(receiver || target); + + return desc.value; + }; + } + + return _get(target, property, receiver || target); +} +export { _get as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_get_prototype_of.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_get_prototype_of.js new file mode 100644 index 0000000000000000000000000000000000000000..951dd01d2996418f5b143a4e1aa241368d68330f --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_get_prototype_of.js @@ -0,0 +1,8 @@ +function _get_prototype_of(o) { + _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + + return _get_prototype_of(o); +} +export { _get_prototype_of as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_identity.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_identity.js new file mode 100644 index 0000000000000000000000000000000000000000..9af20108a23cc8e8a53ffd938abf2a503f8089ff --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_identity.js @@ -0,0 +1,5 @@ +function _identity(x) { + return x; +} + +export { _identity as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_inherits.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_inherits.js new file mode 100644 index 0000000000000000000000000000000000000000..563d0d25fd705539ca9b6c21e993a4b1f9ec089b --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_inherits.js @@ -0,0 +1,12 @@ +import { _ as _set_prototype_of } from "./_set_prototype_of.js"; + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); + + if (superClass) _set_prototype_of(subClass, superClass); +} +export { _inherits as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_inherits_loose.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_inherits_loose.js new file mode 100644 index 0000000000000000000000000000000000000000..d222f69fc6064fad2d216b37d6c5bfa1cab61db8 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_inherits_loose.js @@ -0,0 +1,6 @@ +function _inherits_loose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; +} +export { _inherits_loose as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_initializer_define_property.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_initializer_define_property.js new file mode 100644 index 0000000000000000000000000000000000000000..396946028ea216baa1e8352d7eaf8ba8573eb0d4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_initializer_define_property.js @@ -0,0 +1,11 @@ +function _initializer_define_property(target, property, descriptor, context) { + if (!descriptor) return; + + Object.defineProperty(target, property, { + enumerable: descriptor.enumerable, + configurable: descriptor.configurable, + writable: descriptor.writable, + value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 + }); +} +export { _initializer_define_property as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_initializer_warning_helper.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_initializer_warning_helper.js new file mode 100644 index 0000000000000000000000000000000000000000..2590876ef35969021d554d06d0fa947a95842572 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_initializer_warning_helper.js @@ -0,0 +1,9 @@ +function _initializer_warning_helper(descriptor, context) { + throw new Error( + "Decorating class property failed. Please ensure that " + + "proposal-class-properties is enabled and set to use loose mode. " + + "To use proposal-class-properties in spec mode with decorators, wait for " + + "the next major version of decorators in stage 2." + ); +} +export { _initializer_warning_helper as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_instanceof.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_instanceof.js new file mode 100644 index 0000000000000000000000000000000000000000..ba3a66180e6e7d9dbc78ba6f319237d977db6e1b --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_instanceof.js @@ -0,0 +1,6 @@ +function _instanceof(left, right) { + if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { + return !!right[Symbol.hasInstance](left); + } else return left instanceof right; +} +export { _instanceof as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_interop_require_default.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_interop_require_default.js new file mode 100644 index 0000000000000000000000000000000000000000..12458929e47122d60e870bbe19af56522a3bf106 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_interop_require_default.js @@ -0,0 +1,4 @@ +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} +export { _interop_require_default as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_interop_require_wildcard.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_interop_require_wildcard.js new file mode 100644 index 0000000000000000000000000000000000000000..fd78233b3d31e0df33707646b175a74eddb872ec --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_interop_require_wildcard.js @@ -0,0 +1,36 @@ +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + + return (_getRequireWildcardCache = function(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} +function _interop_require_wildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) return obj; + if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj }; + + var cache = _getRequireWildcardCache(nodeInterop); + + if (cache && cache.has(obj)) return cache.get(obj); + + var newObj = { __proto__: null }; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + + for (var key in obj) { + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); + else newObj[key] = obj[key]; + } + } + + newObj.default = obj; + + if (cache) cache.set(obj, newObj); + + return newObj; +} +export { _interop_require_wildcard as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_is_native_function.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_is_native_function.js new file mode 100644 index 0000000000000000000000000000000000000000..c7cf198731b57e5a3604e114f26e40acf9fda9f9 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_is_native_function.js @@ -0,0 +1,4 @@ +function _is_native_function(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} +export { _is_native_function as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_is_native_reflect_construct.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_is_native_reflect_construct.js new file mode 100644 index 0000000000000000000000000000000000000000..af04603219bbe74a961e2d97e755121f504b5562 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_is_native_reflect_construct.js @@ -0,0 +1,16 @@ +function _is_native_reflect_construct() { + // Since Reflect.construct can't be properly polyfilled, some + // implementations (e.g. core-js@2) don't set the correct internal slots. + // Those polyfills don't allow us to subclass built-ins, so we need to + // use our fallback implementation. + try { + // If the internal slots aren't set, this throws an error similar to + // TypeError: this is not a Boolean object. + var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); + } catch (_) {} + return (_is_native_reflect_construct = function() { + return !!result; + })(); +} + +export { _is_native_reflect_construct as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_iterable_to_array.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_iterable_to_array.js new file mode 100644 index 0000000000000000000000000000000000000000..e44dfb002305add6b2023deeae15bb9b6f9e6924 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_iterable_to_array.js @@ -0,0 +1,6 @@ +function _iterable_to_array(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) { + return Array.from(iter); + } +} +export { _iterable_to_array as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_iterable_to_array_limit.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_iterable_to_array_limit.js new file mode 100644 index 0000000000000000000000000000000000000000..1ce2bc94b3654416919ceb097987202861b1fdd3 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_iterable_to_array_limit.js @@ -0,0 +1,29 @@ +function _iterable_to_array_limit(arr, i) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + + if (_i == null) return; + + var _arr = []; + var _n = true; + var _d = false; + var _s, _e; + + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} +export { _iterable_to_array_limit as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_iterable_to_array_limit_loose.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_iterable_to_array_limit_loose.js new file mode 100644 index 0000000000000000000000000000000000000000..2369e8b6858d5703212d76599cc73c1b05cce98a --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_iterable_to_array_limit_loose.js @@ -0,0 +1,15 @@ +function _iterable_to_array_limit_loose(arr, i) { + var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); + + if (_i == null) return; + + var _arr = []; + + for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) { + _arr.push(_step.value); + if (i && _arr.length === i) break; + } + + return _arr; +} +export { _iterable_to_array_limit_loose as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_jsx.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_jsx.js new file mode 100644 index 0000000000000000000000000000000000000000..0695535c02077402a4c60ee231de9730583886d4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_jsx.js @@ -0,0 +1,26 @@ +var REACT_ELEMENT_TYPE; +function _jsx(type, props, key, children) { + if (!REACT_ELEMENT_TYPE) { + REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; + } + + var defaultProps = type && type.defaultProps; + var childrenLength = arguments.length - 3; + + if (!props && childrenLength !== 0) props = { children: void 0 }; + if (props && defaultProps) { + for (var propName in defaultProps) { + if (props[propName] === void 0) props[propName] = defaultProps[propName]; + else if (!props) props = defaultProps || {}; + } + } + if (childrenLength === 1) props.children = children; + else if (childrenLength > 1) { + var childArray = new Array(childrenLength); + for (var i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 3]; + props.children = childArray; + } + + return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : "" + key, ref: null, props: props, _owner: null }; +} +export { _jsx as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_new_arrow_check.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_new_arrow_check.js new file mode 100644 index 0000000000000000000000000000000000000000..0651b3c550d2d12e6855b84167015dd2b1d86e17 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_new_arrow_check.js @@ -0,0 +1,4 @@ +function _new_arrow_check(innerThis, boundThis) { + if (innerThis !== boundThis) throw new TypeError("Cannot instantiate an arrow function"); +} +export { _new_arrow_check as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_non_iterable_rest.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_non_iterable_rest.js new file mode 100644 index 0000000000000000000000000000000000000000..b41d9c237199d2441241083fbacce824805d1e56 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_non_iterable_rest.js @@ -0,0 +1,4 @@ +function _non_iterable_rest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +export { _non_iterable_rest as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_non_iterable_spread.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_non_iterable_spread.js new file mode 100644 index 0000000000000000000000000000000000000000..fd7b50e72a3e57ff9b44167297c23e36a1e181e4 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_non_iterable_spread.js @@ -0,0 +1,4 @@ +function _non_iterable_spread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +export { _non_iterable_spread as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_destructuring_empty.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_destructuring_empty.js new file mode 100644 index 0000000000000000000000000000000000000000..97a6dd750cfd9e740dbd02ef5fb3a9158fb2cb4d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_destructuring_empty.js @@ -0,0 +1,6 @@ +function _object_destructuring_empty(o) { + if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o); + + return o; +} +export { _object_destructuring_empty as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_spread.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_spread.js new file mode 100644 index 0000000000000000000000000000000000000000..a71c747f5d857a1d7776c14469350fd2f6a30dc1 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_spread.js @@ -0,0 +1,23 @@ +import { _ as _define_property } from "./_define_property.js"; + +function _object_spread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + + if (typeof Object.getOwnPropertySymbols === "function") { + ownKeys = ownKeys.concat( + Object.getOwnPropertySymbols(source).filter(function(sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + }) + ); + } + + ownKeys.forEach(function(key) { + _define_property(target, key, source[key]); + }); + } + + return target; +} +export { _object_spread as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_spread_props.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_spread_props.js new file mode 100644 index 0000000000000000000000000000000000000000..88593ee348d78afedbd90c5a69f79b5e668de247 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_spread_props.js @@ -0,0 +1,28 @@ +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) { + symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + keys.push.apply(keys, symbols); + } + + return keys; +} +function _object_spread_props(target, source) { + source = source != null ? source : {}; + + if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + else { + ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + + return target; +} +export { _object_spread_props as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_without_properties.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_without_properties.js new file mode 100644 index 0000000000000000000000000000000000000000..bb63487b12f2744710f3103cdb763fa2745c2d5e --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_without_properties.js @@ -0,0 +1,21 @@ +import { _ as _object_without_properties_loose } from "./_object_without_properties_loose.js"; + +function _object_without_properties(source, excluded) { + if (source == null) return {}; + + var target = _object_without_properties_loose(source, excluded); + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} +export { _object_without_properties as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_without_properties_loose.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_without_properties_loose.js new file mode 100644 index 0000000000000000000000000000000000000000..db7b040e36f8780c93a9f7336c18605b50b925fe --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_object_without_properties_loose.js @@ -0,0 +1,16 @@ +function _object_without_properties_loose(source, excluded) { + if (source == null) return {}; + + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} +export { _object_without_properties_loose as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_possible_constructor_return.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_possible_constructor_return.js new file mode 100644 index 0000000000000000000000000000000000000000..b07f39070b46bc30a040454b5951fd9c11c7f06d --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_possible_constructor_return.js @@ -0,0 +1,9 @@ +import { _ as _assert_this_initialized } from "./_assert_this_initialized.js"; +import { _ as _type_of } from "./_type_of.js"; + +function _possible_constructor_return(self, call) { + if (call && (_type_of(call) === "object" || typeof call === "function")) return call; + + return _assert_this_initialized(self); +} +export { _possible_constructor_return as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_read_only_error.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_read_only_error.js new file mode 100644 index 0000000000000000000000000000000000000000..4b63ee3ea3bd8ecd51b09a4e3c2a3694c8db01cd --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_read_only_error.js @@ -0,0 +1,4 @@ +function _read_only_error(name) { + throw new TypeError("\"" + name + "\" is read-only"); +} +export { _read_only_error as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_set.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_set.js new file mode 100644 index 0000000000000000000000000000000000000000..15dc2f1b6eb0a05f8d15f7c5bfcda6cb12488c20 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_set.js @@ -0,0 +1,42 @@ +import { _ as _define_property } from "./_define_property.js"; +import { _ as _super_prop_base } from "./_super_prop_base.js"; + +function set(target, property, value, receiver) { + if (typeof Reflect !== "undefined" && Reflect.set) set = Reflect.set; + else { + set = function set(target, property, value, receiver) { + var base = _super_prop_base(target, property); + var desc; + if (base) { + desc = Object.getOwnPropertyDescriptor(base, property); + if (desc.set) { + desc.set.call(receiver, value); + + return true; + } else if (!desc.writable) { + return false; + } + } + desc = Object.getOwnPropertyDescriptor(receiver, property); + if (desc) { + if (!desc.writable) return false; + desc.value = value; + Object.defineProperty(receiver, property, desc); + } else { + _define_property(receiver, property, value); + } + + return true; + }; + } + + return set(target, property, value, receiver); +} + +function _set(target, property, value, receiver, isStrict) { + var s = set(target, property, value, receiver || target); + if (!s && isStrict) throw new Error("failed to set property"); + + return value; +} +export { _set as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_set_prototype_of.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_set_prototype_of.js new file mode 100644 index 0000000000000000000000000000000000000000..6a1f4df4183e6be4c3108f86e7d49d39c702dd00 --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_set_prototype_of.js @@ -0,0 +1,10 @@ +function _set_prototype_of(o, p) { + _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) { + o.__proto__ = p; + + return o; + }; + + return _set_prototype_of(o, p); +} +export { _set_prototype_of as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_skip_first_generator_next.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_skip_first_generator_next.js new file mode 100644 index 0000000000000000000000000000000000000000..1ccf48901c343fff5e854081f5529af64d04a7ca --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_skip_first_generator_next.js @@ -0,0 +1,9 @@ +function _skip_first_generator_next(fn) { + return function() { + var it = fn.apply(this, arguments); + it.next(); + + return it; + }; +} +export { _skip_first_generator_next as _ }; diff --git a/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_sliced_to_array.js b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_sliced_to_array.js new file mode 100644 index 0000000000000000000000000000000000000000..750c3019fb108e78759f797a64d9f1bc05d42aad --- /dev/null +++ b/node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/esm/_sliced_to_array.js @@ -0,0 +1,9 @@ +import { _ as _array_with_holes } from "./_array_with_holes.js"; +import { _ as _iterable_to_array_limit } from "./_iterable_to_array_limit.js"; +import { _ as _non_iterable_rest } from "./_non_iterable_rest.js"; +import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; + +function _sliced_to_array(arr, i) { + return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest(); +} +export { _sliced_to_array as _ };