@tinkerlandai/indiana-sdk 0.3.1 → 0.4.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 +11 -0
- package/README.md +18 -13
- package/README.zh-CN.md +7 -4
- package/THIRD_PARTY_NOTICES.md +28 -0
- package/dist/{ai-usage-D_mBF5Gp.d.ts → ai-usage-D9xVKhvu.d.ts} +11 -0
- package/dist/chunk-2UFPTDCV.js +4 -0
- package/dist/chunk-LFNFVYC2.js +1 -0
- package/dist/chunk-PVJKOUNE.js +11 -0
- package/dist/chunk-TZ6REIUE.js +17 -0
- package/dist/chunk-VTSEZ4GI.js +1 -0
- package/dist/chunk-ZT523F45.js +1 -0
- package/dist/funnel-runtime-host-4PQY2MFC.js +1 -0
- package/dist/{funnel-runtime-start-CQhy2kx1.d.ts → funnel-runtime-start-B93fV5gJ.d.ts} +6 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/dist/native-shell.js +1 -1
- package/dist/openrouter.d.ts +1 -1
- package/dist/openrouter.js +1 -1
- package/dist/page.d.ts +1 -0
- package/dist/page.js +1 -4
- package/dist/{paywall-Y3FIG43H.js → paywall-M5CIDUIT.js} +1 -1
- package/dist/popup.js +6 -5
- package/dist/server.d.ts +2 -2
- package/dist/server.js +1 -1
- package/dist/src-XEDJAKEB.js +1 -0
- package/dist/visual-editor-agent-PYMKMPY3.js +1 -0
- package/dist/visual.d.ts +38 -0
- package/dist/visual.js +1 -0
- package/package.json +6 -1
- package/dist/chunk-CRJJ4EA2.js +0 -1
- package/dist/chunk-D37O6FAW.js +0 -11
- package/dist/chunk-G5ZGWOLJ.js +0 -1
- package/dist/chunk-MJG7X7LM.js +0 -17
- package/dist/funnel-runtime-host-X7AGEGHN.js +0 -1
- package/dist/src-RZJKF6LQ.js +0 -1
package/dist/chunk-G5ZGWOLJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c,b as C}from"./chunk-CRJJ4EA2.js";import{Fk as L,ci as N,di as _,gi as q,hf as V,ma as R,ok as U,qi as A,zk as T}from"./chunk-D37O6FAW.js";import{d as b,e as D,f as k,g as x}from"./chunk-MJG7X7LM.js";function j(a){let e=null,i=null,l=0,r=0,s=new Set,n=null,u=null,y=new Set,g=()=>{for(let t of y)try{t()}catch{}},o={attributes:R.parse(a.attributes??{}),onFeatureUsage:a.onFeatureUsage?(t,f)=>{s.has(t)||a.onFeatureUsage(t,structuredClone(f))}:void 0,onExperimentViewed:a.onExperimentViewed?(t,f)=>a.onExperimentViewed(structuredClone(t),structuredClone(f)):void 0,stickyBucketAssignmentDocs:structuredClone(a.stickyBucketAssignmentDocs),saveStickyBucketAssignmentDoc:a.saveStickyBucketAssignmentDoc?t=>a.saveStickyBucketAssignmentDoc(structuredClone(t)):void 0,trackedFeatureUsage:{},trackedExperiments:new Set},w=()=>({value:null,source:"unknownFeature",on:!1,off:!0,ruleId:""});function d(t,f=new Set){return s.has(t)?!n||!n.features[t]||["unknownFeature","cyclicPrerequisite"].includes(n.features[t].source):f.has(t)?!1:(f.add(t),(e?.features[t]?.rules??[]).some(p=>[...p.parentConditions??[],...(p.tracks??[]).flatMap(h=>h.experiment.parentConditions??[])].some(h=>d(h.id,f))))}let m=t=>{if(!e)throw new Error("Initialize the Feature client before evaluation");if(e.expiresAt&&Date.parse(e.expiresAt)<=Date.now())throw new Error("Feature configuration expired; refresh before evaluation");return n?.expiresAt&&Date.parse(n.expiresAt)<=Date.now()&&(n=null,o.features=e.features),s.has(t)?!n||n.expiresAt&&Date.parse(n.expiresAt)<=Date.now()?w():structuredClone(n.features[t]??w()):d(t)?w():structuredClone(x(t,o))};async function v(){if(!e||!s.size)return;if(!a.evaluateRemote)throw new Error("Remote Feature evaluation requires a server loader");let t=r;if(u?.revision===t)return u.loading;let f=l,p=e,h=[...s],I=(async()=>{let E=q.parse(await a.evaluateRemote({attributes:structuredClone(o.attributes),features:h}));if(!(f!==l||t!==r||p!==e)){if(E.generation!==p.generation)throw new Error("Feature configuration changed; refresh before evaluation");if(h.some(S=>!Object.hasOwn(E.features,S))||Object.keys(E.features).some(S=>!s.has(S)))throw new Error("Invalid remote Feature results");n=structuredClone(E),o.features={...p.features,...Object.fromEntries(Object.entries(n.features).map(([S,B])=>[S,{defaultValue:B.value}]))},g()}})();u={revision:t,loading:I};try{await I}finally{u?.loading===I&&(u=null)}}function P(){v().catch(t=>{try{a.onError?.(t)}catch{}})}async function F(){if(i)return i;let t=l,f=(async()=>{let p=await a.load(),h="remoteFeatures"in p?_.parse(p):null,I=h??N.parse(p);if(I.scope.projectId!==a.scope.projectId||I.scope.environment!==a.scope.environment)throw new Error("Feature payload scope changed");if(t!==l)throw new Error("Feature client was reset");let E=new Set(h?.remoteFeatures??[]);if([...E].some(S=>Object.hasOwn(I.features,S)))throw new Error("Remote Feature definitions must not be delivered locally");return e=structuredClone(I),s=E,n=null,u=null,r++,o.features=e.features,o.savedGroups=b(e.savedGroups),o.trackedFeatureUsage={},g(),P(),structuredClone(e)})();i=f;try{return await f}finally{i===f&&(i=null)}}return{init:F,refresh:F,refreshRemote:v,get generation(){return e?.generation??null},get expiresAt(){return e?.expiresAt??null},subscribe(t){return y.add(t),()=>{y.delete(t)}},setAttributes(t){o.attributes=R.parse(t),r++,n=null,u=null,o.features=e?.features??{},o.trackedFeatureUsage={},g(),P()},evalFeature:m,isOn(t){return m(t).on},isOff(t){return m(t).off},getFeatureValue(t,f){let p=m(t).value;return structuredClone(p===null?f:p)},reset(){l++,r++,i=null,u=null,e=null,n=null,s.clear(),o.features={},o.savedGroups={},o.stickyBucketAssignmentDocs={},o.attributes={},o.trackedFeatureUsage={},o.trackedExperiments?.clear(),g()}}}async function M(a,e){if(!/^gg_ct_[A-Za-z0-9_-]{43}$/.test(e.customerToken))throw new c("INVALID_TOKEN","A verified Customer credential is required");let i=C(a);i.identify(e.customerToken);let l=A.resolvePaywall.request.parse({selector:{type:"paywall",paywallId:e.paywallId},commerce:e.commerce,locale:e.locale,...e.requirement?{requirement:e.requirement}:{}}),r=null,s=null,n=null,u=null,y=null;async function g(){let d=A.resolvePaywall,m=d.response.parse(await i.request(d.path,d.request.parse({...l,selector:r?{type:"version",versionId:r.id}:l.selector})));if(m.paywall.paywallId!==e.paywallId)throw new c("INVALID_RESPONSE","The requested Paywall changed");if(r&&(m.paywall.id!==r.id||m.paywall.paywallId!==r.paywallId||m.paywall.offering.id!==r.offering.id))throw new c("INVALID_RESPONSE","The pinned Paywall or Offering Version changed");return r=m.paywall,structuredClone(r)}async function o(d){if(!s)throw new c("INVALID_REQUEST","A quoted purchase is required");let m=d==="read"?A.readSubscriptionOperation:A.attach,v=m.response.parse(await i.request(m.path,m.request.parse({operationId:s.operationId,...d==="read"?{}:{intent:d}})));if(v.operation.operationId!==s.operationId||v.operation.currency!==l.commerce.currency)throw new c("INVALID_RESPONSE","The purchase operation changed");return n?.status==="complete"&&v.operation.status!=="complete"||n&&n.status!=="pending"&&v.operation.status==="pending"||(n=v.operation),structuredClone(n)}let w={get view(){return r?structuredClone(r):null},get quote(){return s?structuredClone(s):null},get operation(){return n?structuredClone(n):null},get webViewUrl(){return i.webViewUrl()},refresh:g,async preview(d){if(!r)throw new c("INVALID_REQUEST","Load the Paywall first");let m=r.document.buttons[d.actionId];if(m?.type!=="checkout")throw new c("INVALID_REQUEST","Choose an authored purchase action");let v=V(m.product,d.selection,r.capabilities);if(!v)throw new c("PRODUCT_UNAVAILABLE","Choose an available Product");let P=A.previewAttach.request.parse({requestId:d.requestId,plans:[{productVersionId:v}],provider:l.commerce.provider,currency:l.commerce.currency,...d.offerId?{offerId:d.offerId}:{},...d.nativeOffer?{nativeOffer:d.nativeOffer}:{}}),F=JSON.stringify(P);if(u&&u!==F&&(!n||n.status==="pending"))throw new c("COMMAND_PENDING","Finish or cancel the original purchase before changing it");if(u===F){if(y)return y;if(s)return structuredClone(s)}u=F;let t=(async()=>{let f=A.previewAttach,p=f.response.parse(await i.request(f.path,P));if(p.quote.currency!==l.commerce.currency||p.quote.provider!==l.commerce.provider||p.quote.lines.length!==1||p.quote.lines[0].productVersionId!==v)throw new c("INVALID_RESPONSE","The purchase quote changed its selected Product or presentment");return s=p.quote,n=null,structuredClone(s)})();y=t;try{return await t}finally{y===t&&(y=null)}},confirm:()=>o("confirm"),cancel:()=>o("cancel"),read:()=>o("read"),destroy(){i.reset(),r=null,s=null,n=null,u=null}};return await g(),w}function X(a,e,i){let l=L.parse(a);if(l.evaluationMode!=="local")throw new c("EVALUATION_MODE","Remote nodes are evaluated by Grow");if(l.expiresAt&&Date.parse(l.expiresAt)<=Date.now())throw new c("CONFIGURATION_EXPIRED","Refresh local rules at the scheduled transition");let r=l.topology.nodes.find(o=>o.id===e);if(!r)throw new c("NOT_FOUND","Funnel node is unavailable");let s=R.parse(i.attributes??{}),n={attributes:s,saveStickyBucketAssignmentDoc:i.saveStickyBucketAssignmentDoc?o=>i.saveStickyBucketAssignmentDoc(structuredClone(o)):void 0,onFeatureUsage:i.onFeatureUsage?(o,w)=>i.onFeatureUsage(o,structuredClone(w)):void 0,onExperimentViewed:i.onExperimentViewed?(o,w)=>i.onExperimentViewed(structuredClone(o),structuredClone(w)):void 0,features:structuredClone(l.growth.features),savedGroups:b(l.growth.savedGroups),stickyBucketAssignmentDocs:structuredClone(i.stickyBucketAssignmentDocs)},u,y;if(r.type==="condition"){let o=l.conditions[r.id];if(!o)throw new c("INVALID_RESPONSE","Local condition rules are unavailable");u=o.find(w=>D(s,w.condition,n.savedGroups))?.port??"default"}else if(r.type==="feature"){if(!r.resources.featureKey)throw new c("INVALID_RESPONSE","Feature reference is unavailable");y=x(r.resources.featureKey,n).value,u="next"}else if(r.type==="split"){let o=r.resources.experimentId,w=o?l.growth.experiments[o]:null;if(!w||!o)throw new c("INVALID_RESPONSE","Experiment reference is unavailable");let d=k(w,n);y=d.value,u=d.inExperiment&&!d.passthrough&&typeof d.value=="string"?d.value:"notParticipating"}else throw new c("SERVER_REQUIRED","This node is driven by the authoritative Funnel runtime");let g=r.outputs[u];if(!g)throw new c("INVALID_RESPONSE","Evaluated node exit is unavailable");return{nodeId:e,port:u,target:g,...y===void 0?{}:{value:y}}}function H(a,e){return e.type==="id"?a.customerId===e.value:a.externalUserId===e.value}function O(a,e){if(a===e)return!0;if(Array.isArray(a)||Array.isArray(e))return Array.isArray(a)&&Array.isArray(e)&&a.length===e.length&&a.every((r,s)=>O(r,e[s]));if(!a||!e||typeof a!="object"||typeof e!="object")return!1;let i=Object.entries(a),l=Object.entries(e);return i.length===l.length&&i.every(([r,s])=>Object.hasOwn(e,r)&&O(s,Reflect.get(e,r)))}function ne(a){let e=/^gg_ct_[A-Za-z0-9_-]{32,128}$/.test(a.apiKey);if(typeof window<"u"&&!e)throw new c("SERVER_ONLY","Funnel starts are issued by your backend");if(!e&&!/^gg_sk_[A-Za-z0-9_-]{32,128}$/.test(a.apiKey))throw new c("INVALID_TOKEN","A customer credential or server API key is required");let i=C({...a,timeoutMs:a.timeoutMs??35e3});return i.identify(a.apiKey),{async start(l){let r=U.safeParse({...l,operation:"start"});if(!r.success||r.data.operation!=="start"||(e?r.data.customer!==void 0:r.data.customer===void 0))throw new c("INVALID_REQUEST","Invalid current Funnel start");let s=r.data,n=T.safeParse(await i.request("funnels",s));if(!n.success||!n.data.runToken)throw new c("INVALID_RESPONSE","Funnel start credentials are missing");let u=n.data;if(u.run.source.id!==s.funnelId||u.run.locale!==(s.locale??"en")||!O(u.run.parameters,s.parameters??{})||(s.customer?!u.customerId||s.customer.type==="id"&&u.customerId!==s.customer.value:u.customerId!==void 0))throw new c("INVALID_RESPONSE","Funnel start contract changed");return{...u,runToken:u.runToken}}}}export{j as a,H as b,O as c,M as d,X as e,ne as f};
|
package/dist/chunk-MJG7X7LM.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
function j(e){let t=2166136261,n=e.length;for(let r=0;r<n;r++)t^=e.charCodeAt(r),t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24);return t>>>0}function T(e,t,n){return n===2?j(j(e+t)+"")%1e4/1e4:null}function re(e){return e<=0?[]:new Array(e).fill(1/e)}function C(e,t){return e>=t[0]&&e<t[1]}function G(e,t){for(let n=0;n<t.length;n++)if(C(e,t[n]))return n;return-1}function P(e,t,n){t=t===void 0?1:t,t<0?t=0:t>1&&(t=1);let r=re(e);n=n||r,n.length!==e&&(n=r);let o=n.reduce((a,u)=>u+a,0);(o<.99||o>1.01)&&(n=r);let i=0,s=t;return n.map(a=>{let u=i;return i+=a,[u,u+s*a]})}function K(e,t,n){if(!t)return null;let r=t.split("?")[1];if(!r)return null;let o=r.replace(/#.*/,"").split("&").map(i=>i.split("=",2)).filter(([i])=>i===e).map(([,i])=>parseInt(i));return o.length>0&&o[0]>=0&&o[0]<n?o[0]:null}function M(e){try{return e()}catch{return!1}}function B(e){return typeof e=="string"?e:JSON.stringify(e)}function g(e){typeof e=="number"&&(e=e+""),(!e||typeof e!="string")&&(e="0");let t=e.replace(/(^v|\+.*$)/g,"").split(/[-.]/);return t.length===3&&t.push("~"),t.map(n=>n.match(/^[0-9]+$/)?n.padStart(5," "):n).join("-")}function oe(e){try{let t=e.replace(/([^\\])\//g,"$1\\/");return new RegExp(t)}catch{return}}function I(e,t){if(!t.length)return!1;let n=!1,r=!1;for(let o=0;o<t.length;o++){let i=Ue(e,t[o].type,t[o].pattern);if(t[o].include===!1){if(i)return!1}else n=!0,i&&(r=!0)}return r||!n}function Oe(e,t,n){try{let r=t.replace(/[*.+?^${}()|[\]\\]/g,"\\$&").replace(/_____/g,".*");return n&&(r="\\/?"+r.replace(/(^\/|\/$)/g,"")+"\\/?"),new RegExp("^"+r+"$","i").test(e)}catch{return!1}}function Le(e,t){try{let n=new URL(t.replace(/^([^:/?]*)\./i,"https://$1.").replace(/\*/g,"_____"),"https://_____"),r=[[e.host,n.host,!1],[e.pathname,n.pathname,!0]];return n.hash&&r.push([e.hash,n.hash,!1]),n.searchParams.forEach((o,i)=>{r.push([e.searchParams.get(i)||"",o,!1])}),!r.some(o=>!Oe(o[0],o[1],o[2]))}catch{return!1}}function Ue(e,t,n){try{let r=new URL(e,"https://_");if(t==="regex"){let o=oe(n);return o?o.test(r.href)||o.test(r.href.substring(r.origin.length)):!1}else if(t==="simple")return Le(r,n);return!1}catch{return!1}}function N(e){for(let n of["namespace","status","url","groups"])if(Object.hasOwn(e,n))throw new TypeError(`Retired experiment field: ${n}`);let t=e;if(t.hashVersion!==void 0&&t.hashVersion!==2)throw new TypeError("Only hash version 2 is supported");if(t.filters?.some(n=>n.hashVersion!==2))throw new TypeError("Only hash version 2 is supported")}function F(e){for(let t of Object.values(e)){if(Array.isArray(t))throw new TypeError("Saved groups require typed list or condition entries");if(t&&Object.hasOwn(t,"useEmptyListGroup"))throw new TypeError("Retired saved group field: useEmptyListGroup")}}function se(e){for(let t of["overrides","groups"])if(Object.hasOwn(e,t))throw new TypeError(`Retired evaluation context field: ${t}`);F(e.savedGroups??{})}var _e=e=>e/2**32|0,De=e=>e>>>0;function ie(e,t,n,r){let o=_e(n),i=De(n);e.setUint32(t,r?i:o,r),e.setUint32(t+4,r?o:i,r)}function ae(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}var q=e=>e?`"${e}" `:"";function je(e,t=""){if(typeof e!="number")throw new TypeError(q(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(q(t)+"expected integer >= 0, got "+e);return e}function $(e,t,n=""){if(ae(e)&&(t===void 0||e.length===t))return e;t!==void 0&&je(t,"length");let r=ae(e),o=t!==void 0?` of length ${t}`:"",i=r?`length=${e.length}`:`type=${typeof e}`,s=q(n)+"expected Uint8Array"+o+", got "+i;throw r?new RangeError(s):new TypeError(s)}var Ge=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((t==="object"?"":`"${t}" `)+"expected object, got type="+typeof e)},ue=(e,t)=>{Ge(e,t);let n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)throw new TypeError(`"${t}" expected plain object`);if(Object.hasOwn(e,"__proto__"))throw new TypeError(`"${t}.__proto__" is not allowed`)};function W(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function ce(e,t){$(e,void 0,"output");let n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function J(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function H(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function x(e,t){return e<<32-t|e>>>t}var Pe=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Ke=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function fe(e){if($(e),Pe)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=Ke[e[n]];return t}function Me(e,t,n="opts"){return ue(e,"defaults"),t!==void 0&&ue(t,n),Object.assign(Object.create(null),e,t)}function le(e,t={}){if(typeof e!="function")throw new TypeError('"hashCons" expected function, got type='+typeof e);t=Me({},t,"info");let n=(o,i)=>e(i).update(o).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=o=>e(o),Object.assign(n,t),Object.freeze(n)}var de=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function he(e,t,n){return e&t^~e&n}function be(e,t,n){return e&t^e&n^t&n}var O=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,r,o){this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=H(this.buffer)}update(t){W(this),$(t);let{view:n,buffer:r,blockLen:o}=this,i=t.length,s=!1;for(let a=0;a<i;){let u=Math.min(o-this.pos,i-a);if(u===o){let f=H(t);for(;o<=i-a;a+=o)this.process(f,a);s=!0;continue}r.set(a===0&&u===i?t:t.subarray(a,a+u),this.pos),this.pos+=u,a+=u,this.pos===o&&(this.process(n,0),this.pos=0,s=!0)}return this.length+=t.length,s&&this.roundClean(),this}digestInto(t){W(this),ce(t,this),this.finished=!0;let{buffer:n,view:r,blockLen:o,isLE:i}=this,{pos:s}=this;n[s++]=128,n.fill(0,s),this.padOffset>o-s&&(this.process(r,0),n.fill(0)),ie(r,o-8,this.length*8,i),this.process(r,0),this.roundClean();let a=t===n?r:H(t),u=this.outputLen,f=u/4,l=this.get();if(u%4||f>l.length)throw new Error("invalid outputLen");for(let c=0;c<f;c++)a.setUint32(4*c,l[c],i)}digest(){let{buffer:t,outputLen:n}=this;this.digestInto(t);let r=t.slice(0,n);return this.destroy(),r}_cloneIntoMeta(t){let{buffer:n,length:r,finished:o,destroyed:i,pos:s}=this;return t.destroyed=i,t.finished=o,t.length=r,t.pos=s,s&&t.buffer.set(n),t}clone(){return this._cloneInto()}},ge=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);var Ie=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),m=new Uint32Array(64),Q=class extends O{A=0;B=0;C=0;D=0;E=0;F=0;G=0;H=0;constructor(t,n){super(64,t,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0,this.F=n[5]|0,this.G=n[6]|0,this.H=n[7]|0}get(){let{A:t,B:n,C:r,D:o,E:i,F:s,G:a,H:u}=this;return[t,n,r,o,i,s,a,u]}set(t,n,r,o,i,s,a,u){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=a|0,this.H=u|0}_cloneInto(t){return(t||=new this.constructor).set(...this.get()),this._cloneIntoMeta(t)}process(t,n){for(let c=0;c<16;c++,n+=4)m[c]=t.getUint32(n,!1);for(let c=16;c<64;c++){let p=m[c-15],y=m[c-2],A=x(p,7)^x(p,18)^p>>>3,b=x(y,17)^x(y,19)^y>>>10;m[c]=b+m[c-7]+A+m[c-16]|0}let{A:r,B:o,C:i,D:s,E:a,F:u,G:f,H:l}=this;for(let c=0;c<64;c++){let p=x(a,6)^x(a,11)^x(a,25),y=l+p+he(a,u,f)+Ie[c]+m[c]|0,b=(x(r,2)^x(r,13)^x(r,22))+be(r,o,i)|0;l=f,f=u,u=a,a=s+y|0,s=i,i=o,o=r,r=y+b|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,a=a+this.E|0,u=u+this.F|0,f=f+this.G|0,l=l+this.H|0,this.set(r,o,i,s,a,u,f,l)}roundClean(){J(m)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),J(this.buffer)}},X=class extends Q{constructor(){super(32,ge)}};var pe=le(()=>new X,de(1));var xe=new Map,z=32,ye=new WeakMap,ke=new WeakMap;function Ne(e){return fe(pe(new TextEncoder().encode(String(e))))}var U=e=>Array.isArray(e)?e.map(U):typeof e=="string"||typeof e=="number"?Ne(e):null,L=e=>typeof e=="string"?e.toLowerCase():e;function Ee(e){let t=ye.get(e);return t||(t=new Set(e),ye.set(e,t)),t}function qe(e){let t=ke.get(e);return t||(t=new Set(e.map(L)),ke.set(e,t)),t}function We(e){F(e);for(let t of Object.values(e)){let n=t?.type==="list"||t?.type==="hashed"?t.values:null;n&&n.length>=z&&Ee(n)}return e}function k(e,t,n,r){n=n||{},r||F(n),r=r||new Set;for(let[o,i]of Object.entries(t))switch(o){case"$or":if(!Ae(e,i,n,r))return!1;break;case"$nor":if(Ae(e,i,n,r))return!1;break;case"$and":if(!Ye(e,i,n,r))return!1;break;case"$not":if(k(e,i,n,r))return!1;break;case"$savedGroup":if(!Je(e,i,n,r))return!1;break;default:if(!V(i,ve(e,o),n,!1,r))return!1}return!0}function Je(e,t,n,r){if(!t||typeof t!="object"||Array.isArray(t))return!1;let{id:o,attributeKey:i}=t;if(typeof o!="string"||r.has(o)||i!==void 0&&typeof i!="string")return!1;let s=n[o];if(!s||Array.isArray(s)||typeof s!="object")return!1;let a=new Set(r).add(o);if(s.type==="list"||s.type==="hashed"){let u=i??s.attributeKey;if(typeof u!="string"||!Array.isArray(s.values))return!1;let f=ve(e,u);return E(s.type==="hashed"?U(f):f,s.values)}return s.type==="condition"?!s.condition||typeof s.condition!="object"?!1:k(e,s.condition,n,a):!1}function ve(e,t){let n=t.split("."),r=e;for(let o=0;o<n.length;o++)if(r&&typeof r=="object"&&n[o]in r)r=r[n[o]];else return null;return r}function me(e,t=!1){let n=`${e}${t?"/i":""}`,r=xe.get(n);return r||(r=new RegExp(e.replace(/([^\\])\//g,"$1\\/"),t?"i":void 0),xe.set(n,r)),r}function V(e,t,n,r=!1,o=new Set){if(typeof e=="string")return r?String(t).toLowerCase()===e.toLowerCase():t+""===e;if(typeof e=="number")return t*1===e;if(typeof e=="boolean")return t!==null&&!!t===e;if(e===null)return t===null;if(Array.isArray(e)||!Be(e))return JSON.stringify(t)===JSON.stringify(e);let i=e;for(let s in i)if(!ze(s,t,i[s],n,o))return!1;return!0}function Be(e){let t=Object.keys(e);return t.length>0&&t.filter(n=>n[0]==="$").length===t.length}function Qe(e){if(e===null)return"null";if(Array.isArray(e))return"array";let t=typeof e;return["string","number","boolean","object","undefined"].includes(t)?t:"unknown"}function Xe(e,t,n,r){if(!Array.isArray(e))return!1;let o=Be(t)?i=>V(t,i,n,!1,r):i=>k(i,t,n,r);for(let i=0;i<e.length;i++)if((e[i]??null)!==null&&o(e[i]))return!0;return!1}function E(e,t,n=!1){if(n){let o;if(t.length>=z){let i=qe(t);o=s=>{let a=L(s);return!(typeof a=="number"&&Number.isNaN(a))&&i.has(a)}}else o=i=>t.some(s=>L(i)===L(s));return Array.isArray(e)?e.some(i=>o(i)):o(e)}let r=t.length>=z?(o=>i=>o.has(i))(Ee(t)):o=>t.includes(o);return Array.isArray(e)?e.some(o=>r(o)):r(e)}function we(e){return e===void 0?[]:e&&typeof e=="object"&&(e.type==="list"||e.type==="hashed")&&Array.isArray(e.values)?e.values:null}function Se(e,t,n,r=!1,o=new Set){if(!Array.isArray(e))return!1;for(let i=0;i<t.length;i++){let s=!1;for(let a=0;a<e.length;a++)if(V(t[i],e[a],n,r,o)){s=!0;break}if(!s)return!1}return!0}function ze(e,t,n,r,o=new Set){let i=t,s=n;switch(e){case"$veq":return g(t)===g(n);case"$vne":return g(t)!==g(n);case"$vgt":return g(t)>g(n);case"$vgte":return g(t)>=g(n);case"$vlt":return g(t)<g(n);case"$vlte":return g(t)<=g(n);case"$eq":return t===n;case"$ne":return t!==n;case"$lt":return i<s;case"$lte":return i<=s;case"$gt":return i>s;case"$gte":return i>=s;case"$exists":return n?t!=null:t==null;case"$in":return Array.isArray(n)?E(t,n):!1;case"$ini":return Array.isArray(n)?E(t,n,!0):!1;case"$inGroup":{let a=r[n],u=we(a);return u===null?!1:E(a?.type==="hashed"?U(t):t,u)}case"$notInGroup":{let a=r[n],u=we(a);return u===null?!1:!E(a?.type==="hashed"?U(t):t,u)}case"$nin":return Array.isArray(n)?!E(t,n):!1;case"$nini":return Array.isArray(n)?!E(t,n,!0):!1;case"$not":return!V(n,t,r,!1,o);case"$size":return Array.isArray(t)?V(n,t.length,r,!1,o):!1;case"$elemMatch":return Xe(t,n,r,o);case"$all":return Array.isArray(n)?Se(t,n,r,!1,o):!1;case"$alli":return Array.isArray(n)?Se(t,n,r,!0,o):!1;case"$regex":try{return me(n).test(t)}catch{return!1}case"$regexi":try{return me(n,!0).test(t)}catch{return!1}case"$type":return Qe(t)===n;default:return!1}}function Ae(e,t,n,r){if(!t.length)return!0;for(let o=0;o<t.length;o++)if(k(e,t[o],n,r))return!0;return!1}function Ye(e,t,n,r){for(let o=0;o<t.length;o++)if(!k(e,t[o],n,r))return!1;return!0}function Y(e){return se(e),{context:e,stack:{evaluatedFeatures:new Set}}}function Z(e){return{...e.attributes,...e.attributeOverrides}}function w(e,t,n){let r=t||"id",o="",i=Z(e);return i[r]&&(o=i[r]),!o&&n&&(i[n]&&(o=i[n]),o&&(r=n)),{hashAttribute:r,hashValue:o}}function d(e,t,n){e.context.log?.(t,n)}function _(e,t){return t=t||0,`${e}__${t}`}function ee(e,t){return`${e}||${t}`}function Ze(e,t,n){let r=e.stickyBucketAssignmentDocs;if(!r)return{};let{hashAttribute:o,hashValue:i}=w(e,t),s=ee(o,B(i)),{hashAttribute:a,hashValue:u}=w(e,n),f=u?ee(a,B(u)):null,l={};return f&&r[f]&&Object.assign(l,r[f].assignments||{}),r[s]&&Object.assign(l,r[s].assignments||{}),l}function Re({context:e,expKey:t,expBucketVersion:n,expHashAttribute:r,expFallbackAttribute:o,expMinBucketVersion:i,expMeta:s}){n=n||0,i=i||0,r=r||"id",s=s||[];let a=_(t,n),u=Ze(e,r,o);if(i>0)for(let c=0;c<i;c++){let p=_(t,c);if(u[p]!==void 0)return{variation:-1,versionIsBlocked:!0}}let f=u[a];if(f===void 0)return{variation:-1};let l=s.findIndex(c=>c.key===f);return l<0?{variation:-1}:{variation:l}}function Te(e,t,n,r){let o=ee(t,n),i=e.stickyBucketAssignmentDocs,s=i&&i[o]?i[o].assignments||{}:{},a={...s,...r},u=JSON.stringify(s)!==JSON.stringify(a);return{key:o,doc:{attributeName:t,attributeValue:n,assignments:a},changed:u}}function et(e,t){let n=Y(t),r=Ve(e,null,n);return t.onExperimentEval?.(e,r),r}function tt(e,t){return ne(e,Y(t))}function nt(e){return e.forcedVariations||{}}function Ce(e,t,n){let{context:r}=e;if(r.trackedExperiments){let o=He(t,n);if(r.trackedExperiments.has(o))return;r.trackedExperiments.add(o)}te(()=>r.onExperimentViewed?.(t,n))}function rt(e,t,n){let{context:r}=e;if(r.trackedFeatureUsage){let o=JSON.stringify(n.value);if(r.trackedFeatureUsage[t]===o)return;r.trackedFeatureUsage[t]=o}te(()=>r.onFeatureUsage?.(t,n))}function te(e){try{let t=e();t&&typeof t.catch=="function"&&t.catch(()=>{})}catch{}}function ne(e,t){let{context:n}=t;if(t.stack.evaluatedFeatures.has(e))return d(t,`evalFeature: circular dependency detected: ${t.stack.id} -> ${e}`,{from:t.stack.id,to:e}),S(t,e,null,"cyclicPrerequisite");t.stack.evaluatedFeatures.add(e),t.stack.id=e;let r=n.features?.[e];for(let i of r?.rules??[])N(i);let o=n.forcedFeatureValues;if(o&&o.has(e))return d(t,"Global override",{id:e,value:o.get(e)}),S(t,e,o.get(e),"override");if(!r)return d(t,"Unknown feature",{id:e}),S(t,e,null,"unknownFeature");if(r.rules){let i=new Set(t.stack.evaluatedFeatures);e:for(let s of r.rules){if(s.parentConditions)for(let f of s.parentConditions){t.stack.evaluatedFeatures=new Set(i);let l=ne(f.id,t);if(l.source==="cyclicPrerequisite")return S(t,e,null,"cyclicPrerequisite");let c={value:l.value};if(!k(c,f.condition||{},n.savedGroups||{})){if(f.gate)return d(t,"Feature blocked by prerequisite",{id:e,rule:s}),S(t,e,null,"prerequisite");d(t,"Skip rule because prerequisite evaluation fails",{id:e,rule:s});continue e}}if(s.filters&&$e(s.filters,t)){d(t,"Skip rule because of filters",{id:e,rule:s});continue}if("force"in s){if(s.condition&&!Fe(s.condition,t)){d(t,"Skip rule because of condition ff",{id:e,rule:s});continue}if(!ot(t,s.seed||e,s.hashAttribute,n.saveStickyBucketAssignmentDoc&&!s.disableStickyBucketing?s.fallbackAttribute:void 0,s.range,s.coverage,s.hashVersion)){d(t,"Skip rule because user not included in rollout",{id:e,rule:s});continue}return d(t,"Force value from rule",{id:e,rule:s}),s.tracks&&s.tracks.forEach(f=>{Ce(t,f.experiment,f.result)}),S(t,e,s.force,"force",s.id)}if(!s.variations){d(t,"Skip invalid rule",{id:e,rule:s});continue}let a={variations:s.variations,key:s.key||e};"coverage"in s&&(a.coverage=s.coverage),s.weights&&(a.weights=s.weights),s.hashAttribute&&(a.hashAttribute=s.hashAttribute),s.fallbackAttribute&&(a.fallbackAttribute=s.fallbackAttribute),s.disableStickyBucketing&&(a.disableStickyBucketing=s.disableStickyBucketing),s.bucketVersion!==void 0&&(a.bucketVersion=s.bucketVersion),s.minBucketVersion!==void 0&&(a.minBucketVersion=s.minBucketVersion),s.meta&&(a.meta=s.meta),s.ranges&&(a.ranges=s.ranges),s.name&&(a.name=s.name),s.phase&&(a.phase=s.phase),s.seed&&(a.seed=s.seed),s.hashVersion&&(a.hashVersion=s.hashVersion),s.filters&&(a.filters=s.filters),s.condition&&(a.condition=s.condition);let u=Ve(a,e,t);if(n.onExperimentEval?.(a,u),u.inExperiment&&!u.passthrough)return S(t,e,u.value,"experiment",s.id,a,u)}}return d(t,"Use default value",{id:e,value:r.defaultValue}),S(t,e,r.defaultValue===void 0?null:r.defaultValue,"defaultValue")}function Ve(e,t,n){let{context:r}=n;N(e);let o=e.key,i=e.variations.length;if(i<2)return d(n,"Invalid experiment",{id:o}),h(n,e,-1,!1,t);if(r.enabled===!1)return d(n,"Context disabled",{id:o}),h(n,e,-1,!1,t);if(e.urlPatterns&&!I(r.url||"",e.urlPatterns))return d(n,"Skip because of url targeting",{id:o}),h(n,e,-1,!1,t);let s=K(o,r.url||"",i);if(s!==null)return d(n,"Force via querystring",{id:o,variation:s}),h(n,e,s,!1,t);let a=nt(r);if(o in a){let b=a[o];return d(n,"Force via dev tools",{id:o,variation:b}),h(n,e,b,!1,t)}if(e.active===!1)return d(n,"Skip because inactive",{id:o}),h(n,e,-1,!1,t);let{hashAttribute:u,hashValue:f}=w(r,e.hashAttribute,r.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing?e.fallbackAttribute:void 0);if(!f)return d(n,"Skip because missing hashAttribute",{id:o}),h(n,e,-1,!1,t);let l=-1,c=!1,p=!1;if(r.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing){let{variation:b,versionIsBlocked:v}=Re({context:r,expKey:e.key,expBucketVersion:e.bucketVersion,expHashAttribute:e.hashAttribute,expFallbackAttribute:e.fallbackAttribute,expMinBucketVersion:e.minBucketVersion,expMeta:e.meta});c=b>=0,l=b,p=!!v}if(!c){if(e.filters&&$e(e.filters,n))return d(n,"Skip because of filters",{id:o}),h(n,e,-1,!1,t);if(e.include&&!M(e.include))return d(n,"Skip because of include function",{id:o}),h(n,e,-1,!1,t);if(e.condition&&!Fe(e.condition,n))return d(n,"Skip because of condition exp",{id:o}),h(n,e,-1,!1,t);if(e.parentConditions){let b=new Set(n.stack.evaluatedFeatures);for(let v of e.parentConditions){n.stack.evaluatedFeatures=new Set(b);let R=ne(v.id,n);if(R.source==="cyclicPrerequisite")return h(n,e,-1,!1,t);let D={value:R.value};if(!k(D,v.condition||{},r.savedGroups||{}))return d(n,"Skip because prerequisite evaluation fails",{id:o}),h(n,e,-1,!1,t)}}}let y=T(e.seed||o,f,e.hashVersion??2);if(y===null)return d(n,"Skip because of invalid hash version",{id:o}),h(n,e,-1,!1,t);if(!c){let b=e.ranges||P(i,e.coverage===void 0?1:e.coverage,e.weights);l=G(y,b)}if(p)return d(n,"Skip because sticky bucket version is blocked",{id:o}),h(n,e,-1,!1,t,void 0,!0);if(l<0)return d(n,"Skip because of coverage",{id:o}),h(n,e,-1,!1,t);if("force"in e)return d(n,"Force variation",{id:o,variation:e.force}),h(n,e,e.force===void 0?-1:e.force,!1,t);if(r.qaMode)return d(n,"Skip because QA mode",{id:o}),h(n,e,-1,!1,t);let A=h(n,e,l,!0,t,y,c);if(r.saveStickyBucketAssignmentDoc&&!e.disableStickyBucketing){let{changed:b,key:v,doc:R}=Te(r,u,B(f),{[_(e.key,e.bucketVersion)]:A.key});if(b){r.stickyBucketAssignmentDocs=r.stickyBucketAssignmentDocs||{},r.stickyBucketAssignmentDocs[v]=R;let D=r.saveStickyBucketAssignmentDoc;te(()=>D(R))}}return Ce(n,e,A),d(n,"In experiment",{id:o,variation:A.variationId}),A}function S(e,t,n,r,o,i,s){let a={value:n,on:!!n,off:!n,source:r,ruleId:o||""};return i&&(a.experiment=i),s&&(a.experimentResult=s),r!=="override"&&rt(e,t,a),a}function Fe(e,t){return k(Z(t.context),e,t.context.savedGroups||{})}function $e(e,t){return e.some(n=>{let{hashValue:r}=w(t.context,n.attribute);if(!r)return!0;let o=T(n.seed,r,n.hashVersion||2);return o===null?!0:!n.ranges.some(i=>C(o,i))})}function ot(e,t,n,r,o,i,s){if(!o&&i===void 0)return!0;if(!o&&i===0)return!1;let{hashValue:a}=w(e.context,n,r);if(!a)return!1;let u=T(t,a,s??2);return u===null?!1:o?C(u,o):i!==void 0?u<=i:!0}function h(e,t,n,r,o,i,s){let a=!0;(n<0||n>=t.variations.length)&&(n=0,a=!1);let{hashAttribute:u,hashValue:f}=w(e.context,t.hashAttribute,e.context.saveStickyBucketAssignmentDoc&&!t.disableStickyBucketing?t.fallbackAttribute:void 0),l=t.meta?t.meta[n]:{},c={key:l.key||""+n,featureId:o,inExperiment:a,hashUsed:r,variationId:n,value:t.variations[n],hashAttribute:u,hashValue:f,stickyBucketUsed:!!s};return l.name&&(c.name=l.name),i!==void 0&&(c.bucket=i),l.passthrough&&(c.passthrough=l.passthrough),c}function He(e,t){return t.hashAttribute+t.hashValue+e.key+t.variationId}/*!
|
|
2
|
-
Copyright (c) 2025 GrowthBook, Inc.
|
|
3
|
-
|
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
|
5
|
-
furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all
|
|
8
|
-
copies or substantial portions of the Software.
|
|
9
|
-
|
|
10
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
-
SOFTWARE.
|
|
17
|
-
*/export{K as a,B as b,I as c,We as d,k as e,et as f,tt as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as V}from"./chunk-6X42DWOM.js";import{a}from"./chunk-CRJJ4EA2.js";import{Ag as oe,hf as re}from"./chunk-D37O6FAW.js";import"./chunk-MJG7X7LM.js";function se(b){let n=b.view;if(!n?.paywall)throw new a("INVALID_REQUEST","The current node is not a Paywall");let A=n.paywall.receiptId,M=n.nodeId,f=n.visit,P=n.paywall.resolution,o=n.paywall.quote,p=n.paywall.operation,U=!1,O=n.paywall.purchaseRequestId,I=null,D=new Map,S=new Map;function R(t){let l=t.run.paywall;if(l?.receiptId===A){if(l.resolution.id!==P.id||l.resolution.offering.id!==P.offering.id)throw new a("INVALID_RESPONSE","The pinned Paywall binding changed");P=l.resolution}if(t.purchase&&t.purchase.receiptId!==A)throw new a("INVALID_RESPONSE","Purchase receipt changed");let u=t.purchase??(l?.receiptId===A?l:null),d=u?.quote??o,r=u?.operation??(d?.operationId===o?.operationId?p:null);if(d&&r&&d.operationId!==r.operationId)throw new a("INVALID_RESPONSE","Purchase operation changed");o=d,(p?.operationId!==r?.operationId||p?.status==="pending"||r?.status==="complete")&&(p=r)}async function m(t,l){if(U)throw new a("IDENTITY_CHANGED","Paywall presentation has closed");let u=D.get(t);if(u){if(JSON.stringify(u.input)!==JSON.stringify(l))throw new a("CONFLICT","A purchase request cannot change its input")}else{let y=b.view;if(!y||y.nodeId!==M||y.visit!==f||y.paywall?.receiptId!==A)throw new a("PRECONDITION_FAILED","The Paywall visit has changed");u={operation:"submit",requestId:t,nodeId:M,visit:f,revision:y.revision,input:l},D.set(t,u)}let d=await b.submit(u),r=Date.now()+3e4;for(;d.run.pendingRequest?.requestId===t&&Date.now()<r&&!U;)await new Promise(y=>setTimeout(y,1e3)),d=await b.resume(t);if(d.run.pendingRequest?.requestId===t)throw new a("COMMAND_PENDING","The purchase command is still pending; retry the original request",202);R(d)}async function E(t){if(!o)throw new a("INVALID_REQUEST","A quoted purchase is required");let l=`${t}:${o.operationId}`,u=S.get(l);if(u||(u=crypto.randomUUID(),S.set(l,u)),await m(u,{type:t==="confirm"?"paywall_confirm":"paywall_cancel",operationId:o.operationId}),!p)throw new a("INVALID_RESPONSE","The accepted purchase result is missing");return structuredClone(p)}return{get view(){return structuredClone(P)},get quote(){return o?structuredClone(o):null},get operation(){return p?structuredClone(p):null},get webViewUrl(){return b.webViewUrl},async refresh(){return R(await b.get()),structuredClone(P)},preview(t){if(O&&O!==t.requestId&&(!p||p.status==="pending"))return Promise.reject(new a("COMMAND_PENDING","Retry the original purchase before starting another"));if(O===t.requestId&&I)return I;let l=P.document.buttons[t.actionId],u=l?.type==="checkout"?re(l.product,t.selection,P.capabilities):null;if(!u)return Promise.reject(new a("PRODUCT_UNAVAILABLE","Choose an available Product in this purchase area"));O=t.requestId;let d=(async()=>{if(await m(t.requestId,{type:"paywall_quote",actionId:t.actionId,productVersionId:u,...t.offerId?{offerId:t.offerId}:{},...t.nativeOffer?{nativeOffer:t.nativeOffer}:{}}),!o)throw new a("INVALID_RESPONSE","The accepted quote is missing");return structuredClone(o)})();return I=d,d.then(()=>{I===d&&(I=null)},r=>{I===d&&(I=null),r instanceof a&&r.status!==void 0&&r.status<500&&![401,425].includes(r.status)&&(O=null)}),d},confirm:()=>E("confirm"),cancel:()=>E("cancel"),async read(){if(!o)throw new a("INVALID_REQUEST","A quoted purchase is required");if(R(await b.get(void 0,{receiptId:A,operationId:o.operationId})),!p)throw new a("INVALID_RESPONSE","The current purchase result is missing");return structuredClone(p)},destroy(){U=!0,D.clear(),S.clear()}}}async function ve(b,n){let{mountScreenPreview:A}=await import("./popup.js"),{showPaywall:M}=await import("./paywall-Y3FIG43H.js"),f=b.ownerDocument,P=f.activeElement,o=f.createElement("section"),p=f.createElement("div"),U=f.createElement("div"),O=f.createElement("p"),I=f.createElement("p"),D=f.createElement("button"),S=f.createElement("button"),R=f.createElement("button"),m=f.createElement("dialog");o.dataset.indianaFunnel="",o.setAttribute("aria-busy","false"),o.style.cssText="box-sizing:border-box;width:100%;min-width:0;font:14px/1.5 system-ui,sans-serif;color:#172033;background:#fff",U.style.cssText="display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:12px 20px",O.setAttribute("role","status"),I.setAttribute("role","alert"),I.hidden=!0,D.type=S.type=R.type="button",U.append(D,O,I,R,S),o.append(p,U),b.append(o);let E=null,t=null,l=null,u="",d="",r=!1,y=0,j=!1,ee="",k=null,Y=Promise.resolve(),L=null,$=null,Q={},X=new Map,ne=new Set,z=new Set,W=new Set,_={},x=(e,i=null)=>{r||($=i,I.textContent=e instanceof Error?e.message:"Request failed",I.hidden=!1,R.hidden=n.client.pendingCommand===null,V(n.onError,e))};function T(){let e=n.client.view;if(!e)throw new a("INVALID_REQUEST","No current Run is available");return{requestId:crypto.randomUUID(),nodeId:e.nodeId,visit:e.visit,revision:e.revision}}async function F(e,i=!1){if(!(y&&!i||r)){y++,o.setAttribute("aria-busy","true"),I.hidden=!0,$=null;try{let h=await e();r||await H(n.client.view??h.run)}catch(h){x(h,n.client.pendingCommand?.requestId??null)}finally{y=Math.max(0,y-1),o.setAttribute("aria-busy",String(y>0)),r||(R.hidden=n.client.pendingCommand===null,D.disabled=y>0||!!n.client.pendingCommand||!n.client.view?.canBack)}}}function te(e){if(ne.has(e)||z.has(e)||r)return;z.add(e);let i=async()=>{if(r||u!==e){z.delete(e);return}if(y||n.client.pendingCommand){setTimeout(()=>{i()},250);return}try{await n.client.submit({operation:"shown",...T()}),ne.add(e)}catch(h){x(h)}finally{z.delete(e)}};i()}function Z(){k&&clearTimeout(k),!(r||!l||!["running","waiting"].includes(l.status))&&(k=setTimeout(()=>{k=null,ie().finally(Z)},l.pendingRequest?1500:5e3))}async function ie(){if(!(r||j||y)){j=!0;try{let e=await n.client.get();r||await H(n.client.view??e.run)}catch(e){x(e)}finally{j=!1}}}async function ae(e){let i=n.client.view,h=i?.screen,s=h?.customerData.nodes[e.nodeId];if(!i||!h||!s)return;if(!["refresh","next","previous","filter","sources_next","sources_previous"].includes(e.action)){let C=E?.document,q=C?oe(C,e.nodeId):null,K=q?.type==="customer_data"?q.data.outputs?.[e.action]:void 0;K&&h.outputs.includes(K)?await F(()=>n.client.submit({operation:"submit",...T(),input:{type:"screen",output:K,answers:_,selection:e.value?{[e.nodeId]:e.value}:{}}})):await n.onCustomerDataIntent?.(e,i);return}let c=e.action.startsWith("sources_")?s.resources.find(C=>C.key===e.value):null;if(e.action.startsWith("sources_")&&!c)throw new a("INVALID_REQUEST","Choose a current resource");let N=`${i.visit}:${e.nodeId}:${c?.key??""}`,w=X.get(N)??[null],v=Q[e.nodeId]??{page:1,after:null,filter:"all",...c?{resourceKey:c.key}:{}};if(e.action==="filter"){let C=e.value;if(!C||!["all","purchase","refund","source","usage","debt","settlement"].includes(C))throw new a("INVALID_REQUEST","Unknown data filter");v={page:1,after:null,filter:C},w.splice(0,w.length,null)}else if(e.action==="next"||e.action==="sources_next"){let C=c?.sources.at(-1),q=c?C?{kind:"ledger",cursor:{at:C.detail[0],id:C.id,type:"source"}}:null:h.dataCursors[e.nodeId];if(!q||!c&&!s.hasNext)return;w[v.page]=q,v={...v,page:v.page+1,after:q}}else if(e.action==="previous"||e.action==="sources_previous"){if(v.page<=1)return;v={...v,page:v.page-1,after:w[v.page-2]??null}}X.set(N,w),Q={...Q,[e.nodeId]:v},await F(()=>n.client.get({nodeId:i.nodeId,visit:i.visit,revision:i.revision,components:Q}))}function le(e){let i=e.screen?.presentation;if(!i||i.type==="inline"){m.open&&m.close(),o.parentElement!==b&&b.append(o);return}o.parentElement!==m&&(m.append(o),b.append(m));let h={sm:420,md:640,lg:900};m.style.cssText=`padding:0;border:0;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;width:${"size"in i?h[i.size]+"px":"100vw"}`,m.setAttribute("aria-label",E?.document?.name??(e.screen?.content.type==="document"?e.screen.content.document.name:"Funnel")),m.open||m.showModal()}async function ue(e){if(r)return;l=e,$&&n.client.pendingCommand?.requestId!==$&&(I.hidden=!0,$=null);let i=e.locale.startsWith("zh");if(D.textContent=i?"\u8FD4\u56DE":"Back",S.textContent=i?"\u5173\u95ED":"Close",R.textContent=i?"\u91CD\u8BD5":"Retry",D.disabled=y>0||!!n.client.pendingCommand||!e.canBack,R.hidden=n.client.pendingCommand===null,O.textContent=e.pendingRequest?i?"\u6B63\u5728\u5904\u7406":"Processing":e.instruction?.type==="wait"?i?"\u7B49\u5F85\u4E2D":"Waiting":"",ee!==`${e.revision}:${e.visit}:${e.status}:${e.stopped}`&&(ee=`${e.revision}:${e.visit}:${e.status}:${e.stopped}`,V(n.onState,structuredClone(e))),e.stopped){E?.destroy(),E=null,t?.destroy(),t=null,p.replaceChildren(),u="",d="",m.open&&m.close(),o.hidden=!0,Z();return}o.hidden=!1;let h=e.screen||e.paywall?`${e.id}:${e.nodeId}:${e.visit}`:"";if(h!==u&&(E?.destroy(),E=null,t?.destroy(),t=null,p.replaceChildren(),u=h,d="",_={...e.answers},Q={},X.clear()),le(e),e.screen){let g=e.screen.content;E||(E=A(p,{mode:"live",...g.type==="render"?{screenUrl:de(g.url)}:{rendererUrl:n.client.webViewUrl,title:g.document.name},onAction(w,J={},v={}){_={..._,...v},F(()=>n.client.submit({operation:"submit",...T(),input:{type:"screen",output:w,answers:_,selection:J}}))},onAnswers:w=>{_={..._,...w}},onCustomerDataIntent:w=>{ae(w).catch(x)},onEscape:()=>{B()},onError:w=>x(new Error(w)),onRendered:()=>te(h)}));let c={capabilities:e.screen.capabilities,customerData:e.screen.customerData,parameters:e.parameters,serverInput:{bindings:e.screen.inputs,answers:_}},N=JSON.stringify([g,e.locale,c.capabilities,c.customerData,c.parameters,e.screen.inputs]);N!==d&&(E.update(g.type==="document"?g.document:null,e.locale,c),d=N),await E.ready}else if(e.paywall&&!t){let g=await M(p,{start:async()=>se(n.client),onPurchase:n.onPurchase,onCheckoutUrl:n.onCheckoutUrl,resolveOfferId:n.resolveOfferId,onEvent:n.onEvent,onOpenUrl:c=>n.onOpenUrl?n.onOpenUrl({receiptId:e.paywall.receiptId,url:c,openIn:"same_window"}):f.defaultView?.location.assign(c),onAction:async c=>{let N=await n.client.submit({operation:"submit",requestId:crypto.randomUUID(),nodeId:e.nodeId,visit:e.visit,revision:e.revision,input:{type:"screen",output:c,answers:{}}});await H(n.client.view??N.run)},onError:x,onDismiss:()=>{!r&&n.client.view?.visit===e.visit&&B()}});r?g.host?.destroy():t=g.host,te(h)}let s=e.instruction;if(s&&["open_url","event"].includes(s.type)&&!W.has(s.receiptId)){let g=f.createElement("button");g.type="button",g.textContent=s.type==="open_url"?`${i?"\u524D\u5F80":"Continue to"} ${new URL(s.url).host}`:i?"\u7EE7\u7EED":"Continue",g.onclick=()=>{let c=T(),N=s.type==="open_url"&&!n.onOpenUrl&&s.openIn==="new_window"?ce(s.url):null;F(async()=>{let w="success";if(s.type==="open_url")if(n.onOpenUrl)try{w=await n.onOpenUrl({receiptId:s.receiptId,url:s.url,openIn:s.openIn})===!1?"failed":"opened"}catch(v){V(n.onError,v),w="failed"}else w=s.openIn==="new_window"&&!N?"failed":"opened";if(s.type==="event"){if(!n.onEvent)throw new a("EVENT_HANDLER_REQUIRED","Provide the event handler");await n.onEvent(s.event)}if(r||n.client.view?.nodeId!==c.nodeId||n.client.view.visit!==c.visit)throw new a("PRECONDITION_FAILED","The client action visit changed");let J=await n.client.submit({operation:"submit",...c,input:{type:"client_action",receiptId:s.receiptId,outcome:w}});return W.add(s.receiptId),s.type==="open_url"&&!n.onOpenUrl&&s.openIn==="same_window"&&f.defaultView?.location.assign(s.url),J})},p.replaceChildren(g)}!e.pendingRequest&&e.status==="completed"&&!W.has(`complete:${e.id}`)&&(W.add(`complete:${e.id}`),V(n.onComplete,structuredClone(e))),Z()}function ce(e){let i=f.defaultView?.open(e,"_blank")??null;return i&&(i.opener=null),i}function de(e){return n.client.screenUrl?n.client.screenUrl(e):new URL(e,f.defaultView?.location.href).href}function H(e){return Y=Y.catch(()=>{}).then(()=>ue(e)),Y}let pe=n.client.subscribe(e=>{H(e).catch(x)});function B(){return L||(r?Promise.resolve():n.client.view&&!["running","waiting"].includes(n.client.view.status)?(G(),Promise.resolve()):(L=F(()=>n.client.submit({operation:"close",...T()}),!0).then(()=>{n.client.view?.status==="closed"&&G()}).finally(()=>{L=null}),L))}function G(){r||(r=!0,k&&clearTimeout(k),pe(),E?.destroy(),t?.destroy(),m.close(),m.remove(),o.remove(),P instanceof HTMLElement&&P.isConnected&&P.focus(),V(n.onDismiss,l?structuredClone(l):null))}D.onclick=()=>{F(()=>n.client.submit({operation:"back",...T()}))},S.onclick=()=>{B()},R.onclick=()=>{F(()=>n.client.retry())},m.addEventListener("cancel",e=>{e.preventDefault(),B()});try{let e=await n.client.get();await H(n.client.view??e.run)}catch(e){throw G(),e}return{destroy:G,refresh:ie}}export{ve as showFunnelRun};
|
package/dist/src-RZJKF6LQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$,$a as gb,$b as gc,$c as gd,$d as ge,$e as gf,$f as hg,$g as hh,$h as hi,$i as hj,$j as hk,$k as hl,$l as hm,A,Aa as Ha,Ab as Hb,Ac as Hc,Ad as Hd,Ae as He,Af as If,Ag as Ig,Ah as Ih,Ai as Ii,Aj as Ij,Ak as Ik,Al as Il,B,Ba as Ia,Bb as Ib,Bc as Ic,Bd as Id,Be as Ie,Bf as Jf,Bg as Jg,Bh as Jh,Bi as Ji,Bj as Jj,Bk as Jk,Bl as Jl,C,Ca as Ja,Cb as Jb,Cc as Jc,Cd as Jd,Ce as Je,Cf as Kf,Cg as Kg,Ch as Kh,Ci as Ki,Cj as Kj,Ck as Kk,Cl as Kl,D,Da as Ka,Db as Kb,Dc as Kc,Dd as Kd,De as Ke,Df as Lf,Dg as Lg,Dh as Lh,Di as Li,Dj as Lj,Dk as Lk,Dl as Ll,E,Ea as La,Eb as Lb,Ec as Lc,Ed as Ld,Ee as Le,Ef as Mf,Eg as Mg,Eh as Mh,Ei as Mi,Ej as Mj,Ek as Mk,El as Ml,F,Fa as Ma,Fb as Mb,Fc as Mc,Fd as Md,Fe as Me,Ff as Nf,Fg as Ng,Fh as Nh,Fi as Ni,Fj as Nj,Fk as Nk,Fl as Nl,G,Ga as Na,Gb as Nb,Gc as Nc,Gd as Nd,Ge as Ne,Gf as Of,Gg as Og,Gh as Oh,Gi as Oi,Gj as Oj,Gk as Ok,Gl as Ol,H,Ha as Oa,Hb as Ob,Hc as Oc,Hd as Od,He as Oe,Hf as Pf,Hg as Pg,Hh as Ph,Hi as Pi,Hj as Pj,Hk as Pk,Hl as Pl,I,Ia as Pa,Ib as Pb,Ic as Pc,Id as Pd,Ie as Pe,If as Qf,Ig as Qg,Ih as Qh,Ii as Qi,Ij as Qj,Ik as Qk,Il as Ql,J,Ja as Qa,Jb as Qb,Jc as Qc,Jd as Qd,Je as Qe,Jf as Rf,Jg as Rg,Jh as Rh,Ji as Ri,Jj as Rj,Jk as Rk,Jl as Rl,K,Ka as Ra,Kb as Rb,Kc as Rc,Kd as Rd,Ke as Re,Kf as Sf,Kg as Sg,Kh as Sh,Ki as Si,Kj as Sj,Kk as Sk,Kl as Sl,L,La as Sa,Lb as Sb,Lc as Sc,Ld as Sd,Le as Se,Lf as Tf,Lg as Tg,Lh as Th,Li as Ti,Lj as Tj,Lk as Tk,Ll as Tl,M,Ma as Ta,Mb as Tb,Mc as Tc,Md as Td,Me as Te,Mf as Uf,Mg as Ug,Mh as Uh,Mi as Ui,Mj as Uj,Mk as Uk,Ml as Ul,N,Na as Ua,Nb as Ub,Nc as Uc,Nd as Ud,Ne as Ue,Nf as Vf,Ng as Vg,Nh as Vh,Ni as Vi,Nj as Vj,Nk as Vk,Nl as Vl,O,Oa as Va,Ob as Vb,Oc as Vc,Od as Vd,Oe as Ve,Of as Wf,Og as Wg,Oh as Wh,Oi as Wi,Oj as Wj,Ok as Wk,Ol as Wl,P,Pa as Wa,Pb as Wb,Pc as Wc,Pd as Wd,Pe as We,Pf as Xf,Pg as Xg,Ph as Xh,Pi as Xi,Pj as Xj,Pk as Xk,Pl as Xl,Q,Qa as Xa,Qb as Xb,Qc as Xc,Qd as Xd,Qe as Xe,Qf as Yf,Qg as Yg,Qh as Yh,Qi as Yi,Qj as Yj,Qk as Yk,Ql as Yl,R,Ra as Ya,Rb as Yb,Rc as Yc,Rd as Yd,Re as Ye,Rf as Zf,Rg as Zg,Rh as Zh,Ri as Zi,Rj as Zj,Rk as Zk,Rl as Zl,S,Sa as Za,Sb as Zb,Sc as Zc,Sd as Zd,Se as Ze,Sf as _f,Sg as _g,Sh as _h,Si as _i,Sj as _j,Sk as _k,Sl as _l,T,Ta as _a,Tb as _b,Tc as _c,Td as _d,Te as _e,Tf as $f,Tg as $g,Th as $h,Ti as $i,Tj as $j,Tk as $k,Tl as $l,U,Ua as $a,Ub as $b,Uc as $c,Ud as $d,Ue as $e,Uf as ag,Ug as ah,Uh as ai,Ui as aj,Uj as ak,Uk as al,Ul as am,V,Va as ab,Vb as ac,Vc as ad,Vd as ae,Ve as af,Vf as bg,Vg as bh,Vh as bi,Vi as bj,Vj as bk,Vk as bl,Vl as bm,W,Wa as bb,Wb as bc,Wc as bd,Wd as be,We as bf,Wf as cg,Wg as ch,Wh as ci,Wi as cj,Wj as ck,Wk as cl,Wl as cm,X,Xa as cb,Xb as cc,Xc as cd,Xd as ce,Xe as cf,Xf as dg,Xg as dh,Xh as di,Xi as dj,Xj as dk,Xk as dl,Xl as dm,Y,Ya as db,Yb as dc,Yc as dd,Yd as de,Ye as df,Yf as eg,Yg as eh,Yh as ei,Yi as ej,Yj as ek,Yk as el,Yl as em,Z,Za as eb,Zb as ec,Zc as ed,Zd as ee,Ze as ef,Zf as fg,Zg as fh,Zh as fi,Zi as fj,Zj as fk,Zk as fl,Zl as fm,_,_a as fb,_b as fc,_c as fd,_d as fe,_e as ff,_f as gg,_g as gh,_h as gi,_i as gj,_j as gk,_k as gl,_l as gm,a,aa,ab as hb,ac as hc,ad as hd,ae as he,af as hf,ag as ig,ah as ih,ai as ii,aj as ij,ak as ik,al as il,am as im,b,ba,bb as ib,bc as ic,bd as id,be as ie,bf as jf,bg as jg,bh as jh,bi as ji,bj as jj,bk as jk,bl as jl,bm as jm,c,ca,cb as jb,cc as jc,cd as jd,ce as je,cf as kf,cg as kg,ch as kh,ci as ki,cj as kj,ck as kk,cl as kl,cm as km,d,da,db as kb,dc as kc,dd as kd,de as ke,df as lf,dg as lg,dh as lh,di as li,dj as lj,dk as lk,dl as ll,dm as lm,e,ea,eb as lb,ec as lc,ed as ld,ee as le,ef as mf,eg as mg,eh as mh,ei as mi,ej as mj,ek as mk,el as ml,em as mm,f,fa,fb as mb,fc as mc,fd as md,fe as me,ff as nf,fg as ng,fh as nh,fi as ni,fj as nj,fk as nk,fl as nl,fm as nm,g,ga,gb as nb,gc as nc,gd as nd,ge as ne,gf as of,gg as og,gh as oh,gi as oi,gj as oj,gk as ok,gl as ol,gm as om,h,ha,hb as ob,hc as oc,hd as od,he as oe,hf as pf,hg as pg,hh as ph,hi as pi,hj as pj,hk as pk,hl as pl,hm as pm,i,ia,ib as pb,ic as pc,id as pd,ie as pe,if as qf,ig as qg,ih as qh,ii as qi,ij as qj,ik as qk,il as ql,im as qm,j,ja,jb as qb,jc as qc,jd as qd,je as qe,jf as rf,jg as rg,jh as rh,ji as ri,jj as rj,jk as rk,jl as rl,jm as rm,k,ka,kb as rb,kc as rc,kd as rd,ke as re,kf as sf,kg as sg,kh as sh,ki as si,kj as sj,kk as sk,kl as sl,km as sm,l,la as sa,lb as sb,lc as sc,ld as sd,le as se,lf as tf,lg as tg,lh as th,li as ti,lj as tj,lk as tk,ll as tl,lm as tm,m,ma as ta,mb as tb,mc as tc,md as td,me as te,mf as uf,mg as ug,mh as uh,mi as ui,mj as uj,mk as uk,ml as ul,mm as um,n,na as ua,nb as ub,nc as uc,nd as ud,ne as ue,nf as vf,ng as vg,nh as vh,ni as vi,nj as vj,nk as vk,nl as vl,nm as vm,o,oa as va,ob as vb,oc as vc,od as vd,oe as ve,of as wf,og as wg,oh as wh,oi as wi,oj as wj,ok as wk,ol as wl,om as wm,p,pa as wa,pb as wb,pc as wc,pd as wd,pe as we,pf as xf,pg as xg,ph as xh,pi as xi,pj as xj,pk as xk,pl as xl,pm as xm,q,qa as xa,qb as xb,qc as xc,qd as xd,qe as xe,qf as yf,qg as yg,qh as yh,qi as yi,qj as yj,qk as yk,ql as yl,qm as ym,r,ra as ya,rb as yb,rc as yc,rd as yd,re as ye,rf as zf,rg as zg,rh as zh,ri as zi,rj as zj,rk as zk,rl as zl,rm as zm,s,sa as za,sb as zb,sc as zc,sd as zd,se as ze,sf as Af,sg as Ag,sh as Ah,si as Ai,sj as Aj,sk as Ak,sl as Al,sm as Am,t,ta as Aa,tb as Ab,tc as Ac,td as Ad,te as Ae,tf as Bf,tg as Bg,th as Bh,ti as Bi,tj as Bj,tk as Bk,tl as Bl,tm as Bm,u,ua as Ba,ub as Bb,uc as Bc,ud as Bd,ue as Be,uf as Cf,ug as Cg,uh as Ch,ui as Ci,uj as Cj,uk as Ck,ul as Cl,um as Cm,v,va as Ca,vb as Cb,vc as Cc,vd as Cd,ve as Ce,vf as Df,vg as Dg,vh as Dh,vi as Di,vj as Dj,vk as Dk,vl as Dl,vm as Dm,w,wa as Da,wb as Db,wc as Dc,wd as Dd,we as De,wf as Ef,wg as Eg,wh as Eh,wi as Ei,wj as Ej,wk as Ek,wl as El,x,xa as Ea,xb as Eb,xc as Ec,xd as Ed,xe as Ee,xf as Ff,xg as Fg,xh as Fh,xi as Fi,xj as Fj,xk as Fk,xl as Fl,y,ya as Fa,yb as Fb,yc as Fc,yd as Fd,ye as Fe,yf as Gf,yg as Gg,yh as Gh,yi as Gi,yj as Gj,yk as Gk,yl as Gl,z,za as Ga,zb as Gb,zc as Gc,zd as Gd,ze as Ge,zf as Hf,zg as Hg,zh as Hh,zi as Hi,zj as Hj,zk as Hk,zl as Hl}from"./chunk-D37O6FAW.js";import{a as la,b as ma,c as na,d as oa,e as pa,f as qa,g as ra}from"./chunk-MJG7X7LM.js";export{Oa as COMMON_LOCALES,Qa as COUPON_TERM_LOCALES,Bf as CUSTOMER_DATA_SOURCES,vl as DEFAULT_AUDIENCE_GROUP,Dj as DEFAULT_FUNNEL_EXECUTION_POLICY,Vj as FUNNEL_API_CAPABILITIES,Gi as FUNNEL_LIMITS,Qk as FUNNEL_PREVIEW_LIMITS,Te as OFFERING_MAX_DEPTH,Ve as OFFERING_MAX_ITEMS,Ue as OFFERING_MAX_PRODUCTS,vg as POPUP_WIDTHS,Mf as SCREEN_LIMITS,Ai as SCREEN_RENDER_PATH,Lf as SCREEN_SCHEMA_VERSION,Ji as SCREEN_TEMPLATES,uc as SDK_PROTOCOL_HEADER,wc as SDK_SUPPORT_HEADER,xc as SDK_SUPPORT_POLICY,vc as SDK_VERSION_HEADER,tg as SURFACE_PATHS,tf as SURFACE_VARIABLES,Dc as SdkProtocolError,Hi as UNBOUND_PRODUCT_VERSION_ID,Bc as addSupportMonths,j as aiCreditSystemConfigSchema,eh as aiMarkupSchema,dh as aiModelIdSchema,fh as aiModelRatesSchema,gh as aiPricingConfigurationSchema,ch as aiTokenPools,w as amountToMinor,kc as apiErrorCatalog,lc as apiErrorCodeForStatus,fc as apiErrorCodeSchema,yi as apiOperations,ri as apiPermissionSchema,Pl as appResultsSchema,Ol as appRevenueSchema,Yl as appendScreenTemplate,um as applyGrowthReleasePlan,ij as archiveSurfaceTemplateSchema,yl as audienceCustomerSchema,Hl as audienceFunnelUsageSchema,Il as audienceFunnelUsagesSchema,zl as audienceMembersSchema,Gc as audienceSchema,xl as audienceWriteSchema,ql as auditFieldSchema,tl as auditHistoryCursorSchema,ul as auditHistorySchema,pl as auditResourceSchema,pb as autoTopupPurchaseLimitSchema,Bb as autoTopupStateSchema,Bm as autumnAmountToMinor,el as autumnCustomerAutoTopupSchema,jl as autumnCustomerControlsSchema,ll as autumnCustomerMetadataSchema,il as autumnCustomerOverageAllowedSchema,nl as autumnCustomerProductSummarySchema,ml as autumnCustomerProfileRecordSchema,fl as autumnCustomerSpendLimitSchema,hl as autumnCustomerUsageAlertSchema,gl as autumnCustomerUsageLimitSchema,kl as autumnEntityControlsSchema,Cm as autumnMinorToAmount,Dm as autumnUsageUnitAmountDecimal,Zg as balanceAdjustmentCommandSchema,_g as balanceAdjustmentStateSchema,Xc as balanceAllocationSchema,Uc as balanceCommandSchema,ad as balanceGrantCommandSchema,$c as balanceGrantCreateSchema,dd as balanceGrantPageSchema,cd as balanceGrantReadSchema,bd as balanceGrantSchema,_c as balanceOperationSchema,Vc as balancePricingSegmentSchema,Zc as balanceQuoteSchema,Wc as balanceReceiptUnitsSchema,Yc as balanceRejectionReasonSchema,cm as balanceSourceReasonSchema,$g as balanceSourceStateSchema,dm as balanceSourceStatusSchema,fm as balanceSourcesPageSchema,em as balanceSourcesQuerySchema,ib as billingAccruedMinorSchema,hb as billingAmountMinorSchema,sb as billingAuthorizationSchema,rb as billingAuthorizationTermsSchema,jb as billingBudgetMinorSchema,Cb as billingControlInputSchema,Db as billingControlsSchema,Lb as billingCouponsSchema,z as billingCurrencies,Eb as billingInvoiceLineSchema,Fb as billingInvoiceSchema,Ib as billingInvoicesSchema,wb as billingLimitSchema,ej as billingPortalInputSchema,fj as billingPortalSchema,D as billingSettingsMutationSchema,B as billingSettingsSchema,C as billingSettingsScopeSchema,Ab as billingUsageWindowSchema,_f as borderSchema,eg as buttonNodeSchema,Jc as campaignInputSchema,Hc as campaignOfferSchema,Kc as campaignSchema,Ma as canonicalLocale,uf as capabilityBindingSchema,nb as cashPriceSchema,lb as cashPricingSchema,kb as cashPricingTiersSchema,gb as cashUnitAmountMinorSchema,Hh as claimRewardProductRequestSchema,Fd as commerceAccessSchema,Ke as commerceContextSchema,xe as commerceCursorSchema,ye as commerceListQuerySchema,Gd as commerceMoneySchema,_l as commerceProductKind,Ed as commerceProductKindSchema,Dd as commerceProviderSchema,Da as compileGrowthFeatures,Gb as confirmBillingAdjustmentInputSchema,ub as confirmBillingAuthorizationInputSchema,hc as consoleErrorCodeSchema,sc as consoleErrorResponseSchema,ym as consoleHasPermission,he as consoleRefundRequestSchema,wm as consoleResources,xm as consoleRolePermissions,vm as consoleRoleSchema,lg as countdownNodeSchema,Xa as couponAppliesToSchema,ab as couponChangeErrors,kg as couponCodeNodeSchema,Va as couponDiscountSchema,Al as couponDisplaySchema,Oi as couponDistributionBatchSchema,Qi as couponDistributionDetailSchema,Ni as couponDistributionPreviewSchema,Pi as couponDistributionRecipientSchema,Ri as couponDistributionWriteSchema,Wa as couponDurationSchema,Ya as couponEligibilitySchema,Za as couponInputSchema,Ua as couponStatusSchema,dl as couponTemplateExample,bl as couponTemplateKey,db as couponWindow,Dl as createAccountOverviewPage,Cl as createCreditCenterPage,Fl as createCustomerPageTemplates,ui as createCustomerRequestSchema,vi as createCustomerResponseSchema,El as createMembershipPage,Jh as createReferralCodeRequestSchema,F as creditAmountSchema,jh as creditAnalyticsFilterSchema,lh as creditAnalyticsPageSchema,kh as creditAnalyticsQuerySchema,hh as creditAnalyticsRangeSchema,ih as creditAnalyticsTimezoneSchema,L as creditDimensionSchema,M as creditMultiplierSchema,H as creditPriceAdjustmentSchema,N as creditPricingSchema,J as creditPropertiesSchema,G as creditQuantitySchema,O as creditRateSchema,Nb as creditResetCountSchema,Mb as creditResetSchema,I as creditResourceKeySchema,Ob as creditRolloverSchema,c as creditSchemaItemSchema,hd as creditStatementInputSchema,id as creditStatementSchema,i as creditSystemConfigSchema,K as creditTiersSchema,t as currencies,A as currencyAmountOptionsSchema,v as currencyDecimals,u as currencySchema,zi as currentApiOperations,jd as currentNotificationEventTypeSchema,ig as customHtmlNodeSchema,ka as customerActivitySchema,Sh as customerAttributesSchema,wl as customerAudienceSchema,Df as customerDataConfigSchema,Gf as customerDataIntentSchema,gg as customerDataNodeSchema,Yh as customerDataReferenceMessage,Xh as customerDataReferenced,Wh as customerDataSchema,Cf as customerDataSourceSchema,xi as customerEntitlementsSchema,di as customerFiltersSchema,Th as customerFingerprintSchema,Ql as customerFunnelDecisionsSchema,bi as customerGetSchema,rd as customerHoldingsSchema,Uh as customerInputSchema,vd as customerLedgerEntrySchema,wd as customerLedgerPageSchema,ud as customerLedgerQuerySchema,$h as customerLookupSchema,_h as customerMutationSchema,Ff as customerPageDataSchema,Ef as customerPageNodeStateSchema,ol as customerPageSampleData,ei as customerPageSchema,ai as customerPatchSchema,dc as customerPlanCreateSchema,ec as customerPlanCreatedSchema,ja as customerPlanSchema,Zh as customerProfileSchema,Vh as customerReferenceSchema,dj as customerScheduledChangeCancelSchema,bj as customerScheduledChangeSchema,cj as customerScheduledChangesSchema,Lc as customerSchema,Rh as customerTagsSchema,ci as customerUpdateRequestSchema,Ii as defaultScreenTheme,bb as describeCoupon,Zb as diffProductVariant,fg as dividerNodeSchema,Hf as emptyCustomerPageNode,Me as entitlementCheckInputSchema,Ne as entitlementCheckReasonSchema,Pe as entitlementCheckResultSchema,Le as entitlementRequirementSchema,ga as entitlementSnapshotSchema,wi as entitlementStatusSchema,X as environmentSchema,Bd as environmentSettingsSchema,nc as errorCodeMatchesStatus,tc as errorMetadata,pc as errorMetadataSchema,mc as errorPolicy,jc as errorReasonSchema,ic as errorRecoverySchema,qc as errorResponseSchema,Jf as escapeHtmlText,pa as evalCondition,ra as evalFeature,mi as evaluateFeaturesRequestSchema,oi as evaluateFeaturesResultSchema,Fk as executionSourceSchema,Ca as experimentConfigurationSchema,Ba as experimentPhaseSchema,Ga as experimentSnapshotSchema,n as featureCollectionSchema,g as featureConfigOverrideSchema,k as featureDefinitionSchema,li as featureDeliveryPayloadSchema,a as featureIdSchema,$ as featureInputSchema,f as featureMarkupsOverrideSchema,o as featureOptionsSchema,ki as featurePayloadSchema,m as featureRecordSchema,aa as featureSchema,zm as featureTypes,Am as featureUpdateBlockers,l as featureUpdateRulesSchema,nd as featureUsageReadSchema,od as featureUsageSetSchema,pd as featureUsageStateSchema,b as featureUsageTypeSchema,p as featureWriteSchema,Bg as fieldValue,Yf as fillSchema,qd as financialAmountSchema,td as financialCursorSchema,sd as financialEntryTypeSchema,Ig as findDocumentNode,Hg as findNode,al as formatCouponConditions,Sa as formatCouponDiscount,Ra as formatCouponMoney,Ta as formatCouponTerms,y as formatCurrencyMinor,bm as formatProductBillingPeriod,cb as formatUsd,Wj as funnelApiBindingSchema,Tj as funnelApiProjectionSchema,Kk as funnelCampaignCommandSchema,Lk as funnelCampaignStartResponseSchema,Xj as funnelCapabilitySchema,Ak as funnelCollectionSchema,wk as funnelCommandSchema,Nk as funnelConfigurationSchema,gk as funnelConsumedVariables,Ik as funnelCredentialCommandSchema,Jk as funnelCredentialResponseSchema,vk as funnelDataQueriesSchema,Nj as funnelDecideShape,Oj as funnelDecisionCommandSchema,Lj as funnelDecisionOutputSchema,Pj as funnelDecisionResponseSchema,Mj as funnelDecisionSchema,Qj as funnelDecisionUsedResponseSchema,qk as funnelDocumentDraftSchema,sk as funnelDocumentSchema,kj as funnelEvaluationAttributes,yk as funnelEvaluationModeSchema,Cj as funnelExecutionPolicySchema,mk as funnelExecutionStateSchema,Zj as funnelExternalPageUrlSchema,Bj as funnelExternalTaskSchema,ak as funnelGraphDraftSchema,$j as funnelGraphNodeSchema,bk as funnelGraphSchema,ck as funnelGraphTargets,Gl as funnelGroupReferenceSchema,Ek as funnelInstructionSchema,kk as funnelNodeInputSchema,ik as funnelNodeKindSchema,lk as funnelNodeResultSchema,_j as funnelOpenInSchema,Hj as funnelOrchestrationCommandSchema,qj as funnelParametersFromUrl,uk as funnelPresentationSubmissionSchema,Rk as funnelPreviewCommandSchema,Uk as funnelPreviewDependencySchema,Vk as funnelPreviewJournalSchema,Sk as funnelPreviewOutcomeSchema,Xk as funnelPreviewRequestSchema,Yk as funnelPreviewResponseSchema,Tk as funnelPreviewScenarioSchema,_k as funnelPreviewShareWriteSchema,Zk as funnelPreviewSnapshotSchema,Wk as funnelPreviewSourceSchema,Rj as funnelProjectionFilterValueSchema,Sj as funnelProjectionWhereSchema,rk as funnelPublishableDraftSchema,zk as funnelRecordSchema,jk as funnelResourceReferenceSchema,Jl as funnelResultsCursorSchema,Kl as funnelResultsQuerySchema,Kj as funnelResultsResponseSchema,Ll as funnelResultsSchema,Gk as funnelRunViewSchema,Hk as funnelRuntimeResponseSchema,Dk as funnelRuntimeStatusSchema,Ij as funnelSignalResponseSchema,$k as funnelStatisticsSchema,Aj as funnelTaskBindingSchema,yj as funnelTaskDataSchema,zj as funnelTaskOutputsSchema,Ej as funnelTaskResponseSchema,Jj as funnelTaskResultsSchema,Xl as funnelTemplateDraft,Vl as funnelTemplateSchema,Ok as funnelTopology,Mk as funnelTopologySchema,nk as funnelTraceEventSchema,uj as funnelValueBindingSchema,pk as funnelValueDeclarationSchema,tk as funnelValueMatches,tj as funnelValuePathSchema,jj as funnelValueSchema,hk as funnelWaitKindSchema,Bk as funnelWriteSchema,gi as gbRuntimeExperimentResultSchema,fi as gbRuntimeExperimentSchema,hi as gbRuntimeFeatureRuleSchema,ii as gbRuntimeFeatureSchema,ji as gbRuntimeSavedGroupsSchema,la as getQueryStringOverride,tm as getRecommendedRolloutData,lm as growthAttributeSchema,ta as growthAttributesSchema,nm as growthCatalogSchema,wa as growthConditionGroupIds,mj as growthConditionPaths,ua as growthConditionSchema,pm as growthDryRunSchema,qm as growthExperimentInspectionSchema,Ea as growthExperimentStop,Fa as growthFeatureExpiry,ya as growthFeatureRuleSchema,za as growthFeatureSchema,Aa as growthFeaturesSchema,rm as growthGroupReferenceCursorSchema,sm as growthGroupReferencesSchema,va as growthGroupSchema,mm as growthNamespaceSchema,om as growthResourceWriteSchema,Ja as growthRuleContextSchema,xa as growthSavedGroupsSchema,Ha as growthSnapshotSchema,Ka as growthSplitResultSchema,If as htmlVariableErrors,Of as identifierSchema,dg as imageNodeSchema,Xf as imagePositionSchema,Vf as insetsSchema,ed as invoiceDetailInputSchema,gd as invoiceDetailSchema,fd as invoiceProductItemSchema,ge as invoiceRefundsSchema,ob as isInvoiceCreditPrice,qf as isProductGroup,Zl as isRecurringMembership,Jg as isRtlLocale,Ac as isStableSdkProtocol,na as isURLTargeted,mb as itemBillingCycleSchema,sa as jsonValueSchema,E as licenseOfferSchema,Hb as listBillingInvoicesInputSchema,Pa as localeLabel,La as localeSchema,Cg as localeStatuses,Gg as localizeScreen,yb as manageBillingLimitsInputSchema,xb as manageOveragePolicyInputSchema,gc as managementErrorCodeSchema,rc as managementErrorResponseSchema,Wf as marginSchema,Na as matchLocale,lj as matchesGrowthCondition,T as membershipActionSchema,$l as membershipBillingCount,U as membershipChangeSchema,V as membershipHoldingSchema,R as membershipRulesSchema,W as membershipStateSchema,S as membershipTimingSchema,rl as mergeAuditSchema,_ as metadataSchema,h as meteredConfigSchema,x as minorToAmount,e as modelMarkupsSchema,Sl as nativeCompletionSchema,Hd as nativeCouponStoreOfferLinkWriteSchema,Id as nativeCouponStoreOfferLinksSchema,Qc as nativeProductBindingSchema,Sc as nativeProductBindingWriteSchema,Rc as nativeProductBindingsPageSchema,Rl as nativeProofSchema,Nd as nativePurchaseInstructionSchema,Tl as nativeReceiptCommandSchema,Ul as nativeReceiptResponseSchema,Ie as nativeRestoreCommandSchema,Je as nativeRestoreResultSchema,Ld as nativeStoreOfferForProduct,Jd as nativeStoreOfferSelectionSchema,Kd as nativeStoreOfferSelectionsSchema,Md as nativeStoreSelectionMatches,_d as nativeSubscriptionUpdatePreviewSchema,$d as nativeSubscriptionUpdateResultSchema,Mi as newBlankSurface,$a as newCouponInput,Ck as newFunnelDocument,Ki as newScreenFromTemplate,Li as newSurfaceFromTemplate,Nf as nodeIdSchema,sl as objectAuditSchema,Ml as offerFlowInputSchema,Nl as offerFlowResultSchema,eb as offerSchema,fb as offerUnavailableReasonSchema,$e as offeringAuthorSchema,df as offeringCollectionSchema,_e as offeringDocumentSchema,We as offeringItemSchema,Xe as offeringItemsSchema,Se as offeringMetadataSchema,af as offeringProductEvidenceSchema,Re as offeringProductIdSchema,Ye as offeringProductIds,hf as offeringProductOptionSchema,Ze as offeringProductPaths,kf as offeringPublicationIssues,bf as offeringRecordSchema,gf as offeringSelectorSchema,lf as offeringValueSchema,cf as offeringVersionSchema,jf as offeringWorkspaceSchema,ff as offeringWriteResultSchema,ef as offeringWriteSchema,Tc as overageBehaviorSchema,zb as overagePolicySchema,ok as ownedFunnelScreenSchema,im as pageExperimentEventSchema,jm as pageExperimentEventsRequestSchema,km as pageExperimentEventsResponseSchema,hm as pageExperimentPayloadSchema,gm as pageExperimentSchema,Tf as paintColorSchema,oc as parseRetryAfter,Ei as parseScreenRenderPath,re as paymentSetupCommandSchema,se as paymentSetupReadSchema,ue as paymentSetupSchema,Oe as paywallCandidateSchema,Ng as paywallClientActionSchema,Tg as paywallCollectionSchema,Og as paywallDocumentDraftSchema,Pg as paywallDocumentSchema,Rg as paywallFlowIssues,Wg as paywallLibrarySchema,Qg as paywallProductIssues,of as paywallProductsSchema,Sg as paywallRecordSchema,Qe as paywallRequestSchema,Yg as paywallResolutionSchema,Xg as paywallResolveInputSchema,Ug as paywallSummarySchema,Vg as paywallWriteSchema,da as planConfigSchema,ea as planInputSchema,ca as planItemSchema,mg as planPickerNodeSchema,fa as planSchema,ha as planVersionSchema,Ic as popupSchema,cc as prepaidAllowanceAmount,r as prepaidPriceAmount,s as prepaidQuantityAmount,Mc as prepaidQuantitySchema,q as prepaidTierPricingSchema,qb as prepareBillingAuthorizationInputSchema,cl as prepareCouponTemplate,oa as prepareSavedGroups,tb as preparedBillingAuthorizationSchema,ug as presentationSchema,jg as priceNodeSchema,ba as priceSchema,Rb as productAllowanceSchema,Nc as productBindingSchema,Pc as productBindingWriteSchema,Oc as productBindingsPageSchema,ac as productCollectionSchema,Ub as productConfigurationSchema,Xb as productDefinitionSchema,bc as productEditorOptionsSchema,nf as productGroupingMatches,mf as productGroupingSchema,Tb as productLicenseSchema,Si as productMigrationBlockReasonSchema,Zi as productMigrationDetailSchema,Ti as productMigrationErrorCodeSchema,Yi as productMigrationItemSchema,Wi as productMigrationItemStatusSchema,_i as productMigrationListSchema,Ui as productMigrationPreviewSchema,aj as productMigrationQuerySchema,Vi as productMigrationRunStatusSchema,Xi as productMigrationSchema,$i as productMigrationWriteSchema,_b as productOptionsSchema,Qb as productPrepaidPriceSchema,Pb as productPricesSchema,$b as productRecordSchema,Lg as productSelectionSchema,Sb as productTrialSchema,Vb as productVariantOverridesSchema,Wb as productVariantSchema,Uj as projectFunnelApiOutputs,Pk as projectFunnelConfiguration,Ad as projectSettingsSchema,_a as promotionCodeInputSchema,zc as protocolForSdkVersion,d as providerMarkupsSchema,Dg as publishChecks,Ae as purchaseListItemSchema,Ge as purchaseListPageSchema,Qf as radiusSchema,vj as readFunnelValuePath,Gh as redeemRewardRequestSchema,Kh as referralCodeSchema,Mh as referralProgramCollectionSchema,zh as referralProgramInputSchema,Bh as referralProgramRecordSchema,Eh as referralProgramWriteSchema,ni as remoteFeatureResultSchema,xg as replaceFirstPageRoot,Bl as resolveCouponDisplay,Yj as resolveFunnelCapabilityInputs,Gj as resolveFunnelTaskInputs,wj as resolveFunnelValueBinding,xj as resolveFunnelValueBindings,Yb as resolveProductVariant,Fg as resolveScreenLocale,Ec as resolveSdkProtocol,ti as responseMetaSchema,vb as revokeBillingAuthorizationInputSchema,Oh as rewardActivityRedemptionSchema,Ph as rewardActivitySchema,yh as rewardCodeInputSchema,Nh as rewardCodeSchema,Qh as rewardCodeWriteSchema,Lh as rewardCollectionSchema,vh as rewardConfigurationSchema,th as rewardGrantExpirySchema,uh as rewardGrantSchema,xh as rewardInputSchema,wh as rewardKeySchema,Ch as rewardOptionSchema,Ih as rewardProductCheckoutSchema,Ah as rewardRecordSchema,Fh as rewardRedemptionSchema,sh as rewardStatusSchema,rh as rewardTypeSchema,Dh as rewardWriteSchema,qa as runExperiment,am as sameMembershipBillingCycle,hj as saveSurfaceTemplateSchema,Y as scopeSchema,qg as screenActionSchema,oj as screenAnswersSchema,nj as screenDataCursorSchema,yg as screenDocumentSchema,Rf as screenImageSourceSchema,rj as screenInputBindingsSchema,pg as screenNodeSchema,pj as screenParametersSchema,Mg as screenPresentationSchema,rf as screenProductScopes,sf as screenProductSelections,Di as screenRenderPath,Bi as screenRenderPathSchema,Fi as screenRenderTags,Ci as screenRenderUrlSchema,sj as screenRendererInputSchema,Kg as screenSelections,rg as screenStringsSchema,yc as sdkProtocolRegistry,Fc as sdkProtocolResponseHeaders,yd as seatCommandSchema,xd as seatReadSchema,zd as seatsStateSchema,ek as selectFunnelCondition,pf as selectedPaywallProduct,Af as selectedSurfaceValue,Eg as servableLocales,Kb as setBillingCouponsInputSchema,$f as shadowSchema,Zf as shapeSchema,Uf as sizeSchema,Pf as spaceSchema,hg as spacerNodeSchema,Z as stableKeySchema,ng as stackInteractionSchema,og as stackNodeSchema,Ia as stickyAssignmentDocumentSchema,Rd as stripeAppendContextSchema,Qd as stripeCouponTermsSchema,Sd as stripePurchaseExecutionSchema,de as stripeRefundExecutionSchema,te as stripeSetupExecutionSchema,Xd as stripeSubscriptionUpdateExecutionSchema,Yd as stripeSubscriptionUpdatePreviewSchema,Zd as stripeSubscriptionUpdateResultSchema,oe as stripeTrialExecutionSchema,bg as styleSchema,Od as subscriptionAttachCommandSchema,Td as subscriptionAttachQuoteSchema,ie as subscriptionBatchCommandSchema,ke as subscriptionBatchGroupSchema,je as subscriptionBatchReadSchema,le as subscriptionBatchSchema,Vd as subscriptionCarryOptionsSchema,He as subscriptionConflictPageSchema,Ce as subscriptionConflictQuerySchema,Ee as subscriptionConflictRetryResultSchema,De as subscriptionConflictRetrySchema,Be as subscriptionConflictSchema,Jb as subscriptionCouponExecutionSchema,ze as subscriptionListItemSchema,Fe as subscriptionListPageSchema,Pd as subscriptionOperationInputSchema,Ud as subscriptionOperationSchema,ce as subscriptionRefundCommandSchema,ee as subscriptionRefundPreviewSchema,fe as subscriptionRefundResultSchema,me as subscriptionTrialCommandSchema,qe as subscriptionTrialPolicySchema,ne as subscriptionTrialReadSchema,pe as subscriptionTrialResultSchema,Wd as subscriptionUpdateCommandSchema,ae as subscriptionUpdatePreviewSchema,be as subscriptionUpdateResultSchema,ve as subscriptionVerificationInputSchema,we as subscriptionVerificationSchema,Kf as substituteHtmlVariables,zf as substituteSurfaceVariables,wf as surfaceDataSchema,sg as surfaceSchema,gj as surfaceTemplateSchema,vf as surfaceValueSchema,xf as surfaceVariableNames,Wl as templateScreen,cg as textNodeSchema,ag as textStyleSchema,Sf as themeSchema,ma as toAttributeString,pi as trackEventsRequestSchema,qi as trackEventsResultSchema,fk as transitionFunnelGraph,Ag as translatableFields,P as trialPolicySchema,Q as trialRecordSchema,yf as unknownSurfaceVariables,ld as usageAlertNotificationDataSchema,md as usageAllowanceNotificationDataSchema,nh as usageAnalyticsPageSchema,mh as usageAnalyticsQuerySchema,qh as usageBatchPageSchema,ph as usageBatchReadSchema,oh as usageBatchSubmitSchema,ah as usageEntityCommandSchema,bh as usageEntitySchema,kd as usageLimitNotificationDataSchema,dk as validateFunnelGraph,Fj as validateFunnelTaskData,xk as validateScreenAnswers,Cc as validateSdkProtocolRegistry,ia as validitySchema,si as verifiedPrincipalSchema,wg as walkDocument,zg as walkScreen,Cd as workspaceSettingsSchema};
|