@tinkerlandai/indiana-sdk 0.6.3 → 0.7.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.
- package/CHANGELOG.md +19 -2
- package/README.md +8 -4
- package/README.zh-CN.md +7 -3
- package/THIRD_PARTY_NOTICES.md +28 -0
- package/dist/{ai-usage-B4W5m4Ie.d.ts → ai-usage-BsrSG955.d.ts} +334 -518
- package/dist/chunk-3SONNXFG.js +1 -0
- package/dist/chunk-467Z5ISI.js +11 -0
- package/dist/{chunk-QG4GM4RI.js → chunk-4AWSZWZD.js} +1 -1
- package/dist/{chunk-5TEZEOHX.js → chunk-6MO6Y24B.js} +1 -1
- package/dist/chunk-HD74AAFS.js +1 -0
- package/dist/chunk-J4RHVU3W.js +1 -0
- package/dist/chunk-KQCTDXVD.js +17 -0
- package/dist/chunk-NOFNOHUI.js +1 -0
- package/dist/chunk-QO4YQLZ4.js +1 -0
- package/dist/chunk-RRII2DMC.js +1 -0
- package/dist/chunk-WCFVNF5D.js +1 -0
- package/dist/chunk-YAFMBXIE.js +4 -0
- package/dist/{client-OYRHOMUQ.js → client-F6UPJMHR.js} +1 -1
- package/dist/{configuration-sync-C2mytNwU.d.ts → configuration-sync-Bvd956GL.d.ts} +333 -25
- package/dist/controls-XG46TKUU.js +2 -0
- package/dist/errors-DrdTlPwf.d.ts +57 -0
- package/dist/funnel-runtime-host-26QI2W3S.js +1 -0
- package/dist/{funnel-runtime-start-CVb2YonU.d.ts → funnel-runtime-start-ChVYbLzV.d.ts} +7604 -3787
- package/dist/iam.js +1 -1
- package/dist/index.d.ts +3635 -1485
- package/dist/index.js +1 -1
- package/dist/native-shell.js +1 -1
- package/dist/openrouter.d.ts +2 -3
- package/dist/openrouter.js +1 -1
- package/dist/page.d.ts +13 -13
- package/dist/page.js +1 -1
- package/dist/paywall-WKOHBYW7.js +1 -0
- package/dist/popup.d.ts +9 -16
- package/dist/popup.js +12 -12
- package/dist/react-native.d.ts +327 -0
- package/dist/react-native.js +1 -0
- package/dist/server.d.ts +6 -5
- package/dist/server.js +1 -1
- package/dist/src-UHLPVD6E.js +1 -0
- package/dist/visual.js +1 -1
- package/package.json +10 -3
- package/dist/chunk-CB63JLGT.js +0 -1
- package/dist/chunk-D7YHFS6B.js +0 -4
- package/dist/chunk-FF3LWJ26.js +0 -11
- package/dist/chunk-FVUPV6YE.js +0 -1
- package/dist/chunk-ISUXYPYL.js +0 -1
- package/dist/chunk-RMJJOSVZ.js +0 -1
- package/dist/chunk-S2MSIA57.js +0 -17
- package/dist/chunk-VVSQKVE7.js +0 -1
- package/dist/chunk-YAMBRNJ2.js +0 -1
- package/dist/funnel-runtime-host-KPYLOYYN.js +0 -1
- package/dist/paywall-5WU6PX5C.js +0 -1
- package/dist/src-U7PBAUBN.js +0 -1
- package/dist/{customer-page-B4FGCVpt.d.ts → customer-page-B4LkIr5q.d.ts} +4 -4
- package/dist/{screen-16d-xADb.d.ts → screen-iFngkxaL.d.ts} +185 -185
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as Xa,$a as Xb,$b as Dd,$c as He,$d as rh,$e as xi,$f as xj,$g as xk,$h as xl,$i as xm,$j as yn,$k as Eo,A as Q,Aa as wb,Ab as Mc,Ac as ge,Ad as of,Ae as Yh,Af as Yi,Ag as Yj,Ah as Yk,Ai as Yl,Aj as Ym,Ak as Zn,B as R,Ba as xb,Bb as Nc,Bc as he,Bd as pf,Be as Zh,Bf as Zi,Bg as Zj,Bh as Zk,Bi as Zl,Bj as Zm,Bk as _n,C as S,Ca as yb,Cb as Oc,Cc as ie,Cd as qf,Ce as _h,Cf as _i,Cg as _j,Ch as _k,Ci as _l,Cj as _m,Ck as $n,D as T,Da as zb,Db as Pc,Dc as je,Dd as rf,De as $h,Df as $i,Dg as $j,Dh as $k,Di as $l,Dj as $m,Dk as ao,E as U,Ea as Ab,Eb as Qc,Ec as ke,Ed as sf,Ee as ai,Ef as aj,Eg as ak,Eh as al,Ei as am,Ej as an,Ek as bo,F as V,Fa as Bb,Fb as Rc,Fc as le,Fd as vf,Fe as bi,Ff as bj,Fg as bk,Fh as bl,Fi as bm,Fj as bn,Fk as co,G as W,Ga as Cb,Gb as Sc,Gc as me,Gd as wf,Ge as ci,Gf as cj,Gg as ck,Gh as cl,Gi as cm,Gj as cn,Gk as eo,H as Z,Ha as Db,Hb as Tc,Hc as ne,Hd as Tg,He as di,Hf as dj,Hg as dk,Hh as dl,Hi as dm,Hj as dn,Hk as fo,I as _,Ia as Eb,Ib as Uc,Ic as oe,Id as Ug,Ie as ei,If as ej,Ig as ek,Ih as el,Ii as em,Ij as en,Ik as go,J as $,Ja as Fb,Jb as bd,Jc as pe,Jd as Vg,Je as fi,Jf as fj,Jg as fk,Jh as fl,Ji as fm,Jj as fn,Jk as ho,K as aa,Ka as Gb,Kb as cd,Kc as qe,Kd as Wg,Ke as gi,Kf as gj,Kg as gk,Kh as gl,Ki as gm,Kj as gn,Kk as io,L as ba,La as Hb,Lb as dd,Lc as re,Ld as Xg,Le as hi,Lf as hj,Lg as hk,Lh as hl,Li as hm,Lj as hn,Lk as jo,M as ca,Ma as Ib,Mb as ed,Mc as se,Md as Yg,Me as ii,Mf as ij,Mg as ik,Mh as il,Mi as im,Mj as jn,Mk as ko,N as da,Na as Jb,Nb as fd,Nc as te,Nd as Zg,Ne as ji,Nf as jj,Ng as jk,Nh as jl,Ni as jm,Nj as kn,Nk as lo,O as ea,Oa as Kb,Ob as gd,Oc as ue,Od as _g,Oe as ki,Of as kj,Og as kk,Oh as kl,Oi as km,Oj as ln,Ok as mo,P as fa,Pa as Lb,Pb as hd,Pc as ve,Pd as $g,Pe as li,Pf as lj,Pg as lk,Ph as ll,Pi as lm,Pj as mn,Pk as no,Q as ga,Qa as Mb,Qb as id,Qc as we,Qd as ah,Qe as mi,Qf as mj,Qg as mk,Qh as ml,Qi as mm,Qj as nn,Qk as oo,R as ha,Ra as Nb,Rb as jd,Rc as xe,Rd as bh,Re as ni,Rf as nj,Rg as nk,Rh as nl,Ri as nm,Rj as on,Rk as po,S as ia,Sa as Ob,Sb as kd,Sc as ye,Sd as ch,Se as oi,Sf as oj,Sg as ok,Sh as ol,Si as om,Sj as pn,Sk as qo,T as ja,Ta as Pb,Tb as ld,Tc as ze,Td as dh,Te as pi,Tf as pj,Tg as pk,Th as pl,Ti as pm,Tj as qn,Tk as ro,U as ka,Ua as Qb,Ub as md,Uc as Ae,Ud as eh,Ue as qi,Uf as qj,Ug as qk,Uh as ql,Ui as qm,Uj as rn,Uk as so,V as Ra,Va as Rb,Vb as nd,Vc as Be,Vd as fh,Ve as ri,Vf as rj,Vg as rk,Vh as rl,Vi as rm,Vj as sn,Vk as to,W as Sa,Wa as Sb,Wb as od,Wc as Ce,Wd as gh,We as si,Wf as sj,Wg as sk,Wh as sl,Wi as sm,Wj as tn,Wk as uo,X as Ta,Xa as Tb,Xb as zd,Xc as De,Xd as hh,Xe as ti,Xf as tj,Xg as tk,Xh as tl,Xi as tm,Xj as un,Xk as vo,Y as Ua,Ya as Ub,Yb as Ad,Yc as Ee,Yd as oh,Ye as ui,Yf as uj,Yg as uk,Yh as ul,Yi as um,Yj as vn,Yk as wo,Z as Va,Za as Vb,Zb as Bd,Zc as Fe,Zd as ph,Ze as vi,Zf as vj,Zg as vk,Zh as vl,Zi as vm,Zj as wn,Zk as xo,_ as Wa,_a as Wb,_b as Cd,_c as Ge,_d as qh,_e as wi,_f as wj,_g as wk,_h as wl,_i as wm,_j as xn,_k as yo,a,aa as Ya,ab as Yb,ac as Ed,ad as Ie,ae as sh,af as yi,ag as yj,ah as yk,ai as yl,aj as ym,ak as zn,al as Fo,b,ba as Za,bb as Zb,bc as Jd,bd as Je,be as th,bf as zi,bg as zj,bh as zk,bi as zl,bj as zm,bk as An,bl as Go,c,ca as _a,cb as _b,cc as Kd,cd as Ke,ce as uh,cf as Ai,cg as Aj,ch as Ak,ci as Al,cj as Am,ck as Bn,cl as Ho,d,da as $a,db as $b,dc as Ld,dd as Le,de as vh,df as Bi,dg as Bj,dh as Bk,di as Bl,dj as Bm,dk as Cn,dl as Io,e,ea as ab,eb as ac,ec as Md,ed as Me,ee as wh,ef as Ci,eg as Cj,eh as Ck,ei as Cl,ej as Cm,ek as Dn,el as Jo,f,fa as bb,fb as bc,fc as Nd,fd as Ne,fe as xh,ff as Di,fg as Dj,fh as Dk,fi as Dl,fj as Dm,fk as En,fl as Ko,g,ga as cb,gb as cc,gc as Od,gd as Oe,ge as Eh,gf as Ei,gg as Ej,gh as Ek,gi as El,gj as Em,gk as Fn,gl as Lo,h,ha as db,hb as dc,hc as Pd,hd as Pe,he as Fh,hf as Fi,hg as Fj,hh as Fk,hi as Fl,hj as Fm,hk as Gn,hl as Mo,i,ia as eb,ib as ec,ic as Qd,id as Qe,ie as Gh,if as Gi,ig as Gj,ih as Gk,ii as Gl,ij as Gm,ik as Hn,il as No,j,ja as fb,jb as fc,jc as Rd,jd as Ye,je as Hh,jf as Hi,jg as Hj,jh as Hk,ji as Hl,jj as Hm,jk as In,jl as Oo,k,ka as gb,kb as wc,kc as Sd,kd as Ze,ke as Ih,kf as Ii,kg as Ij,kh as Ik,ki as Il,kj as Im,kk as Jn,kl as Po,l,la as hb,lb as xc,lc as Td,ld as _e,le as Jh,lf as Ji,lg as Jj,lh as Jk,li as Jl,lj as Jm,lk as Kn,ll as Qo,m,ma as ib,mb as yc,mc as Ud,md as $e,me as Kh,mf as Ki,mg as Kj,mh as Kk,mi as Kl,mj as Km,mk as Ln,ml as Ro,n,na as jb,nb as zc,nc as Vd,nd as af,ne as Lh,nf as Li,ng as Lj,nh as Lk,ni as Ll,nj as Lm,nk as Mn,nl as So,o,oa as kb,ob as Ac,oc as Wd,od as bf,oe as Mh,of as Mi,og as Mj,oh as Mk,oi as Ml,oj as Mm,ok as Nn,ol as To,p,pa as lb,pb as Bc,pc as Xd,pd as cf,pe as Nh,pf as Ni,pg as Nj,ph as Nk,pi as Nl,pj as Nm,pk as On,pl as Uo,q,qa as mb,qb as Cc,qc as Yd,qd as df,qe as Oh,qf as Oi,qg as Oj,qh as Ok,qi as Ol,qj as Om,qk as Pn,ql as Vo,r,ra as nb,rb as Dc,rc as Zd,rd as ef,re as Ph,rf as Pi,rg as Pj,rh as Pk,ri as Pl,rj as Pm,rk as Qn,rl as Wo,s,sa as ob,sb as Ec,sc as _d,sd as ff,se as Qh,sf as Qi,sg as Qj,sh as Qk,si as Ql,sj as Qm,sk as Rn,t as z,ta as pb,tb as Fc,tc as $d,td as gf,te as Rh,tf as Ri,tg as Rj,th as Rk,ti as Rl,tj as Rm,tk as Sn,u as A,ua as qb,ub as Gc,uc as ae,ud as hf,ue as Sh,uf as Si,ug as Sj,uh as Sk,ui as Sl,uj as Sm,uk as Tn,v as B,va as rb,vb as Hc,vc as be,vd as jf,ve as Th,vf as Ti,vg as Tj,vh as Tk,vi as Tl,vj as Tm,vk as Un,w as C,wa as sb,wb as Ic,wc as ce,wd as kf,we as Uh,wf as Ui,wg as Uj,wh as Uk,wi as Ul,wj as Um,wk as Vn,x as D,xa as tb,xb as Jc,xc as de,xd as lf,xe as Vh,xf as Vi,xg as Vj,xh as Vk,xi as Vl,xj as Vm,xk as Wn,y as E,ya as ub,yb as Kc,yc as ee,yd as mf,ye as Wh,yf as Wi,yg as Wj,yh as Wk,yi as Wl,yj as Wm,yk as Xn,z as P,za as vb,zb as Lc,zc as fe,zd as nf,ze as Xh,zf as Xi,zg as Xj,zh as Xk,zi as Xl,zj as Xm,zk as Yn}from"./chunk-467Z5ISI.js";import{a as X,b as Y,c as ih,d as jh,e as kh,f as lh,g as mh,h as nh,j as zo,k as Ao,l as Bo,m as Co,n as Do}from"./chunk-3SONNXFG.js";import"./chunk-U6S6AZM6.js";import"./chunk-4K25DELJ.js";import{$ as xd,$a as ig,A as lc,Aa as Jf,Ab as Jg,B as mc,Ba as Kf,Bb as Kg,C as nc,Ca as Lf,Cb as Lg,D as oc,Da as Mf,Db as Mg,E as pc,Ea as Nf,Eb as Ng,F as qc,Fa as Of,Fb as Og,G as rc,Ga as Pf,Gb as Pg,H as sc,Ha as Qf,Hb as Qg,I as tc,Ia as Rf,Ib as Rg,J as uc,Ja as Sf,Jb as Sg,K as vc,Ka as Tf,Kb as yh,L as Vc,La as Uf,Lb as zh,M as Wc,Ma as Vf,Mb as Ah,N as Xc,Na as Wf,Nb as Bh,O as Yc,Oa as Xf,Ob as Ch,P as Zc,Pa as Yf,Pb as Dh,Q as _c,Qa as Zf,R as $c,Ra as _f,S as ad,Sa as $f,T as pd,Ta as ag,U as qd,Ua as bg,V as rd,Va as cg,W as sd,Wa as dg,X as td,Xa as eg,Y as ud,Ya as fg,Z as vd,Za as gg,_ as wd,_a as hg,a as t,aa as yd,ab as jg,b as u,ba as Fd,bb as kg,c as v,ca as Gd,cb as lg,d as w,da as Hd,db as mg,e as x,ea as Id,eb as ng,f as y,fa as Re,fb as og,g as F,ga as Se,gb as pg,h as G,ha as Te,hb as qg,i as H,ia as Ue,ib as rg,j as I,ja as Ve,jb as sg,k as J,ka as We,kb as tg,l as K,la as Xe,lb as ug,m as L,ma as tf,mb as vg,n as M,na as uf,nb as wg,o as N,oa as xf,ob as xg,p as O,pa as yf,pb as yg,q as Ma,qa as zf,qb as zg,r as Na,ra as Af,rb as Ag,s as Oa,sa as Bf,sb as Bg,t as Pa,ta as Cf,tb as Cg,u as Qa,ua as Df,ub as Dg,v as gc,va as Ef,vb as Eg,w as hc,wa as Ff,wb as Fg,x as ic,xa as Gf,xb as Gg,y as jc,ya as Hf,yb as Hg,z as kc,za as If,zb as Ig}from"./chunk-HD74AAFS.js";import{a as ta,b as ua,c as va,d as wa,e as xa,f as ya,g as za,h as Aa,i as Ba,j as Ca,k as Da,l as Ea,m as Fa,n as Ga,o as Ha,p as Ia,q as Ja,r as Ka,s as La}from"./chunk-RRII2DMC.js";import{c as la,d as ma,e as na,h as oa,i as pa,j as qa,k as ra,l as sa}from"./chunk-KQCTDXVD.js";export{$k as CODE_REFERENCE_LIMITS,Pa as COMMON_LOCALES,Tj as CONFIGURATION_POLICY,Ra as COUPON_TERM_LOCALES,If as CUSTOMER_DATA_SOURCES,Ud as CreateInvoiceParamsSchema,Td as CreateInvoicePreviewSchema,rn as DEFAULT_AUDIENCE_GROUP,fi as DEFAULT_FUNNEL_EXECUTION_POLICY,Ui as FUNNEL_API_CAPABILITIES,fj as FUNNEL_EXECUTION_LIMITS,ni as FUNNEL_LIMITS,Mm as FUNNEL_PREVIEW_LIMITS,Vo as FUNNEL_READ_ONLY_OPERATIONS,gj as FUNNEL_RECORDING_LIMITS,Go as FUNNEL_SEGMENT_BYTES,Fo as FUNNEL_SEGMENT_LIMIT,zm as FUNNEL_SERVER_KEY_HEADER,jm as FunnelCalculationError,Po as FunnelLocalCalculationError,Rd as InvoiceModeParamsSchema,Sd as InvoiceTemplateSchema,_e as OFFERING_MAX_DEPTH,af as OFFERING_MAX_ITEMS,$e as OFFERING_MAX_PRODUCTS,Cg as POPUP_WIDTHS,Kj as PUBLIC_PAYWALL_UNSUPPORTED_NODES,Qd as ReissueInvoiceParamsSchema,Tf as SCREEN_LIMITS,Sf as SCREEN_SCHEMA_VERSION,wc as SDK_PROTOCOL_HEADER,yc as SDK_SUPPORT_HEADER,zc as SDK_SUPPORT_POLICY,xc as SDK_VERSION_HEADER,Ag as SURFACE_PATHS,Af as SURFACE_VARIABLES,Fc as SdkProtocolError,oi as UNBOUND_PRODUCT_VERSION_ID,Dc as addSupportMonths,j as aiCreditSystemConfigSchema,ok as aiMarkupSchema,nk as aiModelIdSchema,pk as aiModelRatesSchema,qk as aiPricingConfigurationSchema,mk as aiTokenPools,w as amountToMinor,fh as analyticsConfigSchema,hh as analyticsEventEnabled,lc as apiErrorCatalog,mc as apiErrorCodeForStatus,gc as apiErrorCodeSchema,Jl as apiOperations,Cl as apiPermissionSchema,Jn as appResultsSchema,In as appRevenueSchema,Sn as appendScreenTemplate,po as applyGrowthReleasePlan,im as archiveSurfaceTemplateSchema,un as audienceCustomerSchema,Bn as audienceFunnelUsageSchema,Cn as audienceFunnelUsagesSchema,vn as audienceMembersSchema,Ic as audienceSchema,tn as audienceWriteSchema,mn as auditFieldSchema,pn as auditHistoryCursorSchema,qn as auditHistorySchema,ln as auditResourceSchema,qb as autoTopupPurchaseLimitSchema,Cb as autoTopupStateSchema,wo as autumnAmountToMinor,an as autumnCustomerAutoTopupSchema,fn as autumnCustomerControlsSchema,hn as autumnCustomerMetadataSchema,en as autumnCustomerOverageAllowedSchema,kn as autumnCustomerProductSummarySchema,jn as autumnCustomerProfileRecordSchema,bn as autumnCustomerSpendLimitSchema,dn as autumnCustomerUsageAlertSchema,cn as autumnCustomerUsageLimitSchema,gn as autumnEntityControlsSchema,xo as autumnMinorToAmount,yo as autumnUsageUnitAmountDecimal,hk as balanceAdjustmentCommandSchema,ik as balanceAdjustmentStateSchema,Zc as balanceAllocationSchema,Wc as balanceCommandSchema,cd as balanceGrantCommandSchema,bd as balanceGrantCreateSchema,fd as balanceGrantPageSchema,ed as balanceGrantReadSchema,dd as balanceGrantSchema,ad as balanceOperationSchema,Xc as balancePricingSegmentSchema,$c as balanceQuoteSchema,Yc as balanceReceiptUnitsSchema,_c as balanceRejectionReasonSchema,Yn as balanceSourceReasonSchema,jk as balanceSourceStateSchema,Zn as balanceSourceStatusSchema,$n as balanceSourcesPageSchema,_n as balanceSourcesQuerySchema,jb as billingAccruedMinorSchema,ib as billingAmountMinorSchema,tb as billingAuthorizationSchema,sb as billingAuthorizationTermsSchema,kb as billingBudgetMinorSchema,Db as billingControlInputSchema,Eb as billingControlsSchema,Mb as billingCouponsSchema,z as billingCurrencies,Fb as billingInvoiceLineSchema,Gb as billingInvoiceSchema,Jb as billingInvoicesSchema,xb as billingLimitSchema,dm as billingPortalInputSchema,em as billingPortalSchema,D as billingSettingsMutationSchema,B as billingSettingsSchema,C as billingSettingsScopeSchema,Bb as billingUsageWindowSchema,fg as borderSchema,lg as buttonNodeSchema,km as calculateFunnelNode,So as calculateLocalFunnelEvaluation,To as calculateLocalFunnelSegment,Lc as campaignInputSchema,Jc as campaignOfferSchema,Mc as campaignSchema,Na as canonicalLocale,Bf as capabilityBindingSchema,ob as cashPriceSchema,mb as cashPricingSchema,lb as cashPricingTiersSchema,hb as cashUnitAmountMinorSchema,Rk as claimRewardProductRequestSchema,cl as codeReferenceBranchSchema,il as codeReferenceConfigRequestSchema,hl as codeReferenceConfigureSchema,ol as codeReferenceFeatureSummarySchema,al as codeReferenceKeySchema,dl as codeReferencePathSchema,ll as codeReferenceReceiptSchema,bl as codeReferenceRepoSchema,kl as codeReferenceReportSchema,fl as codeReferenceRepositoryInputSchema,gl as codeReferenceRepositorySchema,jl as codeReferenceScanConfigSchema,ml as codeReferenceScanSchema,nl as codeReferenceSettingsSchema,pl as codeReferenceSummarySchema,Hd as commerceAccessSchema,Re as commerceContextSchema,Ee as commerceCursorSchema,Fe as commerceListQuerySchema,Id as commerceMoneySchema,Un as commerceProductKind,Gd as commerceProductKindSchema,Fd as commerceProviderSchema,Ea as compileGrowthFeatures,Wj as configurationArtifactSchema,ak as configurationDependencies,Vj as configurationDependenciesSchema,_j as configurationDigest,Xj as configurationFunnelSchema,$j as configurationGeneration,Zj as configurationJson,Sj as configurationPaywallSchema,Uj as configurationScopeSchema,Hb as confirmBillingAdjustmentInputSchema,vb as confirmBillingAuthorizationInputSchema,ic as consoleErrorCodeSchema,uc as consoleErrorResponseSchema,to as consoleHasPermission,oe as consoleRefundRequestSchema,ro as consoleResources,so as consoleRolePermissions,qo as consoleRoleSchema,sg as countdownNodeSchema,Ya as couponAppliesToSchema,bb as couponChangeErrors,rg as couponCodeNodeSchema,dh as couponContentDigestSchema,Wa as couponDiscountSchema,Ij as couponDisplaySchema,Nl as couponDistributionBatchSchema,Pl as couponDistributionDetailSchema,Ml as couponDistributionPreviewSchema,Ol as couponDistributionRecipientSchema,Ql as couponDistributionWriteSchema,Xa as couponDurationSchema,Za as couponEligibilitySchema,_a as couponInputSchema,ql as couponRedemptionCommandSchema,rl as couponRedemptionReceiptSchema,Va as couponStatusSchema,$m as couponTemplateExample,Zm as couponTemplateKey,eb as couponWindow,xn as createAccountOverviewPage,wn as createCreditCenterPage,zn as createCustomerPageTemplates,Fl as createCustomerRequestSchema,Gl as createCustomerResponseSchema,yn as createMembershipPage,Tk as createReferralCodeRequestSchema,F as creditAmountSchema,tk as creditAnalyticsFilterSchema,vk as creditAnalyticsPageSchema,uk as creditAnalyticsQuerySchema,rk as creditAnalyticsRangeSchema,sk as creditAnalyticsTimezoneSchema,L as creditDimensionSchema,M as creditMultiplierSchema,H as creditPriceAdjustmentSchema,N as creditPricingSchema,J as creditPropertiesSchema,G as creditQuantitySchema,O as creditRateSchema,Ob as creditResetCountSchema,Nb as creditResetSchema,I as creditResourceKeySchema,Pb as creditRolloverSchema,c as creditSchemaItemSchema,jd as creditStatementInputSchema,kd as creditStatementSchema,i as creditSystemConfigSchema,K as creditTiersSchema,t as currencies,A as currencyAmountOptionsSchema,v as currencyDecimals,u as currencySchema,Kl as currentApiOperations,ld as currentNotificationEventTypeSchema,pg as customHtmlNodeSchema,ka as customerActivitySchema,qi as customerAttributesSchema,sn as customerAudienceSchema,Kf as customerDataConfigSchema,Nf as customerDataIntentSchema,ng as customerDataNodeSchema,wi as customerDataReferenceMessage,vi as customerDataReferenced,ui as customerDataSchema,Jf as customerDataSourceSchema,Il as customerEntitlementsSchema,Di as customerFiltersSchema,ri as customerFingerprintSchema,Kn as customerFunnelDecisionsSchema,Bi as customerGetSchema,td as customerHoldingsSchema,si as customerInputSchema,xd as customerLedgerEntrySchema,yd as customerLedgerPageSchema,wd as customerLedgerQuerySchema,zi as customerLookupSchema,yi as customerMutationSchema,Mf as customerPageDataSchema,Lf as customerPageNodeStateSchema,Ei as customerPageSchema,Ai as customerPatchSchema,ec as customerPlanCreateSchema,fc as customerPlanCreatedSchema,ja as customerPlanSchema,xi as customerProfileSchema,ti as customerReferenceSchema,cm as customerScheduledChangeCancelSchema,am as customerScheduledChangeSchema,bm as customerScheduledChangesSchema,Nc as customerSchema,pi as customerTagsSchema,Ci as customerUpdateRequestSchema,el as defaultCodeReferenceMethods,ym as deliveredFunnelResponse,fk as deliveredPaywall,wh as deliveredScreenDocument,cb as describeCoupon,_b as diffProductVariant,mg as dividerNodeSchema,Of as emptyCustomerPageNode,Te as entitlementCheckInputSchema,Ue as entitlementCheckReasonSchema,We as entitlementCheckResultSchema,Se as entitlementRequirementSchema,ga as entitlementSnapshotSchema,Hl as entitlementStatusSchema,X as environmentSchema,Dd as environmentSettingsSchema,pc as errorCodeMatchesStatus,vc as errorMetadata,rc as errorMetadataSchema,oc as errorPolicy,kc as errorReasonSchema,jc as errorRecoverySchema,sc as errorResponseSchema,Qf as escapeHtmlText,pa as evalCondition,sa as evalFeature,qh as evaluateFeaturesRequestSchema,sh as evaluateFeaturesResultSchema,Ro as evaluateLocalFunnelNode,um as executionSourceSchema,Oo as expandFunnelSegment,Da as experimentConfigurationSchema,Ca as experimentPhaseSchema,Ha as experimentSnapshotSchema,n as featureCollectionSchema,g as featureConfigOverrideSchema,k as featureDefinitionSchema,oh as featureDeliveryPayloadSchema,a as featureIdSchema,$ as featureInputSchema,f as featureMarkupsOverrideSchema,o as featureOptionsSchema,nh as featurePayloadSchema,m as featureRecordSchema,aa as featureSchema,uo as featureTypes,vo as featureUpdateBlockers,l as featureUpdateRulesSchema,pd as featureUsageReadSchema,qd as featureUsageSetSchema,rd as featureUsageStateSchema,b as featureUsageTypeSchema,p as featureWriteSchema,Ig as fieldValue,dg as fillSchema,sd as financialAmountSchema,vd as financialCursorSchema,ud as financialEntryTypeSchema,Qg as findDocumentNode,Pg as findNode,Ym as formatCouponConditions,Ta as formatCouponDiscount,Sa as formatCouponMoney,Ua as formatCouponTerms,y as formatCurrencyMinor,Xn as formatProductBillingPeriod,db as formatUsd,Vi as funnelApiBindingSchema,Si as funnelApiProjectionSchema,Li as funnelBundleDefinitionSchema,Pi as funnelBundleLiterals,Oi as funnelBundleResultSchema,Mi as funnelBundleSelectionSchema,Dm as funnelCampaignCommandSchema,Fm as funnelCampaignStartDeliverySchema,Em as funnelCampaignStartResponseSchema,Wi as funnelCapabilitySchema,pm as funnelCollectionSchema,Gj as funnelCommandSchema,Hm as funnelConfigurationSchema,oj as funnelConsumedVariables,No as funnelContextDelta,Am as funnelCredentialCommandSchema,Cm as funnelCredentialDeliverySchema,Bm as funnelCredentialResponseSchema,Fj as funnelDataQueriesSchema,Hi as funnelDecideShape,Ii as funnelDecisionCommandSchema,Hh as funnelDecisionEvaluationSchema,Fi as funnelDecisionOutputSchema,Ji as funnelDecisionResponseSchema,Gi as funnelDecisionSchema,Kh as funnelDecisionSegmentEvaluationSchema,Ki as funnelDecisionUsedResponseSchema,xj as funnelDocumentDraftSchema,Bj as funnelDocumentSchema,Uh as funnelEvaluationAttributes,Gh as funnelEvaluationInstructionSchema,Eh as funnelEvaluationModeSchema,Fh as funnelEvaluationResultSchema,ei as funnelExecutionPolicySchema,uj as funnelExecutionStateSchema,Yi as funnelExternalPageUrlSchema,di as funnelExternalTaskSchema,$i as funnelGraphDraftSchema,_i as funnelGraphNodeSchema,aj as funnelGraphSchema,bj as funnelGraphTargets,An as funnelGroupReferenceSchema,tm as funnelInstructionSchema,lm as funnelInvocationId,Im as funnelLocalConfigurationSchema,mm as funnelLocalScreenCommandSchema,nm as funnelLocalScreenResponseSchema,Jh as funnelLocalSegmentStepSchema,Wo as funnelNodeAcceptsEffect,sj as funnelNodeInputSchema,qj as funnelNodeKindSchema,Rh as funnelNodeProjections,tj as funnelNodeResultSchema,Oh as funnelNodeWritesSchema,Zi as funnelOpenInSchema,ji as funnelOrchestrationCommandSchema,Bh as funnelParametersFromUrl,Ej as funnelPresentationSubmissionSchema,Nm as funnelPreviewCommandSchema,Qm as funnelPreviewDependencySchema,Rm as funnelPreviewJournalSchema,Om as funnelPreviewOutcomeSchema,Tm as funnelPreviewRequestSchema,Um as funnelPreviewResponseSchema,Pm as funnelPreviewScenarioSchema,Wm as funnelPreviewShareWriteSchema,Vm as funnelPreviewSnapshotSchema,Sm as funnelPreviewSourceSchema,Qi as funnelProjectionFilterValueSchema,Ri as funnelProjectionWhereSchema,Dj as funnelPublicationDraftSchema,zj as funnelPublicationRules,Cj as funnelPublicationSchema,Aj as funnelPublishableDraftSchema,Ho as funnelPureNode,om as funnelRecordSchema,rj as funnelResourceReferenceSchema,Dn as funnelResultsCursorSchema,En as funnelResultsQuerySchema,mi as funnelResultsResponseSchema,Fn as funnelResultsSchema,vm as funnelRunViewSchema,xm as funnelRuntimeDeliverySchema,wm as funnelRuntimeResponseSchema,sm as funnelRuntimeStatusSchema,lj as funnelScreenReads,kj as funnelScreenTokens,mj as funnelScreenValues,Uo as funnelSegmentConfigurationSchema,Ih as funnelSegmentEvaluationInstructionSchema,Mo as funnelSegmentHasDynamicHash,Io as funnelSegmentPositionSchema,Ko as funnelSegmentSchema,Jo as funnelSegmentStepSchema,ki as funnelSignalResponseSchema,Xm as funnelStatisticsSchema,Lo as funnelStepId,ci as funnelTaskBindingSchema,ai as funnelTaskDataSchema,bi as funnelTaskOutputsSchema,gi as funnelTaskResponseSchema,li as funnelTaskResultsSchema,Rn as funnelTemplateDraft,Pn as funnelTemplateSchema,Jm as funnelTopology,Gm as funnelTopologySchema,vj as funnelTraceEventSchema,Yh as funnelValueBindingSchema,Lh as funnelValueDeclarationSchema,Ph as funnelValueMatches,Xh as funnelValuePathSchema,Th as funnelValueSchema,Mh as funnelVariableDeclarationSchema,Nh as funnelVariableDeclarationsSchema,jj as funnelVariableRead,Qh as funnelVariableValues,hj as funnelVisitAllowed,pj as funnelWaitKindSchema,qm as funnelWriteSchema,jh as gbRuntimeExperimentResultSchema,ih as gbRuntimeExperimentSchema,kh as gbRuntimeFeatureRuleSchema,lh as gbRuntimeFeatureSchema,mh as gbRuntimeSavedGroupsSchema,la as getQueryStringOverride,oo as getRecommendedRolloutData,qa as getStickyBucketAttributes,go as growthAttributeSchema,ua as growthAttributesSchema,io as growthCatalogSchema,xa as growthConditionGroupIds,Wh as growthConditionPaths,va as growthConditionSchema,ko as growthDryRunSchema,lo as growthExperimentInspectionSchema,Fa as growthExperimentStop,Ga as growthFeatureExpiry,za as growthFeatureRuleSchema,Aa as growthFeatureSchema,Ba as growthFeaturesSchema,mo as growthGroupReferenceCursorSchema,no as growthGroupReferencesSchema,wa as growthGroupSchema,ho as growthNamespaceSchema,jo as growthResourceWriteSchema,Ka as growthRuleContextSchema,ya as growthSavedGroupsSchema,Ia as growthSnapshotSchema,La as growthSplitResultSchema,Pf as htmlVariableErrors,gk as hydratePaywall,Vf as identifierSchema,kg as imageNodeSchema,cg as imagePositionSchema,ag as insetsSchema,wl as invoiceCommandSchema,gd as invoiceDetailInputSchema,id as invoiceDetailSchema,zl as invoiceOperationSchema,hd as invoiceProductItemSchema,ne as invoiceRefundsSchema,vl as invoiceTemplateCommandSchema,ul as invoiceTemplatePageSchema,sl as invoiceTemplateValuesSchema,pb as isInvoiceCreditPrice,xf as isProductGroup,Tn as isRecurringMembership,Rg as isRtlLocale,Cc as isStableSdkProtocol,na as isURLTargeted,nb as itemBillingCycleSchema,ij as jsonStorageBytes,ta as jsonValueSchema,E as licenseOfferSchema,Ib as listBillingInvoicesInputSchema,nc as localErrorRecovery,Qa as localeLabel,Ma as localeSchema,Jg as localeStatuses,Og as localizeScreen,zb as manageBillingLimitsInputSchema,yb as manageOveragePolicyInputSchema,yl as managedInvoiceDetailSchema,Al as managedInvoicePageSchema,xl as managedInvoiceSchema,tl as managedInvoiceTemplateSchema,hc as managementErrorCodeSchema,tc as managementErrorResponseSchema,bg as marginSchema,Oa as matchLocale,Vh as matchesGrowthCondition,T as membershipActionSchema,Vn as membershipBillingCount,U as membershipChangeSchema,V as membershipHoldingSchema,R as membershipRulesSchema,W as membershipStateSchema,S as membershipTimingSchema,nn as mergeAuditSchema,_ as metadataSchema,h as meteredConfigSchema,x as minorToAmount,e as modelMarkupsSchema,Mn as nativeCompletionSchema,Jd as nativeCouponStoreOfferLinkWriteSchema,Kd as nativeCouponStoreOfferLinksSchema,Sc as nativeProductBindingSchema,Uc as nativeProductBindingWriteSchema,Tc as nativeProductBindingsPageSchema,Ln as nativeProofSchema,Pd as nativePurchaseInstructionSchema,Nn as nativeReceiptCommandSchema,On as nativeReceiptResponseSchema,Pe as nativeRestoreCommandSchema,Qe as nativeRestoreResultSchema,Nd as nativeStoreOfferForProduct,Ld as nativeStoreOfferSelectionSchema,Md as nativeStoreOfferSelectionsSchema,Od as nativeStoreSelectionMatches,fe as nativeSubscriptionUpdatePreviewSchema,ge as nativeSubscriptionUpdateResultSchema,Ll as newBlankSurface,ab as newCouponInput,gh as newEnvironmentAnalyticsConfig,rm as newFunnelDocument,Uf as nodeIdSchema,on as objectAuditSchema,yj as offerCopyUnscoped,Gn as offerFlowInputSchema,Hn as offerFlowResultSchema,fb as offerSchema,gb as offerUnavailableReasonSchema,gf as offeringAuthorSchema,lf as offeringCollectionSchema,ff as offeringDocumentSchema,bf as offeringItemSchema,cf as offeringItemsSchema,Ze as offeringMetadataSchema,hf as offeringProductEvidenceSchema,Ye as offeringProductIdSchema,df as offeringProductIds,pf as offeringProductOptionSchema,ef as offeringProductPaths,rf as offeringPublicationIssues,jf as offeringRecordSchema,of as offeringSelectorSchema,sf as offeringValueSchema,kf as offeringVersionSchema,qf as offeringWorkspaceSchema,nf as offeringWriteResultSchema,mf as offeringWriteSchema,Vc as overageBehaviorSchema,Ab as overagePolicySchema,wj as ownedFunnelScreenSchema,co as pageExperimentEventSchema,eo as pageExperimentEventsRequestSchema,fo as pageExperimentEventsResponseSchema,bo as pageExperimentPayloadSchema,ao as pageExperimentSchema,_f as paintColorSchema,bk as parsePublicFunnel,qc as parseRetryAfter,ye as paymentSetupCommandSchema,ze as paymentSetupReadSchema,Be as paymentSetupSchema,Ve as paywallCandidateSchema,Vg as paywallClientActionSchema,$g as paywallCollectionSchema,ek as paywallDeliverySchema,Wg as paywallDocumentDraftSchema,Xg as paywallDocumentSchema,Zg as paywallFlowIssues,ch as paywallLibrarySchema,Yg as paywallProductIssues,vf as paywallProductsSchema,_g as paywallRecordSchema,Xe as paywallRequestSchema,dk as paywallResolutionSchema,ck as paywallResolveInputSchema,ah as paywallSummarySchema,bh as paywallWriteSchema,da as planConfigSchema,ea as planInputSchema,ca as planItemSchema,tg as planPickerNodeSchema,fa as planSchema,ha as planVersionSchema,Kc as popupSchema,dc as prepaidAllowanceAmount,r as prepaidPriceAmount,s as prepaidQuantityAmount,Oc as prepaidQuantitySchema,q as prepaidTierPricingSchema,rb as prepareBillingAuthorizationInputSchema,_m as prepareCouponTemplate,Qo as prepareLocalFunnelNodes,oa as prepareSavedGroups,ub as preparedBillingAuthorizationSchema,Bg as presentationSchema,qg as priceNodeSchema,ba as priceSchema,Sb as productAllowanceSchema,Pc as productBindingSchema,Rc as productBindingWriteSchema,Qc as productBindingsPageSchema,bc as productCollectionSchema,Vb as productConfigurationSchema,Yb as productDefinitionSchema,cc as productEditorOptionsSchema,uf as productGroupingMatches,tf as productGroupingSchema,Ub as productLicenseSchema,Rl as productMigrationBlockReasonSchema,Yl as productMigrationDetailSchema,Sl as productMigrationErrorCodeSchema,Xl as productMigrationItemSchema,Vl as productMigrationItemStatusSchema,Zl as productMigrationListSchema,Tl as productMigrationPreviewSchema,$l as productMigrationQuerySchema,Ul as productMigrationRunStatusSchema,Wl as productMigrationSchema,_l as productMigrationWriteSchema,$b as productOptionsSchema,Rb as productPrepaidPriceSchema,Qb as productPricesSchema,ac as productRecordSchema,Tg as productSelectionSchema,Tb as productTrialSchema,Wb as productVariantOverridesSchema,Xb as productVariantSchema,Ti as projectFunnelApiOutputs,Km as projectFunnelConfiguration,Lm as projectFunnelLocalConfiguration,Cd as projectSettingsSchema,$a as promotionCodeInputSchema,Bc as protocolForSdkVersion,d as providerMarkupsSchema,eh as publicCouponScreenDataSchema,ph as publicFeatureConfigurationSchema,Eo as publicFunnelDocument,Mj as publicPaywallBenefitSchema,Qj as publicPaywallButtonSchema,Nj as publicPaywallChannelsSchema,Pj as publicPaywallCouponSchema,Lj as publicPaywallPriceSchema,Oj as publicPaywallProductSchema,Rj as publicPaywallSchema,xh as publicScreenDocument,vh as publicScreenIssues,Kg as publishChecks,He as purchaseListItemSchema,Ne as purchaseListPageSchema,Xf as radiusSchema,Zh as readFunnelValuePath,Qk as redeemRewardRequestSchema,Uk as referralCodeSchema,Wk as referralProgramCollectionSchema,Jk as referralProgramInputSchema,Lk as referralProgramRecordSchema,Ok as referralProgramWriteSchema,rh as remoteFeatureResultSchema,nj as renameFunnelScreenVariable,Eg as replaceFirstPageRoot,Jj as resolveCouponDisplay,Ni as resolveFunnelBundle,Xi as resolveFunnelCapabilityInputs,ii as resolveFunnelTaskInputs,_h as resolveFunnelValueBinding,$h as resolveFunnelValueBindings,Zb as resolveProductVariant,Ng as resolveScreenLocale,Gc as resolveSdkProtocol,El as responseMetaSchema,wb as revokeBillingAuthorizationInputSchema,Yk as rewardActivityRedemptionSchema,Zk as rewardActivitySchema,Ik as rewardCodeInputSchema,Xk as rewardCodeSchema,_k as rewardCodeWriteSchema,Vk as rewardCollectionSchema,Fk as rewardConfigurationSchema,Dk as rewardGrantExpirySchema,Ek as rewardGrantSchema,Hk as rewardInputSchema,Gk as rewardKeySchema,Mk as rewardOptionSchema,Sk as rewardProductCheckoutSchema,Kk as rewardRecordSchema,Pk as rewardRedemptionSchema,Ck as rewardStatusSchema,Bk as rewardTypeSchema,Nk as rewardWriteSchema,ra as runExperiment,Wn as sameMembershipBillingCycle,hm as saveSurfaceTemplateSchema,Y as scopeSchema,xg as screenActionSchema,zh as screenAnswersSchema,yh as screenDataCursorSchema,Fg as screenDocumentSchema,Yf as screenImageSourceSchema,Ch as screenInputBindingsSchema,wg as screenNodeSchema,Ah as screenParametersSchema,Ug as screenPresentationSchema,yf as screenProductScopes,zf as screenProductSelections,Dh as screenRendererInputSchema,Sg as screenSelections,yg as screenStringsSchema,Yj as sdkConfigurationManifestSchema,Ac as sdkProtocolRegistry,Hc as sdkProtocolResponseHeaders,Ad as seatCommandSchema,zd as seatReadSchema,Bd as seatsStateSchema,dj as selectFunnelCondition,wf as selectedPaywallProduct,Hf as selectedSurfaceValue,Mg as servableLocales,Lb as setBillingCouponsInputSchema,gg as shadowSchema,eg as shapeSchema,$f as sizeSchema,Wf as spaceSchema,og as spacerNodeSchema,Z as stableKeySchema,ug as stackInteractionSchema,vg as stackNodeSchema,Ja as stickyAssignmentDocumentSchema,Yd as stripeAppendContextSchema,Xd as stripeCouponTermsSchema,Zd as stripePurchaseExecutionSchema,ke as stripeRefundExecutionSchema,Ae as stripeSetupExecutionSchema,ce as stripeSubscriptionUpdateExecutionSchema,de as stripeSubscriptionUpdatePreviewSchema,ee as stripeSubscriptionUpdateResultSchema,ve as stripeTrialExecutionSchema,ig as styleSchema,Vd as subscriptionAttachCommandSchema,_d as subscriptionAttachQuoteSchema,pe as subscriptionBatchCommandSchema,re as subscriptionBatchGroupSchema,qe as subscriptionBatchReadSchema,se as subscriptionBatchSchema,ae as subscriptionCarryOptionsSchema,Oe as subscriptionConflictPageSchema,Je as subscriptionConflictQuerySchema,Le as subscriptionConflictRetryResultSchema,Ke as subscriptionConflictRetrySchema,Ie as subscriptionConflictSchema,Kb as subscriptionCouponExecutionSchema,Bl as subscriptionInvoiceModeSchema,Ge as subscriptionListItemSchema,Me as subscriptionListPageSchema,Wd as subscriptionOperationInputSchema,$d as subscriptionOperationSchema,je as subscriptionRefundCommandSchema,le as subscriptionRefundPreviewSchema,me as subscriptionRefundResultSchema,te as subscriptionTrialCommandSchema,xe as subscriptionTrialPolicySchema,ue as subscriptionTrialReadSchema,we as subscriptionTrialResultSchema,be as subscriptionUpdateCommandSchema,he as subscriptionUpdatePreviewSchema,ie as subscriptionUpdateResultSchema,Ce as subscriptionVerificationInputSchema,De as subscriptionVerificationSchema,Rf as substituteHtmlVariables,Gf as substituteSurfaceVariables,Df as surfaceDataSchema,zg as surfaceSchema,gm as surfaceTemplateSchema,Cf as surfaceValueSchema,Ef as surfaceVariableNames,Lg as templateChecks,fm as templateCoverImageSchema,Qn as templateScreen,jg as textNodeSchema,hg as textStyleSchema,Zf as themeSchema,ma as toAttributeString,th as trackEventsRequestSchema,uh as trackEventsResultSchema,ej as transitionFunnelGraph,Hg as translatableFields,P as trialPolicySchema,Q as trialRecordSchema,Ff as unknownSurfaceVariables,nd as usageAlertNotificationDataSchema,od as usageAllowanceNotificationDataSchema,xk as usageAnalyticsPageSchema,wk as usageAnalyticsQuerySchema,Ak as usageBatchPageSchema,zk as usageBatchReadSchema,yk as usageBatchSubmitSchema,kk as usageEntityCommandSchema,lk as usageEntitySchema,md as usageLimitNotificationDataSchema,cj as validateFunnelGraph,Sh as validateFunnelProjections,hi as validateFunnelTaskData,Hj as validateScreenAnswers,Ec as validateSdkProtocolRegistry,ia as validitySchema,Dl as verifiedPrincipalSchema,Ao as visualChangeSchema,Do as visualExperimentPayloadSchema,Co as visualExperimentSchema,zo as visualMutationSchema,Bo as visualVariationSchema,Dg as walkDocument,Gg as walkScreen,Ed as workspaceSettingsSchema};
|
package/dist/visual.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as ce}from"./chunk-CB63JLGT.js";import{c as de}from"./chunk-VVSQKVE7.js";import{a as me,b as he,c as ge,d as ye,f as ve}from"./chunk-D7YHFS6B.js";import"./chunk-S5TVMQRC.js";import"./chunk-ISUXYPYL.js";import"./chunk-U6S6AZM6.js";import"./chunk-4K25DELJ.js";import{f as fe,i as pe,k as B}from"./chunk-S2MSIA57.js";async function be(e,t){let r=e?.body;if(!r)return;let n=r.getReader(),o=0,a=!1,s,i=new Promise((g,d)=>{s=setTimeout(()=>d(Error("Exposure response timeout")),2e3)}),u=()=>{},c=new Promise((g,d)=>{u=()=>d(t?.reason),t?.addEventListener("abort",u,{once:!0}),t?.aborted&&u()});try{for(;;){let g=await Promise.race([n.read(),i,c]);if(g.done){a=!0;return}if(o+=g.value.byteLength,o>16384)throw Error("Exposure response budget")}}finally{clearTimeout(s),t?.removeEventListener("abort",u),a||n.cancel().catch(()=>{}),n.releaseLock()}}var we=2*1024*1024,At=256*1024;async function Ee(e,t,r,n){let o=()=>{},a=new Promise((s,i)=>{o=()=>i(n.reason),n.addEventListener("abort",o,{once:!0}),n.aborted&&o()});try{let s=e(t,{...r,signal:n});return s.then(i=>{n.aborted&&i.body?.cancel().catch(()=>{})},()=>{}),await Promise.race([s,a])}finally{n.removeEventListener("abort",o)}}async function Ve(e,t,r,n=!1){if(new TextEncoder().encode(r).byteLength>65536)throw Error("Exposure request budget");let o=new AbortController,a=setTimeout(()=>o.abort(Error("Exposure request timeout")),5e3);try{let s=await Ee(e,t,{method:"POST",headers:{"Content-Type":"text/plain"},body:r,credentials:"omit",keepalive:n,redirect:"error"},o.signal);await be(s,o.signal)}finally{clearTimeout(a)}}function Ae(e){let t,r=!1;return{async read(n,o){if(r)throw Error("Experiment client stopped");t?.abort(Error("Experiment request superseded"));let a=new AbortController;t=a;let{signal:s}=a,i=setTimeout(()=>a.abort(Error("Experiment request timeout")),5e3);try{let u=await Ee(e,n,{cache:"no-cache",credentials:"omit",redirect:"error"},s),c=await ce(u,o,s,{requireJson:!1});return s.throwIfAborted(),c}finally{clearTimeout(i),t===a&&(t=void 0)}},destroy(){r=!0,t?.abort(Error("Experiment client stopped")),t=void 0}}}function J(e,t=()=>{}){let r=new WeakMap,n=0,o=a=>{let s=r.get(a);if(s!==void 0)return s;let i=[],u=a,c=!0;for(;u;){let g=r.get(u);if(g!==void 0){c=g;break}if(++n>8192||i.length>=256)throw Error("IAM render ancestry budget exceeded");if(i.push(u),t(),u.hasAttribute("hidden")||/(?:^|;)\s*display\s*:\s*none\s*(?:!\s*important\s*)?(?:;|$)/i.test(u.getAttribute("style")??"")){c=!1;break}u=u.parentElement}for(let g of i)r.set(g,c);return c};return a=>{let s=0,i=e.querySelectorAll(a);for(let u=0;u<i.length;u++){let c=i[u];if(!c)throw Error("IAM render selection changed");o(c)&&s++,t()}return s}}var je=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function j(e){if(!je(e)||Object.keys(e).some(a=>!["schemaVersion","renderKey","routeTemplate","selectors","present","absent"].includes(a))||e.schemaVersion!==1||typeof e.renderKey!="string"||!e.renderKey||e.renderKey.length>256||typeof e.routeTemplate!="string"||!e.routeTemplate.startsWith("/")||e.routeTemplate.length>2048||!Array.isArray(e.selectors)||e.selectors.length>512||e.selectors.some(a=>typeof a!="string"||a.length>512||!/^[a-z][a-z0-9-]*\[data-indiana-id="(?:[^"\\\x00-\x1f]|\\["\\])*"\]$/.test(a))||!Array.isArray(e.present)||!Array.isArray(e.absent))throw new Error("Invalid IAM render guard");if(e.present.length===0)throw Error("IAM render needs positive source evidence");let t=e.selectors,r=e.present,n=e.absent,o=[...r,...n];if(new Set(t).size!==t.length||o.length!==t.length||new Set(o).size!==o.length||o.some(a=>typeof a!="number"||!Number.isInteger(a)||a<0||a>=t.length))throw new Error("Invalid IAM render signature");return{schemaVersion:1,renderKey:e.renderKey,routeTemplate:e.routeTemplate,selectors:e.selectors,present:e.present,absent:e.absent}}function Ue(e,t){let r=e.split("/").filter(Boolean),n="";for(let o of r)/^\[\[\.\.\.[^\[\]]+\]\]$/.test(o)?n+="(?:/[^/]+)*":/^\[\.\.\.[^\[\]]+\]$/.test(o)?n+="(?:/[^/]+)+":/^\[[^\[\]]+\]$/.test(o)?n+="/[^/]+":n+="/"+o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp("^"+(n?n+"/?":"/")+"$").test(t)&&!/[\[\]]/.test(t)}function Me(e,t,r,n,o=J(t,n)){if(!Ue(e.routeTemplate,r))return!1;let a=new Set(e.present),s=!0;for(let i=0;i<e.selectors.length;i++){let u=o(e.selectors[i]);if(a.has(i)&&u>1)throw new Error("IAM render anchor is ambiguous");(a.has(i)?u!==1:u!==0)&&(s=!1),n()}return s}var _=new WeakMap,Z=new WeakSet;function Q(e){Z.add(e)}function He(e){let t=new Set,r=new Set,n,o=0,a=!1,s=()=>{t.size||o||(n?.disconnect(),e.removeEventListener("visibilitychange",u),_.delete(e))};function i(c){if(e.hidden)return;let g=performance.now(),d=new Map,m=new Map,b=()=>{if(performance.now()-g>8)throw Error("IAM page check exceeded its work budget")},M=l=>{b();let f=d.get(l);return f||(f=e.querySelectorAll(l),d.set(l,f)),b(),f},A=J({querySelectorAll:M},b),y={query:M,checkpoint:b,matches(l,f){let p=m.get(f);if(!p){try{p={match:Me(l,e,location.pathname,b,A)}}catch(h){p={error:h}}m.set(f,p)}if("error"in p)throw p.error;return p.match}},x=[],k=[],L=[];for(let l of c)if(t.has(l))try{x.push({job:l,commit:l.prepare(y)})}catch(f){k.push({job:l,error:f})}try{b()}catch(l){for(let f of[...t])f.fail(l);return}for(let{job:l,error:f}of k)t.has(l)&&l.fail(f);for(let{job:l,commit:f}of x)if(t.has(l))try{b(),f(p=>L.push(p))}catch(p){l.fail(p)}for(let l of L)l()}function u(){a||!t.size||e.hidden||(a=!0,queueMicrotask(()=>{a=!1,i([...t])}))}return{begin(){o++},end(){--o===0&&(r.clear(),i([...t])),s()},add(c){return n||(n=new MutationObserver(g=>{let d=m=>Z.has(m)||!!(m.parentNode&&Z.has(m.parentNode));g.some(m=>!d(m.target)&&!(m.type==="childList"&&[...m.addedNodes,...m.removedNodes].length>0&&[...m.addedNodes,...m.removedNodes].every(d)))&&u()}),n.observe(e.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style","hidden","data-indiana-id","data-indiana-release","data-testid","id","name"]}),e.addEventListener("visibilitychange",u)),t.add(c),o?r.add(c):i([c]),()=>{t.delete(c),r.delete(c),s()}}}}function Se(){let e=_.get(document);return e||(e=He(document),_.set(document,e)),e}function xe(e){return Se().add(e)}function ke(e){let t=Se();t.begin();try{e()}finally{t.end()}}var ze=/^[a-zA-Z:_][a-zA-Z0-9:_.-]*$/,te={revert:function(){}},W=new Map,re=new Set;function We(e){return e==="html"?{childList:!0,subtree:!0,attributes:!0,characterData:!0}:{childList:!1,subtree:!1,attributes:!0,attributeFilter:[e]}}function F(e){var t=W.get(e);return t||(t={element:e,attributes:{}},W.set(e,t)),t}function K(e,t,r,n,o){var a=r(e),s={isDirty:!1,originalValue:a,virtualValue:a,mutations:[],el:e,_positionTimeout:null,observer:new MutationObserver(function(){if(!dt&&!(t==="position"&&s._positionTimeout)){t==="position"&&(s._positionTimeout=setTimeout(function(){s._positionTimeout=null},1e3));var i=r(e);t==="position"&&i.parentNode===s.virtualValue.parentNode&&i.insertBeforeNode===s.virtualValue.insertBeforeNode||i!==s.virtualValue&&(s.originalValue=i,o(s))}}),mutationRunner:o,setValue:n,getCurrentValue:r};return t==="position"&&e.parentNode?s.observer.observe(e.parentNode,{childList:!0,subtree:!0,attributes:!1,characterData:!1}):s.observer.observe(e,We(t)),s}function $(e,t){var r=t.getCurrentValue(t.el);t.virtualValue=e,e&&typeof e!="string"?(!r||e.parentNode!==r.parentNode||e.insertBeforeNode!==r.insertBeforeNode)&&(t.isDirty=!0,Re()):e!==r&&(t.isDirty=!0,Re())}function Fe(e){var t=e.originalValue;e.mutations.forEach(function(r){return t=r.mutate(t)}),$(st(t),e)}function Ke(e){var t=new Set(e.originalValue.split(/\s+/).filter(Boolean));e.mutations.forEach(function(r){return r.mutate(t)}),$(Array.from(t).filter(Boolean).join(" "),e)}function $e(e){var t=e.originalValue;e.mutations.forEach(function(r){return t=r.mutate(t)}),$(t,e)}function Ye(e){var t=e.parentSelector,r=e.insertBeforeSelector,n=document.querySelector(t);if(!n)return null;var o=r?document.querySelector(r):null;return r&&!o?null:{parentNode:n,insertBeforeNode:o}}function _e(e){var t=e.originalValue;e.mutations.forEach(function(r){var n=r.mutate(),o=Ye(n);t=o||t}),$(t,e)}var Ze=function(t){return t.innerHTML},Qe=function(t,r){return t.innerHTML=r};function Te(e){var t=F(e);return t.html||(t.html=K(e,"html",Ze,Qe,Fe)),t.html}var Xe=function(t){return{parentNode:t.parentElement,insertBeforeNode:t.nextElementSibling}},et=function(t,r){r.insertBeforeNode&&!r.parentNode.contains(r.insertBeforeNode)||r.parentNode.insertBefore(t,r.insertBeforeNode)};function Le(e){var t=F(e);return t.position||(t.position=K(e,"position",Xe,et,_e)),t.position}var tt=function(t,r){return r?t.className=r:t.removeAttribute("class")},rt=function(t){return t.className};function Ne(e){var t=F(e);return t.classes||(t.classes=K(e,"class",rt,tt,Ke)),t.classes}var nt=function(t){return function(r){var n;return(n=r.getAttribute(t))!=null?n:null}},ot=function(t){return function(r,n){return n!==null?r.setAttribute(t,n):r.removeAttribute(t)}};function Pe(e,t){var r=F(e);return r.attributes[t]||(r.attributes[t]=K(e,t,nt(t),ot(t),$e)),r.attributes[t]}function it(e,t){var r=W.get(e);if(r)if(t==="html"){var n,o;(n=r.html)==null||(o=n.observer)==null||o.disconnect(),delete r.html}else if(t==="class"){var a,s;(a=r.classes)==null||(s=a.observer)==null||s.disconnect(),delete r.classes}else if(t==="position"){var i,u;(i=r.position)==null||(u=i.observer)==null||u.disconnect(),delete r.position}else{var c,g,d;(c=r.attributes)==null||(g=c[t])==null||(d=g.observer)==null||d.disconnect(),delete r.attributes[t]}}var U;function st(e){return U||(U=document.createElement("div")),U.innerHTML=e,U.innerHTML}function H(e,t,r){if(r.isDirty){r.isDirty=!1;var n=r.virtualValue;r.mutations.length||it(e,t),r.setValue(e,n)}}function at(e,t){e.html&&H(t,"html",e.html),e.classes&&H(t,"class",e.classes),e.position&&H(t,"position",e.position),Object.keys(e.attributes).forEach(function(r){H(t,r,e.attributes[r])})}function Re(){W.forEach(at)}function ut(e,t){var r=null;e.kind==="html"?r=Te(t):e.kind==="class"?r=Ne(t):e.kind==="attribute"?r=Pe(t,e.attribute):e.kind==="position"&&(r=Le(t)),r&&(r.mutations.push(e),r.mutationRunner(r))}function lt(e,t){var r=null;if(e.kind==="html"?r=Te(t):e.kind==="class"?r=Ne(t):e.kind==="attribute"?r=Pe(t,e.attribute):e.kind==="position"&&(r=Le(t)),!!r){var n=r.mutations.indexOf(e);n!==-1&&r.mutations.splice(n,1),r.mutationRunner(r)}}function Oe(e){if(!(e.kind==="position"&&e.elements.size===1)){var t=new Set(e.elements),r=document.querySelectorAll(e.selector);r.forEach(function(n){t.has(n)||(e.elements.add(n),ut(e,n))})}}function ct(e){e.elements.forEach(function(t){return lt(e,t)}),e.elements.clear(),re.delete(e)}function Ie(){re.forEach(Oe)}var dt=!1;var X;function ft(){typeof document>"u"||(X||(X=new MutationObserver(function(){Ie()})),Ie(),X.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!1,characterData:!1}))}ft();function Y(e){return typeof document>"u"?te:(re.add(e),Oe(e),{revert:function(){ct(e)}})}function ee(e,t){return Y({kind:"html",elements:new Set,mutate:t,selector:e})}function qe(e,t){return Y({kind:"position",elements:new Set,mutate:t,selector:e})}function D(e,t){return Y({kind:"class",elements:new Set,mutate:t,selector:e})}function z(e,t,r){return ze.test(t)?t==="class"||t==="className"?D(e,function(n){var o=r(Array.from(n).join(" "));n.clear(),o&&o.split(/\s+/g).filter(Boolean).forEach(function(a){return n.add(a)})}):Y({kind:"attribute",attribute:t,elements:new Set,mutate:r,selector:e}):te}function pt(e){var t=e.selector,r=e.action,n=e.value,o=e.attribute,a=e.parentSelector,s=e.insertBeforeSelector;if(o==="html"){if(r==="append")return ee(t,function(i){return i+(n??"")});if(r==="set")return ee(t,function(){return n??""})}else if(o==="class"){if(r==="append")return D(t,function(i){n&&i.add(n)});if(r==="remove")return D(t,function(i){n&&i.delete(n)});if(r==="set")return D(t,function(i){i.clear(),n&&i.add(n)})}else if(o==="position"){if(r==="set"&&a)return qe(t,function(){return{insertBeforeSelector:s,parentSelector:a}})}else{if(r==="append")return z(t,o,function(i){return i!==null?i+(n??""):n??""});if(r==="set")return z(t,o,function(){return n??""});if(r==="remove")return z(t,o,function(){return null})}return te}var mt={html:ee,classes:D,attribute:z,position:qe,declarative:pt},ne=mt;import ht from"dompurify";var oe,Be;function gt(e){return(!oe||Be!==window)&&(oe=ht(window),Be=window),oe.sanitize(e,{USE_PROFILES:{html:!0},FORBID_TAGS:["form","input","textarea","select","button","style"]})}function De(e){let t={...e};if(!["html","class","style","position","href","src","alt","title","id","role","hidden"].includes(t.attribute)&&!/^(aria|data)-[a-z0-9_-]+$/.test(t.attribute))throw new Error("Unsupported visual attribute");document.querySelector(t.selector);for(let r of document.querySelectorAll(t.selector))if(["SCRIPT","IFRAME","OBJECT","EMBED","HTML","HEAD"].includes(r.tagName)||r.tagName==="BODY"&&t.attribute==="html")throw new Error("Protected visual target");if(t.attribute==="html"&&(t.value=gt(t.value??"")),["href","src"].includes(t.attribute)&&t.action!=="remove"){let r=new URL(t.value??"",location.href);if(!["https:","http:","mailto:","tel:"].includes(r.protocol)||t.attribute==="src"&&!["https:","http:"].includes(r.protocol))throw new Error("Unsafe visual URL")}return t.parentSelector&&document.querySelector(t.parentSelector),t.insertBeforeSelector&&document.querySelector(t.insertBeforeSelector),t}function Ce(e,t={}){if(e.renderGuard&&!t.requireUniqueTargets)throw new Error("IAM render guard requires the source release fence");if(t.requireUniqueTargets)return yt(e,t);let r=e.domMutations.map(De),n=[],o=!1,a=!1,s,i=()=>{if(!o){o=!0,s?.disconnect();for(let c of n.reverse())c()}},u=()=>{o||a||(!r.length||e.css||t.allowJs&&e.js||r.some(c=>document.querySelector(c.selector)))&&(a=!0,t.onApplied?.())};try{if(e.css){let d=document.createElement("style");t.nonce&&(d.nonce=t.nonce),d.textContent=e.css,document.head.append(d),n.push(()=>d.remove())}for(let d of r){let m=ne.declarative(d);n.push(()=>m.revert())}if(t.allowJs&&e.js){let d=document.createElement("script");t.nonce&&(d.nonce=t.nonce),d.textContent=e.js,document.head.append(d),n.push(()=>d.remove())}let c=performance.now(),g=new WeakMap;s=new MutationObserver(d=>{if(!o){performance.now()-c>1e3&&(c=performance.now(),g=new WeakMap);for(let m of d){let b=(g.get(m.target)??0)+1;if(g.set(m.target,b),b>40){i(),t.onError?.(new Error("Visual changes conflict with repeated page rendering"));return}}u()}}),s.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),u()}catch(c){throw i(),c}return{revert:i,get applied(){return a}}}function yt(e,t){let r=t?.boundVariations??[e],n=new Set,o=new Set,a=[],s=new Map,i=r.flatMap(l=>l.renderGuard?[j(l.renderGuard)]:[]),u=i[0];if(i.some(l=>JSON.stringify(l)!==JSON.stringify(u)))throw new Error("IAM variations use different render states");if(e.js||r.some(l=>l.js))throw Error("IAM scripts cannot execute");if(r.length>20||r.reduce((l,f)=>l+f.css.length,0)>262144)throw Error("IAM target budget");let c=(l,f)=>{for(let h of l.domMutations){if(h.action!=="set"||h.attribute!=="html")throw Error("Unsupported IAM mutation");n.add(h.selector),o.add(h.selector)}if(!l.css)return;let p=document.createElement("style");Q(p),p.media="not all",t?.nonce&&(p.nonce=t.nonce),p.textContent=l.css;try{if(document.head.append(p),!p.sheet)throw Error("IAM CSS is blocked");for(let h of p.sheet.cssRules){if(!("selectorText"in h)||typeof h.selectorText!="string")throw Error("Unsupported IAM style rule");n.add(h.selectorText),f&&a.push({selector:h.selectorText,css:h.cssText})}}finally{p.remove()}};for(let l of r)c(l,!1);if(c(e,!0),n.size>200)throw Error("IAM target budget");let g=e.domMutations.map(De),d=!1,m=!1,b=!1,M={},A=u?JSON.stringify(u):"",y,x="",k=()=>{if(!d){d=!0,M.unsubscribe?.();for(let l of s.values())l.revert();s.clear(),y?.remove(),y=void 0,m=!1}},L=()=>{for(let l of s.values())l.revert();s.clear(),y?.remove(),y=void 0,x="",m=!1};return M.unsubscribe=xe({fail(l){k(),t?.onError?.(l)},prepare(l){if(u&&!l.matches(u,A))return()=>{d||L()};let f=new Map;for(let p of n){let h=l.query(p);if(h.length>1)throw Error("IAM target is ambiguous in this rendered state");if(h.length){if(o.has(p)&&h[0].children.length)throw Error("IAM text target is no longer a leaf");f.set(p,h[0])}l.checkpoint()}return p=>{if(d)return;for(let[E,R]of s)f.get(E)!==R.element&&(R.revert(),s.delete(E));for(let E of new Set(g.map(R=>R.selector))){let R=f.get(E);if(!R||s.has(E))continue;let P=g.filter(N=>N.selector===E).map(N=>ne.declarative(N));s.set(E,{element:R,revert:()=>P.forEach(N=>N.revert())})}let h=a.filter(E=>f.has(E.selector)).map(E=>E.css).join(`
|
|
1
|
+
import{a as ce}from"./chunk-WCFVNF5D.js";import{c as de}from"./chunk-J4RHVU3W.js";import{a as me,b as he,c as ge,d as ye,f as ve}from"./chunk-YAFMBXIE.js";import"./chunk-3SONNXFG.js";import"./chunk-U6S6AZM6.js";import"./chunk-4K25DELJ.js";import"./chunk-S5TVMQRC.js";import"./chunk-RRII2DMC.js";import{h as fe,k as pe,m as B}from"./chunk-KQCTDXVD.js";async function be(e,t){let r=e?.body;if(!r)return;let n=r.getReader(),o=0,a=!1,s,i=new Promise((g,d)=>{s=setTimeout(()=>d(Error("Exposure response timeout")),2e3)}),u=()=>{},c=new Promise((g,d)=>{u=()=>d(t?.reason),t?.addEventListener("abort",u,{once:!0}),t?.aborted&&u()});try{for(;;){let g=await Promise.race([n.read(),i,c]);if(g.done){a=!0;return}if(o+=g.value.byteLength,o>16384)throw Error("Exposure response budget")}}finally{clearTimeout(s),t?.removeEventListener("abort",u),a||n.cancel().catch(()=>{}),n.releaseLock()}}var we=2*1024*1024,At=256*1024;async function Ee(e,t,r,n){let o=()=>{},a=new Promise((s,i)=>{o=()=>i(n.reason),n.addEventListener("abort",o,{once:!0}),n.aborted&&o()});try{let s=e(t,{...r,signal:n});return s.then(i=>{n.aborted&&i.body?.cancel().catch(()=>{})},()=>{}),await Promise.race([s,a])}finally{n.removeEventListener("abort",o)}}async function Ve(e,t,r,n=!1){if(new TextEncoder().encode(r).byteLength>65536)throw Error("Exposure request budget");let o=new AbortController,a=setTimeout(()=>o.abort(Error("Exposure request timeout")),5e3);try{let s=await Ee(e,t,{method:"POST",headers:{"Content-Type":"text/plain"},body:r,credentials:"omit",keepalive:n,redirect:"error"},o.signal);await be(s,o.signal)}finally{clearTimeout(a)}}function Ae(e){let t,r=!1;return{async read(n,o){if(r)throw Error("Experiment client stopped");t?.abort(Error("Experiment request superseded"));let a=new AbortController;t=a;let{signal:s}=a,i=setTimeout(()=>a.abort(Error("Experiment request timeout")),5e3);try{let u=await Ee(e,n,{cache:"no-cache",credentials:"omit",redirect:"error"},s),c=await ce(u,o,s);return s.throwIfAborted(),c}finally{clearTimeout(i),t===a&&(t=void 0)}},destroy(){r=!0,t?.abort(Error("Experiment client stopped")),t=void 0}}}function J(e,t=()=>{}){let r=new WeakMap,n=0,o=a=>{let s=r.get(a);if(s!==void 0)return s;let i=[],u=a,c=!0;for(;u;){let g=r.get(u);if(g!==void 0){c=g;break}if(++n>8192||i.length>=256)throw Error("IAM render ancestry budget exceeded");if(i.push(u),t(),u.hasAttribute("hidden")||/(?:^|;)\s*display\s*:\s*none\s*(?:!\s*important\s*)?(?:;|$)/i.test(u.getAttribute("style")??"")){c=!1;break}u=u.parentElement}for(let g of i)r.set(g,c);return c};return a=>{let s=0,i=e.querySelectorAll(a);for(let u=0;u<i.length;u++){let c=i[u];if(!c)throw Error("IAM render selection changed");o(c)&&s++,t()}return s}}var je=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function j(e){if(!je(e)||Object.keys(e).some(a=>!["schemaVersion","renderKey","routeTemplate","selectors","present","absent"].includes(a))||e.schemaVersion!==1||typeof e.renderKey!="string"||!e.renderKey||e.renderKey.length>256||typeof e.routeTemplate!="string"||!e.routeTemplate.startsWith("/")||e.routeTemplate.length>2048||!Array.isArray(e.selectors)||e.selectors.length>512||e.selectors.some(a=>typeof a!="string"||a.length>512||!/^[a-z][a-z0-9-]*\[data-indiana-id="(?:[^"\\\x00-\x1f]|\\["\\])*"\]$/.test(a))||!Array.isArray(e.present)||!Array.isArray(e.absent))throw new Error("Invalid IAM render guard");if(e.present.length===0)throw Error("IAM render needs positive source evidence");let t=e.selectors,r=e.present,n=e.absent,o=[...r,...n];if(new Set(t).size!==t.length||o.length!==t.length||new Set(o).size!==o.length||o.some(a=>typeof a!="number"||!Number.isInteger(a)||a<0||a>=t.length))throw new Error("Invalid IAM render signature");return{schemaVersion:1,renderKey:e.renderKey,routeTemplate:e.routeTemplate,selectors:e.selectors,present:e.present,absent:e.absent}}function Ue(e,t){let r=e.split("/").filter(Boolean),n="";for(let o of r)/^\[\[\.\.\.[^\[\]]+\]\]$/.test(o)?n+="(?:/[^/]+)*":/^\[\.\.\.[^\[\]]+\]$/.test(o)?n+="(?:/[^/]+)+":/^\[[^\[\]]+\]$/.test(o)?n+="/[^/]+":n+="/"+o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp("^"+(n?n+"/?":"/")+"$").test(t)&&!/[\[\]]/.test(t)}function Me(e,t,r,n,o=J(t,n)){if(!Ue(e.routeTemplate,r))return!1;let a=new Set(e.present),s=!0;for(let i=0;i<e.selectors.length;i++){let u=o(e.selectors[i]);if(a.has(i)&&u>1)throw new Error("IAM render anchor is ambiguous");(a.has(i)?u!==1:u!==0)&&(s=!1),n()}return s}var _=new WeakMap,Z=new WeakSet;function Q(e){Z.add(e)}function He(e){let t=new Set,r=new Set,n,o=0,a=!1,s=()=>{t.size||o||(n?.disconnect(),e.removeEventListener("visibilitychange",u),_.delete(e))};function i(c){if(e.hidden)return;let g=performance.now(),d=new Map,m=new Map,b=()=>{if(performance.now()-g>8)throw Error("IAM page check exceeded its work budget")},M=l=>{b();let f=d.get(l);return f||(f=e.querySelectorAll(l),d.set(l,f)),b(),f},A=J({querySelectorAll:M},b),y={query:M,checkpoint:b,matches(l,f){let p=m.get(f);if(!p){try{p={match:Me(l,e,location.pathname,b,A)}}catch(h){p={error:h}}m.set(f,p)}if("error"in p)throw p.error;return p.match}},x=[],k=[],L=[];for(let l of c)if(t.has(l))try{x.push({job:l,commit:l.prepare(y)})}catch(f){k.push({job:l,error:f})}try{b()}catch(l){for(let f of[...t])f.fail(l);return}for(let{job:l,error:f}of k)t.has(l)&&l.fail(f);for(let{job:l,commit:f}of x)if(t.has(l))try{b(),f(p=>L.push(p))}catch(p){l.fail(p)}for(let l of L)l()}function u(){a||!t.size||e.hidden||(a=!0,queueMicrotask(()=>{a=!1,i([...t])}))}return{begin(){o++},end(){--o===0&&(r.clear(),i([...t])),s()},add(c){return n||(n=new MutationObserver(g=>{let d=m=>Z.has(m)||!!(m.parentNode&&Z.has(m.parentNode));g.some(m=>!d(m.target)&&!(m.type==="childList"&&[...m.addedNodes,...m.removedNodes].length>0&&[...m.addedNodes,...m.removedNodes].every(d)))&&u()}),n.observe(e.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style","hidden","data-indiana-id","data-indiana-release","data-testid","id","name"]}),e.addEventListener("visibilitychange",u)),t.add(c),o?r.add(c):i([c]),()=>{t.delete(c),r.delete(c),s()}}}}function Se(){let e=_.get(document);return e||(e=He(document),_.set(document,e)),e}function xe(e){return Se().add(e)}function ke(e){let t=Se();t.begin();try{e()}finally{t.end()}}var ze=/^[a-zA-Z:_][a-zA-Z0-9:_.-]*$/,te={revert:function(){}},W=new Map,re=new Set;function We(e){return e==="html"?{childList:!0,subtree:!0,attributes:!0,characterData:!0}:{childList:!1,subtree:!1,attributes:!0,attributeFilter:[e]}}function F(e){var t=W.get(e);return t||(t={element:e,attributes:{}},W.set(e,t)),t}function K(e,t,r,n,o){var a=r(e),s={isDirty:!1,originalValue:a,virtualValue:a,mutations:[],el:e,_positionTimeout:null,observer:new MutationObserver(function(){if(!dt&&!(t==="position"&&s._positionTimeout)){t==="position"&&(s._positionTimeout=setTimeout(function(){s._positionTimeout=null},1e3));var i=r(e);t==="position"&&i.parentNode===s.virtualValue.parentNode&&i.insertBeforeNode===s.virtualValue.insertBeforeNode||i!==s.virtualValue&&(s.originalValue=i,o(s))}}),mutationRunner:o,setValue:n,getCurrentValue:r};return t==="position"&&e.parentNode?s.observer.observe(e.parentNode,{childList:!0,subtree:!0,attributes:!1,characterData:!1}):s.observer.observe(e,We(t)),s}function $(e,t){var r=t.getCurrentValue(t.el);t.virtualValue=e,e&&typeof e!="string"?(!r||e.parentNode!==r.parentNode||e.insertBeforeNode!==r.insertBeforeNode)&&(t.isDirty=!0,Re()):e!==r&&(t.isDirty=!0,Re())}function Fe(e){var t=e.originalValue;e.mutations.forEach(function(r){return t=r.mutate(t)}),$(st(t),e)}function Ke(e){var t=new Set(e.originalValue.split(/\s+/).filter(Boolean));e.mutations.forEach(function(r){return r.mutate(t)}),$(Array.from(t).filter(Boolean).join(" "),e)}function $e(e){var t=e.originalValue;e.mutations.forEach(function(r){return t=r.mutate(t)}),$(t,e)}function Ye(e){var t=e.parentSelector,r=e.insertBeforeSelector,n=document.querySelector(t);if(!n)return null;var o=r?document.querySelector(r):null;return r&&!o?null:{parentNode:n,insertBeforeNode:o}}function _e(e){var t=e.originalValue;e.mutations.forEach(function(r){var n=r.mutate(),o=Ye(n);t=o||t}),$(t,e)}var Ze=function(t){return t.innerHTML},Qe=function(t,r){return t.innerHTML=r};function Te(e){var t=F(e);return t.html||(t.html=K(e,"html",Ze,Qe,Fe)),t.html}var Xe=function(t){return{parentNode:t.parentElement,insertBeforeNode:t.nextElementSibling}},et=function(t,r){r.insertBeforeNode&&!r.parentNode.contains(r.insertBeforeNode)||r.parentNode.insertBefore(t,r.insertBeforeNode)};function Le(e){var t=F(e);return t.position||(t.position=K(e,"position",Xe,et,_e)),t.position}var tt=function(t,r){return r?t.className=r:t.removeAttribute("class")},rt=function(t){return t.className};function Ne(e){var t=F(e);return t.classes||(t.classes=K(e,"class",rt,tt,Ke)),t.classes}var nt=function(t){return function(r){var n;return(n=r.getAttribute(t))!=null?n:null}},ot=function(t){return function(r,n){return n!==null?r.setAttribute(t,n):r.removeAttribute(t)}};function Pe(e,t){var r=F(e);return r.attributes[t]||(r.attributes[t]=K(e,t,nt(t),ot(t),$e)),r.attributes[t]}function it(e,t){var r=W.get(e);if(r)if(t==="html"){var n,o;(n=r.html)==null||(o=n.observer)==null||o.disconnect(),delete r.html}else if(t==="class"){var a,s;(a=r.classes)==null||(s=a.observer)==null||s.disconnect(),delete r.classes}else if(t==="position"){var i,u;(i=r.position)==null||(u=i.observer)==null||u.disconnect(),delete r.position}else{var c,g,d;(c=r.attributes)==null||(g=c[t])==null||(d=g.observer)==null||d.disconnect(),delete r.attributes[t]}}var U;function st(e){return U||(U=document.createElement("div")),U.innerHTML=e,U.innerHTML}function H(e,t,r){if(r.isDirty){r.isDirty=!1;var n=r.virtualValue;r.mutations.length||it(e,t),r.setValue(e,n)}}function at(e,t){e.html&&H(t,"html",e.html),e.classes&&H(t,"class",e.classes),e.position&&H(t,"position",e.position),Object.keys(e.attributes).forEach(function(r){H(t,r,e.attributes[r])})}function Re(){W.forEach(at)}function ut(e,t){var r=null;e.kind==="html"?r=Te(t):e.kind==="class"?r=Ne(t):e.kind==="attribute"?r=Pe(t,e.attribute):e.kind==="position"&&(r=Le(t)),r&&(r.mutations.push(e),r.mutationRunner(r))}function lt(e,t){var r=null;if(e.kind==="html"?r=Te(t):e.kind==="class"?r=Ne(t):e.kind==="attribute"?r=Pe(t,e.attribute):e.kind==="position"&&(r=Le(t)),!!r){var n=r.mutations.indexOf(e);n!==-1&&r.mutations.splice(n,1),r.mutationRunner(r)}}function Oe(e){if(!(e.kind==="position"&&e.elements.size===1)){var t=new Set(e.elements),r=document.querySelectorAll(e.selector);r.forEach(function(n){t.has(n)||(e.elements.add(n),ut(e,n))})}}function ct(e){e.elements.forEach(function(t){return lt(e,t)}),e.elements.clear(),re.delete(e)}function Ie(){re.forEach(Oe)}var dt=!1;var X;function ft(){typeof document>"u"||(X||(X=new MutationObserver(function(){Ie()})),Ie(),X.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!1,characterData:!1}))}ft();function Y(e){return typeof document>"u"?te:(re.add(e),Oe(e),{revert:function(){ct(e)}})}function ee(e,t){return Y({kind:"html",elements:new Set,mutate:t,selector:e})}function qe(e,t){return Y({kind:"position",elements:new Set,mutate:t,selector:e})}function D(e,t){return Y({kind:"class",elements:new Set,mutate:t,selector:e})}function z(e,t,r){return ze.test(t)?t==="class"||t==="className"?D(e,function(n){var o=r(Array.from(n).join(" "));n.clear(),o&&o.split(/\s+/g).filter(Boolean).forEach(function(a){return n.add(a)})}):Y({kind:"attribute",attribute:t,elements:new Set,mutate:r,selector:e}):te}function pt(e){var t=e.selector,r=e.action,n=e.value,o=e.attribute,a=e.parentSelector,s=e.insertBeforeSelector;if(o==="html"){if(r==="append")return ee(t,function(i){return i+(n??"")});if(r==="set")return ee(t,function(){return n??""})}else if(o==="class"){if(r==="append")return D(t,function(i){n&&i.add(n)});if(r==="remove")return D(t,function(i){n&&i.delete(n)});if(r==="set")return D(t,function(i){i.clear(),n&&i.add(n)})}else if(o==="position"){if(r==="set"&&a)return qe(t,function(){return{insertBeforeSelector:s,parentSelector:a}})}else{if(r==="append")return z(t,o,function(i){return i!==null?i+(n??""):n??""});if(r==="set")return z(t,o,function(){return n??""});if(r==="remove")return z(t,o,function(){return null})}return te}var mt={html:ee,classes:D,attribute:z,position:qe,declarative:pt},ne=mt;import ht from"dompurify";var oe,Be;function gt(e){return(!oe||Be!==window)&&(oe=ht(window),Be=window),oe.sanitize(e,{USE_PROFILES:{html:!0},FORBID_TAGS:["form","input","textarea","select","button","style"]})}function De(e){let t={...e};if(!["html","class","style","position","href","src","alt","title","id","role","hidden"].includes(t.attribute)&&!/^(aria|data)-[a-z0-9_-]+$/.test(t.attribute))throw new Error("Unsupported visual attribute");document.querySelector(t.selector);for(let r of document.querySelectorAll(t.selector))if(["SCRIPT","IFRAME","OBJECT","EMBED","HTML","HEAD"].includes(r.tagName)||r.tagName==="BODY"&&t.attribute==="html")throw new Error("Protected visual target");if(t.attribute==="html"&&(t.value=gt(t.value??"")),["href","src"].includes(t.attribute)&&t.action!=="remove"){let r=new URL(t.value??"",location.href);if(!["https:","http:","mailto:","tel:"].includes(r.protocol)||t.attribute==="src"&&!["https:","http:"].includes(r.protocol))throw new Error("Unsafe visual URL")}return t.parentSelector&&document.querySelector(t.parentSelector),t.insertBeforeSelector&&document.querySelector(t.insertBeforeSelector),t}function Ce(e,t={}){if(e.renderGuard&&!t.requireUniqueTargets)throw new Error("IAM render guard requires the source release fence");if(t.requireUniqueTargets)return yt(e,t);let r=e.domMutations.map(De),n=[],o=!1,a=!1,s,i=()=>{if(!o){o=!0,s?.disconnect();for(let c of n.reverse())c()}},u=()=>{o||a||(!r.length||e.css||t.allowJs&&e.js||r.some(c=>document.querySelector(c.selector)))&&(a=!0,t.onApplied?.())};try{if(e.css){let d=document.createElement("style");t.nonce&&(d.nonce=t.nonce),d.textContent=e.css,document.head.append(d),n.push(()=>d.remove())}for(let d of r){let m=ne.declarative(d);n.push(()=>m.revert())}if(t.allowJs&&e.js){let d=document.createElement("script");t.nonce&&(d.nonce=t.nonce),d.textContent=e.js,document.head.append(d),n.push(()=>d.remove())}let c=performance.now(),g=new WeakMap;s=new MutationObserver(d=>{if(!o){performance.now()-c>1e3&&(c=performance.now(),g=new WeakMap);for(let m of d){let b=(g.get(m.target)??0)+1;if(g.set(m.target,b),b>40){i(),t.onError?.(new Error("Visual changes conflict with repeated page rendering"));return}}u()}}),s.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),u()}catch(c){throw i(),c}return{revert:i,get applied(){return a}}}function yt(e,t){let r=t?.boundVariations??[e],n=new Set,o=new Set,a=[],s=new Map,i=r.flatMap(l=>l.renderGuard?[j(l.renderGuard)]:[]),u=i[0];if(i.some(l=>JSON.stringify(l)!==JSON.stringify(u)))throw new Error("IAM variations use different render states");if(e.js||r.some(l=>l.js))throw Error("IAM scripts cannot execute");if(r.length>20||r.reduce((l,f)=>l+f.css.length,0)>262144)throw Error("IAM target budget");let c=(l,f)=>{for(let h of l.domMutations){if(h.action!=="set"||h.attribute!=="html")throw Error("Unsupported IAM mutation");n.add(h.selector),o.add(h.selector)}if(!l.css)return;let p=document.createElement("style");Q(p),p.media="not all",t?.nonce&&(p.nonce=t.nonce),p.textContent=l.css;try{if(document.head.append(p),!p.sheet)throw Error("IAM CSS is blocked");for(let h of p.sheet.cssRules){if(!("selectorText"in h)||typeof h.selectorText!="string")throw Error("Unsupported IAM style rule");n.add(h.selectorText),f&&a.push({selector:h.selectorText,css:h.cssText})}}finally{p.remove()}};for(let l of r)c(l,!1);if(c(e,!0),n.size>200)throw Error("IAM target budget");let g=e.domMutations.map(De),d=!1,m=!1,b=!1,M={},A=u?JSON.stringify(u):"",y,x="",k=()=>{if(!d){d=!0,M.unsubscribe?.();for(let l of s.values())l.revert();s.clear(),y?.remove(),y=void 0,m=!1}},L=()=>{for(let l of s.values())l.revert();s.clear(),y?.remove(),y=void 0,x="",m=!1};return M.unsubscribe=xe({fail(l){k(),t?.onError?.(l)},prepare(l){if(u&&!l.matches(u,A))return()=>{d||L()};let f=new Map;for(let p of n){let h=l.query(p);if(h.length>1)throw Error("IAM target is ambiguous in this rendered state");if(h.length){if(o.has(p)&&h[0].children.length)throw Error("IAM text target is no longer a leaf");f.set(p,h[0])}l.checkpoint()}return p=>{if(d)return;for(let[E,R]of s)f.get(E)!==R.element&&(R.revert(),s.delete(E));for(let E of new Set(g.map(R=>R.selector))){let R=f.get(E);if(!R||s.has(E))continue;let P=g.filter(N=>N.selector===E).map(N=>ne.declarative(N));s.set(E,{element:R,revert:()=>P.forEach(N=>N.revert())})}let h=a.filter(E=>f.has(E.selector)).map(E=>E.css).join(`
|
|
2
2
|
`);h!==x&&(x=h,h?(y||(y=document.createElement("style"),Q(y),t?.nonce&&(y.nonce=t.nonce),document.head.append(y)),y.textContent=h):(y?.remove(),y=void 0)),m=n.size===0||f.size>0,m&&!b&&(b=!0,p(()=>{d||t?.onApplied?.()}))}}}),d&&M.unsubscribe(),{revert:k,get applied(){return m}}}var C=e=>!!e&&typeof e=="object"&&!Array.isArray(e),q=(e,t)=>typeof e=="string"&&e.length<=t,vt=e=>typeof e=="string"&&(["html","class","style","position","href","src","alt","title","id","role","hidden"].includes(e)||/^(aria|data)-[a-z0-9_-]+$/.test(e));function bt(e){if(!C(e)||!q(e.css??"",1e5)||!q(e.js??"",1e5)||!Array.isArray(e.domMutations??[])||Array.isArray(e.domMutations)&&e.domMutations.length>200)throw new Error("Invalid visual variation");let t=e.domMutations??[];for(let r of t)if(!C(r)||!q(r.selector,2048)||!r.selector||!vt(r.attribute)||!["set","append","remove"].includes(String(r.action))||r.value!==void 0&&!q(r.value,5e4)||r.parentSelector!==void 0&&!q(r.parentSelector,2048)||r.insertBeforeSelector!==void 0&&!q(r.insertBeforeSelector,2048))throw new Error("Invalid visual mutation");return{css:e.css??"",js:e.js??"",domMutations:t,...e.renderGuard===void 0?{}:{renderGuard:j(e.renderGuard)}}}function Ge(e){if(!C(e)||typeof e.environmentId!="string"||typeof e.trackExposures!="boolean"||!/^[-a-f0-9]{36}$/i.test(e.environmentId)||typeof e.generation!="string"||!/^[a-f0-9]{64}$/.test(e.generation)||!Array.isArray(e.experiments)||e.experiments.length>100||!C(e.savedGroups))throw new Error("Invalid visual experiment payload");let t=e.experiments.map(r=>{if(!C(r)||!["key","changeId"].every(n=>typeof r[n]=="string"&&r[n])||!/^[a-f0-9]{64}$/.test(String(r.changeId))||["namespace","status","groups","url"].some(n=>Object.hasOwn(r,n))||r.hashVersion!==void 0&&r.hashVersion!==2||!Array.isArray(r.variations)||r.variations.length<2||r.variations.length>20||r.urlPatterns!==void 0&&!Array.isArray(r.urlPatterns))throw new Error("Invalid visual experiment");return{...r,variations:r.variations.map(bt)}});return{...e,experiments:t}}function Kt(e){let t=ge(e.baseUrl);if(e.appManifestRelease!==void 0&&!/^[a-f0-9]{64}$/.test(e.appManifestRelease))throw new Error("Invalid IAM manifest digest");if(!/^[0-9a-f-]{36}$/i.test(e.environmentId))throw new Error("Invalid App environment ID");let r=e.fetch??globalThis.fetch.bind(globalThis),n=Ae(r),o=`${t}/api/v1/visual-experiments/${e.environmentId}`,a=me(e.deviceIdCookie??"indiana_did"),s=he(),i=null,u=!1,c=!1,g="",d={...e.attributes??{}},m,b,M=0,A=new Map,y=new Map,x=new Set,k=[],L,l,f;function p(){clearTimeout(l),f?.remove(),f=void 0}function h(w=!1){clearTimeout(L),L=void 0;let V=k.splice(0,20);return V.length?Ve(r,`${o}/events`,JSON.stringify({events:V}),w).catch(I=>e.log?.("Visual exposure not sent",{error:I})):Promise.resolve()}function E(w,V){let I=B(w,V);x.has(I)||e.trackExposures===!1||i?.trackExposures===!1||u||(x.add(I),k.push({eventUuid:crypto.randomUUID(),timestamp:new Date().toISOString(),deviceId:a,...s?{sessionId:s}:{},url:location.href,pageTitle:document.title.slice(0,512),experimentKey:w.key,variationKey:V.key}),k.length>=20?h():L??=setTimeout(()=>{h()},1e3))}function R(w){if(!i||u)return;let V=new Set,I={onExperimentViewed:(v,T)=>{V.add(B(v,T))},url:location.href,attributes:{...ve(a,location),...d,indianaAppManifestRelease:e.appManifestRelease??null},savedGroups:fe(i.savedGroups),log:e.log},G=new Set;for(let v of i.experiments){let T=v;try{let S=pe(T,I);if(y.set(v.changeId,S),!S.inExperiment)continue;G.add(v.changeId);let ae=JSON.stringify([S.key,S.value]),ue=A.get(v.changeId);if(ue?.signature===ae){V.has(B(T,S))&&w.push(()=>{ue.applied()&&E(T,S)});continue}A.get(v.changeId)?.revert(),A.delete(v.changeId);let le=Ce(S.value,{requireUniqueTargets:!!e.appManifestRelease&&Array.isArray(v.condition?.$and)&&v.condition.$and.some(O=>O!==null&&typeof O=="object"&&!Array.isArray(O)&&O.indianaAppManifestRelease===e.appManifestRelease),boundVariations:v.variations,allowJs:e.disableJsInjection===!1,nonce:e.nonce,onApplied:()=>{V.has(B(T,S))&&E(T,S)},onError:O=>e.log?.("Visual experiment stopped",{experiment:v.key,error:String(O)})});A.set(v.changeId,{signature:ae,revert:le.revert,applied:()=>le.applied})}catch(S){e.log?.("Skipping visual experiment",{experiment:v.key,error:String(S)})}}for(let[v,T]of A)G.has(v)||(T.revert(),A.delete(v));p()}let P=()=>{let w=[];ke(()=>R(w));for(let V of w)V()};async function N(){let w=++M,V;try{V=await n.read(o,we)}catch(G){if(u||w!==M)return!1;throw G}let I=Ge(V);if(I.environmentId.toLowerCase()!==e.environmentId.toLowerCase())throw new Error("Visual payload scope changed");return u||w!==M?!1:(i=I,!0)}let Je=()=>{g!==location.href&&(g=location.href,P())},ie=()=>{h(!0)},se=()=>{m||u||(m=ye(Je),addEventListener("pagehide",ie),g=location.href)};return{async start(){if(!(c||u)){c=!0,e.appManifestRelease&&(b=de(e.appManifestRelease)),e.antiFlicker&&(f=document.createElement("style"),e.nonce&&(f.nonce=e.nonce),f.textContent="body { visibility: hidden !important }",document.head.append(f),l=setTimeout(p,Math.min(3e3,Math.max(0,e.antiFlickerTimeout??1e3))));try{if(!await N()||u)return;se(),P()}finally{p()}}},async refresh(){u||await N()&&(c&&se(),P())},setAttributes(w){d={...w},P()},flush:()=>h(),getResults(){return new Map(y)},get generation(){return i?.generation??null},destroy(){u=!0,M++,n.destroy(),m?.(),b?.destroy(),removeEventListener("pagehide",ie),p();for(let w of A.values())w.revert();A.clear(),h(!0),i=null,y.clear(),x.clear(),d={}}}}export{Kt as createVisualExperiments};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinkerlandai/indiana-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Framework-independent Indiana SDK for customer identity, entitlements, credits, offers and growth surfaces.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
"THIRD_PARTY_NOTICES.md"
|
|
26
26
|
],
|
|
27
27
|
"exports": {
|
|
28
|
+
"./react-native": {
|
|
29
|
+
"types": "./dist/react-native.d.ts",
|
|
30
|
+
"react-native": "./dist/react-native.js",
|
|
31
|
+
"import": "./dist/react-native.js",
|
|
32
|
+
"default": "./dist/react-native.js"
|
|
33
|
+
},
|
|
28
34
|
".": {
|
|
29
35
|
"types": "./dist/index.d.ts",
|
|
30
36
|
"import": "./dist/index.js"
|
|
@@ -75,12 +81,13 @@
|
|
|
75
81
|
"devDependencies": {
|
|
76
82
|
"@indiana/contracts": "workspace:*",
|
|
77
83
|
"@openrouter/sdk": "^1.4.25",
|
|
84
|
+
"@rrweb/types": "2.1.7",
|
|
78
85
|
"@types/css-tree": "^3.2.0",
|
|
79
86
|
"ai": "7.0.136",
|
|
87
|
+
"rrweb-snapshot": "2.1.7",
|
|
80
88
|
"tsup": "^8.5.1",
|
|
81
89
|
"typescript": "^5.9.3",
|
|
82
|
-
"
|
|
83
|
-
"@rrweb/types": "2.1.7"
|
|
90
|
+
"whatwg-url-minimum": "0.2.0"
|
|
84
91
|
},
|
|
85
92
|
"peerDependencies": {
|
|
86
93
|
"@openrouter/sdk": "^1.4.25"
|
package/dist/chunk-CB63JLGT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
async function g(e,l,o,u={}){let a=u.message??"Invalid SDK JSON response",c=e.headers.get("content-length");if(!e.ok||u.requireJson!==!1&&!/^application\/json(?:;|$)/i.test(e.headers.get("content-type")??"")||c!==null&&(!/^\d+$/.test(c)||Number(c)>l)||!e.body)throw e.body?.cancel().catch(()=>{}),Error(a);let s=e.body.getReader(),b=[],i=0,h=!1,r=()=>{},f=new Promise((d,n)=>{r=()=>n(Error(a)),o.addEventListener("abort",r,{once:!0}),o.aborted&&r()});try{for(;;){let t=await Promise.race([s.read(),f]);if(t.done){h=!0;break}if(i+=t.value.byteLength,i>l)throw Error(a);b.push(t.value)}let d=new Uint8Array(i),n=0;for(let t of b)d.set(t,n),n+=t.length;return JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(d))}finally{o.removeEventListener("abort",r),h||s.cancel().catch(()=>{}),s.releaseLock()}}export{g as a};
|
package/dist/chunk-D7YHFS6B.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{a as L}from"./chunk-S5TVMQRC.js";import{c as T,f as A,i as U}from"./chunk-S2MSIA57.js";function _(e){if(!/^[A-Za-z0-9_-]{1,64}$/.test(e))throw new Error("Invalid device cookie name");let t="";for(let r of document.cookie.split(";"))if(r.trim().startsWith(`${e}=`))try{t=decodeURIComponent(r.trim().slice(e.length+1))}catch{}return/^[A-Za-z0-9_-]{8,128}$/.test(t)||(t=crypto.randomUUID(),document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=${400*24*3600}; SameSite=Lax`),t}function C(){try{let e=sessionStorage.getItem("indiana_sid");return e||(e=crypto.randomUUID(),sessionStorage.setItem("indiana_sid",e)),e}catch{return}}function V(e=L){let t=new URL(e);if(t.protocol!=="https:"&&!(t.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(t.hostname))||t.username||t.password||t.search||t.hash)throw new Error("baseUrl must be an https origin without credentials");return t.origin}var E=new Set,x;function D(e){if(E.add(e),!x){let t=history.pushState,r=history.replaceState,n=()=>{for(let c of E)c()},a=function(...c){t.apply(this,c),n()},l=function(...c){r.apply(this,c),n()};history.pushState=a,history.replaceState=l,addEventListener("popstate",n),addEventListener("hashchange",n),x=()=>{history.pushState===a&&(history.pushState=t),history.replaceState===l&&(history.replaceState=r),removeEventListener("popstate",n),removeEventListener("hashchange",n)}}return()=>{E.delete(e),E.size||(x?.(),x=void 0)}}var Y=e=>new TextEncoder().encode(JSON.stringify({events:e})).length;function q(e,t){let r=e,n=a=>Number.isInteger(a)&&a>=0;return!!r&&typeof r=="object"&&n(r.inserted)&&n(r.duplicates)&&n(r.skipped)&&Array.isArray(r.rejected)&&r.inserted+r.duplicates+r.skipped+r.rejected.length===t}function $(e){let t=[],r,n=(o,s)=>e.log?.(`${e.label} ${o}`,s);function a(o){r===void 0&&t.length&&(r=setTimeout(()=>{c()},o))}async function l(o){let s;try{s=await e.fetch(e.endpoint,{method:"POST",body:JSON.stringify({events:o}),headers:{"Content-Type":"text/plain"},keepalive:!0,credentials:"omit"})}catch(g){return n("not sent",{error:g}),!1}if(s.status===408||s.status===429||s.status>=500)return n("not sent",{status:s.status}),!1;if(!s.ok)return n("rejected",{status:s.status,events:o.length}),!0;let d;try{d=await s.json()}catch{d=void 0}return q(d,o.length)?(d.rejected.length&&n("rejected",{rejected:d.rejected}),!0):(n("not acknowledged",{status:s.status}),!1)}function c(){clearTimeout(r),r=void 0;let o=[];for(;t.length&&o.length<20&&(!o.length||Y([...o,t[0]].map(s=>s.event))<=65536);)o.push(t.shift());return o.length?l(o.map(s=>s.event)).then(s=>{if(s)return a(1e3);let d=o.filter(g=>++g.attempts<5);d.length<o.length&&n("dropped after retries",{events:o.length-d.length}),t.unshift(...d),a(5e3)}):Promise.resolve()}return{push(o){t.push({event:o,attempts:0}),t.length>=20?c():a(1e3)},flush:c}}var Q="__indiana_visual_editor",f;function z(e,t){if(f&&f.origin===e&&f.environmentId===t&&f.expiresAt>Date.now())return f;try{let r=new URL(location.href).searchParams.get(Q);if(!r||r.length>2048)return null;let n=JSON.parse(r);return n.origin!==e||n.environmentId!==t||!/^[a-f0-9-]{36}$/i.test(n.nonce)||n.expiresAt<=Date.now()||n.expiresAt>Date.now()+900*1e3?null:(f=n,n)}catch{return null}}function O(e,t){return!!z(e,t)}/*!
|
|
2
|
-
Portions ported from GrowthBook sdk-js @ ed29827 (GrowthBook.ts auto experiments, util.ts mergeQueryStrings,
|
|
3
|
-
plugins/auto-attributes.ts). Copyright (c) GrowthBook, Inc. MIT License.
|
|
4
|
-
*/function F(e,t){let r,n;try{r=new URL(e),n=new URL(t)}catch{return t}return r.searchParams.forEach((a,l)=>{n.searchParams.has(l)||n.searchParams.set(l,a)}),n.toString()}function W(e,t){let r=navigator.userAgent,n=new URLSearchParams(t.search),a={};for(let l of["source","medium","campaign","term","content"]){let c=n.get(`utm_${l}`);c!==null&&(a[`utm${l[0].toUpperCase()}${l.slice(1)}`]=c)}return{id:e,deviceId:e,url:t.href,path:t.pathname,host:t.host,query:t.search,pageTitle:typeof document>"u"?"":document.title,browser:/Edg/.test(r)?"edge":/Chrome/.test(r)?"chrome":/Firefox/.test(r)?"firefox":/Safari/.test(r)?"safari":"unknown",deviceType:/Mobi/.test(r)?"mobile":"desktop",...a}}function K(e){let t=e;if(!(!!t&&typeof t=="object"&&typeof t.environmentId=="string"&&typeof t.trackExposures=="boolean"&&/^[a-f0-9]{64}$/.test(t.generation??"")&&Array.isArray(t.experiments)&&t.experiments.length<=100&&t.experiments.every(n=>!!n&&!["namespace","status","url","groups"].some(a=>Object.hasOwn(n,a))&&(n.hashVersion===void 0||n.hashVersion===2)&&typeof n.key=="string"&&Array.isArray(n.variations)&&n.variations.length>=2&&n.variations.every(a=>!!a&&typeof a.urlRedirect=="string")&&(n.urlPatterns===void 0||Array.isArray(n.urlPatterns)))&&!!t.savedGroups&&typeof t.savedGroups=="object"&&!Array.isArray(t.savedGroups)))throw new Error("Invalid page experiment payload");return t}function oe(e){if(e.configuration&&e.configuration.scope.environmentId!==e.environmentId)throw new Error("Page configuration belongs to another App environment");let t=V(e.baseUrl);if(!/^[0-9a-f-]{36}$/i.test(e.environmentId))throw new Error("environmentId must be the App environment ID");let r=e.fetch??globalThis.fetch.bind(globalThis),n=`${t}/api/v1/page-experiments/${e.environmentId}`,a=_(e.deviceIdCookie??"indiana_did"),l=C(),c=null,o={...e.attributes??{}},s="",d=!1,g=new Map,P=$({endpoint:`${n}/events`,fetch:r,log:e.log,label:"Exposure"}),w=P.flush,m={trackedExperiments:new Set,log:e.log,onExperimentViewed:(i,u)=>{e.trackExposures===!1||c?.trackExposures===!1||P.push({eventUuid:crypto.randomUUID(),timestamp:new Date().toISOString(),deviceId:a,...l?{sessionId:l}:{},url:location.href,pageTitle:document.title.slice(0,512),experimentKey:i.key,variationKey:u.key})}},j=()=>{m.url=location.href,m.attributes={...W(a,location),...o}};function N(i){if(!e.disableCrossOriginUrlRedirects)return!1;try{let u=new URL(location.href);return i.variations.some(p=>{if(!p.urlRedirect)return!1;let y=new URL(p.urlRedirect);return y.protocol!==u.protocol||y.host!==u.host})}catch{return!0}}function H(i,u){let p=e.configuration?.snapshot?.generation;s=i;let y=e.navigate??(v=>location.replace(v)),G=e.navigateDelay??(e.navigate?0:100),J=e.maxNavigateDelay??1e3;Promise.all([Promise.race([u,new Promise(v=>setTimeout(v,J))]),new Promise(v=>setTimeout(v,G))]).then(()=>{!d&&(!e.configuration||e.configuration.fresh&&e.configuration.snapshot?.generation===p)&&y(i)})}function h(){if(!(!c||d||e.configuration&&!e.configuration.fresh||O(t,e.environmentId))){j();for(let i of c.experiments){if(N(i)){e.log?.("Auto experiment blocked",{id:i.key});continue}let u;try{u=U(i,m)}catch(p){e.log?.("Skipping page experiment",{id:i.key,error:String(p)});continue}if(g.set(i.key,u),!!u.inExperiment){if(u.value.urlRedirect){let p=i.persistQueryString?F(location.href,u.value.urlRedirect):u.value.urlRedirect;T(p,i.urlPatterns??[])?e.log?.("Skipping redirect because original URL matches redirect URL",{id:i.key}):p!==s&&H(p,w())}break}}}}let b="",M=()=>{location.href!==b&&(b=location.href,s="",h())},S,k;function B(){S??=D(M),addEventListener("pagehide",I)}let I=()=>{w()};async function R(){let i=e.configuration?null:await r(n,{cache:"no-cache",credentials:"omit"});if(i&&!i.ok)throw new Error(`Page experiments unavailable (${i.status})`);let u=K(e.configuration?await e.configuration.pageExperiments():await i.json());if(u.environmentId.toLowerCase()!==e.environmentId.toLowerCase())throw new Error("Page experiment payload scope changed");c?.trackExposures===!1&&u.trackExposures&&m.trackedExperiments?.clear(),c=u,m.savedGroups=A(u.savedGroups)}return{async start(){await R(),k??=e.configuration?.subscribe(()=>{!d&&e.configuration?.fresh&&R().then(h).catch(i=>e.log?.("Page configuration unavailable",{error:String(i)}))}),B(),b=location.href,h()},async refresh(){await R(),s="",h()},setAttributes(i){o={...i},h()},getResults(){return new Map(g)},get generation(){return c?.generation??null},destroy(){d=!0,k?.(),S?.(),removeEventListener("pagehide",I),w()}}}export{_ as a,C as b,V as c,D as d,F as e,W as f,K as g,oe as h};
|