@tinkerlandai/longplay-sdk 0.10.4 → 0.10.6

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +9 -3
  3. package/README.zh-CN.md +6 -4
  4. package/dist/chunk-5JJZSH23.js +179 -0
  5. package/dist/chunk-65WKEU2L.js +1 -0
  6. package/dist/{chunk-MRN4HP4W.js → chunk-AWZFL4HE.js} +1 -1
  7. package/dist/{chunk-YQHPEP4X.js → chunk-F4YCLQGU.js} +1 -1
  8. package/dist/{chunk-KBM7BYQY.js → chunk-FRGIXMNP.js} +1 -1
  9. package/dist/{chunk-HOW7NIIR.js → chunk-FXVZRIJ3.js} +1 -1
  10. package/dist/{chunk-JB46ZKGZ.js → chunk-HV4THS52.js} +1 -1
  11. package/dist/{chunk-VMM3GA3L.js → chunk-JSHLBGDY.js} +1 -1
  12. package/dist/chunk-MOWYD2TV.js +1 -0
  13. package/dist/chunk-VUWXU4FP.js +1 -0
  14. package/dist/{chunk-2HFA34QO.js → chunk-WCVK4OMS.js} +2 -2
  15. package/dist/content-ZQNYKPZT.js +1 -0
  16. package/dist/{funnel-local-client-CVokI0rx.d.ts → funnel-local-client-B4Z3dvNf.d.ts} +1 -1
  17. package/dist/{funnel-resource-client-Cv5OjfAn.d.ts → funnel-resource-client-BhbXsB2q.d.ts} +1 -1
  18. package/dist/funnel-runtime-host-DDBGBB5L.js +1 -0
  19. package/dist/index.d.ts +5 -5
  20. package/dist/index.js +1 -1
  21. package/dist/native-shell.js +1 -1
  22. package/dist/openrouter.js +1 -1
  23. package/dist/page.js +1 -1
  24. package/dist/paywall-XQG2D3PA.js +1 -0
  25. package/dist/popup.d.ts +2 -1
  26. package/dist/popup.js +1 -1
  27. package/dist/react-native.d.ts +5 -5
  28. package/dist/react-native.js +1 -1
  29. package/dist/screen-renderer-NLB3FAQJ.js +1 -0
  30. package/dist/server.d.ts +3 -3
  31. package/dist/server.js +1 -1
  32. package/dist/visual.js +1 -1
  33. package/package.json +1 -1
  34. package/dist/chunk-VOEFXEPP.js +0 -1
  35. package/dist/chunk-X6BCUINI.js +0 -173
  36. package/dist/chunk-ZPZVSC4J.js +0 -1
  37. package/dist/content-NYMIZRNR.js +0 -1
  38. package/dist/funnel-runtime-host-UL4DEJDU.js +0 -1
  39. package/dist/paywall-EJCNWDHK.js +0 -1
  40. package/dist/screen-renderer-JMHV4GPP.js +0 -1
@@ -0,0 +1 @@
1
+ import{f as F,j as Q}from"./chunk-5JJZSH23.js";import{b as B}from"./chunk-SSLZKIIU.js";import{a as z,b as _}from"./chunk-MOWYD2TV.js";import{L as U}from"./chunk-WCVK4OMS.js";import{Y as P,ca as M,ja as N,ka as q,qa as d}from"./chunk-ACF2FBUB.js";import{a as v}from"./chunk-DSPLGTQI.js";import"./chunk-G56XGVMS.js";import"./chunk-AWZFL4HE.js";import{a as V}from"./chunk-7DXL3LHT.js";import"./chunk-XSVQHPQT.js";import{z as p}from"zod";var x=new WeakMap;function W(r){let t={string:p.string(),number:p.number().finite(),boolean:p.boolean(),strings:p.array(p.string()),json:V}[r.type];return r.nullable?t.nullable():t}async function ie(r,t){return $(r,t,!1)}async function se(r,t){return $(r,t,!0)}async function $(r,t,w){t.signal?.throwIfAborted();let L=U.parse(t.content),o=L.document;if(x.has(r))throw new d("CONFLICT","Content is already mounted in this container");let f=p.record(p.string(),V).parse(t.inputs??{});if(Object.keys(f).length>40)throw new d("INVALID_REQUEST","Too many content inputs");for(let[e,s]of Object.entries(f))N.parse({[e]:s});if(Object.keys(f).some(e=>!Object.hasOwn(o.contract.inputs,e)))throw new d("INVALID_REQUEST","Undeclared content input");for(let[e,s]of Object.entries(o.contract.inputs))if(Object.hasOwn(f,e))W(s).parse(f[e]);else if(s.required)throw new d("INVALID_REQUEST",`Missing content input ${e}`);for(let e of Object.keys(o.contract.outputs))if(typeof t.actions[e]!="function")throw new d("INVALID_REQUEST",`Missing host handler for ${e}`);let J=q.parse(t.bindings??[]),c=r.ownerDocument,T,k=o.kind==="popup",n=k?c.createElement("dialog"):null,i=c.createElement("div");if(i.dataset.indianaContent=o.kind,i.setAttribute("aria-label",o.name),i.style.cssText="width:100%;min-width:0",n){n.setAttribute("aria-label",o.name);let e=o.screen.presentation;n.style.cssText="box-sizing:border-box;padding:0;border:0;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto",e.type==="modal"||e.type==="sheet"?(n.style.width=`${P[e.size]}px`,e.type==="sheet"&&(n.style.margin="auto auto 0")):n.style.width="100vw",n.append(i),r.append(n)}else r.append(i);let l=!1,C=!1,y=!1;w&&!n&&(i.style.width=`${r.getBoundingClientRect().width||c.defaultView?.innerWidth||800}px`);let G=w?F(n??i):()=>{},D,A,S=new Promise((e,s)=>{D=e,A=s});S.catch(()=>{});let u=null,E=structuredClone(o.screen);E.actions=E.actions.map(e=>e.type==="event"?{...e,close:!1}:e);let b;function m(){l||(l=!0,t.signal?.removeEventListener("abort",m),A(new Error("Content preparation cancelled")),b?.destroy(),n?.close(),n?.remove(),i.remove(),x.delete(r),n&&T?.())}let O=()=>{y&&(m(),v(t.onDismiss))};if(n){let e=c.createElement("button");e.type="button",e.textContent="\xD7",e.setAttribute("aria-label",t.locale?.startsWith("zh")?"\u5173\u95ED":"Close"),_(e,o.screen.theme),e.addEventListener("click",O),n.prepend(e)}n?.addEventListener("cancel",e=>{e.preventDefault(),O()});async function H(){if(l||!y||C||!u)return;let e=u;C=!0,i.setAttribute("aria-busy","true");try{await t.actions[e.actionId](structuredClone(e)),u=null}catch(s){v(t.onError,s)}finally{C=!1,l||i.removeAttribute("aria-busy")}}function R(){if(l)throw new d("CONFLICT","Content host has been destroyed");y||(T=B(c),G(),w&&!n&&(i.style.width="100%"),n&&(n.showModal(),z(n,o.screen.presentation.type)),y=!0)}try{w||R(),b=Q(i,{mode:"live",title:o.name,viewportHeight:o.kind==="page"?r.clientHeight||c.defaultView?.innerHeight||800:void 0,onRendered:a=>{a&&n?.setAttribute("aria-label",a),D()},onError:a=>{let I=new Error(a);A(I),v(t.onError,I)},onEscape:k?O:void 0,onAction:(a,I,K)=>{if(l||!y||C||u)return;let h=o.screen.actions.find(g=>g.id===a),j=o.contract.outputs[a];if(!(h?.type!=="event"||!j))try{let g=W(j).parse(Object.hasOwn(h.properties,"value")?h.properties.value:h.properties);u={requestId:crypto.randomUUID(),contentVersionId:L.id,actionId:a,event:h.event,value:g,selection:I??{},answers:K??{},requestedClose:h.close},H()}catch(g){v(t.onError,g)}}});let e={destroy:m,show:R,get pendingAction(){return u?structuredClone(u):null},retryAction:H,updateCapabilities:a=>b?.updateCapabilities(a)};x.set(r,e),t.signal?.addEventListener("abort",m,{once:!0}),t.signal?.aborted&&(m(),t.signal.throwIfAborted());let s=M(E,[t.locale,...c.defaultView?.navigator.languages??[]]);if(b.update(E,s,{capabilities:t.capabilities,serverInput:{bindings:J,answers:{},values:f}}),await Promise.race([b.ready,S]),w&&await S,l)throw new Error("Content preparation cancelled");return e}catch(e){throw m(),e}}export{ie as mountContent,se as prepareContent};
@@ -46994,4 +46994,4 @@ declare function createLocalFunnelClient(options: LocalFunnelClientOptions): Pro
46994
46994
  }>;
46995
46995
  type LocalFunnelClient = Awaited<ReturnType<typeof createLocalFunnelClient>>;
46996
46996
 
46997
- export { type CustomerSession as C, type FunnelRunView as F, type IndianaOptions as I, type LocalFunnelClient as L, type PaywallSession as P, type RemoteFeatureResult as R, type SubscriptionOperation as S, type PushAddressObservation as a, type FunnelCommandStorage as b, type FunnelStartInput as c, type FunnelSegmentPrediction as d, type PaywallDelivery as e, type FunnelDataQueries as f, type FunnelRuntimeResponse as g, type FunnelMutation as h, type FeatureClient as i, type FeatureClientOptions as j, type FunnelPendingEntry as k, type FunnelPurchaseRecovery as l, IndianaError as m, type LocalFunnelClientOptions as n, type PaywallPurchaseInput as o, type PaywallStartInput as p, type PushHost as q, type PushJournal as r, type SessionCredentials as s, createFeatureClient as t, createLocalFunnelClient as u, createPaywallSession as v, type Scope as w, type PaywallResolution as x, type IndianaServerOptions as y, createFunnelStartClient as z };
46997
+ export { type CustomerSession as C, type FunnelRunView as F, type IndianaOptions as I, type LocalFunnelClient as L, type PaywallSession as P, type RemoteFeatureResult as R, type SubscriptionOperation as S, type PushAddressObservation as a, type FunnelCommandStorage as b, type FunnelStartInput as c, type FunnelSegmentPrediction as d, type PaywallDelivery as e, type FunnelDataQueries as f, type FunnelRuntimeResponse as g, type FunnelMutation as h, type FeatureClient as i, type FeatureClientOptions as j, type FunnelPendingEntry as k, type FunnelPurchaseRecovery as l, type LocalFunnelClientOptions as m, IndianaError as n, type PaywallPurchaseInput as o, type PaywallStartInput as p, type PushHost as q, type PushJournal as r, type SessionCredentials as s, createFeatureClient as t, createLocalFunnelClient as u, createPaywallSession as v, type Scope as w, type PaywallResolution as x, type IndianaServerOptions as y, createFunnelStartClient as z };
@@ -2,7 +2,7 @@ import * as zod from 'zod';
2
2
  import { z } from 'zod';
3
3
  import { S as StackNode } from './screen-D81zCpfi.js';
4
4
  import { I as InvoiceModeParams } from './api-5gAz4-Sb.js';
5
- import { g as FunnelRuntimeResponse, F as FunnelRunView, h as FunnelMutation, l as FunnelPurchaseRecovery, d as FunnelSegmentPrediction, e as PaywallDelivery, x as PaywallResolution, f as FunnelDataQueries, I as IndianaOptions, j as FeatureClientOptions } from './funnel-local-client-CVokI0rx.js';
5
+ import { g as FunnelRuntimeResponse, F as FunnelRunView, h as FunnelMutation, l as FunnelPurchaseRecovery, d as FunnelSegmentPrediction, e as PaywallDelivery, x as PaywallResolution, f as FunnelDataQueries, I as IndianaOptions, j as FeatureClientOptions } from './funnel-local-client-B4Z3dvNf.js';
6
6
  import { a as ConfigurationSync } from './configuration-sync-CywDxRkX.js';
7
7
 
8
8
  /** The store supplies the intent hint. Only verified provider facts prove ownership. */
@@ -0,0 +1 @@
1
+ import{b as a}from"./chunk-VUWXU4FP.js";import"./chunk-MOWYD2TV.js";import"./chunk-SBPTOOYB.js";import"./chunk-WCVK4OMS.js";import"./chunk-ACF2FBUB.js";import"./chunk-EARSGITJ.js";import"./chunk-FXVZRIJ3.js";import"./chunk-DSPLGTQI.js";import"./chunk-G56XGVMS.js";import"./chunk-AWZFL4HE.js";import"./chunk-7DXL3LHT.js";import"./chunk-XSVQHPQT.js";export{a as showFunnelRun};
package/dist/index.d.ts CHANGED
@@ -3,10 +3,10 @@ import { z } from 'zod';
3
3
  import { S as ScreenAnswers, s as screenInputBindingsSchema, a as SurfaceData, C as CustomerDataIntent } from './customer-page-km5f1PJZ.js';
4
4
  import { J as JsonValue, F as FeatureResult } from './growth-rules-B4YYy64R.js';
5
5
  import { S as StackNode, a as ScreenSelection } from './screen-D81zCpfi.js';
6
- import { P as PaywallSession, S as SubscriptionOperation, F as FunnelRunView, I as IndianaOptions, C as CustomerSession, R as RemoteFeatureResult, a as PushAddressObservation, b as FunnelCommandStorage, c as FunnelStartInput, d as FunnelSegmentPrediction, e as PaywallDelivery, f as FunnelDataQueries, g as FunnelRuntimeResponse, h as FunnelMutation } from './funnel-local-client-CVokI0rx.js';
7
- export { i as FeatureClient, j as FeatureClientOptions, k as FunnelPendingEntry, l as FunnelPurchaseRecovery, m as IndianaError, L as LocalFunnelClient, n as LocalFunnelClientOptions, m as LongplayError, o as PaywallPurchaseInput, p as PaywallStartInput, q as PushHost, r as PushJournal, s as SessionCredentials, t as createFeatureClient, u as createLocalFunnelClient, v as createPaywallSession } from './funnel-local-client-CVokI0rx.js';
8
- import { F as FunnelRunController, a as FunnelResourceSource, I as IndianaFeatureOptions, N as NativeRestoreCommand } from './funnel-resource-client-Cv5OjfAn.js';
9
- export { b as FunnelControllerResponse, c as createFunnelRunController } from './funnel-resource-client-Cv5OjfAn.js';
6
+ import { P as PaywallSession, S as SubscriptionOperation, F as FunnelRunView, I as IndianaOptions, C as CustomerSession, R as RemoteFeatureResult, a as PushAddressObservation, b as FunnelCommandStorage, c as FunnelStartInput, d as FunnelSegmentPrediction, e as PaywallDelivery, f as FunnelDataQueries, g as FunnelRuntimeResponse, h as FunnelMutation } from './funnel-local-client-B4Z3dvNf.js';
7
+ export { i as FeatureClient, j as FeatureClientOptions, k as FunnelPendingEntry, l as FunnelPurchaseRecovery, L as LocalFunnelClient, m as LocalFunnelClientOptions, n as LongplayError, o as PaywallPurchaseInput, p as PaywallStartInput, q as PushHost, r as PushJournal, s as SessionCredentials, t as createFeatureClient, u as createLocalFunnelClient, v as createPaywallSession } from './funnel-local-client-B4Z3dvNf.js';
8
+ import { F as FunnelRunController, a as FunnelResourceSource, I as IndianaFeatureOptions, N as NativeRestoreCommand } from './funnel-resource-client-BhbXsB2q.js';
9
+ export { b as FunnelControllerResponse, c as createFunnelRunController } from './funnel-resource-client-BhbXsB2q.js';
10
10
  import { C as CouponInput, O as Offer } from './coupon-fA1QujHt.js';
11
11
  export { a as OfferUnavailableReason } from './coupon-fA1QujHt.js';
12
12
  import { M as MerchantBridgeManifest } from './funnel-node-evaluation-P5B4fPfJ.js';
@@ -23542,4 +23542,4 @@ declare function prepareContent(...args: Parameters<typeof prepareContent$1>): P
23542
23542
  updateCapabilities: (data: SurfaceData) => void | undefined;
23543
23543
  }>;
23544
23544
 
23545
- export { type ContentActionIntent, type ContentHostOptions, CustomerSession, FunnelCommandStorage, type FunnelHostOptions, FunnelResourceSource, FunnelRunController, FunnelRuntimeResponse, FunnelSegmentPrediction, type IamFunnelEntriesOptions, IndianaFeatureOptions, IndianaOptions, IndianaFeatureOptions as LongplayFeatureOptions, IndianaOptions as LongplayOptions, MerchantBridgeError, type MerchantBridgeOptions, Offer, type PaywallHostOptions, type PaywallPurchaseIntent, PaywallSession, createBrowserFunnelCommandStorage, createFunnelClient, createFunnelPageExperiments, createIamFunnelEntries, createIndiana, createIndiana as createLongplay, createMerchantBridge, formatCouponDiscount, formatCouponMoney, formatCouponTerms, mountContent, prepareContent, showFunnelRun, showPaywall };
23545
+ export { type ContentActionIntent, type ContentHostOptions, CustomerSession, FunnelCommandStorage, type FunnelHostOptions, FunnelResourceSource, FunnelRunController, FunnelRuntimeResponse, FunnelSegmentPrediction, type IamFunnelEntriesOptions, IndianaFeatureOptions as LongplayFeatureOptions, IndianaOptions as LongplayOptions, MerchantBridgeError, type MerchantBridgeOptions, Offer, type PaywallHostOptions, type PaywallPurchaseIntent, PaywallSession, createBrowserFunnelCommandStorage, createFunnelClient, createFunnelPageExperiments, createIamFunnelEntries, createIndiana as createLongplay, createMerchantBridge, formatCouponDiscount, formatCouponMoney, formatCouponTerms, mountContent, prepareContent, showFunnelRun, showPaywall };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{a as ke,b as Ce}from"./chunk-ZPZVSC4J.js";import{a as Se,c as He}from"./chunk-KBM7BYQY.js";import{a as Fe}from"./chunk-VOEFXEPP.js";import{b as De,g as Pe,l as z,m as xe,n as Be,p as Le}from"./chunk-JB46ZKGZ.js";import"./chunk-SBPTOOYB.js";import{F as Ne,G as Oe,H as Te,Ka as ge,La as Ee,Ma as we,Qa as ve,i as oe,k as q,l as ae,m as ie,n as se,o as ce,p as de,q as ue,qa as ye,r as le,s as me,t as fe,u as pe,w as $,x as he,y as Ie}from"./chunk-2HFA34QO.js";import{qa as M}from"./chunk-ACF2FBUB.js";import{c as be}from"./chunk-CLXORAOK.js";import"./chunk-EARSGITJ.js";import{c as Re,d as _e}from"./chunk-HOW7NIIR.js";import{a as L}from"./chunk-DSPLGTQI.js";import"./chunk-G56XGVMS.js";import"./chunk-MRN4HP4W.js";import"./chunk-7DXL3LHT.js";import"./chunk-XSVQHPQT.js";import{z as j}from"zod";var r=class extends Error{constructor(u,B=0,I=!1,f="fix_request"){super(u);this.code=u;this.status=B;this.retryable=I;this.recovery=f;this.name="MerchantBridgeError"}code;status;retryable;recovery};async function Ge(n,_){if(!n.headers.get("content-type")?.split(";",1)[0].trim().match(/^application\/(?:json|[a-z0-9.+-]+\+json)$/i))throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE");let u=n.body?.getReader();if(!u)throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE");let B=()=>{u.cancel().catch(()=>{})};_.addEventListener("abort",B,{once:!0});let I=0,f="",a=new TextDecoder("utf-8",{fatal:!0});try{for(_.throwIfAborted();;){let d=await u.read();if(_.throwIfAborted(),d.done)break;if(I+=d.value.byteLength,I>262144)throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE");f+=a.decode(d.value,{stream:!0})}return f+=a.decode(),JSON.parse(f)}catch(d){throw _.throwIfAborted(),d instanceof r?d:new r("MERCHANT_BRIDGE_INVALID_RESPONSE")}finally{_.removeEventListener("abort",B),await u.cancel().catch(()=>{}),u.releaseLock()}}function Ue(n){let _=ce.parse(n.origin),u=de.parse(n.manifest),B={projectId:n.scope.projectId,environmentId:n.scope.environmentId,environment:n.scope.environment};for(let o of["projectId","environmentId","environment"])if(u[o]!==n.scope[o])throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");let I=n.customerId===void 0?null:j.uuid().parse(n.customerId),f=0,a=null,d=null,F=new AbortController,k=n.fetch??globalThis.fetch;async function N(o,t,i,g,O){if(!u.capabilities.includes(o))throw new r("MERCHANT_BRIDGE_CAPABILITY_UNSUPPORTED",501);let v=se[o];if(["merchant_catalog_reader","merchant_refund_authority","indiana_server_key"].includes(v.authority))throw new r("MERCHANT_BRIDGE_FORBIDDEN",403);let T=f,x=AbortSignal.any([F.signal,AbortSignal.timeout(Math.min(3e4,Math.max(1e3,n.timeoutMs??1e4))),...n.signal?[n.signal]:[],...g?[g]:[]]);x.throwIfAborted();let S=new Headers(await n.headers?.());if(x.throwIfAborted(),T!==f)throw new DOMException("Merchant identity changed","AbortError");if(/\bgg_(?:sk|ct|rt)_/.test(S.get("authorization")??"")||S.has("X-Indiana-Bridge-Signature")||S.has("X-Indiana-Bridge-Key-Id"))throw new r("MERCHANT_BRIDGE_FORBIDDEN",403);S.set(ie,String(q)),S.set("Accept","application/json");let E=crypto.randomUUID();S.set("X-Request-Id",E),S.set("Content-Type","application/json");let p=await k(_+ae,{method:"POST",credentials:"include",redirect:"error",cache:"no-store",headers:S,signal:x,body:JSON.stringify({bridgeVersion:q,requestId:E,command:v.command,scope:B,data:O??(i===void 0?{}:{operationId:i})})}),D=await Ge(p,x);if(x.throwIfAborted(),T!==f)throw new DOMException("Merchant identity changed","AbortError");if(!p.ok){let y=Ie.safeParse(D);throw!y.success||y.data.scope.projectId!==n.scope.projectId||y.data.scope.environment!==n.scope.environment||y.data.scope.environmentId!==n.scope.environmentId||y.data.requestId!==E||y.data.command!==v.command?new r("MERCHANT_BRIDGE_INVALID_RESPONSE",p.status):new r(y.data.error.code,p.status,y.data.error.retryable,y.data.error.recovery)}let R=ue(j.unknown()).safeParse(D);if(!R.success||R.data.scope.projectId!==n.scope.projectId||R.data.scope.environment!==n.scope.environment||R.data.scope.environmentId!==n.scope.environmentId||R.data.requestId!==E||R.data.command!==v.command)throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE",p.status);let l=t.safeParse(R.data.data);if(!l.success)throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE",p.status);return l.data}function w(){if(!I)throw new r("MERCHANT_BRIDGE_UNAUTHENTICATED",401);return I}async function H(o,t,i,g){let O=w(),v=pe.parse({operationId:i,customerId:O}),T=await N(o,t,v.operationId,g,v);if(T.customerId!==O||T.operationId!==v.operationId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");return T}return{async readPresentation(o){let t=await N("presentation",me,void 0,o);if(d!==null&&d!==t.nativeUserId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(t.presentation&&I!==null&&t.presentation.customerId!==I)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");return d=t.nativeUserId,a=t.presentation,t},async createSession(o){let t=await N("session",le,void 0,o);if(d!==null&&d!==t.nativeUserId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(I!==null&&I!==t.session.customerId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(a&&a.customerId!==t.session.customerId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");return I=t.session.customerId,d=t.nativeUserId,t.session},async reportPresentation(o,t){let i=w(),g=fe.parse(o);if(!a||a.customerId!==i||a.decisionId!==g.decisionId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");return N("presentation_events",j.strictObject({queued:j.literal(!0)}),void 0,t,g)},async readCustomerCommerce(o){let t=w(),i=await N("customer_commerce",he,void 0,o);if(i.customerId!==t)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");return i},async executePurchase(o,t){let i=await H("purchases",$,o,t);if(i.type!=="purchase")throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE");return i},readOperation:(o,t)=>H("operation_status",oe,o,t),async executeSubscriptionChange(o,t){let i=await H("subscription_changes",$,o,t);if(i.type!=="subscription_change")throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE");return i},reset(){f++,F.abort(),F=new AbortController,I=null,a=null,d=null}}}function je(n){let _=Re(n.baseUrl),u=n.scope,B=ve(n),I=n.fetch??globalThis.fetch.bind(globalThis),f,a=!1,d=!1,F=0,k=0,N="",w=0,H=0,o=0,t,i=!1,g,O=!0,v,T,x,S,E,p,D=e=>{p===e&&(p=void 0)},R=new Set,l=(e,m)=>L(n.onStatus,e,m);function y(){let e=E;E=void 0,e?.host.destroy(),e?.client.reset()}let K=()=>Date.now()<H&&performance.now()<o;function J(e){if(e.target.release!==n.appManifestRelease||!K())return!1;try{return be(e.target.render,document,location.pathname,()=>{})}catch{return l("incompatible",e.id),!1}}function V(e){return!a&&e.epoch===w&&e.visit===k&&document.visibilityState!=="hidden"}async function X(e){if(p||E){l("in_progress",e.id);return}if(!n.session.peek()){l("identity_required",e.id);return}let m={command:Ee.parse({operation:"entry_start",entryId:e.id,funnelId:e.funnelId,versionId:e.versionId,release:n.appManifestRelease,requestId:crypto.randomUUID(),locale:document.documentElement.lang||"en"}),epoch:w,visit:k};p=m,await Z(m)}async function Z(e){if(e.dispatching)return;e.dispatching=!0;let m,b=!1;async function h(s){if(e.epoch!==w)return;let c=s.view;c&&["running","waiting"].includes(c.status)&&await s.submit({operation:"close",requestId:crypto.randomUUID(),nodeId:c.nodeId,visit:c.visit,revision:c.revision})}try{l("starting",e.command.entryId);let s=await B.request("funnels",e.command),c=we.safeParse(s);if(c.success){if(c.data.scope.projectId!==u.projectId||c.data.scope.environment!==u.environment)throw new M("SCOPE_MISMATCH","Entry scope changed");e.epoch===w&&l(c.data.reason,e.command.entryId),D(e);return}let A=ye.parse(s);if(!A.runToken||A.scope.projectId!==u.projectId||A.scope.environment!==u.environment||A.run.source.type!=="funnel"||A.run.source.id!==e.command.funnelId||A.run.source.versionId!==e.command.versionId)throw new M("INVALID_RESPONSE","Invalid entry Run");if(e.epoch!==w){D(e),l("identity_changed",e.command.entryId);return}let C=z({...n,runToken:A.runToken,funnelId:e.command.funnelId});m=C,await C.get();let U=C.view;if(!U||U.id!==A.run.id||U.source.type!=="funnel"||U.source.id!==e.command.funnelId||U.source.versionId!==e.command.versionId)throw new M("INVALID_RESPONSE","Entry Run version changed");if(!V(e)){await h(C),l("left_screen",e.command.entryId),D(e);return}let ne=!1,te=!1,re=await Ce(n.container,{...n.host,client:C,appManifestRelease:n.appManifestRelease,onDismiss(P){ne=!0,E?.client===C&&(E=void 0,C.reset(),P&&P.status!=="completed"&&l("run_ended",e.command.entryId)),L(n.host?.onDismiss,P)},onComplete(P){te=!0,E?.client===C&&y(),L(n.host?.onComplete,P)},onError(P){L(n.host?.onError,P),E?.client===C&&P instanceof M&&P.code==="FORBIDDEN"&&(y(),l("run_ended",e.command.entryId))}});if(!V(e)||ne||te){re.destroy(),V(e)||await h(C),D(e);return}E={host:re,client:C},b=!0,D(e),l("started",e.command.entryId)}catch(s){!m&&s instanceof M&&s.status!==void 0&&s.status>=400&&s.status<500&&!s.retryable&&D(e),e.epoch===w&&!a&&(l("start_failed",e.command.entryId),L(n.host?.onError,s))}finally{b||m?.reset(),e.dispatching=!1}}function Ae(){if(i=!1,!(a||!d||!K()||document.visibilityState==="hidden")){O=!1;for(let e of f?.entries??[])if(!(e.event!=="screen_enter"||R.has(`${e.funnelId}:${e.id}`)||!J(e))){if(!n.session.peek()){l("identity_required",e.id);continue}R.add(`${e.funnelId}:${e.id}`),X(e);break}}}let G=()=>{!i&&!a&&(i=!0,queueMicrotask(Ae))};function Me(){let e=location.origin+location.pathname;e!==N&&(N=e,k++,O=!0,R.clear(),G())}function Y(e){if(!e.isTrusted||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||document.visibilityState==="hidden")return;let m=e.target;if(!(m instanceof Element)||m.closest("[data-indiana-funnel]"))return;let b=m.closest("button,a,input");if(!(!b||b.matches(":disabled,[aria-disabled='true']")||b.closest("[hidden],[inert],[aria-hidden='true']")))for(let h of f?.entries??[]){let s=h.target.button;if(h.event!=="button_click"||!s||!J(h))continue;let c=document.querySelectorAll(s.selector);if(!(c.length!==1||c[0]!==b)){X(h);break}}}async function Q(){if(a)return;if(g)return g;let e=++F;v=new AbortController;let m=(async()=>{let b=await I(`${_}/api/v1/funnel-entries/${n.environmentId}?iam=${n.appManifestRelease}`,{credentials:"omit",cache:"no-store",signal:v.signal});if(!b.ok)throw new M("SERVICE_UNAVAILABLE","Funnel entries unavailable",b.status);let h=ge.parse(await b.json()),s=Date.parse(h.validatedAt),c=Date.parse(h.validUntil);if(h.scope.projectId!==u.projectId||h.scope.environment!==u.environment||h.scope.environmentId!==n.environmentId||h.release!==n.appManifestRelease||c<=Date.now()||s>Date.now()+5e3||c-s>6e4||c<=s)throw new M("INVALID_RESPONSE","Entry configuration scope or deadline changed");if(a||e!==F)return;let A=f===void 0;f=h,H=c,o=performance.now()+Math.min(c-Date.now(),6e4),(A||O)&&G()})();g=m;try{await m}finally{g===m&&(g=void 0)}}async function W(){try{await Q()}catch{l("configuration_unavailable")}a||(t=setTimeout(()=>{W()},15e3))}let ee=()=>G();return{async start(){d||a||(d=!0,N=location.origin+location.pathname,T=_e(Me),x=n.session.subscribeIdentity(()=>{w++,O=!0,p=void 0,R.clear(),y(),G()}),S=new MutationObserver(G),S.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden","inert","aria-hidden","data-indiana-id","id"]}),document.addEventListener("click",Y,!0),document.addEventListener("visibilitychange",ee),await W())},refresh:Q,async retry(){p&&!a&&p.epoch===w&&await Z(p)},destroy(){a=!0,F++,clearTimeout(t),v?.abort(),S?.disconnect(),T?.(),x?.(),document.removeEventListener("click",Y,!0),document.removeEventListener("visibilitychange",ee),y(),f=void 0}}}async function nn(...n){return(await import("./paywall-EJCNWDHK.js")).showPaywall(...n)}async function tn(...n){return(await import("./funnel-runtime-host-UL4DEJDU.js")).showFunnelRun(...n)}async function rn(...n){return(await import("./content-NYMIZRNR.js")).mountContent(...n)}async function on(...n){return(await import("./content-NYMIZRNR.js")).prepareContent(...n)}export{M as IndianaError,M as LongplayError,r as MerchantBridgeError,Pe as createBrowserFunnelCommandStorage,Be as createConfigurationSync,De as createFeatureClient,He as createFunnelClient,ke as createFunnelPageExperiments,z as createFunnelRunController,je as createIamFunnelEntries,Se as createIndiana,Le as createLocalFunnelClient,Se as createLongplay,Ue as createMerchantBridge,xe as createPaywallSession,Fe as evaluateFunnelNode,Oe as formatCouponDiscount,Ne as formatCouponMoney,Te as formatCouponTerms,rn as mountContent,on as prepareContent,tn as showFunnelRun,nn as showPaywall};
1
+ import{a as Ge,b as Ce}from"./chunk-VUWXU4FP.js";import"./chunk-MOWYD2TV.js";import{a as Pe,c as Le}from"./chunk-FRGIXMNP.js";import{a as He}from"./chunk-65WKEU2L.js";import{b as De,g as xe,l as X,m as Be,n as Fe,p as ke}from"./chunk-HV4THS52.js";import"./chunk-SBPTOOYB.js";import{F as Ne,G as Te,H as Oe,Ka as Ee,La as we,Ma as ve,Qa as Re,i as ae,k as K,l as ie,m as se,n as ce,o as de,p as ue,q as le,qa as ge,r as me,s as fe,t as pe,u as he,w as J,x as Ie,y as ye}from"./chunk-WCVK4OMS.js";import{qa as N}from"./chunk-ACF2FBUB.js";import{a as be,c as Z}from"./chunk-CLXORAOK.js";import"./chunk-EARSGITJ.js";import{c as Se,d as _e}from"./chunk-FXVZRIJ3.js";import{a as j}from"./chunk-DSPLGTQI.js";import"./chunk-G56XGVMS.js";import"./chunk-AWZFL4HE.js";import"./chunk-7DXL3LHT.js";import"./chunk-XSVQHPQT.js";import{z as $}from"zod";var r=class extends Error{constructor(m,L=0,I=!1,h="fix_request"){super(m);this.code=m;this.status=L;this.retryable=I;this.recovery=h;this.name="MerchantBridgeError"}code;status;retryable;recovery};async function Ue(n,S){if(!n.headers.get("content-type")?.split(";",1)[0].trim().match(/^application\/(?:json|[a-z0-9.+-]+\+json)$/i))throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE");let m=n.body?.getReader();if(!m)throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE");let L=()=>{m.cancel().catch(()=>{})};S.addEventListener("abort",L,{once:!0});let I=0,h="",a=new TextDecoder("utf-8",{fatal:!0});try{for(S.throwIfAborted();;){let c=await m.read();if(S.throwIfAborted(),c.done)break;if(I+=c.value.byteLength,I>262144)throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE");h+=a.decode(c.value,{stream:!0})}return h+=a.decode(),JSON.parse(h)}catch(c){throw S.throwIfAborted(),c instanceof r?c:new r("MERCHANT_BRIDGE_INVALID_RESPONSE")}finally{S.removeEventListener("abort",L),await m.cancel().catch(()=>{}),m.releaseLock()}}function je(n){let S=de.parse(n.origin),m=ue.parse(n.manifest),L={projectId:n.scope.projectId,environmentId:n.scope.environmentId,environment:n.scope.environment};for(let o of["projectId","environmentId","environment"])if(m[o]!==n.scope[o])throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");let I=n.customerId===void 0?null:$.uuid().parse(n.customerId),h=0,a=null,c=null,k=new AbortController,V=n.fetch??globalThis.fetch;async function T(o,t,s,E,A){if(!m.capabilities.includes(o))throw new r("MERCHANT_BRIDGE_CAPABILITY_UNSUPPORTED",501);let _=ce[o];if(["merchant_catalog_reader","merchant_refund_authority","indiana_server_key"].includes(_.authority))throw new r("MERCHANT_BRIDGE_FORBIDDEN",403);let O=h,B=AbortSignal.any([k.signal,AbortSignal.timeout(Math.min(3e4,Math.max(1e3,n.timeoutMs??1e4))),...n.signal?[n.signal]:[],...E?[E]:[]]);B.throwIfAborted();let v=new Headers(await n.headers?.());if(B.throwIfAborted(),O!==h)throw new DOMException("Merchant identity changed","AbortError");if(/\bgg_(?:sk|ct|rt)_/.test(v.get("authorization")??"")||v.has("X-Indiana-Bridge-Signature")||v.has("X-Indiana-Bridge-Key-Id"))throw new r("MERCHANT_BRIDGE_FORBIDDEN",403);v.set(se,String(K)),v.set("Accept","application/json");let y=crypto.randomUUID();v.set("X-Request-Id",y),v.set("Content-Type","application/json");let f=await V(S+ie,{method:"POST",credentials:"include",redirect:"error",cache:"no-store",headers:v,signal:B,body:JSON.stringify({bridgeVersion:K,requestId:y,command:_.command,scope:L,data:A??(s===void 0?{}:{operationId:s})})}),D=await Ue(f,B);if(B.throwIfAborted(),O!==h)throw new DOMException("Merchant identity changed","AbortError");if(!f.ok){let g=ye.safeParse(D);throw!g.success||g.data.scope.projectId!==n.scope.projectId||g.data.scope.environment!==n.scope.environment||g.data.scope.environmentId!==n.scope.environmentId||g.data.requestId!==y||g.data.command!==_.command?new r("MERCHANT_BRIDGE_INVALID_RESPONSE",f.status):new r(g.data.error.code,f.status,g.data.error.retryable,g.data.error.recovery)}let R=le($.unknown()).safeParse(D);if(!R.success||R.data.scope.projectId!==n.scope.projectId||R.data.scope.environment!==n.scope.environment||R.data.scope.environmentId!==n.scope.environmentId||R.data.requestId!==y||R.data.command!==_.command)throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE",f.status);let d=t.safeParse(R.data.data);if(!d.success)throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE",f.status);return d.data}function w(){if(!I)throw new r("MERCHANT_BRIDGE_UNAUTHENTICATED",401);return I}async function G(o,t,s,E){let A=w(),_=he.parse({operationId:s,customerId:A}),O=await T(o,t,_.operationId,E,_);if(O.customerId!==A||O.operationId!==_.operationId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");return O}return{async readPresentation(o){let t=await T("presentation",fe,void 0,o);if(c!==null&&c!==t.nativeUserId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(t.presentation&&I!==null&&t.presentation.customerId!==I)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");return c=t.nativeUserId,a=t.presentation,t},async createSession(o){let t=await T("session",me,void 0,o);if(c!==null&&c!==t.nativeUserId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(I!==null&&I!==t.session.customerId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");if(a&&a.customerId!==t.session.customerId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");return I=t.session.customerId,c=t.nativeUserId,t.session},async reportPresentation(o,t){let s=w(),E=pe.parse(o);if(!a||a.customerId!==s||a.decisionId!==E.decisionId)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");return T("presentation_events",$.strictObject({queued:$.literal(!0)}),void 0,t,E)},async readCustomerCommerce(o){let t=w(),s=await T("customer_commerce",Ie,void 0,o);if(s.customerId!==t)throw new r("MERCHANT_BRIDGE_SCOPE_MISMATCH");return s},async executePurchase(o,t){let s=await G("purchases",J,o,t);if(s.type!=="purchase")throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE");return s},readOperation:(o,t)=>G("operation_status",ae,o,t),async executeSubscriptionChange(o,t){let s=await G("subscription_changes",J,o,t);if(s.type!=="subscription_change")throw new r("MERCHANT_BRIDGE_INVALID_RESPONSE");return s},reset(){h++,k.abort(),k=new AbortController,I=null,a=null,c=null}}}function Ve(n){let S=Se(n.baseUrl),m=n.scope,L=Re(n),I=n.fetch??globalThis.fetch.bind(globalThis),h,a=!1,c=!1,k=0,V=0,T="",w=0,G=0,o=0,t,s=!1,E,A=!0,_,O,B,v,y,f,D=e=>{f===e&&(f=void 0,F())},R=new Set,d=(e,u)=>j(n.onStatus,e,u);function g(){let e=y;y=void 0,e?.host.destroy(),e?.client.reset(),F()}let Y=()=>Date.now()<G&&performance.now()<o;function Q(e){if(e.target.release!==n.appManifestRelease||!Y())return!1;try{return Z(e.target.render,document,location.pathname,()=>{})}catch{return d("incompatible",e.id),!1}}function z(e){if(a||e.epoch!==w||e.visit!==V||document.visibilityState==="hidden")return!1;try{return Z(e.target.render,document,location.pathname,()=>{})}catch{return!1}}async function W(e){if(f||y){d("in_progress",e.id);return}if(!n.session.peek()){d("identity_required",e.id);return}let u={command:we.parse({operation:"entry_start",entryId:e.id,funnelId:e.funnelId,versionId:e.versionId,release:n.appManifestRelease,requestId:crypto.randomUUID(),locale:document.documentElement.lang||"en"}),epoch:w,visit:V,target:e.target};f=u,await ee(u)}async function ee(e){if(e.dispatching)return;e.dispatching=!0;let u,b=!1;async function M(l){if(e.epoch!==w)return;let p=l.view;p&&["running","waiting"].includes(p.status)&&await l.submit({operation:"close",requestId:crypto.randomUUID(),nodeId:p.nodeId,visit:p.visit,revision:p.revision})}try{d("starting",e.command.entryId);let l=await L.request("funnels",e.command),p=ve.safeParse(l);if(p.success){if(p.data.scope.projectId!==m.projectId||p.data.scope.environment!==m.environment)throw new N("SCOPE_MISMATCH","Entry scope changed");e.epoch===w&&d(p.data.reason,e.command.entryId),D(e);return}let C=ge.parse(l);if(!C.runToken||C.scope.projectId!==m.projectId||C.scope.environment!==m.environment||C.run.source.type!=="funnel"||C.run.source.id!==e.command.funnelId||C.run.source.versionId!==e.command.versionId)throw new N("INVALID_RESPONSE","Invalid entry Run");if(e.epoch!==w){D(e),d("identity_changed",e.command.entryId);return}let i=X({...n,runToken:C.runToken,funnelId:e.command.funnelId});u=i,await i.get();let P=i.view;if(!P||P.id!==C.run.id||P.source.type!=="funnel"||P.source.id!==e.command.funnelId||P.source.versionId!==e.command.versionId)throw new N("INVALID_RESPONSE","Entry Run version changed");if(!z(e)){await M(i),d("left_screen",e.command.entryId),D(e);return}let H=!1,q=!1,U=await Ce(n.container,{...n.host,client:i,appManifestRelease:n.appManifestRelease,onDismiss(x){H=!0,y?.client===i&&(y=void 0,i.reset(),F(),x&&x.status!=="completed"&&d("run_ended",e.command.entryId)),j(n.host?.onDismiss,x)},onComplete(x){q=!0,y?.client===i&&g(),j(n.host?.onComplete,x)},onError(x){j(n.host?.onError,x),y?.client===i&&x instanceof N&&x.code==="FORBIDDEN"&&(g(),d("run_ended",e.command.entryId))}});if(!z(e)||H||q){U.destroy(),z(e)||await M(i),D(e);return}y={host:U,client:i},b=!0,D(e),d("started",e.command.entryId)}catch(l){!u&&l instanceof N&&l.status!==void 0&&l.status>=400&&l.status<500&&!l.retryable&&D(e),e.epoch===w&&!a&&(d("start_failed",e.command.entryId),j(n.host?.onError,l))}finally{b||u?.reset(),e.dispatching=!1}}function Ae(){if(s=!1,!(a||!c||document.visibilityState==="hidden")){if(!Y()){A=!0;return}A=!1;for(let e of h?.entries??[])if(!(e.event!=="screen_enter"||R.has(`${e.funnelId}:${e.id}`)||!Q(e))){if(!n.session.peek()){d("identity_required",e.id);continue}if(f||y){d("in_progress",e.id);return}R.add(`${e.funnelId}:${e.id}`),W(e);break}}}let F=()=>{!s&&!a&&(s=!0,queueMicrotask(Ae))};function Me(){let e=location.origin+location.pathname;e!==T&&(T=e,V++,A=!0,R.clear(),F())}function ne(e){if(!e.isTrusted||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||document.visibilityState==="hidden")return;let u=e.target;if(!(u instanceof Element)||u.closest("[data-indiana-funnel]"))return;let b=u.closest("button,a,input");if(!(!b||b.matches(":disabled,[aria-disabled='true']")||b.closest("[hidden],[inert],[aria-hidden='true']")))for(let M of h?.entries??[]){let l=M.target.button;if(!(M.event!=="button_click"||!l||!Q(M))){try{let p=be(document);if(!b.matches(l.selector)||p(l.selector)!==1)continue}catch{d("incompatible",M.id);continue}W(M);break}}}async function te(){if(a)return;if(E)return E;let e=++k,u=new AbortController;_=u;let b,M=new Promise((C,i)=>{b=()=>i(new N("TIMEOUT","Funnel entry configuration read cancelled or timed out")),u.signal.addEventListener("abort",b,{once:!0})}),l=setTimeout(()=>u.abort(),n.timeoutMs??5e3),p=(async()=>{let C=async()=>{let U=await I(`${S}/api/v1/funnel-entries/${n.environmentId}?iam=${n.appManifestRelease}`,{credentials:"omit",cache:"no-store",redirect:"error",signal:u.signal});if(!U.ok)throw new N("SERVICE_UNAVAILABLE","Funnel entries unavailable",U.status);return Ee.parse(await U.json())},i=await Promise.race([C(),M]),P=Date.parse(i.validatedAt),H=Date.parse(i.validUntil);if(i.scope.projectId!==m.projectId||i.scope.environment!==m.environment||i.scope.environmentId!==n.environmentId||i.release!==n.appManifestRelease||H<=Date.now()||P>Date.now()+5e3||H-P>6e4||H<=P)throw new N("INVALID_RESPONSE","Entry configuration scope or deadline changed");if(a||e!==k)return;let q=h===void 0;h=i,G=H,o=performance.now()+Math.min(H-Date.now(),6e4),(q||A)&&F()})();E=p;try{await p}finally{clearTimeout(l),u.signal.removeEventListener("abort",b),E===p&&(E=void 0)}}async function re(){try{await te()}catch{a||d("configuration_unavailable")}a||(t=setTimeout(()=>{re()},15e3))}let oe=()=>F();return{async start(){c||a||(c=!0,T=location.origin+location.pathname,O=_e(Me),B=n.session.subscribeIdentity(()=>{w++,A=!0,f=void 0,R.clear(),g(),F()}),v=new MutationObserver(F),v.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden","inert","aria-hidden","data-indiana-id","id","style","data-testid","data-test","data-qa"]}),document.addEventListener("click",ne,!0),document.addEventListener("visibilitychange",oe),await re())},refresh:te,async retry(){f&&!a&&f.epoch===w&&await ee(f)},destroy(){a=!0,k++,clearTimeout(t),_?.abort(),v?.disconnect(),O?.(),B?.(),document.removeEventListener("click",ne,!0),document.removeEventListener("visibilitychange",oe),g(),h=void 0}}}async function rn(...n){return(await import("./paywall-XQG2D3PA.js")).showPaywall(...n)}async function on(...n){return(await import("./funnel-runtime-host-DDBGBB5L.js")).showFunnelRun(...n)}async function an(...n){return(await import("./content-ZQNYKPZT.js")).mountContent(...n)}async function sn(...n){return(await import("./content-ZQNYKPZT.js")).prepareContent(...n)}export{N as LongplayError,r as MerchantBridgeError,xe as createBrowserFunnelCommandStorage,Fe as createConfigurationSync,De as createFeatureClient,Le as createFunnelClient,Ge as createFunnelPageExperiments,X as createFunnelRunController,Ve as createIamFunnelEntries,ke as createLocalFunnelClient,Pe as createLongplay,je as createMerchantBridge,Be as createPaywallSession,He as evaluateFunnelNode,Te as formatCouponDiscount,Ne as formatCouponMoney,Oe as formatCouponTerms,an as mountContent,sn as prepareContent,on as showFunnelRun,rn as showPaywall};