@sequenzy/cli 0.0.87 → 0.0.88
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/dist/index.js +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -346,7 +346,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
346
346
|
<%s {...props} />
|
|
347
347
|
React keys must be passed directly to JSX without using spread:
|
|
348
348
|
let props = %s;
|
|
349
|
-
<%s key={someKey} {...props} />`,w0,bA,eA,bA),EA[bA+w0]=!0)}if(bA=null,o!==void 0&&(E(o),bA=""+o),D(y0)&&(E(y0.key),bA=""+y0.key),"key"in y0){o={};for(var rx in y0)rx!=="key"&&(o[rx]=y0[rx])}else o=y0;return bA&&I(o,typeof P0==="function"?P0.displayName||P0.name||"Unknown":P0),K(P0,bA,o,B(),zA,a0)}function M(P0){W(P0)?P0._store&&(P0._store.validated=1):typeof P0==="object"&&P0!==null&&P0.$$typeof===ZA&&(P0._payload.status==="fulfilled"?W(P0._payload.value)&&P0._payload.value._store&&(P0._payload.value._store.validated=1):P0._store&&(P0._store.validated=1))}function W(P0){return typeof P0==="object"&&P0!==null&&P0.$$typeof===R}var R=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),Q0=Symbol.for("react.profiler"),M0=Symbol.for("react.consumer"),C0=Symbol.for("react.context"),H0=Symbol.for("react.forward_ref"),K0=Symbol.for("react.suspense"),n0=Symbol.for("react.suspense_list"),V0=Symbol.for("react.memo"),ZA=Symbol.for("react.lazy"),O0=Symbol.for("react.activity"),XA=Symbol.for("react.client.reference"),nx=cF.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,tA=Object.prototype.hasOwnProperty,HA=Array.isArray,u0=console.createTask?console.createTask:function(){return null};cF={react_stack_bottom_frame:function(P0){return P0()}};var $0,e0={},N0=cF.react_stack_bottom_frame.bind(cF,Q)(),qA=u0(g(Q)),EA={};Zo0.Fragment=u,Zo0.jsxDEV=function(P0,y0,o,w0){var zA=1e4>nx.recentlyCreatedOwnerStacks++;return X(P0,y0,o,w0,zA?Error("react-stack-top-frame"):N0,zA?u0(g(P0)):qA)}})()});var $m=kx(Km(),1),{program:NxA,createCommand:VxA,createArgument:vxA,createOption:uxA,CommanderError:TxA,InvalidArgumentError:hxA,InvalidOptionArgumentError:bxA,Command:Hm,Argument:kxA,Option:ixA,Help:mxA}=$m.default;var ym={name:"@sequenzy/cli",version:"0.0.87",description:"Sequenzy CLI for email marketing from the terminal",type:"module",bin:{sequenzy:"./dist/index.js"},main:"./src/index.tsx",types:"./src/index.tsx",exports:{".":"./src/index.tsx"},scripts:{dev:"bun --watch src/index.tsx",build:"bun build src/index.tsx --outdir dist --target node --minify --define 'process.env.DEV=false'",start:"node dist/index.js","type-check":"tsc --noEmit",test:"bun test","test:watch":"bun test --watch",prepublishOnly:"bun run build"},dependencies:{commander:"^12.1.0",ink:"^5.0.1","ink-spinner":"^5.0.0","ink-text-input":"^6.0.0","ink-select-input":"^6.0.0","ink-table":"^3.1.0",open:"^10.1.0",react:"^18.3.1",conf:"^13.0.0"},devDependencies:{"@emailer/shared":"workspace:*","@types/bun":"latest","@types/node":"^22.0.0","@types/react":"^18.3.0","bun-types":"latest",typescript:"^7.0.2"},files:["dist"],keywords:["sequenzy","email","cli","marketing"],license:"MIT",repository:{type:"git",url:"https://github.com/sequenzy/sequenzy"}};import{isDeepStrictEqual as YX0}from"node:util";import ld from"node:process";import oC from"node:fs";import dd from"node:path";import lK from"node:crypto";import XX0 from"node:assert";var mC=(A)=>{let x=typeof A;return A!==null&&(x==="object"||x==="function")};var zz=new Set(["__proto__","prototype","constructor"]),qC0=new Set("0123456789");function OY(A){let x=[],E="",g="start",B=!1;for(let Q of A)switch(Q){case"\\":{if(g==="index")throw Error("Invalid character in an index");if(g==="indexEnd")throw Error("Invalid character after an index");if(B)E+=Q;g="property",B=!B;break}case".":{if(g==="index")throw Error("Invalid character in an index");if(g==="indexEnd"){g="property";break}if(B){B=!1,E+=Q;break}if(zz.has(E))return[];x.push(E),E="",g="property";break}case"[":{if(g==="index")throw Error("Invalid character in an index");if(g==="indexEnd"){g="index";break}if(B){B=!1,E+=Q;break}if(g==="property"){if(zz.has(E))return[];x.push(E),E=""}g="index";break}case"]":{if(g==="index"){x.push(Number.parseInt(E,10)),E="",g="indexEnd";break}if(g==="indexEnd")throw Error("Invalid character after an index")}default:{if(g==="index"&&!qC0.has(Q))throw Error("Invalid character in an index");if(g==="indexEnd")throw Error("Invalid character after an index");if(g==="start")g="property";if(B)B=!1,E+="\\";E+=Q}}if(B)E+="\\";switch(g){case"property":{if(zz.has(E))return[];x.push(E);break}case"index":throw Error("Index was not closed");case"start":{x.push("");break}}return x}function Sz(A,x){if(typeof x!=="number"&&Array.isArray(A)){let E=Number.parseInt(x,10);return Number.isInteger(E)&&A[E]===A[x]}return!1}function qm(A,x){if(Sz(A,x))throw Error("Cannot use string index")}function Ym(A,x,E){if(!mC(A)||typeof x!=="string")return E===void 0?A:E;let g=OY(x);if(g.length===0)return E;for(let B=0;B<g.length;B++){let Q=g[B];if(Sz(A,Q))A=B===g.length-1?void 0:null;else A=A[Q];if(A===void 0||A===null){if(B!==g.length-1)return E;break}}return A===void 0?E:A}function Lz(A,x,E){if(!mC(A)||typeof x!=="string")return A;let g=A,B=OY(x);for(let Q=0;Q<B.length;Q++){let D=B[Q];if(qm(A,D),Q===B.length-1)A[D]=E;else if(!mC(A[D]))A[D]=typeof B[Q+1]==="number"?[]:{};A=A[D]}return g}function Xm(A,x){if(!mC(A)||typeof x!=="string")return!1;let E=OY(x);for(let g=0;g<E.length;g++){let B=E[g];if(qm(A,B),g===E.length-1)return delete A[B],!0;if(A=A[B],!mC(A))return!1}}function Um(A,x){if(!mC(A)||typeof x!=="string")return!1;let E=OY(x);if(E.length===0)return!1;for(let g of E){if(!mC(A)||!(g in A)||Sz(A,g))return!1;A=A[g]}return!0}import lB from"node:path";import Zm from"node:os";import Oz from"node:process";var hQ=Zm.homedir(),Pz=Zm.tmpdir(),{env:V3}=Oz,YC0=(A)=>{let x=lB.join(hQ,"Library");return{data:lB.join(x,"Application Support",A),config:lB.join(x,"Preferences",A),cache:lB.join(x,"Caches",A),log:lB.join(x,"Logs",A),temp:lB.join(Pz,A)}},XC0=(A)=>{let x=V3.APPDATA||lB.join(hQ,"AppData","Roaming"),E=V3.LOCALAPPDATA||lB.join(hQ,"AppData","Local");return{data:lB.join(E,A,"Data"),config:lB.join(x,A,"Config"),cache:lB.join(E,A,"Cache"),log:lB.join(E,A,"Log"),temp:lB.join(Pz,A)}},UC0=(A)=>{let x=lB.basename(hQ);return{data:lB.join(V3.XDG_DATA_HOME||lB.join(hQ,".local","share"),A),config:lB.join(V3.XDG_CONFIG_HOME||lB.join(hQ,".config"),A),cache:lB.join(V3.XDG_CACHE_HOME||lB.join(hQ,".cache"),A),log:lB.join(V3.XDG_STATE_HOME||lB.join(hQ,".local","state"),A),temp:lB.join(Pz,x,A)}};function jz(A,{suffix:x="nodejs"}={}){if(typeof A!=="string")throw TypeError(`Expected a string, got ${typeof A}`);if(x)A+=`-${x}`;if(Oz.platform==="darwin")return YC0(A);if(Oz.platform==="win32")return XC0(A);return UC0(A)}import LC0 from"node:path";import q8 from"node:fs";import{promisify as c6}from"node:util";var ZC0=(A,x)=>{let{onError:E}=x;return function(...B){return A.apply(void 0,B).catch(E)}},T2=ZC0;var GC0=(A,x)=>{let{onError:E}=x;return function(...B){try{return A.apply(void 0,B)}catch(Q){return E(Q)}}},T7=GC0;var Gm=250;var WC0=(A,x)=>{let{isRetriable:E}=x;return function(B){let{timeout:Q}=B,D=B.interval??Gm,I=Date.now()+Q;return function J(...K){return A.apply(void 0,K).catch((X)=>{if(!E(X))throw X;if(Date.now()>=I)throw X;let M=Math.round(D*Math.random());if(M>0)return new Promise((R)=>setTimeout(R,M)).then(()=>J.apply(void 0,K));else return J.apply(void 0,K)})}}},h2=WC0;var RC0=(A,x)=>{let{isRetriable:E}=x;return function(B){let{timeout:Q}=B,D=Date.now()+Q;return function(...J){while(!0)try{return A.apply(void 0,J)}catch(K){if(!E(K))throw K;if(Date.now()>=D)throw K;continue}}}},b2=RC0;import Rm from"node:process";var fK={isChangeErrorOk:(A)=>{if(!fK.isNodeError(A))return!1;let{code:x}=A;if(x==="ENOSYS")return!0;if(!Wm&&(x==="EINVAL"||x==="EPERM"))return!0;return!1},isNodeError:(A)=>{return A instanceof Error},isRetriableError:(A)=>{if(!fK.isNodeError(A))return!1;let{code:x}=A;if(x==="EMFILE"||x==="ENFILE"||x==="EAGAIN"||x==="EBUSY"||x==="EACCESS"||x==="EACCES"||x==="EACCS"||x==="EPERM")return!0;return!1},onChangeError:(A)=>{if(!fK.isNodeError(A))throw A;if(fK.isChangeErrorOk(A))return;throw A}},Nz=fK;var KK={onError:Nz.onChangeError},T5={onError:()=>{return}},Wm=Rm.getuid?!Rm.getuid():!1,G6={isRetriable:Nz.isRetriableError};var MC0={attempt:{chmod:T2(c6(q8.chmod),KK),chown:T2(c6(q8.chown),KK),close:T2(c6(q8.close),T5),fsync:T2(c6(q8.fsync),T5),mkdir:T2(c6(q8.mkdir),T5),realpath:T2(c6(q8.realpath),T5),stat:T2(c6(q8.stat),T5),unlink:T2(c6(q8.unlink),T5),chmodSync:T7(q8.chmodSync,KK),chownSync:T7(q8.chownSync,KK),closeSync:T7(q8.closeSync,T5),existsSync:T7(q8.existsSync,T5),fsyncSync:T7(q8.fsync,T5),mkdirSync:T7(q8.mkdirSync,T5),realpathSync:T7(q8.realpathSync,T5),statSync:T7(q8.statSync,T5),unlinkSync:T7(q8.unlinkSync,T5)},retry:{close:h2(c6(q8.close),G6),fsync:h2(c6(q8.fsync),G6),open:h2(c6(q8.open),G6),readFile:h2(c6(q8.readFile),G6),rename:h2(c6(q8.rename),G6),stat:h2(c6(q8.stat),G6),write:h2(c6(q8.write),G6),writeFile:h2(c6(q8.writeFile),G6),closeSync:b2(q8.closeSync,G6),fsyncSync:b2(q8.fsyncSync,G6),openSync:b2(q8.openSync,G6),readFileSync:b2(q8.readFileSync,G6),renameSync:b2(q8.renameSync,G6),statSync:b2(q8.statSync,G6),writeSync:b2(q8.writeSync,G6),writeFileSync:b2(q8.writeFileSync,G6)}},g6=MC0;import cC from"node:process";var Mm="utf8",Vz=438,zm=511;var Sm={},Lm=cC.geteuid?cC.geteuid():-1,Om=cC.getegid?cC.getegid():-1;var Pm=1000,jm=!!cC.getuid,YEA=cC.getuid?!cC.getuid():!1,vz=128;var Nm=(A)=>{return A instanceof Error&&"code"in A};var uz=(A)=>{return typeof A==="string"},PY=(A)=>{return A===void 0};import SC0 from"node:path";import v3 from"node:process";import Vm from"node:process";var vm=Vm.platform==="linux",jY=Vm.platform==="win32";var Tz=["SIGHUP","SIGINT","SIGTERM"];if(!jY)Tz.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(vm)Tz.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var um=Tz;class Tm{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=(A)=>{if(this.exited)return;this.exited=!0;for(let x of this.callbacks)x();if(A)if(jY&&(A!=="SIGINT"&&A!=="SIGTERM"&&A!=="SIGKILL"))v3.kill(v3.pid,"SIGTERM");else v3.kill(v3.pid,A)},this.hook=()=>{v3.once("exit",()=>this.exit());for(let A of um)try{v3.once(A,()=>this.exit(A))}catch{}},this.register=(A)=>{return this.callbacks.add(A),()=>{this.callbacks.delete(A)}},this.hook()}}var hm=new Tm;var zC0=hm.register,bm=zC0;var y4={store:{},create:(A)=>{let x=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),E=Date.now().toString().slice(-10),g="tmp-",B=`.tmp-${E}${x}`;return`${A}${B}`},get:(A,x,E=!0)=>{let g=y4.truncate(x(A));if(g in y4.store)return y4.get(A,x,E);return y4.store[g]=E,[g,()=>delete y4.store[g]]},purge:(A)=>{if(!y4.store[A])return;delete y4.store[A],g6.attempt.unlink(A)},purgeSync:(A)=>{if(!y4.store[A])return;delete y4.store[A],g6.attempt.unlinkSync(A)},purgeSyncAll:()=>{for(let A in y4.store)y4.purgeSync(A)},truncate:(A)=>{let x=SC0.basename(A);if(x.length<=vz)return A;let E=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(x);if(!E)return A;let g=x.length-vz;return`${A.slice(0,-x.length)}${E[1]}${E[2].slice(0,-g)}${E[3]}`}};bm(y4.purgeSyncAll);var $K=y4;function hz(A,x,E=Sm){if(uz(E))return hz(A,x,{encoding:E});let B={timeout:E.timeout??Pm},Q=null,D=null,I=null;try{let J=g6.attempt.realpathSync(A),K=!!J;A=J||A,[D,Q]=$K.get(A,E.tmpCreate||$K.create,E.tmpPurge!==!1);let X=jm&&PY(E.chown),M=PY(E.mode);if(K&&(X||M)){let W=g6.attempt.statSync(A);if(W){if(E={...E},X)E.chown={uid:W.uid,gid:W.gid};if(M)E.mode=W.mode}}if(!K){let W=LC0.dirname(A);g6.attempt.mkdirSync(W,{mode:zm,recursive:!0})}if(I=g6.retry.openSync(B)(D,"w",E.mode||Vz),E.tmpCreated)E.tmpCreated(D);if(uz(x))g6.retry.writeSync(B)(I,x,0,E.encoding||Mm);else if(!PY(x))g6.retry.writeSync(B)(I,x,0,x.length,0);if(E.fsync!==!1)if(E.fsyncWait!==!1)g6.retry.fsyncSync(B)(I);else g6.attempt.fsync(I);if(g6.retry.closeSync(B)(I),I=null,E.chown&&(E.chown.uid!==Lm||E.chown.gid!==Om))g6.attempt.chownSync(D,E.chown.uid,E.chown.gid);if(E.mode&&E.mode!==Vz)g6.attempt.chmodSync(D,E.mode);try{g6.retry.renameSync(B)(D,A)}catch(W){if(!Nm(W))throw W;if(W.code!=="ENAMETOOLONG")throw W;g6.retry.renameSync(B)(D,$K.truncate(A))}Q(),D=null}finally{if(I)g6.attempt.closeSync(I);if(D)$K.purge(D)}}var sd=kx(Pn(),1),od=kx(en(),1);var Jy0=(A,x,E,g)=>{if(E==="length"||E==="prototype")return;if(E==="arguments"||E==="caller")return;let B=Object.getOwnPropertyDescriptor(A,E),Q=Object.getOwnPropertyDescriptor(x,E);if(!fy0(B,Q)&&g)return;Object.defineProperty(A,E,Q)},fy0=function(A,x){return A===void 0||A.configurable||A.writable===x.writable&&A.enumerable===x.enumerable&&A.configurable===x.configurable&&(A.writable||A.value===x.value)},Ky0=(A,x)=>{let E=Object.getPrototypeOf(x);if(E===Object.getPrototypeOf(A))return;Object.setPrototypeOf(A,E)},$y0=(A,x)=>`/* Wrapped ${A}*/
|
|
349
|
+
<%s key={someKey} {...props} />`,w0,bA,eA,bA),EA[bA+w0]=!0)}if(bA=null,o!==void 0&&(E(o),bA=""+o),D(y0)&&(E(y0.key),bA=""+y0.key),"key"in y0){o={};for(var rx in y0)rx!=="key"&&(o[rx]=y0[rx])}else o=y0;return bA&&I(o,typeof P0==="function"?P0.displayName||P0.name||"Unknown":P0),K(P0,bA,o,B(),zA,a0)}function M(P0){W(P0)?P0._store&&(P0._store.validated=1):typeof P0==="object"&&P0!==null&&P0.$$typeof===ZA&&(P0._payload.status==="fulfilled"?W(P0._payload.value)&&P0._payload.value._store&&(P0._payload.value._store.validated=1):P0._store&&(P0._store.validated=1))}function W(P0){return typeof P0==="object"&&P0!==null&&P0.$$typeof===R}var R=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),Q0=Symbol.for("react.profiler"),M0=Symbol.for("react.consumer"),C0=Symbol.for("react.context"),H0=Symbol.for("react.forward_ref"),K0=Symbol.for("react.suspense"),n0=Symbol.for("react.suspense_list"),V0=Symbol.for("react.memo"),ZA=Symbol.for("react.lazy"),O0=Symbol.for("react.activity"),XA=Symbol.for("react.client.reference"),nx=cF.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,tA=Object.prototype.hasOwnProperty,HA=Array.isArray,u0=console.createTask?console.createTask:function(){return null};cF={react_stack_bottom_frame:function(P0){return P0()}};var $0,e0={},N0=cF.react_stack_bottom_frame.bind(cF,Q)(),qA=u0(g(Q)),EA={};Zo0.Fragment=u,Zo0.jsxDEV=function(P0,y0,o,w0){var zA=1e4>nx.recentlyCreatedOwnerStacks++;return X(P0,y0,o,w0,zA?Error("react-stack-top-frame"):N0,zA?u0(g(P0)):qA)}})()});var $m=kx(Km(),1),{program:NxA,createCommand:VxA,createArgument:vxA,createOption:uxA,CommanderError:TxA,InvalidArgumentError:hxA,InvalidOptionArgumentError:bxA,Command:Hm,Argument:kxA,Option:ixA,Help:mxA}=$m.default;var ym={name:"@sequenzy/cli",version:"0.0.88",description:"Sequenzy CLI for email marketing from the terminal",type:"module",bin:{sequenzy:"./dist/index.js"},main:"./src/index.tsx",types:"./src/index.tsx",exports:{".":"./src/index.tsx"},scripts:{dev:"bun --watch src/index.tsx",build:"bun build src/index.tsx --outdir dist --target node --minify --define 'process.env.DEV=false'",start:"node dist/index.js","type-check":"tsc --noEmit",test:"bun test","test:watch":"bun test --watch",prepublishOnly:"bun run build"},dependencies:{commander:"^12.1.0",ink:"^5.0.1","ink-spinner":"^5.0.0","ink-text-input":"^6.0.0","ink-select-input":"^6.0.0","ink-table":"^3.1.0",open:"^10.1.0",react:"^18.3.1",conf:"^13.0.0"},devDependencies:{"@emailer/shared":"workspace:*","@types/bun":"latest","@types/node":"^22.0.0","@types/react":"^18.3.0","bun-types":"latest",typescript:"^7.0.2"},files:["dist"],keywords:["sequenzy","email","cli","marketing"],license:"MIT",repository:{type:"git",url:"https://github.com/sequenzy/sequenzy"}};import{isDeepStrictEqual as YX0}from"node:util";import ld from"node:process";import oC from"node:fs";import dd from"node:path";import lK from"node:crypto";import XX0 from"node:assert";var mC=(A)=>{let x=typeof A;return A!==null&&(x==="object"||x==="function")};var zz=new Set(["__proto__","prototype","constructor"]),qC0=new Set("0123456789");function OY(A){let x=[],E="",g="start",B=!1;for(let Q of A)switch(Q){case"\\":{if(g==="index")throw Error("Invalid character in an index");if(g==="indexEnd")throw Error("Invalid character after an index");if(B)E+=Q;g="property",B=!B;break}case".":{if(g==="index")throw Error("Invalid character in an index");if(g==="indexEnd"){g="property";break}if(B){B=!1,E+=Q;break}if(zz.has(E))return[];x.push(E),E="",g="property";break}case"[":{if(g==="index")throw Error("Invalid character in an index");if(g==="indexEnd"){g="index";break}if(B){B=!1,E+=Q;break}if(g==="property"){if(zz.has(E))return[];x.push(E),E=""}g="index";break}case"]":{if(g==="index"){x.push(Number.parseInt(E,10)),E="",g="indexEnd";break}if(g==="indexEnd")throw Error("Invalid character after an index")}default:{if(g==="index"&&!qC0.has(Q))throw Error("Invalid character in an index");if(g==="indexEnd")throw Error("Invalid character after an index");if(g==="start")g="property";if(B)B=!1,E+="\\";E+=Q}}if(B)E+="\\";switch(g){case"property":{if(zz.has(E))return[];x.push(E);break}case"index":throw Error("Index was not closed");case"start":{x.push("");break}}return x}function Sz(A,x){if(typeof x!=="number"&&Array.isArray(A)){let E=Number.parseInt(x,10);return Number.isInteger(E)&&A[E]===A[x]}return!1}function qm(A,x){if(Sz(A,x))throw Error("Cannot use string index")}function Ym(A,x,E){if(!mC(A)||typeof x!=="string")return E===void 0?A:E;let g=OY(x);if(g.length===0)return E;for(let B=0;B<g.length;B++){let Q=g[B];if(Sz(A,Q))A=B===g.length-1?void 0:null;else A=A[Q];if(A===void 0||A===null){if(B!==g.length-1)return E;break}}return A===void 0?E:A}function Lz(A,x,E){if(!mC(A)||typeof x!=="string")return A;let g=A,B=OY(x);for(let Q=0;Q<B.length;Q++){let D=B[Q];if(qm(A,D),Q===B.length-1)A[D]=E;else if(!mC(A[D]))A[D]=typeof B[Q+1]==="number"?[]:{};A=A[D]}return g}function Xm(A,x){if(!mC(A)||typeof x!=="string")return!1;let E=OY(x);for(let g=0;g<E.length;g++){let B=E[g];if(qm(A,B),g===E.length-1)return delete A[B],!0;if(A=A[B],!mC(A))return!1}}function Um(A,x){if(!mC(A)||typeof x!=="string")return!1;let E=OY(x);if(E.length===0)return!1;for(let g of E){if(!mC(A)||!(g in A)||Sz(A,g))return!1;A=A[g]}return!0}import lB from"node:path";import Zm from"node:os";import Oz from"node:process";var hQ=Zm.homedir(),Pz=Zm.tmpdir(),{env:V3}=Oz,YC0=(A)=>{let x=lB.join(hQ,"Library");return{data:lB.join(x,"Application Support",A),config:lB.join(x,"Preferences",A),cache:lB.join(x,"Caches",A),log:lB.join(x,"Logs",A),temp:lB.join(Pz,A)}},XC0=(A)=>{let x=V3.APPDATA||lB.join(hQ,"AppData","Roaming"),E=V3.LOCALAPPDATA||lB.join(hQ,"AppData","Local");return{data:lB.join(E,A,"Data"),config:lB.join(x,A,"Config"),cache:lB.join(E,A,"Cache"),log:lB.join(E,A,"Log"),temp:lB.join(Pz,A)}},UC0=(A)=>{let x=lB.basename(hQ);return{data:lB.join(V3.XDG_DATA_HOME||lB.join(hQ,".local","share"),A),config:lB.join(V3.XDG_CONFIG_HOME||lB.join(hQ,".config"),A),cache:lB.join(V3.XDG_CACHE_HOME||lB.join(hQ,".cache"),A),log:lB.join(V3.XDG_STATE_HOME||lB.join(hQ,".local","state"),A),temp:lB.join(Pz,x,A)}};function jz(A,{suffix:x="nodejs"}={}){if(typeof A!=="string")throw TypeError(`Expected a string, got ${typeof A}`);if(x)A+=`-${x}`;if(Oz.platform==="darwin")return YC0(A);if(Oz.platform==="win32")return XC0(A);return UC0(A)}import LC0 from"node:path";import q8 from"node:fs";import{promisify as c6}from"node:util";var ZC0=(A,x)=>{let{onError:E}=x;return function(...B){return A.apply(void 0,B).catch(E)}},T2=ZC0;var GC0=(A,x)=>{let{onError:E}=x;return function(...B){try{return A.apply(void 0,B)}catch(Q){return E(Q)}}},T7=GC0;var Gm=250;var WC0=(A,x)=>{let{isRetriable:E}=x;return function(B){let{timeout:Q}=B,D=B.interval??Gm,I=Date.now()+Q;return function J(...K){return A.apply(void 0,K).catch((X)=>{if(!E(X))throw X;if(Date.now()>=I)throw X;let M=Math.round(D*Math.random());if(M>0)return new Promise((R)=>setTimeout(R,M)).then(()=>J.apply(void 0,K));else return J.apply(void 0,K)})}}},h2=WC0;var RC0=(A,x)=>{let{isRetriable:E}=x;return function(B){let{timeout:Q}=B,D=Date.now()+Q;return function(...J){while(!0)try{return A.apply(void 0,J)}catch(K){if(!E(K))throw K;if(Date.now()>=D)throw K;continue}}}},b2=RC0;import Rm from"node:process";var fK={isChangeErrorOk:(A)=>{if(!fK.isNodeError(A))return!1;let{code:x}=A;if(x==="ENOSYS")return!0;if(!Wm&&(x==="EINVAL"||x==="EPERM"))return!0;return!1},isNodeError:(A)=>{return A instanceof Error},isRetriableError:(A)=>{if(!fK.isNodeError(A))return!1;let{code:x}=A;if(x==="EMFILE"||x==="ENFILE"||x==="EAGAIN"||x==="EBUSY"||x==="EACCESS"||x==="EACCES"||x==="EACCS"||x==="EPERM")return!0;return!1},onChangeError:(A)=>{if(!fK.isNodeError(A))throw A;if(fK.isChangeErrorOk(A))return;throw A}},Nz=fK;var KK={onError:Nz.onChangeError},T5={onError:()=>{return}},Wm=Rm.getuid?!Rm.getuid():!1,G6={isRetriable:Nz.isRetriableError};var MC0={attempt:{chmod:T2(c6(q8.chmod),KK),chown:T2(c6(q8.chown),KK),close:T2(c6(q8.close),T5),fsync:T2(c6(q8.fsync),T5),mkdir:T2(c6(q8.mkdir),T5),realpath:T2(c6(q8.realpath),T5),stat:T2(c6(q8.stat),T5),unlink:T2(c6(q8.unlink),T5),chmodSync:T7(q8.chmodSync,KK),chownSync:T7(q8.chownSync,KK),closeSync:T7(q8.closeSync,T5),existsSync:T7(q8.existsSync,T5),fsyncSync:T7(q8.fsync,T5),mkdirSync:T7(q8.mkdirSync,T5),realpathSync:T7(q8.realpathSync,T5),statSync:T7(q8.statSync,T5),unlinkSync:T7(q8.unlinkSync,T5)},retry:{close:h2(c6(q8.close),G6),fsync:h2(c6(q8.fsync),G6),open:h2(c6(q8.open),G6),readFile:h2(c6(q8.readFile),G6),rename:h2(c6(q8.rename),G6),stat:h2(c6(q8.stat),G6),write:h2(c6(q8.write),G6),writeFile:h2(c6(q8.writeFile),G6),closeSync:b2(q8.closeSync,G6),fsyncSync:b2(q8.fsyncSync,G6),openSync:b2(q8.openSync,G6),readFileSync:b2(q8.readFileSync,G6),renameSync:b2(q8.renameSync,G6),statSync:b2(q8.statSync,G6),writeSync:b2(q8.writeSync,G6),writeFileSync:b2(q8.writeFileSync,G6)}},g6=MC0;import cC from"node:process";var Mm="utf8",Vz=438,zm=511;var Sm={},Lm=cC.geteuid?cC.geteuid():-1,Om=cC.getegid?cC.getegid():-1;var Pm=1000,jm=!!cC.getuid,YEA=cC.getuid?!cC.getuid():!1,vz=128;var Nm=(A)=>{return A instanceof Error&&"code"in A};var uz=(A)=>{return typeof A==="string"},PY=(A)=>{return A===void 0};import SC0 from"node:path";import v3 from"node:process";import Vm from"node:process";var vm=Vm.platform==="linux",jY=Vm.platform==="win32";var Tz=["SIGHUP","SIGINT","SIGTERM"];if(!jY)Tz.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(vm)Tz.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var um=Tz;class Tm{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=(A)=>{if(this.exited)return;this.exited=!0;for(let x of this.callbacks)x();if(A)if(jY&&(A!=="SIGINT"&&A!=="SIGTERM"&&A!=="SIGKILL"))v3.kill(v3.pid,"SIGTERM");else v3.kill(v3.pid,A)},this.hook=()=>{v3.once("exit",()=>this.exit());for(let A of um)try{v3.once(A,()=>this.exit(A))}catch{}},this.register=(A)=>{return this.callbacks.add(A),()=>{this.callbacks.delete(A)}},this.hook()}}var hm=new Tm;var zC0=hm.register,bm=zC0;var y4={store:{},create:(A)=>{let x=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),E=Date.now().toString().slice(-10),g="tmp-",B=`.tmp-${E}${x}`;return`${A}${B}`},get:(A,x,E=!0)=>{let g=y4.truncate(x(A));if(g in y4.store)return y4.get(A,x,E);return y4.store[g]=E,[g,()=>delete y4.store[g]]},purge:(A)=>{if(!y4.store[A])return;delete y4.store[A],g6.attempt.unlink(A)},purgeSync:(A)=>{if(!y4.store[A])return;delete y4.store[A],g6.attempt.unlinkSync(A)},purgeSyncAll:()=>{for(let A in y4.store)y4.purgeSync(A)},truncate:(A)=>{let x=SC0.basename(A);if(x.length<=vz)return A;let E=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(x);if(!E)return A;let g=x.length-vz;return`${A.slice(0,-x.length)}${E[1]}${E[2].slice(0,-g)}${E[3]}`}};bm(y4.purgeSyncAll);var $K=y4;function hz(A,x,E=Sm){if(uz(E))return hz(A,x,{encoding:E});let B={timeout:E.timeout??Pm},Q=null,D=null,I=null;try{let J=g6.attempt.realpathSync(A),K=!!J;A=J||A,[D,Q]=$K.get(A,E.tmpCreate||$K.create,E.tmpPurge!==!1);let X=jm&&PY(E.chown),M=PY(E.mode);if(K&&(X||M)){let W=g6.attempt.statSync(A);if(W){if(E={...E},X)E.chown={uid:W.uid,gid:W.gid};if(M)E.mode=W.mode}}if(!K){let W=LC0.dirname(A);g6.attempt.mkdirSync(W,{mode:zm,recursive:!0})}if(I=g6.retry.openSync(B)(D,"w",E.mode||Vz),E.tmpCreated)E.tmpCreated(D);if(uz(x))g6.retry.writeSync(B)(I,x,0,E.encoding||Mm);else if(!PY(x))g6.retry.writeSync(B)(I,x,0,x.length,0);if(E.fsync!==!1)if(E.fsyncWait!==!1)g6.retry.fsyncSync(B)(I);else g6.attempt.fsync(I);if(g6.retry.closeSync(B)(I),I=null,E.chown&&(E.chown.uid!==Lm||E.chown.gid!==Om))g6.attempt.chownSync(D,E.chown.uid,E.chown.gid);if(E.mode&&E.mode!==Vz)g6.attempt.chmodSync(D,E.mode);try{g6.retry.renameSync(B)(D,A)}catch(W){if(!Nm(W))throw W;if(W.code!=="ENAMETOOLONG")throw W;g6.retry.renameSync(B)(D,$K.truncate(A))}Q(),D=null}finally{if(I)g6.attempt.closeSync(I);if(D)$K.purge(D)}}var sd=kx(Pn(),1),od=kx(en(),1);var Jy0=(A,x,E,g)=>{if(E==="length"||E==="prototype")return;if(E==="arguments"||E==="caller")return;let B=Object.getOwnPropertyDescriptor(A,E),Q=Object.getOwnPropertyDescriptor(x,E);if(!fy0(B,Q)&&g)return;Object.defineProperty(A,E,Q)},fy0=function(A,x){return A===void 0||A.configurable||A.writable===x.writable&&A.enumerable===x.enumerable&&A.configurable===x.configurable&&(A.writable||A.value===x.value)},Ky0=(A,x)=>{let E=Object.getPrototypeOf(x);if(E===Object.getPrototypeOf(A))return;Object.setPrototypeOf(A,E)},$y0=(A,x)=>`/* Wrapped ${A}*/
|
|
350
350
|
${x}`,Hy0=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),yy0=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),qy0=(A,x,E)=>{let g=E===""?"":`with ${E.trim()}() `,B=$y0.bind(null,g,x.toString());Object.defineProperty(B,"name",yy0);let{writable:Q,enumerable:D,configurable:I}=Hy0;Object.defineProperty(A,"toString",{value:B,writable:Q,enumerable:D,configurable:I})};function tS(A,x,{ignoreNonConfigurable:E=!1}={}){let{name:g}=A;for(let B of Reflect.ownKeys(x))Jy0(A,x,B,E);return Ky0(A,x),qy0(A,x,g),A}var Yy0=(A,x={})=>{if(typeof A!=="function")throw TypeError(`Expected the first argument to be a function, got \`${typeof A}\``);let{wait:E=0,maxWait:g=Number.POSITIVE_INFINITY,before:B=!1,after:Q=!0}=x;if(E<0||g<0)throw RangeError("`wait` and `maxWait` must not be negative.");if(!B&&!Q)throw Error("Both `before` and `after` are false, function wouldn't be called.");let D,I,J,K=function(...X){let M=this,W=()=>{if(D=void 0,I)clearTimeout(I),I=void 0;if(Q)J=A.apply(M,X)},R=()=>{if(I=void 0,D)clearTimeout(D),D=void 0;if(Q)J=A.apply(M,X)},O=B&&!D;if(clearTimeout(D),D=setTimeout(W,E),g>0&&g!==Number.POSITIVE_INFINITY&&!I)I=setTimeout(R,g);if(O)J=A.apply(M,X);return J};return tS(K,A),K.cancel=()=>{if(D)clearTimeout(D),D=void 0;if(I)clearTimeout(I),I=void 0},K},eS=Yy0;var tC=kx(rd(),1);var JX0=Object.prototype.toString;function _d(A,x,E){if(!A)return!1;if(A.constructor===x)return!0;return JX0.call(A)===E}function nd(A){return _d(A,Uint8Array,"[object Uint8Array]")}function fX0(A){return _d(A,ArrayBuffer,"[object ArrayBuffer]")}function KX0(A){return nd(A)||fX0(A)}function $X0(A){if(!nd(A))throw TypeError(`Expected \`Uint8Array\`, got \`${typeof A}\``)}function HX0(A){if(!KX0(A))throw TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof A}\``)}function HL(A,x){if(A.length===0)return new Uint8Array(0);x??=A.reduce((B,Q)=>B+Q.length,0);let E=new Uint8Array(x),g=0;for(let B of A)$X0(B),E.set(B,g),g+=B.length;return E}var pd={utf8:new globalThis.TextDecoder("utf8")};function yL(A,x="utf8"){return HX0(A),pd[x]??=new globalThis.TextDecoder(x),pd[x].decode(A)}function yX0(A){if(typeof A!=="string")throw TypeError(`Expected \`string\`, got \`${typeof A}\``)}var qX0=new globalThis.TextEncoder;function OX(A){return yX0(A),qX0.encode(A)}var Q6A=Array.from({length:256},(A,x)=>x.toString(16).padStart(2,"0"));var UX0=od.default.default,ad="aes-256-cbc",s3=()=>Object.create(null),ZX0=(A)=>A!==void 0&&A!==null,GX0=(A,x)=>{let E=new Set(["undefined","symbol","function"]),g=typeof x;if(E.has(g))throw TypeError(`Setting a value of type \`${g}\` for key \`${A}\` is not allowed as it's not supported by JSON`)},PX="__internal__",qL=`${PX}.migrations.version`;class jX{path;events;#B;#x;#A;#E={};constructor(A={}){let x={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...A};if(!x.cwd){if(!x.projectName)throw Error("Please specify the `projectName` option.");x.cwd=jz(x.projectName,{suffix:x.projectSuffix}).config}if(this.#A=x,x.schema??x.ajvOptions??x.rootSchema){if(x.schema&&typeof x.schema!=="object")throw TypeError("The `schema` option must be an object.");let Q=new sd.Ajv2020({allErrors:!0,useDefaults:!0,...x.ajvOptions});UX0(Q);let D={...x.rootSchema,type:"object",properties:x.schema};this.#B=Q.compile(D);for(let[I,J]of Object.entries(x.schema??{}))if(J?.default)this.#E[I]=J.default}if(x.defaults)this.#E={...this.#E,...x.defaults};if(x.serialize)this._serialize=x.serialize;if(x.deserialize)this._deserialize=x.deserialize;this.events=new EventTarget,this.#x=x.encryptionKey;let E=x.fileExtension?`.${x.fileExtension}`:"";this.path=dd.resolve(x.cwd,`${x.configName??"config"}${E}`);let g=this.store,B=Object.assign(s3(),x.defaults,g);if(x.migrations){if(!x.projectVersion)throw Error("Please specify the `projectVersion` option.");this._migrate(x.migrations,x.projectVersion,x.beforeEachMigration)}this._validate(B);try{XX0.deepEqual(g,B)}catch{this.store=B}if(x.watch)this._watch()}get(A,x){if(this.#A.accessPropertiesByDotNotation)return this._get(A,x);let{store:E}=this;return A in E?E[A]:x}set(A,x){if(typeof A!=="string"&&typeof A!=="object")throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof A}`);if(typeof A!=="object"&&x===void 0)throw TypeError("Use `delete()` to clear values");if(this._containsReservedKey(A))throw TypeError(`Please don't use the ${PX} key, as it's used to manage this module internal operations.`);let{store:E}=this,g=(B,Q)=>{if(GX0(B,Q),this.#A.accessPropertiesByDotNotation)Lz(E,B,Q);else E[B]=Q};if(typeof A==="object"){let B=A;for(let[Q,D]of Object.entries(B))g(Q,D)}else g(A,x);this.store=E}has(A){if(this.#A.accessPropertiesByDotNotation)return Um(this.store,A);return A in this.store}reset(...A){for(let x of A)if(ZX0(this.#E[x]))this.set(x,this.#E[x])}delete(A){let{store:x}=this;if(this.#A.accessPropertiesByDotNotation)Xm(x,A);else delete x[A];this.store=x}clear(){this.store=s3();for(let A of Object.keys(this.#E))this.reset(A)}onDidChange(A,x){if(typeof A!=="string")throw TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof A}`);if(typeof x!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof x}`);return this._handleChange(()=>this.get(A),x)}onDidAnyChange(A){if(typeof A!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof A}`);return this._handleChange(()=>this.store,A)}get size(){return Object.keys(this.store).length}get store(){try{let A=oC.readFileSync(this.path,this.#x?null:"utf8"),x=this._encryptData(A),E=this._deserialize(x);return this._validate(E),Object.assign(s3(),E)}catch(A){if(A?.code==="ENOENT")return this._ensureDirectory(),s3();if(this.#A.clearInvalidConfig&&A.name==="SyntaxError")return s3();throw A}}set store(A){this._ensureDirectory(),this._validate(A),this._write(A),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(let[A,x]of Object.entries(this.store))yield[A,x]}_encryptData(A){if(!this.#x)return typeof A==="string"?A:yL(A);try{let x=A.slice(0,16),E=lK.pbkdf2Sync(this.#x,x.toString(),1e4,32,"sha512"),g=lK.createDecipheriv(ad,E,x),B=A.slice(17),Q=typeof B==="string"?OX(B):B;return yL(HL([g.update(Q),g.final()]))}catch{}return A.toString()}_handleChange(A,x){let E=A(),g=()=>{let B=E,Q=A();if(YX0(Q,B))return;E=Q,x.call(this,Q,B)};return this.events.addEventListener("change",g),()=>{this.events.removeEventListener("change",g)}}_deserialize=(A)=>JSON.parse(A);_serialize=(A)=>JSON.stringify(A,void 0,"\t");_validate(A){if(!this.#B)return;if(this.#B(A)||!this.#B.errors)return;let E=this.#B.errors.map(({instancePath:g,message:B=""})=>`\`${g.slice(1)}\` ${B}`);throw Error("Config schema violation: "+E.join("; "))}_ensureDirectory(){oC.mkdirSync(dd.dirname(this.path),{recursive:!0})}_write(A){let x=this._serialize(A);if(this.#x){let E=lK.randomBytes(16),g=lK.pbkdf2Sync(this.#x,E.toString(),1e4,32,"sha512"),B=lK.createCipheriv(ad,g,E);x=HL([E,OX(":"),B.update(OX(x)),B.final()])}if(ld.env.SNAP)oC.writeFileSync(this.path,x,{mode:this.#A.configFileMode});else try{hz(this.path,x,{mode:this.#A.configFileMode})}catch(E){if(E?.code==="EXDEV"){oC.writeFileSync(this.path,x,{mode:this.#A.configFileMode});return}throw E}}_watch(){if(this._ensureDirectory(),!oC.existsSync(this.path))this._write(s3());if(ld.platform==="win32")oC.watch(this.path,{persistent:!1},eS(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100}));else oC.watchFile(this.path,{persistent:!1},eS(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5000}))}_migrate(A,x,E){let g=this._get(qL,"0.0.0"),B=Object.keys(A).filter((D)=>this._shouldPerformMigration(D,g,x)),Q={...this.store};for(let D of B)try{if(E)E(this,{fromVersion:g,toVersion:D,finalVersion:x,versions:B});let I=A[D];I?.(this),this._set(qL,D),g=D,Q={...this.store}}catch(I){throw this.store=Q,Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${I}`)}if(this._isVersionInRangeFormat(g)||!tC.default.eq(g,x))this._set(qL,x)}_containsReservedKey(A){if(typeof A==="object"){if(Object.keys(A)[0]===PX)return!0}if(typeof A!=="string")return!1;if(this.#A.accessPropertiesByDotNotation){if(A.startsWith(`${PX}.`))return!0;return!1}return!1}_isVersionInRangeFormat(A){return tC.default.clean(A)===null}_shouldPerformMigration(A,x,E){if(this._isVersionInRangeFormat(A)){if(x!=="0.0.0"&&tC.default.satisfies(x,A))return!1;return tC.default.satisfies(E,A)}if(tC.default.lte(A,x))return!1;if(tC.default.gt(A,E))return!1;return!0}_get(A,x){return Ym(this.store,A,x)}_set(A,x){let{store:E}=this;Lz(E,A,x),this.store=E}}var YL="com.sequenzy.cli",XL="api-key",UL=typeof globalThis.Bun<"u",nQ=new jX({projectName:"sequenzy",schema:{userId:{type:"string"},userEmail:{type:"string"},_apiKey:{type:"string"}}});async function ZL(){let A=process.env.SEQUENZY_API_KEY;if(A)return A;if(UL)try{let x=await globalThis.Bun.secrets.get({service:YL,name:XL});if(x)return x}catch{}return nQ.get("_apiKey")}async function td(A){if(UL)try{await globalThis.Bun.secrets.set({service:YL,name:XL,value:A,allowUnrestrictedAccess:!1});return}catch{}nQ.set("_apiKey",A)}async function ed(){if(UL)try{await globalThis.Bun.secrets.delete({service:YL,name:XL})}catch{}nQ.delete("_apiKey")}async function Cx(){return!!await ZL()}function NX(){return{userId:nQ.get("userId"),userEmail:nQ.get("userEmail")}}function Aa(A){if(A.userId!==void 0)nQ.set("userId",A.userId);if(A.userEmail!==void 0)nQ.set("userEmail",A.userEmail)}function xa(){nQ.clear()}var WX0=process.env.SEQUENZY_API_URL??"https://api.sequenzy.com";class l extends Error{statusCode;rawDetails;code;constructor(A,x,E,g){super(A);this.statusCode=x;this.rawDetails=E;this.code=g;this.name="ApiError"}}function RX0(A){if(!A.trim())return{message:"Request failed"};try{let x=JSON.parse(A);if(typeof x==="string")return{message:x};if(typeof x.error==="string")return{message:x.error,code:x.code};if(x.error&&typeof x.error==="object")return{message:x.error.message??x.message??A,code:x.error.code??x.code};return{message:x.message??A,code:x.code}}catch{return{message:A}}}async function Y0(A,x,E,g){let B=await ZL();if(!B)throw new l("Not logged in. Run `sequenzy login` first.",401);let Q={"Content-Type":"application/json",Authorization:`Bearer ${B}`};if(g)Q["x-company-id"]=g;let D;try{D=await fetch(`${WX0}${x}`,{method:A,headers:Q,body:E?JSON.stringify(E):void 0})}catch(I){throw new l(I instanceof Error?I.message:"Failed to reach Sequenzy API",0,void 0,"NETWORK_ERROR")}if(!D.ok){let I=await D.text(),J=RX0(I);throw new l(J.message,D.status,I,J.code)}return D.json()}var Ba="https://docs.sequenzy.com",Cg=`${Ba}/concepts/cli`,Ea=`${Ba}/authentication`,MX0="https://sequenzy.com/dashboard";function zX0(A){if(A instanceof l)return{message:A.message,statusCode:A.statusCode,code:A.code,rawDetails:A.rawDetails};if(A instanceof Error)return{message:A.message};return{message:String(A)}}function SX0(A){let x=A.match(/api key is missing required scopes?:\s*(.+)$/i);if(!x?.[1])return[];return x[1].match(/[a-z_]+:[a-z_]+/gi)??[]}function LX0(A){let x=zX0(A),E=x.message.trim()||"Unknown error",g=E.toLowerCase(),B=x.rawDetails?.trim()||E;if(x.code==="CLI_AUTH_REQUIRED"||g.includes("not logged in"))return{title:"Authentication required",description:"This command needs a Sequenzy API key, but the CLI could not find one in your local login state or environment.",howToFix:"Run `sequenzy login` and approve the session, or set `SEQUENZY_API_KEY` for non-interactive environments.",docsUrl:Cg,details:B};if(g.includes("already logged in"))return{title:"CLI already authenticated",description:"The CLI already has a saved Sequenzy login for this machine.",howToFix:"Run `sequenzy logout` first if you want to switch accounts, then run `sequenzy login` again.",docsUrl:Cg,details:B};if(x.statusCode===401||x.code==="UNAUTHORIZED")return{title:"Authentication failed",description:"The request reached Sequenzy, but the current API key was rejected.",howToFix:"Run `sequenzy login` again, or replace the key with a valid personal API key that still has access to your account.",docsUrl:Ea,details:B};let Q=SX0(E);if(Q.length>0){let D=Q.map((J)=>`\`${J}\``).join(", "),I=Q.every((J)=>J.endsWith(":read"))?"the Read-only or Safer agent access preset":"Safer agent access when it covers the task, or Custom permissions";return{title:"API key permission required",description:`The current API key is valid, but this operation requires the missing ${Q.length===1?"scope":"scopes"}: ${D}.`,howToFix:`Run \`sequenzy account\` to inspect the active key and open its API Keys settings URL. If that command also requires \`account:read\`, open ${MX0} directly and go to Settings → API Keys. Create a replacement key with ${I} including ${D}, then replace \`SEQUENZY_API_KEY\` or log in again. Existing key permissions cannot be edited in place.`,docsUrl:Cg,details:B}}if(x.statusCode===403||g.includes("access denied"))return{title:"Access denied",description:"The current API key is valid, but it does not have permission to perform this action or access the requested company.",howToFix:"Use an API key with access to the target company, or switch to a company you can access before retrying.",docsUrl:Ea,details:B};if(x.statusCode===404||g.includes("not found"))return{title:"Requested resource not found",description:"Sequenzy could not find the company, template, campaign, sequence, or subscriber you asked for.",howToFix:"Double-check the ID or email value and list the resource first before retrying the command.",docsUrl:Cg,details:B};if(x.statusCode===429||g.includes("rate limit"))return{title:"Rate limited",description:"Sequenzy temporarily slowed this request because too many requests were sent in a short period.",howToFix:"Wait a moment and retry. If an agent is looping, reduce the retry frequency before calling the CLI again.",docsUrl:Cg,details:B};if(g.includes("--subject")||g.includes("--template")||g.includes("is required"))return{title:"Invalid command input",description:"The CLI command arguments are incomplete or incompatible for this action.",howToFix:"Review the flags you passed, add the missing values, and run the command again.",docsUrl:Cg,details:B};if(x.code==="NETWORK_ERROR"||g.includes("fetch failed")||g.includes("failed to initiate login"))return{title:"Network or configuration error",description:"The CLI could not reach the Sequenzy API or app URL from this environment.",howToFix:"Check your network connection and verify `SEQUENZY_API_URL` or `SEQUENZY_APP_URL` if you override them locally.",docsUrl:Cg,details:B};if(x.statusCode&&x.statusCode>=500)return{title:"Sequenzy server error",description:"The request reached Sequenzy, but the server could not complete it successfully.",howToFix:"Retry once. If the error persists, keep the details below and check the docs before escalating.",docsUrl:Cg,details:B};return{title:"Command failed",description:"The CLI could not complete the requested operation.",howToFix:"Review the details below, adjust the command or credentials, and retry.",docsUrl:Cg,details:B}}function Kx(){return new l("Not logged in. Run `sequenzy login` first.",401,void 0,"CLI_AUTH_REQUIRED")}function dK(A){let x=LX0(A);return[`Sequenzy CLI error: ${x.title}`,`Description: ${x.description}`,`How to fix: ${x.howToFix}`,`Docs: ${x.docsUrl}`,`Details: ${x.details}`].join(`
|
|
351
351
|
`)}function YA(A){console.error(dK(A))}import{readFileSync as OX0}from"node:fs";import{createInterface as PX0}from"node:readline/promises";function L0(A){console.log(JSON.stringify(A,null,2))}function dA(A){if(!A)return"None";let x=A instanceof Date?A:new Date(A);if(Number.isNaN(x.getTime()))return String(A);return x.toISOString()}function q4(A,x,E){if(A&&x)throw new l(`Provide either --${E} or --${E}-file, not both`,400);if(!x)return A;try{return OX0(x,"utf8")}catch(g){throw new l(`Failed to read ${E} file '${x}': ${g instanceof Error?g.message:"Unknown error"}`,400)}}function gE(A,x,E){let g=q4(A,x,E);if(!g)return;try{return JSON.parse(g)}catch(B){throw new l(`Invalid ${E} JSON: ${B instanceof Error?B.message:"Unknown error"}`,400)}}function lQ(A){let x=q4(A.html,A.htmlFile,"html"),E=gE(A.blocksJson,A.blocksFile,"blocks");if(x!==void 0&&E!==void 0)throw new l("Provide either --html/--html-file or --blocks-json/--blocks-file, not both",400);if(E!==void 0&&!Array.isArray(E))throw new l("blocks JSON must be an array",400);if(A.required&&x===void 0&&E===void 0)throw new l(A.requiredMessage??"Provide either --html/--html-file or --blocks-json/--blocks-file",400);return{...x!==void 0&&{html:x},...E!==void 0&&{blocks:E}}}function M8(A,x){if(A===void 0)return;let E=A.trim();if(!/^[+-]?\d+$/.test(E))throw new l(`${x} must be an integer`,400);let g=Number(E);if(!Number.isInteger(g))throw new l(`${x} must be an integer`,400);return g}async function l9(A,x){if(x.yes===!0)return!0;if(!process.stdin.isTTY)throw new l(`${A} Confirmation is required: re-run with --yes when stdin is not interactive`,400);let E=PX0({input:process.stdin,output:process.stdout});try{let g=(await E.question(`${A} [y/N] `)).trim().toLowerCase();return g==="y"||g==="yes"}finally{E.close()}}function dQ(A,x){if(!A||A.trim()==="")throw new l(`${x} is required`,400);return A}var jX0=new Set(["open_rate","click_rate"]);function NX0(A,x){if(typeof A!=="object"||A===null)throw new l(`${x} must be an object with a subject field`,400);let E=A;if(typeof E.subject!=="string"||E.subject.trim()==="")throw new l(`${x}.subject must be a non-empty string`,400);if(E.previewText!==void 0&&typeof E.previewText!=="string")throw new l(`${x}.previewText must be a string`,400);if(E.blocks!==void 0&&!Array.isArray(E.blocks))throw new l(`${x}.blocks must be an array`,400);return{subject:E.subject,...E.previewText!==void 0&&{previewText:E.previewText},...Array.isArray(E.blocks)&&{blocks:E.blocks}}}function VX0(A){if(Boolean(A.campaignId)===Boolean(A.automationNodeId))throw new l("Provide exactly one campaign ID or --automation-node",400);let x=M8(A.testPercentage,"--test-percentage");if(x!==void 0&&(x<5||x>50))throw new l("--test-percentage must be an integer between 5 and 50",400);if(A.testType!==void 0&&A.testType!=="subject"&&A.testType!=="content")throw new l("--test-type must be subject or content",400);let E=M8(A.winnerThreshold,"--winner-threshold");if(E!==void 0&&(E<10||E>1000))throw new l("--winner-threshold must be an integer between 10 and 1000",400);let g=M8(A.durationMinutes,"--duration-minutes");if(g!==void 0&&(g<15||g>1440))throw new l("--duration-minutes must be an integer between 15 and 1440",400);if(A.winnerCriteria!==void 0&&!jX0.has(A.winnerCriteria))throw new l("--winner-criteria must be open_rate or click_rate",400);let B=gE(A.variantsJson,A.variantsFile,"variants"),Q;if(B!==void 0){if(!Array.isArray(B))throw new l("variants JSON must be an array",400);Q=B.map((D,I)=>NX0(D,`variants[${I}]`))}if(A.automationNodeId&&(Q?.length??0)===0)throw new l("Sequence A/B tests need at least one variant in addition to control variant A; provide --variants-json or --variants-file",400);return{...A.campaignId!==void 0&&{campaignId:A.campaignId},...A.automationNodeId!==void 0&&{automationNodeId:A.automationNodeId},...A.confirmLiveChange===!0&&{confirmLiveChange:!0},...A.name!==void 0&&{name:A.name},...x!==void 0&&{testPercentage:x},...g!==void 0&&{testDurationMinutes:g},...A.winnerCriteria!==void 0&&{winnerCriteria:A.winnerCriteria},...A.testType!==void 0&&{testType:A.testType},...E!==void 0&&{winnerThreshold:E},...Q!==void 0&&{variants:Q}}}function vX0(A){if(!A.subject||A.subject.trim()==="")throw new l("--subject is required",400);let x=gE(A.blocksJson,A.blocksFile,"blocks");if(x!==void 0&&!Array.isArray(x))throw new l("blocks JSON must be an array",400);return{subject:A.subject,...A.previewText!==void 0&&{previewText:A.previewText},...x!==void 0&&{blocks:x},...A.confirmLiveChange===!0&&{confirmLiveChange:!0}}}function uX0(A){let x=A.isWinner?" winner":"";return` - Variant ${A.label} [${A.id}]${x}`}function aK(A){if(console.log(`${A.name??"A/B Test"} [${A.id}]`),console.log(`Status: ${A.status}`),console.log(`Winner criteria: ${A.winnerCriteria}`),console.log(`Updated: ${dA(A.updatedAt)}`),A.campaignId)console.log(`Campaign: ${A.campaignId}`);if(A.automationNodeId)console.log(`Automation node: ${A.automationNodeId}`);console.log(`Variants: ${A.variants.length}`);for(let x of A.variants)console.log(uX0(x)),console.log(` Email: ${x.emailId}`),console.log(` Subject: ${x.subject||"(no subject)"}`),console.log(` Preview: ${x.previewText??"None"}`),console.log(` Blocks: ${x.blocks.length}`)}function VX(A){return`${A.toFixed(1)}%`}function TX0(A){let x=A.period??(A.start&&A.end?`${A.start} - ${A.end}`:"all time");console.log(`A/B test stats (${x})`),console.log(`Sent: ${A.stats.sent.toLocaleString()}`),console.log(`Delivered: ${A.stats.delivered.toLocaleString()}`),console.log(`Opened: ${A.stats.opened.toLocaleString()} (${VX(A.stats.openRate)})`),console.log(`Clicked: ${A.stats.clicked.toLocaleString()} (${VX(A.stats.clickRate)})`),console.log(),console.log("Variants:");for(let E of A.variants){let g=E.isWinner?" winner":"";console.log(`- Variant ${E.label} [${E.id}]${g}`),console.log(` Subject: ${E.subject||"(no subject)"}`),console.log(` Sent ${E.stats.sent.toLocaleString()}, opened ${E.stats.opened.toLocaleString()} (${VX(E.stats.openRate)}), clicked ${E.stats.clicked.toLocaleString()} (${VX(E.stats.clickRate)})`)}}async function r2(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let B=new URLSearchParams;if(x.sequence)B.set("sequenceId",x.sequence);let Q=await Y0("GET",`/api/v1/ab-tests${B.size>0?`?${B.toString()}`:""}`,void 0,x.company);if(x.json){L0(Q);return}console.log(`A/B tests (${Q.abTests.length})`);for(let D of Q.abTests)console.log(`- ${D.name??"A/B Test"} [${D.id}]`),console.log(` Status: ${D.status}`),console.log(` Variants: ${D.variants.length}`);return}if(A==="create"){let B=await Y0("POST","/api/v1/ab-tests",VX0(x),x.company);if(x.json){L0(B);return}console.log("Created A/B test"),aK(B.abTest);return}if(!x.id)throw new l("A/B test ID is required",400);if(A==="add-variant"){let B=await Y0("POST",`/api/v1/ab-tests/${x.id}/variants`,vX0(x),x.company);if(x.json){L0(B);return}console.log(`Added variant to A/B test ${x.id}`),aK(B.abTest);return}if(A==="delete-variant"){if(!x.variantId)throw new l("Variant ID is required",400);if(!await l9(`Delete variant ${x.variantId} from A/B test ${x.id}?`,x)){console.log("Aborted.");return}let B=x.confirmLiveChange===!0?"?confirmLiveChange=true":"",Q=await Y0("DELETE",`/api/v1/ab-tests/${x.id}/variants/${x.variantId}${B}`,void 0,x.company);if(x.json){L0(Q);return}console.log(`Removed variant ${x.variantId}`),aK(Q.abTest);return}if(A==="delete"){if(!await l9(`Delete A/B test ${x.id}?`,x)){console.log("Aborted.");return}let B=await Y0("DELETE",`/api/v1/ab-tests/${x.id}`,void 0,x.company);if(x.json){L0(B);return}console.log(`Deleted A/B test: ${x.id}`);return}if(A==="get"){let B=await Y0("GET",`/api/v1/ab-tests/${x.id}`,void 0,x.company);if(x.json){L0(B);return}aK(B.abTest);return}if(A==="stats"){let B=new URLSearchParams;if(x.period)B.set("period",x.period);if(x.start)B.set("start",x.start);if(x.end)B.set("end",x.end);if(x.includeBots)B.set("includeMachineEngagement","true");let Q=await Y0("GET",`/api/v1/ab-tests/${x.id}/stats${B.size>0?`?${B.toString()}`:""}`,void 0,x.company);if(x.json){L0(Q);return}TX0(Q);return}if(A==="restart"){if(x.testType!==void 0&&x.testType!=="subject"&&x.testType!=="content")throw new l("--test-type must be subject or content",400);let B=x.testType,Q;if(x.variantCount!==void 0)Q=Number.parseInt(x.variantCount,10);let D;if(x.winnerThreshold!==void 0)D=Number.parseInt(x.winnerThreshold,10);if(Q!==void 0&&(!Number.isInteger(Q)||Q<2||Q>4))throw new l("--variant-count must be an integer from 2 to 4",400);if(D!==void 0&&(!Number.isInteger(D)||D<10||D>1000))throw new l("--winner-threshold must be an integer from 10 to 1000",400);let I=await Y0("POST",`/api/v1/ab-tests/${x.id}/restart`,{sourceVariantId:x.sourceVariant,testType:B,winnerThreshold:D,variantCount:Q},x.company);if(x.json){L0(I);return}console.log(`Started new A/B test: ${I.abTest.id}`),console.log(`Previous test: ${I.previousAbTestId}`),console.log(`Control variant: ${I.sourceVariantId}`),aK(I.abTest);return}if(!x.variantId)throw new l("Variant ID is required",400);let E=lQ({html:x.html,htmlFile:x.htmlFile,blocksJson:x.blocksJson,blocksFile:x.blocksFile});if(x.subject===void 0&&x.previewText===void 0&&E.html===void 0&&E.blocks===void 0)throw new l("Provide at least one of: --subject, --preview-text, --html, --html-file, --blocks-json, --blocks-file",400);let g=await Y0("PATCH",`/api/v1/ab-tests/${x.id}/variants/${x.variantId}`,{subject:x.subject,previewText:x.previewText,html:E.html,blocks:E.blocks,...x.confirmLiveChange===!0&&{confirmLiveChange:!0}},x.company);if(x.json){L0(g);return}console.log(`Updated variant ${g.variant.label}`),console.log(`ID: ${g.variant.id}`),console.log(`Email: ${g.variant.emailId}`),console.log(`Subject: ${g.variant.subject}`)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}var hX0=[{scope:"account:read",label:"Read account",description:"View account and workspace metadata.",group:"account"},{scope:"companies:manage",label:"Manage workspaces",description:"Create and update workspaces available to the key owner.",group:"account"},{scope:"subscribers:read",label:"Read subscribers",description:"View subscriber profiles, notes, list memberships, and activity.",group:"contacts"},{scope:"subscribers:write",label:"Write subscribers",description:"Create, update, tag, and unsubscribe subscribers.",group:"contacts"},{scope:"subscribers:delete",label:"Delete subscribers",description:"Permanently delete subscriber records.",group:"contacts",destructive:!0},{scope:"events:write",label:"Write events",description:"Record subscriber events and event properties.",group:"contacts"},{scope:"automations:trigger",label:"Trigger automations",description:"Allow subscriber, event, commerce, and tag changes to start or continue live automations and opt-in emails.",group:"contacts",liveDelivery:!0},{scope:"tags:read",label:"Read tags",description:"View tag definitions.",group:"contacts"},{scope:"tags:write",label:"Write tags",description:"Create and update tag definitions.",group:"contacts"},{scope:"tags:delete",label:"Delete tags",description:"Delete tag definitions and remove them from subscribers.",group:"contacts",destructive:!0},{scope:"lists:read",label:"Read lists",description:"View subscriber lists.",group:"contacts"},{scope:"lists:write",label:"Write lists",description:"Create, update, and manage subscriber lists.",group:"contacts"},{scope:"lists:delete",label:"Delete lists",description:"Delete subscriber lists.",group:"contacts",destructive:!0},{scope:"segments:read",label:"Read segments",description:"View saved segments and counts.",group:"contacts"},{scope:"segments:write",label:"Write segments",description:"Create and update saved segments.",group:"contacts"},{scope:"segments:delete",label:"Delete segments",description:"Delete saved segments.",group:"contacts",destructive:!0},{scope:"templates:read",label:"Read templates",description:"View reusable email templates.",group:"content"},{scope:"templates:write",label:"Write templates",description:"Create and update reusable email templates.",group:"content"},{scope:"templates:delete",label:"Delete templates",description:"Delete reusable email templates.",group:"content",destructive:!0},{scope:"emails:read",label:"Read emails",description:"View email content and render previews.",group:"content"},{scope:"emails:write",label:"Write emails",description:"Create and update email content.",group:"content"},{scope:"emails:delete",label:"Delete emails",description:"Delete email content records.",group:"content",destructive:!0},{scope:"landing_pages:read",label:"Read landing pages",description:"View landing pages and landing page domains.",group:"content"},{scope:"landing_pages:write",label:"Write landing pages",description:"Create, update, and verify landing pages and domains.",group:"content"},{scope:"landing_pages:delete",label:"Delete landing pages",description:"Delete landing pages and landing page domains.",group:"content",destructive:!0},{scope:"websites:read",label:"Read websites",description:"View discovered website and brand data.",group:"content"},{scope:"websites:write",label:"Write websites",description:"Create and process website records.",group:"content"},{scope:"websites:delete",label:"Delete websites",description:"Delete website records.",group:"content",destructive:!0},{scope:"campaigns:read",label:"Read campaigns",description:"View campaigns and campaign details.",group:"campaigns"},{scope:"campaigns:write",label:"Write campaigns",description:"Create, edit, and duplicate draft campaigns.",group:"campaigns"},{scope:"campaigns:delete",label:"Delete campaigns",description:"Delete campaigns.",group:"campaigns",destructive:!0},{scope:"campaigns:send",label:"Send campaigns",description:"Schedule, resume, pause, cancel, or test live campaign delivery.",group:"campaigns",liveDelivery:!0},{scope:"ab_tests:read",label:"Read A/B tests",description:"View campaign A/B tests and metrics.",group:"campaigns"},{scope:"ab_tests:write",label:"Write A/B tests",description:"Create, update, and run campaign A/B tests.",group:"campaigns"},{scope:"ab_tests:delete",label:"Delete A/B tests",description:"Delete campaign A/B tests and variants.",group:"campaigns",destructive:!0},{scope:"sequences:read",label:"Read sequences",description:"View sequences, steps, and sequence stats.",group:"sequences"},{scope:"sequences:write",label:"Write sequences",description:"Create and edit sequence drafts and steps.",group:"sequences"},{scope:"sequences:delete",label:"Delete sequences",description:"Delete sequences.",group:"sequences",destructive:!0},{scope:"sequences:activate",label:"Activate sequences",description:"Enable, disable, pause, and resume live sequence enrollment.",group:"sequences",liveDelivery:!0},{scope:"sequences:enroll",label:"Enroll subscribers",description:"Manually enroll or cancel subscribers in sequences.",group:"sequences",liveDelivery:!0},{scope:"transactional:read",label:"Read transactional emails",description:"View transactional email templates.",group:"transactional"},{scope:"transactional:write",label:"Write transactional emails",description:"Create and update transactional email templates.",group:"transactional"},{scope:"transactional:delete",label:"Delete transactional emails",description:"Delete transactional email templates.",group:"transactional",destructive:!0},{scope:"transactional:send",label:"Send transactional emails",description:"Send live transactional emails to recipients.",group:"transactional",liveDelivery:!0},{scope:"commerce:read",label:"Read commerce data",description:"View products and commerce records.",group:"commerce"},{scope:"commerce:write",label:"Write commerce data",description:"Push products, customers, orders, checkouts, and stock requests.",group:"commerce"},{scope:"commerce:delete",label:"Delete commerce data",description:"Delete products and commerce records.",group:"commerce",destructive:!0},{scope:"analytics:read",label:"Read analytics",description:"View campaign, sequence, subscriber, and email event analytics.",group:"analytics"},{scope:"audience_syncs:read",label:"Read audience syncs",description:"View external audience sync configuration.",group:"integrations"},{scope:"audience_syncs:write",label:"Write audience syncs",description:"Create, update, and run external audience syncs.",group:"integrations"},{scope:"audience_syncs:delete",label:"Delete audience syncs",description:"Delete external audience syncs.",group:"integrations",destructive:!0},{scope:"integrations:manage",label:"Manage integrations",description:"Manage integration, migration, and connected service setup.",group:"integrations"},{scope:"webhooks:read",label:"Read webhooks",description:"View outbound webhooks and deliveries.",group:"integrations"},{scope:"webhooks:write",label:"Write webhooks",description:"Create, update, and test outbound webhooks.",group:"integrations"},{scope:"webhooks:delete",label:"Delete webhooks",description:"Delete outbound webhooks.",group:"integrations",destructive:!0},{scope:"widgets:read",label:"Read widgets",description:"View widget configuration.",group:"integrations"},{scope:"widgets:write",label:"Write widgets",description:"Create and update widget configuration.",group:"integrations"},{scope:"widgets:delete",label:"Delete widgets",description:"Delete widget configuration.",group:"integrations",destructive:!0},{scope:"conversations:read",label:"Read conversations",description:"View inbound reply conversations.",group:"integrations"},{scope:"conversations:write",label:"Write conversations",description:"Update conversation state and send conversation replies.",group:"integrations",liveDelivery:!0},{scope:"team:read",label:"Read team",description:"View team members and invitations.",group:"admin"},{scope:"team:manage",label:"Manage team",description:"Invite, remove, and update team members.",group:"admin",liveDelivery:!0},{scope:"api_keys:manage",label:"Manage API keys",description:"List, create, and revoke company API keys through the public API.",group:"admin"}],GL=hX0.map((A)=>A.scope),u6A=new Set(GL),ga={full_access:{label:"Full access",description:"Can read, write, manage, and send across the workspace.",scopes:GL},read_only:{label:"Read-only",description:"Can inspect workspace data, but cannot make changes.",scopes:["account:read","subscribers:read","tags:read","lists:read","segments:read","templates:read","emails:read","landing_pages:read","websites:read","campaigns:read","ab_tests:read","sequences:read","transactional:read","commerce:read","analytics:read","audience_syncs:read","webhooks:read","widgets:read","conversations:read","team:read"]},agent_safe:{label:"Safer agent access",description:"Default for AI agents. Can inspect data and draft content without live delivery, destructive deletes, team changes, or API key creation.",scopes:["account:read","subscribers:read","tags:read","lists:read","segments:read","templates:read","templates:write","emails:read","emails:write","landing_pages:read","landing_pages:write","websites:read","campaigns:read","campaigns:write","ab_tests:read","sequences:read","sequences:write","transactional:read","transactional:write","commerce:read","analytics:read","audience_syncs:read","webhooks:read","widgets:read","widgets:write","conversations:read","team:read"]},ai_drafting:{label:"AI drafting",description:"Can inspect data, build subscriber lists, and draft content, campaigns, sequences, and templates without live delivery.",scopes:["account:read","subscribers:read","subscribers:write","tags:read","tags:write","lists:read","lists:write","segments:read","segments:write","templates:read","templates:write","emails:read","emails:write","landing_pages:read","landing_pages:write","websites:read","websites:write","campaigns:read","campaigns:write","ab_tests:read","ab_tests:write","sequences:read","sequences:write","transactional:read","transactional:write","commerce:read","analytics:read","audience_syncs:read","webhooks:read","widgets:read","widgets:write","conversations:read"]},data_ingest_safe:{label:"Data ingest, no automations",description:"Can sync subscribers and events, but cannot start or continue automations.",scopes:["account:read","subscribers:read","subscribers:write","events:write","tags:read","lists:read","segments:read","commerce:read","commerce:write"]},data_ingest_automations:{label:"Data ingest with automations",description:"Can sync subscribers, events, and commerce data that may trigger automations.",scopes:["account:read","subscribers:read","subscribers:write","events:write","automations:trigger","tags:read","tags:write","lists:read","segments:read","commerce:read","commerce:write"]},transactional_sender:{label:"Transactional sender",description:"Can manage and send transactional emails only.",scopes:["account:read","subscribers:read","transactional:read","transactional:write","transactional:send","emails:read","emails:write","analytics:read"]},marketing_sender:{label:"Marketing sender",description:"Can manage and send campaigns and live sequences.",scopes:["account:read","subscribers:read","subscribers:write","events:write","automations:trigger","tags:read","tags:write","lists:read","lists:write","segments:read","segments:write","templates:read","templates:write","emails:read","emails:write","campaigns:read","campaigns:write","campaigns:send","ab_tests:read","ab_tests:write","sequences:read","sequences:write","sequences:activate","sequences:enroll","analytics:read"]}};function bX0(A,x){if(A==null)return x==="full_access";let E=ga[x].scopes;if(A.length!==E.length)return!1;let g=new Set(A);return E.every((B)=>g.has(B))}function kX0(A){if(A==null)return"full_access";for(let x of Object.keys(ga)){if(x==="full_access")continue;if(bX0(A,x))return x}return"custom"}function sK(A){let x=GL.length;if(A==null)return{preset:"full_access",fullAccess:!0,selectedScopeCount:x,currentScopeCount:x,description:"All current and future permissions are enabled."};let E=A.length,g=E===x?`All ${E} current permissions are enabled as a fixed custom selection.`:`${E} of ${x} current permissions are enabled.`;return{preset:kX0(A),fullAccess:!1,selectedScopeCount:E,currentScopeCount:x,description:g}}var g8;(function(A){A[A.AM=0]="AM",A[A.PM=1]="PM"})(g8||(g8={}));var e8;(function(A){A[A.SUNDAY=0]="SUNDAY",A[A.MONDAY=1]="MONDAY",A[A.TUESDAY=2]="TUESDAY",A[A.WEDNESDAY=3]="WEDNESDAY",A[A.THURSDAY=4]="THURSDAY",A[A.FRIDAY=5]="FRIDAY",A[A.SATURDAY=6]="SATURDAY"})(e8||(e8={}));var Y4;(function(A){A[A.JANUARY=1]="JANUARY",A[A.FEBRUARY=2]="FEBRUARY",A[A.MARCH=3]="MARCH",A[A.APRIL=4]="APRIL",A[A.MAY=5]="MAY",A[A.JUNE=6]="JUNE",A[A.JULY=7]="JULY",A[A.AUGUST=8]="AUGUST",A[A.SEPTEMBER=9]="SEPTEMBER",A[A.OCTOBER=10]="OCTOBER",A[A.NOVEMBER=11]="NOVEMBER",A[A.DECEMBER=12]="DECEMBER"})(Y4||(Y4={}));function p7(A,x){A.assign("day",x.getDate()),A.assign("month",x.getMonth()+1),A.assign("year",x.getFullYear())}function vX(A,x){A.assign("hour",x.getHours()),A.assign("minute",x.getMinutes()),A.assign("second",x.getSeconds()),A.assign("millisecond",x.getMilliseconds()),A.assign("meridiem",x.getHours()<12?g8.AM:g8.PM)}function Fg(A,x){A.imply("day",x.getDate()),A.imply("month",x.getMonth()+1),A.imply("year",x.getFullYear())}function oK(A,x){A.imply("hour",x.getHours()),A.imply("minute",x.getMinutes()),A.imply("second",x.getSeconds()),A.imply("millisecond",x.getMilliseconds()),A.imply("meridiem",x.getHours()<12?g8.AM:g8.PM)}var mX0={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:{timezoneOffsetDuringDst:120,timezoneOffsetNonDst:60,dstStart:(A)=>Qa(A,Y4.MARCH,e8.SUNDAY,2),dstEnd:(A)=>Qa(A,Y4.OCTOBER,e8.SUNDAY,3)},CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CT:{timezoneOffsetDuringDst:-300,timezoneOffsetNonDst:-360,dstStart:(A)=>aQ(A,Y4.MARCH,e8.SUNDAY,2,2),dstEnd:(A)=>aQ(A,Y4.NOVEMBER,e8.SUNDAY,1,2)},CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:{timezoneOffsetDuringDst:-240,timezoneOffsetNonDst:-300,dstStart:(A)=>aQ(A,Y4.MARCH,e8.SUNDAY,2,2),dstEnd:(A)=>aQ(A,Y4.NOVEMBER,e8.SUNDAY,1,2)},FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MT:{timezoneOffsetDuringDst:-360,timezoneOffsetNonDst:-420,dstStart:(A)=>aQ(A,Y4.MARCH,e8.SUNDAY,2,2),dstEnd:(A)=>aQ(A,Y4.NOVEMBER,e8.SUNDAY,1,2)},MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:{timezoneOffsetDuringDst:-420,timezoneOffsetNonDst:-480,dstStart:(A)=>aQ(A,Y4.MARCH,e8.SUNDAY,2,2),dstEnd:(A)=>aQ(A,Y4.NOVEMBER,e8.SUNDAY,1,2)},PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function aQ(A,x,E,g,B=0){let Q=0,D=0;while(D<g)if(Q++,new Date(A,x-1,Q).getDay()===E)D++;return new Date(A,x-1,Q,B)}function Qa(A,x,E,g=0){let B=E===0?7:E,Q=new Date(A,x-1+1,1,12),D=Q.getDay()===0?7:Q.getDay(),I;if(D===B)I=7;else if(D<B)I=7+D-B;else I=D-B;return Q.setDate(Q.getDate()-I),new Date(A,x-1,Q.getDate(),g)}function uX(A,x,E={}){if(A==null)return null;if(typeof A==="number")return A;let g=E[A]??mX0[A];if(g==null)return null;if(typeof g=="number")return g;if(x==null)return null;if(x>g.dstStart(x.getFullYear())&&!(x>g.dstEnd(x.getFullYear())))return g.timezoneOffsetDuringDst;return g.timezoneOffsetNonDst}var Da={day:0,second:0,millisecond:0};function Q6(A,x){let E=new Date(A);if(x.y)x.year=x.y,delete x.y;if(x.mo)x.month=x.mo,delete x.mo;if(x.M)x.month=x.M,delete x.M;if(x.w)x.week=x.w,delete x.w;if(x.d)x.day=x.d,delete x.d;if(x.h)x.hour=x.h,delete x.h;if(x.m)x.minute=x.m,delete x.m;if(x.s)x.second=x.s,delete x.s;if(x.ms)x.millisecond=x.ms,delete x.ms;if("year"in x){let g=Math.floor(x.year);E.setFullYear(E.getFullYear()+g);let B=x.year-g;if(B>0)x.month=x?.month??0,x.month+=B*12}if("quarter"in x){let g=Math.floor(x.quarter);E.setMonth(E.getMonth()+g*3)}if("month"in x){let g=Math.floor(x.month);E.setMonth(E.getMonth()+g);let B=x.month-g;if(B>0)x.week=x?.week??0,x.week+=B*4}if("week"in x){let g=Math.floor(x.week);E.setDate(E.getDate()+g*7);let B=x.week-g;if(B>0)x.day=x?.day??0,x.day+=Math.round(B*7)}if("day"in x){let g=Math.floor(x.day);E.setDate(E.getDate()+g);let B=x.day-g;if(B>0)x.hour=x?.hour??0,x.hour+=Math.round(B*24)}if("hour"in x){let g=Math.floor(x.hour);E.setHours(E.getHours()+g);let B=x.hour-g;if(B>0)x.minute=x?.minute??0,x.minute+=Math.round(B*60)}if("minute"in x){let g=Math.floor(x.minute);E.setMinutes(E.getMinutes()+g);let B=x.minute-g;if(B>0)x.second=x?.second??0,x.second+=Math.round(B*60)}if("second"in x){let g=Math.floor(x.second);E.setSeconds(E.getSeconds()+g);let B=x.second-g;if(B>0)x.millisecond=x?.millisecond??0,x.millisecond+=Math.round(B*1000)}if("millisecond"in x){let g=Math.floor(x.millisecond);E.setMilliseconds(E.getMilliseconds()+g)}return E}function sQ(A){let x={};for(let E in A)x[E]=-A[E];return x}class p2{instant;timezoneOffset;constructor(A,x){this.instant=A??new Date,this.timezoneOffset=x??null}static fromDate(A){return new p2(A)}static fromInput(A,x){if(A instanceof Date)return p2.fromDate(A);let E=A?.instant??new Date,g=uX(A?.timezone,E,x);return new p2(E,g)}getDateWithAdjustedTimezone(){let A=new Date(this.instant);if(this.timezoneOffset!==null)A.setMinutes(A.getMinutes()-this.getSystemTimezoneAdjustmentMinute(this.instant));return A}getSystemTimezoneAdjustmentMinute(A,x){if(!A||A.getTime()<0)A=new Date;let E=-A.getTimezoneOffset(),g=x??this.timezoneOffset??E;return E-g}getTimezoneOffset(){return this.timezoneOffset??-this.instant.getTimezoneOffset()}}class I8{knownValues;impliedValues;reference;_tags=new Set;constructor(A,x){if(this.reference=A,this.knownValues={},this.impliedValues={},x)for(let g in x)this.knownValues[g]=x[g];let E=A.getDateWithAdjustedTimezone();this.imply("day",E.getDate()),this.imply("month",E.getMonth()+1),this.imply("year",E.getFullYear()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}static createRelativeFromReference(A,x=Da){let E=Q6(A.getDateWithAdjustedTimezone(),x),g=new I8(A);if(g.addTag("result/relativeDate"),"hour"in x||"minute"in x||"second"in x||"millisecond"in x)g.addTag("result/relativeDateAndTime"),vX(g,E),p7(g,E),g.assign("timezoneOffset",A.getTimezoneOffset());else if(oK(g,E),g.imply("timezoneOffset",A.getTimezoneOffset()),"day"in x)g.assign("day",E.getDate()),g.assign("month",E.getMonth()+1),g.assign("year",E.getFullYear()),g.assign("weekday",E.getDay());else if("week"in x)g.assign("day",E.getDate()),g.assign("month",E.getMonth()+1),g.assign("year",E.getFullYear()),g.imply("weekday",E.getDay());else if(g.imply("day",E.getDate()),"month"in x)g.assign("month",E.getMonth()+1),g.assign("year",E.getFullYear());else if(g.imply("month",E.getMonth()+1),"year"in x)g.assign("year",E.getFullYear());else g.imply("year",E.getFullYear());return g}get(A){if(A in this.knownValues)return this.knownValues[A];if(A in this.impliedValues)return this.impliedValues[A];return null}isCertain(A){return A in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(A,x){if(A in this.knownValues)return this;return this.impliedValues[A]=x,this}assign(A,x){return this.knownValues[A]=x,delete this.impliedValues[A],this}addDurationAsImplied(A){let x=this.dateWithoutTimezoneAdjustment(),E=Q6(x,A);if("day"in A||"week"in A||"month"in A||"year"in A)this.delete(["day","weekday","month","year"]),this.imply("day",E.getDate()),this.imply("weekday",E.getDay()),this.imply("month",E.getMonth()+1),this.imply("year",E.getFullYear());if("second"in A||"minute"in A||"hour"in A)this.delete(["second","minute","hour"]),this.imply("second",E.getSeconds()),this.imply("minute",E.getMinutes()),this.imply("hour",E.getHours());return this}delete(A){if(typeof A==="string")A=[A];for(let x of A)delete this.knownValues[x],delete this.impliedValues[x]}clone(){let A=new I8(this.reference);A.knownValues={},A.impliedValues={};for(let x in this.knownValues)A.knownValues[x]=this.knownValues[x];for(let x in this.impliedValues)A.impliedValues[x]=this.impliedValues[x];return A}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")&&!this.isCertain("year")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isDateWithUnknownYear(){return this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let A=this.dateWithoutTimezoneAdjustment();if(A.getFullYear()!==this.get("year"))return!1;if(A.getMonth()!==this.get("month")-1)return!1;if(A.getDate()!==this.get("day"))return!1;if(this.get("hour")!=null&&A.getHours()!=this.get("hour"))return!1;if(this.get("minute")!=null&&A.getMinutes()!=this.get("minute"))return!1;return!0}toString(){return`[ParsingComponents {
|
|
352
352
|
tags: ${JSON.stringify(Array.from(this._tags).sort())},
|
|
@@ -434,7 +434,7 @@ $ npm install --save-dev react-devtools-core
|
|
|
434
434
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);else throw Error(`Raw mode is not supported on the stdin provided to Ink.
|
|
435
435
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(x.setEncoding("utf8"),A){if(this.rawModeEnabledCount===0)x.ref(),x.setRawMode(!0),x.addListener("readable",this.handleReadable);this.rawModeEnabledCount++;return}if(--this.rawModeEnabledCount===0)x.setRawMode(!1),x.removeListener("readable",this.handleReadable),x.unref()};handleReadable=()=>{let A;while((A=this.props.stdin.read())!==null)this.handleInput(A),this.internal_eventEmitter.emit("input",A)};handleInput=(A)=>{if(A==="\x03"&&this.props.exitOnCtrlC)this.handleExit();if(A===zs0&&this.state.activeFocusId)this.setState({activeFocusId:void 0});if(this.state.isFocusEnabled&&this.state.focusables.length>0){if(A===Rs0)this.focusNext();if(A===Ms0)this.focusPrevious()}};handleExit=(A)=>{if(this.isRawModeSupported())this.handleSetRawMode(!1);this.props.onExit(A)};enableFocus=()=>{this.setState({isFocusEnabled:!0})};disableFocus=()=>{this.setState({isFocusEnabled:!1})};focus=(A)=>{this.setState((x)=>{if(!x.focusables.some((g)=>g?.id===A))return x;return{activeFocusId:A}})};focusNext=()=>{this.setState((A)=>{let x=A.focusables.find((g)=>g.isActive)?.id;return{activeFocusId:this.findNextFocusable(A)??x}})};focusPrevious=()=>{this.setState((A)=>{let x=A.focusables.findLast((g)=>g.isActive)?.id;return{activeFocusId:this.findPreviousFocusable(A)??x}})};addFocusable=(A,{autoFocus:x})=>{this.setState((E)=>{let g=E.activeFocusId;if(!g&&x)g=A;return{activeFocusId:g,focusables:[...E.focusables,{id:A,isActive:!0}]}})};removeFocusable=(A)=>{this.setState((x)=>({activeFocusId:x.activeFocusId===A?void 0:x.activeFocusId,focusables:x.focusables.filter((E)=>{return E.id!==A})}))};activateFocusable=(A)=>{this.setState((x)=>({focusables:x.focusables.map((E)=>{if(E.id!==A)return E;return{id:A,isActive:!0}})}))};deactivateFocusable=(A)=>{this.setState((x)=>({activeFocusId:x.activeFocusId===A?void 0:x.activeFocusId,focusables:x.focusables.map((E)=>{if(E.id!==A)return E;return{id:A,isActive:!1}})}))};findNextFocusable=(A)=>{let x=A.focusables.findIndex((E)=>{return E.id===A.activeFocusId});for(let E=x+1;E<A.focusables.length;E++){let g=A.focusables[E];if(g?.isActive)return g.id}return};findPreviousFocusable=(A)=>{let x=A.focusables.findIndex((E)=>{return E.id===A.activeFocusId});for(let E=x-1;E>=0;E--){let g=A.focusables[E];if(g?.isActive)return g.id}return}}var p70=()=>{};class sW{options;log;throttledLog;isUnmounted;lastOutput;container;rootNode;fullStaticOutput;exitPromise;restoreConsole;unsubscribeResize;constructor(A){if(Uh(this),this.options=A,this.rootNode=UW("ink-root"),this.rootNode.onComputeLayout=this.calculateLayout,this.rootNode.onRender=A.debug?this.onRender:FW(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=Z70.create(A.stdout),this.throttledLog=A.debug?this.log:FW(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=CJ.createContainer(this.rootNode,0,null,!1,null,"id",()=>{},null),this.unsubscribeExit=n70.default(this.unmount,{alwaysLast:!1}),Ss0.env.DEV==="true")CJ.injectIntoDevTools({bundleType:0,version:"16.13.1",rendererPackageName:"ink"});if(A.patchConsole)this.patchConsole();if(!jF)A.stdout.on("resize",this.resized),this.unsubscribeResize=()=>{A.stdout.off("resize",this.resized)}}resized=()=>{this.calculateLayout(),this.onRender()};resolveExitPromise=()=>{};rejectExitPromise=()=>{};unsubscribeExit=()=>{};calculateLayout=()=>{let A=this.options.stdout.columns||80;this.rootNode.yogaNode.setWidth(A),this.rootNode.yogaNode.calculateLayout(void 0,void 0,Zx.DIRECTION_LTR)};onRender=()=>{if(this.isUnmounted)return;let{output:A,outputHeight:x,staticOutput:E}=f70(this.rootNode),g=E&&E!==`
|
|
436
436
|
`;if(this.options.debug){if(g)this.fullStaticOutput+=E;this.options.stdout.write(this.fullStaticOutput+A);return}if(jF){if(g)this.options.stdout.write(E);this.lastOutput=A;return}if(g)this.fullStaticOutput+=E;if(x>=this.options.stdout.rows){this.options.stdout.write(PF.clearTerminal+this.fullStaticOutput+A),this.lastOutput=A;return}if(g)this.log.clear(),this.options.stdout.write(E),this.log(A);if(!g&&A!==this.lastOutput)this.throttledLog(A);this.lastOutput=A};render(A){let x=_70.default.createElement(aW,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},A);CJ.updateContainer(x,this.container,null,p70)}writeToStdout(A){if(this.isUnmounted)return;if(this.options.debug){this.options.stdout.write(A+this.fullStaticOutput+this.lastOutput);return}if(jF){this.options.stdout.write(A);return}this.log.clear(),this.options.stdout.write(A),this.log(this.lastOutput)}writeToStderr(A){if(this.isUnmounted)return;if(this.options.debug){this.options.stderr.write(A),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(jF){this.options.stderr.write(A);return}this.log.clear(),this.options.stderr.write(A),this.log(this.lastOutput)}unmount(A){if(this.isUnmounted)return;if(this.calculateLayout(),this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole==="function")this.restoreConsole();if(typeof this.unsubscribeResize==="function")this.unsubscribeResize();if(jF)this.options.stdout.write(this.lastOutput+`
|
|
437
|
-
`);else if(!this.options.debug)this.log.done();if(this.isUnmounted=!0,CJ.updateContainer(null,this.container,null,p70),fJ.delete(this.options.stdout),A instanceof Error)this.rejectExitPromise(A);else this.resolveExitPromise()}async waitUntilExit(){return this.exitPromise||=new Promise((A,x)=>{this.resolveExitPromise=A,this.rejectExitPromise=x}),this.exitPromise}clear(){if(!jF&&!this.options.debug)this.log.clear()}patchConsole(){if(this.options.debug)return;this.restoreConsole=e60((A,x)=>{if(A==="stdout")this.writeToStdout(x);if(A==="stderr"){if(!x.startsWith("The above error occurred"))this.writeToStderr(x)}})}}var Os0=(A,x)=>{let E={stdout:oW.stdout,stdin:oW.stdin,stderr:oW.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0,...Ps0(x)},g=js0(E.stdout,()=>new sW(E));return g.render(A),{rerender:g.render,unmount(){g.unmount()},waitUntilExit:g.waitUntilExit,cleanup:()=>fJ.delete(E.stdout),clear:g.clear}},$y=Os0,Ps0=(A={})=>{if(A instanceof Ls0)return{stdout:A,stdin:oW.stdin};return A},js0=(A,x)=>{let E=fJ.get(A);if(!E)E=x(),fJ.set(A,E);return E};var tW=kx(xB(),1);var Ns0=kx(xB(),1);var Vs0=kx(xB(),1);var vs0=kx(xB(),1);var bs0=kx(xB(),1);var us0={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"},Ts0=[...Object.values(us0),"backspace"];var hs0=kx(xB(),1);var ks0=kx(xB(),1);var is0=kx(xB(),1);var ms0=kx(xB(),1);var Pb=kx(xB(),1);var cs0=kx(xB(),1);var KJ=kx(xB(),1);var t70=kx(o70(),1);function ps0({type:A="dots"}){let[x,E]=KJ.useState(0),g=t70.default[A];return KJ.useEffect(()=>{let B=setInterval(()=>{E((Q)=>{return Q===g.frames.length-1?0:Q+1})},g.interval);return()=>{clearInterval(B)}},[g]),KJ.default.createElement(hx,null,g.frames[x])}var AR=ps0;var SD=kx(xB(),1);var f1=kx(Hy(),1);function ls0(A,x){return[`Email queued for ${A}`,`Email send ID: ${x}`,`Check status: sequenzy email-sends get ${x}`]}function ds0(A){return A!==null&&typeof A==="object"&&!Array.isArray(A)}function as0(A){let x={};if(A.varsJson){let E;try{E=JSON.parse(A.varsJson)}catch{throw Error("--vars-json must be valid JSON")}if(!ds0(E))throw Error("--vars-json must be a JSON object");x=E}for(let E of A.var??[]){let[g,B]=E.split("=");if(g&&B)x[g]=B}return x}function ss0(A,x){let E=as0(x);if(x.template!==void 0&&(x.subject!==void 0||x.html!==void 0||x.htmlFile!==void 0))throw Error("Use either --template or --subject with --html/--html-file, not both");let g=x.html;if(x.htmlFile)g=ns0(x.htmlFile,"utf-8");if(!x.template&&!g)throw Error("Either --template or --html/--html-file is required");if(!x.template&&!x.subject)throw Error("--subject is required when using --html");return x.template?{to:A,slug:x.template,variables:E}:{to:A,subject:x.subject,body:g,variables:E}}function os0({email:A,options:x}){let[E,g]=SD.useState(!0),[B,Q]=SD.useState(""),[D,I]=SD.useState(!1),[J,K]=SD.useState("");if(SD.useEffect(()=>{async function X(){try{let M=await Y0("POST","/api/v1/transactional/send",ss0(A,x));K(M.emailSendId),I(!0)}catch(M){Q(dK(M))}finally{g(!1)}}X()},[A,x]),SD.useEffect(()=>{if(!E)setTimeout(()=>process.exit(B?1:0),100)},[E,B]),E)return f1.jsxDEV(ZE,{padding:1,children:[f1.jsxDEV(hx,{color:"cyan",children:f1.jsxDEV(AR,{type:"dots"},void 0,!1,void 0,this)},void 0,!1,void 0,this),f1.jsxDEV(hx,{children:[" Sending email to ",A,"..."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);if(B)return f1.jsxDEV(ZE,{padding:1,children:f1.jsxDEV(hx,{color:"red",children:[" ",B]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return f1.jsxDEV(ZE,{padding:1,flexDirection:"column",children:ls0(A,J).map((X,M)=>f1.jsxDEV(hx,{color:M===0?"green":void 0,children:[M===0?" ":"",X]},X,!0,void 0,this))},void 0,!1,void 0,this)}async function e70(A,x){if(!await Cx())YA(Kx()),process.exit(1);await $y(f1.jsxDEV(os0,{email:A,options:x},void 0,!1,void 0,this)).waitUntilExit()}var A20=10,x20=500,ts0=new Set(["unlimited","one_time","matching_field"]),es0={all:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],everyday:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],weekdays:["monday","tuesday","wednesday","thursday","friday"],"working-days":["monday","tuesday","wednesday","thursday","friday"],weekends:["saturday","sunday"]};function E20(A){if(A===void 0)return;if(!ts0.has(A))throw new l("--enrollment-mode must be one of: unlimited, one_time, matching_field",400);return A}function Ao0(A){if(A===void 0)return;let x=[];for(let E of A.split(",")){let g=E.trim().toLowerCase();if(!g)continue;let B=es0[g];if(B){for(let Q of B)if(!x.includes(Q))x.push(Q);continue}if(!x.includes(g))x.push(g)}if(x.length===0)throw new l("--sending-window-days must include at least one day",400);return x}function xo0(A){let x=A.sendingWindowStart!==void 0||A.sendingWindowEnd!==void 0||A.sendingWindowTimezone!==void 0||A.sendingWindowDays!==void 0;if(A.clearSendingWindow&&x)throw new l("Use either --clear-sending-window or --sending-window-* options, not both",400);if(A.clearSendingWindow)return null;if(!x)return;let E=A.sendingWindowStart?.trim(),g=A.sendingWindowEnd?.trim(),B=A.sendingWindowTimezone?.trim();if(!E||!g||!B)throw new l("--sending-window-start, --sending-window-end, and --sending-window-timezone are required together",400);let Q=Ao0(A.sendingWindowDays);return{enabled:!0,timezone:B,startTime:E,endTime:g,...Q!==void 0&&{days:Q}}}function xR(A){if(!A)return"Not restricted";return`${A.startTime}-${A.endTime} ${A.timezone} (${(A.days??["every day"]).join(", ")})`}function Eo0(A){if(A.clearBccEmails&&A.bccEmails!==void 0)throw new l("Use either --clear-bcc-emails or --bcc-emails, not both",400);if(A.clearBccEmails)return null;if(A.bccEmails===void 0)return;let x=Array.from(new Set(A.bccEmails.split(",").map((E)=>E.trim()).filter((E)=>E.length>0)));return x.length>0?x:null}function Nb(A,x){let E=A??"Unknown";return x===!0?`${E} (new enrollments paused)`:E}function Vb(A){if(A===void 0)return;let x=A.trim().toLowerCase();if(x!=="visual"&&x!=="plain")throw new l("--email-style must be 'visual' or 'plain'",400);return x}function B20(A){if(A===void 0)return;if(A!=="sequence_created_at"&&A!=="subscriber_created_at")throw new l("--inactivity-baseline must be 'sequence_created_at' or 'subscriber_created_at'",400);return A}function g20(A){if(A.pauseNewEnrollments&&A.resumeNewEnrollments)throw new l("Provide either --pause-new-enrollments or --resume-new-enrollments, not both",400);if(A.userCancellable&&A.notUserCancellable)throw new l("Provide either --user-cancellable or --not-user-cancellable, not both",400);if(A.clearLabels&&A.label!==void 0)throw new l("Provide either --label or --clear-labels, not both",400);if((A.branchJson!==void 0||A.branchFile!==void 0)&&(A.insertStepsJson!==void 0||A.insertStepsFile!==void 0))throw new l("Provide either --branch-json/--branch-file or --insert-steps-json/--insert-steps-file, not both",400);let x=[A.branchJson!==void 0||A.branchFile!==void 0,A.insertStepsJson!==void 0||A.insertStepsFile!==void 0,A.graphEditJson!==void 0||A.graphEditFile!==void 0].filter(Boolean).length;if(x>1)throw new l("Provide only one of --branch-*, --insert-steps-*, or --graph-edit-*",400);if((A.nodeUpdatesJson!==void 0||A.nodeUpdatesFile!==void 0)&&(A.stepsJson!==void 0||A.stepsFile!==void 0||A.emailsJson!==void 0||A.emailsFile!==void 0||A.smsStepsJson!==void 0||A.smsStepsFile!==void 0||A.subscriberUpdateStepsJson!==void 0||A.subscriberUpdateStepsFile!==void 0||x>0))throw new l("--node-updates-* cannot be combined with legacy step updates or structural graph changes",400);let E=xo0(A),g=Eo0(A);return{...A.name!==void 0&&{name:A.name},...A.description!==void 0&&{description:A.description},...A.label!==void 0&&{labels:A.label},...A.clearLabels===!0&&{labels:[]},...A.userCancellable===!0&&{userCancellable:!0},...A.notUserCancellable===!0&&{userCancellable:!1},...A.trigger!==void 0&&{trigger:A.trigger},...A.goal!==void 0&&A.goal.trim().length>0&&{goal:A.goal.trim()},...M8(A.emailCount,"--email-count")!==void 0&&{emailCount:M8(A.emailCount,"--email-count")},...M8(A.durationDays,"--duration-days")!==void 0&&{durationDays:M8(A.durationDays,"--duration-days")},...Vb(A.emailStyle)!==void 0&&{emailStyle:Vb(A.emailStyle)},...A.pauseNewEnrollments===!0&&{enrollmentPaused:!0},...A.resumeNewEnrollments===!0&&{enrollmentPaused:!1},...A.confirmStructuralChange===!0&&{confirmStructuralChange:!0},...A.confirmLiveChange===!0&&{confirmLiveChange:!0},...E20(A.enrollmentMode)!==void 0&&{enrollmentMode:E20(A.enrollmentMode)},...A.enrollmentFieldPath!==void 0&&{enrollmentFieldPath:A.enrollmentFieldPath},...E!==void 0&&{sendingWindow:E},...g!==void 0&&{bccEmails:g},...A.listId!==void 0&&{listId:A.listId},...A.tagName!==void 0&&{tagName:A.tagName},...A.segmentId!==void 0&&{segmentId:A.segmentId},...A.stopOnSegmentExit!==void 0&&{stopOnSegmentExit:A.stopOnSegmentExit},...A.eventName!==void 0&&{eventName:A.eventName},...A.integrationSlug!==void 0&&{integrationSlug:A.integrationSlug},...A.integrationEventKey!==void 0&&{integrationEventKey:A.integrationEventKey},...gE(A.customIntegrationJson,A.customIntegrationFile,"customIntegration")!==void 0&&{customIntegration:gE(A.customIntegrationJson,A.customIntegrationFile,"customIntegration")},...gE(A.propertyFiltersJson,A.propertyFiltersFile,"propertyFilters")!==void 0&&{propertyFilters:gE(A.propertyFiltersJson,A.propertyFiltersFile,"propertyFilters")},...M8(A.inactiveDays,"--inactive-days")!==void 0&&{inactiveDays:M8(A.inactiveDays,"--inactive-days")},...B20(A.inactivityBaseline)!==void 0&&{inactivityBaseline:B20(A.inactivityBaseline)},...M8(A.minCount,"--min-count")!==void 0&&{minCount:M8(A.minCount,"--min-count")},...M8(A.timeWindowDays,"--time-window-days")!==void 0&&{timeWindowDays:M8(A.timeWindowDays,"--time-window-days")},...gE(A.stepsJson,A.stepsFile,"steps")!==void 0&&{steps:gE(A.stepsJson,A.stepsFile,"steps")},...gE(A.emailsJson,A.emailsFile,"emails")!==void 0&&{emails:gE(A.emailsJson,A.emailsFile,"emails")},...gE(A.smsStepsJson,A.smsStepsFile,"smsSteps")!==void 0&&{smsSteps:gE(A.smsStepsJson,A.smsStepsFile,"smsSteps")},...gE(A.subscriberUpdateStepsJson,A.subscriberUpdateStepsFile,"subscriberUpdateSteps")!==void 0&&{subscriberUpdateSteps:gE(A.subscriberUpdateStepsJson,A.subscriberUpdateStepsFile,"subscriberUpdateSteps")},...gE(A.branchJson,A.branchFile,"branch")!==void 0&&{branch:gE(A.branchJson,A.branchFile,"branch")},...gE(A.insertStepsJson,A.insertStepsFile,"insertSteps")!==void 0&&{insertSteps:gE(A.insertStepsJson,A.insertStepsFile,"insertSteps")},...gE(A.nodeUpdatesJson,A.nodeUpdatesFile,"nodeUpdates")!==void 0&&{nodeUpdates:gE(A.nodeUpdatesJson,A.nodeUpdatesFile,"nodeUpdates")},...gE(A.graphEditJson,A.graphEditFile,"graphEdit")!==void 0&&{graphEdit:gE(A.graphEditJson,A.graphEditFile,"graphEdit")},...gE(A.stopConditionJson,A.stopConditionFile,"stopCondition")!==void 0&&{stopCondition:gE(A.stopConditionJson,A.stopConditionFile,"stopCondition")},...A.fromEmail!==void 0&&{fromEmail:A.fromEmail},...A.fromName!==void 0&&{fromName:A.fromName},...A.senderProfileId!==void 0&&{senderProfileId:A.senderProfileId},...A.replyTo!==void 0&&{replyTo:A.replyTo},...A.replyToName!==void 0&&{replyToName:A.replyToName},...A.replyProfileId!==void 0&&{replyProfileId:A.replyProfileId}}}function Bo0(A){return Array.from(new Set((A??"").split(",").map((x)=>x.trim()).filter((x)=>x.length>0)))}function go0(A){let x=A.subscriberId?.trim(),E=Bo0(A.fieldValues),g=x!==void 0&&x.length>0,B=E.length>0;if(g===B)throw new l("Provide exactly one target: --subscriber-id or --field-values",400);return{...g&&{subscriberId:x},...A.fieldPath!==void 0&&A.fieldPath.trim().length>0&&{fieldPath:A.fieldPath.trim()},...B&&{fieldValues:E},dryRun:A.apply!==!0,...A.reason!==void 0&&A.reason.trim().length>0&&{reason:A.reason.trim()}}}function Qo0(A){let E=Array.isArray(A.email)&&A.email.length>0||A.emailsJson!==void 0||A.emailsFile!==void 0?QW(A):[],g=Array.from(new Set((A.subscriberIds??[]).map((B)=>B.trim()).filter((B)=>B.length>0)));if(E.length===0&&g.length===0)throw new l("Provide at least one email address or subscriber ID",400);return{...E.length>0&&{emails:E},...g.length>0&&{subscriberIds:g},...A.targetNodeId!==void 0&&{targetNodeId:A.targetNodeId}}}function Do0(A){let x=[],E=A.emails??[],g=A.subscriberIds??[],B=0,Q=0;while(B<E.length||Q<g.length){let D=E.slice(B,B+x20);B+=D.length;let I=x20-D.length,J=g.slice(Q,Q+I);Q+=J.length,x.push({...D.length>0&&{emails:D},...J.length>0&&{subscriberIds:J},...A.targetNodeId!==void 0&&{targetNodeId:A.targetNodeId}})}return x}function Co0(A){let x=A.goal?.trim(),E=!!x,g=!!A.stepsJson||!!A.stepsFile;if(E&&g)throw new l("Provide either --goal or --steps-json/--steps-file, not both",400);if(A.emailCount!==void 0&&!E)throw new l("--email-count requires --goal",400);if(A.durationDays!==void 0&&!E)throw new l("--duration-days requires --goal",400);if(A.emailStyle!==void 0&&!E)throw new l("--email-style requires --goal",400);Vb(A.emailStyle);let B=M8(A.emailCount,"--email-count");if(B!==void 0&&B>A20)throw new l(`--email-count must be no more than ${A20}`,400);let Q=M8(A.durationDays,"--duration-days");if(Q!==void 0&&Q<1)throw new l("--duration-days must be at least 1",400);return E?{mode:"goal",goal:x}:g?{mode:"steps"}:{mode:"blank"}}function Fo0(A){if(A.isActive&&A.notActive)throw new l("Provide either --active or --inactive, not both",400);return{...A.name!==void 0&&{name:A.name},...A.description!==void 0&&{description:A.description},...A.triggerType!==void 0&&{triggerType:A.triggerType},...A.triggerEventName!==void 0&&{triggerEventName:A.triggerEventName},...A.attributePath!==void 0&&{attributePath:A.attributePath},...A.attributeCondition!==void 0&&{attributeCondition:A.attributeCondition},...A.attributeValue!==void 0&&{attributeValue:A.attributeValue},...A.attributePreviousValue!==void 0&&{attributePreviousValue:A.attributePreviousValue},...A.eventPropertyName!==void 0&&{eventPropertyName:A.eventPropertyName},...A.eventPropertyLabel!==void 0&&{eventPropertyLabel:A.eventPropertyLabel},...M8(A.attributionWindowHours,"--attribution-window-hours")!==void 0&&{attributionWindowHours:M8(A.attributionWindowHours,"--attribution-window-hours")},...A.isActive&&{isActive:!0},...A.notActive&&{isActive:!1}}}function Io0(A){let x=gE(A.fieldMappingJson,A.fieldMappingFile,"fieldMapping"),E=gE(A.samplePayloadJson,A.samplePayloadFile,"samplePayload");if(A.clearFieldMapping&&x!==void 0)throw new l("Provide either --field-mapping-json/--field-mapping-file or --clear-field-mapping, not both",400);if(A.clearSamplePayload&&E!==void 0)throw new l("Provide either --sample-payload-json/--sample-payload-file or --clear-sample-payload, not both",400);if(x!==void 0&&(typeof x.email!=="string"||!x.email.trim()))throw new l("fieldMapping.email is required",400);return{...A.clearFieldMapping?{fieldMapping:null}:x!==void 0?{fieldMapping:x}:{},...A.clearSamplePayload?{samplePayload:null}:E!==void 0?{samplePayload:E}:{}}}async function E9(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let D=new URLSearchParams;if(x.status)D.set("status",x.status);if(x.search)D.set("search",x.search);if(x.label?.length)D.set("labels",x.label.join(","));if(x.limit)D.set("limit",x.limit);if(x.offset)D.set("offset",x.offset);let I=D.size>0?`?${D.toString()}`:"",J=await Y0("GET",`/api/v1/sequences${I}`,void 0,x.company),K=await CB(x.company),X=K!==void 0?SE({companyId:K}):void 0,M=J.sequences.map((W)=>K!==void 0?MF(W,{sequenceId:W.id},"sequence",K):{...W,url:void 0});if(x.json){L0({...J,sequences:M,...X!==void 0&&{appUrls:X.urls}});return}console.log(`Sequences (${J.sequences.length})`);for(let W of M)console.log(`- ${W.name} [${W.id}]`),console.log(` Status: ${Nb(W.status,W.enrollmentPaused)}`),console.log(` Trigger: ${W.trigger??"Unknown"}`),console.log(` Sending window: ${xR(W.sendingWindow)}`),console.log(` Created: ${dA(W.createdAt)}`),Nx(" URL",W.url);return}if(A==="create"){if(!x.name)throw new l("Sequence name is required",400);let D=Co0(x),I=await Y0("POST","/api/v1/sequences",g20({...x,...D.goal!==void 0&&{goal:D.goal}}),x.company),J=await CB(x.company),K=I.sequence?.id??I.sequenceId,X=J!==void 0&&K!==void 0?SE({companyId:J,sequenceId:K}):void 0;if(x.json){L0({...I,...I.sequence!==void 0&&X?.urls.sequence!==void 0&&{sequence:{...I.sequence,url:X.urls.sequence}},...X!==void 0&&{appUrls:X.urls}});return}if(console.log(`Created sequence: ${I.sequence?.name??x.name}`),console.log(`ID: ${I.sequence?.id??"Unknown"}`),Nx("URL",X?.urls.sequence),console.log(`Status: ${Nb(I.sequence?.status,I.sequence?.enrollmentPaused)}`),I.sequence?.emailCount!==void 0)console.log(`Emails: ${I.sequence.emailCount}`);if(I.sequence?.discountCount!==void 0)console.log(`Discount actions: ${I.sequence.discountCount}`);if("sendingWindow"in(I.sequence??{}))console.log(`Sending window: ${xR(I.sequence?.sendingWindow)}`);if(D.mode==="goal")console.log("Mode: AI-generated");if(I.message)console.log(I.message);return}if(!x.id)throw new l("Sequence ID is required",400);if(A==="goals"){let D=await Y0("GET",`/api/v1/sequences/${x.id}/goals`,void 0,x.company);if(x.json)return L0(D);let I=Array.isArray(D.goals)?D.goals:[];console.log(`Sequence goals (${I.length})`);for(let J of I){if(typeof J!=="object"||J===null)continue;let K=J;console.log(`- ${String(K.name??"Unnamed goal")} [${String(K.id??"unknown")}]`)}return}if(A==="goal-create"||A==="goal-update"){if(A==="goal-create"&&!x.name)throw new l("Goal name is required",400);if(A==="goal-update"&&!x.goalId)throw new l("Goal ID is required",400);let D=await Y0(A==="goal-create"?"POST":"PATCH",`/api/v1/sequences/${x.id}/goals${x.goalId?`/${x.goalId}`:""}`,Fo0(x),x.company);if(x.json)return L0(D);let I=D.goal;if(console.log(`${A==="goal-create"?"Created":"Updated"} sequence goal: ${String(I?.name??x.name??x.goalId)}`),I?.id)console.log(`ID: ${String(I.id)}`);return}if(A==="goal-delete"){if(!x.goalId)throw new l("Goal ID is required",400);let D=await Y0("DELETE",`/api/v1/sequences/${x.id}/goals/${x.goalId}`,void 0,x.company);if(x.json)return L0(D);console.log(`Deleted sequence goal: ${x.goalId}`);return}if(A==="webhook-get"||A==="webhook-configure"||A==="webhook-rotate"){let D=A==="webhook-configure",I=A==="webhook-rotate",J=await Y0(I?"POST":D?"PUT":"GET",`/api/v1/sequences/${x.id}/inbound-webhook${I?"/rotate-secret":""}`,D?Io0(x):void 0,x.company);if(x.json)return L0(J);let K=J.webhook;if(console.log(`${I?"Rotated":D?"Configured":"Sequence"} inbound webhook: ${String(K?.status??"Unknown status")}`),K?.url)console.log(`URL: ${String(K.url)}`);return}if(A==="update"){if(x.name===void 0&&x.description===void 0&&x.label===void 0&&x.clearLabels!==!0&&x.userCancellable!==!0&&x.notUserCancellable!==!0&&x.trigger===void 0&&x.fromEmail===void 0&&x.fromName===void 0&&x.senderProfileId===void 0&&x.replyTo===void 0&&x.replyToName===void 0&&x.replyProfileId===void 0&&x.enrollmentMode===void 0&&x.enrollmentFieldPath===void 0&&x.pauseNewEnrollments!==!0&&x.resumeNewEnrollments!==!0&&x.sendingWindowStart===void 0&&x.sendingWindowEnd===void 0&&x.sendingWindowTimezone===void 0&&x.sendingWindowDays===void 0&&x.clearSendingWindow!==!0&&x.bccEmails===void 0&&x.clearBccEmails!==!0&&!x.stepsJson&&!x.stepsFile&&!x.emailsJson&&!x.emailsFile&&!x.smsStepsJson&&!x.smsStepsFile&&!x.subscriberUpdateStepsJson&&!x.subscriberUpdateStepsFile&&!x.branchJson&&!x.branchFile&&!x.insertStepsJson&&!x.insertStepsFile&&!x.nodeUpdatesJson&&!x.nodeUpdatesFile&&!x.graphEditJson&&!x.graphEditFile&&!x.stopConditionJson&&!x.stopConditionFile)throw new l("Provide at least one sequence metadata, identity, settings, step, nodeUpdates, or graphEdit option",400);let D=await Y0("PUT",`/api/v1/sequences/${x.id}`,g20(x),x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,sequenceId:x.id}):void 0;if(x.json){L0({...D,...D.sequence!==void 0&&J?.urls.sequence!==void 0&&{sequence:{...D.sequence,url:J.urls.sequence}},...J!==void 0&&{appUrls:J.urls}});return}if(console.log(`Updated sequence: ${D.sequence?.name??x.id}`),console.log(`ID: ${D.sequence?.id??x.id}`),Nx("URL",J?.urls.sequence),console.log(`Status: ${D.sequence?.status??"Unknown"}`),"sendingWindow"in(D.sequence??{}))console.log(`Sending window: ${xR(D.sequence?.sendingWindow)}`);if("bccEmails"in(D.sequence??{}))console.log(`BCC: ${D.sequence?.bccEmails?.join(", ")||"None"}`);return}if(A==="pause-enrollments"||A==="resume-enrollments"){let D=await Y0("POST",`/api/v1/sequences/${x.id}/${A}`,void 0,x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,sequenceId:x.id}):void 0;if(x.json){L0({...D,...J!==void 0&&{appUrls:J.urls}});return}console.log(D.message??`Updated sequence ${x.id}`),Nx("URL",J?.urls.sequence);return}if(A==="duplicate"){let D=await Y0("POST",`/api/v1/sequences/${x.id}/duplicate`,x.name===void 0?void 0:{name:x.name},x.company),I=D.sequence?.id??D.sequenceId,J=await CB(x.company),K=J!==void 0&&I!==void 0?SE({companyId:J,sequenceId:I}):void 0;if(x.json){L0({...D,...K!==void 0&&{appUrls:K.urls}});return}if(console.log(`Duplicated sequence: ${D.sequence?.name??I??x.id}`),I)console.log(`ID: ${I}`);Nx("URL",K?.urls.sequence);return}if(A==="archive"||A==="unarchive"){let D=await Y0("POST",`/api/v1/sequences/${x.id}/${A}`,void 0,x.company);if(x.json){L0(D);return}console.log(`${A==="archive"?"Archived":"Restored"} sequence: ${D.sequence?.name??x.id}`);return}if(A==="enable"||A==="disable"){let D=await Y0("POST",`/api/v1/sequences/${x.id}/${A}`,void 0,x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,sequenceId:x.id}):void 0;if(x.json){L0({...D,...J!==void 0&&{appUrls:J.urls}});return}console.log(D.message??`${A}d sequence ${x.id}`),Nx("URL",J?.urls.sequence);return}if(A==="enroll"){let D=Qo0(x),I=Do0(D),J=0,K=0,X=[],M,W;for(let R of I){let O=await Y0("POST",`/api/v1/sequences/${x.id}/enroll`,R,x.company);J+=O.enrolled,K+=O.skipped,X.push(...O.notFound),M??=O.targetNodeId,W??=O.scheduledFor}if(x.json){L0({success:!0,sequenceId:x.id,enrolled:J,skipped:K,notFound:X,...M!==void 0&&{targetNodeId:M},...W!==void 0&&{scheduledFor:W}});return}if(console.log(`Enrolled ${J} subscriber(s) in sequence: ${x.id}`),console.log(`Skipped (already enrolled, inactive, or unavailable): ${K}`),X.length>0){console.log(`Not found: ${X.length}`);for(let R of X.slice(0,10))console.log(`- ${R}`);if(X.length>10)console.log(`...and ${X.length-10} more`)}if(M!==void 0)console.log(`Target node: ${M}`);if(W!==void 0)console.log(`Scheduled for: ${dA(W)}`);return}if(A==="cancel-enrollments"){let D=await Y0("POST",`/api/v1/sequences/${x.id}/enrollments/cancel`,go0(x),x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,sequenceId:x.id}):void 0;if(x.json){L0({...D,...J!==void 0&&{appUrls:J.urls}});return}if(console.log(D.message??"Sequence enrollment cancellation done"),console.log(`Matched: ${D.matchedCount}`),console.log(`Cancelled: ${D.cancelledCount}`),console.log(`Dry run: ${D.dryRun?"yes":"no"}`),D.hasMore)console.log("Only the first matching enrollments are shown.");if((D.enrollments?.length??0)>0){console.log("Enrollments:");for(let K of D.enrollments??[])console.log(`- ${K.tokenId} | ${K.subscriberEmail??K.subscriberId} [${K.status}]`)}Nx("URL",J?.urls.sequence);return}if(A==="delete"){let D=await Y0("DELETE",`/api/v1/sequences/${x.id}`,void 0,x.company);if(x.json){L0(D);return}console.log(D.message??`Deleted sequence ${x.id}`);return}let E=await Y0("GET",`/api/v1/sequences/${x.id}`,void 0,x.company),g=await CB(x.company),B=g!==void 0?SE({companyId:g,sequenceId:x.id}):void 0;if(x.json){L0({...E,...B?.urls.sequence!==void 0&&{sequence:{...E.sequence,url:B.urls.sequence}},...B!==void 0&&{appUrls:B.urls}});return}let Q=E.sequence;if(console.log(Q.name),console.log(`ID: ${Q.id}`),Nx("URL",B?.urls.sequence),console.log(`Status: ${Nb(Q.status,Q.enrollmentPaused)}`),console.log(`Trigger: ${Q.trigger??"Unknown"}`),console.log(`Sending window: ${xR(Q.sendingWindow)}`),console.log(`BCC: ${Q.bccEmails?.join(", ")||"None"}`),console.log(`Created: ${dA(Q.createdAt)}`),console.log(`Enrichment: ${Q.enrichmentStatus} (${Q.enrichedCount}/${Q.emailCount})`),Q.emails.length>0){console.log("Emails:");for(let D of Q.emails){let I=D.stepNumber!==null?`Step ${D.stepNumber}`:`Node ${D.nodeId}`;console.log(`- ${I}`),console.log(` Email ID: ${D.emailId??"None"}`),console.log(` Name: ${D.name??"None"}`),console.log(` Subject: ${D.subject??"None"}`),console.log(` Preview: ${D.previewText??"None"}`),console.log(` Format: ${D.emailPreset==="minimal"?"Minimal":D.emailPreset==="branded"?"Branded":"Unknown"}`),console.log(` Blocks: ${D.blocks.length}`)}}}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Q20(A,x){if(A===void 0)return;let E=A.trim().toLowerCase();if(["on","true","yes","enabled"].includes(E))return!0;if(["off","false","no","disabled"].includes(E))return!1;throw new l(`${x} must be "on" or "off"`,400)}function yy(A,x){if(A===void 0)return;let E=Number(A);if(!Number.isFinite(E)||E<=0)throw new l(`${x} must be a positive number`,400);return E}function wo0(A){let x={};if(A.resetBrowseAbandonment){if(A.browseAbandonment!==void 0||A.browseDelayHours!==void 0||A.browseCooldownHours!==void 0)throw new l("--reset-browse-abandonment cannot be combined with other browse flags",400);x.browseAbandonment=null}else{let E={},g=Q20(A.browseAbandonment,"--browse-abandonment");if(g!==void 0)E.enabled=g;let B=yy(A.browseDelayHours,"--browse-delay-hours");if(B!==void 0)E.delayHours=B;let Q=yy(A.browseCooldownHours,"--browse-cooldown-hours");if(Q!==void 0)E.cooldownHours=Q;if(Object.keys(E).length>0)x.browseAbandonment=E}if(A.resetPriceDrop){if(A.priceDrop!==void 0||A.priceDropMinPercent!==void 0||A.priceDropLookbackDays!==void 0||A.priceDropCooldownDays!==void 0)throw new l("--reset-price-drop cannot be combined with other price-drop flags",400);x.priceDrop=null}else{let E={},g=Q20(A.priceDrop,"--price-drop");if(g!==void 0)E.enabled=g;let B=yy(A.priceDropMinPercent,"--price-drop-min-percent");if(B!==void 0)E.minPercent=B;let Q=yy(A.priceDropLookbackDays,"--price-drop-lookback-days");if(Q!==void 0)E.lookbackDays=Q;let D=yy(A.priceDropCooldownDays,"--price-drop-cooldown-days");if(D!==void 0)E.cooldownDays=D;if(Object.keys(E).length>0)x.priceDrop=E}if(Object.keys(x).length===0)throw new l("Provide at least one settings flag (see --help for the full list)",400);return x}function D20(A){let{browseAbandonment:x,priceDrop:E}=A;console.log(`Shopify automation settings (${A.shopDomain})`),console.log(""),console.log(`Browse abandonment: ${x.enabled?"on":"off"}`),console.log(" Emails shoppers who view a product but don't buy, add to cart, or start checkout."),console.log(` Waits ${x.delayHours}h after the view - at most one email per subscriber per ${x.cooldownHours}h`),console.log(""),console.log(`Price drop alerts: ${E.enabled?"on":"off"}`),console.log(` Emails recent viewers when a product's price falls by ${E.minPercent}% or more.`),console.log(` Audience: viewers from the last ${E.lookbackDays} days - at most one email per product per subscriber per ${E.cooldownDays} days`)}async function vb(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="get"){let B=await Y0("GET","/api/v1/shopify/automation-settings",void 0,x.company);if(x.json){L0(B);return}D20(B);return}let E=wo0(x),g=await Y0("PUT","/api/v1/shopify/automation-settings",E,x.company);if(x.json){L0(g);return}if(g.message)console.log(g.message),console.log("");D20(g)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Jo0(A){let{sms:x}=A;if(console.log(`SMS add-on: ${x.enabled?"enabled":"not enabled"}`),console.log(`Plan eligible: ${x.planEligible?"yes":"no"}`),console.log(`Credits balance: ${x.creditsBalance}`),console.log(`Brand prefix: ${x.brandPrefix??"(not set)"}`),x.numbers.length===0)console.log("Numbers: none");else{console.log("Numbers:");for(let E of x.numbers)console.log(` ${E.e164} (${E.status})`)}console.log(),console.log(A.message)}function fo0(A){return{to:dQ(A.phone??"","Phone number").trim(),text:dQ(A.text??"","--text").trim(),...A.imageUrl&&A.imageUrl.length>0?{imageUrls:A.imageUrl}:{}}}async function ub(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="settings"){let E=await Y0("GET","/api/v1/sms/settings",void 0,x.company);if(x.json){L0(E);return}Jo0(E);return}if(A==="send-test"){let E=await Y0("POST","/api/v1/sms/test",fo0(x),x.company);if(x.json){L0(E);return}console.log(E.message)}}catch(E){YA(E instanceof l?E:E),process.exit(1)}}var mF=kx(xB(),1);var Gx=kx(Hy(),1);function Ko0(A){let x=A.stats;return{sent:x.sent,delivered:x.delivered,opened:x.opened,clicked:x.clicked,replies:x.replies??0,unsubscribed:x.unsubscribed,openRate:x.openRate,clickRate:x.clickRate,replyRate:x.replyRate??0,conversions:x.conversions,revenueCents:x.revenueCents,steps:A.steps,clickedLinks:A.clickedLinks,polls:A.polls}}function Tb(A){let x=new URLSearchParams;if(!A.campaign&&!A.sequence)x.set("period",A.period??"7d");if(A.includeBots)x.set("includeMachineEngagement","true");let E=x.toString();return E?`?${E}`:""}async function C20(A){if(A.campaign)return Y0("GET",`/api/v1/metrics/campaigns/${A.campaign}${Tb(A)}`,void 0,A.company);if(A.sequence)return Y0("GET",`/api/v1/metrics/sequences/${A.sequence}${Tb(A)}`,void 0,A.company);return Y0("GET",`/api/v1/metrics${Tb(A)}`,void 0,A.company)}function $o0({options:A}){let[x,E]=mF.useState(!0),[g,B]=mF.useState(""),[Q,D]=mF.useState(null);if(mF.useEffect(()=>{async function X(){try{let M=await C20(A);D(Ko0(M))}catch(M){B(dK(M instanceof l?M:M))}finally{E(!1)}}X()},[A]),mF.useEffect(()=>{if(!x)setTimeout(()=>process.exit(g?1:0),100)},[x,g]),x)return Gx.jsxDEV(ZE,{padding:1,children:[Gx.jsxDEV(hx,{color:"cyan",children:Gx.jsxDEV(AR,{type:"dots"},void 0,!1,void 0,this)},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:" Loading stats..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(g)return Gx.jsxDEV(ZE,{padding:1,children:Gx.jsxDEV(hx,{color:"red",children:[" ",g]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(!Q)return Gx.jsxDEV(ZE,{padding:1,children:Gx.jsxDEV(hx,{dimColor:!0,children:"No stats available"},void 0,!1,void 0,this)},void 0,!1,void 0,this);let I=A.period??"7d",J=A.campaign?"Campaign Stats":A.sequence?"Sequence Stats":`Stats (${I})`,K=A.sequence&&Q.steps?Q.steps.filter((X)=>(X.failedCount??0)>0):[];return Gx.jsxDEV(ZE,{flexDirection:"column",padding:1,children:[Gx.jsxDEV(ZE,{marginBottom:1,children:[Gx.jsxDEV(hx,{bold:!0,color:"green",children:J},void 0,!1,void 0,this),A.includeBots&&Gx.jsxDEV(hx,{dimColor:!0,children:" including bot/scanner engagement"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{flexDirection:"column",children:[Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Sent: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.sent.toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Delivered: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.delivered.toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Opened: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.opened.toLocaleString()},void 0,!1,void 0,this),Gx.jsxDEV(hx,{dimColor:!0,children:[" (",Q.openRate.toFixed(1),"%)"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Clicked: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.clicked.toLocaleString()},void 0,!1,void 0,this),Gx.jsxDEV(hx,{dimColor:!0,children:[" (",Q.clickRate.toFixed(1),"%)"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Replies: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.replies.toLocaleString()},void 0,!1,void 0,this),Gx.jsxDEV(hx,{dimColor:!0,children:[" (",Q.replyRate.toFixed(1),"%)"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Unsubscribed: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.unsubscribed.toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q.conversions!==void 0&&Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Conversions: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.conversions.toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q.revenueCents!==void 0&&Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Revenue: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:["$",(Q.revenueCents/100).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K.length>0&&Gx.jsxDEV(ZE,{flexDirection:"column",marginTop:1,children:[Gx.jsxDEV(ZE,{marginBottom:1,children:Gx.jsxDEV(hx,{bold:!0,children:"Step Failures"},void 0,!1,void 0,this)},void 0,!1,void 0,this),K.map((X)=>Gx.jsxDEV(ZE,{flexDirection:"column",marginBottom:1,children:[Gx.jsxDEV(hx,{children:["Step ",X.step,": ",X.subject??X.nodeId," (",X.failedCount," failed",")"]},void 0,!0,void 0,this),(X.failedSubscribers??[]).map((M)=>Gx.jsxDEV(ZE,{marginLeft:2,children:Gx.jsxDEV(hx,{children:["- ",M.email??M.subscriberId,":"," ",M.failedReason??"Reason unavailable"]},void 0,!0,void 0,this)},`${X.nodeId}-${M.subscriberId}`,!1,void 0,this)),(X.failedCount??0)>(X.failedSubscribers?.length??0)&&Gx.jsxDEV(ZE,{marginLeft:2,children:Gx.jsxDEV(hx,{dimColor:!0,children:["Showing first ",X.failedSubscribers?.length??0," of"," ",X.failedCount," failed subscribers"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},X.nodeId,!0,void 0,this))]},void 0,!0,void 0,this),Q.clickedLinks&&Q.clickedLinks.length>0&&Gx.jsxDEV(ZE,{flexDirection:"column",marginTop:1,children:[Gx.jsxDEV(ZE,{marginBottom:1,children:Gx.jsxDEV(hx,{bold:!0,children:"Clicked Links"},void 0,!1,void 0,this)},void 0,!1,void 0,this),Q.clickedLinks.map((X)=>Gx.jsxDEV(ZE,{marginLeft:2,children:Gx.jsxDEV(hx,{children:["- ",X.url,": ",X.clicks.toLocaleString()," (",X.percentage.toFixed(1),"%)"]},void 0,!0,void 0,this)},X.url,!1,void 0,this))]},void 0,!0,void 0,this),Q.polls&&Q.polls.length>0&&Gx.jsxDEV(ZE,{flexDirection:"column",marginTop:1,children:[Gx.jsxDEV(ZE,{marginBottom:1,children:Gx.jsxDEV(hx,{bold:!0,children:"Poll & NPS Results"},void 0,!1,void 0,this)},void 0,!1,void 0,this),Q.polls.map((X)=>Gx.jsxDEV(ZE,{flexDirection:"column",marginBottom:1,children:[Gx.jsxDEV(hx,{children:[X.question||"Poll"," (",X.totalResponses," ",X.totalResponses===1?"response":"responses",")"]},void 0,!0,void 0,this),X.nps&&Gx.jsxDEV(ZE,{marginLeft:2,children:Gx.jsxDEV(hx,{children:`NPS: ${X.nps.score>0?"+":""}${X.nps.score} · Average: ${X.nps.average.toFixed(1)} · ${X.nps.promoters} promoters · ${X.nps.passives} passives · ${X.nps.detractors} detractors`},void 0,!1,void 0,this)},void 0,!1,void 0,this),X.answers.map((M)=>Gx.jsxDEV(ZE,{marginLeft:2,children:Gx.jsxDEV(hx,{children:["- ",M.answer,": ",M.responses.toLocaleString()," (",M.percentage,"%)"]},void 0,!0,void 0,this)},M.value,!1,void 0,this))]},X.blockId,!0,void 0,this))]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}async function F20(A){if(!await Cx())YA(Kx()),process.exit(1);if(A.json){try{L0(await C20(A))}catch(E){YA(E),process.exitCode=1}return}await $y(Gx.jsxDEV($o0,{options:A},void 0,!1,void 0,this)).waitUntilExit()}import{basename as Ee0}from"node:path";var I20="process-site";var w20="assess-domain-risk";var J20="assess-domain-risk-sweep";var f20="backfill-ses-tenants";var K20="process-deep-site";var $20="analyze-complaint";var H20="review-bounce-pause";var y20="bulk-import-subscribers";var q20="bulk-unsubscribe-subscribers";var Y20="send-test-email";var X20="send-double-opt-in-email";var U20="optimize-image";var Z20="send-transactional";var G20="process-campaign";var W20="process-campaign-chunk";var R20="send-email";var M20="retry-email-send";var z20="email-send-side-effects";var S20="enrich-sequence";var L20="process-automation-token";var O20="process-sequence-test-run";var P20="blocklist-check";var j20="domain-health-monitor";var N20="dns-verification-checker";var V20="time-trigger-evaluator";var v20="segment-trigger-evaluator";var u20="recurring-campaign-evaluator";var T20="sync-stripe-products";var h20="sync-stripe-revenue",b20="sync-revenue";var k20="sync-supabase-users";var i20="sync-affonso-affiliates";var m20="sync-affonso-affiliate-stats";var c20="sync-shopify";var r20="shopify-sync-phase";var p20="process-shopify-replenishment";var _20="process-commerce-customer-event";var n20="process-browse-abandonment";var l20="process-shopify-webhook";var d20="process-shopify-app-webhook";var a20="process-shopify-app-bulk-identify";var s20="notify-shopify-app-uninstalled";var o20="process-commerce-order";var t20="process-webflow-webhook";var e20="process-webhook-provider";var A10="sync-woocommerce";var x10="process-ab-test";var E10="check-ab-test-winner";var B10="generate-ab-test-variants";var g10="generate-email-image";var Q10="sync-email-localizations";var D10="forward-reply";var C10="cleanup-replies";var F10="cleanup-subscriber-events";var I10="send-conversation-reply";var w10="shopify-post-connect";var J10="stuck-token-sweeper";var f10="reset-free-plan-usage";var K10="detect-subscriber-email-provider";var $10="detect-free-tier-abuse";var H10="usage-limit-alerts";var y10="sync-subscriber-attributes";var q10="deliver-outbound-webhook";var Y10="fetch-provider-migration-data";var X10="execute-provider-migration";var U10="sync-ad-audience";var Z10="ad-audience-sync-scheduler";var G10="track-refgrow-purchase";var W10="send-sms";var R10="provision-sms-account";var M10="process-telnyx-webhook";var z10="poll-mta-reputation";var S10="process-mta-events";var L10="reconcile-mta-cluster";var O10="sweep-mta-events";var P10="sweep-mta-ip-leases";var j10=[S10,O10,P10,z10,L10];var N10="process-poll-response";var wiA=[I20,w20,J20,f20,K20,$20,H20,y20,q20,Y20,X20,U20,Z20,G20,W20,R20,M20,z20,S20,L20,O20,N20,j20,P20,V20,v20,u20,T20,h20,b20,k20,m20,i20,c20,r20,p20,_20,n20,l20,d20,a20,s20,o20,t20,e20,A10,x10,E10,B10,g10,Q10,D10,C10,F10,I10,w10,J10,f10,K10,$10,H10,y10,q10,Y10,X10,G10,U10,Z10,W10,M10,...j10,R10,N10];var h10=kx(hb(),1);var v10=[{id:"light",label:"Light",background:"#f4f4f5"},{id:"dark",label:"Dark",background:"#1e1e2e",color:"#e4e4e7"},{id:"midnight",label:"Midnight",background:"#0d1117",color:"#e6edf3"},{id:"terminal",label:"Terminal",background:"#0c0c0c",color:"#4ade80"},{id:"solarized",label:"Solarized",background:"#fdf6e3",color:"#586e75"}];var qo0=new Map(v10.map((A)=>[A.id,A])),bcA=qo0.get("light")??{id:"light",label:"Light",background:"#f4f4f5"};var b10=kx(bb(),1);var k10=0;function LE(A){return k10+=1,`edge-${A}-${k10}`}function DE(A,x,E="paragraph"){return{id:LE("text"),type:"text",content:A,variant:E,...x?{styles:x}:{}}}function d5(A,x=2,E){return{id:LE("heading"),type:"heading",content:A,level:x,...E?{styles:E}:{}}}function a6(A,x="bullet",E){return{id:LE("list"),type:"list",variant:x,items:A.map((g)=>({id:LE("list-item"),...typeof g==="string"?{content:g}:g})),...E?.color?{color:E.color}:{},...E?.styles?{styles:E.styles}:{}}}function L4(A,x="primary",E){return{id:LE("button"),type:"button",text:A,url:"https://example.com/path?a=1&b=two",variant:x,...E?.buttonColor?{buttonColor:E.buttonColor}:{},...E?.buttonTextColor?{buttonTextColor:E.buttonTextColor}:{},...E?.styles?{styles:E.styles}:{}}}function B2(A,x,E="default",g){return{id:LE("card"),type:"card",title:A,content:x,variant:E,...E==="feature"?{emoji:"✦"}:{},...g?{styles:g}:{}}}function BR(A,x,E,g){return{id:LE("cta"),type:"cta",title:A,description:x,buttonText:"Take action",buttonUrl:"https://example.com/action",...g?.buttonColor?{buttonColor:g.buttonColor}:{},...g?.buttonTextColor?{buttonTextColor:g.buttonTextColor}:{},...E?{styles:E}:{}}}function B9(A,x){return{id:LE("columns"),type:"columns",columns:A,...x?.gap!==void 0?{gap:x.gap}:{},...x?.gapMode?{gapMode:x.gapMode}:{},...x?.styles?{styles:x.styles}:{}}}function qE(A,x){return{id:LE("column"),children:A,...x}}var yt0=[{slug:"literal-lf",description:"Literal LF between text runs",content:`First line
|
|
437
|
+
`);else if(!this.options.debug)this.log.done();if(this.isUnmounted=!0,CJ.updateContainer(null,this.container,null,p70),fJ.delete(this.options.stdout),A instanceof Error)this.rejectExitPromise(A);else this.resolveExitPromise()}async waitUntilExit(){return this.exitPromise||=new Promise((A,x)=>{this.resolveExitPromise=A,this.rejectExitPromise=x}),this.exitPromise}clear(){if(!jF&&!this.options.debug)this.log.clear()}patchConsole(){if(this.options.debug)return;this.restoreConsole=e60((A,x)=>{if(A==="stdout")this.writeToStdout(x);if(A==="stderr"){if(!x.startsWith("The above error occurred"))this.writeToStderr(x)}})}}var Os0=(A,x)=>{let E={stdout:oW.stdout,stdin:oW.stdin,stderr:oW.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0,...Ps0(x)},g=js0(E.stdout,()=>new sW(E));return g.render(A),{rerender:g.render,unmount(){g.unmount()},waitUntilExit:g.waitUntilExit,cleanup:()=>fJ.delete(E.stdout),clear:g.clear}},$y=Os0,Ps0=(A={})=>{if(A instanceof Ls0)return{stdout:A,stdin:oW.stdin};return A},js0=(A,x)=>{let E=fJ.get(A);if(!E)E=x(),fJ.set(A,E);return E};var tW=kx(xB(),1);var Ns0=kx(xB(),1);var Vs0=kx(xB(),1);var vs0=kx(xB(),1);var bs0=kx(xB(),1);var us0={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"},Ts0=[...Object.values(us0),"backspace"];var hs0=kx(xB(),1);var ks0=kx(xB(),1);var is0=kx(xB(),1);var ms0=kx(xB(),1);var Pb=kx(xB(),1);var cs0=kx(xB(),1);var KJ=kx(xB(),1);var t70=kx(o70(),1);function ps0({type:A="dots"}){let[x,E]=KJ.useState(0),g=t70.default[A];return KJ.useEffect(()=>{let B=setInterval(()=>{E((Q)=>{return Q===g.frames.length-1?0:Q+1})},g.interval);return()=>{clearInterval(B)}},[g]),KJ.default.createElement(hx,null,g.frames[x])}var AR=ps0;var SD=kx(xB(),1);var f1=kx(Hy(),1);function ls0(A,x){return[`Email queued for ${A}`,`Email send ID: ${x}`,`Check status: sequenzy email-sends get ${x}`]}function ds0(A){return A!==null&&typeof A==="object"&&!Array.isArray(A)}function as0(A){let x={};if(A.varsJson){let E;try{E=JSON.parse(A.varsJson)}catch{throw Error("--vars-json must be valid JSON")}if(!ds0(E))throw Error("--vars-json must be a JSON object");x=E}for(let E of A.var??[]){let[g,B]=E.split("=");if(g&&B)x[g]=B}return x}function ss0(A,x){let E=as0(x);if(x.template!==void 0&&(x.subject!==void 0||x.html!==void 0||x.htmlFile!==void 0))throw Error("Use either --template or --subject with --html/--html-file, not both");let g=x.html;if(x.htmlFile)g=ns0(x.htmlFile,"utf-8");if(!x.template&&!g)throw Error("Either --template or --html/--html-file is required");if(!x.template&&!x.subject)throw Error("--subject is required when using --html");return x.template?{to:A,slug:x.template,variables:E}:{to:A,subject:x.subject,body:g,variables:E}}function os0({email:A,options:x}){let[E,g]=SD.useState(!0),[B,Q]=SD.useState(""),[D,I]=SD.useState(!1),[J,K]=SD.useState("");if(SD.useEffect(()=>{async function X(){try{let M=await Y0("POST","/api/v1/transactional/send",ss0(A,x));K(M.emailSendId),I(!0)}catch(M){Q(dK(M))}finally{g(!1)}}X()},[A,x]),SD.useEffect(()=>{if(!E)setTimeout(()=>process.exit(B?1:0),100)},[E,B]),E)return f1.jsxDEV(ZE,{padding:1,children:[f1.jsxDEV(hx,{color:"cyan",children:f1.jsxDEV(AR,{type:"dots"},void 0,!1,void 0,this)},void 0,!1,void 0,this),f1.jsxDEV(hx,{children:[" Sending email to ",A,"..."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);if(B)return f1.jsxDEV(ZE,{padding:1,children:f1.jsxDEV(hx,{color:"red",children:[" ",B]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return f1.jsxDEV(ZE,{padding:1,flexDirection:"column",children:ls0(A,J).map((X,M)=>f1.jsxDEV(hx,{color:M===0?"green":void 0,children:[M===0?" ":"",X]},X,!0,void 0,this))},void 0,!1,void 0,this)}async function e70(A,x){if(!await Cx())YA(Kx()),process.exit(1);await $y(f1.jsxDEV(os0,{email:A,options:x},void 0,!1,void 0,this)).waitUntilExit()}var A20=10,x20=500,ts0=new Set(["unlimited","one_time","matching_field"]),es0={all:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],everyday:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],weekdays:["monday","tuesday","wednesday","thursday","friday"],"working-days":["monday","tuesday","wednesday","thursday","friday"],weekends:["saturday","sunday"]};function E20(A){if(A===void 0)return;if(!ts0.has(A))throw new l("--enrollment-mode must be one of: unlimited, one_time, matching_field",400);return A}function Ao0(A){if(A===void 0)return;let x=[];for(let E of A.split(",")){let g=E.trim().toLowerCase();if(!g)continue;let B=es0[g];if(B){for(let Q of B)if(!x.includes(Q))x.push(Q);continue}if(!x.includes(g))x.push(g)}if(x.length===0)throw new l("--sending-window-days must include at least one day",400);return x}function xo0(A){let x=A.sendingWindowStart!==void 0||A.sendingWindowEnd!==void 0||A.sendingWindowTimezone!==void 0||A.sendingWindowDays!==void 0;if(A.clearSendingWindow&&x)throw new l("Use either --clear-sending-window or --sending-window-* options, not both",400);if(A.clearSendingWindow)return null;if(!x)return;let E=A.sendingWindowStart?.trim(),g=A.sendingWindowEnd?.trim(),B=A.sendingWindowTimezone?.trim();if(!E||!g||!B)throw new l("--sending-window-start, --sending-window-end, and --sending-window-timezone are required together",400);let Q=Ao0(A.sendingWindowDays);return{enabled:!0,timezone:B,startTime:E,endTime:g,...Q!==void 0&&{days:Q}}}function xR(A){if(!A)return"Not restricted";return`${A.startTime}-${A.endTime} ${A.timezone} (${(A.days??["every day"]).join(", ")})`}function Eo0(A){if(A.clearBccEmails&&A.bccEmails!==void 0)throw new l("Use either --clear-bcc-emails or --bcc-emails, not both",400);if(A.clearBccEmails)return null;if(A.bccEmails===void 0)return;let x=Array.from(new Set(A.bccEmails.split(",").map((E)=>E.trim()).filter((E)=>E.length>0)));return x.length>0?x:null}function Nb(A,x){let E=A??"Unknown";return x===!0?`${E} (new enrollments paused)`:E}function Vb(A){if(A===void 0)return;let x=A.trim().toLowerCase();if(x!=="visual"&&x!=="plain")throw new l("--email-style must be 'visual' or 'plain'",400);return x}function B20(A){if(A===void 0)return;if(A!=="sequence_created_at"&&A!=="subscriber_created_at")throw new l("--inactivity-baseline must be 'sequence_created_at' or 'subscriber_created_at'",400);return A}function g20(A){if(A.pauseNewEnrollments&&A.resumeNewEnrollments)throw new l("Provide either --pause-new-enrollments or --resume-new-enrollments, not both",400);if(A.userCancellable&&A.notUserCancellable)throw new l("Provide either --user-cancellable or --not-user-cancellable, not both",400);if(A.clearLabels&&A.label!==void 0)throw new l("Provide either --label or --clear-labels, not both",400);if((A.branchJson!==void 0||A.branchFile!==void 0)&&(A.insertStepsJson!==void 0||A.insertStepsFile!==void 0))throw new l("Provide either --branch-json/--branch-file or --insert-steps-json/--insert-steps-file, not both",400);let x=[A.branchJson!==void 0||A.branchFile!==void 0,A.insertStepsJson!==void 0||A.insertStepsFile!==void 0,A.graphEditJson!==void 0||A.graphEditFile!==void 0].filter(Boolean).length;if(x>1)throw new l("Provide only one of --branch-*, --insert-steps-*, or --graph-edit-*",400);if((A.nodeUpdatesJson!==void 0||A.nodeUpdatesFile!==void 0)&&(A.stepsJson!==void 0||A.stepsFile!==void 0||A.emailsJson!==void 0||A.emailsFile!==void 0||A.smsStepsJson!==void 0||A.smsStepsFile!==void 0||A.subscriberUpdateStepsJson!==void 0||A.subscriberUpdateStepsFile!==void 0||x>0))throw new l("--node-updates-* cannot be combined with legacy step updates or structural graph changes",400);let E=xo0(A),g=Eo0(A);return{...A.name!==void 0&&{name:A.name},...A.description!==void 0&&{description:A.description},...A.label!==void 0&&{labels:A.label},...A.clearLabels===!0&&{labels:[]},...A.userCancellable===!0&&{userCancellable:!0},...A.notUserCancellable===!0&&{userCancellable:!1},...A.trigger!==void 0&&{trigger:A.trigger},...A.goal!==void 0&&A.goal.trim().length>0&&{goal:A.goal.trim()},...M8(A.emailCount,"--email-count")!==void 0&&{emailCount:M8(A.emailCount,"--email-count")},...M8(A.durationDays,"--duration-days")!==void 0&&{durationDays:M8(A.durationDays,"--duration-days")},...Vb(A.emailStyle)!==void 0&&{emailStyle:Vb(A.emailStyle)},...A.pauseNewEnrollments===!0&&{enrollmentPaused:!0},...A.resumeNewEnrollments===!0&&{enrollmentPaused:!1},...A.confirmStructuralChange===!0&&{confirmStructuralChange:!0},...A.confirmLiveChange===!0&&{confirmLiveChange:!0},...E20(A.enrollmentMode)!==void 0&&{enrollmentMode:E20(A.enrollmentMode)},...A.enrollmentFieldPath!==void 0&&{enrollmentFieldPath:A.enrollmentFieldPath},...E!==void 0&&{sendingWindow:E},...g!==void 0&&{bccEmails:g},...A.listId!==void 0&&{listId:A.listId},...A.tagName!==void 0&&{tagName:A.tagName},...A.segmentId!==void 0&&{segmentId:A.segmentId},...A.stopOnSegmentExit!==void 0&&{stopOnSegmentExit:A.stopOnSegmentExit},...A.eventName!==void 0&&{eventName:A.eventName},...A.integrationSlug!==void 0&&{integrationSlug:A.integrationSlug},...A.integrationEventKey!==void 0&&{integrationEventKey:A.integrationEventKey},...gE(A.customIntegrationJson,A.customIntegrationFile,"customIntegration")!==void 0&&{customIntegration:gE(A.customIntegrationJson,A.customIntegrationFile,"customIntegration")},...gE(A.propertyFiltersJson,A.propertyFiltersFile,"propertyFilters")!==void 0&&{propertyFilters:gE(A.propertyFiltersJson,A.propertyFiltersFile,"propertyFilters")},...M8(A.inactiveDays,"--inactive-days")!==void 0&&{inactiveDays:M8(A.inactiveDays,"--inactive-days")},...B20(A.inactivityBaseline)!==void 0&&{inactivityBaseline:B20(A.inactivityBaseline)},...M8(A.minCount,"--min-count")!==void 0&&{minCount:M8(A.minCount,"--min-count")},...M8(A.timeWindowDays,"--time-window-days")!==void 0&&{timeWindowDays:M8(A.timeWindowDays,"--time-window-days")},...gE(A.stepsJson,A.stepsFile,"steps")!==void 0&&{steps:gE(A.stepsJson,A.stepsFile,"steps")},...gE(A.emailsJson,A.emailsFile,"emails")!==void 0&&{emails:gE(A.emailsJson,A.emailsFile,"emails")},...gE(A.smsStepsJson,A.smsStepsFile,"smsSteps")!==void 0&&{smsSteps:gE(A.smsStepsJson,A.smsStepsFile,"smsSteps")},...gE(A.subscriberUpdateStepsJson,A.subscriberUpdateStepsFile,"subscriberUpdateSteps")!==void 0&&{subscriberUpdateSteps:gE(A.subscriberUpdateStepsJson,A.subscriberUpdateStepsFile,"subscriberUpdateSteps")},...gE(A.branchJson,A.branchFile,"branch")!==void 0&&{branch:gE(A.branchJson,A.branchFile,"branch")},...gE(A.insertStepsJson,A.insertStepsFile,"insertSteps")!==void 0&&{insertSteps:gE(A.insertStepsJson,A.insertStepsFile,"insertSteps")},...gE(A.nodeUpdatesJson,A.nodeUpdatesFile,"nodeUpdates")!==void 0&&{nodeUpdates:gE(A.nodeUpdatesJson,A.nodeUpdatesFile,"nodeUpdates")},...gE(A.graphEditJson,A.graphEditFile,"graphEdit")!==void 0&&{graphEdit:gE(A.graphEditJson,A.graphEditFile,"graphEdit")},...gE(A.stopConditionJson,A.stopConditionFile,"stopCondition")!==void 0&&{stopCondition:gE(A.stopConditionJson,A.stopConditionFile,"stopCondition")},...A.fromEmail!==void 0&&{fromEmail:A.fromEmail},...A.fromName!==void 0&&{fromName:A.fromName},...A.senderProfileId!==void 0&&{senderProfileId:A.senderProfileId},...A.replyTo!==void 0&&{replyTo:A.replyTo},...A.replyToName!==void 0&&{replyToName:A.replyToName},...A.replyProfileId!==void 0&&{replyProfileId:A.replyProfileId}}}function Bo0(A){return Array.from(new Set((A??"").split(",").map((x)=>x.trim()).filter((x)=>x.length>0)))}function go0(A){let x=A.subscriberId?.trim(),E=Bo0(A.fieldValues),g=x!==void 0&&x.length>0,B=E.length>0;if(g===B)throw new l("Provide exactly one target: --subscriber-id or --field-values",400);return{...g&&{subscriberId:x},...A.fieldPath!==void 0&&A.fieldPath.trim().length>0&&{fieldPath:A.fieldPath.trim()},...B&&{fieldValues:E},dryRun:A.apply!==!0,...A.reason!==void 0&&A.reason.trim().length>0&&{reason:A.reason.trim()}}}function Qo0(A){let E=Array.isArray(A.email)&&A.email.length>0||A.emailsJson!==void 0||A.emailsFile!==void 0?QW(A):[],g=Array.from(new Set((A.subscriberIds??[]).map((B)=>B.trim()).filter((B)=>B.length>0)));if(E.length===0&&g.length===0)throw new l("Provide at least one email address or subscriber ID",400);return{...E.length>0&&{emails:E},...g.length>0&&{subscriberIds:g},...A.targetNodeId!==void 0&&{targetNodeId:A.targetNodeId}}}function Do0(A){let x=[],E=A.emails??[],g=A.subscriberIds??[],B=0,Q=0;while(B<E.length||Q<g.length){let D=E.slice(B,B+x20);B+=D.length;let I=x20-D.length,J=g.slice(Q,Q+I);Q+=J.length,x.push({...D.length>0&&{emails:D},...J.length>0&&{subscriberIds:J},...A.targetNodeId!==void 0&&{targetNodeId:A.targetNodeId}})}return x}function Co0(A){let x=A.goal?.trim(),E=!!x,g=!!A.stepsJson||!!A.stepsFile;if(E&&g)throw new l("Provide either --goal or --steps-json/--steps-file, not both",400);if(A.emailCount!==void 0&&!E)throw new l("--email-count requires --goal",400);if(A.durationDays!==void 0&&!E)throw new l("--duration-days requires --goal",400);if(A.emailStyle!==void 0&&!E)throw new l("--email-style requires --goal",400);Vb(A.emailStyle);let B=M8(A.emailCount,"--email-count");if(B!==void 0&&B>A20)throw new l(`--email-count must be no more than ${A20}`,400);let Q=M8(A.durationDays,"--duration-days");if(Q!==void 0&&Q<1)throw new l("--duration-days must be at least 1",400);return E?{mode:"goal",goal:x}:g?{mode:"steps"}:{mode:"blank"}}function Fo0(A){if(A.isActive&&A.notActive)throw new l("Provide either --active or --inactive, not both",400);return{...A.name!==void 0&&{name:A.name},...A.description!==void 0&&{description:A.description},...A.triggerType!==void 0&&{triggerType:A.triggerType},...A.triggerEventName!==void 0&&{triggerEventName:A.triggerEventName},...A.attributePath!==void 0&&{attributePath:A.attributePath},...A.attributeCondition!==void 0&&{attributeCondition:A.attributeCondition},...A.attributeValue!==void 0&&{attributeValue:A.attributeValue},...A.attributePreviousValue!==void 0&&{attributePreviousValue:A.attributePreviousValue},...A.eventPropertyName!==void 0&&{eventPropertyName:A.eventPropertyName},...A.eventPropertyLabel!==void 0&&{eventPropertyLabel:A.eventPropertyLabel},...M8(A.attributionWindowHours,"--attribution-window-hours")!==void 0&&{attributionWindowHours:M8(A.attributionWindowHours,"--attribution-window-hours")},...A.isActive&&{isActive:!0},...A.notActive&&{isActive:!1}}}function Io0(A){let x=gE(A.fieldMappingJson,A.fieldMappingFile,"fieldMapping"),E=gE(A.samplePayloadJson,A.samplePayloadFile,"samplePayload");if(A.clearFieldMapping&&x!==void 0)throw new l("Provide either --field-mapping-json/--field-mapping-file or --clear-field-mapping, not both",400);if(A.clearSamplePayload&&E!==void 0)throw new l("Provide either --sample-payload-json/--sample-payload-file or --clear-sample-payload, not both",400);if(x!==void 0&&(typeof x.email!=="string"||!x.email.trim()))throw new l("fieldMapping.email is required",400);return{...A.clearFieldMapping?{fieldMapping:null}:x!==void 0?{fieldMapping:x}:{},...A.clearSamplePayload?{samplePayload:null}:E!==void 0?{samplePayload:E}:{}}}async function E9(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let D=new URLSearchParams;if(x.status)D.set("status",x.status);if(x.search)D.set("search",x.search);if(x.label?.length)D.set("labels",x.label.join(","));if(x.limit)D.set("limit",x.limit);if(x.offset)D.set("offset",x.offset);let I=D.size>0?`?${D.toString()}`:"",J=await Y0("GET",`/api/v1/sequences${I}`,void 0,x.company),K=await CB(x.company),X=K!==void 0?SE({companyId:K}):void 0,M=J.sequences.map((W)=>K!==void 0?MF(W,{sequenceId:W.id},"sequence",K):{...W,url:void 0});if(x.json){L0({...J,sequences:M,...X!==void 0&&{appUrls:X.urls}});return}console.log(`Sequences (${J.sequences.length})`);for(let W of M)console.log(`- ${W.name} [${W.id}]`),console.log(` Status: ${Nb(W.status,W.enrollmentPaused)}`),console.log(` Trigger: ${W.trigger??"Unknown"}`),console.log(` Sending window: ${xR(W.sendingWindow)}`),console.log(` Created: ${dA(W.createdAt)}`),Nx(" URL",W.url);return}if(A==="create"){if(!x.name)throw new l("Sequence name is required",400);let D=Co0(x),I=await Y0("POST","/api/v1/sequences",g20({...x,...D.goal!==void 0&&{goal:D.goal}}),x.company),J=await CB(x.company),K=I.sequence?.id??I.sequenceId,X=J!==void 0&&K!==void 0?SE({companyId:J,sequenceId:K}):void 0;if(x.json){L0({...I,...I.sequence!==void 0&&X?.urls.sequence!==void 0&&{sequence:{...I.sequence,url:X.urls.sequence}},...X!==void 0&&{appUrls:X.urls}});return}if(console.log(`Created sequence: ${I.sequence?.name??x.name}`),console.log(`ID: ${I.sequence?.id??"Unknown"}`),Nx("URL",X?.urls.sequence),console.log(`Status: ${Nb(I.sequence?.status,I.sequence?.enrollmentPaused)}`),I.sequence?.emailCount!==void 0)console.log(`Emails: ${I.sequence.emailCount}`);if(I.sequence?.discountCount!==void 0)console.log(`Discount actions: ${I.sequence.discountCount}`);if("sendingWindow"in(I.sequence??{}))console.log(`Sending window: ${xR(I.sequence?.sendingWindow)}`);if(D.mode==="goal")console.log("Mode: AI-generated");if(I.message)console.log(I.message);return}if(!x.id)throw new l("Sequence ID is required",400);if(A==="goals"){let D=await Y0("GET",`/api/v1/sequences/${x.id}/goals`,void 0,x.company);if(x.json)return L0(D);let I=Array.isArray(D.goals)?D.goals:[];console.log(`Sequence goals (${I.length})`);for(let J of I){if(typeof J!=="object"||J===null)continue;let K=J;console.log(`- ${String(K.name??"Unnamed goal")} [${String(K.id??"unknown")}]`)}return}if(A==="goal-create"||A==="goal-update"){if(A==="goal-create"&&!x.name)throw new l("Goal name is required",400);if(A==="goal-update"&&!x.goalId)throw new l("Goal ID is required",400);let D=await Y0(A==="goal-create"?"POST":"PATCH",`/api/v1/sequences/${x.id}/goals${x.goalId?`/${x.goalId}`:""}`,Fo0(x),x.company);if(x.json)return L0(D);let I=D.goal;if(console.log(`${A==="goal-create"?"Created":"Updated"} sequence goal: ${String(I?.name??x.name??x.goalId)}`),I?.id)console.log(`ID: ${String(I.id)}`);return}if(A==="goal-delete"){if(!x.goalId)throw new l("Goal ID is required",400);let D=await Y0("DELETE",`/api/v1/sequences/${x.id}/goals/${x.goalId}`,void 0,x.company);if(x.json)return L0(D);console.log(`Deleted sequence goal: ${x.goalId}`);return}if(A==="webhook-get"||A==="webhook-configure"||A==="webhook-rotate"){let D=A==="webhook-configure",I=A==="webhook-rotate",J=await Y0(I?"POST":D?"PUT":"GET",`/api/v1/sequences/${x.id}/inbound-webhook${I?"/rotate-secret":""}`,D?Io0(x):void 0,x.company);if(x.json)return L0(J);let K=J.webhook;if(console.log(`${I?"Rotated":D?"Configured":"Sequence"} inbound webhook: ${String(K?.status??"Unknown status")}`),K?.url)console.log(`URL: ${String(K.url)}`);return}if(A==="update"){if(x.name===void 0&&x.description===void 0&&x.label===void 0&&x.clearLabels!==!0&&x.userCancellable!==!0&&x.notUserCancellable!==!0&&x.trigger===void 0&&x.fromEmail===void 0&&x.fromName===void 0&&x.senderProfileId===void 0&&x.replyTo===void 0&&x.replyToName===void 0&&x.replyProfileId===void 0&&x.enrollmentMode===void 0&&x.enrollmentFieldPath===void 0&&x.pauseNewEnrollments!==!0&&x.resumeNewEnrollments!==!0&&x.sendingWindowStart===void 0&&x.sendingWindowEnd===void 0&&x.sendingWindowTimezone===void 0&&x.sendingWindowDays===void 0&&x.clearSendingWindow!==!0&&x.bccEmails===void 0&&x.clearBccEmails!==!0&&!x.stepsJson&&!x.stepsFile&&!x.emailsJson&&!x.emailsFile&&!x.smsStepsJson&&!x.smsStepsFile&&!x.subscriberUpdateStepsJson&&!x.subscriberUpdateStepsFile&&!x.branchJson&&!x.branchFile&&!x.insertStepsJson&&!x.insertStepsFile&&!x.nodeUpdatesJson&&!x.nodeUpdatesFile&&!x.graphEditJson&&!x.graphEditFile&&!x.stopConditionJson&&!x.stopConditionFile)throw new l("Provide at least one sequence metadata, identity, settings, step, nodeUpdates, or graphEdit option",400);let D=await Y0("PUT",`/api/v1/sequences/${x.id}`,g20(x),x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,sequenceId:x.id}):void 0;if(x.json){L0({...D,...D.sequence!==void 0&&J?.urls.sequence!==void 0&&{sequence:{...D.sequence,url:J.urls.sequence}},...J!==void 0&&{appUrls:J.urls}});return}if(console.log(`Updated sequence: ${D.sequence?.name??x.id}`),console.log(`ID: ${D.sequence?.id??x.id}`),Nx("URL",J?.urls.sequence),console.log(`Status: ${D.sequence?.status??"Unknown"}`),"sendingWindow"in(D.sequence??{}))console.log(`Sending window: ${xR(D.sequence?.sendingWindow)}`);if("bccEmails"in(D.sequence??{}))console.log(`BCC: ${D.sequence?.bccEmails?.join(", ")||"None"}`);return}if(A==="pause-enrollments"||A==="resume-enrollments"){let D=await Y0("POST",`/api/v1/sequences/${x.id}/${A}`,void 0,x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,sequenceId:x.id}):void 0;if(x.json){L0({...D,...J!==void 0&&{appUrls:J.urls}});return}console.log(D.message??`Updated sequence ${x.id}`),Nx("URL",J?.urls.sequence);return}if(A==="duplicate"){let D=await Y0("POST",`/api/v1/sequences/${x.id}/duplicate`,x.name===void 0?void 0:{name:x.name},x.company),I=D.sequence?.id??D.sequenceId,J=await CB(x.company),K=J!==void 0&&I!==void 0?SE({companyId:J,sequenceId:I}):void 0;if(x.json){L0({...D,...K!==void 0&&{appUrls:K.urls}});return}if(console.log(`Duplicated sequence: ${D.sequence?.name??I??x.id}`),I)console.log(`ID: ${I}`);Nx("URL",K?.urls.sequence);return}if(A==="archive"||A==="unarchive"){let D=await Y0("POST",`/api/v1/sequences/${x.id}/${A}`,void 0,x.company);if(x.json){L0(D);return}console.log(`${A==="archive"?"Archived":"Restored"} sequence: ${D.sequence?.name??x.id}`);return}if(A==="enable"||A==="disable"){let D=await Y0("POST",`/api/v1/sequences/${x.id}/${A}`,void 0,x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,sequenceId:x.id}):void 0;if(x.json){L0({...D,...J!==void 0&&{appUrls:J.urls}});return}console.log(D.message??`${A}d sequence ${x.id}`),Nx("URL",J?.urls.sequence);return}if(A==="enroll"){let D=Qo0(x),I=Do0(D),J=0,K=0,X=[],M,W;for(let R of I){let O=await Y0("POST",`/api/v1/sequences/${x.id}/enroll`,R,x.company);J+=O.enrolled,K+=O.skipped,X.push(...O.notFound),M??=O.targetNodeId,W??=O.scheduledFor}if(x.json){L0({success:!0,sequenceId:x.id,enrolled:J,skipped:K,notFound:X,...M!==void 0&&{targetNodeId:M},...W!==void 0&&{scheduledFor:W}});return}if(console.log(`Enrolled ${J} subscriber(s) in sequence: ${x.id}`),console.log(`Skipped (already enrolled, inactive, or unavailable): ${K}`),X.length>0){console.log(`Not found: ${X.length}`);for(let R of X.slice(0,10))console.log(`- ${R}`);if(X.length>10)console.log(`...and ${X.length-10} more`)}if(M!==void 0)console.log(`Target node: ${M}`);if(W!==void 0)console.log(`Scheduled for: ${dA(W)}`);return}if(A==="cancel-enrollments"){let D=await Y0("POST",`/api/v1/sequences/${x.id}/enrollments/cancel`,go0(x),x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,sequenceId:x.id}):void 0;if(x.json){L0({...D,...J!==void 0&&{appUrls:J.urls}});return}if(console.log(D.message??"Sequence enrollment cancellation done"),console.log(`Matched: ${D.matchedCount}`),console.log(`Cancelled: ${D.cancelledCount}`),console.log(`Dry run: ${D.dryRun?"yes":"no"}`),D.hasMore)console.log("Only the first matching enrollments are shown.");if((D.enrollments?.length??0)>0){console.log("Enrollments:");for(let K of D.enrollments??[])console.log(`- ${K.tokenId} | ${K.subscriberEmail??K.subscriberId} [${K.status}]`)}Nx("URL",J?.urls.sequence);return}if(A==="delete"){let D=await Y0("DELETE",`/api/v1/sequences/${x.id}`,void 0,x.company);if(x.json){L0(D);return}console.log(D.message??`Deleted sequence ${x.id}`);return}let E=await Y0("GET",`/api/v1/sequences/${x.id}`,void 0,x.company),g=await CB(x.company),B=g!==void 0?SE({companyId:g,sequenceId:x.id}):void 0;if(x.json){L0({...E,...B?.urls.sequence!==void 0&&{sequence:{...E.sequence,url:B.urls.sequence}},...B!==void 0&&{appUrls:B.urls}});return}let Q=E.sequence;if(console.log(Q.name),console.log(`ID: ${Q.id}`),Nx("URL",B?.urls.sequence),console.log(`Status: ${Nb(Q.status,Q.enrollmentPaused)}`),console.log(`Trigger: ${Q.trigger??"Unknown"}`),console.log(`Sending window: ${xR(Q.sendingWindow)}`),console.log(`BCC: ${Q.bccEmails?.join(", ")||"None"}`),console.log(`Created: ${dA(Q.createdAt)}`),console.log(`Enrichment: ${Q.enrichmentStatus} (${Q.enrichedCount}/${Q.emailCount})`),Q.emails.length>0){console.log("Emails:");for(let D of Q.emails){let I=D.stepNumber!==null?`Step ${D.stepNumber}`:`Node ${D.nodeId}`;console.log(`- ${I}`),console.log(` Email ID: ${D.emailId??"None"}`),console.log(` Name: ${D.name??"None"}`),console.log(` Subject: ${D.subject??"None"}`),console.log(` Preview: ${D.previewText??"None"}`),console.log(` Format: ${D.emailPreset==="minimal"?"Minimal":D.emailPreset==="branded"?"Branded":"Unknown"}`),console.log(` Blocks: ${D.blocks.length}`)}}}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Q20(A,x){if(A===void 0)return;let E=A.trim().toLowerCase();if(["on","true","yes","enabled"].includes(E))return!0;if(["off","false","no","disabled"].includes(E))return!1;throw new l(`${x} must be "on" or "off"`,400)}function yy(A,x){if(A===void 0)return;let E=Number(A);if(!Number.isFinite(E)||E<=0)throw new l(`${x} must be a positive number`,400);return E}function wo0(A){let x={};if(A.resetBrowseAbandonment){if(A.browseAbandonment!==void 0||A.browseDelayHours!==void 0||A.browseCooldownHours!==void 0)throw new l("--reset-browse-abandonment cannot be combined with other browse flags",400);x.browseAbandonment=null}else{let E={},g=Q20(A.browseAbandonment,"--browse-abandonment");if(g!==void 0)E.enabled=g;let B=yy(A.browseDelayHours,"--browse-delay-hours");if(B!==void 0)E.delayHours=B;let Q=yy(A.browseCooldownHours,"--browse-cooldown-hours");if(Q!==void 0)E.cooldownHours=Q;if(Object.keys(E).length>0)x.browseAbandonment=E}if(A.resetPriceDrop){if(A.priceDrop!==void 0||A.priceDropMinPercent!==void 0||A.priceDropLookbackDays!==void 0||A.priceDropCooldownDays!==void 0)throw new l("--reset-price-drop cannot be combined with other price-drop flags",400);x.priceDrop=null}else{let E={},g=Q20(A.priceDrop,"--price-drop");if(g!==void 0)E.enabled=g;let B=yy(A.priceDropMinPercent,"--price-drop-min-percent");if(B!==void 0)E.minPercent=B;let Q=yy(A.priceDropLookbackDays,"--price-drop-lookback-days");if(Q!==void 0)E.lookbackDays=Q;let D=yy(A.priceDropCooldownDays,"--price-drop-cooldown-days");if(D!==void 0)E.cooldownDays=D;if(Object.keys(E).length>0)x.priceDrop=E}if(Object.keys(x).length===0)throw new l("Provide at least one settings flag (see --help for the full list)",400);return x}function D20(A){let{browseAbandonment:x,priceDrop:E}=A;console.log(`Shopify automation settings (${A.shopDomain})`),console.log(""),console.log(`Browse abandonment: ${x.enabled?"on":"off"}`),console.log(" Emails shoppers who view a product but don't buy, add to cart, or start checkout."),console.log(` Waits ${x.delayHours}h after the view - at most one email per subscriber per ${x.cooldownHours}h`),console.log(""),console.log(`Price drop alerts: ${E.enabled?"on":"off"}`),console.log(` Emails recent viewers when a product's price falls by ${E.minPercent}% or more.`),console.log(` Audience: viewers from the last ${E.lookbackDays} days - at most one email per product per subscriber per ${E.cooldownDays} days`)}async function vb(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="get"){let B=await Y0("GET","/api/v1/shopify/automation-settings",void 0,x.company);if(x.json){L0(B);return}D20(B);return}let E=wo0(x),g=await Y0("PUT","/api/v1/shopify/automation-settings",E,x.company);if(x.json){L0(g);return}if(g.message)console.log(g.message),console.log("");D20(g)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Jo0(A){let{sms:x}=A;if(console.log(`SMS add-on: ${x.enabled?"enabled":"not enabled"}`),console.log(`Plan eligible: ${x.planEligible?"yes":"no"}`),console.log(`Credits balance: ${x.creditsBalance}`),console.log(`Brand prefix: ${x.brandPrefix??"(not set)"}`),x.numbers.length===0)console.log("Numbers: none");else{console.log("Numbers:");for(let E of x.numbers)console.log(` ${E.e164} (${E.status})`)}console.log(),console.log(A.message)}function fo0(A){return{to:dQ(A.phone??"","Phone number").trim(),text:dQ(A.text??"","--text").trim(),...A.imageUrl&&A.imageUrl.length>0?{imageUrls:A.imageUrl}:{}}}async function ub(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="settings"){let E=await Y0("GET","/api/v1/sms/settings",void 0,x.company);if(x.json){L0(E);return}Jo0(E);return}if(A==="send-test"){let E=await Y0("POST","/api/v1/sms/test",fo0(x),x.company);if(x.json){L0(E);return}console.log(E.message)}}catch(E){YA(E instanceof l?E:E),process.exit(1)}}var mF=kx(xB(),1);var Gx=kx(Hy(),1);function Ko0(A){let x=A.stats;return{sent:x.sent,delivered:x.delivered,opened:x.opened,clicked:x.clicked,replies:x.replies??0,unsubscribed:x.unsubscribed,openRate:x.openRate,clickRate:x.clickRate,replyRate:x.replyRate??0,conversions:x.conversions,revenueCents:x.revenueCents,steps:A.steps,clickedLinks:A.clickedLinks,polls:A.polls}}function Tb(A){let x=new URLSearchParams;if(!A.campaign&&!A.sequence)x.set("period",A.period??"7d");if(A.includeBots)x.set("includeMachineEngagement","true");let E=x.toString();return E?`?${E}`:""}async function C20(A){if(A.campaign)return Y0("GET",`/api/v1/metrics/campaigns/${A.campaign}${Tb(A)}`,void 0,A.company);if(A.sequence)return Y0("GET",`/api/v1/metrics/sequences/${A.sequence}${Tb(A)}`,void 0,A.company);return Y0("GET",`/api/v1/metrics${Tb(A)}`,void 0,A.company)}function $o0({options:A}){let[x,E]=mF.useState(!0),[g,B]=mF.useState(""),[Q,D]=mF.useState(null);if(mF.useEffect(()=>{async function X(){try{let M=await C20(A);D(Ko0(M))}catch(M){B(dK(M instanceof l?M:M))}finally{E(!1)}}X()},[A]),mF.useEffect(()=>{if(!x)setTimeout(()=>process.exit(g?1:0),100)},[x,g]),x)return Gx.jsxDEV(ZE,{padding:1,children:[Gx.jsxDEV(hx,{color:"cyan",children:Gx.jsxDEV(AR,{type:"dots"},void 0,!1,void 0,this)},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:" Loading stats..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(g)return Gx.jsxDEV(ZE,{padding:1,children:Gx.jsxDEV(hx,{color:"red",children:[" ",g]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(!Q)return Gx.jsxDEV(ZE,{padding:1,children:Gx.jsxDEV(hx,{dimColor:!0,children:"No stats available"},void 0,!1,void 0,this)},void 0,!1,void 0,this);let I=A.period??"7d",J=A.campaign?"Campaign Stats":A.sequence?"Sequence Stats":`Stats (${I})`,K=A.sequence&&Q.steps?Q.steps.filter((X)=>(X.failedCount??0)>0):[];return Gx.jsxDEV(ZE,{flexDirection:"column",padding:1,children:[Gx.jsxDEV(ZE,{marginBottom:1,children:[Gx.jsxDEV(hx,{bold:!0,color:"green",children:J},void 0,!1,void 0,this),A.includeBots&&Gx.jsxDEV(hx,{dimColor:!0,children:" including bot/scanner engagement"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{flexDirection:"column",children:[Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Sent: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.sent.toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Delivered: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.delivered.toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Opened: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.opened.toLocaleString()},void 0,!1,void 0,this),Gx.jsxDEV(hx,{dimColor:!0,children:[" (",Q.openRate.toFixed(1),"%)"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Clicked: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.clicked.toLocaleString()},void 0,!1,void 0,this),Gx.jsxDEV(hx,{dimColor:!0,children:[" (",Q.clickRate.toFixed(1),"%)"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Replies: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.replies.toLocaleString()},void 0,!1,void 0,this),Gx.jsxDEV(hx,{dimColor:!0,children:[" (",Q.replyRate.toFixed(1),"%)"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Unsubscribed: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.unsubscribed.toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q.conversions!==void 0&&Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Conversions: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:Q.conversions.toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q.revenueCents!==void 0&&Gx.jsxDEV(ZE,{children:[Gx.jsxDEV(hx,{dimColor:!0,children:"Revenue: "},void 0,!1,void 0,this),Gx.jsxDEV(hx,{children:["$",(Q.revenueCents/100).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K.length>0&&Gx.jsxDEV(ZE,{flexDirection:"column",marginTop:1,children:[Gx.jsxDEV(ZE,{marginBottom:1,children:Gx.jsxDEV(hx,{bold:!0,children:"Step Failures"},void 0,!1,void 0,this)},void 0,!1,void 0,this),K.map((X)=>Gx.jsxDEV(ZE,{flexDirection:"column",marginBottom:1,children:[Gx.jsxDEV(hx,{children:["Step ",X.step,": ",X.subject??X.nodeId," (",X.failedCount," failed",")"]},void 0,!0,void 0,this),(X.failedSubscribers??[]).map((M)=>Gx.jsxDEV(ZE,{marginLeft:2,children:Gx.jsxDEV(hx,{children:["- ",M.email??M.subscriberId,":"," ",M.failedReason??"Reason unavailable"]},void 0,!0,void 0,this)},`${X.nodeId}-${M.subscriberId}`,!1,void 0,this)),(X.failedCount??0)>(X.failedSubscribers?.length??0)&&Gx.jsxDEV(ZE,{marginLeft:2,children:Gx.jsxDEV(hx,{dimColor:!0,children:["Showing first ",X.failedSubscribers?.length??0," of"," ",X.failedCount," failed subscribers"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},X.nodeId,!0,void 0,this))]},void 0,!0,void 0,this),Q.clickedLinks&&Q.clickedLinks.length>0&&Gx.jsxDEV(ZE,{flexDirection:"column",marginTop:1,children:[Gx.jsxDEV(ZE,{marginBottom:1,children:Gx.jsxDEV(hx,{bold:!0,children:"Clicked Links"},void 0,!1,void 0,this)},void 0,!1,void 0,this),Q.clickedLinks.map((X)=>Gx.jsxDEV(ZE,{marginLeft:2,children:Gx.jsxDEV(hx,{children:["- ",X.url,": ",X.clicks.toLocaleString()," (",X.percentage.toFixed(1),"%)"]},void 0,!0,void 0,this)},X.url,!1,void 0,this))]},void 0,!0,void 0,this),Q.polls&&Q.polls.length>0&&Gx.jsxDEV(ZE,{flexDirection:"column",marginTop:1,children:[Gx.jsxDEV(ZE,{marginBottom:1,children:Gx.jsxDEV(hx,{bold:!0,children:"Poll & NPS Results"},void 0,!1,void 0,this)},void 0,!1,void 0,this),Q.polls.map((X)=>Gx.jsxDEV(ZE,{flexDirection:"column",marginBottom:1,children:[Gx.jsxDEV(hx,{children:[X.question||"Poll"," (",X.totalResponses," ",X.totalResponses===1?"response":"responses",")"]},void 0,!0,void 0,this),X.nps&&Gx.jsxDEV(ZE,{marginLeft:2,children:Gx.jsxDEV(hx,{children:`NPS: ${X.nps.score>0?"+":""}${X.nps.score} · Average: ${X.nps.average.toFixed(1)} · ${X.nps.promoters} promoters · ${X.nps.passives} passives · ${X.nps.detractors} detractors`},void 0,!1,void 0,this)},void 0,!1,void 0,this),X.answers.map((M)=>Gx.jsxDEV(ZE,{marginLeft:2,children:Gx.jsxDEV(hx,{children:["- ",M.answer,": ",M.responses.toLocaleString()," (",M.percentage,"%)"]},void 0,!0,void 0,this)},M.value,!1,void 0,this))]},X.blockId,!0,void 0,this))]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}async function F20(A){if(!await Cx())YA(Kx()),process.exit(1);if(A.json){try{L0(await C20(A))}catch(E){YA(E),process.exitCode=1}return}await $y(Gx.jsxDEV($o0,{options:A},void 0,!1,void 0,this)).waitUntilExit()}import{basename as Ee0}from"node:path";var I20="process-site";var w20="assess-domain-risk";var J20="assess-domain-risk-sweep";var f20="backfill-ses-tenants";var K20="process-deep-site";var $20="analyze-complaint";var H20="review-bounce-pause";var y20="bulk-import-subscribers";var q20="bulk-unsubscribe-subscribers";var Y20="send-test-email";var X20="send-double-opt-in-email";var U20="optimize-image";var Z20="send-transactional";var G20="process-campaign";var W20="process-campaign-chunk";var R20="send-email";var M20="retry-email-send";var z20="email-send-side-effects";var S20="enrich-sequence";var L20="process-automation-token";var O20="process-sequence-test-run";var P20="blocklist-check";var j20="domain-health-monitor";var N20="dns-verification-checker";var V20="time-trigger-evaluator";var v20="segment-trigger-evaluator";var u20="recurring-campaign-evaluator";var T20="sync-stripe-products";var h20="sync-stripe-revenue",b20="sync-revenue";var k20="sync-supabase-users";var i20="sync-affonso-affiliates";var m20="sync-affonso-affiliate-stats";var c20="sync-shopify";var r20="shopify-sync-phase";var p20="process-shopify-replenishment";var _20="process-commerce-customer-event";var n20="process-browse-abandonment";var l20="process-shopify-webhook";var d20="process-shopify-app-webhook";var a20="process-shopify-app-bulk-identify";var s20="notify-shopify-app-uninstalled";var o20="process-commerce-order";var t20="process-webflow-webhook";var e20="process-webhook-provider";var A10="sync-woocommerce";var x10="process-ab-test";var E10="check-ab-test-winner";var B10="generate-ab-test-variants";var g10="generate-email-image";var Q10="sync-email-localizations";var D10="forward-reply";var C10="cleanup-replies";var F10="cleanup-subscriber-events";var I10="send-conversation-reply";var w10="shopify-post-connect";var J10="stuck-token-sweeper";var f10="reset-free-plan-usage";var K10="detect-subscriber-email-provider";var $10="detect-free-tier-abuse";var H10="usage-limit-alerts";var y10="sync-subscriber-attributes";var q10="deliver-outbound-webhook";var Y10="fetch-provider-migration-data";var X10="execute-provider-migration";var U10="sync-ad-audience";var Z10="ad-audience-sync-scheduler";var G10="track-refgrow-purchase";var W10="send-sms";var R10="provision-sms-account";var M10="process-telnyx-webhook";var z10="poll-mta-reputation";var S10="process-mta-events";var L10="reconcile-mta-cluster";var O10="sweep-mta-events";var P10="sweep-mta-ip-leases";var j10=[S10,O10,P10,z10,L10];var N10="process-poll-response";var JiA=[I20,w20,J20,f20,K20,$20,H20,y20,q20,Y20,X20,U20,Z20,G20,W20,R20,M20,z20,S20,L20,O20,N20,j20,P20,V20,v20,u20,T20,h20,b20,k20,m20,i20,c20,r20,p20,_20,n20,l20,d20,a20,s20,o20,t20,e20,A10,x10,E10,B10,g10,Q10,D10,C10,F10,I10,w10,J10,f10,K10,$10,H10,y10,q10,Y10,X10,G10,U10,Z10,W10,M10,...j10,R10,N10];var h10=kx(hb(),1);var v10=[{id:"light",label:"Light",background:"#f4f4f5"},{id:"dark",label:"Dark",background:"#1e1e2e",color:"#e4e4e7"},{id:"midnight",label:"Midnight",background:"#0d1117",color:"#e6edf3"},{id:"terminal",label:"Terminal",background:"#0c0c0c",color:"#4ade80"},{id:"solarized",label:"Solarized",background:"#fdf6e3",color:"#586e75"}];var qo0=new Map(v10.map((A)=>[A.id,A])),icA=qo0.get("light")??{id:"light",label:"Light",background:"#f4f4f5"};var b10=kx(bb(),1);var k10=0;function LE(A){return k10+=1,`edge-${A}-${k10}`}function DE(A,x,E="paragraph"){return{id:LE("text"),type:"text",content:A,variant:E,...x?{styles:x}:{}}}function d5(A,x=2,E){return{id:LE("heading"),type:"heading",content:A,level:x,...E?{styles:E}:{}}}function a6(A,x="bullet",E){return{id:LE("list"),type:"list",variant:x,items:A.map((g)=>({id:LE("list-item"),...typeof g==="string"?{content:g}:g})),...E?.color?{color:E.color}:{},...E?.styles?{styles:E.styles}:{}}}function L4(A,x="primary",E){return{id:LE("button"),type:"button",text:A,url:"https://example.com/path?a=1&b=two",variant:x,...E?.buttonColor?{buttonColor:E.buttonColor}:{},...E?.buttonTextColor?{buttonTextColor:E.buttonTextColor}:{},...E?.styles?{styles:E.styles}:{}}}function B2(A,x,E="default",g){return{id:LE("card"),type:"card",title:A,content:x,variant:E,...E==="feature"?{emoji:"✦"}:{},...g?{styles:g}:{}}}function BR(A,x,E,g){return{id:LE("cta"),type:"cta",title:A,description:x,buttonText:"Take action",buttonUrl:"https://example.com/action",...g?.buttonColor?{buttonColor:g.buttonColor}:{},...g?.buttonTextColor?{buttonTextColor:g.buttonTextColor}:{},...E?{styles:E}:{}}}function B9(A,x){return{id:LE("columns"),type:"columns",columns:A,...x?.gap!==void 0?{gap:x.gap}:{},...x?.gapMode?{gapMode:x.gapMode}:{},...x?.styles?{styles:x.styles}:{}}}function qE(A,x){return{id:LE("column"),children:A,...x}}var yt0=[{slug:"literal-lf",description:"Literal LF between text runs",content:`First line
|
|
438
438
|
Second line`},{slug:"literal-crlf",description:"Windows CRLF between text runs",content:`First line\r
|
|
439
439
|
Second line`},{slug:"literal-cr",description:"Legacy CR between text runs",content:"First line\rSecond line"},{slug:"literal-tabs",description:"Tabs around an inline value",content:"Plan:\tPro\tAnnual"},{slug:"leading-trailing-ascii-spaces",description:"Authored leading and trailing ASCII spaces",content:" padded copy "},{slug:"br-plain",description:"Plain HTML break",content:"First line<br>Second line"},{slug:"br-self-closing",description:"Self-closing HTML break",content:"First line<br/>Second line"},{slug:"br-spaced-self-closing",description:"Spaced self-closing HTML break",content:"First line<br />Second line"},{slug:"br-uppercase",description:"Uppercase HTML break",content:"First line<BR>Second line"},{slug:"br-with-class",description:"Break carrying pasted editor attributes",content:'First line<br class="pasted-break">Second line'},{slug:"leading-br",description:"Visible leading break before text",content:"<br>Starts after a break"},{slug:"trailing-br",description:"Trailing break after text",content:"Ends before a break<br>"},{slug:"double-br",description:"Two consecutive breaks",content:"Before<br><br>After"},{slug:"four-br",description:"Four consecutive breaks",content:"Before<br><br><br><br>After"},{slug:"sibling-divs",description:"Browser contentEditable sibling divs",content:"First<div>Second</div><div>Third</div>"},{slug:"empty-div-middle",description:"Browser empty div between text lines",content:"First<div><br></div><div>Third</div>"},{slug:"nested-divs",description:"Nested browser div wrappers",content:"First<div><div>Second</div><div>Third</div></div>"},{slug:"paragraph-siblings",description:"Pasted paragraph siblings",content:"<p>First</p><p>Second</p><p>Third</p>"},{slug:"empty-paragraph",description:"Empty paragraph between populated paragraphs",content:"<p>First</p><p></p><p>Third</p>"},{slug:"br-paragraph",description:"Break-only paragraph between populated paragraphs",content:"<p>First</p><p><br></p><p>Third</p>"},{slug:"mixed-p-div-br",description:"Mixed pasted paragraph, div, and br structure",content:"<p>First<br>Second</p><div>Third</div><p><br></p><p>Fifth</p>"},{slug:"nbsp-named",description:"Named non-breaking spaces",content:"Price: $49"},{slug:"nbsp-decimal",description:"Decimal non-breaking space entity",content:"Price:  $49"},{slug:"nbsp-hex",description:"Hex non-breaking space entity",content:"Price:  $49"},{slug:"unicode-space-widths",description:"Thin, narrow no-break, and em spaces",content:"thin space | narrow space | em space"},{slug:"named-entities",description:"Common named HTML entities",content:"A & B < C > D "quoted" 'single'"},{slug:"numeric-entities",description:"Decimal and hexadecimal Unicode entities",content:"Copyright © / check ✓ / rocket 🚀"},{slug:"composed-accent",description:"NFC composed accents",content:"Café déjà vu — Ångström"},{slug:"decomposed-accent",description:"NFD decomposed combining accents",content:"Café déjà vu — Ångström"},{slug:"emoji-basic",description:"Emoji mixed with ordinary text",content:"Launch \uD83D\uDE80 complete ✅ — celebrate \uD83C\uDF89"},{slug:"emoji-zwj-family",description:"Multi-code-point ZWJ family emoji",content:"Family: \uD83D\uDC68\uD83D\uDC69\uD83D\uDC67\uD83D\uDC66"},{slug:"emoji-skin-tone",description:"Emoji with skin-tone modifier",content:"Great work \uD83D\uDC4D\uD83C\uDFFD from the team"},{slug:"emoji-flags-keycap",description:"Regional flags and keycap sequences",content:"Markets \uD83C\uDDFA\uD83C\uDDE6 \uD83C\uDDEF\uD83C\uDDF5 \uD83C\uDDE7\uD83C\uDDF7 — press 1️⃣"},{slug:"cjk-lines",description:"CJK copy separated by a break",content:"新しいお知らせ<br>今すぐ詳細を見る"},{slug:"arabic-lines",description:"Arabic right-to-left copy with punctuation",content:"مرحبًا بك<br>ابدأ الآن — خصم ٢٠٪"},{slug:"hebrew-lines",description:"Hebrew right-to-left copy with punctuation",content:"שלום וברוכים הבאים<br>התחילו עכשיו — 20% הנחה"},{slug:"bidi-marks",description:"Explicit LRM and RLM around mixed-direction values",content:"Order ‎ABC-123‎ / طلب ‏١٢٣‏"},{slug:"bidi-isolates",description:"Unicode directional isolate characters",content:"Account user@example.com — الحالة نشط"},{slug:"zero-width-space",description:"Zero-width space in a long token",content:"superlongbreakableidentifier"},{slug:"joiners",description:"Zero-width non-joiner and joiner",content:"ABC"},{slug:"word-joiner-bom",description:"Word joiner and embedded BOM",content:"keeptogether / before\uFEFFafter"},{slug:"soft-hyphen",description:"Named and literal soft hyphens",content:"extra­ordinary / international"},{slug:"combining-stack",description:"Multiple combining marks on one glyph",content:"Z̴͝a̶̓l̷̈́g̵͗o̷̓ copy"},{slug:"html-comment-between-lines",description:"HTML comment between visible runs",content:"Before<!-- editor marker --><br>After"},{slug:"pasted-inline-spans",description:"Nested pasted spans with inline formatting",content:'<span style="font-family: Georgia, serif"><span style="font-size:18px">Styled</span> copy</span><br><span style="color:#7c3aed">Second line</span>'},{slug:"legacy-font-tag",description:"Legacy font tag from pasted email HTML",content:'<font face="Arial" color="#0f766e" size="4">Legacy copy</font>'},{slug:"strong-title-adjacent",description:"Bold title directly adjacent to description",content:"<strong>Important update</strong>Description starts here."},{slug:"malformed-nesting",description:"Browser-repaired malformed inline nesting",content:"<strong>Bold <em>and italic</strong> remainder</em>"},{slug:"unclosed-inline-tag",description:"Browser-repaired unclosed inline tag",content:"Before <strong>bold to the end"},{slug:"encoded-angle-brackets",description:"Encoded angle brackets that must stay text",content:"Use <section> and <br> literally"},{slug:"preformatted-newlines",description:"Preformatted element with indentation and newlines",content:`<pre>line one
|
|
440
440
|
line two
|
|
@@ -539,7 +539,7 @@ WHERE active = true;`,"solarized")]},{name:"code-block-light",description:"Stand
|
|
|
539
539
|
</td>
|
|
540
540
|
</tr>
|
|
541
541
|
</table>`)]},{name:"heading-1",description:"Heading level 1",blocks:[gA("Main Heading H1",1)]},{name:"heading-2",description:"Heading level 2",blocks:[gA("Section Heading H2",2)]},{name:"heading-3",description:"Heading level 3",blocks:[gA("Subsection Heading H3",3)]},{name:"heading-multiline",description:"Heading with line break",blocks:[gA(`First Line
|
|
542
|
-
Second Line`,1)]},{name:"heading-with-link",description:"Heading with hyperlink",blocks:[gA('Read the <a href="https://example.com/docs">docs</a>',2)]},{name:"heading-long",description:"Long heading text",blocks:[gA("This Is A Very Long Heading That Might Wrap To Multiple Lines",1)]},{name:"heading-with-index",description:"Heading with an oversized editorial index number beside it",blocks:[{id:"heading-with-index-block",type:"heading",content:"Choose your palette",level:2,indexText:"01"}]},{name:"heading-with-index-long",description:"Index heading with wrapping text stays middle-aligned",blocks:[{id:"heading-with-index-long-block",type:"heading",content:"A Much Longer Numbered Section Title That Wraps Onto Two Lines",level:2,indexText:"02"}]},{name:"button-primary",description:"Primary button",blocks:[OE("Get Started","primary")]},{name:"button-secondary",description:"Secondary button",blocks:[OE("Learn More","secondary")]},{name:"button-pill",description:"Pill button",blocks:[OE("Subscribe","pill")]},{name:"button-long-text",description:"Button with long text",blocks:[OE("Click Here To Get Started With Our Amazing Platform","primary")]},{name:"button-light-color",description:"Filled button with a pale color falls back to dark text so it stays readable",blocks:[{id:"button-light-color-block",type:"button",text:"Shop All New Arrivals",url:"https://example.com",variant:"primary",buttonColor:"#fdf6ec"}]},{name:"button-ink",description:"Ink button: near-black editorial fill",blocks:[OE("Shop the Collection","ink")]},{name:"button-text-link",description:"Text-link button: letterspaced caps with trailing arrow",blocks:[OE("Read the story","link")]},{name:"button-text-link-left",description:"Left-aligned text-link button",blocks:[{id:"button-text-link-left-block",type:"button",text:"Browse new arrivals",url:"https://example.com",variant:"link",styles:{textAlign:"left"}}]},{name:"spacer-8",description:"Spacer 8px",blocks:[nA(8)]},{name:"spacer-16",description:"Spacer 16px",blocks:[nA(16)]},{name:"spacer-24",description:"Spacer 24px",blocks:[nA(24)]},{name:"spacer-32",description:"Spacer 32px",blocks:[nA(32)]},{name:"spacer-48",description:"Spacer 48px",blocks:[nA(48)]},{name:"spacer-64",description:"Spacer 64px",blocks:[nA(64)]},{name:"divider",description:"Horizontal divider",blocks:[s6()]},{name:"image-default",description:"Image with default sizing",blocks:[v8()]},{name:"image-small",description:"Image with small width (30%)",blocks:[v8(void 0,"Small image",30)]},{name:"image-medium",description:"Image with medium width (60%)",blocks:[v8(void 0,"Medium image",60)]},{name:"image-large",description:"Image with large width (90%)",blocks:[v8(void 0,"Large image",90)]},{name:"image-with-link",description:"Image wrapped in a link",blocks:[v8(void 0,"Linked image",void 0,"https://example.com")]},{name:"image-with-link-and-width",description:"Image with custom width wrapped in a link",blocks:[v8(void 0,"Linked image",60,"https://example.com")]},{name:"image-align-left",description:"Image aligned to the left at 50% width",blocks:[v8(void 0,"Left aligned image",50,void 0,"left")]},{name:"image-align-right",description:"Image aligned to the right at 50% width",blocks:[v8(void 0,"Right aligned image",50,void 0,"right")]},{name:"image-fixed-height",description:"Image cropped to a fixed height",blocks:[v8(void 0,"Fixed height image",70,void 0,"center",160)]},{name:"image-fixed-height-contain",description:"Image contained inside a fixed height",blocks:[v8(void 0,"Fixed height contained image",70,void 0,"center",160,"contain")]},{name:"image-with-caption",description:"Image with a small muted caption strip below",blocks:[{...v8(void 0,"Captioned image",60),id:"image-with-caption-block",caption:"The autumn collection, shot in Lisbon"}]},{name:"image-frame-border",description:"Image with a hairline border frame",blocks:[{...v8(void 0,"Bordered image",60),id:"image-frame-border-block",frame:"border"}]},{name:"image-frame-mat",description:"Image on a white gallery mat inside a hairline frame",blocks:[{...v8(void 0,"Matted image",60),id:"image-frame-mat-block",frame:"mat",caption:"No. 4 - Studio series"}]},{name:"video-youtube",description:"YouTube video with thumbnail and play button",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Sample video")]},{name:"video-short-url",description:"YouTube video with short URL format",blocks:[OD("https://youtu.be/dQw4w9WgXcQ","Short URL video")]},{name:"video-small-width",description:"YouTube video with 50% width",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Small video",{width:50})]},{name:"video-large-width",description:"YouTube video with 100% width",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Full width video",{width:100})]},{name:"video-align-left",description:"YouTube video aligned left",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Left aligned video",{width:60,align:"left"})]},{name:"video-align-center",description:"YouTube video aligned center",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Center aligned video",{width:60,align:"center"})]},{name:"video-align-right",description:"YouTube video aligned right",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Right aligned video",{width:60,align:"right"})]},{name:"product-small",description:"Small product card - compact horizontal layout",blocks:[_F("small",{title:"Classic Tee",price:"$29.99",imageUrl:"https://images.sequenzy.com/socials/linkedin.png",url:"https://example.com/products/tee"})]},{name:"product-medium",description:"Medium product card - vertical with image and button",blocks:[_F("medium",{title:"Premium Hoodie",description:"Soft cotton blend hoodie perfect for cool evenings.",price:"$59.99",imageUrl:"https://images.sequenzy.com/socials/linkedin.png",url:"https://example.com/products/hoodie",buttonText:"Shop Now"})]},{name:"product-large",description:"Large product card - full-width featured layout",blocks:[_F("large",{title:"Limited Edition Jacket",description:"Hand-crafted leather jacket available in limited quantities.",price:"$199.99",compareAtPrice:"$249.99",imageUrl:"https://images.sequenzy.com/socials/linkedin.png",url:"https://example.com/products/jacket",buttonText:"Buy Now"})]},{name:"product-no-image",description:"Product card without an image",blocks:[_F("medium",{title:"Digital Course",description:"Learn email marketing in 30 days.",price:"$49.99",buttonText:"Enroll Now"})]},{name:"product-with-discount",description:"Product card showing discount pricing",blocks:[_F("medium",{title:"Summer Sale Item",description:"Limited time offer!",price:"$19.99",compareAtPrice:"$39.99",imageUrl:"https://images.sequenzy.com/socials/linkedin.png",url:"https://example.com/sale"})]},{name:"product-light-button-color",description:"Product card button with a pale color falls back to dark readable text",blocks:[_F("medium",{title:"Spring Collection",description:"Soft seasonal pieces with a light brand palette.",price:"$89.00",url:"https://example.com/products/spring",buttonText:"Shop Collection",buttonColor:"#fdf6ec"})]},{name:"discount-code-dense",description:"Dense discount code - compact coupon row",blocks:[Xy("dense",{code:"WELCOME10",label:"Your discount code"})]},{name:"discount-code-medium",description:"Medium discount code - standard card with CTA",blocks:[Xy("medium",{code:"SAVE20",label:"Your discount code",headline:"20% off, just for you",description:"Use the code below at checkout to claim your savings.",ctaText:"Shop now",ctaUrl:"https://example.com"})]},{name:"discount-code-large",description:"Large discount code - hero banner with expiration",blocks:[Xy("large",{code:"VIP50",label:"VIP access",headline:"Unlock 50% off today",description:"A special thank-you for being part of the club. Redeem your code at checkout.",ctaText:"Redeem now",ctaUrl:"https://example.com",showExpires:!0,expiresText:"Expires in 48 hours"})]},{name:"discount-code-styled",description:"Discount code with custom block styles (padding/background/align)",blocks:[Xy("medium",{code:"STYLED15",headline:"Styled discount card",description:"Custom block styles must render in both renderers.",ctaText:"Shop now",ctaUrl:"https://example.com",styles:{paddingTop:24,paddingBottom:24,paddingLeft:16,paddingRight:16,backgroundColor:"#fef3c7"}})]},{name:"poll-options",description:"Poll with three emoji answer buttons",blocks:[UB("options")]},{name:"poll-image-options",description:"Visual poll with circular image choices",blocks:[{...UB("options",{question:"Pick your style",optionLabels:["Relaxed","Considered","Bold"]}),options:["Relaxed","Considered","Bold"].map((A,x)=>({id:l0("poll-option"),label:A,value:A.toLowerCase(),imageUrl:`${dB}?choice=${x}`}))}]},{name:"poll-image-options-max",description:"Visual poll with the schema maximum of eight image choices",blocks:[{...UB("options",{question:"Choose your favorite direction",optionLabels:Array.from({length:8},(A,x)=>`Choice ${x+1}`)}),options:Array.from({length:8},(A,x)=>({id:l0("poll-option"),label:`Choice ${x+1}`,value:`choice-${x+1}`,imageUrl:`${dB}?choice=${x+1}`}))}]},{name:"poll-options-long-labels",description:"Poll with long answer labels that wrap on narrow widths",blocks:[UB("options",{question:"Which of these upcoming features would make the biggest difference for your team?",optionLabels:["Deeper analytics with revenue attribution across every channel","More native integrations with the tools we already use daily","Faster editor performance"]})]},{name:"poll-options-two-answers",description:"Poll with only two answers",blocks:[UB("options",{question:"Was this helpful?",optionLabels:["\uD83D\uDC4D Yes","\uD83D\uDC4E No"]})]},{name:"poll-options-accent",description:"Poll with a custom accent color",blocks:[UB("options",{accentColor:"#0ea5e9"})]},{name:"poll-appearance-outline",description:"Poll with the outline appearance (white fill, accent border)",blocks:[UB("options",{appearance:"outline"})]},{name:"poll-appearance-filled",description:"Poll with the filled appearance (solid accent buttons)",blocks:[UB("options",{appearance:"filled",accentColor:"#1d4ed8"})]},{name:"poll-appearance-pill",description:"Poll with the pill appearance (fully rounded buttons)",blocks:[UB("options",{appearance:"pill"})]},{name:"poll-appearance-pop",description:"Poll with the pop appearance (ink border, hard accent shadow)",blocks:[UB("options",{appearance:"pop"})]},{name:"poll-appearance-brutal",description:"Poll with the brutal appearance (square slabs, ink border and shadow)",blocks:[UB("options",{appearance:"brutal"})]},{name:"poll-appearance-quiz",description:"Poll with the quiz appearance (A/B/C letter badges)",blocks:[UB("options",{appearance:"quiz"})]},{name:"poll-appearance-minimal",description:"Poll with the minimal appearance (ruled rows, accent arrow)",blocks:[UB("options",{appearance:"minimal"})]},{name:"poll-nps",description:"NPS survey with the default 0-10 scale",blocks:[UB("nps")]},{name:"poll-nps-appearance-filled",description:"NPS survey with the filled appearance",blocks:[UB("nps",{appearance:"filled"})]},{name:"poll-nps-appearance-pill",description:"NPS survey with the pill appearance",blocks:[UB("nps",{appearance:"pill"})]},{name:"poll-nps-appearance-pop",description:"NPS survey with the pop appearance",blocks:[UB("nps",{appearance:"pop"})]},{name:"poll-nps-appearance-brutal",description:"NPS survey with the brutal appearance",blocks:[UB("nps",{appearance:"brutal"})]},{name:"poll-nps-appearance-minimal",description:"NPS survey with the minimal appearance (accent underline)",blocks:[UB("nps",{appearance:"minimal"})]},{name:"poll-nps-custom-labels",description:"NPS survey with custom scale labels and accent",blocks:[UB("nps",{question:"How satisfied are you with your onboarding so far?",npsLowLabel:"Very unsatisfied",npsHighLabel:"Very satisfied",accentColor:"#16a34a"})]},{name:"poll-in-columns",description:"Poll nested inside a two-column layout",blocks:[s9([gA("Quick question",3),f0("Help us tune the newsletter.")],[UB("options",{question:"How often should we email?",optionLabels:["Weekly","Monthly"]})])]},{name:"poll-in-colored-column",description:"Poll appearance colors inherit a custom nested column background",blocks:[{id:l0("columns"),type:"columns",gap:16,columns:[{id:l0("col"),backgroundColor:"#111827",padding:{top:18,bottom:18,left:18,right:18},children:[UB("options",{appearance:"outline",accentColor:"#38bdf8",question:"Was this dark-mode guide useful?",optionLabels:["Very useful","Needs more detail"]})]},{id:l0("col"),backgroundColor:"#fef3c7",padding:{top:18,bottom:18,left:18,right:18},children:[f0("Nested surfaces should drive poll color blends.")]}]}]},{name:"poll-pale-accent",description:"Poll with a pale accent falls back to dark answer text",blocks:[UB("options",{accentColor:"#fdf6ec"})]},{name:"poll-styled",description:"Poll with custom block styles (layout and typography)",blocks:[UB("options",{styles:{paddingTop:24,paddingBottom:24,paddingLeft:16,paddingRight:16,backgroundColor:"#f0f9ff",textColor:"#7c2d12",textAlign:"right"}})]},{name:"poll-empty-question",description:"Legacy poll with a whitespace-only question",blocks:[UB("options",{question:" "})]},{name:"countdown-boxed",description:"Countdown timer - solid primary-color tiles",blocks:[K1("boxed")]},{name:"countdown-minimal",description:"Countdown timer - clean numbers with colon separators",blocks:[K1("minimal")]},{name:"countdown-bold",description:"Countdown timer - full-width primary banner",blocks:[K1("bold")]},{name:"countdown-outlined",description:"Countdown timer - outlined tiles with labels",blocks:[K1("stacked")]},{name:"countdown-no-labels",description:"Countdown timer - numbers only, collapsed label band",blocks:[K1("boxed",{showLabels:!1})]},{name:"countdown-minimal-no-labels",description:"Countdown timer - minimal style without labels",blocks:[K1("minimal",{showLabels:!1})]},{name:"countdown-circle",description:"Countdown timer - outlined rings with progress arc",blocks:[K1("circle")]},{name:"countdown-circle-filled",description:"Countdown timer - solid accent discs",blocks:[K1("circle-filled")]},{name:"countdown-circle-no-labels",description:"Countdown timer - rings without labels",blocks:[K1("circle",{showLabels:!1})]},{name:"countdown-expired-message",description:"Countdown timer - past deadline showing a custom message",blocks:[K1("boxed",{deadline:"2000-01-01T00:00:00.000Z",expiredBehavior:"message",expiredMessage:"This offer has ended"})]},{name:"logo-center",description:"Logo centered",blocks:[X9("center")]},{name:"logo-left",description:"Logo left aligned",blocks:[X9("left")]},{name:"logo-right",description:"Logo right aligned",blocks:[X9("right")]},{name:"logo-small",description:"Logo small size",blocks:[X9("center",32)]},{name:"logo-large",description:"Logo large size",blocks:[X9("center",128)]},{name:"header-logo-left-navigation",description:"Header with logo on the left and navigation on the right",blocks:[rF("logo-left",{accent:!0})]},{name:"header-stacked-navigation",description:"Header with centered stacked logo and navigation",blocks:[rF("stacked")]},{name:"header-navigation-only",description:"Navigation links only, with the logo hidden",blocks:[rF("stacked",{showLogo:!1,navAlign:"center"})]},{name:"card-default",description:"Default card",blocks:[Y8("Card Title","This is the card content description.")]},{name:"card-styled-background-padding",description:"Default card with custom background, border, and padding",blocks:[{id:l0("card"),type:"card",title:"Styled Card",content:"Custom background and padding should match preview output.",variant:"default",styles:{backgroundColor:"#f0f7ff",borderColor:"#bbd7ff",borderWidth:1,borderRadius:8,paddingTop:18,paddingRight:22,paddingBottom:26,paddingLeft:30}}]},{name:"card-feature",description:"Feature card with emoji",blocks:[Y8("Feature Title","This is a feature highlight with an emoji.","feature","\uD83D\uDE80")]},{name:"card-feature-empty-content",description:"Feature card with emoji and no body content",blocks:[Y8("New feature available now","","feature","✨")]},{name:"card-feature-star",description:"Feature card with star emoji",blocks:[Y8("Premium Feature","Unlock premium capabilities.","feature","⭐")]},{name:"card-long-content",description:"Card with long content",blocks:[Y8("Long Content Card","Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")]},{name:"card-feature-html-content",description:"Feature card with paragraph HTML content",blocks:[Y8("Special Offer","<p>Use code <strong>MAJDHAMMAD50</strong> at checkout for <strong>50% off</strong> your next subscription.</p>","feature")]},{name:"card-feature-b-tag-content",description:"Feature card using b tags from browser bold commands",blocks:[Y8("Special Offer","<p>Use code <b>MAJDHAMMAD50</b> at checkout for <b>50% off</b> your next subscription.</p>","feature")]},{name:"card-feature-inline-color-strong",description:"Feature card preserving explicit inline emphasis color",blocks:[Y8("Special Offer",'<p>Use code <strong style="color:#111111">MAJDHAMMAD50</strong> at checkout for <strong style="color:#111111">50% off</strong> your next subscription.</p>',"feature")]},{name:"card-feature-font-tag-content",description:"Feature card preserving font-tag color output",blocks:[Y8("Special Offer",'<p>Use code <font color="#000000"><b>MAJDHAMMAD50</b></font> at checkout for <font color="#000000"><b>50% off</b></font> your next subscription.</p>',"feature")]},{name:"card-default-html-content",description:"Default card with emphasized HTML content",blocks:[Y8("Usage Tip","<p>Use <strong>preview mode</strong> before sending to production.</p>")]},{name:"cta-default",description:"Call to action block",blocks:[$1("Ready to get started?","Sign up now and get 30 days free.","Start Free Trial")]},{name:"cta-long",description:"CTA with longer text",blocks:[$1("Transform Your Business Today","Join thousands of companies already using our platform to streamline their operations and boost productivity.","Get Started Now")]},{name:"cta-html-description",description:"CTA with paragraph HTML description",blocks:[$1("Get Started","<p>One</p><p>Two</p>","Start Free Trial")]},{name:"cta-html-rich-description",description:"CTA with mixed emphasis, links, and multiple paragraphs",blocks:[$1("Get Started",'<p><strong>Launch today</strong> with <em>zero setup friction</em>.</p><p><a href="https://example.com/docs">Read the docs</a> if you want the full walkthrough.</p>',"Start Free Trial")]},{name:"social-2",description:"Social with 2 platforms",blocks:[PD(["x","linkedin"])]},{name:"social-3",description:"Social with 3 platforms",blocks:[PD(["x","linkedin","instagram"])]},{name:"social-4",description:"Social with 4 platforms",blocks:[PD(["x","linkedin","instagram","facebook"])]},{name:"social-5",description:"Social with 5 platforms",blocks:[PD(["x","linkedin","instagram","facebook","youtube"])]},{name:"footer-simple",description:"Simple footer",blocks:[V8("simple")]},{name:"footer-full",description:"Full footer with social and privacy",blocks:[V8("full")]},{name:"footer-long-address",description:"Footer with long address",blocks:[V8("simple","Acme Corporation Inc.","123 Business Avenue, Suite 456, San Francisco, CA 94107, United States")]},{name:"columns-2-text",description:"2 columns with text",blocks:[s9([f0("Left column content goes here.")],[f0("Right column content goes here.")])]},{name:"columns-3-text",description:"3 columns with text",blocks:[g2([f0("First column.")],[f0("Second column.")],[f0("Third column.")])]},{name:"columns-2-mixed",description:"2 columns with heading and text",blocks:[s9([gA("Left Title",3),f0("Left description.")],[gA("Right Title",3),f0("Right description.")])]},{name:"columns-3-cards",description:"3 columns with feature cards",blocks:[g2([Y8("Feature 1","First feature description.","feature","\uD83C\uDFAF")],[Y8("Feature 2","Second feature description.","feature","⚡")],[Y8("Feature 3","Third feature description.","feature","\uD83D\uDD12")])]},{name:"columns-2-bold-title",description:"2 columns with bold title and description (AI-generated pattern)",blocks:[s9([f0("<p><strong>Set up in minutes</strong></p><p>Describe what you need, and our AI builds infrastructure.</p>")],[f0("<p><strong>AI Sequence Builder</strong></p><p>Describe your custom use case and let AI do it.</p>")])]},{name:"repeat-items",description:"Repeat block rendering items rows",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")])]},{name:"repeat-event-items-custom-alias",description:"Repeat block with nested event source and custom item alias",blocks:[Y9("event.items",[gA("{{lineItem.title}}",3),f0("<p>{{lineItem.description}}</p>")],{itemAlias:"lineItem"})]},{name:"repeat-max-items",description:"Repeat block respects max item rendering",blocks:[Y9("items",[gA("{{item.number}}. {{item.title}}",3)],{maxItems:1})]},{name:"repeat-styled-background-padding",description:"Repeat block with background and padding styles",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{styles:{backgroundColor:"#fef3c7",paddingTop:16,paddingBottom:12,paddingLeft:18,paddingRight:18}})]},{name:"repeat-styled-text-color",description:"Repeat block text color applies to materialized child text",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>"),qy(["Quantity: {{item.number}}","Status: ready"],"bullet")],{styles:{backgroundColor:"#b52222",textColor:"#ffffff",paddingTop:16,paddingBottom:12,paddingLeft:18,paddingRight:18}})]},{name:"repeat-styled-border-radius",description:"Repeat block border and radius styles wrap repeated rows",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{styles:{borderWidth:2,borderColor:"#f97316",borderRadius:12,paddingTop:14,paddingBottom:10,paddingLeft:16,paddingRight:16}})]},{name:"repeat-styled-text-align-center",description:"Repeat block text alignment applies to repeated children",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{styles:{textAlign:"center",backgroundColor:"#f8fafc",paddingTop:14,paddingBottom:10}})]},{name:"repeat-styled-all-container-options",description:"Repeat block with all visual container style controls",blocks:[Y9("event.items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{styles:{backgroundColor:"#111827",textColor:"#f9fafb",textAlign:"right",borderRadius:10,borderWidth:1,borderColor:"#f97316",paddingTop:18,paddingBottom:14,paddingLeft:20,paddingRight:20}})]},{name:"repeat-with-columns",description:"Repeat block containing a nested columns layout",blocks:[Y9("items",[s9([gA("{{item.title}}",3)],[f0("<p>{{item.description}}</p>")])],{styles:{backgroundColor:"#eff6ff",textColor:"#1e3a8a",paddingTop:12,paddingBottom:8,paddingLeft:12,paddingRight:12}})]},{name:"repeat-layout-3-columns",description:"Repeat block lays repeated items out as a three-column grid",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{layout:{columns:3,gap:14,itemStyles:{padding:{top:10,bottom:10,left:8,right:8},backgroundColor:"#f8fafc",borderRadius:8,borderWidth:1,borderColor:"#e2e8f0"}}})]},{name:"repeat-layout-2-columns-gap-zero",description:"Repeat block two-column layout with no horizontal gap",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{layout:{columns:2,gap:0,itemStyles:{padding:{top:8,bottom:8,left:8,right:8},backgroundColor:"#f9fafb"}}})]},{name:"repeat-layout-4-columns-full-row",description:"Repeat block four-column layout with a complete row",blocks:[Y9("gridItems",[gA("{{item.title}}",3)],{layout:{columns:4,gap:10,itemStyles:{padding:{top:8,bottom:8,left:6,right:6},borderWidth:1,borderColor:"#d1d5db"}}})]},{name:"repeat-layout-4-columns-partial-row",description:"Repeat block four-column layout preserves partial row width",blocks:[Y9("items",[gA("{{item.title}}",3)],{layout:{columns:4,gap:10,itemStyles:{padding:{top:8,bottom:8,left:6,right:6},backgroundColor:"#eef2ff",borderRadius:6}}})]},{name:"repeat-layout-item-padding-only",description:"Repeat item shell with padding only",blocks:[Y9("items",[gA("{{item.title}}",3)],{layout:{columns:2,gap:12,itemStyles:{padding:{top:16,bottom:12,left:14,right:14}}}})]},{name:"repeat-layout-item-background-only",description:"Repeat item shell with background color only",blocks:[Y9("items",[gA("{{item.title}}",3)],{layout:{columns:2,gap:12,itemStyles:{backgroundColor:"#ecfeff"}}})]},{name:"repeat-layout-item-radius-only",description:"Repeat item shell with corner radius only",blocks:[Y9("items",[gA("{{item.title}}",3)],{layout:{columns:2,gap:12,itemStyles:{borderRadius:12}}})]},{name:"repeat-layout-item-border-only",description:"Repeat item shell with border only",blocks:[Y9("items",[gA("{{item.title}}",3)],{layout:{columns:2,gap:12,itemStyles:{borderWidth:2,borderColor:"#0ea5e9"}}})]},{name:"repeat-layout-rich-content",description:"Repeat grid item with image, button, and text content",blocks:[Y9("items",[v8(void 0,"{{item.title}} image",48,void 0,"center"),gA("{{item.title}}",3),f0("<p>{{item.description}}</p>"),OE("View details","secondary")],{layout:{columns:2,gap:16,itemStyles:{padding:{top:12,bottom:12,left:12,right:12},backgroundColor:"#f8fafc",borderRadius:10,borderWidth:1,borderColor:"#e2e8f0",height:260,contentLayout:"space-between"}}})]},{name:"repeat-styled-nested-text-color-override",description:"Nested container text color overrides repeat text color",blocks:[Y9("items",[{...s9([gA("{{item.title}}",3)],[f0("<p>{{item.description}}</p>")]),styles:{textColor:"#c2410c"}}],{styles:{textColor:"#f9fafb"}})]},{name:"repeat-with-card",description:"Repeat block containing card content",blocks:[Y9("items",[Y8("{{item.title}}","{{item.description}}","default")],{styles:{backgroundColor:"#f8fafc",textColor:"#0f172a",paddingTop:12,paddingBottom:8}})]},{name:"repeat-empty-source",description:"Repeat block renders empty when the source is not an array",blocks:[Y9("missingItems",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")])]},{name:"hero-color-basic",description:"Color hero with heading only",blocks:[pF({variant:"color"})]},{name:"hero-color-full",description:"Color hero with eyebrow, subheading, and button",blocks:[pF({variant:"color",eyebrow:"New collection",subheading:"Warm-weather staples, cut to move with you.",buttonText:"Shop the drop",buttonUrl:"https://example.com"})]},{name:"hero-color-left-aligned",description:"Color hero with left-aligned content and custom background",blocks:[pF({variant:"color",contentAlign:"left",subheading:"Everything you need to know this month.",styles:{backgroundColor:"#111827"}})]},{name:"hero-image-basic",description:"Image hero with default scrim",blocks:[pF({variant:"image",backgroundImage:dB,subheading:"Text stays readable over the scrim."})]},{name:"hero-image-full",description:"Image hero with eyebrow, button, custom overlay and height",blocks:[pF({variant:"image",backgroundImage:dB,eyebrow:"Limited time",subheading:"Up to 40% off the whole collection.",buttonText:"Shop now",buttonUrl:"https://example.com",overlayColor:"#1e3a5f",overlayOpacity:60,minHeight:260})]},{name:"hero-image-bleed",description:"Full-bleed image hero",blocks:[pF({variant:"image",backgroundImage:dB,subheading:"Edge-to-edge hero band.",styles:{bleed:!0}})]},{name:"testimonial-card",description:"Card testimonial with author title",blocks:[$7({authorTitle:"Founder, Wildgrain Bakery"})]},{name:"testimonial-card-rating-avatar",description:"Card testimonial with stars and avatar",blocks:[$7({rating:5,avatarUrl:dB,authorTitle:"Head of Growth, Alto"})]},{name:"testimonial-minimal",description:"Minimal testimonial with accent border",blocks:[$7({variant:"minimal"})]},{name:"testimonial-centered",description:"Centered testimonial with quote mark and rating",blocks:[$7({variant:"centered",rating:4})]},{name:"testimonial-custom-accent",description:"Testimonial with a custom accent color",blocks:[$7({variant:"minimal",rating:5,accentColor:"#0e7490"})]},{name:"testimonial-quote",description:"Editorial pull quote with attribution",blocks:[$7({variant:"quote",quote:"The best products are built one honest email at a time.",authorTitle:"Founder"})]},{name:"testimonial-quote-no-attribution",description:"Pull quote without an author",blocks:[$7({variant:"quote",quote:"Simplicity is the ultimate sophistication.",authorName:""})]},{name:"testimonial-editorial",description:"Editorial serif pull quote between thin hairline rules",blocks:[$7({variant:"editorial",quote:"It reads like a letter from a friend, not a campaign from a company.",authorTitle:"Creative Director"})]},{name:"testimonial-editorial-no-attribution",description:"Editorial pull quote without an author line",blocks:[$7({variant:"editorial",quote:"Make it quieter, and it gets louder.",authorName:""})]},{name:"testimonial-editorial-left",description:"Left-aligned editorial pull quote",blocks:[{...$7({variant:"editorial",quote:"We stopped shouting and people started listening."}),id:"testimonial-editorial-left-block",styles:{textAlign:"left"}}]},{name:"pricing-cards",description:"Two plan cards with a highlighted plan and badge",blocks:[HJ()]},{name:"pricing-single",description:"Single plan card",blocks:[HJ({plans:[{id:l0("plan"),name:"Pro",price:"$49",period:"/month",description:"Everything you need",features:[{id:l0("plan-feature"),text:"Unlimited contacts"},{id:l0("plan-feature"),text:"Priority support"},{id:l0("plan-feature"),text:"Custom domains"}],buttonText:"Start free trial",buttonUrl:"https://example.com"}]})]},{name:"pricing-three-plans",description:"Three plan cards side by side",blocks:[HJ({plans:[{id:l0("plan"),name:"Starter",price:"$19",period:"/mo",features:[{id:l0("plan-feature"),text:"1,000 contacts"}],buttonText:"Choose",buttonUrl:"https://example.com"},{id:l0("plan"),name:"Pro",price:"$49",period:"/mo",features:[{id:l0("plan-feature"),text:"Unlimited contacts"}],buttonText:"Choose",buttonUrl:"https://example.com",highlighted:!0,badgeText:"Popular"},{id:l0("plan"),name:"Scale",price:"$99",period:"/mo",features:[{id:l0("plan-feature"),text:"Dedicated CSM"}],buttonText:"Choose",buttonUrl:"https://example.com"}]})]},{name:"pricing-minimal",description:"Minimal pricing columns without card surfaces",blocks:[HJ({variant:"minimal"})]},{name:"pricing-custom-accent",description:"Pricing with a custom accent color",blocks:[HJ({accentColor:"#0e7490"})]},{name:"author-byline",description:"Compact byline with avatar",blocks:[nF({avatarUrl:dB})]},{name:"author-byline-no-avatar",description:"Byline without an avatar",blocks:[nF()]},{name:"author-signature",description:"Personal signature sign-off",blocks:[nF({variant:"signature",title:"Founder"})]},{name:"author-unsafe-link",description:"Author signature omits a link with an unsafe URL",blocks:[nF({variant:"signature",title:"Founder",linkText:"Hidden unsafe link",linkUrl:"javascript:alert(1)"})]},{name:"author-card",description:"Author card with avatar, bio, and link",blocks:[nF({variant:"card",avatarUrl:dB,bio:"Writes about building products people love, one email at a time.",linkText:"Follow along",linkUrl:"https://example.com"})]},{name:"article-image-top",description:"Article card with the image on top",blocks:[Tg()]},{name:"article-image-left",description:"Article card with the image on the left",blocks:[Tg({variant:"image-left"})]},{name:"article-minimal",description:"Text-only article teaser",blocks:[Tg({variant:"minimal"})]},{name:"article-no-extras",description:"Article card without category, excerpt, or meta",blocks:[{id:l0("article"),type:"article",variant:"image-top",imageUrl:dB,imageAlt:"Article cover",title:"A headline that stands on its own",url:"https://example.com/blog"}]},{name:"article-cleared-optionals",description:"Cleared article fields do not leave editor-only spacing",blocks:[Tg({category:"",excerpt:"",metaText:"",linkText:"",url:""})]},{name:"article-empty-image-top",description:"Article copy without editor-only image or link chrome",blocks:[Tg({imageUrl:"",url:""})]},{name:"article-empty-image-left",description:"Image-left article collapses to full-width copy without an image",blocks:[Tg({variant:"image-left",imageUrl:"",url:""})]},{name:"rating-inline",description:"Inline star rating with caption",blocks:[FR()]},{name:"rating-stacked",description:"Stacked star rating with caption below",blocks:[FR({variant:"stacked"})]},{name:"rating-partial-left",description:"Three and a half of five stars, left aligned, custom color",blocks:[FR({rating:3.5,align:"left",starColor:"#0e7490",caption:"3.5 average"})]},{name:"stats-plain",description:"Plain three-item stats band",blocks:[Yy()]},{name:"stats-tinted",description:"Stats band on a tinted surface",blocks:[Yy({variant:"tinted"})]},{name:"stats-divided",description:"Stats band with vertical separators",blocks:[Yy({variant:"divided"})]},{name:"stats-two-items",description:"Two-item stats band with custom accent",blocks:[Yy({accentColor:"#0e7490",items:[{id:l0("stat"),value:"2x",label:"Faster onboarding"},{id:l0("stat"),value:"40%",label:"More conversions"}]})]},{name:"steps-timeline",description:"Timeline steps with connector line",blocks:[IR()]},{name:"steps-numbered",description:"Plain numbered steps",blocks:[IR({variant:"numbered"})]},{name:"steps-timeline-no-descriptions",description:"Timeline steps with titles only",blocks:[IR({items:[{id:l0("step"),title:"Sign up"},{id:l0("step"),title:"Connect your store"},{id:l0("step"),title:"Launch your first flow"}]})]},{name:"product-grid-plain",description:"Three-column plain product grid",blocks:[O4()]},{name:"product-grid-cards",description:"Bordered product grid tiles",blocks:[O4({variant:"cards"})]},{name:"product-grid-two-columns",description:"Two-column product grid with an odd item count",blocks:[O4({columns:2})]},{name:"product-grid-six-items",description:"Two rows of three product tiles",blocks:[O4({items:[...O4().items,{id:l0("pgitem"),imageUrl:dB,imageAlt:"Product 4",title:"Silk Scarf",price:"$64"},{id:l0("pgitem"),imageUrl:dB,imageAlt:"Product 5",title:"Leather Bag",price:"$430"},{id:l0("pgitem"),imageUrl:dB,imageAlt:"Product 6",title:"Knit Beanie",price:"$79"}]})]},{name:"product-grid-no-price",description:"Product tiles without prices",blocks:[O4({items:O4().items.map((A)=>{let{price:x,...E}=A;return E})})]},{name:"product-grid-cleared-price",description:"Cleared product prices do not leave editor-only spacing",blocks:[O4({items:O4().items.map((A)=>({...A,price:""}))})]},{name:"product-grid-empty-images",description:"Product grid copy without editor-only image placeholders",blocks:[O4({columns:2,items:O4().items.slice(0,2).map((A)=>({...A,imageUrl:""}))})]},{name:"product-grid-partial-images",description:"Product grid with a mix of populated and empty images",blocks:[O4({columns:2,items:O4().items.slice(0,2).map((A,x)=>({...A,imageUrl:x===0?dB:""}))})]},{name:"gallery-two-up",description:"Two-image gallery",blocks:[LD(2)]},{name:"gallery-two-up-four",description:"Four images in a two-up grid (two rows)",blocks:[LD(4)]},{name:"gallery-three-up",description:"Three-image gallery in one row",blocks:[LD(3,{layout:"three-up"})]},{name:"gallery-mosaic",description:"Mosaic gallery with one large and two small images",blocks:[LD(3,{layout:"mosaic"})]},{name:"gallery-custom-gap-radius",description:"Gallery with custom gap, radius, and height",blocks:[LD(2,{gap:16,imageRadius:0,imageHeight:140})]},{name:"gallery-empty-images",description:"Empty gallery is omitted outside its selected editing state",blocks:[{...LD(2),images:[{id:l0("gallery-image"),src:"",alt:"Empty image 1"},{id:l0("gallery-image"),src:"",alt:"Empty image 2"}]}]},{name:"gallery-partial-images",description:"Partial gallery reflows only populated images",blocks:[{...LD(2),images:[{id:l0("gallery-image"),src:dB,alt:"Populated image"},{id:l0("gallery-image"),src:"",alt:"Empty image"}]}]},{name:"badge-soft",description:"Soft tinted badge",blocks:[$J("NEW","soft")]},{name:"badge-pill",description:"Filled pill badge",blocks:[$J("SALE","pill")]},{name:"badge-outline",description:"Outlined badge",blocks:[$J("BETA","outline")]},{name:"badge-aligned-center",description:"Centered badge with custom color",blocks:[$J("LIMITED","pill",{align:"center",color:"#0e7490"})]},{name:"badge-custom-styles",description:"Badge with custom container and text styles",blocks:[$J("CUSTOM","pill",{styles:{backgroundColor:"#fef3c7",textColor:"#7c2d12",borderColor:"#92400e",borderWidth:2,borderRadius:10,paddingTop:6,paddingRight:8,paddingBottom:6,paddingLeft:8}})]},{name:"divider-dots",description:"Dots divider",blocks:[f0("Above the dots divider."),{id:l0("divider"),type:"divider",variant:"dots"},f0("Below the dots divider.")]},{name:"divider-accent",description:"Accent bar divider",blocks:[gA("Section title",2),{id:l0("divider"),type:"divider",variant:"accent"},f0("Accent bar under a heading.")]},{name:"divider-line-width-color",description:"Line divider with custom width and color",blocks:[{id:l0("divider"),type:"divider",variant:"line",color:"#0e7490",width:50}]},{name:"table-basic",description:"Data table with header row",blocks:[QR()]},{name:"table-zebra",description:"Data table with zebra striping",blocks:[QR({zebra:!0})]},{name:"table-no-header",description:"Data table without header row",blocks:[QR({showHeader:!1})]},{name:"table-two-columns",description:"Two-column key/value table",blocks:[QR({columns:[{id:l0("table-col"),header:"Item"},{id:l0("table-col"),header:"Amount",align:"right"}],rows:[{id:l0("table-row"),cells:["Subtotal","$96.00"]},{id:l0("table-row"),cells:["Shipping","$4.99"]},{id:l0("table-row"),cells:["Total","$100.99"]}]})]},{name:"features-cards",description:"Three-column feature cards",blocks:[DR()]},{name:"features-plain",description:"Plain centered features",blocks:[DR({variant:"plain"})]},{name:"features-icon-left",description:"Icon-left feature rows",blocks:[DR({variant:"icon-left"})]},{name:"features-two-columns",description:"Four features in two columns",blocks:[DR({columns:2,items:[{id:l0("feature"),emoji:"⚡",title:"Fast",description:"Snappy everywhere."},{id:l0("feature"),emoji:"\uD83D\uDD12",title:"Secure",description:"Encrypted at rest."},{id:l0("feature"),emoji:"\uD83D\uDCC8",title:"Scalable",description:"Grows with you."},{id:l0("feature"),emoji:"\uD83E\uDDE9",title:"Composable",description:"Plays well with others."}]})]},{name:"image-card-left",description:"Image card with image on the left",blocks:[CR()]},{name:"image-card-right",description:"Image card with image on the right and button",blocks:[CR({variant:"image-right",buttonText:"Read more",buttonUrl:"https://example.com"})]},{name:"image-card-top",description:"Stacked image card with button",blocks:[CR({variant:"image-top",buttonText:"Take a look",buttonUrl:"https://example.com"})]},{name:"image-card-empty-image",description:"Image card preserves copy before an image is selected",blocks:[CR({variant:"image-top",imageUrl:"",imageAlt:"",title:"Important launch copy",description:"This supporting description must be sent."})]},{name:"header-logo-only",description:"Header with logo only",blocks:[{...rF("logo-left"),navItems:[]}]},{name:"header-logo-centered",description:"Header with centered logo",blocks:[{...rF("stacked",{navAlign:"center"}),navItems:[]}]},{name:"header-logo-button",description:"Header with logo and CTA button",blocks:[{...rF("logo-left",{accent:!0}),navItems:[{id:l0("nav"),label:"Upgrade",url:"https://example.com"}],fontWeight:"semibold"}]},{name:"header-logo-nav",description:"Header with logo and nav links",blocks:[{...rF("logo-left"),navItems:[{id:l0("nav"),label:"Blog",url:"https://example.com/blog"},{id:l0("nav"),label:"Pricing",url:"https://example.com/pricing"},{id:l0("nav"),label:"Docs",url:"https://example.com/docs"}]}]}],Pt0=[{name:"combo-visual-hero-story",description:"Image hero, badge eyebrow, testimonial, and gallery",blocks:[pF({variant:"image",backgroundImage:dB,eyebrow:"Customer story",heading:"How Wildgrain doubled repeat orders",subheading:"A conversation with founder Maya Chen.",styles:{bleed:!0}}),nA(24),$J("CASE STUDY","soft"),gA("From farmers market to nationwide",2),f0("Wildgrain started as a weekend stall. Today they ship thousands of boxes a month."),$7({rating:5,avatarUrl:dB,authorTitle:"Founder, Wildgrain Bakery"}),LD(3,{layout:"mosaic"}),{id:l0("divider"),type:"divider",variant:"dots"},f0("Want results like these? Start your first sequence today.")]},{name:"combo-h1-text",description:"H1 followed by text",blocks:[gA("Welcome to Our Newsletter",1),f0("Thank you for subscribing. Here's what's new this week.")]},{name:"combo-h1-text-button",description:"H1, text, and button",blocks:[gA("Get Started Today",1),f0("Join thousands of happy customers using our platform."),OE("Sign Up Free","primary")]},{name:"combo-h1-h2-text",description:"H1, H2, and text hierarchy",blocks:[gA("Main Title",1),gA("Subtitle Section",2),f0("Content under the subtitle explaining the topic in detail.")]},{name:"combo-h1-text-h2-text",description:"Alternating headings and text",blocks:[gA("Welcome",1),f0("Introduction paragraph."),gA("What's New",2),f0("Details about new features.")]},{name:"combo-h1-lead-text",description:"H1 with lead and regular text",blocks:[gA("Monthly Update",1),f0("A quick summary of everything that happened this month.","lead"),f0("Here are the details you need to know about our latest updates.")]},{name:"combo-newsletter-intro",description:"Newsletter intro section",blocks:[X9("center"),nA(16),gA("Weekly Digest",1),f0("Your weekly roundup of the best content.","lead"),s6()]},{name:"combo-newsletter-article",description:"Newsletter article block",blocks:[gA("Featured Article",2),f0("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore."),OE("Read More","secondary"),nA(24)]},{name:"combo-newsletter-footer",description:"Newsletter footer section",blocks:[s6(),nA(16),PD(["x","linkedin","instagram"]),V8("full")]},{name:"combo-text-footer-tight",description:"Text directly followed by a footer",blocks:[f0("Start writing your email content here..."),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-heading-footer-tight",description:"Heading directly followed by a footer",blocks:[gA("Latest updates",2),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-list-footer-tight",description:"List directly followed by a footer",blocks:[qy(["First update","Second update"]),V8("full","BlogToPin","Hoholya 17")]},{name:"band-full-bleed-dark",description:"Full-bleed dark hero band escaping container padding",blocks:[{id:l0("columns"),type:"columns",styles:{bleed:!0},columns:[{id:l0("col"),backgroundColor:"#111827",borderRadius:0,padding:{top:32,bottom:32,left:24,right:24},children:[{id:l0("heading"),type:"heading",level:1,content:"Edge to Edge",styles:{textAlign:"center",textColor:"#ffffff"}},{id:l0("text"),type:"text",variant:"lead",content:"<p>A band that escapes the container padding.</p>",styles:{textAlign:"center",textColor:"#ffffff"}}]}]},f0("Regular content stays inside the padded container.")]},{name:"list-variants",description:"Bullet, numbered, and brand-colored checklist variants",blocks:[qy(["First point","Second point"],"bullet"),qy(["First step","Second step"],"numbered"),qy(["Included feature","Another included feature"],"checklist")]},{name:"combo-html-footer-tight",description:"HTML directly followed by a footer",blocks:[kb("<p><strong>HTML content</strong> before the footer.</p>"),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-button-footer-tight",description:"Button directly followed by a footer",blocks:[OE("Button","primary"),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-divider-footer-tight",description:"Divider directly followed by a footer",blocks:[s6(),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-image-footer-tight",description:"Image directly followed by a footer",blocks:[v8(void 0,"Featured image",100),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-logo-footer-tight",description:"Logo directly followed by a footer",blocks:[X9("center",56),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-video-footer-tight",description:"Video directly followed by a footer",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Sample video",{width:80}),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-card-footer-tight",description:"Card directly followed by a footer",blocks:[Y8("Your recap","A short update before the footer."),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-cta-footer-tight",description:"CTA directly followed by a footer",blocks:[$1("Ready to start?","Create your next campaign today.","Open app"),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-product-footer-tight",description:"Product directly followed by a footer",blocks:[_F("medium",{description:"A featured product before the footer.",price:"$29",imageUrl:"https://images.sequenzy.com/socials/linkedin.png",url:"https://example.com/product"}),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-discount-footer-tight",description:"Discount code directly followed by a footer",blocks:[Xy("medium",{headline:"Save today",description:"Use this code before checkout."}),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-social-footer-tight",description:"Social links directly followed by a footer",blocks:[PD(["x","linkedin","instagram"]),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-columns-footer-tight",description:"Columns directly followed by a footer",blocks:[s9([f0("Left column")],[OE("Right action","secondary")]),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-html-pub-expiry-email",description:"Block-based HTML Pub expiry email with a table-based author signature",blocks:[{id:"html-pub-logo-block",alt:"HTML Pub Logo",type:"logo",align:"center",width:64},{id:"html-pub-wordmark-block",alt:"HTML Pub",src:"https://htmlpub.com/nav-logo-light.png",type:"image",width:150},{id:"html-pub-greeting-block",type:"text",content:"<p>Hi {{FIRST_NAME|there}},</p>",variant:"paragraph"},{id:"html-pub-expiry-title-block",type:"text",content:"<p><strong>Your free HTML Pub page expires in 2 days.</strong></p>",variant:"paragraph"},{id:"html-pub-expiry-copy-block",type:"text",content:"<p>After that, the live URL stops working. Your content stays saved in your account - but nobody else can see it until you upgrade.</p>",variant:"paragraph"},{id:"html-pub-expiry-price-block",type:"text",content:"<p>$10/month. Takes 30 seconds to switch. Your page keeps the same URL and nothing breaks.</p>",variant:"paragraph"},{id:"html-pub-expiry-button-block",url:"https://htmlpub.com/dashboard/billing",text:"Keep my page live - $10/month",type:"button",variant:"primary"},{id:"html-pub-signature-block",type:"text",content:Lt0,variant:"paragraph"},{id:"html-pub-footer-block",type:"footer",address:"520 - 1515 Douglas Street Victoria, BC, V8W 2G4, Canada",variant:"full",companyName:"HTML Pub",privacyPolicyUrl:"https://htmlpub.com/privacy"}]},{name:"combo-product-hero",description:"Product announcement hero",blocks:[X9("center"),nA(24),gA("Introducing Our New Feature",1),f0("We're excited to announce a game-changing addition to our platform.","lead"),v8(void 0,"Product screenshot",90),OE("Try It Now","primary")]},{name:"combo-product-features",description:"Product features section",blocks:[gA("Key Features",2),nA(16),g2([Y8("Fast","Lightning quick performance.","feature","⚡")],[Y8("Secure","Enterprise-grade security.","feature","\uD83D\uDD12")],[Y8("Simple","Easy to use interface.","feature","✨")])]},{name:"combo-product-cta",description:"Product CTA section",blocks:[nA(24),$1("Ready to upgrade?","Get started with our new features today.","Upgrade Now"),nA(16)]},{name:"combo-welcome-header",description:"Welcome email header",blocks:[X9("center",80),nA(24),gA("Welcome aboard! \uD83C\uDF89",1),f0("We're thrilled to have you join our community. Let's get you started.","lead")]},{name:"combo-welcome-steps",description:"Welcome email onboarding steps",blocks:[gA("Getting Started",2),f0("Follow these simple steps to set up your account:"),nA(16),s9([gA("Step 1",3),f0("Complete your profile settings.")],[gA("Step 2",3),f0("Invite your team members.")]),nA(16),s9([gA("Step 3",3),f0("Create your first project.")],[gA("Step 4",3),f0("Explore our documentation.")])]},{name:"combo-welcome-footer",description:"Welcome email footer",blocks:[nA(24),s6(),f0("Need help? Reply to this email or visit our help center."),OE("Visit Help Center","secondary"),nA(16),V8("simple")]},{name:"combo-promo-header",description:"Promotional email header",blocks:[X9("left"),nA(16),gA("\uD83D\uDD25 Flash Sale - 50% Off!",1),f0("For the next 24 hours only, get half off on all premium plans.","lead")]},{name:"combo-promo-offer",description:"Promotional offer section",blocks:[Y8("Limited Time Offer","Use code FLASH50 at checkout. Offer expires midnight.","feature","⏰"),nA(16),OE("Shop Now","primary"),nA(8),OE("View All Deals","secondary")]},{name:"combo-promo-products",description:"Promotional products grid",blocks:[gA("Top Picks",2),g2([v8(void 0,"Product 1"),f0("Product Name - $49")],[v8(void 0,"Product 2"),f0("Product Name - $79")],[v8(void 0,"Product 3"),f0("Product Name - $99")])]},{name:"combo-update-header",description:"Update email header",blocks:[X9("center"),nA(16),gA("What's New in v2.5",1),f0("Here's everything we shipped this month.","lead"),s6()]},{name:"combo-update-changelog",description:"Update changelog section",blocks:[gA("New Features",2),f0("• Dark mode support across all screens"),f0("• Improved search with filters"),f0("• New dashboard analytics widgets"),nA(16),gA("Bug Fixes",2),f0("• Fixed login issues on Safari"),f0("• Resolved notification delays"),f0("• Fixed export functionality")]},{name:"combo-update-highlight",description:"Update highlight section",blocks:[nA(16),Y8("Highlight: Dark Mode","The most requested feature is finally here! Enable dark mode in your settings.","feature","\uD83C\uDF19"),OE("Enable Dark Mode","primary")]},{name:"combo-full-newsletter",description:"Complete newsletter email",blocks:[X9("center"),nA(24),gA("The Weekly Digest",1),f0("Issue #42 - January 2025","lead"),s6(),nA(16),gA("Top Story",2),v8(void 0,"Featured image",90),f0("This week's biggest news and updates from around the industry. Read on for the full scoop."),OE("Read Full Article","secondary"),nA(24),gA("Quick Hits",2),s9([gA("Tech News",3),f0("Latest developments in AI and ML.")],[gA("Industry",3),f0("Market trends and analysis.")]),nA(24),s6(),PD(["x","linkedin","instagram"]),V8("full")]},{name:"combo-full-welcome",description:"Complete welcome email",blocks:[X9("center",80),nA(32),gA("Welcome to Acme! \uD83C\uDF89",1),f0("We're so excited to have you on board. Your account is ready to go.","lead"),nA(24),$1("Get Started","Complete your profile to unlock all features.","Set Up Profile"),nA(24),gA("What You Can Do",2),g2([Y8("Create","Build amazing projects.","feature","\uD83C\uDFA8")],[Y8("Collaborate","Work with your team.","feature","\uD83D\uDC65")],[Y8("Ship","Deploy with confidence.","feature","\uD83D\uDE80")]),nA(24),s6(),f0("Questions? Just reply to this email."),V8("simple")]},{name:"combo-full-promo",description:"Complete promotional email",blocks:[X9("center"),nA(16),gA("Summer Sale is Here! ☀️",1),f0("Save up to 60% on selected items. Limited time only.","lead"),nA(16),v8(void 0,"Sale banner"),nA(16),s9([Y8("30% Off","On all basics.","default")],[Y8("60% Off","On summer collection.","feature","\uD83D\uDD25")]),nA(16),OE("Shop the Sale","primary"),nA(24),gA("Best Sellers",2),g2([v8(void 0,"Product"),f0("Item 1 - $29")],[v8(void 0,"Product"),f0("Item 2 - $39")],[v8(void 0,"Product"),f0("Item 3 - $49")]),nA(24),s6(),V8("full")]},{name:"combo-full-announcement",description:"Complete announcement email",blocks:[X9("center"),nA(24),gA("Big News! \uD83D\uDCE2",1),f0("We have an exciting announcement to share with you today.","lead"),nA(16),Y8("We've Raised $50M Series B","This funding will help us accelerate product development and expand globally.","feature","\uD83C\uDFAF"),nA(16),gA("What This Means For You",2),f0("With this investment, we're committed to building more features, improving performance, and providing even better support."),nA(16),s9([gA("More Features",3),f0("Faster development of requested features.")],[gA("Better Support",3),f0("24/7 customer support coming soon.")]),nA(24),OE("Read Our Blog Post","primary"),nA(24),s6(),PD(["x","linkedin"]),V8("simple")]},{name:"combo-receipt-header",description:"Receipt email header",blocks:[X9("left"),nA(16),gA("Order Confirmation",1),f0("Thank you for your purchase! Your order #12345 is confirmed.")]},{name:"combo-receipt-details",description:"Receipt order details",blocks:[gA("Order Details",2),s6(),s9([f0("<strong>Item</strong>"),f0("Premium Plan (Annual)")],[f0("<strong>Amount</strong>"),f0("$199.00")]),s6(),s9([f0("<strong>Total</strong>")],[f0("<strong>$199.00</strong>")]),nA(16),OE("View Receipt","secondary")]},{name:"combo-shipping-update",description:"Shipping update email",blocks:[X9("center"),nA(16),gA("Your Order Has Shipped! \uD83D\uDCE6",1),f0("Great news! Your package is on its way.","lead"),nA(16),Y8("Tracking Number","1Z999AA10123456784","default"),nA(16),OE("Track Package","primary"),nA(24),V8("simple")]},{name:"combo-feedback-request",description:"Feedback request email",blocks:[X9("center"),nA(16),gA("How are we doing?",1),f0("We'd love to hear your feedback on your recent experience.","lead"),nA(16),f0("Your opinion helps us improve our service for everyone."),nA(16),OE("Leave Feedback","primary"),nA(24),V8("simple")]},{name:"combo-reengagement",description:"Re-engagement email",blocks:[X9("center"),nA(16),gA("We Miss You! \uD83D\uDC99",1),f0("It's been a while since we've seen you. Here's what you've missed."),nA(16),s9([Y8("New Feature","Check out our new dashboard.","feature","✨")],[Y8("Improvements","Faster and more reliable.","feature","⚡")]),nA(16),$1("Come Back","We've made things even better since you left.","Log In Now"),nA(16),V8("simple")]},{name:"combo-h1-h2-h3-text",description:"Full heading hierarchy",blocks:[gA("Main Title (H1)",1),f0("Introduction paragraph under the main title."),gA("Section Title (H2)",2),f0("Content for this section."),gA("Subsection (H3)",3),f0("More detailed content in this subsection.")]},{name:"combo-multiple-ctas",description:"Multiple CTAs",blocks:[gA("Choose Your Plan",1),s9([Y8("Basic","Perfect for individuals.","default"),OE("Start Basic","secondary")],[Y8("Pro","For growing teams.","feature","⭐"),OE("Start Pro","primary")])]},{name:"combo-mixed-columns",description:"Mixed content in columns",blocks:[gA("Our Services",2),g2([gA("Consulting",3),f0("Expert advice for your business."),OE("Learn More","secondary")],[gA("Development",3),f0("Custom software solutions."),OE("Learn More","secondary")],[gA("Support",3),f0("24/7 technical assistance."),OE("Learn More","secondary")])]},{name:"combo-all-text-variants",description:"All text formatting variants",blocks:[f0("Normal paragraph text."),f0("Lead text with larger size.","lead"),f0("<strong>Bold text</strong> for emphasis."),f0("<em>Italic text</em> for quotes."),f0("<u>Underlined text</u> for highlighting."),f0('<a href="#">Link text</a> for navigation.')]},{name:"combo-all-button-variants",description:"All button variants together",blocks:[OE("Primary Action","primary"),nA(8),OE("Secondary Action","secondary"),nA(8),OE("Pill Style","pill")]},{name:"combo-all-spacers",description:"All spacer sizes",blocks:[f0("8px spacer below:"),nA(8),f0("16px spacer below:"),nA(16),f0("24px spacer below:"),nA(24),f0("32px spacer below:"),nA(32),f0("48px spacer below:"),nA(48),f0("64px spacer below:"),nA(64),f0("End.")]},{name:"combo-divider-usage",description:"Dividers separating sections",blocks:[gA("Section 1",2),f0("Content for section one."),s6(),gA("Section 2",2),f0("Content for section two."),s6(),gA("Section 3",2),f0("Content for section three.")]},{name:"combo-minimal-announcement",description:"Minimal announcement",blocks:[gA("Quick Update",1),f0("Just a brief note to let you know we've updated our terms of service."),OE("Review Changes","secondary")]},{name:"combo-minimal-reminder",description:"Minimal reminder",blocks:[X9("center"),gA("Reminder",1),f0("Your trial expires in 3 days."),OE("Upgrade Now","primary"),V8("simple")]},{name:"combo-dense-features",description:"Dense feature list",blocks:[gA("All Features Included",1),s9([f0("✓ Unlimited projects"),f0("✓ Team collaboration"),f0("✓ Advanced analytics"),f0("✓ Priority support")],[f0("✓ Custom domains"),f0("✓ API access"),f0("✓ White labeling"),f0("✓ SSO integration")]),nA(16),OE("See All Features","secondary")]},{name:"combo-dense-pricing",description:"Dense pricing comparison",blocks:[gA("Choose Your Plan",1),g2([gA("Starter",3),f0("$9/mo"),f0("5 projects"),f0("Basic support"),OE("Select","secondary")],[gA("Pro",3),f0("$29/mo"),f0("Unlimited projects"),f0("Priority support"),OE("Select","primary")],[gA("Enterprise",3),f0("Custom"),f0("Custom solutions"),f0("Dedicated support"),OE("Contact Us","secondary")])]},{name:"combo-image-gallery",description:"Image gallery layout",blocks:[gA("Photo Gallery",1),g2([v8(void 0,"Photo 1")],[v8(void 0,"Photo 2")],[v8(void 0,"Photo 3")]),nA(8),g2([v8(void 0,"Photo 4")],[v8(void 0,"Photo 5")],[v8(void 0,"Photo 6")])]},{name:"combo-hero-image",description:"Hero with large image",blocks:[v8(void 0,"Hero image"),nA(24),gA("Your Journey Starts Here",1),f0("Discover amazing possibilities with our platform.","lead"),OE("Explore Now","primary")]},{name:"combo-testimonial",description:"Testimonial section",blocks:[gA("What Our Customers Say",2),nA(16),f0('"This product has completely transformed how we work. Highly recommended!"',"lead"),f0("— Jane Doe, CEO at Acme Corp"),nA(24)]},{name:"combo-stats",description:"Stats section",blocks:[gA("By The Numbers",2),g2([gA("10K+",1),f0("Active Users")],[gA("99.9%",1),f0("Uptime")],[gA("24/7",1),f0("Support")])]},{name:"combo-onboarding-flow",description:"Onboarding flow steps",blocks:[gA("Get Started in 3 Steps",1),nA(16),gA("1. Create Account",3),f0("Sign up with your email in seconds."),nA(8),gA("2. Set Preferences",3),f0("Customize your experience to fit your needs."),nA(8),gA("3. Start Using",3),f0("You're all set! Begin exploring features."),nA(16),OE("Begin Setup","primary")]},{name:"combo-h1-text-br-text",description:"Heading then multiple text blocks",blocks:[gA("Keep your landing page winning",1),f0("Hi there,"),f0("Thanks for using our product! I hope the insights helped you spot some quick wins for your page."),f0("Optimization isn't a one-time thing. As you update your copy and add new features, new gaps can appear.")]},{name:"combo-h1-text-p-gaps",description:"Heading then text blocks with <p>-based empty lines",blocks:[gA("Welcome Back",1),f0("<p>We noticed you haven't logged in for a while.</p><p><br></p><p>Here's what you've been missing:</p>"),f0("<p>New features launched last week.</p><p><br></p><p>Performance improvements across the board.</p>")]},{name:"combo-text-trailing-gap-next-text",description:"Trailing empty paragraph in one text block before the next text block",blocks:[f0("<p>Hit reply with just one word:</p><p><strong>SaaS Founder</strong> / <strong>SDR team</strong> / <strong>Agency / or else</strong></p><p><br></p><p>JM</p><p></p>"),f0("<p>Talk soon,</p><p><strong>Founder, Roverlead</strong></p>")]},{name:"combo-text-trailing-gap-next-button",description:"Trailing empty paragraph in a text block before a button block",blocks:[f0("<p>Intro</p><p></p>"),OE("Go")]},{name:"combo-text-bold-title-cta",description:"Text with bold title + br, followed by CTA block",blocks:[f0("<strong>A little something extra...</strong><br>If you upgrade to Pro today, we'll feature your product as a sponsor on our homepage."),$1("Upgrade for $4 (Normally $9)","Use code 5USDOFF to get 15 scans per month.","Claim My Discount")]},{name:"combo-text-br-card",description:"Text with leading <br> followed by card block",blocks:[f0("<br>Here's a summary of your recent activity and what you can do next."),Y8("Your Progress","You've completed 3 out of 5 onboarding steps.","default")]},{name:"combo-multi-text-br-gaps",description:"Multiple text blocks with various br patterns",blocks:[gA("Monthly Update",1),f0("Hi there,"),f0("<br>Here's your monthly summary. We've been busy making improvements."),f0("<strong>What's new:</strong><br>We added three major features this month."),f0("<br>Stay tuned for more updates coming next week."),f0("Best,<br>The Team")]},{name:"combo-h1-lead-br-text-button",description:"Heading, lead text, then regular text and button",blocks:[gA("Your trial is ending soon",1),f0("You have 3 days left on your free trial. Don't lose access to your data.","lead"),f0("<p>During your trial, you've:</p><p><br></p><p>Created 12 projects</p><p>Invited 3 team members</p><p>Sent 45 emails</p>"),OE("Upgrade Now","primary")]},{name:"combo-text-empty-lines-divider-text",description:"Text with empty lines, divider, then more text with empty lines",blocks:[f0("<p>Section one content goes here.</p><p><br></p><p>With a second paragraph after a gap.</p>"),s6(),f0("<p>Section two starts here.</p><p><br></p><p>Also with a gap between paragraphs.</p>")]},{name:"combo-full-email-br-gaps",description:"Full email layout with multiple text blocks",blocks:[X9("center"),gA("Keep your landing page winning",1),f0("Hi there,"),f0("Thanks for using our product for your recent scan! I hope the insights helped."),f0("Optimization isn't a one-time thing. I'm giving you <strong>$5 off</strong> your first month of the Pro plan."),f0("<strong>A little something extra...</strong><br>If you upgrade to Pro today, we'll feature your product as a sponsor."),$1("Upgrade for $4 (Normally $9)","Use code 5USDOFF to get 15 scans per month and a week of sponsorship.","Claim My Discount"),f0(`<em>"Ran on my site fully expecting a polite 'looks fine' and instead got a very accurate list of things I really needed to look at."</em> - Alex, founder`),f0("If you have any questions, just hit reply!<br>Best,<br>Jim"),V8("full","FixMyLanding","")]},{name:"combo-text-br-inside-columns",description:"Columns with text blocks",blocks:[s9([gA("Feature A",3),f0("Description of feature A. It does something great.")],[gA("Feature B",3),f0("Description of feature B. Also very useful.")])]},{name:"conditional-branch-pro",description:"Conditional group resolves to the matching branch before rendering",blocks:[gA("Your rollout is ready",1),f0("Hi {{FIRST_NAME}},"),{id:l0("conditional-group"),type:"conditional-group",conditions:[{id:l0("filter"),field:"attribute",operator:"is",value:"plan:pro"}],ifBranch:{id:l0("branch"),children:[Y8("Pro feature unlocked","Conditional branches can show the premium version of a message without duplicating the whole email.","feature","✨"),OE("Open Pro workspace","primary","https://example.com/pro")]},elseBranch:{id:l0("branch"),children:[f0("Upgrade to Pro to unlock advanced reporting and branch-level personalization.")]}},V8("simple","Test Company","123 Test Street, Test City")]},{name:"conditional-columns-pro",description:"Conditional child blocks inside columns stay visually aligned after filtering",blocks:[gA("Plan-aware update",2),s9([{...f0("Visible only on the Pro plan."),conditions:[{id:l0("filter"),field:"attribute",operator:"is",value:"plan:pro"}]},f0("Shared checklist item for everyone.")],[f0("This side stays visible so the layout still has a stable second column."),OE("Review account","secondary","https://example.com/account")])]},{name:"saas-onboarding-visual",description:"New visual blocks working together: rating, steps, stats, pricing, pull quote, and signature",blocks:[gA("Get set up in minutes",1),FR(),IR(),Yy({variant:"tinted"}),HJ(),$7({variant:"quote",quote:"Switching took an afternoon and paid for itself in a week.",authorTitle:"Head of Growth"}),nF({variant:"signature",title:"Founder"}),V8("simple","Test Company","123 Test Street, Test City")]},{name:"newsletter-digest-articles",description:"Author byline with stacked article cards",blocks:[nF({avatarUrl:dB}),gA("This week's reads",2),Tg(),Tg({variant:"image-left",title:"A second story worth your time",metaText:"3 min read"}),Tg({variant:"minimal",title:"One more quick link"})]}],jt0=[...Ot0,...Pt0,...i10];function o9(A){return`https://images.unsplash.com/${A}?w=1200&q=80&auto=format&fit=crop`}var Uy={workspace:{url:o9("photo-1497366216548-37526070297c"),alt:"Modern office workspace",category:"tech",moods:["default","editorial"]},team:{url:o9("photo-1522202176988-66273c2fd55f"),alt:"Team working together",category:"lifestyle",moods:["default","soft"]},analytics:{url:o9("photo-1460925895917-afdab827c52f"),alt:"Analytics dashboard on a laptop",category:"tech",moods:["default","bold"]},store:{url:o9("photo-1441986300917-64674bd600d8"),alt:"Boutique store interior",category:"fashion",moods:["soft","editorial"]},celebration:{url:o9("photo-1492684223066-81342ee5ff30"),alt:"Confetti celebration",category:"lifestyle",moods:["bold","default"]},collaboration:{url:o9("photo-1519389950473-47ba0277781c"),alt:"Desk with laptops during a work session",category:"tech",moods:["default"]},event:{url:o9("photo-1557804506-669a67965ba0"),alt:"Team workshop session",category:"lifestyle",moods:["default","bold"]},shopping:{url:o9("photo-1607082348824-0a96f2a4b9da"),alt:"Shopping bags",category:"fashion",moods:["soft","bold"]},desk:{url:o9("photo-1499951360447-b19be8fe80f5"),alt:"Tidy desk with laptop and monitor",category:"product",moods:["default","editorial"]},meeting:{url:o9("photo-1517245386807-bb43f82c33c4"),alt:"Meeting conversation",category:"lifestyle",moods:["default","soft"]},gifts:{url:o9("photo-1513885535751-8b9238bd345a"),alt:"Wrapped gifts",category:"product",moods:["soft","bold"]},mountains:{url:o9("photo-1501854140801-50d01698950b"),alt:"Green hills seen from above",category:"nature",moods:["soft","editorial"]},sunrise:{url:o9("photo-1470071459604-3b5ec3a7fe05"),alt:"Foggy mountain ridge at sunrise",category:"nature",moods:["editorial","default"]},meal:{url:o9("photo-1504674900247-0877df9cc836"),alt:"Plated meal on a dark table",category:"food",moods:["editorial","soft"]},freshFood:{url:o9("photo-1490645935967-10de6ba17061"),alt:"Fresh fruit and vegetable spread",category:"food",moods:["default","soft"]},wardrobe:{url:o9("photo-1445205170230-053b83016050"),alt:"Garments hanging on a clothing rack",category:"fashion",moods:["editorial","soft"]},watch:{url:o9("photo-1523275335684-37898b6baf30"),alt:"Minimal watch product shot",category:"product",moods:["editorial","bold"]},camera:{url:o9("photo-1526170375885-4d8ecf77b99f"),alt:"Camera on a plain background",category:"product",moods:["default","editorial"]},gradient:{url:o9("photo-1550859492-d5da9d8e45f3"),alt:"Flowing abstract color gradient",category:"abstract",moods:["bold","default"]}};var e_A=Object.values(Uy),AnA=[Uy.workspace,Uy.team,Uy.desk,Uy.celebration];function pA(A,x,E){return{field:A,operator:x,value:E}}var BnA=[{id:"high-mrr",name:"High MRR",description:"Customers with MRR over $100",icon:"TrendingUp",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("attribute","gte","mrr:100")]},{id:"low-mrr",name:"Low MRR",description:"Customers with MRR under $50",icon:"TrendingDown",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("attribute","gt","mrr:0"),pA("attribute","lt","mrr:50")]},{id:"high-ltv",name:"High LTV customers",description:"Customers with lifetime value over $500",icon:"DollarSign",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("attribute","gte","ltv:500")]},{id:"enterprise-value",name:"Enterprise value",description:"Customers with very high MRR or lifetime value",icon:"Crown",category:"saas",filterJoinOperator:"or",filters:[pA("attribute","gte","mrr:500"),pA("attribute","gte","ltv:2000")]},{id:"past-due-customers",name:"Past due customers",description:"Customers with a recent failed payment",icon:"AlertTriangle",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("tag","contains",KA.PAST_DUE),pA("event","is",`${RA.SAAS_PAYMENT_FAILED}:30d`)]},{id:"cancelled-retainable",name:"Cancelled, not churned",description:"Cancelled customers who have not fully churned yet",icon:"UserMinus",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("tag","contains",KA.CANCELLED),pA("tag","not_contains",KA.CHURNED)]},{id:"churned-customers",name:"Churned customers",description:"Customers who cancelled their subscription",icon:"UserMinus",category:"saas",filters:[pA("tag","contains",KA.CHURNED)]},{id:"churned-high-paying",name:"Churned high paying",description:"High-value customers who cancelled (LTV over $500)",icon:"UserMinus",category:"saas",filters:[pA("tag","contains",KA.CHURNED),pA("attribute","gte","ltv:500")]},{id:"zero-ltv",name:"Zero LTV",description:"Subscribers who have never paid (no lifetime value)",icon:"CircleDollarSign",category:"saas",filterJoinOperator:"or",filters:[pA("attribute","is_empty","ltv:"),pA("attribute","lte","ltv:0")]},{id:"trial-users",name:"Trial users",description:"Users on trial, not yet customers",icon:"Clock",category:"saas",filters:[pA("tag","contains",KA.TRIAL),pA("tag","not_contains",KA.CUSTOMER)]},{id:"trials-ending-soon",name:"Trials ending soon",description:"Trial users whose trial ends in the next 3 days",icon:"Clock",category:"saas",filters:[pA("tag","contains",KA.TRIAL),pA("tag","not_contains",KA.CUSTOMER),pA("attribute","lte","trial_ends_at:3 days from now")]},{id:"recent-trials",name:"Recent trials",description:"Subscribers who started a trial in the last 14 days",icon:"UserPlus",category:"saas",filters:[pA("event","is",`${RA.SAAS_TRIAL_STARTED}:14d`),pA("tag","not_contains",KA.CUSTOMER)]},{id:"monthly-customers",name:"Monthly customers",description:"Customers on monthly subscriptions",icon:"Users",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("tag","contains",KA.SAAS_MONTHLY)]},{id:"annual-customers",name:"Annual customers",description:"Customers on annual subscriptions",icon:"Crown",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("tag","contains",KA.SAAS_YEARLY)]},{id:"checkout-abandoners-saas",name:"Checkout abandoners",description:"Leads who visited checkout but did not purchase recently",icon:"ShoppingCart",category:"saas",filters:[pA("tag","contains",KA.VISITED_PAYMENT_PAGE),pA("tag","not_contains",KA.CUSTOMER),pA("event","is_not",`${RA.SAAS_PURCHASE}:14d`)]},{id:"free-users",name:"Free users",description:"Non-paying subscribers",icon:"Users",category:"saas",filters:[pA("tag","not_contains",KA.CUSTOMER)]},{id:"ecommerce-customers",name:"E-commerce customers",description:"Placed at least one order",icon:"ShoppingBag",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER)]},{id:"recent-buyers",name:"Recent buyers",description:"Placed an order in the last 30 days",icon:"ShoppingBag",category:"ecommerce",filters:[pA("event","is",`${RA.ECOMMERCE_ORDER_PLACED}:30d`)]},{id:"repeat-buyers",name:"Repeat buyers",description:"Placed 2 or more orders",icon:"Repeat",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER),pA("attribute","gte","ordersCount:2")]},{id:"high-spenders-ecom",name:"High spenders",description:"Customers who spent over $500",icon:"DollarSign",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER),pA("attribute","gte","totalSpent:500")]},{id:"one-time-buyers",name:"One-time buyers",description:"Only placed a single order",icon:"ShoppingCart",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER),pA("attribute","lt","ordersCount:2")]},{id:"lapsed-buyers",name:"Lapsed buyers",description:"Customers with no order in the last 90 days",icon:"Moon",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER),pA("event","is_not",`${RA.ECOMMERCE_ORDER_PLACED}:90d`)]},{id:"no-purchase-1y",name:"No purchase in 1 year",description:"Customers who haven't placed an order in the last 365 days",icon:"CalendarOff",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER),pA("event","is_not",`${RA.ECOMMERCE_ORDER_PLACED}:365d`)]},{id:"abandoned-checkout",name:"Abandoned checkout",description:"Started checkout but did not place an order in 7 days",icon:"ShoppingCart",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_IN_CHECKOUT),pA("event","is_not",`${RA.ECOMMERCE_ORDER_PLACED}:7d`)]},{id:"active-carts",name:"Active carts",description:"Added to cart without a recent order",icon:"ShoppingCart",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_IN_CART),pA("event","is_not",`${RA.ECOMMERCE_ORDER_PLACED}:7d`)]},{id:"back-in-stock-interested",name:"Back-in-stock interest",description:"Requested a back-in-stock alert in the last 30 days",icon:"Zap",category:"ecommerce",filters:[pA("event","is",`${RA.ECOMMERCE_BACK_IN_STOCK_REQUESTED}:30d`)]},{id:"non-buyers",name:"Non-buyers",description:"Subscribers who haven't placed an order",icon:"UserX",category:"ecommerce",filters:[pA("tag","not_contains",KA.ECOMMERCE_CUSTOMER),pA("event","is_not",`${RA.ECOMMERCE_ORDER_PLACED}:all`)]},{id:"refunded-customers",name:"Refunded",description:"Customers who received a refund",icon:"RotateCcw",category:"ecommerce",filterJoinOperator:"or",filters:[pA("tag","contains",KA.REFUNDED),pA("event","is",`${RA.ECOMMERCE_ORDER_REFUNDED}:180d`)]},{id:"customers",name:"Customers",description:"Has 'customer' tag",icon:"UserCheck",category:"general",filters:[pA("tag","contains",KA.CUSTOMER)]},{id:"leads",name:"Leads",description:"Known leads who have not converted yet",icon:"UserPlus",category:"general",filters:[pA("tag","contains",KA.LEAD),pA("tag","not_contains",KA.CUSTOMER)]},{id:"non-customers",name:"Non-customers",description:"Doesn't have 'customer' tag",icon:"UserX",category:"general",filters:[pA("tag","not_contains",KA.CUSTOMER)]},{id:"new-subscribers",name:"New subscribers",description:"Added less than 7 days ago",icon:"UserPlus",category:"general",filters:[pA("added","less_than","7 days ago")]},{id:"custom-domain-contacts",name:"Custom-domain contacts",description:"Contacts using a business or self-hosted mailbox",icon:"Users",category:"general",filters:[pA("emailProvider","is","self_hosted")]},{id:"engaged",name:"Engaged",description:"Opened or clicked an email in the last 30 days",icon:"Flame",category:"engagement",filterJoinOperator:"or",filters:[pA("emailOpened","is","30d"),pA("emailClicked","is","30d")]},{id:"highly-engaged",name:"Highly engaged",description:"Clicked 2+ times or opened 5+ times in 30 days",icon:"Flame",category:"engagement",filterJoinOperator:"or",filters:[pA("emailClicked","at_least","2:30d"),pA("emailOpened","at_least","5:30d")]},{id:"recent-clickers",name:"Recent clickers",description:"Clicked an email in the last 30 days",icon:"Zap",category:"engagement",filters:[pA("emailClicked","is","30d")]},{id:"at-risk",name:"At risk",description:"Opened in 180 days but not opened or clicked in 30 days",icon:"AlertTriangle",category:"engagement",filters:[pA("emailOpened","is","180d"),pA("emailOpened","is_not","30d"),pA("emailClicked","is_not","30d")]},{id:"inactive",name:"Inactive",description:"Received email but did not open or click in 90 days",icon:"Moon",category:"engagement",filters:[pA("emailSent","is","90d"),pA("emailOpened","is_not","90d"),pA("emailClicked","is_not","90d")]},{id:"overmailed-unengaged",name:"Over-mailed, unengaged",description:"Sent 3+ emails in 30 days with no opens or clicks",icon:"EyeOff",category:"engagement",filters:[pA("emailSent","at_least","3:30d"),pA("emailOpened","is_not","30d"),pA("emailClicked","is_not","30d")]},{id:"not-mailed-recently",name:"Not mailed recently",description:"No emails sent in the last 30 days",icon:"Mail",category:"engagement",filters:[pA("emailSent","is_not","30d")]},{id:"deliverability-risk",name:"Deliverability risk",description:"Bounced recently or complained in the last 180 days",icon:"AlertTriangle",category:"engagement",filterJoinOperator:"or",filters:[pA("emailBounced","is","30d"),pA("emailComplained","is","180d")]}];var Vt0=[{code:"en",name:"English"},{code:"es",name:"Spanish"},{code:"de",name:"German"},{code:"fr",name:"French"},{code:"pt",name:"Portuguese"},{code:"it",name:"Italian"},{code:"nl",name:"Dutch"},{code:"pl",name:"Polish"},{code:"ru",name:"Russian"},{code:"ja",name:"Japanese"},{code:"zh",name:"Chinese"},{code:"ko",name:"Korean"},{code:"ar",name:"Arabic"},{code:"hi",name:"Hindi"},{code:"tr",name:"Turkish"},{code:"vi",name:"Vietnamese"},{code:"th",name:"Thai"},{code:"sv",name:"Swedish"},{code:"no",name:"Norwegian"},{code:"da",name:"Danish"},{code:"fi",name:"Finnish"},{code:"cs",name:"Czech"},{code:"el",name:"Greek"},{code:"he",name:"Hebrew"},{code:"uk",name:"Ukrainian"},{code:"ro",name:"Romanian"},{code:"hu",name:"Hungarian"},{code:"id",name:"Indonesian"},{code:"ms",name:"Malay"},{code:"am-ET",name:"Amharic"},{code:"bg-BG",name:"Bulgarian"},{code:"bn-BD",name:"Bengali"},{code:"ca-AD",name:"Catalan"},{code:"et-EE",name:"Estonian"},{code:"fa-IR",name:"Persian"},{code:"fil",name:"Filipino"},{code:"gu",name:"Gujarati"},{code:"hr-HR",name:"Croatian"},{code:"kn",name:"Kannada"},{code:"lt-LT",name:"Lithuanian"},{code:"lv-LV",name:"Latvian"},{code:"ml",name:"Malayalam"},{code:"mr",name:"Marathi"},{code:"sk-SK",name:"Slovak"},{code:"sl-SI",name:"Slovenian"},{code:"sr-RS",name:"Serbian"},{code:"sw-KE",name:"Swahili"},{code:"ta-LK",name:"Tamil"},{code:"te",name:"Telugu"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"en-AU",name:"English (Australia)"},{code:"zh-CN",name:"Chinese (Simplified)"},{code:"zh-TW",name:"Chinese (Traditional)"}],InA=Object.fromEntries(Vt0.map((A)=>[A.code,A.name]));var ib={id:"active-campaign",label:"ActiveCampaign",mode:"automated_adapter",docs:[{label:"ActiveCampaign API",url:"https://developers.activecampaign.com/reference/overview"}],connection:"Copy the API URL and API key from Settings -> Developer, then provide API_URL|API_KEY.",retrievableData:["contacts","lists","tags","custom fields","campaigns","automations"],mappingNotes:["Contacts map to subscribers.","Lists, tags, and custom fields map directly.","Campaigns and automation emails map to draft content items."],limitations:["Some automation metadata depends on the account's API visibility."]};var mb={id:"brevo",label:"Brevo",mode:"automated_adapter",docs:[{label:"Brevo API",url:"https://developers.brevo.com/"}],connection:"Create a v3 API key with read access to contacts, lists, segments, campaigns, and templates.",retrievableData:["contacts","lists","segments","custom fields","suppressions","campaigns","templates"],mappingNotes:["Contacts map to subscribers with attributes.","Lists and filters map to lists or segments.","Campaigns and templates map to content items with original Brevo HTML."],limitations:["Brevo's public API does not expose automation workflow definitions, including triggers, step order, waits, branches, or linked automation email steps.","Brevo sequences require a manual workflow manifest or manual rebuild using imported Brevo campaign/template HTML."]};var cb={id:"constant-contact",label:"Constant Contact",mode:"automated_adapter",docs:[{label:"Constant Contact API",url:"https://developer.constantcontact.com/api_guide/index.html"}],connection:"Provide a V3 OAuth access token with contact, list, tag, segment, campaign, and email status permissions.",retrievableData:["contacts","lists","tags","custom fields","segments","suppressions","campaigns"],mappingNotes:["Contacts map to subscribers.","Contact lists map to lists.","Tags and custom fields map directly.","Campaign activities map to draft campaigns when HTML is available."],limitations:["OAuth token scope controls campaign and segment visibility."]};var rb={id:"customer-io",label:"Customer.io",mode:"automated_adapter",docs:[{label:"Customer.io App API",url:"https://customer.io/docs/api/app/"}],connection:"Create an App API key with read access to customers, segments, broadcasts, campaigns, newsletters, messages, and suppressions.",retrievableData:["customers","segments","suppressions","campaigns","broadcasts","newsletters","transactional messages"],mappingNotes:["Customers map to subscribers and attributes.","Broadcasts and newsletters map to campaigns.","Campaign email actions map to automation emails.","Transactional messages map to templates."],limitations:["Workflow reconstruction depends on campaign action visibility."]};var pb={id:"drip",label:"Drip",mode:"automated_adapter",docs:[{label:"Drip API",url:"https://developer.drip.com/"}],connection:"Copy an API token with read access to subscribers, tags, custom fields, broadcasts, campaigns, and workflows.",retrievableData:["subscribers","tags","custom fields","broadcasts","campaigns","workflows"],mappingNotes:["Subscribers map to subscribers.","Tags and custom fields map directly.","Broadcast and campaign emails map to content items.","Workflow email steps map to automation emails when bodies are available."],limitations:["List-like structure is inferred from tags and campaigns."]};var _b={id:"hubspot",label:"HubSpot",mode:"automated_adapter",docs:[{label:"HubSpot API",url:"https://developers.hubspot.com/docs/api/overview"}],connection:"Create a private app token with CRM contact, list, marketing email, and subscription preference scopes.",retrievableData:["contacts","lists","active lists","custom properties","subscription preferences","marketing emails"],mappingNotes:["Contacts map to subscribers.","Static lists map to lists; active lists map to segments.","Properties map to custom attributes.","Marketing emails map to campaigns."],limitations:["Subscription preference mapping may require portal-specific rules."]};var nb={id:"kit",label:"Kit",mode:"automated_adapter",docs:[{label:"Kit API",url:"https://developers.kit.com/"}],connection:"Create a Kit API key or OAuth app with read access to subscribers, forms, tags, fields, broadcasts, and sequences.",retrievableData:["subscribers","forms","tags","custom fields","broadcasts","sequences"],mappingNotes:["Subscribers map to subscribers.","Forms and landing pages can become lists when used as acquisition buckets.","Tags and fields map directly.","Broadcasts and sequence emails map to content items."],limitations:["List semantics are reconstructed from forms, tags, and exports."]};var lb={id:"klaviyo",label:"Klaviyo",mode:"automated_adapter",docs:[{label:"Klaviyo API",url:"https://developers.klaviyo.com/en/reference/api_overview"}],connection:"Create a private API key with read permissions for profiles, lists, segments, campaigns, templates, and flows.",retrievableData:["profiles","lists","segments","custom properties","suppressions","campaigns","templates","flows"],mappingNotes:["Profiles map to subscribers.","Lists and segments map to their matching Sequenzy objects.","Profile properties map to custom attributes.","Campaigns, templates, and flow emails map to content items."],limitations:["Flow logic may need manual review before activation."]};var db={id:"loops",label:"Loops",mode:"automated_adapter",docs:[{label:"Loops API",url:"https://loops.so/docs/api-reference"}],connection:"Create an API key with read access to contacts, contact properties, lists, campaigns, and transactional templates.",retrievableData:["lists","custom fields","campaigns","transactional templates"],mappingNotes:["Loops contacts are imported through list and property coverage.","Campaigns map to campaigns.","Transactional templates map to templates."],limitations:["Subscriber discovery is limited by the available Loops API surfaces."]};var ab={id:"mailchimp",label:"Mailchimp",mode:"automated_adapter",docs:[{label:"Mailchimp Marketing API",url:"https://mailchimp.com/developer/marketing/api/"}],connection:"Create a Marketing API key and include the datacenter prefix from the account URL when needed.",retrievableData:["members","audiences","tags","segments","merge fields","suppressions","campaigns","templates","customer journeys"],mappingNotes:["Audience members map to subscribers and list memberships.","Merge fields map to custom attributes.","Tags, segments, campaigns, templates, and journey emails map directly where possible."],limitations:["Journey reconstruction can require manual review."]};var sb={id:"mailerlite",label:"MailerLite",mode:"automated_adapter",docs:[{label:"MailerLite API",url:"https://developers.mailerlite.com/docs"}],connection:"Create an API token with read access to subscribers, groups, segments, fields, campaigns, and automations.",retrievableData:["subscribers","groups","segments","fields","suppressions","campaigns","automations"],mappingNotes:["Groups map to lists.","Segments map to segments.","Fields map to custom attributes.","Campaigns and automation emails map to content items."],limitations:["Automation details may need review before enabling imported sequences."]};var ob={id:"mailjet",label:"Mailjet",mode:"automated_adapter",docs:[{label:"Mailjet API",url:"https://dev.mailjet.com/email/reference/overview/"}],connection:"Provide Mailjet API key and secret with read permissions for contacts, lists, campaigns, templates, and contact metadata.",retrievableData:["contacts","lists","custom fields","suppressions","campaigns","templates"],mappingNotes:["Contacts map to subscribers.","Contact lists map to lists.","Contact data maps to custom attributes.","Campaigns and templates map to content items."],limitations:["Automation import is not part of current native coverage."]};var tb={id:"omnisend",label:"Omnisend",mode:"automated_adapter",docs:[{label:"Omnisend API",url:"https://api-docs.omnisend.com/"}],connection:"Create an API key with read permissions for contacts, tags, properties, segments, campaigns, and templates.",retrievableData:["contacts","tags","custom fields","segments","campaigns","templates"],mappingNotes:["Contacts map to subscribers.","Tags and custom properties map directly.","Segments map to segments.","Campaigns and templates map to content items."],limitations:["Automation import is not part of current native coverage."]};var eb={id:"resend",label:"Resend",mode:"automated_adapter",docs:[{label:"Resend API",url:"https://resend.com/docs/api-reference/introduction"}],connection:"Create a Resend API key with read access to audiences, contacts, broadcasts, templates, and related metadata.",retrievableData:["contacts","segments","tags","custom fields","broadcasts","templates","automations"],mappingNotes:["Audience contacts map to subscribers.","Broadcasts map to campaigns.","Templates map to templates.","Tags and fields map directly when present."],limitations:["Some automation coverage is reconstructed from available metadata."]};var Ak={id:"sendgrid",label:"SendGrid",mode:"automated_adapter",docs:[{label:"SendGrid API",url:"https://www.twilio.com/docs/sendgrid/api-reference"}],connection:"Create a SendGrid API key with read access to Marketing Campaigns, contactdb, suppressions, templates, and automations.",retrievableData:["contacts","lists","segments","custom fields","suppressions","campaigns","templates","automations"],mappingNotes:["Contacts map to subscribers.","Lists and segments map to matching Sequenzy resources.","Custom fields map to attributes.","Campaigns, templates, and automation emails map to content items."],limitations:["Legacy and current Marketing Campaigns accounts may expose different endpoints."]};var c10={[ib.id]:ib,[mb.id]:mb,[cb.id]:cb,[rb.id]:rb,[pb.id]:pb,[_b.id]:_b,[nb.id]:nb,[lb.id]:lb,[db.id]:db,[ab.id]:ab,[sb.id]:sb,[ob.id]:ob,[tb.id]:tb,[eb.id]:eb,[Ak.id]:Ak};var xk={id:"aweber",label:"AWeber",mode:"partial_automated_adapter",docs:[{label:"AWeber API",url:"https://api.aweber.com/"}],connection:"Use OAuth 2.0 with read scopes for accounts, lists, subscribers, broadcasts, and segments. Store access and refresh tokens when available.",retrievableData:["subscribers","lists","segments","tags","custom fields","broadcasts","follow-ups","unsubscribed and undeliverable subscriber status"],mappingNotes:["Subscribers map to subscribers.","Lists map to lists.","Tags and custom fields map directly.","Broadcasts and follow-ups map to campaigns when content is available."],limitations:["AWeber's newer automation campaign builder is not fully exposed by the public API."]};var Ek={id:"beehiiv",label:"Beehiiv",mode:"partial_automated_adapter",docs:[{label:"beehiiv API",url:"https://developers.beehiiv.com/"}],connection:"Create an API key in beehiiv settings and provide PUBLICATION_ID|API_KEY.",retrievableData:["publications","subscriptions","newsletter lists","segments","tags","custom fields","posts","automation metadata"],mappingNotes:["Subscriptions map to subscribers.","Newsletter lists map to lists.","Segments map to segments.","Posts map to campaign content."],limitations:["Automation email content can be partial."]};var Bk={id:"benchmark-email",label:"Benchmark Email",mode:"partial_automated_adapter",docs:[{label:"Benchmark Email API",url:"https://apidocs.benchmarkemail.com/#/overview"}],connection:"Use Benchmark Email API credentials. Legacy XML-RPC flows may require username/password login to receive an API token.",retrievableData:["contact lists","contacts","segments","custom fields","campaign reports and details","autoresponders","unsubscribe and bounce status"],mappingNotes:["Contact lists map to lists.","Contacts map to subscribers.","Fields map to custom attributes.","Autoresponders map to automation emails if subject and body are returned."],limitations:["Some accounts require legacy API authentication."]};var gk={id:"buttondown",label:"Buttondown",mode:"partial_automated_adapter",docs:[{label:"Buttondown API",url:"https://docs.buttondown.com/api-introduction"}],connection:"Enable API access and create an API key. Use Authorization: Token API_KEY.",retrievableData:["subscribers","newsletters","tags","subscriber metadata","emails","suppression-like subscriber states"],mappingNotes:["Subscriber metadata maps to custom attributes.","Tags map to tags.","Newsletters can map to lists.","Emails map to campaigns."],limitations:["Template and automation coverage is limited and should not be treated as full export support."]};var Qk={id:"campaign-monitor",label:"Campaign Monitor",mode:"partial_automated_adapter",docs:[{label:"Campaign Monitor API",url:"https://www.campaignmonitor.com/api/v3-3/getting-started/"}],connection:"Use OAuth or API key Basic Auth. Collect client ID when the account has multiple clients.",retrievableData:["subscribers","lists","segments","custom fields","suppression lists","campaigns","template metadata","journey metadata"],mappingNotes:["Subscribers by list map to subscribers plus list memberships.","Suppression list entries map to suppressions.","Campaigns map to campaigns."],limitations:["Templates may expose only preview or screenshot metadata.","Journeys do not reliably expose full email content."]};var Dk={id:"campaigner",label:"Campaigner",mode:"partial_automated_adapter",docs:[{label:"Campaigner REST API",url:"https://www.campaigner.com/features/rest-api/"},{label:"Campaigner API reference",url:"https://api.campaigner.com/docs/"},{label:"Campaigner OpenAPI spec",url:"https://api.campaigner.com/docs/openapi.json"}],connection:"Create or copy a Campaigner IntegrationKey with read access to contacts, lists, fields, and workflow metadata. Paste the key, or JSON with apiKey.",retrievableData:["contacts","mailing lists","static and dynamic segment metadata","contact list memberships","custom fields","unsubscribe and bounce status fields on contacts","workflow summaries"],mappingNotes:["Contacts map to subscribers using staticFields.email.","MailingList records map to lists.","StaticSegment and DynamicSegment records map to segment metadata and membership snapshots where contact memberships include them.","Custom fields map to subscriber custom attributes.","System/static unsubscribe and bounce fields map to suppression state when present."],limitations:["No documented campaign list/detail endpoint for fetching existing campaigns.","No documented template list/detail/body endpoint.","Workflow endpoints expose summaries, not full automation steps or email bodies.","No first-class tag resource was found in the official API."]};var Ck={id:"emailoctopus",label:"EmailOctopus",mode:"partial_automated_adapter",docs:[{label:"EmailOctopus API",url:"https://emailoctopus.com/api-documentation"}],connection:"Create an API key and use it with EmailOctopus API requests.",retrievableData:["lists","contacts","list tags","contact fields","campaign content","unsubscribed contact status"],mappingNotes:["List contacts map to subscribers.","Fields map to custom attributes.","Tags map to tags.","Campaigns map to campaign content."],limitations:["No standalone saved segment, template, or automation retrieval was verified."]};var Fk={id:"flodesk",label:"Flodesk",mode:"partial_automated_adapter",docs:[{label:"Flodesk API",url:"https://developers.flodesk.com/"}],connection:"Create an API key under account integrations. Private API auth uses Basic auth with the API key as username and a blank password.",retrievableData:["subscribers","segments","subscriber custom fields"],mappingNotes:["Subscribers map to subscribers.","Segments map to segments.","Custom fields map to custom attributes."],limitations:["Official docs do not expose campaign or template body export."]};var Ik={id:"getresponse",label:"GetResponse",mode:"partial_automated_adapter",docs:[{label:"GetResponse API",url:"https://apidocs.getresponse.com/v3"},{label:"GetResponse API Reference",url:"https://apireference.getresponse.com/"}],connection:"Create an API key and use X-Auth-Token: api-key API_KEY. Some MAX accounts require X-Domain.",retrievableData:["contacts","campaigns-as-lists","search contacts","tags","custom fields","newsletters","templates","suppression-like statuses","workflow metadata"],mappingNotes:["GetResponse campaigns are contact lists and map to lists.","Newsletters map to campaign content.","Search contacts map to segments.","Transactional templates map to templates."],limitations:["Workflows are partial unless email content is exposed."]};var wk={id:"ghost",label:"Ghost",mode:"partial_automated_adapter",docs:[{label:"Ghost Admin API",url:"https://docs.ghost.org/admin-api"}],connection:"Create a Ghost custom integration and provide ADMIN_API_URL|ADMIN_API_KEY. Sign Admin API JWTs server-side.",retrievableData:["members","newsletters","labels","email suppression status","posts","newsletter posts"],mappingNotes:["Members map to subscribers.","Newsletters map to lists.","Labels map to tags.","Newsletter posts map to campaign content."],limitations:["Saved segments, templates, and automations are not first-class export surfaces."]};var Jk={id:"listmonk",label:"Listmonk",mode:"partial_automated_adapter",docs:[{label:"Listmonk API",url:"https://listmonk.app/docs/apis/apis/"}],connection:"Create an API user or token in Listmonk and provide BASE_URL|USERNAME|ACCESS_TOKEN.",retrievableData:["subscribers","lists","subscriber attributes","blocklisted status","unsubscribed status","bounced status","campaigns","templates"],mappingNotes:["Subscriber attribs map to custom attributes.","Lists map to lists.","SQL segmentation can map to segments only when the query is supplied or discovered.","Campaigns and templates map to content items."],limitations:["No native automation export."]};var fk={id:"mailersend",label:"MailerSend",mode:"partial_automated_adapter",docs:[{label:"MailerSend API",url:"https://developers.mailersend.com/api/v1"}],connection:"Create an API token with read access to recipients, suppressions, and templates.",retrievableData:["recipients","suppressions","templates"],mappingNotes:["Recipients map to subscribers when email identity and consent state are sufficient.","Suppressions map to suppression records.","Templates map to transactional templates."],limitations:["Campaign, segment, list, and automation export were not verified."]};var Kk={id:"mailgun",label:"Mailgun",mode:"partial_automated_adapter",docs:[{label:"Mailgun API",url:"https://documentation.mailgun.com/docs/mailgun/api-reference/"}],connection:"Provide domain, region, and an API key with read access to mailing lists, members, suppressions, and templates.",retrievableData:["mailing lists","list members","member vars","suppressions","templates"],mappingNotes:["Mailing lists map to lists.","Members map to subscribers.","Member vars map to custom attributes.","Suppressions map to suppression records.","Templates map to transactional templates."],limitations:["Mailgun does not provide marketing campaign or automation export coverage."]};var $k={id:"mailtrap",label:"Mailtrap",mode:"partial_automated_adapter",docs:[{label:"Mailtrap API",url:"https://api-docs.mailtrap.io/"}],connection:"Create a Mailtrap API token with read access to contacts, lists, suppressions, and templates.",retrievableData:["contacts","contact exports","lists","custom fields","suppressions","templates"],mappingNotes:["Contacts map to subscribers.","Lists map to lists.","Fields map to custom attributes.","Templates map to templates."],limitations:["Campaign, segment, and automation retrieval were not verified."]};var Hk={id:"mautic",label:"Mautic",mode:"automated_adapter",docs:[{label:"Mautic API",url:"https://developer.mautic.org/"}],connection:"Create OAuth or Basic Auth credentials for the Mautic instance and provide BASE_URL plus credentials.",retrievableData:["contacts","segments","tags","custom fields","do-not-contact records","emails","templates","campaigns"],mappingNotes:["Contacts map to subscribers.","Segments map to segments.","Do-not-contact records map to suppressions.","Emails and templates map to content items.","Campaign email steps map to automation emails when available."],limitations:["Self-hosted versions and plugins can change API shape."]};var yk={id:"moosend",label:"Moosend",mode:"partial_automated_adapter",docs:[{label:"Moosend API",url:"https://moosend.com/api/"}],connection:"Create an API key with read access to mailing lists, subscribers, segments, custom fields, campaigns, and suppressions.",retrievableData:["subscribers","mailing lists","segments","custom fields","campaigns","unsubscribe and bounce status"],mappingNotes:["Mailing lists map to lists.","Subscribers map to subscribers.","Segments map to segments.","Campaigns map to campaign content."],limitations:["Standalone template and automation export were not verified."]};var qk={id:"other",label:"Other",mode:"guided_manual",docs:[],connection:"Collect the provider name, export files, or official API credentials, then review the available data before committing an import scope.",retrievableData:["reviewed case by case"],mappingNotes:["Contacts map to subscribers when email identity is present.","Lists, tags, segments, suppressions, and content are mapped after export shape review."],limitations:["No provider-specific guarantees until review is complete."]};var Yk={id:"postmark",label:"Postmark",mode:"partial_automated_adapter",docs:[{label:"Postmark API",url:"https://postmarkapp.com/developer/api/overview"}],connection:"Provide a Postmark server token with read access to suppression and template endpoints.",retrievableData:["suppressions","templates"],mappingNotes:["Suppressions map to suppression records.","Templates map to transactional templates."],limitations:["Postmark has no native marketing subscriber, list, segment, campaign, or automation export."]};var Xk={id:"sender",label:"Sender",mode:"partial_automated_adapter",docs:[{label:"Sender API",url:"https://www.sender.net/api/"}],connection:"Create an API token with read access to subscribers, groups, segments, fields, campaigns, and workflows.",retrievableData:["subscribers","groups","segments","custom fields","campaigns","workflows","unsubscribe and bounce status"],mappingNotes:["Groups map to lists.","Subscribers map to subscribers.","Segments map to segments.","Campaigns map to campaign content.","Workflows map to automation drafts when steps are available."],limitations:["Tags and reusable templates were not verified as first-class export surfaces."]};var Uk={id:"sendpulse",label:"SendPulse",mode:"partial_automated_adapter",docs:[{label:"SendPulse API",url:"https://sendpulse.com/integrations/api"}],connection:"Create REST API credentials and provide CLIENT_ID|CLIENT_SECRET, or JSON with clientId and clientSecret. JSON with accessToken is also accepted for already-issued OAuth tokens.",retrievableData:["address books","contacts","variables","tags","blacklist","campaigns","templates","Automation360 metadata"],mappingNotes:["Address books map to lists.","Contacts map to subscribers.","Variables map to custom attributes.","Blacklist entries map to suppressions.","Campaigns and templates map to content items."],limitations:["Automation360 content may be partial and should be reviewed before import."]};var Zk={id:"shopify-email",label:"Shopify Email",mode:"partial_automated_adapter",docs:[{label:"Shopify Admin API",url:"https://shopify.dev/docs/api/admin-graphql"}],connection:"Create a Shopify custom app with read access to customers, customer tags, segments, metafields, and email marketing consent.",retrievableData:["customers","customer segments","tags","metafields","email marketing consent","suppression-like consent state"],mappingNotes:["Customers with email marketing consent map to subscribers.","Segments map to segments.","Tags map to tags.","Metafields map to custom attributes.","Consent state maps to active or unsubscribed status."],limitations:["Shopify Email campaign HTML export is not reliably exposed through the Admin API."]};var Gk={id:"zoho-campaigns",label:"Zoho Campaigns",mode:"partial_automated_adapter",docs:[{label:"Zoho Campaigns API",url:"https://www.zoho.com/campaigns/help/developers/"}],connection:"Create an OAuth client and request Zoho Campaigns read scopes for contacts, lists, segments, fields, campaigns, and workflows.",retrievableData:["lists","contacts","segments","custom fields","tags","campaign details","workflow metadata"],mappingNotes:["Lists map to lists.","Contacts map to subscribers.","Segments map to segments.","Fields map to custom attributes.","Campaign details map to campaigns when body content is available."],limitations:["Raw campaign HTML and template retrieval are unclear in public docs.","API rate limits require batching."]};var r10={[xk.id]:xk,[Ek.id]:Ek,[Bk.id]:Bk,[gk.id]:gk,[Dk.id]:Dk,[Qk.id]:Qk,[Ck.id]:Ck,[Fk.id]:Fk,[Ik.id]:Ik,[wk.id]:wk,[Jk.id]:Jk,[fk.id]:fk,[Kk.id]:Kk,[$k.id]:$k,[Hk.id]:Hk,[yk.id]:yk,[Yk.id]:Yk,[Xk.id]:Xk,[Uk.id]:Uk,[Zk.id]:Zk,[Gk.id]:Gk,[qk.id]:qk};var gdA={...c10,...r10};var vt0={affiliateId:"affiliateId",trackingId:"affiliateTrackingId",status:"affiliateStatus",programId:"affiliateProgramId",groupId:"affiliateGroupId",couponCode:"affiliateCouponCode",couponProvider:"affiliateCouponProvider",leadCount:"affiliateLeadCount",conversionCount:"affiliateConversionCount",totalReferredRevenue:"affiliateTotalReferredRevenue",totalCommissionEarned:"affiliateTotalCommissionEarned",totalPaidOut:"affiliateTotalPaidOut",lastPayoutAt:"affiliateLastPayoutAt"};var KdA=new Set(Object.values(vt0));function ut0(A,x,E){let g=Number.parseInt(A??"",10);return Number.isFinite(g)&&g>=E?g:x}var HdA=ut0(process.env.QUEUE_PRODUCER_COMMAND_TIMEOUT_MS,15000,1000);var ht0=H.union([H.object({family:H.literal("dns"),type:H.enum(["wrong_value","wrong_path","multiple_records","wrong_type"]),found:H.string(),expected:H.string(),foundValues:H.array(H.string()).optional(),foundAt:H.string().optional(),foundType:H.enum(["CNAME","TXT","MX"]).optional()}),H.object({family:H.literal("provider"),type:H.literal("provider_failed"),message:H.string()})]),bt0=H.object({settled:H.enum(["verified","unverified"]),everVerified:H.boolean(),expectedValueFingerprint:H.string().optional(),lastMatchAt:H.string().optional(),lastNegative:H.object({kind:H.enum(["absent","mismatch","provider"]),at:H.string(),issue:ht0.optional(),proof:H.enum(["authoritative-nxdomain","authoritative-nodata","recursive-nxdomain","recursive-nodata"]).optional(),sources:H.object({cloudflare:H.string(),google:H.string(),direct:H.string(),directNameserver:H.string().optional()}).optional()}).optional(),degradedSince:H.string().optional(),negativeCount:H.number().optional(),providerPendingSince:H.string().optional(),acceleratedChecks:H.number().optional(),episodeCount:H.number().optional(),episodeWindowStart:H.string().optional(),lastObservedAt:H.string().optional(),disagreeSince:H.string().optional(),unobservableDiagnostic:H.object({kind:H.enum(["broken_delegation","dnssec"]),since:H.string(),sources:H.object({cloudflare:H.string(),google:H.string(),direct:H.string(),directNameserver:H.string().optional()}).optional()}).optional()}),bdA=H.object({v:H.literal(1),records:H.record(H.string(),bt0),setupWindowStartedAt:H.string().optional(),unhealthySince:H.string().optional(),degraded:H.boolean(),provider:H.object({resubmitCount:H.number().optional(),lastResubmitAt:H.string().optional(),lastResubmitError:H.string().optional(),mailFromResubmittedAt:H.string().optional(),mailFromResubmitError:H.string().optional(),mailFromSetupRestartedAt:H.string().optional()}),alerts:H.object({transitionAlertAt:H.string().optional(),flapAlertAt:H.string().optional(),unobservableAlertAt:H.string().optional(),lookupErrorKey:H.string().optional(),lookupErrorAlertAt:H.string().optional(),delegationAlertAt:H.string().optional(),dnssecAlertAt:H.string().optional(),disagreeAlertAt:H.string().optional()})});var kt0={slug:"cal-com",name:"Cal.com",description:"Open-source scheduling platform",website:"https://cal.com",category:"scheduling",setupInstructions:`1. In Cal.com, go to **Settings → Developer → Webhooks**
|
|
542
|
+
Second Line`,1)]},{name:"heading-with-link",description:"Heading with hyperlink",blocks:[gA('Read the <a href="https://example.com/docs">docs</a>',2)]},{name:"heading-long",description:"Long heading text",blocks:[gA("This Is A Very Long Heading That Might Wrap To Multiple Lines",1)]},{name:"heading-with-index",description:"Heading with an oversized editorial index number beside it",blocks:[{id:"heading-with-index-block",type:"heading",content:"Choose your palette",level:2,indexText:"01"}]},{name:"heading-with-index-long",description:"Index heading with wrapping text stays middle-aligned",blocks:[{id:"heading-with-index-long-block",type:"heading",content:"A Much Longer Numbered Section Title That Wraps Onto Two Lines",level:2,indexText:"02"}]},{name:"button-primary",description:"Primary button",blocks:[OE("Get Started","primary")]},{name:"button-secondary",description:"Secondary button",blocks:[OE("Learn More","secondary")]},{name:"button-pill",description:"Pill button",blocks:[OE("Subscribe","pill")]},{name:"button-long-text",description:"Button with long text",blocks:[OE("Click Here To Get Started With Our Amazing Platform","primary")]},{name:"button-light-color",description:"Filled button with a pale color falls back to dark text so it stays readable",blocks:[{id:"button-light-color-block",type:"button",text:"Shop All New Arrivals",url:"https://example.com",variant:"primary",buttonColor:"#fdf6ec"}]},{name:"button-ink",description:"Ink button: near-black editorial fill",blocks:[OE("Shop the Collection","ink")]},{name:"button-text-link",description:"Text-link button: letterspaced caps with trailing arrow",blocks:[OE("Read the story","link")]},{name:"button-text-link-left",description:"Left-aligned text-link button",blocks:[{id:"button-text-link-left-block",type:"button",text:"Browse new arrivals",url:"https://example.com",variant:"link",styles:{textAlign:"left"}}]},{name:"spacer-8",description:"Spacer 8px",blocks:[nA(8)]},{name:"spacer-16",description:"Spacer 16px",blocks:[nA(16)]},{name:"spacer-24",description:"Spacer 24px",blocks:[nA(24)]},{name:"spacer-32",description:"Spacer 32px",blocks:[nA(32)]},{name:"spacer-48",description:"Spacer 48px",blocks:[nA(48)]},{name:"spacer-64",description:"Spacer 64px",blocks:[nA(64)]},{name:"divider",description:"Horizontal divider",blocks:[s6()]},{name:"image-default",description:"Image with default sizing",blocks:[v8()]},{name:"image-small",description:"Image with small width (30%)",blocks:[v8(void 0,"Small image",30)]},{name:"image-medium",description:"Image with medium width (60%)",blocks:[v8(void 0,"Medium image",60)]},{name:"image-large",description:"Image with large width (90%)",blocks:[v8(void 0,"Large image",90)]},{name:"image-with-link",description:"Image wrapped in a link",blocks:[v8(void 0,"Linked image",void 0,"https://example.com")]},{name:"image-with-link-and-width",description:"Image with custom width wrapped in a link",blocks:[v8(void 0,"Linked image",60,"https://example.com")]},{name:"image-align-left",description:"Image aligned to the left at 50% width",blocks:[v8(void 0,"Left aligned image",50,void 0,"left")]},{name:"image-align-right",description:"Image aligned to the right at 50% width",blocks:[v8(void 0,"Right aligned image",50,void 0,"right")]},{name:"image-fixed-height",description:"Image cropped to a fixed height",blocks:[v8(void 0,"Fixed height image",70,void 0,"center",160)]},{name:"image-fixed-height-contain",description:"Image contained inside a fixed height",blocks:[v8(void 0,"Fixed height contained image",70,void 0,"center",160,"contain")]},{name:"image-with-caption",description:"Image with a small muted caption strip below",blocks:[{...v8(void 0,"Captioned image",60),id:"image-with-caption-block",caption:"The autumn collection, shot in Lisbon"}]},{name:"image-frame-border",description:"Image with a hairline border frame",blocks:[{...v8(void 0,"Bordered image",60),id:"image-frame-border-block",frame:"border"}]},{name:"image-frame-mat",description:"Image on a white gallery mat inside a hairline frame",blocks:[{...v8(void 0,"Matted image",60),id:"image-frame-mat-block",frame:"mat",caption:"No. 4 - Studio series"}]},{name:"video-youtube",description:"YouTube video with thumbnail and play button",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Sample video")]},{name:"video-short-url",description:"YouTube video with short URL format",blocks:[OD("https://youtu.be/dQw4w9WgXcQ","Short URL video")]},{name:"video-small-width",description:"YouTube video with 50% width",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Small video",{width:50})]},{name:"video-large-width",description:"YouTube video with 100% width",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Full width video",{width:100})]},{name:"video-align-left",description:"YouTube video aligned left",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Left aligned video",{width:60,align:"left"})]},{name:"video-align-center",description:"YouTube video aligned center",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Center aligned video",{width:60,align:"center"})]},{name:"video-align-right",description:"YouTube video aligned right",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Right aligned video",{width:60,align:"right"})]},{name:"product-small",description:"Small product card - compact horizontal layout",blocks:[_F("small",{title:"Classic Tee",price:"$29.99",imageUrl:"https://images.sequenzy.com/socials/linkedin.png",url:"https://example.com/products/tee"})]},{name:"product-medium",description:"Medium product card - vertical with image and button",blocks:[_F("medium",{title:"Premium Hoodie",description:"Soft cotton blend hoodie perfect for cool evenings.",price:"$59.99",imageUrl:"https://images.sequenzy.com/socials/linkedin.png",url:"https://example.com/products/hoodie",buttonText:"Shop Now"})]},{name:"product-large",description:"Large product card - full-width featured layout",blocks:[_F("large",{title:"Limited Edition Jacket",description:"Hand-crafted leather jacket available in limited quantities.",price:"$199.99",compareAtPrice:"$249.99",imageUrl:"https://images.sequenzy.com/socials/linkedin.png",url:"https://example.com/products/jacket",buttonText:"Buy Now"})]},{name:"product-no-image",description:"Product card without an image",blocks:[_F("medium",{title:"Digital Course",description:"Learn email marketing in 30 days.",price:"$49.99",buttonText:"Enroll Now"})]},{name:"product-with-discount",description:"Product card showing discount pricing",blocks:[_F("medium",{title:"Summer Sale Item",description:"Limited time offer!",price:"$19.99",compareAtPrice:"$39.99",imageUrl:"https://images.sequenzy.com/socials/linkedin.png",url:"https://example.com/sale"})]},{name:"product-light-button-color",description:"Product card button with a pale color falls back to dark readable text",blocks:[_F("medium",{title:"Spring Collection",description:"Soft seasonal pieces with a light brand palette.",price:"$89.00",url:"https://example.com/products/spring",buttonText:"Shop Collection",buttonColor:"#fdf6ec"})]},{name:"discount-code-dense",description:"Dense discount code - compact coupon row",blocks:[Xy("dense",{code:"WELCOME10",label:"Your discount code"})]},{name:"discount-code-medium",description:"Medium discount code - standard card with CTA",blocks:[Xy("medium",{code:"SAVE20",label:"Your discount code",headline:"20% off, just for you",description:"Use the code below at checkout to claim your savings.",ctaText:"Shop now",ctaUrl:"https://example.com"})]},{name:"discount-code-large",description:"Large discount code - hero banner with expiration",blocks:[Xy("large",{code:"VIP50",label:"VIP access",headline:"Unlock 50% off today",description:"A special thank-you for being part of the club. Redeem your code at checkout.",ctaText:"Redeem now",ctaUrl:"https://example.com",showExpires:!0,expiresText:"Expires in 48 hours"})]},{name:"discount-code-styled",description:"Discount code with custom block styles (padding/background/align)",blocks:[Xy("medium",{code:"STYLED15",headline:"Styled discount card",description:"Custom block styles must render in both renderers.",ctaText:"Shop now",ctaUrl:"https://example.com",styles:{paddingTop:24,paddingBottom:24,paddingLeft:16,paddingRight:16,backgroundColor:"#fef3c7"}})]},{name:"poll-options",description:"Poll with three emoji answer buttons",blocks:[UB("options")]},{name:"poll-image-options",description:"Visual poll with circular image choices",blocks:[{...UB("options",{question:"Pick your style",optionLabels:["Relaxed","Considered","Bold"]}),options:["Relaxed","Considered","Bold"].map((A,x)=>({id:l0("poll-option"),label:A,value:A.toLowerCase(),imageUrl:`${dB}?choice=${x}`}))}]},{name:"poll-image-options-max",description:"Visual poll with the schema maximum of eight image choices",blocks:[{...UB("options",{question:"Choose your favorite direction",optionLabels:Array.from({length:8},(A,x)=>`Choice ${x+1}`)}),options:Array.from({length:8},(A,x)=>({id:l0("poll-option"),label:`Choice ${x+1}`,value:`choice-${x+1}`,imageUrl:`${dB}?choice=${x+1}`}))}]},{name:"poll-options-long-labels",description:"Poll with long answer labels that wrap on narrow widths",blocks:[UB("options",{question:"Which of these upcoming features would make the biggest difference for your team?",optionLabels:["Deeper analytics with revenue attribution across every channel","More native integrations with the tools we already use daily","Faster editor performance"]})]},{name:"poll-options-two-answers",description:"Poll with only two answers",blocks:[UB("options",{question:"Was this helpful?",optionLabels:["\uD83D\uDC4D Yes","\uD83D\uDC4E No"]})]},{name:"poll-options-accent",description:"Poll with a custom accent color",blocks:[UB("options",{accentColor:"#0ea5e9"})]},{name:"poll-appearance-outline",description:"Poll with the outline appearance (white fill, accent border)",blocks:[UB("options",{appearance:"outline"})]},{name:"poll-appearance-filled",description:"Poll with the filled appearance (solid accent buttons)",blocks:[UB("options",{appearance:"filled",accentColor:"#1d4ed8"})]},{name:"poll-appearance-pill",description:"Poll with the pill appearance (fully rounded buttons)",blocks:[UB("options",{appearance:"pill"})]},{name:"poll-appearance-pop",description:"Poll with the pop appearance (ink border, hard accent shadow)",blocks:[UB("options",{appearance:"pop"})]},{name:"poll-appearance-brutal",description:"Poll with the brutal appearance (square slabs, ink border and shadow)",blocks:[UB("options",{appearance:"brutal"})]},{name:"poll-appearance-quiz",description:"Poll with the quiz appearance (A/B/C letter badges)",blocks:[UB("options",{appearance:"quiz"})]},{name:"poll-appearance-minimal",description:"Poll with the minimal appearance (ruled rows, accent arrow)",blocks:[UB("options",{appearance:"minimal"})]},{name:"poll-nps",description:"NPS survey with the default 0-10 scale",blocks:[UB("nps")]},{name:"poll-nps-appearance-filled",description:"NPS survey with the filled appearance",blocks:[UB("nps",{appearance:"filled"})]},{name:"poll-nps-appearance-pill",description:"NPS survey with the pill appearance",blocks:[UB("nps",{appearance:"pill"})]},{name:"poll-nps-appearance-pop",description:"NPS survey with the pop appearance",blocks:[UB("nps",{appearance:"pop"})]},{name:"poll-nps-appearance-brutal",description:"NPS survey with the brutal appearance",blocks:[UB("nps",{appearance:"brutal"})]},{name:"poll-nps-appearance-minimal",description:"NPS survey with the minimal appearance (accent underline)",blocks:[UB("nps",{appearance:"minimal"})]},{name:"poll-nps-custom-labels",description:"NPS survey with custom scale labels and accent",blocks:[UB("nps",{question:"How satisfied are you with your onboarding so far?",npsLowLabel:"Very unsatisfied",npsHighLabel:"Very satisfied",accentColor:"#16a34a"})]},{name:"poll-in-columns",description:"Poll nested inside a two-column layout",blocks:[s9([gA("Quick question",3),f0("Help us tune the newsletter.")],[UB("options",{question:"How often should we email?",optionLabels:["Weekly","Monthly"]})])]},{name:"poll-in-colored-column",description:"Poll appearance colors inherit a custom nested column background",blocks:[{id:l0("columns"),type:"columns",gap:16,columns:[{id:l0("col"),backgroundColor:"#111827",padding:{top:18,bottom:18,left:18,right:18},children:[UB("options",{appearance:"outline",accentColor:"#38bdf8",question:"Was this dark-mode guide useful?",optionLabels:["Very useful","Needs more detail"]})]},{id:l0("col"),backgroundColor:"#fef3c7",padding:{top:18,bottom:18,left:18,right:18},children:[f0("Nested surfaces should drive poll color blends.")]}]}]},{name:"poll-pale-accent",description:"Poll with a pale accent falls back to dark answer text",blocks:[UB("options",{accentColor:"#fdf6ec"})]},{name:"poll-styled",description:"Poll with custom block styles (layout and typography)",blocks:[UB("options",{styles:{paddingTop:24,paddingBottom:24,paddingLeft:16,paddingRight:16,backgroundColor:"#f0f9ff",textColor:"#7c2d12",textAlign:"right"}})]},{name:"poll-empty-question",description:"Legacy poll with a whitespace-only question",blocks:[UB("options",{question:" "})]},{name:"countdown-boxed",description:"Countdown timer - solid primary-color tiles",blocks:[K1("boxed")]},{name:"countdown-minimal",description:"Countdown timer - clean numbers with colon separators",blocks:[K1("minimal")]},{name:"countdown-bold",description:"Countdown timer - full-width primary banner",blocks:[K1("bold")]},{name:"countdown-outlined",description:"Countdown timer - outlined tiles with labels",blocks:[K1("stacked")]},{name:"countdown-no-labels",description:"Countdown timer - numbers only, collapsed label band",blocks:[K1("boxed",{showLabels:!1})]},{name:"countdown-minimal-no-labels",description:"Countdown timer - minimal style without labels",blocks:[K1("minimal",{showLabels:!1})]},{name:"countdown-circle",description:"Countdown timer - outlined rings with progress arc",blocks:[K1("circle")]},{name:"countdown-circle-filled",description:"Countdown timer - solid accent discs",blocks:[K1("circle-filled")]},{name:"countdown-circle-no-labels",description:"Countdown timer - rings without labels",blocks:[K1("circle",{showLabels:!1})]},{name:"countdown-expired-message",description:"Countdown timer - past deadline showing a custom message",blocks:[K1("boxed",{deadline:"2000-01-01T00:00:00.000Z",expiredBehavior:"message",expiredMessage:"This offer has ended"})]},{name:"logo-center",description:"Logo centered",blocks:[X9("center")]},{name:"logo-left",description:"Logo left aligned",blocks:[X9("left")]},{name:"logo-right",description:"Logo right aligned",blocks:[X9("right")]},{name:"logo-small",description:"Logo small size",blocks:[X9("center",32)]},{name:"logo-large",description:"Logo large size",blocks:[X9("center",128)]},{name:"header-logo-left-navigation",description:"Header with logo on the left and navigation on the right",blocks:[rF("logo-left",{accent:!0})]},{name:"header-stacked-navigation",description:"Header with centered stacked logo and navigation",blocks:[rF("stacked")]},{name:"header-navigation-only",description:"Navigation links only, with the logo hidden",blocks:[rF("stacked",{showLogo:!1,navAlign:"center"})]},{name:"card-default",description:"Default card",blocks:[Y8("Card Title","This is the card content description.")]},{name:"card-styled-background-padding",description:"Default card with custom background, border, and padding",blocks:[{id:l0("card"),type:"card",title:"Styled Card",content:"Custom background and padding should match preview output.",variant:"default",styles:{backgroundColor:"#f0f7ff",borderColor:"#bbd7ff",borderWidth:1,borderRadius:8,paddingTop:18,paddingRight:22,paddingBottom:26,paddingLeft:30}}]},{name:"card-feature",description:"Feature card with emoji",blocks:[Y8("Feature Title","This is a feature highlight with an emoji.","feature","\uD83D\uDE80")]},{name:"card-feature-empty-content",description:"Feature card with emoji and no body content",blocks:[Y8("New feature available now","","feature","✨")]},{name:"card-feature-star",description:"Feature card with star emoji",blocks:[Y8("Premium Feature","Unlock premium capabilities.","feature","⭐")]},{name:"card-long-content",description:"Card with long content",blocks:[Y8("Long Content Card","Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")]},{name:"card-feature-html-content",description:"Feature card with paragraph HTML content",blocks:[Y8("Special Offer","<p>Use code <strong>MAJDHAMMAD50</strong> at checkout for <strong>50% off</strong> your next subscription.</p>","feature")]},{name:"card-feature-b-tag-content",description:"Feature card using b tags from browser bold commands",blocks:[Y8("Special Offer","<p>Use code <b>MAJDHAMMAD50</b> at checkout for <b>50% off</b> your next subscription.</p>","feature")]},{name:"card-feature-inline-color-strong",description:"Feature card preserving explicit inline emphasis color",blocks:[Y8("Special Offer",'<p>Use code <strong style="color:#111111">MAJDHAMMAD50</strong> at checkout for <strong style="color:#111111">50% off</strong> your next subscription.</p>',"feature")]},{name:"card-feature-font-tag-content",description:"Feature card preserving font-tag color output",blocks:[Y8("Special Offer",'<p>Use code <font color="#000000"><b>MAJDHAMMAD50</b></font> at checkout for <font color="#000000"><b>50% off</b></font> your next subscription.</p>',"feature")]},{name:"card-default-html-content",description:"Default card with emphasized HTML content",blocks:[Y8("Usage Tip","<p>Use <strong>preview mode</strong> before sending to production.</p>")]},{name:"cta-default",description:"Call to action block",blocks:[$1("Ready to get started?","Sign up now and get 30 days free.","Start Free Trial")]},{name:"cta-long",description:"CTA with longer text",blocks:[$1("Transform Your Business Today","Join thousands of companies already using our platform to streamline their operations and boost productivity.","Get Started Now")]},{name:"cta-html-description",description:"CTA with paragraph HTML description",blocks:[$1("Get Started","<p>One</p><p>Two</p>","Start Free Trial")]},{name:"cta-html-rich-description",description:"CTA with mixed emphasis, links, and multiple paragraphs",blocks:[$1("Get Started",'<p><strong>Launch today</strong> with <em>zero setup friction</em>.</p><p><a href="https://example.com/docs">Read the docs</a> if you want the full walkthrough.</p>',"Start Free Trial")]},{name:"social-2",description:"Social with 2 platforms",blocks:[PD(["x","linkedin"])]},{name:"social-3",description:"Social with 3 platforms",blocks:[PD(["x","linkedin","instagram"])]},{name:"social-4",description:"Social with 4 platforms",blocks:[PD(["x","linkedin","instagram","facebook"])]},{name:"social-5",description:"Social with 5 platforms",blocks:[PD(["x","linkedin","instagram","facebook","youtube"])]},{name:"footer-simple",description:"Simple footer",blocks:[V8("simple")]},{name:"footer-full",description:"Full footer with social and privacy",blocks:[V8("full")]},{name:"footer-long-address",description:"Footer with long address",blocks:[V8("simple","Acme Corporation Inc.","123 Business Avenue, Suite 456, San Francisco, CA 94107, United States")]},{name:"columns-2-text",description:"2 columns with text",blocks:[s9([f0("Left column content goes here.")],[f0("Right column content goes here.")])]},{name:"columns-3-text",description:"3 columns with text",blocks:[g2([f0("First column.")],[f0("Second column.")],[f0("Third column.")])]},{name:"columns-2-mixed",description:"2 columns with heading and text",blocks:[s9([gA("Left Title",3),f0("Left description.")],[gA("Right Title",3),f0("Right description.")])]},{name:"columns-3-cards",description:"3 columns with feature cards",blocks:[g2([Y8("Feature 1","First feature description.","feature","\uD83C\uDFAF")],[Y8("Feature 2","Second feature description.","feature","⚡")],[Y8("Feature 3","Third feature description.","feature","\uD83D\uDD12")])]},{name:"columns-2-bold-title",description:"2 columns with bold title and description (AI-generated pattern)",blocks:[s9([f0("<p><strong>Set up in minutes</strong></p><p>Describe what you need, and our AI builds infrastructure.</p>")],[f0("<p><strong>AI Sequence Builder</strong></p><p>Describe your custom use case and let AI do it.</p>")])]},{name:"repeat-items",description:"Repeat block rendering items rows",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")])]},{name:"repeat-event-items-custom-alias",description:"Repeat block with nested event source and custom item alias",blocks:[Y9("event.items",[gA("{{lineItem.title}}",3),f0("<p>{{lineItem.description}}</p>")],{itemAlias:"lineItem"})]},{name:"repeat-max-items",description:"Repeat block respects max item rendering",blocks:[Y9("items",[gA("{{item.number}}. {{item.title}}",3)],{maxItems:1})]},{name:"repeat-styled-background-padding",description:"Repeat block with background and padding styles",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{styles:{backgroundColor:"#fef3c7",paddingTop:16,paddingBottom:12,paddingLeft:18,paddingRight:18}})]},{name:"repeat-styled-text-color",description:"Repeat block text color applies to materialized child text",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>"),qy(["Quantity: {{item.number}}","Status: ready"],"bullet")],{styles:{backgroundColor:"#b52222",textColor:"#ffffff",paddingTop:16,paddingBottom:12,paddingLeft:18,paddingRight:18}})]},{name:"repeat-styled-border-radius",description:"Repeat block border and radius styles wrap repeated rows",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{styles:{borderWidth:2,borderColor:"#f97316",borderRadius:12,paddingTop:14,paddingBottom:10,paddingLeft:16,paddingRight:16}})]},{name:"repeat-styled-text-align-center",description:"Repeat block text alignment applies to repeated children",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{styles:{textAlign:"center",backgroundColor:"#f8fafc",paddingTop:14,paddingBottom:10}})]},{name:"repeat-styled-all-container-options",description:"Repeat block with all visual container style controls",blocks:[Y9("event.items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{styles:{backgroundColor:"#111827",textColor:"#f9fafb",textAlign:"right",borderRadius:10,borderWidth:1,borderColor:"#f97316",paddingTop:18,paddingBottom:14,paddingLeft:20,paddingRight:20}})]},{name:"repeat-with-columns",description:"Repeat block containing a nested columns layout",blocks:[Y9("items",[s9([gA("{{item.title}}",3)],[f0("<p>{{item.description}}</p>")])],{styles:{backgroundColor:"#eff6ff",textColor:"#1e3a8a",paddingTop:12,paddingBottom:8,paddingLeft:12,paddingRight:12}})]},{name:"repeat-layout-3-columns",description:"Repeat block lays repeated items out as a three-column grid",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{layout:{columns:3,gap:14,itemStyles:{padding:{top:10,bottom:10,left:8,right:8},backgroundColor:"#f8fafc",borderRadius:8,borderWidth:1,borderColor:"#e2e8f0"}}})]},{name:"repeat-layout-2-columns-gap-zero",description:"Repeat block two-column layout with no horizontal gap",blocks:[Y9("items",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")],{layout:{columns:2,gap:0,itemStyles:{padding:{top:8,bottom:8,left:8,right:8},backgroundColor:"#f9fafb"}}})]},{name:"repeat-layout-4-columns-full-row",description:"Repeat block four-column layout with a complete row",blocks:[Y9("gridItems",[gA("{{item.title}}",3)],{layout:{columns:4,gap:10,itemStyles:{padding:{top:8,bottom:8,left:6,right:6},borderWidth:1,borderColor:"#d1d5db"}}})]},{name:"repeat-layout-4-columns-partial-row",description:"Repeat block four-column layout preserves partial row width",blocks:[Y9("items",[gA("{{item.title}}",3)],{layout:{columns:4,gap:10,itemStyles:{padding:{top:8,bottom:8,left:6,right:6},backgroundColor:"#eef2ff",borderRadius:6}}})]},{name:"repeat-layout-item-padding-only",description:"Repeat item shell with padding only",blocks:[Y9("items",[gA("{{item.title}}",3)],{layout:{columns:2,gap:12,itemStyles:{padding:{top:16,bottom:12,left:14,right:14}}}})]},{name:"repeat-layout-item-background-only",description:"Repeat item shell with background color only",blocks:[Y9("items",[gA("{{item.title}}",3)],{layout:{columns:2,gap:12,itemStyles:{backgroundColor:"#ecfeff"}}})]},{name:"repeat-layout-item-radius-only",description:"Repeat item shell with corner radius only",blocks:[Y9("items",[gA("{{item.title}}",3)],{layout:{columns:2,gap:12,itemStyles:{borderRadius:12}}})]},{name:"repeat-layout-item-border-only",description:"Repeat item shell with border only",blocks:[Y9("items",[gA("{{item.title}}",3)],{layout:{columns:2,gap:12,itemStyles:{borderWidth:2,borderColor:"#0ea5e9"}}})]},{name:"repeat-layout-rich-content",description:"Repeat grid item with image, button, and text content",blocks:[Y9("items",[v8(void 0,"{{item.title}} image",48,void 0,"center"),gA("{{item.title}}",3),f0("<p>{{item.description}}</p>"),OE("View details","secondary")],{layout:{columns:2,gap:16,itemStyles:{padding:{top:12,bottom:12,left:12,right:12},backgroundColor:"#f8fafc",borderRadius:10,borderWidth:1,borderColor:"#e2e8f0",height:260,contentLayout:"space-between"}}})]},{name:"repeat-styled-nested-text-color-override",description:"Nested container text color overrides repeat text color",blocks:[Y9("items",[{...s9([gA("{{item.title}}",3)],[f0("<p>{{item.description}}</p>")]),styles:{textColor:"#c2410c"}}],{styles:{textColor:"#f9fafb"}})]},{name:"repeat-with-card",description:"Repeat block containing card content",blocks:[Y9("items",[Y8("{{item.title}}","{{item.description}}","default")],{styles:{backgroundColor:"#f8fafc",textColor:"#0f172a",paddingTop:12,paddingBottom:8}})]},{name:"repeat-empty-source",description:"Repeat block renders empty when the source is not an array",blocks:[Y9("missingItems",[gA("{{item.title}}",3),f0("<p>{{item.description}}</p>")])]},{name:"hero-color-basic",description:"Color hero with heading only",blocks:[pF({variant:"color"})]},{name:"hero-color-full",description:"Color hero with eyebrow, subheading, and button",blocks:[pF({variant:"color",eyebrow:"New collection",subheading:"Warm-weather staples, cut to move with you.",buttonText:"Shop the drop",buttonUrl:"https://example.com"})]},{name:"hero-color-left-aligned",description:"Color hero with left-aligned content and custom background",blocks:[pF({variant:"color",contentAlign:"left",subheading:"Everything you need to know this month.",styles:{backgroundColor:"#111827"}})]},{name:"hero-image-basic",description:"Image hero with default scrim",blocks:[pF({variant:"image",backgroundImage:dB,subheading:"Text stays readable over the scrim."})]},{name:"hero-image-full",description:"Image hero with eyebrow, button, custom overlay and height",blocks:[pF({variant:"image",backgroundImage:dB,eyebrow:"Limited time",subheading:"Up to 40% off the whole collection.",buttonText:"Shop now",buttonUrl:"https://example.com",overlayColor:"#1e3a5f",overlayOpacity:60,minHeight:260})]},{name:"hero-image-bleed",description:"Full-bleed image hero",blocks:[pF({variant:"image",backgroundImage:dB,subheading:"Edge-to-edge hero band.",styles:{bleed:!0}})]},{name:"testimonial-card",description:"Card testimonial with author title",blocks:[$7({authorTitle:"Founder, Wildgrain Bakery"})]},{name:"testimonial-card-rating-avatar",description:"Card testimonial with stars and avatar",blocks:[$7({rating:5,avatarUrl:dB,authorTitle:"Head of Growth, Alto"})]},{name:"testimonial-minimal",description:"Minimal testimonial with accent border",blocks:[$7({variant:"minimal"})]},{name:"testimonial-centered",description:"Centered testimonial with quote mark and rating",blocks:[$7({variant:"centered",rating:4})]},{name:"testimonial-custom-accent",description:"Testimonial with a custom accent color",blocks:[$7({variant:"minimal",rating:5,accentColor:"#0e7490"})]},{name:"testimonial-quote",description:"Editorial pull quote with attribution",blocks:[$7({variant:"quote",quote:"The best products are built one honest email at a time.",authorTitle:"Founder"})]},{name:"testimonial-quote-no-attribution",description:"Pull quote without an author",blocks:[$7({variant:"quote",quote:"Simplicity is the ultimate sophistication.",authorName:""})]},{name:"testimonial-editorial",description:"Editorial serif pull quote between thin hairline rules",blocks:[$7({variant:"editorial",quote:"It reads like a letter from a friend, not a campaign from a company.",authorTitle:"Creative Director"})]},{name:"testimonial-editorial-no-attribution",description:"Editorial pull quote without an author line",blocks:[$7({variant:"editorial",quote:"Make it quieter, and it gets louder.",authorName:""})]},{name:"testimonial-editorial-left",description:"Left-aligned editorial pull quote",blocks:[{...$7({variant:"editorial",quote:"We stopped shouting and people started listening."}),id:"testimonial-editorial-left-block",styles:{textAlign:"left"}}]},{name:"pricing-cards",description:"Two plan cards with a highlighted plan and badge",blocks:[HJ()]},{name:"pricing-single",description:"Single plan card",blocks:[HJ({plans:[{id:l0("plan"),name:"Pro",price:"$49",period:"/month",description:"Everything you need",features:[{id:l0("plan-feature"),text:"Unlimited contacts"},{id:l0("plan-feature"),text:"Priority support"},{id:l0("plan-feature"),text:"Custom domains"}],buttonText:"Start free trial",buttonUrl:"https://example.com"}]})]},{name:"pricing-three-plans",description:"Three plan cards side by side",blocks:[HJ({plans:[{id:l0("plan"),name:"Starter",price:"$19",period:"/mo",features:[{id:l0("plan-feature"),text:"1,000 contacts"}],buttonText:"Choose",buttonUrl:"https://example.com"},{id:l0("plan"),name:"Pro",price:"$49",period:"/mo",features:[{id:l0("plan-feature"),text:"Unlimited contacts"}],buttonText:"Choose",buttonUrl:"https://example.com",highlighted:!0,badgeText:"Popular"},{id:l0("plan"),name:"Scale",price:"$99",period:"/mo",features:[{id:l0("plan-feature"),text:"Dedicated CSM"}],buttonText:"Choose",buttonUrl:"https://example.com"}]})]},{name:"pricing-minimal",description:"Minimal pricing columns without card surfaces",blocks:[HJ({variant:"minimal"})]},{name:"pricing-custom-accent",description:"Pricing with a custom accent color",blocks:[HJ({accentColor:"#0e7490"})]},{name:"author-byline",description:"Compact byline with avatar",blocks:[nF({avatarUrl:dB})]},{name:"author-byline-no-avatar",description:"Byline without an avatar",blocks:[nF()]},{name:"author-signature",description:"Personal signature sign-off",blocks:[nF({variant:"signature",title:"Founder"})]},{name:"author-unsafe-link",description:"Author signature omits a link with an unsafe URL",blocks:[nF({variant:"signature",title:"Founder",linkText:"Hidden unsafe link",linkUrl:"javascript:alert(1)"})]},{name:"author-card",description:"Author card with avatar, bio, and link",blocks:[nF({variant:"card",avatarUrl:dB,bio:"Writes about building products people love, one email at a time.",linkText:"Follow along",linkUrl:"https://example.com"})]},{name:"article-image-top",description:"Article card with the image on top",blocks:[Tg()]},{name:"article-image-left",description:"Article card with the image on the left",blocks:[Tg({variant:"image-left"})]},{name:"article-minimal",description:"Text-only article teaser",blocks:[Tg({variant:"minimal"})]},{name:"article-no-extras",description:"Article card without category, excerpt, or meta",blocks:[{id:l0("article"),type:"article",variant:"image-top",imageUrl:dB,imageAlt:"Article cover",title:"A headline that stands on its own",url:"https://example.com/blog"}]},{name:"article-cleared-optionals",description:"Cleared article fields do not leave editor-only spacing",blocks:[Tg({category:"",excerpt:"",metaText:"",linkText:"",url:""})]},{name:"article-empty-image-top",description:"Article copy without editor-only image or link chrome",blocks:[Tg({imageUrl:"",url:""})]},{name:"article-empty-image-left",description:"Image-left article collapses to full-width copy without an image",blocks:[Tg({variant:"image-left",imageUrl:"",url:""})]},{name:"rating-inline",description:"Inline star rating with caption",blocks:[FR()]},{name:"rating-stacked",description:"Stacked star rating with caption below",blocks:[FR({variant:"stacked"})]},{name:"rating-partial-left",description:"Three and a half of five stars, left aligned, custom color",blocks:[FR({rating:3.5,align:"left",starColor:"#0e7490",caption:"3.5 average"})]},{name:"stats-plain",description:"Plain three-item stats band",blocks:[Yy()]},{name:"stats-tinted",description:"Stats band on a tinted surface",blocks:[Yy({variant:"tinted"})]},{name:"stats-divided",description:"Stats band with vertical separators",blocks:[Yy({variant:"divided"})]},{name:"stats-two-items",description:"Two-item stats band with custom accent",blocks:[Yy({accentColor:"#0e7490",items:[{id:l0("stat"),value:"2x",label:"Faster onboarding"},{id:l0("stat"),value:"40%",label:"More conversions"}]})]},{name:"steps-timeline",description:"Timeline steps with connector line",blocks:[IR()]},{name:"steps-numbered",description:"Plain numbered steps",blocks:[IR({variant:"numbered"})]},{name:"steps-timeline-no-descriptions",description:"Timeline steps with titles only",blocks:[IR({items:[{id:l0("step"),title:"Sign up"},{id:l0("step"),title:"Connect your store"},{id:l0("step"),title:"Launch your first flow"}]})]},{name:"product-grid-plain",description:"Three-column plain product grid",blocks:[O4()]},{name:"product-grid-cards",description:"Bordered product grid tiles",blocks:[O4({variant:"cards"})]},{name:"product-grid-two-columns",description:"Two-column product grid with an odd item count",blocks:[O4({columns:2})]},{name:"product-grid-six-items",description:"Two rows of three product tiles",blocks:[O4({items:[...O4().items,{id:l0("pgitem"),imageUrl:dB,imageAlt:"Product 4",title:"Silk Scarf",price:"$64"},{id:l0("pgitem"),imageUrl:dB,imageAlt:"Product 5",title:"Leather Bag",price:"$430"},{id:l0("pgitem"),imageUrl:dB,imageAlt:"Product 6",title:"Knit Beanie",price:"$79"}]})]},{name:"product-grid-no-price",description:"Product tiles without prices",blocks:[O4({items:O4().items.map((A)=>{let{price:x,...E}=A;return E})})]},{name:"product-grid-cleared-price",description:"Cleared product prices do not leave editor-only spacing",blocks:[O4({items:O4().items.map((A)=>({...A,price:""}))})]},{name:"product-grid-empty-images",description:"Product grid copy without editor-only image placeholders",blocks:[O4({columns:2,items:O4().items.slice(0,2).map((A)=>({...A,imageUrl:""}))})]},{name:"product-grid-partial-images",description:"Product grid with a mix of populated and empty images",blocks:[O4({columns:2,items:O4().items.slice(0,2).map((A,x)=>({...A,imageUrl:x===0?dB:""}))})]},{name:"gallery-two-up",description:"Two-image gallery",blocks:[LD(2)]},{name:"gallery-two-up-four",description:"Four images in a two-up grid (two rows)",blocks:[LD(4)]},{name:"gallery-three-up",description:"Three-image gallery in one row",blocks:[LD(3,{layout:"three-up"})]},{name:"gallery-mosaic",description:"Mosaic gallery with one large and two small images",blocks:[LD(3,{layout:"mosaic"})]},{name:"gallery-custom-gap-radius",description:"Gallery with custom gap, radius, and height",blocks:[LD(2,{gap:16,imageRadius:0,imageHeight:140})]},{name:"gallery-empty-images",description:"Empty gallery is omitted outside its selected editing state",blocks:[{...LD(2),images:[{id:l0("gallery-image"),src:"",alt:"Empty image 1"},{id:l0("gallery-image"),src:"",alt:"Empty image 2"}]}]},{name:"gallery-partial-images",description:"Partial gallery reflows only populated images",blocks:[{...LD(2),images:[{id:l0("gallery-image"),src:dB,alt:"Populated image"},{id:l0("gallery-image"),src:"",alt:"Empty image"}]}]},{name:"badge-soft",description:"Soft tinted badge",blocks:[$J("NEW","soft")]},{name:"badge-pill",description:"Filled pill badge",blocks:[$J("SALE","pill")]},{name:"badge-outline",description:"Outlined badge",blocks:[$J("BETA","outline")]},{name:"badge-aligned-center",description:"Centered badge with custom color",blocks:[$J("LIMITED","pill",{align:"center",color:"#0e7490"})]},{name:"badge-custom-styles",description:"Badge with custom container and text styles",blocks:[$J("CUSTOM","pill",{styles:{backgroundColor:"#fef3c7",textColor:"#7c2d12",borderColor:"#92400e",borderWidth:2,borderRadius:10,paddingTop:6,paddingRight:8,paddingBottom:6,paddingLeft:8}})]},{name:"divider-dots",description:"Dots divider",blocks:[f0("Above the dots divider."),{id:l0("divider"),type:"divider",variant:"dots"},f0("Below the dots divider.")]},{name:"divider-accent",description:"Accent bar divider",blocks:[gA("Section title",2),{id:l0("divider"),type:"divider",variant:"accent"},f0("Accent bar under a heading.")]},{name:"divider-line-width-color",description:"Line divider with custom width and color",blocks:[{id:l0("divider"),type:"divider",variant:"line",color:"#0e7490",width:50}]},{name:"table-basic",description:"Data table with header row",blocks:[QR()]},{name:"table-zebra",description:"Data table with zebra striping",blocks:[QR({zebra:!0})]},{name:"table-no-header",description:"Data table without header row",blocks:[QR({showHeader:!1})]},{name:"table-two-columns",description:"Two-column key/value table",blocks:[QR({columns:[{id:l0("table-col"),header:"Item"},{id:l0("table-col"),header:"Amount",align:"right"}],rows:[{id:l0("table-row"),cells:["Subtotal","$96.00"]},{id:l0("table-row"),cells:["Shipping","$4.99"]},{id:l0("table-row"),cells:["Total","$100.99"]}]})]},{name:"features-cards",description:"Three-column feature cards",blocks:[DR()]},{name:"features-plain",description:"Plain centered features",blocks:[DR({variant:"plain"})]},{name:"features-icon-left",description:"Icon-left feature rows",blocks:[DR({variant:"icon-left"})]},{name:"features-two-columns",description:"Four features in two columns",blocks:[DR({columns:2,items:[{id:l0("feature"),emoji:"⚡",title:"Fast",description:"Snappy everywhere."},{id:l0("feature"),emoji:"\uD83D\uDD12",title:"Secure",description:"Encrypted at rest."},{id:l0("feature"),emoji:"\uD83D\uDCC8",title:"Scalable",description:"Grows with you."},{id:l0("feature"),emoji:"\uD83E\uDDE9",title:"Composable",description:"Plays well with others."}]})]},{name:"image-card-left",description:"Image card with image on the left",blocks:[CR()]},{name:"image-card-right",description:"Image card with image on the right and button",blocks:[CR({variant:"image-right",buttonText:"Read more",buttonUrl:"https://example.com"})]},{name:"image-card-top",description:"Stacked image card with button",blocks:[CR({variant:"image-top",buttonText:"Take a look",buttonUrl:"https://example.com"})]},{name:"image-card-empty-image",description:"Image card preserves copy before an image is selected",blocks:[CR({variant:"image-top",imageUrl:"",imageAlt:"",title:"Important launch copy",description:"This supporting description must be sent."})]},{name:"header-logo-only",description:"Header with logo only",blocks:[{...rF("logo-left"),navItems:[]}]},{name:"header-logo-centered",description:"Header with centered logo",blocks:[{...rF("stacked",{navAlign:"center"}),navItems:[]}]},{name:"header-logo-button",description:"Header with logo and CTA button",blocks:[{...rF("logo-left",{accent:!0}),navItems:[{id:l0("nav"),label:"Upgrade",url:"https://example.com"}],fontWeight:"semibold"}]},{name:"header-logo-nav",description:"Header with logo and nav links",blocks:[{...rF("logo-left"),navItems:[{id:l0("nav"),label:"Blog",url:"https://example.com/blog"},{id:l0("nav"),label:"Pricing",url:"https://example.com/pricing"},{id:l0("nav"),label:"Docs",url:"https://example.com/docs"}]}]}],Pt0=[{name:"combo-visual-hero-story",description:"Image hero, badge eyebrow, testimonial, and gallery",blocks:[pF({variant:"image",backgroundImage:dB,eyebrow:"Customer story",heading:"How Wildgrain doubled repeat orders",subheading:"A conversation with founder Maya Chen.",styles:{bleed:!0}}),nA(24),$J("CASE STUDY","soft"),gA("From farmers market to nationwide",2),f0("Wildgrain started as a weekend stall. Today they ship thousands of boxes a month."),$7({rating:5,avatarUrl:dB,authorTitle:"Founder, Wildgrain Bakery"}),LD(3,{layout:"mosaic"}),{id:l0("divider"),type:"divider",variant:"dots"},f0("Want results like these? Start your first sequence today.")]},{name:"combo-h1-text",description:"H1 followed by text",blocks:[gA("Welcome to Our Newsletter",1),f0("Thank you for subscribing. Here's what's new this week.")]},{name:"combo-h1-text-button",description:"H1, text, and button",blocks:[gA("Get Started Today",1),f0("Join thousands of happy customers using our platform."),OE("Sign Up Free","primary")]},{name:"combo-h1-h2-text",description:"H1, H2, and text hierarchy",blocks:[gA("Main Title",1),gA("Subtitle Section",2),f0("Content under the subtitle explaining the topic in detail.")]},{name:"combo-h1-text-h2-text",description:"Alternating headings and text",blocks:[gA("Welcome",1),f0("Introduction paragraph."),gA("What's New",2),f0("Details about new features.")]},{name:"combo-h1-lead-text",description:"H1 with lead and regular text",blocks:[gA("Monthly Update",1),f0("A quick summary of everything that happened this month.","lead"),f0("Here are the details you need to know about our latest updates.")]},{name:"combo-newsletter-intro",description:"Newsletter intro section",blocks:[X9("center"),nA(16),gA("Weekly Digest",1),f0("Your weekly roundup of the best content.","lead"),s6()]},{name:"combo-newsletter-article",description:"Newsletter article block",blocks:[gA("Featured Article",2),f0("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore."),OE("Read More","secondary"),nA(24)]},{name:"combo-newsletter-footer",description:"Newsletter footer section",blocks:[s6(),nA(16),PD(["x","linkedin","instagram"]),V8("full")]},{name:"combo-text-footer-tight",description:"Text directly followed by a footer",blocks:[f0("Start writing your email content here..."),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-heading-footer-tight",description:"Heading directly followed by a footer",blocks:[gA("Latest updates",2),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-list-footer-tight",description:"List directly followed by a footer",blocks:[qy(["First update","Second update"]),V8("full","BlogToPin","Hoholya 17")]},{name:"band-full-bleed-dark",description:"Full-bleed dark hero band escaping container padding",blocks:[{id:l0("columns"),type:"columns",styles:{bleed:!0},columns:[{id:l0("col"),backgroundColor:"#111827",borderRadius:0,padding:{top:32,bottom:32,left:24,right:24},children:[{id:l0("heading"),type:"heading",level:1,content:"Edge to Edge",styles:{textAlign:"center",textColor:"#ffffff"}},{id:l0("text"),type:"text",variant:"lead",content:"<p>A band that escapes the container padding.</p>",styles:{textAlign:"center",textColor:"#ffffff"}}]}]},f0("Regular content stays inside the padded container.")]},{name:"list-variants",description:"Bullet, numbered, and brand-colored checklist variants",blocks:[qy(["First point","Second point"],"bullet"),qy(["First step","Second step"],"numbered"),qy(["Included feature","Another included feature"],"checklist")]},{name:"combo-html-footer-tight",description:"HTML directly followed by a footer",blocks:[kb("<p><strong>HTML content</strong> before the footer.</p>"),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-button-footer-tight",description:"Button directly followed by a footer",blocks:[OE("Button","primary"),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-divider-footer-tight",description:"Divider directly followed by a footer",blocks:[s6(),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-image-footer-tight",description:"Image directly followed by a footer",blocks:[v8(void 0,"Featured image",100),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-logo-footer-tight",description:"Logo directly followed by a footer",blocks:[X9("center",56),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-video-footer-tight",description:"Video directly followed by a footer",blocks:[OD("https://www.youtube.com/watch?v=dQw4w9WgXcQ","Sample video",{width:80}),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-card-footer-tight",description:"Card directly followed by a footer",blocks:[Y8("Your recap","A short update before the footer."),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-cta-footer-tight",description:"CTA directly followed by a footer",blocks:[$1("Ready to start?","Create your next campaign today.","Open app"),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-product-footer-tight",description:"Product directly followed by a footer",blocks:[_F("medium",{description:"A featured product before the footer.",price:"$29",imageUrl:"https://images.sequenzy.com/socials/linkedin.png",url:"https://example.com/product"}),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-discount-footer-tight",description:"Discount code directly followed by a footer",blocks:[Xy("medium",{headline:"Save today",description:"Use this code before checkout."}),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-social-footer-tight",description:"Social links directly followed by a footer",blocks:[PD(["x","linkedin","instagram"]),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-columns-footer-tight",description:"Columns directly followed by a footer",blocks:[s9([f0("Left column")],[OE("Right action","secondary")]),V8("full","BlogToPin","Hoholya 17")]},{name:"combo-html-pub-expiry-email",description:"Block-based HTML Pub expiry email with a table-based author signature",blocks:[{id:"html-pub-logo-block",alt:"HTML Pub Logo",type:"logo",align:"center",width:64},{id:"html-pub-wordmark-block",alt:"HTML Pub",src:"https://htmlpub.com/nav-logo-light.png",type:"image",width:150},{id:"html-pub-greeting-block",type:"text",content:"<p>Hi {{FIRST_NAME|there}},</p>",variant:"paragraph"},{id:"html-pub-expiry-title-block",type:"text",content:"<p><strong>Your free HTML Pub page expires in 2 days.</strong></p>",variant:"paragraph"},{id:"html-pub-expiry-copy-block",type:"text",content:"<p>After that, the live URL stops working. Your content stays saved in your account - but nobody else can see it until you upgrade.</p>",variant:"paragraph"},{id:"html-pub-expiry-price-block",type:"text",content:"<p>$10/month. Takes 30 seconds to switch. Your page keeps the same URL and nothing breaks.</p>",variant:"paragraph"},{id:"html-pub-expiry-button-block",url:"https://htmlpub.com/dashboard/billing",text:"Keep my page live - $10/month",type:"button",variant:"primary"},{id:"html-pub-signature-block",type:"text",content:Lt0,variant:"paragraph"},{id:"html-pub-footer-block",type:"footer",address:"520 - 1515 Douglas Street Victoria, BC, V8W 2G4, Canada",variant:"full",companyName:"HTML Pub",privacyPolicyUrl:"https://htmlpub.com/privacy"}]},{name:"combo-product-hero",description:"Product announcement hero",blocks:[X9("center"),nA(24),gA("Introducing Our New Feature",1),f0("We're excited to announce a game-changing addition to our platform.","lead"),v8(void 0,"Product screenshot",90),OE("Try It Now","primary")]},{name:"combo-product-features",description:"Product features section",blocks:[gA("Key Features",2),nA(16),g2([Y8("Fast","Lightning quick performance.","feature","⚡")],[Y8("Secure","Enterprise-grade security.","feature","\uD83D\uDD12")],[Y8("Simple","Easy to use interface.","feature","✨")])]},{name:"combo-product-cta",description:"Product CTA section",blocks:[nA(24),$1("Ready to upgrade?","Get started with our new features today.","Upgrade Now"),nA(16)]},{name:"combo-welcome-header",description:"Welcome email header",blocks:[X9("center",80),nA(24),gA("Welcome aboard! \uD83C\uDF89",1),f0("We're thrilled to have you join our community. Let's get you started.","lead")]},{name:"combo-welcome-steps",description:"Welcome email onboarding steps",blocks:[gA("Getting Started",2),f0("Follow these simple steps to set up your account:"),nA(16),s9([gA("Step 1",3),f0("Complete your profile settings.")],[gA("Step 2",3),f0("Invite your team members.")]),nA(16),s9([gA("Step 3",3),f0("Create your first project.")],[gA("Step 4",3),f0("Explore our documentation.")])]},{name:"combo-welcome-footer",description:"Welcome email footer",blocks:[nA(24),s6(),f0("Need help? Reply to this email or visit our help center."),OE("Visit Help Center","secondary"),nA(16),V8("simple")]},{name:"combo-promo-header",description:"Promotional email header",blocks:[X9("left"),nA(16),gA("\uD83D\uDD25 Flash Sale - 50% Off!",1),f0("For the next 24 hours only, get half off on all premium plans.","lead")]},{name:"combo-promo-offer",description:"Promotional offer section",blocks:[Y8("Limited Time Offer","Use code FLASH50 at checkout. Offer expires midnight.","feature","⏰"),nA(16),OE("Shop Now","primary"),nA(8),OE("View All Deals","secondary")]},{name:"combo-promo-products",description:"Promotional products grid",blocks:[gA("Top Picks",2),g2([v8(void 0,"Product 1"),f0("Product Name - $49")],[v8(void 0,"Product 2"),f0("Product Name - $79")],[v8(void 0,"Product 3"),f0("Product Name - $99")])]},{name:"combo-update-header",description:"Update email header",blocks:[X9("center"),nA(16),gA("What's New in v2.5",1),f0("Here's everything we shipped this month.","lead"),s6()]},{name:"combo-update-changelog",description:"Update changelog section",blocks:[gA("New Features",2),f0("• Dark mode support across all screens"),f0("• Improved search with filters"),f0("• New dashboard analytics widgets"),nA(16),gA("Bug Fixes",2),f0("• Fixed login issues on Safari"),f0("• Resolved notification delays"),f0("• Fixed export functionality")]},{name:"combo-update-highlight",description:"Update highlight section",blocks:[nA(16),Y8("Highlight: Dark Mode","The most requested feature is finally here! Enable dark mode in your settings.","feature","\uD83C\uDF19"),OE("Enable Dark Mode","primary")]},{name:"combo-full-newsletter",description:"Complete newsletter email",blocks:[X9("center"),nA(24),gA("The Weekly Digest",1),f0("Issue #42 - January 2025","lead"),s6(),nA(16),gA("Top Story",2),v8(void 0,"Featured image",90),f0("This week's biggest news and updates from around the industry. Read on for the full scoop."),OE("Read Full Article","secondary"),nA(24),gA("Quick Hits",2),s9([gA("Tech News",3),f0("Latest developments in AI and ML.")],[gA("Industry",3),f0("Market trends and analysis.")]),nA(24),s6(),PD(["x","linkedin","instagram"]),V8("full")]},{name:"combo-full-welcome",description:"Complete welcome email",blocks:[X9("center",80),nA(32),gA("Welcome to Acme! \uD83C\uDF89",1),f0("We're so excited to have you on board. Your account is ready to go.","lead"),nA(24),$1("Get Started","Complete your profile to unlock all features.","Set Up Profile"),nA(24),gA("What You Can Do",2),g2([Y8("Create","Build amazing projects.","feature","\uD83C\uDFA8")],[Y8("Collaborate","Work with your team.","feature","\uD83D\uDC65")],[Y8("Ship","Deploy with confidence.","feature","\uD83D\uDE80")]),nA(24),s6(),f0("Questions? Just reply to this email."),V8("simple")]},{name:"combo-full-promo",description:"Complete promotional email",blocks:[X9("center"),nA(16),gA("Summer Sale is Here! ☀️",1),f0("Save up to 60% on selected items. Limited time only.","lead"),nA(16),v8(void 0,"Sale banner"),nA(16),s9([Y8("30% Off","On all basics.","default")],[Y8("60% Off","On summer collection.","feature","\uD83D\uDD25")]),nA(16),OE("Shop the Sale","primary"),nA(24),gA("Best Sellers",2),g2([v8(void 0,"Product"),f0("Item 1 - $29")],[v8(void 0,"Product"),f0("Item 2 - $39")],[v8(void 0,"Product"),f0("Item 3 - $49")]),nA(24),s6(),V8("full")]},{name:"combo-full-announcement",description:"Complete announcement email",blocks:[X9("center"),nA(24),gA("Big News! \uD83D\uDCE2",1),f0("We have an exciting announcement to share with you today.","lead"),nA(16),Y8("We've Raised $50M Series B","This funding will help us accelerate product development and expand globally.","feature","\uD83C\uDFAF"),nA(16),gA("What This Means For You",2),f0("With this investment, we're committed to building more features, improving performance, and providing even better support."),nA(16),s9([gA("More Features",3),f0("Faster development of requested features.")],[gA("Better Support",3),f0("24/7 customer support coming soon.")]),nA(24),OE("Read Our Blog Post","primary"),nA(24),s6(),PD(["x","linkedin"]),V8("simple")]},{name:"combo-receipt-header",description:"Receipt email header",blocks:[X9("left"),nA(16),gA("Order Confirmation",1),f0("Thank you for your purchase! Your order #12345 is confirmed.")]},{name:"combo-receipt-details",description:"Receipt order details",blocks:[gA("Order Details",2),s6(),s9([f0("<strong>Item</strong>"),f0("Premium Plan (Annual)")],[f0("<strong>Amount</strong>"),f0("$199.00")]),s6(),s9([f0("<strong>Total</strong>")],[f0("<strong>$199.00</strong>")]),nA(16),OE("View Receipt","secondary")]},{name:"combo-shipping-update",description:"Shipping update email",blocks:[X9("center"),nA(16),gA("Your Order Has Shipped! \uD83D\uDCE6",1),f0("Great news! Your package is on its way.","lead"),nA(16),Y8("Tracking Number","1Z999AA10123456784","default"),nA(16),OE("Track Package","primary"),nA(24),V8("simple")]},{name:"combo-feedback-request",description:"Feedback request email",blocks:[X9("center"),nA(16),gA("How are we doing?",1),f0("We'd love to hear your feedback on your recent experience.","lead"),nA(16),f0("Your opinion helps us improve our service for everyone."),nA(16),OE("Leave Feedback","primary"),nA(24),V8("simple")]},{name:"combo-reengagement",description:"Re-engagement email",blocks:[X9("center"),nA(16),gA("We Miss You! \uD83D\uDC99",1),f0("It's been a while since we've seen you. Here's what you've missed."),nA(16),s9([Y8("New Feature","Check out our new dashboard.","feature","✨")],[Y8("Improvements","Faster and more reliable.","feature","⚡")]),nA(16),$1("Come Back","We've made things even better since you left.","Log In Now"),nA(16),V8("simple")]},{name:"combo-h1-h2-h3-text",description:"Full heading hierarchy",blocks:[gA("Main Title (H1)",1),f0("Introduction paragraph under the main title."),gA("Section Title (H2)",2),f0("Content for this section."),gA("Subsection (H3)",3),f0("More detailed content in this subsection.")]},{name:"combo-multiple-ctas",description:"Multiple CTAs",blocks:[gA("Choose Your Plan",1),s9([Y8("Basic","Perfect for individuals.","default"),OE("Start Basic","secondary")],[Y8("Pro","For growing teams.","feature","⭐"),OE("Start Pro","primary")])]},{name:"combo-mixed-columns",description:"Mixed content in columns",blocks:[gA("Our Services",2),g2([gA("Consulting",3),f0("Expert advice for your business."),OE("Learn More","secondary")],[gA("Development",3),f0("Custom software solutions."),OE("Learn More","secondary")],[gA("Support",3),f0("24/7 technical assistance."),OE("Learn More","secondary")])]},{name:"combo-all-text-variants",description:"All text formatting variants",blocks:[f0("Normal paragraph text."),f0("Lead text with larger size.","lead"),f0("<strong>Bold text</strong> for emphasis."),f0("<em>Italic text</em> for quotes."),f0("<u>Underlined text</u> for highlighting."),f0('<a href="#">Link text</a> for navigation.')]},{name:"combo-all-button-variants",description:"All button variants together",blocks:[OE("Primary Action","primary"),nA(8),OE("Secondary Action","secondary"),nA(8),OE("Pill Style","pill")]},{name:"combo-all-spacers",description:"All spacer sizes",blocks:[f0("8px spacer below:"),nA(8),f0("16px spacer below:"),nA(16),f0("24px spacer below:"),nA(24),f0("32px spacer below:"),nA(32),f0("48px spacer below:"),nA(48),f0("64px spacer below:"),nA(64),f0("End.")]},{name:"combo-divider-usage",description:"Dividers separating sections",blocks:[gA("Section 1",2),f0("Content for section one."),s6(),gA("Section 2",2),f0("Content for section two."),s6(),gA("Section 3",2),f0("Content for section three.")]},{name:"combo-minimal-announcement",description:"Minimal announcement",blocks:[gA("Quick Update",1),f0("Just a brief note to let you know we've updated our terms of service."),OE("Review Changes","secondary")]},{name:"combo-minimal-reminder",description:"Minimal reminder",blocks:[X9("center"),gA("Reminder",1),f0("Your trial expires in 3 days."),OE("Upgrade Now","primary"),V8("simple")]},{name:"combo-dense-features",description:"Dense feature list",blocks:[gA("All Features Included",1),s9([f0("✓ Unlimited projects"),f0("✓ Team collaboration"),f0("✓ Advanced analytics"),f0("✓ Priority support")],[f0("✓ Custom domains"),f0("✓ API access"),f0("✓ White labeling"),f0("✓ SSO integration")]),nA(16),OE("See All Features","secondary")]},{name:"combo-dense-pricing",description:"Dense pricing comparison",blocks:[gA("Choose Your Plan",1),g2([gA("Starter",3),f0("$9/mo"),f0("5 projects"),f0("Basic support"),OE("Select","secondary")],[gA("Pro",3),f0("$29/mo"),f0("Unlimited projects"),f0("Priority support"),OE("Select","primary")],[gA("Enterprise",3),f0("Custom"),f0("Custom solutions"),f0("Dedicated support"),OE("Contact Us","secondary")])]},{name:"combo-image-gallery",description:"Image gallery layout",blocks:[gA("Photo Gallery",1),g2([v8(void 0,"Photo 1")],[v8(void 0,"Photo 2")],[v8(void 0,"Photo 3")]),nA(8),g2([v8(void 0,"Photo 4")],[v8(void 0,"Photo 5")],[v8(void 0,"Photo 6")])]},{name:"combo-hero-image",description:"Hero with large image",blocks:[v8(void 0,"Hero image"),nA(24),gA("Your Journey Starts Here",1),f0("Discover amazing possibilities with our platform.","lead"),OE("Explore Now","primary")]},{name:"combo-testimonial",description:"Testimonial section",blocks:[gA("What Our Customers Say",2),nA(16),f0('"This product has completely transformed how we work. Highly recommended!"',"lead"),f0("— Jane Doe, CEO at Acme Corp"),nA(24)]},{name:"combo-stats",description:"Stats section",blocks:[gA("By The Numbers",2),g2([gA("10K+",1),f0("Active Users")],[gA("99.9%",1),f0("Uptime")],[gA("24/7",1),f0("Support")])]},{name:"combo-onboarding-flow",description:"Onboarding flow steps",blocks:[gA("Get Started in 3 Steps",1),nA(16),gA("1. Create Account",3),f0("Sign up with your email in seconds."),nA(8),gA("2. Set Preferences",3),f0("Customize your experience to fit your needs."),nA(8),gA("3. Start Using",3),f0("You're all set! Begin exploring features."),nA(16),OE("Begin Setup","primary")]},{name:"combo-h1-text-br-text",description:"Heading then multiple text blocks",blocks:[gA("Keep your landing page winning",1),f0("Hi there,"),f0("Thanks for using our product! I hope the insights helped you spot some quick wins for your page."),f0("Optimization isn't a one-time thing. As you update your copy and add new features, new gaps can appear.")]},{name:"combo-h1-text-p-gaps",description:"Heading then text blocks with <p>-based empty lines",blocks:[gA("Welcome Back",1),f0("<p>We noticed you haven't logged in for a while.</p><p><br></p><p>Here's what you've been missing:</p>"),f0("<p>New features launched last week.</p><p><br></p><p>Performance improvements across the board.</p>")]},{name:"combo-text-trailing-gap-next-text",description:"Trailing empty paragraph in one text block before the next text block",blocks:[f0("<p>Hit reply with just one word:</p><p><strong>SaaS Founder</strong> / <strong>SDR team</strong> / <strong>Agency / or else</strong></p><p><br></p><p>JM</p><p></p>"),f0("<p>Talk soon,</p><p><strong>Founder, Roverlead</strong></p>")]},{name:"combo-text-trailing-gap-next-button",description:"Trailing empty paragraph in a text block before a button block",blocks:[f0("<p>Intro</p><p></p>"),OE("Go")]},{name:"combo-text-bold-title-cta",description:"Text with bold title + br, followed by CTA block",blocks:[f0("<strong>A little something extra...</strong><br>If you upgrade to Pro today, we'll feature your product as a sponsor on our homepage."),$1("Upgrade for $4 (Normally $9)","Use code 5USDOFF to get 15 scans per month.","Claim My Discount")]},{name:"combo-text-br-card",description:"Text with leading <br> followed by card block",blocks:[f0("<br>Here's a summary of your recent activity and what you can do next."),Y8("Your Progress","You've completed 3 out of 5 onboarding steps.","default")]},{name:"combo-multi-text-br-gaps",description:"Multiple text blocks with various br patterns",blocks:[gA("Monthly Update",1),f0("Hi there,"),f0("<br>Here's your monthly summary. We've been busy making improvements."),f0("<strong>What's new:</strong><br>We added three major features this month."),f0("<br>Stay tuned for more updates coming next week."),f0("Best,<br>The Team")]},{name:"combo-h1-lead-br-text-button",description:"Heading, lead text, then regular text and button",blocks:[gA("Your trial is ending soon",1),f0("You have 3 days left on your free trial. Don't lose access to your data.","lead"),f0("<p>During your trial, you've:</p><p><br></p><p>Created 12 projects</p><p>Invited 3 team members</p><p>Sent 45 emails</p>"),OE("Upgrade Now","primary")]},{name:"combo-text-empty-lines-divider-text",description:"Text with empty lines, divider, then more text with empty lines",blocks:[f0("<p>Section one content goes here.</p><p><br></p><p>With a second paragraph after a gap.</p>"),s6(),f0("<p>Section two starts here.</p><p><br></p><p>Also with a gap between paragraphs.</p>")]},{name:"combo-full-email-br-gaps",description:"Full email layout with multiple text blocks",blocks:[X9("center"),gA("Keep your landing page winning",1),f0("Hi there,"),f0("Thanks for using our product for your recent scan! I hope the insights helped."),f0("Optimization isn't a one-time thing. I'm giving you <strong>$5 off</strong> your first month of the Pro plan."),f0("<strong>A little something extra...</strong><br>If you upgrade to Pro today, we'll feature your product as a sponsor."),$1("Upgrade for $4 (Normally $9)","Use code 5USDOFF to get 15 scans per month and a week of sponsorship.","Claim My Discount"),f0(`<em>"Ran on my site fully expecting a polite 'looks fine' and instead got a very accurate list of things I really needed to look at."</em> - Alex, founder`),f0("If you have any questions, just hit reply!<br>Best,<br>Jim"),V8("full","FixMyLanding","")]},{name:"combo-text-br-inside-columns",description:"Columns with text blocks",blocks:[s9([gA("Feature A",3),f0("Description of feature A. It does something great.")],[gA("Feature B",3),f0("Description of feature B. Also very useful.")])]},{name:"conditional-branch-pro",description:"Conditional group resolves to the matching branch before rendering",blocks:[gA("Your rollout is ready",1),f0("Hi {{FIRST_NAME}},"),{id:l0("conditional-group"),type:"conditional-group",conditions:[{id:l0("filter"),field:"attribute",operator:"is",value:"plan:pro"}],ifBranch:{id:l0("branch"),children:[Y8("Pro feature unlocked","Conditional branches can show the premium version of a message without duplicating the whole email.","feature","✨"),OE("Open Pro workspace","primary","https://example.com/pro")]},elseBranch:{id:l0("branch"),children:[f0("Upgrade to Pro to unlock advanced reporting and branch-level personalization.")]}},V8("simple","Test Company","123 Test Street, Test City")]},{name:"conditional-columns-pro",description:"Conditional child blocks inside columns stay visually aligned after filtering",blocks:[gA("Plan-aware update",2),s9([{...f0("Visible only on the Pro plan."),conditions:[{id:l0("filter"),field:"attribute",operator:"is",value:"plan:pro"}]},f0("Shared checklist item for everyone.")],[f0("This side stays visible so the layout still has a stable second column."),OE("Review account","secondary","https://example.com/account")])]},{name:"saas-onboarding-visual",description:"New visual blocks working together: rating, steps, stats, pricing, pull quote, and signature",blocks:[gA("Get set up in minutes",1),FR(),IR(),Yy({variant:"tinted"}),HJ(),$7({variant:"quote",quote:"Switching took an afternoon and paid for itself in a week.",authorTitle:"Head of Growth"}),nF({variant:"signature",title:"Founder"}),V8("simple","Test Company","123 Test Street, Test City")]},{name:"newsletter-digest-articles",description:"Author byline with stacked article cards",blocks:[nF({avatarUrl:dB}),gA("This week's reads",2),Tg(),Tg({variant:"image-left",title:"A second story worth your time",metaText:"3 min read"}),Tg({variant:"minimal",title:"One more quick link"})]}],jt0=[...Ot0,...Pt0,...i10];function o9(A){return`https://images.unsplash.com/${A}?w=1200&q=80&auto=format&fit=crop`}var Uy={workspace:{url:o9("photo-1497366216548-37526070297c"),alt:"Modern office workspace",category:"tech",moods:["default","editorial"]},team:{url:o9("photo-1522202176988-66273c2fd55f"),alt:"Team working together",category:"lifestyle",moods:["default","soft"]},analytics:{url:o9("photo-1460925895917-afdab827c52f"),alt:"Analytics dashboard on a laptop",category:"tech",moods:["default","bold"]},store:{url:o9("photo-1441986300917-64674bd600d8"),alt:"Boutique store interior",category:"fashion",moods:["soft","editorial"]},celebration:{url:o9("photo-1492684223066-81342ee5ff30"),alt:"Confetti celebration",category:"lifestyle",moods:["bold","default"]},collaboration:{url:o9("photo-1519389950473-47ba0277781c"),alt:"Desk with laptops during a work session",category:"tech",moods:["default"]},event:{url:o9("photo-1557804506-669a67965ba0"),alt:"Team workshop session",category:"lifestyle",moods:["default","bold"]},shopping:{url:o9("photo-1607082348824-0a96f2a4b9da"),alt:"Shopping bags",category:"fashion",moods:["soft","bold"]},desk:{url:o9("photo-1499951360447-b19be8fe80f5"),alt:"Tidy desk with laptop and monitor",category:"product",moods:["default","editorial"]},meeting:{url:o9("photo-1517245386807-bb43f82c33c4"),alt:"Meeting conversation",category:"lifestyle",moods:["default","soft"]},gifts:{url:o9("photo-1513885535751-8b9238bd345a"),alt:"Wrapped gifts",category:"product",moods:["soft","bold"]},mountains:{url:o9("photo-1501854140801-50d01698950b"),alt:"Green hills seen from above",category:"nature",moods:["soft","editorial"]},sunrise:{url:o9("photo-1470071459604-3b5ec3a7fe05"),alt:"Foggy mountain ridge at sunrise",category:"nature",moods:["editorial","default"]},meal:{url:o9("photo-1504674900247-0877df9cc836"),alt:"Plated meal on a dark table",category:"food",moods:["editorial","soft"]},freshFood:{url:o9("photo-1490645935967-10de6ba17061"),alt:"Fresh fruit and vegetable spread",category:"food",moods:["default","soft"]},wardrobe:{url:o9("photo-1445205170230-053b83016050"),alt:"Garments hanging on a clothing rack",category:"fashion",moods:["editorial","soft"]},watch:{url:o9("photo-1523275335684-37898b6baf30"),alt:"Minimal watch product shot",category:"product",moods:["editorial","bold"]},camera:{url:o9("photo-1526170375885-4d8ecf77b99f"),alt:"Camera on a plain background",category:"product",moods:["default","editorial"]},gradient:{url:o9("photo-1550859492-d5da9d8e45f3"),alt:"Flowing abstract color gradient",category:"abstract",moods:["bold","default"]}};var xnA=Object.values(Uy),EnA=[Uy.workspace,Uy.team,Uy.desk,Uy.celebration];function pA(A,x,E){return{field:A,operator:x,value:E}}var QnA=[{id:"high-mrr",name:"High MRR",description:"Customers with MRR over $100",icon:"TrendingUp",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("attribute","gte","mrr:100")]},{id:"low-mrr",name:"Low MRR",description:"Customers with MRR under $50",icon:"TrendingDown",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("attribute","gt","mrr:0"),pA("attribute","lt","mrr:50")]},{id:"high-ltv",name:"High LTV customers",description:"Customers with lifetime value over $500",icon:"DollarSign",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("attribute","gte","ltv:500")]},{id:"enterprise-value",name:"Enterprise value",description:"Customers with very high MRR or lifetime value",icon:"Crown",category:"saas",filterJoinOperator:"or",filters:[pA("attribute","gte","mrr:500"),pA("attribute","gte","ltv:2000")]},{id:"past-due-customers",name:"Past due customers",description:"Customers with a recent failed payment",icon:"AlertTriangle",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("tag","contains",KA.PAST_DUE),pA("event","is",`${RA.SAAS_PAYMENT_FAILED}:30d`)]},{id:"cancelled-retainable",name:"Cancelled, not churned",description:"Cancelled customers who have not fully churned yet",icon:"UserMinus",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("tag","contains",KA.CANCELLED),pA("tag","not_contains",KA.CHURNED)]},{id:"churned-customers",name:"Churned customers",description:"Customers who cancelled their subscription",icon:"UserMinus",category:"saas",filters:[pA("tag","contains",KA.CHURNED)]},{id:"churned-high-paying",name:"Churned high paying",description:"High-value customers who cancelled (LTV over $500)",icon:"UserMinus",category:"saas",filters:[pA("tag","contains",KA.CHURNED),pA("attribute","gte","ltv:500")]},{id:"zero-ltv",name:"Zero LTV",description:"Subscribers who have never paid (no lifetime value)",icon:"CircleDollarSign",category:"saas",filterJoinOperator:"or",filters:[pA("attribute","is_empty","ltv:"),pA("attribute","lte","ltv:0")]},{id:"trial-users",name:"Trial users",description:"Users on trial, not yet customers",icon:"Clock",category:"saas",filters:[pA("tag","contains",KA.TRIAL),pA("tag","not_contains",KA.CUSTOMER)]},{id:"trials-ending-soon",name:"Trials ending soon",description:"Trial users whose trial ends in the next 3 days",icon:"Clock",category:"saas",filters:[pA("tag","contains",KA.TRIAL),pA("tag","not_contains",KA.CUSTOMER),pA("attribute","lte","trial_ends_at:3 days from now")]},{id:"recent-trials",name:"Recent trials",description:"Subscribers who started a trial in the last 14 days",icon:"UserPlus",category:"saas",filters:[pA("event","is",`${RA.SAAS_TRIAL_STARTED}:14d`),pA("tag","not_contains",KA.CUSTOMER)]},{id:"monthly-customers",name:"Monthly customers",description:"Customers on monthly subscriptions",icon:"Users",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("tag","contains",KA.SAAS_MONTHLY)]},{id:"annual-customers",name:"Annual customers",description:"Customers on annual subscriptions",icon:"Crown",category:"saas",filters:[pA("tag","contains",KA.CUSTOMER),pA("tag","contains",KA.SAAS_YEARLY)]},{id:"checkout-abandoners-saas",name:"Checkout abandoners",description:"Leads who visited checkout but did not purchase recently",icon:"ShoppingCart",category:"saas",filters:[pA("tag","contains",KA.VISITED_PAYMENT_PAGE),pA("tag","not_contains",KA.CUSTOMER),pA("event","is_not",`${RA.SAAS_PURCHASE}:14d`)]},{id:"free-users",name:"Free users",description:"Non-paying subscribers",icon:"Users",category:"saas",filters:[pA("tag","not_contains",KA.CUSTOMER)]},{id:"ecommerce-customers",name:"E-commerce customers",description:"Placed at least one order",icon:"ShoppingBag",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER)]},{id:"recent-buyers",name:"Recent buyers",description:"Placed an order in the last 30 days",icon:"ShoppingBag",category:"ecommerce",filters:[pA("event","is",`${RA.ECOMMERCE_ORDER_PLACED}:30d`)]},{id:"repeat-buyers",name:"Repeat buyers",description:"Placed 2 or more orders",icon:"Repeat",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER),pA("attribute","gte","ordersCount:2")]},{id:"high-spenders-ecom",name:"High spenders",description:"Customers who spent over $500",icon:"DollarSign",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER),pA("attribute","gte","totalSpent:500")]},{id:"one-time-buyers",name:"One-time buyers",description:"Only placed a single order",icon:"ShoppingCart",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER),pA("attribute","lt","ordersCount:2")]},{id:"lapsed-buyers",name:"Lapsed buyers",description:"Customers with no order in the last 90 days",icon:"Moon",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER),pA("event","is_not",`${RA.ECOMMERCE_ORDER_PLACED}:90d`)]},{id:"no-purchase-1y",name:"No purchase in 1 year",description:"Customers who haven't placed an order in the last 365 days",icon:"CalendarOff",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_CUSTOMER),pA("event","is_not",`${RA.ECOMMERCE_ORDER_PLACED}:365d`)]},{id:"abandoned-checkout",name:"Abandoned checkout",description:"Started checkout but did not place an order in 7 days",icon:"ShoppingCart",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_IN_CHECKOUT),pA("event","is_not",`${RA.ECOMMERCE_ORDER_PLACED}:7d`)]},{id:"active-carts",name:"Active carts",description:"Added to cart without a recent order",icon:"ShoppingCart",category:"ecommerce",filters:[pA("tag","contains",KA.ECOMMERCE_IN_CART),pA("event","is_not",`${RA.ECOMMERCE_ORDER_PLACED}:7d`)]},{id:"back-in-stock-interested",name:"Back-in-stock interest",description:"Requested a back-in-stock alert in the last 30 days",icon:"Zap",category:"ecommerce",filters:[pA("event","is",`${RA.ECOMMERCE_BACK_IN_STOCK_REQUESTED}:30d`)]},{id:"non-buyers",name:"Non-buyers",description:"Subscribers who haven't placed an order",icon:"UserX",category:"ecommerce",filters:[pA("tag","not_contains",KA.ECOMMERCE_CUSTOMER),pA("event","is_not",`${RA.ECOMMERCE_ORDER_PLACED}:all`)]},{id:"refunded-customers",name:"Refunded",description:"Customers who received a refund",icon:"RotateCcw",category:"ecommerce",filterJoinOperator:"or",filters:[pA("tag","contains",KA.REFUNDED),pA("event","is",`${RA.ECOMMERCE_ORDER_REFUNDED}:180d`)]},{id:"customers",name:"Customers",description:"Has 'customer' tag",icon:"UserCheck",category:"general",filters:[pA("tag","contains",KA.CUSTOMER)]},{id:"leads",name:"Leads",description:"Known leads who have not converted yet",icon:"UserPlus",category:"general",filters:[pA("tag","contains",KA.LEAD),pA("tag","not_contains",KA.CUSTOMER)]},{id:"non-customers",name:"Non-customers",description:"Doesn't have 'customer' tag",icon:"UserX",category:"general",filters:[pA("tag","not_contains",KA.CUSTOMER)]},{id:"new-subscribers",name:"New subscribers",description:"Added less than 7 days ago",icon:"UserPlus",category:"general",filters:[pA("added","less_than","7 days ago")]},{id:"custom-domain-contacts",name:"Custom-domain contacts",description:"Contacts using a business or self-hosted mailbox",icon:"Users",category:"general",filters:[pA("emailProvider","is","self_hosted")]},{id:"engaged",name:"Engaged",description:"Opened or clicked an email in the last 30 days",icon:"Flame",category:"engagement",filterJoinOperator:"or",filters:[pA("emailOpened","is","30d"),pA("emailClicked","is","30d")]},{id:"highly-engaged",name:"Highly engaged",description:"Clicked 2+ times or opened 5+ times in 30 days",icon:"Flame",category:"engagement",filterJoinOperator:"or",filters:[pA("emailClicked","at_least","2:30d"),pA("emailOpened","at_least","5:30d")]},{id:"recent-clickers",name:"Recent clickers",description:"Clicked an email in the last 30 days",icon:"Zap",category:"engagement",filters:[pA("emailClicked","is","30d")]},{id:"at-risk",name:"At risk",description:"Opened in 180 days but not opened or clicked in 30 days",icon:"AlertTriangle",category:"engagement",filters:[pA("emailOpened","is","180d"),pA("emailOpened","is_not","30d"),pA("emailClicked","is_not","30d")]},{id:"inactive",name:"Inactive",description:"Received email but did not open or click in 90 days",icon:"Moon",category:"engagement",filters:[pA("emailSent","is","90d"),pA("emailOpened","is_not","90d"),pA("emailClicked","is_not","90d")]},{id:"overmailed-unengaged",name:"Over-mailed, unengaged",description:"Sent 3+ emails in 30 days with no opens or clicks",icon:"EyeOff",category:"engagement",filters:[pA("emailSent","at_least","3:30d"),pA("emailOpened","is_not","30d"),pA("emailClicked","is_not","30d")]},{id:"not-mailed-recently",name:"Not mailed recently",description:"No emails sent in the last 30 days",icon:"Mail",category:"engagement",filters:[pA("emailSent","is_not","30d")]},{id:"deliverability-risk",name:"Deliverability risk",description:"Bounced recently or complained in the last 180 days",icon:"AlertTriangle",category:"engagement",filterJoinOperator:"or",filters:[pA("emailBounced","is","30d"),pA("emailComplained","is","180d")]}];var Vt0=[{code:"en",name:"English"},{code:"es",name:"Spanish"},{code:"de",name:"German"},{code:"fr",name:"French"},{code:"pt",name:"Portuguese"},{code:"it",name:"Italian"},{code:"nl",name:"Dutch"},{code:"pl",name:"Polish"},{code:"ru",name:"Russian"},{code:"ja",name:"Japanese"},{code:"zh",name:"Chinese"},{code:"ko",name:"Korean"},{code:"ar",name:"Arabic"},{code:"hi",name:"Hindi"},{code:"tr",name:"Turkish"},{code:"vi",name:"Vietnamese"},{code:"th",name:"Thai"},{code:"sv",name:"Swedish"},{code:"no",name:"Norwegian"},{code:"da",name:"Danish"},{code:"fi",name:"Finnish"},{code:"cs",name:"Czech"},{code:"el",name:"Greek"},{code:"he",name:"Hebrew"},{code:"uk",name:"Ukrainian"},{code:"ro",name:"Romanian"},{code:"hu",name:"Hungarian"},{code:"id",name:"Indonesian"},{code:"ms",name:"Malay"},{code:"am-ET",name:"Amharic"},{code:"bg-BG",name:"Bulgarian"},{code:"bn-BD",name:"Bengali"},{code:"ca-AD",name:"Catalan"},{code:"et-EE",name:"Estonian"},{code:"fa-IR",name:"Persian"},{code:"fil",name:"Filipino"},{code:"gu",name:"Gujarati"},{code:"hr-HR",name:"Croatian"},{code:"kn",name:"Kannada"},{code:"lt-LT",name:"Lithuanian"},{code:"lv-LV",name:"Latvian"},{code:"ml",name:"Malayalam"},{code:"mr",name:"Marathi"},{code:"sk-SK",name:"Slovak"},{code:"sl-SI",name:"Slovenian"},{code:"sr-RS",name:"Serbian"},{code:"sw-KE",name:"Swahili"},{code:"ta-LK",name:"Tamil"},{code:"te",name:"Telugu"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"en-AU",name:"English (Australia)"},{code:"zh-CN",name:"Chinese (Simplified)"},{code:"zh-TW",name:"Chinese (Traditional)"}],JnA=Object.fromEntries(Vt0.map((A)=>[A.code,A.name]));var ib={id:"active-campaign",label:"ActiveCampaign",mode:"automated_adapter",docs:[{label:"ActiveCampaign API",url:"https://developers.activecampaign.com/reference/overview"}],connection:"Copy the API URL and API key from Settings -> Developer, then provide API_URL|API_KEY.",retrievableData:["contacts","lists","tags","custom fields","campaigns","automations"],mappingNotes:["Contacts map to subscribers.","Lists, tags, and custom fields map directly.","Campaigns and automation emails map to draft content items."],limitations:["Some automation metadata depends on the account's API visibility."]};var mb={id:"brevo",label:"Brevo",mode:"automated_adapter",docs:[{label:"Brevo API",url:"https://developers.brevo.com/"}],connection:"Create a v3 API key with read access to contacts, lists, segments, campaigns, and templates.",retrievableData:["contacts","lists","segments","custom fields","suppressions","campaigns","templates"],mappingNotes:["Contacts map to subscribers with attributes.","Lists and filters map to lists or segments.","Campaigns and templates map to content items with original Brevo HTML."],limitations:["Brevo's public API does not expose automation workflow definitions, including triggers, step order, waits, branches, or linked automation email steps.","Brevo sequences require a manual workflow manifest or manual rebuild using imported Brevo campaign/template HTML."]};var cb={id:"constant-contact",label:"Constant Contact",mode:"automated_adapter",docs:[{label:"Constant Contact API",url:"https://developer.constantcontact.com/api_guide/index.html"}],connection:"Provide a V3 OAuth access token with contact, list, tag, segment, campaign, and email status permissions.",retrievableData:["contacts","lists","tags","custom fields","segments","suppressions","campaigns"],mappingNotes:["Contacts map to subscribers.","Contact lists map to lists.","Tags and custom fields map directly.","Campaign activities map to draft campaigns when HTML is available."],limitations:["OAuth token scope controls campaign and segment visibility."]};var rb={id:"customer-io",label:"Customer.io",mode:"automated_adapter",docs:[{label:"Customer.io App API",url:"https://customer.io/docs/api/app/"}],connection:"Create an App API key with read access to customers, segments, broadcasts, campaigns, newsletters, messages, and suppressions.",retrievableData:["customers","segments","suppressions","campaigns","broadcasts","newsletters","transactional messages"],mappingNotes:["Customers map to subscribers and attributes.","Broadcasts and newsletters map to campaigns.","Campaign email actions map to automation emails.","Transactional messages map to templates."],limitations:["Workflow reconstruction depends on campaign action visibility."]};var pb={id:"drip",label:"Drip",mode:"automated_adapter",docs:[{label:"Drip API",url:"https://developer.drip.com/"}],connection:"Copy an API token with read access to subscribers, tags, custom fields, broadcasts, campaigns, and workflows.",retrievableData:["subscribers","tags","custom fields","broadcasts","campaigns","workflows"],mappingNotes:["Subscribers map to subscribers.","Tags and custom fields map directly.","Broadcast and campaign emails map to content items.","Workflow email steps map to automation emails when bodies are available."],limitations:["List-like structure is inferred from tags and campaigns."]};var _b={id:"hubspot",label:"HubSpot",mode:"automated_adapter",docs:[{label:"HubSpot API",url:"https://developers.hubspot.com/docs/api/overview"}],connection:"Create a private app token with CRM contact, list, marketing email, and subscription preference scopes.",retrievableData:["contacts","lists","active lists","custom properties","subscription preferences","marketing emails"],mappingNotes:["Contacts map to subscribers.","Static lists map to lists; active lists map to segments.","Properties map to custom attributes.","Marketing emails map to campaigns."],limitations:["Subscription preference mapping may require portal-specific rules."]};var nb={id:"kit",label:"Kit",mode:"automated_adapter",docs:[{label:"Kit API",url:"https://developers.kit.com/"}],connection:"Create a Kit API key or OAuth app with read access to subscribers, forms, tags, fields, broadcasts, and sequences.",retrievableData:["subscribers","forms","tags","custom fields","broadcasts","sequences"],mappingNotes:["Subscribers map to subscribers.","Forms and landing pages can become lists when used as acquisition buckets.","Tags and fields map directly.","Broadcasts and sequence emails map to content items."],limitations:["List semantics are reconstructed from forms, tags, and exports."]};var lb={id:"klaviyo",label:"Klaviyo",mode:"automated_adapter",docs:[{label:"Klaviyo API",url:"https://developers.klaviyo.com/en/reference/api_overview"}],connection:"Create a private API key with read permissions for profiles, lists, segments, campaigns, templates, and flows.",retrievableData:["profiles","lists","segments","custom properties","suppressions","campaigns","templates","flows"],mappingNotes:["Profiles map to subscribers.","Lists and segments map to their matching Sequenzy objects.","Profile properties map to custom attributes.","Campaigns, templates, and flow emails map to content items."],limitations:["Flow logic may need manual review before activation."]};var db={id:"loops",label:"Loops",mode:"automated_adapter",docs:[{label:"Loops API",url:"https://loops.so/docs/api-reference"}],connection:"Create an API key with read access to contacts, contact properties, lists, campaigns, and transactional templates.",retrievableData:["lists","custom fields","campaigns","transactional templates"],mappingNotes:["Loops contacts are imported through list and property coverage.","Campaigns map to campaigns.","Transactional templates map to templates."],limitations:["Subscriber discovery is limited by the available Loops API surfaces."]};var ab={id:"mailchimp",label:"Mailchimp",mode:"automated_adapter",docs:[{label:"Mailchimp Marketing API",url:"https://mailchimp.com/developer/marketing/api/"}],connection:"Create a Marketing API key and include the datacenter prefix from the account URL when needed.",retrievableData:["members","audiences","tags","segments","merge fields","suppressions","campaigns","templates","customer journeys"],mappingNotes:["Audience members map to subscribers and list memberships.","Merge fields map to custom attributes.","Tags, segments, campaigns, templates, and journey emails map directly where possible."],limitations:["Journey reconstruction can require manual review."]};var sb={id:"mailerlite",label:"MailerLite",mode:"automated_adapter",docs:[{label:"MailerLite API",url:"https://developers.mailerlite.com/docs"}],connection:"Create an API token with read access to subscribers, groups, segments, fields, campaigns, and automations.",retrievableData:["subscribers","groups","segments","fields","suppressions","campaigns","automations"],mappingNotes:["Groups map to lists.","Segments map to segments.","Fields map to custom attributes.","Campaigns and automation emails map to content items."],limitations:["Automation details may need review before enabling imported sequences."]};var ob={id:"mailjet",label:"Mailjet",mode:"automated_adapter",docs:[{label:"Mailjet API",url:"https://dev.mailjet.com/email/reference/overview/"}],connection:"Provide Mailjet API key and secret with read permissions for contacts, lists, campaigns, templates, and contact metadata.",retrievableData:["contacts","lists","custom fields","suppressions","campaigns","templates"],mappingNotes:["Contacts map to subscribers.","Contact lists map to lists.","Contact data maps to custom attributes.","Campaigns and templates map to content items."],limitations:["Automation import is not part of current native coverage."]};var tb={id:"omnisend",label:"Omnisend",mode:"automated_adapter",docs:[{label:"Omnisend API",url:"https://api-docs.omnisend.com/"}],connection:"Create an API key with read permissions for contacts, tags, properties, segments, campaigns, and templates.",retrievableData:["contacts","tags","custom fields","segments","campaigns","templates"],mappingNotes:["Contacts map to subscribers.","Tags and custom properties map directly.","Segments map to segments.","Campaigns and templates map to content items."],limitations:["Automation import is not part of current native coverage."]};var eb={id:"resend",label:"Resend",mode:"automated_adapter",docs:[{label:"Resend API",url:"https://resend.com/docs/api-reference/introduction"}],connection:"Create a Resend API key with read access to audiences, contacts, broadcasts, templates, and related metadata.",retrievableData:["contacts","segments","tags","custom fields","broadcasts","templates","automations"],mappingNotes:["Audience contacts map to subscribers.","Broadcasts map to campaigns.","Templates map to templates.","Tags and fields map directly when present."],limitations:["Some automation coverage is reconstructed from available metadata."]};var Ak={id:"sendgrid",label:"SendGrid",mode:"automated_adapter",docs:[{label:"SendGrid API",url:"https://www.twilio.com/docs/sendgrid/api-reference"}],connection:"Create a SendGrid API key with read access to Marketing Campaigns, contactdb, suppressions, templates, and automations.",retrievableData:["contacts","lists","segments","custom fields","suppressions","campaigns","templates","automations"],mappingNotes:["Contacts map to subscribers.","Lists and segments map to matching Sequenzy resources.","Custom fields map to attributes.","Campaigns, templates, and automation emails map to content items."],limitations:["Legacy and current Marketing Campaigns accounts may expose different endpoints."]};var c10={[ib.id]:ib,[mb.id]:mb,[cb.id]:cb,[rb.id]:rb,[pb.id]:pb,[_b.id]:_b,[nb.id]:nb,[lb.id]:lb,[db.id]:db,[ab.id]:ab,[sb.id]:sb,[ob.id]:ob,[tb.id]:tb,[eb.id]:eb,[Ak.id]:Ak};var xk={id:"aweber",label:"AWeber",mode:"partial_automated_adapter",docs:[{label:"AWeber API",url:"https://api.aweber.com/"}],connection:"Use OAuth 2.0 with read scopes for accounts, lists, subscribers, broadcasts, and segments. Store access and refresh tokens when available.",retrievableData:["subscribers","lists","segments","tags","custom fields","broadcasts","follow-ups","unsubscribed and undeliverable subscriber status"],mappingNotes:["Subscribers map to subscribers.","Lists map to lists.","Tags and custom fields map directly.","Broadcasts and follow-ups map to campaigns when content is available."],limitations:["AWeber's newer automation campaign builder is not fully exposed by the public API."]};var Ek={id:"beehiiv",label:"Beehiiv",mode:"partial_automated_adapter",docs:[{label:"beehiiv API",url:"https://developers.beehiiv.com/"}],connection:"Create an API key in beehiiv settings and provide PUBLICATION_ID|API_KEY.",retrievableData:["publications","subscriptions","newsletter lists","segments","tags","custom fields","posts","automation metadata"],mappingNotes:["Subscriptions map to subscribers.","Newsletter lists map to lists.","Segments map to segments.","Posts map to campaign content."],limitations:["Automation email content can be partial."]};var Bk={id:"benchmark-email",label:"Benchmark Email",mode:"partial_automated_adapter",docs:[{label:"Benchmark Email API",url:"https://apidocs.benchmarkemail.com/#/overview"}],connection:"Use Benchmark Email API credentials. Legacy XML-RPC flows may require username/password login to receive an API token.",retrievableData:["contact lists","contacts","segments","custom fields","campaign reports and details","autoresponders","unsubscribe and bounce status"],mappingNotes:["Contact lists map to lists.","Contacts map to subscribers.","Fields map to custom attributes.","Autoresponders map to automation emails if subject and body are returned."],limitations:["Some accounts require legacy API authentication."]};var gk={id:"buttondown",label:"Buttondown",mode:"partial_automated_adapter",docs:[{label:"Buttondown API",url:"https://docs.buttondown.com/api-introduction"}],connection:"Enable API access and create an API key. Use Authorization: Token API_KEY.",retrievableData:["subscribers","newsletters","tags","subscriber metadata","emails","suppression-like subscriber states"],mappingNotes:["Subscriber metadata maps to custom attributes.","Tags map to tags.","Newsletters can map to lists.","Emails map to campaigns."],limitations:["Template and automation coverage is limited and should not be treated as full export support."]};var Qk={id:"campaign-monitor",label:"Campaign Monitor",mode:"partial_automated_adapter",docs:[{label:"Campaign Monitor API",url:"https://www.campaignmonitor.com/api/v3-3/getting-started/"}],connection:"Use OAuth or API key Basic Auth. Collect client ID when the account has multiple clients.",retrievableData:["subscribers","lists","segments","custom fields","suppression lists","campaigns","template metadata","journey metadata"],mappingNotes:["Subscribers by list map to subscribers plus list memberships.","Suppression list entries map to suppressions.","Campaigns map to campaigns."],limitations:["Templates may expose only preview or screenshot metadata.","Journeys do not reliably expose full email content."]};var Dk={id:"campaigner",label:"Campaigner",mode:"partial_automated_adapter",docs:[{label:"Campaigner REST API",url:"https://www.campaigner.com/features/rest-api/"},{label:"Campaigner API reference",url:"https://api.campaigner.com/docs/"},{label:"Campaigner OpenAPI spec",url:"https://api.campaigner.com/docs/openapi.json"}],connection:"Create or copy a Campaigner IntegrationKey with read access to contacts, lists, fields, and workflow metadata. Paste the key, or JSON with apiKey.",retrievableData:["contacts","mailing lists","static and dynamic segment metadata","contact list memberships","custom fields","unsubscribe and bounce status fields on contacts","workflow summaries"],mappingNotes:["Contacts map to subscribers using staticFields.email.","MailingList records map to lists.","StaticSegment and DynamicSegment records map to segment metadata and membership snapshots where contact memberships include them.","Custom fields map to subscriber custom attributes.","System/static unsubscribe and bounce fields map to suppression state when present."],limitations:["No documented campaign list/detail endpoint for fetching existing campaigns.","No documented template list/detail/body endpoint.","Workflow endpoints expose summaries, not full automation steps or email bodies.","No first-class tag resource was found in the official API."]};var Ck={id:"emailoctopus",label:"EmailOctopus",mode:"partial_automated_adapter",docs:[{label:"EmailOctopus API",url:"https://emailoctopus.com/api-documentation"}],connection:"Create an API key and use it with EmailOctopus API requests.",retrievableData:["lists","contacts","list tags","contact fields","campaign content","unsubscribed contact status"],mappingNotes:["List contacts map to subscribers.","Fields map to custom attributes.","Tags map to tags.","Campaigns map to campaign content."],limitations:["No standalone saved segment, template, or automation retrieval was verified."]};var Fk={id:"flodesk",label:"Flodesk",mode:"partial_automated_adapter",docs:[{label:"Flodesk API",url:"https://developers.flodesk.com/"}],connection:"Create an API key under account integrations. Private API auth uses Basic auth with the API key as username and a blank password.",retrievableData:["subscribers","segments","subscriber custom fields"],mappingNotes:["Subscribers map to subscribers.","Segments map to segments.","Custom fields map to custom attributes."],limitations:["Official docs do not expose campaign or template body export."]};var Ik={id:"getresponse",label:"GetResponse",mode:"partial_automated_adapter",docs:[{label:"GetResponse API",url:"https://apidocs.getresponse.com/v3"},{label:"GetResponse API Reference",url:"https://apireference.getresponse.com/"}],connection:"Create an API key and use X-Auth-Token: api-key API_KEY. Some MAX accounts require X-Domain.",retrievableData:["contacts","campaigns-as-lists","search contacts","tags","custom fields","newsletters","templates","suppression-like statuses","workflow metadata"],mappingNotes:["GetResponse campaigns are contact lists and map to lists.","Newsletters map to campaign content.","Search contacts map to segments.","Transactional templates map to templates."],limitations:["Workflows are partial unless email content is exposed."]};var wk={id:"ghost",label:"Ghost",mode:"partial_automated_adapter",docs:[{label:"Ghost Admin API",url:"https://docs.ghost.org/admin-api"}],connection:"Create a Ghost custom integration and provide ADMIN_API_URL|ADMIN_API_KEY. Sign Admin API JWTs server-side.",retrievableData:["members","newsletters","labels","email suppression status","posts","newsletter posts"],mappingNotes:["Members map to subscribers.","Newsletters map to lists.","Labels map to tags.","Newsletter posts map to campaign content."],limitations:["Saved segments, templates, and automations are not first-class export surfaces."]};var Jk={id:"listmonk",label:"Listmonk",mode:"partial_automated_adapter",docs:[{label:"Listmonk API",url:"https://listmonk.app/docs/apis/apis/"}],connection:"Create an API user or token in Listmonk and provide BASE_URL|USERNAME|ACCESS_TOKEN.",retrievableData:["subscribers","lists","subscriber attributes","blocklisted status","unsubscribed status","bounced status","campaigns","templates"],mappingNotes:["Subscriber attribs map to custom attributes.","Lists map to lists.","SQL segmentation can map to segments only when the query is supplied or discovered.","Campaigns and templates map to content items."],limitations:["No native automation export."]};var fk={id:"mailersend",label:"MailerSend",mode:"partial_automated_adapter",docs:[{label:"MailerSend API",url:"https://developers.mailersend.com/api/v1"}],connection:"Create an API token with read access to recipients, suppressions, and templates.",retrievableData:["recipients","suppressions","templates"],mappingNotes:["Recipients map to subscribers when email identity and consent state are sufficient.","Suppressions map to suppression records.","Templates map to transactional templates."],limitations:["Campaign, segment, list, and automation export were not verified."]};var Kk={id:"mailgun",label:"Mailgun",mode:"partial_automated_adapter",docs:[{label:"Mailgun API",url:"https://documentation.mailgun.com/docs/mailgun/api-reference/"}],connection:"Provide domain, region, and an API key with read access to mailing lists, members, suppressions, and templates.",retrievableData:["mailing lists","list members","member vars","suppressions","templates"],mappingNotes:["Mailing lists map to lists.","Members map to subscribers.","Member vars map to custom attributes.","Suppressions map to suppression records.","Templates map to transactional templates."],limitations:["Mailgun does not provide marketing campaign or automation export coverage."]};var $k={id:"mailtrap",label:"Mailtrap",mode:"partial_automated_adapter",docs:[{label:"Mailtrap API",url:"https://api-docs.mailtrap.io/"}],connection:"Create a Mailtrap API token with read access to contacts, lists, suppressions, and templates.",retrievableData:["contacts","contact exports","lists","custom fields","suppressions","templates"],mappingNotes:["Contacts map to subscribers.","Lists map to lists.","Fields map to custom attributes.","Templates map to templates."],limitations:["Campaign, segment, and automation retrieval were not verified."]};var Hk={id:"mautic",label:"Mautic",mode:"automated_adapter",docs:[{label:"Mautic API",url:"https://developer.mautic.org/"}],connection:"Create OAuth or Basic Auth credentials for the Mautic instance and provide BASE_URL plus credentials.",retrievableData:["contacts","segments","tags","custom fields","do-not-contact records","emails","templates","campaigns"],mappingNotes:["Contacts map to subscribers.","Segments map to segments.","Do-not-contact records map to suppressions.","Emails and templates map to content items.","Campaign email steps map to automation emails when available."],limitations:["Self-hosted versions and plugins can change API shape."]};var yk={id:"moosend",label:"Moosend",mode:"partial_automated_adapter",docs:[{label:"Moosend API",url:"https://moosend.com/api/"}],connection:"Create an API key with read access to mailing lists, subscribers, segments, custom fields, campaigns, and suppressions.",retrievableData:["subscribers","mailing lists","segments","custom fields","campaigns","unsubscribe and bounce status"],mappingNotes:["Mailing lists map to lists.","Subscribers map to subscribers.","Segments map to segments.","Campaigns map to campaign content."],limitations:["Standalone template and automation export were not verified."]};var qk={id:"other",label:"Other",mode:"guided_manual",docs:[],connection:"Collect the provider name, export files, or official API credentials, then review the available data before committing an import scope.",retrievableData:["reviewed case by case"],mappingNotes:["Contacts map to subscribers when email identity is present.","Lists, tags, segments, suppressions, and content are mapped after export shape review."],limitations:["No provider-specific guarantees until review is complete."]};var Yk={id:"postmark",label:"Postmark",mode:"partial_automated_adapter",docs:[{label:"Postmark API",url:"https://postmarkapp.com/developer/api/overview"}],connection:"Provide a Postmark server token with read access to suppression and template endpoints.",retrievableData:["suppressions","templates"],mappingNotes:["Suppressions map to suppression records.","Templates map to transactional templates."],limitations:["Postmark has no native marketing subscriber, list, segment, campaign, or automation export."]};var Xk={id:"sender",label:"Sender",mode:"partial_automated_adapter",docs:[{label:"Sender API",url:"https://www.sender.net/api/"}],connection:"Create an API token with read access to subscribers, groups, segments, fields, campaigns, and workflows.",retrievableData:["subscribers","groups","segments","custom fields","campaigns","workflows","unsubscribe and bounce status"],mappingNotes:["Groups map to lists.","Subscribers map to subscribers.","Segments map to segments.","Campaigns map to campaign content.","Workflows map to automation drafts when steps are available."],limitations:["Tags and reusable templates were not verified as first-class export surfaces."]};var Uk={id:"sendpulse",label:"SendPulse",mode:"partial_automated_adapter",docs:[{label:"SendPulse API",url:"https://sendpulse.com/integrations/api"}],connection:"Create REST API credentials and provide CLIENT_ID|CLIENT_SECRET, or JSON with clientId and clientSecret. JSON with accessToken is also accepted for already-issued OAuth tokens.",retrievableData:["address books","contacts","variables","tags","blacklist","campaigns","templates","Automation360 metadata"],mappingNotes:["Address books map to lists.","Contacts map to subscribers.","Variables map to custom attributes.","Blacklist entries map to suppressions.","Campaigns and templates map to content items."],limitations:["Automation360 content may be partial and should be reviewed before import."]};var Zk={id:"shopify-email",label:"Shopify Email",mode:"partial_automated_adapter",docs:[{label:"Shopify Admin API",url:"https://shopify.dev/docs/api/admin-graphql"}],connection:"Create a Shopify custom app with read access to customers, customer tags, segments, metafields, and email marketing consent.",retrievableData:["customers","customer segments","tags","metafields","email marketing consent","suppression-like consent state"],mappingNotes:["Customers with email marketing consent map to subscribers.","Segments map to segments.","Tags map to tags.","Metafields map to custom attributes.","Consent state maps to active or unsubscribed status."],limitations:["Shopify Email campaign HTML export is not reliably exposed through the Admin API."]};var Gk={id:"zoho-campaigns",label:"Zoho Campaigns",mode:"partial_automated_adapter",docs:[{label:"Zoho Campaigns API",url:"https://www.zoho.com/campaigns/help/developers/"}],connection:"Create an OAuth client and request Zoho Campaigns read scopes for contacts, lists, segments, fields, campaigns, and workflows.",retrievableData:["lists","contacts","segments","custom fields","tags","campaign details","workflow metadata"],mappingNotes:["Lists map to lists.","Contacts map to subscribers.","Segments map to segments.","Fields map to custom attributes.","Campaign details map to campaigns when body content is available."],limitations:["Raw campaign HTML and template retrieval are unclear in public docs.","API rate limits require batching."]};var r10={[xk.id]:xk,[Ek.id]:Ek,[Bk.id]:Bk,[gk.id]:gk,[Dk.id]:Dk,[Qk.id]:Qk,[Ck.id]:Ck,[Fk.id]:Fk,[Ik.id]:Ik,[wk.id]:wk,[Jk.id]:Jk,[fk.id]:fk,[Kk.id]:Kk,[$k.id]:$k,[Hk.id]:Hk,[yk.id]:yk,[Yk.id]:Yk,[Xk.id]:Xk,[Uk.id]:Uk,[Zk.id]:Zk,[Gk.id]:Gk,[qk.id]:qk};var DdA={...c10,...r10};var vt0={affiliateId:"affiliateId",trackingId:"affiliateTrackingId",status:"affiliateStatus",programId:"affiliateProgramId",groupId:"affiliateGroupId",couponCode:"affiliateCouponCode",couponProvider:"affiliateCouponProvider",leadCount:"affiliateLeadCount",conversionCount:"affiliateConversionCount",totalReferredRevenue:"affiliateTotalReferredRevenue",totalCommissionEarned:"affiliateTotalCommissionEarned",totalPaidOut:"affiliateTotalPaidOut",lastPayoutAt:"affiliateLastPayoutAt"};var HdA=new Set(Object.values(vt0));function ut0(A,x,E){let g=Number.parseInt(A??"",10);return Number.isFinite(g)&&g>=E?g:x}var qdA=ut0(process.env.QUEUE_PRODUCER_COMMAND_TIMEOUT_MS,15000,1000);var ht0=H.union([H.object({family:H.literal("dns"),type:H.enum(["wrong_value","wrong_path","multiple_records","wrong_type"]),found:H.string(),expected:H.string(),foundValues:H.array(H.string()).optional(),foundAt:H.string().optional(),foundType:H.enum(["CNAME","TXT","MX"]).optional()}),H.object({family:H.literal("provider"),type:H.literal("provider_failed"),message:H.string()})]),bt0=H.object({settled:H.enum(["verified","unverified"]),everVerified:H.boolean(),expectedValueFingerprint:H.string().optional(),lastMatchAt:H.string().optional(),lastNegative:H.object({kind:H.enum(["absent","mismatch","provider"]),at:H.string(),issue:ht0.optional(),proof:H.enum(["authoritative-nxdomain","authoritative-nodata","recursive-nxdomain","recursive-nodata"]).optional(),sources:H.object({cloudflare:H.string(),google:H.string(),direct:H.string(),directNameserver:H.string().optional()}).optional()}).optional(),degradedSince:H.string().optional(),negativeCount:H.number().optional(),providerPendingSince:H.string().optional(),acceleratedChecks:H.number().optional(),episodeCount:H.number().optional(),episodeWindowStart:H.string().optional(),lastObservedAt:H.string().optional(),disagreeSince:H.string().optional(),unobservableDiagnostic:H.object({kind:H.enum(["broken_delegation","dnssec"]),since:H.string(),sources:H.object({cloudflare:H.string(),google:H.string(),direct:H.string(),directNameserver:H.string().optional()}).optional()}).optional()}),idA=H.object({v:H.literal(1),records:H.record(H.string(),bt0),setupWindowStartedAt:H.string().optional(),unhealthySince:H.string().optional(),degraded:H.boolean(),provider:H.object({resubmitCount:H.number().optional(),lastResubmitAt:H.string().optional(),lastResubmitError:H.string().optional(),mailFromResubmittedAt:H.string().optional(),mailFromResubmitError:H.string().optional(),mailFromSetupRestartedAt:H.string().optional()}),alerts:H.object({transitionAlertAt:H.string().optional(),flapAlertAt:H.string().optional(),unobservableAlertAt:H.string().optional(),lookupErrorKey:H.string().optional(),lookupErrorAlertAt:H.string().optional(),delegationAlertAt:H.string().optional(),dnssecAlertAt:H.string().optional(),disagreeAlertAt:H.string().optional()})});var kt0={slug:"cal-com",name:"Cal.com",description:"Open-source scheduling platform",website:"https://cal.com",category:"scheduling",setupInstructions:`1. In Cal.com, go to **Settings → Developer → Webhooks**
|
|
543
543
|
2. Click **New Webhook**
|
|
544
544
|
3. Paste the webhook URL above
|
|
545
545
|
4. Select **Booking created** as the trigger event
|
|
@@ -604,8 +604,8 @@ Email: john@example.com`},defaultFieldMapping:{email:"q4_email",firstName:"q3_na
|
|
|
604
604
|
2. Click **New destination**
|
|
605
605
|
3. Select **Webhook** as the type
|
|
606
606
|
4. Paste the webhook URL above
|
|
607
|
-
5. Select your events and click **Save**`,events:[{key:"subscription_created",label:"Subscription Created",description:"When a new subscription starts",suggestedEventName:"subscription-created",samplePayload:{event_type:"subscription.created",data:{id:"sub_01h",status:"active",customer_id:"ctm_01h",custom_data:{},items:[{price:{unit_price:{amount:"4900"}}}],customer:{email:"john@example.com",name:"John Doe"}}},defaultFieldMapping:{email:"data.customer.email",firstName:"data.customer.name"},suggestedProperties:[{name:"subscriptionId",path:"data.id",description:"Paddle subscription ID"}]},{key:"subscription_canceled",label:"Subscription Canceled",description:"When a subscription is canceled",suggestedEventName:"subscription-canceled",samplePayload:{event_type:"subscription.canceled",data:{id:"sub_01h",status:"canceled",customer:{email:"john@example.com",name:"John Doe"},canceled_at:"2024-02-15T00:00:00Z"}},defaultFieldMapping:{email:"data.customer.email",firstName:"data.customer.name"}}]},xe0=[kt0,it0,mt0,ct0,lt0,rt0,pt0,Ae0,et0,_t0,nt0,dt0,at0,st0,ot0,tt0];var
|
|
608
|
-
`))console.log(` ${g}`)}}function ye0(A){if(console.log(`Subscriber: ${A.email}`),console.log(`Status: ${A.status}`),A.externalId)console.log(`External ID: ${A.externalId}`);let x=s10(A);if(x)console.log(`Name: ${x}`);if(console.log(`ID: ${A.id}`),console.log(`Created: ${dA(A.createdAt)}`),console.log(`Updated: ${dA(A.updatedAt)}`),console.log(`Email provider: ${A.emailProvider??"None"}`),console.log(`Tags: ${A.tags.length>0?A.tags.join(", "):"None"}`),o10(A.notes??[]),console.log("Lists:"),(A.lists?.length??0)===0)console.log(" None");else for(let E of A.lists??[])console.log(` - ${E.name}${E.unsubscribedAt?" [inactive]":" [active]"}`),console.log(` Joined: ${dA(E.subscribedAt)}${E.unsubscribedAt?` | Unsubscribed: ${dA(E.unsubscribedAt)}`:""}`);if(console.log("Sequence Enrollments:"),(A.sequenceEnrollments?.length??0)===0)console.log(" None");else for(let E of A.sequenceEnrollments??[])if(console.log(` - ${E.sequenceName} [${E.enrollmentStatus}]`),console.log(` Sequence ID: ${E.sequenceId} | Status: ${E.sequenceStatus}`),console.log(` Current node: ${E.currentNodeLabel??E.currentNodeType??"Unknown"}`),console.log(` Entered: ${dA(E.enteredAt)} | Updated: ${dA(E.updatedAt)}`),E.scheduledFor)console.log(` Scheduled: ${dA(E.scheduledFor)}`);if(console.log("Email Stats:"),!A.emailStats)console.log(" None");else console.log(` Sent ${A.emailStats.sent}, delivered ${A.emailStats.delivered}, opened ${A.emailStats.opened}, clicked ${A.emailStats.clicked}, bounced ${A.emailStats.bounced}, unsubscribed ${A.emailStats.unsubscribed}, complained ${A.emailStats.complained}`);if(console.log("Recent Activity:"),(A.activity?.length??0)===0)console.log(" None");else for(let E of A.activity??[])console.log(` - ${$e0(E)}`);if(console.log("Custom Attributes:"),!A.customAttributes||Object.keys(A.customAttributes).length===0)console.log(" None");else console.log(JSON.stringify(A.customAttributes,null,2))}async function qe0(A){let x=await Ke0(A);if(A.json){L0(x);return}He0(x)}async function Ye0(A){let x=lF(A),E=d10(A.list),g=await Y0("POST","/api/v1/subscribers",{...x,firstName:A.firstName,lastName:A.lastName,tags:Rk(A.tag),...A.noLists?{lists:[]}:E.length>0?{lists:E}:{},...A.skipSequences?{enrollInSequences:!1}:{},customAttributes:wR(A.attr)},A.company);if(A.json){L0(g);return}console.log(`Added subscriber: ${x.email??`external:${x.externalId}`}`)}async function Xe0(A){let x=lF(A),E=Rk(A.tag),g=wR(A.attr);if(!(A.status!==void 0||A.firstName!==void 0||A.lastName!==void 0||E.length>0||g!==void 0))throw Error("Provide at least one of --status, --first-name, --last-name, --tag, or --attr.");let Q=await Y0("PATCH",Mk(x),{...A.status!==void 0&&{status:A.status},...A.firstName!==void 0&&{firstName:A.firstName},...A.lastName!==void 0&&{lastName:A.lastName},...E.length>0&&{tags:E},...g!==void 0&&{customAttributes:g},...A.merge&&g!==void 0?{customAttributesStrategy:"merge"}:{}},A.company);if(A.json){L0(Q);return}console.log(`Updated subscriber: ${x.email??`external:${x.externalId}`}`)}async function Ue0(A){let x=lF(A),E=await Y0("GET",Mk(x,{includeBots:A.includeBots}),void 0,A.company);if(A.json){L0(E);return}ye0(E.subscriber)}async function Ze0(A){let x=lF(A),E=await Y0("GET",a10(x),void 0,A.company);if(A.json){L0(E);return}o10(E.notes)}async function Ge0(A){let x=lF(A),E=A.body?.trim();if(!E)throw Error("--body is required.");let g=await Y0("POST",a10(x),{body:E},A.company);if(A.json){L0(g);return}console.log(`Added note: ${g.note.id}`)}async function We0(A){let x=A.noteId?.trim();if(!x)throw Error("Provide a note ID.");let E=await Y0("DELETE",`/api/v1/subscribers/notes/${encodeURIComponent(x)}`,void 0,A.company);if(A.json){L0(E);return}console.log(`Deleted note: ${x}`)}async function Re0(A){let x=lF(A),E=Mk(x),g=x.email??`external:${x.externalId}`;if(A.hard){let Q=await Y0("DELETE",E,void 0,A.company);if(A.json){L0(Q);return}console.log(`Deleted subscriber: ${g}`);return}let B=await Y0("PATCH",E,{status:"unsubscribed"},A.company);if(A.json){L0(B);return}console.log(`Unsubscribed: ${g}`)}async function Me0(A){let x=lF(A),E=A.name?.trim();if(!E)throw Error("--name is required.");let g=await Y0("POST","/api/v1/subscribers/events",{...x,event:E,properties:wR(A.property),customAttributes:wR(A.attr)},A.company);if(A.json){L0(g);return}let B=we0(g);if(B.length>0){console.log(`Event recorded with side-effect failures: ${B.join(", ")}`);return}console.log(`Triggered event: ${E} for ${x.email??`external:${x.externalId}`}`)}async function H7(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{switch(A){case"list":await qe0(x);return;case"add":await Ye0(x);return;case"update":await Xe0(x);return;case"get":await Ue0(x);return;case"notes:list":await Ze0(x);return;case"notes:add":await Ge0(x);return;case"notes:delete":await We0(x);return;case"import":await n10(x);return;case"import:get":await l10(x);return;case"event":await Me0(x);return;case"remove":await Re0(x);return}}catch(E){let g=E instanceof l?E:new l(E instanceof Error?E.message:"Unknown error",500);YA(g),process.exit(1)}}function ze0(A,x){let E=new URLSearchParams;if(x)E.set("region",x);return`/api/v1/suppressions/${encodeURIComponent(A)}${E.size>0?`?${E}`:""}`}function Se0(A){let x=[`Recipient: ${A.email}`,`Suppressed: ${A.suppressed?"Yes":"No"}`,`Associated with company: ${A.knownRecipient?"Yes":"No"}`,`Local suppression: ${A.local.suppressed?`${A.local.reason??"unknown"} (${A.local.source??"unknown source"})`:"None"}`,`SES regions checked: ${A.ses.regionsChecked.join(", ")}`];if(A.ses.entries.length===0)x.push("SES suppression: None");else for(let E of A.ses.entries)x.push(`SES suppression: ${E.reason} in ${E.region} (updated ${dA(E.lastUpdateTime)})`);return x}async function zk(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(!x.email)throw new l("Recipient email is required",400);let E=ze0(x.email,x.region);if(A==="get"){let B=await Y0("GET",E,void 0,x.company);if(x.json){L0(B);return}for(let Q of Se0(B.suppression))console.log(Q);return}if(!await l9(`Remove stale bounce suppression for ${x.email}? Complaint and unsubscribe protections will be kept.`,x)){console.log("Aborted.");return}let g=await Y0("DELETE",E,void 0,x.company);if(x.json){L0(g);return}if(console.log(g.removed?`Removed stale bounce suppression for ${g.email}.`:`No removable bounce suppression found for ${g.email}.`),g.removedSesRegions.length>0)console.log(`SES regions cleared: ${g.removedSesRegions.join(", ")}`);if(g.reactivatedSubscriberIds.length>0)console.log(`Reactivated subscribers: ${g.reactivatedSubscriberIds.length}`);if(g.remainingSuppression.suppressed)console.log("The recipient remains suppressed by a protected complaint or another suppression source.")}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Le0(A){if(A.reset){if(A.rulesJson!==void 0||A.rulesFile!==void 0)throw new l("--reset cannot be combined with --rules",400);return{syncRules:null}}let x=gE(A.rulesJson,A.rulesFile,"rules");if(x===void 0)throw new l("Provide --rules-json, --rules-file, or --reset",400);if(!Array.isArray(x))throw new l("rules JSON must be an array of sync rules",400);return{syncRules:x}}function Oe0(A){let x=[],E=A.conditions;if(!E)return x;if(E.requiresTags?.length)x.push(` Requires tags: ${E.requiresTags.join(", ")}`);if(E.requiresNotTags?.length)x.push(` Excluded tags: ${E.requiresNotTags.join(", ")}`);let g=E.purchasedProduct;if(g){let B=[];if(g.tags?.length)B.push(`tags ${g.tags.join("|")}`);if(g.collectionIds?.length)B.push(`collections ${g.collectionIds.join("|")}`);if(g.productTypes?.length)B.push(`types ${g.productTypes.join("|")}`);if(g.vendors?.length)B.push(`vendors ${g.vendors.join("|")}`);if(B.length>0)x.push(` Product match: ${B.join("; ")}`)}return x}function t10(A){console.log(`Sync rules (${A.syncRules.length})${A.isDefault?" - platform defaults":""}`);for(let x of A.syncRules){let E=x.actions.addTags.length?`+${x.actions.addTags.join(", +")}`:"",g=x.actions.removeTags.length?`-${x.actions.removeTags.join(", -")}`:"",B=[E,g].filter(Boolean).join(" ")||"(no-op)";console.log(`- ${x.triggerEvent}: ${B}`);for(let Q of Oe0(x))console.log(Q)}}async function Sk(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="get"){let B=await Y0("GET","/api/v1/sync-rules",void 0,x.company);if(x.json){L0(B);return}t10(B);return}let E=Le0(x),g=await Y0("PUT","/api/v1/sync-rules",E,x.company);if(x.json){L0(g);return}if(g.message)console.log(g.message);t10(g)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Pe0(A){let x=A.isSystem?" [system]":"";console.log(`- ${A.name} [${A.id}]${x}`),console.log(` Color: ${A.color??"Default"}`)}function je0(A){if(!A.name||A.name.trim()==="")throw new l("Tag name is required",400);return{name:A.name,...A.color!==void 0&&{color:A.color}}}async function yJ(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let g=await Y0("GET","/api/v1/tags",void 0,x.company);if(x.json){L0(g);return}console.log(`Tags (${g.tags.length})`);for(let B of g.tags)Pe0(B);return}if(A==="create"){let g=je0(x),B=await Y0("POST","/api/v1/tags",g,x.company);if(x.json){L0(B);return}if(console.log(`Created tag: ${B.tag?.name??g.name}`),B.tag)console.log(`ID: ${B.tag.id}`),console.log(`Color: ${B.tag.color??"Default"}`);return}if(!x.tagId)throw new l("Tag ID is required",400);if(A==="update"){if(!x.color||x.color.trim()==="")throw new l("--color is required",400);let g=await Y0("PATCH",`/api/v1/tags/${encodeURIComponent(x.tagId)}`,{color:x.color},x.company);if(x.json){L0(g);return}if(console.log(`Updated tag: ${g.tag?.name??x.tagId}`),g.tag)console.log(`ID: ${g.tag.id}`),console.log(`Color: ${g.tag.color??"Default"}`);return}if(!await l9(`Delete tag ${x.tagId}? It will be removed from all subscribers.`,x)){console.log("Aborted.");return}let E=await Y0("DELETE",`/api/v1/tags/${encodeURIComponent(x.tagId)}`,void 0,x.company);if(x.json){L0(E);return}console.log(`Deleted tag: ${x.tagId}`)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}var Ne0=new Set(["admin","viewer","restricted"]);function Ve0(A){if(!A.email||A.email.trim()==="")throw new l("Email is required",400);if(!A.role||!Ne0.has(A.role))throw new l("--role must be admin, viewer, or restricted",400);return{email:A.email.trim(),role:A.role,...A.billingAccess===!0&&{canManageBilling:!0}}}function ve0(A){let x=A.user.name?`${A.user.name} <${A.user.email}>`:A.user.email;if(console.log(`- ${x} [${A.id}]`),console.log(` Kind: ${A.kind}`),console.log(` Role: ${A.role}`),console.log(` Status: ${A.status}`),console.log(` Billing access: ${A.canManageBilling?"yes":"no"}`),A.invitedAt)console.log(` Invited: ${dA(A.invitedAt)}`);if(A.expiresAt)console.log(` Expires: ${dA(A.expiresAt)}`);if(A.invitedBy)console.log(` Invited by: ${A.invitedBy.name??A.invitedBy.email}`)}async function JR(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let g=await Y0("GET","/api/v1/team",void 0,x.company);if(x.json){L0(g);return}console.log(`Team members (${g.members.length})`);for(let B of g.members)ve0(B);return}if(A==="invite"){let g=Ve0(x),B=await Y0("POST","/api/v1/team/invitations",g,x.company);if(x.json){L0(B);return}if(B.invitation){console.log(`Invitation sent to ${B.invitation.email}`),console.log(`ID: ${B.invitation.id}`),console.log(`Role: ${B.invitation.role}`),console.log(`Billing access: ${B.invitation.canManageBilling?"yes":"no"}`),console.log(`Status: ${B.invitation.status}`),console.log(`Expires: ${dA(B.invitation.expiresAt)}`);return}console.log(`Added team member: ${B.member?.email??g.email}`),console.log(`Role: ${B.member?.role??g.role}`),console.log(`Billing access: ${B.member?.canManageBilling?"yes":"no"}`);return}if(!x.invitationId)throw new l("Invitation ID is required",400);if(!await l9(`Cancel invitation ${x.invitationId}?`,x)){console.log("Aborted.");return}let E=await Y0("DELETE",`/api/v1/team/invitations/${encodeURIComponent(x.invitationId)}`,void 0,x.company);if(x.json){L0(E);return}console.log(`Cancelled invitation: ${x.invitationId}`)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function e10(A){if(A.length===0)return"none";return A.map((x)=>`${x.locale}:${x.status}`).join(", ")}function fR(A){return A&&A.length>0?A.join(", "):"None"}function ue0(A,x){if(A.name===void 0&&A.subject===void 0&&A.label===void 0&&x.html===void 0&&x.blocks===void 0)throw new l("Provide at least one of: --name, --subject, --label, --html, --html-file, --blocks-json, --blocks-file",400);return{name:A.name,subject:A.subject,html:x.html,blocks:x.blocks,labels:A.label}}function Te0(A,x){let E=A.subject?.trim();if(!E)throw new l("Localization subject is required",400);if(x.html===void 0&&x.blocks===void 0)throw new l("Provide localized content with --html, --html-file, --blocks-json, or --blocks-file",400);return{subject:E,previewText:A.previewText,html:x.html,blocks:x.blocks}}async function jD(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let D=new URLSearchParams;if(x.label)for(let X of x.label)D.append("label",X);let I=await Y0("GET",`/api/v1/templates${D.size>0?`?${D.toString()}`:""}`,void 0,x.company),J=SE({companyId:I.companyId}),K=I.templates.map((X)=>MF(X,{emailId:X.id},"email",I.companyId));if(x.json){L0({...I,templates:K,appUrls:J.urls});return}if(console.log(`Templates (${I.templates.length})`),I.emailLocalizationConfig)console.log(`Primary locale: ${I.emailLocalizationConfig.primaryLocale}`);for(let X of K)console.log(`- ${X.name} [${X.id}]`),console.log(` Subject: ${X.subject}`),console.log(` Labels: ${fR(X.labels)}`),Nx(" URL",X.url),console.log(` Localizations: ${e10(X.localizations)}`);return}let E=lQ({html:x.html,htmlFile:x.htmlFile,blocksJson:x.blocksJson,blocksFile:x.blocksFile});if(A==="create"){if(!x.name)throw new l("Template name is required",400);let D=x.prompt?.trim()||void 0;if([D,E.html,E.blocks].filter((W)=>W!==void 0).length!==1)throw new l("Provide exactly one of --prompt, --html/--html-file, or --blocks-json/--blocks-file",400);if(!D&&(x.style!==void 0||x.tone!==void 0))throw new l("--style and --tone require --prompt",400);if(!x.subject&&!D)throw new l("Template subject is required unless --prompt is provided",400);let J=await Y0("POST","/api/v1/templates",{name:x.name,subject:x.subject,previewText:x.previewText,prompt:D,style:x.style,tone:x.tone,html:E.html,blocks:E.blocks,labels:x.label},x.company),K=await CB(x.company),X=J.template?.id??J.templateId,M=K!==void 0&&X!==void 0?SE({companyId:K,emailId:X}):void 0;if(x.json){L0({...J,...J.template!==void 0&&M?.urls.email!==void 0&&{template:{...J.template,url:M.urls.email}},...M!==void 0&&{appUrls:M.urls}});return}console.log(`Created template: ${J.template?.name??x.name}`),console.log(`ID: ${J.template?.id??"Unknown"}`),Nx("URL",M?.urls.email),console.log(`Labels: ${fR(J.template?.labels)}`),console.log(`Subject: ${J.template?.subject??x.subject??"Unknown"}`);return}if(!x.id)throw new l("Template ID is required",400);if(A==="set-localization"){if(!x.locale)throw new l("Localization locale is required",400);let D=await Y0("PUT",`/api/v1/templates/${x.id}/localizations/${encodeURIComponent(x.locale)}`,Te0(x,E),x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,emailId:D.templateId}):void 0;if(x.json){L0({...D,...J!==void 0&&{appUrls:J.urls}});return}console.log(`Set ${D.localization.locale} localization for template ${D.templateId}`),console.log(`Status: ${D.localization.status}`),console.log(`Subject: ${D.localization.subject}`),Nx("URL",J?.urls.email);return}if(A==="sync-localizations"){let D=await Y0("POST",`/api/v1/templates/${x.id}/localizations/sync`,x.locales===void 0?{}:{locales:x.locales},x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,emailId:D.templateId}):void 0;if(x.json){L0({...D,...J!==void 0&&{appUrls:J.urls}});return}console.log(`Queued ${D.queuedVariantCount} localization${D.queuedVariantCount===1?"":"s"}: ${D.queuedLocales.join(", ")}`),Nx("URL",J?.urls.email);return}if(A==="update"){let D=await Y0("PUT",`/api/v1/templates/${x.id}`,ue0(x,E),x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,emailId:x.id}):void 0;if(x.json){L0({...D,...D.template!==void 0&&J?.urls.email!==void 0&&{template:{...D.template,url:J.urls.email}},...J!==void 0&&{appUrls:J.urls}});return}console.log(`Updated template: ${D.template?.name??x.id}`),console.log(`ID: ${D.template?.id??x.id}`),Nx("URL",J?.urls.email),console.log(`Labels: ${fR(D.template?.labels)}`),console.log(`Subject: ${D.template?.subject??"Unchanged"}`);return}if(A==="delete"){let D=await Y0("DELETE",`/api/v1/templates/${x.id}`,void 0,x.company);if(x.json){L0(D);return}console.log(D.message??`Deleted template: ${x.id}`);return}let g=await Y0("GET",`/api/v1/templates/${x.id}`,void 0,x.company),B=SE({companyId:g.template.companyId,emailId:x.id});if(x.json){L0({...g,template:{...g.template,url:B.urls.email},appUrls:B.urls});return}let Q=g.template;console.log(Q.name),console.log(`ID: ${Q.id}`),console.log(`Company: ${Q.companyId}`),Nx("URL",B.urls.email),console.log(`Subject: ${Q.subject}`),console.log(`Labels: ${fR(Q.labels)}`),console.log(`Preview: ${Q.previewText??"None"}`),console.log(`Blocks: ${Q.blocks.length}`),console.log(`Font: ${Q.fontFamily??"Default"}`),console.log(`Created: ${dA(Q.createdAt)}`),console.log(`Updated: ${dA(Q.updatedAt)}`),console.log(`Localizations: ${e10(Q.localizations)}`);for(let D of Q.localizations){let I=D.lastError?` | error: ${D.lastError}`:"";console.log(`- ${D.locale} [${D.status}] blocks=${D.blocks.length}${I}`)}}catch(E){YA(E instanceof l?E:E),process.exit(1)}}async function KR(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="create"){if(!x.name)throw new l("Transactional name is required",400);let B=lQ({html:x.html,htmlFile:x.htmlFile,blocksJson:x.blocksJson,blocksFile:x.blocksFile}),Q=x.prompt?.trim()||void 0;if([Q,B.html,B.blocks].filter((X)=>X!==void 0).length!==1)throw new l("Provide exactly one of --prompt, --html/--html-file, or --blocks-json/--blocks-file",400);if(!Q&&!x.subject)throw new l("Transactional subject is required unless --prompt is provided",400);if(!Q&&(x.style!==void 0||x.tone!==void 0))throw new l("--style and --tone require --prompt",400);let I=await Y0("POST","/api/v1/transactional",{name:x.name,...x.slug!==void 0&&{slug:x.slug},...x.subject!==void 0&&{subject:x.subject},...x.previewText!==void 0&&{previewText:x.previewText},...Q!==void 0&&{prompt:Q},...x.style!==void 0&&{style:x.style},...x.tone!==void 0&&{tone:x.tone},...B.html!==void 0&&{html:B.html},...B.blocks!==void 0&&{blocks:B.blocks},...x.enabled!==void 0&&{enabled:x.enabled}},x.company),J=await CB(x.company),K=J?SE({companyId:J,transactionalId:I.transactional.id}).urls.transactionalEmail:void 0;if(x.json){L0({...I,transactional:{...I.transactional,url:K},...K&&{appUrls:{transactionalEmail:K}}});return}console.log(`Created transactional template: ${I.transactional.name}`),console.log(`ID: ${I.transactional.id}`),console.log(`Slug: ${I.transactional.slug}`),console.log(`Enabled: ${I.transactional.enabled?"yes":"no"}`),Nx("URL",K);return}if(A==="list"){let B=await Y0("GET","/api/v1/transactional",void 0,x.company);if(x.json){L0(B);return}console.log(`Transactional templates (${B.transactional.length})`);for(let Q of B.transactional)console.log(`- ${Q.name} [${Q.slug}] ${Q.enabled?"enabled":"disabled"}`);return}if(!x.slug)throw new l("Transactional template slug is required",400);let E=await Y0("GET",`/api/v1/transactional/${encodeURIComponent(x.slug)}`,void 0,x.company);if(x.json){L0(E);return}let g=E.transactional;if(console.log(g.name),console.log(`ID: ${g.id}`),console.log(`Slug: ${g.slug}`),console.log(`Enabled: ${g.enabled?"yes":"no"}`),g.subject)console.log(`Subject: ${g.subject}`);if((g.variables?.length??0)>0)console.log(`Variables: ${g.variables?.join(", ")}`)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Eg0(A){if(A===void 0||A.length===0)return;let x=new Set(Yh);for(let E of A)if(!x.has(E))throw new l(`Invalid --event value '${E}'. Valid events: ${Yh.join(", ")}`,400);return A}function he0(A){if(!A.name||A.name.trim()==="")throw new l("--name is required",400);if(!A.url||A.url.trim()==="")throw new l("--url is required",400);let x=Eg0(A.event);return{name:A.name,url:A.url,...x!==void 0&&{events:x}}}function be0(A){if(A.enable===!0&&A.disable===!0)throw new l("Use either --enable or --disable, not both",400);let x=Eg0(A.event),E=A.enable===!0?"enabled":A.disable===!0?"disabled":void 0,g={...A.name!==void 0&&{name:A.name},...A.url!==void 0&&{url:A.url},...x!==void 0&&{events:x},...E!==void 0&&{status:E}};if(Object.keys(g).length===0)throw new l("Provide at least one of: --name, --url, --event, --enable, --disable",400);return g}function Ag0(A){if(console.log(`- ${A.name} [${A.id}]`),console.log(` URL: ${A.url}`),console.log(` Status: ${A.status}`),console.log(` Events: ${A.events.join(", ")||"None"}`),A.consecutiveFailures>0)console.log(` Consecutive failures: ${A.consecutiveFailures}`);if(A.lastSuccessAt)console.log(` Last success: ${dA(A.lastSuccessAt)}`);if(A.lastFailureAt)console.log(` Last failure: ${dA(A.lastFailureAt)}`);console.log(` Created: ${dA(A.createdAt)}`)}function xg0(A){if(console.log(`- ${A.id} [${A.status}]`),console.log(` Event: ${A.eventType} (${A.eventId})`),console.log(` Attempts: ${A.attempts}`),A.lastStatusCode!==null)console.log(` Last status code: ${A.lastStatusCode}`);if(A.lastError)console.log(` Last error: ${A.lastError}`);if(A.lastAttemptAt)console.log(` Last attempt: ${dA(A.lastAttemptAt)}`);if(A.nextAttemptAt)console.log(` Next attempt: ${dA(A.nextAttemptAt)}`);console.log(` Created: ${dA(A.createdAt)}`)}async function ND(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let B=await Y0("GET","/api/v1/webhooks",void 0,x.company);if(x.json){L0(B);return}console.log(`Webhooks (${B.webhooks.length})`);for(let Q of B.webhooks)Ag0(Q);return}if(A==="create"){let B=await Y0("POST","/api/v1/webhooks",he0(x),x.company);if(x.json){L0(B);return}let Q=B.webhook;console.log(`Created webhook: ${Q?.name??x.name}`),console.log(`ID: ${Q?.id??"Unknown"}`),console.log(`URL: ${Q?.url??x.url}`),console.log(`Status: ${Q?.status??"enabled"}`),console.log(`Events: ${Q?.events.join(", ")??"None"}`),console.log(""),console.log("Signing secret (shown only once - store it somewhere safe now):"),console.log(` ${Q?.signingSecret??"Unavailable"}`);return}if(!x.id)throw new l("Webhook ID is required",400);let E=`/api/v1/webhooks/${encodeURIComponent(x.id)}`;if(A==="update"){let B=await Y0("PATCH",E,be0(x),x.company);if(x.json){L0(B);return}if(console.log(`Updated webhook: ${B.webhook?.name??x.id}`),B.webhook)Ag0(B.webhook);return}if(A==="delete"){if(!await l9(`Permanently delete webhook ${x.id} and its delivery history?`,x)){console.log("Aborted.");return}let B=await Y0("DELETE",E,void 0,x.company);if(x.json){L0(B);return}console.log(`Deleted webhook: ${x.id}`);return}if(A==="test"){let B=await Y0("POST",`${E}/test`,void 0,x.company);if(x.json){L0(B);return}console.log(`Queued test event for webhook: ${x.id}`),console.log(`Event ID: ${B.eventId}`),console.log(`Queued deliveries: ${B.queuedDeliveries}`);return}if(A==="deliveries"){let B=M8(x.limit,"--limit");if(B!==void 0&&(B<1||B>100))throw new l("--limit must be an integer between 1 and 100",400);let Q=await Y0("GET",`${E}/deliveries${B!==void 0?`?limit=${B}`:""}`,void 0,x.company);if(x.json){L0(Q);return}console.log(`Deliveries (${Q.deliveries.length})`);for(let D of Q.deliveries)xg0(D);return}if(!x.deliveryId)throw new l("Delivery ID is required",400);let g=await Y0("POST",`${E}/deliveries/${encodeURIComponent(x.deliveryId)}/replay`,void 0,x.company);if(x.json){L0(g);return}console.log(`Replay queued for delivery: ${x.deliveryId}`),xg0(g.delivery)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}async function Zy(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let D=await Y0("GET","/api/v1/websites",void 0,x.company);if(x.json){L0(D);return}console.log(`Websites (${D.websites.length})`);for(let I of D.websites)console.log(`- ${I.domain}`),console.log(` Status: ${I.status}`),console.log(` Created: ${dA(I.createdAt)}`);return}if(A==="guide"){let D=await Y0("POST","/api/v1/integration-guide",{framework:x.framework,use_case:x.useCase});if(x.json){L0(D);return}if(console.log(`Integration guide: ${D.framework} / ${D.use_case}`),console.log(""),console.log(D.code),D.tip)console.log(""),console.log(`Tip: ${D.tip}`);return}if(!x.domain)throw new l("Domain is required",400);let E=A==="add"?"POST":"GET",g=A==="add"?"/api/v1/websites":`/api/v1/websites/${encodeURIComponent(x.domain)}`,B=A==="add"?{domain:x.domain}:void 0,Q=await Y0(E,g,B,x.company);if(x.json){L0(Q);return}if(console.log(Q.website.domain),console.log(`Status: ${Q.website.status}`),Q.website.createdAt)console.log(`Created: ${dA(Q.website.createdAt)}`);if(Q.website.message)console.log(Q.website.message);if(Q.website.dnsRecords!==void 0)console.log("DNS Records:"),L0(Q.website.dnsRecords)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}async function Bg0(){if(!await Cx()){YA(Kx()),process.exit(1);return}let A=NX();console.log(`Email: ${A.userEmail??"Unknown"}`),console.log(`User ID: ${A.userId??"Unknown"}`),console.log(""),console.log("A local API key is available."),console.log("Use `sequenzy account` to verify the active API key, permissions, and available companies.")}async function gg0(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="preferences-token"){if(!x.email)throw new l("Email is required",400);let E=await Y0("POST","/api/v1/widgets/preferences/token",{email:x.email},x.company);if(x.json){L0(E);return}console.log(E.token)}}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Qg0(A,x){if(x.length===0)return"";return`
|
|
607
|
+
5. Select your events and click **Save**`,events:[{key:"subscription_created",label:"Subscription Created",description:"When a new subscription starts",suggestedEventName:"subscription-created",samplePayload:{event_type:"subscription.created",data:{id:"sub_01h",status:"active",customer_id:"ctm_01h",custom_data:{},items:[{price:{unit_price:{amount:"4900"}}}],customer:{email:"john@example.com",name:"John Doe"}}},defaultFieldMapping:{email:"data.customer.email",firstName:"data.customer.name"},suggestedProperties:[{name:"subscriptionId",path:"data.id",description:"Paddle subscription ID"}]},{key:"subscription_canceled",label:"Subscription Canceled",description:"When a subscription is canceled",suggestedEventName:"subscription-canceled",samplePayload:{event_type:"subscription.canceled",data:{id:"sub_01h",status:"canceled",customer:{email:"john@example.com",name:"John Doe"},canceled_at:"2024-02-15T00:00:00Z"}},defaultFieldMapping:{email:"data.customer.email",firstName:"data.customer.name"}}]},xe0=[kt0,it0,mt0,ct0,lt0,rt0,pt0,Ae0,et0,_t0,nt0,dt0,at0,st0,ot0,tt0];var ldA=xe0.map((A)=>A.slug);var Be0=new Set(["skip","merge","overwrite"]),ge0=new Set(["default","confirmed","double_opt_in"]),Qe0=new Set(["active","unsubscribed","bounced"]);function p10(A){return typeof A==="object"&&A!==null&&!Array.isArray(A)}function De0(A){let x=A.trim();if(/^(true|false)$/i.test(x))return x.toLowerCase()==="true";if(/^-?(?:\d+|\d*\.\d+)$/.test(x)){let E=Number(x);if(!/^-?0\d/.test(x)&&Number.isFinite(E)&&Math.abs(E)<=Number.MAX_SAFE_INTEGER)return E}return x}function _10(A){return A.trim().toLowerCase().replace(/[^a-z0-9]/g,"")}function Wk(A,x){let E=new Set(x.map(_10)),g=A.findIndex((B)=>E.has(_10(B)));return g===-1?void 0:g}function hg(A,x){return x===void 0?"":A[x]?.trim()??""}function Ce0(A){let x=Array.isArray(A)?A:p10(A)&&Array.isArray(A.subscribers)?A.subscribers:null;if(!x||x.length===0)throw new l("Subscriber import JSON must be a non-empty array or an object with a subscribers array",400);return x.map((E,g)=>{if(!p10(E)||typeof E.email!=="string")throw new l(`Subscriber import record ${g+1} must include an email string`,400);return E})}function Fe0(A){let x=A.trim();if(!x)throw new l("Subscriber import file is empty",400);if(x.startsWith("[")||x.startsWith("{"))try{return Ce0(JSON.parse(x))}catch(R){if(R instanceof l)throw R;throw new l(`Invalid subscriber import JSON: ${R instanceof Error?R.message:"Unknown error"}`,400)}let{headers:E,data:g}=De(A),B=Yw(E,"email");if(B===void 0)throw new l("CSV must include an email column",400);let Q=Yw(E,"externalId"),D=Yw(E,"firstName"),I=Yw(E,"lastName"),J=Yw(E,"fullName"),K=Wk(E,["phone","phone number","mobile"]),X=Wk(E,["status","email status"]),M=Wk(E,["tags","tag"]),W=new Set([B,Q,D,I,J,K,X,M].filter((R)=>R!==void 0));return g.map((R,O)=>{let u=hg(R,B);if(!u)throw new l(`CSV row ${O+2} is missing email`,400);let n=Xv(hg(R,J)),Q0=hg(R,D)||n.firstName,M0=hg(R,I)||n.lastName,C0=hg(R,X).toLowerCase();if(C0&&!Qe0.has(C0))throw new l(`CSV row ${O+2} has invalid status '${C0}'`,400);let H0={};E.forEach((ZA,O0)=>{let XA=hg(R,O0);if(!W.has(O0)&&ZA.trim()&&XA)H0[ZA.trim()]=De0(XA)});let K0=hg(R,M).split(/[|;,]/).map((ZA)=>ZA.trim()).filter(Boolean),n0=hg(R,Q),V0=hg(R,K);return{email:u,...n0&&{externalId:n0},...Q0&&{firstName:Q0},...M0&&{lastName:M0},...V0&&{phone:V0},...C0&&{status:C0},...K0.length>0&&{tags:K0},...Object.keys(H0).length>0&&{customAttributes:H0}}})}function Ie0(A){let x=A.duplicateStrategy??"skip";if(!Be0.has(x))throw new l("--duplicate-strategy must be one of: skip, merge, overwrite",400);let E=A.optInMode??"default";if(!ge0.has(E))throw new l("--opt-in-mode must be one of: default, confirmed, double_opt_in",400);if(A.defaultPhoneCountry!==void 0&&!/^[a-z]{2}$/i.test(A.defaultPhoneCountry))throw new l("--default-phone-country must be a two-letter code",400)}async function n10(A){if(Ie0(A),A.recordsJson&&A.file)throw new l("Provide either the positional CSV/JSON file or --records-json, not both",400);let x=A.file?q4(void 0,A.file,"subscriber import"):A.recordsJson;if(x===void 0)throw new l("Provide a CSV/JSON file or --records-json",400);let E=Fe0(x),g=Array.isArray(A.list)?A.list:A.list?[A.list]:[],B=await Y0("POST","/api/v1/subscribers/imports",{subscribers:E,duplicateStrategy:A.duplicateStrategy??"skip",fileName:A.fileName??(A.file?Ee0(A.file):"CLI import"),...g.length>0&&{listIds:g},enrollInSequences:A.enrollSequences===!0,...A.defaultPhoneCountry&&{defaultPhoneCountry:A.defaultPhoneCountry.toUpperCase()},...A.smsConsent!==void 0&&{smsConsent:A.smsConsent},optInMode:A.optInMode??"default"},A.company);if(A.json){L0(B);return}console.log(`Queued subscriber import: ${B.import.id}`),console.log(`Rows: ${B.import.totalRows}`),console.log(`Status: ${B.import.status}`),console.log(`Check progress: sequenzy subscribers import-status ${B.import.id}`)}async function l10(A){let x=A.importId?.trim();if(!x)throw new l("Provide an import ID",400);let E=await Y0("GET",`/api/v1/subscribers/imports/${encodeURIComponent(x)}`,void 0,A.company);if(A.json){L0(E);return}let g=E.import;if(console.log(`Subscriber import: ${g.id}`),console.log(`Status: ${g.status}`),console.log(`Processed: ${g.processedCount} of ${g.totalRows}`),console.log(`Added: ${g.addedCount}`),console.log(`Updated: ${g.updatedCount}`),console.log(`Skipped: ${g.skippedCount}`),console.log(`Failed: ${g.failedCount}`),g.status==="completed"&&g.failedCount>0)console.log("Completed with row failures; inspect --json for reason counts.")}function we0(A){if(typeof A!=="object"||A===null)return[];let x=A.sideEffectFailures;return Array.isArray(x)?x.filter((E)=>typeof E==="string"):[]}function Rk(A){if(!A)return[];return Array.isArray(A)?A:[A]}function d10(A){if(!A)return[];return Array.isArray(A)?A:[A]}function wR(A){let x={};for(let E of A??[]){let[g,...B]=E.split("="),Q=B.join("=");if(g&&Q)x[g]=Q}return Object.keys(x).length>0?x:void 0}function Je0(A){let x=A.email?.trim()||void 0,E=A.externalId?.trim()||void 0;return{...x?{email:x}:{},...E?{externalId:E}:{}}}function lF(A){let x=Je0(A);if(!x.email&&!x.externalId)throw Error("Provide an email or --external-id.");return x}function Mk(A,x){let E=new URLSearchParams;if(x?.includeBots)E.set("includeMachineEngagement","true");let g=E.toString(),B=g?`?${g}`:"";if(A.email)return`/api/v1/subscribers/${encodeURIComponent(A.email)}${B}`;return E.set("externalId",String(A.externalId)),`/api/v1/subscribers/external?${E.toString()}`}function a10(A){if(A.email)return`/api/v1/subscribers/${encodeURIComponent(A.email)}/notes`;let x=new URLSearchParams;return x.set("externalId",String(A.externalId)),`/api/v1/subscribers/external/notes?${x.toString()}`}function fe0(A){let x=new URLSearchParams;if(A.segment)x.set("segmentId",A.segment);let E=Rk(A.tag);if(E.length>0)x.set("tags",E.join(","));let g=d10(A.list);if(g.length>0&&g[0])x.set("list",g[0]);return x.set("page",String(A.page)),x.set("limit",String(A.pageSize)),x}async function Ke0(A){let x=M8(A.limit,"--limit"),E=Math.min(100,Math.max(1,x??100)),g=[],B=1,Q=0,D=0,I=0;while(!0){let K=fe0({segment:A.segment,tag:A.tag,list:A.list,page:B,pageSize:E}),X=await Y0("GET",`/api/v1/subscribers?${K.toString()}`,void 0,A.company);Q=X.pagination?.total??X.subscribers.length,D=X.pagination?.totalPages??1,I+=1,g.push(...X.subscribers??[]);let M=x!==void 0&&g.length>=x,W=X.pagination?B>=X.pagination.totalPages:(X.subscribers??[]).length<E;if(M||W)break;B+=1}let J=x!==void 0?g.slice(0,x):g;return{success:!0,subscribers:J,pagination:{page:1,limit:E,total:Q,totalPages:D,fetchedPages:I},returned:J.length,truncated:x!==void 0&&Q>0&&J.length<Q}}function s10(A){let x=[A.firstName,A.lastName].map((E)=>E?.trim()).filter((E)=>!!E);return x.length>0?x.join(" "):null}function $e0(A){let x=A.machine===!0?` [bot:${A.engagementQuality??"machine"}]`:"",E=`${dA(A.eventTime)} ${A.eventType}${x}`;if(A.eventType==="custom"){let g=A.eventName??"unknown",B=A.properties&&Object.keys(A.properties).length>0?` ${JSON.stringify(A.properties)}`:"";return`${E} ${g}${B}`}if(A.clickedUrl)return`${E} ${A.clickedUrl}`;if(A.bounceType)return`${E} ${A.bounceType}`;if(A.campaignId)return`${E} campaign:${A.campaignId}`;return E}function He0(A){if(A.subscribers.length===0){console.log("No subscribers found");return}console.log(`Subscribers (${A.returned})`),console.log(A.truncated?`Showing ${A.returned} of ${A.pagination.total} matching subscribers.`:`Fetched ${A.returned} matching subscribers across ${A.pagination.fetchedPages} page(s).`);for(let x of A.subscribers){if(console.log(`- ${x.email} [${x.status}]`),x.externalId)console.log(` External ID: ${x.externalId}`);let E=s10(x);if(E)console.log(` Name: ${E}`);if(x.tags.length>0)console.log(` Tags: ${x.tags.join(", ")}`);if(x.emailProvider)console.log(` Email provider: ${x.emailProvider}`);console.log(` Created: ${dA(x.createdAt)}`)}}function o10(A){if(console.log(`Notes (${A.length})`),A.length===0){console.log(" None");return}for(let x of A){let E=x.author?.name??x.author?.email??x.authorId??"Unknown";console.log(` - ${x.id} by ${E} at ${dA(x.createdAt)}`);for(let g of x.body.split(`
|
|
608
|
+
`))console.log(` ${g}`)}}function ye0(A){if(console.log(`Subscriber: ${A.email}`),console.log(`Status: ${A.status}`),A.externalId)console.log(`External ID: ${A.externalId}`);let x=s10(A);if(x)console.log(`Name: ${x}`);if(console.log(`ID: ${A.id}`),console.log(`Created: ${dA(A.createdAt)}`),console.log(`Updated: ${dA(A.updatedAt)}`),console.log(`Email provider: ${A.emailProvider??"None"}`),console.log(`Tags: ${A.tags.length>0?A.tags.join(", "):"None"}`),o10(A.notes??[]),console.log("Lists:"),(A.lists?.length??0)===0)console.log(" None");else for(let E of A.lists??[])console.log(` - ${E.name}${E.unsubscribedAt?" [inactive]":" [active]"}`),console.log(` Joined: ${dA(E.subscribedAt)}${E.unsubscribedAt?` | Unsubscribed: ${dA(E.unsubscribedAt)}`:""}`);if(console.log("Sequence Enrollments:"),(A.sequenceEnrollments?.length??0)===0)console.log(" None");else for(let E of A.sequenceEnrollments??[])if(console.log(` - ${E.sequenceName} [${E.enrollmentStatus}]`),console.log(` Sequence ID: ${E.sequenceId} | Status: ${E.sequenceStatus}`),console.log(` Current node: ${E.currentNodeLabel??E.currentNodeType??"Unknown"}`),console.log(` Entered: ${dA(E.enteredAt)} | Updated: ${dA(E.updatedAt)}`),E.scheduledFor)console.log(` Scheduled: ${dA(E.scheduledFor)}`);if(console.log("Email Stats:"),!A.emailStats)console.log(" None");else console.log(` Sent ${A.emailStats.sent}, delivered ${A.emailStats.delivered}, opened ${A.emailStats.opened}, clicked ${A.emailStats.clicked}, bounced ${A.emailStats.bounced}, unsubscribed ${A.emailStats.unsubscribed}, complained ${A.emailStats.complained}`);if(console.log("Recent Activity:"),(A.activity?.length??0)===0)console.log(" None");else for(let E of A.activity??[])console.log(` - ${$e0(E)}`);if(console.log("Custom Attributes:"),!A.customAttributes||Object.keys(A.customAttributes).length===0)console.log(" None");else console.log(JSON.stringify(A.customAttributes,null,2))}async function qe0(A){let x=await Ke0(A);if(A.json){L0(x);return}He0(x)}async function Ye0(A){let x=lF(A),E=d10(A.list),g=await Y0("POST","/api/v1/subscribers",{...x,firstName:A.firstName,lastName:A.lastName,tags:Rk(A.tag),...A.noLists?{lists:[]}:E.length>0?{lists:E}:{},...A.skipSequences?{enrollInSequences:!1}:{},customAttributes:wR(A.attr)},A.company);if(A.json){L0(g);return}console.log(`Added subscriber: ${x.email??`external:${x.externalId}`}`)}async function Xe0(A){let x=lF(A),E=Rk(A.tag),g=wR(A.attr);if(!(A.status!==void 0||A.firstName!==void 0||A.lastName!==void 0||E.length>0||g!==void 0))throw Error("Provide at least one of --status, --first-name, --last-name, --tag, or --attr.");let Q=await Y0("PATCH",Mk(x),{...A.status!==void 0&&{status:A.status},...A.firstName!==void 0&&{firstName:A.firstName},...A.lastName!==void 0&&{lastName:A.lastName},...E.length>0&&{tags:E},...g!==void 0&&{customAttributes:g},...A.merge&&g!==void 0?{customAttributesStrategy:"merge"}:{}},A.company);if(A.json){L0(Q);return}console.log(`Updated subscriber: ${x.email??`external:${x.externalId}`}`)}async function Ue0(A){let x=lF(A),E=await Y0("GET",Mk(x,{includeBots:A.includeBots}),void 0,A.company);if(A.json){L0(E);return}ye0(E.subscriber)}async function Ze0(A){let x=lF(A),E=await Y0("GET",a10(x),void 0,A.company);if(A.json){L0(E);return}o10(E.notes)}async function Ge0(A){let x=lF(A),E=A.body?.trim();if(!E)throw Error("--body is required.");let g=await Y0("POST",a10(x),{body:E},A.company);if(A.json){L0(g);return}console.log(`Added note: ${g.note.id}`)}async function We0(A){let x=A.noteId?.trim();if(!x)throw Error("Provide a note ID.");let E=await Y0("DELETE",`/api/v1/subscribers/notes/${encodeURIComponent(x)}`,void 0,A.company);if(A.json){L0(E);return}console.log(`Deleted note: ${x}`)}async function Re0(A){let x=lF(A),E=Mk(x),g=x.email??`external:${x.externalId}`;if(A.hard){let Q=await Y0("DELETE",E,void 0,A.company);if(A.json){L0(Q);return}console.log(`Deleted subscriber: ${g}`);return}let B=await Y0("PATCH",E,{status:"unsubscribed"},A.company);if(A.json){L0(B);return}console.log(`Unsubscribed: ${g}`)}async function Me0(A){let x=lF(A),E=A.name?.trim();if(!E)throw Error("--name is required.");let g=await Y0("POST","/api/v1/subscribers/events",{...x,event:E,properties:wR(A.property),customAttributes:wR(A.attr)},A.company);if(A.json){L0(g);return}let B=we0(g);if(B.length>0){console.log(`Event recorded with side-effect failures: ${B.join(", ")}`);return}console.log(`Triggered event: ${E} for ${x.email??`external:${x.externalId}`}`)}async function H7(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{switch(A){case"list":await qe0(x);return;case"add":await Ye0(x);return;case"update":await Xe0(x);return;case"get":await Ue0(x);return;case"notes:list":await Ze0(x);return;case"notes:add":await Ge0(x);return;case"notes:delete":await We0(x);return;case"import":await n10(x);return;case"import:get":await l10(x);return;case"event":await Me0(x);return;case"remove":await Re0(x);return}}catch(E){let g=E instanceof l?E:new l(E instanceof Error?E.message:"Unknown error",500);YA(g),process.exit(1)}}function ze0(A,x){let E=new URLSearchParams;if(x)E.set("region",x);return`/api/v1/suppressions/${encodeURIComponent(A)}${E.size>0?`?${E}`:""}`}function Se0(A){let x=[`Recipient: ${A.email}`,`Suppressed: ${A.suppressed?"Yes":"No"}`,`Associated with company: ${A.knownRecipient?"Yes":"No"}`,`Local suppression: ${A.local.suppressed?`${A.local.reason??"unknown"} (${A.local.source??"unknown source"})`:"None"}`,`SES regions checked: ${A.ses.regionsChecked.join(", ")}`];if(A.ses.entries.length===0)x.push("SES suppression: None");else for(let E of A.ses.entries)x.push(`SES suppression: ${E.reason} in ${E.region} (updated ${dA(E.lastUpdateTime)})`);return x}async function zk(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(!x.email)throw new l("Recipient email is required",400);let E=ze0(x.email,x.region);if(A==="get"){let B=await Y0("GET",E,void 0,x.company);if(x.json){L0(B);return}for(let Q of Se0(B.suppression))console.log(Q);return}if(!await l9(`Remove stale bounce suppression for ${x.email}? Complaint and unsubscribe protections will be kept.`,x)){console.log("Aborted.");return}let g=await Y0("DELETE",E,void 0,x.company);if(x.json){L0(g);return}if(console.log(g.removed?`Removed stale bounce suppression for ${g.email}.`:`No removable bounce suppression found for ${g.email}.`),g.removedSesRegions.length>0)console.log(`SES regions cleared: ${g.removedSesRegions.join(", ")}`);if(g.reactivatedSubscriberIds.length>0)console.log(`Reactivated subscribers: ${g.reactivatedSubscriberIds.length}`);if(g.remainingSuppression.suppressed)console.log("The recipient remains suppressed by a protected complaint or another suppression source.")}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Le0(A){if(A.reset){if(A.rulesJson!==void 0||A.rulesFile!==void 0)throw new l("--reset cannot be combined with --rules",400);return{syncRules:null}}let x=gE(A.rulesJson,A.rulesFile,"rules");if(x===void 0)throw new l("Provide --rules-json, --rules-file, or --reset",400);if(!Array.isArray(x))throw new l("rules JSON must be an array of sync rules",400);return{syncRules:x}}function Oe0(A){let x=[],E=A.conditions;if(!E)return x;if(E.requiresTags?.length)x.push(` Requires tags: ${E.requiresTags.join(", ")}`);if(E.requiresNotTags?.length)x.push(` Excluded tags: ${E.requiresNotTags.join(", ")}`);let g=E.purchasedProduct;if(g){let B=[];if(g.tags?.length)B.push(`tags ${g.tags.join("|")}`);if(g.collectionIds?.length)B.push(`collections ${g.collectionIds.join("|")}`);if(g.productTypes?.length)B.push(`types ${g.productTypes.join("|")}`);if(g.vendors?.length)B.push(`vendors ${g.vendors.join("|")}`);if(B.length>0)x.push(` Product match: ${B.join("; ")}`)}return x}function t10(A){console.log(`Sync rules (${A.syncRules.length})${A.isDefault?" - platform defaults":""}`);for(let x of A.syncRules){let E=x.actions.addTags.length?`+${x.actions.addTags.join(", +")}`:"",g=x.actions.removeTags.length?`-${x.actions.removeTags.join(", -")}`:"",B=[E,g].filter(Boolean).join(" ")||"(no-op)";console.log(`- ${x.triggerEvent}: ${B}`);for(let Q of Oe0(x))console.log(Q)}}async function Sk(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="get"){let B=await Y0("GET","/api/v1/sync-rules",void 0,x.company);if(x.json){L0(B);return}t10(B);return}let E=Le0(x),g=await Y0("PUT","/api/v1/sync-rules",E,x.company);if(x.json){L0(g);return}if(g.message)console.log(g.message);t10(g)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Pe0(A){let x=A.isSystem?" [system]":"";console.log(`- ${A.name} [${A.id}]${x}`),console.log(` Color: ${A.color??"Default"}`)}function je0(A){if(!A.name||A.name.trim()==="")throw new l("Tag name is required",400);return{name:A.name,...A.color!==void 0&&{color:A.color}}}async function yJ(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let g=await Y0("GET","/api/v1/tags",void 0,x.company);if(x.json){L0(g);return}console.log(`Tags (${g.tags.length})`);for(let B of g.tags)Pe0(B);return}if(A==="create"){let g=je0(x),B=await Y0("POST","/api/v1/tags",g,x.company);if(x.json){L0(B);return}if(console.log(`Created tag: ${B.tag?.name??g.name}`),B.tag)console.log(`ID: ${B.tag.id}`),console.log(`Color: ${B.tag.color??"Default"}`);return}if(!x.tagId)throw new l("Tag ID is required",400);if(A==="update"){if(!x.color||x.color.trim()==="")throw new l("--color is required",400);let g=await Y0("PATCH",`/api/v1/tags/${encodeURIComponent(x.tagId)}`,{color:x.color},x.company);if(x.json){L0(g);return}if(console.log(`Updated tag: ${g.tag?.name??x.tagId}`),g.tag)console.log(`ID: ${g.tag.id}`),console.log(`Color: ${g.tag.color??"Default"}`);return}if(!await l9(`Delete tag ${x.tagId}? It will be removed from all subscribers.`,x)){console.log("Aborted.");return}let E=await Y0("DELETE",`/api/v1/tags/${encodeURIComponent(x.tagId)}`,void 0,x.company);if(x.json){L0(E);return}console.log(`Deleted tag: ${x.tagId}`)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}var Ne0=new Set(["admin","viewer","restricted"]);function Ve0(A){if(!A.email||A.email.trim()==="")throw new l("Email is required",400);if(!A.role||!Ne0.has(A.role))throw new l("--role must be admin, viewer, or restricted",400);return{email:A.email.trim(),role:A.role,...A.billingAccess===!0&&{canManageBilling:!0}}}function ve0(A){let x=A.user.name?`${A.user.name} <${A.user.email}>`:A.user.email;if(console.log(`- ${x} [${A.id}]`),console.log(` Kind: ${A.kind}`),console.log(` Role: ${A.role}`),console.log(` Status: ${A.status}`),console.log(` Billing access: ${A.canManageBilling?"yes":"no"}`),A.invitedAt)console.log(` Invited: ${dA(A.invitedAt)}`);if(A.expiresAt)console.log(` Expires: ${dA(A.expiresAt)}`);if(A.invitedBy)console.log(` Invited by: ${A.invitedBy.name??A.invitedBy.email}`)}async function JR(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let g=await Y0("GET","/api/v1/team",void 0,x.company);if(x.json){L0(g);return}console.log(`Team members (${g.members.length})`);for(let B of g.members)ve0(B);return}if(A==="invite"){let g=Ve0(x),B=await Y0("POST","/api/v1/team/invitations",g,x.company);if(x.json){L0(B);return}if(B.invitation){console.log(`Invitation sent to ${B.invitation.email}`),console.log(`ID: ${B.invitation.id}`),console.log(`Role: ${B.invitation.role}`),console.log(`Billing access: ${B.invitation.canManageBilling?"yes":"no"}`),console.log(`Status: ${B.invitation.status}`),console.log(`Expires: ${dA(B.invitation.expiresAt)}`);return}console.log(`Added team member: ${B.member?.email??g.email}`),console.log(`Role: ${B.member?.role??g.role}`),console.log(`Billing access: ${B.member?.canManageBilling?"yes":"no"}`);return}if(!x.invitationId)throw new l("Invitation ID is required",400);if(!await l9(`Cancel invitation ${x.invitationId}?`,x)){console.log("Aborted.");return}let E=await Y0("DELETE",`/api/v1/team/invitations/${encodeURIComponent(x.invitationId)}`,void 0,x.company);if(x.json){L0(E);return}console.log(`Cancelled invitation: ${x.invitationId}`)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function e10(A){if(A.length===0)return"none";return A.map((x)=>`${x.locale}:${x.status}`).join(", ")}function fR(A){return A&&A.length>0?A.join(", "):"None"}function ue0(A,x){if(A.name===void 0&&A.subject===void 0&&A.previewText===void 0&&A.label===void 0&&x.html===void 0&&x.blocks===void 0)throw new l("Provide at least one of: --name, --subject, --preview-text, --label, --html, --html-file, --blocks-json, --blocks-file",400);return{name:A.name,subject:A.subject,previewText:A.previewText,html:x.html,blocks:x.blocks,labels:A.label}}function Te0(A,x){let E=A.subject?.trim();if(!E)throw new l("Localization subject is required",400);if(x.html===void 0&&x.blocks===void 0)throw new l("Provide localized content with --html, --html-file, --blocks-json, or --blocks-file",400);return{subject:E,previewText:A.previewText,html:x.html,blocks:x.blocks}}async function jD(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let D=new URLSearchParams;if(x.label)for(let X of x.label)D.append("label",X);let I=await Y0("GET",`/api/v1/templates${D.size>0?`?${D.toString()}`:""}`,void 0,x.company),J=SE({companyId:I.companyId}),K=I.templates.map((X)=>MF(X,{emailId:X.id},"email",I.companyId));if(x.json){L0({...I,templates:K,appUrls:J.urls});return}if(console.log(`Templates (${I.templates.length})`),I.emailLocalizationConfig)console.log(`Primary locale: ${I.emailLocalizationConfig.primaryLocale}`);for(let X of K)console.log(`- ${X.name} [${X.id}]`),console.log(` Subject: ${X.subject}`),console.log(` Labels: ${fR(X.labels)}`),Nx(" URL",X.url),console.log(` Localizations: ${e10(X.localizations)}`);return}let E=lQ({html:x.html,htmlFile:x.htmlFile,blocksJson:x.blocksJson,blocksFile:x.blocksFile});if(A==="create"){if(!x.name)throw new l("Template name is required",400);let D=x.prompt?.trim()||void 0;if([D,E.html,E.blocks].filter((W)=>W!==void 0).length!==1)throw new l("Provide exactly one of --prompt, --html/--html-file, or --blocks-json/--blocks-file",400);if(!D&&(x.style!==void 0||x.tone!==void 0))throw new l("--style and --tone require --prompt",400);if(!x.subject&&!D)throw new l("Template subject is required unless --prompt is provided",400);let J=await Y0("POST","/api/v1/templates",{name:x.name,subject:x.subject,previewText:x.previewText,prompt:D,style:x.style,tone:x.tone,html:E.html,blocks:E.blocks,labels:x.label},x.company),K=await CB(x.company),X=J.template?.id??J.templateId,M=K!==void 0&&X!==void 0?SE({companyId:K,emailId:X}):void 0;if(x.json){L0({...J,...J.template!==void 0&&M?.urls.email!==void 0&&{template:{...J.template,url:M.urls.email}},...M!==void 0&&{appUrls:M.urls}});return}console.log(`Created template: ${J.template?.name??x.name}`),console.log(`ID: ${J.template?.id??"Unknown"}`),Nx("URL",M?.urls.email),console.log(`Labels: ${fR(J.template?.labels)}`),console.log(`Subject: ${J.template?.subject??x.subject??"Unknown"}`);return}if(!x.id)throw new l("Template ID is required",400);if(A==="set-localization"){if(!x.locale)throw new l("Localization locale is required",400);let D=await Y0("PUT",`/api/v1/templates/${x.id}/localizations/${encodeURIComponent(x.locale)}`,Te0(x,E),x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,emailId:D.templateId}):void 0;if(x.json){L0({...D,...J!==void 0&&{appUrls:J.urls}});return}console.log(`Set ${D.localization.locale} localization for template ${D.templateId}`),console.log(`Status: ${D.localization.status}`),console.log(`Subject: ${D.localization.subject}`),Nx("URL",J?.urls.email);return}if(A==="sync-localizations"){let D=await Y0("POST",`/api/v1/templates/${x.id}/localizations/sync`,x.locales===void 0?{}:{locales:x.locales},x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,emailId:D.templateId}):void 0;if(x.json){L0({...D,...J!==void 0&&{appUrls:J.urls}});return}console.log(`Queued ${D.queuedVariantCount} localization${D.queuedVariantCount===1?"":"s"}: ${D.queuedLocales.join(", ")}`),Nx("URL",J?.urls.email);return}if(A==="update"){let D=await Y0("PUT",`/api/v1/templates/${x.id}`,ue0(x,E),x.company),I=await CB(x.company),J=I!==void 0?SE({companyId:I,emailId:x.id}):void 0;if(x.json){L0({...D,...D.template!==void 0&&J?.urls.email!==void 0&&{template:{...D.template,url:J.urls.email}},...J!==void 0&&{appUrls:J.urls}});return}console.log(`Updated template: ${D.template?.name??x.id}`),console.log(`ID: ${D.template?.id??x.id}`),Nx("URL",J?.urls.email),console.log(`Labels: ${fR(D.template?.labels)}`),console.log(`Subject: ${D.template?.subject??"Unchanged"}`);return}if(A==="delete"){let D=await Y0("DELETE",`/api/v1/templates/${x.id}`,void 0,x.company);if(x.json){L0(D);return}console.log(D.message??`Deleted template: ${x.id}`);return}let g=await Y0("GET",`/api/v1/templates/${x.id}`,void 0,x.company),B=SE({companyId:g.template.companyId,emailId:x.id});if(x.json){L0({...g,template:{...g.template,url:B.urls.email},appUrls:B.urls});return}let Q=g.template;console.log(Q.name),console.log(`ID: ${Q.id}`),console.log(`Company: ${Q.companyId}`),Nx("URL",B.urls.email),console.log(`Subject: ${Q.subject}`),console.log(`Labels: ${fR(Q.labels)}`),console.log(`Preview: ${Q.previewText??"None"}`),console.log(`Blocks: ${Q.blocks.length}`),console.log(`Font: ${Q.fontFamily??"Default"}`),console.log(`Created: ${dA(Q.createdAt)}`),console.log(`Updated: ${dA(Q.updatedAt)}`),console.log(`Localizations: ${e10(Q.localizations)}`);for(let D of Q.localizations){let I=D.lastError?` | error: ${D.lastError}`:"";console.log(`- ${D.locale} [${D.status}] blocks=${D.blocks.length}${I}`)}}catch(E){YA(E instanceof l?E:E),process.exit(1)}}async function KR(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="create"){if(!x.name)throw new l("Transactional name is required",400);let B=lQ({html:x.html,htmlFile:x.htmlFile,blocksJson:x.blocksJson,blocksFile:x.blocksFile}),Q=x.prompt?.trim()||void 0;if([Q,B.html,B.blocks].filter((X)=>X!==void 0).length!==1)throw new l("Provide exactly one of --prompt, --html/--html-file, or --blocks-json/--blocks-file",400);if(!Q&&!x.subject)throw new l("Transactional subject is required unless --prompt is provided",400);if(!Q&&(x.style!==void 0||x.tone!==void 0))throw new l("--style and --tone require --prompt",400);let I=await Y0("POST","/api/v1/transactional",{name:x.name,...x.slug!==void 0&&{slug:x.slug},...x.subject!==void 0&&{subject:x.subject},...x.previewText!==void 0&&{previewText:x.previewText},...Q!==void 0&&{prompt:Q},...x.style!==void 0&&{style:x.style},...x.tone!==void 0&&{tone:x.tone},...B.html!==void 0&&{html:B.html},...B.blocks!==void 0&&{blocks:B.blocks},...x.enabled!==void 0&&{enabled:x.enabled}},x.company),J=await CB(x.company),K=J?SE({companyId:J,transactionalId:I.transactional.id}).urls.transactionalEmail:void 0;if(x.json){L0({...I,transactional:{...I.transactional,url:K},...K&&{appUrls:{transactionalEmail:K}}});return}console.log(`Created transactional template: ${I.transactional.name}`),console.log(`ID: ${I.transactional.id}`),console.log(`Slug: ${I.transactional.slug}`),console.log(`Enabled: ${I.transactional.enabled?"yes":"no"}`),Nx("URL",K);return}if(A==="list"){let B=await Y0("GET","/api/v1/transactional",void 0,x.company);if(x.json){L0(B);return}console.log(`Transactional templates (${B.transactional.length})`);for(let Q of B.transactional)console.log(`- ${Q.name} [${Q.slug}] ${Q.enabled?"enabled":"disabled"}`);return}if(!x.slug)throw new l("Transactional template slug is required",400);let E=await Y0("GET",`/api/v1/transactional/${encodeURIComponent(x.slug)}`,void 0,x.company);if(x.json){L0(E);return}let g=E.transactional;if(console.log(g.name),console.log(`ID: ${g.id}`),console.log(`Slug: ${g.slug}`),console.log(`Enabled: ${g.enabled?"yes":"no"}`),g.subject)console.log(`Subject: ${g.subject}`);if((g.variables?.length??0)>0)console.log(`Variables: ${g.variables?.join(", ")}`)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Eg0(A){if(A===void 0||A.length===0)return;let x=new Set(Yh);for(let E of A)if(!x.has(E))throw new l(`Invalid --event value '${E}'. Valid events: ${Yh.join(", ")}`,400);return A}function he0(A){if(!A.name||A.name.trim()==="")throw new l("--name is required",400);if(!A.url||A.url.trim()==="")throw new l("--url is required",400);let x=Eg0(A.event);return{name:A.name,url:A.url,...x!==void 0&&{events:x}}}function be0(A){if(A.enable===!0&&A.disable===!0)throw new l("Use either --enable or --disable, not both",400);let x=Eg0(A.event),E=A.enable===!0?"enabled":A.disable===!0?"disabled":void 0,g={...A.name!==void 0&&{name:A.name},...A.url!==void 0&&{url:A.url},...x!==void 0&&{events:x},...E!==void 0&&{status:E}};if(Object.keys(g).length===0)throw new l("Provide at least one of: --name, --url, --event, --enable, --disable",400);return g}function Ag0(A){if(console.log(`- ${A.name} [${A.id}]`),console.log(` URL: ${A.url}`),console.log(` Status: ${A.status}`),console.log(` Events: ${A.events.join(", ")||"None"}`),A.consecutiveFailures>0)console.log(` Consecutive failures: ${A.consecutiveFailures}`);if(A.lastSuccessAt)console.log(` Last success: ${dA(A.lastSuccessAt)}`);if(A.lastFailureAt)console.log(` Last failure: ${dA(A.lastFailureAt)}`);console.log(` Created: ${dA(A.createdAt)}`)}function xg0(A){if(console.log(`- ${A.id} [${A.status}]`),console.log(` Event: ${A.eventType} (${A.eventId})`),console.log(` Attempts: ${A.attempts}`),A.lastStatusCode!==null)console.log(` Last status code: ${A.lastStatusCode}`);if(A.lastError)console.log(` Last error: ${A.lastError}`);if(A.lastAttemptAt)console.log(` Last attempt: ${dA(A.lastAttemptAt)}`);if(A.nextAttemptAt)console.log(` Next attempt: ${dA(A.nextAttemptAt)}`);console.log(` Created: ${dA(A.createdAt)}`)}async function ND(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let B=await Y0("GET","/api/v1/webhooks",void 0,x.company);if(x.json){L0(B);return}console.log(`Webhooks (${B.webhooks.length})`);for(let Q of B.webhooks)Ag0(Q);return}if(A==="create"){let B=await Y0("POST","/api/v1/webhooks",he0(x),x.company);if(x.json){L0(B);return}let Q=B.webhook;console.log(`Created webhook: ${Q?.name??x.name}`),console.log(`ID: ${Q?.id??"Unknown"}`),console.log(`URL: ${Q?.url??x.url}`),console.log(`Status: ${Q?.status??"enabled"}`),console.log(`Events: ${Q?.events.join(", ")??"None"}`),console.log(""),console.log("Signing secret (shown only once - store it somewhere safe now):"),console.log(` ${Q?.signingSecret??"Unavailable"}`);return}if(!x.id)throw new l("Webhook ID is required",400);let E=`/api/v1/webhooks/${encodeURIComponent(x.id)}`;if(A==="update"){let B=await Y0("PATCH",E,be0(x),x.company);if(x.json){L0(B);return}if(console.log(`Updated webhook: ${B.webhook?.name??x.id}`),B.webhook)Ag0(B.webhook);return}if(A==="delete"){if(!await l9(`Permanently delete webhook ${x.id} and its delivery history?`,x)){console.log("Aborted.");return}let B=await Y0("DELETE",E,void 0,x.company);if(x.json){L0(B);return}console.log(`Deleted webhook: ${x.id}`);return}if(A==="test"){let B=await Y0("POST",`${E}/test`,void 0,x.company);if(x.json){L0(B);return}console.log(`Queued test event for webhook: ${x.id}`),console.log(`Event ID: ${B.eventId}`),console.log(`Queued deliveries: ${B.queuedDeliveries}`);return}if(A==="deliveries"){let B=M8(x.limit,"--limit");if(B!==void 0&&(B<1||B>100))throw new l("--limit must be an integer between 1 and 100",400);let Q=await Y0("GET",`${E}/deliveries${B!==void 0?`?limit=${B}`:""}`,void 0,x.company);if(x.json){L0(Q);return}console.log(`Deliveries (${Q.deliveries.length})`);for(let D of Q.deliveries)xg0(D);return}if(!x.deliveryId)throw new l("Delivery ID is required",400);let g=await Y0("POST",`${E}/deliveries/${encodeURIComponent(x.deliveryId)}/replay`,void 0,x.company);if(x.json){L0(g);return}console.log(`Replay queued for delivery: ${x.deliveryId}`),xg0(g.delivery)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}async function Zy(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="list"){let D=await Y0("GET","/api/v1/websites",void 0,x.company);if(x.json){L0(D);return}console.log(`Websites (${D.websites.length})`);for(let I of D.websites)console.log(`- ${I.domain}`),console.log(` Status: ${I.status}`),console.log(` Created: ${dA(I.createdAt)}`);return}if(A==="guide"){let D=await Y0("POST","/api/v1/integration-guide",{framework:x.framework,use_case:x.useCase});if(x.json){L0(D);return}if(console.log(`Integration guide: ${D.framework} / ${D.use_case}`),console.log(""),console.log(D.code),D.tip)console.log(""),console.log(`Tip: ${D.tip}`);return}if(!x.domain)throw new l("Domain is required",400);let E=A==="add"?"POST":"GET",g=A==="add"?"/api/v1/websites":`/api/v1/websites/${encodeURIComponent(x.domain)}`,B=A==="add"?{domain:x.domain}:void 0,Q=await Y0(E,g,B,x.company);if(x.json){L0(Q);return}if(console.log(Q.website.domain),console.log(`Status: ${Q.website.status}`),Q.website.createdAt)console.log(`Created: ${dA(Q.website.createdAt)}`);if(Q.website.message)console.log(Q.website.message);if(Q.website.dnsRecords!==void 0)console.log("DNS Records:"),L0(Q.website.dnsRecords)}catch(E){YA(E instanceof l?E:E),process.exit(1)}}async function Bg0(){if(!await Cx()){YA(Kx()),process.exit(1);return}let A=NX();console.log(`Email: ${A.userEmail??"Unknown"}`),console.log(`User ID: ${A.userId??"Unknown"}`),console.log(""),console.log("A local API key is available."),console.log("Use `sequenzy account` to verify the active API key, permissions, and available companies.")}async function gg0(A,x){if(!await Cx())YA(Kx()),process.exit(1);try{if(A==="preferences-token"){if(!x.email)throw new l("Email is required",400);let E=await Y0("POST","/api/v1/widgets/preferences/token",{email:x.email},x.company);if(x.json){L0(E);return}console.log(E.token)}}catch(E){YA(E instanceof l?E:E),process.exit(1)}}function Qg0(A,x){if(x.length===0)return"";return`
|
|
609
609
|
${A}:
|
|
610
610
|
${x.map((E)=>` ${E}`).join(`
|
|
611
611
|
`)}
|
|
@@ -626,4 +626,4 @@ ${Dg0}Quick Start${o6}
|
|
|
626
626
|
${H1}$${o6} sequenzy websites guide --framework nextjs --use-case transactional`,D=`
|
|
627
627
|
${Dg0}Notes${o6}
|
|
628
628
|
${H1}Generated content should be reviewed before sending.${o6}
|
|
629
|
-
${H1}Use 'sequenzy --help' and '<command> --help' for detailed examples and caveats.${o6}`;console.log(E),console.log(g),console.log(),console.log(B),console.log(Q),console.log(D),console.log()}var A8=new Hm;A8.name("sequenzy").description("Sequenzy CLI - Email marketing from the terminal").version(Cg0).showHelpAfterError().showSuggestionAfterError().action(re0);X0(A8,{notes:["Use --json on data commands when another tool or agent should parse structured output.","Dashboard-aware JSON responses include appUrls when a company ID can be resolved.","Company-scoped commands accept --company for personal API keys that can access multiple companies.","Content commands prefer file flags such as --html-file, --blocks-file, --steps-file, and --emails-file to avoid shell escaping issues.","Sequence creation supports --goal for AI generation or explicit step JSON."],examples:['sequenzy templates create welcome --subject "Welcome" --html-file ./welcome.html','sequenzy campaigns update camp_123 --subject "Updated subject" --html-file ./campaign.html',"sequenzy sequences create onboarding --trigger contact_added --list-id list_123 --steps-file ./steps.json","sequenzy urls --company comp_123 --sequence seq_123 --settings-tab integrations","sequenzy websites guide --framework nextjs --use-case transactional",'sequenzy api-keys create --name "CI deploy key" --company comp_123']});var pe0=A8.command("login").description("Log in to your Sequenzy account").action(G60);X0(pe0,{notes:["Starts device authentication and prints a verification URL plus approval code."],examples:["sequenzy login"]});var _e0=A8.command("logout").description("Log out of your Sequenzy account").action(W60);X0(_e0,{examples:["sequenzy logout"]});var ne0=A8.command("whoami").description("Show the locally stored Sequenzy identity").action(Bg0);X0(ne0,{notes:["This checks local CLI credential state only. Use 'sequenzy account' to make a live request and verify the active key, permissions, and company access."],examples:["sequenzy whoami"]});var le0=A8.command("stats").description("Show account, campaign, or sequence metrics, including Poll/NPS").option("-p, --period <period>","Time period (7d, 30d, 90d)","7d").option("--campaign <id>","Get stats for a specific campaign").option("--sequence <id>","Get stats for a specific sequence").option("--include-bots","Include machine-classified bot/scanner opens and clicks").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON, including poll and NPS results").action(F20);X0(le0,{notes:["Use exactly one of: account-level period, --campaign, or --sequence.","Bot/scanner opens and clicks are excluded by default; pass --include-bots to inspect raw engagement.","Sequence stats include per-step failures when the API reports them.","Campaign stats include a Poll & NPS Results section when the email collected answers; use --json for the full polls array."],examples:["sequenzy stats","sequenzy stats --period 30d","sequenzy stats --campaign camp_123","sequenzy stats --campaign camp_123 --json","sequenzy stats --campaign camp_123 --include-bots","sequenzy stats --sequence seq_123"]});var de0=A8.command("events").description("List raw campaign or sequence email events").option("--campaign <id>","List events for a campaign").option("--sequence <id>","List events for a sequence").option("--type <type>","Single event type to include, such as delivery, open, or click").option("--event-types <types>","Comma-separated event types to include (default: delivery)").option("-p, --period <period>","Time period (1h, 24h, 7d, 30d, 90d)").option("--start <iso>","Start of custom time range (ISO 8601)").option("--end <iso>","End of custom time range (ISO 8601)").option("--page <number>","Page number").option("--limit <number>","Events per page, capped by the API").option("--include-bots","Include machine-classified bot/scanner opens and clicks").option("-c, --company <id>","Company ID").option("--json","Print JSON").action(I60);X0(de0,{notes:["Use exactly one of --campaign or --sequence.","Defaults to delivery events. Use --event-types delivery,open,click when you need engagement events too.","Bot/scanner opens and clicks are excluded by default; pass --include-bots to inspect raw engagement."],examples:["sequenzy events --campaign camp_123","sequenzy events --sequence seq_123 --limit 100 --json","sequenzy events --campaign camp_123 --event-types delivery,click --period 30d"]});var ae0=A8.command("urls").description("Generate Sequenzy dashboard URLs for known resource IDs").option("-c, --company <id>","Company ID").option("--campaign <id>","Campaign ID for campaign editor URL").option("--landing-page <id>","Landing page ID for landing page editor URL").option("--sequence <id>","Sequence ID for sequence editor URL").option("--template <id>","Template/email ID for email editor URL").option("--email <id>","Email ID for email editor URL").option("--transactional <id>","Transactional email ID").option("--email-send <id>","Email send ID").option("--domain <id>","Sending domain ID").option("--status <status>","Status for campaign/sequence list URLs").option("--settings-tab <tab>","Settings tab slug, e.g. integrations").option("--json","Print JSON").action(s90);X0(ae0,{notes:["Uses SEQUENZY_APP_URL when set, otherwise https://sequenzy.com.","If --company is omitted, the CLI tries the current company from `sequenzy account`.","Useful after creating a campaign or sequence when the user wants a review/edit link."],examples:["sequenzy urls --company comp_123","sequenzy urls --company comp_123 --sequence seq_123","sequenzy urls --company comp_123 --campaign camp_123","sequenzy urls --company comp_123 --landing-page lp_123","sequenzy urls --company comp_123 --email-send send_123","sequenzy urls --company comp_123 --settings-tab integrations","sequenzy urls --company comp_123 --json"]});var Q2=A8.command("subscribers").description("Manage subscribers").action(()=>Q2.help());X0(Q2,{notes:["Subscriber list fetches every page by default so agents do not silently miss later results.","`subscribers get` includes tags, list memberships, sequence enrollments, email stats, and recent activity.","--attr expects repeated key=value pairs. Example: --attr firstName=Ana --attr plan=pro"],examples:["sequenzy subscribers list --tag vip",'sequenzy subscribers list --list "Master List" --json',"sequenzy subscribers list --tag vip --limit 25 --json","sequenzy subscribers add user@example.com --tag trial --attr firstName=Ana","sequenzy subscribers import copper-contacts.csv --list list_123 --opt-in-mode confirmed","sequenzy subscribers import-status import_123 --json","sequenzy subscribers get user@example.com --json",'sequenzy subscribers notes add user@example.com --body "Customer prefers quarterly reports"',"sequenzy subscribers remove user@example.com --hard"]});var se0=Q2.command("list").description("List subscribers").option("-s, --segment <id>","Filter by segment").option("-t, --tag <tag>","Filter by tag").option("--list <id-or-name>","Filter by subscriber list ID or exact name").option("-l, --limit <number>","Maximum results to return").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>H7("list",A));X0(se0,{examples:["sequenzy subscribers list",'sequenzy subscribers list --list "Master List"',"sequenzy subscribers list --segment seg_123","sequenzy subscribers list --tag onboarding --limit 100"]});var oe0=Q2.command("add [email]").description("Add or upsert a subscriber").option("--external-id <id>","Customer-owned subscriber ID").option("--first-name <name>","Subscriber first name").option("--last-name <name>","Subscriber last name").option("-t, --tag <tags...>","Tags to apply").option("-l, --list <ids...>","List IDs to add the subscriber to").option("--no-lists","Add the subscriber to no lists").option("--skip-sequences","Do not enroll the subscriber in matching sequences").option("-a, --attr <attrs...>","Attributes (key=value)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("add",{email:A,...x,noLists:x.lists===!1}));X0(oe0,{examples:["sequenzy subscribers add user@example.com","sequenzy subscribers add user@example.com --first-name Ana --tag trial --attr plan=pro","sequenzy subscribers add user@example.com --list list_123","sequenzy subscribers add user@example.com --skip-sequences"]});var te0=Q2.command("import [file]").description("Queue a full-record subscriber import from CSV or JSON").option("--records-json <json>","Inline JSON array (alternative to a CSV/JSON file)").option("--duplicate-strategy <strategy>","Existing contact behavior: skip, merge, or overwrite","skip").option("--file-name <name>","Source label shown in import history").option("-l, --list <ids...>","List IDs for every imported subscriber").option("--enroll-sequences","Enroll matching subscribers (requires automations:trigger)").option("--default-phone-country <country>","Two-letter country for national phone numbers").option("--sms-consent","Assert express written SMS consent for every imported phone").option("--opt-in-mode <mode>","Email consent mode: default, confirmed, or double_opt_in","default").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("import",{file:A,...x}));X0(te0,{notes:["CSV columns for email, names, external ID, phone, status, and tags are detected automatically; other columns become custom attributes.","Use --opt-in-mode confirmed only when these contacts already gave verified email consent.","Imports run asynchronously. Poll the returned ID with subscribers import-status."],examples:["sequenzy subscribers import copper-contacts.csv --list list_123 --opt-in-mode confirmed",`sequenzy subscribers import --records-json '[{"email":"one@example.com","firstName":"Ana"}]' --opt-in-mode confirmed`]});var ee0=Q2.command("import-status <importId>").description("Get subscriber import progress and result counts").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("import:get",{importId:A,...x}));X0(ee0,{notes:["A completed import can still contain failed rows; inspect failed counts and --json reason maps."],examples:["sequenzy subscribers import-status import_123","sequenzy subscribers import-status import_123 --json"]});var A0A=Q2.command("get [email]").description("Get subscriber details").option("--external-id <id>","Customer-owned subscriber ID").option("--include-bots","Include machine-classified bot/scanner opens and clicks in stats/activity").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("get",{email:A,...x}));X0(A0A,{notes:["Bot/scanner opens and clicks are excluded by default; pass --include-bots to inspect raw engagement."],examples:["sequenzy subscribers get user@example.com","sequenzy subscribers get user@example.com --include-bots"]});var Gy=Q2.command("notes").description("Manage subscriber notes").action(()=>Gy.help());X0(Gy,{examples:["sequenzy subscribers notes list user@example.com",'sequenzy subscribers notes add user@example.com --body "Prefers monthly digest"',"sequenzy subscribers notes delete note_123"]});var x0A=Gy.command("list [email]").description("List subscriber notes").option("--external-id <id>","Customer-owned subscriber ID").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("notes:list",{email:A,...x}));X0(x0A,{examples:["sequenzy subscribers notes list user@example.com","sequenzy subscribers notes list --external-id user_123 --json"]});var E0A=Gy.command("add [email]").description("Add a subscriber note").option("--external-id <id>","Customer-owned subscriber ID").requiredOption("-b, --body <body>","Note body").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("notes:add",{email:A,...x}));X0(E0A,{examples:['sequenzy subscribers notes add user@example.com --body "Asked about enterprise plan"','sequenzy subscribers notes add --external-id user_123 --body "Imported from sales call"']});var B0A=Gy.command("delete <noteId>").description("Delete a subscriber note").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("notes:delete",{noteId:A,...x}));X0(B0A,{examples:["sequenzy subscribers notes delete note_123"]});var g0A=Q2.command("update [email]").description("Update subscriber status, name, tags, or custom attributes").option("--external-id <id>","Customer-owned subscriber ID").option("--status <status>","Subscriber status").option("--first-name <name>","Subscriber first name").option("--last-name <name>","Subscriber last name").option("-t, --tag <tags...>","Replacement tags").option("-a, --attr <attrs...>","Attributes (key=value)").option("--merge","Merge custom attributes instead of replacing them").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("update",{email:A,...x}));X0(g0A,{examples:["sequenzy subscribers update user@example.com --status unsubscribed","sequenzy subscribers update user@example.com --first-name Ana --last-name Silva","sequenzy subscribers update user@example.com --tag churned --attr cancelReason=too_expensive","sequenzy subscribers update user@example.com --attr plan=pro --merge"]});var Q0A=Q2.command("event [email]").description("Trigger an event for a subscriber").option("--external-id <id>","Customer-owned subscriber ID").requiredOption("-n, --name <event>","Event name").option("-p, --property <properties...>","Event properties (key=value)").option("-a, --attr <attrs...>","Subscriber attributes (key=value)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("event",{email:A,...x}));X0(Q0A,{examples:["sequenzy subscribers event user@example.com --name saas.purchase","sequenzy subscribers event user@example.com --name saas.purchase --property plan=pro --property amount=99"]});var D0A=Q2.command("remove [email]").description("Unsubscribe or permanently delete a subscriber").option("--external-id <id>","Customer-owned subscriber ID").option("--hard","Permanently delete (not just unsubscribe)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("remove",{email:A,...x}));X0(D0A,{examples:["sequenzy subscribers remove user@example.com","sequenzy subscribers remove user@example.com --hard"]});var Wy=A8.command("transactional").description("Inspect transactional email templates").action(()=>Wy.help());X0(Wy,{notes:["Use the top-level `sequenzy send` command to send email."],examples:["sequenzy transactional list","sequenzy transactional get welcome","sequenzy send user@example.com --template welcome --var firstName=Ana"]});var C0A=Wy.command("list").description("List transactional templates").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>KR("list",A));X0(C0A,{examples:["sequenzy transactional list --company comp_123"]});var F0A=Wy.command("get <slug>").description("Get transactional template details by slug").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>KR("get",{slug:A,...x}));X0(F0A,{examples:["sequenzy transactional get welcome"]});var I0A=Wy.command("create <name>").description("Create a transactional template").option("--slug <slug>","API slug").option("-s, --subject <subject>","Subject (optional with --prompt)").option("--preview-text <text>","Preview text override").option("--prompt <prompt>","Generate branded transactional blocks").option("--style <style>","Prompt generation style").option("--tone <tone>","Prompt generation tone").option("--html <html>","Preserved HTML content").option("--html-file <file>","Read preserved HTML from file").option("--blocks-json <json>","Finished Sequenzy blocks JSON").option("--blocks-file <file>","Read finished Sequenzy blocks from file").option("--enabled","Enable immediately (prompt creates default disabled)").option("--no-enabled","Create the transactional template disabled").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>KR("create",{name:A,...x}));X0(I0A,{notes:["Provide exactly one of prompt, HTML, or blocks.",$R],examples:['sequenzy transactional create password-reset --prompt "Write a password reset email"']});var Lk=A8.command("widgets").description("Widget helper commands").action(()=>Lk.help());X0(Lk,{examples:["sequenzy widgets preferences-token user@example.com"]});var w0A=Lk.command("preferences-token <email>").description("Generate a subscription preferences iframe token").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>gg0("preferences-token",{email:A,...x}));X0(w0A,{examples:["sequenzy widgets preferences-token user@example.com"]});var Ok=A8.command("email-sends").alias("emailsends").description("Inspect sent email snapshots and delivery events").action(()=>Ok.help());X0(Ok,{notes:["Email send rows are short-lived; if the row was cleaned up, this falls back to retained ClickHouse events.","Use --html to print the stored HTML body when it is still available."],examples:["sequenzy email-sends get send_123","sequenzy email-sends get send_123 --html","sequenzy email-sends get send_123 --json"]});var J0A=Ok.command("get <emailSendId>").description("Get an email send by ID").option("-c, --company <id>","Company ID override for personal API keys").option("--html","Print the full stored HTML body in text output").option("--html-only","Print only the stored HTML body").option("--json","Print raw JSON").action((A,x)=>D60("get",{id:A,...x}));X0(J0A,{examples:["sequenzy email-sends get send_123","sequenzy email-sends get send_123 --html","sequenzy email-sends get send_123 --company comp_123 --json"]});var HR=A8.command("suppressions").description("Inspect and clean stale recipient bounce suppression").action(()=>HR.help());X0(HR,{notes:["Suppression lookup is exact-address only because the SES account-level list is shared across companies.","Removal clears stale bounce entries only; complaint and unsubscribe protections are preserved."],examples:["sequenzy suppressions get me@example.com","sequenzy suppressions remove me@example.com --yes"]});var f0A=HR.command("get <email>").description("Check local and Amazon SES suppression for one recipient").option("--region <region>","Check one AWS SES region").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>zk("get",{email:A,...x}));X0(f0A,{examples:["sequenzy suppressions get me@example.com","sequenzy suppressions get me@example.com --region us-east-1 --json"]});var K0A=HR.command("remove <email>").description("Remove stale bounce suppression for one recipient").option("--region <region>","Clear one AWS SES region").option("-c, --company <id>","Company ID override for personal API keys").option("-y, --yes","Skip confirmation").option("--json","Print raw JSON").action((A,x)=>zk("remove",{email:A,...x}));X0(K0A,{examples:["sequenzy suppressions remove me@example.com","sequenzy suppressions remove me@example.com --region us-east-1 --yes"]});var $0A=A8.command("send <email>").description("Send a transactional email").option("-t, --template <slug>","Transactional template slug to use").option("-s, --subject <subject>","Email subject").option("--html <html>","Email HTML content").option("--html-file <file>","Read HTML from file").option("--vars-json <json>","Variables as a JSON object, including nested arrays for repeat blocks").option("-v, --var <vars...>","Variables (key=value)").action(e70);X0($0A,{notes:["Use either --template or --html/--html-file.","--template takes a transactional API slug and cannot be combined with --subject.","--subject is required when sending raw HTML.","--vars-json accepts nested objects and arrays; --var overrides individual scalar keys."],examples:["sequenzy send user@example.com --template welcome --var firstName=Ana",`sequenzy send user@example.com --template welcome --vars-json '{"event":{"items":[{"title":"Plan","description":"Pro"}]}}'`,'sequenzy send user@example.com --subject "Welcome" --html-file ./welcome.html']});var a5=A8.command("campaigns").description("Manage campaigns").action(()=>a5.help());X0(a5,{notes:["Campaign creation supports HTML, Sequenzy blocks, or prompt-generated content.","Campaign updates support HTML, Sequenzy blocks, subject, name, labels, and reply-to changes.","Campaign scheduling requires a future ISO timestamp and a verified sending domain.","Use cancel to stop a scheduled or sending campaign, and pause/resume to control an active send.",$R],examples:["sequenzy campaigns list --status draft --company comp_123",'sequenzy campaigns create "April Launch" --subject "We shipped" --html-file ./campaign.html','sequenzy campaigns create "API Launch" --subject "We shipped" --label edm api --html-file ./campaign.html','sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z"',"sequenzy campaigns test camp_123 --to you@example.com","sequenzy campaigns cancel camp_123","sequenzy campaigns duplicate camp_123 --mode ab_test"]});var H0A=a5.command("list").description("List campaigns").option("-s, --status <status>","Filter by status").option("--label <labels...>","Filter by label name").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>z4("list",A));X0(H0A,{examples:["sequenzy campaigns list","sequenzy campaigns list --status draft --company comp_123","sequenzy campaigns list --label edm"]});var y0A=a5.command("get <id>").description("Get campaign details").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("get",{id:A,...x}));X0(y0A,{examples:["sequenzy campaigns get camp_123 --company comp_123"]});var q0A=a5.command("create <name>").description("Create a campaign").option("-s, --subject <subject>","Email subject").option("--preview-text <text>","Inbox preview text").option("--preheader-text <text>","Alias for --preview-text").option("--tracking-code <code>","Optional campaign tracking code").option("--status <status>","Initial status: draft or sent").option("--sent-at <iso-date>","Sent timestamp when creating with --status sent").option("--html <html>","Email HTML content").option("--html-file <file>","Read HTML from file").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--prompt <prompt>","Generate campaign blocks from a prompt").option("--style <style>","Prompt generation style: minimal, branded, promotional").option("--tone <tone>","Prompt generation tone: professional, casual, friendly").option("--label <labels...>","Label names to assign").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("create",{name:A,...x}));X0(q0A,{notes:["--subject is required unless --prompt is provided. With --prompt, the generated subject is used unless --subject is also provided.","Use --preview-text or --preheader-text to set the inbox preview text. With --prompt, the generated preview is used unless one of these flags is provided.","Use --blocks-json or --blocks-file when you need editor-compatible blocks, including conditional content and per-block styles.","Use --status sent only to archive an already-sent campaign; it does not send email or create per-recipient delivery history.","Do not combine prompt, HTML flags, and blocks flags in the same request."],examples:['sequenzy campaigns create "April Launch" --prompt "Announce our new analytics dashboard"','sequenzy campaigns create "April Launch" --subject "We shipped" --preheader-text "Your quick product update" --html-file ./campaign.html','sequenzy campaigns create "Imported launch" --subject "We shipped" --status sent --sent-at "2026-05-01T14:00:00Z" --html-file ./campaign.html','sequenzy campaigns create "API Launch" --subject "We shipped" --label edm api --html-file ./campaign.html','sequenzy campaigns create "Segmented Launch" --subject "We shipped" --blocks-file ./campaign-blocks.json']});var Y0A=a5.command("update <id>").description("Update a draft campaign").option("-n, --name <name>","Campaign name").option("-s, --subject <subject>","Email subject").option("--preview-text <text>","Inbox preview text").option("--preheader-text <text>","Alias for --preview-text").option("--tracking-code <code>","Optional campaign tracking code").option("--html <html>","Email HTML content").option("--html-file <file>","Read HTML from file").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--campaign-data-json <json>","Inline campaignData JSON object").option("--campaign-data-file <file>","Path to a JSON file with campaignData").option("--computed-lists-json <json>","Inline computedLists JSON array").option("--computed-lists-file <file>","Path to a JSON file with computedLists").option("--reply-to <email>","Set reply-to using an existing reply profile email").option("--reply-profile <id>","Set reply-to using a reply profile ID").option("--label <labels...>","Replace label names").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("update",{id:A,...x}));X0(Y0A,{notes:["Provide at least one update flag, including subject, preview text, content, labels, reply-to, campaign data, or computed lists.","Use --blocks-json or --blocks-file when you need editor-compatible blocks, including conditional content and per-block styles.","Use --campaign-data-file and --computed-lists-file to upload personalization data for repeat blocks.","Do not combine HTML flags with blocks flags in the same request.","Use either --reply-to or --reply-profile, not both."],examples:['sequenzy campaigns update camp_123 --subject "Updated subject"','sequenzy campaigns update camp_123 --preheader-text "Updated preview"',"sequenzy campaigns update camp_123 --html-file ./campaign-v2.html","sequenzy campaigns update camp_123 --blocks-file ./campaign-v2-blocks.json","sequenzy campaigns update camp_123 --campaign-data-file ./campaign-data.json --computed-lists-file ./computed-lists.json","sequenzy campaigns update camp_123 --reply-to support@example.com","sequenzy campaigns update camp_123 --label edm api"]});var X0A=a5.command("schedule <id>").description("Schedule a draft or scheduled campaign").requiredOption("--at <datetime>","Future ISO date/time to send, for example 2026-06-01T14:00:00Z").option("--target-lists-json <json>","Inline campaign targetLists JSON object").option("--target-lists-file <file>","Path to a JSON file with campaign targetLists").option("--send-time-optimization","Enable send-time optimization for the scheduled send").option("--spread-over-hours <hours>","Spread delivery over 1-72 hours. Disables send-time optimization when set.").option("--repeat <interval>","Repeat the campaign weekly or monthly starting at --at. Audience membership is re-evaluated at every run.").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("schedule",{id:A,...x}));X0(X0A,{notes:["The campaign must be draft or already scheduled.","Omit target lists to reuse saved campaign targeting, or default to all active subscribers.",'Target list examples include {"type":"all"}, {"type":"lists","listIds":["list_123"]}, and {"type":"segment","segmentId":"seg_123"}.',"With --repeat, the campaign becomes a recurring template: each run is duplicated and sent automatically. Re-schedule without --repeat (or cancel the campaign) to stop the series."],examples:['sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z"',`sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z" --target-lists-json '{"type":"all"}'`,'sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z" --target-lists-file ./target-lists.json','sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z" --spread-over-hours 6','sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z" --repeat monthly']});var U0A=a5.command("test <id>").description("Send a test email for a campaign").requiredOption("--to <email>","Recipient email for the test").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("test",{id:A,...x}));X0(U0A,{examples:["sequenzy campaigns test camp_123 --to you@example.com"]});var Z0A=a5.command("cancel <id>").description("Cancel a scheduled, paused, or sending campaign").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("cancel",{id:A,...x}));X0(Z0A,{notes:["Cancelling stops scheduled, paused, waiting-approval, and actively sending campaigns immediately.","No confirmation prompt is shown so a bad send can be stopped fast."],examples:["sequenzy campaigns cancel camp_123"]});var G0A=a5.command("pause <id>").description("Pause a campaign that is currently sending").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("pause",{id:A,...x}));X0(G0A,{notes:["Only campaigns in sending status can be paused."],examples:["sequenzy campaigns pause camp_123"]});var W0A=a5.command("resume <id>").description("Resume a paused campaign").option("--spread-over-hours <hours>","Spread the remaining delivery over 1-72 hours").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("resume",{id:A,...x}));X0(W0A,{notes:["Only paused campaigns can be resumed."],examples:["sequenzy campaigns resume camp_123","sequenzy campaigns resume camp_123 --spread-over-hours 6"]});var R0A=a5.command("delete <id>").description("Delete a campaign").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("delete",{id:A,...x}));X0(R0A,{notes:["Sending, scheduled, and paused campaigns must be cancelled before they can be deleted."],examples:["sequenzy campaigns delete camp_123 --yes"]});var M0A=a5.command("duplicate <id>").description("Duplicate a campaign as a new draft").option("--mode <mode>","Duplicate mode: campaign, ab_test, or variant","campaign").option("--variant-id <id>","A/B test variant to copy when --mode is variant").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("duplicate",{id:A,...x}));X0(M0A,{notes:["Mode campaign copies the campaign email, ab_test also copies the A/B test with all variants, and variant copies one variant's content as a plain campaign."],examples:["sequenzy campaigns duplicate camp_123","sequenzy campaigns duplicate camp_123 --mode ab_test","sequenzy campaigns duplicate camp_123 --mode variant --variant-id var_b"]});var z0A=a5.command("resend-to-non-openers <id>").description("Create a draft resend to subscribers who didn't open a sent campaign").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("resend-to-non-openers",{id:A,...x}));X0(z0A,{notes:["Only available 6 hours after a sent campaign finishes sending.",`Creates a draft targeting the same audience plus a "didn't open this campaign" rule. Review the draft, then schedule or send it.`,"The response includes an estimate of how many subscribers haven't opened the original."],examples:["sequenzy campaigns resend-to-non-openers camp_123"]});var D2=A8.command("landing-pages").description("Manage landing pages").action(()=>D2.help());X0(D2,{notes:["Landing pages are created as drafts. Publish only after reviewing the page.","Use --content-json or --content-file for full editor-compatible landing page content.","Custom domains require a CNAME record pointing to pages.sequenzydns.com."],examples:["sequenzy landing-pages list --company comp_123",'sequenzy landing-pages create "Product Waitlist" --template waitlist',"sequenzy landing-pages publish lp_123","sequenzy landing-pages connect-domain pages.example.com"]});var S0A=D2.command("list").description("List landing pages").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>I1("list",A));X0(S0A,{examples:["sequenzy landing-pages list --company comp_123"]});var L0A=D2.command("get <id>").description("Get landing page details").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("get",{id:A,...x}));X0(L0A,{examples:["sequenzy landing-pages get lp_123 --company comp_123"]});var O0A=D2.command("create [name]").description("Create a draft landing page").option("--slug <slug>","Landing page URL slug").option("--template <template>","Template key, e.g. waitlist").option("--content-json <json>","Inline landing page content JSON").option("--content-file <file>","Path to landing page content JSON").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("create",{name:A,...x}));X0(O0A,{notes:["When --content-json/--content-file is omitted, a valid default page is generated from --template."],examples:['sequenzy landing-pages create "Product Waitlist" --template waitlist','sequenzy landing-pages create "Launch Page" --slug launch --content-file ./landing-page.json']});var P0A=D2.command("update <id>").description("Edit a landing page").option("-n, --name <name>","Landing page name").option("--slug <slug>","Landing page URL slug").option("--content-json <json>","Inline landing page content JSON").option("--content-file <file>","Path to landing page content JSON").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("update",{id:A,...x}));X0(P0A,{examples:['sequenzy landing-pages update lp_123 --name "Updated page"',"sequenzy landing-pages update lp_123 --content-file ./landing-page.json"]});var j0A=D2.command("publish <id>").description("Publish a landing page").option("-n, --name <name>","Landing page name").option("--slug <slug>","Landing page URL slug").option("--content-json <json>","Inline landing page content JSON").option("--content-file <file>","Path to landing page content JSON").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("publish",{id:A,...x}));X0(j0A,{examples:["sequenzy landing-pages publish lp_123"]});var N0A=D2.command("unpublish <id>").description("Unpublish a landing page").option("-n, --name <name>","Landing page name").option("--slug <slug>","Landing page URL slug").option("--content-json <json>","Inline landing page content JSON").option("--content-file <file>","Path to landing page content JSON").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("unpublish",{id:A,...x}));X0(N0A,{examples:["sequenzy landing-pages unpublish lp_123"]});var V0A=D2.command("delete <id>").description("Delete a landing page").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("delete",{id:A,...x}));X0(V0A,{examples:["sequenzy landing-pages delete lp_123"]});var v0A=D2.command("connect-domain <domain>").description("Connect a custom landing page domain").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("connect-domain",{domain:A,...x}));X0(v0A,{examples:["sequenzy landing-pages connect-domain pages.example.com --company comp_123"]});var u0A=D2.command("update-domain-settings").description("Update or verify landing page domain settings").option("--domain <domain>","Replace the connected landing page domain").option("--verify","Refresh domain verification state").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>I1("update-domain-settings",A));X0(u0A,{examples:["sequenzy landing-pages update-domain-settings --domain pages.example.com","sequenzy landing-pages update-domain-settings --verify"]});var J6=A8.command("sequences").description("Manage email sequences").action(()=>J6.help());X0(J6,{notes:["The CLI supports both AI goal-based sequence creation and explicit-step creation.","Trigger-specific options depend on --trigger. For example: contact_added needs --list-id, tag_added needs --tag-name, inactivity needs --event-name and --inactive-days.","Use --goal for AI generation, or --steps-file / --emails-file with JSON arrays that match the API step objects.","Use --enrollment-mode matching_field for product- or variant-specific event sequences.",'Explicit --steps-file input can include dynamic Stripe or Shopify discount actions with {"type":"create_discount","discount":{"provider":"stripe","discountType":"percent","percentOff":20,"duration":"once","appliesToAllPlans":true}}; the code is created when each subscriber reaches the step, and later emails can use {{discount.code}}.',"Discount action sequences require the selected provider integration, such as Stripe or Shopify, before enabling.",$R],examples:["sequenzy sequences list --company comp_123",'sequenzy sequences create onboarding --trigger event_received --event-name signup.completed --goal "Guide new users to activation"',"sequenzy sequences create onboarding --trigger contact_added --list-id list_123 --steps-file ./steps.json","sequenzy sequences update seq_123 --steps-file ./sequence-updates.json","sequenzy sequences enable seq_123"]});var T0A=J6.command("list").description("List sequences").option("--status <status>","Filter by draft, active, paused, or archived").option("--search <text>","Search sequence names and descriptions").option("--label <labels...>","Filter by dashboard label names").option("--limit <count>","Page size from 1 to 100").option("--offset <count>","Zero-based result offset").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>E9("list",A));X0(T0A,{examples:["sequenzy sequences list --company comp_123"]});var h0A=J6.command("get <id>").description("Get sequence details").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("get",{id:A,...x}));X0(h0A,{examples:["sequenzy sequences get seq_123 --company comp_123"]});function Fg0(A){return A.option("--description <text>","Goal description").option("--trigger-type <type>","Goal signal: event or attribute_change").option("--trigger-event-name <event>","Event goal signal name").option("--attribute-path <path>","Subscriber attribute goal path").option("--attribute-condition <condition>","changed, changed_to, or changed_from_to").option("--attribute-value <value>","Target subscriber attribute value").option("--attribute-previous-value <value>","Previous subscriber attribute value").option("--event-property-name <name>","Optional event property whose value is tracked").option("--event-property-label <label>","Display label for the tracked event property").option("--attribution-window-hours <hours>","Goal attribution window in hours")}var yR=J6.command("goals").description("Manage persisted sequence conversion goals");yR.command("list <sequenceId>").description("List sequence goals").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x)=>E9("goals",{id:A,...x}));Fg0(yR.command("create <sequenceId> <name>").description("Create a sequence conversion goal")).option("--active","Create the goal with conversion tracking on (default)").option("--inactive","Create the goal with conversion tracking off").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x,E)=>E9("goal-create",{id:A,name:x,isActive:E.active,notActive:E.inactive,...E}));Fg0(yR.command("update <sequenceId> <goalId>").description("Update a sequence conversion goal").option("--name <name>","Goal name")).option("--active","Enable the goal").option("--inactive","Disable the goal").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x,E)=>E9("goal-update",{id:A,goalId:x,isActive:E.active,notActive:E.inactive,...E}));yR.command("delete <sequenceId> <goalId>").description("Delete a sequence conversion goal").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x,E)=>E9("goal-delete",{id:A,goalId:x,...E}));var Pk=J6.command("webhook").description("Manage a sequence inbound webhook endpoint");Pk.command("get <sequenceId>").description("Read a sequence inbound webhook URL and setup status").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x)=>E9("webhook-get",{id:A,...x}));Pk.command("configure <sequenceId>").description("Create or update a sequence inbound webhook endpoint").option("--field-mapping-json <json>","Inline mapping with email, optional names, and property paths").option("--field-mapping-file <file>","JSON file containing the webhook field mapping").option("--sample-payload-json <json>","Inline representative webhook payload").option("--sample-payload-file <file>","JSON file containing a representative webhook payload").option("--clear-field-mapping","Clear the saved mapping and return the endpoint to pending setup").option("--clear-sample-payload","Clear the saved sample payload").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x)=>E9("webhook-configure",{id:A,...x}));Pk.command("rotate <sequenceId>").description("Rotate a sequence inbound webhook secret and URL").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x)=>E9("webhook-rotate",{id:A,...x}));var b0A=J6.command("create <name>").description("Create a blank, AI-generated, or explicit-step sequence").option("-t, --trigger <trigger>","Sequence trigger type (defaults to contact_added)").option("--description <text>","Sequence description").option("--label <labels...>","Dashboard label names to assign").option("--user-cancellable","Allow subscribers to cancel enrollment").option("--not-user-cancellable","Prevent subscribers from cancelling enrollment").option("--from-email <email>","Sequence-level From address").option("--from-name <name>","Display name for --from-email").option("--sender-profile-id <id>","Existing sender profile ID").option("--reply-to <email>","Sequence-level Reply-To address").option("--reply-to-name <name>","Display name for --reply-to").option("--reply-profile-id <id>","Existing reply profile ID").option("--bcc-emails <emails>","Comma-separated sequence-level BCC addresses (max 10)").option("-g, --goal <goal>","AI generation goal for the sequence").option("--email-count <count>","Number of AI-generated emails when using --goal (1-10)").option("--duration-days <days>","Total duration in days for AI-generated sequence delays when using --goal").option("--email-style <style>","Style for AI-generated emails when using --goal: visual (designed) or plain (text-first)").option("--enrollment-mode <mode>","Enrollment mode: unlimited, one_time, or matching_field").option("--enrollment-field-path <path>","Event property dot path used by matching_field enrollment").option("--sending-window-start <time>","Earliest local send time for sequence emails (HH:mm, e.g. 08:00)").option("--sending-window-end <time>","Latest local send cutoff for sequence emails (HH:mm, e.g. 20:00)").option("--sending-window-timezone <timezone>","IANA timezone for the sequence sending window, e.g. Europe/Kiev").option("--sending-window-days <days>","Comma-separated days for sequence sends, e.g. weekdays or mon,tue,wed,thu,fri").option("--list-id <id>","List ID for contact_added triggers").option("--tag-name <name>","Tag name for tag_added triggers").option("--segment-id <id>","Segment ID for segment_entered triggers").option("--stop-on-segment-exit","Cancel active enrollments when a contact leaves the trigger segment").option("--event-name <name>","Event name for event_received, inbound_webhook, inactivity, and frequency triggers").option("--integration-slug <slug>","Inbound webhook integration slug").option("--integration-event-key <key>","Inbound webhook integration event key").option("--custom-integration-json <json>","Inline custom inbound webhook integration descriptor").option("--custom-integration-file <file>","JSON file with a custom inbound webhook integration descriptor").option("--property-filters-json <json>","Inline JSON array of event property filters for event_received triggers").option("--property-filters-file <file>","Path to a JSON file with event property filters").option("--inactive-days <days>","Days of inactivity for inactivity triggers").option("--inactivity-baseline <baseline>","Inactivity baseline: sequence_created_at or subscriber_created_at").option("--min-count <count>","Minimum event count for frequency triggers").option("--time-window-days <days>","Time window for frequency triggers").option("--steps-json <json>","Inline JSON array of sequence steps").option("--steps-file <file>","Path to a JSON file with sequence steps").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("create",{name:A,...x}));X0(b0A,{notes:["Provide --goal for AI generation, --steps-json/--steps-file for explicit content, or omit both for a blank dashboard-compatible draft.","Each explicit email step needs subject plus either html or blocks. Discount action steps use type=create_discount to dynamically create a code before an email that references {{discount.code}}.",'SMS steps use type="sms" with a plain-text "text" field (optional label, ineligibleAction skip|exit, imageUrls). Generate copy with `sequenzy generate sms` and check `sequenzy sms settings` first.','Update Subscriber steps use type="update_subscriber", nodeType="action_update_attributes", and config values such as {{event.plan}}, {{event.amount}}, or {{event.active}}.',"For migrated provider flows, put the exact provider HTML in each step's html field; Sequenzy stores it as raw HTML. Use delay or delayMs for waits.","Prefer --steps-file for anything non-trivial. The CLI passes the JSON through to the API.","Shopify replenishment and back-in-stock event sequences default to matching_field.","Use --enrollment-field-path for custom event keys such as order.id or product.providerVariantId.","Use --property-filters-json/--property-filters-file with event_received triggers to only start the sequence when the event properties match, e.g. scope a purchase sequence to one product.","Use --sending-window-start/--sending-window-end/--sending-window-timezone to hold every email step until the allowed local send window. Add --sending-window-days weekdays for working days only.","Discount action sequences require the selected provider integration, such as Stripe or Shopify, before enabling."],examples:['sequenzy sequences create onboarding --trigger event_received --event-name signup.completed --goal "Guide new users to activation" --email-count 4 --duration-days 10','sequenzy sequences create trial --trigger tag_added --tag-name trial --goal "Convert trial users" --sending-window-start 08:00 --sending-window-end 20:00 --sending-window-timezone Europe/Kiev --sending-window-days weekdays',"sequenzy sequences create restock --trigger event_received --event-name ecommerce.back_in_stock --enrollment-mode matching_field --steps-file ./steps.json",`sequenzy sequences create deliver-ebook --trigger event_received --event-name ecommerce.order_placed --property-filters-json '[{"path":"lineItems[].providerProductId","operator":"equals","value":"prod_123"}]' --steps-file ./steps.json`,"sequenzy sequences create post-purchase --trigger event_received --event-name ecommerce.order_placed --enrollment-mode matching_field --enrollment-field-path order.id --steps-file ./steps.json","sequenzy sequences create onboarding --trigger contact_added --list-id list_123 --steps-file ./steps.json",`sequenzy sequences create purchase-profile --trigger event_received --event-name saas.purchase --steps-json '[{"type":"update_subscriber","nodeType":"action_update_attributes","config":{"customAttributeUpdates":[{"name":"plan","value":"{{event.plan}}","valueType":"text"}]}},{"subject":"Thanks","html":"<p>Purchase received.</p>"}]'`,"sequenzy sequences create rescue --trigger inactivity --event-name login --inactive-days 14 --steps-file ./steps.json"]});var k0A=J6.command("update <id>").description("Update sequence metadata, email step content, stop conditions, or paths").option("-n, --name <name>","Sequence name").option("--description <text>","Sequence description").option("--label <labels...>","Replace dashboard label names").option("--clear-labels","Remove all dashboard labels from the sequence").option("--user-cancellable","Allow subscribers to cancel enrollment").option("--not-user-cancellable","Prevent subscribers from cancelling enrollment").option("--trigger <trigger>","Replace the sequence trigger type").option("--list-id <id>","List ID for contact_added").option("--tag-name <name>","Tag name for tag_added").option("--segment-id <id>","Segment ID for segment_entered").option("--stop-on-segment-exit","Stop active enrollments when a contact leaves the trigger segment").option("--no-stop-on-segment-exit","Keep active enrollments running when a contact leaves the trigger segment").option("--event-name <event>","Event name for event, webhook, inactivity, or frequency triggers").option("--integration-slug <slug>","Catalog integration slug for inbound_webhook").option("--integration-event-key <key>","Catalog event key for inbound_webhook").option("--custom-integration-json <json>","Inline custom inbound webhook integration descriptor").option("--custom-integration-file <file>","JSON file containing a custom inbound webhook integration descriptor").option("--property-filters-json <json>","Inline event trigger property filters").option("--property-filters-file <file>","JSON file containing event trigger property filters").option("--inactive-days <days>","Days required for inactivity").option("--inactivity-baseline <baseline>","Inactivity baseline: sequence_created_at or subscriber_created_at").option("--min-count <count>","Minimum frequency event count").option("--time-window-days <days>","Frequency lookback window").option("--from-email <email>","Sequence-level From address").option("--from-name <name>","Display name for --from-email").option("--sender-profile-id <id>","Existing sender profile ID").option("--reply-to <email>","Sequence-level Reply-To address").option("--reply-to-name <name>","Display name for --reply-to").option("--reply-profile-id <id>","Existing reply profile ID").option("--enrollment-mode <mode>","Enrollment mode: unlimited, one_time, or matching_field").option("--enrollment-field-path <path>","Event property dot path used by matching_field enrollment").option("--pause-new-enrollments","Stop new sequence enrollments while current recipients continue").option("--resume-new-enrollments","Resume new sequence enrollments while current recipients continue").option("--sending-window-start <time>","Earliest local send time for sequence emails (HH:mm, e.g. 08:00)").option("--sending-window-end <time>","Latest local send cutoff for sequence emails (HH:mm, e.g. 20:00)").option("--sending-window-timezone <timezone>","IANA timezone for the sequence sending window, e.g. Europe/Kiev").option("--sending-window-days <days>","Comma-separated days for sequence sends, e.g. weekdays or mon,tue,wed,thu,fri").option("--clear-sending-window","Disable the sequence sending window").option("--bcc-emails <emails>","Comma-separated BCC addresses copied on every email this sequence sends, e.g. a support inbox (max 10)").option("--clear-bcc-emails","Remove the sequence BCC addresses").option("--confirm-structural-change","Confirm an insertSteps or branch structural edit to an active sequence").option("--confirm-live-change","Confirm node config edits to an active sequence").option("--steps-json <json>","Inline JSON array of step updates").option("--steps-file <file>","Path to a JSON file with step updates").option("--emails-json <json>","Inline JSON array of email updates; native-block emails, including supported custom HTML blocks, may set emailPreset to branded or minimal").option("--emails-file <file>","Path to a JSON file with email updates; native-block emails, including supported custom HTML blocks, may set emailPreset to branded or minimal").option("--sms-steps-json <json>","Inline JSON array of SMS step content updates (targeted by nodeId)").option("--sms-steps-file <file>","Path to a JSON file with SMS step content updates").option("--subscriber-update-steps-json <json>","Inline JSON array of Update Subscriber configs targeted by nodeId").option("--subscriber-update-steps-file <file>","Path to a JSON file with Update Subscriber configs targeted by nodeId").option("--branch-json <json>","Inline JSON object for inserting an if/else branch with path steps and/or existing target node IDs").option("--branch-file <file>","Path to a JSON file for inserting an if/else branch with path steps and/or existing target node IDs").option("--insert-steps-json <json>","Inline JSON object for inserting new linear steps").option("--insert-steps-file <file>","Path to a JSON file for inserting new linear steps").option("--node-updates-json <json>","Inline typed nodeUpdates array from sequences get").option("--node-updates-file <file>","JSON file containing typed nodeUpdates").option("--graph-edit-json <json>","Inline graphEdit object using the current graphRevision").option("--graph-edit-file <file>","JSON file containing a graphEdit operation").option("--stop-condition-json <json>","Inline JSON object for updating the sequence stop condition").option("--stop-condition-file <file>","Path to a JSON file for updating the sequence stop condition").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("update",{id:A,...x}));X0(k0A,{notes:["Use either the steps form or the emails form, not both.","Each update entry can target a step by nodeId, emailId, or by array order.","Use --insert-steps-json/--insert-steps-file to add new linear steps, including outbound webhooks; use --steps-* or --emails-* to edit existing email steps.",'Inserted steps can be SMS steps: {"type":"sms","text":"...","delay":{"days":1}}. Generate copy with `sequenzy generate sms`.','Edit existing SMS steps with --sms-steps-json/--sms-steps-file: [{"nodeId":"node_sms","text":"New message"}]. Entries may also update label and ineligibleAction.','Edit existing Update Subscriber steps with --subscriber-update-steps-json/--subscriber-update-steps-file: [{"nodeId":"node_update","config":{"customAttributeUpdates":[{"name":"plan","value":"{{event.plan}}","valueType":"text"}]}}].',"For migrated provider flow steps, use html/htmlContent to preserve exact HTML as raw HTML and use delay or delayMs for waits.","When inserting steps or branches into an active sequence, pass --confirm-structural-change after confirming the live-flow impact.",'Use --stop-condition-json/--stop-condition-file with values like {"type":"has_tag","value":"customer"}; use {"type":"none","value":null} to clear it.',"Branch condition types include has_tag, does_not_have_tag, in_list, in_segment, event_received, link_clicked, and field_* comparisons. Use activityScope (this_sequence, previous_email, ever) for event and click checks.","Branch paths may set targetNodeId and elseTargetNodeId to wire directly to existing nodes from sequences get, including the completion node. If path steps are also provided, they run before that target.","Use --clear-sending-window to remove a configured send window.","Use --bcc-emails with a comma-separated list to blind-copy team inboxes on every sequence email; use --clear-bcc-emails to remove them."],examples:['sequenzy sequences update seq_123 --name "User Onboarding"',"sequenzy sequences update seq_123 --pause-new-enrollments","sequenzy sequences update seq_123 --resume-new-enrollments","sequenzy sequences update seq_123 --enrollment-mode matching_field","sequenzy sequences update seq_123 --enrollment-field-path order.id","sequenzy sequences update seq_123 --sending-window-start 08:00 --sending-window-end 20:00 --sending-window-timezone Europe/Kiev --sending-window-days weekdays","sequenzy sequences update seq_123 --clear-sending-window",'sequenzy sequences update seq_123 --bcc-emails "cs-team@yourcompany.com, founder@yourcompany.com"',"sequenzy sequences update seq_123 --clear-bcc-emails","sequenzy sequences update seq_123 --steps-file ./sequence-updates.json",`sequenzy sequences update seq_123 --stop-condition-json '{"type":"has_tag","value":"customer"}'`,`sequenzy sequences update seq_123 --insert-steps-json '{"afterNodeId":"node_email","steps":[{"delay":{"days":1},"subject":"Migration check-in","html":"<p>Need help migrating?</p>"}]}' --confirm-structural-change`,`sequenzy sequences update seq_123 --insert-steps-json '{"afterNodeId":"node_email","steps":[{"nodeType":"logic_wait_for_event","config":{"label":"Wait for reply","eventName":"email.replied","timeoutDays":5,"timeoutAction":"continue"}}]}'`,`sequenzy sequences update seq_123 --branch-json '{"afterNodeId":"node_email","branches":[{"conditionType":"link_clicked","linkUrl":"project-invites","activityScope":"previous_email","steps":[{"subject":"Invite accepted","html":"<p>Thanks for accepting.</p>"}]}],"elseSteps":[{"subject":"Reminder","html":"<p>Please accept your invite.</p>"}]}'`,`sequenzy sequences update seq_123 --branch-json '{"afterNodeId":"node_email_1","branches":[{"id":"replied","conditionType":"event_received","eventName":"email.replied","activityScope":"this_sequence","targetNodeId":"node_complete"}],"elseTargetNodeId":"node_email_2"}'`,"sequenzy sequences update seq_123 --branch-file ./branch.json",`sequenzy sequences update seq_123 --sms-steps-json '[{"nodeId":"node_sms","text":"Hey {{FIRST_NAME}}, your order shipped!"}]'`,`sequenzy sequences update seq_123 --subscriber-update-steps-json '[{"nodeId":"node_update","config":{"customAttributeUpdates":[{"name":"mrr","value":"{{event.amount}}","valueType":"number"}]}}]'`]});var i0A=J6.command("enable <id>").description("Enable a sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("enable",{id:A,...x}));X0(i0A,{examples:["sequenzy sequences enable seq_123"]});var m0A=J6.command("disable <id>").description("Disable a sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("disable",{id:A,...x}));X0(m0A,{examples:["sequenzy sequences disable seq_123"]});var c0A=J6.command("duplicate <id>").description("Create an independent draft copy of a sequence").option("-n, --name <name>","Name for the copied sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("duplicate",{id:A,...x}));X0(c0A,{notes:["Email templates, graph topology, and sequence A/B tests are copied independently."],examples:["sequenzy sequences duplicate seq_123",'sequenzy sequences duplicate seq_123 --name "Welcome Series v2"']});var r0A=J6.command("archive <id>").description("Archive a sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("archive",{id:A,...x}));X0(r0A,{examples:["sequenzy sequences archive seq_123"]});var p0A=J6.command("unarchive <id>").description("Restore an archived sequence as a draft").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("unarchive",{id:A,...x}));X0(p0A,{examples:["sequenzy sequences unarchive seq_123"]});var _0A=J6.command("pause-enrollments <id>").description("Stop new enrollments while current sequence recipients continue").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("pause-enrollments",{id:A,...x}));X0(_0A,{notes:["The sequence must already be active. Existing active and waiting recipients keep moving through the sequence.","Use sequences disable when you want to freeze current recipients too."],examples:["sequenzy sequences pause-enrollments seq_123"]});var n0A=J6.command("resume-enrollments <id>").description("Resume new enrollments for an active sequence without changing current recipients").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("resume-enrollments",{id:A,...x}));X0(n0A,{notes:["The sequence must already be active. Use sequences enable to resume a fully disabled sequence."],examples:["sequenzy sequences resume-enrollments seq_123"]});var l0A=J6.command("enroll <id>").description("Manually enroll subscribers in a sequence").option("-e, --email <emails...>","Email addresses to enroll").option("--subscriber-ids <ids...>","Subscriber IDs to enroll").option("--emails-json <json>","JSON array of emails, or an object with emails/subscribers").option("--emails-file <file>","JSON, CSV, or newline-separated file with subscriber emails").option("--target-node-id <nodeId>","Sequence node to enroll at; defaults to the first step after the trigger").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("enroll",{id:A,...x}));X0(l0A,{notes:["Provide at least one target using --subscriber-ids or exactly one email source: --email, --emails-json, or --emails-file.","Subscribers must be active; unknown emails are reported as not found and inactive, unavailable, or already enrolled subscribers are skipped.","Enrollment requires the sequence to be accepting entrants (enabled and not paused for enrollment)."],examples:["sequenzy sequences enroll seq_123 --email one@example.com two@example.com","sequenzy sequences enroll seq_123 --subscriber-ids sub_123 sub_456 --target-node-id node_email_2","sequenzy sequences enroll seq_123 --emails-file ./vips.csv","sequenzy sequences enroll seq_123 --email one@example.com --target-node-id node_email_2"]});var d0A=J6.command("cancel-enrollments <id>").description("Cancel active or waiting subscriber enrollments in a sequence").option("--subscriber-id <id>","Cancel enrollments for one subscriber ID").option("--field-path <path>","Entry event property dot path to match, such as order.id").option("--field-values <values>","Comma-separated entry field values to match").option("--reason <reason>","Reason stored on cancelled enrollments").option("--apply","Actually cancel matches; otherwise only dry-run").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("cancel-enrollments",{id:A,...x}));X0(d0A,{notes:["sequenceId is always required. Provide exactly one target: --subscriber-id or --field-values.","Without --apply, this command only reports matching enrollments.","When --field-path is omitted, the API uses the sequence enrollmentFieldPath if configured."],examples:["sequenzy sequences cancel-enrollments seq_123 --subscriber-id sub_123 --apply","sequenzy sequences cancel-enrollments seq_123 --field-path order.id --field-values ord_123,ord_456"]});var a0A=J6.command("delete <id>").description("Delete a sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("delete",{id:A,...x}));X0(a0A,{examples:["sequenzy sequences delete seq_123"]});var C2=A8.command("ab-tests").description("Inspect and edit A/B test variants").action(()=>C2.help());X0(C2,{notes:["Use get to discover variant IDs, then update-variant to edit a specific A/B variant.","Only draft A/B tests can be edited.","create, add-variant, and delete-variant work on campaign and sequence A/B tests; delete works on campaign A/B tests only."],examples:["sequenzy ab-tests list --sequence seq_123","sequenzy ab-tests get ab_123","sequenzy ab-tests stats ab_123 --period 7d","sequenzy ab-tests create camp_123 --test-percentage 20 --winner-criteria open_rate",'sequenzy ab-tests add-variant ab_123 --subject "Alternative subject"',"sequenzy ab-tests restart ab_123 --source-variant var_b",'sequenzy ab-tests update-variant ab_123 var_b --subject "New subject"',"sequenzy ab-tests update-variant ab_123 var_b --blocks-file ./variant-b.json"]});var s0A=C2.command("list").description("List A/B tests").option("--sequence <id>","Filter by sequence ID").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>r2("list",A));X0(s0A,{examples:["sequenzy ab-tests list --sequence seq_123"]});var o0A=C2.command("get <id>").description("Get A/B test details and variants").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("get",{id:A,...x}));X0(o0A,{examples:["sequenzy ab-tests get ab_123"]});var t0A=C2.command("stats <id>").description("Get A/B test variant stats").option("-p, --period <period>","Time period (1h, 24h, 7d, 30d, 90d)").option("--start <iso>","Custom range start as ISO 8601").option("--end <iso>","Custom range end as ISO 8601").option("--include-bots","Include machine-classified bot/scanner opens and clicks").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("stats",{id:A,...x}));X0(t0A,{notes:["Use --period or both --start and --end. Custom ranges max at 90 days.","Bot/scanner opens and clicks are excluded by default; pass --include-bots to inspect raw engagement."],examples:["sequenzy ab-tests stats ab_123","sequenzy ab-tests stats ab_123 --period 30d","sequenzy ab-tests stats ab_123 --include-bots"]});var e0A=C2.command("restart <id>").description("Run another sequence A/B test from an existing variant").option("--source-variant <id>","Variant to use as the new control. Defaults to the selected winner.").option("--test-type <type>","Test type for generated variants: subject or content").option("--winner-threshold <count>","Subscribers before selecting a winner (10-1000)").option("--variant-count <count>","Total variants including control (2-4)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("restart",{id:A,...x}));X0(e0A,{notes:["Only sequence A/B tests with a selected winner can be restarted.","Run `sequenzy ab-tests get <id>` first to find variant IDs."],examples:["sequenzy ab-tests restart ab_123","sequenzy ab-tests restart ab_123 --source-variant var_b --test-type content --variant-count 3"]});var AAA=C2.command("update-variant <id> <variantId>").description("Update a draft A/B test variant").option("-s, --subject <subject>","Variant subject").option("--preview-text <text>","Variant preview text").option("--html <html>","Replacement HTML body").option("--html-file <file>","Read replacement HTML from file").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--confirm-live-change","Confirm updating a variant used by an active sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x,E)=>r2("update-variant",{id:A,variantId:x,...E}));X0(AAA,{notes:["Provide either HTML or blocks, not both.","Use --confirm-live-change when the variant belongs to an active sequence.","Run `sequenzy ab-tests get <id>` first to find variant IDs."],examples:['sequenzy ab-tests update-variant ab_123 var_b --subject "New subject"',"sequenzy ab-tests update-variant ab_123 var_b --html-file ./variant-b.html"]});var xAA=C2.command("create [campaignId]").description("Create a campaign or sequence-node A/B test").option("--automation-node <nodeId>","Convert this sequence email node into an A/B test node").option("--confirm-live-change","Confirm conversion of an email node in an active sequence").option("-n, --name <name>","A/B test name").option("--test-percentage <percent>","Share of the audience used for testing (5-50, default 20)").option("--duration-minutes <minutes>","Test duration before a winner is selected (15-1440, default 240)").option("--winner-criteria <criteria>","Winner criteria: open_rate or click_rate (default open_rate)").option("--test-type <type>","Sequence test type: subject or content (default content)").option("--winner-threshold <count>","Sequence test sample size (10-1000, default 100)").option("--variants-json <json>","Inline JSON array of extra variants ({subject, previewText?, blocks?})").option("--variants-file <file>","Path to a JSON file with extra variants ({subject, previewText?, blocks?})").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("create",{campaignId:A,automationNodeId:x.automationNode,...x}));X0(xAA,{notes:["Provide either a campaign ID or --automation-node, but not both.","Campaigns must be in draft or rejected status. Sequence node IDs must reference an email node.","Variant A is created automatically from the campaign email; provided variants are added after it."],examples:["sequenzy ab-tests create camp_123",`sequenzy ab-tests create --automation-node node_123 --test-type content --winner-threshold 100 --variants-json '[{"subject":"Variant B"}]'`,"sequenzy ab-tests create camp_123 --test-percentage 30 --duration-minutes 120 --winner-criteria click_rate",`sequenzy ab-tests create camp_123 --variants-json '[{"subject":"Alternative subject"}]'`]});var EAA=C2.command("add-variant <id>").description("Add a variant to a draft campaign or sequence A/B test").requiredOption("-s, --subject <subject>","Variant subject").option("--preview-text <text>","Variant preview text").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--confirm-live-change","Confirm adding a variant to an A/B test in an active sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("add-variant",{id:A,...x}));X0(EAA,{notes:["Variants can only be added while the A/B test is in draft status.","A/B tests in an active sequence require --confirm-live-change."],examples:['sequenzy ab-tests add-variant ab_123 --subject "Alternative subject"','sequenzy ab-tests add-variant ab_123 --subject "Alternative subject" --blocks-file ./variant.json']});var BAA=C2.command("delete-variant <id> <variantId>").description("Remove a variant from a draft campaign or sequence A/B test").option("-y, --yes","Skip the confirmation prompt").option("--confirm-live-change","Confirm deleting a variant from an A/B test in an active sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x,E)=>r2("delete-variant",{id:A,variantId:x,...E}));X0(BAA,{notes:["Variant A is the control variant and cannot be deleted.","Variants can only be removed while the A/B test is in draft status.","A/B tests in an active sequence require --confirm-live-change."],examples:["sequenzy ab-tests delete-variant ab_123 var_b --yes"]});var gAA=C2.command("delete <id>").description("Delete a campaign A/B test").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("delete",{id:A,...x}));X0(gAA,{notes:["Running A/B tests cannot be deleted; the linked campaign must be draft or rejected."],examples:["sequenzy ab-tests delete ab_123 --yes"]});var VD=A8.command("templates").description("Manage email templates").action(()=>VD.help());X0(VD,{notes:["Template content can be provided as raw HTML or as Sequenzy blocks JSON.","Templates can be assigned labels and listed by label for integration dashboards.","Use blocks when you need conditional content, per-block styles, or an exact editor-compatible structure.",$R],examples:["sequenzy templates list --company comp_123","sequenzy templates list --label edm --company comp_123",'sequenzy templates create welcome --subject "Welcome" --html-file ./welcome.html','sequenzy templates create welcome --subject "Welcome" --label edm template --html-file ./welcome.html','sequenzy templates create welcome --subject "Welcome" --blocks-file ./welcome-blocks.json','sequenzy templates update tmpl_123 --subject "Updated" --html-file ./welcome-v2.html','sequenzy templates localizations set tmpl_123 es --subject "Hola" --html-file ./welcome-es.html',"sequenzy templates localizations sync tmpl_123 --locale es fr"]});var QAA=VD.command("list").description("List all templates").option("--label <labels...>","Filter by label name").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>jD("list",A));X0(QAA,{examples:["sequenzy templates list --company comp_123","sequenzy templates list --label edm --company comp_123"]});var DAA=VD.command("get <id>").description("Get template details").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>jD("get",{id:A,...x}));X0(DAA,{examples:["sequenzy templates get tmpl_123 --company comp_123"]});var CAA=VD.command("create <name>").description("Create a template").option("-s, --subject <subject>","Email subject (optional with --prompt)").option("--preview-text <text>","Email preview text override").option("--prompt <prompt>","Generate branded native blocks from a prompt").option("--style <style>","Prompt generation style").option("--tone <tone>","Prompt generation tone").option("--html <html>","Email HTML content").option("--html-file <file>","Read HTML from file").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--label <labels...>","Label names to assign").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>jD("create",{name:A,...x}));X0(CAA,{notes:["Provide exactly one of prompt, HTML, or blocks JSON content.","Use blocks when you need conditional content, per-block styles, or exact editor parity."],examples:['sequenzy templates create welcome --prompt "Welcome new customers"','sequenzy templates create welcome --subject "Welcome" --html-file ./welcome.html','sequenzy templates create welcome --subject "Welcome" --label edm template --html-file ./welcome.html','sequenzy templates create welcome --subject "Welcome" --blocks-file ./welcome-blocks.json']});var FAA=VD.command("update <id>").description("Update a template").option("-n, --name <name>","Template name").option("-s, --subject <subject>","Email subject").option("--html <html>","Email HTML content").option("--html-file <file>","Read HTML from file").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--label <labels...>","Replace label names").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>jD("update",{id:A,...x}));X0(FAA,{notes:["Provide at least one of --name, --subject, --label, --html, --html-file, --blocks-json, or --blocks-file.","Do not combine HTML flags with blocks flags in the same request."],examples:['sequenzy templates update tmpl_123 --subject "Updated"',"sequenzy templates update tmpl_123 --label edm template","sequenzy templates update tmpl_123 --html-file ./welcome-v2.html","sequenzy templates update tmpl_123 --blocks-file ./welcome-v2-blocks.json"]});var qR=VD.command("localizations").description("Manage localized template variants").action(()=>qR.help());X0(qR,{notes:["Set stores caller-supplied localized content immediately.","Sync queues AI translation for selected locales, or every enabled non-primary locale when --locale is omitted."],examples:['sequenzy templates localizations set tmpl_123 es --subject "Hola" --html-file ./welcome-es.html',"sequenzy templates localizations sync tmpl_123 --locale es fr","sequenzy templates localizations sync tmpl_123"]});var IAA=qR.command("set <id> <locale>").description("Create or replace a localized template variant").requiredOption("-s, --subject <subject>","Localized email subject").option("--preview-text <text>","Localized email preview text").option("--html <html>","Localized email HTML content").option("--html-file <file>","Read localized HTML from file").option("--blocks-json <json>","Inline JSON array of localized Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with localized Sequenzy email blocks").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x,E)=>jD("set-localization",{id:A,locale:x,...E}));X0(IAA,{notes:["The locale must be enabled in the company's localization settings and cannot be the primary locale.","Provide exactly one HTML or blocks content source."],examples:['sequenzy templates localizations set tmpl_123 es --subject "Hola" --html-file ./welcome-es.html','sequenzy templates localizations set tmpl_123 fr-CA --subject "Bienvenue" --blocks-file ./welcome-fr-ca.json']});var wAA=qR.command("sync <id>").description("Queue AI translation for template locales").option("--locale <locales...>","Enabled locales to sync; omit to sync every non-primary locale").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>jD("sync-localizations",{id:A,locales:x.locale,company:x.company,json:x.json}));X0(wAA,{examples:["sequenzy templates localizations sync tmpl_123 --locale es fr","sequenzy templates localizations sync tmpl_123"]});var JAA=VD.command("delete <id>").description("Delete a template").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>jD("delete",{id:A,...x}));X0(JAA,{notes:["Deletion fails when the template is still referenced by a campaign or sequence."],examples:["sequenzy templates delete tmpl_123"]});var qJ=A8.command("companies").description("Inspect or create companies").action(()=>qJ.help());X0(qJ,{notes:["Company creation starts background website processing automatically."],examples:["sequenzy companies list","sequenzy companies get comp_123","sequenzy companies update comp_123 --primary-color '#0ea5e9'","sequenzy companies create example.com --name Example"]});var fAA=qJ.command("list").description("List accessible companies").option("--json","Print raw JSON").action((A)=>mH("list",A));X0(fAA,{examples:["sequenzy companies list"]});var KAA=qJ.command("get <id>").description("Get company details").option("--json","Print raw JSON").action((A,x)=>mH("get",{id:A,...x}));X0(KAA,{examples:["sequenzy companies get comp_123"]});var $AA=qJ.command("update <id>").description("Update company info, brand context, and reply tracking").option("-n, --name <name>","Company display name").option("--description <text>","Short product or company summary").option("--description-file <path>","Read description from a file").option("--logo-url <url>","Public logo URL").option("--founder-name <name>","Founder or sender name").option("--primary-color <hex>","Primary brand color, e.g. #f97316").option("--brand-colors-json <json>","Brand colors object as JSON").option("--brand-colors-file <path>","Read brand colors JSON from a file").option("--value-props-json <json>","Value propositions array as JSON").option("--value-props-file <path>","Read value propositions JSON from a file").option("--testimonials-json <json>","Testimonials array as JSON").option("--testimonials-file <path>","Read testimonials JSON from a file").option("--tone-voice <text>","Tone of voice guidance").option("--company-context <text>","Product knowledge for AI writing").option("--company-context-file <path>","Read product knowledge from a file").option("--email-length-preference <value>","Email length: concise, balanced, or detailed").option("--social-links-json <json>","Social links object as JSON").option("--social-links-file <path>","Read social links JSON from a file").option("--privacy-policy-url <url>","Privacy policy URL").option("--terms-url <url>","Terms of service URL").option("--address <address>","Physical mailing address").option("--language <code>","Primary language code").option("--pricing-json <json>","Pricing object as JSON").option("--pricing-file <path>","Read pricing JSON from a file").option("--font-family <family>","Default email font family").option("--email-theme-json <json>","Default email theme as JSON (partial: presetId, colors, typography, layout; pass null to reset)").option("--email-theme-file <path>","Read the default email theme JSON from a file").option("--email-direction <direction>","Default email direction: ltr or rtl").option("--enable-reply-tracking","Enable inbound reply tracking").option("--disable-reply-tracking","Disable inbound reply tracking").option("--reply-tracking-domain-mode <mode>","Reply domain mode: sequenzy or custom").option("--enable-reply-forwarding","Enable captured reply forwarding").option("--disable-reply-forwarding","Disable captured reply forwarding").option("--json","Print raw JSON").action((A,x)=>mH("update",{id:A,...x}));X0($AA,{examples:["sequenzy companies update comp_123 --primary-color '#0ea5e9'",`sequenzy companies update comp_123 --email-theme-json '{"colors":{"mutedText":"#4b5563"},"typography":{"baseFontSize":16}}'`,"sequenzy companies update comp_123 --company-context-file ./product.md --tone-voice 'clear, direct, warm'","sequenzy companies update comp_123 --enable-reply-tracking --reply-tracking-domain-mode sequenzy",`sequenzy companies update comp_123 --value-props-json '[{"title":"Fast setup","description":"Launch lifecycle emails in minutes."}]'`]});var HAA=qJ.command("create <domain>").description("Create a company and queue website processing").option("-n, --name <name>","Company name").option("--json","Print raw JSON").action((A,x)=>mH("create",{domain:A,...x}));X0(HAA,{examples:["sequenzy companies create example.com","sequenzy companies create https://example.com --name Example"]});var Ry=A8.command("tags").description("Manage tag definitions").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>yJ("list",A));X0(Ry,{notes:["Running `sequenzy tags` without a subcommand lists tag definitions.","Tag names are normalized to lowercase with dashes; system tags cannot be changed or deleted."],examples:["sequenzy tags --company comp_123","sequenzy tags list","sequenzy tags create vip --color purple","sequenzy tags update tag_123 --color red","sequenzy tags delete tag_123 --yes"]});var yAA=Ry.command("list").description("List tag definitions").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>yJ("list",A));X0(yAA,{examples:["sequenzy tags list --company comp_123"]});var qAA=Ry.command("create <name>").description("Create a tag definition").option("--color <color>","Tag color, e.g. gray, red, green, blue, purple").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>yJ("create",{name:A,...x}));X0(qAA,{notes:["Names are normalized to lowercase with dashes, so `VIP Customer` becomes `vip-customer`."],examples:["sequenzy tags create vip","sequenzy tags create vip --color purple"]});var YAA=Ry.command("update <tagId>").description("Update a tag definition color").requiredOption("--color <color>","New tag color").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>yJ("update",{tagId:A,...x}));X0(YAA,{notes:["System tags cannot be updated."],examples:["sequenzy tags update tag_123 --color red"]});var XAA=Ry.command("delete <tagId>").description("Delete a tag definition").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>yJ("delete",{tagId:A,...x}));X0(XAA,{notes:["Deleting a tag removes it from every subscriber.","Tags used by sequences cannot be deleted until those sequences stop referencing them."],examples:["sequenzy tags delete tag_123 --yes"]});var bg=A8.command("lists").description("Manage subscriber lists").action(()=>bg.help());X0(bg,{examples:["sequenzy lists list --company comp_123",'sequenzy lists create Newsletter --description "Public newsletter list"','sequenzy lists update list_123 --name "Weekly Newsletter" --private',"sequenzy lists add-subscribers list_123 --emails-file ./batch-001.csv","sequenzy lists remove-subscribers list_123 --email one@example.com","sequenzy lists import list_123 --emails-file ./batch-001.csv","sequenzy lists delete list_123 --yes"]});var UAA=bg.command("list").description("List subscriber lists").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>UD("list",A));X0(UAA,{examples:["sequenzy lists list --company comp_123"]});var ZAA=bg.command("create <name>").description("Create a subscriber list").option("-d, --description <text>","List description").option("--private","Mark the list as private").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("create",{name:A,...x}));X0(ZAA,{examples:['sequenzy lists create Newsletter --description "Public newsletter list"',"sequenzy lists create VIP --private --company comp_123"]});var GAA=bg.command("add-subscribers <listId>").description("Add subscribers to a list from emails, JSON, or a file").option("-e, --email <emails...>","Email addresses to add").option("--emails-json <json>","JSON array of emails, or an object with emails/subscribers").option("--emails-file <file>","JSON, CSV, or newline-separated file with subscriber emails").option("--duplicate-strategy <strategy>","Duplicate strategy: skip, merge, or overwrite","skip").option("--enroll-sequences","Enroll newly created subscribers in matching sequences").option("--opt-in-mode <mode>","Consent mode: default, confirmed, or double_opt_in","default").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("add-subscribers",{listId:A,...x}));X0(GAA,{notes:["Provide exactly one source: --email, --emails-json, or --emails-file.","Files may be newline-separated, CSV with an email column, a JSON email array, or a JSON object with emails/subscribers.","CSV headers named email, e-mail, email address, or mail are detected; otherwise the first column is used.","New subscribers are not enrolled in matching sequences unless --enroll-sequences is set."],examples:["sequenzy lists add-subscribers list_123 --email one@example.com two@example.com",`sequenzy lists add-subscribers list_123 --emails-json '["one@example.com","two@example.com"]'`,"sequenzy lists add-subscribers list_123 --emails-file ./batch-001.csv"]});var WAA=bg.command("import <listId>").description("Alias for add-subscribers; import subscribers into a list").option("-e, --email <emails...>","Email addresses to add").option("--emails-json <json>","JSON array of emails, or an object with emails/subscribers").option("--emails-file <file>","JSON, CSV, or newline-separated file with subscriber emails").option("--duplicate-strategy <strategy>","Duplicate strategy: skip, merge, or overwrite","skip").option("--enroll-sequences","Enroll newly created subscribers in matching sequences").option("--opt-in-mode <mode>","Consent mode: default, confirmed, or double_opt_in","default").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("add-subscribers",{listId:A,...x}));X0(WAA,{notes:["`lists import` is an alias for `lists add-subscribers`.","Provide exactly one source: --email, --emails-json, or --emails-file.","Files may be newline-separated, CSV with an email column, a JSON email array, or a JSON object with emails/subscribers.","CSV headers named email, e-mail, email address, or mail are detected; otherwise the first column is used."],examples:["sequenzy lists import list_123 --emails-file ./batch-001.csv",`sequenzy lists import list_123 --emails-json '["one@example.com","two@example.com"]'`]});var RAA=bg.command("update <listId>").description("Update a subscriber list").option("-n, --name <name>","List name").option("-d, --description <text>","List description").option("--private","Mark the list as private").option("--no-private","Mark the list as public").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("update",{listId:A,...x}));X0(RAA,{notes:["Provide at least one of --name, --description, --private, or --no-private."],examples:['sequenzy lists update list_123 --name "Weekly Newsletter"',"sequenzy lists update list_123 --private","sequenzy lists update list_123 --no-private"]});var MAA=bg.command("remove-subscribers <listId>").description("Remove subscribers from a list by email").option("-e, --email <emails...>","Email addresses to remove").option("--emails-json <json>","JSON array of emails, or an object with emails/subscribers").option("--emails-file <file>","JSON, CSV, or newline-separated file with subscriber emails").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("remove-subscribers",{listId:A,...x}));X0(MAA,{notes:["Provide exactly one source: --email, --emails-json, or --emails-file.","Subscribers are only removed from the list; they stay in your audience.","Emails that do not match a subscriber are reported as not found."],examples:["sequenzy lists remove-subscribers list_123 --email one@example.com two@example.com","sequenzy lists remove-subscribers list_123 --emails-file ./churned.csv"]});var zAA=bg.command("delete <listId>").description("Delete a subscriber list").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("delete",{listId:A,...x}));X0(zAA,{notes:["Deleting a list removes all of its memberships; subscribers themselves are kept."],examples:["sequenzy lists delete list_123 --yes"]});var dF=A8.command("segments").description("Manage segments").action(()=>dF.help());X0(dF,{notes:["Use --filter-json for arbitrary segment filters. The CLI will fill in missing filter IDs.","Use --match any to create a segment that matches any filter instead of all filters.",'Engagement filters (emailSent, emailOpened, emailClicked, emailBounced, emailComplained) accept either a time range as the value ("7d", "30d", "90d", "180d", "all") OR a specific campaign ("campaign:<campaign_id>"). Combine multiple engagement filters with --match all to build things like "bounced campaign A but not campaign B".'],examples:["sequenzy segments list --company comp_123",'sequenzy segments create --name "Bought Pro" --stripe-product prod_pro',`sequenzy segments create --name "VIP or Churn Risk" --match any --filter-json '[{"field":"tag","operator":"contains","value":"vip"},{"field":"emailOpened","operator":"is_not","value":"30d"}]'`,`sequenzy segments create --name "Bounced A not B" --filter-json '[{"field":"emailBounced","operator":"is","value":"campaign:cmp_abc"},{"field":"emailBounced","operator":"is_not","value":"campaign:cmp_xyz"}]'`]});var SAA=dF.command("list").description("List all segments").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>pw("list",A));X0(SAA,{examples:["sequenzy segments list --company comp_123"]});var LAA=dF.command("create").description("Create a segment").requiredOption("-n, --name <name>","Segment name").option("-c, --company <id>","Company ID override for personal API keys").option("--match <mode>","How filters combine: all or any","all").option("--stripe-product <id>","Stripe product ID to segment on").option("--commerce-product <id>","Commerce product to segment on, as provider:productId (e.g. shopify:42); a bare ID matches any provider").option("--purchase-operator <operator>","Purchase operator (bought, didnt-buy, at-least, less-than)","bought").option("--payments <number>","Payment threshold for at-least/less-than").option("--orders <number>","Order threshold for at-least/less-than with --commerce-product").option("--filter-json <json>","Raw JSON array of segment filters (IDs are optional)").option("--json","Print raw JSON").action((A)=>pw("create",A));X0(LAA,{examples:['sequenzy segments create --name "Bought Pro" --stripe-product prod_pro','sequenzy segments create --name "3+ Pro Payments" --stripe-product prod_pro --purchase-operator at-least --payments 3','sequenzy segments create --name "Starter Kit Buyers" --commerce-product api:prod-starter-kit','sequenzy segments create --name "Repeat Kit Buyers" --commerce-product api:prod-starter-kit --purchase-operator at-least --orders 2',`sequenzy segments create --name "VIP or Churn Risk" --match any --filter-json '[{"field":"tag","operator":"contains","value":"vip"},{"field":"emailOpened","operator":"is_not","value":"30d"}]'`,`sequenzy segments create --name "Bounced A not B" --filter-json '[{"field":"emailBounced","operator":"is","value":"campaign:cmp_abc"},{"field":"emailBounced","operator":"is_not","value":"campaign:cmp_xyz"}]'`]});var OAA=dF.command("count <id>").description("Get subscriber count for a segment").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>pw("count",{id:A,...x}));X0(OAA,{examples:["sequenzy segments count seg_123 --company comp_123"]});var PAA=dF.command("update <id>").description("Update a segment name, filters, or join operator").option("-n, --name <name>","Segment name").option("--filters-json <json>","Raw JSON array of segment filters, or an object with a root group").option("--filters-file <file>","Path to a JSON file with segment filters or a root group").option("--join-operator <operator>","How filters combine: and or or").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>pw("update",{id:A,...x}));X0(PAA,{notes:["Provide at least one of --name, --filters-json, --filters-file, or --join-operator.","Filters replace the existing filter set; missing filter IDs are filled in by the CLI."],examples:['sequenzy segments update seg_123 --name "Churn Risk"',`sequenzy segments update seg_123 --filters-json '[{"field":"tag","operator":"contains","value":"vip"}]'`,"sequenzy segments update seg_123 --join-operator or"]});var jAA=dF.command("delete <id>").description("Delete a segment").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>pw("delete",{id:A,...x}));X0(jAA,{examples:["sequenzy segments delete seg_123 --yes"]});var vD=A8.command("audience-syncs").description("Sync segments to Meta custom audiences").action(()=>vD.help());X0(vD,{notes:["Requires the Meta Ads integration to be connected in the dashboard (Settings -> Integrations).",'Use --template to start from a ready-made segment ("zero-ltv", "no-purchase-1y", "recent-buyers", "high-spenders-ecom", "non-buyers", "engaged"); the segment is created automatically on first use.',"Audiences are add-only: subscribers who leave the segment stay in the Meta audience."],examples:["sequenzy audience-syncs list",'sequenzy audience-syncs create --template recent-buyers --ad-account act_123 --name "Sequenzy - Recent buyers"']});var NAA=vD.command("list").description("List audience syncs with schedule and status").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>zF("list",A));X0(NAA,{examples:["sequenzy audience-syncs list --company comp_123"]});var VAA=vD.command("ad-accounts").description("List the connected Meta ad accounts").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>zF("ad-accounts",A));X0(VAA,{examples:["sequenzy audience-syncs ad-accounts"]});var vAA=vD.command("create").description("Create an audience sync (segment -> Meta custom audience)").option("--segment <id>","Existing segment ID to sync").option("--template <id>",'Predefined segment template (for example "recent-buyers", "zero-ltv", "no-purchase-1y")').requiredOption("--ad-account <id>","Meta ad account ID (see `sequenzy audience-syncs ad-accounts`)").requiredOption("-n, --name <name>","Audience name in Meta Ads Manager").option("--frequency <frequency>","Sync frequency: hourly, daily, or weekly","daily").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>zF("create",A));X0(vAA,{examples:['sequenzy audience-syncs create --template recent-buyers --ad-account act_123 --name "Sequenzy - Recent buyers"','sequenzy audience-syncs create --segment seg_123 --ad-account act_123 --name "Sequenzy - VIPs" --frequency hourly']});var uAA=vD.command("update <id>").description("Change an audience sync's frequency or pause/resume it").option("--frequency <frequency>","Sync frequency: hourly, daily, or weekly").option("--active <bool>","true to resume, false to pause").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>zF("update",{id:A,...x}));X0(uAA,{examples:["sequenzy audience-syncs update sync_123 --frequency weekly","sequenzy audience-syncs update sync_123 --active false"]});var TAA=vD.command("delete <id>").description("Remove an audience sync (the Meta audience itself is kept)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>zF("delete",{id:A,...x}));X0(TAA,{examples:["sequenzy audience-syncs delete sync_123"]});var hAA=vD.command("sync <id>").description("Trigger an immediate sync run").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>zF("sync",{id:A,...x}));X0(hAA,{examples:["sequenzy audience-syncs sync sync_123"]});var uD=A8.command("products").description("Manage products and digital delivery files").action(()=>uD.help());X0(uD,{notes:["Products sync from Stripe, Shopify, and WooCommerce integrations.","Attach a deliverable file to a Stripe product, then reference it in purchase sequence emails with {{event.download.url}} and {{event.download.name}}."],examples:["sequenzy products list --provider stripe","sequenzy products sync",'sequenzy products upsert my-ebook --title "The Ebook" --price-cents 1900 --file ./ebook.pdf',"sequenzy products attach-file prod_abc --file ./guide.pdf","sequenzy products attach-file prod_abc --url https://example.com/guide.pdf --name guide.pdf","sequenzy products detach-file prod_abc","sequenzy products delete my-ebook"]});var bAA=uD.command("list").description("List synced products including attached delivery files").option("-c, --company <id>","Company ID override for personal API keys").option("--provider <provider>","Filter by provider (stripe, shopify, woocommerce, manual)").option("--search <query>","Filter products by title").option("--json","Print raw JSON").action((A)=>LF("list",A));X0(bAA,{examples:["sequenzy products list --provider stripe"]});var kAA=uD.command("sync").description("Queue a Stripe product catalog sync").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>LF("sync",A));X0(kAA,{examples:["sequenzy products sync --company comp_123"]});var iAA=uD.command("upsert [productId]").description("Create or update products in the catalog (Commerce API, keyed by your productId)").option("--title <title>","Product title (required for single upserts)").option("--description <text>","Product description").option("--price-cents <cents>","Price in the smallest currency unit").option("--currency <code>","ISO currency code, e.g. USD").option("--image-url <url>","Product image URL").option("--product-url <url>","Product page URL").option("--in-stock","Mark the product as in stock").option("--out-of-stock","Mark the product as out of stock").option("--file <path>","Deliverable file to upload and attach in one step").option("--url <link>","External deliverable http(s) link to attach in one step").option("--name <fileName>","Display name for the attached deliverable").option("--products-json <json>","Inline JSON array of products to upsert").option("--products-file <file>","Path to a JSON file with products to upsert").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>LF("upsert",x,A));X0(iAA,{notes:["Products are keyed by your own productId and stored under the api provider.","Combine --file or --url with a single-product upsert to attach the deliverable file in the same command.","Use --products-json/--products-file for bulk upserts of up to 100 products."],examples:['sequenzy products upsert my-ebook --title "The Ebook" --price-cents 1900 --currency USD --file ./ebook.pdf','sequenzy products upsert my-course --title "The Course" --url https://files.example.com/course.zip',"sequenzy products upsert --products-file ./products.json"]});var mAA=uD.command("delete <productId>").description("Delete a product previously pushed via the Commerce API").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>LF("delete",x,A));X0(mAA,{examples:["sequenzy products delete my-ebook"]});var cAA=uD.command("attach-file <id>").description("Attach the deliverable file buyers receive after purchase").option("--file <path>","Local file to upload (PDF, ePub, ZIP, media)").option("--url <link>","External http(s) link instead of an upload").option("--name <fileName>","Display name for the file (e.g. guide.pdf)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>LF("attach-file",x,A));X0(cAA,{examples:["sequenzy products attach-file prod_abc --file ./guide.pdf","sequenzy products attach-file prod_abc --url https://example.com/template.zip --name template.zip"]});var rAA=uD.command("detach-file <id>").description("Remove the attached delivery file from a product").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>LF("detach-file",x,A));X0(rAA,{examples:["sequenzy products detach-file prod_abc"]});var My=A8.command("team").description("Manage team members and invitations").action(()=>My.help());X0(My,{notes:["Inviting and cancelling invitations requires owner or admin access.","Billing access can only be granted by the company owner."],examples:["sequenzy team list","sequenzy team invite teammate@example.com --role admin","sequenzy team cancel-invitation inv_123"]});var pAA=My.command("list").description("List team members and pending invitations").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>JR("list",A));X0(pAA,{examples:["sequenzy team list --company comp_123"]});var _AA=My.command("invite <email>").description("Invite a team member or add an existing user").requiredOption("--role <role>","Member role: admin, viewer, or restricted").option("--billing-access","Allow the member to manage billing (owner only)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>JR("invite",{email:A,...x}));X0(_AA,{notes:["Existing Sequenzy users are added to the team immediately; everyone else receives an email invitation.","Invitations expire automatically and can be re-sent by inviting the same email again after cancelling."],examples:["sequenzy team invite teammate@example.com --role admin","sequenzy team invite editor@example.com --role restricted","sequenzy team invite finance@example.com --role viewer --billing-access"]});var nAA=My.command("cancel-invitation <invitationId>").description("Cancel a pending team invitation").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>JR("cancel-invitation",{invitationId:A,...x}));X0(nAA,{notes:["Run `sequenzy team list` first to find invitation IDs."],examples:["sequenzy team cancel-invitation inv_123 --yes"]});var TD=A8.command("inbox").description("Manage subscriber reply conversations").action(()=>TD.help());X0(TD,{notes:["The inbox collects subscriber replies to campaigns, sequences, and transactional email.","Use --note on replies to add an internal note instead of emailing the subscriber."],examples:["sequenzy inbox list --status open --unread","sequenzy inbox get conv_123","sequenzy inbox reply conv_123 --text 'Thanks for reaching out!'","sequenzy inbox close conv_123"]});var lAA=TD.command("list").description("List conversations").option("-s, --status <status>","Filter by status: open, closed, or all").option("--search <query>","Search by subscriber email, name, or subject").option("--unread","Only conversations with unread messages").option("-p, --page <number>","Page number (default 1)").option("-l, --limit <number>","Results per page (1-100, default 20)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>SF("list",A));X0(lAA,{examples:["sequenzy inbox list","sequenzy inbox list --status open --unread",'sequenzy inbox list --search "refund" --limit 50']});var dAA=TD.command("get <conversationId>").description("Get a conversation with its full message history").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>SF("get",{conversationId:A,...x}));X0(dAA,{examples:["sequenzy inbox get conv_123","sequenzy inbox get conv_123 --json"]});var aAA=TD.command("reply <conversationId>").description("Reply to a conversation or add an internal note").option("-t, --text <text>","Plain text message body").option("--html-file <file>","Read an HTML message body from file").option("-s, --subject <subject>","Override the reply subject").option("--note","Add an internal note instead of emailing the subscriber").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>SF("reply",{conversationId:A,...x}));X0(aAA,{notes:["Provide a body with --text and/or --html-file.","Outbound replies are emailed to the subscriber and reopen closed conversations; notes are internal only."],examples:["sequenzy inbox reply conv_123 --text 'Thanks for reaching out!'","sequenzy inbox reply conv_123 --html-file ./reply.html","sequenzy inbox reply conv_123 --text 'Customer asked for a refund' --note"]});var sAA=TD.command("close <conversationId>").description("Close a conversation").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>SF("close",{conversationId:A,...x}));X0(sAA,{examples:["sequenzy inbox close conv_123"]});var oAA=TD.command("reopen <conversationId>").description("Reopen a closed conversation").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>SF("reopen",{conversationId:A,...x}));X0(oAA,{examples:["sequenzy inbox reopen conv_123"]});var tAA=TD.command("mark-read <conversationId>").description("Mark all messages in a conversation as read").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>SF("mark-read",{conversationId:A,...x}));X0(tAA,{examples:["sequenzy inbox mark-read conv_123"]});var kg=A8.command("webhooks").description("Manage outbound webhook endpoints").action(()=>kg.help());X0(kg,{notes:["Webhook payloads are signed; the signing secret is only shown once at creation time.","Valid events cover email.*, subscriber.*, and sequence.* types; omit --event to use the default set."],examples:["sequenzy webhooks list","sequenzy webhooks create --name CI --url https://example.com/hook --event email.bounced","sequenzy webhooks deliveries wh_123 --limit 50","sequenzy webhooks replay wh_123 del_456"]});var eAA=kg.command("list").description("List outbound webhook endpoints").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>ND("list",A));X0(eAA,{examples:["sequenzy webhooks list --company comp_123"]});var AxA=kg.command("create").description("Create an outbound webhook endpoint").requiredOption("-n, --name <name>","Webhook name").requiredOption("-u, --url <url>","HTTPS endpoint URL").option("-e, --event <events...>","Event types to deliver, e.g. email.bounced subscriber.list_subscribed subscriber.list_unsubscribed").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>ND("create",A));X0(AxA,{notes:["The signing secret is printed once on creation and cannot be retrieved later - store it immediately.","Omit --event to subscribe to the default event set."],examples:["sequenzy webhooks create --name CI --url https://example.com/hook --event email.bounced","sequenzy webhooks create --name 'All events' --url https://example.com/hook"]});var xxA=kg.command("update <id>").description("Update an outbound webhook endpoint").option("-n, --name <name>","Webhook name").option("-u, --url <url>","HTTPS endpoint URL").option("-e, --event <events...>","Replacement event types").option("--enable","Enable the webhook").option("--disable","Disable the webhook").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>ND("update",{id:A,...x}));X0(xxA,{notes:["Provide at least one of --name, --url, --event, --enable, or --disable.","Changing the URL or re-enabling resets the failure circuit breaker."],examples:["sequenzy webhooks update wh_123 --url https://example.com/new-hook","sequenzy webhooks update wh_123 --event email.bounced email.complained","sequenzy webhooks update wh_123 --disable"]});var ExA=kg.command("delete <id>").description("Delete an outbound webhook endpoint").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>ND("delete",{id:A,...x}));X0(ExA,{examples:["sequenzy webhooks delete wh_123 --yes"]});var BxA=kg.command("test <id>").description("Send a test event to a webhook endpoint").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>ND("test",{id:A,...x}));X0(BxA,{notes:["The webhook must be enabled to receive a test event."],examples:["sequenzy webhooks test wh_123"]});var gxA=kg.command("deliveries <id>").description("List recent deliveries for a webhook endpoint").option("-l, --limit <number>","Maximum deliveries to return (1-100)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>ND("deliveries",{id:A,...x}));X0(gxA,{examples:["sequenzy webhooks deliveries wh_123","sequenzy webhooks deliveries wh_123 --limit 50"]});var QxA=kg.command("replay <id> <deliveryId>").description("Replay a webhook delivery").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x,E)=>ND("replay",{id:A,deliveryId:x,...E}));X0(QxA,{notes:["Run `sequenzy webhooks deliveries <id>` first to find delivery IDs."],examples:["sequenzy webhooks replay wh_123 del_456"]});var DxA=A8.command("account").description("Verify the active API key, permissions, and account context").option("--json","Print JSON").action(o90);X0(DxA,{notes:["Makes a live API request with the active credential. Compare its key name and prefix with Settings after replacing a key."],examples:["sequenzy account","sequenzy account --json"]});var CxA=A8.command("feedback <message>").description("Send product feedback about Sequenzy to the Sequenzy team").option("--category <category>","Category: missing_capability, bug, docs, ux, praise, other (default: other)").option("--context <context>","What you were trying to accomplish when you hit the gap").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>J60(A,x));X0(CxA,{notes:["Agents: send feedback whenever the user wanted something the CLI, API, or MCP tools do not support. The Sequenzy team reads every submission."],examples:['sequenzy feedback "No command to bulk-delete campaigns by label" --category missing_capability','sequenzy feedback "Segment count and list output disagree for seg_123" --category bug --context "Auditing a re-engagement segment"']});var YJ=A8.command("api-keys").description("Manage company API keys").action(()=>YJ.help());X0(YJ,{notes:["The plain API key is only returned on creation. Save it immediately.","Listing and revocation return metadata only; secrets and stored hashes are never returned."],examples:["sequenzy api-keys list --company comp_123","sequenzy api-keys create",'sequenzy api-keys create --name "CI deploy key" --company comp_123',"sequenzy api-keys revoke key_123 --company comp_123 --yes"]});var FxA=YJ.command("create").description("Create a company API key").option("-n, --name <name>","Human-readable API key name").option("-c, --company <id>","Company ID override for personal API keys").option("--preset <preset>","Permission preset: full_access, read_only, agent_safe, ai_drafting, data_ingest_safe, data_ingest_automations, transactional_sender, marketing_sender (default: full_access)").option("--scopes <scopes>","Comma-separated explicit permission scopes (overrides --preset)").option("--json","Print raw JSON").action((A)=>iH("create",A));X0(FxA,{notes:["Keys default to full access. Pass --preset or --scopes to restrict what the key can do."],examples:["sequenzy api-keys create",'sequenzy api-keys create --name "CI deploy key" --company comp_123','sequenzy api-keys create --preset transactional_sender --name "Order emails"','sequenzy api-keys create --scopes "subscribers:read,subscribers:write,events:write"']});var IxA=YJ.command("list").description("List company API keys without secret values").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>iH("list",A));X0(IxA,{notes:["Use the returned ID, name, prefix, and current-key marker to identify a key before revoking it."],examples:["sequenzy api-keys list","sequenzy api-keys list --company comp_123 --json"]});var wxA=YJ.command("revoke").description("Permanently revoke a company API key").argument("<api-key-id>","Exact API key ID returned by api-keys list").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>iH("revoke",{apiKeyId:A,...x}));X0(wxA,{notes:["Revocation cannot be undone. Run 'sequenzy api-keys list' first and verify the exact ID and prefix."],examples:["sequenzy api-keys revoke key_123 --company comp_123 --yes"]});var JxA=YJ.command("delete").description("Alias for api-keys revoke").argument("<api-key-id>","Exact API key ID returned by api-keys list").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>iH("delete",{apiKeyId:A,...x}));X0(JxA,{notes:["This is a compatibility alias for 'sequenzy api-keys revoke'."],examples:["sequenzy api-keys delete key_123 --company comp_123 --yes"]});var XJ=A8.command("websites").description("Manage sending domains and integration guides").action(()=>XJ.help());X0(XJ,{notes:["Use 'guide' for code examples and 'check' to inspect current DNS verification details."],examples:["sequenzy websites list --company comp_123","sequenzy websites add example.com --company comp_123","sequenzy websites guide --framework nextjs --use-case transactional"]});var fxA=XJ.command("list").description("List sending domains for a company").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>Zy("list",A));X0(fxA,{examples:["sequenzy websites list --company comp_123"]});var KxA=XJ.command("add <domain>").description("Add a sending domain").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>Zy("add",{domain:A,...x}));X0(KxA,{examples:["sequenzy websites add example.com --company comp_123"]});var $xA=XJ.command("check <domain>").description("Inspect sending domain verification details").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>Zy("check",{domain:A,...x}));X0($xA,{examples:["sequenzy websites check example.com --company comp_123"]});var HxA=XJ.command("guide").description("Print framework-specific integration code").option("--framework <name>","Framework name, e.g. nextjs, express, python").option("--use-case <name>","Use case, e.g. transactional, subscribe_form, event_tracking").option("--json","Print raw JSON").action((A)=>Zy("guide",A));X0(HxA,{examples:["sequenzy websites guide","sequenzy websites guide --framework nextjs --use-case transactional","sequenzy websites guide --framework python --use-case event_tracking"]});var jk=A8.command("shopify").description("Manage the connected Shopify store's automation settings").action(()=>jk.help());X0(jk,{notes:["Requires a connected Shopify integration on the company.","Browse abandonment emails shoppers who viewed a product but didn't buy; price drop alerts email recent viewers when a product's price falls."],examples:["sequenzy shopify settings get","sequenzy shopify settings update --price-drop off","sequenzy shopify settings update --browse-delay-hours 4 --browse-cooldown-hours 48"]});var Nk=jk.command("settings").description("Browse-abandonment and price-drop automation settings").action(()=>Nk.help()),yxA=Nk.command("get").description("Show the effective automation settings").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>vb("get",A));X0(yxA,{notes:["Shows the effective values - platform defaults apply until the store overrides them."],examples:["sequenzy shopify settings get --json"]});var qxA=Nk.command("update").description("Update browse-abandonment and/or price-drop settings").option("--browse-abandonment <on|off>","Enable or disable browse abandonment").option("--browse-delay-hours <hours>","Hours to wait after a product view before the abandonment check (default 2)").option("--browse-cooldown-hours <hours>","Minimum hours between browse-abandoned events per subscriber (default 24)").option("--reset-browse-abandonment","Reset browse abandonment to the platform defaults").option("--price-drop <on|off>","Enable or disable price drop alerts").option("--price-drop-min-percent <percent>","Minimum price decrease percent to alert on (default 5)").option("--price-drop-lookback-days <days>","How many days back viewers qualify as the audience (default 30)").option("--price-drop-cooldown-days <days>","Minimum days between price-drop events per subscriber and product (default 7)").option("--reset-price-drop","Reset price drop alerts to the platform defaults").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>vb("update",A));X0(qxA,{notes:["Partial update: omitted flags keep their current values.","If no sequence handles ecommerce.price_drop, Sequenzy sends a default price-drop email to active subscribers."],examples:["sequenzy shopify settings update --browse-abandonment off","sequenzy shopify settings update --price-drop-min-percent 10 --price-drop-lookback-days 14","sequenzy shopify settings update --reset-price-drop"]});var YR=A8.command("sms").description("Inspect the SMS add-on status for a company").action(()=>YR.help());X0(YR,{notes:["SMS sequence steps only send when the add-on is enabled, the plan is eligible, and an active number exists.",'Add SMS steps to sequences with type: "sms" in sequences create --steps-* or update --insert-steps-*.','Generate SMS copy with `sequenzy generate sms "<prompt>"`.'],examples:["sequenzy sms settings","sequenzy sms settings --json"]});var YxA=YR.command("settings").description("Show SMS add-on status, credits, and phone numbers").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>ub("settings",A));X0(YxA,{notes:["readyToSend in the JSON output tells you whether SMS sequence steps will actually send."],examples:["sequenzy sms settings --json"]});var XxA=YR.command("send-test <phone>").description("Send a test SMS to a phone number").option("-t, --text <text>","Plain-text message body").option("--image-url <url...>","Publicly reachable MMS image URL (repeat for up to 2)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>ub("send-test",{phone:A,...x}));X0(XxA,{notes:["Sends a real text and charges credits. Limited to 5 test sends per hour; bypasses quiet hours; excluded from step stats.","Requires the SMS add-on with a verified number - check `sequenzy sms settings` first."],examples:['sequenzy sms send-test +15550100123 --text "Test from Sequenzy"']});var XR=A8.command("sync-rules").description("Manage automatic tag changes applied when events fire").action(()=>XR.help());X0(XR,{notes:["Sync rules map events to tag changes, e.g. an order-placed event adding a customer tag.","Rules can carry conditions: required/excluded subscriber tags, and a product match for commerce events (tag buyers by product tag, collection, type, or vendor)."],examples:["sequenzy sync-rules get","sequenzy sync-rules update --rules-file ./sync-rules.json","sequenzy sync-rules update --reset"]});var UxA=XR.command("get").description("Show the effective sync rules").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>Sk("get",A));X0(UxA,{notes:["Shows the platform defaults until the company saves custom rules; the JSON output includes isDefault."],examples:["sequenzy sync-rules get --json"]});var ZxA=XR.command("update").description("Replace the sync rules or reset them to the defaults").option("--rules-json <json>","Inline JSON array with the full rule set").option("--rules-file <file>","Path to a JSON file with the full rule set").option("--reset","Reset the company to the platform default rules").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>Sk("update",A));X0(ZxA,{notes:["This replaces the FULL rule set - fetch with 'sync-rules get --json', edit, then update.",'Each rule: {"triggerEvent":"...","actions":{"addTags":[...],"removeTags":[...]},"conditions":{...}}.'],examples:["sequenzy sync-rules update --rules-file ./sync-rules.json",`sequenzy sync-rules update --rules-json '[{"triggerEvent":"ecommerce.order_placed","actions":{"addTags":["vinyl-collector"],"removeTags":[]},"conditions":{"purchasedProduct":{"tags":["Vinyl"]}}}]'`,"sequenzy sync-rules update --reset"]});var UJ=A8.command("generate").description("Generate email and SMS content with AI").action(()=>UJ.help());X0(UJ,{notes:["Generated email and SMS content is returned as draft content. Review it before sending.","`generate sequence` is deprecated and persists a disabled draft. Use `sequences create <name> --trigger <trigger> --goal <goal>` instead.","Use --json when another tool or agent should parse the generated output."],examples:['sequenzy generate email "Welcome a new user to our analytics product"','sequenzy generate subjects "April product launch" --count 8','sequenzy generate sms "Cart reminder with a free-shipping hook" --count 3']});UJ.command("email <prompt>").description("Generate email blocks from a prompt").option("-s, --style <style>","Style: minimal, branded, promotional").option("-t, --tone <tone>","Tone: professional, casual, friendly").option("--company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>cH("email",{prompt:A,...x}));UJ.command("sequence <goal>").description("[DEPRECATED] Persist a disabled AI sequence draft; use `sequences create`").option("--name <name>","Optional sequence name; defaults to the goal").option("--list-id <id>","Optional list ID for the contact_added trigger").option("-c, --count <number>","Number of emails (1-10)","5").option("-d, --days <number>","Duration in days","14").option("--company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>cH("sequence",{goal:A,...x}));UJ.command("subjects <topic>").description("Generate A/B subject line variants").option("-c, --count <number>","Number of variants","5").option("--company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>cH("subjects",{topic:A,...x}));var GxA=UJ.command("sms <prompt>").description("Generate SMS message variants from a prompt").option("-c, --count <number>","Number of variants (1-10)","3").option("--company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>cH("sms",{prompt:A,...x}));X0(GxA,{notes:["Messages are plain text with encoding and segment counts; use them as the text of an SMS sequence step.","Opt-out footers and the brand prefix are added automatically at send time - never include them in the message.","Check `sequenzy sms settings` to confirm the SMS add-on is ready before enabling SMS sequences."],examples:['sequenzy generate sms "Flash sale ends tonight" --count 5 --json']});await A8.parseAsync();process.exit(process.exitCode??0);
|
|
629
|
+
${H1}Use 'sequenzy --help' and '<command> --help' for detailed examples and caveats.${o6}`;console.log(E),console.log(g),console.log(),console.log(B),console.log(Q),console.log(D),console.log()}var A8=new Hm;A8.name("sequenzy").description("Sequenzy CLI - Email marketing from the terminal").version(Cg0).showHelpAfterError().showSuggestionAfterError().action(re0);X0(A8,{notes:["Use --json on data commands when another tool or agent should parse structured output.","Dashboard-aware JSON responses include appUrls when a company ID can be resolved.","Company-scoped commands accept --company for personal API keys that can access multiple companies.","Content commands prefer file flags such as --html-file, --blocks-file, --steps-file, and --emails-file to avoid shell escaping issues.","Sequence creation supports --goal for AI generation or explicit step JSON."],examples:['sequenzy templates create welcome --subject "Welcome" --html-file ./welcome.html','sequenzy campaigns update camp_123 --subject "Updated subject" --html-file ./campaign.html',"sequenzy sequences create onboarding --trigger contact_added --list-id list_123 --steps-file ./steps.json","sequenzy urls --company comp_123 --sequence seq_123 --settings-tab integrations","sequenzy websites guide --framework nextjs --use-case transactional",'sequenzy api-keys create --name "CI deploy key" --company comp_123']});var pe0=A8.command("login").description("Log in to your Sequenzy account").action(G60);X0(pe0,{notes:["Starts device authentication and prints a verification URL plus approval code."],examples:["sequenzy login"]});var _e0=A8.command("logout").description("Log out of your Sequenzy account").action(W60);X0(_e0,{examples:["sequenzy logout"]});var ne0=A8.command("whoami").description("Show the locally stored Sequenzy identity").action(Bg0);X0(ne0,{notes:["This checks local CLI credential state only. Use 'sequenzy account' to make a live request and verify the active key, permissions, and company access."],examples:["sequenzy whoami"]});var le0=A8.command("stats").description("Show account, campaign, or sequence metrics, including Poll/NPS").option("-p, --period <period>","Time period (7d, 30d, 90d)","7d").option("--campaign <id>","Get stats for a specific campaign").option("--sequence <id>","Get stats for a specific sequence").option("--include-bots","Include machine-classified bot/scanner opens and clicks").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON, including poll and NPS results").action(F20);X0(le0,{notes:["Use exactly one of: account-level period, --campaign, or --sequence.","Bot/scanner opens and clicks are excluded by default; pass --include-bots to inspect raw engagement.","Sequence stats include per-step failures when the API reports them.","Campaign stats include a Poll & NPS Results section when the email collected answers; use --json for the full polls array."],examples:["sequenzy stats","sequenzy stats --period 30d","sequenzy stats --campaign camp_123","sequenzy stats --campaign camp_123 --json","sequenzy stats --campaign camp_123 --include-bots","sequenzy stats --sequence seq_123"]});var de0=A8.command("events").description("List raw campaign or sequence email events").option("--campaign <id>","List events for a campaign").option("--sequence <id>","List events for a sequence").option("--type <type>","Single event type to include, such as delivery, open, or click").option("--event-types <types>","Comma-separated event types to include (default: delivery)").option("-p, --period <period>","Time period (1h, 24h, 7d, 30d, 90d)").option("--start <iso>","Start of custom time range (ISO 8601)").option("--end <iso>","End of custom time range (ISO 8601)").option("--page <number>","Page number").option("--limit <number>","Events per page, capped by the API").option("--include-bots","Include machine-classified bot/scanner opens and clicks").option("-c, --company <id>","Company ID").option("--json","Print JSON").action(I60);X0(de0,{notes:["Use exactly one of --campaign or --sequence.","Defaults to delivery events. Use --event-types delivery,open,click when you need engagement events too.","Bot/scanner opens and clicks are excluded by default; pass --include-bots to inspect raw engagement."],examples:["sequenzy events --campaign camp_123","sequenzy events --sequence seq_123 --limit 100 --json","sequenzy events --campaign camp_123 --event-types delivery,click --period 30d"]});var ae0=A8.command("urls").description("Generate Sequenzy dashboard URLs for known resource IDs").option("-c, --company <id>","Company ID").option("--campaign <id>","Campaign ID for campaign editor URL").option("--landing-page <id>","Landing page ID for landing page editor URL").option("--sequence <id>","Sequence ID for sequence editor URL").option("--template <id>","Template/email ID for email editor URL").option("--email <id>","Email ID for email editor URL").option("--transactional <id>","Transactional email ID").option("--email-send <id>","Email send ID").option("--domain <id>","Sending domain ID").option("--status <status>","Status for campaign/sequence list URLs").option("--settings-tab <tab>","Settings tab slug, e.g. integrations").option("--json","Print JSON").action(s90);X0(ae0,{notes:["Uses SEQUENZY_APP_URL when set, otherwise https://sequenzy.com.","If --company is omitted, the CLI tries the current company from `sequenzy account`.","Useful after creating a campaign or sequence when the user wants a review/edit link."],examples:["sequenzy urls --company comp_123","sequenzy urls --company comp_123 --sequence seq_123","sequenzy urls --company comp_123 --campaign camp_123","sequenzy urls --company comp_123 --landing-page lp_123","sequenzy urls --company comp_123 --email-send send_123","sequenzy urls --company comp_123 --settings-tab integrations","sequenzy urls --company comp_123 --json"]});var Q2=A8.command("subscribers").description("Manage subscribers").action(()=>Q2.help());X0(Q2,{notes:["Subscriber list fetches every page by default so agents do not silently miss later results.","`subscribers get` includes tags, list memberships, sequence enrollments, email stats, and recent activity.","--attr expects repeated key=value pairs. Example: --attr firstName=Ana --attr plan=pro"],examples:["sequenzy subscribers list --tag vip",'sequenzy subscribers list --list "Master List" --json',"sequenzy subscribers list --tag vip --limit 25 --json","sequenzy subscribers add user@example.com --tag trial --attr firstName=Ana","sequenzy subscribers import copper-contacts.csv --list list_123 --opt-in-mode confirmed","sequenzy subscribers import-status import_123 --json","sequenzy subscribers get user@example.com --json",'sequenzy subscribers notes add user@example.com --body "Customer prefers quarterly reports"',"sequenzy subscribers remove user@example.com --hard"]});var se0=Q2.command("list").description("List subscribers").option("-s, --segment <id>","Filter by segment").option("-t, --tag <tag>","Filter by tag").option("--list <id-or-name>","Filter by subscriber list ID or exact name").option("-l, --limit <number>","Maximum results to return").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>H7("list",A));X0(se0,{examples:["sequenzy subscribers list",'sequenzy subscribers list --list "Master List"',"sequenzy subscribers list --segment seg_123","sequenzy subscribers list --tag onboarding --limit 100"]});var oe0=Q2.command("add [email]").description("Add or upsert a subscriber").option("--external-id <id>","Customer-owned subscriber ID").option("--first-name <name>","Subscriber first name").option("--last-name <name>","Subscriber last name").option("-t, --tag <tags...>","Tags to apply").option("-l, --list <ids...>","List IDs to add the subscriber to").option("--no-lists","Add the subscriber to no lists").option("--skip-sequences","Do not enroll the subscriber in matching sequences").option("-a, --attr <attrs...>","Attributes (key=value)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("add",{email:A,...x,noLists:x.lists===!1}));X0(oe0,{examples:["sequenzy subscribers add user@example.com","sequenzy subscribers add user@example.com --first-name Ana --tag trial --attr plan=pro","sequenzy subscribers add user@example.com --list list_123","sequenzy subscribers add user@example.com --skip-sequences"]});var te0=Q2.command("import [file]").description("Queue a full-record subscriber import from CSV or JSON").option("--records-json <json>","Inline JSON array (alternative to a CSV/JSON file)").option("--duplicate-strategy <strategy>","Existing contact behavior: skip, merge, or overwrite","skip").option("--file-name <name>","Source label shown in import history").option("-l, --list <ids...>","List IDs for every imported subscriber").option("--enroll-sequences","Enroll matching subscribers (requires automations:trigger)").option("--default-phone-country <country>","Two-letter country for national phone numbers").option("--sms-consent","Assert express written SMS consent for every imported phone").option("--opt-in-mode <mode>","Email consent mode: default, confirmed, or double_opt_in","default").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("import",{file:A,...x}));X0(te0,{notes:["CSV columns for email, names, external ID, phone, status, and tags are detected automatically; other columns become custom attributes.","Use --opt-in-mode confirmed only when these contacts already gave verified email consent.","Imports run asynchronously. Poll the returned ID with subscribers import-status."],examples:["sequenzy subscribers import copper-contacts.csv --list list_123 --opt-in-mode confirmed",`sequenzy subscribers import --records-json '[{"email":"one@example.com","firstName":"Ana"}]' --opt-in-mode confirmed`]});var ee0=Q2.command("import-status <importId>").description("Get subscriber import progress and result counts").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("import:get",{importId:A,...x}));X0(ee0,{notes:["A completed import can still contain failed rows; inspect failed counts and --json reason maps."],examples:["sequenzy subscribers import-status import_123","sequenzy subscribers import-status import_123 --json"]});var A0A=Q2.command("get [email]").description("Get subscriber details").option("--external-id <id>","Customer-owned subscriber ID").option("--include-bots","Include machine-classified bot/scanner opens and clicks in stats/activity").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("get",{email:A,...x}));X0(A0A,{notes:["Bot/scanner opens and clicks are excluded by default; pass --include-bots to inspect raw engagement."],examples:["sequenzy subscribers get user@example.com","sequenzy subscribers get user@example.com --include-bots"]});var Gy=Q2.command("notes").description("Manage subscriber notes").action(()=>Gy.help());X0(Gy,{examples:["sequenzy subscribers notes list user@example.com",'sequenzy subscribers notes add user@example.com --body "Prefers monthly digest"',"sequenzy subscribers notes delete note_123"]});var x0A=Gy.command("list [email]").description("List subscriber notes").option("--external-id <id>","Customer-owned subscriber ID").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("notes:list",{email:A,...x}));X0(x0A,{examples:["sequenzy subscribers notes list user@example.com","sequenzy subscribers notes list --external-id user_123 --json"]});var E0A=Gy.command("add [email]").description("Add a subscriber note").option("--external-id <id>","Customer-owned subscriber ID").requiredOption("-b, --body <body>","Note body").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("notes:add",{email:A,...x}));X0(E0A,{examples:['sequenzy subscribers notes add user@example.com --body "Asked about enterprise plan"','sequenzy subscribers notes add --external-id user_123 --body "Imported from sales call"']});var B0A=Gy.command("delete <noteId>").description("Delete a subscriber note").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("notes:delete",{noteId:A,...x}));X0(B0A,{examples:["sequenzy subscribers notes delete note_123"]});var g0A=Q2.command("update [email]").description("Update subscriber status, name, tags, or custom attributes").option("--external-id <id>","Customer-owned subscriber ID").option("--status <status>","Subscriber status").option("--first-name <name>","Subscriber first name").option("--last-name <name>","Subscriber last name").option("-t, --tag <tags...>","Replacement tags").option("-a, --attr <attrs...>","Attributes (key=value)").option("--merge","Merge custom attributes instead of replacing them").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("update",{email:A,...x}));X0(g0A,{examples:["sequenzy subscribers update user@example.com --status unsubscribed","sequenzy subscribers update user@example.com --first-name Ana --last-name Silva","sequenzy subscribers update user@example.com --tag churned --attr cancelReason=too_expensive","sequenzy subscribers update user@example.com --attr plan=pro --merge"]});var Q0A=Q2.command("event [email]").description("Trigger an event for a subscriber").option("--external-id <id>","Customer-owned subscriber ID").requiredOption("-n, --name <event>","Event name").option("-p, --property <properties...>","Event properties (key=value)").option("-a, --attr <attrs...>","Subscriber attributes (key=value)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("event",{email:A,...x}));X0(Q0A,{examples:["sequenzy subscribers event user@example.com --name saas.purchase","sequenzy subscribers event user@example.com --name saas.purchase --property plan=pro --property amount=99"]});var D0A=Q2.command("remove [email]").description("Unsubscribe or permanently delete a subscriber").option("--external-id <id>","Customer-owned subscriber ID").option("--hard","Permanently delete (not just unsubscribe)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>H7("remove",{email:A,...x}));X0(D0A,{examples:["sequenzy subscribers remove user@example.com","sequenzy subscribers remove user@example.com --hard"]});var Wy=A8.command("transactional").description("Inspect transactional email templates").action(()=>Wy.help());X0(Wy,{notes:["Use the top-level `sequenzy send` command to send email."],examples:["sequenzy transactional list","sequenzy transactional get welcome","sequenzy send user@example.com --template welcome --var firstName=Ana"]});var C0A=Wy.command("list").description("List transactional templates").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>KR("list",A));X0(C0A,{examples:["sequenzy transactional list --company comp_123"]});var F0A=Wy.command("get <slug>").description("Get transactional template details by slug").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>KR("get",{slug:A,...x}));X0(F0A,{examples:["sequenzy transactional get welcome"]});var I0A=Wy.command("create <name>").description("Create a transactional template").option("--slug <slug>","API slug").option("-s, --subject <subject>","Subject (optional with --prompt)").option("--preview-text <text>","Preview text override").option("--prompt <prompt>","Generate branded transactional blocks").option("--style <style>","Prompt generation style").option("--tone <tone>","Prompt generation tone").option("--html <html>","Preserved HTML content").option("--html-file <file>","Read preserved HTML from file").option("--blocks-json <json>","Finished Sequenzy blocks JSON").option("--blocks-file <file>","Read finished Sequenzy blocks from file").option("--enabled","Enable immediately (prompt creates default disabled)").option("--no-enabled","Create the transactional template disabled").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>KR("create",{name:A,...x}));X0(I0A,{notes:["Provide exactly one of prompt, HTML, or blocks.",$R],examples:['sequenzy transactional create password-reset --prompt "Write a password reset email"']});var Lk=A8.command("widgets").description("Widget helper commands").action(()=>Lk.help());X0(Lk,{examples:["sequenzy widgets preferences-token user@example.com"]});var w0A=Lk.command("preferences-token <email>").description("Generate a subscription preferences iframe token").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>gg0("preferences-token",{email:A,...x}));X0(w0A,{examples:["sequenzy widgets preferences-token user@example.com"]});var Ok=A8.command("email-sends").alias("emailsends").description("Inspect sent email snapshots and delivery events").action(()=>Ok.help());X0(Ok,{notes:["Email send rows are short-lived; if the row was cleaned up, this falls back to retained ClickHouse events.","Use --html to print the stored HTML body when it is still available."],examples:["sequenzy email-sends get send_123","sequenzy email-sends get send_123 --html","sequenzy email-sends get send_123 --json"]});var J0A=Ok.command("get <emailSendId>").description("Get an email send by ID").option("-c, --company <id>","Company ID override for personal API keys").option("--html","Print the full stored HTML body in text output").option("--html-only","Print only the stored HTML body").option("--json","Print raw JSON").action((A,x)=>D60("get",{id:A,...x}));X0(J0A,{examples:["sequenzy email-sends get send_123","sequenzy email-sends get send_123 --html","sequenzy email-sends get send_123 --company comp_123 --json"]});var HR=A8.command("suppressions").description("Inspect and clean stale recipient bounce suppression").action(()=>HR.help());X0(HR,{notes:["Suppression lookup is exact-address only because the SES account-level list is shared across companies.","Removal clears stale bounce entries only; complaint and unsubscribe protections are preserved."],examples:["sequenzy suppressions get me@example.com","sequenzy suppressions remove me@example.com --yes"]});var f0A=HR.command("get <email>").description("Check local and Amazon SES suppression for one recipient").option("--region <region>","Check one AWS SES region").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>zk("get",{email:A,...x}));X0(f0A,{examples:["sequenzy suppressions get me@example.com","sequenzy suppressions get me@example.com --region us-east-1 --json"]});var K0A=HR.command("remove <email>").description("Remove stale bounce suppression for one recipient").option("--region <region>","Clear one AWS SES region").option("-c, --company <id>","Company ID override for personal API keys").option("-y, --yes","Skip confirmation").option("--json","Print raw JSON").action((A,x)=>zk("remove",{email:A,...x}));X0(K0A,{examples:["sequenzy suppressions remove me@example.com","sequenzy suppressions remove me@example.com --region us-east-1 --yes"]});var $0A=A8.command("send <email>").description("Send a transactional email").option("-t, --template <slug>","Transactional template slug to use").option("-s, --subject <subject>","Email subject").option("--html <html>","Email HTML content").option("--html-file <file>","Read HTML from file").option("--vars-json <json>","Variables as a JSON object, including nested arrays for repeat blocks").option("-v, --var <vars...>","Variables (key=value)").action(e70);X0($0A,{notes:["Use either --template or --html/--html-file.","--template takes a transactional API slug and cannot be combined with --subject.","--subject is required when sending raw HTML.","--vars-json accepts nested objects and arrays; --var overrides individual scalar keys."],examples:["sequenzy send user@example.com --template welcome --var firstName=Ana",`sequenzy send user@example.com --template welcome --vars-json '{"event":{"items":[{"title":"Plan","description":"Pro"}]}}'`,'sequenzy send user@example.com --subject "Welcome" --html-file ./welcome.html']});var a5=A8.command("campaigns").description("Manage campaigns").action(()=>a5.help());X0(a5,{notes:["Campaign creation supports HTML, Sequenzy blocks, or prompt-generated content.","Campaign updates support HTML, Sequenzy blocks, subject, name, labels, and reply-to changes.","Campaign scheduling requires a future ISO timestamp and a verified sending domain.","Use cancel to stop a scheduled or sending campaign, and pause/resume to control an active send.",$R],examples:["sequenzy campaigns list --status draft --company comp_123",'sequenzy campaigns create "April Launch" --subject "We shipped" --html-file ./campaign.html','sequenzy campaigns create "API Launch" --subject "We shipped" --label edm api --html-file ./campaign.html','sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z"',"sequenzy campaigns test camp_123 --to you@example.com","sequenzy campaigns cancel camp_123","sequenzy campaigns duplicate camp_123 --mode ab_test"]});var H0A=a5.command("list").description("List campaigns").option("-s, --status <status>","Filter by status").option("--label <labels...>","Filter by label name").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>z4("list",A));X0(H0A,{examples:["sequenzy campaigns list","sequenzy campaigns list --status draft --company comp_123","sequenzy campaigns list --label edm"]});var y0A=a5.command("get <id>").description("Get campaign details").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("get",{id:A,...x}));X0(y0A,{examples:["sequenzy campaigns get camp_123 --company comp_123"]});var q0A=a5.command("create <name>").description("Create a campaign").option("-s, --subject <subject>","Email subject").option("--preview-text <text>","Inbox preview text").option("--preheader-text <text>","Alias for --preview-text").option("--tracking-code <code>","Optional campaign tracking code").option("--status <status>","Initial status: draft or sent").option("--sent-at <iso-date>","Sent timestamp when creating with --status sent").option("--html <html>","Email HTML content").option("--html-file <file>","Read HTML from file").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--prompt <prompt>","Generate campaign blocks from a prompt").option("--style <style>","Prompt generation style: minimal, branded, promotional").option("--tone <tone>","Prompt generation tone: professional, casual, friendly").option("--label <labels...>","Label names to assign").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("create",{name:A,...x}));X0(q0A,{notes:["--subject is required unless --prompt is provided. With --prompt, the generated subject is used unless --subject is also provided.","Use --preview-text or --preheader-text to set the inbox preview text. With --prompt, the generated preview is used unless one of these flags is provided.","Use --blocks-json or --blocks-file when you need editor-compatible blocks, including conditional content and per-block styles.","Use --status sent only to archive an already-sent campaign; it does not send email or create per-recipient delivery history.","Do not combine prompt, HTML flags, and blocks flags in the same request."],examples:['sequenzy campaigns create "April Launch" --prompt "Announce our new analytics dashboard"','sequenzy campaigns create "April Launch" --subject "We shipped" --preheader-text "Your quick product update" --html-file ./campaign.html','sequenzy campaigns create "Imported launch" --subject "We shipped" --status sent --sent-at "2026-05-01T14:00:00Z" --html-file ./campaign.html','sequenzy campaigns create "API Launch" --subject "We shipped" --label edm api --html-file ./campaign.html','sequenzy campaigns create "Segmented Launch" --subject "We shipped" --blocks-file ./campaign-blocks.json']});var Y0A=a5.command("update <id>").description("Update a draft campaign").option("-n, --name <name>","Campaign name").option("-s, --subject <subject>","Email subject").option("--preview-text <text>","Inbox preview text").option("--preheader-text <text>","Alias for --preview-text").option("--tracking-code <code>","Optional campaign tracking code").option("--html <html>","Email HTML content").option("--html-file <file>","Read HTML from file").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--campaign-data-json <json>","Inline campaignData JSON object").option("--campaign-data-file <file>","Path to a JSON file with campaignData").option("--computed-lists-json <json>","Inline computedLists JSON array").option("--computed-lists-file <file>","Path to a JSON file with computedLists").option("--reply-to <email>","Set reply-to using an existing reply profile email").option("--reply-profile <id>","Set reply-to using a reply profile ID").option("--label <labels...>","Replace label names").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("update",{id:A,...x}));X0(Y0A,{notes:["Provide at least one update flag, including subject, preview text, content, labels, reply-to, campaign data, or computed lists.","Use --blocks-json or --blocks-file when you need editor-compatible blocks, including conditional content and per-block styles.","Use --campaign-data-file and --computed-lists-file to upload personalization data for repeat blocks.","Do not combine HTML flags with blocks flags in the same request.","Use either --reply-to or --reply-profile, not both."],examples:['sequenzy campaigns update camp_123 --subject "Updated subject"','sequenzy campaigns update camp_123 --preheader-text "Updated preview"',"sequenzy campaigns update camp_123 --html-file ./campaign-v2.html","sequenzy campaigns update camp_123 --blocks-file ./campaign-v2-blocks.json","sequenzy campaigns update camp_123 --campaign-data-file ./campaign-data.json --computed-lists-file ./computed-lists.json","sequenzy campaigns update camp_123 --reply-to support@example.com","sequenzy campaigns update camp_123 --label edm api"]});var X0A=a5.command("schedule <id>").description("Schedule a draft or scheduled campaign").requiredOption("--at <datetime>","Future ISO date/time to send, for example 2026-06-01T14:00:00Z").option("--target-lists-json <json>","Inline campaign targetLists JSON object").option("--target-lists-file <file>","Path to a JSON file with campaign targetLists").option("--send-time-optimization","Enable send-time optimization for the scheduled send").option("--spread-over-hours <hours>","Spread delivery over 1-72 hours. Disables send-time optimization when set.").option("--repeat <interval>","Repeat the campaign weekly or monthly starting at --at. Audience membership is re-evaluated at every run.").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("schedule",{id:A,...x}));X0(X0A,{notes:["The campaign must be draft or already scheduled.","Omit target lists to reuse saved campaign targeting, or default to all active subscribers.",'Target list examples include {"type":"all"}, {"type":"lists","listIds":["list_123"]}, and {"type":"segment","segmentId":"seg_123"}.',"With --repeat, the campaign becomes a recurring template: each run is duplicated and sent automatically. Re-schedule without --repeat (or cancel the campaign) to stop the series."],examples:['sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z"',`sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z" --target-lists-json '{"type":"all"}'`,'sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z" --target-lists-file ./target-lists.json','sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z" --spread-over-hours 6','sequenzy campaigns schedule camp_123 --at "2026-06-01T14:00:00Z" --repeat monthly']});var U0A=a5.command("test <id>").description("Send a test email for a campaign").requiredOption("--to <email>","Recipient email for the test").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("test",{id:A,...x}));X0(U0A,{examples:["sequenzy campaigns test camp_123 --to you@example.com"]});var Z0A=a5.command("cancel <id>").description("Cancel a scheduled, paused, or sending campaign").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("cancel",{id:A,...x}));X0(Z0A,{notes:["Cancelling stops scheduled, paused, waiting-approval, and actively sending campaigns immediately.","No confirmation prompt is shown so a bad send can be stopped fast."],examples:["sequenzy campaigns cancel camp_123"]});var G0A=a5.command("pause <id>").description("Pause a campaign that is currently sending").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("pause",{id:A,...x}));X0(G0A,{notes:["Only campaigns in sending status can be paused."],examples:["sequenzy campaigns pause camp_123"]});var W0A=a5.command("resume <id>").description("Resume a paused campaign").option("--spread-over-hours <hours>","Spread the remaining delivery over 1-72 hours").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("resume",{id:A,...x}));X0(W0A,{notes:["Only paused campaigns can be resumed."],examples:["sequenzy campaigns resume camp_123","sequenzy campaigns resume camp_123 --spread-over-hours 6"]});var R0A=a5.command("delete <id>").description("Delete a campaign").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("delete",{id:A,...x}));X0(R0A,{notes:["Sending, scheduled, and paused campaigns must be cancelled before they can be deleted."],examples:["sequenzy campaigns delete camp_123 --yes"]});var M0A=a5.command("duplicate <id>").description("Duplicate a campaign as a new draft").option("--mode <mode>","Duplicate mode: campaign, ab_test, or variant","campaign").option("--variant-id <id>","A/B test variant to copy when --mode is variant").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("duplicate",{id:A,...x}));X0(M0A,{notes:["Mode campaign copies the campaign email, ab_test also copies the A/B test with all variants, and variant copies one variant's content as a plain campaign."],examples:["sequenzy campaigns duplicate camp_123","sequenzy campaigns duplicate camp_123 --mode ab_test","sequenzy campaigns duplicate camp_123 --mode variant --variant-id var_b"]});var z0A=a5.command("resend-to-non-openers <id>").description("Create a draft resend to subscribers who didn't open a sent campaign").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>z4("resend-to-non-openers",{id:A,...x}));X0(z0A,{notes:["Only available 6 hours after a sent campaign finishes sending.",`Creates a draft targeting the same audience plus a "didn't open this campaign" rule. Review the draft, then schedule or send it.`,"The response includes an estimate of how many subscribers haven't opened the original."],examples:["sequenzy campaigns resend-to-non-openers camp_123"]});var D2=A8.command("landing-pages").description("Manage landing pages").action(()=>D2.help());X0(D2,{notes:["Landing pages are created as drafts. Publish only after reviewing the page.","Use --content-json or --content-file for full editor-compatible landing page content.","Custom domains require a CNAME record pointing to pages.sequenzydns.com."],examples:["sequenzy landing-pages list --company comp_123",'sequenzy landing-pages create "Product Waitlist" --template waitlist',"sequenzy landing-pages publish lp_123","sequenzy landing-pages connect-domain pages.example.com"]});var S0A=D2.command("list").description("List landing pages").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>I1("list",A));X0(S0A,{examples:["sequenzy landing-pages list --company comp_123"]});var L0A=D2.command("get <id>").description("Get landing page details").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("get",{id:A,...x}));X0(L0A,{examples:["sequenzy landing-pages get lp_123 --company comp_123"]});var O0A=D2.command("create [name]").description("Create a draft landing page").option("--slug <slug>","Landing page URL slug").option("--template <template>","Template key, e.g. waitlist").option("--content-json <json>","Inline landing page content JSON").option("--content-file <file>","Path to landing page content JSON").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("create",{name:A,...x}));X0(O0A,{notes:["When --content-json/--content-file is omitted, a valid default page is generated from --template."],examples:['sequenzy landing-pages create "Product Waitlist" --template waitlist','sequenzy landing-pages create "Launch Page" --slug launch --content-file ./landing-page.json']});var P0A=D2.command("update <id>").description("Edit a landing page").option("-n, --name <name>","Landing page name").option("--slug <slug>","Landing page URL slug").option("--content-json <json>","Inline landing page content JSON").option("--content-file <file>","Path to landing page content JSON").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("update",{id:A,...x}));X0(P0A,{examples:['sequenzy landing-pages update lp_123 --name "Updated page"',"sequenzy landing-pages update lp_123 --content-file ./landing-page.json"]});var j0A=D2.command("publish <id>").description("Publish a landing page").option("-n, --name <name>","Landing page name").option("--slug <slug>","Landing page URL slug").option("--content-json <json>","Inline landing page content JSON").option("--content-file <file>","Path to landing page content JSON").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("publish",{id:A,...x}));X0(j0A,{examples:["sequenzy landing-pages publish lp_123"]});var N0A=D2.command("unpublish <id>").description("Unpublish a landing page").option("-n, --name <name>","Landing page name").option("--slug <slug>","Landing page URL slug").option("--content-json <json>","Inline landing page content JSON").option("--content-file <file>","Path to landing page content JSON").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("unpublish",{id:A,...x}));X0(N0A,{examples:["sequenzy landing-pages unpublish lp_123"]});var V0A=D2.command("delete <id>").description("Delete a landing page").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("delete",{id:A,...x}));X0(V0A,{examples:["sequenzy landing-pages delete lp_123"]});var v0A=D2.command("connect-domain <domain>").description("Connect a custom landing page domain").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>I1("connect-domain",{domain:A,...x}));X0(v0A,{examples:["sequenzy landing-pages connect-domain pages.example.com --company comp_123"]});var u0A=D2.command("update-domain-settings").description("Update or verify landing page domain settings").option("--domain <domain>","Replace the connected landing page domain").option("--verify","Refresh domain verification state").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>I1("update-domain-settings",A));X0(u0A,{examples:["sequenzy landing-pages update-domain-settings --domain pages.example.com","sequenzy landing-pages update-domain-settings --verify"]});var J6=A8.command("sequences").description("Manage email sequences").action(()=>J6.help());X0(J6,{notes:["The CLI supports both AI goal-based sequence creation and explicit-step creation.","Trigger-specific options depend on --trigger. For example: contact_added needs --list-id, tag_added needs --tag-name, inactivity needs --event-name and --inactive-days.","Use --goal for AI generation, or --steps-file / --emails-file with JSON arrays that match the API step objects.","Use --enrollment-mode matching_field for product- or variant-specific event sequences.",'Explicit --steps-file input can include dynamic Stripe or Shopify discount actions with {"type":"create_discount","discount":{"provider":"stripe","discountType":"percent","percentOff":20,"duration":"once","appliesToAllPlans":true}}; the code is created when each subscriber reaches the step, and later emails can use {{discount.code}}.',"Discount action sequences require the selected provider integration, such as Stripe or Shopify, before enabling.",$R],examples:["sequenzy sequences list --company comp_123",'sequenzy sequences create onboarding --trigger event_received --event-name signup.completed --goal "Guide new users to activation"',"sequenzy sequences create onboarding --trigger contact_added --list-id list_123 --steps-file ./steps.json","sequenzy sequences update seq_123 --steps-file ./sequence-updates.json","sequenzy sequences enable seq_123"]});var T0A=J6.command("list").description("List sequences").option("--status <status>","Filter by draft, active, paused, or archived").option("--search <text>","Search sequence names and descriptions").option("--label <labels...>","Filter by dashboard label names").option("--limit <count>","Page size from 1 to 100").option("--offset <count>","Zero-based result offset").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>E9("list",A));X0(T0A,{examples:["sequenzy sequences list --company comp_123"]});var h0A=J6.command("get <id>").description("Get sequence details").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("get",{id:A,...x}));X0(h0A,{examples:["sequenzy sequences get seq_123 --company comp_123"]});function Fg0(A){return A.option("--description <text>","Goal description").option("--trigger-type <type>","Goal signal: event or attribute_change").option("--trigger-event-name <event>","Event goal signal name").option("--attribute-path <path>","Subscriber attribute goal path").option("--attribute-condition <condition>","changed, changed_to, or changed_from_to").option("--attribute-value <value>","Target subscriber attribute value").option("--attribute-previous-value <value>","Previous subscriber attribute value").option("--event-property-name <name>","Optional event property whose value is tracked").option("--event-property-label <label>","Display label for the tracked event property").option("--attribution-window-hours <hours>","Goal attribution window in hours")}var yR=J6.command("goals").description("Manage persisted sequence conversion goals");yR.command("list <sequenceId>").description("List sequence goals").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x)=>E9("goals",{id:A,...x}));Fg0(yR.command("create <sequenceId> <name>").description("Create a sequence conversion goal")).option("--active","Create the goal with conversion tracking on (default)").option("--inactive","Create the goal with conversion tracking off").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x,E)=>E9("goal-create",{id:A,name:x,isActive:E.active,notActive:E.inactive,...E}));Fg0(yR.command("update <sequenceId> <goalId>").description("Update a sequence conversion goal").option("--name <name>","Goal name")).option("--active","Enable the goal").option("--inactive","Disable the goal").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x,E)=>E9("goal-update",{id:A,goalId:x,isActive:E.active,notActive:E.inactive,...E}));yR.command("delete <sequenceId> <goalId>").description("Delete a sequence conversion goal").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x,E)=>E9("goal-delete",{id:A,goalId:x,...E}));var Pk=J6.command("webhook").description("Manage a sequence inbound webhook endpoint");Pk.command("get <sequenceId>").description("Read a sequence inbound webhook URL and setup status").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x)=>E9("webhook-get",{id:A,...x}));Pk.command("configure <sequenceId>").description("Create or update a sequence inbound webhook endpoint").option("--field-mapping-json <json>","Inline mapping with email, optional names, and property paths").option("--field-mapping-file <file>","JSON file containing the webhook field mapping").option("--sample-payload-json <json>","Inline representative webhook payload").option("--sample-payload-file <file>","JSON file containing a representative webhook payload").option("--clear-field-mapping","Clear the saved mapping and return the endpoint to pending setup").option("--clear-sample-payload","Clear the saved sample payload").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x)=>E9("webhook-configure",{id:A,...x}));Pk.command("rotate <sequenceId>").description("Rotate a sequence inbound webhook secret and URL").option("-c, --company <id>","Company ID override").option("--json","Print raw JSON").action((A,x)=>E9("webhook-rotate",{id:A,...x}));var b0A=J6.command("create <name>").description("Create a blank, AI-generated, or explicit-step sequence").option("-t, --trigger <trigger>","Sequence trigger type (defaults to contact_added)").option("--description <text>","Sequence description").option("--label <labels...>","Dashboard label names to assign").option("--user-cancellable","Allow subscribers to cancel enrollment").option("--not-user-cancellable","Prevent subscribers from cancelling enrollment").option("--from-email <email>","Sequence-level From address").option("--from-name <name>","Display name for --from-email").option("--sender-profile-id <id>","Existing sender profile ID").option("--reply-to <email>","Sequence-level Reply-To address").option("--reply-to-name <name>","Display name for --reply-to").option("--reply-profile-id <id>","Existing reply profile ID").option("--bcc-emails <emails>","Comma-separated sequence-level BCC addresses (max 10)").option("-g, --goal <goal>","AI generation goal for the sequence").option("--email-count <count>","Number of AI-generated emails when using --goal (1-10)").option("--duration-days <days>","Total duration in days for AI-generated sequence delays when using --goal").option("--email-style <style>","Style for AI-generated emails when using --goal: visual (designed) or plain (text-first)").option("--enrollment-mode <mode>","Enrollment mode: unlimited, one_time, or matching_field").option("--enrollment-field-path <path>","Event property dot path used by matching_field enrollment").option("--sending-window-start <time>","Earliest local send time for sequence emails (HH:mm, e.g. 08:00)").option("--sending-window-end <time>","Latest local send cutoff for sequence emails (HH:mm, e.g. 20:00)").option("--sending-window-timezone <timezone>","IANA timezone for the sequence sending window, e.g. Europe/Kiev").option("--sending-window-days <days>","Comma-separated days for sequence sends, e.g. weekdays or mon,tue,wed,thu,fri").option("--list-id <id>","List ID for contact_added triggers").option("--tag-name <name>","Tag name for tag_added triggers").option("--segment-id <id>","Segment ID for segment_entered triggers").option("--stop-on-segment-exit","Cancel active enrollments when a contact leaves the trigger segment").option("--event-name <name>","Event name for event_received, inbound_webhook, inactivity, and frequency triggers").option("--integration-slug <slug>","Inbound webhook integration slug").option("--integration-event-key <key>","Inbound webhook integration event key").option("--custom-integration-json <json>","Inline custom inbound webhook integration descriptor").option("--custom-integration-file <file>","JSON file with a custom inbound webhook integration descriptor").option("--property-filters-json <json>","Inline JSON array of event property filters for event_received triggers").option("--property-filters-file <file>","Path to a JSON file with event property filters").option("--inactive-days <days>","Days of inactivity for inactivity triggers").option("--inactivity-baseline <baseline>","Inactivity baseline: sequence_created_at or subscriber_created_at").option("--min-count <count>","Minimum event count for frequency triggers").option("--time-window-days <days>","Time window for frequency triggers").option("--steps-json <json>","Inline JSON array of sequence steps").option("--steps-file <file>","Path to a JSON file with sequence steps").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("create",{name:A,...x}));X0(b0A,{notes:["Provide --goal for AI generation, --steps-json/--steps-file for explicit content, or omit both for a blank dashboard-compatible draft.","Each explicit email step needs subject plus either html or blocks. Discount action steps use type=create_discount to dynamically create a code before an email that references {{discount.code}}.",'SMS steps use type="sms" with a plain-text "text" field (optional label, ineligibleAction skip|exit, imageUrls). Generate copy with `sequenzy generate sms` and check `sequenzy sms settings` first.','Update Subscriber steps use type="update_subscriber", nodeType="action_update_attributes", and config values such as {{event.plan}}, {{event.amount}}, or {{event.active}}.',"For migrated provider flows, put the exact provider HTML in each step's html field; Sequenzy stores it as raw HTML. Use delay or delayMs for waits.","Prefer --steps-file for anything non-trivial. The CLI passes the JSON through to the API.","Shopify replenishment and back-in-stock event sequences default to matching_field.","Use --enrollment-field-path for custom event keys such as order.id or product.providerVariantId.","Use --property-filters-json/--property-filters-file with event_received triggers to only start the sequence when the event properties match, e.g. scope a purchase sequence to one product.","Use --sending-window-start/--sending-window-end/--sending-window-timezone to hold every email step until the allowed local send window. Add --sending-window-days weekdays for working days only.","Discount action sequences require the selected provider integration, such as Stripe or Shopify, before enabling."],examples:['sequenzy sequences create onboarding --trigger event_received --event-name signup.completed --goal "Guide new users to activation" --email-count 4 --duration-days 10','sequenzy sequences create trial --trigger tag_added --tag-name trial --goal "Convert trial users" --sending-window-start 08:00 --sending-window-end 20:00 --sending-window-timezone Europe/Kiev --sending-window-days weekdays',"sequenzy sequences create restock --trigger event_received --event-name ecommerce.back_in_stock --enrollment-mode matching_field --steps-file ./steps.json",`sequenzy sequences create deliver-ebook --trigger event_received --event-name ecommerce.order_placed --property-filters-json '[{"path":"lineItems[].providerProductId","operator":"equals","value":"prod_123"}]' --steps-file ./steps.json`,"sequenzy sequences create post-purchase --trigger event_received --event-name ecommerce.order_placed --enrollment-mode matching_field --enrollment-field-path order.id --steps-file ./steps.json","sequenzy sequences create onboarding --trigger contact_added --list-id list_123 --steps-file ./steps.json",`sequenzy sequences create purchase-profile --trigger event_received --event-name saas.purchase --steps-json '[{"type":"update_subscriber","nodeType":"action_update_attributes","config":{"customAttributeUpdates":[{"name":"plan","value":"{{event.plan}}","valueType":"text"}]}},{"subject":"Thanks","html":"<p>Purchase received.</p>"}]'`,"sequenzy sequences create rescue --trigger inactivity --event-name login --inactive-days 14 --steps-file ./steps.json"]});var k0A=J6.command("update <id>").description("Update sequence metadata, email step content, stop conditions, or paths").option("-n, --name <name>","Sequence name").option("--description <text>","Sequence description").option("--label <labels...>","Replace dashboard label names").option("--clear-labels","Remove all dashboard labels from the sequence").option("--user-cancellable","Allow subscribers to cancel enrollment").option("--not-user-cancellable","Prevent subscribers from cancelling enrollment").option("--trigger <trigger>","Replace the sequence trigger type").option("--list-id <id>","List ID for contact_added").option("--tag-name <name>","Tag name for tag_added").option("--segment-id <id>","Segment ID for segment_entered").option("--stop-on-segment-exit","Stop active enrollments when a contact leaves the trigger segment").option("--no-stop-on-segment-exit","Keep active enrollments running when a contact leaves the trigger segment").option("--event-name <event>","Event name for event, webhook, inactivity, or frequency triggers").option("--integration-slug <slug>","Catalog integration slug for inbound_webhook").option("--integration-event-key <key>","Catalog event key for inbound_webhook").option("--custom-integration-json <json>","Inline custom inbound webhook integration descriptor").option("--custom-integration-file <file>","JSON file containing a custom inbound webhook integration descriptor").option("--property-filters-json <json>","Inline event trigger property filters").option("--property-filters-file <file>","JSON file containing event trigger property filters").option("--inactive-days <days>","Days required for inactivity").option("--inactivity-baseline <baseline>","Inactivity baseline: sequence_created_at or subscriber_created_at").option("--min-count <count>","Minimum frequency event count").option("--time-window-days <days>","Frequency lookback window").option("--from-email <email>","Sequence-level From address").option("--from-name <name>","Display name for --from-email").option("--sender-profile-id <id>","Existing sender profile ID").option("--reply-to <email>","Sequence-level Reply-To address").option("--reply-to-name <name>","Display name for --reply-to").option("--reply-profile-id <id>","Existing reply profile ID").option("--enrollment-mode <mode>","Enrollment mode: unlimited, one_time, or matching_field").option("--enrollment-field-path <path>","Event property dot path used by matching_field enrollment").option("--pause-new-enrollments","Stop new sequence enrollments while current recipients continue").option("--resume-new-enrollments","Resume new sequence enrollments while current recipients continue").option("--sending-window-start <time>","Earliest local send time for sequence emails (HH:mm, e.g. 08:00)").option("--sending-window-end <time>","Latest local send cutoff for sequence emails (HH:mm, e.g. 20:00)").option("--sending-window-timezone <timezone>","IANA timezone for the sequence sending window, e.g. Europe/Kiev").option("--sending-window-days <days>","Comma-separated days for sequence sends, e.g. weekdays or mon,tue,wed,thu,fri").option("--clear-sending-window","Disable the sequence sending window").option("--bcc-emails <emails>","Comma-separated BCC addresses copied on every email this sequence sends, e.g. a support inbox (max 10)").option("--clear-bcc-emails","Remove the sequence BCC addresses").option("--confirm-structural-change","Confirm an insertSteps or branch structural edit to an active sequence").option("--confirm-live-change","Confirm node config edits to an active sequence").option("--steps-json <json>","Inline JSON array of step updates").option("--steps-file <file>","Path to a JSON file with step updates").option("--emails-json <json>","Inline JSON array of email updates; native-block emails, including supported custom HTML blocks, may set emailPreset to branded or minimal").option("--emails-file <file>","Path to a JSON file with email updates; native-block emails, including supported custom HTML blocks, may set emailPreset to branded or minimal").option("--sms-steps-json <json>","Inline JSON array of SMS step content updates (targeted by nodeId)").option("--sms-steps-file <file>","Path to a JSON file with SMS step content updates").option("--subscriber-update-steps-json <json>","Inline JSON array of Update Subscriber configs targeted by nodeId").option("--subscriber-update-steps-file <file>","Path to a JSON file with Update Subscriber configs targeted by nodeId").option("--branch-json <json>","Inline JSON object for inserting an if/else branch with path steps and/or existing target node IDs").option("--branch-file <file>","Path to a JSON file for inserting an if/else branch with path steps and/or existing target node IDs").option("--insert-steps-json <json>","Inline JSON object for inserting new linear steps").option("--insert-steps-file <file>","Path to a JSON file for inserting new linear steps").option("--node-updates-json <json>","Inline typed nodeUpdates array from sequences get").option("--node-updates-file <file>","JSON file containing typed nodeUpdates").option("--graph-edit-json <json>","Inline graphEdit object using the current graphRevision").option("--graph-edit-file <file>","JSON file containing a graphEdit operation").option("--stop-condition-json <json>","Inline JSON object for updating the sequence stop condition").option("--stop-condition-file <file>","Path to a JSON file for updating the sequence stop condition").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("update",{id:A,...x}));X0(k0A,{notes:["Use either the steps form or the emails form, not both.","Each update entry can target a step by nodeId, emailId, or by array order.","Use --insert-steps-json/--insert-steps-file to add new linear steps, including outbound webhooks; use --steps-* or --emails-* to edit existing email steps.",'Inserted steps can be SMS steps: {"type":"sms","text":"...","delay":{"days":1}}. Generate copy with `sequenzy generate sms`.','Edit existing SMS steps with --sms-steps-json/--sms-steps-file: [{"nodeId":"node_sms","text":"New message"}]. Entries may also update label and ineligibleAction.','Edit existing Update Subscriber steps with --subscriber-update-steps-json/--subscriber-update-steps-file: [{"nodeId":"node_update","config":{"customAttributeUpdates":[{"name":"plan","value":"{{event.plan}}","valueType":"text"}]}}].',"For migrated provider flow steps, use html/htmlContent to preserve exact HTML as raw HTML and use delay or delayMs for waits.","When inserting steps or branches into an active sequence, pass --confirm-structural-change after confirming the live-flow impact.",'Use --stop-condition-json/--stop-condition-file with values like {"type":"has_tag","value":"customer"}; use {"type":"none","value":null} to clear it.',"Branch condition types include has_tag, does_not_have_tag, in_list, in_segment, event_received, link_clicked, and field_* comparisons. Use activityScope (this_sequence, previous_email, ever) for event and click checks.","Branch paths may set targetNodeId and elseTargetNodeId to wire directly to existing nodes from sequences get, including the completion node. If path steps are also provided, they run before that target.","Use --clear-sending-window to remove a configured send window.","Use --bcc-emails with a comma-separated list to blind-copy team inboxes on every sequence email; use --clear-bcc-emails to remove them."],examples:['sequenzy sequences update seq_123 --name "User Onboarding"',"sequenzy sequences update seq_123 --pause-new-enrollments","sequenzy sequences update seq_123 --resume-new-enrollments","sequenzy sequences update seq_123 --enrollment-mode matching_field","sequenzy sequences update seq_123 --enrollment-field-path order.id","sequenzy sequences update seq_123 --sending-window-start 08:00 --sending-window-end 20:00 --sending-window-timezone Europe/Kiev --sending-window-days weekdays","sequenzy sequences update seq_123 --clear-sending-window",'sequenzy sequences update seq_123 --bcc-emails "cs-team@yourcompany.com, founder@yourcompany.com"',"sequenzy sequences update seq_123 --clear-bcc-emails","sequenzy sequences update seq_123 --steps-file ./sequence-updates.json",`sequenzy sequences update seq_123 --stop-condition-json '{"type":"has_tag","value":"customer"}'`,`sequenzy sequences update seq_123 --insert-steps-json '{"afterNodeId":"node_email","steps":[{"delay":{"days":1},"subject":"Migration check-in","html":"<p>Need help migrating?</p>"}]}' --confirm-structural-change`,`sequenzy sequences update seq_123 --insert-steps-json '{"afterNodeId":"node_email","steps":[{"nodeType":"logic_wait_for_event","config":{"label":"Wait for reply","eventName":"email.replied","timeoutDays":5,"timeoutAction":"continue"}}]}'`,`sequenzy sequences update seq_123 --branch-json '{"afterNodeId":"node_email","branches":[{"conditionType":"link_clicked","linkUrl":"project-invites","activityScope":"previous_email","steps":[{"subject":"Invite accepted","html":"<p>Thanks for accepting.</p>"}]}],"elseSteps":[{"subject":"Reminder","html":"<p>Please accept your invite.</p>"}]}'`,`sequenzy sequences update seq_123 --branch-json '{"afterNodeId":"node_email_1","branches":[{"id":"replied","conditionType":"event_received","eventName":"email.replied","activityScope":"this_sequence","targetNodeId":"node_complete"}],"elseTargetNodeId":"node_email_2"}'`,"sequenzy sequences update seq_123 --branch-file ./branch.json",`sequenzy sequences update seq_123 --sms-steps-json '[{"nodeId":"node_sms","text":"Hey {{FIRST_NAME}}, your order shipped!"}]'`,`sequenzy sequences update seq_123 --subscriber-update-steps-json '[{"nodeId":"node_update","config":{"customAttributeUpdates":[{"name":"mrr","value":"{{event.amount}}","valueType":"number"}]}}]'`]});var i0A=J6.command("enable <id>").description("Enable a sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("enable",{id:A,...x}));X0(i0A,{examples:["sequenzy sequences enable seq_123"]});var m0A=J6.command("disable <id>").description("Disable a sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("disable",{id:A,...x}));X0(m0A,{examples:["sequenzy sequences disable seq_123"]});var c0A=J6.command("duplicate <id>").description("Create an independent draft copy of a sequence").option("-n, --name <name>","Name for the copied sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("duplicate",{id:A,...x}));X0(c0A,{notes:["Email templates, graph topology, and sequence A/B tests are copied independently."],examples:["sequenzy sequences duplicate seq_123",'sequenzy sequences duplicate seq_123 --name "Welcome Series v2"']});var r0A=J6.command("archive <id>").description("Archive a sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("archive",{id:A,...x}));X0(r0A,{examples:["sequenzy sequences archive seq_123"]});var p0A=J6.command("unarchive <id>").description("Restore an archived sequence as a draft").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("unarchive",{id:A,...x}));X0(p0A,{examples:["sequenzy sequences unarchive seq_123"]});var _0A=J6.command("pause-enrollments <id>").description("Stop new enrollments while current sequence recipients continue").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("pause-enrollments",{id:A,...x}));X0(_0A,{notes:["The sequence must already be active. Existing active and waiting recipients keep moving through the sequence.","Use sequences disable when you want to freeze current recipients too."],examples:["sequenzy sequences pause-enrollments seq_123"]});var n0A=J6.command("resume-enrollments <id>").description("Resume new enrollments for an active sequence without changing current recipients").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("resume-enrollments",{id:A,...x}));X0(n0A,{notes:["The sequence must already be active. Use sequences enable to resume a fully disabled sequence."],examples:["sequenzy sequences resume-enrollments seq_123"]});var l0A=J6.command("enroll <id>").description("Manually enroll subscribers in a sequence").option("-e, --email <emails...>","Email addresses to enroll").option("--subscriber-ids <ids...>","Subscriber IDs to enroll").option("--emails-json <json>","JSON array of emails, or an object with emails/subscribers").option("--emails-file <file>","JSON, CSV, or newline-separated file with subscriber emails").option("--target-node-id <nodeId>","Sequence node to enroll at; defaults to the first step after the trigger").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("enroll",{id:A,...x}));X0(l0A,{notes:["Provide at least one target using --subscriber-ids or exactly one email source: --email, --emails-json, or --emails-file.","Subscribers must be active; unknown emails are reported as not found and inactive, unavailable, or already enrolled subscribers are skipped.","Enrollment requires the sequence to be accepting entrants (enabled and not paused for enrollment)."],examples:["sequenzy sequences enroll seq_123 --email one@example.com two@example.com","sequenzy sequences enroll seq_123 --subscriber-ids sub_123 sub_456 --target-node-id node_email_2","sequenzy sequences enroll seq_123 --emails-file ./vips.csv","sequenzy sequences enroll seq_123 --email one@example.com --target-node-id node_email_2"]});var d0A=J6.command("cancel-enrollments <id>").description("Cancel active or waiting subscriber enrollments in a sequence").option("--subscriber-id <id>","Cancel enrollments for one subscriber ID").option("--field-path <path>","Entry event property dot path to match, such as order.id").option("--field-values <values>","Comma-separated entry field values to match").option("--reason <reason>","Reason stored on cancelled enrollments").option("--apply","Actually cancel matches; otherwise only dry-run").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("cancel-enrollments",{id:A,...x}));X0(d0A,{notes:["sequenceId is always required. Provide exactly one target: --subscriber-id or --field-values.","Without --apply, this command only reports matching enrollments.","When --field-path is omitted, the API uses the sequence enrollmentFieldPath if configured."],examples:["sequenzy sequences cancel-enrollments seq_123 --subscriber-id sub_123 --apply","sequenzy sequences cancel-enrollments seq_123 --field-path order.id --field-values ord_123,ord_456"]});var a0A=J6.command("delete <id>").description("Delete a sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>E9("delete",{id:A,...x}));X0(a0A,{examples:["sequenzy sequences delete seq_123"]});var C2=A8.command("ab-tests").description("Inspect and edit A/B test variants").action(()=>C2.help());X0(C2,{notes:["Use get to discover variant IDs, then update-variant to edit a specific A/B variant.","Only draft A/B tests can be edited.","create, add-variant, and delete-variant work on campaign and sequence A/B tests; delete works on campaign A/B tests only."],examples:["sequenzy ab-tests list --sequence seq_123","sequenzy ab-tests get ab_123","sequenzy ab-tests stats ab_123 --period 7d","sequenzy ab-tests create camp_123 --test-percentage 20 --winner-criteria open_rate",'sequenzy ab-tests add-variant ab_123 --subject "Alternative subject"',"sequenzy ab-tests restart ab_123 --source-variant var_b",'sequenzy ab-tests update-variant ab_123 var_b --subject "New subject"',"sequenzy ab-tests update-variant ab_123 var_b --blocks-file ./variant-b.json"]});var s0A=C2.command("list").description("List A/B tests").option("--sequence <id>","Filter by sequence ID").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>r2("list",A));X0(s0A,{examples:["sequenzy ab-tests list --sequence seq_123"]});var o0A=C2.command("get <id>").description("Get A/B test details and variants").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("get",{id:A,...x}));X0(o0A,{examples:["sequenzy ab-tests get ab_123"]});var t0A=C2.command("stats <id>").description("Get A/B test variant stats").option("-p, --period <period>","Time period (1h, 24h, 7d, 30d, 90d)").option("--start <iso>","Custom range start as ISO 8601").option("--end <iso>","Custom range end as ISO 8601").option("--include-bots","Include machine-classified bot/scanner opens and clicks").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("stats",{id:A,...x}));X0(t0A,{notes:["Use --period or both --start and --end. Custom ranges max at 90 days.","Bot/scanner opens and clicks are excluded by default; pass --include-bots to inspect raw engagement."],examples:["sequenzy ab-tests stats ab_123","sequenzy ab-tests stats ab_123 --period 30d","sequenzy ab-tests stats ab_123 --include-bots"]});var e0A=C2.command("restart <id>").description("Run another sequence A/B test from an existing variant").option("--source-variant <id>","Variant to use as the new control. Defaults to the selected winner.").option("--test-type <type>","Test type for generated variants: subject or content").option("--winner-threshold <count>","Subscribers before selecting a winner (10-1000)").option("--variant-count <count>","Total variants including control (2-4)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("restart",{id:A,...x}));X0(e0A,{notes:["Only sequence A/B tests with a selected winner can be restarted.","Run `sequenzy ab-tests get <id>` first to find variant IDs."],examples:["sequenzy ab-tests restart ab_123","sequenzy ab-tests restart ab_123 --source-variant var_b --test-type content --variant-count 3"]});var AAA=C2.command("update-variant <id> <variantId>").description("Update a draft A/B test variant").option("-s, --subject <subject>","Variant subject").option("--preview-text <text>","Variant preview text").option("--html <html>","Replacement HTML body").option("--html-file <file>","Read replacement HTML from file").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--confirm-live-change","Confirm updating a variant used by an active sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x,E)=>r2("update-variant",{id:A,variantId:x,...E}));X0(AAA,{notes:["Provide either HTML or blocks, not both.","Use --confirm-live-change when the variant belongs to an active sequence.","Run `sequenzy ab-tests get <id>` first to find variant IDs."],examples:['sequenzy ab-tests update-variant ab_123 var_b --subject "New subject"',"sequenzy ab-tests update-variant ab_123 var_b --html-file ./variant-b.html"]});var xAA=C2.command("create [campaignId]").description("Create a campaign or sequence-node A/B test").option("--automation-node <nodeId>","Convert this sequence email node into an A/B test node").option("--confirm-live-change","Confirm conversion of an email node in an active sequence").option("-n, --name <name>","A/B test name").option("--test-percentage <percent>","Share of the audience used for testing (5-50, default 20)").option("--duration-minutes <minutes>","Test duration before a winner is selected (15-1440, default 240)").option("--winner-criteria <criteria>","Winner criteria: open_rate or click_rate (default open_rate)").option("--test-type <type>","Sequence test type: subject or content (default content)").option("--winner-threshold <count>","Sequence test sample size (10-1000, default 100)").option("--variants-json <json>","Inline JSON array of extra variants ({subject, previewText?, blocks?})").option("--variants-file <file>","Path to a JSON file with extra variants ({subject, previewText?, blocks?})").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("create",{campaignId:A,automationNodeId:x.automationNode,...x}));X0(xAA,{notes:["Provide either a campaign ID or --automation-node, but not both.","Campaigns must be in draft or rejected status. Sequence node IDs must reference an email node.","Variant A is created automatically from the campaign email; provided variants are added after it."],examples:["sequenzy ab-tests create camp_123",`sequenzy ab-tests create --automation-node node_123 --test-type content --winner-threshold 100 --variants-json '[{"subject":"Variant B"}]'`,"sequenzy ab-tests create camp_123 --test-percentage 30 --duration-minutes 120 --winner-criteria click_rate",`sequenzy ab-tests create camp_123 --variants-json '[{"subject":"Alternative subject"}]'`]});var EAA=C2.command("add-variant <id>").description("Add a variant to a draft campaign or sequence A/B test").requiredOption("-s, --subject <subject>","Variant subject").option("--preview-text <text>","Variant preview text").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--confirm-live-change","Confirm adding a variant to an A/B test in an active sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("add-variant",{id:A,...x}));X0(EAA,{notes:["Variants can only be added while the A/B test is in draft status.","A/B tests in an active sequence require --confirm-live-change."],examples:['sequenzy ab-tests add-variant ab_123 --subject "Alternative subject"','sequenzy ab-tests add-variant ab_123 --subject "Alternative subject" --blocks-file ./variant.json']});var BAA=C2.command("delete-variant <id> <variantId>").description("Remove a variant from a draft campaign or sequence A/B test").option("-y, --yes","Skip the confirmation prompt").option("--confirm-live-change","Confirm deleting a variant from an A/B test in an active sequence").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x,E)=>r2("delete-variant",{id:A,variantId:x,...E}));X0(BAA,{notes:["Variant A is the control variant and cannot be deleted.","Variants can only be removed while the A/B test is in draft status.","A/B tests in an active sequence require --confirm-live-change."],examples:["sequenzy ab-tests delete-variant ab_123 var_b --yes"]});var gAA=C2.command("delete <id>").description("Delete a campaign A/B test").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>r2("delete",{id:A,...x}));X0(gAA,{notes:["Running A/B tests cannot be deleted; the linked campaign must be draft or rejected."],examples:["sequenzy ab-tests delete ab_123 --yes"]});var VD=A8.command("templates").description("Manage email templates").action(()=>VD.help());X0(VD,{notes:["Template content can be provided as raw HTML or as Sequenzy blocks JSON.","Templates can be assigned labels and listed by label for integration dashboards.","Use blocks when you need conditional content, per-block styles, or an exact editor-compatible structure.",$R],examples:["sequenzy templates list --company comp_123","sequenzy templates list --label edm --company comp_123",'sequenzy templates create welcome --subject "Welcome" --html-file ./welcome.html','sequenzy templates create welcome --subject "Welcome" --label edm template --html-file ./welcome.html','sequenzy templates create welcome --subject "Welcome" --blocks-file ./welcome-blocks.json','sequenzy templates update tmpl_123 --subject "Updated" --html-file ./welcome-v2.html','sequenzy templates localizations set tmpl_123 es --subject "Hola" --html-file ./welcome-es.html',"sequenzy templates localizations sync tmpl_123 --locale es fr"]});var QAA=VD.command("list").description("List all templates").option("--label <labels...>","Filter by label name").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>jD("list",A));X0(QAA,{examples:["sequenzy templates list --company comp_123","sequenzy templates list --label edm --company comp_123"]});var DAA=VD.command("get <id>").description("Get template details").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>jD("get",{id:A,...x}));X0(DAA,{examples:["sequenzy templates get tmpl_123 --company comp_123"]});var CAA=VD.command("create <name>").description("Create a template").option("-s, --subject <subject>","Email subject (optional with --prompt)").option("--preview-text <text>","Email preview text override").option("--prompt <prompt>","Generate branded native blocks from a prompt").option("--style <style>","Prompt generation style").option("--tone <tone>","Prompt generation tone").option("--html <html>","Email HTML content").option("--html-file <file>","Read HTML from file").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--label <labels...>","Label names to assign").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>jD("create",{name:A,...x}));X0(CAA,{notes:["Provide exactly one of prompt, HTML, or blocks JSON content.","Use blocks when you need conditional content, per-block styles, or exact editor parity."],examples:['sequenzy templates create welcome --prompt "Welcome new customers"','sequenzy templates create welcome --subject "Welcome" --html-file ./welcome.html','sequenzy templates create welcome --subject "Welcome" --label edm template --html-file ./welcome.html','sequenzy templates create welcome --subject "Welcome" --blocks-file ./welcome-blocks.json']});var FAA=VD.command("update <id>").description("Update a template").option("-n, --name <name>","Template name").option("-s, --subject <subject>","Email subject").option("--preview-text <text>","Inbox preview text").option("--html <html>","Email HTML content").option("--html-file <file>","Read HTML from file").option("--blocks-json <json>","Inline JSON array of Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with Sequenzy email blocks").option("--label <labels...>","Replace label names").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>jD("update",{id:A,...x}));X0(FAA,{notes:["Provide at least one of --name, --subject, --preview-text, --label, --html, --html-file, --blocks-json, or --blocks-file.","Do not combine HTML flags with blocks flags in the same request."],examples:['sequenzy templates update tmpl_123 --subject "Updated"','sequenzy templates update tmpl_123 --preview-text "A warmer inbox preview"',"sequenzy templates update tmpl_123 --label edm template","sequenzy templates update tmpl_123 --html-file ./welcome-v2.html","sequenzy templates update tmpl_123 --blocks-file ./welcome-v2-blocks.json"]});var qR=VD.command("localizations").description("Manage localized template variants").action(()=>qR.help());X0(qR,{notes:["Set stores caller-supplied localized content immediately.","Sync queues AI translation for selected locales, or every enabled non-primary locale when --locale is omitted."],examples:['sequenzy templates localizations set tmpl_123 es --subject "Hola" --html-file ./welcome-es.html',"sequenzy templates localizations sync tmpl_123 --locale es fr","sequenzy templates localizations sync tmpl_123"]});var IAA=qR.command("set <id> <locale>").description("Create or replace a localized template variant").requiredOption("-s, --subject <subject>","Localized email subject").option("--preview-text <text>","Localized email preview text").option("--html <html>","Localized email HTML content").option("--html-file <file>","Read localized HTML from file").option("--blocks-json <json>","Inline JSON array of localized Sequenzy email blocks").option("--blocks-file <file>","Path to a JSON file with localized Sequenzy email blocks").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x,E)=>jD("set-localization",{id:A,locale:x,...E}));X0(IAA,{notes:["The locale must be enabled in the company's localization settings and cannot be the primary locale.","Provide exactly one HTML or blocks content source."],examples:['sequenzy templates localizations set tmpl_123 es --subject "Hola" --html-file ./welcome-es.html','sequenzy templates localizations set tmpl_123 fr-CA --subject "Bienvenue" --blocks-file ./welcome-fr-ca.json']});var wAA=qR.command("sync <id>").description("Queue AI translation for template locales").option("--locale <locales...>","Enabled locales to sync; omit to sync every non-primary locale").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>jD("sync-localizations",{id:A,locales:x.locale,company:x.company,json:x.json}));X0(wAA,{examples:["sequenzy templates localizations sync tmpl_123 --locale es fr","sequenzy templates localizations sync tmpl_123"]});var JAA=VD.command("delete <id>").description("Delete a template").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>jD("delete",{id:A,...x}));X0(JAA,{notes:["Deletion fails when the template is still referenced by a campaign or sequence."],examples:["sequenzy templates delete tmpl_123"]});var qJ=A8.command("companies").description("Inspect or create companies").action(()=>qJ.help());X0(qJ,{notes:["Company creation starts background website processing automatically."],examples:["sequenzy companies list","sequenzy companies get comp_123","sequenzy companies update comp_123 --primary-color '#0ea5e9'","sequenzy companies create example.com --name Example"]});var fAA=qJ.command("list").description("List accessible companies").option("--json","Print raw JSON").action((A)=>mH("list",A));X0(fAA,{examples:["sequenzy companies list"]});var KAA=qJ.command("get <id>").description("Get company details").option("--json","Print raw JSON").action((A,x)=>mH("get",{id:A,...x}));X0(KAA,{examples:["sequenzy companies get comp_123"]});var $AA=qJ.command("update <id>").description("Update company info, brand context, and reply tracking").option("-n, --name <name>","Company display name").option("--description <text>","Short product or company summary").option("--description-file <path>","Read description from a file").option("--logo-url <url>","Public logo URL").option("--founder-name <name>","Founder or sender name").option("--primary-color <hex>","Primary brand color, e.g. #f97316").option("--brand-colors-json <json>","Brand colors object as JSON").option("--brand-colors-file <path>","Read brand colors JSON from a file").option("--value-props-json <json>","Value propositions array as JSON").option("--value-props-file <path>","Read value propositions JSON from a file").option("--testimonials-json <json>","Testimonials array as JSON").option("--testimonials-file <path>","Read testimonials JSON from a file").option("--tone-voice <text>","Tone of voice guidance").option("--company-context <text>","Product knowledge for AI writing").option("--company-context-file <path>","Read product knowledge from a file").option("--email-length-preference <value>","Email length: concise, balanced, or detailed").option("--social-links-json <json>","Social links object as JSON").option("--social-links-file <path>","Read social links JSON from a file").option("--privacy-policy-url <url>","Privacy policy URL").option("--terms-url <url>","Terms of service URL").option("--address <address>","Physical mailing address").option("--language <code>","Primary language code").option("--pricing-json <json>","Pricing object as JSON").option("--pricing-file <path>","Read pricing JSON from a file").option("--font-family <family>","Default email font family").option("--email-theme-json <json>","Default email theme as JSON (partial: presetId, colors, typography, layout; pass null to reset)").option("--email-theme-file <path>","Read the default email theme JSON from a file").option("--email-direction <direction>","Default email direction: ltr or rtl").option("--enable-reply-tracking","Enable inbound reply tracking").option("--disable-reply-tracking","Disable inbound reply tracking").option("--reply-tracking-domain-mode <mode>","Reply domain mode: sequenzy or custom").option("--enable-reply-forwarding","Enable captured reply forwarding").option("--disable-reply-forwarding","Disable captured reply forwarding").option("--json","Print raw JSON").action((A,x)=>mH("update",{id:A,...x}));X0($AA,{examples:["sequenzy companies update comp_123 --primary-color '#0ea5e9'",`sequenzy companies update comp_123 --email-theme-json '{"colors":{"mutedText":"#4b5563"},"typography":{"baseFontSize":16}}'`,"sequenzy companies update comp_123 --company-context-file ./product.md --tone-voice 'clear, direct, warm'","sequenzy companies update comp_123 --enable-reply-tracking --reply-tracking-domain-mode sequenzy",`sequenzy companies update comp_123 --value-props-json '[{"title":"Fast setup","description":"Launch lifecycle emails in minutes."}]'`]});var HAA=qJ.command("create <domain>").description("Create a company and queue website processing").option("-n, --name <name>","Company name").option("--json","Print raw JSON").action((A,x)=>mH("create",{domain:A,...x}));X0(HAA,{examples:["sequenzy companies create example.com","sequenzy companies create https://example.com --name Example"]});var Ry=A8.command("tags").description("Manage tag definitions").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>yJ("list",A));X0(Ry,{notes:["Running `sequenzy tags` without a subcommand lists tag definitions.","Tag names are normalized to lowercase with dashes; system tags cannot be changed or deleted."],examples:["sequenzy tags --company comp_123","sequenzy tags list","sequenzy tags create vip --color purple","sequenzy tags update tag_123 --color red","sequenzy tags delete tag_123 --yes"]});var yAA=Ry.command("list").description("List tag definitions").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>yJ("list",A));X0(yAA,{examples:["sequenzy tags list --company comp_123"]});var qAA=Ry.command("create <name>").description("Create a tag definition").option("--color <color>","Tag color, e.g. gray, red, green, blue, purple").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>yJ("create",{name:A,...x}));X0(qAA,{notes:["Names are normalized to lowercase with dashes, so `VIP Customer` becomes `vip-customer`."],examples:["sequenzy tags create vip","sequenzy tags create vip --color purple"]});var YAA=Ry.command("update <tagId>").description("Update a tag definition color").requiredOption("--color <color>","New tag color").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>yJ("update",{tagId:A,...x}));X0(YAA,{notes:["System tags cannot be updated."],examples:["sequenzy tags update tag_123 --color red"]});var XAA=Ry.command("delete <tagId>").description("Delete a tag definition").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>yJ("delete",{tagId:A,...x}));X0(XAA,{notes:["Deleting a tag removes it from every subscriber.","Tags used by sequences cannot be deleted until those sequences stop referencing them."],examples:["sequenzy tags delete tag_123 --yes"]});var bg=A8.command("lists").description("Manage subscriber lists").action(()=>bg.help());X0(bg,{examples:["sequenzy lists list --company comp_123",'sequenzy lists create Newsletter --description "Public newsletter list"','sequenzy lists update list_123 --name "Weekly Newsletter" --private',"sequenzy lists add-subscribers list_123 --emails-file ./batch-001.csv","sequenzy lists remove-subscribers list_123 --email one@example.com","sequenzy lists import list_123 --emails-file ./batch-001.csv","sequenzy lists delete list_123 --yes"]});var UAA=bg.command("list").description("List subscriber lists").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>UD("list",A));X0(UAA,{examples:["sequenzy lists list --company comp_123"]});var ZAA=bg.command("create <name>").description("Create a subscriber list").option("-d, --description <text>","List description").option("--private","Mark the list as private").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("create",{name:A,...x}));X0(ZAA,{examples:['sequenzy lists create Newsletter --description "Public newsletter list"',"sequenzy lists create VIP --private --company comp_123"]});var GAA=bg.command("add-subscribers <listId>").description("Add subscribers to a list from emails, JSON, or a file").option("-e, --email <emails...>","Email addresses to add").option("--emails-json <json>","JSON array of emails, or an object with emails/subscribers").option("--emails-file <file>","JSON, CSV, or newline-separated file with subscriber emails").option("--duplicate-strategy <strategy>","Duplicate strategy: skip, merge, or overwrite","skip").option("--enroll-sequences","Enroll newly created subscribers in matching sequences").option("--opt-in-mode <mode>","Consent mode: default, confirmed, or double_opt_in","default").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("add-subscribers",{listId:A,...x}));X0(GAA,{notes:["Provide exactly one source: --email, --emails-json, or --emails-file.","Files may be newline-separated, CSV with an email column, a JSON email array, or a JSON object with emails/subscribers.","CSV headers named email, e-mail, email address, or mail are detected; otherwise the first column is used.","New subscribers are not enrolled in matching sequences unless --enroll-sequences is set."],examples:["sequenzy lists add-subscribers list_123 --email one@example.com two@example.com",`sequenzy lists add-subscribers list_123 --emails-json '["one@example.com","two@example.com"]'`,"sequenzy lists add-subscribers list_123 --emails-file ./batch-001.csv"]});var WAA=bg.command("import <listId>").description("Alias for add-subscribers; import subscribers into a list").option("-e, --email <emails...>","Email addresses to add").option("--emails-json <json>","JSON array of emails, or an object with emails/subscribers").option("--emails-file <file>","JSON, CSV, or newline-separated file with subscriber emails").option("--duplicate-strategy <strategy>","Duplicate strategy: skip, merge, or overwrite","skip").option("--enroll-sequences","Enroll newly created subscribers in matching sequences").option("--opt-in-mode <mode>","Consent mode: default, confirmed, or double_opt_in","default").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("add-subscribers",{listId:A,...x}));X0(WAA,{notes:["`lists import` is an alias for `lists add-subscribers`.","Provide exactly one source: --email, --emails-json, or --emails-file.","Files may be newline-separated, CSV with an email column, a JSON email array, or a JSON object with emails/subscribers.","CSV headers named email, e-mail, email address, or mail are detected; otherwise the first column is used."],examples:["sequenzy lists import list_123 --emails-file ./batch-001.csv",`sequenzy lists import list_123 --emails-json '["one@example.com","two@example.com"]'`]});var RAA=bg.command("update <listId>").description("Update a subscriber list").option("-n, --name <name>","List name").option("-d, --description <text>","List description").option("--private","Mark the list as private").option("--no-private","Mark the list as public").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("update",{listId:A,...x}));X0(RAA,{notes:["Provide at least one of --name, --description, --private, or --no-private."],examples:['sequenzy lists update list_123 --name "Weekly Newsletter"',"sequenzy lists update list_123 --private","sequenzy lists update list_123 --no-private"]});var MAA=bg.command("remove-subscribers <listId>").description("Remove subscribers from a list by email").option("-e, --email <emails...>","Email addresses to remove").option("--emails-json <json>","JSON array of emails, or an object with emails/subscribers").option("--emails-file <file>","JSON, CSV, or newline-separated file with subscriber emails").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("remove-subscribers",{listId:A,...x}));X0(MAA,{notes:["Provide exactly one source: --email, --emails-json, or --emails-file.","Subscribers are only removed from the list; they stay in your audience.","Emails that do not match a subscriber are reported as not found."],examples:["sequenzy lists remove-subscribers list_123 --email one@example.com two@example.com","sequenzy lists remove-subscribers list_123 --emails-file ./churned.csv"]});var zAA=bg.command("delete <listId>").description("Delete a subscriber list").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>UD("delete",{listId:A,...x}));X0(zAA,{notes:["Deleting a list removes all of its memberships; subscribers themselves are kept."],examples:["sequenzy lists delete list_123 --yes"]});var dF=A8.command("segments").description("Manage segments").action(()=>dF.help());X0(dF,{notes:["Use --filter-json for arbitrary segment filters. The CLI will fill in missing filter IDs.","Use --match any to create a segment that matches any filter instead of all filters.",'Engagement filters (emailSent, emailOpened, emailClicked, emailBounced, emailComplained) accept either a time range as the value ("7d", "30d", "90d", "180d", "all") OR a specific campaign ("campaign:<campaign_id>"). Combine multiple engagement filters with --match all to build things like "bounced campaign A but not campaign B".'],examples:["sequenzy segments list --company comp_123",'sequenzy segments create --name "Bought Pro" --stripe-product prod_pro',`sequenzy segments create --name "VIP or Churn Risk" --match any --filter-json '[{"field":"tag","operator":"contains","value":"vip"},{"field":"emailOpened","operator":"is_not","value":"30d"}]'`,`sequenzy segments create --name "Bounced A not B" --filter-json '[{"field":"emailBounced","operator":"is","value":"campaign:cmp_abc"},{"field":"emailBounced","operator":"is_not","value":"campaign:cmp_xyz"}]'`]});var SAA=dF.command("list").description("List all segments").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>pw("list",A));X0(SAA,{examples:["sequenzy segments list --company comp_123"]});var LAA=dF.command("create").description("Create a segment").requiredOption("-n, --name <name>","Segment name").option("-c, --company <id>","Company ID override for personal API keys").option("--match <mode>","How filters combine: all or any","all").option("--stripe-product <id>","Stripe product ID to segment on").option("--commerce-product <id>","Commerce product to segment on, as provider:productId (e.g. shopify:42); a bare ID matches any provider").option("--purchase-operator <operator>","Purchase operator (bought, didnt-buy, at-least, less-than)","bought").option("--payments <number>","Payment threshold for at-least/less-than").option("--orders <number>","Order threshold for at-least/less-than with --commerce-product").option("--filter-json <json>","Raw JSON array of segment filters (IDs are optional)").option("--json","Print raw JSON").action((A)=>pw("create",A));X0(LAA,{examples:['sequenzy segments create --name "Bought Pro" --stripe-product prod_pro','sequenzy segments create --name "3+ Pro Payments" --stripe-product prod_pro --purchase-operator at-least --payments 3','sequenzy segments create --name "Starter Kit Buyers" --commerce-product api:prod-starter-kit','sequenzy segments create --name "Repeat Kit Buyers" --commerce-product api:prod-starter-kit --purchase-operator at-least --orders 2',`sequenzy segments create --name "VIP or Churn Risk" --match any --filter-json '[{"field":"tag","operator":"contains","value":"vip"},{"field":"emailOpened","operator":"is_not","value":"30d"}]'`,`sequenzy segments create --name "Bounced A not B" --filter-json '[{"field":"emailBounced","operator":"is","value":"campaign:cmp_abc"},{"field":"emailBounced","operator":"is_not","value":"campaign:cmp_xyz"}]'`]});var OAA=dF.command("count <id>").description("Get subscriber count for a segment").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>pw("count",{id:A,...x}));X0(OAA,{examples:["sequenzy segments count seg_123 --company comp_123"]});var PAA=dF.command("update <id>").description("Update a segment name, filters, or join operator").option("-n, --name <name>","Segment name").option("--filters-json <json>","Raw JSON array of segment filters, or an object with a root group").option("--filters-file <file>","Path to a JSON file with segment filters or a root group").option("--join-operator <operator>","How filters combine: and or or").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>pw("update",{id:A,...x}));X0(PAA,{notes:["Provide at least one of --name, --filters-json, --filters-file, or --join-operator.","Filters replace the existing filter set; missing filter IDs are filled in by the CLI."],examples:['sequenzy segments update seg_123 --name "Churn Risk"',`sequenzy segments update seg_123 --filters-json '[{"field":"tag","operator":"contains","value":"vip"}]'`,"sequenzy segments update seg_123 --join-operator or"]});var jAA=dF.command("delete <id>").description("Delete a segment").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>pw("delete",{id:A,...x}));X0(jAA,{examples:["sequenzy segments delete seg_123 --yes"]});var vD=A8.command("audience-syncs").description("Sync segments to Meta custom audiences").action(()=>vD.help());X0(vD,{notes:["Requires the Meta Ads integration to be connected in the dashboard (Settings -> Integrations).",'Use --template to start from a ready-made segment ("zero-ltv", "no-purchase-1y", "recent-buyers", "high-spenders-ecom", "non-buyers", "engaged"); the segment is created automatically on first use.',"Audiences are add-only: subscribers who leave the segment stay in the Meta audience."],examples:["sequenzy audience-syncs list",'sequenzy audience-syncs create --template recent-buyers --ad-account act_123 --name "Sequenzy - Recent buyers"']});var NAA=vD.command("list").description("List audience syncs with schedule and status").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>zF("list",A));X0(NAA,{examples:["sequenzy audience-syncs list --company comp_123"]});var VAA=vD.command("ad-accounts").description("List the connected Meta ad accounts").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>zF("ad-accounts",A));X0(VAA,{examples:["sequenzy audience-syncs ad-accounts"]});var vAA=vD.command("create").description("Create an audience sync (segment -> Meta custom audience)").option("--segment <id>","Existing segment ID to sync").option("--template <id>",'Predefined segment template (for example "recent-buyers", "zero-ltv", "no-purchase-1y")').requiredOption("--ad-account <id>","Meta ad account ID (see `sequenzy audience-syncs ad-accounts`)").requiredOption("-n, --name <name>","Audience name in Meta Ads Manager").option("--frequency <frequency>","Sync frequency: hourly, daily, or weekly","daily").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>zF("create",A));X0(vAA,{examples:['sequenzy audience-syncs create --template recent-buyers --ad-account act_123 --name "Sequenzy - Recent buyers"','sequenzy audience-syncs create --segment seg_123 --ad-account act_123 --name "Sequenzy - VIPs" --frequency hourly']});var uAA=vD.command("update <id>").description("Change an audience sync's frequency or pause/resume it").option("--frequency <frequency>","Sync frequency: hourly, daily, or weekly").option("--active <bool>","true to resume, false to pause").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>zF("update",{id:A,...x}));X0(uAA,{examples:["sequenzy audience-syncs update sync_123 --frequency weekly","sequenzy audience-syncs update sync_123 --active false"]});var TAA=vD.command("delete <id>").description("Remove an audience sync (the Meta audience itself is kept)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>zF("delete",{id:A,...x}));X0(TAA,{examples:["sequenzy audience-syncs delete sync_123"]});var hAA=vD.command("sync <id>").description("Trigger an immediate sync run").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>zF("sync",{id:A,...x}));X0(hAA,{examples:["sequenzy audience-syncs sync sync_123"]});var uD=A8.command("products").description("Manage products and digital delivery files").action(()=>uD.help());X0(uD,{notes:["Products sync from Stripe, Shopify, and WooCommerce integrations.","Attach a deliverable file to a Stripe product, then reference it in purchase sequence emails with {{event.download.url}} and {{event.download.name}}."],examples:["sequenzy products list --provider stripe","sequenzy products sync",'sequenzy products upsert my-ebook --title "The Ebook" --price-cents 1900 --file ./ebook.pdf',"sequenzy products attach-file prod_abc --file ./guide.pdf","sequenzy products attach-file prod_abc --url https://example.com/guide.pdf --name guide.pdf","sequenzy products detach-file prod_abc","sequenzy products delete my-ebook"]});var bAA=uD.command("list").description("List synced products including attached delivery files").option("-c, --company <id>","Company ID override for personal API keys").option("--provider <provider>","Filter by provider (stripe, shopify, woocommerce, manual)").option("--search <query>","Filter products by title").option("--json","Print raw JSON").action((A)=>LF("list",A));X0(bAA,{examples:["sequenzy products list --provider stripe"]});var kAA=uD.command("sync").description("Queue a Stripe product catalog sync").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>LF("sync",A));X0(kAA,{examples:["sequenzy products sync --company comp_123"]});var iAA=uD.command("upsert [productId]").description("Create or update products in the catalog (Commerce API, keyed by your productId)").option("--title <title>","Product title (required for single upserts)").option("--description <text>","Product description").option("--price-cents <cents>","Price in the smallest currency unit").option("--currency <code>","ISO currency code, e.g. USD").option("--image-url <url>","Product image URL").option("--product-url <url>","Product page URL").option("--in-stock","Mark the product as in stock").option("--out-of-stock","Mark the product as out of stock").option("--file <path>","Deliverable file to upload and attach in one step").option("--url <link>","External deliverable http(s) link to attach in one step").option("--name <fileName>","Display name for the attached deliverable").option("--products-json <json>","Inline JSON array of products to upsert").option("--products-file <file>","Path to a JSON file with products to upsert").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>LF("upsert",x,A));X0(iAA,{notes:["Products are keyed by your own productId and stored under the api provider.","Combine --file or --url with a single-product upsert to attach the deliverable file in the same command.","Use --products-json/--products-file for bulk upserts of up to 100 products."],examples:['sequenzy products upsert my-ebook --title "The Ebook" --price-cents 1900 --currency USD --file ./ebook.pdf','sequenzy products upsert my-course --title "The Course" --url https://files.example.com/course.zip',"sequenzy products upsert --products-file ./products.json"]});var mAA=uD.command("delete <productId>").description("Delete a product previously pushed via the Commerce API").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>LF("delete",x,A));X0(mAA,{examples:["sequenzy products delete my-ebook"]});var cAA=uD.command("attach-file <id>").description("Attach the deliverable file buyers receive after purchase").option("--file <path>","Local file to upload (PDF, ePub, ZIP, media)").option("--url <link>","External http(s) link instead of an upload").option("--name <fileName>","Display name for the file (e.g. guide.pdf)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>LF("attach-file",x,A));X0(cAA,{examples:["sequenzy products attach-file prod_abc --file ./guide.pdf","sequenzy products attach-file prod_abc --url https://example.com/template.zip --name template.zip"]});var rAA=uD.command("detach-file <id>").description("Remove the attached delivery file from a product").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>LF("detach-file",x,A));X0(rAA,{examples:["sequenzy products detach-file prod_abc"]});var My=A8.command("team").description("Manage team members and invitations").action(()=>My.help());X0(My,{notes:["Inviting and cancelling invitations requires owner or admin access.","Billing access can only be granted by the company owner."],examples:["sequenzy team list","sequenzy team invite teammate@example.com --role admin","sequenzy team cancel-invitation inv_123"]});var pAA=My.command("list").description("List team members and pending invitations").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>JR("list",A));X0(pAA,{examples:["sequenzy team list --company comp_123"]});var _AA=My.command("invite <email>").description("Invite a team member or add an existing user").requiredOption("--role <role>","Member role: admin, viewer, or restricted").option("--billing-access","Allow the member to manage billing (owner only)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>JR("invite",{email:A,...x}));X0(_AA,{notes:["Existing Sequenzy users are added to the team immediately; everyone else receives an email invitation.","Invitations expire automatically and can be re-sent by inviting the same email again after cancelling."],examples:["sequenzy team invite teammate@example.com --role admin","sequenzy team invite editor@example.com --role restricted","sequenzy team invite finance@example.com --role viewer --billing-access"]});var nAA=My.command("cancel-invitation <invitationId>").description("Cancel a pending team invitation").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>JR("cancel-invitation",{invitationId:A,...x}));X0(nAA,{notes:["Run `sequenzy team list` first to find invitation IDs."],examples:["sequenzy team cancel-invitation inv_123 --yes"]});var TD=A8.command("inbox").description("Manage subscriber reply conversations").action(()=>TD.help());X0(TD,{notes:["The inbox collects subscriber replies to campaigns, sequences, and transactional email.","Use --note on replies to add an internal note instead of emailing the subscriber."],examples:["sequenzy inbox list --status open --unread","sequenzy inbox get conv_123","sequenzy inbox reply conv_123 --text 'Thanks for reaching out!'","sequenzy inbox close conv_123"]});var lAA=TD.command("list").description("List conversations").option("-s, --status <status>","Filter by status: open, closed, or all").option("--search <query>","Search by subscriber email, name, or subject").option("--unread","Only conversations with unread messages").option("-p, --page <number>","Page number (default 1)").option("-l, --limit <number>","Results per page (1-100, default 20)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>SF("list",A));X0(lAA,{examples:["sequenzy inbox list","sequenzy inbox list --status open --unread",'sequenzy inbox list --search "refund" --limit 50']});var dAA=TD.command("get <conversationId>").description("Get a conversation with its full message history").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>SF("get",{conversationId:A,...x}));X0(dAA,{examples:["sequenzy inbox get conv_123","sequenzy inbox get conv_123 --json"]});var aAA=TD.command("reply <conversationId>").description("Reply to a conversation or add an internal note").option("-t, --text <text>","Plain text message body").option("--html-file <file>","Read an HTML message body from file").option("-s, --subject <subject>","Override the reply subject").option("--note","Add an internal note instead of emailing the subscriber").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>SF("reply",{conversationId:A,...x}));X0(aAA,{notes:["Provide a body with --text and/or --html-file.","Outbound replies are emailed to the subscriber and reopen closed conversations; notes are internal only."],examples:["sequenzy inbox reply conv_123 --text 'Thanks for reaching out!'","sequenzy inbox reply conv_123 --html-file ./reply.html","sequenzy inbox reply conv_123 --text 'Customer asked for a refund' --note"]});var sAA=TD.command("close <conversationId>").description("Close a conversation").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>SF("close",{conversationId:A,...x}));X0(sAA,{examples:["sequenzy inbox close conv_123"]});var oAA=TD.command("reopen <conversationId>").description("Reopen a closed conversation").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>SF("reopen",{conversationId:A,...x}));X0(oAA,{examples:["sequenzy inbox reopen conv_123"]});var tAA=TD.command("mark-read <conversationId>").description("Mark all messages in a conversation as read").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>SF("mark-read",{conversationId:A,...x}));X0(tAA,{examples:["sequenzy inbox mark-read conv_123"]});var kg=A8.command("webhooks").description("Manage outbound webhook endpoints").action(()=>kg.help());X0(kg,{notes:["Webhook payloads are signed; the signing secret is only shown once at creation time.","Valid events cover email.*, subscriber.*, and sequence.* types; omit --event to use the default set."],examples:["sequenzy webhooks list","sequenzy webhooks create --name CI --url https://example.com/hook --event email.bounced","sequenzy webhooks deliveries wh_123 --limit 50","sequenzy webhooks replay wh_123 del_456"]});var eAA=kg.command("list").description("List outbound webhook endpoints").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>ND("list",A));X0(eAA,{examples:["sequenzy webhooks list --company comp_123"]});var AxA=kg.command("create").description("Create an outbound webhook endpoint").requiredOption("-n, --name <name>","Webhook name").requiredOption("-u, --url <url>","HTTPS endpoint URL").option("-e, --event <events...>","Event types to deliver, e.g. email.bounced subscriber.list_subscribed subscriber.list_unsubscribed").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>ND("create",A));X0(AxA,{notes:["The signing secret is printed once on creation and cannot be retrieved later - store it immediately.","Omit --event to subscribe to the default event set."],examples:["sequenzy webhooks create --name CI --url https://example.com/hook --event email.bounced","sequenzy webhooks create --name 'All events' --url https://example.com/hook"]});var xxA=kg.command("update <id>").description("Update an outbound webhook endpoint").option("-n, --name <name>","Webhook name").option("-u, --url <url>","HTTPS endpoint URL").option("-e, --event <events...>","Replacement event types").option("--enable","Enable the webhook").option("--disable","Disable the webhook").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>ND("update",{id:A,...x}));X0(xxA,{notes:["Provide at least one of --name, --url, --event, --enable, or --disable.","Changing the URL or re-enabling resets the failure circuit breaker."],examples:["sequenzy webhooks update wh_123 --url https://example.com/new-hook","sequenzy webhooks update wh_123 --event email.bounced email.complained","sequenzy webhooks update wh_123 --disable"]});var ExA=kg.command("delete <id>").description("Delete an outbound webhook endpoint").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>ND("delete",{id:A,...x}));X0(ExA,{examples:["sequenzy webhooks delete wh_123 --yes"]});var BxA=kg.command("test <id>").description("Send a test event to a webhook endpoint").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>ND("test",{id:A,...x}));X0(BxA,{notes:["The webhook must be enabled to receive a test event."],examples:["sequenzy webhooks test wh_123"]});var gxA=kg.command("deliveries <id>").description("List recent deliveries for a webhook endpoint").option("-l, --limit <number>","Maximum deliveries to return (1-100)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>ND("deliveries",{id:A,...x}));X0(gxA,{examples:["sequenzy webhooks deliveries wh_123","sequenzy webhooks deliveries wh_123 --limit 50"]});var QxA=kg.command("replay <id> <deliveryId>").description("Replay a webhook delivery").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x,E)=>ND("replay",{id:A,deliveryId:x,...E}));X0(QxA,{notes:["Run `sequenzy webhooks deliveries <id>` first to find delivery IDs."],examples:["sequenzy webhooks replay wh_123 del_456"]});var DxA=A8.command("account").description("Verify the active API key, permissions, and account context").option("--json","Print JSON").action(o90);X0(DxA,{notes:["Makes a live API request with the active credential. Compare its key name and prefix with Settings after replacing a key."],examples:["sequenzy account","sequenzy account --json"]});var CxA=A8.command("feedback <message>").description("Send product feedback about Sequenzy to the Sequenzy team").option("--category <category>","Category: missing_capability, bug, docs, ux, praise, other (default: other)").option("--context <context>","What you were trying to accomplish when you hit the gap").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>J60(A,x));X0(CxA,{notes:["Agents: send feedback whenever the user wanted something the CLI, API, or MCP tools do not support. The Sequenzy team reads every submission."],examples:['sequenzy feedback "No command to bulk-delete campaigns by label" --category missing_capability','sequenzy feedback "Segment count and list output disagree for seg_123" --category bug --context "Auditing a re-engagement segment"']});var YJ=A8.command("api-keys").description("Manage company API keys").action(()=>YJ.help());X0(YJ,{notes:["The plain API key is only returned on creation. Save it immediately.","Listing and revocation return metadata only; secrets and stored hashes are never returned."],examples:["sequenzy api-keys list --company comp_123","sequenzy api-keys create",'sequenzy api-keys create --name "CI deploy key" --company comp_123',"sequenzy api-keys revoke key_123 --company comp_123 --yes"]});var FxA=YJ.command("create").description("Create a company API key").option("-n, --name <name>","Human-readable API key name").option("-c, --company <id>","Company ID override for personal API keys").option("--preset <preset>","Permission preset: full_access, read_only, agent_safe, ai_drafting, data_ingest_safe, data_ingest_automations, transactional_sender, marketing_sender (default: full_access)").option("--scopes <scopes>","Comma-separated explicit permission scopes (overrides --preset)").option("--json","Print raw JSON").action((A)=>iH("create",A));X0(FxA,{notes:["Keys default to full access. Pass --preset or --scopes to restrict what the key can do."],examples:["sequenzy api-keys create",'sequenzy api-keys create --name "CI deploy key" --company comp_123','sequenzy api-keys create --preset transactional_sender --name "Order emails"','sequenzy api-keys create --scopes "subscribers:read,subscribers:write,events:write"']});var IxA=YJ.command("list").description("List company API keys without secret values").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>iH("list",A));X0(IxA,{notes:["Use the returned ID, name, prefix, and current-key marker to identify a key before revoking it."],examples:["sequenzy api-keys list","sequenzy api-keys list --company comp_123 --json"]});var wxA=YJ.command("revoke").description("Permanently revoke a company API key").argument("<api-key-id>","Exact API key ID returned by api-keys list").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>iH("revoke",{apiKeyId:A,...x}));X0(wxA,{notes:["Revocation cannot be undone. Run 'sequenzy api-keys list' first and verify the exact ID and prefix."],examples:["sequenzy api-keys revoke key_123 --company comp_123 --yes"]});var JxA=YJ.command("delete").description("Alias for api-keys revoke").argument("<api-key-id>","Exact API key ID returned by api-keys list").option("-y, --yes","Skip the confirmation prompt").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>iH("delete",{apiKeyId:A,...x}));X0(JxA,{notes:["This is a compatibility alias for 'sequenzy api-keys revoke'."],examples:["sequenzy api-keys delete key_123 --company comp_123 --yes"]});var XJ=A8.command("websites").description("Manage sending domains and integration guides").action(()=>XJ.help());X0(XJ,{notes:["Use 'guide' for code examples and 'check' to inspect current DNS verification details."],examples:["sequenzy websites list --company comp_123","sequenzy websites add example.com --company comp_123","sequenzy websites guide --framework nextjs --use-case transactional"]});var fxA=XJ.command("list").description("List sending domains for a company").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>Zy("list",A));X0(fxA,{examples:["sequenzy websites list --company comp_123"]});var KxA=XJ.command("add <domain>").description("Add a sending domain").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>Zy("add",{domain:A,...x}));X0(KxA,{examples:["sequenzy websites add example.com --company comp_123"]});var $xA=XJ.command("check <domain>").description("Inspect sending domain verification details").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>Zy("check",{domain:A,...x}));X0($xA,{examples:["sequenzy websites check example.com --company comp_123"]});var HxA=XJ.command("guide").description("Print framework-specific integration code").option("--framework <name>","Framework name, e.g. nextjs, express, python").option("--use-case <name>","Use case, e.g. transactional, subscribe_form, event_tracking").option("--json","Print raw JSON").action((A)=>Zy("guide",A));X0(HxA,{examples:["sequenzy websites guide","sequenzy websites guide --framework nextjs --use-case transactional","sequenzy websites guide --framework python --use-case event_tracking"]});var jk=A8.command("shopify").description("Manage the connected Shopify store's automation settings").action(()=>jk.help());X0(jk,{notes:["Requires a connected Shopify integration on the company.","Browse abandonment emails shoppers who viewed a product but didn't buy; price drop alerts email recent viewers when a product's price falls."],examples:["sequenzy shopify settings get","sequenzy shopify settings update --price-drop off","sequenzy shopify settings update --browse-delay-hours 4 --browse-cooldown-hours 48"]});var Nk=jk.command("settings").description("Browse-abandonment and price-drop automation settings").action(()=>Nk.help()),yxA=Nk.command("get").description("Show the effective automation settings").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>vb("get",A));X0(yxA,{notes:["Shows the effective values - platform defaults apply until the store overrides them."],examples:["sequenzy shopify settings get --json"]});var qxA=Nk.command("update").description("Update browse-abandonment and/or price-drop settings").option("--browse-abandonment <on|off>","Enable or disable browse abandonment").option("--browse-delay-hours <hours>","Hours to wait after a product view before the abandonment check (default 2)").option("--browse-cooldown-hours <hours>","Minimum hours between browse-abandoned events per subscriber (default 24)").option("--reset-browse-abandonment","Reset browse abandonment to the platform defaults").option("--price-drop <on|off>","Enable or disable price drop alerts").option("--price-drop-min-percent <percent>","Minimum price decrease percent to alert on (default 5)").option("--price-drop-lookback-days <days>","How many days back viewers qualify as the audience (default 30)").option("--price-drop-cooldown-days <days>","Minimum days between price-drop events per subscriber and product (default 7)").option("--reset-price-drop","Reset price drop alerts to the platform defaults").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>vb("update",A));X0(qxA,{notes:["Partial update: omitted flags keep their current values.","If no sequence handles ecommerce.price_drop, Sequenzy sends a default price-drop email to active subscribers."],examples:["sequenzy shopify settings update --browse-abandonment off","sequenzy shopify settings update --price-drop-min-percent 10 --price-drop-lookback-days 14","sequenzy shopify settings update --reset-price-drop"]});var YR=A8.command("sms").description("Inspect the SMS add-on status for a company").action(()=>YR.help());X0(YR,{notes:["SMS sequence steps only send when the add-on is enabled, the plan is eligible, and an active number exists.",'Add SMS steps to sequences with type: "sms" in sequences create --steps-* or update --insert-steps-*.','Generate SMS copy with `sequenzy generate sms "<prompt>"`.'],examples:["sequenzy sms settings","sequenzy sms settings --json"]});var YxA=YR.command("settings").description("Show SMS add-on status, credits, and phone numbers").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>ub("settings",A));X0(YxA,{notes:["readyToSend in the JSON output tells you whether SMS sequence steps will actually send."],examples:["sequenzy sms settings --json"]});var XxA=YR.command("send-test <phone>").description("Send a test SMS to a phone number").option("-t, --text <text>","Plain-text message body").option("--image-url <url...>","Publicly reachable MMS image URL (repeat for up to 2)").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>ub("send-test",{phone:A,...x}));X0(XxA,{notes:["Sends a real text and charges credits. Limited to 5 test sends per hour; bypasses quiet hours; excluded from step stats.","Requires the SMS add-on with a verified number - check `sequenzy sms settings` first."],examples:['sequenzy sms send-test +15550100123 --text "Test from Sequenzy"']});var XR=A8.command("sync-rules").description("Manage automatic tag changes applied when events fire").action(()=>XR.help());X0(XR,{notes:["Sync rules map events to tag changes, e.g. an order-placed event adding a customer tag.","Rules can carry conditions: required/excluded subscriber tags, and a product match for commerce events (tag buyers by product tag, collection, type, or vendor)."],examples:["sequenzy sync-rules get","sequenzy sync-rules update --rules-file ./sync-rules.json","sequenzy sync-rules update --reset"]});var UxA=XR.command("get").description("Show the effective sync rules").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>Sk("get",A));X0(UxA,{notes:["Shows the platform defaults until the company saves custom rules; the JSON output includes isDefault."],examples:["sequenzy sync-rules get --json"]});var ZxA=XR.command("update").description("Replace the sync rules or reset them to the defaults").option("--rules-json <json>","Inline JSON array with the full rule set").option("--rules-file <file>","Path to a JSON file with the full rule set").option("--reset","Reset the company to the platform default rules").option("-c, --company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A)=>Sk("update",A));X0(ZxA,{notes:["This replaces the FULL rule set - fetch with 'sync-rules get --json', edit, then update.",'Each rule: {"triggerEvent":"...","actions":{"addTags":[...],"removeTags":[...]},"conditions":{...}}.'],examples:["sequenzy sync-rules update --rules-file ./sync-rules.json",`sequenzy sync-rules update --rules-json '[{"triggerEvent":"ecommerce.order_placed","actions":{"addTags":["vinyl-collector"],"removeTags":[]},"conditions":{"purchasedProduct":{"tags":["Vinyl"]}}}]'`,"sequenzy sync-rules update --reset"]});var UJ=A8.command("generate").description("Generate email and SMS content with AI").action(()=>UJ.help());X0(UJ,{notes:["Generated email and SMS content is returned as draft content. Review it before sending.","`generate sequence` is deprecated and persists a disabled draft. Use `sequences create <name> --trigger <trigger> --goal <goal>` instead.","Use --json when another tool or agent should parse the generated output."],examples:['sequenzy generate email "Welcome a new user to our analytics product"','sequenzy generate subjects "April product launch" --count 8','sequenzy generate sms "Cart reminder with a free-shipping hook" --count 3']});UJ.command("email <prompt>").description("Generate email blocks from a prompt").option("-s, --style <style>","Style: minimal, branded, promotional").option("-t, --tone <tone>","Tone: professional, casual, friendly").option("--company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>cH("email",{prompt:A,...x}));UJ.command("sequence <goal>").description("[DEPRECATED] Persist a disabled AI sequence draft; use `sequences create`").option("--name <name>","Optional sequence name; defaults to the goal").option("--list-id <id>","Optional list ID for the contact_added trigger").option("-c, --count <number>","Number of emails (1-10)","5").option("-d, --days <number>","Duration in days","14").option("--company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>cH("sequence",{goal:A,...x}));UJ.command("subjects <topic>").description("Generate A/B subject line variants").option("-c, --count <number>","Number of variants","5").option("--company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>cH("subjects",{topic:A,...x}));var GxA=UJ.command("sms <prompt>").description("Generate SMS message variants from a prompt").option("-c, --count <number>","Number of variants (1-10)","3").option("--company <id>","Company ID override for personal API keys").option("--json","Print raw JSON").action((A,x)=>cH("sms",{prompt:A,...x}));X0(GxA,{notes:["Messages are plain text with encoding and segment counts; use them as the text of an SMS sequence step.","Opt-out footers and the brand prefix are added automatically at send time - never include them in the message.","Check `sequenzy sms settings` to confirm the SMS add-on is ready before enabling SMS sequences."],examples:['sequenzy generate sms "Flash sale ends tonight" --count 5 --json']});await A8.parseAsync();process.exit(process.exitCode??0);
|