@tinkerlandai/indiana-sdk 0.0.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- import{ea as d,ha as p,ja as i,wa as g}from"./chunk-IUDHYOKC.js";function f(t){let n=null,s=null,o=0,r={attributes:i.parse(t.attributes??{}),onFeatureUsage:t.onFeatureUsage?(e,a)=>t.onFeatureUsage(e,structuredClone(a)):void 0,onExperimentViewed:t.onExperimentViewed?(e,a)=>t.onExperimentViewed(structuredClone(e),structuredClone(a)):void 0,stickyBucketAssignmentDocs:structuredClone(t.stickyBucketAssignmentDocs),saveStickyBucketAssignmentDoc:t.saveStickyBucketAssignmentDoc?e=>t.saveStickyBucketAssignmentDoc(structuredClone(e)):void 0,trackedFeatureUsage:{},trackedExperiments:new Set},c=e=>{if(!n)throw new Error("Initialize the Feature client before evaluation");if(n.expiresAt&&Date.parse(n.expiresAt)<=Date.now())throw new Error("Feature configuration expired; refresh before evaluation");return structuredClone(p(e,r))};async function l(){if(s)return s;let e=o,a=(async()=>{let u=g.parse(await t.load());if(u.scope.projectId!==t.scope.projectId||u.scope.environment!==t.scope.environment||u.funnelId!==t.funnelId)throw new Error("Feature payload scope changed");if(e!==o)throw new Error("Feature client was reset");return n=structuredClone(u),r.features=n.features,r.savedGroups=d(n.savedGroups),r.trackedFeatureUsage={},structuredClone(n)})();s=a;try{return await a}finally{s===a&&(s=null)}}return{init:l,refresh:l,get versionId(){return n?.versionId??null},setAttributes(e){r.attributes=i.parse(e)},evalFeature:c,getFeatureValue(e,a){let u=c(e).value;return u===null?structuredClone(a):structuredClone(u)},reset(){o++,s=null,n=null,r.features={},r.savedGroups={},r.stickyBucketAssignmentDocs={},r.attributes={},r.trackedFeatureUsage={},r.trackedExperiments?.clear()}}}export{f as a};
@@ -1 +0,0 @@
1
- import{R as v,ic as O}from"./chunk-IUDHYOKC.js";var e=class extends Error{constructor(m,o,r,y){super(o);this.code=m;this.status=r;this.requestId=y;this.name="GrooveError"}code;status;requestId},V=Symbol("GrooveNoContent");function G(c,E){let m=c.webView??"hosted";if(!["hosted","embedded"].includes(m))throw new e("INVALID_REQUEST","Invalid Web View mode");let o=c.scope?v.parse(c.scope):void 0,r=new URL(c.baseUrl);if(r.username||r.password||r.search||r.hash)throw new e("INVALID_URL","baseUrl must not contain credentials, query, or fragment");if(r.protocol!=="https:"&&!(r.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(r.hostname)))throw new e("INVALID_URL","Use HTTPS, or HTTP on localhost during development");let y=c.fetch??globalThis.fetch.bind(globalThis),u=c.timeoutMs??1e4;if(!Number.isFinite(u)||u<=0||u>12e4)throw new e("INVALID_TIMEOUT","timeoutMs must be between 1 and 120000");let w=null,b,d=0,l=null,h=new Set;function N(){d+=1,w=null,l=null;for(let s of h)s.abort();h.clear()}async function _(s,R={},S="POST"){if(!w)throw new e("NOT_IDENTIFIED","Call identify with a server-issued customer token first");let g=d,n=new AbortController;h.add(n);let p=()=>g!==d?new e("IDENTITY_CHANGED","Customer identity changed while the request was in flight"):new e("TIMEOUT","Groove request timed out"),T,A=new Promise((t,i)=>{T=()=>i(p()),n.signal.addEventListener("abort",T,{once:!0})}),D=setTimeout(()=>n.abort(),u),P=async()=>{let t=await y(`${r.href.replace(/\/$/,"")}/api/v1/${s}`,{method:S,headers:{"Content-Type":"application/json",Authorization:`Bearer ${w}`,...o?{"X-Groove-Project":o.projectId,"X-Groove-Environment":o.environment}:{}},body:S==="POST"?JSON.stringify(R):void 0,signal:n.signal,credentials:"omit",cache:"no-store",redirect:"error"});if(n.signal.aborted)throw p();let i=t.status===204?V:await t.json();if(n.signal.aborted)throw p();if(g!==d)throw new e("IDENTITY_CHANGED","Customer identity changed while the request was in flight");if(!t.ok){let a=O.safeParse(i);throw new e(a.success?a.data.error.code:"HTTP_ERROR",a.success?a.data.error.message:"Groove request failed",t.status,t.headers.get("X-Request-Id")??void 0)}if(o&&i&&typeof i=="object"&&"scope"in i){let a=v.safeParse(i.scope);if(!a.success||a.data.projectId!==o.projectId||a.data.environment!==o.environment)throw new e("SCOPE_MISMATCH","Response scope does not match this SDK instance")}let I=t.headers.get("X-Grow-Web-View");if(I){if(!/^\/web-view\/renderer\/[a-f0-9]{64}$/.test(I))throw new e("INVALID_RESPONSE","Invalid Web View renderer metadata");b=I}let f=t.headers.get("X-Grow-Telemetry-Subject");if(f){if(!/^[a-f0-9]{64}$/.test(f))throw new e("INVALID_RESPONSE","Invalid telemetry identity");l!==f&&(l=f,E?.(l))}return i};try{return await Promise.race([P(),A])}catch(t){throw g!==d?new e("IDENTITY_CHANGED","Customer identity changed while the request was in flight"):t instanceof e?t:new e(n.signal.aborted?"TIMEOUT":"NETWORK_ERROR",n.signal.aborted?"Groove request timed out":"Unable to read the Groove response")}finally{clearTimeout(D),n.signal.removeEventListener("abort",T),h.delete(n)}}return{subjectKey:()=>l,webViewUrl(){if(m!=="embedded"){if(!b)throw new e("INVALID_RESPONSE","The gateway did not provide a hosted Web View renderer");return new URL(b,r).href}},identify(s){if(!s.trim()||/\s/.test(s)||s.length>4096)throw new e("INVALID_TOKEN","A nonempty server-issued token is required");N(),w=s},reset:N,request:_}}export{e as a,G as b};
@@ -1,450 +0,0 @@
1
- import * as zod from 'zod';
2
- import { z } from 'zod';
3
-
4
- declare const scopeSchema: z.ZodObject<{
5
- projectId: z.ZodString;
6
- environment: z.ZodEnum<{
7
- live: "live";
8
- sandbox: "sandbox";
9
- }>;
10
- }, z.core.$strict>;
11
- type Scope = z.infer<typeof scopeSchema>;
12
-
13
- declare const currencySchema: z.ZodEnum<{
14
- USD: "USD";
15
- EUR: "EUR";
16
- CNY: "CNY";
17
- GBP: "GBP";
18
- JPY: "JPY";
19
- CAD: "CAD";
20
- AUD: "AUD";
21
- NZD: "NZD";
22
- CHF: "CHF";
23
- HKD: "HKD";
24
- SGD: "SGD";
25
- KRW: "KRW";
26
- INR: "INR";
27
- BRL: "BRL";
28
- MXN: "MXN";
29
- TWD: "TWD";
30
- THB: "THB";
31
- IDR: "IDR";
32
- MYR: "MYR";
33
- PHP: "PHP";
34
- VND: "VND";
35
- ZAR: "ZAR";
36
- AED: "AED";
37
- SAR: "SAR";
38
- SEK: "SEK";
39
- NOK: "NOK";
40
- DKK: "DKK";
41
- PLN: "PLN";
42
- CZK: "CZK";
43
- HUF: "HUF";
44
- ILS: "ILS";
45
- TRY: "TRY";
46
- RON: "RON";
47
- }>;
48
- type Currency = z.infer<typeof currencySchema>;
49
-
50
- /** A condition object: operator keys ($and, $or, …) or attribute paths. */
51
- type ConditionInterface = {
52
- [key: string]: unknown;
53
- };
54
- type ParentConditionInterface = {
55
- id: string;
56
- condition: ConditionInterface;
57
- gate?: boolean;
58
- };
59
- /** The savedGroupReferencesV2 shape of one saved group, of any type. */
60
- type SavedGroupPayloadEntry = {
61
- type: "list";
62
- attributeKey: string;
63
- values: (string | number)[];
64
- } | {
65
- type: "condition";
66
- condition: ConditionInterface;
67
- };
68
- /** The `savedGroups` payload. Entries may use either shape above. */
69
- type SavedGroupsPayload = Record<string, (string | number)[] | SavedGroupPayloadEntry>;
70
- type VariationRange = [number, number];
71
- type VariationMeta = {
72
- passthrough?: boolean;
73
- key?: string;
74
- name?: string;
75
- };
76
- interface Filter {
77
- attribute?: string;
78
- seed: string;
79
- hashVersion: number;
80
- ranges: VariationRange[];
81
- }
82
- type UrlTargetType = "regex" | "simple";
83
- type UrlTarget = {
84
- include: boolean;
85
- type: UrlTargetType;
86
- pattern: string;
87
- };
88
- /** @deprecated upstream; still evaluated for parity. */
89
- type ExperimentStatus = "draft" | "running" | "stopped";
90
- type Experiment<T> = {
91
- key: string;
92
- variations: [T, T, ...T[]];
93
- ranges?: VariationRange[];
94
- meta?: VariationMeta[];
95
- filters?: Filter[];
96
- seed?: string;
97
- name?: string;
98
- phase?: string;
99
- urlPatterns?: UrlTarget[];
100
- weights?: number[];
101
- condition?: ConditionInterface;
102
- parentConditions?: ParentConditionInterface[];
103
- coverage?: number;
104
- include?: () => boolean;
105
- /** @deprecated upstream; legacy namespace tuple (hash version 1). */
106
- namespace?: [string, number, number];
107
- force?: number;
108
- hashAttribute?: string;
109
- fallbackAttribute?: string;
110
- hashVersion?: number;
111
- disableStickyBucketing?: boolean;
112
- bucketVersion?: number;
113
- minBucketVersion?: number;
114
- active?: boolean;
115
- persistQueryString?: boolean;
116
- /** @deprecated upstream */
117
- status?: ExperimentStatus;
118
- /** @deprecated upstream */
119
- url?: RegExp;
120
- /** @deprecated upstream */
121
- groups?: string[];
122
- };
123
- /** @deprecated upstream; context-level experiment overrides. */
124
- type ExperimentOverride = {
125
- condition?: ConditionInterface;
126
- weights?: number[];
127
- active?: boolean;
128
- status?: ExperimentStatus;
129
- force?: number;
130
- coverage?: number;
131
- groups?: string[];
132
- namespace?: [string, number, number];
133
- url?: RegExp | string;
134
- };
135
- interface Result<T> {
136
- value: T;
137
- variationId: number;
138
- key: string;
139
- name?: string;
140
- bucket?: number;
141
- passthrough?: boolean;
142
- inExperiment: boolean;
143
- hashUsed?: boolean;
144
- hashAttribute: string;
145
- hashValue: string;
146
- featureId: string | null;
147
- stickyBucketUsed?: boolean;
148
- }
149
- type FeatureRule<T = unknown> = {
150
- id?: string;
151
- condition?: ConditionInterface;
152
- parentConditions?: ParentConditionInterface[];
153
- force?: T;
154
- variations?: T[];
155
- weights?: number[];
156
- key?: string;
157
- hashAttribute?: string;
158
- fallbackAttribute?: string;
159
- hashVersion?: number;
160
- disableStickyBucketing?: boolean;
161
- bucketVersion?: number;
162
- minBucketVersion?: number;
163
- range?: VariationRange;
164
- coverage?: number;
165
- /** @deprecated upstream */
166
- namespace?: [string, number, number];
167
- ranges?: VariationRange[];
168
- meta?: VariationMeta[];
169
- filters?: Filter[];
170
- seed?: string;
171
- name?: string;
172
- phase?: string;
173
- tracks?: Array<{
174
- experiment: Experiment<T>;
175
- result: Result<T>;
176
- }>;
177
- };
178
- interface FeatureDefinition<T = unknown> {
179
- defaultValue?: T;
180
- rules?: FeatureRule<T>[];
181
- }
182
- type FeatureResultSource = "unknownFeature" | "defaultValue" | "force" | "override" | "experiment" | "prerequisite" | "cyclicPrerequisite";
183
- interface FeatureResult<T = unknown> {
184
- value: T | null;
185
- source: FeatureResultSource;
186
- on: boolean;
187
- off: boolean;
188
- ruleId: string;
189
- experiment?: Experiment<T>;
190
- experimentResult?: Result<T>;
191
- }
192
- /** `${attributeName}||${attributeValue}` */
193
- type StickyAttributeKey = string;
194
- /** `${experimentKey}__${bucketVersion}` */
195
- type StickyExperimentKey = string;
196
- type StickyAssignments = Record<StickyExperimentKey, string>;
197
- interface StickyAssignmentsDocument {
198
- attributeName: string;
199
- attributeValue: string;
200
- assignments: StickyAssignments;
201
- }
202
- type Attributes = Record<string, unknown>;
203
- /**
204
- * Everything one evaluation needs. Replaces the GrowthBook class plus its
205
- * global/user context split; fields keep the upstream names and meaning.
206
- */
207
- type EvaluationContext = {
208
- attributes?: Attributes;
209
- attributeOverrides?: Attributes;
210
- url?: string;
211
- enabled?: boolean;
212
- qaMode?: boolean;
213
- features?: Record<string, FeatureDefinition>;
214
- savedGroups?: SavedGroupsPayload;
215
- forcedVariations?: Record<string, number>;
216
- forcedFeatureValues?: Map<string, unknown>;
217
- /** @deprecated upstream */
218
- overrides?: Record<string, ExperimentOverride>;
219
- /** @deprecated upstream */
220
- groups?: Record<string, boolean>;
221
- /** Sticky docs already loaded for this user; updated in place on assignment. */
222
- stickyBucketAssignmentDocs?: Record<StickyAttributeKey, StickyAssignmentsDocument>;
223
- /** Enables sticky bucketing; receives each changed document. */
224
- saveStickyBucketAssignmentDoc?: (doc: StickyAssignmentsDocument) => unknown;
225
- /** Dedupes onExperimentViewed per hash value, experiment and variation. */
226
- trackedExperiments?: Set<string>;
227
- /** Dedupes onFeatureUsage per feature value. */
228
- trackedFeatureUsage?: Record<string, string>;
229
- onExperimentViewed?: (experiment: Experiment<unknown>, result: Result<unknown>) => unknown;
230
- onFeatureUsage?: (key: string, result: FeatureResult<unknown>) => unknown;
231
- onExperimentEval?: (experiment: Experiment<unknown>, result: Result<unknown>) => void;
232
- /** Receives the same diagnostic messages the upstream SDK logs. */
233
- log?: (message: string, details: Record<string, unknown>) => void;
234
- };
235
-
236
- type JsonValue = string | number | boolean | null | JsonValue[] | {
237
- [key: string]: JsonValue;
238
- };
239
- declare const featurePayloadSchema: z.ZodObject<{
240
- scope: z.ZodObject<{
241
- projectId: z.ZodUUID;
242
- environment: z.ZodEnum<{
243
- live: "live";
244
- sandbox: "sandbox";
245
- }>;
246
- }, z.core.$strict>;
247
- funnelId: z.ZodUUID;
248
- versionId: z.ZodUUID;
249
- expiresAt: z.ZodNullable<z.ZodISODateTime>;
250
- features: z.ZodRecord<z.ZodString, z.ZodObject<{
251
- defaultValue: z.ZodJSONSchema;
252
- rules: z.ZodArray<z.ZodObject<{
253
- force: z.ZodOptional<z.ZodJSONSchema>;
254
- variations: z.ZodOptional<z.ZodArray<z.ZodJSONSchema>>;
255
- weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
256
- key: z.ZodOptional<z.ZodString>;
257
- hashAttribute: z.ZodOptional<z.ZodString>;
258
- fallbackAttribute: z.ZodOptional<z.ZodString>;
259
- hashVersion: z.ZodOptional<z.ZodLiteral<2>>;
260
- disableStickyBucketing: z.ZodOptional<z.ZodBoolean>;
261
- bucketVersion: z.ZodOptional<z.ZodNumber>;
262
- minBucketVersion: z.ZodOptional<z.ZodNumber>;
263
- coverage: z.ZodOptional<z.ZodNumber>;
264
- seed: z.ZodOptional<z.ZodString>;
265
- range: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
266
- ranges: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
267
- meta: z.ZodOptional<z.ZodArray<z.ZodObject<{
268
- key: z.ZodString;
269
- name: z.ZodOptional<z.ZodString>;
270
- passthrough: z.ZodOptional<z.ZodBoolean>;
271
- }, z.core.$strict>>>;
272
- name: z.ZodOptional<z.ZodString>;
273
- phase: z.ZodOptional<z.ZodString>;
274
- id: z.ZodOptional<z.ZodString>;
275
- condition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
276
- parentConditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
277
- id: z.ZodString;
278
- condition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
279
- gate: z.ZodOptional<z.ZodBoolean>;
280
- }, z.core.$strict>>>;
281
- filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
282
- attribute: z.ZodOptional<z.ZodString>;
283
- seed: z.ZodString;
284
- hashVersion: z.ZodLiteral<2>;
285
- ranges: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
286
- }, z.core.$strict>>>;
287
- }, z.core.$strict>>;
288
- }, z.core.$strict>>;
289
- savedGroups: z.ZodRecord<z.ZodUUID, z.ZodDiscriminatedUnion<[z.ZodObject<{
290
- type: z.ZodLiteral<"condition">;
291
- condition: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
292
- }, z.core.$strict>, z.ZodObject<{
293
- type: z.ZodLiteral<"list">;
294
- attributeKey: z.ZodString;
295
- values: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
296
- }, z.core.$strict>], "type">>;
297
- }, z.core.$strict>;
298
- type FeaturePayload = z.infer<typeof featurePayloadSchema>;
299
-
300
- declare class GrooveError extends Error {
301
- readonly code: string;
302
- readonly status?: number | undefined;
303
- readonly requestId?: string | undefined;
304
- constructor(code: string, message: string, status?: number | undefined, requestId?: string | undefined);
305
- }
306
- interface GrooveOptions {
307
- baseUrl: string;
308
- fetch?: typeof globalThis.fetch;
309
- timeoutMs?: number;
310
- scope?: Scope;
311
- /** 宿主 App 当前界面语言(BCP 47,如 zh-CN、en);弹窗优先按它挑选语言。 */
312
- locale?: string;
313
- currency?: Currency;
314
- /** Published Web Views use the gateway's ISR shell. Embedded rendering is for offline/test hosts. */
315
- webView?: "hosted" | "embedded";
316
- }
317
-
318
- type FeatureClientOptions = {
319
- load: () => Promise<FeaturePayload>;
320
- attributes?: Record<string, JsonValue>;
321
- scope: FeaturePayload["scope"];
322
- funnelId: string;
323
- onFeatureUsage?: EvaluationContext["onFeatureUsage"];
324
- onExperimentViewed?: EvaluationContext["onExperimentViewed"];
325
- stickyBucketAssignmentDocs?: EvaluationContext["stickyBucketAssignmentDocs"];
326
- saveStickyBucketAssignmentDoc?: EvaluationContext["saveStickyBucketAssignmentDoc"];
327
- };
328
- /** Instance-local immutable configuration; evaluation itself performs no network I/O. */
329
- declare function createFeatureClient(options: FeatureClientOptions): {
330
- init: () => Promise<{
331
- scope: {
332
- projectId: string;
333
- environment: "live" | "sandbox";
334
- };
335
- funnelId: string;
336
- versionId: string;
337
- expiresAt: string | null;
338
- features: Record<string, {
339
- defaultValue: zod.JSONType;
340
- rules: {
341
- force?: zod.JSONType | undefined;
342
- variations?: zod.JSONType[] | undefined;
343
- weights?: number[] | undefined;
344
- key?: string | undefined;
345
- hashAttribute?: string | undefined;
346
- fallbackAttribute?: string | undefined;
347
- hashVersion?: 2 | undefined;
348
- disableStickyBucketing?: boolean | undefined;
349
- bucketVersion?: number | undefined;
350
- minBucketVersion?: number | undefined;
351
- coverage?: number | undefined;
352
- seed?: string | undefined;
353
- range?: [number, number] | undefined;
354
- ranges?: [number, number][] | undefined;
355
- meta?: {
356
- key: string;
357
- name?: string | undefined;
358
- passthrough?: boolean | undefined;
359
- }[] | undefined;
360
- name?: string | undefined;
361
- phase?: string | undefined;
362
- id?: string | undefined;
363
- condition?: Record<string, zod.JSONType> | undefined;
364
- parentConditions?: {
365
- id: string;
366
- condition: Record<string, zod.JSONType>;
367
- gate?: boolean | undefined;
368
- }[] | undefined;
369
- filters?: {
370
- seed: string;
371
- hashVersion: 2;
372
- ranges: [number, number][];
373
- attribute?: string | undefined;
374
- }[] | undefined;
375
- }[];
376
- }>;
377
- savedGroups: Record<string, {
378
- type: "condition";
379
- condition: Record<string, zod.JSONType>;
380
- } | {
381
- type: "list";
382
- attributeKey: string;
383
- values: (string | number)[];
384
- }>;
385
- }>;
386
- refresh: () => Promise<{
387
- scope: {
388
- projectId: string;
389
- environment: "live" | "sandbox";
390
- };
391
- funnelId: string;
392
- versionId: string;
393
- expiresAt: string | null;
394
- features: Record<string, {
395
- defaultValue: zod.JSONType;
396
- rules: {
397
- force?: zod.JSONType | undefined;
398
- variations?: zod.JSONType[] | undefined;
399
- weights?: number[] | undefined;
400
- key?: string | undefined;
401
- hashAttribute?: string | undefined;
402
- fallbackAttribute?: string | undefined;
403
- hashVersion?: 2 | undefined;
404
- disableStickyBucketing?: boolean | undefined;
405
- bucketVersion?: number | undefined;
406
- minBucketVersion?: number | undefined;
407
- coverage?: number | undefined;
408
- seed?: string | undefined;
409
- range?: [number, number] | undefined;
410
- ranges?: [number, number][] | undefined;
411
- meta?: {
412
- key: string;
413
- name?: string | undefined;
414
- passthrough?: boolean | undefined;
415
- }[] | undefined;
416
- name?: string | undefined;
417
- phase?: string | undefined;
418
- id?: string | undefined;
419
- condition?: Record<string, zod.JSONType> | undefined;
420
- parentConditions?: {
421
- id: string;
422
- condition: Record<string, zod.JSONType>;
423
- gate?: boolean | undefined;
424
- }[] | undefined;
425
- filters?: {
426
- seed: string;
427
- hashVersion: 2;
428
- ranges: [number, number][];
429
- attribute?: string | undefined;
430
- }[] | undefined;
431
- }[];
432
- }>;
433
- savedGroups: Record<string, {
434
- type: "condition";
435
- condition: Record<string, zod.JSONType>;
436
- } | {
437
- type: "list";
438
- attributeKey: string;
439
- values: (string | number)[];
440
- }>;
441
- }>;
442
- readonly versionId: string | null;
443
- setAttributes(attributes: Record<string, JsonValue>): void;
444
- evalFeature: (key: string) => FeatureResult<JsonValue>;
445
- getFeatureValue(key: string, fallback: JsonValue): JsonValue;
446
- reset(): void;
447
- };
448
- type FeatureClient = ReturnType<typeof createFeatureClient>;
449
-
450
- export { type FeatureClient as F, type GrooveOptions as G, type JsonValue as J, type Scope as S, type FeatureClientOptions as a, GrooveError as b, createFeatureClient as c, type FeatureResult as d };
@@ -1,4 +0,0 @@
1
- import{a as F}from"./chunk-6X42DWOM.js";import{a as w}from"./chunk-TDSKWZTO.js";import{dg as se,o as ae,r as K}from"./chunk-IUDHYOKC.js";async function ye(Q,o){let{mountScreenPreview:ce}=await import("./popup.js"),d=Q.ownerDocument,Y=d.activeElement instanceof HTMLElement?d.activeElement:null,I=d.createElement("section"),U=d.createElement("h2"),A=d.createElement("div"),V=d.createElement("div"),m=d.createElement("div"),L=d.createElement("p"),N=d.createElement("p"),p=d.createElement("dialog");I.dataset.gFunnelRun="",I.style.cssText="box-sizing:border-box;width:100%;min-width:0;font:14px/1.5 system-ui,sans-serif;color:#172033;background:#fff",U.id="grow-funnel-title-"+crypto.randomUUID(),U.style.cssText="font-size:18px;font-weight:600;margin:0;flex:1;min-width:0",A.style.cssText="display:flex;gap:12px;align-items:center;padding:16px 20px;border-bottom:1px solid #e2e6ee",m.style.cssText="display:flex;flex-wrap:wrap;gap:12px;padding:16px 20px",L.setAttribute("role","status"),L.style.cssText="padding:12px 20px;margin:0",N.setAttribute("role","alert"),N.style.cssText="padding:12px 20px;margin:0;color:#a33636",N.hidden=!0,p.setAttribute("aria-labelledby",U.id),p.style.cssText="box-sizing:border-box;padding:0;border:1px solid #e2e6ee;background:#fff;color:#172033;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto",A.append(U),I.append(A,V,L,N,m),Q.append(I);let E=null,$="",k=!1,x=null,s=null,X=!1,Z=!1,ee=new Set,S="",ne="",q={},_={},j=new Map,z=new Map;async function le(e){let r=s;if(!r?.screen)return;let t=r.screen.customerData.nodes[e.nodeId];if(!t)return;if(["refresh","next","previous","filter","sources_next","sources_previous"].includes(e.action)){let a=e.action.startsWith("sources_"),u=a?t.resources.find(v=>v.key===e.value):null;if(a&&!u)throw new w("INVALID_REQUEST","Choose a current credit resource");let C=a?`${e.nodeId}:${u.key}`:e.nodeId,y=(_[e.nodeId]?.resourceKey===u?.key?_[e.nodeId]:void 0)??{page:a?u.sourcePage:t.page,after:null,filter:"all",...u?{resourceKey:u.key}:{}},c={...y},T=z.get(C)??[null];if(e.action==="filter"){let v=e.value;if(!["all","purchase","refund","source","usage","debt","settlement"].includes(v??""))throw new w("INVALID_REQUEST","Unknown data filter");c={page:1,after:null,filter:v},z.set(C,[null])}else if(e.action==="next"||e.action==="sources_next"){let v=u?.sources.at(-1),P=u?v?{kind:"ledger",cursor:{at:v.detail[0],id:v.id,type:"source"}}:null:r.screen.dataCursors[e.nodeId];if(!P&&!u)return;if(!P&&u)return c={...y,page:1,after:null},_={..._,[e.nodeId]:c},D(O=>o.client.get({nodeId:O.nodeId,revision:O.revision,components:_}));T[y.page]=P,z.set(C,T),c={...y,page:y.page+1,after:P}}else if(e.action==="previous"||e.action==="sources_previous"){if(y.page<=1)return;c={...y,page:y.page-1,after:T[y.page-2]??null}}return _={..._,[e.nodeId]:c},D(v=>o.client.get({nodeId:v.nodeId,revision:v.revision,components:_}))}if(e.action==="invoice_open"){let a=t.rows.find(y=>y.id===e.value);if(t.source!=="billing"||!a?.invoiceUrl||!a.billingActions?.some(y=>y.action==="invoice_open"))throw new w("INVALID_REQUEST","Choose an owned invoice in the current billing component");let u=new URL(a.invoiceUrl);if(u.protocol!=="https:"||u.username||u.password)throw new w("INVALID_RESPONSE","An HTTPS invoice link is required");let C={nodeId:e.nodeId,invoiceId:a.id,url:a.invoiceUrl};if(o.onOpenInvoice)return F(o.onOpenInvoice,C);let R=d.createElement("a");R.href=u.href,R.target="_blank",R.rel="noopener noreferrer",R.click();return}if(e.action==="membership_preview"||e.action==="membership_dismiss"){let a=structuredClone(r.screen.customerData);if(e.action==="membership_dismiss")delete a.nodes[e.nodeId].membershipReview,j.delete(e.nodeId);else{if(!e.value||!t.rows.some(u=>u.membershipActions?.some(C=>C.value===e.value)))throw new w("INVALID_REQUEST","Choose an available membership action");j.set(e.nodeId,e.value),a.nodes[e.nodeId].membershipReview={title:e.value==="cancel_membership"?n("\u53D6\u6D88\u7EED\u8D39","Cancel renewal"):n("\u6062\u590D\u7EED\u8D39","Resume renewal"),note:n("\u786E\u8BA4\u540E\u901A\u8FC7\u6D41\u7A0B\u4E2D\u7684\u4F1A\u5458\u8282\u70B9\u6267\u884C\uFF0C\u5F53\u524D\u5DF2\u4ED8\u6B3E\u6743\u76CA\u4FDD\u6301\u81F3\u672C\u671F\u7ED3\u675F\u3002","Confirm to run the membership node. Current paid access lasts until the period ends."),facts:[]}}E?.updateCustomerData(a);return}let i;se(r.screen.document.pages[0].root,a=>{a.type==="customer_data"&&a.id===e.nodeId&&(i=a)});let l=e.action==="membership_confirm"?j.get(e.nodeId):e.action,g=i?.data.outputs?.[l];if(!g)throw new w("UNBOUND_ACTION","Connect this component action to a Funnel output before publishing");if(!r.screen.outputs.includes(g))throw new w("UNBOUND_ACTION","Connect this component action to a Funnel output before publishing");if(e.action==="buy_pack"){if(!e.value||!t.rows.some(u=>u.purchaseId===e.value))throw new w("PRODUCT_REQUIRED","Select an available product");let a=Object.keys(r.screen.capabilities.pickers)[0];a&&(q[a]=e.value),te=e.value}return b(a=>({operation:"advance",...h(a),output:g,answers:a.answers}))}let te=null,n=(e,r)=>s?.locale.startsWith("zh")?e:r;function ie(){return D(e=>o.client.get(e.screen&&Object.keys(_).length?{nodeId:e.nodeId,revision:e.revision,components:_}:void 0))}function f(e,r,t=!1){let i=d.createElement("button");return i.type="button",i.textContent=e,i.style.cssText="min-height:44px;padding:8px 14px;border:1px solid #cdd3df;border-radius:6px;background:#fff;color:inherit;font:inherit;cursor:pointer",i.disabled=!t&&!!x,i.addEventListener("click",()=>{try{Promise.resolve(r()).catch(()=>{})}catch(l){M(l)}}),i}function M(e){k||(N.textContent=n("\u64CD\u4F5C\u672A\u5B8C\u6210\uFF0C\u8BF7\u91CD\u8BD5\u539F\u8BF7\u6C42\u3002","The action did not finish. Retry the original request."),N.hidden=!1),F(o.onError,e)}function W(){k||(k=!0,de(),E?.destroy(),E=null,I.remove(),p.open&&p.close(),p.remove(),Y?.isConnected&&Y.focus(),Z||(Z=!0,F(o.onDismiss,s?structuredClone(s):null)))}function h(e){return{nodeId:e.nodeId,revision:e.revision,requestId:crypto.randomUUID()}}function b(e){return D(r=>o.client.submit(e(r)))}function D(e){if(k||!s)return Promise.reject(new w("CLOSED","Funnel host is unavailable"));if(x)return Promise.reject(new w("COMMAND_PENDING","Wait for the current request"));let r=structuredClone(s),t=Promise.resolve().then(()=>e(r)).then(i=>(k||(N.hidden=!0,J(o.client.view??i.run)),i)).catch(i=>{throw M(i),i}).finally(()=>{x===t&&(x=null),k||(V.inert=!1,G(),oe())});return x=t,V.inert=!0,G(),t}async function re(){return D(async e=>{if(!o.onAuthenticate)throw new w("AUTHENTICATION_REQUIRED","Host authentication is required");let r=await o.onAuthenticate();if(k)throw new w("CLOSED","Funnel host was dismissed");return r?(o.client.identify(r),o.client.pendingCommand?o.client.retry():e.pendingRequest?o.client.resume(e.pendingRequest.requestId):o.client.link(h(e))):o.client.submit({operation:"execute",...h(e),intent:"cancel"})})}async function H(){try{for(;x;)await x;return k||s&&!["running","waiting"].includes(s.status)?void 0:await b(e=>({operation:"close",...h(e)}))}finally{W()}}function B(e){return D(async r=>{if(e==="cancel")return o.client.submit({operation:"execute",...h(r),intent:e});let t=r.checkout?.product,i=t?.type==="fixed"?t.productVersionId:r.checkout?.selectedProductVersionId??te??(t?.type==="picker"&&typeof q[t.pickerId]=="string"?String(q[t.pickerId]):null);if(t?.type==="picker"&&(!i||!t.allowedProductVersionIds.includes(i))){if(!o.onChooseProduct)throw new w("PRODUCT_REQUIRED","Select an available product before checkout");if(i=await o.onChooseProduct([...t.allowedProductVersionIds]),!i||!t.allowedProductVersionIds.includes(i))throw new w("PRODUCT_REQUIRED","Select an available product before checkout")}if(k)throw new w("CLOSED","Funnel host was dismissed");return o.client.submit({operation:"execute",...h(r),intent:e,...i?{productVersionId:i}:{}})})}function G(){if(!s||k)return;I.setAttribute("aria-busy",String(!!x)),A.replaceChildren(U),s.canBack&&A.append(f(n("\u8FD4\u56DE","Back"),()=>b(t=>({operation:"back",...h(t)})))),A.append(f(n("\u5173\u95ED","Close"),H,!0)),m.replaceChildren(),o.client.pendingCommand?m.append(f(n("\u91CD\u8BD5\u539F\u8BF7\u6C42","Retry original request"),()=>D(()=>o.client.retry()))):s.pendingRequest&&m.append(f(n("\u6062\u590D\u672A\u5B8C\u6210\u64CD\u4F5C","Resume interrupted action"),()=>D(t=>o.client.resume(t.pendingRequest.requestId)))),m.append(f(n("\u5237\u65B0","Refresh"),()=>ie()));let e=s.instruction;if(e?.type==="confirm_billing_adjustment"){let t=d.createElement("p");t.style.cssText="flex-basis:100%;margin:0;white-space:pre-line",t.textContent=[n("\u786E\u8BA4\u7528\u91CF\u8865\u6B3E","Confirm usage adjustment"),n("\u539F\u8D26\u5355\uFF1A","Original invoice: ")+e.originalInvoiceId,n("\u8D26\u671F\uFF1A","Period: ")+e.startsAt+" \u2014 "+e.endsAt,n("\u56FA\u5B9A\u8865\u6536\u91D1\u989D\uFF1A","Fixed additional amount: ")+K(Number(e.amountMinor),e.currency,s.locale),n("\u8865\u6B3E\u4F9D\u636E\u5DF2\u7ECF\u51BB\u7ED3\u7684\u5B9E\u9645\u7528\u91CF\u548C\u8D39\u7387\u3002\u786E\u8BA4\u540E\u652F\u4ED8\u6B64\u5DEE\u989D\uFF1B\u53D6\u6D88\u4E0D\u4F1A\u79FB\u9664\u539F\u8D26\u5355\u3002","This adjustment uses recorded usage and the fixed cash price. Confirm to pay this difference; cancelling does not remove the original invoice.")].join(`
2
- `);let i=d.createElement("label"),l=d.createElement("input");l.type="checkbox",l.disabled=!!x,i.style.cssText="flex-basis:100%;display:flex;align-items:flex-start;gap:8px;min-height:44px",i.append(l,d.createTextNode(n("\u6211\u540C\u610F\u652F\u4ED8\u4EE5\u4E0A\u56FA\u5B9A\u8865\u6B3E\u91D1\u989D\u3002","I agree to pay this fixed additional amount.")));let g=f(n("\u786E\u8BA4\u8865\u6B3E","Confirm additional charge"),()=>{if(l.checked)return b(a=>({operation:"execute",...h(a),intent:"confirm",accepted:!0}))});g.disabled=!0,l.addEventListener("change",()=>{g.disabled=!!x||!l.checked}),m.append(t,i,g,f(n("\u7A0D\u540E\u786E\u8BA4","Review later"),()=>b(a=>({operation:"execute",...h(a),intent:"cancel"}))))}else if(e?.type==="confirm_billing_authorization"){let g=function(c){let[T,v=""]=c.split("."),P=ae(t.currency)+v.length,O=(T+v).padStart(P+1,"0"),me=P?`${O.slice(0,-P)}.${O.slice(-P)}`.replace(/0+$/,"").replace(/\.$/,""):O;return`${t.currency} ${me}`};var r=g;let t=e.terms,i=c=>K(Number(c),t.currency,s.locale),l=d.createElement("p");l.style.cssText="flex-basis:100%;margin:0;white-space:pre-line";let a=t.kind==="postpaid"?t.cashPrice.pricing:null,u=t.kind==="postpaid"?t.cashPrice.billingCycle:void 0;if(l.textContent=[t.kind==="auto_topup"?n("\u4F4E\u4F59\u989D\u81EA\u52A8\u5145\u503C","Automatic top-up when your balance is low"):n("\u6309\u7528\u91CF\u540E\u4ED8\u8D39","Postpaid usage billing"),...t.kind==="postpaid"?[u?n("\u7528\u91CF\u7ED3\u7B97\uFF1A\u6BCF ","Usage settlement: every ")+u.count+(u.interval==="month"?n(" \u4E2A\u6708"," months"):n(" \u5E74"," years"))+" \xB7 "+(u.anchor==="calendar"?n("UTC \u81EA\u7136\u65E5\u5386","UTC calendar"):n("\u4F1A\u5458\u5F00\u59CB\u65F6\u95F4","Membership start")):n("\u7528\u91CF\u7ED3\u7B97\uFF1A\u8DDF\u968F\u5957\u9910\u8D26\u671F","Usage settlement: follows the plan billing period")]:[],n("\u8D26\u671F\u7A0E\u524D\u6700\u9AD8\u91D1\u989D\uFF1A","Maximum amount per billing period before tax: ")+i(t.maxAmountMinorPerPeriod),...t.kind==="auto_topup"?[n("\u89E6\u53D1\u4F59\u989D\uFF1A","Balance threshold: ")+t.threshold,n("\u6BCF\u6B21\u5145\u503C\uFF1A","Each top-up: ")+i(t.purchaseAmountMinor)+" \xB7 "+t.purchaseUnits+n(" \u5355\u4F4D"," units"),n("\u6BCF\u65E5\u6700\u591A\u8D2D\u4E70\u6B21\u6570\uFF1A","Maximum purchases per day: ")+t.maxPurchasesPerDay,...["hour","week","month"].flatMap(c=>{let T=t.purchaseLimits?.[c];return T===void 0?[]:[(c==="hour"?n("\u6BCF\u5C0F\u65F6\u6700\u591A\u8D2D\u4E70\u6B21\u6570\uFF1A","Maximum purchases per hour: "):c==="week"?n("\u6BCF\u5468\u6700\u591A\u8D2D\u4E70\u6B21\u6570\uFF1A","Maximum purchases per week: "):n("\u6BCF\u6708\u6700\u591A\u8D2D\u4E70\u6B21\u6570\uFF1A","Maximum purchases per month: "))+T]})]:[n("\u6700\u5927\u672A\u4ED8\u6B3E\u91D1\u989D\uFF1A","Maximum outstanding amount: ")+i(t.maxOutstandingMinor)],...a?.kind==="flat"?[g(a.unitAmountMinor)+" / "+a.units+n(" \u7528\u91CF\u5355\u4F4D"," usage units")]:a?[a.kind==="graduated"?n("\u9010\u7EA7\u7D2F\u8FDB\u8BA1\u4EF7","Graduated usage pricing"):n("\u603B\u91CF\u9636\u68AF\u8BA1\u4EF7","Volume usage pricing"),...a.tiers.map(c=>`${c.upTo===null?n("\u4F59\u4E0B\u7528\u91CF","Remaining usage"):n("\u7D2F\u8BA1\u81F3 ","Up to ")+c.upTo}: ${g(c.unitAmountMinor)} / ${a.units}`)]:[],n("\u7A0E\u8D39\u6309\u6700\u7EC8\u8D26\u5355\u53E6\u5916\u8BA1\u7B97\u3002\u542F\u7528\u540E\u53EF\u64A4\u9500\u6388\u6743\uFF1B\u5DF2\u7ECF\u4EA7\u751F\u7684\u8D26\u5355\u4ECD\u9700\u652F\u4ED8\u3002","Tax is calculated separately on the final invoice. You can revoke authorization after enabling it; existing invoices remain payable.")].join(`
3
- `),m.append(l),e.setupUrl){let c=d.createElement("a");c.href=e.setupUrl,c.target="_blank",c.rel="noopener noreferrer",c.textContent=n("\u5B8C\u6210\u652F\u4ED8\u65B9\u5F0F\u51C6\u5907","Complete payment method setup"),c.style.cssText="min-height:44px;padding:8px 14px;border:1px solid #cdd3df;border-radius:6px;color:inherit",o.onBillingSetup&&c.addEventListener("click",T=>{T.preventDefault(),Promise.resolve(F(o.onBillingSetup,e)).catch(M)}),m.append(c)}let C=d.createElement("label"),R=d.createElement("input");R.type="checkbox",R.disabled=!!x,C.style.cssText="flex-basis:100%;display:flex;align-items:flex-start;gap:8px;min-height:44px",C.append(R,d.createTextNode(n("\u6211\u5DF2\u5B8C\u6210\u652F\u4ED8\u51C6\u5907\uFF0C\u5E76\u540C\u610F\u4EE5\u4E0A\u56FA\u5B9A\u6388\u6743\u6761\u6B3E\u3002","I have completed payment setup and accept these fixed authorization terms.")));let y=f(n("\u786E\u8BA4\u542F\u7528\u81EA\u52A8\u4ED8\u6B3E","Confirm automatic payments"),()=>{if(R.checked)return b(c=>({operation:"execute",...h(c),intent:"confirm",accepted:!0}))});y.disabled=!0,R.addEventListener("change",()=>{y.disabled=!!x||!R.checked}),m.append(C,y,f(n("\u53D6\u6D88\u6388\u6743","Cancel authorization"),()=>b(c=>({operation:"execute",...h(c),intent:"cancel"}))))}else if(e?.type==="confirm_membership_change"){let t=d.createElement("p"),i=l=>K(Number(l),e.currency,s.locale);t.style.cssText="flex-basis:100%;margin:0;white-space:pre-line",t.textContent=[...e.seats.map(l=>n("\u5E2D\u4F4D\u6570\u91CF\uFF1A","Seats: ")+l.key+" \xB7 "+l.fromQuantity+" \u2192 "+l.toQuantity),e.timing==="immediate"?n("\u786E\u8BA4\u540E\u4EE5\u65B0\u914D\u7F6E\u91CD\u65B0\u5F00\u59CB\u5B8C\u6574\u8D26\u671F\uFF0C\u5148\u6298\u62B5\u65E7\u8D26\u671F\u5269\u4F59\u91D1\u989D\u3002","After confirmation, begin a full new billing period and credit the remaining old period."):n("\u53D8\u66F4\u5728\u5F53\u524D\u8D26\u671F\u7ED3\u675F\u65F6\u751F\u6548\u3002\u4E0B\u5217\u91D1\u989D\u4E3A\u7EED\u8D39\u9884\u4F30\uFF0C\u6700\u7EC8\u7A0E\u8D39\u4EE5\u5C4A\u65F6\u53D1\u7968\u4E3A\u51C6\u3002","The change takes effect at the current period end. Renewal amounts below are estimates; final tax is determined on that invoice."),n("\u65B0\u914D\u7F6E\u8D39\u7528\uFF1A","New configuration: ")+i(e.debitMinor),...e.discountMinor!=="0"?[n("\u4F18\u60E0\u51CF\u514D\uFF1A","Discount: ")+i(e.discountMinor)]:[],n("\u5269\u4F59\u8D26\u671F\u6298\u62B5\uFF1A","Remaining-period credit: ")+i(e.creditMinor),n("\u7A0E\u8D39\uFF1A","Tax: ")+i(e.taxMinor),(e.timing==="immediate"?n("\u672C\u6B21\u652F\u4ED8\uFF1A","Pay now: "):n("\u7EED\u8D39\u9884\u4F30\uFF1A","Estimated renewal: "))+i(e.totalMinor),n("\u751F\u6548\u65F6\u95F4\uFF1A","Effective: ")+new Date(e.effectiveAt).toLocaleString(s.locale)].join(`
4
- `),m.append(t,f(e.changeKind==="seats"?n("\u786E\u8BA4\u5E2D\u4F4D\u53D8\u66F4","Confirm seat change"):n("\u786E\u8BA4\u5957\u9910\u53D8\u66F4","Confirm plan change"),()=>b(l=>({operation:"execute",...h(l),intent:"confirm"}))),f(n("\u53D6\u6D88\u53D8\u66F4","Cancel change"),()=>b(l=>({operation:"execute",...h(l),intent:"cancel"}))))}else if(e?.type==="native_purchase"){o.onNativePurchase&&m.append(f(n("\u6253\u5F00\u5546\u5E97\u8D2D\u4E70","Open store purchase"),async()=>{await o.onNativePurchase(e),await D(()=>o.client.get())}));let t=d.createElement("p");t.textContent=o.onNativePurchase?n("\u7B49\u5F85\u5546\u5E97\u4ED8\u6B3E\u9A8C\u8BC1\u540E\u7EE7\u7EED\u3002","Continue after the store payment is verified."):n("\u8BF7\u5728\u5DF2\u63A5\u5165\u7684\u539F\u751F\u5E94\u7528\u4E2D\u5B8C\u6210\u8D2D\u4E70\u3002","Complete this purchase in the connected native app."),m.append(t,f(n("\u68C0\u67E5\u4ED8\u6B3E\u7ED3\u679C","Check payment result"),()=>B("confirm")),f(n("\u53D6\u6D88\u4ED8\u6B3E","Cancel checkout"),()=>B("cancel")))}if(e?.type==="open_url"||e?.type==="checkout"){let t=d.createElement("a");t.href=e.url,t.target="_blank",t.rel="noopener noreferrer",t.textContent=n(e.type==="checkout"?"\u6253\u5F00\u4ED8\u6B3E\u9875":"\u6253\u5F00\u94FE\u63A5",e.type==="checkout"?"Open checkout":"Open link"),t.style.cssText="display:inline-flex;align-items:center;min-height:44px;padding:8px 14px;box-sizing:border-box;color:#2c3c96",t.addEventListener("click",()=>e.type==="checkout"?F(o.onCheckout,e):F(o.onOpenUrl,e)),m.append(t),e.type==="open_url"&&m.append(f(n("\u7EE7\u7EED","Continue"),()=>b(i=>({operation:"acknowledge",...h(i),receiptId:e.receiptId}))))}s.nodeType==="auth"||e?.type==="authenticate"?m.append(f(n("\u767B\u5F55\u5E76\u7EE7\u7EED","Sign in and continue"),re)):s.nodeType==="checkout"&&s.status==="waiting"&&e?.type!=="native_purchase"?(m.append(f(n(e?.type==="checkout"?"\u786E\u8BA4\u4ED8\u6B3E\u7ED3\u679C":"\u7EE7\u7EED\u7ED3\u8D26",e?.type==="checkout"?"Check payment result":"Continue to checkout"),()=>B(s?.instruction?.type==="checkout"?"confirm":"begin"))),m.append(f(n("\u53D6\u6D88\u4ED8\u6B3E","Cancel checkout"),()=>B("cancel")))):s.nodeType==="action"&&s.status==="waiting"&&e?.type!=="confirm_billing_authorization"&&e?.type!=="confirm_billing_adjustment"&&e?.type!=="confirm_membership_change"&&m.append(f(n("\u7EE7\u7EED\u786E\u8BA4","Check action result"),()=>b(t=>({operation:"execute",...h(t),intent:"confirm"})))),L.hidden=!!s.screen&&!x,L.textContent=x?n("\u6B63\u5728\u5904\u7406\u2026","Processing\u2026"):s.status==="completed"?n("\u6D41\u7A0B\u5DF2\u5B8C\u6210\u3002","Flow complete."):s.status==="closed"?n("\u6D41\u7A0B\u5DF2\u5173\u95ED\u3002","Flow closed."):s.status==="failed"?n("\u6D41\u7A0B\u672A\u5B8C\u6210\u3002","The flow did not complete."):s.status==="ineligible"?n("\u6B64\u6D41\u7A0B\u6682\u4E0D\u53EF\u7528\u3002","This flow is unavailable."):e?.type==="wait"?e.eventKey?n("\u7B49\u5F85\u7CFB\u7EDF\u901A\u77E5\u540E\u7EE7\u7EED\u3002","Waiting for a notification to continue."):n("\u7B49\u5F85\u9884\u5B9A\u65F6\u95F4\u540E\u7EE7\u7EED\u3002","Waiting for the scheduled time to continue."):n("\u7B49\u5F85\u5B8C\u6210\u5F53\u524D\u64CD\u4F5C\u3002","Complete the current action to continue.")}function ue(e){let r=e.screen?.presentation;if(!r)return;if(r.type==="inline"){p.open&&p.close(),I.parentNode!==Q&&Q.append(I),p.remove();return}let t=r.type==="fullscreen"?"100vw":`${{sm:420,md:720,lg:1024}[r.size]}px`;p.style.width=t,p.style.margin=r.type==="sheet"?"0 0 0 auto":r.type==="fullscreen"?"0":"auto",p.style.height=r.type==="modal"?"auto":"100dvh",p.style.maxWidth=r.type==="fullscreen"?"100vw":"calc(100vw - 32px)",p.style.maxHeight=r.type==="modal"?"calc(100dvh - 32px)":"100dvh",I.parentNode!==p&&p.append(I),p.isConnected||d.body.append(p),p.open||p.showModal()}function J(e){if(k)return;s=structuredClone(e),U.textContent=e.screen?.document.name??n("\u8F6C\u5316\u6D41\u7A0B","Flow"),I.dataset.gFunnelNode=e.nodeId,I.dataset.gFunnelStatus=e.status,ue(e);let r=JSON.stringify(e);r!==ne&&(ne=r,F(o.onState,structuredClone(e)));let t=e.screen?`${e.versionId}:${e.nodeId}:${e.visit}:${e.screen.id}`:"";if($!==t&&(E?.destroy(),E=null,V.replaceChildren(),$=t,S="",_={},z.clear(),j.clear()),e.screen&&!E){let i=e.screen;E=ce(V,{mode:"live",title:i.document.name,rendererUrl:o.client.webViewUrl,onError:g=>M(new w("RENDERER_ERROR",g)),onEscape:()=>{H().catch(()=>{})},onAction:(g,a,u)=>{k||!s?.screen||s.nodeId!==e.nodeId||s.visit!==e.visit||!s.screen.outputs.includes(g)||(q=a??{},b(C=>({operation:"advance",...h(C),output:g,answers:u??{}})).catch(()=>{}))},onCustomerDataIntent:g=>{le(g).catch(M)},onRendered:()=>{$===t&&(S=t,oe())}});let l={...i.document,presentation:i.presentation.type==="inline"?{type:"fullscreen"}:i.presentation};E.update(l,e.locale,{parameters:e.parameters,capabilities:i.capabilities,customerData:i.customerData,serverInput:{bindings:i.inputs,answers:e.answers}})}e.screen&&E&&(E.updateCapabilities(e.screen.capabilities),E.updateCustomerData(e.screen.customerData)),G(),e.status==="completed"&&!e.instruction&&!X&&(X=!0,F(o.onComplete,structuredClone(e)))}function oe(){k||!S||S!==$||ee.has(S)||x||s?.pendingRequest||o.client.pendingCommand||(ee.add(S),b(e=>({operation:"shown",...h(e)})).catch(()=>{}))}let de=o.client.subscribe(J);function pe(){return E?.ready}p.addEventListener("cancel",e=>{e.preventDefault(),H().catch(()=>{})});try{let e=await o.client.get();J(o.client.view??e.run),await pe()}catch(e){throw M(e),W(),e}return{get view(){return s?structuredClone(s):null},refresh:ie,retry:()=>D(()=>o.client.retry()),resume:e=>D(()=>o.client.resume(e)),saveAnswers:e=>b(r=>({operation:"answers",...h(r),answers:e})),execute:(e,r,t)=>b(i=>({operation:"execute",...h(i),intent:e,...r?{productVersionId:r}:{},...t?{accepted:t}:{}})),authenticate:re,close:H,destroy:W}}export{ye as showFunnelRun};
@@ -1 +0,0 @@
1
- import{$,$a,$b,$c,$d,$e,$f as ag,$g as ah,$h as ai,$i as aj,A,Aa,Ab,Ac,Ad,Ae,Af as Bf,Ag as Bg,Ah as Bh,Ai as Bi,B,Ba,Bb,Bc,Bd,Be,Bf as Cf,Bg as Cg,Bh as Ch,Bi as Ci,C,Ca,Cb,Cc,Cd,Ce,Cf as Df,Cg as Dg,Ch as Dh,Ci as Di,D,Da,Db,Dc,Dd,De,Df as Ef,Dg as Eg,Dh as Eh,Di as Ei,E,Ea,Eb,Ec,Ed,Ee,Ef as Ff,Eg as Fg,Eh as Fh,Ei as Fi,F,Fa,Fb,Fc,Fd,Fe,Ff as Gf,Fg as Gg,Fh as Gh,Fi as Gi,G,Ga,Gb,Gc,Gd,Ge,Gf as Hf,Gg as Hg,Gh as Hh,Gi as Hi,H,Ha,Hb,Hc,Hd,He,Hf as If,Hg as Ig,Hh as Ih,Hi as Ii,I,Ia,Ib,Ic,Id,Ie,If as Jf,Ig as Jg,Ih as Jh,Ii as Ji,J,Ja,Jb,Jc,Jd,Je,Jf as Kf,Jg as Kg,Jh as Kh,Ji as Ki,K,Ka,Kb,Kc,Kd,Ke,Kf as Lf,Kg as Lg,Kh as Lh,Ki as Li,L,La,Lb,Lc,Ld,Le,Lf as Mf,Lg as Mg,Lh as Mh,Li as Mi,M,Ma,Mb,Mc,Md,Me,Mf as Nf,Mg as Ng,Mh as Nh,Mi as Ni,N,Na,Nb,Nc,Nd,Ne,Nf as Of,Ng as Og,Nh as Oh,Ni as Oi,O,Oa,Ob,Oc,Od,Oe,Of as Pf,Og as Pg,Oh as Ph,Oi as Pi,P,Pa,Pb,Pc,Pd,Pe,Pf as Qf,Pg as Qg,Ph as Qh,Pi as Qi,Q,Qa,Qb,Qc,Qd,Qe,Qf as Rf,Qg as Rg,Qh as Rh,Qi as Ri,R,Ra,Rb,Rc,Rd,Re,Rf as Sf,Rg as Sg,Rh as Sh,Ri as Si,S,Sa,Sb,Sc,Sd,Se,Sf as Tf,Sg as Tg,Sh as Th,Si as Ti,T,Ta,Tb,Tc,Td,Te,Tf as Uf,Tg as Ug,Th as Uh,Ti as Ui,U,Ua,Ub,Uc,Ud,Ue,Uf as Vf,Ug as Vg,Uh as Vh,Ui as Vi,V,Va,Vb,Vc,Vd,Ve,Vf as Wf,Vg as Wg,Vh as Wh,Vi as Wi,W,Wa,Wb,Wc,Wd,We,Wf as Xf,Wg as Xg,Wh as Xh,Wi as Xi,X,Xa,Xb,Xc,Xd,Xe,Xf as Yf,Xg as Yg,Xh as Yh,Xi as Yi,Y,Ya,Yb,Yc,Yd,Ye,Yf as Zf,Yg as Zg,Yh as Zh,Yi as Zi,Z,Za,Zb,Zc,Zd,Ze,Zf as _f,Zg as _g,Zh as _h,Zi as _i,_,_a,_b,_c,_d,_e,_f as $f,_g as $g,_h as $h,_i as $i,a,aa,ab,ac,ad,ae,af,ag as bg,ah as bh,ai as bi,aj as bj,b,ba,bb,bc,bd,be,bf,bg as cg,bh as ch,bi as ci,bj as cj,c,ca,cb,cc,cd,ce,cf,cg as dg,ch as dh,ci as di,cj as dj,d,da,db,dc,dd,de,df,dg as eg,dh as eh,di as ei,dj as ej,e,ea,eb,ec,ed,ee,ef,eg as fg,eh as fh,ei as fi,ej as fj,f,fa,fb,fc,fd,fe,ff,fg as gg,fh as gh,fi as gi,fj as gj,g,ga,gb,gc,gd,ge,gf,gg as hg,gh as hh,gi as hi,gj as hj,h,ha,hb,hc,hd,he,hf,hg as ig,hh as ih,hi as ii,i,ia,ib,ic,id,ie,if as jf,ig as jg,ih as jh,ii as ji,j,ja,jb,jc,jd,je,jf as kf,jg as kg,jh as kh,ji as ki,k,ka,kb,kc,kd,ke,kf as lf,kg as lg,kh as lh,ki as li,l,la,lb,lc,ld,le,lf as mf,lg as mg,lh as mh,li as mi,m,ma,mb,mc,md,me,mf as nf,mg as ng,mh as nh,mi as ni,n,na,nb,nc,nd,ne,nf as of,ng as og,nh as oh,ni as oi,o,oa,ob,oc,od,oe,of as pf,og as pg,oh as ph,oi as pi,p,pa,pb,pc,pd,pe,pf as qf,pg as qg,ph as qh,pi as qi,q,qa,qb,qc,qd,qe,qf as rf,qg as rg,qh as rh,qi as ri,r,ra,rb,rc,rd,re,rf as sf,rg as sg,rh as sh,ri as si,s,sa,sb,sc,sd,se,sf as tf,sg as tg,sh as th,si as ti,t,ta,tb,tc,td,te,tf as uf,tg as ug,th as uh,ti as ui,u,ua,ub,uc,ud,ue,uf as vf,ug as vg,uh as vh,ui as vi,v,va,vb,vc,vd,ve,vf as wf,vg as wg,vh as wh,vi as wi,w,wa,wb,wc,wd,we,wf as xf,wg as xg,wh as xh,wi as xi,x,xa,xb,xc,xd,xe,xf as yf,xg as yg,xh as yh,xi as yi,y,ya,yb,yc,yd,ye,yf as zf,yg as zg,yh as zh,yi as zi,z,za,zb,zc,zd,ze,zf as Af,zg as Ag,zh as Ah,zi as Ai}from"./chunk-IUDHYOKC.js";export{Fa as COMMON_LOCALES,Ha as COUPON_TERM_LOCALES,ff as CUSTOMER_DATA_SOURCES,oi as DEFAULT_AUDIENCE_GROUP,Ug as DEFAULT_FUNNEL_EXECUTION_POLICY,qg as FUNNEL_LIMITS,Nh as FUNNEL_PREVIEW_LIMITS,ag as POPUP_WIDTHS,rf as SCREEN_LIMITS,qf as SCREEN_SCHEMA_VERSION,tg as SCREEN_TEMPLATES,_f as SURFACE_PATHS,Ze as SURFACE_VARIABLES,rg as UNBOUND_PRODUCT_VERSION_ID,j as aiMarkupSchema,i as aiModelIdSchema,k as aiModelRatesSchema,l as aiPricingConfigurationSchema,h as aiTokenPools,p as amountToMinor,We as apiErrorCodeSchema,Xe as apiOperations,Pe as apiPermissionSchema,Ii as appResultsSchema,Hi as appRevenueSchema,Pi as appendScreenTemplate,dj as applyGrowthReleasePlan,Gg as archiveSurfaceTemplateSchema,ri as audienceCustomerSchema,Ai as audienceFunnelUsageSchema,Bi as audienceFunnelUsagesSchema,si as audienceMembersSchema,cc as audienceSchema,qi as audienceWriteSchema,ji as auditFieldSchema,mi as auditHistoryCursorSchema,ni as auditHistorySchema,ii as auditResourceSchema,gb as autoTopupPurchaseLimitsSchema,sb as autoTopupStateSchema,Wd as balanceAdjustmentCommandSchema,Xd as balanceAdjustmentStateSchema,vc as balanceAllocationSchema,tc as balanceCommandSchema,Ac as balanceGrantCommandSchema,zc as balanceGrantCreateSchema,Dc as balanceGrantPageSchema,Cc as balanceGrantReadSchema,Bc as balanceGrantSchema,yc as balanceOperationSchema,uc as balancePricingSegmentSchema,xc as balanceQuoteSchema,wc as balanceRejectionReasonSchema,Vi as balanceSourceReasonSchema,Yd as balanceSourceStateSchema,Wi as balanceSourceStatusSchema,Yi as balanceSourcesPageSchema,Xi as balanceSourcesQuerySchema,$a as billingAccruedMinorSchema,_a as billingAmountMinorSchema,jb as billingAuthorizationSchema,ib as billingAuthorizationTermsSchema,ab as billingBudgetMinorSchema,tb as billingControlInputSchema,ub as billingControlsSchema,Bb as billingCouponsSchema,s as billingCurrencies,vb as billingInvoiceLineSchema,wb as billingInvoiceSchema,zb as billingInvoicesSchema,nb as billingLimitSchema,Cg as billingPortalInputSchema,Dg as billingPortalSchema,w as billingSettingsMutationSchema,u as billingSettingsSchema,v as billingSettingsScopeSchema,rb as billingUsageWindowSchema,Ff as borderSchema,Lf as buttonNodeSchema,fc as campaignInputSchema,dc as campaignOfferSchema,gc as campaignSchema,Da as canonicalLocale,_e as capabilityBindingSchema,eb as cashPriceSchema,cb as cashPricingSchema,bb as cashPricingTiersSchema,Za as cashUnitAmountMinorSchema,ue as claimRewardProductRequestSchema,dd as commerceAccessSchema,Jd as commerceCursorSchema,Kd as commerceListQuerySchema,ed as commerceMoneySchema,Ri as commerceProductKind,cd as commerceProductKindSchema,bd as commerceProviderSchema,ta as compileGrowthFeatures,xb as confirmBillingAdjustmentInputSchema,lb as confirmBillingAuthorizationInputSchema,hj as consoleHasPermission,fj as consoleResources,gj as consoleRolePermissions,ej as consoleRoleSchema,Sf as countdownNodeSchema,Oa as couponAppliesToSchema,Ta as couponChangeErrors,Rf as couponCodeNodeSchema,Ma as couponDiscountSchema,ti as couponDisplaySchema,yg as couponDistributionBatchSchema,Ag as couponDistributionDetailSchema,xg as couponDistributionPreviewSchema,zg as couponDistributionRecipientSchema,Bg as couponDistributionWriteSchema,Na as couponDurationSchema,Pa as couponEligibilitySchema,Qa as couponInputSchema,La as couponStatusSchema,gi as couponTemplateExample,ei as couponTemplateKey,Wa as couponWindow,wi as createAccountOverviewPage,vi as createCreditCenterPage,yi as createCustomerPageTemplates,Se as createCustomerRequestSchema,Te as createCustomerResponseSchema,xi as createMembershipPage,we as createReferralCodeRequestSchema,y as creditAmountSchema,be as creditAnalyticsFilterSchema,de as creditAnalyticsPageSchema,ce as creditAnalyticsQuerySchema,$d as creditAnalyticsRangeSchema,ae as creditAnalyticsTimezoneSchema,E as creditDimensionSchema,F as creditMultiplierSchema,A as creditPriceAdjustmentSchema,G as creditPricingSchema,C as creditPropertiesSchema,z as creditQuantitySchema,H as creditRateSchema,Db as creditResetCountSchema,Cb as creditResetSchema,B as creditResourceKeySchema,Eb as creditRolloverSchema,Hc as creditStatementInputSchema,Ic as creditStatementSchema,D as creditTiersSchema,m as currencies,t as currencyAmountOptionsSchema,o as currencyDecimals,n as currencySchema,Ye as currentApiOperations,Jc as currentNotificationEventTypeSchema,Pf as customHtmlNodeSchema,da as customerActivitySchema,Ee as customerAttributesSchema,pi as customerAudienceSchema,hf as customerDataConfigSchema,lf as customerDataIntentSchema,Nf as customerDataNodeSchema,gf as customerDataSourceSchema,Ve as customerEntitlementsSchema,Ne as customerFiltersSchema,Fe as customerFingerprintSchema,Ji as customerFunnelGroupsSchema,Le as customerGetSchema,Rc as customerHoldingsSchema,Ge as customerInputSchema,Vc as customerLedgerEntrySchema,Wc as customerLedgerPageSchema,Uc as customerLedgerQuerySchema,Je as customerLookupSchema,Ie as customerMutationSchema,kf as customerPageDataSchema,jf as customerPageNodeStateSchema,hi as customerPageSampleData,Oe as customerPageSchema,Ke as customerPatchSchema,ac as customerPlanCreateSchema,bc as customerPlanCreatedSchema,ca as customerPlanSchema,He as customerProfileSchema,hc as customerSchema,De as customerTagsSchema,Me as customerUpdateRequestSchema,sg as defaultScreenTheme,Ua as describeCoupon,Rb as diffProductVariant,Mf as dividerNodeSchema,mf as emptyCustomerPageNode,Wb as entitlementCollectionSchema,Gb as entitlementConfigurationSchema,Xb as entitlementOptionsSchema,Fb as entitlementRateSchema,Ub as entitlementRecordSchema,$ as entitlementSnapshotSchema,Ue as entitlementStatusSchema,Zb as entitlementWriteSchema,Q as environmentSchema,$c as environmentSettingsSchema,ic as errorResponseSchema,of as escapeHtmlText,fa as evalCondition,ha as evalFeature,sa as experimentConfigurationSchema,ra as experimentPhaseSchema,xa as experimentSnapshotSchema,U as featureInputSchema,wa as featurePayloadSchema,V as featureSchema,Nc as featureUsageReadSchema,Oc as featureUsageSetSchema,Pc as featureUsageStateSchema,gg as fieldValue,Df as fillSchema,Qc as financialAmountSchema,Tc as financialCursorSchema,Sc as financialEntryTypeSchema,ng as findDocumentNode,mg as findNode,di as formatCouponConditions,Ja as formatCouponDiscount,Ia as formatCouponMoney,Ka as formatCouponTerms,r as formatCurrencyMinor,Ui as formatProductBillingPeriod,Va as formatUsd,Mg as funnelAnswersSchema,gh as funnelBillingAuthorizationActionSchema,jh as funnelBusinessActionSchema,Ch as funnelCollectionSchema,zh as funnelCommandSchema,th as funnelCommerceSchema,Lh as funnelCredentialCommandSchema,Mh as funnelCredentialResponseSchema,kh as funnelCustomWaitEventKeySchema,Lg as funnelDataCursorSchema,yh as funnelDataQueriesSchema,dh as funnelDecisionCommandSchema,bh as funnelDecisionOutputSchema,ah as funnelDecisionPolicySchema,eh as funnelDecisionResponseSchema,ch as funnelDecisionSchema,fh as funnelDecisionUsedResponseSchema,wh as funnelDocumentDraftSchema,xh as funnelDocumentSchema,Ig as funnelEvaluationAttributes,Tg as funnelExecutionPolicySchema,Sg as funnelExternalTaskSchema,nh as funnelGraphDraftSchema,mh as funnelGraphNodeSchema,oh as funnelGraphSchema,ph as funnelGraphTargets,zi as funnelGroupReferenceSchema,Ih as funnelInstructionSchema,uh as funnelNativeEvidenceSchema,Yg as funnelOrchestrationCommandSchema,Og as funnelParametersFromUrl,Ng as funnelParametersSchema,ih as funnelPresentationSchema,Oh as funnelPreviewCommandSchema,Rh as funnelPreviewJournalSchema,Ph as funnelPreviewOutcomeSchema,Th as funnelPreviewRequestSchema,Uh as funnelPreviewResponseSchema,Qh as funnelPreviewScenarioSchema,Wh as funnelPreviewShareWriteSchema,Vh as funnelPreviewSnapshotSchema,Sh as funnelPreviewSourceSchema,hh as funnelProductSelectionSchema,Bh as funnelRecordSchema,Gh as funnelRendererInputSchema,Ci as funnelResultsCursorSchema,Di as funnelResultsQuerySchema,$g as funnelResultsResponseSchema,Ei as funnelResultsSchema,Jh as funnelRunViewSchema,Kh as funnelRuntimeResponseSchema,Hh as funnelRuntimeStatusSchema,Fh as funnelScreenInputsSchema,Zg as funnelSignalResponseSchema,ci as funnelStatisticsSchema,Rg as funnelTaskBindingSchema,Pg as funnelTaskDataSchema,Qg as funnelTaskOutputsSchema,Vg as funnelTaskResponseSchema,_g as funnelTaskResultsSchema,Oi as funnelTemplateDraft,Mi as funnelTemplateSchema,Hg as funnelValueSchema,lh as funnelWaitEventKeySchema,Dh as funnelWriteSchema,cj as getRecommendedRolloutData,Zi as growthAttributeSchema,ja as growthAttributesSchema,$i as growthCatalogSchema,ma as growthConditionGroupIds,Kg as growthConditionPaths,ka as growthConditionSchema,bj as growthDryRunSchema,ua as growthExperimentStop,va as growthFeatureExpiry,oa as growthFeatureRuleSchema,pa as growthFeatureSchema,qa as growthFeaturesSchema,la as growthGroupSchema,_i as growthNamespaceSchema,aj as growthResourceWriteSchema,Aa as growthRuleContextSchema,na as growthSavedGroupsSchema,ya as growthSnapshotSchema,Ba as growthSplitResultSchema,nf as htmlVariableErrors,tf as identifierSchema,Kf as imageNodeSchema,Cf as imagePositionSchema,Af as insetsSchema,Ec as invoiceDetailInputSchema,Gc as invoiceDetailSchema,Fc as invoiceProductItemSchema,fb as isInvoiceCreditPrice,Qi as isRecurringMembership,og as isRtlLocale,db as itemBillingCycleSchema,ia as jsonValueSchema,x as licenseOfferSchema,yb as listBillingInvoicesInputSchema,Ga as localeLabel,Ca as localeSchema,hg as localeStatuses,lg as localizeScreen,pb as manageBillingLimitsInputSchema,ob as manageOveragePolicyInputSchema,Bf as marginSchema,Ea as matchLocale,Jg as matchesGrowthCondition,M as membershipActionSchema,Si as membershipBillingCount,N as membershipChangeSchema,O as membershipHoldingSchema,d as membershipMigrationPageSchema,b as membershipMigrationPreviewSchema,a as membershipMigrationSelectionSchema,c as membershipMigrationStartSchema,K as membershipRulesSchema,P as membershipStateSchema,L as membershipTimingSchema,ki as mergeAuditSchema,T as metadataSchema,q as minorToAmount,pc as nativeProductBindingSchema,rc as nativeProductBindingWriteSchema,qc as nativeProductBindingsPageSchema,fd as nativePurchaseInstructionSchema,Ki as nativeReceiptCommandSchema,Li as nativeReceiptResponseSchema,Ud as nativeRestoreCommandSchema,Vd as nativeRestoreResultSchema,nc as nativeStoreOfferKindSchema,oc as nativeStorePolicySchema,od as nativeSubscriptionUpdatePreviewSchema,pd as nativeSubscriptionUpdateResultSchema,wg as newBlankSurface,Sa as newCouponInput,Eh as newFunnelDocument,ug as newScreenFromTemplate,vg as newSurfaceFromTemplate,sf as nodeIdSchema,li as objectAuditSchema,Fi as offerFlowInputSchema,Gi as offerFlowResultSchema,Xa as offerSchema,Ya as offerUnavailableReasonSchema,sc as overageBehaviorSchema,qb as overagePolicySchema,vh as ownedFunnelScreenSchema,yf as paintColorSchema,Ed as paymentSetupCommandSchema,Fd as paymentSetupReadSchema,Gd as paymentSetupSchema,_h as paywallCollectionSchema,Xh as paywallDocumentDraftSchema,Yh as paywallDocumentSchema,bi as paywallFunnel,ai as paywallLibrarySchema,Zh as paywallRecordSchema,$h as paywallWriteSchema,Y as planConfigSchema,Z as planInputSchema,X as planItemSchema,Tf as planPickerNodeSchema,_ as planSchema,aa as planVersionSchema,ec as popupSchema,$b as prepaidAllowanceAmount,f as prepaidPriceAmount,g as prepaidQuantityAmount,jc as prepaidQuantitySchema,e as prepaidTierPricingSchema,hb as prepareBillingAuthorizationInputSchema,fi as prepareCouponTemplate,ea as prepareSavedGroups,kb as preparedBillingAuthorizationSchema,$f as presentationSchema,Qf as priceNodeSchema,W as priceSchema,Jb as productAllowanceSchema,kc as productBindingSchema,mc as productBindingWriteSchema,lc as productBindingsPageSchema,Vb as productCollectionSchema,Mb as productConfigurationSchema,Pb as productDefinitionSchema,_b as productEditorOptionsSchema,Lb as productLicenseSchema,Sb as productOptionsSchema,Ib as productPrepaidPriceSchema,Hb as productPricesSchema,Tb as productRecordSchema,Kb as productTrialSchema,Nb as productVariantOverridesSchema,Ob as productVariantSchema,Yb as productWriteSchema,_c as projectSettingsSchema,Ra as promotionCodeInputSchema,ig as publishChecks,Md as purchaseListItemSchema,Sd as purchaseListPageSchema,vf as radiusSchema,te as redeemRewardRequestSchema,xe as referralCodeSchema,ze as referralProgramCollectionSchema,ne as referralProgramInputSchema,pe as referralProgramRecordSchema,re as referralProgramWriteSchema,cg as replaceFirstPageRoot,ui as resolveCouponDisplay,Xg as resolveFunnelTaskInputs,Qb as resolveProductVariant,kg as resolveScreenLocale,Re as responseMetaSchema,mb as revokeBillingAuthorizationInputSchema,Be as rewardActivitySchema,me as rewardCodeInputSchema,Ae as rewardCodeSchema,Ce as rewardCodeWriteSchema,ye as rewardCollectionSchema,je as rewardConfigurationSchema,le as rewardInputSchema,ve as rewardProductCheckoutSchema,oe as rewardRecordSchema,se as rewardRedemptionSchema,ke as rewardStatusSchema,qe as rewardWriteSchema,ga as runExperiment,Ti as sameMembershipBillingCycle,Fg as saveSurfaceTemplateSchema,R as scopeSchema,Xf as screenActionSchema,dg as screenDocumentSchema,wf as screenImageSourceSchema,Wf as screenNodeSchema,pg as screenSelections,Yf as screenStringsSchema,Yc as seatCommandSchema,Xc as seatReadSchema,Zc as seatsStateSchema,rh as selectFunnelCondition,ef as selectedSurfaceValue,jg as servableLocales,Ab as setBillingCouponsInputSchema,Gf as shadowSchema,Ef as shapeSchema,zf as sizeSchema,uf as spaceSchema,Of as spacerNodeSchema,S as stableKeySchema,Uf as stackInteractionSchema,Vf as stackNodeSchema,za as stickyAssignmentDocumentSchema,md as stripeSubscriptionUpdatePreviewSchema,nd as stripeSubscriptionUpdateResultSchema,If as styleSchema,gd as subscriptionAttachCommandSchema,id as subscriptionAttachQuoteSchema,wd as subscriptionBatchCommandSchema,yd as subscriptionBatchGroupSchema,xd as subscriptionBatchReadSchema,zd as subscriptionBatchSchema,kd as subscriptionCarryOptionsSchema,Td as subscriptionConflictPageSchema,Od as subscriptionConflictQuerySchema,Qd as subscriptionConflictRetryResultSchema,Pd as subscriptionConflictRetrySchema,Nd as subscriptionConflictSchema,Ld as subscriptionListItemSchema,Rd as subscriptionListPageSchema,hd as subscriptionOperationInputSchema,jd as subscriptionOperationSchema,sd as subscriptionRefundCommandSchema,vd as subscriptionRefundOptionsSchema,td as subscriptionRefundPreviewSchema,ud as subscriptionRefundResultSchema,Ad as subscriptionTrialCommandSchema,Dd as subscriptionTrialPolicySchema,Bd as subscriptionTrialReadSchema,Cd as subscriptionTrialResultSchema,ld as subscriptionUpdateCommandSchema,qd as subscriptionUpdatePreviewSchema,rd as subscriptionUpdateResultSchema,Hd as subscriptionVerificationInputSchema,Id as subscriptionVerificationSchema,pf as substituteHtmlVariables,df as substituteSurfaceVariables,af as surfaceDataSchema,Zf as surfaceSchema,Eg as surfaceTemplateSchema,$e as surfaceValueSchema,bf as surfaceVariableNames,Ni as templateScreen,Jf as textNodeSchema,Hf as textStyleSchema,xf as themeSchema,sh as transitionFunnelGraph,fg as translatableFields,I as trialPolicySchema,J as trialRecordSchema,cf as unknownSurfaceVariables,Lc as usageAlertNotificationDataSchema,Mc as usageAllowanceNotificationDataSchema,fe as usageAnalyticsPageSchema,ee as usageAnalyticsQuerySchema,ie as usageBatchPageSchema,he as usageBatchReadSchema,ge as usageBatchSubmitSchema,Zd as usageEntityCommandSchema,_d as usageEntitySchema,Kc as usageLimitNotificationDataSchema,Ah as validateFunnelAnswers,qh as validateFunnelGraph,Wg as validateFunnelTaskData,ba as validitySchema,Qe as verifiedPrincipalSchema,bg as walkDocument,eg as walkScreen,ad as workspaceSettingsSchema};