1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/masonry-9cbH6B-8.js","assets/main-D78L-pDZ.js"])))=>i.map(i=>d[i]); 2import{jy as Nn,jz as Zk,jA as xw,jB as Xu,jC as eS,jD as tS,jE as Qu,jF as Va,jG as da,jH as Yr,jI as dp,g3 as ke,jJ as $n,jK as pp,jL as up,jM as Gn,jN as rS,jO as br,jP as oS,jQ as Fs,jR as Ot,jS as kw,jT as Sw,jU as mr,jV as Aw,jW as pa,jX as $p,jY as Rw,jZ as iS,j_ as nS,j as c,gQ as Un,gR as qe,c as Q,r as Y,j$ as _w,k0 as sS,k1 as Ju,k2 as Yd,k3 as dr,k4 as aS,k5 as Nd,k6 as Eo,k7 as Hr,k8 as Gp,k9 as cS,ka as fu,kb as oa,kc as lS,kd as Zd,ke as mu,kf as hu,kg as vr,kh as Ce,ki as te,kj as jw,kk as pe,kl as F,km as oe,kn as Xe,iI as Up,ko as fp,kp as He,kq as je,kr as we,ks as Ee,iE as Se,kt as De,ku as kt,kv as wr,kw as Ew,kx as dS,m as he,ky as Bn,kz as Xr,kA as yu,iF as St,iA as ua,iB as ia,kB as Yu,iR as na,kC as Cw,kD as Pw,kE as Mt,iG as ni,kF as pS,kG as uS,kH as Tw,kI as fS,gA as mS,hz as mp,hr as fa,iQ as Qr,kJ as xr,kK as Zu,kL as ef,kM as hS,kN as yS,kO as kr,kP as qw,kQ as gu,kR as Dw,fR as Co,kS as pr,kT as xt,kU as tf,kV as Hn,kW as gS,kX as bS,kY as vS,kZ as rf,k_ as Sr,k$ as Ow,l0 as Ar,l1 as Cn,l2 as Rr,l3 as Iw,l4 as _r,l5 as Mw,B as Jr,l6 as wS,l7 as Nw,g5 as Zr,l8 as xS,l9 as kS,gj as Bw,la as Kn,lb as SS,gi as Vw,iw as AS,gh as Lw,lc as jr,iK as bu,ld as Er,le as Cr,lf as ur,lg as vu,lh as Pr,li as Tr,lj as Hp,lk as qr,ll as Kp,lm as La,ln as of,lo as Dr,lp as zw,lq as fr,lr as RS,ls as _S,lt as Or,lu as Wp,lv as Ir,lw as Mr,lx as Fw,ly as jS,lz as Nr,lA as Br,lB as Vr,lC as ES,X as Xp,lD as Lr,lE as zr,lF as Fr,lG as $w,lH as Qp,lI as Jp,lJ as nf,lK as $r,lL as Gw,lM as Gr,lN as Uw,lO as CS,lP as PS,lQ as TS,lR as qS,lS as DS,lT as OS,lU as IS,lV as MS,lW as sf,lX as NS,lY as BS,lZ as VS,l_ as LS,l$ as zS,m0 as FS,m1 as $S,m2 as GS,m3 as US,m4 as HS,m5 as KS,m6 as WS,m7 as XS,m8 as QS,m9 as JS,ma as YS,mb as ZS,mc as eA,md as tA,me as rA,mf as oA,mg as iA,mh as nA,mi as sA,mj as aA,mk as cA,ml as lA,mm as dA,mn as af,mo as pA,mp as uA,mq as fA,mr as mA,ms as hA,mt as yA,mu as gA,mv as bA,mw as vA,mx as wA,my as xA,mz as kA,mA as SA,mB as AA,mC as RA,mD as _A,mE as jA,mF as EA,mG as CA,mH as PA,mI as TA,mJ as qA,mK as DA,mL as OA,mM as IA,mN as MA,mO as NA,mP as BA,mQ as VA,mR as LA,mS as rt,mT as zA,mU as cf,e as ma,mV as FA,mW as $A,L as Hw,mX as GA,mY as UA,mZ as HA,m_ as lf,iL as KA,m$ as WA,n0 as XA,A as df,n1 as QA,n2 as JA,n3 as YA,n4 as ZA,n5 as eR,n6 as Kw,n7 as tR,n8 as rR,n9 as oR,na as Ww,gn as pf,nb as za,nc as iR,nd as nR,ne as sR,nf as aR,jm as cR,_ as lR}from"./main-D78L-pDZ.js";import{u as dR}from"./useSuspenseQuery-r7fCUb8D.js";import{u as Ur}from"./useMutation-BwJWuCat.js";import{u as pR}from"./useInfiniteQuery-DRomhpAO.js";import{e as uR,d as fR}from"./endOfMonth-DgwAzeHX.js";import{H as mR}from"./hls-CD24oMQ3.js";import{M as Yp}from"./message-circle-DIOVd3RR.js";import{u as wu}from"./use-size-BCUyd-rQ.js";import{d as hR}from"./index-DD0afz9h.js";import{G as yR}from"./gauge-Bl-jT6tB.js";import{S as Xw}from"./sparkles-DoPKOpSi.js";import{F as Po,O as xu,C as $e,a as ge,P as it,b as Ye,c as Ne,d as ci,R as Wt,e as sa,f as Qw,g as ku,L as hp,h as Jw,i as Yw,j as Zp}from"./SimpleNode-wnkc8kUe.js";import{S as le}from"./tooltip-CJfdJb4B.js";import{L as wt}from"./label-CfuE8at4.js";import{D as yp,M as gp,b as bp,a as Ge,c as Kr,d as uf,e as gR}from"./menu-7DvmME2A.js";import{S as bR}from"./switch-MpKHC29J.js";import{g as vR}from"./types-DJKwbrVw.js";import{u as qo}from"./useQuery-COJn47Wo.js";import{F as wR}from"./feature-flags-Dg89Ii9W.js";import{P as eu}from"./plus-DJIk_AQG.js";import{u as xR}from"./index-B_ptdHJC.js";import{C as kR,a as SR,b as AR,c as RR,d as _R}from"./command-BDDhFmXj.js";import{B as jR}from"./bot-DXXwgqbd.js";import{u as tu}from"./useEvent-ePF7ciSt.js";import{L as Zw}from"./LoadMoreSpinner-B6VdMJfQ.js";import{B as ff}from"./badge-BKZxsRBZ.js";import{f as ER,D as CR,a as PR,b as TR,e as qR,d as DR,c as OR}from"./dialog-CkR-ig-E.js";try{let o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new o.Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="516e319c-52a4-4d6b-8b9c-a11dd7ac2f45",o._sentryDebugIdIdentifier="sentry-dbid-516e319c-52a4-4d6b-8b9c-a11dd7ac2f45")}catch{}function Bd(o,e){const r=+Nn(o)-+Nn(e);return r<0?-1:r>0?1:r}function IR(o){return Zk(o,Date.now())}function MR(o){return e=>{const r=Math.trunc,t=r(e);return t===0?0:t}}function NR(o,e){return+Nn(o)-+Nn(e)}function BR(o,e){const r=Nn(o,e?.in);return r.setHours(23,59,59,999),r}function VR(o,e){const r=Nn(o,e?.in);return+BR(r,e)==+uR(r,e)}function LR(o,e,r){const[t,i,n]=xw(r?.in,o,o,e),s=Bd(i,n),l=Math.abs(fR(i,n));if(l<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-s*l);let a=Bd(i,n)===-s;VR(t)&&l===1&&Bd(t,n)===1&&(a=!1);const d=s*(l-+a);return d===0?0:d}function zR(o,e,r){const t=NR(o,e)/1e3;return MR()(t)}function FR(o,e,r){const t=eS(),i=r?.locale??t.locale??tS,n=2520,s=Bd(o,e);if(isNaN(s))throw new RangeError("Invalid time value");const l=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:s}),[a,d]=xw(r?.in,...s>0?[e,o]:[o,e]),p=zR(d,a),u=(Xu(d)-Xu(a))/1e3,h=Math.round((p-u)/60);let y;if(h<2)return h===0?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",h,l);if(h<45)return i.formatDistance("xMinutes",h,l);if(h<90)return i.formatDistance("aboutXHours",1,l);if(h<Qu){const m=Math.round(h/60);return i.formatDistance("aboutXHours",m,l)}else{if(h<n)return i.formatDistance("xDays",1,l);if(h<Va){const m=Math.round(h/Qu);return i.formatDistance("xDays",m,l)}else if(h<Va*2)return y=Math.round(h/Va),i.formatDistance("aboutXMonths",y,l)}if(y=LR(d,a),y<12){const m=Math.round(h/Va);return i.formatDistance("xMonths",m,l)}else{const m=y%12,w=Math.trunc(y/12);return m<3?i.formatDistance("aboutXYears",w,l):m<9?i.formatDistance("overXYears",w,l):i.formatDistance("almostXYears",w+1,l)}}function ru(o,e){return FR(o,IR(o),e)}var Io={},Mo={},Cp={},No={},Pp={},mf;function ex(){return mf||(mf=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.DisallowedDomainError=o.UnsupportedDomainError=o.ReservedHandleError=o.InvalidHandleError=o.isValidTld=o.isValidHandle=o.normalizeAndEnsureValidHandle=o.normalizeHandle=o.ensureValidHandleRegex=o.ensureValidHandle=o.DISALLOWED_TLDS=o.INVALID_HANDLE=void 0,o.INVALID_HANDLE="handle.invali
2d",o.DISALLOWED_TLDS=[".local",".arpa",".invalid",".localhost",".internal",".example",".alt",".onion"];const e=u=>{if(!/^[a-zA-Z0-9.-]*$/.test(u))throw new l("Disallowed characters in handle (ASCII letters, digits, dashes, periods only)");if(u.length>253)throw new l("Handle is too long (253 chars max)");const h=u.split(".");if(h.length<2)throw new l("Handle domain needs at least two parts");for(let y=0;y<h.length;y++){const m=h[y];if(m.length<1)throw new l("Handle parts can not be empty");if(m.length>63)throw new l("Handle part too long (max 63 chars)");if(m.endsWith("-")||m.startsWith("-"))throw new l("Handle parts can not start or end with hyphens");if(y+1===h.length&&!/^[a-zA-Z]/.test(m))throw new l("Handle final component (TLD) must start with ASCII letter")}};o.ensureValidHandle=e;const r=u=>{if(!/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/.test(u))throw new l("Handle didn't validate via regex");if(u.length>253)throw new l("Handle is too long (253 chars max)")};o.ensureValidHandleRegex=r;const t=u=>u.toLowerCase();o.normalizeHandle=t;const i=u=>{const h=(0,o.normalizeHandle)(u);return(0,o.ensureValidHandle)(h),h};o.normalizeAndEnsureValidHandle=i;const n=u=>{try{(0,o.ensureValidHandle)(u)}catch(h){if(h instanceof l)return!1;throw h}return!0};o.isValidHandle=n;const s=u=>!o.DISALLOWED_TLDS.some(h=>u.endsWith(h));o.isValidTld=s;class l extends Error{}o.InvalidHandleError=l;class a extends Error{}o.ReservedHandleError=a;class d extends Error{}o.UnsupportedDomainError=d;
2class p extends Error{}o.DisallowedDomainError=p})(Pp)),Pp}var hr={},hf;function tx(){if(hf)return hr;hf=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.InvalidDidError=hr.ensureValidDidRegex=hr.ensureValidDid=void 0;const o=t=>{if(!t.startsWith("did:"))throw new r('DID requires "did:" prefix');if(!/^[a-zA-Z0-9._:%-]*$/.test(t))throw new r("Disallowed characters in DID (ASCII letters, digits, and a couple other characters only)");const{length:i,1:n}=t.split(":");if(i<3)throw new r("DID requires prefix, method, and method-specific content");if(!/^[a-z]+$/.test(n))throw new r("DID method must be lower-case letters");if(t.endsWith(":")||t.endsWith("%"))throw new r('DID can not end with ":" or "%"');if(t.length>2*1024)throw new r("DID is too long (2048 chars max)")};hr.ensureValidDid=o;const e=t=>{if(!/^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$/.test(t))throw new r("DID didn't validate via regex");if(t.length>2*1024)throw new r("DID is too long (2048 chars max)")};hr.ensureValidDidRegex=e;class r extends Error{}return hr.InvalidDidError=r,hr}var Et={},yf;function rx(){if(yf)return Et;yf=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.InvalidNsidError=Et.NSID=void 0,Et.ensureValidNsid=e,Et.parseNsid=r,Et.isValidNsid=t,Et.validateNsid=i,Et.ensureValidNsidRegex=p,Et.validateNsidRegex=u;class o{static parse(m){return new o(m)}static create(m,w){const x=[...m.split(".").reverse(),w].join(".");return new o(x)}static isValid(m){return t(m)}static from(m){return m instanceof o?m:Array.isArray(m)?new o(m.join(".")):new o(String(m))}constructor(m){Object.defineProperty(this,"segments",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.segments=r(m)}get authority(){return this.segments.slice(0,this.segments.length-1).reverse().join(".")}get name(){return this.segments.at(this.segments.length-1)}toString(){return this.segments.join(".")}}Et.NSID=o;function e(y){const m=i(y);if(!m.success)throw new h(m.message)}function r(y){const m=i(y);if(!m.success)throw new h(m.message);return m.value}function t(y){return u(y).success}function i(y){if(y.length>317)return{success:!1,message:"NSID is too long (317 chars max)"};if(n(y))return{success:!1,message:"Disallowed characters in NSID (ASCII letters, digits, dashes, periods only)"};const m=y.split(".");if(m.length<3)return{success:!1,message:"NSID needs at least three parts"};for(const w of m){if(w.length<1)return{success:!1,message:"NSID parts can not be empty"};if(w.length>63)return{success:!1,message:"NSID part too long (max 63 chars)"};if(l(w)||a(w))return{success:!1,message:"NSID parts can not start or end with hyphen"}}return s(m[0])?{success:!1,message:"NSID first part may not start with a digit"}:d(m[m.length-1])?{success:!0,value:m}:{success:!1,message:"NSID name part must be only letters and digits (and no leading digit)"}}function n(y){return!/^[a-zA-Z0-9.-]*$/.test(y)}function s(y){const m=y.charCodeAt(0);return m>=48&&m<=57}
2function l(y){return y.charCodeAt(0)===45}function a(y){return y.charCodeAt(y.length-1)===45}function d(y){return!s(y)&&!y.includes("-")}function p(y){const m=u(y);if(!m.success)throw new h(m.message)}function u(y){return y.length>317?{success:!1,message:"NSID is too long (317 chars max)"}:/^[a-zA-Z](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?:\.[a-zA-Z](?:[a-zA-Z0-9]{0,62})?)$/.test(y)?{success:!0,value:y}:{success:!1,message:"NSID didn't validate via regex"}}class h extends Error{}return Et.InvalidNsidError=h,Et}var Bo={},Vo={},gf;function $R(){if(gf)return Vo;gf=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.ensureValidAtUriRegex=Vo.ensureValidAtUri=void 0;const o=tx(),e=ex(),r=rx(),t=n=>{const s=n.split("#");if(s.length>2)throw new Error('ATURI can have at most one "#", separating fragment out');const l=s[1]||null;if(n=s[0],!/^[a-zA-Z0-9._~:@!$&')(*+,;=%/-]*$/.test(n))throw new Error("Disallowed characters in ATURI (ASCII)");const a=n.split("/");if(a.length>=3&&(a[0]!=="at:"||a[1].length!==0))throw new Error('ATURI must start with "at://"');if(a.length<3)throw new Error("ATURI requires at least method and authority sections");try{a[2].startsWith("did:")?(0,o.ensureValidDid)(a[2]):(0,e.ensureValidHandle)(a[2])}catch{throw new Error("ATURI authority must be a valid handle or DID")}if(a.length>=4){if(a[3].length===0)throw new Error("ATURI can not have a slash after authority without a path segment");if(!(0,r.isValidNsid)(a[3]))throw new Error("ATURI requires first path segment (if supplied) to be valid NSID")}if(a.length>=5&&a[4].length===0)throw new Error("ATURI can not have a slash after collection, unless record key is provided");if(a.length>=6)throw new Error("ATURI path can have at most two parts, and no trailing slash");if(s.length>=2&&l==null)throw new Error("ATURI fragment must be non-empty and start with slash");if(l!=null){if(l.length===0||l[0]!=="/")throw new Error("ATURI fragment must be non-empty and start with slash");if(!/^\/[a-zA-Z0-9._~:@!$&')(*+,;=%[\]/-]*$/.test(l))throw new Error("Disallowed characters in ATURI fragment (ASCII)")}if(n.length>8*1024)throw new Error("ATURI is far too long")};Vo.ensureValidAtUri=t;const i=n=>{const s=/^at:\/\/(?<authority>[a-zA-Z0-9._:%-]+)(\/(?<collection>[a-zA-Z0-9-.]+)(\/(?<rkey>[a-zA-Z0-9._~:@!$&%')(*+,;=-]+))?)?(#(?<fragment>\/[a-zA-Z0-9._~:@!$&%')(*+,;=\-[\]/\\]*))?$/,l=n.match(s);if(!l||!l.groups)throw new Error("ATURI didn't validate via regex");const a=l.groups;try{(0,e.ensureValidHandleRegex)(a.authority)}catch{try{(0,o.ensureValidDidRegex)(a.authority)}catch{throw new Error("ATURI authority must be a valid handle or DID")}}if(a.collection&&!(0,r.isValidNsid)(a.collection))throw new Error("ATURI collection path segment must be a valid NSID");if(n.length>8*1024)throw new Error("ATURI is far too long")};return Vo.ensureValidAtUriRegex=i,Vo}var bf;function GR(){return bf||(bf=1,(function(o){var e=Bo&&Bo.__createBinding||(Object.create?(function(l,a,d,p){p===void 0&&(p=d);var u=Object.getOwnPropertyDescriptor(a,d);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[d]}}),Object.defineProperty(l,p,u)}):(function(l,a,d,p){p===void 0&&(p=d),l[p]=a[d]})),r=Bo&&Bo.__exportStar||function(l,a){for(var d in l)d!=="default"&&!Object.prototype.hasOwnProperty.call(a,d)&&e(a,l,d)};Object.defineProperty(o,"__esModule",{value:!0}),o.AtUri=o.ATP_URI_REGEX=void 0,r($R(),o),o.ATP_URI_REGEX=/^(at:\/\/)?((?:did:[a-z0-9:%-]+)|(?:[a-z0-9][a-z0-9.:-]*))(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i;const t=/^(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i;class i{constructor(a,d){Object.defineProperty(this,"hash",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"host",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathname",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"searchParams",{enumerable:!0,configurable:!0,writable:!0,value:void 0});let p;if(d){if(p=n(d),!p)throw new Error(`Invalid at uri: ${d}`);const u=s(a);if(!u)throw new Error(`Invalid path: ${a}`);Object.assign(p,u)}else if(p=n(a),!p)throw new Error(`Invalid at uri: ${a}`);this.hash=p.hash,this.host=p.host,this.pathname=p.pathname,this.searchParams=p.searchParams}static make(a,d,p){let u=a;return d&&(u+="/"+d),p&&(u+="/"+p),new i(u)}get protocol(){return"at:"}get origin(){return`at://${this.host}`}get hostname(){return this.host}set hostname(a){this.host=a}get search(){return this.searchParams.toString()}set search(a){this.searchParams=new URLSearchParams(a)}
2get collection(){return this.pathname.split("/").filter(Boolean)[0]||""}set collection(a){const d=this.pathname.split("/").filter(Boolean);d[0]=a,this.pathname=d.join("/")}get rkey(){return this.pathname.split("/").filter(Boolean)[1]||""}set rkey(a){const d=this.pathname.split("/").filter(Boolean);d[0]||(d[0]="undefined"),d[1]=a,this.pathname=d.join("/")}get href(){return this.toString()}toString(){let a=this.pathname||"/";a.startsWith("/")||(a=`/${a}`);let d=this.searchParams.toString();d&&!d.startsWith("?")&&(d=`?${d}`);let p=this.hash;return p&&!p.startsWith("#")&&(p=`#${p}`),`at://${this.host}${a}${d}${p}`}}o.AtUri=i;function n(l){const a=o.ATP_URI_REGEX.exec(l);if(a)return{hash:a[5]||"",host:a[2]||"",pathname:a[3]||"",searchParams:new URLSearchParams(a[4]||"")}}function s(l){const a=t.exec(l);if(a)return{hash:a[3]||"",pathname:a[1]||"",searchParams:new URLSearchParams(a[2]||"")}}})(Bo)),Bo}var yr={},vf;function UR(){if(vf)return yr;vf=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.InvalidTidError=yr.isValidTid=yr.ensureValidTid=void 0;const o=13,e=/^[234567abcdefghij][234567abcdefghijklmnopqrstuvwxyz]{12}$/,r=n=>{if(n.length!==o)throw new i(`TID must be ${o} characters`);if(!e.test(n))throw new i("TID syntax not valid (regex)")};yr.ensureValidTid=r;const t=n=>n.length===o&&e.test(n);yr.isValidTid=t;class i extends Error{}return yr.InvalidTidError=i,yr}var Tp={},wf;function HR(){return wf||(wf=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.InvalidRecordKeyError=o.isValidRecordKey=o.ensureValidRecordKey=void 0;const e=i=>{if(i.length>512||i.length<1)throw new t("record key must be 1 to 512 characters");if(!/^[a-zA-Z0-9_~.:-]{1,512}$/.test(i))throw new t("record key syntax not valid (regex)");if(i==="."||i==="..")throw new t('record key can not be "." or ".."')};o.ensureValidRecordKey=e;const r=i=>{try{(0,o.ensureValidRecordKey)(i)}catch(n){if(n instanceof t)return!1;throw n}return!0};o.isValidRecordKey=r;class t extends Error{}o.InvalidRecordKeyError=t})(Tp)),Tp}var qp={},xf;function KR(){return xf||(xf=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.InvalidDatetimeError=o.normalizeDatetimeAlways=o.normalizeDatetime=o.isValidDatetime=o.ensureValidDatetime=void 0;const e=s=>{const l=new Date(s);if(isNaN(l.getTime()))throw new n("datetime did not parse as ISO 8601");if(l.toISOString().startsWith("-"))throw new n("datetime normalized to a negative time");if(!/^[0-9]{4}-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](.[0-9]{1,20})?(Z|([+-][0-2][0-9]:[0-5][0-9]))$/.test(s))throw new n("datetime didn't validate via regex");if(s.length>64)throw new n("datetime is too long (64 chars max)");if(s.endsWith("-00:00"))throw new n('datetime can not use "-00:00" for UTC timezone');if(s.startsWith("000"))throw new n("datetime so close to year zero not allowed")};o.ensureValidDatetime=e;const r=s=>{try{(0,o.ensureValidDatetime)(s)}catch(l){if(l instanceof n)return!1;throw l}return!0};o.isValidDatetime=r;const t=s=>{if((0,o.isValidDatetime)(s)){const d=new Date(s).toISOString();if((0,o.isValidDatetime)(d))return d}if(!/.*(([+-]\d\d:?\d\d)|[a-zA-Z])$/.test(s)){const d=new Date(s+"Z");if(!isNaN(d.getTime())){const p=d.toISOString();if((0,o.isValidDatetime)(p))return p}}const l=new Date(s);if(isNaN(l.getTime()))throw new n("datetime did not parse as any timestamp format");const a=l.toISOString();if((0,o.isValidDatetime)(a))return a;throw new n("datetime normalized to invalid timestamp string")};o.normalizeDatetime=t;const i=s=>{try{return(0,o.normalizeDatetime)(s)}catch(l){if(l instanceof n)return new Date(0).toISOString();throw l}};o.normalizeDatetimeAlways=i;class n extends Error{}o.InvalidDatetimeError=n})(qp)),qp}var kf;function Wn(){return kf||(kf=1,(function(o){var e=No&&No.__createBinding||(Object.create?(function(t,i,n,s){s===void 0&&(s=n);var l=Object.getOwnPropertyDescriptor(i,n);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(t,s,l)}):(function(t,i,n,s){s===void 0&&(s=n),t[s]=i[n]})),r=No&&No.__exportStar||function(t,i){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(i,n)&&e(i,t,n)};Object.defineProperty(o,"__esModule",{value:!0}),r(ex(),o),r(tx(),o),r(rx(),o),r(GR(),o),r(UR(),o),r(HR(),o),r(KR(),o)})(No)),No}var ns={},Sf;
2function Su(){if(Sf)return ns;Sf=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.toLexUri=e,ns.requiredPropertiesRefinement=r;const o=da();function e(t,i){if(t.split("#").length>2)throw new Error("Uri can only have one hash segment");if(t.startsWith("lex:"))return t;if(t.startsWith("#")){if(!i)throw new Error(`Unable to resolve uri without anchor: ${t}`);return`${i}${t}`}return`lex:${t}`}function r(t,i){if(t.required!==void 0){if(!Array.isArray(t.required)){i.addIssue({code:o.z.ZodIssueCode.invalid_type,received:typeof t.required,expected:"array"});return}if(t.properties===void 0){t.required.length>0&&i.addIssue({code:o.z.ZodIssueCode.custom,message:"Required fields defined but no properties defined"});return}for(const n of t.required)t.properties[n]===void 0&&i.addIssue({code:o.z.ZodIssueCode.custom,message:`Required field "${n}" not defined`})}}return ns}var Af;function li(){return Af||(Af=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.LexiconDefNotFoundError=o.InvalidLexiconError=o.ValidationError=o.lexiconDoc=o.lexUserType=o.lexRecord=o.lexXrpcSubscription=o.lexXrpcProcedure=o.lexXrpcQuery=o.lexXrpcError=o.lexXrpcSubscriptionMessage=o.lexXrpcBody=o.lexXrpcParameters=o.lexPermissionSet=o.lexObject=o.lexToken=o.lexPrimitiveArray=o.lexArray=o.lexBlob=o.lexRefVariant=o.lexRefUnion=o.lexRef=o.lexIpldType=o.lexCidLink=o.lexBytes=o.lexPrimitive=o.lexUnknown=o.lexString=o.lexStringFormat=o.lexInteger=o.lexBoolean=o.lexLang=o.languageSchema=void 0,o.isValidLexiconDoc=s,o.isObj=l,o.isDiscriminatedObject=a,o.parseLexiconDoc=d;const e=da(),r=Yr(),t=Wn(),i=Su();o.languageSchema=e.z.string().refine(r.validateLanguage,"Invalid BCP47 language tag"),o.lexLang=e.z.record(o.languageSchema,e.z.string().optional()),o.lexBoolean=e.z.object({type:e.z.literal("boolean"),description:e.z.string().optional(),default:e.z.boolean().optional(),const:e.z.boolean().optional()}),o.lexInteger=e.z.object({type:e.z.literal("integer"),description:e.z.string().optional(),default:e.z.number().int().optional(),minimum:e.z.number().int().optional(),maximum:e.z.number().int().optional(),enum:e.z.number().int().array().optional(),const:e.z.number().int().optional()}),o.lexStringFormat=e.z.enum(["datetime","uri","at-uri","did","handle","at-identifier","nsid","cid","language","tid","record-key"]),o.lexString=e.z.object({type:e.z.literal("string"),format:o.lexStringFormat.optional(),description:e.z.string().optional(),default:e.z.string().optional(),minLength:e.z.number().int().optional(),maxLength:e.z.number().int().optional(),minGraphemes:e.z.number().int().optional(),maxGraphemes:e.z.number().int().optional(),enum:e.z.string().array().optional(),const:e.z.string().optional(),knownValues:e.z.string().array().optional()}),o.lexUnknown=e.z.object({type:e.z.literal("unknown"),description:e.z.string().optional()}),o.lexPrimitive=e.z.discriminatedUnion("type",[o.lexBoolean,o.lexInteger,o.lexString,o.lexUnknown]),o.lexBytes=e.z.object({type:e.z.literal("bytes"),description:e.z.string().optional(),maxLength:e.z.number().optional(),minLength:e.z.number().optional()}),o.lexCidLink=e.z.object({type:e.z.literal("cid-link"),description:e.z.string().optional()}),o.lexIpldType=e.z.discriminatedUnion("type",[o.lexBytes,o.lexCidLink]),o.lexRef=e.z.object({type:e.z.literal("ref"),description:e.z.string().optional(),ref:e.z.string()}),o.lexRefUnion=e.z.object({type:e.z.literal("union"),description:e.z.string().optional(),refs:e.z.string().array(),closed:e.z.boolean().optional()}),o.lexRefVariant=e.z.discriminatedUnion("type",[o.lexRef,o.lexRefUnion]),o.lexBlob=e.z.object({type:e.z.literal("blob"),description:e.z.string().optional(),accept:e.z.string().array().optional(),maxSize:e.z.number().optional()}),o.lexArray=e.z.object({type:e.z.literal("array"),description:e.z.string().optional(),items:e.z.discriminatedUnion("type",[o.lexBoolean,o.lexInteger,o.lexString,o.lexUnknown,o.lexBytes,o.lexCidLink,o.lexRef,o.lexRefUnion,o.lexBlob]),minLength:e.z.number().int().optional(),maxLength:e.z.number().int().optional()}),o.lexPrimitiveArray=o.lexArray.merge(e.z.object({items:o.lexPrimitive})),o.lexToken=e.z.object({type:e.z.literal("token"),description:e.z.string().optional()}),o.lexObject=e.z.object({type:e.z.literal("object"),description:e.z.string().optional(),required:e.z.string().array().optional(),nullable:e.z.string().array().optional(),properties:e.z.record(e.z.string(),e.z.discriminatedUnion("type",[o.lexArray,o.lexBoolean,o.lexInteger,o.lexString,o.lexUnknown,o.lexBytes,o.lexCidLink,o.lexRef,o.lexRefUnion,o.lexBlob]))}).superRefine(i.requiredPropertiesRefinement);const n=e.z.intersection(e.z.object({type:e.z.literal("permission"),resource:e.z.string().nonempty()}),e.z.record(e.z.string(),e.z.union([e.z.array(e.z.union([e.z.string(),e.z.number().int(),e.z.boolean()])),e.z.boolean(),e.z.number().int(),e.z.string()]).optional()));o.lexPermissionSet=e.z.object({type:e.z.literal("permission-set"),description:e.z.string().optional(),title:e.z.string().optional(),"title:lang":o.lexLang.optional(),detail:e.z.string().optional(),"detail:lang":o.lexLang.optional(),permissions:e.z.array(n)}),o.lexXrpcParameters=e.z.object({type:e.z.literal("params"),description:e.z.string().optional(),required:e.z.string().array().optional(),properties:e.z.record(e.z.string(),e.z.discriminatedUnion("type",[o.lexPrimitiveArray,o.lexBoolean,o.lexInteger,o.lexString,o.lexUnknown]))}).superRefine(i.requiredPropertiesRefinement),o.lexXrpcBody=e.z.object({description:e.z.string().optional(),encoding:e.z.string(),schema:e.z.union([o.lexRefVariant,o.lexObject]).optional()}),o.lexXrpcSubscriptionMessage=e.z.object({description:e.z.string().optional(),schema:e.z.union([o.lexRefVariant,o.lexObject]).optional()}),o.lexXrpcError=e.z.object({name:e.z.string(),description:e.z.string().optional()}),o.lexXrpcQuery=e.z.object({type:e.z.literal("query"),description:e.z.string().optional(),parameters:o.lexXrpcParameters.optional(),output:o.lexXrpcBody.optional(),errors:o.lexXrpcError.array().optional()}),o.lexXrpcProcedure=e.z.object({type:e.z.literal("procedure"),description:e.z.string().optional(),parameters:o.lexXrpcParameters.optional(),input
2:o.lexXrpcBody.optional(),output:o.lexXrpcBody.optional(),errors:o.lexXrpcError.array().optional()}),o.lexXrpcSubscription=e.z.object({type:e.z.literal("subscription"),description:e.z.string().optional(),parameters:o.lexXrpcParameters.optional(),message:o.lexXrpcSubscriptionMessage.optional(),errors:o.lexXrpcError.array().optional()}),o.lexRecord=e.z.object({type:e.z.literal("record"),description:e.z.string().optional(),key:e.z.string().optional(),record:o.lexObject}),o.lexUserType=e.z.custom(y=>{if(!(!y||typeof y!="object")&&y.type!==void 0)switch(y.type){case"record":return o.lexRecord.parse(y);case"permission-set":return o.lexPermissionSet.parse(y);case"query":return o.lexXrpcQuery.parse(y);case"procedure":return o.lexXrpcProcedure.parse(y);case"subscription":return o.lexXrpcSubscription.parse(y);case"blob":return o.lexBlob.parse(y);case"array":return o.lexArray.parse(y);case"token":return o.lexToken.parse(y);case"object":return o.lexObject.parse(y);case"boolean":return o.lexBoolean.parse(y);case"integer":return o.lexInteger.parse(y);case"string":return o.lexString.parse(y);case"bytes":return o.lexBytes.parse(y);case"cid-link":return o.lexCidLink.parse(y);case"unknown":return o.lexUnknown.parse(y)}},y=>!y||typeof y!="object"?{message:"Must be an object",fatal:!0}:y.type===void 0?{message:"Must have a type",fatal:!0}:typeof y.type!="string"?{message:"Type property must be a string",fatal:!0}:{message:`Invalid type: ${y.type} must be one of: record, query, procedure, subscription, blob, array, token, object, boolean, integer, string, bytes, cid-link, unknown`,fatal:!0}),o.lexiconDoc=e.z.object({lexicon:e.z.literal(1),id:e.z.string().refine(t.isValidNsid,{message:"Must be a valid NSID"}),revision:e.z.number().optional(),description:e.z.string().optional(),defs:e.z.record(e.z.string(),o.lexUserType)}).refine(y=>{for(const[m,w]of Object.entries(y.defs))if(m!=="main"&&(w.type==="record"||w.type==="permission-set"||w.type==="procedure"||w.type==="query"||w.type==="subscription"))return!1;return!0},{message:"Records, permission sets, procedures, queries, and subscriptions must be the main definition."});function s(y){return o.lexiconDoc.safeParse(y).success}function l(y){return y!=null&&typeof y=="object"}function a(y){return l(y)&&"$type"in y&&typeof y.$type=="string"}function d(y){return o.lexiconDoc.parse(y),y}
2class p extends Error{}o.ValidationError=p;class u extends Error{}o.InvalidLexiconError=u;class h extends Error{}o.LexiconDefNotFoundError=h})(Cp)),Cp}var ss={},ao={},Lo={},Fa={},Dp={},Rf;function Au(){return Rf||(Rf=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.BlobRef=o.jsonBlobRef=o.untypedJsonBlobRef=o.typedJsonBlobRef=void 0;const e=dp,r=da(),t=Yr();o.typedJsonBlobRef=r.z.object({$type:r.z.literal("blob"),ref:t.schema.cid,mimeType:r.z.string(),size:r.z.number()}).strict(),o.untypedJsonBlobRef=r.z.object({cid:r.z.string(),mimeType:r.z.string()}).strict(),o.jsonBlobRef=r.z.union([o.typedJsonBlobRef,o.untypedJsonBlobRef]);class i{constructor(s,l,a,d){Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"mimeType",{enumerable:!0,configurable:!0,writable:!0,value:l}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"original",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.original=d??{$type:"blob",ref:s,mimeType:l,size:a}}static asBlobRef(s){return t.check.is(s,o.jsonBlobRef)?i.fromJsonRef(s):null}static fromJsonRef(s){return t.check.is(s,o.typedJsonBlobRef)?new i(s.ref,s.mimeType,s.size):new i(e.CID.parse(s.cid),s.mimeType,-1,s)}ipld(){return{$type:"blob",ref:this.ref,mimeType:this.mimeType,size:this.size}}toJSON(){return(0,t.ipldToJson)(this.ipld())}}o.BlobRef=i})(Dp)),Dp}var _f;function WR(){if(_f)return Fa;_f=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.blob=r;const o=Au(),e=li();function r(t,i,n,s){return!s||!(s instanceof o.BlobRef)?{success:!1,error:new e.ValidationError(`${i} should be a blob ref`)}:{success:!0,value:s}}return Fa}var tr={},ht={},Op={},jf;function XR(){return jf||(jf=1,(function(o){(()=>{var e={d:(p,u)=>{for(var h in u)e.o(u,h)&&!e.o(p,h)&&Object.defineProperty(p,h,{enumerable:!0,get:u[h]})},o:(p,u)=>Object.prototype.hasOwnProperty.call(p,u),r:p=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})}},r={};function t(p,u){return u===void 0&&(u="-"),new RegExp("^(?!0{4}"+u+"0{2}"+u+"0{2})((?=[0-9]{4}"+u+"(((0[^2])|1[0-2])|02(?="+u+"(([0-1][0-9])|2[0-8])))"+u+"[0-9]{2})|(?=((([13579][26])|([2468][048])|(0[48]))0{2})|([0-9]{2}((((0|[2468])[48])|[2468][048])|([13579][26])))"+u+"02"+u+"29))([0-9]{4})"+u+"(?!((0[469])|11)"+u+"31)((0[1,3-9]|1[0-2])|(02(?!"+u+"3)))"+u+"(0[1-9]|[1-2][0-9]|3[0-1])$").test(p)}function i(p){var u=/\D/.exec(p);return u?u[0]:""}function n(p,u,h){u===void 0&&(u=":"),h===void 0&&(h=!1);var y=new RegExp("^([0-1]|2(?=([0-3])|4"+u+"00))[0-9]"+u+"[0-5][0-9]("+u+"([0-5]|6(?=0))[0-9])?(.[0-9]{1,9})?$");if(!h||!/[Z+\-]/.test(p))return y.test(p);if(/Z$/.test(p))return y.test(p.replace("Z",""));var m=p.includes("+"),w=p.split(/[+-]/),x=w[0],v=w[1];return y.test(x)&&(function(k,A,S){return S===void 0&&(S=":"),new RegExp(A?"^(0(?!(2"+S+"4)|0"+S+"3)|1(?=([0-1]|2(?="+S+"[04])|[34](?="+S+"0))))([03469](?="+S+"[03])|[17](?="+S+"0)|2(?="+S+"[04])|5(?="+S+"[034])|8(?="+S+"[04]))"+S+"([03](?=0)|4(?=5))[05]$":"^(0(?=[^0])|1(?=[0-2]))([39](?="+S+"[03])|[0-24-8](?="+S+"00))"+S+"[03]0$").test(k)})(v,m,i(v))}function s(p){var u=p.split("T"),h=u[0],y=u[1],m=t(h,i(h));if(!y)return!1;var w,x=(w=y.match(/([^Z+\-\d])(?=\d+\1)/),Array.isArray(w)?w[0]:"");return m&&n(y,x,!0)}function l(p,u){return u===void 0&&(u="-"),new RegExp("^[0-9]{4}"+u+"(0(?=[^0])|1(?=[0-2]))[0-9]$").test(p)}e.r(r),e.d(r,{isValidDate:()=>t,isValidISODateString:()=>s,isValidTime:()=>n,isValidYearMonth:()=>l});var a=o;for(var d in r)a[d]=r[d];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})()})(Op)),Op}var Ef;function QR(){if(Ef)return ht;Ef=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.datetime=n,ht.uri=s,ht.atUri=l,ht.did=a,ht.handle=d,ht.atIdentifier=p,ht.nsid=u,ht.cid=h,ht.language=y,ht.tid=m,ht.recordKey=w;const o=XR(),e=dp,r=Yr(),t=Wn(),i=li();function n(x,v){try{if(!(0,o.isValidISODateString)(v))throw new Error}catch{return{success:!1,error:new i.ValidationError(`${x} must be an valid atproto datetime (both RFC-3339 and ISO-8601)`)}}return{success:!0,value:v}}function s(x,v){return v.match(/^\w+:(?:\/\/)?[^\s/][^\s]*$/)!==null?{success:!0,value:v}:{success:!1,error:new i.ValidationError(`${x} must be a uri`)}}function l(x,v){try{(0,t.ensureValidAtUri)(v)}catch{return{success:!1,error:new i.ValidationError(`${x} must be a valid at-uri`)}}return{success:!0,value:v}}function a(x,v){try{(0,t.ensureValidDid)(v)}catch{return{success:!1,error:new i.ValidationError(`${x} must be a valid did`)}}return{success:!0,value:v}}function d(x,v){try{(0,t.ensureValidHandle)(v)}catch{return{success:!1,error:new i.ValidationError(`${x} must be a valid handle`)}}return{success:!0,value:v}}function p(x,v){if(v.startsWith("did:")){const k=a(x,v);if(k.success)return k}
2else{const k=d(x,v);if(k.success)return k}return{success:!1,error:new i.ValidationError(`${x} must be a valid did or a handle`)}}function u(x,v){return(0,t.isValidNsid)(v)?{success:!0,value:v}:{success:!1,error:new i.ValidationError(`${x} must be a valid nsid`)}}function h(x,v){try{e.CID.parse(v)}catch{return{success:!1,error:new i.ValidationError(`${x} must be a cid string`)}}return{success:!0,value:v}}function y(x,v){return(0,r.validateLanguage)(v)?{success:!0,value:v}:{success:!1,error:new i.ValidationError(`${x} must be a well-formed BCP 47 language tag`)}}function m(x,v){return(0,t.isValidTid)(v)?{success:!0,value:v}:{success:!1,error:new i.ValidationError(`${x} must be a valid TID`)}}function w(x,v){try{(0,t.ensureValidRecordKey)(v)}catch{return{success:!1,error:new i.ValidationError(`${x} must be a valid Record Key`)}}return{success:!0,value:v}}return ht}var Cf;function ox(){if(Cf)return tr;Cf=1;var o=tr&&tr.__createBinding||(Object.create?(function(m,w,x,v){v===void 0&&(v=x);var k=Object.getOwnPropertyDescriptor(w,x);(!k||("get"in k?!w.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:function(){return w[x]}}),Object.defineProperty(m,v,k)}):(function(m,w,x,v){v===void 0&&(v=x),m[v]=w[x]})),e=tr&&tr.__setModuleDefault||(Object.create?(function(m,w){Object.defineProperty(m,"default",{enumerable:!0,value:w})}):function(m,w){m.default=w}),r=tr&&tr.__importStar||(function(){var m=function(w){return m=Object.getOwnPropertyNames||function(x){var v=[];for(var k in x)Object.prototype.hasOwnProperty.call(x,k)&&(v[v.length]=k);return v},m(w)};return function(w){if(w&&w.__esModule)return w;var x={};if(w!=null)for(var v=m(w),k=0;k<v.length;k++)v[k]!=="default"&&o(x,w,v[k]);return e(x,w),x}})();Object.defineProperty(tr,"__esModule",{value:!0}),tr.validate=l;const t=dp,i=Yr(),n=li(),s=r(QR());function l(m,w,x,v){switch(x.type){case"boolean":return a(m,w,x,v);case"integer":return d(m,w,x,v);case"string":return p(m,w,x,v);case"bytes":return u(m,w,x,v);case"cid-link":return h(m,w,x,v);case"unknown":return y(m,w,x,v);default:return{success:!1,error:new n.ValidationError(`Unexpected lexicon type: ${x.type}`)}}}function a(m,w,x,v){x=x;const k=typeof v;return k==="undefined"?typeof x.default=="boolean"?{success:!0,value:x.default}:{success:!1,error:new n.ValidationError(`${w} must be a boolean`)}:k!=="boolean"?{success:!1,error:new n.ValidationError(`${w} must be a boolean`)}:typeof x.const=="boolean"&&v!==x.const?{success:!1,error:new n.ValidationError(`${w} must be ${x.const}`)}:{success:!0,value:v}}function d(m,w,x,v){return x=x,typeof v==="undefined"?typeof x.default=="number"?{success:!0,value:x.default}:{success:!1,error:new n.ValidationError(`${w} must be an integer`)}:Number.isInteger(v)?typeof x.const=="number"&&v!==x.const?{success:!1,error:new n.ValidationError(`${w} must be ${x.const}`)}:Array.isArray(x.enum)&&!x.enum.includes(v)?{success:!1,error:new n.ValidationError(`${w} must be one of (${x.enum.join("|")})`)}:typeof x.maximum=="number"&&v>x.maximum?{success:!1,error:new n.ValidationError(`${w} can not be greater than ${x.maximum}`)}:typeof x.minimum=="number"&&v<x.minimum?{success:!1,error:new n.ValidationError(`${w} can not be less than ${x.minimum}`)}:{success:!0,value:v}:{success:!1,error:new n.ValidationError(`${w} must be an integer`)}}function p(m,w,x,v){if(x=x,typeof v>"u")return typeof x.default=="string"?{success:!0,value:x.default}:{success:!1,error:new n.ValidationError(`${w} must be a string`)};if(typeof v!="string")return{success:!1,error:new n.ValidationError(`${w} must be a string`)};if(typeof x.const=="string"&&v!==x.const)return{success:!1,error:new n.ValidationError(`${w} must be ${x.const}`)};if(Array.isArray(x.enum)&&!x.enum.includes(v))return{success:!1,error:new n.ValidationError(`${w} must be one of (${x.enum.join("|")})`)};if(typeof x.minLength=="number"||typeof x.maxLength=="number"){if(typeof x.minLength=="number"&&v.length*3<x.minLength)return{success:!1,error:new n.ValidationError(`${w} must not be shorter than ${x.minLength} characters`)};let k=!1;if(typeof x.minLength>"u"&&typeof x.maxLength=="number"&&v.length*3<=x.maxLength&&(k=!0),!k){const A=(0,i.utf8Len)(v);if(typeof x.maxLength=="number"&&A>x.maxLength)return{success:!1,error:new n.ValidationError(`${w} must not be longer than ${x.maxLength} characters`)};if(typeof x.minLength=="number"&&A<x.minLength)return{success:!1,error:new n.ValidationError(`${w} must not be shorter than ${x.minLength} characters`)}}}if(typeof x.maxGraphemes=="number"||typeof x.minGraphemes=="number"){let k=!1,A=!1;if(typeof x.maxGraphemes=="number"&&(v.length<=x.maxGraphemes?k=!1:k=!0),typeof x.minGraphemes=="number"){if(v.length<x.minGraphemes)return{success:!1,error:new n.ValidationError(`${w} must not be shorter than ${x.minGraphemes} graphemes`)};A=!0}if(k||A){const S=(0,i.graphemeLen)(v);if(typeof x.maxGraphemes=="number"&&S>x.maxGraphemes)return{success:!1,error:new n.ValidationError(`${w} must not be longer than ${x.maxGraphemes} graphemes`)};if(typeof x.minGraphemes=="number"&&S<x.minGraphemes)return{success:!1,error:new n.ValidationError(`${w} must not be shorter than ${x.minGraphemes} graphemes`)}}}if(typeof x.format=="string")switch(x.format){case"datetime":return s.datetime(w,v);case"uri":return s.uri(w,v);case"at-uri":return s.atUri(w,v);case"did":return s.did(w,v);case"handle":return s.handle(w,v);case"at-identifier":return s.atIdentifier(w,v);case"nsid":return s.nsid(w,v);case"cid":return s.cid(w,v);case"language":return s.language(w,v);case"tid":return s.tid(w,v);
2case"record-key":return s.recordKey(w,v)}return{success:!0,value:v}}function u(m,w,x,v){return x=x,!v||!(v instanceof Uint8Array)?{success:!1,error:new n.ValidationError(`${w} must be a byte array`)}:typeof x.maxLength=="number"&&v.byteLength>x.maxLength?{success:!1,error:new n.ValidationError(`${w} must not be larger than ${x.maxLength} bytes`)}:typeof x.minLength=="number"&&v.byteLength<x.minLength?{success:!1,error:new n.ValidationError(`${w} must not be smaller than ${x.minLength} bytes`)}:{success:!0,value:v}}function h(m,w,x,v){return t.CID.asCID(v)===null?{success:!1,error:new n.ValidationError(`${w} must be a CID`)}:{success:!0,value:v}}function y(m,w,x,v){return!v||typeof v!="object"?{success:!1,error:new n.ValidationError(`${w} must be an object`)}:{success:!0,value:v}}return tr}var Pf;function Ru(){if(Pf)return Lo;Pf=1,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.validate=i,Lo.array=n,Lo.object=s,Lo.validateOneOf=l;const o=li(),e=Su(),r=WR(),t=ox();function i(d,p,u,h){switch(u.type){case"object":return s(d,p,u,h);case"array":return n(d,p,u,h);case"blob":return(0,r.blob)(d,p,u,h);default:return(0,t.validate)(d,p,u,h)}}function n(d,p,u,h){if(!Array.isArray(h))return{success:!1,error:new o.ValidationError(`${p} must be an array`)};if(typeof u.maxLength=="number"&&h.length>u.maxLength)return{success:!1,error:new o.ValidationError(`${p} must not have more than ${u.maxLength} elements`)};if(typeof u.minLength=="number"&&h.length<u.minLength)return{success:!1,error:new o.ValidationError(`${p} must not have fewer than ${u.minLength} elements`)};const y=u.items;for(let m=0;m<h.length;m++){const w=h[m],x=`${p}/${m}`,v=l(d,x,y,w);if(!v.success)return v}return{success:!0,value:h}}function s(d,p,u,h){if(!(0,o.isObj)(h))return{success:!1,error:new o.ValidationError(`${p} must be an object`)};let y=h;if("properties"in u&&u.properties!=null)for(const m in u.properties){const w=h[m];if(w===null&&u.nullable?.includes(m))continue;const x=u.properties[m];if(w===void 0&&!u.required?.includes(m))if(x.type==="integer"||x.type==="boolean"||x.type==="string"){if(x.default===void 0)continue}else continue;const v=`${p}/${m}`,k=l(d,v,x,w),A=k.success?k.value:w;if(A===void 0){if(u.required?.includes(m))return{success:!1,error:new o.ValidationError(`${p} must have the property "${m}"`)}}else if(!k.success)return k;A!==w&&(y===h&&(y={...h}),y[m]=A)}return{success:!0,value:y}}function l(d,p,u,h,y=!1){let m;if(u.type==="union"){if(!(0,o.isDiscriminatedObject)(h))return{success:!1,error:new o.ValidationError(`${p} must be an object which includes the "$type" property`)};if(a(u.refs,h.$type))m=d.getDefOrThrow(h.$type);else return u.closed?{success:!1,error:new o.ValidationError(`${p} $type must be one of ${u.refs.join(", ")}`)}:{success:!0,value:h}}else u.type==="ref"?m=d.getDefOrThrow(u.ref):m=u;return y?s(d,p,m,h):i(d,p,m,h)}const a=(d,p)=>{const u=(0,e.toLexUri)(p);return d.includes(u)?!0:u.endsWith("#main")?d.includes(u.slice(0,-5)):!u.includes("#")&&d.includes(`${u}#main`)};return Lo}var rr={},Tf;function JR(){if(Tf)return rr;Tf=1;var o=rr&&rr.__createBinding||(Object.create?(function(l,a,d,p){p===void 0&&(p=d);var u=Object.getOwnPropertyDescriptor(a,d);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[d]}}),Object.defineProperty(l,p,u)}):(function(l,a,d,p){p===void 0&&(p=d),l[p]=a[d]})),e=rr&&rr.__setModuleDefault||(Object.create?(function(l,a){Object.defineProperty(l,"default",{enumerable:!0,value:a})}):function(l,a){l.default=a}),r=rr&&rr.__importStar||(function(){var l=function(a){return l=Object.getOwnPropertyNames||function(d){var p=[];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(p[p.length]=u);return p},l(a)};return function(a){if(a&&a.__esModule)return a;var d={};if(a!=null)for(var p=l(a),u=0;u<p.length;u++)p[u]!=="default"&&o(d,a,p[u]);return e(d,a),d}})();Object.defineProperty(rr,"__esModule",{value:!0}),rr.params=s;const t=li(),i=Ru(),n=r(ox());function s(l,a,d,p){const u=p&&typeof p=="object"?p:{},h=new Set(d.required??[]);let y=u;if(typeof d.properties=="object")for(const m in d.properties){const w=d.properties[m],x=w.t
2ype==="array"?(0,i.array)(l,m,w,u[m]):n.validate(l,m,w,u[m]),v=x.success?x.value:u[m],k=typeof v>"u";if(k&&h.has(m))return{success:!1,error:new t.ValidationError(`${a} must have the property "${m}"`)};if(!k&&!x.success)return x;v!==u[m]&&(y===u&&(y={...u}),y[m]=v)}return{success:!0,value:y}}return rr}var qf;function YR(){if(qf)return ao;qf=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.assertValidRecord=r,ao.assertValidXrpcParams=t,ao.assertValidXrpcInput=i,ao.assertValidXrpcOutput=n,ao.assertValidXrpcMessage=s;const o=Ru(),e=JR();function r(a,d,p){const u=(0,o.object)(a,"Record",d.record,p);if(!u.success)throw u.error;return u.value}function t(a,d,p){if(d.parameters){const u=(0,e.params)(a,"Params",d.parameters,p);if(!u.success)throw u.error;return u.value}}function i(a,d,p){if(d.input?.schema)return l(a,"Input",d.input.schema,p,!0)}function n(a,d,p){if(d.output?.schema)return l(a,"Output",d.output.schema,p,!0)}function s(a,d,p){if(d.message?.schema)return l(a,"Message",d.message.schema,p,!0)}function l(a,d,p,u,h=!1){const y=(0,o.validateOneOf)(a,d,p,u,h);if(!y.success)throw y.error;return y.value}return ao}var Df;function ZR(){if(Df)return ss;Df=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.Lexicons=void 0;const o=li(),e=Su(),r=YR(),t=Ru();class i{constructor(a){if(Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"defs",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),a)for(const d of a)this.add(d)}[Symbol.iterator](){return this.docs.values()}add(a){const d=(0,e.toLexUri)(a.id);if(this.docs.has(d))throw new Error(`${d} has already been registered`);s(a,d),this.docs.set(d,a);for(const[p,u]of n(a))this.defs.set(p,u)}remove(a){a=(0,e.toLexUri)(a);const d=this.docs.get(a);if(!d)throw new Error(`Unable to remove "${a}": does not exist`);for(const[p,u]of n(d))this.defs.delete(p);this.docs.delete(a)}get(a){return a=(0,e.toLexUri)(a),this.docs.get(a)}getDef(a){return a=(0,e.toLexUri)(a),this.defs.get(a)}getDefOrThrow(a,d){const p=this.getDef(a);if(!p)throw new o.LexiconDefNotFoundError(`Lexicon not found: ${a}`);if(d&&!d.includes(p.type))throw new o.InvalidLexiconError(`Not a ${d.join(" or ")} lexicon: ${a}`);return p}validate(a,d){if(!(0,o.isObj)(d))throw new o.ValidationError("Value must be an object");const p=(0,e.toLexUri)(a),u=this.getDefOrThrow(p,["record","object"]);if(u.type==="record")return(0,t.object)(this,"Record",u.record,d);if(u.type==="object")return(0,t.object)(this,"Object",u,d);throw new o.InvalidLexiconError("Definition must be a record or object")}assertValidRecord(a,d){if(!(0,o.isObj)(d))throw new o.ValidationError("Record must be an object");if(!("$type"in d))throw new o.ValidationError("Record/$type must be a string");const{$type:p}=d;if(typeof p!="string")throw new o.ValidationError("Record/$type must be a string");const u=(0,e.toLexUri)(a);if((0,e.toLexUri)(p)!==u)throw new o.ValidationError(`Invalid $type: must be ${u}, got ${p}`);const h=this.getDefOrThrow(u,["record"]);return(0,r.assertValidRecord)(this,h,d)}assertValidXrpcParams(a,d){a=(0,e.toLexUri)(a);const p=this.getDefOrThrow(a,["query","procedure","subscription"]);return(0,r.assertValidXrpcParams)(this,p,d)}assertValidXrpcInput(a,d){a=(0,e.toLexUri)(a);const p=this.getDefOrThrow(a,["procedure"]);return(0,r.assertValidXrpcInput)(this,p,d)}assertValidXrpcOutput(a,d){a=(0,e.toLexUri)(a);const p=this.getDefOrThrow(a,["query","procedure"]);return(0,r.assertValidXrpcOutput)(this,p,d)}assertValidXrpcMessage(a,d){a=(0,e.toLexUri)(a);const p=this.getDefOrThrow(a,["subscription"]);return(0,r.assertValidXrpcMessage)(this,p,d)}resolveLexUri(a,d){return a=(0,e.toLexUri)(a),(0,e.toLexUri)(d,a)}}ss.Lexicons=i;function*n(l){for(const a in l.defs)yield[`lex:${l.id}#${a}`,l.defs[a]],a==="main"&&(yield[`lex:${l.id}`,l.defs[a]])}function s(l,a){for(const d in l)l.type==="ref"?l.ref=(0,e.toLexUri)(l.ref,a):l.type==="union"?l.refs=l.refs.map(p=>(0,e.toLexUri)(p,a)):Array.isArray(l[d])?l[d]=l[d].map(p=>typeof p=="string"?p.startsWith("#")?(0,e.toLexUri)(p,a):p:p&&typeof p=="object"?s(p,a):p):l[d]&&typeof l[d]=="object"&&(l[d]=s(l[d],a));return l}return ss}var Ip={},Of;function e_(){return Of||(Of=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.jsonStringToLex=o.jsonToLex=o.stringifyLex=o.lexToJson=o.ipldToLex=o.lexToIpld=void 0;const e=dp,r=Yr(),t=Au(),i=p=>{if(Array.isArray(p))return p.map(u=>(0,o.lexToIpld)(u));if(p&&typeof p=="object"){if(p instanceof t.BlobRef)return p.original;if(e.CID.asCID(p)||p instanceof Uint8Array)return p;const u={};for(const h of Object.keys(p))u[h]=(0,o.lexToIpld)(p[h]);return u}return p};o.lexToIpld=i;const n=p=>{if(Array.isArray(p))return p.map(u=>(0,o.ipldToLex)(u));if(p&&typeof p=="object"){if((p.$type==="blob"||typeof p.cid=="string"&&typeof p.mimeType=="string")&&r.check.is(p,t.jsonBlobRef))return t.BlobRef.fromJsonRef(p);if(e.CID.asCID(p)||p instanceof Uint8Array)return p;const u={};for(const h of Object.keys(p))u[h]=(0,o.ipldToLex)(p[h]);return u}return p};o.ipldToLex=n;const s=p=>(0,r.ipldToJson)((0,o.lexToIpld)(p));o.lexToJson=s;const l=p=>JSON.stringify((0,o.lexToJson)(p));o.stringifyLex=l;const a=p=>(0,o.ipldToLex)((0,r.jsonToIpld)(p));o.jsonToLex=a;const d=p=>(0,o.jsonToLex)(JSON.parse(p));o.jsonStringToLex=d})(Ip)),Ip}var If;function Vn(){return If||(If=1,(function(o){var e=Mo&&Mo.__createBinding||(Object.create?(function(t,i,n,s){s===void 0&&(s=n);var l=Object.getOwnPropertyDescriptor(i,n);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(t,s,l)}
2):(function(t,i,n,s){s===void 0&&(s=n),t[s]=i[n]})),r=Mo&&Mo.__exportStar||function(t,i){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(i,n)&&e(i,t,n)};Object.defineProperty(o,"__esModule",{value:!0}),r(li(),o),r(ZR(),o),r(Au(),o),r(e_(),o)})(Mo)),Mo}var Mp={},Ai={},Mf;function T(){if(Mf)return Ai;Mf=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.is$typed=r,Ai.maybe$typed=t,Ai.asPredicate=i;function o(n){return n!=null&&typeof n=="object"}function e(n,s,l){return l==="main"?n===s:typeof n=="string"&&n.length===s.length+1+l.length&&n.charCodeAt(s.length)===35&&n.startsWith(s)&&n.endsWith(l)}function r(n,s,l){return o(n)&&"$type"in n&&e(n.$type,s,l)}function t(n,s,l){return o(n)&&("$type"in n?n.$type===void 0||e(n.$type,s,l):!0)}function i(n){return function(s){return n(s).success}}return Ai}var Nf;function P(){return Nf||(Nf=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.ids=o.lexicons=o.schemas=o.schemaDict=void 0,o.validate=t;const e=Vn(),r=T();o.schemaDict={AppBskyActorDefs:{lexicon:1,id:"app.bsky.actor.defs",defs:{profileViewBasic:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},pronouns:{type:"string"},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},createdAt:{type:"string",format:"datetime"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"}}},profileView:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},pronouns:{type:"string"},description:{type:"string",maxGraphemes:256,maxLength:2560},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"}}},profileViewDetailed:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},description:{type:"string",maxGraphemes:256,maxLength:2560},pronouns:{type:"string"},website:{type:"string",format:"uri"},avatar:{type:"string",format:"uri"},banner:{type:"string",format:"uri"},followersCount:{type:"integer"},followsCount:{type:"integer"},postsCount:{type:"integer"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},joinedViaStarterPack:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"},indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},pinnedPost:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"}}},profileAssociated:{type:"object",properties:{lists:{type:"integer"},feedgens:{type:"integer"},starterPacks:{type:"integer"},labeler:{type:"boolean"},chat:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociatedChat"},activitySubscription:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociatedActivitySubscription"}}},profileAssociatedChat:{type:"object",required:["allowIncoming"],properties:{allowIncoming:{type:"string",knownValues:["all","none","following"]}}},profileAssociatedActivitySubscription:{type:"object",required:["allowSubscriptions"],properties:{allowSubscriptions:{type:"string",knownValues:["followers","mutuals","none"]}}}
2,viewerState:{type:"object",description:"Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",properties:{muted:{type:"boolean"},mutedByList:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},blockedBy:{type:"boolean"},blocking:{type:"string",format:"at-uri"},blockingByList:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},following:{type:"string",format:"at-uri"},followedBy:{type:"string",format:"at-uri"},knownFollowers:{description:"This property is present only in selected cases, as an optimization.",type:"ref",ref:"lex:app.bsky.actor.defs#knownFollowers"},activitySubscription:{description:"This property is present only in selected cases, as an optimization.",type:"ref",ref:"lex:app.bsky.notification.defs#activitySubscription"}}},knownFollowers:{type:"object",description:"The subject's followers whom you also follow",required:["count","followers"],properties:{count:{type:"integer"},followers:{type:"array",minLength:0,maxLength:5,items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}},verificationState:{type:"object",description:"Represents the verification information about the user this object is attached to.",required:["verifications","verifiedStatus","trustedVerifierStatus"],properties:{verifications:{type:"array",description:"All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.",items:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationView"}},verifiedStatus:{type:"string",description:"The user's status as a verified account.",knownValues:["valid","invalid","none"]},trustedVerifierStatus:{type:"string",description:"The user's status as a trusted verifier.",knownValues:["valid","invalid","none"]}}},verificationView:{type:"object",description:"An individual verification for an associated subject.",required:["issuer","uri","isValid","createdAt"],properties:{issuer:{type:"string",description:"The user who issued this verification.",format:"did"},uri:{type:"string",description:"The AT-URI of the verification record.",format:"at-uri"},isValid:{type:"boolean",description:"True if the verification passes validation, otherwise false."},createdAt:{type:"string",description:"Timestamp when the verification was created.",format:"datetime"}}},preferences:{type:"array",items:{type:"union",refs:["lex:app.bsky.actor.defs#adultContentPref","lex:app.bsky.actor.defs#contentLabelPref","lex:app.bsky.actor.defs#savedFeedsPref","lex:app.bsky.actor.defs#savedFeedsPrefV2","lex:app.bsky.actor.defs#personalDetailsPref","lex:app.bsky.actor.defs#feedViewPref","lex:app.bsky.actor.defs#threadViewPref","lex:app.bsky.actor.defs#interestsPref","lex:app.bsky.actor.defs#mutedWordsPref","lex:app.bsky.actor.defs#hiddenPostsPref","lex:app.bsky.actor.defs#bskyAppStatePref","lex:app.bsky.actor.defs#labelersPref","lex:app.bsky.actor.defs#postInteractionSettingsPref","lex:app.bsky.actor.defs#verificationPrefs"]}},adultContentPref:{type:"object",required:["enabled"],properties:{enabled:{type:"boolean",default:!1}}},contentLabelPref:{type:"object",required:["label","visibility"],properties:{labelerDid:{type:"string",description:"Which labeler does this preference apply to? If undefined, applies globally.",format:"did"},label:{type:"string"},visibility:{type:"string",knownValues:["ignore","show","warn","hide"]}}},savedFeed:{type:"object",required:["id","type","value","pinned"],properties:{id:{type:"string"},type:{type:"string",knownValues:["feed","list","timeline"]},value:{type:"string"},pinned:{type:"boolean"}}},savedFeedsPrefV2:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#savedFeed"}}}},savedFeedsPref:{type:"object",required:["pinned","saved"],properties:{pinned:{type:"array",items:{type:"string",format:"at-uri"}},saved:{type:"array",items:{type:"string",format:"at-uri"}},timelineIndex:{type:"integer"}}},personalDetailsPref:{type:"object",properties:{birthDate:{type:"string",format:"datetime",description:"The birth date of account owner."}}},feedViewPref:{type:"object",required:["feed"],properties:{feed:{type:"string",description:"The URI of the feed, or an identifier which describes the feed."},hideReplies:{type:"boolean",description:"Hide replies in the feed."},hideRepliesByUnfollowed:{type:"boolean",description:"Hide replies in the feed
2if they are not by followed users.",default:!0},hideRepliesByLikeCount:{type:"integer",description:"Hide replies in the feed if they do not have this number of likes."},hideReposts:{type:"boolean",description:"Hide reposts in the feed."},hideQuotePosts:{type:"boolean",description:"Hide quote posts in the feed."}}},threadViewPref:{type:"object",properties:{sort:{type:"string",description:"Sorting mode for threads.",knownValues:["oldest","newest","most-likes","random","hotness"]},prioritizeFollowedUsers:{type:"boolean",description:"Show followed users at the top of all replies."}}},interestsPref:{type:"object",required:["tags"],properties:{tags:{type:"array",maxLength:100,items:{type:"string",maxLength:640,maxGraphemes:64},description:"A list of tags which describe the account owner's interests gathered during onboarding."}}},mutedWordTarget:{type:"string",knownValues:["content","tag"],maxLength:640,maxGraphemes:64},mutedWord:{type:"object",description:"A word that the account owner has muted.",required:["value","targets"],properties:{id:{type:"string"},value:{type:"string",description:"The muted word itself.",maxLength:1e4,maxGraphemes:1e3},targets:{type:"array",description:"The intended targets of the muted word.",items:{type:"ref",ref:"lex:app.bsky.actor.defs#mutedWordTarget"}},actorTarget:{type:"string",description:"Groups of users to apply the muted word to. If undefined, applies to all users.",knownValues:["all","exclude-following"],default:"all"},expiresAt:{type:"string",format:"datetime",description:"The date and time at which the muted word will expire and no longer be applied."}}},mutedWordsPref:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#mutedWord"},description:"A list of words the account owner has muted."}}},hiddenPostsPref:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"string",format:"at-uri"},description:"A list of URIs of posts the account owner has hidden."}}},labelersPref:{type:"object",required:["labelers"],properties:{labelers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#labelerPrefItem"}}}},labelerPrefItem:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},bskyAppStatePref:{description:"A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.",type:"object",properties:{activeProgressGuide:{type:"ref",ref:"lex:app.bsky.actor.defs#bskyAppProgressGuide"},queuedNudges:{description:"An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.",type:"array",maxLength:1e3,items:{type:"string",maxLength:100}},nuxs:{description:"Storage for NUXs the user has encountered.",type:"array",maxLength:100,items:{type:"ref",ref:"lex:app.bsky.actor.defs#nux"}}}},bskyAppProgressGuide:{description:"If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.",type:"object",required:["guide"],properties:{guide:{type:"string",maxLength:100}}},nux:{type:"object",description:"A new user experiences (NUX) storage object",required:["id","completed"],properties:{id:{type:"string",maxLength:100},completed:{type:"boolean",default:!1},data:{description:"Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.",type:"string",maxLength:3e3,maxGraphemes:300},expiresAt:{type:"string",format:"datetime",description:"The date and time at which the NUX will expire and should be considered completed."}}},verificationPrefs:{type:"object",description:"Preferences for how verified accounts appear in the app.",required:[],properties:{hideBadges:{description:"Hide the blue check badges for verified accounts and trusted verifiers.",type:"boolean",default:!1}}},postInteractionSettingsPref:{type:"object",description:"Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.",required:[],properties:{threadgateAllowRules:{description:"Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.threadgate#mentionRule","lex:app.bsky.feed.threadgate#followerRule","lex:app.bsky.feed.threadgate#followingRule","lex:app.bsky.feed.threadgate#listRule"]}},postgateEmbeddingRules:{description:"Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.postgate#disableRule"]}}}}
2,statusView:{type:"object",required:["status","record"],properties:{status:{type:"string",description:"The status for the account.",knownValues:["app.bsky.actor.status#live"]},record:{type:"unknown"},embed:{type:"union",description:"An optional embed associated with the status.",refs:["lex:app.bsky.embed.external#view"]},expiresAt:{type:"string",description:"The date when this status will expire. The application might choose to no longer return the status after expiration.",format:"datetime"},isActive:{type:"boolean",description:"True if the status is not expired, false if it is expired. Only present if expiration was set."}}}}},AppBskyActorGetPreferences:{lexicon:1,id:"app.bsky.actor.getPreferences",defs:{main:{type:"query",description:"Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.actor.defs#preferences"}}}}}}},AppBskyActorGetProfile:{lexicon:1,id:"app.bsky.actor.getProfile",defs:{main:{type:"query",description:"Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"Handle or DID of account to fetch profile of."}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"}}}}},AppBskyActorGetProfiles:{lexicon:1,id:"app.bsky.actor.getProfiles",defs:{main:{type:"query",description:"Get detailed profile views of multiple actors.",parameters:{type:"params",required:["actors"],properties:{actors:{type:"array",items:{type:"string",format:"at-identifier"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["profiles"],properties:{profiles:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"}}}}}}}},AppBskyActorGetSuggestions:{lexicon:1,id:"app.bsky.actor.getSuggestions",defs:{main:{type:"query",description:"Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},recId:{type:"integer",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyActorProfile:{lexicon:1,id:"app.bsky.actor.profile",defs:{main:{type:"record",description:"A declaration of a Bluesky account profile.",key:"literal:self",record:{type:"object",properties:{displayName:{type:"string",maxGraphemes:64,maxLength:640},description:{type:"string",description:"Free-form profile description text.",maxGraphemes:256,maxLength:2560},pronouns:{type:"string",description:"Free-form pronouns text.",maxGraphemes:20,maxLength:200},website:{type:"string",format:"uri"},avatar:{type:"blob",description:"Small image to be displayed next to posts from account. AKA, 'profile picture'",accept:["image/png","image/jpeg"],maxSize:1e6},banner:{type:"blob",description:"Larger horizontal image to display behind profile view.",accept:["image/png","image/jpeg"],maxSize:1e6},labels:{type:"union",description:"Self-label values, specific to the Bluesky application, on the overall account.",refs:["lex:com.atproto.label.defs#selfLabels"]},joinedViaStarterPack:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},pinnedPost:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyActorPutPreferences:{lexicon:1,id:"app.bsky.actor.putPreferences",defs:{main:{type:"procedure",description:"Set the private preferences attached to the account.",input:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.actor.defs#preferences"}}}}}}},AppBskyActorSearchActors:{lexicon:1,id:"app.bsky.actor.searchActors",defs:{main:{type:"query",description:"Find actors (profiles) matching search criteria. Does not require auth.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead."},q:{type:"string",description:"Search query string. Syntax, phrase, boolean, and facet
2ing is unspecified, but Lucene query syntax is recommended."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyActorSearchActorsTypeahead:{lexicon:1,id:"app.bsky.actor.searchActorsTypeahead",defs:{main:{type:"query",description:"Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead."},q:{type:"string",description:"Search query prefix; not a full query string."},limit:{type:"integer",minimum:1,maximum:100,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}}}}}},AppBskyActorStatus:{lexicon:1,id:"app.bsky.actor.status",defs:{main:{type:"record",description:"A declaration of a Bluesky account status.",key:"literal:self",record:{type:"object",required:["status","createdAt"],properties:{status:{type:"string",description:"The status for the account.",knownValues:["app.bsky.actor.status#live"]},embed:{type:"union",description:"An optional embed associated with the status.",refs:["lex:app.bsky.embed.external"]},durationMinutes:{type:"integer",description:"The duration of the status in minutes. Applications can choose to impose minimum and maximum limits.",minimum:1},createdAt:{type:"string",format:"datetime"}}}},live:{type:"token",description:"Advertises an account as currently offering live content."}}},AppBskyBookmarkCreateBookmark:{lexicon:1,id:"app.bsky.bookmark.createBookmark",defs:{main:{type:"procedure",description:"Creates a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"}}}},errors:[{name:"UnsupportedCollection",description:"The URI to be bookmarked is for an unsupported collection."}]}}},AppBskyBookmarkDefs:{lexicon:1,id:"app.bsky.bookmark.defs",defs:{bookmark:{description:"Object used to store bookmark data in stash.",type:"object",required:["subject"],properties:{subject:{description:"A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported.",type:"ref",ref:"lex:com.atproto.repo.strongRef"}}},bookmarkView:{type:"object",required:["subject","item"],properties:{subject:{description:"A strong ref to the bookmarked record.",type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"},item:{type:"union",refs:["lex:app.bsky.feed.defs#blockedPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#postView"]}}}}},AppBskyBookmarkDeleteBookmark:{lexicon:1,id:"app.bsky.bookmark.deleteBookmark",defs:{main:{type:"procedure",description:"Deletes a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}}},errors:[{name:"UnsupportedCollection",description:"The URI to be bookmarked is for an unsupported collection."}]}}},AppBskyBookmarkGetBookmarks:{lexicon:1,id:"app.bsky.bookmark.getBookmarks",defs:{main:{type:"query",description:"Gets views of records bookmarked by the authenticated user. Requires authentication.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["bookmarks"],properties:{cursor:{type:"string"},bookmarks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.bookmark.defs#bookmarkView"}}}}}}}},AppBskyEmbedDefs:{lexicon:1,id:"app.bsky.embed.defs",defs:{aspectRatio:{type:"object",description:"width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.",required:["width","height"],properties:{width:{type:"integer",minimum:1},height:{type:"integer",minimum:1}}}}},AppBskyEmbedExternal:{lexicon:1,id:"app.bsky.embed.external",defs:{main:{type:"object",description:"A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).",required:["external"],properties:{external:{type:"ref",ref:"lex:app.bsky.embed.external#external"}}},external:{type:"object",required:["uri","title","description"],properties:{uri:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},thumb:{type:"blob",accept:["image/*"],maxSize:1e6}}},view:{type:"object",required:["external"],properties:{external:{type:"ref",ref:"lex:app.bsky.embed.external#viewExternal"}}},viewExternal:{type:"object",required:["uri","title","description"],properties:{uri:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},thumb:{type:"string",format:"uri"}}}}},AppBskyEmbedImages:{lexicon:1,id:"app.bsky.embed.images",description:"A set of images embedded in a Bluesky record (eg, a post).",defs:{main:{type:"object",required:["images"],properties:{images:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.images#image"},maxLength:4}}},image:{type:"object",required:["image","alt"],properties:{image:{type:"blob",accept:["image/*"],maxSize:1e6},alt:{type:"string",description:"Alt text description of the image, for accessibility."},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}},view:{type:"object",required:["images"],properties:{images:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.images#viewImage"},maxLength:4}}},viewImage:{type:"object",required:["thumb","fullsize","alt"],properties:{thumb:{type:"string",format:"uri",description:"Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."},fullsize:{type:"string",format:"uri",description:"Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View."},alt:{type:"string",description:"Alt text description of the image, for accessibility."},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}}}},AppBskyEmbedRecord:{lexicon:1,id:"app.bsky.embed.record",description:"A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.",defs:{main:{type:"object",required:["record"],properties:{record:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}},view:{type:"object",required:["record"],properties:{record:{type:"union",refs:["lex:app.bsky.embed.record#viewRecord","lex:app.bsky.embed.record#viewNotFound","lex:app.bsky.embed.record#viewBlocked","lex:app.bsky.embed.record#viewDetached","lex:app.bsky.feed.defs#generatorView","lex:app.bsky.graph.defs#listView","lex:app.bsky.labeler.defs#labelerView","lex:app.bsky.graph.defs#starterPackViewBasic"]}}},viewRecord:{type:"object",required:["uri","cid","author","value","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}
2,value:{type:"unknown",description:"The record data itself."},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},replyCount:{type:"integer"},repostCount:{type:"integer"},likeCount:{type:"integer"},quoteCount:{type:"integer"},embeds:{type:"array",items:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view","lex:app.bsky.embed.record#view","lex:app.bsky.embed.recordWithMedia#view"]}},indexedAt:{type:"string",format:"datetime"}}},viewNotFound:{type:"object",required:["uri","notFound"],properties:{uri:{type:"string",format:"at-uri"},notFound:{type:"boolean",const:!0}}},viewBlocked:{type:"object",required:["uri","blocked","author"],properties:{uri:{type:"string",format:"at-uri"},blocked:{type:"boolean",const:!0},author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}},viewDetached:{type:"object",required:["uri","detached"],properties:{uri:{type:"string",format:"at-uri"},detached:{type:"boolean",const:!0}}}}},AppBskyEmbedRecordWithMedia:{lexicon:1,id:"app.bsky.embed.recordWithMedia",description:"A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.",defs:{main:{type:"object",required:["record","media"],properties:{record:{type:"ref",ref:"lex:app.bsky.embed.record"},media:{type:"union",refs:["lex:app.bsky.embed.images","lex:app.bsky.embed.video","lex:app.bsky.embed.external"]}}},view:{type:"object",required:["record","media"],properties:{record:{type:"ref",ref:"lex:app.bsky.embed.record#view"},media:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view"]}}}}},AppBskyEmbedVideo:{lexicon:1,id:"app.bsky.embed.video",description:"A video embedded in a Bluesky record (eg, a post).",defs:{main:{type:"object",required:["video"],properties:{video:{type:"blob",description:"The mp4 video file. May be up to 100mb, formerly limited to 50mb.",accept:["video/mp4"],maxSize:1e8},captions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.video#caption"},maxLength:20},alt:{type:"string",description:"Alt text description of the video, for accessibility.",maxGraphemes:1e3,maxLength:1e4},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}},caption:{type:"object",required:["lang","file"],properties:{lang:{type:"string",format:"language"},file:{type:"blob",accept:["text/vtt"],maxSize:2e4}}},view:{type:"object",required:["cid","playlist"],properties:{cid:{type:"string",format:"cid"},playlist:{type:"string",format:"uri"},thumbnail:{type:"string",format:"uri"},alt:{type:"string",maxGraphemes:1e3,maxLength:1e4},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}}}},AppBskyFeedDefs:{lexicon:1,id:"app.bsky.feed.defs",defs:{postView:{type:"object",required:["uri","cid","author","record","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},record:{type:"unknown"},embed:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view","lex:app.bsky.embed.record#view","lex:app.bsky.embed.recordWithMedia#view"]},bookmarkCount:{type:"integer"},replyCount:{type:"integer"},repostCount:{type:"integer"},likeCount:{type:"integer"},quoteCount:{type:"integer"},indexedAt:{type:"string",format:"datetime"},viewer:{type:"ref",ref:"lex:app.bsky.feed.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"}}},viewerState:{type:"object",description:"Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",properties:{repost:{type:"string",format:"at-uri"},like:{type:"string",format:"at-uri"},bookmarked:{type:"boolean"},threadMuted:{type:"boolean"},replyDisabled:{type:"boolean"},embeddingDisabled:{type:"boolean"},pinned:{type:"boolean"}}},threadContext:{type:"object",description:"Metadata about this post within the context of the thread it is in.",properties:{rootAuthorLike:{type:"string",format:"at-uri"}}},feedViewPost:{type:"object",required:["post"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},reply:{type:"ref",ref:"lex:app.bsky.feed.defs#replyRef"},reason:{type:"union",refs:["lex:app.bsky.feed.defs#reasonRepost","lex:app.bsky.feed.defs#reasonPin"]},feedContext:{type:"string",description:"Context provided by feed generator that may be passed back alongside interactions.",maxLength:2e3},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}},replyRef:{type:"object",required:["root","parent"],properties:{root:{type:"union",refs:["lex:app.bsky.feed.defs#postView","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},parent:{type:"union",refs:["lex:app.bsky.feed.defs#postView","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},grandparentAuthor:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic",description:"When parent is a reply to another post, this is the author of that post."}}},reasonRepost:{type:"object",required:["by","indexedAt"],properties:{by:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},indexedAt:{type:"string",format:"datetime"}}},reasonPin:{type:"object",properties:{}},threadViewPost:{type:"object",required:["post"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},parent:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},replies:{type:"array",items:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]}},threadContext:{type:"ref",ref:"lex:app.bsky.feed.defs#threadContext"}}},notFoundPost:{type:"object",required:["uri","notFound"],properties:{uri:{type:"string",format:"at-uri"},notFound:{type:"boolean",const:!0}}},blockedPost:{type:"object",required:["uri","blocked","author"],properties:{uri:{type:"string",format:"at-uri"},blocked:{type:"boolean",const:!0},author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}},blockedAuthor:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}
2,viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"}}},generatorView:{type:"object",required:["uri","cid","did","creator","displayName","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},did:{type:"string",format:"did"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},displayName:{type:"string"},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"string",format:"uri"},likeCount:{type:"integer",minimum:0},acceptsInteractions:{type:"boolean"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorViewerState"},contentMode:{type:"string",knownValues:["app.bsky.feed.defs#contentModeUnspecified","app.bsky.feed.defs#contentModeVideo"]},indexedAt:{type:"string",format:"datetime"}}},generatorViewerState:{type:"object",properties:{like:{type:"string",format:"at-uri"}}},skeletonFeedPost:{type:"object",required:["post"],properties:{post:{type:"string",format:"at-uri"},reason:{type:"union",refs:["lex:app.bsky.feed.defs#skeletonReasonRepost","lex:app.bsky.feed.defs#skeletonReasonPin"]},feedContext:{type:"string",description:"Context that will be passed through to client and may be passed to feed generator back alongside interactions.",maxLength:2e3}}},skeletonReasonRepost:{type:"object",required:["repost"],properties:{repost:{type:"string",format:"at-uri"}}},skeletonReasonPin:{type:"object",properties:{}},threadgateView:{type:"object",properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"}}}},interaction:{type:"object",properties:{item:{type:"string",format:"at-uri"},event:{type:"string",knownValues:["app.bsky.feed.defs#requestLess","app.bsky.feed.defs#requestMore","app.bsky.feed.defs#clickthroughItem","app.bsky.feed.defs#clickthroughAuthor","app.bsky.feed.defs#clickthroughReposter","app.bsky.feed.defs#clickthroughEmbed","app.bsky.feed.defs#interactionSeen","app.bsky.feed.defs#interactionLike","app.bsky.feed.defs#interactionRepost","app.bsky.feed.defs#interactionReply","app.bsky.feed.defs#interactionQuote","app.bsky.feed.defs#interactionShare"]},feedContext:{type:"string",description:"Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.",maxLength:2e3},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}},requestLess:{type:"token",description:"Request that less content like the given feed item be shown in the feed"},requestMore:{type:"token",description:"Request that more content like the given feed item be shown in the feed"},clickthroughItem:{type:"token",description:"User clicked through to the feed item"},clickthroughAuthor:{type:"token",description:"User clicked through to the author of the feed item"},clickthroughReposter:{type:"token",description:"User clicked through to the reposter of the feed item"},clickthroughEmbed:{type:"token",description:"User clicked through to the embedded content of the feed item"},contentModeUnspecified:{type:"token",description:"Declares the feed generator returns any types of posts."},contentModeVideo:{type:"token",description:"Declares the feed generator returns posts containing app.bsky.embed.video embeds."},interactionSeen:{type:"token",description:"Feed item was seen by user"},interactionLike:{type:"token",description:"User liked the feed item"},interactionRepost:{type:"token",description:"User reposted the feed item"},interactionReply:{type:"token",description:"User replied to the feed item"},interactionQuote:{type:"token",description:"User quoted the feed item"},interactionShare:{type:"token",description:"User shared the feed item"}}},AppBskyFeedDescribeFeedGenerator:{lexicon:1,id:"app.bsky.feed.describeFeedGenerator",defs:{main:{type:"query",description:"Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).",output:{encoding:"application/json",schema:{type:"object",required:["did","feeds"],properties:{did:{type:"string",format:"did"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.describeFeedGenerator#feed"}},links:{type:"ref",ref:"lex:app.bsky.feed.describeFeedGenerator#links"}}}}},feed:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},links:{type:"object",properties:{privacyPolicy:{type:"string"},termsOfService:{type:"string"}}}}},AppBskyFeedGenerator:{lexicon:1,id:"app.bsky.feed.generator",defs:{main:{type:"record",description:"Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.",key:"any",re
2cord:{type:"object",required:["did","displayName","createdAt"],properties:{did:{type:"string",format:"did"},displayName:{type:"string",maxGraphemes:24,maxLength:240},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"blob",accept:["image/png","image/jpeg"],maxSize:1e6},acceptsInteractions:{type:"boolean",description:"Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions"},labels:{type:"union",description:"Self-label values",refs:["lex:com.atproto.label.defs#selfLabels"]},contentMode:{type:"string",knownValues:["app.bsky.feed.defs#contentModeUnspecified","app.bsky.feed.defs#contentModeVideo"]},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyFeedGetActorFeeds:{lexicon:1,id:"app.bsky.feed.getActorFeeds",defs:{main:{type:"query",description:"Get a list of feeds (feed generator records) created by the actor (in the actor's repo).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetActorLikes:{lexicon:1,id:"app.bsky.feed.getActorLikes",defs:{main:{type:"query",description:"Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"BlockedActor"},{name:"BlockedByActor"}]}}},AppBskyFeedGetAuthorFeed:{lexicon:1,id:"app.bsky.feed.getAuthorFeed",defs:{main:{type:"query",description:"Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},filter:{type:"string",description:"Combinations of post/repost types to include in response.",knownValues:["posts_with_replies","posts_no_replies","posts_with_media","posts_and_author_threads","posts_with_video"],default:"posts_with_replies"},includePins:{type:"boolean",default:!1}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"BlockedActor"},{name:"BlockedByActor"}]}}},AppBskyFeedGetFeed:{lexicon:1,id:"app.bsky.feed.getFeed",defs:{main:{type:"query",description:"Get a hydrated feed from an actor's selected feed generator. Implemented by App View.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"UnknownFeed"}]}}},AppBskyFeedGetFeedGenerator:{lexicon:1,id:"app.bsky.feed.getFeedGenerator",defs:{main:{type:"query",description:"Get information about a feed generator. Implemented by AppView.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri",description:"AT-URI of the feed generator record."}}},output:{encoding:"application/json",schema:{type:"object",required:["view","isOnline","isValid"],properties:{view:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"},isOnline:{type:"boolean",description:"Indicates whether the feed generator service has been online recently, or else seems to be inactive."},isValid:{type:"boolean",description:"Indicates whether the feed generator service is compatible with the record declaration."}}}}}}},AppBskyFeedGetFeedGenerators:{lexicon:1,id:"app.bsky.feed.getFeedGenerators",defs:{main:{type:"query",description:"Get information about a list of feed generators.",parameters:{type:"params",required:["feeds"],properties:{feeds:{type:"array",items:{type:"string",format:"at-uri"}}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetFeedSkeleton:{lexicon:1,id:"app.bsky.feed.getFeedSkeleton",defs:{main:{type:"query",description:"Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri",description:"Reference to feed generator record describing the specific feed being requested."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#skeletonFeedPost"}},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}}},errors:[{name:"UnknownFeed"}]}}},AppBskyFeedGetLikes:{lexicon:1,id:"app.bsky.feed.getLikes",defs:{main:{type:"query",description:"Get like records which reference a subject (by AT-URI and CID).",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"AT-URI of the subject (eg, a post record)."},cid:{type:"string",format:"cid",description:"CID of the subject record (aka, specific version of record), to filter likes."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","likes"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},likes:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.getLikes#like"}}}}}},like:{type:"object",required:["indexedAt","createdAt","actor"],properties:{indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},actor:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}},AppBskyFeedGetListFeed:{lexicon:1,id:"app.bsky.feed.getListFeed",defs:{main:{type:"query",description:"Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth.",parameters:{type:"params",required:["list"],properties:{list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"UnknownList"}]}}},AppBskyFeedGetPostThread:{lexicon:1,id:"app.bsky.feed.getPostThread",defs:{main:{type:"query",description:"Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record."},depth:{type:"integer",description:"How many levels of reply depth should be included in response.",default:6,minimum:0,maximum:1e3},parentHeight:{type:"integer",description:"How many levels of parent (and grandparent, etc) post to include.",default:80,minimum:0,maximum:1e3}}},output:{encoding:"application/json",schema:{type:"object",required:["thread"],properties:{thread:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"}}}},errors:[{name:"NotFound"}]}}},AppBskyFeedGetPosts:{lexicon:1,id:"app.bsky.feed.getPosts",defs:{main:{type:"query",description:"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",description:"List of post AT-URIs to return hydrated views for.",items:{type:"string",format:"at-uri"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}}}}},AppBskyFeedGetQuotes:{lexicon:1,id:"app.bsky.feed.getQuotes",defs:{main:{type:"query",description:"Get a list of quotes for a given post.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) of post record"},cid:{type:"string",format:"cid",description:"If supplied, filters to quotes of specific version (by CID) of the post record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","posts"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}}}}},AppBskyFeedGetRepostedBy:{lexicon:1,id:"app.bsky.feed.getRepostedBy",defs:{main:{type:"query",description:"Get a list of reposts for a given post.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) of post record"},cid:{type:"string",format:"cid",description:"If supplied, filters to reposts of specific version (by CID) of the post record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","repostedBy"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},repostedBy:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyFeedGetSuggestedFeeds:{lexicon:1,id:"app.bsky.feed.getSuggestedFeeds",defs:{main:{type:"query",description:"Get a list of suggested feeds (feed generators) for the requesting account.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetTimeline:{lexicon:1,id:"app.bsky.feed.getTimeline",def
2s:{main:{type:"query",description:"Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.",parameters:{type:"params",properties:{algorithm:{type:"string",description:"Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}}}}},AppBskyFeedLike:{lexicon:1,id:"app.bsky.feed.like",defs:{main:{type:"record",description:"Record declaring a 'like' of a piece of subject content.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"},via:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}}}}},AppBskyFeedPost:{lexicon:1,id:"app.bsky.feed.post",defs:{main:{type:"record",description:"Record containing a Bluesky post.",key:"tid",record:{type:"object",required:["text","createdAt"],properties:{text:{type:"string",maxLength:3e3,maxGraphemes:300,description:"The primary post content. May be an empty string, if there are embeds."},entities:{type:"array",description:"DEPRECATED: replaced by app.bsky.richtext.facet.",items:{type:"ref",ref:"lex:app.bsky.feed.post#entity"}},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},reply:{type:"ref",ref:"lex:app.bsky.feed.post#replyRef"},embed:{type:"union",refs:["lex:app.bsky.embed.images","lex:app.bsky.embed.video","lex:app.bsky.embed.external","lex:app.bsky.embed.record","lex:app.bsky.embed.recordWithMedia"]},langs:{type:"array",description:"Indicates human language of post primary text content.",maxLength:3,items:{type:"string",format:"language"}},labels:{type:"union",description:"Self-label values for this post. Effectively content warnings.",refs:["lex:com.atproto.label.defs#selfLabels"]},tags:{type:"array",description:"Additional hashtags, in addition to any included in post text and facets.",maxLength:8,items:{type:"string",maxLength:640,maxGraphemes:64}},createdAt:{type:"string",format:"datetime",description:"Client-declared timestamp when this post was originally created."}}}},replyRef:{type:"object",required:["root","parent"],properties:{root:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},parent:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}},entity:{type:"object",description:"Deprecated: use facets instead.",required:["index","type","value"],properties:{index:{type:"ref",ref:"lex:app.bsky.feed.post#textSlice"},type:{type:"string",description:"Expected values are 'mention' and 'link'."},value:{type:"string"}}},textSlice:{type:"object",description:"Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.",required:["start","end"],properties:{start:{type:"integer",minimum:0},end:{type:"integer",minimum:0}}}}},AppBskyFeedPostgate:{lexicon:1,id:"app.bsky.feed.postgate",defs:{main:{type:"record",key:"tid",description:"Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository.",record:{type:"object",required:["post","createdAt"],properties:{createdAt:{type:"string",format:"datetime"},post:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the post record."},detachedEmbeddingUris:{type:"array",maxLength:50,items:{type:"string",format:"at-uri"},description:"List of AT-URIs embedding this post that the author has detached from."},embeddingRules:{description:"List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.postgate#disableRule"]}}}}},disableRule:{type:"object",description:"Disables embedding of this post.",properties:{}}}},AppBskyFeedRepost:{lexicon:1,id:"app.bsky.feed.repost",defs:{main:{description:"Record representing a 'repost' of an existing Bluesky post.",type:"record",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"},via:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}}}}},AppBskyFeedSearchPosts:{lexicon:1,id:"app.bsky.feed.searchPosts",defs:{main:{type:"query",description:"Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string;
2 syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},sort:{type:"string",knownValues:["top","latest"],default:"latest",description:"Specifies the ranking order of results."},since:{type:"string",description:"Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)."},until:{type:"string",description:"Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)."},mentions:{type:"string",format:"at-identifier",description:"Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions."},author:{type:"string",format:"at-identifier",description:"Filter to posts by the given account. Handles are resolved to DID before query-time."},lang:{type:"string",format:"language",description:"Filter to posts in the given language. Expected to be based on post language field, though server may override language detection."},domain:{type:"string",description:"Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization."},url:{type:"string",format:"uri",description:"Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching."},tag:{type:"array",items:{type:"string",maxLength:640,maxGraphemes:64},description:"Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyFeedSendInteractions:{lexicon:1,id:"app.bsky.feed.sendInteractions",defs:{main:{type:"procedure",description:"Send information about interactions with feed items back to the feed generator that served them.",input:{encoding:"application/json",schema:{type:"object",required:["interactions"],properties:{interactions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#interaction"}}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},AppBskyFeedThreadgate:{lexicon:1,id:"app.bsky.feed.threadgate",defs:{main:{type:"record",key:"tid",description:"Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.",record:{type:"object",required:["post","createdAt"],properties:{post:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the post record."},allow:{description:"List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.threadgate#mentionRule","lex:app.bsky.feed.threadgate#followerRule","lex:app.bsky.feed.threadgate#followingRule","lex:app.bsky.feed.threadgate#listRule"]}},createdAt:{type:"string",format:"datetime"},hiddenReplies:{type:"array",maxLength:50,items:{type:"string",format:"at-uri"},description:"List of hidden reply URIs."}}}},mentionRule:{type:"object",description:"Allow replies from actors mentioned in your post.",properties:{}},followerRule:{type:"object",description:"Allow replies from actors who follow you.",properties:{}},followingRule:{type:"object",description:"Allow replies from actors you follow.",properties:{}},listRule:{type:"object",description:"Allow replies from actors on a list.",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}},AppBskyGraphBlock:{lexicon:1,id:"app.bsky.graph.block",defs:{main:{type:"record",description:"Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"did",description:"DID of the account to be blocked."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphDefs:{lexicon:1,id:"app.bsky.graph.defs",defs:{listViewBasic:{type:"object",required:["uri","cid","name","purpose"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},name:{type:"string",maxLength:64,minLength:1},purpose:{type:"ref",ref:"lex:app.bsky.graph.defs#listPurpose"},avatar:{type:"string",format:"uri"},listItemCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewerState"},indexedAt:{type:"string",format:"datetime"}}},listView:{type:"object",required:["uri","cid","creator","name","purpose","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},name:{type:"string",maxLength:64,minLength:1},purpose:{type:"ref",ref:"lex:app.bsky.graph.defs#listPurpose"},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"string",format:"uri"},listItemCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewerState"},indexedAt:{type:"string",format:"datetime"}}},listItemView:{type:"object",required:["uri","subject"],properties:{uri:{type:"string",format:"at-uri"},subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}},starterPackView:{type:"object",required:["uri","cid","record","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},list:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},listItemsSample:{type:"array",maxLength:12,items:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}},feeds:{type:"array",maxLength:3,items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}},joinedWeekCount:{type:"integer",minimum:0},joinedAllTimeCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"}}},starterPackViewBasic:{type:"object",required:["uri","cid","record","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},listItemCount:{type:"integer",minimum:0},joinedWeekCount:{type:"integer",minimum:0},joinedAllTimeCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"}}},listPurpose:{type:"string",knownValues:["app.bsky.graph.defs#modlist","app.bsky.graph.defs#curatelist","app.bsky.graph.defs#referencelist"]},modlist:{type:"token",description:"A list of actors to apply an aggregate moderation action (mute/block) on."},curatelist:{type:"token",description:"A list of actors used for curation purposes such as list feeds or interaction gating."},referencelist:{type:"token",description:"A list of actors used for only for reference purposes such as within a starter pack."},listViewerState:{type:"object",properties:{muted:{type:"boolean"},blocked:{type:"string",format:"at-uri"}}},notFoundActor:{type:"object",description:"indicates that a handle or DID could not be resolved",required:["actor","notFound"],properties:{actor:{type:"string",format:"at-identifier"},notFound:{type:"boolean",const:!0}}},relationship:{type:"object",description:"lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)",required:["did"],properties:{did:{type:"string",format:"did"},following:{type:"string",format:"at-uri",description:"if the actor follows this DID, this is the AT-URI of the follow record"},followedBy:{type:"string",format:"at-uri",description:"if the actor is followed by this DID, contains the AT-URI of the follow record"}}}}},AppBskyGraphFollow:{lexicon:1,id:"app.bsky.graph.follow",defs:{main:{type:"record",description:"Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphGetActorStarterPacks:{lexicon:1,id:"app.bsky.graph.getActorStarterPacks",defs:{main:{type:"query",description:"Get a list of starter packs created by the actor.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphGetBlocks:{lexicon:1,id:"app.bsky.graph.getBlocks",defs:{main:{type:"query",description:"Enumerates which accounts the requesting account is currently blocking. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["blocks"],properties:{cursor:{type:"string"},blocks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetFollowers:{lexicon:1,id:"app.bsky.graph.getFollowers",defs:{main:{type:"query",description:"Enumerates accounts which follow a specified account (
2actor).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","followers"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},followers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetFollows:{lexicon:1,id:"app.bsky.graph.getFollows",defs:{main:{type:"query",description:"Enumerates accounts which a specified account (actor) follows.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","follows"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},follows:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetKnownFollowers:{lexicon:1,id:"app.bsky.graph.getKnownFollowers",defs:{main:{type:"query",description:"Enumerates accounts which follow a specified account (actor) and are followed by the viewer.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","followers"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},followers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetList:{lexicon:1,id:"app.bsky.graph.getList",defs:{main:{type:"query",description:"Gets a 'view' (with additional context) of a specified list.",parameters:{type:"params",required:["list"],properties:{list:{type:"string",format:"at-uri",description:"Reference (AT-URI) of the list record to hydrate."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["list","items"],properties:{cursor:{type:"string"},list:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"},items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}}}}}}}},AppBskyGraphGetListBlocks:{lexicon:1,id:"app.bsky.graph.getListBlocks",defs:{main:{type:"query",description:"Get mod lists that the requesting account (actor) is blocking. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetListMutes:{lexicon:1,id:"app.bsky.graph.getListMutes",defs:{main:{type:"query",description:"Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetLists:{lexicon:1,id:"app.bsky.graph.getLists",defs:{main:{type:"query",description:"Enumerates the lists created by a specified account (actor).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"The account (actor) to enumerate lists from."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},purposes:{type:"array",description:"Optional filter by list purpose. If not specified, all supported types are returned.",items:{type:"string",knownValues:["modlist","curatelist"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetListsWithMembership:{lexicon:1,id:"app.bsky.graph.getListsWithMembership",defs:{main:{type:"query",description:"Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"The account (
2actor) to check for membership."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},purposes:{type:"array",description:"Optional filter by list purpose. If not specified, all supported types are returned.",items:{type:"string",knownValues:["modlist","curatelist"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["listsWithMembership"],properties:{cursor:{type:"string"},listsWithMembership:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.getListsWithMembership#listWithMembership"}}}}}},listWithMembership:{description:"A list and an optional list item indicating membership of a target user to that list.",type:"object",required:["list"],properties:{list:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"},listItem:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}}}}},AppBskyGraphGetMutes:{lexicon:1,id:"app.bsky.graph.getMutes",defs:{main:{type:"query",description:"Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["mutes"],properties:{cursor:{type:"string"},mutes:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetRelationships:{lexicon:1,id:"app.bsky.graph.getRelationships",defs:{main:{type:"query",description:"Enumerates public relationships between one account, and a list of other accounts. Does not require auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"Primary account requesting relationships for."},others:{type:"array",description:"List of 'other' accounts to be related back to the primary.",maxLength:30,items:{type:"string",format:"at-identifier"}}}},output:{encoding:"application/json",schema:{type:"object",required:["relationships"],properties:{actor:{type:"string",format:"did"},relationships:{type:"array",items:{type:"union",refs:["lex:app.bsky.graph.defs#relationship","lex:app.bsky.graph.defs#notFoundActor"]}}}}},errors:[{name:"ActorNotFound",description:"the primary actor at-identifier could not be resolved"}]}}},AppBskyGraphGetStarterPack:{lexicon:1,id:"app.bsky.graph.getStarterPack",defs:{main:{type:"query",description:"Gets a view of a starter pack.",parameters:{type:"params",required:["starterPack"],properties:{starterPack:{type:"string",format:"at-uri",description:"Reference (AT-URI) of the starter pack record."}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPack"],properties:{starterPack:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"}}}}}}},AppBskyGraphGetStarterPacks:{lexicon:1,id:"app.bsky.graph.getStarterPacks",defs:{main:{type:"query",description:"Get views for a list of starter packs.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",items:{type:"string",format:"at-uri"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphGetStarterPacksWithMembership:{lexicon:1,id:"app.bsky.graph.getStarterPacksWithMembership",defs:{main:{type:"query",description:"Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"The account (actor) to check for membership."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacksWithMembership"],properties:{cursor:{type:"string"},starterPacksWithMembership:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.getStarterPacksWithMembership#starterPackWithMembership"}}}}}},starterPackWithMembership:{description:"A starter pack and an optional list item indicating membership of a target user to that starter pack.",type:"object",required:["starterPack"],properties:{starterPack:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"},listItem:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}}}}},AppBskyGraphGetSuggestedFollowsByActor:{lexicon:1,id:"app.bsky.graph.getSuggestedFollowsByActor",defs:{main:{type:"query",description:"Enumerates follows similar to a given account (
2actor). Expected use is to recommend additional accounts immediately after following one account.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}},output:{encoding:"application/json",schema:{type:"object",required:["suggestions"],properties:{suggestions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},isFallback:{type:"boolean",description:"If true, response has fallen-back to generic results, and is not scoped using relativeToDid",default:!1},recId:{type:"integer",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyGraphList:{lexicon:1,id:"app.bsky.graph.list",defs:{main:{type:"record",description:"Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists.",key:"tid",record:{type:"object",required:["name","purpose","createdAt"],properties:{purpose:{type:"ref",description:"Defines the purpose of the list (aka, moderation-oriented or curration-oriented)",ref:"lex:app.bsky.graph.defs#listPurpose"},name:{type:"string",maxLength:64,minLength:1,description:"Display name for list; can not be empty."},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"blob",accept:["image/png","image/jpeg"],maxSize:1e6},labels:{type:"union",refs:["lex:com.atproto.label.defs#selfLabels"]},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphListblock:{lexicon:1,id:"app.bsky.graph.listblock",defs:{main:{type:"record",description:"Record representing a block relationship against an entire an entire list of accounts (actors).",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the mod list record."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphListitem:{lexicon:1,id:"app.bsky.graph.listitem",defs:{main:{type:"record",description:"Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records.",key:"tid",record:{type:"object",required:["subject","list","createdAt"],properties:{subject:{type:"string",format:"did",description:"The account which is included on the list."},list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record (app.bsky.graph.list)."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphMuteActor:{lexicon:1,id:"app.bsky.graph.muteActor",defs:{main:{type:"procedure",description:"Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}}}}}},AppBskyGraphMuteActorList:{lexicon:1,id:"app.bsky.graph.muteActorList",defs:{main:{type:"procedure",description:"Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphMuteThread:{lexicon:1,id:"app.bsky.graph.muteThread",defs:{main:{type:"procedure",description:"Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphSearchStarterPacks:{lexicon:1,id:"app.bsky.graph.searchStarterPacks",defs:{main:{type:"query",description:"Find starter packs matching search criteria. Does not require auth.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string. Syntax, phrase, boolean, and facet
2ing is unspecified, but Lucene query syntax is recommended."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphStarterpack:{lexicon:1,id:"app.bsky.graph.starterpack",defs:{main:{type:"record",description:"Record defining a starter pack of actors and feeds for new users.",key:"tid",record:{type:"object",required:["name","list","createdAt"],properties:{name:{type:"string",maxGraphemes:50,maxLength:500,minLength:1,description:"Display name for starter pack; can not be empty."},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record."},feeds:{type:"array",maxLength:3,items:{type:"ref",ref:"lex:app.bsky.graph.starterpack#feedItem"}},createdAt:{type:"string",format:"datetime"}}}},feedItem:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}}}},AppBskyGraphUnmuteActor:{lexicon:1,id:"app.bsky.graph.unmuteActor",defs:{main:{type:"procedure",description:"Unmutes the specified account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}}}}}},AppBskyGraphUnmuteActorList:{lexicon:1,id:"app.bsky.graph.unmuteActorList",defs:{main:{type:"procedure",description:"Unmutes the specified list of accounts. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphUnmuteThread:{lexicon:1,id:"app.bsky.graph.unmuteThread",defs:{main:{type:"procedure",description:"Unmutes the specified thread. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphVerification:{lexicon:1,id:"app.bsky.graph.verification",defs:{main:{type:"record",description:"Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted.",key:"tid",record:{type:"object",required:["subject","handle","displayName","createdAt"],properties:{subject:{description:"DID of the subject the verification applies to.",type:"string",format:"did"},handle:{description:"Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.",type:"string",format:"handle"},displayName:{description:"Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.",type:"string"},createdAt:{description:"Date of when the verification was created.",type:"string",format:"datetime"}}}}}},AppBskyLabelerDefs:{lexicon:1,id:"app.bsky.labeler.defs",defs:{labelerView:{type:"object",required:["uri","cid","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},likeCount:{type:"integer",minimum:0},viewer:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerViewerState"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}},labelerViewDetailed:{type:"object",required:["uri","cid","creator","policies","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},policies:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerPolicies"},likeCount:{type:"integer",minimum:0},viewer:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerViewerState"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},reasonTypes:{description:"The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}},subjectTypes:{description:"The set of subject types (account, record, etc) this
2service accepts reports on.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"}},subjectCollections:{type:"array",description:"Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.",items:{type:"string",format:"nsid"}}}},labelerViewerState:{type:"object",properties:{like:{type:"string",format:"at-uri"}}},labelerPolicies:{type:"object",required:["labelValues"],properties:{labelValues:{type:"array",description:"The label values which this labeler publishes. May include global or custom labels.",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValue"}},labelValueDefinitions:{type:"array",description:"Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValueDefinition"}}}}}},AppBskyLabelerGetServices:{lexicon:1,id:"app.bsky.labeler.getServices",defs:{main:{type:"query",description:"Get information about a list of labeler services.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}},detailed:{type:"boolean",default:!1}}},output:{encoding:"application/json",schema:{type:"object",required:["views"],properties:{views:{type:"array",items:{type:"union",refs:["lex:app.bsky.labeler.defs#labelerView","lex:app.bsky.labeler.defs#labelerViewDetailed"]}}}}}}}},AppBskyLabelerService:{lexicon:1,id:"app.bsky.labeler.service",defs:{main:{type:"record",description:"A declaration of the existence of labeler service.",key:"literal:self",record:{type:"object",required:["policies","createdAt"],properties:{policies:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerPolicies"},labels:{type:"union",refs:["lex:com.atproto.label.defs#selfLabels"]},createdAt:{type:"string",format:"datetime"},reasonTypes:{description:"The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}},subjectTypes:{description:"The set of subject types (account, record, etc) this service accepts reports on.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"}},subjectCollections:{type:"array",description:"Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.",items:{type:"string",format:"nsid"}}}}}}},AppBskyNotificationDeclaration:{lexicon:1,id:"app.bsky.notification.declaration",defs:{main:{type:"record",description:"A declaration of the user's choices related to notifications that can be produced by them.",key:"literal:self",record:{type:"object",required:["allowSubscriptions"],properties:{allowSubscriptions:{type:"string",description:"A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'.",knownValues:["followers","mutuals","none"]}}}}}},AppBskyNotificationDefs:{lexicon:1,id:"app.bsky.notification.defs",defs:{recordDeleted:{type:"object",properties:{}},chatPreference:{type:"object",required:["include","push"],properties:{include:{type:"string",knownValues:["all","accepted"]},push:{type:"boolean"}}},filterablePreference:{type:"object",required:["include","list","push"],properties:{include:{type:"string",knownValues:["all","follows"]},list:{type:"boolean"},push:{type:"boolean"}}},preference:{type:"object",required:["list","push"],properties:{list:{type:"boolean"},push:{type:"boolean"}}},preferences:{type:"object",required:["chat","follow","like","likeViaRepost","mention","quote","reply","repost","repostViaRepost","starterpackJoined","subscribedPost","unverified","verified"],properties:{chat:{type:"ref",ref:"lex:app.bsky.notification.defs#chatPreference"},follow:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},like:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},likeViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},mention:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},quote:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},reply:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repostViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},starterpackJoined:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},subscribedPost:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},unverified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},verified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"}}},activitySubscription:{type:"object",required:["post","reply"],properties:{post:{type:"boolean"},reply:{type:"boolean"}}}
2,subjectActivitySubscription:{description:"Object used to store activity subscription data in stash.",type:"object",required:["subject","activitySubscription"],properties:{subject:{type:"string",format:"did"},activitySubscription:{type:"ref",ref:"lex:app.bsky.notification.defs#activitySubscription"}}}}},AppBskyNotificationGetPreferences:{lexicon:1,id:"app.bsky.notification.getPreferences",defs:{main:{type:"query",description:"Get notification-related preferences for an account. Requires auth.",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.notification.defs#preferences"}}}}}}},AppBskyNotificationGetUnreadCount:{lexicon:1,id:"app.bsky.notification.getUnreadCount",defs:{main:{type:"query",description:"Count the number of unread notifications for the requesting account. Requires auth.",parameters:{type:"params",properties:{priority:{type:"boolean"},seenAt:{type:"string",format:"datetime"}}},output:{encoding:"application/json",schema:{type:"object",required:["count"],properties:{count:{type:"integer"}}}}}}},AppBskyNotificationListActivitySubscriptions:{lexicon:1,id:"app.bsky.notification.listActivitySubscriptions",defs:{main:{type:"query",description:"Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subscriptions"],properties:{cursor:{type:"string"},subscriptions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyNotificationListNotifications:{lexicon:1,id:"app.bsky.notification.listNotifications",defs:{main:{type:"query",description:"Enumerate notifications for the requesting account. Requires auth.",parameters:{type:"params",properties:{reasons:{description:"Notification reasons to include in response.",type:"array",items:{type:"string",description:"A reason that matches the reason property of #notification."}},limit:{type:"integer",minimum:1,maximum:100,default:50},priority:{type:"boolean"},cursor:{type:"string"},seenAt:{type:"string",format:"datetime"}}},output:{encoding:"application/json",schema:{type:"object",required:["notifications"],properties:{cursor:{type:"string"},notifications:{type:"array",items:{type:"ref",ref:"lex:app.bsky.notification.listNotifications#notification"}},priority:{type:"boolean"},seenAt:{type:"string",format:"datetime"}}}}},notification:{type:"object",required:["uri","cid","author","reason","record","isRead","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},reason:{type:"string",description:"The reason why this notification was delivered - e.g. your post was liked, or you received a new follower.",knownValues:["like","repost","follow","mention","reply","quote","starterpack-joined","verified","unverified","like-via-repost","repost-via-repost","subscribed-post"]},reasonSubject:{type:"string",format:"at-uri"},record:{type:"unknown"},isRead:{type:"boolean"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}},AppBskyNotificationPutActivitySubscription:{lexicon:1,id:"app.bsky.notification.putActivitySubscription",defs:{main:{type:"procedure",description:"Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["subject","activitySubscription"],properties:{subject:{type:"string",format:"did"},activitySubscription:{type:"ref",ref:"lex:app.bsky.notification.defs#activitySubscription"}}}},output:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"string",format:"did"},activitySubscription:{type:"ref",ref:"lex:app.bsky.notification.defs#activitySubscription"}}}}}}},AppBskyNotificationPutPreferences:{lexicon:1,id:"app.bsky.notification.putPreferences",defs:{main:{type:"procedure",description:"Set notification-related preferences for an account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["priority"],properties:{priority:{type:"boolean"}}}}}}},AppBskyNotificationPutPreferencesV2:{lexicon:1,id:"app.bsky.notification.putPreferencesV2",defs:{main:{type:"procedure",description:"Set notification-related preferences for an account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",properties:{chat:{type:"ref",ref:"lex:app.bsky.notification.defs#chatPreference"},follow:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},like:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},likeViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},mention:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},quote:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},reply:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repostViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},starterpackJoined:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},subscribedPost:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},unverified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},verified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"}}}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.notification.defs#preferences"}}}}}}},AppBskyNotificationRegisterPush:{lexicon:1,id:"app.bsky.notification.registerPush",defs:{main:{type:"procedure",description:"Register to receive push notifications, via a specified service, for the requesting account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["serviceDid","token","platform","appId"],properties:{serviceDid:{type:"string",format:"did"},token:{type:"string"},platform:{type:"string",knownValues:["ios","android","web"]},appId:{type:"string"},ageRestricted:{type:"boolean",description:"Set to true when the actor is age restricted"}}}}}}},AppBskyNotificationUnregisterPush:{lexicon:1,id:"app.bsky.notification.unregisterPush",defs:{main:{type:"procedure",description:"The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["serviceDid","token","platform","appId"],properties:{serviceDid:{type:"string",format:"did"},token:{type:"string"},platform:{type:"string",knownValues:["ios","android","web"]},appId:{type:"string"}}}}}}},AppBskyNotificationUpdateSeen:{lexicon:1,id:"app.bsky.notification.updateSeen",defs:{main:{type:"procedure",description:"Notify server that the requesting account has seen notifications. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["seenAt"],properties:{seenAt:{type:"string",format:"datetime"}}}}}}},AppBskyRichtextFacet:{lexicon:1,id:"app.bsky.richtext.facet",def
2s:{main:{type:"object",description:"Annotation of a sub-string within rich text.",required:["index","features"],properties:{index:{type:"ref",ref:"lex:app.bsky.richtext.facet#byteSlice"},features:{type:"array",items:{type:"union",refs:["lex:app.bsky.richtext.facet#mention","lex:app.bsky.richtext.facet#link","lex:app.bsky.richtext.facet#tag"]}}}},mention:{type:"object",description:"Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.",required:["did"],properties:{did:{type:"string",format:"did"}}},link:{type:"object",description:"Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.",required:["uri"],properties:{uri:{type:"string",format:"uri"}}},tag:{type:"object",description:"Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').",required:["tag"],properties:{tag:{type:"string",maxLength:640,maxGraphemes:64}}},byteSlice:{type:"object",description:"Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.",required:["byteStart","byteEnd"],properties:{byteStart:{type:"integer",minimum:0},byteEnd:{type:"integer",minimum:0}}}}},AppBskyUnspeccedDefs:{lexicon:1,id:"app.bsky.unspecced.defs",defs:{skeletonSearchPost:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},skeletonSearchActor:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},skeletonSearchStarterPack:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},trendingTopic:{type:"object",required:["topic","link"],properties:{topic:{type:"string"},displayName:{type:"string"},description:{type:"string"},link:{type:"string"}}},skeletonTrend:{type:"object",required:["topic","displayName","link","startedAt","postCount","dids"],properties:{topic:{type:"string"},displayName:{type:"string"},link:{type:"string"},startedAt:{type:"string",format:"datetime"},postCount:{type:"integer"},status:{type:"string",knownValues:["hot"]},category:{type:"string"},dids:{type:"array",items:{type:"string",format:"did"}}}},trendView:{type:"object",required:["topic","displayName","link","startedAt","postCount","actors"],properties:{topic:{type:"string"},displayName:{type:"string"},link:{type:"string"},startedAt:{type:"string",format:"datetime"},postCount:{type:"integer"},status:{type:"string",knownValues:["hot"]},category:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}},threadItemPost:{type:"object",required:["post","moreParents","moreReplies","opThread","hiddenByThreadgate","mutedByViewer"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},moreParents:{type:"boolean",description:"This post has more parents that were not present in the response. This is just a boolean, without the number of parents."},moreReplies:{type:"integer",description:"This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate."},opThread:{type:"boolean",description:"This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread."},hiddenByThreadgate:{type:"boolean",description:"The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread."},mutedByViewer:{type:"boolean",description:"This is by an account muted by the viewer requesting it."}}},threadItemNoUnauthenticated:{type:"object",properties:{}},threadItemNotFound:{type:"object",properties:{}},threadItemBlocked:{type:"object",required:["author"],properties:{author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}},ageAssuranceState:{type:"object",description:"The computed state of the age assurance process, returned to the user in question on certain authenticated requests.",required:["status"],properties:{lastInitiatedAt:{type:"string",format:"datetime",description:"The timestamp when this
2state was last updated."},status:{type:"string",description:"The status of the age assurance process.",knownValues:["unknown","pending","assured","blocked"]}}},ageAssuranceEvent:{type:"object",description:"Object used to store age assurance data in stash.",required:["createdAt","status","attemptId"],properties:{createdAt:{type:"string",format:"datetime",description:"The date and time of this write operation."},status:{type:"string",description:"The status of the age assurance process.",knownValues:["unknown","pending","assured"]},attemptId:{type:"string",description:"The unique identifier for this instance of the age assurance flow, in UUID format."},email:{type:"string",description:"The email used for AA."},initIp:{type:"string",description:"The IP address used when initiating the AA flow."},initUa:{type:"string",description:"The user agent used when initiating the AA flow."},completeIp:{type:"string",description:"The IP address used when completing the AA flow."},completeUa:{type:"string",description:"The user agent used when completing the AA flow."}}}}},AppBskyUnspeccedGetAgeAssuranceState:{lexicon:1,id:"app.bsky.unspecced.getAgeAssuranceState",defs:{main:{type:"query",description:"Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required.",output:{encoding:"application/json",schema:{type:"ref",ref:"lex:app.bsky.unspecced.defs#ageAssuranceState"}}}}},AppBskyUnspeccedGetConfig:{lexicon:1,id:"app.bsky.unspecced.getConfig",defs:{main:{type:"query",description:"Get miscellaneous runtime configuration.",output:{encoding:"application/json",schema:{type:"object",required:[],properties:{checkEmailConfirmed:{type:"boolean"},liveNow:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.getConfig#liveNowConfig"}}}}}},liveNowConfig:{type:"object",required:["did","domains"],properties:{did:{type:"string",format:"did"},domains:{type:"array",items:{type:"string"}}}}}},AppBskyUnspeccedGetOnboardingSuggestedStarterPacks:{lexicon:1,id:"app.bsky.unspecced.getOnboardingSuggestedStarterPacks",defs:{main:{type:"query",description:"Get a list of suggested starterpacks for onboarding",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"}}}}}}}},AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton:{lexicon:1,id:"app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"string",format:"at-uri"}}}}}}}},AppBskyUnspeccedGetPopularFeedGenerators:{lexicon:1,id:"app.bsky.unspecced.getPopularFeedGenerators",defs:{main:{type:"query",description:"An unspecced view of globally popular feed generators.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},query:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyUnspeccedGetPostThreadOtherV2:{lexicon:1,id:"app.bsky.unspecced.getPostThreadOtherV2",defs:{main:{type:"query",description:"(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anch
2or itself. This should be called after exhausting `app.bsky.unspecced.getPostThreadV2`. Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["anchor"],properties:{anchor:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record. This is the anchor post."},prioritizeFollowedUsers:{type:"boolean",description:"Whether to prioritize posts from followed users. It only has effect when the user is authenticated.",default:!1}}},output:{encoding:"application/json",schema:{type:"object",required:["thread"],properties:{thread:{type:"array",description:"A flat list of other thread items. The depth of each item is indicated by the depth property inside the item.",items:{type:"ref",ref:"lex:app.bsky.unspecced.getPostThreadOtherV2#threadItem"}}}}}},threadItem:{type:"object",required:["uri","depth","value"],properties:{uri:{type:"string",format:"at-uri"},depth:{type:"integer",description:"The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths."},value:{type:"union",refs:["lex:app.bsky.unspecced.defs#threadItemPost"]}}}}},AppBskyUnspeccedGetPostThreadV2:{lexicon:1,id:"app.bsky.unspecced.getPostThreadV2",defs:{main:{type:"query",description:"(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["anchor"],properties:{anchor:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post."},above:{type:"boolean",description:"Whether to include parents above the anchor.",default:!0},below:{type:"integer",description:"How many levels of replies to include below the anchor.",default:6,minimum:0,maximum:20},branchingFactor:{type:"integer",description:"Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated).",default:10,minimum:0,maximum:100},prioritizeFollowedUsers:{type:"boolean",description:"Whether to prioritize posts from followed users. It only has effect when the user is authenticated.",default:!1},sort:{type:"string",description:"Sorting for the thread replies.",knownValues:["newest","oldest","top"],default:"oldest"}}},output:{encoding:"application/json",schema:{type:"object",required:["thread","hasOtherReplies"],properties:{thread:{type:"array",description:"A flat list of thread items. The depth of each item is indicated by the depth property inside the item.",items:{type:"ref",ref:"lex:app.bsky.unspecced.getPostThreadV2#threadItem"}},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"},hasOtherReplies:{type:"boolean",description:"Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them."}}}}},threadItem:{type:"object",required:["uri","depth","value"],properties:{uri:{type:"string",format:"at-uri"},depth:{type:"integer",description:"The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths."},value:{type:"union",refs:["lex:app.bsky.unspecced.defs#threadItemPost","lex:app.bsky.unspecced.defs#threadItemNoUnauthenticated","lex:app.bsky.unspecced.defs#threadItemNotFound","lex:app.bsky.unspecced.defs#threadItemBlocked"]}}}}},AppBskyUnspeccedGetSuggestedFeeds:{lexicon:1,id:"app.bsky.unspecced.getSuggestedFeeds",defs:{main:{type:"query",description:"Get a list of suggested feeds",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyUnspeccedGetSuggestedFeedsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedFeedsSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"string",format:"at-uri"}}}}}}}},AppBskyUnspeccedGetSuggestedStarterPacks:{lexicon:1,id:"app.bsky.unspecced.getSuggestedStarterPacks",defs:{main:{type:"query",description:"Get a list of suggested starterpacks",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"}}}}}}}},AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedStarterPacksSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"string",format:"at-uri"}}}}}}}},AppBskyUnspeccedGetSuggestedUsers:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsers",defs:{main:{type:"query",description:"Get a list of suggested users",parameters:{type:"params",properties:{category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyUnspeccedGetSuggestedUsersSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsersSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}}}}}}}},AppBskyUnspeccedGetSuggestionsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestionsSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},relativeToDid:{type:"string",format:"did",description:"DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer."}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchActor"}},relativeToDid:{type:"string",format:"did",description:"DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer."},recId:{type:"integer",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetTaggedSuggestions:{lexicon:1,id:"app.bsky.unspecced.getTaggedSuggestions",defs:{main:{type:"query",description:"Get a list of suggestions (feeds and users) tagged with categories",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["suggestions"],properties:{suggestions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.getTaggedSuggestions#suggestion"}}}}}},suggestion:{type:"object",required:["tag","subjectType","subject"],properties:{tag:{type:"string"},subjectType:{type:"string",knownValues:["actor","feed"]},subject:{type:"string",format:"uri"}}}}},AppBskyUnspeccedGetTrendingTopics:{lexicon:1,id:"app.bsky.unspecced.getTrendingTopics",defs:{main:{type:"query",description:"Get a list of trending topics",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["topics","suggested"],properties:{topics:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendingTopic"}},suggested:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendingTopic"}}}}}}}},AppBskyUnspeccedGetTrends:{lexicon:1,id:"app.bsky.unspecced.getTrends",defs:{main:{type:"query",description:"Get the current trends on the network",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["trends"],properties:{trends:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendView"}}}}}}}},AppBskyUnspeccedGetTrendsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getTrendsSkeleton",defs:{main:{type:"query",description:"Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["trends"],properties:{trends:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonTrend"}}}}}}}},AppBskyUnspeccedInitAgeAssurance:{lexicon:1,id:"app.bsky.unspecced.initAgeAssurance",def
2s:{main:{type:"procedure",description:"Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age.",input:{encoding:"application/json",schema:{type:"object",required:["email","language","countryCode"],properties:{email:{type:"string",description:"The user's email address to receive assurance instructions."},language:{type:"string",description:"The user's preferred language for communication during the assurance process."},countryCode:{type:"string",description:"An ISO 3166-1 alpha-2 code of the user's location."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:app.bsky.unspecced.defs#ageAssuranceState"}},errors:[{name:"InvalidEmail"},{name:"DidTooLong"},{name:"InvalidInitiation"}]}}},AppBskyUnspeccedSearchActorsSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchActorsSkeleton",defs:{main:{type:"query",description:"Backend Actors (profile) search, returns only skeleton.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string;
2 syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},typeahead:{type:"boolean",description:"If true, acts as fast/simple 'typeahead' query."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchActor"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyUnspeccedSearchPostsSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchPostsSkeleton",defs:{main:{type:"query",description:"Backend Posts search, returns only skeleton",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string;
2 syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},sort:{type:"string",knownValues:["top","latest"],default:"latest",description:"Specifies the ranking order of results."},since:{type:"string",description:"Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)."},until:{type:"string",description:"Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)."},mentions:{type:"string",format:"at-identifier",description:"Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions."},author:{type:"string",format:"at-identifier",description:"Filter to posts by the given account. Handles are resolved to DID before query-time."},lang:{type:"string",format:"language",description:"Filter to posts in the given language. Expected to be based on post language field, though server may override language detection."},domain:{type:"string",description:"Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization."},url:{type:"string",format:"uri",description:"Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching."},tag:{type:"array",items:{type:"string",maxLength:640,maxGraphemes:64},description:"Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchPost"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyUnspeccedSearchStarterPacksSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchStarterPacksSkeleton",defs:{main:{type:"query",description:"Backend Starter Pack search, returns only skeleton.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string;
2 syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchStarterPack"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyVideoDefs:{lexicon:1,id:"app.bsky.video.defs",defs:{jobStatus:{type:"object",required:["jobId","did","state"],properties:{jobId:{type:"string"},did:{type:"string",format:"did"},state:{type:"string",description:"The state of the video processing job. All values not listed as a known value indicate that the job is in process.",knownValues:["JOB_STATE_COMPLETED","JOB_STATE_FAILED"]},progress:{type:"integer",minimum:0,maximum:100,description:"Progress within the current processing state."},blob:{type:"blob"},error:{type:"string"},message:{type:"string"}}}}},AppBskyVideoGetJobStatus:{lexicon:1,id:"app.bsky.video.getJobStatus",defs:{main:{type:"query",description:"Get status details for a video processing job.",parameters:{type:"params",required:["jobId"],properties:{jobId:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["jobStatus"],properties:{jobStatus:{type:"ref",ref:"lex:app.bsky.video.defs#jobStatus"}}}}}}},AppBskyVideoGetUploadLimits:{lexicon:1,id:"app.bsky.video.getUploadLimits",defs:{main:{type:"query",description:"Get video upload limits for the authenticated user.",output:{encoding:"application/json",schema:{type:"object",required:["canUpload"],properties:{canUpload:{type:"boolean"},remainingDailyVideos:{type:"integer"},remainingDailyBytes:{type:"integer"},message:{type:"string"},error:{type:"string"}}}}}}},AppBskyVideoUploadVideo:{lexicon:1,id:"app.bsky.video.uploadVideo",defs:{main:{type:"procedure",description:"Upload a video to be processed then stored on the PDS.",input:{encoding:"video/mp4"},output:{encoding:"application/json",schema:{type:"object",required:["jobStatus"],properties:{jobStatus:{type:"ref",ref:"lex:app.bsky.video.defs#jobStatus"}}}}}}},ChatBskyActorDeclaration:{lexicon:1,id:"chat.bsky.actor.declaration",defs:{main:{type:"record",description:"A declaration of a Bluesky chat account.",key:"literal:self",record:{type:"object",required:["allowIncoming"],properties:{allowIncoming:{type:"string",knownValues:["all","none","following"]}}}}}},ChatBskyActorDefs:{lexicon:1,id:"chat.bsky.actor.defs",defs:{profileViewBasic:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},chatDisabled:{type:"boolean",description:"Set to true when the actor cannot actively participate in conversations"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"}}}}},ChatBskyActorDeleteAccount:{lexicon:1,id:"chat.bsky.actor.deleteAccount",defs:{main:{type:"procedure",output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ChatBskyActorExportAccountData:{lexicon:1,id:"chat.bsky.actor.exportAccountData",defs:{main:{type:"query",output:{encoding:"application/jsonl"}}}},ChatBskyConvoAcceptConvo:{lexicon:1,id:"chat.bsky.convo.acceptConvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{rev:{description:"Rev when the convo was accepted. If not present, the convo was already accepted.",type:"string"}}}}}}},ChatBskyConvoAddReaction:{lexicon:1,id:"chat.bsky.convo.addReaction",defs:{main:{type:"procedure",description:"Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction.",input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId","value"],properties:{convoId:{type:"string"},messageId:{type:"string"},value:{type:"string",minLength:1,maxLength:64,minGraphemes:1,maxGraphemes:1}}}},output:{encoding:"application/json",schema:{type:"object",required:["message"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}},errors:[{name:"ReactionMessageDeleted",description:"Indicates that the message has been deleted and reactions can no longer be added/removed."},{name:"ReactionLimitReached",description:"Indicates that the message has the maximum number of reactions allowed for a single user, and the requested reaction wasn't yet present. If it was already present, the request will not fail since it is idempotent."},{name:"ReactionInvalidValue",description:"Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji."}]}}},ChatBskyConvoDefs:{lexicon:1,id:"chat.bsky.convo.defs",defs:{messageRef:{type:"object",required:["did","messageId","convoId"],properties:{did:{type:"string",format:"did"},convoId:{type:"string"},messageId:{type:"string"}}},messageInput:{type:"object",required:["text"],properties:{text:{type:"string",maxLength:1e4,maxGraphemes:1e3},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},embed:{type:"union",refs:["lex:app.bsky.embed.record"]}}},messageView:{type:"object",required:["id","rev","text","sender","sentAt"],properties:{id:{type:"string"},rev:{type:"string"},text:{type:"string",maxLength:1e4,maxGraphemes:1e3},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},embed:{type:"union",refs:["lex:app.bsky.embed.record#view"]},reactions:{type:"array",description:"Reactions to this message, in ascending order of creation time.",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageViewSender"},sentAt:{type:"string",format:"datetime"}}},deletedMessageView:{type:"object",required:["id","rev","sender","sentAt"],properties:{id:{type:"string"},rev:{type:"string"},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageViewSender"},sentAt:{type:"string",format:"datetime"}}},messageViewSender:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},reactionView:{type:"object",required:["value","sender","createdAt"],properties:{value:{type:"string"},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionViewSender"},createdAt:{type:"string",format:"datetime"}}},reactionViewSender:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},messageAndReactionView:{type:"object",required:["message","reaction"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}}},convoView:{type:"object",required:["id","rev","members","muted","unreadCount"],properties:{id:{type:"string"},rev:{type:"string"},members:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}},lastMessage:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},lastReaction:{type:"union",refs:["lex:chat.bsky.convo.defs#messageAndReactionView"]},muted:{type:"boolean"},status:{type:"string",knownValues:["request","accepted"]},unreadCount:{type:"integer"}}},logBeginConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logAcceptConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logLeaveConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logMuteConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logUnmuteConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logCreateMessage:{type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}},logDeleteMessage:{type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}},logReadMessage:{type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}},logAddReaction:{type:"object",required:["rev","convoId","message","reaction"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}}},logRemoveReaction:{type:"object",required:["rev","convoId","message","reaction"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}}}}},ChatBskyConvoDeleteMessageForSelf:{lexicon:1,id:"chat.bsky.convo.deleteMessageForSelf",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId"],properties:{convoId:{type:"string"},messageId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:chat.bsky.convo.defs#deletedMessageView"}}}}},ChatBskyConvoGetConvo:{lexicon:1,id:"chat.bsky.convo.getConvo",defs:{main:{type:"query",parameters:{type:"params",required:["convoId"],properties:{convoId:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoGetConvoAvailability:{lexicon:1,id:"chat.bsky.convo.getConvoAvailability",defs:{main:{type:"query",description:"Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.",parameters:{type:"params",required:["members"],properties:{members:{type:"array",minLength:1,maxLength:10,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["canChat"],properties:{canChat:{type:"boolean"},convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoGetConvoForMembers:{lexicon:1,id:"chat.bsky.convo.getConvoForMembers",defs:{main:{type:"query",parameters:{type:"params",required:["members"],properties:{members:{type:"array",minLength:1,maxLength:10,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoGetLog:{lexicon:1,id:"chat.bsky.convo.getLog",defs:{main:{type:"query",parameters:{type:"params",required:[],properties:{cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["logs"],properties:{cursor:{type:"string"},logs:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#logBeginConvo","lex:chat.bsky.convo.defs#logAcceptConvo","lex:chat.bsky.convo.defs#logLeaveConvo","lex:chat.bsky.convo.defs#logMuteConvo","lex:chat.bsky.convo.defs#logUnmuteConvo","lex:chat.bsky.convo.defs#logCreateMessage","lex:chat.bsky.convo.defs#logDeleteMessage","lex:chat.bsky.convo.defs#logReadMessage","lex:chat.bsky.convo.defs#logAddReaction","lex:chat.bsky.convo.defs#logRemoveReaction"]}}}}}}}},ChatBskyConvoGetMessages:{lexicon:1,id:"chat.bsky.convo.getMessages",defs:{main:{type:"query",parameters:{type:"params",required:["convoId"],properties:{convoId:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["messages"],properties:{cursor:{type:"string"},messages:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}}}}}}},ChatBskyConvoLeaveConvo:{lexicon:1,id:"chat.bsky.convo.leaveConvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convoId","rev"],properties:{convoId:{type:"string"},rev:{type:"string"}}}}}}},ChatBskyConvoListConvos:{lexicon:1,id:"chat.bsky.convo.listConvos",defs:{main:{type:"query",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},readState:{type:"string",knownValues:["unread"]},status:{type:"string",knownValues:["request","accepted"]}}},output:{encoding:"application/json",schema:{type:"object",required:["convos"],properties:{cursor:{type:"string"},convos:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}}},ChatBskyConvoMuteConvo:{lexicon:1,id:"chat.bsky.convo.muteConvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoRemoveReaction:{lexicon:1,id:"chat.bsky.convo.removeReaction",defs:{main:{type:"procedure",description:"Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't.",input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId","value"],properties:{convoId:{type:"string"},messageId:{type:"string"},value:{type:"string",minLength:1,maxLength:64,minGraphemes:1,maxGraphemes:1}}}},output:{encoding:"application/json",schema:{type:"object",required:["message"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}},errors:[{name:"ReactionMessageDeleted",description:"Indicates that the message has been deleted and reactions can no longer be added/removed."},{name:"ReactionInvalidValue",description:"Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji."}]}}},ChatBskyConvoSendMessage:{lexicon:1,id:"chat.bsky.convo.sendMessage",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId","message"],properties:{convoId:{type:"string"},message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageInput"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}}},ChatBskyConvoSendMessageBatch:{lexicon:1,id:"chat.bsky.convo.sendMessageBatch",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["items"],properties:{items:{type:"array",maxLength:100,items:{type:"ref",ref:"lex:chat.bsky.convo.sendMessageBatch#batchItem"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}}}},batchItem:{type:"object",required:["convoId","message"],properties:{convoId:{type:"string"},message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageInput"}}}}},ChatBskyConvoUnmuteConvo:{lexicon:1,id:"chat.bsky.convo.unmuteCo
2nvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoUpdateAllRead:{lexicon:1,id:"chat.bsky.convo.updateAllRead",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",properties:{status:{type:"string",knownValues:["request","accepted"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["updatedCount"],properties:{updatedCount:{description:"The count of updated convos.",type:"integer"}}}}}}},ChatBskyConvoUpdateRead:{lexicon:1,id:"chat.bsky.convo.updateRead",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"},messageId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyModerationGetActorMetadata:{lexicon:1,id:"chat.bsky.moderation.getActorMetadata",defs:{main:{type:"query",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"object",required:["day","month","all"],properties:{day:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"},month:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"},all:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"}}}}},metadata:{type:"object",required:["messagesSent","messagesReceived","convos","convosStarted"],properties:{messagesSent:{type:"integer"},messagesReceived:{type:"integer"},convos:{type:"integer"},convosStarted:{type:"integer"}}}}},ChatBskyModerationGetMessageContext:{lexicon:1,id:"chat.bsky.moderation.getMessageContext",defs:{main:{type:"query",parameters:{type:"params",required:["messageId"],properties:{convoId:{type:"string",description:"Conversation that the message is from. NOTE: this field will eventually be required."},messageId:{type:"string"},before:{type:"integer",default:5},after:{type:"integer",default:5}}},output:{encoding:"application/json",schema:{type:"object",required:["messages"],properties:{messages:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}}}}}}},ChatBskyModerationUpdateActorAccess:{lexicon:1,id:"chat.bsky.moderation.updateActorAccess",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["actor","allowAccess"],properties:{actor:{type:"string",format:"did"},allowAccess:{type:"boolean"},ref:{type:"string"}}}}}}},ComAtprotoAdminDefs:{lexicon:1,id:"com.atproto.admin.defs",defs:{statusAttr:{type:"object",required:["applied"],properties:{applied:{type:"boolean"},ref:{type:"string"}}},accountView:{type:"object",required:["did","handle","indexedAt"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"},invites:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}},invitesDisabled:{type:"boolean"},emailConfirmedAt:{type:"string",format:"datetime"},inviteNote:{type:"string"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoRef:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},repoBlobRef:{type:"object",required:["did","cid"],properties:{did:{type:"string",format:"did"},cid:{type:"string",format:"cid"},recordUri:{type:"string",format:"at-uri"}}},threatSignature:{type:"object",required:["property","value"],properties:{property:{type:"string"},value:{type:"string"}}}}},ComAtprotoAdminDeleteAccount:{lexicon:1,id:"com.atproto.admin.deleteAccount",defs:{main:{type:"procedure",description:"Delete a user account as an administrator.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}}}}},ComAtprotoAdminDisableAccountInvites:{lexicon:1,id:"com.atproto.admin.disableAccountInvites",defs:{main:{type:"procedure",description:"Disable an account from receiving new invite codes, but does not invalidate existing codes.",input:{encoding:"application/json",schema:{type:"object",required:["account"],properties:{account:{type:"string",format:"did"},note:{type:"string",description:"Optional reason for disabled invites."}}}}}}},ComAtprotoAdminDisableInviteCodes:{lexicon:1,id:"com.atproto.admin.disableInviteCodes",defs:{main:{type:"procedure",description:"Disable some set of codes and/or all codes associated with a set of users.",input:{encoding:"application/json",schema:{type:"object",properties:{codes:{type:"array",items:{type:"string"}},accounts:{type:"array",items:{type:"string"}}}}}}}},ComAtprotoAdminEnableAccountInvites:{lexicon:1,id:"com.atproto.admin.enableAccountInvites",defs:{main:{type:"procedure",description:"Re-enable an account's ability to receive invite codes.",input:{encoding:"application/json",schema:{type:"object",required:["account"],properties:{account:{type:"string",format:"did"},note:{type:"string",description:"Optional reason for enabled invites."}}}}}}},ComAtprotoAdminGetAccountInfo:{lexicon:1,id:"com.atproto.admin.getAccountInfo",defs:{main:{type:"query",description:"Get details about an account.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}},ComAtprotoAdminGetAccountInfos:{lexicon:1,id:"com.atproto.admin.getAccountInfos",defs:{main:{type:"query",description:"Get details about some accounts.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["infos"],properties:{infos:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ComAtprotoAdminGetInviteCodes:{lexicon:1,id:"com.atproto.admin.getInviteCodes",defs:{main:{type:"query",description:"Get an admin view of invite codes.",parameters:{type:"params",properties:{sort:{type:"string",knownValues:["recent","usage"],default:"recent"},limit:{type:"integer",minimum:1,maximum:500,default:100},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{cursor:{type:"string"},codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}}}}}}}},ComAtprotoAdminGetSubjectStatus:{lexicon:1,id:"com.atproto.admin.getSubjectStatus",defs:{main:{type:"query",description:"Get the service-specific admin status of a subject (account, record, or blob).",parameters:{type:"params",properties:{did:{type:"string",format:"did"},uri:{type:"string",format:"at-uri"},blob:{type:"string",format:"cid"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"},deactivated:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}}}}},ComAtprotoAdminSearchAccounts:{lexicon:1,id:"com.atproto.admin.searchAccounts",defs:{main:{type:"query",description:"Get list of accounts that matches your search query.",parameters:{type:"params",properties:{email:{type:"string"},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ComAtprotoAdminSendEmail:{lexicon:1,id:"com.atproto.admin.sendEmail",defs:{main:{type:"procedure",description:"Send email to a user's account email address.",input:{encoding:"application/json",schema:{type:"object",required:["recipientDid","content","senderDid"],properties:{recipientDid:{type:"string",format:"did"},content:{type:"string"},subject:{type:"string"},senderDid:{type:"string",format:"did"},comment:{type:"string",description:"Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers"}}}},output:{encoding:"application/json",schema:{type:"object",required:["sent"],properties:{sent:{type:"boolean"}}}}}}}
2,ComAtprotoAdminUpdateAccountEmail:{lexicon:1,id:"com.atproto.admin.updateAccountEmail",defs:{main:{type:"procedure",description:"Administrative action to update an account's email.",input:{encoding:"application/json",schema:{type:"object",required:["account","email"],properties:{account:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},email:{type:"string"}}}}}}},ComAtprotoAdminUpdateAccountHandle:{lexicon:1,id:"com.atproto.admin.updateAccountHandle",defs:{main:{type:"procedure",description:"Administrative action to update an account's handle.",input:{encoding:"application/json",schema:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"}}}}}}},ComAtprotoAdminUpdateAccountPassword:{lexicon:1,id:"com.atproto.admin.updateAccountPassword",defs:{main:{type:"procedure",description:"Update the password for a user account as an administrator.",input:{encoding:"application/json",schema:{type:"object",required:["did","password"],properties:{did:{type:"string",format:"did"},password:{type:"string"}}}}}}},ComAtprotoAdminUpdateAccountSigningKey:{lexicon:1,id:"com.atproto.admin.updateAccountSigningKey",defs:{main:{type:"procedure",description:"Administrative action to update an account's signing key in their Did document.",input:{encoding:"application/json",schema:{type:"object",required:["did","signingKey"],properties:{did:{type:"string",format:"did"},signingKey:{type:"string",format:"did",description:"Did-key formatted public key"}}}}}}},ComAtprotoAdminUpdateSubjectStatus:{lexicon:1,id:"com.atproto.admin.updateSubjectStatus",defs:{main:{type:"procedure",description:"Update the service-specific admin status of a subject (account, record, or blob).",input:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"},deactivated:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}},output:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}}}}},ComAtprotoIdentityDefs:{lexicon:1,id:"com.atproto.identity.defs",defs:{identityInfo:{type:"object",required:["did","handle","didDoc"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle",description:"The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document."},didDoc:{type:"unknown",description:"The complete DID document for the identity."}}}}},ComAtprotoIdentityGetRecommendedDidCredentials:{lexicon:1,id:"com.atproto.identity.getRecommendedDidCredentials",defs:{main:{type:"query",description:"Describe the credentials that should be included in the DID doc of an account that is migrating to this service.",output:{encoding:"application/json",schema:{type:"object",properties:{rotationKeys:{description:"Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs.",type:"array",items:{type:"string"}},alsoKnownAs:{type:"array",items:{type:"string"}},verificationMethods:{type:"unknown"},services:{type:"unknown"}}}}}}},ComAtprotoIdentityRefreshIdentity:{lexicon:1,id:"com.atproto.identity.refreshIdentity",defs:{main:{type:"procedure",description:"Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.",input:{encoding:"application/json",schema:{type:"object",required:["identifier"],properties:{identifier:{type:"string",format:"at-identifier"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.identity.defs#identityInfo"}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."},{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},ComAtprotoIdentityRequestPlcOperationSignature:{lexicon:1,id:"com.atproto.identity.requestPlcOperationSignature",defs:{main:{type:"procedure",description:"Request an email with a code to in order to request a signed PLC operation. Requires Auth."}}},ComAtprotoIdentityResolveDid:{lexicon:1,id:"com.atproto.identity.resolveDid",defs:{main:{type:"query",description:"Resolves DID to DID document. Does not bi-directionally verify handle.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"DID to resolve."}}},output:{encoding:"application/json",schema:{type:"object",required:["didDoc"],properties:{didDoc:{type:"unknown",de
2scription:"The complete DID document for the identity."}}}},errors:[{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},ComAtprotoIdentityResolveHandle:{lexicon:1,id:"com.atproto.identity.resolveHandle",defs:{main:{type:"query",description:"Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.",parameters:{type:"params",required:["handle"],properties:{handle:{type:"string",format:"handle",description:"The handle to resolve."}}},output:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."}]}}},ComAtprotoIdentityResolveIdentity:{lexicon:1,id:"com.atproto.identity.resolveIdentity",defs:{main:{type:"query",description:"Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).",parameters:{type:"params",required:["identifier"],properties:{identifier:{type:"string",format:"at-identifier",description:"Handle or DID to resolve."}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.identity.defs#identityInfo"}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."},{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},ComAtprotoIdentitySignPlcOperation:{lexicon:1,id:"com.atproto.identity.signPlcOperation",defs:{main:{type:"procedure",description:"Signs a PLC operation to update some value(s) in the requesting DID's document.",input:{encoding:"application/json",schema:{type:"object",properties:{token:{description:"A token received through com.atproto.identity.requestPlcOperationSignature",type:"string"},rotationKeys:{type:"array",items:{type:"string"}},alsoKnownAs:{type:"array",items:{type:"string"}},verificationMethods:{type:"unknown"},services:{type:"unknown"}}}},output:{encoding:"application/json",schema:{type:"object",required:["operation"],properties:{operation:{type:"unknown",description:"A signed DID PLC operation."}}}}}}},ComAtprotoIdentitySubmitPlcOperation:{lexicon:1,id:"com.atproto.identity.submitPlcOperation",defs:{main:{type:"procedure",description:"Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry",input:{encoding:"application/json",schema:{type:"object",required:["operation"],properties:{operation:{type:"unknown"}}}}}}},ComAtprotoIdentityUpdateHandle:{lexicon:1,id:"com.atproto.identity.updateHandle",defs:{main:{type:"procedure",description:"Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{handle:{type:"string",format:"handle",description:"The new handle."}}}}}}},ComAtprotoLabelDefs:{lexicon:1,id:"com.atproto.label.defs",defs:{label:{type:"object",description:"Metadata tag on an atproto resource (eg, repo or record).",required:["src","uri","val","cts"],properties:{ver:{type:"integer",description:"The AT Protocol version of the label object."},src:{type:"string",format:"did",description:"DID of the actor who created this label."},uri:{type:"string",format:"uri",description:"AT URI of the record, repository (account), or other resource that this label applies to."},cid:{type:"string",format:"cid",description:"Optionally, CID specifying the specific version of 'uri' resource this label applies to."},val:{type:"string",maxLength:128,description:"The short string name of the value or type of this label."},neg:{type:"boolean",description:"If true, this is a negation label, overwriting a previous label."},cts:{type:"string",format:"datetime",description:"Timestamp when this label was created."},exp:{type:"string",format:"datetime",description:"Timestamp at which this label expires (no longer applies)."},sig:{type:"bytes",description:"Signature of dag-cbor encoded label."}}},selfLabels:{type:"object",description:"Metadata tags on an atproto record, published by the author within the record.",required:["values"],properties:{values:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#selfL
2abel"},maxLength:10}}},selfLabel:{type:"object",description:"Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.",required:["val"],properties:{val:{type:"string",maxLength:128,description:"The short string name of the value or type of this label."}}},labelValueDefinition:{type:"object",description:"Declares a label value and its expected interpretations and behaviors.",required:["identifier","severity","blurs","locales"],properties:{identifier:{type:"string",description:"The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",maxLength:100,maxGraphemes:100},severity:{type:"string",description:"How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",knownValues:["inform","alert","none"]},blurs:{type:"string",description:"What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.",knownValues:["content","media","none"]},defaultSetting:{type:"string",description:"The default setting for this label.",knownValues:["ignore","warn","hide"],default:"warn"},adultOnly:{type:"boolean",description:"Does the user need to have adult content enabled in order to configure this label?"},locales:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValueDefinitionStrings"}}}},labelValueDefinitionStrings:{type:"object",description:"Strings which describe the label in the UI, localized into a specific language.",required:["lang","name","description"],properties:{lang:{type:"string",description:"The code of the language these strings are written in.",format:"language"},name:{type:"string",description:"A short human-readable name for the label.",maxGraphemes:64,maxLength:640},description:{type:"string",description:"A longer description of what the label means and why it might be applied.",maxGraphemes:1e4,maxLength:1e5}}},labelValue:{type:"string",knownValues:["!hide","!no-promote","!warn","!no-unauthenticated","dmca-violation","doxxing","porn","sexual","nudity","nsfl","gore"]}}},ComAtprotoLabelQueryLabels:{lexicon:1,id:"com.atproto.label.queryLabels",defs:{main:{type:"query",description:"Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.",parameters:{type:"params",required:["uriPatterns"],properties:{uriPatterns:{type:"array",items:{type:"string"},description:"List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI."},sources:{type:"array",items:{type:"string",format:"did"},description:"Optional list of label sources (DIDs) to filter on."},limit:{type:"integer",minimum:1,maximum:250,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["labels"],properties:{cursor:{type:"string"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}}}},ComAtprotoLabelSubscribeLabels:{lexicon:1,id:"com.atproto.label.subscribeLabels",defs:{main:{type:"subscription",description:"Subscribe to stream of labels (and negations). Public endpoint implemented by mod services. Uses same sequencing scheme as repo event stream.",parameters:{type:"params",properties:{cursor:{type:"integer",description:"The last known event seq number to backfill from."}}},message:{schema:{type:"union",refs:["lex:com.atproto.label.subscribeLabels#labels","lex:com.atproto.label.subscribeLabels#info"]}},errors:[{name:"FutureCursor"}]},labels:{type:"object",required:["seq","labels"],properties:{seq:{type:"integer"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}},info:{type:"object",required:["name"],properties:{name:{type:"string",knownValues:["OutdatedCursor"]},message:{type:"string"}}}}},ComAtprotoLexiconSchema:{lexicon:1,id:"com.atproto.lexicon.schema",defs:{main:{type:"record",description:"Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc).",key:"nsid",record:{type:"object",required:["lexicon"],properties:{lexicon:{type:"integer",description:"Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system."}}}}}},ComAtprotoModerationCreateReport:{lexicon:1,id:"com.atproto.moderation.createReport",defs:{main:{type:"procedure",description:"Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["reasonType","subject"],properties:{reasonType:{type:"ref",description:"Indicates the broad category of violation the report is for.",ref:"lex:com.atproto.moderation.defs#reasonType"},reason:{type:"string",maxGraphemes:2e3,maxLength:2e4,description:"Additional context about the content and violation."},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]},modTool:{type:"ref",ref:"lex:com.atproto.moderation.createReport#modTool"}}}},output:{encoding:"application/json",schema:{type:"object",required:["id","reasonType","subject","reportedBy","createdAt"],properties:{id:{type:"integer"},reasonType:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"},reason:{type:"string",maxGraphemes:2e3,maxLength:2e4},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]},reportedBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"}}}}},modTool:{type:"object",description:"Moderation tool information for tracing the source of the action",required:["name"],properties:{name:{type:"string",description:"Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome')"}
2,meta:{type:"unknown",description:"Additional arbitrary metadata about the source"}}}}},ComAtprotoModerationDefs:{lexicon:1,id:"com.atproto.moderation.defs",defs:{reasonType:{type:"string",knownValues:["com.atproto.moderation.defs#reasonSpam","com.atproto.moderation.defs#reasonViolation","com.atproto.moderation.defs#reasonMisleading","com.atproto.moderation.defs#reasonSexual","com.atproto.moderation.defs#reasonRude","com.atproto.moderation.defs#reasonOther","com.atproto.moderation.defs#reasonAppeal","tools.ozone.report.defs#reasonAppeal","tools.ozone.report.defs#reasonOther","tools.ozone.report.defs#reasonViolenceAnimal","tools.ozone.report.defs#reasonViolenceThreats","tools.ozone.report.defs#reasonViolenceGraphicContent","tools.ozone.report.defs#reasonViolenceGlorification","tools.ozone.report.defs#reasonViolenceExtremistContent","tools.ozone.report.defs#reasonViolenceTrafficking","tools.ozone.report.defs#reasonViolenceOther","tools.ozone.report.defs#reasonSexualAbuseContent","tools.ozone.report.defs#reasonSexualNCII","tools.ozone.report.defs#reasonSexualDeepfake","tools.ozone.report.defs#reasonSexualAnimal","tools.ozone.report.defs#reasonSexualUnlabeled","tools.ozone.report.defs#reasonSexualOther","tools.ozone.report.defs#reasonChildSafetyCSAM","tools.ozone.report.defs#reasonChildSafetyGroom","tools.ozone.report.defs#reasonChildSafetyPrivacy","tools.ozone.report.defs#reasonChildSafetyHarassment","tools.ozone.report.defs#reasonChildSafetyOther","tools.ozone.report.defs#reasonHarassmentTroll","tools.ozone.report.defs#reasonHarassmentTargeted","tools.ozone.report.defs#reasonHarassmentHateSpeech","tools.ozone.report.defs#reasonHarassmentDoxxing","tools.ozone.report.defs#reasonHarassmentOther","tools.ozone.report.defs#reasonMisleadingBot","tools.ozone.report.defs#reasonMisleadingImpersonation","tools.ozone.report.defs#reasonMisleadingSpam","tools.ozone.report.defs#reasonMisleadingScam","tools.ozone.report.defs#reasonMisleadingElections","tools.ozone.report.defs#reasonMisleadingOther","tools.ozone.report.defs#reasonRuleSiteSecurity","tools.ozone.report.defs#reasonRuleProhibitedSales","tools.ozone.report.defs#reasonRuleBanEvasion","tools.ozone.report.defs#reasonRuleOther","tools.ozone.report.defs#reasonSelfHarmContent","tools.ozone.report.defs#reasonSelfHarmED","tools.ozone.report.defs#reasonSelfHarmStunts","tools.ozone.report.defs#reasonSelfHarmSubstances","tools.ozone.report.defs#reasonSelfHarmOther"]},reasonSpam:{type:"token",description:"Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`."},reasonViolation:{type:"token",description:"Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`."},reasonMisleading:{type:"token",description:"Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`."},reasonSexual:{type:"token",description:"Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`."},reasonRude:{type:"token",description:"Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`."},reasonOther:{type:"token",description:"Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`."},reasonAppeal:{type:"token",description:"Appeal a previously taken moderation action"},subjectType:{type:"string",description:"Tag describing a type of subject that might be reported.",knownValues:["account","record","chat"]}}},ComAtprotoRepoApplyWrites:{lexicon:1,id:"com.atproto.repo.applyWrites",defs:{main:{type:"procedure",description:"Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","writes"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},validate:{type:"boolean",description:"Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons."},writes:{type:"array",items:{type:"union",refs:["lex:com.atproto.repo.applyWrites#create","lex:com.atproto.repo.applyWrites#update","lex:com.atproto.repo.applyWrites#delete"],closed:!0}},swapCommit:{type:"string",description:"If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.",format:"cid"}}}},output:{encoding:"application/json",schema:{type:"object",required:[],properties:{commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},results:{type:"array",items:{type:"union",refs:["lex:com.atproto.repo.applyWrites#createResult","lex:com.atproto.repo.applyWrites#updateResult","lex:com.atproto.repo.applyWrites#deleteResult"],closed:!0}}}}},errors:[{name:"InvalidSwap",description:"Indicates that the 'swapCommit' parameter did not match current commit."}]},create:{type:"object",description:"Operation which creates a new record.",required:["collection","value"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string",maxLength:512,format:"record-key",description:"NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility."},value:{type:"unknown"}}},update:{type:"object",description:"Operation which updates an existing record.",required:["collection","rkey","value"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string",format:"record-key"},value:{type:"unknown"}}},delete:{type:"object",description:"Operation which deletes an existing record.",required:["collection","rkey"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string",format:"record-key"}}},createResult:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}},updateResult:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}},deleteResult:{type:"object",required:[],properties:{}}}},ComAtprotoRepoCreateRecord:{lexicon:1,id:"com.atproto.repo.createRecord",defs:{main:{type:"procedure",description:"Create a single new repository record. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","record"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",format:"record-key",description:"The Record Key.",maxLength:512},validate:{type:"boolean",description:"Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."}
2,record:{type:"unknown",description:"The record itself. Must contain a $type field."},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}}},errors:[{name:"InvalidSwap",description:"Indicates that 'swapCommit' didn't match current repo commit."}]}}},ComAtprotoRepoDefs:{lexicon:1,id:"com.atproto.repo.defs",defs:{commitMeta:{type:"object",required:["cid","rev"],properties:{cid:{type:"string",format:"cid"},rev:{type:"string",format:"tid"}}}}},ComAtprotoRepoDeleteRecord:{lexicon:1,id:"com.atproto.repo.deleteRecord",defs:{main:{type:"procedure",description:"Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","rkey"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",format:"record-key",description:"The Record Key."},swapRecord:{type:"string",format:"cid",description:"Compare and swap with the previous record by CID."},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",properties:{commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"}}}},errors:[{name:"InvalidSwap"}]}}},ComAtprotoRepoDescribeRepo:{lexicon:1,id:"com.atproto.repo.describeRepo",defs:{main:{type:"query",description:"Get information about an account and repository, including the list of collections. Does not require auth.",parameters:{type:"params",required:["repo"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["handle","did","didDoc","collections","handleIsCorrect"],properties:{handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown",description:"The complete DID document for this account."},collections:{type:"array",description:"List of all the collections (NSIDs) for which this repo contains at least one record.",items:{type:"string",format:"nsid"}},handleIsCorrect:{type:"boolean",description:"Indicates if handle is currently valid (resolves bi-directionally)"}}}}}}},ComAtprotoRepoGetRecord:{lexicon:1,id:"com.atproto.repo.getRecord",defs:{main:{type:"query",description:"Get a single record from a repository. Does not require auth.",parameters:{type:"params",required:["repo","collection","rkey"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",description:"The Record Key.",format:"record-key"},cid:{type:"string",format:"cid",description:"The CID of the version of the record. If not specified, then return the most recent version."}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","value"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"}}}},errors:[{name:"RecordNotFound"}]}}},ComAtprotoRepoImportRepo:{lexicon:1,id:"com.atproto.repo.importRepo",defs:{main:{type:"procedure",description:"Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.",input:{encoding:"application/vnd.ipld.car"}}}},ComAtprotoRepoListMissingBlobs:{lexicon:1,id:"com.atproto.repo.listMissingBlobs",defs:{main:{type:"query",description:"Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["blobs"],properties:{cursor:{type:"string"},blobs:{type:"array",items:{type:"ref",ref:"lex:com.atproto.repo.listMissingBlobs#recordBlob"}}}}}},recordBlob:{type:"object",required:["cid","recordUri"],properties:{cid:{type:"string",format:"cid"},recordUri:{type:"string",format:"at-uri"}}}}},ComAtprotoRepoListRecords:{lexicon:1,id:"com.atproto.repo.listRecords",defs:{main:{type:"query",description:"List a range of records in a repository, matching a specific collection. Does not require auth.",parameters:{type:"params",required:["repo","collection"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},collection:{type:"string",format:"nsid",description:"The NSID of the record type."},limit:{type:"integer",minimum:1,maximum:100,default:50,description:"The number of records to return."},cursor:{type:"string"},reverse:{type:"boolean",description:"Flag to reverse the order of the returned records."}}},output:{encoding:"application/json",schema:{type:"object",required:["records"],properties:{cursor:{type:"string"},records:{type:"array",items:{type:"ref",ref:"lex:com.atproto.repo.listRecords#record"}}}}}},record:{type:"object",required:["uri","cid","value"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"}}}}},ComAtprotoRepoPutRecord:{lexicon:1,id:"com.atproto.repo.putRecord",defs:{main:{type:"procedure",description:"Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","rkey","record"],nullable:["swapRecord"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",format:"record-key",description:"The Record Key.",maxLength:512},validate:{type:"boolean",description:"Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."}
2,record:{type:"unknown",description:"The record to write."},swapRecord:{type:"string",format:"cid",description:"Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation"},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}}},errors:[{name:"InvalidSwap"}]}}},ComAtprotoRepoStrongRef:{lexicon:1,id:"com.atproto.repo.strongRef",description:"A URI with a content-hash fingerprint.",defs:{main:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"}}}}},ComAtprotoRepoUploadBlob:{lexicon:1,id:"com.atproto.repo.uploadBlob",defs:{main:{type:"procedure",description:"Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.",input:{encoding:"*/*"},output:{encoding:"application/json",schema:{type:"object",required:["blob"],properties:{blob:{type:"blob"}}}}}}},ComAtprotoServerActivateAccount:{lexicon:1,id:"com.atproto.server.activateAccount",defs:{main:{type:"procedure",description:"Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup."}}},ComAtprotoServerCheckAccountStatus:{lexicon:1,id:"com.atproto.server.checkAccountStatus",defs:{main:{type:"query",description:"Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.",output:{encoding:"application/json",schema:{type:"object",required:["activated","validDid","repoCommit","repoRev","repoBlocks","indexedRecords","privateStateValues","expectedBlobs","importedBlobs"],properties:{activated:{type:"boolean"},validDid:{type:"boolean"},repoCommit:{type:"string",format:"cid"},repoRev:{type:"string"},repoBlocks:{type:"integer"},indexedRecords:{type:"integer"},privateStateValues:{type:"integer"},expectedBlobs:{type:"integer"},importedBlobs:{type:"integer"}}}}}}},ComAtprotoServerConfirmEmail:{lexicon:1,id:"com.atproto.server.confirmEmail",defs:{main:{type:"procedure",description:"Confirm an email using a token from com.atproto.server.requestEmailConfirmation.",input:{encoding:"application/json",schema:{type:"object",required:["email","token"],properties:{email:{type:"string"},token:{type:"string"}}}},errors:[{name:"AccountNotFound"},{name:"ExpiredToken"},{name:"InvalidToken"},{name:"InvalidEmail"}]}}},ComAtprotoServerCreateAccount:{lexicon:1,id:"com.atproto.server.createAccount",defs:{main:{type:"procedure",description:"Create an account. Implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{email:{type:"string"},handle:{type:"string",format:"handle",description:"Requested handle for the account."},did:{type:"string",format:"did",description:"Pre-existing atproto DID, being imported to a new account."},inviteCode:{type:"string"},verificationCode:{type:"string"},verificationPhone:{type:"string"},password:{type:"string",description:"Initial account password. May need to meet instance-specific password strength requirements."},recoveryKey:{type:"string",description:"DID PLC rotation key (aka, recovery key) to be included in PLC creation operation."},plcOp:{type:"unknown",description:"A signed DID PLC operation to be submitted as part of importing an existing account to this instance. NOTE: this optional field may be updated when full account migration is implemented."}}}},output:{encoding:"application/json",schema:{type:"object",description:"Account login session returned on successful account creation.",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did",description:"The DID of the new account."}
2,didDoc:{type:"unknown",description:"Complete DID document."}}}},errors:[{name:"InvalidHandle"},{name:"InvalidPassword"},{name:"InvalidInviteCode"},{name:"HandleNotAvailable"},{name:"UnsupportedDomain"},{name:"UnresolvableDid"},{name:"IncompatibleDidDoc"}]}}},ComAtprotoServerCreateAppPassword:{lexicon:1,id:"com.atproto.server.createAppPassword",defs:{main:{type:"procedure",description:"Create an App Password.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string",description:"A short name for the App Password, to help distinguish them."},privileged:{type:"boolean",description:"If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.server.createAppPassword#appPassword"}},errors:[{name:"AccountTakedown"}]},appPassword:{type:"object",required:["name","password","createdAt"],properties:{name:{type:"string"},password:{type:"string"},createdAt:{type:"string",format:"datetime"},privileged:{type:"boolean"}}}}},ComAtprotoServerCreateInviteCode:{lexicon:1,id:"com.atproto.server.createInviteCode",defs:{main:{type:"procedure",description:"Create an invite code.",input:{encoding:"application/json",schema:{type:"object",required:["useCount"],properties:{useCount:{type:"integer"},forAccount:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["code"],properties:{code:{type:"string"}}}}}}},ComAtprotoServerCreateInviteCodes:{lexicon:1,id:"com.atproto.server.createInviteCodes",defs:{main:{type:"procedure",description:"Create invite codes.",input:{encoding:"application/json",schema:{type:"object",required:["codeCount","useCount"],properties:{codeCount:{type:"integer",default:1},useCount:{type:"integer"},forAccounts:{type:"array",items:{type:"string",format:"did"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.createInviteCodes#accountCodes"}}}}}},accountCodes:{type:"object",required:["account","codes"],properties:{account:{type:"string"},codes:{type:"array",items:{type:"string"}}}}}},ComAtprotoServerCreateSession:{lexicon:1,id:"com.atproto.server.createSession",defs:{main:{type:"procedure",description:"Create an authentication session.",input:{encoding:"application/json",schema:{type:"object",required:["identifier","password"],properties:{identifier:{type:"string",description:"Handle or other identifier supported by the server for the authenticating user."},password:{type:"string"},authFactorToken:{type:"string"},allowTakendown:{type:"boolean",description:"When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned"}}}},output:{encoding:"application/json",schema:{type:"object",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown"},email:{type:"string"},emailConfirmed:{type:"boolean"},emailAuthFactor:{type:"boolean"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deactivated"]}}}},errors:[{name:"AccountTakedown"},{name:"AuthFactorTokenRequired"}]}}},ComAtprotoServerDeactivateAccount:{lexicon:1,id:"com.atproto.server.deactivateAccount",defs:{main:{type:"procedure",description:"Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.",input:{encoding:"application/json",schema:{type:"object",properties:{deleteAfter:{type:"string",format:"datetime",description:"A recommendation to server as to how long they should hold onto the deactivated account before deleting."}}}}}}},ComAtprotoServerDefs:{lexicon:1,id:"com.atproto.server.defs",defs:{inviteCode:{type:"object",required:["code","available","disabled","forAccount","createdBy","createdAt","uses"],properties:{code:{type:"string"},available:{type:"integer"},disabled:{type:"boolean"},forAccount:{type:"string"},createdBy:{type:"string"},createdAt:{type:"string",format:"datetime"},uses:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCodeUse"}}}},inviteCodeUse:{type:"object",required:["usedBy","usedAt"],properties:{usedBy:{type:"string",format:"did"},usedAt:{type:"string",format:"datetime"}}}}},ComAtprotoServerDeleteAccount:{lexicon:1,id:"com.atproto.server.deleteAccount",defs:{main:{type:"procedure",description:"Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["did","password","token"],properties:{did:{type:"string",format:"did"},password:{type:"string"},token:{type:"string"}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"}]}}},ComAtprotoServerDeleteSession:{lexicon:1,id:"com.atproto.server.deleteSession",defs:{main:{type:"procedure",description:"Delete the current session. Requires auth."}}},ComAtprotoServerDescribeServer:{lexicon:1,id:"com.atproto.server.describeServer",defs:{main:{type:"query",description:"Describes the server's account creation requirements and capabilities. Implemented by PDS.",output:{encoding:"application/json",schema:{type:"object",required:["did","availableUserDomains"],properties:{inviteCodeRequired:{type:"boolean",description:"If true, an invite code must be supplied to create an account on this instance."},phoneVerificationRequired:{type:"boolean",description:"If true, a phone verification token must be supplied to create an account on this instance."},availableUserDomains:{type:"array",description:"List of domain suffixes that can be used in account handles.",items:{type:"string"}},links:{type:"ref",description:"URLs of service policy documents.",ref:"lex:com.atproto.server.describeServer#links"},contact:{type:"ref",description:"Contact information",ref:"lex:com.atproto.server.describeServer#contact"},did:{type:"string",format:"did"}}}}},links:{type:"object",properties:{privacyPolicy:{type:"string",format:"uri"},termsOfService:{type:"string",format:"uri"}}},contact:{type:"object",properties:{email:{type:"string"}}}}},ComAtprotoServerGetAccountInviteCodes:{lexicon:1,id:"com.atproto.server.getAccountInviteCodes",defs:{main:{type:"query",description:"Get all invite codes for the current account. Requires auth.",parameters:{type:"params",properties:{includeUsed:{type:"boolean",default:!0},createAvailable:{type:"boolean",default:!0,description:"Controls whether any new 'earned' but not 'created' invites should be created."}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}}}}},errors:[{name:"DuplicateCreate"}]}}},ComAtprotoServerGetServiceAuth:{lexicon:1,id:"com.atproto.server.getServiceAuth",defs:{main:{type:"query",description:"Get a signed token on behalf of the requesting DID for the requested service.",parameters:{type:"params",required:["aud"],properties:{aud:{type:"string",format:"did",description:"The DID of the service that the token will be used to authenticate with"},exp:{type:"integer",description:"The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds
2in the future. The service may enforce certain time bounds on tokens depending on the requested scope."},lxm:{type:"string",format:"nsid",description:"Lexicon (XRPC) method to bind the requested token to"}}},output:{encoding:"application/json",schema:{type:"object",required:["token"],properties:{token:{type:"string"}}}},errors:[{name:"BadExpiration",description:"Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes."}]}}},ComAtprotoServerGetSession:{lexicon:1,id:"com.atproto.server.getSession",defs:{main:{type:"query",description:"Get information about the current auth session. Requires auth.",output:{encoding:"application/json",schema:{type:"object",required:["handle","did"],properties:{handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},email:{type:"string"},emailConfirmed:{type:"boolean"},emailAuthFactor:{type:"boolean"},didDoc:{type:"unknown"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deactivated"]}}}}}}},ComAtprotoServerListAppPasswords:{lexicon:1,id:"com.atproto.server.listAppPasswords",defs:{main:{type:"query",description:"List all App Passwords.",output:{encoding:"application/json",schema:{type:"object",required:["passwords"],properties:{passwords:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.listAppPasswords#appPassword"}}}}},errors:[{name:"AccountTakedown"}]},appPassword:{type:"object",required:["name","createdAt"],properties:{name:{type:"string"},createdAt:{type:"string",format:"datetime"},privileged:{type:"boolean"}}}}},ComAtprotoServerRefreshSession:{lexicon:1,id:"com.atproto.server.refreshSession",defs:{main:{type:"procedure",description:"Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt').",output:{encoding:"application/json",schema:{type:"object",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown"},active:{type:"boolean"},status:{type:"string",description:"Hosting status of the account. If not specified, then assume 'active'.",knownValues:["takendown","suspended","deactivated"]}}}},errors:[{name:"AccountTakedown"}]}}},ComAtprotoServerRequestAccountDelete:{lexicon:1,id:"com.atproto.server.requestAccountDelete",defs:{main:{type:"procedure",description:"Initiate a user account deletion via email."}}},ComAtprotoServerRequestEmailConfirmation:{lexicon:1,id:"com.atproto.server.requestEmailConfirmation",defs:{main:{type:"procedure",description:"Request an email with a code to confirm ownership of email."}}},ComAtprotoServerRequestEmailUpdate:{lexicon:1,id:"com.atproto.server.requestEmailUpdate",defs:{main:{type:"procedure",description:"Request a token in order to update email.",output:{encoding:"application/json",schema:{type:"object",required:["tokenRequired"],properties:{tokenRequired:{type:"boolean"}}}}}}},ComAtprotoServerRequestPasswordReset:{lexicon:1,id:"com.atproto.server.requestPasswordReset",defs:{main:{type:"procedure",description:"Initiate a user account password reset via email.",input:{encoding:"application/json",schema:{type:"object",required:["email"],properties:{email:{type:"string"}}}}}}},ComAtprotoServerReserveSigningKey:{lexicon:1,id:"com.atproto.server.reserveSigningKey",defs:{main:{type:"procedure",description:"Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.",input:{encoding:"application/json",schema:{type:"object",properties:{did:{type:"string",format:"did",description:"The DID to reserve a key for."}}}},output:{encoding:"application/json",schema:{type:"object",required:["signingKey"],properties:{signingKey:{type:"string",description:"The public key for the reserved signing key, in did:key serialization."}}}}}}},ComAtprotoServerResetPassword:{lexicon:1,id:"com.atproto.server.resetPassword",defs:{main:{type:"procedure",description:"Reset a user account password using a token.",input:{encoding:"application/json",schema:{type:"object",required:["token","password"],properties:{token:{type:"string"},password:{type:"string"}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"}]}}},ComAtprotoServerRevokeAppPassword:{lexicon:1,id:"com.atproto.server.revokeAppPassword",defs:{main:{type:"procedure",description:"Revoke an App Password by n
2ame.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string"}}}}}}},ComAtprotoServerUpdateEmail:{lexicon:1,id:"com.atproto.server.updateEmail",defs:{main:{type:"procedure",description:"Update an account's email.",input:{encoding:"application/json",schema:{type:"object",required:["email"],properties:{email:{type:"string"},emailAuthFactor:{type:"boolean"},token:{type:"string",description:"Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed."}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"},{name:"TokenRequired"}]}}},ComAtprotoSyncDefs:{lexicon:1,id:"com.atproto.sync.defs",defs:{hostStatus:{type:"string",knownValues:["active","idle","offline","throttled","banned"]}}},ComAtprotoSyncGetBlob:{lexicon:1,id:"com.atproto.sync.getBlob",defs:{main:{type:"query",description:"Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did","cid"],properties:{did:{type:"string",format:"did",description:"The DID of the account."},cid:{type:"string",format:"cid",description:"The CID of the blob to fetch"}}},output:{encoding:"*/*"},errors:[{name:"BlobNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetBlocks:{lexicon:1,id:"com.atproto.sync.getBlocks",defs:{main:{type:"query",description:"Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did","cids"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},cids:{type:"array",items:{type:"string",format:"cid"}}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"BlockNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetCheckout:{lexicon:1,id:"com.atproto.sync.getCheckout",defs:{main:{type:"query",description:"DEPRECATED - please use com.atproto.sync.getRepo instead",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/vnd.ipld.car"}}}},ComAtprotoSyncGetHead:{lexicon:1,id:"com.atproto.sync.getHead",defs:{main:{type:"query",description:"DEPRECATED - please use com.atproto.sync.getLatestCommit instead",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"cid"}}}},errors:[{name:"HeadNotFound"}]}}},ComAtprotoSyncGetHostStatus:{lexicon:1,id:"com.atproto.sync.getHostStatus",defs:{main:{type:"query",description:"Returns information about a specified upstream host, as consumed by the server. Implemented by relays.",parameters:{type:"params",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the host (eg, PDS or relay) being queried."}}},output:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string"},seq:{type:"integer",description:"Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)."},accountCount:{type:"integer",description:"Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts."},status:{type:"ref",ref:"lex:com.atproto.sync.defs#hostStatus"}}}},errors:[{name:"HostNotFound"}]}}},ComAtprotoSyncGetLatestCommit:{lexicon:1,id:"com.atproto.sync.getLatestCommit",defs:{main:{type:"query",description:"Get the current commit CID & revision of the specified repo. Does not require auth.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["cid","rev"],properties:{cid:{type:"string",format:"cid"},rev:{type:"string",format:"tid"}}}},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRecord:{lexicon:1,id:"com.atproto.sync.getRecord",defs:{main:{type:"query",description:"Get data blocks needed to prove the existence or non-existence of record
2in the current version of repo. Does not require auth.",parameters:{type:"params",required:["did","collection","rkey"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},collection:{type:"string",format:"nsid"},rkey:{type:"string",description:"Record Key",format:"record-key"}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"RecordNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRepo:{lexicon:1,id:"com.atproto.sync.getRepo",defs:{main:{type:"query",description:"Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},since:{type:"string",format:"tid",description:"The revision ('rev') of the repo to create a diff from."}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRepoStatus:{lexicon:1,id:"com.atproto.sync.getRepoStatus",defs:{main:{type:"query",description:"Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["did","active"],properties:{did:{type:"string",format:"did"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deleted","deactivated","desynchronized","throttled"]},rev:{type:"string",format:"tid",description:"Optional field, the current rev of the repo, if active=true"}}}},errors:[{name:"RepoNotFound"}]}}},ComAtprotoSyncListBlobs:{lexicon:1,id:"com.atproto.sync.listBlobs",defs:{main:{type:"query",description:"List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},since:{type:"string",format:"tid",description:"Optional revision of the repo to list blobs since."},limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["cids"],properties:{cursor:{type:"string"},cids:{type:"array",items:{type:"string",format:"cid"}}}}},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncListHosts:{lexicon:1,id:"com.atproto.sync.listHosts",defs:{main:{type:"query",description:"Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:200},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["hosts"],properties:{cursor:{type:"string"},hosts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.listHosts#host"},description:"Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first."}}}}},host:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"hostname of server; not a URL (no scheme)"},seq:{type:"integer",description:"Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)."},accountCount:{type:"integer"},status:{type:"ref",ref:"lex:com.atproto.sync.defs#hostStatus"}}}}},ComAtprotoSyncListRepos:{lexicon:1,id:"com.atproto.sync.listRepos",defs:{main:{type:"query",description:"Enumerates all the DID, rev, and commit CID for all repos hosted by this
2service. Does not require auth; implemented by PDS and Relay.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{cursor:{type:"string"},repos:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.listRepos#repo"}}}}}},repo:{type:"object",required:["did","head","rev"],properties:{did:{type:"string",format:"did"},head:{type:"string",format:"cid",description:"Current repo commit CID"},rev:{type:"string",format:"tid"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deleted","deactivated","desynchronized","throttled"]}}}}},ComAtprotoSyncListReposByCollection:{lexicon:1,id:"com.atproto.sync.listReposByCollection",defs:{main:{type:"query",description:"Enumerates all the DIDs which have records with the given collection NSID.",parameters:{type:"params",required:["collection"],properties:{collection:{type:"string",format:"nsid"},limit:{type:"integer",description:"Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists.",minimum:1,maximum:2e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{cursor:{type:"string"},repos:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.listReposByCollection#repo"}}}}}},repo:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}}},ComAtprotoSyncNotifyOfUpdate:{lexicon:1,id:"com.atproto.sync.notifyOfUpdate",defs:{main:{type:"procedure",description:"Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl",input:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the current service (usually a PDS) that is notifying of update."}}}}}}},ComAtprotoSyncRequestCrawl:{lexicon:1,id:"com.atproto.sync.requestCrawl",defs:{main:{type:"procedure",description:"Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth.",input:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the current service (eg, PDS) that is requesting to be crawled."}}}},errors:[{name:"HostBanned"}]}}},ComAtprotoSyncSubscribeRepos:{lexicon:1,id:"com.atproto.sync.subscribeRepos",defs:{main:{type:"subscription",description:"Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.",parameters:{type:"params",properties:{cursor:{type:"integer",description:"The last known event seq number to backfill from."}}},message:{schema:{type:"union",refs:["lex:com.atproto.sync.subscribeRepos#commit","lex:com.atproto.sync.subscribeRepos#sync","lex:com.atproto.sync.subscribeRepos#identity","lex:com.atproto.sync.subscribeRepos#account","lex:com.atproto.sync.subscribeRepos#info"]}},errors:[{name:"FutureCursor"},{name:"ConsumerTooSlow",description:"If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection."}]},commit:{type:"object",description:"Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.",required:["seq","rebase","tooBig","repo","commit","rev","since","blocks","ops","blobs","time"],nullable:["since"],properties:{seq:{type:"integer",description:"The stream sequence number of this message."},rebase:{type:"boolean",description:"DEPRECATED -- unused"},tooBig:{type:"boolean",description:"DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data."},repo:{type:"string",format:"did",description:"The repo this event comes from. Note that all other message types name this field 'did'."},commit:{type:"cid-link",description:"Repo commit object CID."},rev:{type:"string",format:"tid",description:"The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event."},since:{type:"string",format:"tid",description:"The rev of the last emitted commit from this repo (if any)."},blocks:{type:"bytes",description:"CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list.",maxLength:2e6},ops:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.subscribeRepos#repoOp",description:"List of repo mutation operations in this commit (eg, records created, updated, or deleted)."},maxLength:200},blobs:{type:"array",items:{type:"cid-link",description:"DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit."}},prevData:{type:"cid-link",description:"The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose."},time:{type:"string",format:"datetime",description:"Timestamp of when this message was originally broadcast."}}},sync:{type:"object",description:"Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.",required:["seq","did","blocks","rev","time"],properties:{seq:{type:"integer",description:"The stream sequence number of this message."},did:{type:"string",format:"did",description:"The account this repo event corresponds to. Must match that in the commit object."},blocks:{type:"bytes",description:"CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.",maxLength:1e4},rev:{type:"string",description:"The rev of the commit. This value must match that in the commit object."},time:{type:"string",format:"datetime",description:"Timestamp of when this message was originally broadcast."}}},identity:{type:"object",description:"Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.",required:["seq","did","time"],properties:{seq:{type:"integer"},did:{type:"string",format:"did"},time:{type:"string",format:"datetime"},handle:{type:"string",format:"handle",description:"The current handle for the account, or 'handle.invali
2d' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details."}}},account:{type:"object",description:"Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.",required:["seq","did","time","active"],properties:{seq:{type:"integer"},did:{type:"string",format:"did"},time:{type:"string",format:"datetime"},active:{type:"boolean",description:"Indicates that the account has a repository which can be fetched from the host that emitted this event."},status:{type:"string",description:"If active=false, this optional field indicates a reason for why the account is not active.",knownValues:["takendown","suspended","deleted","deactivated","desynchronized","throttled"]}}},info:{type:"object",required:["name"],properties:{name:{type:"string",knownValues:["OutdatedCursor"]},message:{type:"string"}}},repoOp:{type:"object",description:"A repo operation, ie a mutation of a single record.",required:["action","path","cid"],nullable:["cid"],properties:{action:{type:"string",knownValues:["create","update","delete"]},path:{type:"string"},cid:{type:"cid-link",description:"For creates and updates, the new record CID. For deletions, null."},prev:{type:"cid-link",description:"For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined."}}}}},ComAtprotoTempAddReservedHandle:{lexicon:1,id:"com.atproto.temp.addReservedHandle",defs:{main:{type:"procedure",description:"Add a handle to the set of reserved handles.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{handle:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ComAtprotoTempCheckHandleAvailability:{lexicon:1,id:"com.atproto.temp.checkHandleAvailability",defs:{main:{type:"query",description:"Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.",parameters:{type:"params",required:["handle"],properties:{handle:{type:"string",format:"handle",description:"Tentative handle. Will be checked for availability or used to build handle suggestions."},email:{type:"string",description:"User-provided email. Might be used to build handle suggestions."},birthDate:{type:"string",format:"datetime",description:"User-provided birth date. Might be used to build handle suggestions."}}},output:{encoding:"application/json",schema:{type:"object",required:["handle","result"],properties:{handle:{type:"string",format:"handle",description:"Echo of the input handle."},result:{type:"union",refs:["lex:com.atproto.temp.checkHandleAvailability#resultAvailable","lex:com.atproto.temp.checkHandleAvailability#resultUnavailable"]}}}},errors:[{name:"InvalidEmail",description:"An invalid email was provided."}]},resultAvailable:{type:"object",description:"Indicates the provided handle is available.",properties:{}},resultUnavailable:{type:"object",description:"Indicates the provided handle is unavailable and gives suggestions of available handles.",required:["suggestions"],properties:{suggestions:{type:"array",description:"List of suggested handles based on the provided inputs.",items:{type:"ref",ref:"lex:com.atproto.temp.checkHandleAvailability#suggestion"}}}},suggestion:{type:"object",required:["handle","method"],properties:{handle:{type:"string",format:"handle"},method:{type:"string",description:"Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics."}}}}},ComAtprotoTempCheckSignupQueue:{lexicon:1,id:"com.atproto.temp.checkSignupQueue",defs:{main:{type:"query",description:"Check accounts location in signup queue.",output:{encoding:"application/json",schema:{type:"object",required:["activated"],properties:{activated:{type:"boolean"},placeInQueue:{type:"integer"},estimatedTimeMs:{type:"integer"}}}}}}},ComAtprotoTempDereferenceScope:{lexicon:1,id:"com.atproto.temp.dereferenceScope",defs:{main:{type:"query",description:"Allows finding the oauth permission scope from a reference",parameters:{type:"params",required:["scope"],properties:{scope:{type:"string",description:"The scope reference (starts with 'ref:')"}}},output:{encoding:"application/json",schema:{type:"object",required:["scope"],properties:{scope:{type:"string",description:"The full oauth permission scope"}}}},errors:[{name:"InvalidScopeReference",description:"An invalid scope reference was provided."}]}}},ComAtprotoTempFetchLabels:{lexicon:1,id:"com.atproto.temp.fetchLabels",defs:{main:{type:"query",description:"DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date.",parameters:{type:"params",properties:{since:{type:"integer"},limit:{type:"integer",minimum:1,maximum:250,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["labels"],properties:{labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}}}},ComAtprotoTempRequestPhoneVerification:{lexicon:1,id:"com.atproto.temp.requestPhoneVerification",defs:{main:{type:"procedure",description:"Request a verification code to be sent to the supplied phone number",input:{encoding:"application/json",schema:{type:"object",required:["phoneNumber"],properties:{phoneNumber:{type:"string"}}}}}}},ComAtprotoTempRevokeAccountCredentials:{lexicon:1,id:"com.atproto.temp.revokeAccountCredentials",defs:{main:{type:"procedure",description:"Revoke sessions, password, and app passwords associated with account. May be resolved by a password reset.",input:{encoding:"application/json",schema:{type:"object",required:["account"],properties:{account:{type:"string",format:"at-identifier"}}}}}}},ToolsOzoneCommunicationCreateTemplate:{lexicon:1,id:"tools.ozone.communication.createTemplate",defs:{main:{type:"procedure",description:"Administrative action to create a new, re-usable communication (email for now) template.",input:{encoding:"application/json",schema:{type:"object",required:["subject","contentMarkdown","name"],properties:{name:{type:"string",description:"Name of the template."}
2,contentMarkdown:{type:"string",description:"Content of the template, markdown supported, can contain variable placeholders."},subject:{type:"string",description:"Subject of the message, used in emails."},lang:{type:"string",format:"language",description:"Message language."},createdBy:{type:"string",format:"did",description:"DID of the user who is creating the template."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}},errors:[{name:"DuplicateTemplateName"}]}}},ToolsOzoneCommunicationDefs:{lexicon:1,id:"tools.ozone.communication.defs",defs:{templateView:{type:"object",required:["id","name","contentMarkdown","disabled","lastUpdatedBy","createdAt","updatedAt"],properties:{id:{type:"string"},name:{type:"string",description:"Name of the template."},subject:{type:"string",description:"Content of the template, can contain markdown and variable placeholders."},contentMarkdown:{type:"string",description:"Subject of the message, used in emails."},disabled:{type:"boolean"},lang:{type:"string",format:"language",description:"Message language."},lastUpdatedBy:{type:"string",format:"did",description:"DID of the user who last updated the template."},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}},ToolsOzoneCommunicationDeleteTemplate:{lexicon:1,id:"tools.ozone.communication.deleteTemplate",defs:{main:{type:"procedure",description:"Delete a communication template.",input:{encoding:"application/json",schema:{type:"object",required:["id"],properties:{id:{type:"string"}}}}}}},ToolsOzoneCommunicationListTemplates:{lexicon:1,id:"tools.ozone.communication.listTemplates",defs:{main:{type:"query",description:"Get list of all communication templates.",output:{encoding:"application/json",schema:{type:"object",required:["communicationTemplates"],properties:{communicationTemplates:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}}}}}}}},ToolsOzoneCommunicationUpdateTemplate:{lexicon:1,id:"tools.ozone.communication.updateTemplate",defs:{main:{type:"procedure",description:"Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.",input:{encoding:"application/json",schema:{type:"object",required:["id"],properties:{id:{type:"string",description:"ID of the template to be updated."},name:{type:"string",description:"Name of the template."},lang:{type:"string",format:"language",description:"Message language."},contentMarkdown:{type:"string",description:"Content of the template, markdown supported, can contain variable placeholders."},subject:{type:"string",description:"Subject of the message, used in emails."},updatedBy:{type:"string",format:"did",description:"DID of the user who is updating the template."},disabled:{type:"boolean"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}},errors:[{name:"DuplicateTemplateName"}]}}},ToolsOzoneHostingGetAccountHistory:{lexicon:1,id:"tools.ozone.hosting.getAccountHistory",defs:{main:{type:"query",description:"Get account history, e.g. log of updated email addresses or other identity information.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"},events:{type:"array",items:{type:"string",knownValues:["accountCreated","emailUpdated","emailConfirmed","passwordUpdated","handleUpdated"]}},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["events"],properties:{cursor:{type:"string"},events:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.hosting.getAccountHistory#event"}}}}}},event:{type:"object",required:["details","createdBy","createdAt"],properties:{details:{type:"union",refs:["lex:tools.ozone.hosting.getAccountHistory#accountCreated","lex:tools.ozone.hosting.getAccountHistory#emailUpdated","lex:tools.ozone.hosting.getAccountHistory#emailConfirmed","lex:tools.ozone.hosting.getAccountHistory#passwordUpdated","lex:tools.ozone.hosting.getAccountHistory#handleUpdated"]},createdBy:{type:"string"},createdAt:{type:"string",format:"datetime"}}},accountCreated:{type:"object",required:[],properties:{email:{type:"string"},handle:{type:"string",format:"handle"}}},emailUpdated:{type:"object",required:["email"],properties:{email:{type:"string"}}},emailConfirmed:{type:"object",required:["email"],properties:{email:{type:"string"}}},passwordUpdated:{type:"object",required:[],properties:{}},handleUpdated:{type:"object",required:["handle"],properties:{handle:{type:"string",format:"handle"}}}}},ToolsOzoneModerationCancelScheduledActions:{lexicon:1,id:"tools.ozone.moderation.cancelScheduledActions",defs:{main:{type:"procedure",description:"Cancel all pending scheduled moderation actions for specified subjects",input:{encoding:"application/json",schema:{type:"object",required:["subjects"],properties:{subjects:{type:"array",maxLength:100,items:{type:"string",format:"did"},description:"Array of DID subjects to cancel scheduled actions for"},comment:{type:"string",description:"Optional comment describing the reason for cancellation"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.cancelScheduledActions#cancellationResults"}}},cancellationResults:{type:"object",required:["succeeded","failed"],properties:{succeeded:{type:"array",items:{type:"string",format:"did"},description:"DIDs for which all pending scheduled actions were successfully cancelled"},failed:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.cancelScheduledActions#failedCancellation"},description:"DIDs for which cancellation failed with error details"}}},failedCancellation:{type:"object",required:["did","error"],properties:{did:{type:"string",format:"did"},error:{type:"string"},errorCode:{type:"string"}}}}},ToolsOzoneModerationDefs:{lexicon:1,id:"tools.ozone.moderation.defs",defs:{modEventView:{type:"object",required:["id","event","subject","subjectBlobCids","createdBy","createdAt"],properties:{id:{type:"integer"},event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventDivert","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore","lex:tools.ozone.moderation.defs#ageAssuranceEvent","lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent","lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent","lex:tools.ozone.moderation.defs#scheduleTakedownEvent","lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent"]},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:chat.bsky.convo.defs#messageRef"]},subjectBlobCids:{type:"array",items:{type:"string"}},createdBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"},creatorHandle:{type:"string"},subjectHandle:{type:"string"},modTool:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modTool"}}},modEventViewDetail:{type:"object",required:["id","event","subject","subjectBlobs","createdBy","createdAt"],properties:{id:{type:"integer"},event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventDivert","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore","lex:tools.ozone.moderation.defs#ageAssuranceEvent","lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent","lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent","lex:tools.ozone.moderation.defs#scheduleTakedownEvent","lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent"]},subject:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoView","lex:tools.ozone.moderation.defs#repoViewNotFound","lex:tools.ozone.moderation.defs#recordView","lex:tools.ozone.moderation.defs#recordViewNotFound"]},subjectBlobs:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#blobView"}},createdBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"},modTool:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modTool"}}},subjectStatusView:{type:"object",required:["id","subject","createdAt","updatedAt","reviewState"],properties:{id:{type:"integer"},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:chat.bsky.convo.defs#messageRef"]},hosting:{type:"union",refs:["lex:tools.ozone.moderation.defs#accountHosting","lex:tools.ozone.moderation.defs#recordHosting"]},subjectBlobCids:{type:"array",items:{type:"string",format:"cid"}},subjectRepoHandle:{type:"string"},updatedAt:{type:"string",format:"datetime",description:"Timestamp referencing when the last update was made to the moderation status of the subject"},createdAt:{type:"string",format:"datetime",description:"Timestamp referencing the first moderation status impacting event was emitted on the subject"},reviewState:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectReviewState"},comment:{type:"string",description:"Sticky comment on the subject."},priorityScore:{type:"integer",description:"Numeric value representing the level of priority. Higher score means higher priority.",minimum:0,maximum:100},muteUntil:{type:"string",format:"datetime"},muteReportingUntil:{type:"string",format:"datetime"},lastReviewedBy:{type:"string",format:"did"},lastReviewedAt:{type:"string",format:"datetime"},lastReportedAt:{type:"string",format:"datetime"},lastAppealedAt:{type:"string",format:"datetime",description:"Timestamp referencing when the author of the subject appealed a moderation action"},takendown:{type:"boolean"},appealed:{type:"boolean",description:"True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators."},suspendUntil:{type:"string",format:"datetime"},tags:{type:"array",items:{type:"string"}},accountStats:{description:"Statistics related to the account subject",type:"ref",ref:"lex:tools.ozone.moderation.defs#accountStats"},recordsStats:{description:"Statistics related to the record subjects authored by the subject's account",type:"ref",ref:"lex:tools.ozone.moderation.defs#recordsStats"},ageAssuranceState:{type:"string",description:"Current age assurance state of the subject.",knownValues:["pending","assured","unknown","reset","blocked"]},ageAssuranceUpdatedBy:{type:"string",description:"Whether or not the last successful update to age assurance was made by the user or admin.",knownValues:["admin","user"]}}},subjectView:{description:"Detailed view of a subject. For record subjects, the author's repo and profile will be returned.",type:"object",required:["type","subject"],properties:{type:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"},subject:{type:"string"},status:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoViewDetail"},profile:{type:"union",refs:[]},record:{type:"ref",ref:"lex:tools.ozone.moderation.defs#recordViewDetail"}}},accountStats:{description:"Statistics about a particular account subject",type:"object",properties:{reportCount:{description:"Total number of reports on the account",type:"integer"},appealCount:{description:"Total number of appeals against a moderation action on the account",type:"integer"},suspendCount:{description:"Number of times the account was suspended",type:"integer"},escalateCount:{description:"Number of times the account was escalated",type:"integer"},takedownCount:{description:"Number of times the account was taken down",type:"integer"}}},recordsStats:{description:"Statistics about a set of record subject items",type:"object",properties:{totalReports:{description:"Cumulative sum of the number of reports on the items in the set",type:"integer"},reportedCount:{description:"Number of items that were reported at least once",type:"integer"},escalatedCount:{description:"Number of items that were escalated at least once",type:"integer"},appealedCount:{description:"Number of items that were appealed at least once",type:"integer"},subjectCount:{description:"Total number of item in the set",type:"integer"},pendingCount:{description:'Number of item currently in "reviewOpen" or "reviewEscalated" state',type:"integer"},processedCount:{description:'Number of item currently in "reviewNone" or "reviewClosed" state',type:"integer"},takendownCount:{description:"Number of item currently taken down",type:"integer"}}},subjectReviewState:{type:"string",knownValues:["lex:tools.ozone.moderation.defs#reviewOpen","lex:tools.ozone.moderation.defs#reviewEscalated","lex:tools.ozone.moderation.defs#reviewClosed","lex:tools.ozone.moderation.defs#reviewNone"]},reviewOpen:{type:"token",description:"Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator"},reviewEscalated:{type:"token",description:"Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator"},reviewClosed:{type:"token",description:"Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator"},reviewNone:{type:"token",description:"Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it"},modEventTakedown:{type:"object",description:"Take down a subject permanently or temporarily",properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the takedown should be in effect before automatically expiring."},acknowledgeAccountSubjects:{type:"boolean",description:"If true, all other reports on content authored by this account will be resolved (acknowledged)."},policies:{type:"array",maxLength:5,items:{type:"string"},description:"Names/Keywords of the policies that drove the decision."}}},modEventReverseTakedown:{type:"object",description:"Revert take down action on a subject",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."}}},modEventResolveAppeal:{type:"object",description:"Resolve appeal on a subject",properties:{comment:{type:"string",description:"Describe resolution."}}},modEventComment:{type:"object",description:"Add a comment to a subject. An empty comment will clear any previously set sticky comment.",properties:{comment:{type:"string"},sticky:{type:"boolean",description:"Make the comment persistent on the subject"}}},modEventReport:{type:"object",description:"Report a subject",required:["reportType"],properties:{comment:{type:"string"},isReporterMuted:{type:"boolean",description:"Set to true if the reporter was mut
2ed from reporting at the time of the event. These reports won't impact the reviewState of the subject."},reportType:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}}},modEventLabel:{type:"object",description:"Apply/Negate labels on a subject",required:["createLabelVals","negateLabelVals"],properties:{comment:{type:"string"},createLabelVals:{type:"array",items:{type:"string"}},negateLabelVals:{type:"array",items:{type:"string"}},durationInHours:{type:"integer",description:"Indicates how long the label will remain on the subject. Only applies on labels that are being added."}}},modEventPriorityScore:{type:"object",description:"Set priority score of the subject. Higher score means higher priority.",required:["score"],properties:{comment:{type:"string"},score:{type:"integer",minimum:0,maximum:100}}},ageAssuranceEvent:{type:"object",description:"Age assurance info coming directly from users. Only works on DID subjects.",required:["createdAt","status","attemptId"],properties:{createdAt:{type:"string",format:"datetime",description:"The date and time of this write operation."},status:{type:"string",description:"The status of the age assurance process.",knownValues:["unknown","pending","assured"]},attemptId:{type:"string",description:"The unique identifier for this instance of the age assurance flow, in UUID format."},initIp:{type:"string",description:"The IP address used when initiating the AA flow."},initUa:{type:"string",description:"The user agent used when initiating the AA flow."},completeIp:{type:"string",description:"The IP address used when completing the AA flow."},completeUa:{type:"string",description:"The user agent used when completing the AA flow."}}},ageAssuranceOverrideEvent:{type:"object",description:"Age assurance status override by moderators. Only works on DID subjects.",required:["comment","status"],properties:{status:{type:"string",description:"The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state.",knownValues:["assured","reset","blocked"]},comment:{type:"string",description:"Comment describing the reason for the override."}}},revokeAccountCredentialsEvent:{type:"object",description:"Account credentials revocation by moderators. Only works on DID subjects.",required:["comment"],properties:{comment:{type:"string",description:"Comment describing the reason for the revocation."}}},modEventAcknowledge:{type:"object",properties:{comment:{type:"string"},acknowledgeAccountSubjects:{type:"boolean",description:"If true, all other reports on content authored by this account will be resolved (acknowledged)."}}},modEventEscalate:{type:"object",properties:{comment:{type:"string"}}},modEventMute:{type:"object",description:"Mute incoming reports on a subject",required:["durationInHours"],properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the subject should remain muted."}}},modEventUnmute:{type:"object",description:"Unmute action on a subject",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."}}},modEventMuteReporter:{type:"object",description:"Mute incoming reports from an account",properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the account should remain muted. Falsy value here means a permanent mute."}}},modEventUnmuteReporter:{type:"object",description:"Unmute incoming reports from an account",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."}}},modEventEmail:{type:"object",description:"Keep a log of outgoing email to a user",required:["subjectLine"],properties:{subjectLine:{type:"string",description:"The subject line of the email sent to the user."},content:{type:"string",description:"The content of the email sent to the user."},comment:{type:"string",description:"Additional comment about the outgoing comm."}}},modEventDivert:{type:"object",description:"Divert a record's blobs to a 3rd party service for further scanning/tagging",properties:{comment:{type:"string"}}},modEventTag:{type:"object",description:"Add/Remove a tag on a subject",required:["add","remove"],properties:{add:{type:"array",items:{type:"string"},description:"Tags to be added to the subject. If already exists, won't be duplicated."},remove:{type:"array",items:{type:"string"},description:"Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated."},comment:{type:"string",description:"Additional comment about added/removed tags."}}},accountEvent:{type:"object",description:"Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp","active"],properties:{comment:{type:"string"},active:{type:"boolean",description:"Indicates that the account has a repository which can be fetched from the host that emitted this event."},status:{type:"string",knownValues:["unknown","deactivated","deleted","takendown","suspended","tombstoned"]},timestamp:{type:"string",format:"datetime"}}},identityEvent:{type:"object",description:"Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp"],properties:{comment:{type:"string"},handle:{type:"string",format:"handle"},pdsHost:{type:"string",format:"uri"},tombstone:{type:"boolean"},timestamp:{type:"string",format:"datetime"}}},recordEvent:{type:"object",description:"Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp","op"],properties:{comment:{type:"string"},op:{type:"string",knownValues:["create","update","delete"]},cid:{type:"string",format:"cid"},timestamp:{type:"string",format:"datetime"}}},scheduleTakedownEvent:{type:"object",description:"Logs a scheduled takedown action for an account.",properties:{comment:{type:"string"},executeAt:{type:"string",format:"datetime"},executeAfter:{type:"string",format:"datetime"},executeUntil:{type:"string",format:"datetime"}}},cancelScheduledTakedownEvent:{type:"object",description:"Logs cancellation of a scheduled takedown action for an account.",properties:{comment:{type:"string"}}},repoView:{type:"object",required:["did","handle","relatedRecords","indexedAt","moderation"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}
2,invitesDisabled:{type:"boolean"},inviteNote:{type:"string"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoViewDetail:{type:"object",required:["did","handle","relatedRecords","indexedAt","moderation"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderationDetail"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"},invites:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}},invitesDisabled:{type:"boolean"},inviteNote:{type:"string"},emailConfirmedAt:{type:"string",format:"datetime"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoViewNotFound:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},recordView:{type:"object",required:["uri","cid","value","blobCids","indexedAt","moderation","repo"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"},blobCids:{type:"array",items:{type:"string",format:"cid"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}},recordViewDetail:{type:"object",required:["uri","cid","value","blobs","indexedAt","moderation","repo"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"},blobs:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#blobView"}},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderationDetail"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}},recordViewNotFound:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},moderation:{type:"object",properties:{subjectStatus:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}},moderationDetail:{type:"object",properties:{subjectStatus:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}},blobView:{type:"object",required:["cid","mimeType","size","createdAt"],properties:{cid:{type:"string",format:"cid"},mimeType:{type:"string"},size:{type:"integer"},createdAt:{type:"string",format:"datetime"},details:{type:"union",refs:["lex:tools.ozone.moderation.defs#imageDetails","lex:tools.ozone.moderation.defs#videoDetails"]},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"}}},imageDetails:{type:"object",required:["width","height"],properties:{width:{type:"integer"},height:{type:"integer"}}},videoDetails:{type:"object",required:["width","height","length"],properties:{width:{type:"integer"},height:{type:"integer"},length:{type:"integer"}}},accountHosting:{type:"object",required:["status"],properties:{status:{type:"string",knownValues:["takendown","suspended","deleted","deactivated","unknown"]},updatedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},deletedAt:{type:"string",format:"datetime"},deactivatedAt:{type:"string",format:"datetime"},reactivatedAt:{type:"string",format:"datetime"}}},recordHosting:{type:"object",required:["status"],properties:{status:{type:"string",knownValues:["deleted","unknown"]},updatedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},deletedAt:{type:"string",format:"datetime"}}},reporterStats:{type:"object",required:["did","accountReportCount","recordReportCount","reportedAccountCount","reportedRecordCount","takendownAccountCount","takendownRecordCount","labeledAccountCount","labeledRecordCount"],properties:{did:{type:"string",format:"did"},accountReportCount:{type:"integer",description:"The total number of reports made by the user on accounts."},recordReportCount:{type:"integer",description:"The total number of reports made by the user on records."},reportedAccountCount:{type:"integer",description:"The total number of accounts reported by the user."},reportedRecordCount:{type:"integer",description:"The total number of records reported by the user."},takendownAccountCount:{type:"integer",description:"The total number of accounts taken down as a result of the user's reports."},takendownRecordCount:{type:"integer",description:"The total number of records taken down as a result of the user's reports."},labeledAccountCount:{type:"integer",description:"The total number of accounts labeled as a result of the user's reports."},labeledRecordCount:{type:"integer",description:"The total number of records labeled as a result of the user's reports."}}},modTool:{type:"object",description:"Moderation tool information for tracing the source of the action",required:["name"],properties:{name:{type:"string",description:"Name/identifier of the source (e.g., 'automod', 'ozone/workspace')"}
2,meta:{type:"unknown",description:"Additional arbitrary metadata about the source"}}},timelineEventPlcCreate:{type:"token",description:"Moderation event timeline event for a PLC create operation"},timelineEventPlcOperation:{type:"token",description:"Moderation event timeline event for generic PLC operation"},timelineEventPlcTombstone:{type:"token",description:"Moderation event timeline event for a PLC tombstone operation"},scheduledActionView:{type:"object",description:"View of a scheduled moderation action",required:["id","action","did","createdBy","createdAt","status"],properties:{id:{type:"integer",description:"Auto-incrementing row ID"},action:{type:"string",knownValues:["takedown"],description:"Type of action to be executed"},eventData:{type:"unknown",description:"Serialized event object that will be propagated to the event when performed"},did:{type:"string",format:"did",description:"Subject DID for the action"},executeAt:{type:"string",format:"datetime",description:"Exact time to execute the action"},executeAfter:{type:"string",format:"datetime",description:"Earliest time to execute the action (for randomized scheduling)"},executeUntil:{type:"string",format:"datetime",description:"Latest time to execute the action (for randomized scheduling)"},randomizeExecution:{type:"boolean",description:"Whether execution time should be randomized within the specified range"},createdBy:{type:"string",format:"did",description:"DID of the user who created this scheduled action"},createdAt:{type:"string",format:"datetime",description:"When the scheduled action was created"},updatedAt:{type:"string",format:"datetime",description:"When the scheduled action was last updated"},status:{type:"string",knownValues:["pending","executed","cancelled","failed"],description:"Current status of the scheduled action"},lastExecutedAt:{type:"string",format:"datetime",description:"When the action was last attempted to be executed"},lastFailureReason:{type:"string",description:"Reason for the last execution failure"},executionEventId:{type:"integer",description:"ID of the moderation event created when action was successfully executed"}}}}},ToolsOzoneModerationEmitEvent:{lexicon:1,id:"tools.ozone.moderation.emitEvent",defs:{main:{type:"procedure",description:"Take a moderation action on an actor.",input:{encoding:"application/json",schema:{type:"object",required:["event","subject","createdBy"],properties:{event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventDivert","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore","lex:tools.ozone.moderation.defs#ageAssuranceEvent","lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent","lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent","lex:tools.ozone.moderation.defs#scheduleTakedownEvent","lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent"]},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]},subjectBlobCids:{type:"array",items:{type:"string",format:"cid"}},createdBy:{type:"string",format:"did"},modTool:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modTool"},externalId:{type:"string",description:"An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventView"}},errors:[{name:"SubjectHasAction"}
2,{name:"DuplicateExternalId",description:"An event with the same external ID already exists for the subject."}]}}},ToolsOzoneModerationGetAccountTimeline:{lexicon:1,id:"tools.ozone.moderation.getAccountTimeline",defs:{main:{type:"query",description:"Get timeline of all available events of an account. This includes moderation events, account history and did history.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"object",required:["timeline"],properties:{timeline:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.getAccountTimeline#timelineItem"}}}}},errors:[{name:"RepoNotFound"}]},timelineItem:{type:"object",required:["day","summary"],properties:{day:{type:"string"},summary:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.getAccountTimeline#timelineItemSummary"}}}},timelineItemSummary:{type:"object",required:["eventSubjectType","eventType","count"],properties:{eventSubjectType:{type:"string",knownValues:["account","record","chat"]},eventType:{type:"string",knownValues:["tools.ozone.moderation.defs#modEventTakedown","tools.ozone.moderation.defs#modEventReverseTakedown","tools.ozone.moderation.defs#modEventComment","tools.ozone.moderation.defs#modEventReport","tools.ozone.moderation.defs#modEventLabel","tools.ozone.moderation.defs#modEventAcknowledge","tools.ozone.moderation.defs#modEventEscalate","tools.ozone.moderation.defs#modEventMute","tools.ozone.moderation.defs#modEventUnmute","tools.ozone.moderation.defs#modEventMuteReporter","tools.ozone.moderation.defs#modEventUnmuteReporter","tools.ozone.moderation.defs#modEventEmail","tools.ozone.moderation.defs#modEventResolveAppeal","tools.ozone.moderation.defs#modEventDivert","tools.ozone.moderation.defs#modEventTag","tools.ozone.moderation.defs#accountEvent","tools.ozone.moderation.defs#identityEvent","tools.ozone.moderation.defs#recordEvent","tools.ozone.moderation.defs#modEventPriorityScore","tools.ozone.moderation.defs#revokeAccountCredentialsEvent","tools.ozone.moderation.defs#ageAssuranceEvent","tools.ozone.moderation.defs#ageAssuranceOverrideEvent","tools.ozone.moderation.defs#timelineEventPlcCreate","tools.ozone.moderation.defs#timelineEventPlcOperation","tools.ozone.moderation.defs#timelineEventPlcTombstone","tools.ozone.hosting.getAccountHistory#accountCreated","tools.ozone.hosting.getAccountHistory#emailConfirmed","tools.ozone.hosting.getAccountHistory#passwordUpdated","tools.ozone.hosting.getAccountHistory#handleUpdated","tools.ozone.moderation.defs#scheduleTakedownEvent","tools.ozone.moderation.defs#cancelScheduledTakedownEvent"]},count:{type:"integer"}}}}},ToolsOzoneModerationGetEvent:{lexicon:1,id:"tools.ozone.moderation.getEvent",defs:{main:{type:"query",description:"Get details about a moderation event.",parameters:{type:"params",required:["id"],properties:{id:{type:"integer"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventViewDetail"}}}}},ToolsOzoneModerationGetRecord:{lexicon:1,id:"tools.ozone.moderation.getRecord",defs:{main:{type:"query",description:"Get details about a record.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#recordViewDetail"}},errors:[{name:"RecordNotFound"}]}}},ToolsOzoneModerationGetRecords:{lexicon:1,id:"tools.ozone.moderation.getRecords",defs:{main:{type:"query",description:"Get details about some records.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",maxLength:100,items:{type:"string",format:"at-uri"}}}},output:{encoding:"application/json",schema:{type:"object",required:["records"],properties:{records:{type:"array",items:{type:"union",refs:["lex:tools.ozone.moderation.defs#recordViewDetail","lex:tools.ozone.moderation.defs#recordViewNotFound"]}}}}}}}},ToolsOzoneModerationGetRepo:{lexicon:1,id:"tools.ozone.moderation.getRepo",defs:{main:{type:"query",description:"Get details about a repository.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoViewDetail"}},errors:[{name:"RepoNotFound"}]}}},ToolsOzoneModerationGetReporterStats:{lexicon:1,id:"tools.ozone.moderation.getReporterStats",defs:{main:{type:"query",description:"Get reporter stats for a list of users.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",maxLength:100,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["stats"],properties:{stats:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#reporterStats"}}}}}}}},ToolsOzoneModerationGetRepos:{lexicon:1,id:"tools.ozone.moderation.getRepos",defs:{main:{type:"query",description:"Get details about some repositories.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",maxLength:100,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{repos:{type:"array",items:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]}}}}}}}},ToolsOzoneModerationGetSubjects:{lexicon:1,id:"tools.ozone.moderation.getSubjects",defs:{main:{type:"query",description:"Get details about subjects.",parameters:{type:"params",required:["subjects"],properties:{subjects:{type:"array",maxLength:100,minLength:1,items:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["subjects"],properties:{subjects:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectView"}}}}}}}},ToolsOzoneModerationListScheduledActions:{lexicon:1,id:"tools.ozone.moderation.listScheduledActions",defs:{main:{type:"procedure",description:"List scheduled moderation actions with optional filtering",input:{encoding:"application/json",schema:{type:"object",required:["statuses"],properties:{startsAfter:{type:"string",format:"datetime",description:"Filter actions scheduled to execute after this time"},endsBefore:{type:"string",format:"datetime",description:"Filter actions scheduled to execute before this time"},subjects:{type:"array",maxLength:100,items:{type:"string",format:"did"},description:"Filter actions for specific DID subjects"},statuses:{type:"array",minLength:1,items:{type:"string",knownValues:["pending","executed","cancelled","failed"]},description:"Filter actions by status"},limit:{type:"integer",minimum:1,maximum:100,default:50,description:"Maximum number of results to return"},cursor:{type:"string",description:"Cursor for pagination"}}}},output:{encoding:"application/json",schema:{type:"object",required:["actions"],properties:{actions:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#scheduledActionView"}},cursor:{type:"string",description:"Cursor for next page of results"}}}}}}},ToolsOzoneModerationQueryEvents:{lexicon:1,id:"tools.ozone.moderation.queryEvents",defs:{main:{type:"query",description:"List moderation events related to a subject.",parameters:{type:"params",properties:{types:{type:"array",items:{type:"string"},description:"The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent<name>) to filter by. If not specified, all events are returned."},createdBy:{type:"string",format:"did"},sortDirection:{type:"string",default:"desc",enum:["asc","desc"],description:"Sort direction for the events. Defaults to descending order of created at timestamp."},createdAfter:{type:"string",format:"datetime",description:"Retrieve events created after a given timestamp"},createdBefore:{type:"string",format:"datetime",description:"Retrieve events created before a given timestamp"},subject:{type:"string",format:"uri"},collections:{type:"array",maxLength:20,description:"If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",items:{type:"string",format:"nsid"}},subjectType:{type:"string",description:"If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",knownValues:["account","record"]},includeAllUserRecords:{type:"boolean",default:!1,description:"If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned."},limit:{type:"integer",minimum:1,maximum:100,default:50},hasComment:{type:"boolean",description:"If true, only events with comments are returned"},comment:{type:"string",description:"If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition."},addedLabels:{type:"array",items:{type:"string"},description:"If specified, only events where all of these labels were added are returned"},removedLabels:{type:"array",items:{type:"string"},description:"If specified, only events where all of these labels were removed are returned"},addedTags:{type:"array",items:{type:"string"},description:"If specified, only events where all of these tags were added are returned"},removedTags:{type:"array",items:{type:"string"},description:"If specified, only events where all of these tags were removed are returned"},reportTypes:{type:"array",items:{type:"string"}},policies:{type:"array",items:{type:"string",description:"If specified, only events where the action policies match any of the given policies are returned"}},modTool:{type:"array",items:{type:"string"},description:"If specified, only events where the modTool name matches any of the given values are returned"},batchId:{type:"string",description:"If specified, only events where the batchId matches the given value are returned"},ageAssuranceState:{type:"string",description:"If specified, only events where the age assurance state matches the given value are returned",knownValues:["pending","assured","unknown","reset","blocked"]},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["events"],properties:{cursor:{type:"string"},events:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventView"}}}}}}}},ToolsOzoneModerationQueryStatuses:{lexicon:1,id:"tools.ozone.moderation.queryStatuses",defs:{main:{type:"query",description:"View moderation statuses of subjects (record or repo).",parameters:{type:"params",properties:{queueCount:{type:"integer",description:"Number of queues being used by moderators. Subjects will be split among all queues."},queueIndex:{type:"integer",description:"Index of the queue to fetch subjects from. Works only when queueCount value is specified."},queueSeed:{type:"string",description:"A seeder to shuffle/balance the queue items."},includeAllUserRecords:{type:"boolean",description:"All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned."},subject:{type:"string",format:"uri",description:"The subject to get the status for."},comment:{type:"string",description:"Search subjects by keyword from comments"},reportedAfter:{type:"string",format:"datetime",description:"Search subjects reported after a given timestamp"},reportedBefore:{type:"string",format:"datetime",description:"Search subjects reported before a given timestamp"},reviewedAfter:{type:"string",format:"datetime",description:"Search subjects reviewed after a given timestamp"},hostingDeletedAfter:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was deleted after a given timestamp"},hostingDeletedBefore:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was deleted before a given timestamp"},hostingUpdatedAfter:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was updated after a given timestamp"},hostingUpdatedBefore:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was updated before a given timestamp"},hostingStatuses:{type:"array",items:{type:"string"},description:"Search subjects by the status of the associated record/account"},reviewedBefore:{type:"string",format:"datetime",description:"Search subjects reviewed before a given timestamp"},includeMuted:{type:"boolean",description:"By default, we don't include muted subjects in the results. Set this to true to include them."},onlyMuted:{type:"boolean",description:"When set to true, only muted subjects and reporters will be returned."},reviewState:{type:"string",description:"Specify when fetching subjects in a certain state"},ignoreSubjects:{type:"array",items:{type:"string",format:"uri"}},lastReviewedBy:{type:"string",format:"did",description:"Get all subject statuses that were reviewed by a specific moderator"},sortField:{type:"string",default:"lastReportedAt",enum:["lastReviewedAt","lastReportedAt","reportedRecordsCount","taken
2downRecordsCount","priorityScore"]},sortDirection:{type:"string",default:"desc",enum:["asc","desc"]},takendown:{type:"boolean",description:"Get subjects that were taken down"},appealed:{type:"boolean",description:"Get subjects in unresolved appealed status"},limit:{type:"integer",minimum:1,maximum:100,default:50},tags:{type:"array",maxLength:25,items:{type:"string",description:"Items in this array are applied with OR filters. To apply AND filter, put all tags in the same string and separate using && characters"}},excludeTags:{type:"array",items:{type:"string"}},cursor:{type:"string"},collections:{type:"array",maxLength:20,description:"If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",items:{type:"string",format:"nsid"}},subjectType:{type:"string",description:"If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",knownValues:["account","record"]},minAccountSuspendCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many suspensions will be returned."},minReportedRecordsCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many reported records will be returned."},minTakendownRecordsCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many taken down records will be returned."},minPriorityScore:{minimum:0,maximum:100,type:"integer",description:"If specified, only subjects that have priority score value above the given value will be returned."},ageAssuranceState:{type:"string",description:"If specified, only subjects with the given age assurance state will be returned.",knownValues:["pending","assured","unknown","reset","blocked"]}}},output:{encoding:"application/json",schema:{type:"object",required:["subjectStatuses"],properties:{cursor:{type:"string"},subjectStatuses:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}}}}}}},ToolsOzoneModerationScheduleAction:{lexicon:1,id:"tools.ozone.moderation.scheduleAction",defs:{main:{type:"procedure",description:"Schedule a moderation action to be executed at a future time",input:{encoding:"application/json",schema:{type:"object",required:["action","subjects","createdBy","scheduling"],properties:{action:{type:"union",refs:["lex:tools.ozone.moderation.scheduleAction#takedown"]},subjects:{type:"array",maxLength:100,items:{type:"string",format:"did"},description:"Array of DID subjects to schedule the action for"},createdBy:{type:"string",format:"did"},scheduling:{type:"ref",ref:"lex:tools.ozone.moderation.scheduleAction#schedulingConfig"},modTool:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modTool",description:"This will be propagated to the moderation event when it is applied"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.scheduleAction#scheduledActionResults"}}},takedown:{type:"object",description:"Schedule a takedown action",properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the takedown should be in effect before automatically expiring."},acknowledgeAccountSubjects:{type:"boolean",description:"If true, all other reports on content authored by this account will be resolved (acknowledged)."},policies:{type:"array",maxLength:5,items:{type:"string"},description:"Names/Keywords of the policies that drove the decision."}}},schedulingConfig:{type:"object",description:"Configuration for when the action should be executed",properties:{executeAt:{type:"string",format:"datetime",description:"Exact time to execute the action"},executeAfter:{type:"string",format:"datetime",description:"Earliest time to execute the action (for randomized scheduling)"},executeUntil:{type:"string",format:"datetime",description:"Latest time to execute the action (for randomized scheduling)"}}},scheduledActionResults:{type:"object",required:["succeeded","failed"],properties:{succeeded:{type:"array",items:{type:"string",format:"did"}},failed:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.scheduleAction#failedScheduling"}}}},failedScheduling:{type:"object",required:["subject","error"],properties:{subject:{type:"string",format:"did"},error:{type:"string"},errorCode:{type:"string"}}}}},ToolsOzoneModerationSearchRepos:{lexicon:1,id:"tools.ozone.moderation.searchRepos",defs:{main:{type:"query",description:"Find repositories based on a search term.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead"},q:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{cursor:{type:"string"},repos:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}}}}}}},ToolsOzoneReportDefs:{lexicon:1,id:"tools.ozone.report.defs",defs:{reasonType:{type:"string",knownValues:["tools.ozone.report.defs#reasonAppeal","tools.ozone.report.defs#reasonOther","tools.ozone.report.defs#reasonViolenceAnimal","tools.ozone.report.defs#reasonViolenceThreats","tools.ozone.report.defs#reasonViolenceGraphicContent","tools.ozone.report.defs#reasonViolenceGlorification","tools.ozone.report.defs#reasonViolenceExtremistContent","tools.ozone.report.defs#reasonViolenceTrafficking","tools.ozone.report.defs#reasonViolenceOther","tools.ozone.report.defs#reasonSexualAbuseContent","tools.ozone.report.defs#reasonSexualNCII","tools.ozone.report.defs#reasonSexualDeepfake","tools.ozone.report.defs#reasonSexualAnimal","tools.ozone.report.defs#reasonSexualUnlabeled","tools.ozone.report.defs#reasonSexualOther","tools.ozone.report.defs#reasonChildSafetyCSAM","tools.ozone.report.defs#reasonChildSafetyGroom","tools.ozone.report.defs#reasonChildSafetyPrivacy","tools.ozone.report.defs#reasonChildSafetyHarassment","tools.ozone.report.defs#reasonChildSafetyOther","tools.ozone.report.defs#reasonHarassmentTroll","tools.ozone.report.defs#reasonHarassmentTargeted","tools.ozone.report.defs#reasonHarassmentHateSpeech","tools.ozone.report.defs#reasonHarassmentDoxxing","tools.ozone.report.defs#reasonHarassmentOther","tools.ozone.report.defs#reasonMisleadingBot","tools.ozone.report.defs#reasonMisleadingImpersonation","tools.ozone.report.defs#reasonMisleadingSpam","tools.ozone.report.defs#reasonMisleadingScam","tools.ozone.report.defs#reasonMisleadingElections","tools.ozone.report.defs#reasonMisleadingOther","tools.ozone.report.defs#reasonRuleSiteSecurity","tools.ozone.report.defs#reasonRuleProhibitedSales","tools.ozone.report.defs#reasonRuleBanEvasion","tools.ozone.report.defs#reasonRuleOther","tools.ozone.report.defs#reasonSelfHarmContent","tools.ozone.report.defs#reasonSelfHarmED","tools.ozone.report.defs#reasonSelfHarmStunts","tools.ozone.report.defs#reasonSelfHarmSubstances","tools.ozone.report.defs#reasonSelfHarmOther"]}
2,reasonAppeal:{type:"token",description:"Appeal a previously taken moderation action"},reasonOther:{type:"token",description:"An issue not included in these options"},reasonViolenceAnimal:{type:"token",description:"Animal welfare violations"},reasonViolenceThreats:{type:"token",description:"Threats or incitement"},reasonViolenceGraphicContent:{type:"token",description:"Graphic violent content"},reasonViolenceGlorification:{type:"token",description:"Glorification of violence"},reasonViolenceExtremistContent:{type:"token",description:"Extremist content. These reports will be sent only be sent to the application's Moderation Authority."},reasonViolenceTrafficking:{type:"token",description:"Human trafficking"},reasonViolenceOther:{type:"token",description:"Other violent content"},reasonSexualAbuseContent:{type:"token",description:"Adult sexual abuse content"},reasonSexualNCII:{type:"token",description:"Non-consensual intimate imagery"},reasonSexualDeepfake:{type:"token",description:"Deepfake adult content"},reasonSexualAnimal:{type:"token",description:"Animal sexual abuse"},reasonSexualUnlabeled:{type:"token",description:"Unlabelled adult content"},reasonSexualOther:{type:"token",description:"Other sexual violence content"},reasonChildSafetyCSAM:{type:"token",description:"Child sexual abuse material (CSAM). These reports will be sent only be sent to the application's Moderation Authority."},reasonChildSafetyGroom:{type:"token",description:"Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority."},reasonChildSafetyPrivacy:{type:"token",description:"Privacy violation involving a minor"},reasonChildSafetyHarassment:{type:"token",description:"Harassment or bullying of minors"},reasonChildSafetyOther:{type:"token",description:"Other child safety. These reports will be sent only be sent to the application's Moderation Authority."},reasonHarassmentTroll:{type:"token",description:"Trolling"},reasonHarassmentTargeted:{type:"token",description:"Targeted harassment"},reasonHarassmentHateSpeech:{type:"token",description:"Hate speech"},reasonHarassmentDoxxing:{type:"token",description:"Doxxing"},reasonHarassmentOther:{type:"token",description:"Other harassing or hateful content"},reasonMisleadingBot:{type:"token",description:"Fake account or bot"},reasonMisleadingImpersonation:{type:"token",description:"Impersonation"},reasonMisleadingSpam:{type:"token",description:"Spam"},reasonMisleadingScam:{type:"token",description:"Scam"},reasonMisleadingElections:{type:"token",description:"False information about elections"},reasonMisleadingOther:{type:"token",description:"Other misleading content"},reasonRuleSiteSecurity:{type:"token",description:"Hacking or system attacks"},reasonRuleProhibitedSales:{type:"token",description:"Promoting or selling prohibited items or services"},reasonRuleBanEvasion:{type:"token",description:"Banned user returning"},reasonRuleOther:{type:"token",description:"Other"},reasonSelfHarmContent:{type:"token",description:"Content promoting or depicting self-harm"},reasonSelfHarmED:{type:"token",description:"Eating disorders"},reasonSelfHarmStunts:{type:"token",description:"Dangerous challenges or activities"},reasonSelfHarmSubstances:{type:"token",description:"Dangerous substances or drug abuse"},reasonSelfHarmOther:{type:"token",description:"Other dangerous content"}}},ToolsOzoneSafelinkAddRule:{lexicon:1,id:"tools.ozone.safelink.addRule",defs:{main:{type:"procedure",description:"Add a new URL safety rule",input:{encoding:"application/json",schema:{type:"object",required:["url","pattern","action","reason"],properties:{url:{type:"string",description:"The URL or domain to apply the rule to"},pattern:{type:"ref",ref:"lex:tools.ozone.safelink.defs#patternType"},action:{type:"ref",ref:"lex:tools.ozone.safelink.defs#actionType"},reason:{type:"ref",ref:"lex:tools.ozone.safelink.defs#reasonType"},comment:{type:"string",description:"Optional comment about the decision"},createdBy:{type:"string",format:"did",description:"Author DID. Only respected when using admin auth"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.safelink.defs#event"}},errors:[{name:"InvalidUrl",description:"The provided URL is invali
2d"},{name:"RuleAlreadyExists",description:"A rule for this URL/domain already exists"}]}}},ToolsOzoneSafelinkDefs:{lexicon:1,id:"tools.ozone.safelink.defs",defs:{event:{type:"object",description:"An event for URL safety decisions",required:["id","eventType","url","pattern","action","reason","createdBy","createdAt"],properties:{id:{type:"integer",description:"Auto-incrementing row ID"},eventType:{type:"ref",ref:"lex:tools.ozone.safelink.defs#eventType"},url:{type:"string",description:"The URL that this rule applies to"},pattern:{type:"ref",ref:"lex:tools.ozone.safelink.defs#patternType"},action:{type:"ref",ref:"lex:tools.ozone.safelink.defs#actionType"},reason:{type:"ref",ref:"lex:tools.ozone.safelink.defs#reasonType"},createdBy:{type:"string",format:"did",description:"DID of the user who created this rule"},createdAt:{type:"string",format:"datetime"},comment:{type:"string",description:"Optional comment about the decision"}}},eventType:{type:"string",knownValues:["addRule","updateRule","removeRule"]},patternType:{type:"string",knownValues:["domain","url"]},actionType:{type:"string",knownValues:["block","warn","whitelist"]},reasonType:{type:"string",knownValues:["csam","spam","phishing","none"]},urlRule:{type:"object",description:"Input for creating a URL safety rule",required:["url","pattern","action","reason","createdBy","createdAt","updatedAt"],properties:{url:{type:"string",description:"The URL or domain to apply the rule to"},pattern:{type:"ref",ref:"lex:tools.ozone.safelink.defs#patternType"},action:{type:"ref",ref:"lex:tools.ozone.safelink.defs#actionType"},reason:{type:"ref",ref:"lex:tools.ozone.safelink.defs#reasonType"},comment:{type:"string",description:"Optional comment about the decision"},createdBy:{type:"string",format:"did",description:"DID of the user added the rule."},createdAt:{type:"string",format:"datetime",description:"Timestamp when the rule was created"},updatedAt:{type:"string",format:"datetime",description:"Timestamp when the rule was last updated"}}}}},ToolsOzoneSafelinkQueryEvents:{lexicon:1,id:"tools.ozone.safelink.queryEvents",defs:{main:{type:"procedure",description:"Query URL safety audit events",input:{encoding:"application/json",schema:{type:"object",properties:{cursor:{type:"string",description:"Cursor for pagination"},limit:{type:"integer",minimum:1,maximum:100,default:50,description:"Maximum number of results to return"},urls:{type:"array",items:{type:"string"},description:"Filter by specific URLs or domains"},patternType:{type:"string",description:"Filter by pattern type"},sortDirection:{type:"string",knownValues:["asc","desc"],default:"desc",description:"Sort direction"}}}},output:{encoding:"application/json",schema:{type:"object",required:["events"],properties:{cursor:{type:"string",description:"Next cursor for pagination. Only present if there are more results."},events:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.safelink.defs#event"}}}}}}}},ToolsOzoneSafelinkQueryRules:{lexicon:1,id:"tools.ozone.safelink.queryRules",defs:{main:{type:"procedure",description:"Query URL safety rules",input:{encoding:"application/json",schema:{type:"object",properties:{cursor:{type:"string",description:"Cursor for pagination"},limit:{type:"integer",minimum:1,maximum:100,default:50,description:"Maximum number of results to return"},urls:{type:"array",items:{type:"string"},description:"Filter by specific URLs or domains"},patternType:{type:"string",description:"Filter by pattern type"},actions:{type:"array",items:{type:"string"},description:"Filter by action types"},reason:{type:"string",description:"Filter by reason type"},createdBy:{type:"string",format:"did",description:"Filter by rule creator"},sortDirection:{type:"string",knownValues:["asc","desc"],default:"desc",description:"Sort direction"}}}},output:{encoding:"application/json",schema:{type:"object",required:["rules"],properties:{cursor:{type:"string",description:"Next cursor for pagination. Only present if there are more results."},rules:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.safelink.defs#urlRule"}}}}}}}},ToolsOzoneSafelinkRemoveRule:{lexicon:1,id:"tools.ozone.safelink.removeRule",defs:{main:{type:"procedure",description:"Remove an existing URL safety rule",input:{encoding:"application/json",schema:{type:"object",required:["url","pattern"],properties:{url:{type:"string",description:"The URL or domain to remove the rule for"},pattern:{type:"ref",ref:"lex:tools.ozone.safelink.defs#patternType"},comment:{type:"string",description:"Optional comment about why the rule is being removed"},createdBy:{type:"string",format:"did",description:"Optional DID of the user. Only respected when using admin auth."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.safelink.defs#event"}},errors:[{name:"RuleNotFound",description:"No active rule found for this URL/domain"}]}}},ToolsOzoneSafelinkUpdateRule:{lexicon:1,id:"tools.ozone.safelink.updateRule",defs:{main:{type:"procedure",description:"Update an existing URL safety rule",input:{encoding:"application/json",schema:{type:"object",required:["url","pattern","action","reason"],properties:{url:{type:"string",description:"The URL or domain to update the rule for"},pattern:{type:"ref",ref:"lex:tools.ozone.safelink.defs#patternType"},action:{type:"ref",ref:"lex:tools.ozone.safelink.defs#actionType"},reason:{type:"ref",ref:"lex:tools.ozone.safelink.defs#reasonType"},comment:{type:"string",description:"Optional comment about the update"},createdBy:{type:"string",format:"did",description:"Optional DID to credit as the creator. Only respected for admin_token authentication."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.safelink.defs#event"}},errors:[{name:"RuleNotFound",description:"No active rule found for this URL/domain"}]}}},ToolsOzoneServerGetConfig:{lexicon:1,id:"tools.ozone.server.getConfig",defs:{main:{type:"query",description:"Get details about ozone's server configuration.",output:{encoding:"application/json",schema:{type:"object",properties:{appview:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},pds:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},blobDivert:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},chat:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},viewer:{type:"ref",ref:"lex:tools.ozone.server.getConfig#viewerConfig"},verifierDid:{type:"string",format:"did",description:"The did of the verifier used for verification."}}}}},serviceConfig:{type:"object",properties:{url:{type:"string",format:"uri"}}},viewerConfig:{type:"object",properties:{role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleVerifier"]}}}}},ToolsOzoneSetAddValues:{lexicon:1,id:"tools.ozone.set.addValues",defs:{main:{type:"procedure",description:"Add values to a specific set. Attempting to add values to a set that does not exist will result in an error.",input:{encoding:"application/json",schema:{type:"object",required:["name","values"],properties:{name:{type:"string",description:"Name of the set to add values to"},values:{type:"array",minLength:1,maxLength:1e3,items:{type:"string"}
2,description:"Array of string values to add to the set"}}}}}}},ToolsOzoneSetDefs:{lexicon:1,id:"tools.ozone.set.defs",defs:{set:{type:"object",required:["name"],properties:{name:{type:"string",minLength:3,maxLength:128},description:{type:"string",maxGraphemes:1024,maxLength:10240}}},setView:{type:"object",required:["name","setSize","createdAt","updatedAt"],properties:{name:{type:"string",minLength:3,maxLength:128},description:{type:"string",maxGraphemes:1024,maxLength:10240},setSize:{type:"integer"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}},ToolsOzoneSetDeleteSet:{lexicon:1,id:"tools.ozone.set.deleteSet",defs:{main:{type:"procedure",description:"Delete an entire set. Attempting to delete a set that does not exist will result in an error.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string",description:"Name of the set to delete"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetDeleteValues:{lexicon:1,id:"tools.ozone.set.deleteValues",defs:{main:{type:"procedure",description:"Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error",input:{encoding:"application/json",schema:{type:"object",required:["name","values"],properties:{name:{type:"string",description:"Name of the set to delete values from"},values:{type:"array",minLength:1,items:{type:"string"},description:"Array of string values to delete from the set"}}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetGetValues:{lexicon:1,id:"tools.ozone.set.getValues",defs:{main:{type:"query",description:"Get a specific set and its values",parameters:{type:"params",required:["name"],properties:{name:{type:"string"},limit:{type:"integer",minimum:1,maximum:1e3,default:100},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["set","values"],properties:{set:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"},values:{type:"array",items:{type:"string"}},cursor:{type:"string"}}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetQuerySets:{lexicon:1,id:"tools.ozone.set.querySets",defs:{main:{type:"query",description:"Query available sets",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},namePrefix:{type:"string"},sortBy:{type:"string",enum:["name","createdAt","updatedAt"],default:"name"},sortDirection:{type:"string",default:"asc",enum:["asc","desc"],description:"Defaults to ascending order of name field."}}},output:{encoding:"application/json",schema:{type:"object",required:["sets"],properties:{sets:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"}},cursor:{type:"string"}}}}}}},ToolsOzoneSetUpsertSet:{lexicon:1,id:"tools.ozone.set.upsertSet",defs:{main:{type:"procedure",description:"Create or update set metadata",input:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.set.defs#set"}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"}}}}},ToolsOzoneSettingDefs:{lexicon:1,id:"tools.ozone.setting.defs",defs:{option:{type:"object",required:["key","value","did","scope","createdBy","lastUpdatedBy"],properties:{key:{type:"string",format:"nsid"},did:{type:"string",format:"did"},value:{type:"unknown"},description:{type:"string",maxGraphemes:1024,maxLength:10240},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"},managerRole:{type:"string",knownValues:["tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleVerifier"]},scope:{type:"string",knownValues:["instance","personal"]},createdBy:{type:"string",format:"did"},lastUpdatedBy:{type:"string",format:"did"}}}}},ToolsOzoneSettingListOptions:{lexicon:1,id:"tools.ozone.setting.listOptions",defs:{main:{type:"query",description:"List settings with optional filtering",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},scope:{type:"string",knownValues:["instance","personal"],default:"instance"},prefix:{type:"string",description:"Filter keys by prefix"},keys:{type:"array",maxLength:100,items:{type:"string",format:"nsid"},description:"Filter for only the specified keys. Ignored if prefix is provided"}}},output:{encoding:"application/json",schema:{type:"object",required:["options"],properties:{cursor:{type:"string"},options:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.setting.defs#option"}}}}}}}},ToolsOzoneSettingRemoveOptions:{lexicon:1,id:"tools.ozone.setting.removeOptions",defs:{main:{type:"procedure",description:"Delete settings by key",input:{encoding:"application/json",schema:{type:"object",required:["keys","scope"],properties:{keys:{type:"array",minLength:1,maxLength:200,items:{type:"string",format:"nsid"}},scope:{type:"string",knownValues:["instance","personal"]}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ToolsOzoneSettingUpsertOption:{lexicon:1,id:"tools.ozone.setting.upsertOption",defs:{main:{type:"procedure",description:"Create or update setting option",input:{encoding:"application/json",schema:{type:"object",required:["key","scope","value"],properties:{key:{type:"string",format:"nsid"},scope:{type:"string",knownValues:["instance","personal"]},value:{type:"unknown"},description:{type:"string",maxLength:2e3},managerRole:{type:"string",knownValues:["tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleVerifier","tools.ozone.team.defs#roleAdmin"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["option"],properties:{option:{type:"ref",ref:"lex:tools.ozone.setting.defs#option"}}}}}}},ToolsOzoneSignatureDefs:{lexicon:1,id:"tools.ozone.signature.defs",defs:{sigDetail:{type:"object",required:["property","value"],properties:{property:{type:"string"},value:{type:"string"}}}}},ToolsOzoneSignatureFindCorrelation:{lexicon:1,id:"tools.ozone.signature.findCorrelation",defs:{main:{type:"query",description:"Find all correlated threat signatures between 2 or more accounts.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["details"],properties:{details:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.defs#sigDetail"}}}}}}}},ToolsOzoneSignatureFindRelatedAccounts:{lexicon:1,id:"tools.ozone.signature.findRelatedAccounts",defs:{main:{type:"query",description:"Get accounts that share some matching threat signatures with the root account.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.findRelatedAccounts#relatedAccount"}}}}}},relatedAccount:{type:"object",required:["account"],properties:{account:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"},similarities:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.defs#sigDetail"}}}}}},ToolsOzoneSignatureSearchAccounts:{lexicon:1,id:"tools.ozone.signature.searchAccounts",defs:{main:{type:"query",description:"Search for accounts that match one or more threat signature values.",parameters:{type:"params",required:["values"],properties:{values:{type:"array",items:{type:"string"}},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ToolsOzoneTeamAddMember:{lexicon:1,id:"tools.ozone.team.addMember",def
2s:{main:{type:"procedure",description:"Add a member to the ozone team. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did","role"],properties:{did:{type:"string",format:"did"},role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleVerifier","tools.ozone.team.defs#roleTriage"]}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}},errors:[{name:"MemberAlreadyExists",description:"Member already exists in the team."}]}}},ToolsOzoneTeamDefs:{lexicon:1,id:"tools.ozone.team.defs",defs:{member:{type:"object",required:["did","role"],properties:{did:{type:"string",format:"did"},disabled:{type:"boolean"},profile:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"},lastUpdatedBy:{type:"string"},role:{type:"string",knownValues:["lex:tools.ozone.team.defs#roleAdmin","lex:tools.ozone.team.defs#roleModerator","lex:tools.ozone.team.defs#roleTriage","lex:tools.ozone.team.defs#roleVerifier"]}}},roleAdmin:{type:"token",description:"Admin role. Highest level of access, can perform all actions."},roleModerator:{type:"token",description:"Moderator role. Can perform most actions."},roleTriage:{type:"token",description:"Triage role. Mostly intended for monitoring and escalating issues."},roleVerifier:{type:"token",description:"Verifier role. Only allowed to issue verifications."}}},ToolsOzoneTeamDeleteMember:{lexicon:1,id:"tools.ozone.team.deleteMember",defs:{main:{type:"procedure",description:"Delete a member from ozone team. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}},errors:[{name:"MemberNotFound",description:"The member being deleted does not exist"},{name:"CannotDeleteSelf",description:"You can not delete yourself from the team"}]}}},ToolsOzoneTeamListMembers:{lexicon:1,id:"tools.ozone.team.listMembers",defs:{main:{type:"query",description:"List all members with access to the ozone service.",parameters:{type:"params",properties:{q:{type:"string"},disabled:{type:"boolean"},roles:{type:"array",items:{type:"string"}},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["members"],properties:{cursor:{type:"string"},members:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}}}}}}}},ToolsOzoneTeamUpdateMember:{lexicon:1,id:"tools.ozone.team.updateMember",defs:{main:{type:"procedure",description:"Update a member in the ozone service. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"},disabled:{type:"boolean"},role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleVerifier","tools.ozone.team.defs#roleTriage"]}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}},errors:[{name:"MemberNotFound",description:"The member being updated does not exist in the team"}]}}},ToolsOzoneVerificationDefs:{lexicon:1,id:"tools.ozone.verification.defs",defs:{verificationView:{type:"object",description:"Verification data for the associated subject.",required:["issuer","uri","subject","handle","displayName","createdAt"],properties:{issuer:{type:"string",description:"The user who issued this verification.",format:"did"},uri:{type:"string",description:"The AT-URI of the verification record.",format:"at-uri"},subject:{type:"string",format:"did",description:"The subject of the verification."},handle:{type:"string",description:"Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.",format:"handle"},displayName:{type:"string",description:"Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying."}
2,createdAt:{type:"string",description:"Timestamp when the verification was created.",format:"datetime"},revokeReason:{type:"string",description:"Describes the reason for revocation, also indicating that the verification is no longer valid."},revokedAt:{type:"string",description:"Timestamp when the verification was revoked.",format:"datetime"},revokedBy:{type:"string",description:"The user who revoked this verification.",format:"did"},subjectProfile:{type:"union",refs:[]},issuerProfile:{type:"union",refs:[]},subjectRepo:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]},issuerRepo:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]}}}}},ToolsOzoneVerificationGrantVerifications:{lexicon:1,id:"tools.ozone.verification.grantVerifications",defs:{main:{type:"procedure",description:"Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.",input:{encoding:"application/json",schema:{type:"object",required:["verifications"],properties:{verifications:{type:"array",description:"Array of verification requests to process",maxLength:100,items:{type:"ref",ref:"lex:tools.ozone.verification.grantVerifications#verificationInput"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["verifications","failedVerifications"],properties:{verifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.defs#verificationView"}},failedVerifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.grantVerifications#grantError"}}}}}},verificationInput:{type:"object",required:["subject","handle","displayName"],properties:{subject:{type:"string",description:"The did of the subject being verified",format:"did"},handle:{type:"string",description:"Handle of the subject the verification applies to at the moment of verifying.",format:"handle"},displayName:{type:"string",description:"Display name of the subject the verification applies to at the moment of verifying."},createdAt:{type:"string",format:"datetime",description:"Timestamp for verification record. Defaults to current time when not specified."}}},grantError:{type:"object",description:"Error object for failed verifications.",required:["error","subject"],properties:{error:{type:"string",description:"Error message describing the reason for failure."},subject:{type:"string",description:"The did of the subject being verified",format:"did"}}}}},ToolsOzoneVerificationListVerifications:{lexicon:1,id:"tools.ozone.verification.listVerifications",defs:{main:{type:"query",description:"List verifications",parameters:{type:"params",properties:{cursor:{type:"string",description:"Pagination cursor"},limit:{type:"integer",description:"Maximum number of results to return",minimum:1,maximum:100,default:50},createdAfter:{type:"string",format:"datetime",description:"Filter to verifications created after this timestamp"},createdBefore:{type:"string",format:"datetime",description:"Filter to verifications created before this timestamp"},issuers:{type:"array",maxLength:100,description:"Filter to verifications from specific issuers",items:{type:"string",format:"did"}},subjects:{type:"array",description:"Filter to specific verified DIDs",maxLength:100,items:{type:"string",format:"did"}},sortDirection:{type:"string",description:"Sort direction for creation date",enum:["asc","desc"],default:"desc"},isRevoked:{type:"boolean",description:"Filter to verifications that are revoked or not. By default, includes both."}}},output:{encoding:"application/json",schema:{type:"object",required:["verifications"],properties:{cursor:{type:"string"},verifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.defs#verificationView"}}}}}}}},ToolsOzoneVerificationRevokeVerifications:{lexicon:1,id:"tools.ozone.verification.revokeVerifications",defs:{main:{type:"procedure",description:"Revoke previously granted verifications in batches of up to 100.",input:{encoding:"application/json",schema:{type:"object",required:["uris"],properties:{uris:{type:"array",description:"Array of verification record uris to revoke",maxLength:100,items:{type:"string",description:"The AT-URI of the verification record to revoke.",format:"at-uri"}},revokeReason:{type:"string",description:"Reason for revoking the verification. This is optional and can be omitted if not needed.",maxLength:1e3}}}},output:{encoding:"application/json",schema:{type:"object",required:["revokedVerifications","failedRevocations"],properties:{revokedVerifications:{type:"array",description:"List of verification uris successfully revoked",items:{type:"string",format:"at-uri"}},failedRevocations:{type:"array",description:"List of verification uris that couldn't be revoked, including failure reasons",items:{type:"ref",ref:"lex:tools.ozone.verification.revokeVerifications#revokeError"}}}}}},revokeError:{type:"object",description:"Error object for failed revocations",required:["uri","error"],properties:{uri:{type:"string",description:"The AT-URI of the verification record that failed to revoke.",format:"at-uri"},error:{type:"string",description:"Description of the error that occurred during revocation."}}}}}},o.schemas=Object.values(o.schemaDict),o.lexicons=new e.Lexicons(o.schemas);function t(i,n,s,l){return(l?r.is$typed:r.maybe$typed)(i,n,s)?o.lexicons.validate(`${n}#${s}
2`,i):{success:!1,error:new e.ValidationError(`Must be an object with "${s==="main"?n:`${n}#${s}`}" $type property`)}}o.ids={AppBskyActorDefs:"app.bsky.actor.defs",AppBskyActorGetPreferences:"app.bsky.actor.getPreferences",AppBskyActorGetProfile:"app.bsky.actor.getProfile",AppBskyActorGetProfiles:"app.bsky.actor.getProfiles",AppBskyActorGetSuggestions:"app.bsky.actor.getSuggestions",AppBskyActorProfile:"app.bsky.actor.profile",AppBskyActorPutPreferences:"app.bsky.actor.putPreferences",AppBskyActorSearchActors:"app.bsky.actor.searchActors",AppBskyActorSearchActorsTypeahead:"app.bsky.actor.searchActorsTypeahead",AppBskyActorStatus:"app.bsky.actor.status",AppBskyBookmarkCreateBookmark:"app.bsky.bookmark.createBookmark",AppBskyBookmarkDefs:"app.bsky.bookmark.defs",AppBskyBookmarkDeleteBookmark:"app.bsky.bookmark.deleteBookmark",AppBskyBookmarkGetBookmarks:"app.bsky.bookmark.getBookmarks",AppBskyEmbedDefs:"app.bsky.embed.defs",AppBskyEmbedExternal:"app.bsky.embed.external",AppBskyEmbedImages:"app.bsky.embed.images",AppBskyEmbedRecord:"app.bsky.embed.record",AppBskyEmbedRecordWithMedia:"app.bsky.embed.recordWithMedia",AppBskyEmbedVideo:"app.bsky.embed.video",AppBskyFeedDefs:"app.bsky.feed.defs",AppBskyFeedDescribeFeedGenerator:"app.bsky.feed.describeFeedGenerator",AppBskyFeedGenerator:"app.bsky.feed.generator",AppBskyFeedGetActorFeeds:"app.bsky.feed.getActorFeeds",AppBskyFeedGetActorLikes:"app.bsky.feed.getActorLikes",AppBskyFeedGetAuthorFeed:"app.bsky.feed.getAuthorFeed",AppBskyFeedGetFeed:"app.bsky.feed.getFeed",AppBskyFeedGetFeedGenerator:"app.bsky.feed.getFeedGenerator",AppBskyFeedGetFeedGenerators:"app.bsky.feed.getFeedGenerators",AppBskyFeedGetFeedSkeleton:"app.bsky.feed.getFeedSkeleton",AppBskyFeedGetLikes:"app.bsky.feed.getLikes",AppBskyFeedGetListFeed:"app.bsky.feed.getListFeed",AppBskyFeedGetPostThread:"app.bsky.feed.getPostThread",AppBskyFeedGetPosts:"app.bsky.feed.getPosts",AppBskyFeedGetQuotes:"app.bsky.feed.getQuotes",AppBskyFeedGetRepostedBy:"app.bsky.feed.getRepostedBy",AppBskyFeedGetSuggestedFeeds:"app.bsky.feed.getSuggestedFeeds",AppBskyFeedGetTimeline:"app.bsky.feed.getTimeline",AppBskyFeedLike:"app.bsky.feed.like",AppBskyFeedPost:"app.bsky.feed.post",AppBskyFeedPostgate:"app.bsky.feed.postgate",AppBskyFeedRepost:"app.bsky.feed.repost",AppBskyFeedSearchPosts:"app.bsky.feed.searchPosts",AppBskyFeedSendInteractions:"app.bsky.feed.sendInteractions",AppBskyFeedThreadgate:"app.bsky.feed.threadgate",AppBskyGraphBlock:"app.bsky.graph.block",AppBskyGraphDefs:"app.bsky.graph.defs",AppBskyGraphFollow:"app.bsky.graph.follow",AppBskyGraphGetActorStarterPacks:"app.bsky.graph.getActorStarterPacks",AppBskyGraphGetBlocks:"app.bsky.graph.getBlocks",AppBskyGraphGetFollowers:"app.bsky.graph.getFollowers",AppBskyGraphGetFollows:"app.bsky.graph.getFollows",AppBskyGraphGetKnownFollowers:"app.bsky.graph.getKnownFollowers",AppBskyGraphGetList:"app.bsky.graph.getList",AppBskyGraphGetListBlocks:"app.bsky.graph.getListBlocks",AppBskyGraphGetListMutes:"app.bsky.graph.getListMutes",AppBskyGraphGetLists:"app.bsky.graph.getLists",AppBskyGraphGetListsWithMembership:"app.bsky.graph.getListsWithMembership",AppBskyGraphGetMutes:"app.bsky.graph.getMutes",AppBskyGraphGetRelationships:"app.bsky.graph.getRelationships",AppBskyGraphGetStarterPack:"app.bsky.graph.getStarterPack",AppBskyGraphGetStarterPacks:"app.bsky.graph.getStarterPacks",AppBskyGraphGetStarterPacksWithMembership:"app.bsky.graph.getStarterPacksWithMembership",AppBskyGraphGetSuggestedFollowsByActor:"app.bsky.graph.getSuggestedFollowsByActor",AppBskyGraphList:"app.bsky.graph.list",AppBskyGraphListblock:"app.bsky.graph.listblock",AppBskyGraphListitem:"app.bsky.graph.listitem",AppBskyGraphMuteActor:"app.bsky.graph.muteActor",AppBskyGraphMuteActorList:"app.bsky.graph.muteActorList",AppBskyGraphMuteThread:"app.bsky.graph.muteThread",AppBskyGraphSearchStarterPacks:"app.bsky.graph.searchStarterPacks",AppBskyGraphStarterpack:"app.bsky.graph.starterpack",AppBskyGraphUnmuteActor:"app.bsky.graph.unmuteActor",AppBskyGraphUnmuteActorList:"app.bsky.graph.unmuteActorList",AppBskyGraphUnmuteThread:"app.bsky.graph.unmuteThread",AppBskyGraphVerification:"app.bsky.graph.verification",AppBskyLabelerDefs:"app.bsky.labeler.defs",AppBskyLabelerGetServices:"app.bsky.labeler.getServices",AppBskyLabelerService:"app.bsky.labeler.service",AppBskyNotificationDeclaration:"app.bsky.notification.declaration",AppBskyNotificationDefs:"app.bsky.notification.defs",AppBskyNotificationGetPreferences:"app.bsky.notification.getPreferences",AppBskyNotificationGetUnreadCount:"app.bsky.notification.getUnreadCount",AppBskyNotificationListActivitySubscriptions:"app.bsky.notification.listActivitySubscriptions",AppBskyNotificationListNotifications:"app.bsky.notification.listNotifications",AppBskyNotificationPutActivitySubscription:"app.bsky.notification.putActivitySubscription",AppBskyNotificationPutPreferences:"app.bsky.notification.putPreferences",AppBskyNotificationPutPreferencesV2:"app.bsky.notification.putPreferencesV2",AppBskyNotificationRegisterPush:"app.bsky.notification.registerPush",AppBskyNotificationUnregisterPush:"app.bsky.notification.unregisterPush",AppBskyNotificationUpdateSeen:"app.bsky.notification.updateSeen",AppBskyRichtextFacet:"app.bsky.richtext.facet",AppBskyUnspeccedDefs:"app.bsky.unspecced.defs",AppBskyUnspeccedGetAgeAssuranceState:"app.bsky.unspecced.getAgeAssuranceState",AppBskyUnspeccedGetConfig:"app.bsky.unspecced.getConfig",AppBskyUnspeccedGetOnboardingSuggestedStarterPacks:"app.bsky.unspecced.getOnboardingSuggestedStarterPacks",AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton:"app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton",AppBskyUnspeccedGetPopularFeedGenerators:"app.bsky.unspecced.getPopularFeedGenerators",AppBskyUnspeccedGetPostThreadOtherV2:"app.bsky.unspecced.getPostThreadOtherV2",AppBskyUnspeccedGetPostThreadV2:"app.bsky.unspecced.getPostThreadV2",AppBskyUnspeccedGetSuggestedFeeds:"app.bsky.unspecced.getSuggestedFeeds",AppBskyUnspeccedGetSuggestedFeedsSkeleton:"app.bsky.unspecced.getSuggestedFeedsSkeleton",AppBskyUnspeccedGetSuggestedStarterPacks:"app.bsky.unspecced.getSuggestedStarterPacks",AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:"app.bsky.unspecced.getSuggestedStarterPacksSkeleton",AppBskyUnspeccedGetSuggestedUsers:"app.bsky.unspecced.getSuggestedUsers",AppBskyUnspeccedGetSuggestedUsersSkeleton:"app.bsky.unspecced.getSuggestedUsersSkeleton",AppBskyUnspeccedGetSuggestionsSkeleton:"app.bsky.unspecced.getSuggestionsSkeleton",AppBskyUnspeccedGetTaggedSuggestions:"app.bsky.unspecced.getTaggedSuggestions",AppBskyUnspeccedGetTrendingTopics:"app.bsky.unspecced.getTrendingTopics",AppBskyUnspeccedGetTrends:"app.bsky.unspecced.getTrends",AppBskyUnspeccedGetTrendsSkeleton:"app.bsky.unspecced.getTrendsSkeleton",AppBskyUnspeccedInitAgeAssurance:"app.bsky.unspecced.initAgeAssurance",AppBskyUnspeccedSearchActorsSkeleton:"app.bsky.unspecced.searchActorsSkeleton",AppBskyUnspeccedSearchPostsSkeleton:"app.bsky.unspecced.searchPostsSkeleton",AppBskyUnspeccedSearchStarterPacksSkeleton:"app.bsky.unspecced.searchStarterPacksSkeleton",AppBskyVideoDefs:"app.bsky.video.defs",AppBskyVideoGetJobStatus:"app.bsky.video.getJobStatus",AppBskyVideoGet
2UploadLimits:"app.bsky.video.getUploadLimits",AppBskyVideoUploadVideo:"app.bsky.video.uploadVideo",ChatBskyActorDeclaration:"chat.bsky.actor.declaration",ChatBskyActorDefs:"chat.bsky.actor.defs",ChatBskyActorDeleteAccount:"chat.bsky.actor.deleteAccount",ChatBskyActorExportAccountData:"chat.bsky.actor.exportAccountData",ChatBskyConvoAcceptConvo:"chat.bsky.convo.acceptConvo",ChatBskyConvoAddReaction:"chat.bsky.convo.addReaction",ChatBskyConvoDefs:"chat.bsky.convo.defs",ChatBskyConvoDeleteMessageForSelf:"chat.bsky.convo.deleteMessageForSelf",ChatBskyConvoGetConvo:"chat.bsky.convo.getConvo",ChatBskyConvoGetConvoAvailability:"chat.bsky.convo.getConvoAvailability",ChatBskyConvoGetConvoForMembers:"chat.bsky.convo.getConvoForMembers",ChatBskyConvoGetLog:"chat.bsky.convo.getLog",ChatBskyConvoGetMessages:"chat.bsky.convo.getMessages",ChatBskyConvoLeaveConvo:"chat.bsky.convo.leaveConvo",ChatBskyConvoListConvos:"chat.bsky.convo.listConvos",ChatBskyConvoMuteConvo:"chat.bsky.convo.muteConvo",ChatBskyConvoRemoveReaction:"chat.bsky.convo.removeReaction",ChatBskyConvoSendMessage:"chat.bsky.convo.sendMessage",ChatBskyConvoSendMessageBatch:"chat.bsky.convo.sendMessageBatch",ChatBskyConvoUnmuteConvo:"chat.bsky.convo.unmuteConvo",ChatBskyConvoUpdateAllRead:"chat.bsky.convo.updateAllRead",ChatBskyConvoUpdateRead:"chat.bsky.convo.updateRead",ChatBskyModerationGetActorMetadata:"chat.bsky.moderation.getActorMetadata",ChatBskyModerationGetMessageContext:"chat.bsky.moderation.getMessageContext",ChatBskyModerationUpdateActorAccess:"chat.bsky.moderation.updateActorAccess",ComAtprotoAdminDefs:"com.atproto.admin.defs",ComAtprotoAdminDeleteAccount:"com.atproto.admin.deleteAccount",ComAtprotoAdminDisableAccountInvites:"com.atproto.admin.disableAccountInvites",ComAtprotoAdminDisableInviteCodes:"com.atproto.admin.disableInviteCodes",ComAtprotoAdminEnableAccountInvites:"com.atproto.admin.enableAccountInvites",ComAtprotoAdminGetAccountInfo:"com.atproto.admin.getAccountInfo",ComAtprotoAdminGetAccountInfos:"com.atproto.admin.getAccountInfos",ComAtprotoAdminGetInviteCodes:"com.atproto.admin.getInviteCodes",ComAtprotoAdminGetSubjectStatus:"com.atproto.admin.getSubjectStatus",ComAtprotoAdminSearchAccounts:"com.atproto.admin.searchAccounts",ComAtprotoAdminSendEmail:"com.atproto.admin.sendEmail",ComAtprotoAdminUpdateAccountEmail:"com.atproto.admin.updateAccountEmail",ComAtprotoAdminUpdateAccountHandle:"com.atproto.admin.updateAccountHandle",ComAtprotoAdminUpdateAccountPassword:"com.atproto.admin.updateAccountPassword",ComAtprotoAdminUpdateAccountSigningKey:"com.atproto.admin.updateAccountSigningKey",ComAtprotoAdminUpdateSubjectStatus:"com.atproto.admin.updateSubjectStatus",ComAtprotoIdentityDefs:"com.atproto.identity.defs",ComAtprotoIdentityGetRecommendedDidCredentials:"com.atproto.identity.getRecommendedDidCredentials",ComAtprotoIdentityRefreshIdentity:"com.atproto.identity.refreshIdentity",ComAtprotoIdentityRequestPlcOperationSignature:"com.atproto.identity.requestPlcOperationSignature",ComAtprotoIdentityResolveDid:"com.atproto.identity.resolveDid",ComAtprotoIdentityResolveHandle:"com.atproto.identity.resolveHandle",ComAtprotoIdentityResolveIdentity:"com.atproto.identity.resolveIdentity",ComAtprotoIdentitySignPlcOperation:"com.atproto.identity.signPlcOperation",ComAtprotoIdentitySubmitPlcOperation:"com.atproto.identity.submitPlcOperation",ComAtprotoIdentityUpdateHandle:"com.atproto.identity.updateHandle",ComAtprotoLabelDefs:"com.atproto.label.defs",ComAtprotoLabelQueryLabels:"com.atproto.label.queryLabels",ComAtprotoLabelSubscribeLabels:"com.atproto.label.subscribeLabels",ComAtprotoLexiconSchema:"com.atproto.lexicon.schema",ComAtprotoModerationCreateReport:"com.atproto.moderation.createReport",ComAtprotoModerationDefs:"com.atproto.moderation.defs",ComAtprotoRepoApplyWrites:"com.atproto.repo.applyWrites",ComAtprotoRepoCreateRecord:"com.atproto.repo.createRecord",ComAtprotoRepoDefs:"com.atproto.repo.defs",ComAtprotoRepoDeleteRecord:"com.atproto.repo.deleteRecord",ComAtprotoRepoDescribeRepo:"com.atproto.repo.describeRepo",ComAtprotoRepoGetRecord:"com.atproto.repo.getRecord",ComAtprotoRepoImportRepo:"com.atproto.repo.importRepo",ComAtprotoRepoListMissingBlobs:"com.atproto.repo.listMissingBlobs",ComAtprotoRepoListRecords:"com.atproto.repo.listRecords",ComAtprotoRepoPutRecord:"com.atproto.repo.putRecord",ComAtprotoRepoStrongRef:"com.atproto.repo.strongRef",ComAtprotoRepoUploadBlob:"com.atproto.repo.uploadBlob",ComAtprotoServerActivateAccount:"com.atproto.server.activateAccount",ComAtprotoServerCheckAccountStatus:"com.atproto.server.checkAccountStatus",ComAtprotoServerConfirmEmail:"com.atproto.server.confirmEmail",ComAtprotoServerCreateAccount:"com.atproto.server.createAccount",ComAtprotoServerCreateAppPassword:"com.atproto.server.createAppPassword",ComAtprotoServerCreateInviteCode:"com.atproto.server.createInviteCode",ComAtprotoServerCreateInviteCodes:"com.atproto.server.createInviteCodes",ComAtprotoServerCreateSession:"com.atproto.server.createSession",ComAtprotoServerDeactivateAccount:"com.atproto.server.deactivateAccount",ComAtprotoServerDefs:"com.atproto.server.defs",ComAtprotoServerDeleteAccount:"com.atproto.server.deleteAccount",ComAtprotoServerDeleteSession:"com.atproto.server.deleteSession",ComAtprotoServerDescribeServer:"com.atproto.server.describeServer",ComAtprotoServerGetAccountInviteCodes:"com.atproto.server.getAccountInviteCodes",ComAtprotoServerGetServiceAuth:"com.atproto.server.getServiceAuth",ComAtprotoServerGetSession:"com.atproto.server.getSession",ComAtprotoServerListAppPasswords:"com.atproto.server.listAppPasswords",ComAtprotoServerRefreshSession:"com.atproto.server.refreshSession",ComAtprotoServerRequestAccountDelete:"com.atproto.server.requestAccountDelete",ComAtprotoServerRequestEmailConfirmation:"com.atproto.server.requestEmailConfirmation",ComAtprotoServerRequestEmailUpdate:"com.atproto.server.requestEmailUpdate",ComAtprotoServerRequestPasswordReset:"com.atproto.server.requestPasswordReset",ComAtprotoServerReserveSigningKey:"com.atproto.server.reserveSigningKey",ComAtprotoServerResetPassword:"com.atproto.server.resetPassword",ComAtprotoServerRevokeAppPassword:"com.atproto.server.revokeAppPassword",ComAtprotoServerUpdateEmail:"com.atproto.server.updateEmail",ComAtprotoSyncDefs:"com.atproto.sync.defs",ComAtprotoSyncGetBlob:"com.atproto.sync.getBlob",ComAtprotoSyncGetBlocks:"com.atproto.sync.getBlocks",ComAtprotoSyncGetCheckout:"com.atproto.sync.getCheckout",ComAtprotoSyncGetHead:"com.atproto.sync.getHead",ComAtprotoSyncGetHostStatus:"com.atproto.sync.getHostStatus",ComAtprotoSyncGetLatestCommit:"com.atproto.sync.getLatestCommit",ComAtprotoSyncGetRecord:"com.atproto.sync.getRecord",ComAtprotoSyncGetRepo:"com.atproto.sync.getRepo",ComAtprotoSyncGetRepoStatus:"com.atproto.sync.getRepoStatus",ComAtprotoSyncListBlobs:"com.atproto.sync.listBlobs",ComAtprotoSyncListHosts:"com.atproto.sync.listHosts",ComAtprotoSyncListRepos:"com.atproto.sync.listRepos",ComAtprotoSyncListReposByCollection:"com.atproto.sync.listReposByCollection",ComAtprotoSyncNotifyOfUpdate:"com.atproto.sync.notifyOfUpdate",ComAtprotoSyncRequestCrawl:"com.atproto.sync.requestCrawl",ComAtprotoSyncSubscribeRepos:"com.atproto.sync.subscribeRepos",ComAtprotoTempAddReservedHandle:"com.atproto.temp.addReservedHandle",ComAtprotoTempCheckHandleAvailability:"com.atproto.temp.checkHandleAvailability",ComAtprotoTempCheckSignupQueue:"com.atproto.temp.checkSignupQueue",ComAtprotoTempDereferenceScope:"com.atproto.temp.dereferenceScope",ComAtprotoTempFetchLabels:"com.atproto.temp.fetchLabels",ComAtprotoTempRequestPhoneVerification:"com.atproto.temp.requestPhoneVerification",ComAtprotoTempRevokeAccountCredentials:"com.atproto.temp.revokeAccountCredentials",ToolsOzoneCommunicationCreateTemplate:"tools.ozone.communication.createTemplate",ToolsOzoneCommunicationDefs:"tools.ozone.communication.defs",ToolsOzoneCommunicationDeleteTemplate:"tools.ozone.communication.deleteTemplate",ToolsOzoneCommunicationListTemplates:"tools.ozone.communication.listTemplates",ToolsOzoneCommunicationUpdateTemplate:"tools.ozone.communication.updateTemplate",ToolsOzoneHostingGetAccountHistory:"tools.ozone.hosting.getAccountHistory",ToolsOzoneModerationCancelScheduledActions:"tools.ozone.moderation.cancelScheduledActions",ToolsOzoneModerationDefs:"tools.ozone.moderation.defs",ToolsOzoneModerationEmitEvent:"tools.ozone.moderation.emitEvent",ToolsOzoneModerationGetAccountTimeline:"tools.ozone.moderation.getAccountTimeline",ToolsOzoneModerationGetEvent:"tools.ozone.moderation.getEvent",ToolsOzoneModerationGetRecord:"tools.ozone.moderation.getRecord",ToolsOzoneModerationGetRecords:"tools.ozone.moderation.getRecords",ToolsOzoneModerationGetRepo:"tools.ozone.moderation.getRepo",ToolsOzoneModerationGetReporterStats:"tools.ozone.moderation.getReporterStats",ToolsOzoneModerationGetRepos:"tools.ozone.moderation.getRepos",ToolsOzoneModerationGetSubjects:"tools.ozone.moderation.getSubjects",ToolsOzoneModerationListScheduledActions:"tools.ozone.moderation.listScheduledActions",ToolsOzoneModerationQueryEvents:"tools.ozone.moderation.queryEvents",ToolsOzoneModerationQueryStatuses:"tools.ozone.moderation.queryStatuses",ToolsOzoneModerationScheduleAction:"tools.ozone.moderation.scheduleAction",ToolsOzoneModerationSearchRepos:"tools.ozone.moderation.searchRepos",ToolsOzoneReportDefs:"tools.ozone.report.defs",ToolsOzoneSafelinkAddRule:"tools.ozone.safelink.addRule",ToolsOzoneSafelinkDefs:"tools.ozone.safelink.defs",ToolsOzoneSafelinkQueryEvents:"tools.ozone.safelink.queryEvents",ToolsOzoneSafelinkQueryRules:"tools.ozone.safelink.queryRules",ToolsOzoneSafelinkRemoveRule:"tools.ozone.safelink.removeRule",ToolsOzoneSafelinkUpdateRule:"tools.ozone.safelink.updateRule",ToolsOzoneServerGetConfig:"tools.ozone.server.getConfig",ToolsOzoneSetAddValues:"tools.ozone.set.addValues",ToolsOzoneSetDefs:"tools.ozone.set.defs",ToolsOzoneSetDeleteSet:"tools.ozone.set.deleteSet",ToolsOzoneSetDeleteValues:"tools.ozone.set.deleteValues",ToolsOzoneSetGetValues:"tools.ozone.set.getValues",ToolsOzoneSetQuerySets:"tools.ozone.set.querySets",ToolsOzoneSetUpsertSet:"tools.ozone.set.upsertSet",ToolsOzoneSettingDefs:"tools.ozone.setting.defs",ToolsOzoneSettingListOptions:"tools.ozone.setting.listOptions",ToolsOzoneSettingRemoveOptions:"tools.ozone.setting.removeOptions",ToolsOzoneSettingUpsertOption:"tools.ozone.setting.upsertOption",ToolsOzoneSignatureDefs:"tools.ozone.signature.defs",ToolsOzoneSignatureFindCorrelation:"tools.ozone.signature.findCorrelation",ToolsOzoneSignatureFindRelatedAccounts:"tools.ozone.signature.findRelatedAccounts",ToolsOzoneSignatureSearchAccounts:"tools.ozone.signature.searchAccounts",ToolsOzoneTeamAddMember:"tools.ozone.team.addMember",ToolsOzoneTeamDefs:"tools.ozone.team.defs",ToolsOzoneTeamDeleteMember:"tools.ozone.team.deleteMember",ToolsOzoneTeamListMembers:"tools.ozone.team.listMembers",ToolsOzoneTeamUpdateMember:"tools.ozone.team.updateMember",ToolsOzoneVerificationDefs:"tools.ozone.verification.defs",ToolsOzoneVerificationGrantVerifications:"tools.ozone.verification.grantVerifications",ToolsOzoneVerificationListVerifications:"tools.ozone.verification.listVerifications",ToolsOzoneVerificationRevokeVerifications:"tools.ozone.verification.revokeVerifications"}})(Mp)),Mp}var or={},Bf;function ix(){if(Bf)return or;
2Bf=1,Object.defineProperty(or,"__esModule",{value:!0}),or.isAtprotoServiceType=o,or.isDid=e,or.assertDid=r,or.asDid=t,or.isAtprotoProxy=i,or.assertAtprotoProxy=n,or.asAtprotoProxy=s;function o(l){return!l.includes(" ")&&!l.includes("#")}function e(l){if(!l.startsWith("did:")||l.length<8||l.length>2048)return!1;const a=l.indexOf(":",4);return a>4&&a<l.length-1}function r(l){if(!e(l))throw new TypeError(`Invalid DID: ${l}`)}function t(l){return r(l),l}function i(l){const{length:a,[0]:d,[1]:p}=l.split("#");return a===2&&e(d)&&o(p)}function n(l){if(!i(l))throw new TypeError(`Invalid DID reference: ${l} (must be of the form did:example:alice#service)`)}function s(l){return n(l),l}return or}var as={},Vf;function nx(){return Vf||(Vf=1,Object.defineProperty(as,"__esModule",{value:!0}),as.BSKY_LABELER_DID=void 0,as.BSKY_LABELER_DID="did:plc:ar7c4by46qjdydhdevvrndac"),as}var Np={},Lf;function sx(){return Lf||(Lf=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.nuxSchema=void 0,o.sanitizeMutedWordValue=t,o.savedFeedsToUriArrays=i,o.getSavedFeedType=n,o.validateSavedFeed=s,o.validateNux=l;const e=da(),r=Wn();function t(a){return a.trim().replace(/^#(?!\ufe0f)/,"").replace(/[\r\n\u00AD\u2060\u200D\u200C\u200B]+/,"")}function i(a){const d=[],p=[];for(const u of a)u.pinned&&d.push(u.value),p.push(u.value);return{pinned:d,saved:p}}function n(a){switch(new r.AtUri(a).collection){case"app.bsky.feed.generator":return"feed";case"app.bsky.graph.list":return"list";default:return"unknown"}}function s(a){if(!a.id)throw new Error("Saved feed must have an `id` - use a TID");if(["feed","list"].includes(a.type)){const d=new r.AtUri(a.value),p=d.collection==="app.bsky.feed.generator",u=d.collection==="app.bsky.graph.list";if(a.type==="feed"&&!p)throw new Error(`Saved feed of type 'feed' must be a feed, got ${d.collection}`);if(a.type==="list"&&!u)throw new Error(`Saved feed of type 'list' must be a list, got ${d.collection}`)}}o.nuxSchema=e.z.object({id:e.z.string().max(64),completed:e.z.boolean(),data:e.z.string().max(300).optional(),expiresAt:e.z.string().datetime().optional()}).strict();function l(a){o.nuxSchema.parse(a)}})(Np)),Np}var b={},zo={},Fo={},yt={},Bp={},zf;function _u(){return zf||(zf=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.XRPCInvalidResponseError=o.XRPCError=o.XRPCResponse=o.ResponseTypeStrings=o.ResponseType=o.errorResponseBody=void 0,o.httpResponseCodeToEnum=t,o.httpResponseCodeToName=i,o.httpResponseCodeToString=n;const e=da();o.errorResponseBody=e.z.object({error:e.z.string().optional(),message:e.z.string().optional()});var r;(function(d){d[d.Unknown=1]="Unknown",d[d.InvalidResponse=2]="InvalidResponse",d[d.Success=200]="Success",d[d.InvalidRequest=400]="InvalidRequest",d[d.AuthenticationRequired=401]="AuthenticationRequired",d[d.Forbidden=403]="Forbidden",d[d.XRPCNotSupported=404]="XRPCNotSupported",d[d.NotAcceptable=406]="NotAcceptable",d[d.PayloadTooLarge=413]="PayloadTooLarge",d[d.UnsupportedMediaType=415]="UnsupportedMediaType",d[d.RateLimitExceeded=429]="RateLimitExceeded",d[d.InternalServerError=500]="InternalServerError",d[d.MethodNotImplemented=501]="MethodNotImplemented",d[d.UpstreamFailure=502]="UpstreamFailure",d[d.NotEnoughResources=503]="NotEnoughResources",d[d.UpstreamTimeout=504]="UpstreamTimeout"})(r||(o.ResponseType=r={}));function t(d){return d in r?d:d>=100&&d<200?r.XRPCNotSupported:d>=200&&d<300?r.Success:d>=300&&d<400?r.XRPCNotSupported:d>=400&&d<500?r.InvalidRequest:r.InternalServerError}function i(d){return r[t(d)]}o.ResponseTypeStrings={[r.Unknown]:"Unknown",[r.InvalidResponse]:"Invalid Response",[r.Success]:"Success",[r.InvalidRequest]:"Invalid Request",[r.AuthenticationRequired]:"Authentication Required",[r.Forbidden]:"Forbidden",[r.XRPCNotSupported]:"XRPC Not Supported",[r.NotAcceptable]:"Not Acceptable",[r.PayloadTooLarge]:"Payload Too Large",[r.UnsupportedMediaType]:"Unsupported Media Type",[r.RateLimitExceeded]:"Rate Limit Exceeded",[r.InternalServerError]:"Internal Server Error",[r.MethodNotImplemented]:"Method Not Implemented",[r.UpstreamFailure]:"Upstream Failure",[r.NotEnoughResources]:"Not Enough Resources",[r.UpstreamTimeout]:"Upstream Timeout"};function n(d){return o.ResponseTypeStrings[t(d)]}class s{constructor(p,u){Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:p}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:u}),Object.defineProperty(this,"success",{enumerable:!0,configurable:!0,writable:!0,value:!0})}}o.XRPCResponse=s;
2class l extends Error{constructor(p,u=i(p),h,y,m){super(h||u||n(p),m),Object.defineProperty(this,"error",{enumerable:!0,configurable:!0,writable:!0,value:u}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:y}),Object.defineProperty(this,"success",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.status=t(p);const w=m?.cause;this.cause===void 0&&w!==void 0&&(this.cause=w)}static from(p,u){if(p instanceof l)return p;const h=p instanceof Error?p:void 0,y=p instanceof Response?p:p?.response instanceof Response?p.response:void 0,m=h?.statusCode??h?.status??y?.status,w=typeof m=="number"?t(m):u??r.Unknown,x=h?.message??String(p),v=y?Object.fromEntries(y.headers.entries()):void 0;return new l(w,void 0,x,v,{cause:p})}}o.XRPCError=l;class a extends l{constructor(p,u,h){super(r.InvalidResponse,o.ResponseTypeStrings[r.InvalidResponse],"The server gave an invalid response and may be out of date.",void 0,{cause:u}),Object.defineProperty(this,"lexiconNsid",{enumerable:!0,configurable:!0,writable:!0,value:p}),Object.defineProperty(this,"validationError",{enumerable:!0,configurable:!0,writable:!0,value:u}),Object.defineProperty(this,"responseBody",{enumerable:!0,configurable:!0,writable:!0,value:h})}}o.XRPCInvalidResponseError=a})(Bp)),Bp}var Ff;function vp(){if(Ff)return yt;Ff=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.isErrorResponseBody=t,yt.getMethodSchemaHTTPMethod=i,yt.constructMethodCallUri=n,yt.constructMethodCallUrl=s,yt.encodeQueryParam=l,yt.constructMethodCallHeaders=a,yt.combineHeaders=d,yt.isBodyInit=u,yt.isIterable=h,yt.encodeMethodCallBody=y,yt.httpResponseBodyParse=w;const o=Vn(),e=_u(),r=globalThis.ReadableStream||class{constructor(){throw new Error("ReadableStream is not supported in this environment")}};function t(x){return e.errorResponseBody.safeParse(x).success}function i(x){return x.type==="procedure"?"post":"get"}function n(x,v,k,A){return new URL(s(x,v,A),k).toString()}function s(x,v,k){const A=`/xrpc/${encodeURIComponent(x)}`;if(!k)return A;const S=[];for(const[E,_]of Object.entries(k)){const C=v.parameters?.properties?.[E];if(!C)throw new Error(`Invalid query parameter: ${E}`);if(_!==void 0)if(C.type==="array"){const O=Array.isArray(_)?_:[_];for(const V of O)S.push([E,l(C.items.type,V)])}else S.push([E,l(C.type,_)])}return S.length?`${A}?${new URLSearchParams(S).toString()}`:A}function l(x,v){if(x==="string"||x==="unknown")return String(v);if(x==="float")return String(Number(v));if(x==="integer")return String(Number(v)|0);if(x==="boolean")return v?"true":"false";if(x==="datetime")return v instanceof Date?v.toISOString():String(v);throw new Error(`Unsupported query param type: ${x}`)}function a(x,v,k){const A=new Headers;if(k?.headers)for(const S in k.headers){if(A.has(S))throw new TypeError(`Duplicate header: ${S}`);const E=k.headers[S];E!=null&&A.set(S,E)}if(x.type==="procedure"){if(k?.encoding)A.set("content-type",k.encoding);else if(!A.has("content-type")&&typeof v<"u")if(v instanceof ArrayBuffer||v instanceof r||ArrayBuffer.isView(v))A.set("content-type","application/octet-stream");else if(v instanceof FormData)A.set("content-type","multipart/form-data");else if(v instanceof URLSearchParams)A.set("content-type","application/x-www-form-urlencoded;charset=UTF-8");else if(p(v))A.set("content-type",v.type||"application/octet-stream");else if(typeof v=="string")A.set("content-type","text/plain;charset=UTF-8");else if(h(v))A.set("content-type","application/octet-stream");else if(typeof v=="boolean"||typeof v=="number"||typeof v=="string"||typeof v=="object")A.set("content-type","application/json");else throw new e.XRPCError(e.ResponseType.InvalidRequest,`Unsupported data type: ${typeof v}`)}return A}function d(x,v){if(!v)return x;let k;for(const[A,S]of v){if(S===void 0||(k??(k=new Headers(x)),k.has(A)))continue;const E=typeof S=="function"?S():S;if(typeof E=="string")k.set(A,E);else if(E===null)k.delete(A);else throw new TypeError(`Invalid "${A}" header value: ${typeof E}`)}return k??x}function p(x){if(x==null||typeof x!="object")return!1;if(typeof Blob=="function"&&x instanceof Blob)return!0;
2const v=x[Symbol.toStringTag];return v==="Blob"||v==="File"?"stream"in x&&typeof x.stream=="function":!1}function u(x){switch(typeof x){case"string":return!0;case"object":return x instanceof ArrayBuffer||x instanceof FormData||x instanceof URLSearchParams||x instanceof r||ArrayBuffer.isView(x)||p(x);default:return!1}}function h(x){return x!=null&&typeof x=="object"&&(Symbol.iterator in x||Symbol.asyncIterator in x)}function y(x,v){const k=x.get("content-type");if(!k)return;if(typeof v>"u")throw new e.XRPCError(e.ResponseType.InvalidRequest,"A request body is expected but none was provided");if(u(v))return v instanceof FormData&&k==="multipart/form-data"&&x.delete("content-type"),v;if(h(v))return m(v);if(k.startsWith("text/"))return new TextEncoder().encode(String(v));if(k.startsWith("application/json")){const S=(0,o.stringifyLex)(v);if(S===void 0)throw new e.XRPCError(e.ResponseType.InvalidRequest,"Failed to encode request body as JSON");return new TextEncoder().encode(S)}const A=!v||typeof v!="object"?typeof v:v.constructor!==Object&&typeof v.constructor=="function"&&typeof v.constructor?.name=="string"?v.constructor.name:"object";throw new e.XRPCError(e.ResponseType.InvalidRequest,`Unable to encode ${A} as ${k} data`)}function m(x){if("from"in r&&typeof r.from=="function")return r.from(x);throw new TypeError("ReadableStream.from() is not supported in this environment. It is required to support using iterables as the request body. Consider using a polyfill or re-write your co
2de to use a different body type.")}function w(x,v){try{if(x){if(x.includes("application/json")){const k=new TextDecoder().decode(v);return(0,o.jsonStringToLex)(k)}if(x.startsWith("text/"))return new TextDecoder().decode(v)}return v instanceof ArrayBuffer?new Uint8Array(v):v}catch(k){throw new e.XRPCError(e.ResponseType.InvalidResponse,void 0,`Failed to parse response body: ${String(k)}`,void 0,{cause:k})}}return yt}var cs={},$a={},$f;function ax(){if($f)return $a;$f=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.buildFetchHandler=e;const o=vp();function e(r){if(typeof r=="function")return r;if(typeof r=="object"&&"fetchHandler"in r)return r.fetchHandler.bind(r);const{service:t,headers:i=void 0,fetch:n=globalThis.fetch}=typeof r=="string"||r instanceof URL?{service:r}:r;if(typeof n!="function")throw new TypeError("XrpcDispatcher requires fetch() to be available in your environment.");const s=i!=null?Object.entries(i):void 0;return async function(l,a){const d=typeof t=="function"?t():t,p=new URL(l,d),u=(0,o.combineHeaders)(a.headers,s);return n(p,{...a,headers:u})}}return $a}var Gf;function cx(){if(Gf)return cs;Gf=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.XrpcClient=void 0;const o=Vn(),e=ax(),r=_u(),t=vp();class i{constructor(s,l){Object.defineProperty(this,"fetchHandler",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"lex",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetchHandler=(0,e.buildFetchHandler)(s),this.lex=l instanceof o.Lexicons?l:new o.Lexicons(l)}setHeader(s,l){this.headers.set(s.toLowerCase(),l)}unsetHeader(s){this.headers.delete(s.toLowerCase())}clearHeaders(){this.headers.clear()}async call(s,l,a,d){const p=this.lex.getDefOrThrow(s);if(!p||p.type!=="query"&&p.type!=="procedure")throw new TypeError(`Invalid lexicon: ${s}. Must be a query or procedure.`);const u=(0,t.constructMethodCallUrl)(s,p,l),h=(0,t.getMethodSchemaHTTPMethod)(p),y=(0,t.constructMethodCallHeaders)(p,a,d),m=(0,t.encodeMethodCallBody)(y,a),w={method:h,headers:(0,t.combineHeaders)(y,this.headers),body:m,duplex:"half",redirect:"follow",signal:d?.signal};try{const x=await this.fetchHandler.call(void 0,u,w),v=x.status,k=Object.fromEntries(x.headers.entries()),A=await x.arrayBuffer(),S=(0,t.httpResponseBodyParse)(x.headers.get("content-type"),A),E=(0,r.httpResponseCodeToEnum)(v);if(E!==r.ResponseType.Success){const{error:_=void 0,message:C=void 0}=S&&(0,t.isErrorResponseBody)(S)?S:{};throw new r.XRPCError(E,_,C,k)}try{this.lex.assertValidXrpcOutput(s,S)}catch(_){throw _ instanceof o.ValidationError?new r.XRPCInvalidResponseError(s,_,S):_}return new r.XRPCResponse(S,k)}catch(x){throw r.XRPCError.from(x)}}}return cs.XrpcClient=i,cs}var Uf;function Hf(){if(Uf)return Fo;Uf=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.ServiceClient=Fo.Client=void 0;const o=Vn(),e=vp(),r=cx();class t{constructor(){Object.defineProperty(this,"lex",{enumerable:!0,configurable:!0,writable:!0,value:new o.Lexicons})}get fetch(){throw new Error("Client.fetch is no longer supported. Use an XrpcClient instead.")}set fetch(s){throw new Error("Client.fetch is no longer supported. Use an XrpcClient instead.")}async call(s,l,a,d,p){return this.service(s).call(l,a,d,p)}service(s){return new i(this,s)}addLexicon(s){this.lex.add(s)}addLexicons(s){for(const l of s)this.addLexicon(l)}removeLexicon(s){this.lex.remove(s)}}Fo.Client=t;class i extends r.XrpcClient{constructor(s,l){super(async(a,d)=>{const p=(0,e.combineHeaders)(d.headers,Object.entries(this.headers));return fetch(new URL(a,this.uri),{...d,headers:p})},s.lex),Object.defineProperty(this,"baseClient",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"uri",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.uri=typeof l=="string"?new URL(l):l}}return Fo.ServiceClient=i,Fo}var Kf;function ne(){return Kf||(Kf=1,(function(o){var e=zo&&zo.__createBinding||(Object.create?(function(n,s,l,a){a===void 0&&(a=l);var d=Object.getOwnPropertyDescriptor(s,l);(!d||("get"in d?!s.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(n,a,d)}):(function(n,s,l,a){a===void 0&&(a=l),n[a]=s[l]})),r=zo&&zo.__exportStar||function(n,s){for(var l in n)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&e(s,n,l)};Object.defineProperty(o,"__esModule",{value:!0}),r(Hf(),o),r(ax(),o),r(_u(),o),r(vp(),o),r(cx(),o);const t=Hf(),i=new t.Client;o.default=i})(zo)),zo}var Ri={},Wf;function Xf(){if(Wf)return Ri;Wf=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.UnsupportedCollectionError=void 0,Ri.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Ri.UnsupportedCollectionError=t;function i(n){return n instanceof o.XRPCError&&n.error==="UnsupportedCollection"?new t(n):n}return Ri}var _i={},Qf;function Jf(){if(Qf)return _i;Qf=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.UnsupportedCollectionError=void 0,_i.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}_i.UnsupportedCollectionError=t;function i(n){return n instanceof o.XRPCError&&n.error==="UnsupportedCollection"?new t(n):n}return _i}var co={},Yf;function Zf(){if(Yf)return co;Yf=1,Object.defineProperty(co,"__esModule",{value:!0}),co.BlockedByActorError=co.BlockedActorError=void 0,co.toKnownErr=n;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}co.BlockedActorError=t;class i extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}co.BlockedByActorError=i;function n(s){if(s instanceof o.XRPCError){if(s.error==="BlockedActor")return new t(s);if(s.error==="BlockedByActor")return new i(s)}return s}return co}var lo={},em;function tm(){if(em)return lo;em=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.BlockedByActorError=lo.BlockedActorError=void 0,lo.toKnownErr=n;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}lo.BlockedActorError=t;class i extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}lo.BlockedByActorError=i;function n(s){if(s instanceof o.XRPCError){if(s.error==="BlockedActor")return new t(s);if(s.error==="BlockedByActor")return new i(s)}return s}return lo}var ji={},rm;function om(){if(rm)return ji;rm=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.UnknownFeedError=void 0,ji.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}ji.UnknownFeedError=t;function i(n){return n instanceof o.XRPCError&&n.error==="UnknownFeed"?new t(n):n}return ji}var Ei={},im;
2function nm(){if(im)return Ei;im=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.UnknownFeedError=void 0,Ei.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Ei.UnknownFeedError=t;function i(n){return n instanceof o.XRPCError&&n.error==="UnknownFeed"?new t(n):n}return Ei}var Ci={},sm;function am(){if(sm)return Ci;sm=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.UnknownListError=void 0,Ci.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Ci.UnknownListError=t;function i(n){return n instanceof o.XRPCError&&n.error==="UnknownList"?new t(n):n}return Ci}var Pi={},cm;function lm(){if(cm)return Pi;cm=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.NotFoundError=void 0,Pi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Pi.NotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="NotFound"?new t(n):n}return Pi}var Ti={},dm;function pm(){if(dm)return Ti;dm=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.BadQueryStringError=void 0,Ti.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Ti.BadQueryStringError=t;function i(n){return n instanceof o.XRPCError&&n.error==="BadQueryString"?new t(n):n}return Ti}var qi={},um;function fm(){if(um)return qi;um=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.ActorNotFoundError=void 0,qi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}qi.ActorNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="ActorNotFound"?new t(n):n}return qi}var ir={},mm;function hm(){if(mm)return ir;mm=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.InvalidInitiationError=ir.DidTooLongError=ir.InvalidEmailError=void 0,ir.toKnownErr=s;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}ir.InvalidEmailError=t;class i extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}ir.DidTooLongError=i;class n extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}ir.InvalidInitiationError=n;function s(l){if(l instanceof o.XRPCError){if(l.error==="InvalidEmail")return new t(l);if(l.error==="DidTooLong")return new i(l);if(l.error==="InvalidInitiation")return new n(l)}return l}return ir}var Di={},ym;function gm(){if(ym)return Di;ym=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.BadQueryStringError=void 0,Di.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Di.BadQueryStringError=t;function i(n){return n instanceof o.XRPCError&&n.error==="BadQueryString"?new t(n):n}return Di}var Oi={},bm;function vm(){if(bm)return Oi;bm=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.BadQueryStringError=void 0,Oi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Oi.BadQueryStringError=t;function i(n){return n instanceof o.XRPCError&&n.error==="BadQueryString"?new t(n):n}return Oi}var Ii={},wm;function xm(){if(wm)return Ii;wm=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.BadQueryStringError=void 0,Ii.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Ii.BadQueryStringError=t;function i(n){return n instanceof o.XRPCError&&n.error==="BadQueryString"?new t(n):n}return Ii}var nr={},km;function Sm(){if(km)return nr;km=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.ReactionInvalidValueError=nr.ReactionLimitReachedError=nr.ReactionMessageDeletedError=void 0,nr.toKnownErr=s;const o=ne(),e=P();T().is$typed,e.validate;
2class t extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}nr.ReactionMessageDeletedError=t;class i extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}nr.ReactionLimitReachedError=i;class n extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}nr.ReactionInvalidValueError=n;function s(l){if(l instanceof o.XRPCError){if(l.error==="ReactionMessageDeleted")return new t(l);if(l.error==="ReactionLimitReached")return new i(l);if(l.error==="ReactionInvalidValue")return new n(l)}return l}return nr}var po={},Am;function Rm(){if(Am)return po;Am=1,Object.defineProperty(po,"__esModule",{value:!0}),po.ReactionInvalidValueError=po.ReactionMessageDeletedError=void 0,po.toKnownErr=n;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}po.ReactionMessageDeletedError=t;class i extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}po.ReactionInvalidValueError=i;function n(s){if(s instanceof o.XRPCError){if(s.error==="ReactionMessageDeleted")return new t(s);if(s.error==="ReactionInvalidValue")return new i(s)}return s}return po}var sr={},_m;function jm(){if(_m)return sr;_m=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.DidDeactivatedError=sr.DidNotFoundError=sr.HandleNotFoundError=void 0,sr.toKnownErr=s;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}sr.HandleNotFoundError=t;class i extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}sr.DidNotFoundError=i;class n extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}sr.DidDeactivatedError=n;function s(l){if(l instanceof o.XRPCError){if(l.error==="HandleNotFound")return new t(l);if(l.error==="DidNotFound")return new i(l);if(l.error==="DidDeactivated")return new n(l)}return l}return sr}var uo={},Em;function Cm(){if(Em)return uo;Em=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.DidDeactivatedError=uo.DidNotFoundError=void 0,uo.toKnownErr=n;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}uo.DidNotFoundError=t;class i extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}uo.DidDeactivatedError=i;function n(s){if(s instanceof o.XRPCError){if(s.error==="DidNotFound")return new t(s);if(s.error==="DidDeactivated")return new i(s)}return s}return uo}var Mi={},Pm;function Tm(){if(Pm)return Mi;Pm=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.HandleNotFoundError=void 0,Mi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Mi.HandleNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="HandleNotFound"?new t(n):n}return Mi}var ar={},qm;function Dm(){if(qm)return ar;qm=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.DidDeactivatedError=ar.DidNotFoundError=ar.HandleNotFoundError=void 0,ar.toKnownErr=s;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}ar.HandleNotFoundError=t;class i extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}ar.DidNotFoundError=i;class n extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}ar.DidDeactivatedError=n;function s(l){if(l instanceof o.XRPCError){if(l.error==="HandleNotFound")return new t(l);if(l.error==="DidNotFound")return new i(l);if(l.error==="DidDeactivated")return new n(l)}return l}return ar}var Qe={},Om;function Im(){if(Om)return Qe;Om=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.InvalidSwapError=void 0,Qe.toKnownErr=l,Qe.isCreate=d,Qe.validateCreate=p,Qe.isUpdate=h,Qe.validateUpdate=y,Qe.isDelete=w,Qe.validateDelete=x,Qe.isCreateResult=k,Qe.validateCreateResult=A,Qe.isUpdateResult=E,Qe.validateUpdateResult=_,Qe.isDeleteResult=O,Qe.validateDeleteResult=V;const o=ne(),e=P(),t=T().is$typed,i=e.validate,n="com.atproto.repo.applyWrites";class s extends o.XRPCError{constructor(z){super(z.status,z.error,z.message,z.headers,{cause:z})}}Qe.InvalidSwapError=s;
2function l(I){return I instanceof o.XRPCError&&I.error==="InvalidSwap"?new s(I):I}const a="create";function d(I){return t(I,n,a)}function p(I){return i(I,n,a)}const u="update";function h(I){return t(I,n,u)}function y(I){return i(I,n,u)}const m="delete";function w(I){return t(I,n,m)}function x(I){return i(I,n,m)}const v="createResult";function k(I){return t(I,n,v)}function A(I){return i(I,n,v)}const S="updateResult";function E(I){return t(I,n,S)}function _(I){return i(I,n,S)}const C="deleteResult";function O(I){return t(I,n,C)}function V(I){return i(I,n,C)}return Qe}var Ni={},Mm;function Nm(){if(Mm)return Ni;Mm=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.InvalidSwapError=void 0,Ni.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Ni.InvalidSwapError=t;function i(n){return n instanceof o.XRPCError&&n.error==="InvalidSwap"?new t(n):n}return Ni}var Bi={},Bm;function Vm(){if(Bm)return Bi;Bm=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.InvalidSwapError=void 0,Bi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Bi.InvalidSwapError=t;function i(n){return n instanceof o.XRPCError&&n.error==="InvalidSwap"?new t(n):n}return Bi}var Vi={},Lm;function zm(){if(Lm)return Vi;Lm=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.RecordNotFoundError=void 0,Vi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Vi.RecordNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="RecordNotFound"?new t(n):n}return Vi}var Li={},Fm;function $m(){if(Fm)return Li;Fm=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.InvalidSwapError=void 0,Li.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Li.InvalidSwapError=t;function i(n){return n instanceof o.XRPCError&&n.error==="InvalidSwap"?new t(n):n}return Li}var Ft={},Gm;function Um(){if(Gm)return Ft;Gm=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.InvalidEmailError=Ft.InvalidTokenError=Ft.ExpiredTokenError=Ft.AccountNotFoundError=void 0,Ft.toKnownErr=l;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Ft.AccountNotFoundError=t;class i extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Ft.ExpiredTokenError=i;class n extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Ft.InvalidTokenError=n;class s extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Ft.InvalidEmailError=s;function l(a){if(a instanceof o.XRPCError){if(a.error==="AccountNotFound")return new t(a);if(a.error==="ExpiredToken")return new i(a);if(a.error==="InvalidToken")return new n(a);if(a.error==="InvalidEmail")return new s(a)}return a}return Ft}var Je={},Hm;function Km(){if(Hm)return Je;Hm=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.IncompatibleDidDocError=Je.UnresolvableDidError=Je.UnsupportedDomainError=Je.HandleNotAvailableError=Je.InvalidInviteCodeError=Je.InvalidPasswordError=Je.InvalidHandleError=void 0,Je.toKnownErr=p;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(h){super(h.status,h.error,h.message,h.headers,{cause:h})}}Je.InvalidHandleError=t;class i extends o.XRPCError{constructor(h){super(h.status,h.error,h.message,h.headers,{cause:h})}}Je.InvalidPasswordError=i;class n extends o.XRPCError{constructor(h){super(h.status,h.error,h.message,h.headers,{cause:h})}}Je.InvalidInviteCodeError=n;class s extends o.XRPCError{constructor(h){super(h.status,h.error,h.message,h.headers,{cause:h})}}Je.HandleNotAvailableError=s;class l extends o.XRPCError{constructor(h){super(h.status,h.error,h.message,h.headers,{cause:h})}}Je.UnsupportedDomainError=l;class a extends o.XRPCError{constructor(h){super(h.status,h.error,h.message,h.headers,{cause:h})}}Je.UnresolvableDidError=a;class d extends o.XRPCError{constructor(h){super(h.status,h.error,h.message,h.headers,{cause:h})}}Je.IncompatibleDidDocError=d;function p(u){if(u instanceof o.XRPCError){if(u.error==="InvalidHandle")return new t(u);
2if(u.error==="InvalidPassword")return new i(u);if(u.error==="InvalidInviteCode")return new n(u);if(u.error==="HandleNotAvailable")return new s(u);if(u.error==="UnsupportedDomain")return new l(u);if(u.error==="UnresolvableDid")return new a(u);if(u.error==="IncompatibleDidDoc")return new d(u)}return u}return Je}var fo={},Wm;function Xm(){if(Wm)return fo;Wm=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.AccountTakedownError=void 0,fo.toKnownErr=l,fo.isAppPassword=d,fo.validateAppPassword=p;const o=ne(),e=P(),t=T().is$typed,i=e.validate,n="com.atproto.server.createAppPassword";class s extends o.XRPCError{constructor(h){super(h.status,h.error,h.message,h.headers,{cause:h})}}fo.AccountTakedownError=s;function l(u){return u instanceof o.XRPCError&&u.error==="AccountTakedown"?new s(u):u}const a="appPassword";function d(u){return t(u,n,a)}function p(u){return i(u,n,a)}return fo}var mo={},Qm;function Jm(){if(Qm)return mo;Qm=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.AuthFactorTokenRequiredError=mo.AccountTakedownError=void 0,mo.toKnownErr=n;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}mo.AccountTakedownError=t;class i extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}mo.AuthFactorTokenRequiredError=i;function n(s){if(s instanceof o.XRPCError){if(s.error==="AccountTakedown")return new t(s);if(s.error==="AuthFactorTokenRequired")return new i(s)}return s}return mo}var ho={},Ym;function Zm(){if(Ym)return ho;Ym=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.InvalidTokenError=ho.ExpiredTokenError=void 0,ho.toKnownErr=n;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}ho.ExpiredTokenError=t;class i extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}ho.InvalidTokenError=i;function n(s){if(s instanceof o.XRPCError){if(s.error==="ExpiredToken")return new t(s);if(s.error==="InvalidToken")return new i(s)}return s}return ho}var zi={},eh;function th(){if(eh)return zi;eh=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.DuplicateCreateError=void 0,zi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}zi.DuplicateCreateError=t;function i(n){return n instanceof o.XRPCError&&n.error==="DuplicateCreate"?new t(n):n}return zi}var Fi={},rh;function oh(){if(rh)return Fi;rh=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.BadExpirationError=void 0,Fi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Fi.BadExpirationError=t;function i(n){return n instanceof o.XRPCError&&n.error==="BadExpiration"?new t(n):n}return Fi}var yo={},ih;function nh(){if(ih)return yo;ih=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.AccountTakedownError=void 0,yo.toKnownErr=l,yo.isAppPassword=d,yo.validateAppPassword=p;const o=ne(),e=P(),t=T().is$typed,i=e.validate,n="com.atproto.server.listAppPasswords";class s extends o.XRPCError{constructor(h){super(h.status,h.error,h.message,h.headers,{cause:h})}}yo.AccountTakedownError=s;function l(u){return u instanceof o.XRPCError&&u.error==="AccountTakedown"?new s(u):u}const a="appPassword";function d(u){return t(u,n,a)}function p(u){return i(u,n,a)}return yo}var $i={},sh;function ah(){if(sh)return $i;sh=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.AccountTakedownError=void 0,$i.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}$i.AccountTakedownError=t;function i(n){return n instanceof o.XRPCError&&n.error==="AccountTakedown"?new t(n):n}return $i}var go={},ch;function lh(){if(ch)return go;ch=1,Object.defineProperty(go,"__esModule",{value:!0}),go.InvalidTokenError=go.ExpiredTokenError=void 0,go.toKnownErr=n;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}go.ExpiredTokenError=t;class i extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}go.InvalidTokenError=i;function n(s){if(s instanceof o.XRPCError){if(s.error==="ExpiredToken")return new t(s);if(s.error==="InvalidToken")return new i(s)}return s}return go}var cr={},dh;function ph(){if(dh)return cr;
2dh=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.TokenRequiredError=cr.InvalidTokenError=cr.ExpiredTokenError=void 0,cr.toKnownErr=s;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}cr.ExpiredTokenError=t;class i extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}cr.InvalidTokenError=i;class n extends o.XRPCError{constructor(a){super(a.status,a.error,a.message,a.headers,{cause:a})}}cr.TokenRequiredError=n;function s(l){if(l instanceof o.XRPCError){if(l.error==="ExpiredToken")return new t(l);if(l.error==="InvalidToken")return new i(l);if(l.error==="TokenRequired")return new n(l)}return l}return cr}var gt={},uh;function fh(){if(uh)return gt;uh=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.RepoDeactivatedError=gt.RepoSuspendedError=gt.RepoTakendownError=gt.RepoNotFoundError=gt.BlobNotFoundError=void 0,gt.toKnownErr=a;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}gt.BlobNotFoundError=t;class i extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}gt.RepoNotFoundError=i;class n extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}gt.RepoTakendownError=n;class s extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}gt.RepoSuspendedError=s;class l extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}gt.RepoDeactivatedError=l;function a(d){if(d instanceof o.XRPCError){if(d.error==="BlobNotFound")return new t(d);if(d.error==="RepoNotFound")return new i(d);if(d.error==="RepoTakendown")return new n(d);if(d.error==="RepoSuspended")return new s(d);if(d.error==="RepoDeactivated")return new l(d)}return d}return gt}var bt={},mh;function hh(){if(mh)return bt;mh=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.RepoDeactivatedError=bt.RepoSuspendedError=bt.RepoTakendownError=bt.RepoNotFoundError=bt.BlockNotFoundError=void 0,bt.toKnownErr=a;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}bt.BlockNotFoundError=t;class i extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}bt.RepoNotFoundError=i;class n extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}bt.RepoTakendownError=n;class s extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}bt.RepoSuspendedError=s;class l extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}bt.RepoDeactivatedError=l;function a(d){if(d instanceof o.XRPCError){if(d.error==="BlockNotFound")return new t(d);if(d.error==="RepoNotFound")return new i(d);if(d.error==="RepoTakendown")return new n(d);if(d.error==="RepoSuspended")return new s(d);if(d.error==="RepoDeactivated")return new l(d)}return d}return bt}var Gi={},yh;function gh(){if(yh)return Gi;yh=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.HeadNotFoundError=void 0,Gi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Gi.HeadNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="HeadNotFound"?new t(n):n}return Gi}var Ui={},bh;function vh(){if(bh)return Ui;bh=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.HostNotFoundError=void 0,Ui.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Ui.HostNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="HostNotFound"?new t(n):n}return Ui}var $t={},wh;function xh(){if(wh)return $t;wh=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.RepoDeactivatedError=$t.RepoSuspendedError=$t.RepoTakendownError=$t.RepoNotFoundError=void 0,$t.toKnownErr=l;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}$t.RepoNotFoundError=t;class i extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}$t.RepoTakendownError=i;class n extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}$t.RepoSuspendedError=n;class s extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}$t.RepoDeactivatedError=s;function l(a){if(a instanceof o.XRPCError){if(a.error==="RepoNotFound")return new t(a);if(a.error==="RepoTakendown")return new i(a);if(a.error==="RepoSuspended")return new n(a);if(a.error==="RepoDeactivated")return new s(a)}return a}return $t}var vt={},kh;function Sh(){if(kh)return vt;
2kh=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.RepoDeactivatedError=vt.RepoSuspendedError=vt.RepoTakendownError=vt.RepoNotFoundError=vt.RecordNotFoundError=void 0,vt.toKnownErr=a;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}vt.RecordNotFoundError=t;class i extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}vt.RepoNotFoundError=i;class n extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}vt.RepoTakendownError=n;class s extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}vt.RepoSuspendedError=s;class l extends o.XRPCError{constructor(p){super(p.status,p.error,p.message,p.headers,{cause:p})}}vt.RepoDeactivatedError=l;function a(d){if(d instanceof o.XRPCError){if(d.error==="RecordNotFound")return new t(d);if(d.error==="RepoNotFound")return new i(d);if(d.error==="RepoTakendown")return new n(d);if(d.error==="RepoSuspended")return new s(d);if(d.error==="RepoDeactivated")return new l(d)}return d}return vt}var Gt={},Ah;function Rh(){if(Ah)return Gt;Ah=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.RepoDeactivatedError=Gt.RepoSuspendedError=Gt.RepoTakendownError=Gt.RepoNotFoundError=void 0,Gt.toKnownErr=l;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Gt.RepoNotFoundError=t;class i extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Gt.RepoTakendownError=i;class n extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Gt.RepoSuspendedError=n;class s extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Gt.RepoDeactivatedError=s;function l(a){if(a instanceof o.XRPCError){if(a.error==="RepoNotFound")return new t(a);if(a.error==="RepoTakendown")return new i(a);if(a.error==="RepoSuspended")return new n(a);if(a.error==="RepoDeactivated")return new s(a)}return a}return Gt}var Hi={},_h;function jh(){if(_h)return Hi;_h=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.RepoNotFoundError=void 0,Hi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Hi.RepoNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="RepoNotFound"?new t(n):n}return Hi}var Ut={},Eh;function Ch(){if(Eh)return Ut;Eh=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.RepoDeactivatedError=Ut.RepoSuspendedError=Ut.RepoTakendownError=Ut.RepoNotFoundError=void 0,Ut.toKnownErr=l;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Ut.RepoNotFoundError=t;class i extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Ut.RepoTakendownError=i;class n extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Ut.RepoSuspendedError=n;class s extends o.XRPCError{constructor(d){super(d.status,d.error,d.message,d.headers,{cause:d})}}Ut.RepoDeactivatedError=s;function l(a){if(a instanceof o.XRPCError){if(a.error==="RepoNotFound")return new t(a);if(a.error==="RepoTakendown")return new i(a);if(a.error==="RepoSuspended")return new n(a);if(a.error==="RepoDeactivated")return new s(a)}return a}return Ut}var Ki={},Ph;function Th(){if(Ph)return Ki;Ph=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.HostBannedError=void 0,Ki.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Ki.HostBannedError=t;function i(n){return n instanceof o.XRPCError&&n.error==="HostBanned"?new t(n):n}return Ki}var Ht={},qh;function Dh(){if(qh)return Ht;qh=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.InvalidEmailError=void 0,Ht.toKnownErr=l,Ht.isResultAvailable=d,Ht.validateResultAvailable=p,Ht.isResultUnavailable=h,Ht.validateResultUnavailable=y,Ht.isSuggestion=w,Ht.validateSuggestion=x;const o=ne(),e=P(),t=T().is$typed,i=e.validate,n="com.atproto.temp.checkHandleAvailability";class s extends o.XRPCError{constructor(k){super(k.status,k.error,k.message,k.headers,{cause:k})}}Ht.InvalidEmailError=s;function l(v){return v instanceof o.XRPCError&&v.error==="InvalidEmail"?new s(v):v}const a="resultAvailable";function d(v){return t(v,n,a)}function p(v){return i(v,n,a)}const u="resultUnavailable";function h(v){return t(v,n,u)}function y(v){return i(v,n,u)}const m="suggestion";function w(v){return t(v,n,m)}function x(v){return i(v,n,m)}return Ht}var Wi={},Oh;function Ih(){if(Oh)return Wi;Oh=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.InvalidScopeReferenceError=void 0,Wi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Wi.InvalidScopeReferenceError=t;function i(n){return n instanceof o.XRPCError&&n.error==="InvalidScopeReference"?new t(n):n}return Wi}var Xi={},Mh;function Nh(){if(Mh)return Xi;Mh=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.DuplicateTemplateNameError=void 0,Xi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Xi.DuplicateTemplateNameError=t;function i(n){return n instanceof o.XRPCError&&n.error==="DuplicateTemplateName"?new t(n):n}return Xi}var Qi={},Bh;function Vh(){if(Bh)return Qi;Bh=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.DuplicateTemplateNameError=void 0,Qi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Qi.DuplicateTemplateNameError=t;function i(n){return n instanceof o.XRPCError&&n.error==="DuplicateTemplateName"?new t(n):n}return Qi}var bo={},Lh;function zh(){if(Lh)return bo;Lh=1,Object.defineProperty(bo,"__esModule",{value:!0}
2),bo.DuplicateExternalIdError=bo.SubjectHasActionError=void 0,bo.toKnownErr=n;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}bo.SubjectHasActionError=t;class i extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}bo.DuplicateExternalIdError=i;function n(s){if(s instanceof o.XRPCError){if(s.error==="SubjectHasAction")return new t(s);if(s.error==="DuplicateExternalId")return new i(s)}return s}return bo}var lr={},Fh;function $h(){if(Fh)return lr;Fh=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.RepoNotFoundError=void 0,lr.toKnownErr=l,lr.isTimelineItem=d,lr.validateTimelineItem=p,lr.isTimelineItemSummary=h,lr.validateTimelineItemSummary=y;const o=ne(),e=P(),t=T().is$typed,i=e.validate,n="tools.ozone.moderation.getAccountTimeline";class s extends o.XRPCError{constructor(w){super(w.status,w.error,w.message,w.headers,{cause:w})}}lr.RepoNotFoundError=s;function l(m){return m instanceof o.XRPCError&&m.error==="RepoNotFound"?new s(m):m}const a="timelineItem";function d(m){return t(m,n,a)}function p(m){return i(m,n,a)}const u="timelineItemSummary";function h(m){return t(m,n,u)}function y(m){return i(m,n,u)}return lr}var Ji={},Gh;function Uh(){if(Gh)return Ji;Gh=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.RecordNotFoundError=void 0,Ji.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Ji.RecordNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="RecordNotFound"?new t(n):n}return Ji}var Yi={},Hh;function Kh(){if(Hh)return Yi;Hh=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.RepoNotFoundError=void 0,Yi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Yi.RepoNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="RepoNotFound"?new t(n):n}return Yi}var vo={},Wh;function Xh(){if(Wh)return vo;Wh=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.RuleAlreadyExistsError=vo.InvalidUrlError=void 0,vo.toKnownErr=n;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}vo.InvalidUrlError=t;class i extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}vo.RuleAlreadyExistsError=i;function n(s){if(s instanceof o.XRPCError){if(s.error==="InvalidUrl")return new t(s);if(s.error==="RuleAlreadyExists")return new i(s)}return s}return vo}var Zi={},Qh;function Jh(){if(Qh)return Zi;Qh=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.RuleNotFoundError=void 0,Zi.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}Zi.RuleNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="RuleNotFound"?new t(n):n}return Zi}var en={},Yh;function Zh(){if(Yh)return en;Yh=1,Object.defineProperty(en,"__esModule",{value:!0}),en.RuleNotFoundError=void 0,en.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}en.RuleNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="RuleNotFound"?new t(n):n}return en}var tn={},ey;function ty(){if(ey)return tn;ey=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.SetNotFoundError=void 0,tn.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}tn.SetNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="SetNotFound"?new t(n):n}return tn}var rn={},ry;function oy(){if(ry)return rn;ry=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.SetNotFoundError=void 0,rn.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}rn.SetNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="SetNotFound"?new t(n):n}return rn}var on={},iy;function ny(){if(iy)return on;iy=1,Object.defineProperty(on,"__esModule",{value:!0}),on.SetNotFoundError=void 0,on.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}on.SetNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="SetNotFound"?new t(n):n}return on}var nn={},sy;function ay(){if(sy)return nn;sy=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.MemberAlreadyExistsError=void 0,nn.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}nn.MemberAlreadyExistsError=t;function i(n){return n instanceof o.XRPCError&&n.error==="MemberAlreadyExists"?new t(n):n}return nn}var wo={},cy;function ly(){if(cy)return wo;cy=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.CannotDeleteSelfError=wo.MemberNotFoundError=void 0,wo.toKnownErr=n;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}wo.MemberNotFoundError=t;class i extends o.XRPCError{constructor(l){super(l.status,l.error,l.message,l.headers,{cause:l})}}wo.CannotDeleteSelfError=i;function n(s){if(s instanceof o.XRPCError){if(s.error==="MemberNotFound")return new t(s);if(s.error==="CannotDeleteSelf")return new i(s)}return s}return wo}var sn={},dy;function py(){if(dy)return sn;dy=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.MemberNotFoundError=void 0,sn.toKnownErr=i;const o=ne(),e=P();T().is$typed,e.validate;class t extends o.XRPCError{constructor(s){super(s.status,s.error,s.message,s.headers,{cause:s})}}sn.MemberNotFoundError=t;function i(n){return n instanceof o.XRPCError&&n.error==="MemberNotFound"?new t(n):n}return sn}var se={},uy;function t_(){if(uy)return se;
2uy=1,Object.defineProperty(se,"__esModule",{value:!0}),se.isProfileViewBasic=s,se.validateProfileViewBasic=l,se.isProfileView=d,se.validateProfileView=p,se.isProfileViewDetailed=h,se.validateProfileViewDetailed=y,se.isProfileAssociated=w,se.validateProfileAssociated=x,se.isProfileAssociatedChat=k,se.validateProfileAssociatedChat=A,se.isProfileAssociatedActivitySubscription=E,se.validateProfileAssociatedActivitySubscription=_,se.isViewerState=O,se.validateViewerState=V,se.isKnownFollowers=z,se.validateKnownFollowers=N,se.isVerificationState=D,se.validateVerificationState=q,se.isVerificationView=L,se.validateVerificationView=U,se.isAdultContentPref=ee,se.validateAdultContentPref=ae,se.isContentLabelPref=ce,se.validateContentLabelPref=fe,se.isSavedFeed=Me,se.validateSavedFeed=Ve,se.isSavedFeedsPrefV2=Ae,se.validateSavedFeedsPrefV2=Re,se.isSavedFeedsPref=ue,se.validateSavedFeedsPref=xe,se.isPersonalDetailsPref=Le,se.validatePersonalDetailsPref=Ue,se.isFeedViewPref=We,se.validateFeedViewPref=nt,se.isThreadViewPref=At,se.validateThreadViewPref=tt,se.isInterestsPref=pt,se.validateInterestsPref=ut,se.isMutedWord=Bt,se.validateMutedWord=Vt,se.isMutedWordsPref=Lt,se.validateMutedWordsPref=zt,se.isHiddenPostsPref=Rt,se.validateHiddenPostsPref=_t,se.isLabelersPref=jt,se.validateLabelersPref=Xt,se.isLabelerPrefItem=di,se.validateLabelerPrefItem=pi,se.isBskyAppStatePref=ui,se.validateBskyAppStatePref=fi,se.isBskyAppProgressGuide=mi,se.validateBskyAppProgressGuide=hi,se.isNux=yi,se.validateNux=gi,se.isVerificationPrefs=bi,se.validateVerificationPrefs=vi,se.isPostInteractionSettingsPref=wi,se.validatePostInteractionSettingsPref=xi,se.isStatusView=ki,se.validateStatusView=Si;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.actor.defs",n="profileViewBasic";function s(G){return r(G,i,n)}function l(G){return t(G,i,n)}const a="profileView";function d(G){return r(G,i,a)}function p(G){return t(G,i,a)}const u="profileViewDetailed";function h(G){return r(G,i,u)}function y(G){return t(G,i,u)}const m="profileAssociated";function w(G){return r(G,i,m)}function x(G){return t(G,i,m)}const v="profileAssociatedChat";function k(G){return r(G,i,v)}function A(G){return t(G,i,v)}const S="profileAssociatedActivitySubscription";function E(G){return r(G,i,S)}function _(G){return t(G,i,S)}const C="viewerState";function O(G){return r(G,i,C)}function V(G){return t(G,i,C)}const I="knownFollowers";function z(G){return r(G,i,I)}function N(G){return t(G,i,I)}const R="verificationState";function D(G){return r(G,i,R)}function q(G){return t(G,i,R)}const j="verificationView";function L(G){return r(G,i,j)}function U(G){return t(G,i,j)}const W="adultContentPref";function ee(G){return r(G,i,W)}function ae(G){return t(G,i,W)}const de="contentLabelPref";function ce(G){return r(G,i,de)}function fe(G){return t(G,i,de)}const K="savedFeed";function Me(G){return r(G,i,K)}function Ve(G){return t(G,i,K)}const me="savedFeedsPrefV2";function Ae(G){return r(G,i,me)}function Re(G){return t(G,i,me)}const Te="savedFeedsPref";function ue(G){return r(G,i,Te)}function xe(G){return t(G,i,Te)}const be="personalDetailsPref";function Le(G){return r(G,i,be)}function Ue(G){return t(G,i,be)}const ze="feedViewPref";function We(G){return r(G,i,ze)}function nt(G){return t(G,i,ze)}const Ke="threadViewPref";function At(G){return r(G,i,Ke)}function tt(G){return t(G,i,Ke)}const X="interestsPref";function pt(G){return r(G,i,X)}function ut(G){return t(G,i,X)}const J="mutedWord";function Bt(G){return r(G,i,J)}function Vt(G){return t(G,i,J)}const ft="mutedWordsPref";function Lt(G){return r(G,i,ft)}function zt(G){return t(G,i,ft)}const mt="hiddenPostsPref";function Rt(G){return r(G,i,mt)}function _t(G){return t(G,i,mt)}const st="labelersPref";function jt(G){return r(G,i,st)}function Xt(G){return t(G,i,st)}const eo="labelerPrefItem";function di(G){return r(G,i,eo)}function pi(G){return t(G,i,eo)}const to="bskyAppStatePref";function ui(G){return r(G,i,to)}function fi(G){return t(G,i,to)}const ro="bskyAppProgressGuide";function mi(G){return r(G,i,ro)}function hi(G){return t(G,i,ro)}const oo="nux";function yi(G){return r(G,i,oo)}function gi(G){return t(G,i,oo)}const io="verificationPrefs";function bi(G){return r(G,i,io)}function vi(G){return t(G,i,io)}const no="postInteractionSettingsPref";
2function wi(G){return r(G,i,no)}function xi(G){return t(G,i,no)}const so="statusView";function ki(G){return r(G,i,so)}function Si(G){return t(G,i,so)}return se}var Ga={},fy;function r_(){if(fy)return Ga;fy=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ga}var Ua={},my;function o_(){if(my)return Ua;my=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ua}var Ha={},hy;function i_(){if(hy)return Ha;hy=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ha}var Ka={},yy;function n_(){if(yy)return Ka;yy=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ka}var ls={},gy;function s_(){if(gy)return ls;gy=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.isRecord=s,ls.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.actor.profile",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return ls}var Wa={},by;function a_(){if(by)return Wa;by=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Wa}var Xa={},vy;function c_(){if(vy)return Xa;vy=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Xa}var Qa={},wy;function l_(){if(wy)return Qa;wy=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Qa}var $o={},xy;function d_(){if(xy)return $o;xy=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.LIVE=void 0,$o.isRecord=s,$o.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.actor.status",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return $o.LIVE=`${i}#live`,$o}var Go={},ky;function p_(){if(ky)return Go;ky=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.isBookmark=s,Go.validateBookmark=l,Go.isBookmarkView=d,Go.validateBookmarkView=p;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.bookmark.defs",n="bookmark";function s(u){return r(u,i,n)}function l(u){return t(u,i,n)}const a="bookmarkView";function d(u){return r(u,i,a)}function p(u){return t(u,i,a)}return Go}var Ja={},Sy;function u_(){if(Sy)return Ja;Sy=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ja}var ds={},Ay;function f_(){if(Ay)return ds;Ay=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.isAspectRatio=s,ds.validateAspectRatio=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.embed.defs",n="aspectRatio";function s(a){return r(a,i,n)}function l(a){return t(a,i,n)}return ds}var Qt={},Ry;function m_(){if(Ry)return Qt;Ry=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.isMain=s,Qt.validateMain=l,Qt.isExternal=d,Qt.validateExternal=p,Qt.isView=h,Qt.validateView=y,Qt.isViewExternal=w,Qt.validateViewExternal=x;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.embed.external",n="main";function s(v){return r(v,i,n)}function l(v){return t(v,i,n)}const a="external";function d(v){return r(v,i,a)}function p(v){return t(v,i,a)}const u="view";function h(v){return r(v,i,u)}function y(v){return t(v,i,u)}const m="viewExternal";function w(v){return r(v,i,m)}function x(v){return t(v,i,m)}return Qt}var Jt={},_y;function h_(){if(_y)return Jt;_y=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.isMain=s,Jt.validateMain=l,Jt.isImage=d,Jt.validateImage=p,Jt.isView=h,Jt.validateView=y,Jt.isViewImage=w,Jt.validateViewImage=x;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.embed.images",n="main";function s(v){return r(v,i,n)}function l(v){return t(v,i,n)}const a="image";function d(v){return r(v,i,a)}function p(v){return t(v,i,a)}const u="view";function h(v){return r(v,i,u)}function y(v){return t(v,i,u)}const m="viewImage";function w(v){return r(v,i,m)}function x(v){return t(v,i,m)}return Jt}var at={},jy;function y_(){if(jy)return at;
2jy=1,Object.defineProperty(at,"__esModule",{value:!0}),at.isMain=s,at.validateMain=l,at.isView=d,at.validateView=p,at.isViewRecord=h,at.validateViewRecord=y,at.isViewNotFound=w,at.validateViewNotFound=x,at.isViewBlocked=k,at.validateViewBlocked=A,at.isViewDetached=E,at.validateViewDetached=_;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.embed.record",n="main";function s(C){return r(C,i,n)}function l(C){return t(C,i,n)}const a="view";function d(C){return r(C,i,a)}function p(C){return t(C,i,a)}const u="viewRecord";function h(C){return r(C,i,u)}function y(C){return t(C,i,u)}const m="viewNotFound";function w(C){return r(C,i,m)}function x(C){return t(C,i,m)}const v="viewBlocked";function k(C){return r(C,i,v)}function A(C){return t(C,i,v)}const S="viewDetached";function E(C){return r(C,i,S)}function _(C){return t(C,i,S)}return at}var Uo={},Ey;function g_(){if(Ey)return Uo;Ey=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.isMain=s,Uo.validateMain=l,Uo.isView=d,Uo.validateView=p;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.embed.recordWithMedia",n="main";function s(u){return r(u,i,n)}function l(u){return t(u,i,n)}const a="view";function d(u){return r(u,i,a)}function p(u){return t(u,i,a)}return Uo}var gr={},Cy;function b_(){if(Cy)return gr;Cy=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.isMain=s,gr.validateMain=l,gr.isCaption=d,gr.validateCaption=p,gr.isView=h,gr.validateView=y;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.embed.video",n="main";function s(m){return r(m,i,n)}function l(m){return t(m,i,n)}const a="caption";function d(m){return r(m,i,a)}function p(m){return t(m,i,a)}const u="view";function h(m){return r(m,i,u)}function y(m){return t(m,i,u)}return gr}var ie={},Py;function v_(){if(Py)return ie;Py=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.INTERACTIONSHARE=ie.INTERACTIONQUOTE=ie.INTERACTIONREPLY=ie.INTERACTIONREPOST=ie.INTERACTIONLIKE=ie.INTERACTIONSEEN=ie.CONTENTMODEVIDEO=ie.CONTENTMODEUNSPECIFIED=ie.CLICKTHROUGHEMBED=ie.CLICKTHROUGHREPOSTER=ie.CLICKTHROUGHAUTHOR=ie.CLICKTHROUGHITEM=ie.REQUESTMORE=ie.REQUESTLESS=void 0,ie.isPostView=s,ie.validatePostView=l,ie.isViewerState=d,ie.validateViewerState=p,ie.isThreadContext=h,ie.validateThreadContext=y,ie.isFeedViewPost=w,ie.validateFeedViewPost=x,ie.isReplyRef=k,ie.validateReplyRef=A,ie.isReasonRepost=E,ie.validateReasonRepost=_,ie.isReasonPin=O,ie.validateReasonPin=V,ie.isThreadViewPost=z,ie.validateThreadViewPost=N,ie.isNotFoundPost=D,ie.validateNotFoundPost=q,ie.isBlockedPost=L,ie.validateBlockedPost=U,ie.isBlockedAuthor=ee,ie.validateBlockedAuthor=ae,ie.isGeneratorView=ce,ie.validateGeneratorView=fe,ie.isGeneratorViewerState=Me,ie.validateGeneratorViewerState=Ve,ie.isSkeletonFeedPost=Ae,ie.validateSkeletonFeedPost=Re,ie.isSkeletonReasonRepost=ue,ie.validateSkeletonReasonRepost=xe,ie.isSkeletonReasonPin=Le,ie.validateSkeletonReasonPin=Ue,ie.isThreadgateView=We,ie.validateThreadgateView=nt,ie.isInteraction=At,ie.validateInteraction=tt;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.feed.defs",n="postView";function s(X){return r(X,i,n)}function l(X){return t(X,i,n)}const a="viewerState";function d(X){return r(X,i,a)}function p(X){return t(X,i,a)}const u="threadContext";function h(X){return r(X,i,u)}function y(X){return t(X,i,u)}const m="feedViewPost";function w(X){return r(X,i,m)}function x(X){return t(X,i,m)}const v="replyRef";function k(X){return r(X,i,v)}function A(X){return t(X,i,v)}const S="reasonRepost";function E(X){return r(X,i,S)}function _(X){return t(X,i,S)}const C="reasonPin";function O(X){return r(X,i,C)}function V(X){return t(X,i,C)}const I="threadViewPost";function z(X){return r(X,i,I)}function N(X){return t(X,i,I)}const R="notFoundPost";function D(X){return r(X,i,R)}function q(X){return t(X,i,R)}const j="blockedPost";function L(X){return r(X,i,j)}function U(X){return t(X,i,j)}const W="blockedAuthor";function ee(X){return r(X,i,W)}function ae(X){return t(X,i,W)}const de="generatorView";function ce(X){return r(X,i,de)}function fe(X){return t(X,i,de)}const K="generatorViewerState";function Me(X){return r(X,i,K)}function Ve(X){return t(X,i,K)}const me="skeletonFeedPost";function Ae(X){return r(X,i,me)}function Re(X){return t(X,i,me)}const Te="skeletonReasonRepost";function ue(X){return r(X,i,Te)}function xe(X){return t(X,i,Te)}const be="skeletonReasonPin";function Le(X){return r(X,i,be)}function Ue(X){return t(X,i,be)}const ze="threadgateView";function We(X){return r(X,i,ze)}
2function nt(X){return t(X,i,ze)}const Ke="interaction";function At(X){return r(X,i,Ke)}function tt(X){return t(X,i,Ke)}return ie.REQUESTLESS=`${i}#requestLess`,ie.REQUESTMORE=`${i}#requestMore`,ie.CLICKTHROUGHITEM=`${i}#clickthroughItem`,ie.CLICKTHROUGHAUTHOR=`${i}#clickthroughAuthor`,ie.CLICKTHROUGHREPOSTER=`${i}#clickthroughReposter`,ie.CLICKTHROUGHEMBED=`${i}#clickthroughEmbed`,ie.CONTENTMODEUNSPECIFIED=`${i}#contentModeUnspecified`,ie.CONTENTMODEVIDEO=`${i}#contentModeVideo`,ie.INTERACTIONSEEN=`${i}#interactionSeen`,ie.INTERACTIONLIKE=`${i}#interactionLike`,ie.INTERACTIONREPOST=`${i}#interactionRepost`,ie.INTERACTIONREPLY=`${i}#interactionReply`,ie.INTERACTIONQUOTE=`${i}#interactionQuote`,ie.INTERACTIONSHARE=`${i}#interactionShare`,ie}var xo={},Ty;function w_(){if(Ty)return xo;Ty=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.toKnownErr=n,xo.isFeed=l,xo.validateFeed=a,xo.isLinks=p,xo.validateLinks=u;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.feed.describeFeedGenerator";function n(h){return h}const s="feed";function l(h){return r(h,i,s)}function a(h){return t(h,i,s)}const d="links";function p(h){return r(h,i,d)}function u(h){return t(h,i,d)}return xo}var ps={},qy;function x_(){if(qy)return ps;qy=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.isRecord=s,ps.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.feed.generator",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return ps}var Ya={},Dy;function k_(){if(Dy)return Ya;Dy=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ya}var Za={},Oy;function S_(){if(Oy)return Za;Oy=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Za}var ec={},Iy;function A_(){if(Iy)return ec;Iy=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ec}var an={},My;function R_(){if(My)return an;My=1,Object.defineProperty(an,"__esModule",{value:!0}),an.toKnownErr=n,an.isLike=l,an.validateLike=a;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.feed.getLikes";function n(d){return d}const s="like";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return an}var tc={},Ny;function __(){if(Ny)return tc;Ny=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return tc}var rc={},By;function j_(){if(By)return rc;By=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return rc}var oc={},Vy;function E_(){if(Vy)return oc;Vy=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return oc}var ic={},Ly;function C_(){if(Ly)return ic;Ly=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ic}var nc={},zy;function P_(){if(zy)return nc;zy=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return nc}var us={},Fy;function T_(){if(Fy)return us;Fy=1,Object.defineProperty(us,"__esModule",{value:!0}),us.isRecord=s,us.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.feed.like",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return us}var Yt={},$y;function q_(){if($y)return Yt;$y=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.isRecord=s,Yt.validateRecord=l,Yt.isReplyRef=d,Yt.validateReplyRef=p,Yt.isEntity=h,Yt.validateEntity=y,Yt.isTextSlice=w,Yt.validateTextSlice=x;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.feed.post",n="main";function s(v){return r(v,i,n)}function l(v){return t(v,i,n,!0)}const a="replyRef";function d(v){return r(v,i,a)}function p(v){return t(v,i,a)}const u="entity";function h(v){return r(v,i,u)}function y(v){return t(v,i,u)}const m="textSlice";function w(v){return r(v,i,m)}function x(v){return t(v,i,m)}return Yt}var Ho={},Gy;function D_(){if(Gy)return Ho;Gy=1,Object.defineProperty(Ho,"__esModule",{value:!0}
2),Ho.isRecord=s,Ho.validateRecord=l,Ho.isDisableRule=d,Ho.validateDisableRule=p;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.feed.postgate",n="main";function s(u){return r(u,i,n)}function l(u){return t(u,i,n,!0)}const a="disableRule";function d(u){return r(u,i,a)}function p(u){return t(u,i,a)}return Ho}var fs={},Uy;function O_(){if(Uy)return fs;Uy=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.isRecord=s,fs.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.feed.repost",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return fs}var sc={},Hy;function I_(){if(Hy)return sc;Hy=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return sc}var Ct={},Ky;function M_(){if(Ky)return Ct;Ky=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.isRecord=s,Ct.validateRecord=l,Ct.isMentionRule=d,Ct.validateMentionRule=p,Ct.isFollowerRule=h,Ct.validateFollowerRule=y,Ct.isFollowingRule=w,Ct.validateFollowingRule=x,Ct.isListRule=k,Ct.validateListRule=A;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.feed.threadgate",n="main";function s(S){return r(S,i,n)}function l(S){return t(S,i,n,!0)}const a="mentionRule";function d(S){return r(S,i,a)}function p(S){return t(S,i,a)}const u="followerRule";function h(S){return r(S,i,u)}function y(S){return t(S,i,u)}const m="followingRule";function w(S){return r(S,i,m)}function x(S){return t(S,i,m)}const v="listRule";function k(S){return r(S,i,v)}function A(S){return t(S,i,v)}return Ct}var ms={},Wy;function N_(){if(Wy)return ms;Wy=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.isRecord=s,ms.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.graph.block",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return ms}var Fe={},Xy;function B_(){if(Xy)return Fe;Xy=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.REFERENCELIST=Fe.CURATELIST=Fe.MODLIST=void 0,Fe.isListViewBasic=s,Fe.validateListViewBasic=l,Fe.isListView=d,Fe.validateListView=p,Fe.isListItemView=h,Fe.validateListItemView=y,Fe.isStarterPackView=w,Fe.validateStarterPackView=x,Fe.isStarterPackViewBasic=k,Fe.validateStarterPackViewBasic=A,Fe.isListViewerState=E,Fe.validateListViewerState=_,Fe.isNotFoundActor=O,Fe.validateNotFoundActor=V,Fe.isRelationship=z,Fe.validateRelationship=N;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.graph.defs",n="listViewBasic";function s(R){return r(R,i,n)}function l(R){return t(R,i,n)}const a="listView";function d(R){return r(R,i,a)}function p(R){return t(R,i,a)}const u="listItemView";function h(R){return r(R,i,u)}function y(R){return t(R,i,u)}const m="starterPackView";function w(R){return r(R,i,m)}function x(R){return t(R,i,m)}const v="starterPackViewBasic";function k(R){return r(R,i,v)}function A(R){return t(R,i,v)}Fe.MODLIST=`${i}#modlist`,Fe.CURATELIST=`${i}#curatelist`,Fe.REFERENCELIST=`${i}#referencelist`;const S="listViewerState";function E(R){return r(R,i,S)}function _(R){return t(R,i,S)}const C="notFoundActor";function O(R){return r(R,i,C)}function V(R){return t(R,i,C)}const I="relationship";function z(R){return r(R,i,I)}function N(R){return t(R,i,I)}return Fe}var hs={},Qy;function V_(){if(Qy)return hs;Qy=1,Object.defineProperty(hs,"__esModule",{value:!0}),hs.isRecord=s,hs.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.graph.follow",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return hs}var ac={},Jy;function L_(){if(Jy)return ac;Jy=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ac}var cc={},Yy;function z_(){if(Yy)return cc;Yy=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return cc}var lc={},Zy;function F_(){if(Zy)return lc;Zy=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return lc}var dc={},eg;function $_(){if(eg)return dc;eg=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return dc}var pc={},tg;function G_(){if(tg)return pc;tg=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return pc}var uc={},rg;function U_(){if(rg)return uc;rg=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return uc}var fc={},og;function H_(){if(og)return fc;og=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return fc}var mc={},ig;function K_(){if(ig)return mc;ig=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return mc}var hc={},ng;function W_(){if(ng)return hc;ng=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return hc}var cn={},sg;
2function X_(){if(sg)return cn;sg=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.toKnownErr=n,cn.isListWithMembership=l,cn.validateListWithMembership=a;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.graph.getListsWithMembership";function n(d){return d}const s="listWithMembership";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return cn}var yc={},ag;function Q_(){if(ag)return yc;ag=1,Object.defineProperty(yc,"__esModule",{value:!0}),yc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return yc}var gc={},cg;function J_(){if(cg)return gc;cg=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return gc}var bc={},lg;function Y_(){if(lg)return bc;lg=1,Object.defineProperty(bc,"__esModule",{value:!0}),bc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return bc}var ln={},dg;function Z_(){if(dg)return ln;dg=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.toKnownErr=n,ln.isStarterPackWithMembership=l,ln.validateStarterPackWithMembership=a;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.graph.getStarterPacksWithMembership";function n(d){return d}const s="starterPackWithMembership";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return ln}var vc={},pg;function ej(){if(pg)return vc;pg=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return vc}var ys={},ug;function tj(){if(ug)return ys;ug=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.isRecord=s,ys.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.graph.list",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return ys}var gs={},fg;function rj(){if(fg)return gs;fg=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.isRecord=s,gs.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.graph.listblock",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return gs}var bs={},mg;function oj(){if(mg)return bs;mg=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.isRecord=s,bs.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.graph.listitem",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return bs}var wc={},hg;function ij(){if(hg)return wc;hg=1,Object.defineProperty(wc,"__esModule",{value:!0}),wc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return wc}var xc={},yg;function nj(){if(yg)return xc;yg=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return xc}var kc={},gg;function sj(){if(gg)return kc;gg=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return kc}var Sc={},bg;function aj(){if(bg)return Sc;bg=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Sc}var Ko={},vg;function cj(){if(vg)return Ko;vg=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.isRecord=s,Ko.validateRecord=l,Ko.isFeedItem=d,Ko.validateFeedItem=p;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.graph.starterpack",n="main";function s(u){return r(u,i,n)}function l(u){return t(u,i,n,!0)}const a="feedItem";function d(u){return r(u,i,a)}function p(u){return t(u,i,a)}return Ko}var Ac={},wg;function lj(){if(wg)return Ac;wg=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ac}var Rc={},xg;function dj(){if(xg)return Rc;xg=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Rc}var _c={},kg;function pj(){if(kg)return _c;kg=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return _c}var vs={},Sg;function uj(){if(Sg)return vs;Sg=1,Object.defineProperty(vs,"__esModule",{value:!0}
2),vs.isRecord=s,vs.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.graph.verification",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return vs}var Zt={},Ag;function fj(){if(Ag)return Zt;Ag=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.isLabelerView=s,Zt.validateLabelerView=l,Zt.isLabelerViewDetailed=d,Zt.validateLabelerViewDetailed=p,Zt.isLabelerViewerState=h,Zt.validateLabelerViewerState=y,Zt.isLabelerPolicies=w,Zt.validateLabelerPolicies=x;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.labeler.defs",n="labelerView";function s(v){return r(v,i,n)}function l(v){return t(v,i,n)}const a="labelerViewDetailed";function d(v){return r(v,i,a)}function p(v){return t(v,i,a)}const u="labelerViewerState";function h(v){return r(v,i,u)}function y(v){return t(v,i,u)}const m="labelerPolicies";function w(v){return r(v,i,m)}function x(v){return t(v,i,m)}return Zt}var jc={},Rg;function mj(){if(Rg)return jc;Rg=1,Object.defineProperty(jc,"__esModule",{value:!0}),jc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return jc}var ws={},_g;function hj(){if(_g)return ws;_g=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.isRecord=s,ws.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.labeler.service",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return ws}var xs={},jg;function yj(){if(jg)return xs;jg=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.isRecord=s,xs.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.notification.declaration",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return xs}var Ze={},Eg;function gj(){if(Eg)return Ze;Eg=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.isRecordDeleted=s,Ze.validateRecordDeleted=l,Ze.isChatPreference=d,Ze.validateChatPreference=p,Ze.isFilterablePreference=h,Ze.validateFilterablePreference=y,Ze.isPreference=w,Ze.validatePreference=x,Ze.isPreferences=k,Ze.validatePreferences=A,Ze.isActivitySubscription=E,Ze.validateActivitySubscription=_,Ze.isSubjectActivitySubscription=O,Ze.validateSubjectActivitySubscription=V;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.notification.defs",n="recordDeleted";function s(I){return r(I,i,n)}function l(I){return t(I,i,n)}const a="chatPreference";function d(I){return r(I,i,a)}function p(I){return t(I,i,a)}const u="filterablePreference";function h(I){return r(I,i,u)}function y(I){return t(I,i,u)}const m="preference";function w(I){return r(I,i,m)}function x(I){return t(I,i,m)}const v="preferences";function k(I){return r(I,i,v)}function A(I){return t(I,i,v)}const S="activitySubscription";function E(I){return r(I,i,S)}function _(I){return t(I,i,S)}const C="subjectActivitySubscription";function O(I){return r(I,i,C)}function V(I){return t(I,i,C)}return Ze}var Ec={},Cg;function bj(){if(Cg)return Ec;Cg=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ec}var Cc={},Pg;function vj(){if(Pg)return Cc;Pg=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Cc}var Pc={},Tg;function wj(){if(Tg)return Pc;Tg=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Pc}var dn={},qg;function xj(){if(qg)return dn;qg=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.toKnownErr=n,dn.isNotification=l,dn.validateNotification=a;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.notification.listNotifications";function n(d){return d}const s="notification";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return dn}var Tc={},Dg;function kj(){if(Dg)return Tc;Dg=1,Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Tc}var qc={},Og;function Sj(){if(Og)return qc;Og=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return qc}var Dc={},Ig;function Aj(){if(Ig)return Dc;Ig=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Dc}var Oc={},Mg;function Rj(){if(Mg)return Oc;Mg=1,Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Oc}var Ic={},Ng;function _j(){if(Ng)return Ic;Ng=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ic}var Mc={},Bg;function jj(){if(Bg)return Mc;Bg=1,Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Mc}var Pt={},Vg;function Ej(){if(Vg)return Pt;
2Vg=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.isMain=s,Pt.validateMain=l,Pt.isMention=d,Pt.validateMention=p,Pt.isLink=h,Pt.validateLink=y,Pt.isTag=w,Pt.validateTag=x,Pt.isByteSlice=k,Pt.validateByteSlice=A;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.richtext.facet",n="main";function s(S){return r(S,i,n)}function l(S){return t(S,i,n)}const a="mention";function d(S){return r(S,i,a)}function p(S){return t(S,i,a)}const u="link";function h(S){return r(S,i,u)}function y(S){return t(S,i,u)}const m="tag";function w(S){return r(S,i,m)}function x(S){return t(S,i,m)}const v="byteSlice";function k(S){return r(S,i,v)}function A(S){return t(S,i,v)}return Pt}var Be={},Lg;function Cj(){if(Lg)return Be;Lg=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.isSkeletonSearchPost=s,Be.validateSkeletonSearchPost=l,Be.isSkeletonSearchActor=d,Be.validateSkeletonSearchActor=p,Be.isSkeletonSearchStarterPack=h,Be.validateSkeletonSearchStarterPack=y,Be.isTrendingTopic=w,Be.validateTrendingTopic=x,Be.isSkeletonTrend=k,Be.validateSkeletonTrend=A,Be.isTrendView=E,Be.validateTrendView=_,Be.isThreadItemPost=O,Be.validateThreadItemPost=V,Be.isThreadItemNoUnauthenticated=z,Be.validateThreadItemNoUnauthenticated=N,Be.isThreadItemNotFound=D,Be.validateThreadItemNotFound=q,Be.isThreadItemBlocked=L,Be.validateThreadItemBlocked=U,Be.isAgeAssuranceState=ee,Be.validateAgeAssuranceState=ae,Be.isAgeAssuranceEvent=ce,Be.validateAgeAssuranceEvent=fe;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.unspecced.defs",n="skeletonSearchPost";function s(K){return r(K,i,n)}function l(K){return t(K,i,n)}const a="skeletonSearchActor";function d(K){return r(K,i,a)}function p(K){return t(K,i,a)}const u="skeletonSearchStarterPack";function h(K){return r(K,i,u)}function y(K){return t(K,i,u)}const m="trendingTopic";function w(K){return r(K,i,m)}function x(K){return t(K,i,m)}const v="skeletonTrend";function k(K){return r(K,i,v)}function A(K){return t(K,i,v)}const S="trendView";function E(K){return r(K,i,S)}function _(K){return t(K,i,S)}const C="threadItemPost";function O(K){return r(K,i,C)}function V(K){return t(K,i,C)}const I="threadItemNoUnauthenticated";function z(K){return r(K,i,I)}function N(K){return t(K,i,I)}const R="threadItemNotFound";function D(K){return r(K,i,R)}function q(K){return t(K,i,R)}const j="threadItemBlocked";function L(K){return r(K,i,j)}function U(K){return t(K,i,j)}const W="ageAssuranceState";function ee(K){return r(K,i,W)}function ae(K){return t(K,i,W)}const de="ageAssuranceEvent";function ce(K){return r(K,i,de)}function fe(K){return t(K,i,de)}return Be}var Nc={},zg;function Pj(){if(zg)return Nc;zg=1,Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Nc}var pn={},Fg;function Tj(){if(Fg)return pn;Fg=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.toKnownErr=n,pn.isLiveNowConfig=l,pn.validateLiveNowConfig=a;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.unspecced.getConfig";function n(d){return d}const s="liveNowConfig";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return pn}var Bc={},$g;function qj(){if($g)return Bc;$g=1,Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Bc}var Vc={},Gg;function Dj(){if(Gg)return Vc;Gg=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Vc}var Lc={},Ug;function Oj(){if(Ug)return Lc;Ug=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Lc}var un={},Hg;function Ij(){if(Hg)return un;Hg=1,Object.defineProperty(un,"__esModule",{value:!0}),un.toKnownErr=n,un.isThreadItem=l,un.validateThreadItem=a;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.unspecced.getPostThreadOtherV2";function n(d){return d}const s="threadItem";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return un}var fn={},Kg;function Mj(){if(Kg)return fn;Kg=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.toKnownErr=n,fn.isThreadItem=l,fn.validateThreadItem=a;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.unspecced.getPostThreadV2";function n(d){return d}const s="threadItem";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return fn}var zc={},Wg;function Nj(){if(Wg)return zc;Wg=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return zc}var Fc={}
2,Xg;function Bj(){if(Xg)return Fc;Xg=1,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Fc}var $c={},Qg;function Vj(){if(Qg)return $c;Qg=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return $c}var Gc={},Jg;function Lj(){if(Jg)return Gc;Jg=1,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Gc}var Uc={},Yg;function zj(){if(Yg)return Uc;Yg=1,Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Uc}var Hc={},Zg;function Fj(){if(Zg)return Hc;Zg=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Hc}var Kc={},eb;function $j(){if(eb)return Kc;eb=1,Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Kc}var mn={},tb;function Gj(){if(tb)return mn;tb=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.toKnownErr=n,mn.isSuggestion=l,mn.validateSuggestion=a;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.unspecced.getTaggedSuggestions";function n(d){return d}const s="suggestion";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return mn}var Wc={},rb;function Uj(){if(rb)return Wc;rb=1,Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Wc}var Xc={},ob;function Hj(){if(ob)return Xc;ob=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Xc}var Qc={},ib;function Kj(){if(ib)return Qc;ib=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Qc}var ks={},nb;function Wj(){if(nb)return ks;nb=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.isJobStatus=s,ks.validateJobStatus=l;const o=P(),r=T().is$typed,t=o.validate,i="app.bsky.video.defs",n="jobStatus";function s(a){return r(a,i,n)}function l(a){return t(a,i,n)}return ks}var Jc={},sb;function Xj(){if(sb)return Jc;sb=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Jc}var Yc={},ab;function Qj(){if(ab)return Yc;ab=1,Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Yc}var Zc={},cb;function Jj(){if(cb)return Zc;cb=1,Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Zc}var Ss={},lb;function Yj(){if(lb)return Ss;lb=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.isRecord=s,Ss.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="chat.bsky.actor.declaration",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return Ss}var As={},db;function Zj(){if(db)return As;db=1,Object.defineProperty(As,"__esModule",{value:!0}),As.isProfileViewBasic=s,As.validateProfileViewBasic=l;const o=P(),r=T().is$typed,t=o.validate,i="chat.bsky.actor.defs",n="profileViewBasic";function s(a){return r(a,i,n)}function l(a){return t(a,i,n)}return As}var el={},pb;function e0(){if(pb)return el;
2pb=1,Object.defineProperty(el,"__esModule",{value:!0}),el.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return el}var tl={},ub;function t0(){if(ub)return tl;ub=1,Object.defineProperty(tl,"__esModule",{value:!0}),tl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return tl}var rl={},fb;function r0(){if(fb)return rl;fb=1,Object.defineProperty(rl,"__esModule",{value:!0}),rl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return rl}var ye={},mb;function o0(){if(mb)return ye;mb=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.isMessageRef=s,ye.validateMessageRef=l,ye.isMessageInput=d,ye.validateMessageInput=p,ye.isMessageView=h,ye.validateMessageView=y,ye.isDeletedMessageView=w,ye.validateDeletedMessageView=x,ye.isMessageViewSender=k,ye.validateMessageViewSender=A,ye.isReactionView=E,ye.validateReactionView=_,ye.isReactionViewSender=O,ye.validateReactionViewSender=V,ye.isMessageAndReactionView=z,ye.validateMessageAndReactionView=N,ye.isConvoView=D,ye.validateConvoView=q,ye.isLogBeginConvo=L,ye.validateLogBeginConvo=U,ye.isLogAcceptConvo=ee,ye.validateLogAcceptConvo=ae,ye.isLogLeaveConvo=ce,ye.validateLogLeaveConvo=fe,ye.isLogMuteConvo=Me,ye.validateLogMuteConvo=Ve,ye.isLogUnmuteConvo=Ae,ye.validateLogUnmuteConvo=Re,ye.isLogCreateMessage=ue,ye.validateLogCreateMessage=xe,ye.isLogDeleteMessage=Le,ye.validateLogDeleteMessage=Ue,ye.isLogReadMessage=We,ye.validateLogReadMessage=nt,ye.isLogAddReaction=At,ye.validateLogAddReaction=tt,ye.isLogRemoveReaction=pt,ye.validateLogRemoveReaction=ut;const o=P(),r=T().is$typed,t=o.validate,i="chat.bsky.convo.defs",n="messageRef";function s(J){return r(J,i,n)}function l(J){return t(J,i,n)}const a="messageInput";function d(J){return r(J,i,a)}function p(J){return t(J,i,a)}const u="messageView";function h(J){return r(J,i,u)}function y(J){return t(J,i,u)}const m="deletedMessageView";function w(J){return r(J,i,m)}function x(J){return t(J,i,m)}const v="messageViewSender";function k(J){return r(J,i,v)}function A(J){return t(J,i,v)}const S="reactionView";function E(J){return r(J,i,S)}function _(J){return t(J,i,S)}const C="reactionViewSender";function O(J){return r(J,i,C)}function V(J){return t(J,i,C)}const I="messageAndReactionView";function z(J){return r(J,i,I)}function N(J){return t(J,i,I)}const R="convoView";function D(J){return r(J,i,R)}function q(J){return t(J,i,R)}const j="logBeginConvo";function L(J){return r(J,i,j)}function U(J){return t(J,i,j)}const W="logAcceptConvo";function ee(J){return r(J,i,W)}function ae(J){return t(J,i,W)}const de="logLeaveConvo";function ce(J){return r(J,i,de)}function fe(J){return t(J,i,de)}const K="logMuteConvo";function Me(J){return r(J,i,K)}function Ve(J){return t(J,i,K)}const me="logUnmuteConvo";function Ae(J){return r(J,i,me)}function Re(J){return t(J,i,me)}const Te="logCreateMessage";function ue(J){return r(J,i,Te)}function xe(J){return t(J,i,Te)}const be="logDeleteMessage";function Le(J){return r(J,i,be)}function Ue(J){return t(J,i,be)}const ze="logReadMessage";function We(J){return r(J,i,ze)}function nt(J){return t(J,i,ze)}const Ke="logAddReaction";function At(J){return r(J,i,Ke)}function tt(J){return t(J,i,Ke)}const X="logRemoveReaction";function pt(J){return r(J,i,X)}function ut(J){return t(J,i,X)}return ye}var ol={},hb;function i0(){if(hb)return ol;hb=1,Object.defineProperty(ol,"__esModule",{value:!0}),ol.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ol}var il={},yb;function n0(){if(yb)return il;yb=1,Object.defineProperty(il,"__esModule",{value:!0}),il.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return il}var nl={},gb;function s0(){if(gb)return nl;gb=1,Object.defineProperty(nl,"__esModule",{value:!0}),nl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return nl}var sl={},bb;function a0(){if(bb)return sl;bb=1,Object.defineProperty(sl,"__esModule",{value:!0}),sl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return sl}var al={},vb;function c0(){if(vb)return al;
2vb=1,Object.defineProperty(al,"__esModule",{value:!0}),al.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return al}var cl={},wb;function l0(){if(wb)return cl;wb=1,Object.defineProperty(cl,"__esModule",{value:!0}),cl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return cl}var ll={},xb;function d0(){if(xb)return ll;xb=1,Object.defineProperty(ll,"__esModule",{value:!0}),ll.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ll}var dl={},kb;function p0(){if(kb)return dl;kb=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return dl}var pl={},Sb;function u0(){if(Sb)return pl;Sb=1,Object.defineProperty(pl,"__esModule",{value:!0}),pl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return pl}var ul={},Ab;function f0(){if(Ab)return ul;Ab=1,Object.defineProperty(ul,"__esModule",{value:!0}),ul.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ul}var hn={},Rb;function m0(){if(Rb)return hn;Rb=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.toKnownErr=n,hn.isBatchItem=l,hn.validateBatchItem=a;const o=P(),r=T().is$typed,t=o.validate,i="chat.bsky.convo.sendMessageBatch";function n(d){return d}const s="batchItem";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return hn}var fl={},_b;function h0(){if(_b)return fl;_b=1,Object.defineProperty(fl,"__esModule",{value:!0}),fl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return fl}var ml={},jb;function y0(){if(jb)return ml;jb=1,Object.defineProperty(ml,"__esModule",{value:!0}),ml.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ml}var hl={},Eb;function g0(){if(Eb)return hl;Eb=1,Object.defineProperty(hl,"__esModule",{value:!0}),hl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return hl}var yn={},Cb;function b0(){if(Cb)return yn;Cb=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.toKnownErr=n,yn.isMetadata=l,yn.validateMetadata=a;const o=P(),r=T().is$typed,t=o.validate,i="chat.bsky.moderation.getActorMetadata";function n(d){return d}const s="metadata";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return yn}var yl={},Pb;function v0(){if(Pb)return yl;Pb=1,Object.defineProperty(yl,"__esModule",{value:!0}),yl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return yl}var gl={},Tb;function w0(){if(Tb)return gl;Tb=1,Object.defineProperty(gl,"__esModule",{value:!0}),gl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return gl}var Tt={},qb;function x0(){if(qb)return Tt;qb=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.isStatusAttr=s,Tt.validateStatusAttr=l,Tt.isAccountView=d,Tt.validateAccountView=p,Tt.isRepoRef=h,Tt.validateRepoRef=y,Tt.isRepoBlobRef=w,Tt.validateRepoBlobRef=x,Tt.isThreatSignature=k,Tt.validateThreatSignature=A;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.admin.defs",n="statusAttr";function s(S){return r(S,i,n)}function l(S){return t(S,i,n)}const a="accountView";function d(S){return r(S,i,a)}function p(S){return t(S,i,a)}const u="repoRef";function h(S){return r(S,i,u)}function y(S){return t(S,i,u)}const m="repoBlobRef";function w(S){return r(S,i,m)}function x(S){return t(S,i,m)}const v="threatSignature";function k(S){return r(S,i,v)}function A(S){return t(S,i,v)}return Tt}var bl={},Db;function k0(){if(Db)return bl;Db=1,Object.defineProperty(bl,"__esModule",{value:!0}),bl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return bl}var vl={},Ob;function S0(){if(Ob)return vl;
2Ob=1,Object.defineProperty(vl,"__esModule",{value:!0}),vl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return vl}var wl={},Ib;function A0(){if(Ib)return wl;Ib=1,Object.defineProperty(wl,"__esModule",{value:!0}),wl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return wl}var xl={},Mb;function R0(){if(Mb)return xl;Mb=1,Object.defineProperty(xl,"__esModule",{value:!0}),xl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return xl}var kl={},Nb;function _0(){if(Nb)return kl;Nb=1,Object.defineProperty(kl,"__esModule",{value:!0}),kl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return kl}var Sl={},Bb;function j0(){if(Bb)return Sl;Bb=1,Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Sl}var Al={},Vb;function E0(){if(Vb)return Al;Vb=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Al}var Rl={},Lb;function C0(){if(Lb)return Rl;Lb=1,Object.defineProperty(Rl,"__esModule",{value:!0}),Rl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Rl}var _l={},zb;function P0(){if(zb)return _l;
2zb=1,Object.defineProperty(_l,"__esModule",{value:!0}),_l.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return _l}var jl={},Fb;function T0(){if(Fb)return jl;Fb=1,Object.defineProperty(jl,"__esModule",{value:!0}),jl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return jl}var El={},$b;function q0(){if($b)return El;$b=1,Object.defineProperty(El,"__esModule",{value:!0}),El.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return El}var Cl={},Gb;function D0(){if(Gb)return Cl;Gb=1,Object.defineProperty(Cl,"__esModule",{value:!0}),Cl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Cl}var Pl={},Ub;function O0(){if(Ub)return Pl;Ub=1,Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Pl}var Tl={},Hb;function I0(){if(Hb)return Tl;Hb=1,Object.defineProperty(Tl,"__esModule",{value:!0}),Tl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Tl}var ql={},Kb;function M0(){if(Kb)return ql;Kb=1,Object.defineProperty(ql,"__esModule",{value:!0}),ql.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ql}var Rs={},Wb;function N0(){if(Wb)return Rs;Wb=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.isIdentityInfo=s,Rs.validateIdentityInfo=l;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.identity.defs",n="identityInfo";function s(a){return r(a,i,n)}function l(a){return t(a,i,n)}return Rs}var Dl={},Xb;function B0(){if(Xb)return Dl;Xb=1,Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Dl}var Ol={},Qb;function V0(){if(Qb)return Ol;Qb=1,Object.defineProperty(Ol,"__esModule",{value:!0}),Ol.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ol}var Il={},Jb;function L0(){if(Jb)return Il;Jb=1,Object.defineProperty(Il,"__esModule",{value:!0}),Il.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Il}var Ml={},Yb;function z0(){if(Yb)return Ml;Yb=1,Object.defineProperty(Ml,"__esModule",{value:!0}),Ml.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ml}var Nl={},Zb;function F0(){if(Zb)return Nl;Zb=1,Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Nl}var qt={},ev;function $0(){if(ev)return qt;ev=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.isLabel=s,qt.validateLabel=l,qt.isSelfLabels=d,qt.validateSelfLabels=p,qt.isSelfLabel=h,qt.validateSelfLabel=y,qt.isLabelValueDefinition=w,qt.validateLabelValueDefinition=x,qt.isLabelValueDefinitionStrings=k,qt.validateLabelValueDefinitionStrings=A;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.label.defs",n="label";function s(S){return r(S,i,n)}function l(S){return t(S,i,n)}const a="selfLabels";function d(S){return r(S,i,a)}function p(S){return t(S,i,a)}const u="selfLabel";function h(S){return r(S,i,u)}function y(S){return t(S,i,u)}const m="labelValueDefinition";function w(S){return r(S,i,m)}function x(S){return t(S,i,m)}const v="labelValueDefinitionStrings";function k(S){return r(S,i,v)}function A(S){return t(S,i,v)}return qt}var Bl={},tv;function G0(){if(tv)return Bl;tv=1,Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Bl}var Wo={},rv;function U0(){if(rv)return Wo;rv=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.isLabels=s,Wo.validateLabels=l,Wo.isInfo=d,Wo.validateInfo=p;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.label.subscribeLabels",n="labels";function s(u){return r(u,i,n)}function l(u){return t(u,i,n)}const a="info";function d(u){return r(u,i,a)}function p(u){return t(u,i,a)}return Wo}var _s={},ov;function H0(){if(ov)return _s;ov=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.isRecord=s,_s.validateRecord=l;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.lexicon.schema",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n,!0)}return _s}var gn={},iv;function K0(){if(iv)return gn;iv=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.toKnownErr=n,gn.isModTool=l,gn.validateModTool=a;
2const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.moderation.createReport";function n(d){return d}const s="modTool";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return gn}var et={},nv;function W0(){if(nv)return et;nv=1,Object.defineProperty(et,"__esModule",{value:!0}),et.REASONAPPEAL=et.REASONOTHER=et.REASONRUDE=et.REASONSEXUAL=et.REASONMISLEADING=et.REASONVIOLATION=et.REASONSPAM=void 0;const o=P();T().is$typed,o.validate;const r="com.atproto.moderation.defs";return et.REASONSPAM=`${r}#reasonSpam`,et.REASONVIOLATION=`${r}#reasonViolation`,et.REASONMISLEADING=`${r}#reasonMisleading`,et.REASONSEXUAL=`${r}#reasonSexual`,et.REASONRUDE=`${r}#reasonRude`,et.REASONOTHER=`${r}#reasonOther`,et.REASONAPPEAL=`${r}#reasonAppeal`,et}var js={},sv;function X0(){if(sv)return js;sv=1,Object.defineProperty(js,"__esModule",{value:!0}),js.isCommitMeta=s,js.validateCommitMeta=l;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.repo.defs",n="commitMeta";function s(a){return r(a,i,n)}function l(a){return t(a,i,n)}return js}var Vl={},av;function Q0(){if(av)return Vl;av=1,Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Vl}var Ll={},cv;function J0(){if(cv)return Ll;cv=1,Object.defineProperty(Ll,"__esModule",{value:!0}),Ll.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ll}var bn={},lv;function Y0(){if(lv)return bn;lv=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.toKnownErr=n,bn.isRecordBlob=l,bn.validateRecordBlob=a;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.repo.listMissingBlobs";function n(d){return d}const s="recordBlob";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return bn}var vn={},dv;function Z0(){if(dv)return vn;dv=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.toKnownErr=n,vn.isRecord=l,vn.validateRecord=a;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.repo.listRecords";function n(d){return d}const s="record";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return vn}var Es={},pv;function eE(){if(pv)return Es;pv=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.isMain=s,Es.validateMain=l;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.repo.strongRef",n="main";function s(a){return r(a,i,n)}function l(a){return t(a,i,n)}return Es}var zl={},uv;function tE(){if(uv)return zl;uv=1,Object.defineProperty(zl,"__esModule",{value:!0}),zl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return zl}var Fl={},fv;function rE(){if(fv)return Fl;fv=1,Object.defineProperty(Fl,"__esModule",{value:!0}),Fl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Fl}var $l={},mv;function oE(){if(mv)return $l;mv=1,Object.defineProperty($l,"__esModule",{value:!0}),$l.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return $l}var Gl={},hv;function iE(){if(hv)return Gl;hv=1,Object.defineProperty(Gl,"__esModule",{value:!0}),Gl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Gl}var wn={},yv;function nE(){if(yv)return wn;yv=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.toKnownErr=n,wn.isAccountCodes=l,wn.validateAccountCodes=a;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.server.createInviteCodes";function n(d){return d}const s="accountCodes";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return wn}var Ul={},gv;function sE(){if(gv)return Ul;gv=1,Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ul}var Xo={},bv;function aE(){if(bv)return Xo;bv=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.isInviteCode=s,Xo.validateInviteCode=l,Xo.isInviteCodeUse=d,Xo.validateInviteCodeUse=p;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.server.defs",n="inviteCode";function s(u){return r(u,i,n)}function l(u){return t(u,i,n)}const a="inviteCodeUse";function d(u){return r(u,i,a)}function p(u){return t(u,i,a)}return Xo}var Hl={},vv;function cE(){if(vv)return Hl;
2vv=1,Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Hl}var ko={},wv;function lE(){if(wv)return ko;wv=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.toKnownErr=n,ko.isLinks=l,ko.validateLinks=a,ko.isContact=p,ko.validateContact=u;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.server.describeServer";function n(h){return h}const s="links";function l(h){return r(h,i,s)}function a(h){return t(h,i,s)}const d="contact";function p(h){return r(h,i,d)}function u(h){return t(h,i,d)}return ko}var Kl={},xv;function dE(){if(xv)return Kl;xv=1,Object.defineProperty(Kl,"__esModule",{value:!0}),Kl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Kl}var Wl={},kv;function pE(){if(kv)return Wl;kv=1,Object.defineProperty(Wl,"__esModule",{value:!0}),Wl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Wl}var Xl={},Sv;function uE(){if(Sv)return Xl;Sv=1,Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Xl}var Ql={},Av;function fE(){if(Av)return Ql;Av=1,Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ql}var Jl={},Rv;function mE(){if(Rv)return Jl;Rv=1,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Jl}var Yl={},_v;function hE(){if(_v)return Yl;_v=1,Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Yl}var Zl={},jv;function yE(){if(jv)return Zl;jv=1,Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Zl}var Vp={},Ev;function gE(){if(Ev)return Vp;Ev=1,Object.defineProperty(Vp,"__esModule",{value:!0});const o=P();return T().is$typed,o.validate,Vp}var ed={},Cv;function bE(){if(Cv)return ed;Cv=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ed}var xn={},Pv;function vE(){if(Pv)return xn;Pv=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.toKnownErr=n,xn.isHost=l,xn.validateHost=a;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.sync.listHosts";function n(d){return d}const s="host";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return xn}var kn={},Tv;function wE(){if(Tv)return kn;Tv=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.toKnownErr=n,kn.isRepo=l,kn.validateRepo=a;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.sync.listRepos";function n(d){return d}const s="repo";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return kn}var Sn={},qv;function xE(){if(qv)return Sn;qv=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.toKnownErr=n,Sn.isRepo=l,Sn.validateRepo=a;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.sync.listReposByCollection";function n(d){return d}const s="repo";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return Sn}var td={},Dv;function kE(){if(Dv)return td;Dv=1,Object.defineProperty(td,"__esModule",{value:!0}),td.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return td}var ct={},Ov;function SE(){if(Ov)return ct;Ov=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.isCommit=s,ct.validateCommit=l,ct.isSync=d,ct.validateSync=p,ct.isIdentity=h,ct.validateIdentity=y,ct.isAccount=w,ct.validateAccount=x,ct.isInfo=k,ct.validateInfo=A,ct.isRepoOp=E,ct.validateRepoOp=_;const o=P(),r=T().is$typed,t=o.validate,i="com.atproto.sync.subscribeRepos",n="commit";function s(C){return r(C,i,n)}function l(C){return t(C,i,n)}const a="sync";function d(C){return r(C,i,a)}function p(C){return t(C,i,a)}const u="identity";function h(C){return r(C,i,u)}function y(C){return t(C,i,u)}const m="account";function w(C){return r(C,i,m)}function x(C){return t(C,i,m)}const v="info";function k(C){return r(C,i,v)}function A(C){return t(C,i,v)}const S="repoOp";function E(C){return r(C,i,S)}function _(C){return t(C,i,S)}return ct}var rd={},Iv;function AE(){if(Iv)return rd;Iv=1,Object.defineProperty(rd,"__esModule",{value:!0}),rd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return rd}var od={},Mv;function RE(){if(Mv)return od;Mv=1,Object.defineProperty(od,"__esModule",{value:!0}),od.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return od}var id={},Nv;function _E(){if(Nv)return id;Nv=1,Object.defineProperty(id,"__esModule",{value:!0}),id.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return id}var nd={},Bv;function jE(){if(Bv)return nd;
2Bv=1,Object.defineProperty(nd,"__esModule",{value:!0}),nd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return nd}var sd={},Vv;function EE(){if(Vv)return sd;Vv=1,Object.defineProperty(sd,"__esModule",{value:!0}),sd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return sd}var Cs={},Lv;function CE(){if(Lv)return Cs;Lv=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.isTemplateView=s,Cs.validateTemplateView=l;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.communication.defs",n="templateView";function s(a){return r(a,i,n)}function l(a){return t(a,i,n)}return Cs}var ad={},zv;function PE(){if(zv)return ad;zv=1,Object.defineProperty(ad,"__esModule",{value:!0}),ad.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ad}var cd={},Fv;function TE(){if(Fv)return cd;Fv=1,Object.defineProperty(cd,"__esModule",{value:!0}),cd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return cd}var ot={},$v;function qE(){if($v)return ot;
2$v=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.toKnownErr=n,ot.isEvent=l,ot.validateEvent=a,ot.isAccountCreated=p,ot.validateAccountCreated=u,ot.isEmailUpdated=y,ot.validateEmailUpdated=m,ot.isEmailConfirmed=x,ot.validateEmailConfirmed=v,ot.isPasswordUpdated=A,ot.validatePasswordUpdated=S,ot.isHandleUpdated=_,ot.validateHandleUpdated=C;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.hosting.getAccountHistory";function n(O){return O}const s="event";function l(O){return r(O,i,s)}function a(O){return t(O,i,s)}const d="accountCreated";function p(O){return r(O,i,d)}function u(O){return t(O,i,d)}const h="emailUpdated";function y(O){return r(O,i,h)}function m(O){return t(O,i,h)}const w="emailConfirmed";function x(O){return r(O,i,w)}function v(O){return t(O,i,w)}const k="passwordUpdated";function A(O){return r(O,i,k)}function S(O){return t(O,i,k)}const E="handleUpdated";function _(O){return r(O,i,E)}function C(O){return t(O,i,E)}return ot}var So={},Gv;function DE(){if(Gv)return So;Gv=1,Object.defineProperty(So,"__esModule",{value:!0}),So.toKnownErr=n,So.isCancellationResults=l,So.validateCancellationResults=a,So.isFailedCancellation=p,So.validateFailedCancellation=u;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.moderation.cancelScheduledActions";function n(h){return h}const s="cancellationResults";function l(h){return r(h,i,s)}function a(h){return t(h,i,s)}const d="failedCancellation";function p(h){return r(h,i,d)}function u(h){return t(h,i,d)}return So}var H={},Uv;function OE(){if(Uv)return H;Uv=1,Object.defineProperty(H,"__esModule",{value:!0}),H.TIMELINEEVENTPLCTOMBSTONE=H.TIMELINEEVENTPLCOPERATION=H.TIMELINEEVENTPLCCREATE=H.REVIEWNONE=H.REVIEWCLOSED=H.REVIEWESCALATED=H.REVIEWOPEN=void 0,H.isModEventView=s,H.validateModEventView=l,H.isModEventViewDetail=d,H.validateModEventViewDetail=p,H.isSubjectStatusView=h,H.validateSubjectStatusView=y,H.isSubjectView=w,H.validateSubjectView=x,H.isAccountStats=k,H.validateAccountStats=A,H.isRecordsStats=E,H.validateRecordsStats=_,H.isModEventTakedown=O,H.validateModEventTakedown=V,H.isModEventReverseTakedown=z,H.validateModEventReverseTakedown=N,H.isModEventResolveAppeal=D,H.validateModEventResolveAppeal=q,H.isModEventComment=L,H.validateModEventComment=U,H.isModEventReport=ee,H.validateModEventReport=ae,H.isModEventLabel=ce,H.validateModEventLabel=fe,H.isModEventPriorityScore=Me,H.validateModEventPriorityScore=Ve,H.isAgeAssuranceEvent=Ae,H.validateAgeAssuranceEvent=Re,H.isAgeAssuranceOverrideEvent=ue,H.validateAgeAssuranceOverrideEvent=xe,H.isRevokeAccountCredentialsEvent=Le,H.validateRevokeAccountCredentialsEvent=Ue,H.isModEventAcknowledge=We,H.validateModEventAcknowledge=nt,H.isModEventEscalate=At,H.validateModEventEscalate=tt,H.isModEventMute=pt,H.validateModEventMute=ut,H.isModEventUnmute=Bt,H.validateModEventUnmute=Vt,H.isModEventMuteReporter=Lt,H.validateModEventMuteReporter=zt,H.isModEventUnmuteReporter=Rt,H.validateModEventUnmuteReporter=_t,H.isModEventEmail=jt,H.validateModEventEmail=Xt,H.isModEventDivert=di,H.validateModEventDivert=pi,H.isModEventTag=ui,H.validateModEventTag=fi,H.isAccountEvent=mi,H.validateAccountEvent=hi,H.isIdentityEvent=yi,H.validateIdentityEvent=gi,H.isRecordEvent=bi,H.validateRecordEvent=vi,H.isScheduleTakedownEvent=wi,H.validateScheduleTakedownEvent=xi,H.isCancelScheduledTakedownEvent=ki,H.validateCancelScheduledTakedownEvent=Si,H.isRepoView=ga,H.validateRepoView=ba,H.isRepoViewDetail=va,H.validateRepoViewDetail=wa,H.isRepoViewNotFound=xa,H.validateRepoViewNotFound=ka,H.isRecordView=Sa,H.validateRecordView=Aa,H.isRecordViewDetail=Ra,H.validateRecordViewDetail=_a,H.isRecordViewNotFound=ja,H.validateRecordViewNotFound=Ea,H.isModeration=Ca,H.validateModeration=Pa,H.isModerationDetail=Ta,H.validateModerationDetail=qa,H.isBlobView=Da,H.validateBlobView=Oa,H.isImageDetails=Ia,H.validateImageDetails=Ma,H.isVideoDetails=Na,H.validateVideoDetails=Ba,H.isAccountHosting=f,H.validateAccountHosting=g,H.isRecordHosting=$,H.validateRecordHosting=ve,H.isReporterStats=Kk,H.validateReporterStats=Wk,H.isModTool=Xk,H.validateModTool=Qk,H.isScheduledActionView=Jk,H.validateScheduledActionView=Yk;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.moderation.defs",n="modEventView";function s(B){return r(B,i,n)}function l(B){return t(B,i,n)}const a="modEventViewDetail";function d(B){return r(B,i,a)}function p(B){return t(B,i,a)}const u="subjectStatusView";function h(B){return r(B,i,u)}function y(B){return t(B,i,u)}const m="subjectView";function w(B){return r(B,i,m)}function x(B){return t(B,i,m)}const v="accountStats";function k(B){return r(B,i,v)}function A(B){return t(B,i,v)}const S="recordsStats";function E(B){return r(B,i,S)}function _(B){return t(B,i,S)}H.REVIEWOPEN=`${i}#reviewOpen`,H.REVIEWESCALATED=`${i}#reviewEscalated`,H.REVIEWCLOSED=`${i}#reviewClosed`,H.REVIEWNONE=`${i}#reviewNone`;const C="modEventTakedown";function O(B){return r(B,i,C)}function V(B){return t(B,i,C)}const I="modEventReverseTakedown";function z(B){return r(B,i,I)}function N(B){return t(B,i,I)}const R="modEventResolveAppeal";function D(B){return r(B,i,R)}function q(B){return t(B,i,R)}const j="modEventComment";function L(B){return r(B,i,j)}function U(B){return t(B,i,j)}const W="modEventReport";function ee(B){return r(B,i,W)}function ae(B){return t(B,i,W)}const de="modEventLabel";function ce(B){return r(B,i,de)}function fe(B){return t(B,i,de)}const K="modEventPriorityScore";function Me(B){return r(B,i,K)}function Ve(B){return t(B,i,K)}const me="ageAssuranceEvent";function Ae(B){return r(B,i,me)}function Re(B){return t(B,i,me)}const Te="ageAssuranceOverrideEvent";function ue(B){return r(B,i,Te)}function xe(B){return t(B,i,Te)}const be="revokeAccountCredentialsEvent";function Le(B){return r(B,i,be)}function Ue(B){return t(B,i,be)}const ze="modEventAcknowledge";function We(B){return r(B,i,ze)}function nt(B){return t(B,i,ze)}const Ke="modEventEscalate";function At(B){return r(B,i,Ke)}function tt(B){return t(B,i,Ke)}const X="modEventMute";function pt(B){return r(B,i,X)}function ut(B){return t(B,i,X)}const J="modEventUnmute";function Bt(B){return r(B,i,J)}function Vt(B){return t(B,i,J)}const ft="modEventMuteReporter";function Lt(B){return r(B,i,ft)}function zt(B){return t(B,i,ft)}const mt="modEventUnmuteReporter";function Rt(B){return r(B,i,mt)}function _t(B){return t(B,i,mt)}const st="modEventEmail";function jt(B){return r(B,i,st)}function Xt(B){return t(B,i,st)}const eo="modEventDivert";function di(B){return r(B,i,eo)}function pi(B){return t(B,i,eo)}const to="modEventTag";function ui(B){return r(B,i,to)}function fi(B){return t(B,i,to)}const ro="accountEvent";function mi(B){return r(B,i,ro)}function hi(B){return t(B,i,ro)}const oo="identityEvent";function yi(B){return r(B,i,oo)}function gi(B){return t(B,i,oo)}const io="recordEvent";function bi(B){return r(B,i,io)}function vi(B){return t(B,i,io)}const no="scheduleTakedownEvent";function wi(B){return r(B,i,no)}function xi(B){return t(B,i,no)}const so="cancelScheduledTakedownEvent";function ki(B){return r(B,i,so)}function Si(B){return t(B,i,so)}const G="repoView";function ga(B){return r(B,i,G)}function ba(B){return t(B,i,G)}const Xn="repoViewDetail";function va(B){return r(B,i,Xn)}function wa(B){return t(B,i,Xn)}const Qn="repoViewNotFound";function xa(B){return r(B,i,Qn)}function ka(B){return t(B,i,Qn)}const Jn="recordView";function Sa(B){return r(B,i,Jn)}function Aa(B){return t(B,i,Jn)}const Yn="recordViewDetail";function Ra(B){return r(B,i,Yn)}function _a(B){return t(B,i,Yn)}const Zn="recordViewNotFound";function ja(B){return r(B,i,Zn)}function Ea(B){return t(B,i,Zn)}const es="moderation";function Ca(B){return r(B,i,es)}function Pa(B){return t(B,i,es)}const ts="moderationDetail";function Ta(B){return r(B,i,ts)}function qa(B){return t(B,i,ts)}const rs="blobView";function Da(B){return r(B,i,rs)}function Oa(B){return t(B,i,rs)}const os="imageDetails";function Ia(B){return r(B,i,os)}function Ma(B){return t(B,i,os)}const is="videoDetails";function Na(B){return r(B,i,is)}function Ba(B){return t(B,i,is)}const re="accountHosting";function f(B){return r(B,i,re)}function g(B){return t(B,i,re)}const M="recordHosting";function $(B){return r(B,i,M)}function ve(B){return t(B,i,M)}const Hu="reporterStats";function Kk(B){return r(B,i,Hu)}function Wk(B){return t(B,i,Hu)}const Ku="modTool";function Xk(B){return r(B,i,Ku)}function Qk(B){return t(B,i,Ku)}H.TIMELINEEVENTPLCCREATE=`${i}#timelineEventPlcCreate`,H.TIMELINEEVENTPLCOPERATION=`${i}#timelineEventPlcOperation`,H.TIMELINEEVENTPLCTOMBSTONE=`${i}#timelineEventPlcTombstone`;
2const Wu="scheduledActionView";function Jk(B){return r(B,i,Wu)}function Yk(B){return t(B,i,Wu)}return H}var ld={},Hv;function IE(){if(Hv)return ld;Hv=1,Object.defineProperty(ld,"__esModule",{value:!0}),ld.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ld}var dd={},Kv;function ME(){if(Kv)return dd;Kv=1,Object.defineProperty(dd,"__esModule",{value:!0}),dd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return dd}var pd={},Wv;function NE(){if(Wv)return pd;Wv=1,Object.defineProperty(pd,"__esModule",{value:!0}),pd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return pd}var ud={},Xv;function BE(){if(Xv)return ud;Xv=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return ud}var fd={},Qv;function VE(){if(Qv)return fd;Qv=1,Object.defineProperty(fd,"__esModule",{value:!0}),fd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return fd}var md={},Jv;function LE(){if(Jv)return md;Jv=1,Object.defineProperty(md,"__esModule",{value:!0}),md.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return md}var hd={},Yv;function zE(){if(Yv)return hd;Yv=1,Object.defineProperty(hd,"__esModule",{value:!0}),hd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return hd}var yd={},Zv;function FE(){if(Zv)return yd;Zv=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return yd}var Kt={},e1;function $E(){if(e1)return Kt;e1=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.toKnownErr=n,Kt.isTakedown=l,Kt.validateTakedown=a,Kt.isSchedulingConfig=p,Kt.validateSchedulingConfig=u,Kt.isScheduledActionResults=y,Kt.validateScheduledActionResults=m,Kt.isFailedScheduling=x,Kt.validateFailedScheduling=v;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.moderation.scheduleAction";function n(k){return k}const s="takedown";function l(k){return r(k,i,s)}function a(k){return t(k,i,s)}const d="schedulingConfig";function p(k){return r(k,i,d)}function u(k){return t(k,i,d)}const h="scheduledActionResults";function y(k){return r(k,i,h)}function m(k){return t(k,i,h)}const w="failedScheduling";function x(k){return r(k,i,w)}function v(k){return t(k,i,w)}return Kt}var gd={},t1;function GE(){if(t1)return gd;t1=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return gd}var Z={},r1;function UE(){if(r1)return Z;r1=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.REASONSELFHARMOTHER=Z.REASONSELFHARMSUBSTANCES=Z.REASONSELFHARMSTUNTS=Z.REASONSELFHARMED=Z.REASONSELFHARMCONTENT=Z.REASONRULEOTHER=Z.REASONRULEBANEVASION=Z.REASONRULEPROHIBITEDSALES=Z.REASONRULESITESECURITY=Z.REASONMISLEADINGOTHER=Z.REASONMISLEADINGELECTIONS=Z.REASONMISLEADINGSCAM=Z.REASONMISLEADINGSPAM=Z.REASONMISLEADINGIMPERSONATION=Z.REASONMISLEADINGBOT=Z.REASONHARASSMENTOTHER=Z.REASONHARASSMENTDOXXING=Z.REASONHARASSMENTHATESPEECH=Z.REASONHARASSMENTTARGETED=Z.REASONHARASSMENTTROLL=Z.REASONCHILDSAFETYOTHER=Z.REASONCHILDSAFETYHARASSMENT=Z.REASONCHILDSAFETYPRIVACY=Z.REASONCHILDSAFETYGROOM=Z.REASONCHILDSAFETYCSAM=Z.REASONSEXUALOTHER=Z.REASONSEXUALUNLABELED=Z.REASONSEXUALANIMAL=Z.REASONSEXUALDEEPFAKE=Z.REASONSEXUALNCII=Z.REASONSEXUALABUSECONTENT=Z.REASONVIOLENCEOTHER=Z.REASONVIOLENCETRAFFICKING=Z.REASONVIOLENCEEXTREMISTCONTENT=Z.REASONVIOLENCEGLORIFICATION=Z.REASONVIOLENCEGRAPHICCONTENT=Z.REASONVIOLENCETHREATS=Z.REASONVIOLENCEANIMAL=Z.REASONOTHER=Z.REASONAPPEAL=void 0;const o=P();T().is$typed,o.validate;const r="tools.ozone.report.defs";return Z.REASONAPPEAL=`${r}#reasonAppeal`,Z.REASONOTHER=`${r}#reasonOther`,Z.REASONVIOLENCEANIMAL=`${r}#reasonViolenceAnimal`,Z.REASONVIOLENCETHREATS=`${r}#reasonViolenceThreats`,Z.REASONVIOLENCEGRAPHICCONTENT=`${r}#reasonViolenceGraphicContent`,Z.REASONVIOLENCEGLORIFICATION=`${r}#reasonViolenceGlorification`,Z.REASONVIOLENCEEXTREMISTCONTENT=`${r}#reasonViolenceExtremistContent`,Z.REASONVIOLENCETRAFFICKING=`${r}#reasonViolenceTrafficking`,Z.REASONVIOLENCEOTHER=`${r}#reasonViolenceOther`,Z.REASONSEXUALABUSECONTENT=`${r}#reasonSexualAbuseContent`,Z.REASONSEXUALNCII=`${r}#reasonSexualNCII`,Z.REASONSEXUALDEEPFAKE=`${r}#reasonSexualDeepfake`,Z.REASONSEXUALANIMAL=`${r}#reasonSexualAnimal`,Z.REASONSEXUALUNLABELED=`${r}#reasonSexualUnlabeled`,Z.REASONSEXUALOTHER=`${r}#reasonSexualOther`,Z.REASONCHILDSAFETYCSAM=`${r}#reasonChildSafetyCSAM`,Z.REASONCHILDSAFETYGROOM=`${r}#reasonChildSafetyGroom`,Z.REASONCHILDSAFETYPRIVACY=`${r}#reasonChildSafetyPrivacy`,Z.REASONCHILDSAFETYHARASSMENT=`${r}#reasonChildSafetyHarassment`,Z.REASONCHILDSAFETYOTHER=`${r}#reasonChildSafetyOther`,Z.REASONHARASSMENTTROLL=`${r}#reasonHarassmentTroll`,Z.REASONHARASSMENTTARGETED=`${r}#reasonHarassmentTargeted`,Z.REASONHARASSMENTHATESPEECH=`${r}#reasonHarassmentHateSpeech`,Z.REASONHARASSMENTDOXXING=`${r}#reasonHarassmentDoxxing`,Z.REASONHARASSMENTOTHER=`${r}#reasonHarassmentOther`,Z.REASONMISLEADINGBOT=`${r}#reasonMisleadingBot`,Z.REASONMISLEADINGIMPERSONATION=`${r}#reasonMisleadingImpersonation`,Z.REASONMISLEADINGSPAM=`${r}#reasonMisleadingSpam`,Z.REASONMISLEADINGSCAM=`${r}#reasonMisleadingScam`,Z.REASONMISLEADINGELECTIONS=`${r}#reasonMisleadingElections`,Z.REASONMISLEADINGOTHER=`${r}#reasonMisleadingOther`,Z.REASONRULESITESECURITY=`${r}#reasonRuleSiteSecurity`,Z.REASONRULEPROHIBITEDSALES=`${r}#reasonRuleProhibitedSales`,Z.REASONRULEBANEVASION=`${r}#reasonRuleBanEvasion`,Z.REASONRULEOTHER=`${r}#reasonRuleOther`,Z.REASONSELFHARMCONTENT=`${r}#reasonSelfHarmContent`,Z.REASONSELFHARMED=`${r}#reasonSelfHarmED`,Z.REASONSELFHARMSTUNTS=`${r}#reasonSelfHarmStunts`,Z.REASONSELFHARMSUBSTANCES=`${r}#reasonSelfHarmSubstances`,Z.REASONSELFHARMOTHER=`${r}#reasonSelfHarmOther`,Z}var Qo={},o1;function HE(){if(o1)return Qo;o1=1,Object.defineProperty(Qo,"__esModule",{value:!0}
2),Qo.isEvent=s,Qo.validateEvent=l,Qo.isUrlRule=d,Qo.validateUrlRule=p;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.safelink.defs",n="event";function s(u){return r(u,i,n)}function l(u){return t(u,i,n)}const a="urlRule";function d(u){return r(u,i,a)}function p(u){return t(u,i,a)}return Qo}var bd={},i1;function KE(){if(i1)return bd;i1=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return bd}var vd={},n1;function WE(){if(n1)return vd;n1=1,Object.defineProperty(vd,"__esModule",{value:!0}),vd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return vd}var Ao={},s1;function XE(){if(s1)return Ao;s1=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.toKnownErr=n,Ao.isServiceConfig=l,Ao.validateServiceConfig=a,Ao.isViewerConfig=p,Ao.validateViewerConfig=u;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.server.getConfig";function n(h){return h}const s="serviceConfig";function l(h){return r(h,i,s)}function a(h){return t(h,i,s)}const d="viewerConfig";function p(h){return r(h,i,d)}function u(h){return t(h,i,d)}return Ao}var wd={},a1;function QE(){if(a1)return wd;a1=1,Object.defineProperty(wd,"__esModule",{value:!0}),wd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return wd}var Jo={},c1;function JE(){if(c1)return Jo;c1=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.isSet=s,Jo.validateSet=l,Jo.isSetView=d,Jo.validateSetView=p;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.set.defs",n="set";function s(u){return r(u,i,n)}function l(u){return t(u,i,n)}const a="setView";function d(u){return r(u,i,a)}function p(u){return t(u,i,a)}return Jo}var xd={},l1;function YE(){if(l1)return xd;l1=1,Object.defineProperty(xd,"__esModule",{value:!0}),xd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return xd}var kd={},d1;function ZE(){if(d1)return kd;d1=1,Object.defineProperty(kd,"__esModule",{value:!0}),kd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return kd}var Ps={},p1;function eC(){if(p1)return Ps;p1=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.isOption=s,Ps.validateOption=l;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.setting.defs",n="option";function s(a){return r(a,i,n)}function l(a){return t(a,i,n)}return Ps}var Sd={},u1;function tC(){if(u1)return Sd;u1=1,Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Sd}var Ad={},f1;function rC(){if(f1)return Ad;f1=1,Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ad}var Rd={},m1;function oC(){if(m1)return Rd;m1=1,Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Rd}var Ts={},h1;function iC(){if(h1)return Ts;h1=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.isSigDetail=s,Ts.validateSigDetail=l;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.signature.defs",n="sigDetail";function s(a){return r(a,i,n)}function l(a){return t(a,i,n)}return Ts}var _d={},y1;function nC(){if(y1)return _d;y1=1,Object.defineProperty(_d,"__esModule",{value:!0}),_d.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return _d}var An={},g1;function sC(){if(g1)return An;g1=1,Object.defineProperty(An,"__esModule",{value:!0}),An.toKnownErr=n,An.isRelatedAccount=l,An.validateRelatedAccount=a;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.signature.findRelatedAccounts";function n(d){return d}const s="relatedAccount";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return An}var jd={},b1;function aC(){if(b1)return jd;b1=1,Object.defineProperty(jd,"__esModule",{value:!0}),jd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return jd}var Dt={},v1;function cC(){if(v1)return Dt;v1=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.ROLEVERIFIER=Dt.ROLETRIAGE=Dt.ROLEMODERATOR=Dt.ROLEADMIN=void 0,Dt.isMember=s,Dt.validateMember=l;
2const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.team.defs",n="member";function s(a){return r(a,i,n)}function l(a){return t(a,i,n)}return Dt.ROLEADMIN=`${i}#roleAdmin`,Dt.ROLEMODERATOR=`${i}#roleModerator`,Dt.ROLETRIAGE=`${i}#roleTriage`,Dt.ROLEVERIFIER=`${i}#roleVerifier`,Dt}var Ed={},w1;function lC(){if(w1)return Ed;w1=1,Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Ed}var qs={},x1;function dC(){if(x1)return qs;x1=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.isVerificationView=s,qs.validateVerificationView=l;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.verification.defs",n="verificationView";function s(a){return r(a,i,n)}function l(a){return t(a,i,n)}return qs}var Ro={},k1;function pC(){if(k1)return Ro;k1=1,Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.toKnownErr=n,Ro.isVerificationInput=l,Ro.validateVerificationInput=a,Ro.isGrantError=p,Ro.validateGrantError=u;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.verification.grantVerifications";function n(h){return h}const s="verificationInput";function l(h){return r(h,i,s)}function a(h){return t(h,i,s)}const d="grantError";function p(h){return r(h,i,d)}function u(h){return t(h,i,d)}return Ro}var Cd={},S1;function uC(){if(S1)return Cd;S1=1,Object.defineProperty(Cd,"__esModule",{value:!0}),Cd.toKnownErr=r;const o=P();T().is$typed,o.validate;function r(t){return t}return Cd}var Rn={},A1;function fC(){if(A1)return Rn;A1=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.toKnownErr=n,Rn.isRevokeError=l,Rn.validateRevokeError=a;const o=P(),r=T().is$typed,t=o.validate,i="tools.ozone.verification.revokeVerifications";function n(d){return d}const s="revokeError";function l(d){return r(d,i,s)}function a(d){return t(d,i,s)}return Rn}var R1;function Do(){if(R1)return b;R1=1;var o=b&&b.__createBinding||(Object.create?(function(re,f,g,M){M===void 0&&(M=g);var $=Object.getOwnPropertyDescriptor(f,g);(!$||("get"in $?!f.__esModule:$.writable||$.configurable))&&($={enumerable:!0,get:function(){return f[g]}}),Object.defineProperty(re,M,$)}):(function(re,f,g,M){M===void 0&&(M=g),re[M]=f[g]})),e=b&&b.__setModuleDefault||(Object.create?(function(re,f){Object.defineProperty(re,"default",{enumerable:!0,value:f})}):function(re,f){re.default=f}),r=b&&b.__importStar||(function(){var re=function(f){return re=Object.getOwnPropertyNames||function(g){var M=[];for(var $ in g)Object.prototype.hasOwnProperty.call(g,$)&&(M[M.length]=$);return M},re(f)};return function(f){if(f&&f.__esModule)return f;var g={};if(f!=null)for(var M=re(f),$=0;$<M.length;$++)M[$]!=="default"&&o(g,f,M[$]);return e(g,f),g}})();Object.defineProperty(b,"__esModule",{value:!0}),b.AppBskyGraphGetBlocks=b.AppBskyGraphGetActorStarterPacks=b.AppBskyGraphFollow=b.AppBskyGraphDefs=b.AppBskyGraphBlock=b.AppBskyFeedThreadgate=b.AppBskyFeedSendInteractions=b.AppBskyFeedSearchPosts=b.AppBskyFeedRepost=b.AppBskyFeedPostgate=b.AppBskyFeedPost=b.AppBskyFeedLike=b.AppBskyFeedGetTimeline=b.AppBskyFeedGetSuggestedFeeds=b.AppBskyFeedGetRepostedBy=b.AppBskyFeedGetQuotes=b.AppBskyFeedGetPosts=b.AppBskyFeedGetPostThread=b.AppBskyFeedGetListFeed=b.AppBskyFeedGetLikes=b.AppBskyFeedGetFeedSkeleton=b.AppBskyFeedGetFeedGenerators=b.AppBskyFeedGetFeedGenerator=b.AppBskyFeedGetFeed=b.AppBskyFeedGetAuthorFeed=b.AppBskyFeedGetActorLikes=b.AppBskyFeedGetActorFeeds=b.AppBskyFeedGenerator=b.AppBskyFeedDescribeFeedGenerator=b.AppBskyFeedDefs=b.AppBskyEmbedVideo=b.AppBskyEmbedRecordWithMedia=b.AppBskyEmbedRecord=b.AppBskyEmbedImages=b.AppBskyEmbedExternal=b.AppBskyEmbedDefs=b.AppBskyBookmarkGetBookmarks=b.AppBskyBookmarkDeleteBookmark=b.AppBskyBookmarkDefs=b.AppBskyBookmarkCreateBookmark=b.AppBskyActorStatus=b.AppBskyActorSearchActorsTypeahead=b.AppBskyActorSearchActors=b.AppBskyActorPutPreferences=b.AppBskyActorProfile=b.AppBskyActorGetSuggestions=b.AppBskyActorGetProfiles=b.AppBskyActorGetProfile=b.AppBskyActorGetPreferences=b.AppBskyActorDefs=void 0,b.AppBskyUnspeccedGetPostThreadV2=b.AppBskyUnspeccedGetPostThreadOtherV2=b.AppBskyUnspeccedGetPopularFeedGenerators=b.AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton=b.AppBskyUnspeccedGetOnboardingSuggestedStarterPacks=b.AppBskyUnspeccedGetConfig=b.AppBskyUnspeccedGetAgeAssuranceState=b.AppBskyUnspeccedDefs=b.AppBskyRichtextFacet=b.AppBskyNotificationUpdateSeen=b.AppBskyNotificationUnregisterPush=b.AppBskyNotificationRegisterPush=b.AppBskyNotificationPutPreferencesV2=b.AppBskyNotificationPutPreferences=b.AppBskyNotificationPutActivitySubscription=b.AppBskyNotificationListNotifications=b.AppBskyNotificationListActivitySubscriptions=b.AppBskyNotificationGetUnreadCount=b.AppBskyNotificationGetPreferences=b.AppBskyNotificationDefs=b.AppBskyNotificationDeclaration=b.AppBskyLabelerService=b.AppBskyLabelerGetServices=b.AppBskyLabelerDefs=b.AppBskyGraphVerification=b.AppBskyGraphUnmuteThread=b.AppBskyGraphUnmuteActorList=b.AppBskyGraphUnmuteActor=b.AppBskyGraphStarterpack=b.AppBskyGraphSearchStarterPacks=b.AppBskyGraphMuteThread=b.AppBskyGraphMuteActorList=b.AppBskyGraphMuteActor=b.AppBskyGraphListitem=b.AppBskyGraphListblock=b.AppBskyGraphList=b.AppBskyGraphGetSuggestedFollowsByActor=b.AppBskyGraphGetStarterPacksWithMembership=b.AppBskyGraphGetStarterPacks=b.AppBskyGraphGetStarterPack=b.AppBskyGraphGetRelationships=b.AppBskyGraphGetMutes=b.AppBskyGraphGetListsWithMembership=b.AppBskyGraphGetLists=b.AppBskyGraphGetListMutes=b.AppBskyGraphGetListBlocks=b.AppBskyGraphGetList=b.AppBskyGraphGetKnownFollowers=b.AppBskyGraphGetFollows=b.AppBskyGraphGetFollowers=void 0,b.ComAtprotoAdminGetAccountInfo=b.ComAtprotoAdminEnableAccountInvites=b.ComAtprotoAdminDisableInviteCodes=b.ComAtprotoAdminDisableAccountInvites=b.ComAtprotoAdminDeleteAccount=b.ComAtprotoAdminDefs=b.ChatBskyModerationUpdateActorAccess=b.ChatBskyModerationGetMessageContext=b.ChatBskyModerationGetActorMetadata=b.ChatBskyConvoUpdateRead=b.ChatBskyConvoUpdateAllRead=b.ChatBskyConvoUnmuteConvo=b.ChatBskyConvoSendMessageBatch=b.ChatBskyConvoSendMessage=b.ChatBskyConvoRemoveReaction=b.ChatBskyConvoMuteConvo=b.ChatBskyConvoListConvos=b.ChatBskyConvoLeaveConvo=b.ChatBskyConvoGetMessages=b.ChatBskyConvoGetLog=b.ChatBskyConvoGetConvoForMembers=b.ChatBskyConvoGetConvoAvailability=b.ChatBskyConvoGetConvo=b.ChatBskyConvoDeleteMessageForSelf=b.ChatBskyConvoDefs=b.ChatBskyConvoAddReaction=b.ChatBskyConvoAcceptConvo=b.ChatBskyActorExportAccountData=b.ChatBskyActorDeleteAccount=b.ChatBskyActorDefs=b.ChatBskyActorDeclaration=b.AppBskyVideoUploadVideo=b.AppBskyVideoGet
2UploadLimits=b.AppBskyVideoGetJobStatus=b.AppBskyVideoDefs=b.AppBskyUnspeccedSearchStarterPacksSkeleton=b.AppBskyUnspeccedSearchPostsSkeleton=b.AppBskyUnspeccedSearchActorsSkeleton=b.AppBskyUnspeccedInitAgeAssurance=b.AppBskyUnspeccedGetTrendsSkeleton=b.AppBskyUnspeccedGetTrends=b.AppBskyUnspeccedGetTrendingTopics=b.AppBskyUnspeccedGetTaggedSuggestions=b.AppBskyUnspeccedGetSuggestionsSkeleton=b.AppBskyUnspeccedGetSuggestedUsersSkeleton=b.AppBskyUnspeccedGetSuggestedUsers=b.AppBskyUnspeccedGetSuggestedStarterPacksSkeleton=b.AppBskyUnspeccedGetSuggestedStarterPacks=b.AppBskyUnspeccedGetSuggestedFeedsSkeleton=b.AppBskyUnspeccedGetSuggestedFeeds=void 0,b.ComAtprotoServerDeleteSession=b.ComAtprotoServerDeleteAccount=b.ComAtprotoServerDefs=b.ComAtprotoServerDeactivateAccount=b.ComAtprotoServerCreateSession=b.ComAtprotoServerCreateInviteCodes=b.ComAtprotoServerCreateInviteCode=b.ComAtprotoServerCreateAppPassword=b.ComAtprotoServerCreateAccount=b.ComAtprotoServerConfirmEmail=b.ComAtprotoServerCheckAccountStatus=b.ComAtprotoServerActivateAccount=b.ComAtprotoRepoUploadBlob=b.ComAtprotoRepoStrongRef=b.ComAtprotoRepoPutRecord=b.ComAtprotoRepoListRecords=b.ComAtprotoRepoListMissingBlobs=b.ComAtprotoRepoImportRepo=b.ComAtprotoRepoGetRecord=b.ComAtprotoRepoDescribeRepo=b.ComAtprotoRepoDeleteRecord=b.ComAtprotoRepoDefs=b.ComAtprotoRepoCreateRecord=b.ComAtprotoRepoApplyWrites=b.ComAtprotoModerationDefs=b.ComAtprotoModerationCreateReport=b.ComAtprotoLexiconSchema=b.ComAtprotoLabelSubscribeLabels=b.ComAtprotoLabelQueryLabels=b.ComAtprotoLabelDefs=b.ComAtprotoIdentityUpdateHandle=b.ComAtprotoIdentitySubmitPlcOperation=b.ComAtprotoIdentitySignPlcOperation=b.ComAtprotoIdentityResolveIdentity=b.ComAtprotoIdentityResolveHandle=b.ComAtprotoIdentityResolveDid=b.ComAtprotoIdentityRequestPlcOperationSignature=b.ComAtprotoIdentityRefreshIdentity=b.ComAtprotoIdentityGetRecommendedDidCredentials=b.ComAtprotoIdentityDefs=b.ComAtprotoAdminUpdateSubjectStatus=b.ComAtprotoAdminUpdateAccountSigningKey=b.ComAtprotoAdminUpdateAccountPassword=b.ComAtprotoAdminUpdateAccountHandle=b.ComAtprotoAdminUpdateAccountEmail=b.ComAtprotoAdminSendEmail=b.ComAtprotoAdminSearchAccounts=b.ComAtprotoAdminGetSubjectStatus=b.ComAtprotoAdminGetInviteCodes=b.ComAtprotoAdminGetAccountInfos=void 0,b.ToolsOzoneModerationGetRecord=b.ToolsOzoneModerationGetEvent=b.ToolsOzoneModerationGetAccountTimeline=b.ToolsOzoneModerationEmitEvent=b.ToolsOzoneModerationDefs=b.ToolsOzoneModerationCancelScheduledActions=b.ToolsOzoneHostingGetAccountHistory=b.ToolsOzoneCommunicationUpdateTemplate=b.ToolsOzoneCommunicationListTemplates=b.ToolsOzoneCommunicationDeleteTemplate=b.ToolsOzoneCommunicationDefs=b.ToolsOzoneCommunicationCreateTemplate=b.ComAtprotoTempRevokeAccountCredentials=b.ComAtprotoTempRequestPhoneVerification=b.ComAtprotoTempFetchLabels=b.ComAtprotoTempDereferenceScope=b.ComAtprotoTempCheckSignupQueue=b.ComAtprotoTempCheckHandleAvailability=b.ComAtprotoTempAddReservedHandle=b.ComAtprotoSyncSubscribeRepos=b.ComAtprotoSyncRequestCrawl=b.ComAtprotoSyncNotifyOfUpdate=b.ComAtprotoSyncListReposByCollection=b.ComAtprotoSyncListRepos=b.ComAtprotoSyncListHosts=b.ComAtprotoSyncListBlobs=b.ComAtprotoSyncGetRepoStatus=b.ComAtprotoSyncGetRepo=b.ComAtprotoSyncGetRecord=b.ComAtprotoSyncGetLatestCommit=b.ComAtprotoSyncGetHostStatus=b.ComAtprotoSyncGetHead=b.ComAtprotoSyncGetCheckout=b.ComAtprotoSyncGetBlocks=b.ComAtprotoSyncGetBlob=b.ComAtprotoSyncDefs=b.ComAtprotoServerUpdateEmail=b.ComAtprotoServerRevokeAppPassword=b.ComAtprotoServerResetPassword=b.ComAtprotoServerReserveSigningKey=b.ComAtprotoServerRequestPasswordReset=b.ComAtprotoServerRequestEmailUpdate=b.ComAtprotoServerRequestEmailConfirmation=b.ComAtprotoServerRequestAccountDelete=b.ComAtprotoServerRefreshSession=b.ComAtprotoServerListAppPasswords=b.ComAtprotoServerGetSession=b.ComAtprotoServerGetServiceAuth=b.ComAtprotoServerGetAccountInviteCodes=b.ComAtprotoServerDescribeServer=void 0,b.AtpBaseClient=b.TOOLS_OZONE_TEAM=b.TOOLS_OZONE_REPORT=b.TOOLS_OZONE_MODERATION=b.COM_ATPROTO_MODERATION=b.APP_BSKY_GRAPH=b.APP_BSKY_FEED=b.APP_BSKY_ACTOR=b.ToolsOzoneVerificationRevokeVerifications=b.ToolsOzoneVerificationListVerifications=b.ToolsOzoneVerificationGrantVerifications=b.ToolsOzoneVerificationDefs=b.ToolsOzoneTeamUpdateMember=b.ToolsOzoneTeamListMembers=b.ToolsOzoneTeamDeleteMember=b.ToolsOzoneTeamDefs=b.ToolsOzoneTeamAddMember=b.ToolsOzoneSignatureSearchAccounts=b.ToolsOzoneSignatureFindRelatedAccounts=b.ToolsOzoneSignatureFindCorrelation=b.ToolsOzoneSignatureDefs=b.ToolsOzoneSettingUpsertOption=b.ToolsOzoneSettingRemoveOptions=b.ToolsOzoneSettingListOptions=b.ToolsOzoneSettingDefs=b.ToolsOzoneSetUpsertSet=b.ToolsOzoneSetQuerySets=b.ToolsOzoneSetGetValues=b.ToolsOzoneSetDeleteValues=b.ToolsOzoneSetDeleteSet=b.ToolsOzoneSetDefs=b.ToolsOzoneSetAddValues=b.ToolsOzoneServerGetConfig=b.ToolsOzoneSafelinkUpdateRule=b.ToolsOzoneSafelinkRemoveRule=b.ToolsOzoneSafelinkQueryRules=b.ToolsOzoneSafelinkQueryEvents=b.ToolsOzoneSafelinkDefs=b.ToolsOzoneSafelinkAddRule=b.ToolsOzoneReportDefs=b.ToolsOzoneModerationSearchRepos=b.ToolsOzoneModerationScheduleAction=b.ToolsOzoneModerationQueryStatuses=b.ToolsOzoneModerationQueryEvents=b.ToolsOzoneModerationListScheduledActions=b.ToolsOzoneModerationGetSubjects=b.ToolsOzoneModerationGetRepos=b.ToolsOzoneModerationGetReporterStats=b.ToolsOzoneModerationGetRepo=b.ToolsOzoneModerationGetRecords=void 0,b.ToolsOzoneCommunicationNS=b.ToolsOzoneNS=b.ToolsNS=b.ComAtprotoTempNS=b.ComAtprotoSyncNS=b.ComAtprotoServerNS=b.ComAtprotoRepoNS=b.ComAtprotoModerationNS=b.ComAtprotoLexiconSchemaRecord=b.ComAtprotoLexiconNS=b.ComAtprotoLabelNS=b.ComAtprotoIdentityNS=b.ComAtprotoAdminNS=b.ComAtprotoNS=b.ComNS=b.ChatBskyModerationNS=b.ChatBskyConvoNS=b.ChatBskyActorDeclarationRecord=b.ChatBskyActorNS=b.ChatBskyNS=b.ChatNS=b.AppBskyVideoNS=b.AppBskyUnspeccedNS=b.AppBskyRichtextNS=b.AppBskyNotificationDeclarationRecord=b.AppBskyNotificationNS=b.AppBskyLabelerServiceRecord=b.AppBskyLabelerNS=b.AppBskyGraphVerificationRecord=b.AppBskyGraphStarterpackRecord=b.AppBskyGraphListitemRecord=b.AppBskyGraphListblockRecord=b.AppBskyGraphListRecord=b.AppBskyGraphFollowRecord=b.AppBskyGraphBlockRecord=b.AppBskyGraphNS=b.AppBskyFeedThreadgateRecord=b.AppBskyFeedRepostRecord=b.AppBskyFeedPostgateRecord=b.AppBskyFeedPostRecord=b.AppBskyFeedLikeRecord=b.AppBskyFeedGeneratorRecord=b.AppBskyFeedNS=b.AppBskyEmbedNS=b.AppBskyBookmarkNS=b.AppBskyActorStatusRecord=b.AppBskyActorProfileRecord=b.AppBskyActorNS=b.AppBskyNS=b.AppNS=void 0,b.ToolsOzoneVerificationNS=b.ToolsOzoneTeamNS=b.ToolsOzoneSignatureNS=b.ToolsOzoneSettingNS=b.ToolsOzoneSetNS=b.ToolsOzoneServerNS=b.ToolsOzoneSafelinkNS=b.ToolsOzoneModerationNS=b.ToolsOzoneHostingNS=void 0;const t=ne(),i=P(),n=r(Xf()),s=r(Jf()),l=r(Zf()),a=r(tm()),d=r(om()),p=r(nm()),u=r(am()),h=r(lm()),y=r(pm()),m=r(fm()),w=r(hm()),x=r(gm()),v=r(vm
2()),k=r(xm()),A=r(Sm()),S=r(Rm()),E=r(jm()),_=r(Cm()),C=r(Tm()),O=r(Dm()),V=r(Im()),I=r(Nm()),z=r(Vm()),N=r(zm()),R=r($m()),D=r(Um()),q=r(Km()),j=r(Xm()),L=r(Jm()),U=r(Zm()),W=r(th()),ee=r(oh()),ae=r(nh()),de=r(ah()),ce=r(lh()),fe=r(ph()),K=r(fh()),Me=r(hh()),Ve=r(gh()),me=r(vh()),Ae=r(xh()),Re=r(Sh()),Te=r(Rh()),ue=r(jh()),xe=r(Ch()),be=r(Th()),Le=r(Dh()),Ue=r(Ih()),ze=r(Nh()),We=r(Vh()),nt=r(zh()),Ke=r($h()),At=r(Uh()),tt=r(Kh()),X=r(Xh()),pt=r(Jh()),ut=r(Zh()),J=r(ty()),Bt=r(oy()),Vt=r(ny()),ft=r(ay()),Lt=r(ly()),zt=r(py());b.AppBskyActorDefs=r(t_()),b.AppBskyActorGetPreferences=r(r_()),b.AppBskyActorGetProfile=r(o_()),b.AppBskyActorGetProfiles=r(i_()),b.AppBskyActorGetSuggestions=r(n_()),b.AppBskyActorProfile=r(s_()),b.AppBskyActorPutPreferences=r(a_()),b.AppBskyActorSearchActors=r(c_()),b.AppBskyActorSearchActorsTypeahead=r(l_()),b.AppBskyActorStatus=r(d_()),b.AppBskyBookmarkCreateBookmark=r(Xf()),b.AppBskyBookmarkDefs=r(p_()),b.AppBskyBookmarkDeleteBookmark=r(Jf()),b.AppBskyBookmarkGetBookmarks=r(u_()),b.AppBskyEmbedDefs=r(f_()),b.AppBskyEmbedExternal=r(m_()),b.AppBskyEmbedImages=r(h_()),b.AppBskyEmbedRecord=r(y_()),b.AppBskyEmbedRecordWithMedia=r(g_()),b.AppBskyEmbedVideo=r(b_()),b.AppBskyFeedDefs=r(v_()),b.AppBskyFeedDescribeFeedGenerator=r(w_()),b.AppBskyFeedGenerator=r(x_()),b.AppBskyFeedGetActorFeeds=r(k_()),b.AppBskyFeedGetActorLikes=r(Zf()),b.AppBskyFeedGetAuthorFeed=r
2(tm()),b.AppBskyFeedGetFeed=r(om()),b.AppBskyFeedGetFeedGenerator=r(S_()),b.AppBskyFeedGetFeedGenerators=r(A_()),b.AppBskyFeedGetFeedSkeleton=r(nm()),b.AppBskyFeedGetLikes=r(R_()),b.AppBskyFeedGetListFeed=r(am()),b.AppBskyFeedGetPostThread=r(lm()),b.AppBskyFeedGetPosts=r(__()),b.AppBskyFeedGetQuotes=r(j_()),b.AppBskyFeedGetRepostedBy=r(E_()),b.AppBskyFeedGetSuggestedFeeds=r(C_()),b.AppBskyFeedGetTimeline=r(P_()),b.AppBskyFeedLike=r(T_()),b.AppBskyFeedPost=r(q_()),b.AppBskyFeedPostgate=r(D_()),b.AppBskyFeedRepost=r(O_()),b.AppBskyFeedSearchPosts=r(pm()),b.AppBskyFeedSendInteractions=r(I_()),b.AppBskyFeedThreadgate=r(M_()),b.AppBskyGraphBlock=r(N_()),b.AppBskyGraphDefs=r(B_()),b.AppBskyGraphFollow=r(V_()),b.AppBskyGraphGetActorStarterPacks=r(L_()),b.AppBskyGraphGetBlocks=r(z_()),b.AppBskyGraphGetFollowers=r(F_()),b.AppBskyGraphGetFollows=r($_()),b.AppBskyGraphGetKnownFollowers=r(G_()),b.AppBskyGraphGetList=r(U_()),b.AppBskyGraphGetListBlocks=r(H_()),b.AppBskyGraphGetListMutes=r(K_()),b.AppBskyGraphGetLists=r(W_()),b.AppBskyGraphGetListsWithMembership=r(X_()),b.AppBskyGraphGetMutes=r(Q_()),b.AppBskyGraphGetRelationships=r(fm()),b.AppBskyGraphGetStarterPack=r(J_()),b.AppBskyGraphGetStarterPacks=r(Y_()),b.AppBskyGraphGetStarterPacksWithMembership=r(Z_()),b.AppBskyGraphGetSuggestedFollowsByActor=r(ej()),b.AppBskyGraphList=r(tj()),b.AppBskyGraphListblock=r(rj()),b.AppBskyGraphListitem=r(oj()),b.AppBskyGraphMuteActor=r(ij()),b.AppBskyGraphMuteActorList=r(nj()),b.AppBskyGraphMuteThread=r(sj()),b.AppBskyGraphSearchStarterPacks=r(aj()),b.AppBskyGraphStarterpack=r(cj()),b.AppBskyGraphUnmuteActor=r(lj()),b.AppBskyGraphUnmuteActorList=r(dj()),b.AppBskyGraphUnmuteThread=r(pj()),b.AppBskyGraphVerification=r(uj()),b.AppBskyLabelerDefs=r(fj()),b.AppBskyLabelerGetServices=r(mj()),b.AppBskyLabelerService=r(hj()),b.AppBskyNotificationDeclaration=r(yj()),b.AppBskyNotificationDefs=r(gj()),b.AppBskyNotificationGetPreferences=r(bj()),b.AppBskyNotificationGetUnreadCount=r(vj()),b.AppBskyNotificationListActivitySubscriptions=r(wj()),b.AppBskyNotificationListNotifications=r(xj()),b.AppBskyNotificationPutActivitySubscription=r(kj()),b.AppBskyNotificationPutPreferences=r(Sj()),b.AppBskyNotificationPutPreferencesV2=r(Aj()),b.AppBskyNotificationRegisterPush=r(Rj()),b.AppBskyNotificationUnregisterPush=r(_j()),b.AppBskyNotificationUpdateSeen=r(jj()),b.AppBskyRichtextFacet=r(Ej()),b.AppBskyUnspeccedDefs=r(Cj()),b.AppBskyUnspeccedGetAgeAssuranceState=r(Pj()),b.AppBskyUnspeccedGetConfig=r(Tj()),b.AppBskyUnspeccedGetOnboardingSuggestedStarterPacks=r(qj()),b.AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton=r(Dj()),b.AppBskyUnspeccedGetPopularFeedGenerators=r(Oj()),b.AppBskyUnspeccedGetPostThreadOtherV2=r(Ij()),b.AppBskyUnspeccedGetPostThreadV2=r(Mj()),b.AppBskyUnspeccedGetSuggestedFeeds=r(Nj()),b.AppBskyUnspeccedGetSuggestedFeedsSkeleton=r(Bj()),b.AppBskyUnspeccedGetSuggestedStarterPacks=r(Vj()),b.AppBskyUnspeccedGetSuggestedStarterPacksSkeleton=r(Lj()),b.AppBskyUnspeccedGetSuggestedUsers=r(zj()),b.AppBskyUnspeccedGetSuggestedUsersSkeleton=r(Fj()),b.AppBskyUnspeccedGetSuggestionsSkeleton=r($j()),b.AppBskyUnspeccedGetTaggedSuggestions=r(Gj()),b.AppBskyUnspeccedGetTrendingTopics=r(Uj()),b.AppBskyUnspeccedGetTrends=r(Hj()),b.AppBskyUnspeccedGetTrendsSkeleton=r(Kj()),b.AppBskyUnspeccedInitAgeAssurance=r(hm()),b.AppBskyUnspeccedSearchActorsSkeleton=r(gm()),b.AppBskyUnspeccedSearchPostsSkeleton=r(vm()),b.AppBskyUnspeccedSearchStarterPacksSkeleton=r(xm()),b.AppBskyVideoDefs=r(Wj()),b.AppBskyVideoGetJobStatus=r(Xj()),b.AppBskyVideoGetUploadLimits=r(Qj()),b.AppBskyVideoUploadVideo=r(Jj()),b.ChatBskyActorDeclaration=r(Yj()),b.ChatBskyActorDefs=r(Zj()),b.ChatBskyActorDeleteAccount=r(e0()),b.ChatBskyActorExportAccountData=r(t0()),b.ChatBskyConvoAcceptConvo=r(r0()),b.ChatBskyConvoAddReaction=r(Sm()),b.ChatBskyConvoDefs=r(o0()),b.ChatBskyConvoDeleteMessageForSelf=r(i0()),b.ChatBskyConvoGetConvo=r(n0()),b.ChatBskyConvoGetConvoAvailability=r(s0()),b.ChatBskyConvoGetConvoForMembers=r(a0()),b.ChatBskyConvoGetLog=r(c0()),b.ChatBskyConvoGetMessages=r(l0()),b.ChatBskyConvoLeaveConvo=r(d0()),b.ChatBskyConvoListConvos=r(p0()),b.ChatBskyConvoMuteConvo=r(u0()),b.ChatBskyConvoRemoveReaction=r(Rm()),b.ChatBskyConvoSendMessage=r(f0()),b.ChatBskyConvoSendMessageBatch=r(m0()),b.ChatBskyConvoUnmuteConvo=r(h0()),b.ChatBskyConvoUpdateAllRead=r(y0()),b.ChatBskyConvoUpdateRead=r(g0()),b.ChatBskyModerationGetActorMetadata=r(b0()),b.ChatBskyModerationGetMessageContext=r(v0()),b.ChatBskyModerationUpdateActorAccess=r(w0()),b.ComAtprotoAdminDefs=r(x0()),b.ComAtprotoAdminDeleteAccount=r(k0()),b.ComAtprotoAdminDisableAccountInvites=r(S0()),b.ComAtprotoAdminDisableInviteCodes=r(A0()),b.ComAtprotoAdminEnableAccountInvites=r(R0()),b.ComAtprotoAdminGetAccountInfo=r(_0()),b.ComAtprotoAdminGetAccountInfos=r(j0()),b.ComAtprotoAdminGetInviteCodes=r(E0()),b.ComAtprotoAdminGetSubjectStatus=r(C0()),b.ComAtprotoAdminSearchAccounts=r(P0()),b.ComAtprotoAdminSendEmail=r(T0()),b.ComAtprotoAdminU
2pdateAccountEmail=r(q0()),b.ComAtprotoAdminUpdateAccountHandle=r(D0()),b.ComAtprotoAdminUpdateAccountPassword=r(O0()),b.ComAtprotoAdminUpdateAccountSigningKey=r(I0()),b.ComAtprotoAdminUpdateSubjectStatus=r(M0()),b.ComAtprotoIdentityDefs=r(N0()),b.ComAtprotoIdentityGetRecommendedDidCredentials=r(B0()),b.ComAtprotoIdentityRefreshIdentity=r(jm()),b.ComAtprotoIdentityRequestPlcOperationSignature=r(V0()),b.ComAtprotoIdentityResolveDid=r(Cm()),b.ComAtprotoIdentityResolveHandle=r(Tm()),b.ComAtprotoIdentityResolveIdentity=r(Dm()),b.ComAtprotoIdentitySignPlcOperation=r(L0()),b.ComAtprotoIdentitySubmitPlcOperation=r(z0()),b.ComAtprotoIdentityUpdateHandle=r(F0()),b.ComAtprotoLabelDefs=r($0()),b.ComAtprotoLabelQueryLabels=r(G0()),b.ComAtprotoLabelSubscribeLabels=r(U0()),b.ComAtprotoLexiconSchema=r(H0()),b.ComAtprotoModerationCreateReport=r(K0()),b.ComAtprotoModerationDefs=r(W0()),b.ComAtprotoRepoApplyWrites=r(Im()),b.ComAtprotoRepoCreateRecord=r(Nm()),b.ComAtprotoRepoDefs=r(X0()),b.ComAtprotoRepoDeleteRecord=r(Vm()),b.ComAtprotoRepoDescribeRepo=r(Q0()),b.ComAtprotoRepoGetRecord=r(zm()),b.ComAtprotoRepoImportRepo=r(J0()),b.ComAtprotoRepoListMissingBlobs=r(Y0()),b.ComAtprotoRepoListRecords=r(Z0()),b.ComAtprotoRepoPutRecord=r($m()),b.ComAtprotoRepoStrongRef=r(eE()),b.ComAtprotoRepoUploadBlob=r(tE()),b.ComAtprotoServerActivateAccount=r(rE()),b.ComAtprotoServerCheckAccountStatus=r(oE()),b.ComAtprotoServerConfirmEmail=r(Um()),b.ComAtprotoServerCreateAccount=r(Km()),b.ComAtprotoServerCreateAppPassword=r(Xm()),b.ComAtprotoServerCreateInviteCode=r(iE()),b.ComAtprotoServerCreateInviteCodes=r(nE()),b.ComAtprotoServerCreateSession=r(Jm()),b.ComAtprotoServerDeactivateAccount=r(sE()),b.ComAtprotoServerDefs=r(aE()),b.ComAtprotoServerDeleteAccount=r(Zm()),b.ComAtprotoServerDeleteSession=r(cE()),b.ComAtprotoServerDescribeServer=r(lE()),b.ComAtprotoServerGetAccountInviteCodes=r(th()),b.ComAtprotoServerGetServiceAuth=r(oh()),b.ComAtprotoServerGetSession=r(dE()),b.ComAtprotoServerListAppPasswords=r(nh()),b.ComAtprotoServerRefreshSession=r(ah()),b.ComAtprotoServerRequestAccountDelete=r(pE()),b.ComAtprotoServerRequestEmailConfirmation=r(uE()),b.ComAtprotoServerRequestEmailUpdate=r(fE()),b.ComAtprotoServerRequestPasswordReset=r(mE()),b.ComAtprotoServerReserveSigningKey=r(hE()),b.ComAtprotoServerResetPassword=r(lh()),b.ComAtprotoServerRevokeAppPassword=r(yE()),b.ComAtprotoServerUpdateEmail=r(ph()),b.ComAtprotoSyncDefs=r(gE()),b.ComAtprotoSyncGetBlob=r(fh()),b.ComAtprotoSyncGetBlocks=r(hh()),b.ComAtprotoSyncGetCheckout=r(bE()),b.ComAtprotoSyncGetHead=r(gh()),b.ComAtprotoSyncGetHostStatus=r(vh()),b.ComAtprotoSyncGetLatestCommit=r(xh()),b.ComAtprotoSyncGetRecord=r(Sh()),b.ComAtprotoSyncGetRepo=r(Rh()),b.ComAtprotoSyncGetRepoStatus=r(jh()),b.ComAtprotoSyncListBlobs=r(Ch()),b.ComAtprotoSyncListHosts=r(vE()),b.ComAtprotoSyncListRepos=r(wE()),b.ComAtprotoSyncListReposByCollection=r(xE()),b.ComAtprotoSyncNotifyOfUpdate=r(kE()),b.ComAtprotoSyncRequestCrawl=r(Th()),b.ComAtprotoSyncSubscribeRepos=r(SE()),b.ComAtprotoTempAddReservedHandle=r(AE()),b.ComAtprotoTempCheckHandleAvailability=r(Dh()),b.ComAtprotoTempCheckSignupQueue=r(RE()),b.ComAtprotoTempDereferenceScope=r(Ih()),b.ComAtprotoTempFetchLabels=r(_E()),b.ComAtprotoTempRequestPhoneVerification=r(jE()),b.ComAtprotoTempRevokeAccountCredentials=r(EE()),b.ToolsOzoneCommunicationCreateTemplate=r(Nh()),b.ToolsOzoneCommunicationDefs=r(CE()),b.ToolsOzoneCommunicationDeleteTemplate=r(PE()),b.ToolsOzoneCommunicationListTemplates=r(TE()),b.ToolsOzoneCommunicationUpdateTemplate=r(Vh()),b.ToolsOzoneHostingGetAccountHistory=r(qE()),b.ToolsOzoneModerationCancelScheduledActions=r(DE()),b.ToolsOzoneModerationDefs=r(OE()),b.ToolsOzoneModerationEmitEvent=r(zh()),b.ToolsOzoneModerationGetAccountTimeline=r($h()),b.ToolsOzoneModerationGetEvent=r(IE()),b.ToolsOzoneModerationGetRecord=r(Uh()),b.ToolsOzoneModerationGetRecords=r(ME()),b.ToolsOzoneModerationGetRepo=r(Kh()),b.ToolsOzoneModerationGetReporterStats=r(NE()),b.ToolsOzoneModerationGetRepos=r(BE()),b.ToolsOzoneModerationGetSubjects=r(VE()),b.ToolsOzoneModerationListScheduledActions=r(LE()),b.ToolsOzoneModerationQueryEvents=r(zE()),b.ToolsOzoneModerationQueryStatuses=r(FE()),b.ToolsOzoneModerationScheduleAction=r($E()),b.ToolsOzoneModerationSearchRepos=r(GE()),b.ToolsOzoneReportDefs=r(UE()),b.ToolsOzoneSafelinkAddRule=r(Xh()),b.ToolsOzoneSafelinkDefs=r(HE()),b.ToolsOzoneSafelinkQueryEvents=r(KE()),b.ToolsOzoneSafelinkQueryRules=r(WE()),b.ToolsOzoneSafelinkRemoveRule=r(Jh()),b.ToolsOzoneSafelinkUpdateRule=r(Zh()),b.ToolsOzoneServerGetConfig=r(XE()),b.ToolsOzoneSetAddValues=r(QE()),b.ToolsOzoneSetDefs=r(JE()),b.ToolsOzoneSetDeleteSet=r(ty()),b.ToolsOzoneSetDeleteValues=r(oy()),b.ToolsOzoneSetGetValues=r(ny()),b.ToolsOzoneSetQuerySets=r(YE()),b.ToolsOzoneSetUpsertSet=r(ZE()),b.ToolsOzoneSettingDefs=r(eC()),b.ToolsOzoneSettingListOptions=r(tC()),b.ToolsOzoneSettingRemoveOptions=r(rC()),b.ToolsOzoneSettingUpsertOption=r(oC()),b.ToolsOzoneSignatureDefs=r(iC()),b.ToolsOzoneSignatureFindCorrelation=r(nC()),b.ToolsOzoneSignatureFindRelatedAccounts=r(sC()),b.ToolsOzoneSignatureSearchAccounts=r(aC()),b.ToolsOzoneTeamAddMember=r(ay()),b.ToolsOzoneTeamDefs=r(cC()),b.ToolsOzoneTeamDeleteMember=r(ly()),b.ToolsOzoneTeamListMembers=r(lC()),b.ToolsOzoneTeamUpdateMember=r(py()),b.ToolsOzoneVerificationDefs=r(dC()),b.ToolsOzoneVerificationGrantVerifications=r(pC()),b.ToolsOzoneVerificationListVerifications=r(uC()),b.ToolsOzoneVerificationRevokeVerifications=r(fC()),b.APP_BSKY_ACTOR={StatusLive:"app.bsky.actor.status#live"},b.APP_BSKY_FEED={DefsRequestLess:"app.bsky.feed.defs#requestLess",DefsRequestMore:"app.bsky.feed.defs#requestMore",DefsClickthroughItem:"app.bsky.feed.defs#clickthroughItem",DefsClickthroughAuthor:"app.bsky.feed.defs#clickthroughAuthor",DefsClickthroughReposter:"app.bsky.feed.defs#clickthroughReposter",DefsClickthroughEmbed:"app.bsky.feed.defs#clickthroughEmbed",DefsContentModeUnspecified:"app.bsky.feed.defs#contentModeUnspecified",DefsContentModeVideo:"app.bsky.feed.defs#contentModeVideo",DefsInteractionSeen:"app.bsky.feed.defs#interactionSeen",DefsInteractionLike:"app.bsky.feed.defs#interactionLike",DefsInteractionRepost:"app.bsky.feed.defs#interactionRepost",DefsInteractionReply:"app.bsky.feed.defs#interactionReply",Def
2sInteractionQuote:"app.bsky.feed.defs#interactionQuote",DefsInteractionShare:"app.bsky.feed.defs#interactionShare"},b.APP_BSKY_GRAPH={DefsModlist:"app.bsky.graph.defs#modlist",DefsCuratelist:"app.bsky.graph.defs#curatelist",DefsReferencelist:"app.bsky.graph.defs#referencelist"},b.COM_ATPROTO_MODERATION={DefsReasonSpam:"com.atproto.moderation.defs#reasonSpam",DefsReasonViolation:"com.atproto.moderation.defs#reasonViolation",DefsReasonMisleading:"com.atproto.moderation.defs#reasonMisleading",DefsReasonSexual:"com.atproto.moderation.defs#reasonSexual",DefsReasonRude:"com.atproto.moderation.defs#reasonRude",DefsReasonOther:"com.atproto.moderation.defs#reasonOther",DefsReasonAppeal:"com.atproto.moderation.defs#reasonAppeal"},b.TOOLS_OZONE_MODERATION={DefsReviewOpen:"tools.ozone.moderation.defs#reviewOpen",DefsReviewEscalated:"tools.ozone.moderation.defs#reviewEscalated",DefsReviewClosed:"tools.ozone.moderation.defs#reviewClosed",DefsReviewNone:"tools.ozone.moderation.defs#reviewNone",DefsTimelineEventPlcCreate:"tools.ozone.moderation.defs#timelineEventPlcCreate",DefsTimelineEventPlcOperation:"tools.ozone.moderation.defs#timelineEventPlcOperation",DefsTimelineEventPlcTombstone:"tools.ozone.moderation.defs#timelineEventPlcTombstone"},b.TOOLS_OZONE_REPORT={DefsReasonAppeal:"tools.ozone.report.defs#reasonAppeal",DefsReasonOther:"tools.ozone.report.defs#reasonOther",DefsReasonViolenceAnimal:"tools.ozone.report.defs#reasonViolenceAnimal",DefsReasonViolenceThreats:"tools.ozone.report.defs#reasonViolenceThreats",DefsReasonViolenceGraphicContent:"tools.ozone.report.defs#reasonViolenceGraphicContent",DefsReasonViolenceGlorification:"tools.ozone.report.defs#reasonViolenceGlorification",DefsReasonViolenceExtremistContent:"tools.ozone.report.defs#reasonViolenceExtremistContent",DefsReasonViolenceTrafficking:"tools.ozone.report.defs#reasonViolenceTrafficking",DefsReasonViolenceOther:"tools.ozone.report.defs#reasonViolenceOther",DefsReasonSexualAbuseContent:"tools.ozone.report.defs#reasonSexualAbuseContent",DefsReasonSexualNCII:"tools.ozone.report.defs#reasonSexualNCII",DefsReasonSexualDeepfake:"tools.ozone.report.defs#reasonSexualDeepfake",DefsReasonSexualAnimal:"tools.ozone.report.defs#reasonSexualAnimal",DefsReasonSexualUnlabeled:"tools.ozone.report.defs#reasonSexualUnlabeled",DefsReasonSexualOther:"tools.ozone.report.defs#reasonSexualOther",DefsReasonChildSafetyCSAM:"tools.ozone.report.defs#reasonChildSafetyCSAM",DefsReasonChildSafetyGroom:"tools.ozone.report.defs#reasonChildSafetyGroom",DefsReasonChildSafetyPrivacy:"tools.ozone.report.defs#reasonChildSafetyPrivacy",DefsReasonChildSafetyHarassment:"tools.ozone.report.defs#reasonChildSafetyHarassment",DefsReasonChildSafetyOther:"tools.ozone.report.defs#reasonChildSafetyOther",DefsReasonHarassmentTroll:"tools.ozone.report.defs#reasonHarassmentTroll",DefsReasonHarassmentTargeted:"tools.ozone.report.defs#reasonHarassmentTargeted",DefsReasonHarassmentHateSpeech:"tools.ozone.report.defs#reasonHarassmentHateSpeech",DefsReasonHarassmentDoxxing:"tools.ozone.report.defs#reasonHarassmentDoxxing",DefsReasonHarassmentOther:"tools.ozone.report.defs#reasonHarassmentOther",DefsReasonMisleadingBot:"tools.ozone.report.defs#reasonMisleadingBot",DefsReasonMisleadingImpersonation:"tools.ozone.report.defs#reasonMisleadingImpersonation",DefsReasonMisleadingSpam:"tools.ozone.report.defs#reasonMisleadingSpam",DefsReasonMisleadingScam:"tools.ozone.report.defs#reasonMisleadingScam",DefsReasonMisleadingElections:"tools.ozone.report.defs#reasonMisleadingElections",DefsReasonMisleadingOther:"tools.ozone.report.defs#reasonMisleadingOther",DefsReasonRuleSiteSecurity:"tools.ozone.report.defs#reasonRuleSiteSecurity",DefsReasonRuleProhibitedSales:"tools.ozone.report.defs#reasonRuleProhibitedSales",DefsReasonRuleBanEvasion:"tools.ozone.report.defs#reasonRuleBanEvasion",DefsReasonRuleOther:"tools.ozone.report.defs#reasonRuleOther",DefsReasonSelfHarmContent:"tools.ozone.report.defs#reasonSelfHarmContent",DefsReasonSelfHarmED:"tools.ozone.report.defs#reasonSelfHarmED",DefsReasonSelfHarmStunts:"tools.ozone.report.defs#reasonSelfHarmStunts",DefsReasonSelfHarmSubstances:"tools.ozone.report.defs#reasonSelfHarmSubstances",DefsReasonSelfHarmOther:"tools.ozone.report.defs#reasonSelfHarmOther"},b.TOOLS_OZONE_TEAM={DefsRoleAdmin:"tools.ozone.team.defs#roleAdmin",DefsRoleModerator:"tools.ozone.team.defs#roleModerator",DefsRoleTriage:"tools.ozone.team.defs#roleTriage",DefsRoleVerifier:"tools.ozone.team.defs#roleVerifier"};class mt extends t.XrpcClient{constructor(f){super(f,i.schemas),Object.defineProperty(this,"app",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"chat",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"com",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.app=new Rt(this),this.chat=new Xn(this),this.com=new Jn(this),this.tools=new ts(this)}get xrpc(){return this}}b.AtpBaseClient=mt;class Rt{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bsky",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.bsky=new _t(f)}}b.AppNS=Rt;class _t{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"actor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bookmark",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"embed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"feed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"graph",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"labeler",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"notification",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"richtext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unspecced",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"video",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.actor=new st(f),this.bookmark=new eo(f),this.embed=new di(f),this.feed=new pi(f),this.graph=new oo(f),this.labeler=new xi(f),this.notification=new ki(f),this.richtext=new G(f),this.unspecced=new ga(f),this.video=new ba(f)}}b.AppBskyNS=_t;class st{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"profile",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.profile=new jt(f),this.status=new Xt(f)}getPreferences(f,g){return this._client.call("app.bsky.actor.getPreferences",f,void 0,g)}getProfile(f,g){return this._client.call("app.bsky.actor.getProfile",f,void 0,g)}getProfiles(f,g){return this._client.call("app.bsky.actor.getProfiles",f,void 0,g)}getSuggestions(f,g){return this._client.call("app.bsky.actor.getSuggestions",f,void 0,g)}putPreferences(f,g){return this._client.call("app.bsky.actor.putPreferences",g?.qp,f,g)}searchActors(f,g){return this._client.call("app.bsky.actor.searchActors",f,void 0,g)}searchActorsTypeahead(f,g){return this._client.call("app.bsky.actor.searchActorsTypeahead",f,void 0,g)}}b.AppBskyActorNS=st;class jt{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.actor.profile",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.actor.profile",...f})).data}async create(f,g,M){const $="app.bsky.actor.profile";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,rkey:"self",...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.actor.profile";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.actor.profile",...f},{headers:g})}}b.AppBskyActorProfileRecord=jt;class Xt{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.actor.status",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.actor.status",...f})).data}async create(f,g,M){const $="app.bsky.actor.status";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,rkey:"self",...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.actor.status";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.actor.status",...f},{headers:g})}}b.AppBskyActorStatusRecord=Xt;class eo{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}createBookmark(f,g){return this._client.call("app.bsky.bookmark.createBookmark",g?.qp,f,g).catch(M=>{throw n.toKnownErr(M)})}deleteBookmark(f,g){return this._client.call("app.bsky.bookmark.deleteBookmark",g?.qp,f,g).catch(M=>{throw s.toKnownErr(M)})}getBookmarks(f,g){return this._client.call("app.bsky.bookmark.getBookmarks",f,void 0,g)}}b.AppBskyBookmarkNS=eo;class di{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}}b.AppBskyEmbedNS=di;class pi{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"generator",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"like",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"post",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"postgate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"repost",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"threadgate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.generator=new to(f),this.like=new ui(f),this.post=new fi(f),this.postgate=new ro(f),this.repost=new mi(f),this.threadgate=new hi(f)}describeFeedGenerator(f,g){return this._client.call("app.bsky.feed.describeFeedGenerator",f,void 0,g)}getActorFeeds(f,g){return this._client.call("app.bsky.feed.getActorFeeds",f,void 0,g)}getActorLikes(f,g){return this._client.call("app.bsky.feed.getActorLikes",f,void 0,g).catch(M=>{throw l.toKnownErr(M)})}getAuthorFeed(f,g){return this._client.call("app.bsky.feed.getAuthorFeed",f,void 0,g).catch(M=>{throw a.toKnownErr(M)})}getFeed(f,g){return this._client.call("app.bsky.feed.getFeed",f,void 0,g).catch(M=>{throw d.toKnownErr(M)})}getFeedGenerator(f,g){return this._client.call("app.bsky.feed.getFeedGenerator",f,void 0,g)}getFeedGenerators(f,g){return this._client.call("app.bsky.feed.getFeedGenerators",f,void 0,g)}getFeedSkeleton(f,g){return this._client.call("app.bsky.feed.getFeedSkeleton",f,void 0,g).catch(M=>{throw p.toKnownErr(M)})}getLikes(f,g){return this._client.call("app.bsky.feed.getLikes",f,void 0,g)}getListFeed(f,g){return this._client.call("app.bsky.feed.getListFeed",f,void 0,g).catch(M=>{throw u.toKnownErr(M)})}getPostThread(f,g){return this._client.call("app.bsky.feed.getPostThread",f,void 0,g).catch(M=>{throw h.toKnownErr(M)})}getPosts(f,g){return this._client.call("app.bsky.feed.getPosts",f,void 0,g)}getQuotes(f,g){return this._client.call("app.bsky.feed.getQuotes",f,void 0,g)}getRepostedBy(f,g){return this._client.call("app.bsky.feed.getRepostedBy",f,void 0,g)}getSuggestedFeeds(f,g){return this._client.call("app.bsky.feed.getSuggestedFeeds",f,void 0,g)}getTimeline(f,g){return this._client.call("app.bsky.feed.getTimeline",f,void 0,g)}searchPosts(f,g){return this._client.call("app.bsky.feed.searchPosts",f,void 0,g).catch(M=>{throw y.toKnownErr(M)})}sendInteractions(f,g){return this._client.call("app.bsky.feed.sendInteractions",g?.qp,f,g)}}b.AppBskyFeedNS=pi;class to{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.generator",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.generator",...f})).data}async create(f,g,M){const $="app.bsky.feed.generator";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.feed.generator";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.generator",...f},{headers:g})}}b.AppBskyFeedGeneratorRecord=to;class ui{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.like",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.like",...f})).data}async create(f,g,M){const $="app.bsky.feed.like";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.feed.like";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.like",...f},{headers:g})}}b.AppBskyFeedLikeRecord=ui;class fi{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.post",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.post",...f})).data}async create(f,g,M){const $="app.bsky.feed.post";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.feed.post";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.post",...f},{headers:g})}}b.AppBskyFeedPostRecord=fi;class ro{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.postgate",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.postgate",...f})).data}async create(f,g,M){const $="app.bsky.feed.postgate";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $=
2"app.bsky.feed.postgate";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.postgate",...f},{headers:g})}}b.AppBskyFeedPostgateRecord=ro;class mi{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.repost",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.repost",...f})).data}async create(f,g,M){const $="app.bsky.feed.repost";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.feed.repost";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.repost",...f},{headers:g})}}b.AppBskyFeedRepostRecord=mi;class hi{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.threadgate",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.threadgate",...f})).data}async create(f,g,M){const $="app.bsky.feed.threadgate";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.feed.threadgate";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.threadgate",...f},{headers:g})}}b.AppBskyFeedThreadgateRecord=hi;class oo{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"block",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"follow",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"listblock",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"listitem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"starterpack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"verification",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.block=new yi(f),this.follow=new gi(f),this.list=new io(f),this.listblock=new bi(f),this.listitem=new vi(f),this.starterpack=new no(f),this.verification=new wi(f)}getActorStarterPacks(f,g){return this._client.call("app.bsky.graph.getActorStarterPacks",f,void 0,g)}getBlocks(f,g){return this._client.call("app.bsky.graph.getBlocks",f,void 0,g)}getFollowers(f,g){return this._client.call("app.bsky.graph.getFollowers",f,void 0,g)}getFollows(f,g){return this._client.call("app.bsky.graph.getFollows",f,void 0,g)}getKnownFollowers(f,g){return this._client.call("app.bsky.graph.getKnownFollowers",f,void 0,g)}getList(f,g){return this._client.call("app.bsky.graph.getList",f,void 0,g)}getListBlocks(f,g){return this._client.call("app.bsky.graph.getListBlocks",f,void 0,g)}getListMutes(f,g){return this._client.call("app.bsky.graph.getListMutes",f,void 0,g)}getLists(f,g){return this._client.call("app.bsky.graph.getLists",f,void 0,g)}getListsWithMembership(f,g){return this._client.call("app.bsky.graph.getListsWithMembership",f,void 0,g)}getMutes(f,g){return this._client.call("app.bsky.graph.getMutes",f,void 0,g)}getRelationships(f,g){return this._client.call("app.bsky.graph.getRelationships",f,void 0,g).catch(M=>{throw m.toKnownErr(M)})}getStarterPack(f,g){return this._client.call("app.bsky.graph.getStarterPack",f,void 0,g)}getStarterPacks(f,g){return this._client.call("app.bsky.graph.getStarterPacks",f,void 0,g)}getStarterPacksWithMembership(f,g){return this._client.call("app.bsky.graph.getStarterPacksWithMembership",f,void 0,g)}getSuggestedFollowsByActor(f,g){return this._client.call("app.bsky.graph.getSuggestedFollowsByActor",f,void 0,g)}muteActor(f,g){return this._client.call("app.bsky.graph.muteActor",g?.qp,f,g)}muteActorList(f,g){return this._client.call("app.bsky.graph.muteActorList",g?.qp,f,g)}muteThread(f,g){return this._client.call("app.bsky.graph.muteThread",g?.qp,f,g)}searchStarterPacks(f,g){return this._client.call("app.bsky.graph.searchStarterPacks",f,void 0,g)}unmuteActor(f,g){return this._client.call("app.bsky.graph.unmuteActor",g?.qp,f,g)}unmuteActorList(f,g){return this._client.call("app.bsky.graph.unmuteActorList",g?.qp,f,g)}unmuteThread(f,g){return this._client.call("app.bsky.graph.unmuteThread",g?.qp,f,g)}}b.AppBskyGraphNS=oo;class yi{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.block",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.block",...f})).data}async create(f,g,M){const $="app.bsky.graph.block";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.graph.block";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.block",...f},{headers:g})}}b.AppBskyGraphBlockRecord=yi;class gi{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.follow",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.follow",...f})).data}async create(f,g,M){const $="app.bsky.graph.follow";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.graph.follow";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.follow",...f},{headers:g})}}b.AppBskyGraphFollowRecord=gi;class io{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.list",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.list",...f})).data}async create(f,g,M){const $="app.bsky.graph.list";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.graph.list";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.list",...f},{headers:g})}}b.AppBskyGraphListRecord=io;class bi{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.listblock",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.listblock",...f})).data}async create(f,g,M){const $="app.bsky.graph.listblock";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.graph.listblock";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.listblock",...f},{headers:g})}}b.AppBskyGraphListblockRecord=bi;class vi{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.listitem",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.listitem",...f})).data}async create(f,g,M){const $="app.bsky.graph.listitem";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.graph.listitem";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.listitem",...f},{headers:g})}}b.AppBskyGraphListitemRecord=vi;
2class no{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.starterpack",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.starterpack",...f})).data}async create(f,g,M){const $="app.bsky.graph.starterpack";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.graph.starterpack";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.starterpack",...f},{headers:g})}}b.AppBskyGraphStarterpackRecord=no;class wi{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.verification",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.verification",...f})).data}async create(f,g,M){const $="app.bsky.graph.verification";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.graph.verification";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.verification",...f},{headers:g})}}b.AppBskyGraphVerificationRecord=wi;class xi{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"service",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.service=new so(f)}getServices(f,g){return this._client.call("app.bsky.labeler.getServices",f,void 0,g)}}b.AppBskyLabelerNS=xi;class so{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.labeler.service",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.labeler.service",...f})).data}async create(f,g,M){const $="app.bsky.labeler.service";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,rkey:"self",...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.labeler.service";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.labeler.service",...f},{headers:g})}}b.AppBskyLabelerServiceRecord=so;class ki{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"declaration",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.declaration=new Si(f)}getPreferences(f,g){return this._client.call("app.bsky.notification.getPreferences",f,void 0,g)}getUnreadCount(f,g){return this._client.call("app.bsky.notification.getUnreadCount",f,void 0,g)}listActivitySubscriptions(f,g){return this._client.call("app.bsky.notification.listActivitySubscriptions",f,void 0,g)}listNotifications(f,g){return this._client.call("app.bsky.notification.listNotifications",f,void 0,g)}putActivitySubscription(f,g){return this._client.call("app.bsky.notification.putActivitySubscription",g?.qp,f,g)}putPreferences(f,g){return this._client.call("app.bsky.notification.putPreferences",g?.qp,f,g)}putPreferencesV2(f,g){return this._client.call("app.bsky.notification.putPreferencesV2",g?.qp,f,g)}registerPush(f,g){return this._client.call("app.bsky.notification.registerPush",g?.qp,f,g)}unregisterPush(f,g){return this._client.call("app.bsky.notification.unregisterPush",g?.qp,f,g)}updateSeen(f,g){return this._client.call("app.bsky.notification.updateSeen",g?.qp,f,g)}}b.AppBskyNotificationNS=ki;class Si{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.notification.declaration",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.notification.declaration",...f})).data}async create(f,g,M){const $="app.bsky.notification.declaration";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,rkey:"self",...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="app.bsky.notification.declaration";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.notification.declaration",...f},{headers:g})}}b.AppBskyNotificationDeclarationRecord=Si;class G{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}}b.AppBskyRichtextNS=G;class ga{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}getAgeAssuranceState(f,g){return this._client.call("app.bsky.unspecced.getAgeAssuranceState",f,void 0,g)}getConfig(f,g){return this._client.call("app.bsky.unspecced.getConfig",f,void 0,g)}getOnboardingSuggestedStarterPacks(f,g){return this._client.call("app.bsky.unspecced.getOnboardingSuggestedStarterPacks",f,void 0,g)}getOnboardingSuggestedStarterPacksSkeleton(f,g){return this._client.call("app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton",f,void 0,g)}getPopularFeedGenerators(f,g){return this._client.call("app.bsky.unspecced.getPopularFeedGenerators",f,void 0,g)}getPostThreadOtherV2(f,g){return this._client.call("app.bsky.unspecced.getPostThreadOtherV2",f,void 0,g)}getPostThreadV2(f,g){return this._client.call("app.bsky.unspecced.getPostThreadV2",f,void 0,g)}getSuggestedFeeds(f,g){return this._client.call("app.bsky.unspecced.getSuggestedFeeds",f,void 0,g)}getSuggestedFeedsSkeleton(f,g){return this._client.call("app.bsky.unspecced.getSuggestedFeedsSkeleton",f,void 0,g)}getSuggestedStarterPacks(f,g){return this._client.call("app.bsky.unspecced.getSuggestedStarterPacks",f,void 0,g)}getSuggestedStarterPacksSkeleton(f,g){return this._client.call("app.bsky.unspecced.getSuggestedStarterPacksSkeleton",f,void 0,g)}getSuggestedUsers(f,g){return this._client.call("app.bsky.unspecced.getSuggestedUsers",f,void 0,g)}getSuggestedUsersSkeleton(f,g){return this._client.call("app.bsky.unspecced.getSuggestedUsersSkeleton",f,void 0,g)}getSuggestionsSkeleton(f,g){return this._client.call("app.bsky.unspecced.getSuggestionsSkeleton",f,void 0,g)}getTaggedSuggestions(f,g){return this._client.call("app.bsky.unspecced.getTaggedSuggestions",f,void 0,g)}getTrendingTopics(f,g){return this._client.call("app.bsky.unspecced.getTrendingTopics",f,void 0,g)}getTrends(f,g){return this._client.call("app.bsky.unspecced.getTrends",f,void 0,g)}getTrendsSkeleton(f,g){return this._client.call("app.bsky.unspecced.getTrendsSkeleton",f,void 0,g)}initAgeAssurance(f,g){return this._client.call("app.bsky.unspecced.initAgeAssurance",g?.qp,f,g).catch(M=>{throw w.toKnownErr(M)})}searchActorsSkeleton(f,g){return this._client.call("app.bsky.unspecced.searchActorsSkeleton",f,void 0,g).catch(M=>{throw x.toKnownErr(M)})}searchPostsSkeleton(f,g){return this._client.call("app.bsky.unspecced.searchPostsSkeleton",f,void 0,g).catch(M=>{throw v.toKnownErr(M)})}searchStarterPacksSkeleton(f,g){return this._client.call("app.bsky.unspecced.searchStarterPacksSkeleton",f,void 0,g).catch(M=>{throw k.toKnownErr(M)})}}b.AppBskyUnspeccedNS=ga;class ba{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}getJobStatus(f,g){return this._client.call("app.bsky.video.getJobStatus",f,void 0,g)}getUploadLimits(f,g){return this._client.call("app.bsky.video.getUploadLimits",f,void 0,g)}uploadVideo(f,g){return this._client.call("app.bsky.video.uploadVideo",g?.qp,f,g)}}b.AppBskyVideoNS=ba;class Xn{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bsky",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.bsky=new va(f)}}b.ChatNS=Xn;class va{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"actor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"convo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moderation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.actor=new wa(f),this.convo=new xa(f),this.moderation=new ka(f)}}b.ChatBskyNS=va;class wa{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"declaration",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.declaration=new Qn(f)}deleteAccount(f,g){return this._client.call("chat.bsky.actor.deleteAccount",g?.qp,f,g)}exportAccountData(f,g){return this._client.call("chat.bsky.actor.exportAccountData",f,void 0,g)}}b.ChatBskyActorNS=wa;class Qn{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"chat.bsky.actor.declaration",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"chat.bsky.actor.declaration",...f})).data}async create(f,g,M){const $="chat.bsky.actor.declaration";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,rkey:"self",...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="chat.bsky.actor.declaration";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"chat.bsky.actor.declaration",...f},{headers:g})}}b.ChatBskyActorDeclarationRecord=Qn;class xa{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}acceptConvo(f,g){return this._client.call("chat.bsky.convo.acceptConvo",g?.qp,f,g)}addReaction(f,g){return this._client.call("chat.bsky.convo.addReaction",g?.qp,f,g).catch(M=>{throw A.toKnownErr(M)})}deleteMessageForSelf(f,g){return this._client.call("chat.bsky.convo.deleteMessageForSelf",g?.qp,f,g)}getConvo(f,g){return this._client.call("chat.bsky.convo.getConvo",f,void 0,g)}getConvoAvailability(f,g){return this._client.call("chat.bsky.convo.getConvoAvailability",f,void 0,g)}getConvoForMembers(f,g){return this._client.call("chat.bsky.convo.getConvoForMembers",f,void 0,g)}getLog(f,g){return this._client.call("chat.bsky.convo.getLog",f,void 0,g)}getMessages(f,g){return this._client.call("chat.bsky.convo.getMessages",f,void 0,g)}leaveConvo(f,g){return this._client.call("chat.bsky.convo.leaveConvo",g?.qp,f,g)}listConvos(f,g){return this._client.call("chat.bsky.convo.listConvos",f,void 0,g)}muteConvo(f,g){return this._client.call("chat.bsky.convo.muteConvo",g?.qp,f,g)}removeReaction(f,g){return this._client.call("chat.bsky.convo.removeReaction",g?.qp,f,g).catch(M=>{throw S.toKnownErr(M)})}sendMessage(f,g){return this._client.call("chat.bsky.convo.sendMessage",g?.qp,f,g)}sendMessageBatch(f,g){return this._client.call("chat.bsky.convo.sendMessageBatch",g?.qp,f,g)}unmuteConvo(f,g){return this._client.call("chat.bsky.convo.unmuteConvo",g?.qp,f,g)}updateAllRead(f,g){return this._client.call("chat.bsky.convo.updateAllRead",g?.qp,f,g)}updateRead(f,g){return this._client.call("chat.bsky.convo.updateRead",g?.qp,f,g)}}b.ChatBskyConvoNS=xa;class ka{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}getActorMetadata(f,g){return this._client.call("chat.bsky.moderation.getActorMetadata",f,void 0,g)}getMessageContext(f,g){return this._client.call("chat.bsky.moderation.getMessageContext",f,void 0,g)}updateActorAccess(f,g){return this._client.call("chat.bsky.moderation.updateActorAccess",g?.qp,f,g)}}b.ChatBskyModerationNS=ka;class Jn{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"atproto",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.atproto=new Sa(f)}}b.ComNS=Jn;class Sa{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"admin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"identity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"label",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lexicon",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moderation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"repo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"server",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sync",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"temp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.admin=new Aa(f),this.identity=new Yn(f),this.label=new Ra(f),this.lexicon=new _a(f),this.moderation=new ja(f),this.repo=new Ea(f),this.server=new es(f),this.sync=new Ca(f),this.temp=new Pa(f)}}b.ComAtprotoNS=Sa;class Aa{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}deleteAccount(f,g){return this._client.call("com.atproto.admin.deleteAccount",g?.qp,f,g)}disableAccountInvites(f,g){return this._client.call("com.atproto.admin.disableAccountInvites",g?.qp,f,g)}disableInviteCodes(f,g){return this._client.call("com.atproto.admin.disableInviteCodes",g?.qp,f,g)}
2enableAccountInvites(f,g){return this._client.call("com.atproto.admin.enableAccountInvites",g?.qp,f,g)}getAccountInfo(f,g){return this._client.call("com.atproto.admin.getAccountInfo",f,void 0,g)}getAccountInfos(f,g){return this._client.call("com.atproto.admin.getAccountInfos",f,void 0,g)}getInviteCodes(f,g){return this._client.call("com.atproto.admin.getInviteCodes",f,void 0,g)}getSubjectStatus(f,g){return this._client.call("com.atproto.admin.getSubjectStatus",f,void 0,g)}searchAccounts(f,g){return this._client.call("com.atproto.admin.searchAccounts",f,void 0,g)}sendEmail(f,g){return this._client.call("com.atproto.admin.sendEmail",g?.qp,f,g)}updateAccountEmail(f,g){return this._client.call("com.atproto.admin.updateAccountEmail",g?.qp,f,g)}updateAccountHandle(f,g){return this._client.call("com.atproto.admin.updateAccountHandle",g?.qp,f,g)}updateAccountPassword(f,g){return this._client.call("com.atproto.admin.updateAccountPassword",g?.qp,f,g)}updateAccountSigningKey(f,g){return this._client.call("com.atproto.admin.updateAccountSigningKey",g?.qp,f,g)}updateSubjectStatus(f,g){return this._client.call("com.atproto.admin.updateSubjectStatus",g?.qp,f,g)}}b.ComAtprotoAdminNS=Aa;class Yn{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}getRecommendedDidCredentials(f,g){return this._client.call("com.atproto.identity.getRecommendedDidCredentials",f,void 0,g)}refreshIdentity(f,g){return this._client.call("com.atproto.identity.refreshIdentity",g?.qp,f,g).catch(M=>{throw E.toKnownErr(M)})}requestPlcOperationSignature(f,g){return this._client.call("com.atproto.identity.requestPlcOperationSignature",g?.qp,f,g)}resolveDid(f,g){return this._client.call("com.atproto.identity.resolveDid",f,void 0,g).catch(M=>{throw _.toKnownErr(M)})}resolveHandle(f,g){return this._client.call("com.atproto.identity.resolveHandle",f,void 0,g).catch(M=>{throw C.toKnownErr(M)})}resolveIdentity(f,g){return this._client.call("com.atproto.identity.resolveIdentity",f,void 0,g).catch(M=>{throw O.toKnownErr(M)})}signPlcOperation(f,g){return this._client.call("com.atproto.identity.signPlcOperation",g?.qp,f,g)}submitPlcOperation(f,g){return this._client.call("com.atproto.identity.submitPlcOperation",g?.qp,f,g)}updateHandle(f,g){return this._client.call("com.atproto.identity.updateHandle",g?.qp,f,g)}}b.ComAtprotoIdentityNS=Yn;class Ra{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}queryLabels(f,g){return this._client.call("com.atproto.label.queryLabels",f,void 0,g)}}b.ComAtprotoLabelNS=Ra;class _a{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.schema=new Zn(f)}}b.ComAtprotoLexiconNS=_a;class Zn{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}async list(f){return(await this._client.call("com.atproto.repo.listRecords",{collection:"com.atproto.lexicon.schema",...f})).data}async get(f){return(await this._client.call("com.atproto.repo.getRecord",{collection:"com.atproto.lexicon.schema",...f})).data}async create(f,g,M){const $="com.atproto.lexicon.schema";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async put(f,g,M){const $="com.atproto.lexicon.schema";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:$,...f,record:{...g,$type:$}},{encoding:"application/json",headers:M})).data}async delete(f,g){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"com.atproto.lexicon.schema",...f},{headers:g})}}b.ComAtprotoLexiconSchemaRecord=Zn;class ja{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}createReport(f,g){return this._client.call("com.atproto.moderation.createReport",g?.qp,f,g)}}b.ComAtprotoModerationNS=ja;class Ea{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}applyWrites(f,g){return this._client.call("com.atproto.repo.applyWrites",g?.qp,f,g).catch(M=>{throw V.toKnownErr(M)})}createRecord(f,g){return this._client.call("com.atproto.repo.createRecord",g?.qp,f,g).catch(M=>{throw I.toKnownErr(M)})}deleteRecord(f,g){return this._client.call("com.atproto.repo.deleteRecord",g?.qp,f,g).catch(M=>{throw z.toKnownErr(M)})}describeRepo(f,g){return this._client.call("com.atproto.repo.describeRepo",f,void 0,g)}getRecord(f,g){return this._client.call("com.atproto.repo.getRecord",f,void 0,g).catch(M=>{throw N.toKnownErr(M)})}importRepo(f,g){return this._client.call("com.atproto.repo.importRepo",g?.qp,f,g)}listMissingBlobs(f,g){return this._client.call("com.atproto.repo.listMissingBlobs",f,void 0,g)}listRecords(f,g){return this._client.call("com.atproto.repo.listRecords",f,void 0,g)}putRecord(f,g){return this._client.call("com.atproto.repo.putRecord",g?.qp,f,g).catch(M=>{throw R.toKnownErr(M)})}uploadBlob(f,g){return this._client.call("com.atproto.repo.uploadBlob",g?.qp,f,g)}}b.ComAtprotoRepoNS=Ea;class es{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}activateAccount(f,g){return this._client.call("com.atproto.server.activateAccount",g?.qp,f,g)}checkAccountStatus(f,g){return this._client.call("com.atproto.server.checkAccountStatus",f,void 0,g)}confirmEmail(f,g){return this._client.call("com.atproto.server.confirmEmail",g?.qp,f,g).catch(M=>{throw D.toKnownErr(M)})}createAccount(f,g){return this._client.call("com.atproto.server.createAccount",g?.qp,f,g).catch(M=>{throw q.toKnownErr(M)})}createAppPassword(f,g){return this._client.call("com.atproto.server.createAppPassword",g?.qp,f,g).catch(M=>{throw j.toKnownErr(M)})}createInviteCode(f,g){return this._client.call("com.atproto.server.createInviteCode",g?.qp,f,g)}createInviteCodes(f,g){return this._client.call("com.atproto.server.createInviteCodes",g?.qp,f,g)}createSession(f,g){return this._client.call("com.atproto.server.createSession",g?.qp,f,g).catch(M=>{throw L.toKnownErr(M)})}deactivateAccount(f,g){return this._client.call("com.atproto.server.deactivateAccount",g?.qp,f,g)}deleteAccount(f,g){return this._client.call("com.atproto.server.deleteAccount",g?.qp,f,g).catch(M=>{throw U.toKnownErr(M)})}deleteSession(f,g){return this._client.call("com.atproto.server.deleteSession",g?.qp,f,g)}describeServer(f,g){return this._client.call("com.atproto.server.describeServer",f,void 0,g)}getAccountInviteCodes(f,g){return this._client.call("com.atproto.server.getAccountInviteCodes",f,void 0,g).catch(M=>{throw W.toKnownErr(M)})}getServiceAuth(f,g){return this._client.call("com.atproto.server.getServiceAuth",f,void 0,g).catch(M=>{throw ee.toKnownErr(M)})}getSession(f,g){return this._client.call("com.atproto.server.getSession",f,void 0,g)}listAppPasswords(f,g){return this._client.call("com.atproto.server.listAppPasswords",f,void 0,g).catch(M=>{throw ae.toKnownErr(M)})}refreshSession(f,g){return this._client.call("com.atproto.server.refreshSession",g?.qp,f,g).catch(M=>{throw de.toKnownErr(M)})}requestAccountDelete(f,g){return this._client.call("com.atproto.server.requestAccountDelete",g?.qp,f,g)}requestEmailConfirmation(f,g){return this._client.call("com.atproto.server.requestEmailConfirmation",g?.qp,f,g)}requestEmailUpdate(f,g){return this._client.call("com.atproto.server.requestEmailUpdate",g?.qp,f,g)}requestPasswordReset(f,g){return this._client.call("com.atproto.server.requestPasswordReset",g?.qp,f,g)}reserveSigningKey(f,g){return this._client.call("com.atproto.server.reserveSigningKey",g?.qp,f,g)}resetPassword(f,g){return this._client.call("com.atproto.server.resetPassword",g?.qp,f,g).catch(M=>{throw ce.toKnownErr(M)})}revokeAppPassword(f,g){return this._client.call("com.atproto.server.revokeAppPassword",g?.qp,f,g)}updateEmail(f,g){return this._client.call("com.atproto.server.updateEmail",g?.qp,f,g).catch(M=>{throw fe.toKnownErr(M)})}}b.ComAtprotoServerNS=es;class Ca{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}getBlob(f,g){return this._client.call("com.atproto.sync.getBlob",f,void 0,g).catch(M=>{throw K.toKnownErr(M)})}getBlocks(f,g){return this._client.call("com.atproto.sync.getBlocks",f,void 0,g).catch(M=>{throw Me.toKnownErr(M)})}getCheckout(f,g){return this._client.call("com.atproto.sync.getCheckout",f,void 0,g)}getHead(f,g){return this._client.call("com.atproto.sync.getHead",f,void 0,g).catch(M=>{throw Ve.toKnownErr(M)})}getHostStatus(f,g){return this._client.call("com.atproto.sync.getHostStatus",f,void 0,g).catch(M=>{throw me.toKnownErr(M)})}getLatestCommit(f,g){return this._client.call("com.atproto.sync.getLatestCommit",f,void 0,g).catch(M=>{throw Ae.toKnownErr(M)})}getRecord(f,g){return this._client.call("com.atproto.sync.getRecord",f,void 0,g).catch(M=>{throw Re.toKnownErr(M)})}getRepo(f,g){return this._client.call("com.atproto.sync.getRepo",f,void 0,g).catch(M=>{throw Te.toKnownErr(M)})}getRepoStatus(f,g){return this._client.call("com.atproto.sync.getRepoStatus",f,void 0,g).catch(M=>{throw ue.toKnownErr(M)})}listBlobs(f,g){return this._client.call("com.atproto.sync.listBlobs",f,void 0,g).catch(M=>{throw xe.toKnownErr(M)})}listHosts(f,g){return this._client.call("com.atproto.sync.listHosts",f,void 0,g)}listRepos(f,g){return this._client.call("com.atproto.sync.listRepos",f,void 0,g)}listReposByCollection(f,g){return this._client.call("com.atproto.sync.listReposByCollection",f,void 0,g)}notifyOfUpdate(f,g){return this._client.call("com.atproto.sync.notifyOfUpdate",g?.qp,f,g)}requestCrawl(f,g){return this._client.call("com.atproto.sync.requestCrawl",g?.qp,f,g).catch(M=>{throw be.toKnownErr(M)})}}b.ComAtprotoSyncNS=Ca;class Pa{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}addReservedHandle(f,g){return this._client.call("com.atproto.temp.addReservedHandle",g?.qp,f,g)}checkHandleAvailability(f,g){return this._client.call("com.atproto.temp.checkHandleAvailability",f,void 0,g).catch(M=>{throw Le.toKnownErr(M)})}checkSignupQueue(f,g){return this._client.call("com.atproto.temp.checkSignupQueue",f,void 0,g)}dereferenceScope(f,g){return this._client.call("com.atproto.temp.dereferenceScope",f,void 0,g).catch(M=>{throw Ue.toKnownErr(M)})}fetchLabels(f,g){return this._client.call("com.atproto.temp.fetchLabels",f,void 0,g)}requestPhoneVerification(f,g){return this._client.call("com.atproto.temp.requestPhoneVerification",g?.qp,f,g)}revokeAccountCredentials(f,g){return this._client.call("com.atproto.temp.revokeAccountCredentials",g?.qp,f,g)}}b.ComAtprotoTempNS=Pa;class ts{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ozone",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.ozone=new Ta(f)}}b.ToolsNS=ts;class Ta{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"communication",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hosting",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moderation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"safelink",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"server",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"set",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"setting",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"team",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"verification",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f,this.communication=new qa(f),this.hosting=new rs(f),this.moderation=new Da(f),this.safelink=new Oa(f),this.server=new os(f),this.set=new Ia(f),this.setting=new Ma(f),this.signature=new is(f),this.team=new Na(f),this.verification=new Ba(f)}}b.ToolsOzoneNS=Ta;class qa{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}createTemplate(f,g){return this._client.call("tools.ozone.communication.createTemplate",g?.qp,f,g).catch(M=>{throw ze.toKnownErr(M)})}deleteTemplate(f,g){return this._client.call("tools.ozone.communication.deleteTemplate",g?.qp,f,g)}listTemplates(f,g){return this._client.call("tools.ozone.communication.listTemplates",f,void 0,g)}updateTemplate(f,g){return this._client.call("tools.ozone.communication.updateTemplate",g?.qp,f,g).catch(M=>{throw We.toKnownErr(M)})}}b.ToolsOzoneCommunicationNS=qa;class rs{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}getAccountHistory(f,g){return this._client.call("tools.ozone.hosting.getAccountHistory",f,void 0,g)}}b.ToolsOzoneHostingNS=rs;class Da{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}cancelScheduledActions(f,g){return this._client.call("tools.ozone.moderation.cancelScheduledActions",g?.qp,f,g)}emitEvent(f,g){return this._client.call("tools.ozone.moderation.emitEvent",g?.qp,f,g).catch(M=>{throw nt.toKnownErr(M)})}getAccountTimeline(f,g){return this._client.call("tools.ozone.moderation.getAccountTimeline",f,void 0,g).catch(M=>{throw Ke.toKnownErr(M)})}getEvent(f,g){return this._client.call("tools.ozone.moderation.getEvent",f,void 0,g)}getRecord(f,g){return this._client.call("tools.ozone.moderation.getRecord",f,void 0,g).catch(M=>{throw At.toKnownErr(M)})}getRecords(f,g){return this._client.call("tools.ozone.moderation.getRecords",f,void 0,g)}getRepo(f,g){return this._client.call("tools.ozone.moderation.getRepo",f,void 0,g).catch(M=>{throw tt.toKnownErr(M)})}getReporterStats(f,g){return this._client.call("tools.ozone.moderation.getReporterStats",f,void 0,g)}getRepos(f,g){return this._client.call("tools.ozone.moderation.getRepos",f,void 0,g)}getSubjects(f,g){return this._client.call("tools.ozone.moderation.getSubjects",f,void 0,g)}listScheduledActions(f,g){return this._client.call("tools.ozone.moderation.listScheduledActions",g?.qp,f,g)}queryEvents(f,g){return this._client.call("tools.ozone.moderation.queryEvents",f,void 0,g)}queryStatuses(f,g){return this._client.call("tools.ozone.moderation.queryStatuses",f,void 0,g)}scheduleAction(f,g){return this._client.call("tools.ozone.moderation.scheduleAction",g?.qp,f,g)}searchRepos(f,g){return this._client.call("tools.ozone.moderation.searchRepos",f,void 0,g)}}b.ToolsOzoneModerationNS=Da;class Oa{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}addRule(f,g){return this._client.call("tools.ozone.safelink.addRule",g?.qp,f,g).catch(M=>{throw X.toKnownErr(M)})}queryEvents(f,g){return this._client.call("tools.ozone.safelink.queryEvents",g?.qp,f,g)}queryRules(f,g){return this._client.call("tools.ozone.safelink.queryRules",g?.qp,f,g)}removeRule(f,g){return this._client.call("tools.ozone.safelink.removeRule",g?.qp,f,g).catch(M=>{throw pt.toKnownErr(M)})}updateRule(f,g){return this._client.call("tools.ozone.safelink.updateRule",g?.qp,f,g).catch(M=>{throw ut.toKnownErr(M)})}}b.ToolsOzoneSafelinkNS=Oa;class os{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}getConfig(f,g){return this._client.call("tools.ozone.server.getConfig",f,void 0,g)}}b.ToolsOzoneServerNS=os;class Ia{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}addValues(f,g){return this._client.call("tools.ozone.set.addValues",g?.qp,f,g)}deleteSet(f,g){return this._client.call("tools.ozone
2.set.deleteSet",g?.qp,f,g).catch(M=>{throw J.toKnownErr(M)})}deleteValues(f,g){return this._client.call("tools.ozone.set.deleteValues",g?.qp,f,g).catch(M=>{throw Bt.toKnownErr(M)})}getValues(f,g){return this._client.call("tools.ozone.set.getValues",f,void 0,g).catch(M=>{throw Vt.toKnownErr(M)})}querySets(f,g){return this._client.call("tools.ozone.set.querySets",f,void 0,g)}upsertSet(f,g){return this._client.call("tools.ozone.set.upsertSet",g?.qp,f,g)}}b.ToolsOzoneSetNS=Ia;class Ma{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}listOptions(f,g){return this._client.call("tools.ozone.setting.listOptions",f,void 0,g)}removeOptions(f,g){return this._client.call("tools.ozone.setting.removeOptions",g?.qp,f,g)}upsertOption(f,g){return this._client.call("tools.ozone.setting.upsertOption",g?.qp,f,g)}}b.ToolsOzoneSettingNS=Ma;class is{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}findCorrelation(f,g){return this._client.call("tools.ozone.signature.findCorrelation",f,void 0,g)}findRelatedAccounts(f,g){return this._client.call("tools.ozone.signature.findRelatedAccounts",f,void 0,g)}searchAccounts(f,g){return this._client.call("tools.ozone.signature.searchAccounts",f,void 0,g)}}b.ToolsOzoneSignatureNS=is;class Na{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}addMember(f,g){return this._client.call("tools.ozone.team.addMember",g?.qp,f,g).catch(M=>{throw ft.toKnownErr(M)})}deleteMember(f,g){return this._client.call("tools.ozone.team.deleteMember",g?.qp,f,g).catch(M=>{throw Lt.toKnownErr(M)})}listMembers(f,g){return this._client.call("tools.ozone.team.listMembers",f,void 0,g)}updateMember(f,g){return this._client.call("tools.ozone.team.updateMember",g?.qp,f,g).catch(M=>{throw zt.toKnownErr(M)})}}b.ToolsOzoneTeamNS=Na;class Ba{constructor(f){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=f}grantVerifications(f,g){return this._client.call("tools.ozone.verification.grantVerifications",g?.qp,f,g)}listVerifications(f,g){return this._client.call("tools.ozone.verification.listVerifications",f,void 0,g)}revokeVerifications(f,g){return this._client.call("tools.ozone.verification.revokeVerifications",g?.qp,f,g)}}return b.ToolsOzoneVerificationNS=Ba,b}var Yo={},_n={};const mC=JSON.parse('["aaa","aarp","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","actor","ad","ads","adult","ae","aeg","aero","aetna","af","afl","africa","ag","agakhan","agency","ai","aig","airbus","airforce","airtel","akdn","al","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","cash","casino","cat","catering","catholic","cba","cbn","cbre","cc","cd","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cool","coop","corsica","country","coupon","coupons","courses","cpa","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dis
2h","diy","dj","dk","dm","dnp","do","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","dunlop","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","er","ericsson","erni","es","esq","estate","et","eu","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontier","ftr","fujitsu","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","inc","industries","infiniti","info","ing","ink","institute","insurance","insure","int","international","intuit","investments","io","ipiranga","iq","ir","irish","is","ismaili","ist","istanbul","it","itau","itv","jaguar","java","jcb","je","jeep","jetzt","jewelry","jio","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kids","kim","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","lamborghini","lamer","lancaster","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","link","lipsy","live","living","lk","llc","llp","loan","loans","locker","locus","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","luxe","luxury","lv","ly","ma","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","music","mv","mw","mx","my","mz","na","nab","nagoya","name","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","office","okinawa","olayan","olayangroup","ollo","om","omega","one","ong","onl","online","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","paris","pars","partners","parts","party","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","racing","radio","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","ril","rio","rip","ro","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","
2save","saxo","sb","sbi","sbs","sc","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scot","sd","se","search","seat","secure","security","seek","select","sener","services","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shell","shia","shiksha","shoes","shop","shopping","shouji","show","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","sr","srl","ss","st","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiss","sx","sy","sydney","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","vermögensberater","vermögensberatung","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vn","vodka","volvo","vote","voting","voto","voyage","vu","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xihuan","xin","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw","ελ","εÏ
","бг","бел","деÑи","еÑ","каÑолик","ком","мкд","мон","моÑква","онлайн","оÑг","ÑÑÑ","ÑÑ","ÑайÑ","ÑÑб","ÑкÑ","Òаз","Õ°Õ¡Õµ","×שר××","×§××","Ø§Ø¨ÙØ¸Ø¨Ù","اراÙ
ÙÙ","Ø§ÙØ§Ø±Ø¯Ù","Ø§ÙØ¨ØØ±ÙÙ","Ø§ÙØ¬Ø²Ø§Ø¦Ø±","Ø§ÙØ³Ø¹ÙØ¯ÙØ©","Ø§ÙØ¹ÙÙØ§Ù","اÙÙ
غرب","اÙ
ارات","Ø§ÛØ±Ø§Ù","بارت","بازار","Ø¨ÙØªÙ","بھارت","تÙÙØ³","Ø³ÙØ¯Ø§Ù","Ø³ÙØ±ÙØ©","Ø´Ø¨ÙØ©","عراÙ","عرب","عÙ
اÙ","ÙÙØ³Ø·ÙÙ","ÙØ·Ø±","ÙØ§Ø«ÙÙÙÙ","ÙÙÙ
","Ù
صر","Ù
ÙÙØ³Ùا","Ù
ÙØ±ÙتاÙÙØ§","Ù
ÙÙØ¹","ÙÙ
راÙ","پاکستاÙ","ÚØ§Ø±Øª","à¤à¥à¤®","नà¥à¤","à¤à¤¾à¤°à¤¤","à¤à¤¾à¤°à¤¤à¤®à¥","à¤à¤¾à¤°à¥à¤¤","सà¤à¤à¤ न","বাà¦à¦²à¦¾","à¦à¦¾à¦°à¦¤","à¦à¦¾à§°à¦¤","à¨à¨¾à¨°à¨¤","àªàª¾àª°àª¤","à¬à¬¾à¬°à¬¤","à®à®¨à¯à®¤à®¿à®¯à®¾","à®à®²à®à¯à®à¯","à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯","à°à°¾à°°à°¤à±","à²à²¾à²°à²¤","à´à´¾à´°à´¤à´","à¶½à¶à¶à·","à¸à¸à¸¡","à¹à¸à¸¢","ລາວ","áá","ã¿ããª","ã¢ãã¾ã³","ã¯ã©ã¦ã","ã°ã¼ã°ã«","ã³ã ","ã¹ãã¢","ã»ã¼ã«","ãã¡ãã·ã§ã³","ãã¤ã³ã","ä¸ç","ä¸ä¿¡","ä¸å½","ä¸å","䏿ç½","äºé©¬é","ä¼ä¸","ä½å±±","ä¿¡æ¯","å¥åº·","å
«å¦","å
¬å¸","å
¬ç","å°æ¹¾","å°ç£","åå","ååº","åæ ","åé","åé大é
åº","å¨çº¿","大æ¿","天主æ","娱ä¹","å®¶é»","广ä¸","å¾®å","æ
å","æç±ä½ ","ææº","æè","æ¿å¡","æ¿åº","æ°å å¡","æ°é»","æ¶å°","æ¸ç±","æºæ","淡马é¡","游æ","æ¾³é","ç¹ç","ç§»å¨","ç»ç»æºæ","ç½å","ç½åº","ç½ç«","ç½ç»","èé","è°·æ","è´ç©","é販","éå¢","é»è¨çç§","é£å©æµ¦","é£å","é¤å
","馿 ¼éæ","馿¸¯","ë·ë·","ë·ì»´","ì¼ì±","íêµ"]');var er={},_1;
2function lx(){return _1||(_1=1,Object.defineProperty(er,"__esModule",{value:!0}),er.TAG_REGEX=er.TRAILING_PUNCTUATION_REGEX=er.URL_REGEX=er.MENTION_REGEX=void 0,er.MENTION_REGEX=/(^|\s|\()(@)([a-zA-Z0-9.-]+)(\b)/g,er.URL_REGEX=/(^|\s|\()((https?:\/\/[\S]+)|((?<domain>[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/gim,er.TRAILING_PUNCTUATION_REGEX=new RegExp("\\p{P}+$","gu"),er.TAG_REGEX=/(^|\s)[#ï¼]((?!\ufe0f)[^\s\u00AD\u2060\u200A\u200B\u200C\u200D\u20e2]*[^\d\s\p{P}\u00AD\u2060\u200A\u200B\u200C\u200D\u20e2]+[^\s\u00AD\u2060\u200A\u200B\u200C\u200D\u20e2]*)?/gu),er}var j1;function hC(){if(j1)return _n;j1=1;var o=_n&&_n.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(_n,"__esModule",{value:!0}),_n.detectFacets=t;const e=o(mC),r=lx();function t(n){let s;const l=[];{const a=r.MENTION_REGEX;for(;s=a.exec(n.utf16);){if(!i(s[3])&&!s[3].endsWith(".test"))continue;const d=n.utf16.indexOf(s[3],s.index)-1;l.push({$type:"app.bsky.richtext.facet",index:{byteStart:n.utf16IndexToUtf8Index(d),byteEnd:n.utf16IndexToUtf8Index(d+s[3].length+1)},features:[{$type:"app.bsky.richtext.facet#mention",did:s[3]}]})}}{const a=r.URL_REGEX;for(;s=a.exec(n.utf16);){let d=s[2];if(!d.startsWith("http")){const h=s.groups?.domain;if(!h||!i(h))continue;d=`https://${d}`}const p=n.utf16.indexOf(s[2],s.index),u={start:p,end:p+s[2].length};/[.,;:!?]$/.test(d)&&(d=d.slice(0,-1),u.end--),/[)]$/.test(d)&&!d.includes("(")&&(d=d.slice(0,-1),u.end--),l.push({index:{byteStart:n.utf16IndexToUtf8Index(u.start),byteEnd:n.utf16IndexToUtf8Index(u.end)},features:[{$type:"app.bsky.richtext.facet#link",uri:d}]})}}{const a=r.TAG_REGEX;for(;s=a.exec(n.utf16);){const d=s[1];let p=s[2];if(!p||(p=p.trim().replace(r.TRAILING_PUNCTUATION_REGEX,""),p.length===0||p.length>64))continue;const u=s.index+d.length;l.push({index:{byteStart:n.utf16IndexToUtf8Index(u),byteEnd:n.utf16IndexToUtf8Index(u+1+p.length)},features:[{$type:"app.bsky.richtext.facet#tag",tag:p}]})}}return l.length>0?l:void 0}function i(n){return!!e.default.find(s=>{const l=n.lastIndexOf(s);return l===-1?!1:n.charAt(l-1)==="."&&l===n.length-s.length})}return _n}var Pd={},Ds={},E1;function ju(){if(E1)return Ds;E1=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.UnicodeString=void 0;const o=Yr(),e=new TextEncoder,r=new TextDecoder;class t{constructor(n){Object.defineProperty(this,"utf16",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"utf8",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_graphemeLen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.utf16=n,this.utf8=e.encode(n)}get length(){return this.utf8.byteLength}get graphemeLength(){return this._graphemeLen||(this._graphemeLen=(0,o.graphemeLen)(this.utf16)),this._graphemeLen}slice(n,s){return r.decode(this.utf8.slice(n,s))}utf16IndexToUtf8Index(n){return e.encode(this.utf16.slice(0,n)).byteLength}toString(){return this.utf16}}return Ds.UnicodeString=t,Ds}var C1;function dx(){if(C1)return Pd;C1=1,Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.sanitizeRichText=t;const o=ju(),e=/[\r\n]([\u00AD\u2060\u200D\u200C\u200B\s]*[\r\n]){2,}/,r=` 3 4`;function t(n,s){return s.cleanNewlines&&(n=i(n,e,r)),n}function i(n,s,l){n=n.clone();let a=n.unicodeText.utf16.match(s);for(;a&&typeof a.index<"u";){const d=n.unicodeText,p=n.unicodeText.utf16IndexToUtf8Index(a.index),u=p+new o.UnicodeString(a[0]).length;if(n.delete(p,u),n.unicodeText.utf16===d.utf16)break;n.insert(p,l),a=n.unicodeText.utf16.match(s)}return n}return Pd}var P1;function yC(){if(P1)return Yo;P1=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.RichText=Yo.RichTextSegment=void 0;const o=Do(),e=hC(),r=dx(),t=ju();class i{constructor(u,h){Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:u}),Object.defineProperty(this,"facet",{enumerable:!0,configurable:!0,writable:!0,value:h})}get link(){return this.facet?.features.find(o.AppBskyRichtextFacet.isLink)}isLink(){return!!this.link}get mention(){return this.facet?.features.find(o.AppBskyRichtextFacet.isMention)}isMention(){return!!this.mention}get tag(){return this.facet?.features.find(o.AppBskyRichtextFacet.isTag)}isTag(){return!!this.tag}}Yo.RichTextSegment=i;class n{constructor(u,h){Object.defineProperty(this,"unicodeText",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"facets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.unicodeText=new t.UnicodeString(u.text),this.facets=u.facets,!this.facets?.length&&u.entities?.length&&(this.facets=a(this.unicodeText,u.entities)),this.facets&&(this.facets=this.facets.filter(l).sort(s)),h?.cleanNewlines&&(0,r.sanitizeRichText)(this,{cleanNewlines:!0}).copyInto(this)}get text(){return this.unicodeText.toString()}get length(){return this.unicodeText.length}get graphemeLength(){return this.unicodeText.graphemeLength}clone(){return new n({text:this.unicodeText.utf16,facets:d(this.facets)})}copyInto(u){u.unicodeText=this.unicodeText,u.facets=d(this.facets)}*segments(){const u=this.facets||[];if(!u.length){yield new i(this.unicodeText.utf16);return}let h=0,y=0;do{const m=u[y];if(h<m.index.byteStart)yield new i(this.unicodeText.slice(h,m.index.byteStart));else if(h>m.index.byteStart){y++;continue}if(m.index.byteStart<m.index.byteEnd){const w=this.unicodeText.slice(m.index.byteStart,m.index.byteEnd);w.trim()?yield new i(w,m):yield new i(w)}h=m.index.byteEnd,y++}while(y<u.length);h<this.unicodeText.length&&(yield new i(this.unicodeText.slice(h,this.unicodeText.length)))}insert(u,h){if(this.unicodeText=new t.UnicodeString(this.unicodeText.slice(0,u)+h+this.unicodeText.slice(u)),!this.facets?.length)return this;const y=h.length;for(const m of this.facets)u<=m.index.byteStart?(m.index.byteStart+=y,m.index.byteEnd+=y):u>=m.index.byteStart&&u<m.index.byteEnd&&(m.index.byteEnd+=y);return this}delete(u,h){if(this.unicodeText=new t.UnicodeString(this.unicodeText.slice(0,u)+this.unicodeText.slice(h)),!this.facets?.length)return this;const y=h-u;for(const m of this.facets)u<=m.index.byteStart&&h>
4=m.index.byteEnd?(m.index.byteStart=0,m.index.byteEnd=0):u>m.index.byteEnd||(u>m.index.byteStart&&u<=m.index.byteEnd&&h>m.index.byteEnd?m.index.byteEnd=u:u>=m.index.byteStart&&h<=m.index.byteEnd?m.index.byteEnd-=y:u<m.index.byteStart&&h>=m.index.byteStart&&h<=m.index.byteEnd?(m.index.byteStart=u,m.index.byteEnd-=y):h<m.index.byteStart&&(m.index.byteStart-=y,m.index.byteEnd-=y));return this.facets=this.facets.filter(m=>m.index.byteStart<m.index.byteEnd),this}async detectFacets(u){if(this.facets=(0,e.detectFacets)(this.unicodeText),this.facets){const h=[];for(const y of this.facets)for(const m of y.features)o.AppBskyRichtextFacet.isMention(m)&&h.push(u.com.atproto.identity.resolveHandle({handle:m.did}).then(w=>w?.data.did).catch(w=>{}).then(w=>{m.did=w||""}));await Promise.allSettled(h),this.facets.sort(s)}}detectFacetsWithoutResolution(){this.facets=(0,e.detectFacets)(this.unicodeText),this.facets&&this.facets.sort(s)}}Yo.RichText=n;const s=(p,u)=>p.index.byteStart-u.index.byteStart,l=p=>p.index.byteStart<=p.index.byteEnd;function a(p,u){const h=[];for(const y of u)y.type==="link"?h.push({$type:"app.bsky.richtext.facet",index:{byteStart:p.utf16IndexToUtf8Index(y.index.start),byteEnd:p.utf16IndexToUtf8Index(y.index.end)},features:[{$type:"app.bsky.richtext.facet#link",uri:y.value}]}):y.type==="mention"&&h.push({$type:"app.bsky.richtext.facet",index:{byteStart:p.utf16IndexToUtf8Index(y.index.start),byteEnd:p.utf16IndexToUtf8Index(y.index.end)},features:[{$type:"app.bsky.richtext.facet#mention",did:y.value}]});return h}function d(p){return typeof p>"u"?p:JSON.parse(JSON.stringify(p))}return Yo}var Lp={},Os={},Zo={},T1;function Eu(){return T1||(T1=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.LABELS=Zo.DEFAULT_LABEL_SETTINGS=void 0,Zo.DEFAULT_LABEL_SETTINGS={porn:"hide",sexual:"warn",nudity:"ignore","graphic-media":"warn"},Zo.LABELS={"!hide":{identifier:"!hide",configurable:!1,defaultSetting:"hide",flags:["no-override","no-self"],severity:"alert",blurs:"content",behaviors:{account:{profileList:"blur",profileView:"blur",avatar:"blur",banner:"blur",displayName:"blur",contentList:"blur",contentView:"blur"},profile:{avatar:"blur",banner:"blur",displayName:"blur"},content:{contentList:"blur",contentView:"blur"}},locales:[]},"!warn":{identifier:"!warn",configurable:!1,defaultSetting:"warn",flags:["no-self"],severity:"none",blurs:"content",behaviors:{account:{profileList:"blur",profileView:"blur",avatar:"blur",banner:"blur",contentList:"blur",contentView:"blur"},profile:{avatar:"blur",banner:"blur",displayName:"blur"},content:{contentList:"blur",contentView:"blur"}},locales:[]},"!no-unauthenticated":{identifier:"!no-unauthenticated",configurable:!1,defaultSetting:"hide",flags:["no-override","unauthed"],severity:"none",blurs:"content",behaviors:{account:{profileList:"blur",profileView:"blur",avatar:"blur",banner:"blur",displayName:"blur",contentList:"blur",contentView:"blur"},profile:{avatar:"blur",banner:"blur",displayName:"blur"},content:{contentList:"blur",contentView:"blur"}},locales:[]},porn:{identifier:"porn",configurable:!0,defaultSetting:"hide",flags:["adult"],severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},sexual:{identifier:"sexual",configurable:!0,defaultSetting:"warn",flags:["adult"],severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},nudity:{identifier:"nudity",configurable:!0,defaultSetting:"ignore",flags:[],severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},"graphic-media":{identifier:"graphic-media",flags:["adult"],configurable:!0,defaultSetting:"warn",severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},gore:{identifier:"gore",flags:["adult"],configurable:!0,defaultSetting:"warn",severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]}}),Zo}var lt={},q1;
4function px(){return q1||(q1=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.NOOP_BEHAVIOR=lt.HIDE_BEHAVIOR=lt.MUTEWORD_BEHAVIOR=lt.MUTE_BEHAVIOR=lt.BLOCK_BEHAVIOR=lt.CUSTOM_LABEL_VALUE_RE=void 0,lt.CUSTOM_LABEL_VALUE_RE=/^[a-z-]+$/,lt.BLOCK_BEHAVIOR={profileList:"blur",profileView:"alert",avatar:"blur",banner:"blur",contentList:"blur",contentView:"blur"},lt.MUTE_BEHAVIOR={profileList:"inform",profileView:"alert",contentList:"blur",contentView:"inform"},lt.MUTEWORD_BEHAVIOR={contentList:"blur",contentView:"blur"},lt.HIDE_BEHAVIOR={contentList:"blur",contentView:"blur"},lt.NOOP_BEHAVIOR={}),lt}var Is={},D1;function ux(){if(D1)return Is;D1=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.ModerationUI=void 0;class o{constructor(){Object.defineProperty(this,"noOverride",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"filters",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"blurs",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"alerts",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"informs",{enumerable:!0,configurable:!0,writable:!0,value:[]})}get filter(){return this.filters.length!==0}get blur(){return this.blurs.length!==0}get alert(){return this.alerts.length!==0}get inform(){return this.informs.length!==0}}return Is.ModerationUI=o,Is}var O1;function To(){if(O1)return Os;O1=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.ModerationDecision=void 0;const o=Eu(),e=px(),r=ux();var t;(function(l){l[l.High=0]="High",l[l.Medium=1]="Medium",l[l.Low=2]="Low"})(t||(t={}));class i{constructor(){Object.defineProperty(this,"did",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"isMe",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"causes",{enumerable:!0,configurable:!0,writable:!0,value:[]})}static merge(...a){const d=a.filter(u=>u!=null),p=new i;return d[0]&&(p.did=d[0].did,p.isMe=d[0].isMe),p.causes=d.flatMap(u=>u.causes),p}downgrade(){for(const a of this.causes)a.downgraded=!0;return this}get blocked(){return!!this.blockCause}get muted(){return!!this.muteCause}get blockCause(){return this.causes.find(a=>a.type==="blocking"||a.type==="blocked-by"||a.type==="block-other")}get muteCause(){return this.causes.find(a=>a.type==="muted")}get labelCauses(){return this.causes.filter(a=>a.type==="label")}ui(a){const d=new r.ModerationUI;for(const p of this.causes)if(p.type==="blocking"||p.type==="blocked-by"||p.type==="block-other"){if(this.isMe)continue;(a==="profileList"||a==="contentList")&&d.filters.push(p),p.downgraded||(e.BLOCK_BEHAVIOR[a]==="blur"?(d.noOverride=!0,d.blurs.push(p)):e.BLOCK_BEHAVIOR[a]==="alert"?d.alerts.push(p):e.BLOCK_BEHAVIOR[a]==="inform"&&d.informs.push(p))}else if(p.type==="muted"){if(this.isMe)continue;(a==="profileList"||a==="contentList")&&d.filters.push(p),p.downgraded||(e.MUTE_BEHAVIOR[a]==="blur"?d.blurs.push(p):e.MUTE_BEHAVIOR[a]==="alert"?d.alerts.push(p):e.MUTE_BEHAVIOR[a]==="inform"&&d.informs.push(p))}else if(p.type==="mute-word"){if(this.isMe)continue;a==="contentList"&&d.filters.push(p),p.downgraded||(e.MUTEWORD_BEHAVIOR[a]==="blur"?d.blurs.push(p):e.MUTEWORD_BEHAVIOR[a]==="alert"?d.alerts.push(p):e.MUTEWORD_BEHAVIOR[a]==="inform"&&d.informs.push(p))}else p.type==="hidden"?((a==="profileList"||a==="contentList")&&d.filters.push(p),p.downgraded||(e.HIDE_BEHAVIOR[a]==="blur"?d.blurs.push(p):e.HIDE_BEHAVIOR[a]==="alert"?d.alerts.push(p):e.HIDE_BEHAVIOR[a]==="inform"&&d.informs.push(p))):p.type==="label"&&(a==="profileList"&&p.target==="account"?p.setting==="hide"&&!this.isMe&&d.filters.push(p):a==="contentList"&&(p.target==="account"||p.target==="content")&&p.setting==="hide"&&!this.isMe&&d.filters.push(p),p.downgraded||(p.behavior[a]==="blur"?(d.blurs.push(p),p.noOverride&&!this.isMe&&(d.noOverride=!0)):p.behavior[a]==="alert"?d.alerts.push(p):p.behavior[a]==="inform"&&d.informs.push(p)));return d.filters.sort(s),d.blurs.sort(s),d}setDid(a){this.did=a}setIsMe(a){this.isMe=a}addHidden(a){a&&this.causes.push({type:"hidden",source:{type:"user"},priority:6})}addMutedWord(a){a?.length&&this.causes.push({type:"mute-word",source:{type:"user"},priority:6,matches:a})}addBlocking(a){a&&this.causes.push({type:"blocking",source:{type:"user"},priority:3})}
4addBlockingByList(a){a&&this.causes.push({type:"blocking",source:{type:"list",list:a},priority:3})}addBlockedBy(a){a&&this.causes.push({type:"blocked-by",source:{type:"user"},priority:4})}addBlockOther(a){a&&this.causes.push({type:"block-other",source:{type:"user"},priority:4})}addLabel(a,d,p){const u=e.CUSTOM_LABEL_VALUE_RE.test(d.val)&&p.labelDefs?.[d.src]?.find(k=>k.identifier===d.val)||o.LABELS[d.val];if(!u)return;const h=d.src===this.did,y=h?void 0:p.prefs.labelers.find(k=>k.did===d.src);if(!h&&!y||h&&u.flags.includes("no-self"))return;let m=u.defaultSetting||"ignore";if(u.configurable?u.flags.includes("adult")&&!p.prefs.adultContentEnabled?m="hide":y?.labels[u.identifier]?m=y?.labels[u.identifier]:p.prefs.labels[u.identifier]&&(m=p.prefs.labels[u.identifier]):m=u.defaultSetting||"hide",m==="ignore"||u.flags.includes("unauthed")&&p.userDid)return;let w;const x=n(u.behaviors[a]);u.flags.includes("no-override")||u.flags.includes("adult")&&!p.prefs.adultContentEnabled?w=1:m==="hide"?w=2:x===t.High?w=5:x===t.Medium?w=7:w=8;let v=!1;(u.flags.includes("no-override")||u.flags.includes("adult")&&!p.prefs.adultContentEnabled)&&(v=!0),this.causes.push({type:"label",source:h||!y?{type:"user"}:{type:"labeler",did:y.did},label:d,labelDef:u,target:a,setting:m,behavior:u.behaviors[a]||e.NOOP_BEHAVIOR,noOverride:v,priority:w})}addMuted(a){a&&this.causes.push({type:"muted",source:{type:"user"},priority:6})}addMutedByList(a){a&&this.causes.push({type:"muted",source:{type:"list",list:a},priority:6})}}Os.ModerationDecision=i;function n(l){return l?l.profileView==="blur"||l.contentView==="blur"?t.High:l.contentList==="blur"||l.contentMedia==="blur"?t.Medium:t.Low:t.Low}function s(l,a){return l.priority-a.priority}return Os}var Ms={},I1;function ha(){if(I1)return Ms;I1=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.decideAccount=e,Ms.filterAccountLabels=r;const o=To();function e(t,i){const n=new o.ModerationDecision;n.setDid(t.did),n.setIsMe(t.did===i.userDid),t.viewer?.muted&&(t.viewer?.mutedByList?n.addMutedByList(t.viewer?.mutedByList):n.addMuted(t.viewer?.muted)),t.viewer?.blocking&&(t.viewer?.blockingByList?n.addBlockingByList(t.viewer?.blockingByList):n.addBlocking(t.viewer?.blocking)),n.addBlockedBy(t.viewer?.blockedBy);for(const s of r(t.labels))n.addLabel("account",s,i);return n}function r(t){return t?t.filter(i=>!i.uri.endsWith("/app.bsky.actor.profile/self")||i.val==="!no-unauthenticated"):[]}return Ms}var Td={},Ns={},M1;function ya(){if(M1)return Ns;M1=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.decideProfile=e,Ns.filterProfileLabels=r;const o=To();function e(t,i){const n=new o.ModerationDecision;n.setDid(t.did),n.setIsMe(t.did===i.userDid);for(const s of r(t.labels))n.addLabel("profile",s,i);return n}function r(t){return t?t.filter(i=>i.uri.endsWith("/app.bsky.actor.profile/self")):[]}return Ns}var N1;function gC(){if(N1)return Td;N1=1,Object.defineProperty(Td,"__esModule",{value:!0}),Td.decideFeedGenerator=t;const o=To(),e=ha(),r=ya();function t(i,n){const s=new o.ModerationDecision;if(s.setDid(i.creator.did),s.setIsMe(i.creator.did===n.userDid),i.labels?.length)for(const l of i.labels)s.addLabel("content",l,n);return o.ModerationDecision.merge(s,(0,e.decideAccount)(i.creator,n),(0,r.decideProfile)(i.creator,n))}return Td}var qd={},B1;function bC(){if(B1)return qd;B1=1,Object.defineProperty(qd,"__esModule",{value:!0}),qd.decideNotification=t;const o=To(),e=ha(),r=ya();function t(i,n){const s=new o.ModerationDecision;if(s.setDid(i.author.did),s.setIsMe(i.author.did===n.userDid),i.labels?.length)for(const l of i.labels)s.addLabel("content",l,n);return o.ModerationDecision.merge(s,(0,e.decideAccount)(i.author,n),(0,r.decideProfile)(i.author,n))}return qd}var Dd={},Bs={},V1;function fx(){if(V1)return Bs;V1=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.matchMuteWords=t,Bs.hasMutedWord=i;const o=Do(),e={LEADING_TRAILING_PUNCTUATION:new RegExp("(?:^\\p{P}+|\\p{P}+$)","gu"),WORD_BOUNDARY:/[\s\n\t\r\f\v]+?/g},r=["ja","zh","ko","th","vi"];function t({mutedWords:n,text:s,facets:l,outlineTags:a,languages:d,actor:p}){const u=r.includes(d?.[0]||""),h=[].concat(a||[]).concat((l||[]).flatMap(m=>m.features.filter(o.AppBskyRichtextFacet.isTag).map(w=>w.tag))).map(m=>m.toLowerCase()),y=[];e:for(const m of n){const w=m.value.toLowerCase(),x=s.toLowerCase();if(m.expiresAt&&m.expiresAt<new Date().toISOString()||m.actorTarget==="exclude-following"&&p?.viewer?.following)continue;if(h.includes(w)){y.push({word:m,predicate:m.value});continue}if(!m.targets.includes("content"))continue;if((w.length===1||u)&&x.includes(w)){y.push({word:m,predicate:m.value});continue}if(w.length>x.length)continue;if(w===x){y.push({word:m,predicate:m.value});continue}if(new RegExp("(?:\\s|\\p{P})+?","u").test(w)&&x.includes(w)){y.push({word:m,predicate:m.value});continue}const v=x.split(e.WORD_BOUNDARY);for(const k of v){if(k===w){y.push({word:m,predicate:k});continue e}const A=k.replace(e.LEADING_TRAILING_PUNCTUATION,"");if(w===A){y.push({word:m,predicate:k});continue e}if(!(w.length>A.length)&&new RegExp("\\p{P}+","u").test(A)){if(/[/]+/.test(A))continue e;const S=A.replace(new RegExp("\\p{P}+","gu")," ");if(S===w){y.push({word:m,predicate:k});continue e}if(S.replace(/\s/gu,"")===w){y.push({word:m,predicate:k});continue e}const _=A.split(new RegExp("\\p{P}+","u"));for(const C of _)if(C===w){y.push({word:m,predicate:k});continue e}}}}return y.length?y:void 0}function i(n){return!!t(n)}return Bs}var L1;function vC(){if(L1)return Dd;L1=1,Object.defineProperty(Dd,"__esModule",{value:!0}),Dd.decidePost=n;const o=Do(),e=To(),r=fx(),t=ha(),i=ya();function n(h,y){return e.ModerationDecision.merge(s(h,y),l(h.embed,y)?.downgrade(),(0,t.decideAccount)(h.author,y),(0,i.decideProfile)(h.author,y))}function s(h,y){const m=new e.ModerationDecision;if(m.setDid(h.author.did),m.setIsMe(h.author.did===y.userDid),h.labels?.length)for(const w of h.labels)m.addLabel("content",w,y);return m.addHidden(p(h,y.prefs.hiddenPosts)),m.isMe||m.addMutedWord(u(h,y.prefs.mutedWords)),m}function l(h,y){if(h){if((o.AppBskyEmbedRecord.isView(h)||o.AppBskyEmbedRecordWithMedia.isView(h))&&o.AppBskyEmbedRecord.isViewRecord(h.record))return a(h.record,y);if(o.AppBskyEmbedRecordWithMedia.isView(h)&&o.AppBskyEmbedRecord.isViewRecord(h.record.record))return a(h.record.record,y);if((o.AppBskyEmbedRecord.isView(h)||o.AppBskyEmbedRecordWithMedia.isView(h))&&o.AppBskyEmbedRecord.isViewBlocked(h.record))return d(h.record,y);if(o.AppBskyEmbedRecordWithMedia.isView(h)&&o.AppBskyEmbedRecord.isViewBlocked(h.record.record))return d(h.record.record,y)}}function a(h,y){const m=new e.ModerationDecision;if(m.setDid(h.author.did),m.setIsMe(h.author.did===y.userDid),h.labels?.length)for(const w of h.labels)m.addLabel("content",w,y);return e.ModerationDecision.merge(m,(0,t.decideAccount)(h.author,y),(0,i.decideProfile)(h.author,y))}function d(h,y){const m=new e.ModerationDecision;return m.setDid(h.author.did),m.setIsMe(h.author.did===y.userDid),h.author.viewer?.muted&&(h.author.viewer?.mutedByList?m.addMutedByList(h.author.viewer?.mutedByList):m.addMuted(h.author.viewer?.muted)),h.author.viewer?.blocking&&(h.author.viewer?.blockingByList?m.addBlockingByList(h.author.viewer?.blockingByList):m.addBlocking(h.author.viewer?.blocking)),m.addBlockedBy(h.author.viewer?.blockedBy),m}function p(h,y){return y?.length?!!(y.includes(h.uri)||h.embed&&(o.AppBskyEmbedRecord.isView(h.embed)&&o.AppBskyEmbedRecord.isViewRecord(h.embed.record)&&y.includes(h.embed.record.uri)||o.AppBskyEmbedRecordWithMedia.isView(h.embed)&&o.AppBskyEmbedRecord.isViewRecord(h.embed.record.record)&&y.includes(h.embed.record.record.uri))):!1}function u(h,y){if(!y?.length)return;const m=h.author;if(o.AppBskyFeedPost.isRecord(h.record)){const x=h.record,v=(0,r.matchMuteWords)({mutedWords:y,text:
4x.text,facets:x.facets,outlineTags:x.tags,languages:x.langs,actor:m});if(v)return v;if(x.embed&&o.AppBskyEmbedImages.isMain(x.embed))for(const k of x.embed.images){const A=(0,r.matchMuteWords)({mutedWords:y,text:k.alt,languages:x.langs,actor:m});if(A)return A}}const{embed:w}=h;if(w){if((o.AppBskyEmbedRecord.isView(w)||o.AppBskyEmbedRecordWithMedia.isView(w))&&o.AppBskyEmbedRecord.isViewRecord(w.record)){if(o.AppBskyFeedPost.isRecord(w.record.value)){const x=w.record.value,v=w.record.author,k=(0,r.matchMuteWords)({mutedWords:y,text:x.text,facets:x.facets,outlineTags:x.tags,languages:x.langs,actor:v});if(k)return k;if(o.AppBskyEmbedImages.isMain(x.embed))for(const A of x.embed.images){const S=(0,r.matchMuteWords)({mutedWords:y,text:A.alt,languages:x.langs,actor:v});if(S)return S}if(o.AppBskyEmbedExternal.isMain(x.embed)){const{external:A}=x.embed,S=(0,r.matchMuteWords)({mutedWords:y,text:A.title+" "+A.description,languages:[],actor:v});if(S)return S}if(o.AppBskyEmbedRecordWithMedia.isMain(x.embed)){if(o.AppBskyEmbedExternal.isMain(x.embed.media)){const{external:A}=x.embed.media,S=(0,r.matchMuteWords)({mutedWords:y,text:A.title+" "+A.description,languages:[],actor:v});if(S)return S}if(o.AppBskyEmbedImages.isMain(x.embed.media))for(const A of x.embed.media.images){const S=(0,r.matchMuteWords)({mutedWords:y,text:A.alt,languages:o.AppBskyFeedPost.isRecord(x.record)?x.langs:[],actor:v});if(S)return S}}}}else if(o.AppBskyEmbedExternal.isView(w)){const{external:x}=w,v=(0,r.matchMuteWords)({mutedWords:y,text:x.title+" "+x.description,languages:[],actor:m});if(v)return v}else if(o.AppBskyEmbedRecordWithMedia.isView(w)&&o.AppBskyEmbedRecord.isViewRecord(w.record.record)){const x=w.record.record.author;if(o.AppBskyFeedPost.isRecord(w.record.record.value)){const v=w.record.record.value,k=(0,r.matchMuteWords)({mutedWords:y,text:v.text,facets:v.facets,outlineTags:v.tags,languages:v.langs,actor:x});if(k)return k}if(o.AppBskyEmbedImages.isView(w.media))for(const v of w.media.images){const k=(0,r.matchMuteWords)({mutedWords:y,text:v.alt,languages:o.AppBskyFeedPost.isRecord(h.record)?h.record.langs:[],actor:x});if(k)return k}if(o.AppBskyEmbedExternal.isView(w.media)){const{external:v}=w.media,k=(0,r.matchMuteWords)({mutedWords:y,text:v.title+" "+v.description,languages:[],actor:x});if(k)return k}}}}return Dd}var Od={},z1;function wC(){if(z1)return Od;z1=1,Object.defineProperty(Od,"__esModule",{value:!0}),Od.decideUserList=i;const o=Wn(),e=To(),r=ha(),t=ya();function i(s,l){const a=new e.ModerationDecision,d="creator"in s&&n(s.creator)?s.creator:void 0;if(d){if(a.setDid(d.did),a.setIsMe(d.did===l.userDid),s.labels?.length)for(const u of s.labels)a.addLabel("content",u,l);return e.ModerationDecision.merge(a,(0,r.decideAccount)(d,l),(0,t.decideProfile)(d,l))}const p=new o.AtUri(s.uri).hostname;if(a.setDid(p),a.setIsMe(p===l.userDid),s.labels?.length)for(const u of s.labels)a.addLabel("content",u,l);return a}function n(s){return s&&typeof s=="object"&&"did"in s}return Od}var ei={},F1;function xC(){if(F1)return ei;F1=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.isQuotedPost=r,ei.isQuotedPostWithMedia=t,ei.interpretLabelValueDefinition=i,ei.interpretLabelValueDefinitions=n;const o=Do(),e=T();function r(s){return!!(s&&o.AppBskyEmbedRecord.isView(s))}function t(s){return!!(s&&o.AppBskyEmbedRecordWithMedia.isView(s))}function i(s,l){const a={account:{},profile:{},content:{}},d=s.severity==="alert"?"alert":s.severity==="inform"?"inform":void 0;s.blurs==="content"?(a.account.profileList=d,a.account.profileView=d,a.account.contentList="blur",a.account.contentView=s.adultOnly?"blur":d,a.profile.profileList=d,a.profile.profileView=d,a.content.contentList="blur",a.content.contentView=s.adultOnly?"blur":d):s.blurs==="media"?(a.account.profileList=d,a.account.profileView=d,a.account.avatar="blur",a.account.banner="blur",a.profile.profileList=d,a.profile.profileView=d,a.profile.avatar="blur",a.profile.banner="blur",a.content.contentMedia="blur"):s.blurs==="none"&&(a.account.profileList=d,a.account.profileView=d,a.account.contentList=d,a.account.contentView=d,a.profile.profileList=d,a.profile.profileView=d,a.content.contentList=d,a.content.contentView=d);let p="warn";(s.defaultSetting==="hide"||s.defaultSetting==="ignore")&&(p=s.defaultSetting);const u=["no-self"];return s.adultOnly&&u.push("adult"),{...s,definedBy:l,configurable:!0,defaultSetting:p,flags:u,behaviors:a}}function n(s){return(s.policies?.labelValueDefinitions||[]).filter((0,e.asPredicate)(o.ComAtprotoLabelDefs.validateLabelValueDefinition)).map(l=>i(l,s.creator.did))}return ei}var $1;function mx(){return $1||($1=1,(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.interpretLabelValueDefinitions=o.interpretLabelValueDefinition=o.matchMuteWords=o.hasMutedWord=o.ModerationDecision=o.ModerationUI=void 0,o.moderateProfile=h,o.moderatePost=y,o.moderateNotification=m,o.moderateFeedGenerator=w,o.moderateUserList=x;const e=To(),r=ha(),t=gC(),i=bC(),n=vC(),s=ya(),l=wC();var a=ux();Object.defineProperty(o,"ModerationUI",{enumerable:!0,get:function(){return a.ModerationUI}});var d=To();Object.defineProperty(o,"ModerationDecision",{enumerable:!0,get:function(){return d.ModerationDecision}});var p=fx();Object.defineProperty(o,"hasMutedWord",{enumerable:!0,get:function(){return p.hasMutedWord}}),Object.defineProperty(o,"matchMuteWords",{enumerable:!0,get:function(){return p.matchMuteWords}});var u=xC();Object.defineProperty(o,"interpretLabelValueDefinition",{enumerable:!0,get:function(){return u.interpretLabelValueDefinition}}),Object.defineProperty(o,"interpretLabelValueDefinitions",{enumerable:!0,get:function(){return u.interpretLabelValueDefinitions}});function h(v,k){return e.ModerationDecision.merge((0,r.decideAccount)(v,k),(0,s.decideProfile)(v,k))}function y(v,k){return(0,n.decidePost)(v,k)}function m(v,k){return(0,i.decideNotification)(v,k)}function w(v,k){return(0,t.decideFeedGenerator)(v,k)}function x(v,k){return(0,l.decideUserList)(v,k)}})(Lp)),Lp}var Vs={},G1;function kC(){if(G1)return Vs;G1=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.mock=void 0;const o="bafyreiclp443lavogvhj3d2ob2cxbfuscni2k5jk7bebjzg7khl3esabwq";return Vs.mock={post({text:e,facets:r,reply:t,embed:i}){return{$type:"app.bsky.feed.post",text:e,facets:r,reply:t,embed:i,langs:["en"],createdAt:new Date().toISOString()}},postView({record:e,author:r,embed:t,replyCount:i,repostCount:n,likeCount:s,viewer:l,labels:a}){return{$type:"app.bsky.feed.defs#postView",uri:`at://${r.did}
4/app.bsky.feed.post/fake`,cid:o,author:r,record:e,embed:t,replyCount:i,repostCount:n,likeCount:s,indexedAt:new Date().toISOString(),viewer:l,labels:a}},embedRecordView({record:e,author:r,labels:t}){return{$type:"app.bsky.embed.record#view",record:{$type:"app.bsky.embed.record#viewRecord",uri:`at://${r.did}/app.bsky.feed.post/fake`,cid:o,author:r,value:e,labels:t,indexedAt:new Date().toISOString()}}},profileViewBasic({handle:e,displayName:r,description:t,viewer:i,labels:n}){return{did:`did:web:${e}`,handle:e,displayName:r,description:t,viewer:i,labels:n}},actorViewerState({muted:e,mutedByList:r,blockedBy:t,blocking:i,blockingByList:n,following:s,followedBy:l}){return{muted:e,mutedByList:r,blockedBy:t,blocking:i,blockingByList:n,following:s,followedBy:l}},listViewBasic({name:e}){return{uri:"at://did:plc:fake/app.bsky.graph.list/fake",cid:o,name:e,purpose:"app.bsky.graph.defs#modlist",indexedAt:new Date().toISOString()}},replyNotification({author:e,record:r,labels:t}){return{uri:`at://${e.did}/app.bsky.feed.post/fake`,cid:o,author:e,reason:"reply",reasonSubject:`at://${e.did}/app.bsky.feed.post/fake-parent`,record:r,isRead:!1,indexedAt:new Date().toISOString(),labels:t}},followNotification({author:e,subjectDid:r,labels:t}){return{uri:`at://${e.did}/app.bsky.graph.follow/fake`,cid:o,author:e,reason:"follow",record:{$type:"app.bsky.graph.follow",createdAt:new Date().toISOString(),subject:r},isRead:!1,indexedAt:new Date().toISOString(),labels:t}},label({val:e,uri:r,src:t}){return{src:t||"did:plc:fake-labeler",uri:r,val:e,cts:new Date().toISOString()}}},Vs}var dt={},_o={},U1;function SC(){if(U1)return _o;U1=1;var o=_o&&_o.__classPrivateFieldGet||function(n,s,l,a){if(l==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof s=="function"?n!==s||!a:!s.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return l==="m"?a:l==="a"?a.call(n):a?a.value:s.get(n)},e=_o&&_o.__classPrivateFieldSet||function(n,s,l,a,d){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!d)throw new TypeError("Private accessor was defined without a setter");if(typeof s=="function"?n!==s||!d:!s.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?d.call(n,l):d?d.value=l:s.set(n,l),l},r,t;Object.defineProperty(_o,"__esModule",{value:!0});let i=class{constructor(){r.set(this,!1),t.set(this,new Set)}get acquired(){return o(this,r,"f")}acquireAsync({timeout:s}={}){if(!o(this,r,"f"))return e(this,r,!0,"f"),Promise.resolve();if(s==null)return new Promise(d=>{o(this,t,"f").add(d)});let l,a;return Promise.race([new Promise(d=>{l=()=>{clearTimeout(a),d()},o(this,t,"f").add(l)}),new Promise((d,p)=>{a=setTimeout(()=>{o(this,t,"f").delete(l),p(new Error("Timed out waiting for lock"))},s)})])}tryAcquire(){return o(this,r,"f")?!1:(e(this,r,!0,"f"),!0)}release(){if(!o(this,r,"f"))throw new Error("Cannot release an unacquired lock");if(o(this,t,"f").size>0){const[s]=o(this,t,"f");o(this,t,"f").delete(s),s()}else e(this,r,!1,"f")}};return _o.default=i,r=new WeakMap,t=new WeakMap,_o}var _e={},H1;function AC(){if(H1)return _e;
4H1=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.isValidVerificationPrefs=_e.isValidThreadViewPref=_e.isValidSavedFeedsPrefV2=_e.isValidSavedFeedsPref=_e.isValidPostInteractionSettingsPref=_e.isValidPersonalDetailsPref=_e.isValidMutedWordsPref=_e.isValidLabelersPref=_e.isValidInterestsPref=_e.isValidHiddenPostsPref=_e.isValidFeedViewPref=_e.isValidContentLabelPref=_e.isValidBskyAppStatePref=_e.isValidAdultContentPref=_e.isValidProfile=void 0;const o=Do(),e=T();return _e.isValidProfile=(0,e.asPredicate)(o.AppBskyActorProfile.validateRecord),_e.isValidAdultContentPref=(0,e.asPredicate)(o.AppBskyActorDefs.validateAdultContentPref),_e.isValidBskyAppStatePref=(0,e.asPredicate)(o.AppBskyActorDefs.validateBskyAppStatePref),_e.isValidContentLabelPref=(0,e.asPredicate)(o.AppBskyActorDefs.validateContentLabelPref),_e.isValidFeedViewPref=(0,e.asPredicate)(o.AppBskyActorDefs.validateFeedViewPref),_e.isValidHiddenPostsPref=(0,e.asPredicate)(o.AppBskyActorDefs.validateHiddenPostsPref),_e.isValidInterestsPref=(0,e.asPredicate)(o.AppBskyActorDefs.validateInterestsPref),_e.isValidLabelersPref=(0,e.asPredicate)(o.AppBskyActorDefs.validateLabelersPref),_e.isValidMutedWordsPref=(0,e.asPredicate)(o.AppBskyActorDefs.validateMutedWordsPref),_e.isValidPersonalDetailsPref=(0,e.asPredicate)(o.AppBskyActorDefs.validatePersonalDetailsPref),_e.isValidPostInteractionSettingsPref=(0,e.asPredicate)(o.AppBskyActorDefs.validatePostInteractionSettingsPref),_e.isValidSavedFeedsPref=(0,e.asPredicate)(o.AppBskyActorDefs.validateSavedFeedsPref),_e.isValidSavedFeedsPrefV2=(0,e.asPredicate)(o.AppBskyActorDefs.validateSavedFeedsPrefV2),_e.isValidThreadViewPref=(0,e.asPredicate)(o.AppBskyActorDefs.validateThreadViewPref),_e.isValidVerificationPrefs=(0,e.asPredicate)(o.AppBskyActorDefs.validateVerificationPrefs),_e}var K1;function hx(){if(K1)return dt;K1=1;var o=dt&&dt.__createBinding||(Object.create?(function(N,R,D,q){q===void 0&&(q=D);var j=Object.getOwnPropertyDescriptor(R,D);(!j||("get"in j?!R.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return R[D]}}),Object.defineProperty(N,q,j)}):(function(N,R,D,q){q===void 0&&(q=D),N[q]=R[D]})),e=dt&&dt.__setModuleDefault||(Object.create?(function(N,R){Object.defineProperty(N,"default",{enumerable:!0,value:R})}):function(N,R){N.default=R}),r=dt&&dt.__importStar||(function(){var N=function(R){return N=Object.getOwnPropertyNames||function(D){var q=[];for(var j in D)Object.prototype.hasOwnProperty.call(D,j)&&(q[q.length]=j);return q},N(R)};return function(R){if(R&&R.__esModule)return R;var D={};if(R!=null)for(var q=N(R),j=0;j<q.length;j++)q[j]!=="default"&&o(D,R,q[j]);return e(D,R),D}})(),t=dt&&dt.__classPrivateFieldGet||function(N,R,D,q){if(D==="a"&&!q)throw new TypeError("Private accessor was defined without a getter");if(typeof R=="function"?N!==R||!q:!R.has(N))throw new TypeError("Cannot read private member from an object whose class did not declare it");return D==="m"?q:D==="a"?q.call(N):q?q.value:R.get(N)},i=dt&&dt.__importDefault||function(N){return N&&N.__esModule?N:{default:N}},n;
4Object.defineProperty(dt,"__esModule",{value:!0}),dt.Agent=void 0;const s=i(SC()),l=Yr(),a=Wn(),d=ne(),p=Do(),u=P(),h=nx(),y=mx(),m=Eu(),w=r(AC()),x=ix(),v=sx(),k={hideReplies:!1,hideRepliesByUnfollowed:!0,hideRepliesByLikeCount:0,hideReposts:!1,hideQuotePosts:!1},A={sort:"hotness",prioritizeFollowedUsers:!0};class S extends d.XrpcClient{static configure(R){R.appLabelers&&(this.appLabelers=R.appLabelers.map(x.asDid))}get xrpc(){return this}constructor(R){const D=typeof R=="object"&&"fetchHandler"in R?R:{did:void 0,fetchHandler:(0,d.buildFetchHandler)(R)};super((q,j)=>{const L=new Headers(j?.headers);return this.proxy&&!L.has("atproto-proxy")&&L.set("atproto-proxy",this.proxy),L.set("atproto-accept-labelers",[...this.appLabelers.map(U=>`${U};redact`),...this.labelers,L.get("atproto-accept-labelers")?.trim()].filter(Boolean).join(", ")),this.sessionManager.fetchHandler(q,{...j,headers:L})},u.schemas),Object.defineProperty(this,"com",{enumerable:!0,configurable:!0,writable:!0,value:new p.ComNS(this)}),Object.defineProperty(this,"app",{enumerable:!0,configurable:!0,writable:!0,value:new p.AppNS(this)}),Object.defineProperty(this,"chat",{enumerable:!0,configurable:!0,writable:!0,value:new p.ChatNS(this)}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:new p.ToolsNS(this)}),Object.defineProperty(this,"sessionManager",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"labelers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"proxy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"uploadBlob",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.com.atproto.repo.uploadBlob(q,j)}),Object.defineProperty(this,"resolveHandle",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.com.atproto.identity.resolveHandle(q,j)}),Object.defineProperty(this,"updateHandle",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.com.atproto.identity.updateHandle(q,j)}),Object.defineProperty(this,"createModerationReport",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.com.atproto.moderation.createReport(q,j)}),Object.defineProperty(this,"getTimeline",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.feed.getTimeline(q,j)}),Object.defineProperty(this,"getAuthorFeed",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.feed.getAuthorFeed(q,j)}),Object.defineProperty(this,"getActorLikes",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.feed.getActorLikes(q,j)}),Object.defineProperty(this,"getPostThread",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.feed.getPostThread(q,j)}),Object.defineProperty(this,"getPost",{enumerable:!0,configurable:!0,writable:!0,value:q=>this.app.bsky.feed.post.get(q)}),Object.defineProperty(this,"getPosts",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.feed.getPosts(q,j)}),Object.defineProperty(this,"getLikes",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.feed.getLikes(q,j)}),Object.defineProperty(this,"getRepostedBy",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.feed.getRepostedBy(q,j)}),Object.defineProperty(this,"getFollows",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.graph.getFollows(q,j)}),Object.defineProperty(this,"getFollowers",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.graph.getFollowers(q,j)}),Object.defineProperty(this,"getProfile",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.actor.getProfile(q,j)}),Object.defineProperty(this,"getProfiles",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.actor.getProfiles(q,j)}),Object.defineProperty(this,"getSuggestions",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.actor.getSuggestions(q,j)}),Object.defineProperty(this,"searchActors",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.actor.searchActors(q,j)}),Object.defineProperty(this,"searchActorsTypeahead",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.actor.searchActorsTypeahead(q,j)}),Object.defineProperty(this,"listNotifications",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.notification.listNotifications(q,j)}),Object.defineProperty(this,"countUnreadNotifications",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.notification.getUnreadCount(q,j)}),Object.defineProperty(this,"getLabelers",{enumerable:!0,configurable:!0,writable:!0,value:(q,j)=>this.app.bsky.labeler.getServices(q,j)}),n.set(this,new s.default),this.sessionManager=D}clone(){return this.copyInto(new S(this.sessionManager))}copyInto(R){R.configureLabelers(this.labelers),R.configureProxy(this.proxy??null),R.clearHeaders();
4for(const[D,q]of this.headers)R.setHeader(D,q);return R}withProxy(R,D){const q=this.clone();return q.configureProxy(`${(0,x.asDid)(D)}#${R}`),q}get appLabelers(){return this.constructor.appLabelers}configureLabelers(R){this.labelers=R.map(x.asDid)}configureLabelersHeader(R){this.configureLabelers(R.filter(x.isDid))}configureProxy(R){R===null?this.proxy=void 0:this.proxy=(0,x.asAtprotoProxy)(R)}configureProxyHeader(R,D){(0,x.isDid)(D)&&this.configureProxy(`${D}#${R}`)}get did(){return this.sessionManager.did}get accountDid(){return this.assertDid}get assertDid(){return this.assertAuthenticated(),this.did}assertAuthenticated(){if(!this.did)throw new Error("Not logged in")}get api(){return this}async getLabelDefinitions(R){const D=[...this.appLabelers];O(R)?D.push(...R.moderationPrefs.labelers.map(L=>L.did)):V(R)?D.push(...R.labelers.map(L=>L.did)):D.push(...R);const q=await this.getLabelers({dids:D,detailed:!0}),j={};if(q.data)for(const L of q.data.views)j[L.creator.did]=(0,y.interpretLabelValueDefinitions)(L);return j}async post(R){return R.createdAt||(R.createdAt=new Date().toISOString()),this.app.bsky.feed.post.create({repo:this.accountDid},R)}async deletePost(R){this.assertAuthenticated();const D=new a.AtUri(R);return this.app.bsky.feed.post.delete({repo:D.hostname,rkey:D.rkey})}async like(R,D,q){return this.app.bsky.feed.like.create({repo:this.accountDid},{subject:{uri:R,cid:D},createdAt:new Date().toISOString(),via:q})}async deleteLike(R){this.assertAuthenticated();const D=new a.AtUri(R);return this.app.bsky.feed.like.delete({repo:D.hostname,rkey:D.rkey})}async repost(R,D,q){return this.app.bsky.feed.repost.create({repo:this.accountDid},{subject:{uri:R,cid:D},createdAt:new Date().toISOString(),via:q})}async deleteRepost(R){this.assertAuthenticated();const D=new a.AtUri(R);return this.app.bsky.feed.repost.delete({repo:D.hostname,rkey:D.rkey})}async follow(R){return this.app.bsky.graph.follow.create({repo:this.accountDid},{subject:R,createdAt:new Date().toISOString()})}async deleteFollow(R){this.assertAuthenticated();const D=new a.AtUri(R);return this.app.bsky.graph.follow.delete({repo:D.hostname,rkey:D.rkey})}async upsertProfile(R){const D=async()=>{const q=this.assertDid,j="app.bsky.actor.profile",L=await this.com.atproto.repo.getRecord({repo:q,collection:j,rkey:"self"}).catch(ae=>{}),U=L&&w.isValidProfile(L.data.value)?L.data.value:void 0,W=await R(U),ee=p.AppBskyActorProfile.validateRecord({$type:j,...W});if(!ee.success)throw ee.error;await this.com.atproto.repo.putRecord({repo:q,collection:j,rkey:"self",record:ee.value,swapRecord:L?.data.cid||null})};return(0,l.retry)(D,{maxRetries:5,retryable:q=>q instanceof p.ComAtprotoRepoPutRecord.InvalidSwapError})}async mute(R){return this.app.bsky.graph.muteActor({actor:R})}async unmute(R){return this.app.bsky.graph.unmuteActor({actor:R})}async muteModList(R){return this.app.bsky.graph.muteActorList({list:R})}async unmuteModList(R){return this.app.bsky.graph.unmuteActorList({list:R})}async blockModList(R){return this.app.bsky.graph.listblock.create({repo:this.accountDid},{subject:R,createdAt:new Date().toISOString()})}async unblockModList(R){const D=this.accountDid,j=(await this.app.bsky.graph.getList({list:R,limit:1})).data.list.viewer?.blocked;if(j){const{rkey:L}=new a.AtUri(j);return this.app.bsky.graph.listblock.delete({repo:D,rkey:L})}}async updateSeenNotifications(R=new Date().toISOString()){return this.app.bsky.notification.updateSeen({seenAt:R})}async getPreferences(){const R={feeds:{saved:void 0,pinned:void 0},savedFeeds:void 0,feedViewPrefs:{home:{...k}},threadViewPrefs:{...A},moderationPrefs:{adultContentEnabled:!1,labels:{...m.DEFAULT_LABEL_SETTINGS},labelers:this.appLabelers.map(j=>({did:j,labels:{}})),mutedWords:[],hiddenPosts:[]},birthDate:void 0,interests:{tags:[]},bskyAppState:{queuedNudges:[],activeProgressGuide:void 0,nuxs:[]},postInteractionSettings:{threadgateAllowRules:void 0,postgateEmbeddingRules:void 0},verificationPrefs:{hideBadges:!1}},D=await this.app.bsky.actor.getPreferences({}),q=[];for(const j of D.data.preferences)if(w.isValidAdultContentPref(j))R.moderationPrefs.adultContentEnabled=j.enabled;else if(w.isValidContentLabelPref(j)){const L=E(j);q.push(L)}else if(w.isValidLabelersPref(j))R.moderationPrefs.labelers=this.appLabelers.map(L=>({did:L,labels:{}})).concat(j.labelers.map(L=>({...L,labels:{}})));else if(w.isValidSavedFeedsPrefV2(j))R.savedFeeds=j.items;else if(w.isValidSavedFeedsPref(j))R.feeds.saved=j.saved,R.feeds.pinned=j.pinned;else if(w.isValidPersonalDetailsPref(j))j.birthDate&&(R.birthDate=new Date(j.birthDate));else if(w.isValidFeedViewPref(j)){const{$type:L,feed:U,...W}=j;R.feedViewPrefs[U]={...k,...W}}else if(w.isValidThreadViewPref(j)){const{$type:L,...U}=j;R.threadViewPrefs={...R.threadViewPrefs,...U}}else if(w.isValidInterestsPref(j)){const{$type:L,...U}=j;R.interests={...R.interests,...U}}else w.isValidMutedWordsPref(j)?(R.moderationPrefs.mutedWords=j.items,R.moderationPrefs.mutedWords.length&&(R.moderationPrefs.mutedWords=R.moderationPrefs.mutedWords.map(L=>(L.actorTarget=L.actorTarget||"all",L)))):w.isValidHiddenPostsPref(j)?R.moderationPrefs.hiddenPosts=j.items:w.isValidBskyAppStatePref(j)?(R.bskyAppState.queuedNudges=j.queuedNudges||[],R.bskyAppState.activeProgressGuide=j.activeProgressGuide,R.bskyAppState.nuxs=j.nuxs||[]):w.isValidPostInteractionSettingsPref(j)?(R.postInteractionSettings.threadgateAllowRules=j.threadgateAllowRules,R.postInteractionSettings.postgateEmbeddingRules=j.postgateEmbeddingRules):w.isValidVerificationPrefs(j)&&(R.verificationPrefs={hideBadges:j.hideBadges});if(R.savedFeeds==null){const{saved:j,pinned:L}=R.feeds;if(j&&L){const U=new Map;U.set("timeline",{id:l.TID.nextStr(),type:"timeline",value:"following",pinned:!0});for(const W of L){const ee=(0,v.getSavedFeedType)(W);ee!=="unknown"&&U.set(W,{id:l.TID.nextStr(),type:ee,value:W,pinned:!0})}for(const W of j)if(!U.has(W)){const ee=(0,v.getSavedFeedType)(W);if(ee==="unknown")continue;U.set(W,{id:l.TID.nextStr(),type:ee,value:W,pinned:!1}
4)}R.savedFeeds=Array.from(U.values())}else R.savedFeeds=[{id:l.TID.nextStr(),type:"timeline",value:"following",pinned:!0}];await this.overwriteSavedFeeds(R.savedFeeds)}for(const j of q)if(j.labelerDid){const L=R.moderationPrefs.labelers.find(U=>U.did===j.labelerDid);if(!L)continue;L.labels[j.label]=j.visibility}else R.moderationPrefs.labels[j.label]=j.visibility;return R.moderationPrefs.labels=_(R.moderationPrefs.labels),this.configureLabelers(C(D.data.preferences)),R}async overwriteSavedFeeds(R){R.forEach(v.validateSavedFeed);const D=new Map;return R.forEach(q=>{D.has(q.id)&&D.delete(q.id),D.set(q.id,q)}),this.updateSavedFeedsV2Preferences(()=>Array.from(D.values()))}async updateSavedFeeds(R){return R.map(v.validateSavedFeed),this.updateSavedFeedsV2Preferences(D=>D.map(q=>{const j=R.find(L=>q.id===L.id);return j?{...q,pinned:j.pinned}:q}))}async addSavedFeeds(R){const D=R.map(q=>({...q,id:l.TID.nextStr()}));return D.forEach(v.validateSavedFeed),this.updateSavedFeedsV2Preferences(q=>[...q,...D])}async removeSavedFeeds(R){return this.updateSavedFeedsV2Preferences(D=>[...D.filter(q=>!R.find(j=>q.id===j))])}async setSavedFeeds(R,D){return this.updateFeedPreferences(()=>({saved:R,pinned:D}))}async addSavedFeed(R){return this.updateFeedPreferences((D,q)=>({saved:[...D.filter(j=>j!==R),R],pinned:q}))}async removeSavedFeed(R){return this.updateFeedPreferences((D,q)=>({saved:D.filter(j=>j!==R),pinned:q.filter(j=>j!==R)}))}async addPinnedFeed(R){return this.updateFeedPreferences((D,q)=>({saved:[...D.filter(j=>j!==R),R],pinned:[...q.filter(j=>j!==R),R]}))}async removePinnedFeed(R){return this.updateFeedPreferences((D,q)=>({saved:D,pinned:q.filter(j=>j!==R)}))}async setAdultContentEnabled(R){await this.updatePreferences(D=>{const q=D.findLast(w.isValidAdultContentPref)||{$type:"app.bsky.actor.defs#adultContentPref",enabled:R};return q.enabled=R,D.filter(j=>!p.AppBskyActorDefs.isAdultContentPref(j)).concat(q)})}async setContentLabelPref(R,D,q){q&&(0,a.ensureValidDid)(q),await this.updatePreferences(j=>{const L=j.filter(w.isValidContentLabelPref).findLast(W=>W.label===R&&W.labelerDid===q)||{$type:"app.bsky.actor.defs#contentLabelPref",label:R,labelerDid:q,visibility:D};L.visibility=D;let U;if(p.AppBskyActorDefs.isContentLabelPref(L)&&!L.labelerDid){const W={"graphic-media":"gore",porn:"nsfw",sexual:"suggestive",__proto__:null}[L.label];W&&(U=j.filter(w.isValidContentLabelPref).findLast(ee=>ee.label===W&&ee.labelerDid===void 0)||{$type:"app.bsky.actor.defs#contentLabelPref",label:W,labelerDid:void 0,visibility:D},U.visibility=D)}return j.filter(W=>!p.AppBskyActorDefs.isContentLabelPref(W)||!(W.label===R&&W.labelerDid===q)).concat(L).filter(W=>U?!p.AppBskyActorDefs.isContentLabelPref(W)||!(W.label===U.label&&W.labelerDid===void 0):!0).concat(U?[U]:[])})}async addLabeler(R){const D=await this.updatePreferences(q=>{const j=q.findLast(w.isValidLabelersPref)||{$type:"app.bsky.actor.defs#labelersPref",labelers:[]};return j.labelers.some(L=>L.did===R)||j.labelers.push({did:R}),q.filter(L=>!p.AppBskyActorDefs.isLabelersPref(L)).concat(j)});this.configureLabelers(C(D))}async removeLabeler(R){const D=await this.updatePreferences(q=>{const j=q.findLast(w.isValidLabelersPref)||{$type:"app.bsky.actor.defs#labelersPref",labelers:[]};return j.labelers=j.labelers.filter(L=>L.did!==R),q.filter(L=>!p.AppBskyActorDefs.isLabelersPref(L)).concat(j)});this.configureLabelers(C(D))}async setPersonalDetails({birthDate:R}){await this.updatePreferences(D=>{const q=D.findLast(w.isValidPersonalDetailsPref)||{$type:"app.bsky.actor.defs#personalDetailsPref"};return q.birthDate=R instanceof Date?R.toISOString():R,D.filter(j=>!p.AppBskyActorDefs.isPersonalDetailsPref(j)).concat(q)})}async setFeedViewPrefs(R,D){await this.updatePreferences(q=>{const j=q.filter(w.isValidFeedViewPref).findLast(L=>L.feed===R);return q.filter(L=>!p.AppBskyActorDefs.isFeedViewPref(L)||L.feed!==R).concat({...j,...D,$type:"app.bsky.actor.defs#feedViewPref",feed:R})})}async setThreadViewPrefs(R){await this.updatePreferences(D=>{const q=D.findLast(w.isValidThreadViewPref);return D.filter(j=>!p.AppBskyActorDefs.isThreadViewPref(j)).concat({...q,...R,$type:"app.bsky.actor.defs#threadViewPref"})})}
4async setInterestsPref(R){await this.updatePreferences(D=>{const q=D.findLast(w.isValidInterestsPref);return D.filter(j=>!p.AppBskyActorDefs.isInterestsPref(j)).concat({...q,...R,$type:"app.bsky.actor.defs#interestsPref"})})}async addMutedWord(R){const D=(0,v.sanitizeMutedWordValue)(R.value);D&&await this.updatePreferences(q=>{let j=q.findLast(w.isValidMutedWordsPref);const L={id:l.TID.nextStr(),value:D,targets:R.targets||[],actorTarget:R.actorTarget||"all",expiresAt:R.expiresAt||void 0};return j?(j.items.push(L),j.items=I(j.items)):j={$type:"app.bsky.actor.defs#mutedWordsPref",items:[L]},q.filter(U=>!p.AppBskyActorDefs.isMutedWordsPref(U)).concat(j)})}async addMutedWords(R){await Promise.all(R.map(D=>this.addMutedWord(D)))}async upsertMutedWords(R){await this.addMutedWords(R)}async updateMutedWord(R){await this.updatePreferences(D=>{const q=D.findLast(w.isValidMutedWordsPref);return q?(q.items=q.items.map(j=>{if(z(j,R)){const U={...j,...R};return{id:j.id||l.TID.nextStr(),value:(0,v.sanitizeMutedWordValue)(U.value)||j.value,targets:U.targets||[],actorTarget:U.actorTarget||"all",expiresAt:U.expiresAt||void 0}}else return j}),q.items=I(q.items),D.filter(j=>!p.AppBskyActorDefs.isMutedWordsPref(j)).concat(q)):D})}async removeMutedWord(R){await this.updatePreferences(D=>{const q=D.findLast(w.isValidMutedWordsPref);if(q){for(let j=0;j<q.items.length;j++)if(z(q.items[j],R)){q.items.splice(j,1);break}return q.items=I(q.items),D.filter(j=>!p.AppBskyActorDefs.isMutedWordsPref(j)).concat(q)}return D})}async removeMutedWords(R){await Promise.all(R.map(D=>this.removeMutedWord(D)))}async hidePost(R){await this.updateHiddenPost(R,"hide")}async unhidePost(R){await this.updateHiddenPost(R,"unhide")}async bskyAppQueueNudges(R){await this.updatePreferences(D=>{const q=D.findLast(w.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return q.queuedNudges=(q.queuedNudges||[]).concat(R),D.filter(j=>!p.AppBskyActorDefs.isBskyAppStatePref(j)).concat(q)})}async bskyAppDismissNudges(R){await this.updatePreferences(D=>{const q=D.findLast(w.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return R=Array.isArray(R)?R:[R],q.queuedNudges=(q.queuedNudges||[]).filter(j=>!R.includes(j)),D.filter(j=>!p.AppBskyActorDefs.isBskyAppStatePref(j)).concat(q)})}async bskyAppSetActiveProgressGuide(R){if(R){const D=p.AppBskyActorDefs.validateBskyAppProgressGuide(R);if(!D.success)throw D.error}await this.updatePreferences(D=>{const q=D.findLast(w.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return q.activeProgressGuide=R,D.filter(j=>!p.AppBskyActorDefs.isBskyAppStatePref(j)).concat(q)})}async bskyAppUpsertNux(R){(0,v.validateNux)(R),await this.updatePreferences(D=>{const q=D.findLast(w.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};q.nuxs=q.nuxs||[];const j=q.nuxs?.find(U=>U.id===R.id);let L;return j?L={id:j.id,completed:R.completed,data:R.data,expiresAt:R.expiresAt}:L=R,q.nuxs=q.nuxs.filter(U=>U.id!==R.id).concat(L),D.filter(U=>!p.AppBskyActorDefs.isBskyAppStatePref(U)).concat(q)})}async bskyAppRemoveNuxs(R){await this.updatePreferences(D=>{const q=D.findLast(w.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return q.nuxs=(q.nuxs||[]).filter(j=>!R.includes(j.id)),D.filter(j=>!p.AppBskyActorDefs.isBskyAppStatePref(j)).concat(q)})}async setPostInteractionSettings(R){const D=p.AppBskyActorDefs.validatePostInteractionSettingsPref(R);if(!D.success)throw D.error;await this.updatePreferences(q=>{const j=q.findLast(w.isValidPostInteractionSettingsPref)||{$type:"app.bsky.actor.defs#postInteractionSettingsPref"};return j.threadgateAllowRules=R.threadgateAllowRules,j.postgateEmbeddingRules=R.postgateEmbeddingRules,q.filter(L=>!p.AppBskyActorDefs.isPostInteractionSettingsPref(L)).concat(j)})}async setVerificationPrefs(R){const D=p.AppBskyActorDefs.validateVerificationPrefs(R);if(!D.success)throw D.error;await this.updatePreferences(q=>{const j=q.findLast(w.isValidVerificationPrefs)||{$type:"app.bsky.actor.defs#verificationPrefs",hideBadges:!1};return j.hideBadges=R.hideBadges,q.filter(L=>!p.AppBskyActorDefs.isVerificationPrefs(L)).concat(j)})}async updatePreferences(R){try{await t(this,n,"f").acquireAsync();const D=await this.app.bsky.actor.getPreferences({}),q=R(D.data.preferences);return q===!1?D.data.preferences:(await this.app.bsky.actor.putPreferences({preferences:q}),q)}finally{t(this,n,"f").release()}}async updateHiddenPost(R,D){await this.updatePreferences(q=>{const j=q.findLast(w.isValidHiddenPostsPref)||{$type:"app.bsky.actor.defs#hiddenPostsPref",items:[]},L=new Set(j.items);return D==="hide"?L.add(R):L.delete(R),j.items=[...L],q.filter(U=>!p.AppBskyActorDefs.isHiddenPostsPref(U)).concat(j)})}async updateFeedPreferences(R){let D;return await this.updatePreferences(q=>{const j=q.findLast(w.isValidSavedFeedsPref)||{$type:"app.bsky.actor.defs#savedFeedsPref",saved:[],pinned:[]};return D=R(j.saved,j.pinned),j.saved=D.saved,j.pinned=D.pinned,q.filter(L=>!p.AppBskyActorDefs.isSavedFeedsPref(L)).concat(j)}),D}async updateSavedFeedsV2Preferences(R){let D=[];return await this.updatePreferences(q=>{const j=q.findLast(w.isValidSavedFeedsPrefV2)||{$type:"app.bsky.actor.defs#savedFeedsPrefV2",items:[]},L=R(j.items);j.items=[...L].sort((ee,ae)=>ee.pinned===ae.pinned?0:ee.pinned?-1:1),D=L;let U=q.filter(ee=>!p.AppBskyActorDefs.isSavedFeedsPrefV2(ee)).concat(j),W=q.findLast(w.isValidSavedFeedsPref);
4if(W){const{saved:ee,pinned:ae}=W,de=(0,v.savedFeedsToUriArrays)(j.items.filter(ce=>["feed","list"].includes(ce.type)));W={...W,saved:Array.from(new Set([...ee,...de.saved])),pinned:Array.from(new Set([...ae,...de.pinned]))},U=U.filter(ce=>!p.AppBskyActorDefs.isSavedFeedsPref(ce)).concat(W)}return U}),D}}dt.Agent=S,n=new WeakMap,Object.defineProperty(S,"appLabelers",{enumerable:!0,configurable:!0,writable:!0,value:[h.BSKY_LABELER_DID]});function E(N){let R=N.visibility;return R==="show"&&(R="ignore"),{...N,visibility:R}}function _(N){const R={...N},D={gore:"graphic-media",nsfw:"porn",suggestive:"sexual"};for(const q in R){const j=D[q];j&&(R[j]=R[q])}return R}function C(N){const R=N.findLast(w.isValidLabelersPref);let D=[];return R&&(D=R.labelers.map(q=>q.did)),D}function O(N){return N&&typeof N=="object"&&"moderationPrefs"in N&&V(N.moderationPrefs)}function V(N){return N&&typeof N=="object"&&"labelers"in N}function I(N){return N.map(R=>({...R,id:R.id||l.TID.nextStr()}))}function z(N,R){const D=N.id,q=D&&D===R.id,j=!D&&N.value===R.value;return q||j}return dt}var ti={},W1;function Vd(){if(W1)return ti;W1=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.CredentialSession=ti.AtpAgent=void 0;const o=Yr(),e=ne(),r=hx(),t=Do(),i=P(),n=globalThis.ReadableStream;class s extends r.Agent{constructor(m){const w=m instanceof l?m:new l(new URL(m.service),m.fetch,m.persistSession);if(super(w),Object.defineProperty(this,"sessionManager",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.sessionManager=w,!(m instanceof l)&&m.headers)for(const[x,v]of m.headers)this.setHeader(x,v)}clone(){return this.copyInto(new s(this.sessionManager))}get session(){return this.sessionManager.session}get hasSession(){return this.sessionManager.hasSession}get did(){return this.sessionManager.did}get serviceUrl(){return this.sessionManager.serviceUrl}get pdsUrl(){return this.sessionManager.pdsUrl}get dispatchUrl(){return this.sessionManager.dispatchUrl}get service(){return this.serviceUrl}get persistSession(){throw new Error('Cannot set persistSession directly. "persistSession" is defined through the constructor and will be invoked automatically when session data changes.')}set persistSession(m){throw new Error('Cannot set persistSession directly. "persistSession" must be defined in the constructor and can no longer be changed.')}getServiceUrl(){return this.serviceUrl}async resumeSession(m){return this.sessionManager.resumeSession(m)}async createAccount(m,w){return this.sessionManager.createAccount(m,w)}async login(m){return this.sessionManager.login(m)}async logout(){return this.sessionManager.logout()}}ti.AtpAgent=s;class l{constructor(m,w=globalThis.fetch,x){Object.defineProperty(this,"serviceUrl",{enumerable:!0,configurable:!0,writable:!0,value:m}),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:w}),Object.defineProperty(this,"persistSession",{enumerable:!0,configurable:!0,writable:!0,value:x}),Object.defineProperty(this,"pdsUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"session",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"refreshSessionPromise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"server",{enumerable:!0,configurable:!0,writable:!0,value:new t.ComAtprotoServerNS(new e.XrpcClient((v,k)=>(0,this.fetch)(new URL(v,this.serviceUrl),k),i.schemas))})}get did(){return this.session?.did}get dispatchUrl(){return this.pdsUrl||this.serviceUrl}get hasSession(){return!!this.session}setFetch(m=globalThis.fetch){this.fetch=m}async fetchHandler(m,w){await this.refreshSessionPromise;const x=new URL(m,this.dispatchUrl),v=new Request(x,w),k=this.session?.accessJwt;if(!k||v.headers.has("authorization"))return(0,this.fetch)(v);v.headers.set("authorization",`Bearer ${k}`);const A=await(0,this.fetch)(v);if(!this.session?.refreshJwt||!await d(A,[400],["ExpiredToken"]))return A;try{await this.refreshSession()}catch{return A}if(w?.signal?.aborted||n&&w?.body instanceof n)return A;const E=this.session?.accessJwt;if(!E||E===k)return A;await A.body?.cancel();
4const _=new URL(m,this.dispatchUrl),C=new Request(_,w);return C.headers.set("authorization",`Bearer ${E}`),await(0,this.fetch)(C)}async createAccount(m,w){try{const x=await this.server.createAccount(m,w);return this.session={accessJwt:x.data.accessJwt,refreshJwt:x.data.refreshJwt,handle:x.data.handle,did:x.data.did,email:m.email,emailConfirmed:!1,emailAuthFactor:!1,active:!0},this.persistSession?.("create",this.session),this._updateApiEndpoint(x.data.didDoc),x}catch(x){throw this.session=void 0,this.persistSession?.("create-failed",void 0),x}}async login(m){try{const w=await this.server.createSession({identifier:m.identifier,password:m.password,authFactorToken:m.authFactorToken,allowTakendown:m.allowTakendown});return this.session={accessJwt:w.data.accessJwt,refreshJwt:w.data.refreshJwt,handle:w.data.handle,did:w.data.did,email:w.data.email,emailConfirmed:w.data.emailConfirmed,emailAuthFactor:w.data.emailAuthFactor,active:w.data.active??!0,status:w.data.status},this._updateApiEndpoint(w.data.didDoc),this.persistSession?.("create",this.session),w}catch(w){throw this.session=void 0,this.persistSession?.("create-failed",void 0),w}}async logout(){if(this.session)try{await this.server.deleteSession(void 0,{headers:{authorization:`Bearer ${this.session.refreshJwt}`}})}catch{}finally{this.session=void 0,this.persistSession?.("expired",void 0)}}async resumeSession(m){this.session=m;try{const w=await this.server.getSession(void 0,{headers:{authorization:`Bearer ${m.accessJwt}`}}
4).catch(async x=>{if(x instanceof e.XRPCError&&["ExpiredToken","InvalidToken"].includes(x.error)&&m.refreshJwt)try{const v=await this.server.refreshSession(void 0,{headers:{authorization:`Bearer ${m.refreshJwt}`}});return m.accessJwt=v.data.accessJwt,m.refreshJwt=v.data.refreshJwt,this.server.getSession(void 0,{headers:{authorization:`Bearer ${m.accessJwt}`}})}catch{}throw x});if(w.data.did!==m.did)throw new e.XRPCError(e.ResponseType.InvalidRequest,"Invalid session","InvalidDID");return m.email=w.data.email,m.handle=w.data.handle,m.emailConfirmed=w.data.emailConfirmed,m.emailAuthFactor=w.data.emailAuthFactor,m.active=w.data.active??!0,m.status=w.data.status,this.session===m&&(this._updateApiEndpoint(w.data.didDoc),this.persistSession?.("update",m)),w}catch(w){throw this.session===m&&(w instanceof e.XRPCError&&["ExpiredToken","InvalidToken"].includes(w.error)?(this.session=void 0,this.persistSession?.("expired",void 0)):(this.session=m,this.persistSession?.("network-error",m))),w}}async refreshSession(){return this.refreshSessionPromise||(this.refreshSessionPromise=this._refreshSessionInner().finally(()=>{this.refreshSessionPromise=void 0}))}async _refreshSessionInner(){if(this.session?.refreshJwt)try{const m=await this.server.refreshSession(void 0,{headers:{authorization:`Bearer ${this.session.refreshJwt}`}});this.session={...this.session,accessJwt:m.data.accessJwt,refreshJwt:m.data.refreshJwt,handle:m.data.handle,did:m.data.did},this._updateApiEndpoint(m.data.didDoc),this.persistSession?.("update",this.session)}catch(m){m instanceof e.XRPCError&&m.error&&["ExpiredToken","InvalidToken"].includes(m.error)&&(this.session=void 0,this.persistSession?.("expired",void 0))}}_updateApiEndpoint(m){if((0,o.isValidDidDoc)(m)){const w=(0,o.getPdsEndpoint)(m);this.pdsUrl=w?new URL(w):void 0}else this.pdsUrl=void 0}}ti.CredentialSession=l;function a(y){return e.errorResponseBody.safeParse(y).success}async function d(y,m,w){if(!m.includes(y.status))return!1;try{const x=await p(y,10240);return a(x)&&w.includes(x.error)}catch{return!1}}async function p(y,m=1/0){if(h(y)!=="application/json")throw new Error("Not JSON");if(u(y)>m)throw new Error("Response too large");return y.clone().json()}function u({headers:y}){return y.get("Content-Length")?Number(y.get("Content-Length")):NaN}function h({headers:y}){return y.get("Content-Type")?.split(";")[0]?.trim()}return ti}var Ls={},X1;function RC(){if(X1)return Ls;X1=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.BskyAgent=void 0;const o=Vd();class e extends o.AtpAgent{clone(){if(this.constructor===e){const t=new e(this.sessionManager);return this.copyInto(t)}throw new TypeError("Cannot clone a subclass of BskyAgent")}}return Ls.BskyAgent=e,Ls}var Q1;function _C(){return Q1||(Q1=1,(function(o){var e=Io&&Io.__createBinding||(Object.create?(function(x,v,k,A){A===void 0&&(A=k);var S=Object.getOwnPropertyDescriptor(v,k);(!S||("get"in S?!v.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return v[k]}}),Object.defineProperty(x,A,S)}):(function(x,v,k,A){A===void 0&&(A=k),x[A]=v[k]})),r=Io&&Io.__exportStar||function(x,v){for(var k in x)k!=="default"&&!Object.prototype.hasOwnProperty.call(v,k)&&e(v,x,k)};Object.defineProperty(o,"__esModule",{value:!0}),o.lexicons=o.default=o.BskyAgent=o.CredentialSession=o.AtpAgent=o.Agent=o.LABELS=o.DEFAULT_LABEL_SETTINGS=o.asPredicate=o.schemas=o.parseLanguage=o.stringifyLex=o.lexToJson=o.jsonToLex=o.jsonStringToLex=o.BlobRef=o.AtUri=void 0;const t=Vn(),i=P();var n=Wn();Object.defineProperty(o,"AtUri",{enumerable:!0,get:function(){return n.AtUri}});var s=Vn();Object.defineProperty(o,"BlobRef",{enumerable:!0,get:function(){return s.BlobRef}}),Object.defineProperty(o,"jsonStringToLex",{enumerable:!0,get:function(){return s.jsonStringToLex}}),Object.defineProperty(o,"jsonToLex",{enumerable:!0,get:function(){return s.jsonToLex}}),Object.defineProperty(o,"lexToJson",{enumerable:!0,get:function(){return s.lexToJson}}),Object.defineProperty(o,"stringifyLex",{enumerable:!0,get:function(){return s.stringifyLex}});var l=Yr();Object.defineProperty(o,"parseLanguage",{enumerable:!0,get:function(){return l.parseLanguage}}
4),r(ix(),o),r(nx(),o),r(sx(),o),r(Do(),o);var a=P();Object.defineProperty(o,"schemas",{enumerable:!0,get:function(){return a.schemas}});var d=T();Object.defineProperty(o,"asPredicate",{enumerable:!0,get:function(){return d.asPredicate}}),r(yC(),o),r(dx(),o),r(ju(),o),r(lx(),o),r(mx(),o),r(px(),o),r(kC(),o);var p=Eu();Object.defineProperty(o,"DEFAULT_LABEL_SETTINGS",{enumerable:!0,get:function(){return p.DEFAULT_LABEL_SETTINGS}}),Object.defineProperty(o,"LABELS",{enumerable:!0,get:function(){return p.LABELS}});var u=hx();Object.defineProperty(o,"Agent",{enumerable:!0,get:function(){return u.Agent}});var h=Vd();Object.defineProperty(o,"AtpAgent",{enumerable:!0,get:function(){return h.AtpAgent}});var y=Vd();Object.defineProperty(o,"CredentialSession",{enumerable:!0,get:function(){return y.CredentialSession}});var m=RC();Object.defineProperty(o,"BskyAgent",{enumerable:!0,get:function(){return m.BskyAgent}});var w=Vd();Object.defineProperty(o,"default",{enumerable:!0,get:function(){return w.AtpAgent}}),o.lexicons=new t.Lexicons(i.lexicons)})(Io)),Io}var jC=_C();/** 5 * @license lucide-react v0.545.0 - ISC 6 * 7 * This source code is licensed under the ISC license. 8 * See the LICENSE file in the root directory of this source tree. 9 */const EC=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],ou=ke("heart",EC);/** 10 * @license lucide-react v0.545.0 - ISC 11 * 12 * This source code is licensed under the ISC license. 13 * See the LICENSE file in the root directory of this source tree. 14 */const CC=[["path",{d:"m2 9 3-3 3 3",key:"1ltn5i"}],["path",{d:"M13 18H7a2 2 0 0 1-2-2V6",key:"1r6tfw"}],["path",{d:"m22 15-3 3-3-3",key:"4rnwn2"}],["path",{d:"M11 6h6a2 2 0 0 1 2 2v10",key:"2f72bc"}]],iu=ke("repeat-2",CC);/** 15 * @license lucide-react v0.545.0 - ISC 16 * 17 * This source code is licensed under the ISC license. 18 * See the LICENSE file in the root directory of this source tree. 19 */const PC=[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]],J1=ke("reply",PC),TC=24,ep=16;function It(o){return $n(o)}function zD(o){return o.type==="layout"}class FD extends rS{static type="layout";getDefaultProps(){return{index:"a1",placeholder:!0}}onAfterCreate({binding:e,updateArrows:r=!0}){e.props.placeholder||this.updateElementsForContainer(e,void 0,r)}onAfterChange({bindingAfter:e}){e.props.placeholder||this.updateElementsForContainer(e)}onAfterChangeFromShape({binding:e,shapeAfter:r}){if(e.props.placeholder)return;const t=this.editor.getShapeUtil(r),i="getMinWidth"in t&&typeof t.getMinWidth=="function"?t.getMinWidth(r):0,n="w"in r.props&&typeof r.props.w=="number"?Math.max(i,r.props.w):void 0;this.updateElementsForContainer(e,n)}onAfterDelete({binding:e}){this.updateElementsForContainer(e,void 0,!0)}updateElementsForContainer({props:{placeholder:e},fromId:r,toId:t},i,n){const s=this.editor.getShape(r);if(!s)return;const l=this.editor.getBindingsFromShape(s,"layout").sort((k,A)=>k.props.index>A.props.index?1:-1),a=br(s),d=a?[...l.filter(k=>{const A=this.editor.getShape(k.toId);return A&&It(A)}),...l.filter(k=>{const A=this.editor.getShape(k.toId);return A&&!It(A)})]:l,p=a?d.filter(k=>{const A=this.editor.getShape(k.toId);return A&&It(A)}).length:0,u=a&&p>0&&d.length>p?TC:0,h=s.props.padding.left+s.props.padding.right,y=oS(this.editor,s);let m=0,w=0;if(!s.props.isCollapsed)for(let k=0;k<d.length;k++){const A=d[k],S=a&&p>0&&k<p,E=new Fs(s.props.padding.left+(S?ep:0),s.props.padding.top+m+k*s.props.padding.gap+(a&&p>0&&k>=p?u:0));if(!A)continue;const _=this.editor.getShape(A.toId);if(m+=_?.props.h||0,S||(w=Math.max(w,_?.props.w||0)),t===A.toId&&e)continue;const C=this.editor.getShape(A.toId);if(!C)continue;const O=this.editor.getPointInParentSpace(C,this.editor.getShapePageTransform(s).applyToPoint(E)),V="minW"in C.props&&typeof C.props.minW=="number"?C.props.minW:0,I=S&&!A.props.placeholder?Math.max(V,(i??s.props.w)-h-2*ep):i&&!A.props.placeholder?Math.max(y,i-h):void 0;if(C.x!==O.x||C.y!==O.y||I!==void 0&&"w"in C.props&&C.props.w!==I){this.editor.updateShape({id:A.toId,type:C.type,x:O.x,y:O.y,props:I!==void 0?{...C.props,w:I}:void 0});const z=this.editor.getShapeUtil(C);n&&z&&z.translateAllArrowShapes(C,O.x-C.x,O.y-C.y,!0)}}const x=Math.max(y,e?s.props.w:i||Math.max(140,w+h)),v=s.props.isCollapsed?s.props.h:(s.props.isCollapsed?0:s.props.padding.top)+(m+Math.max(0,d.length-1)*s.props.padding.gap+u)+(s.props.isCollapsed?0:s.props.padding.bottom);if(x!==s.props.w||v!==s.props.h){this.editor.updateShape({id:s.id,type:s.type,props:{w:Math.max(y,x),h:v}});const k=this.editor.getBindingsToShape(s,"layout");for(const A of k)this.editor.getBindingUtil(A).onAfterCreate?.({binding:A})}}}function Id(o,e){const r=o.getBindingsFromShape(e,"layout"),t=[];for(;r.length>0;){const i=r.pop();if(!i)continue;const n=o.getShape(i.toId);
19n&&t.push(n),n&&(pp(n)||up(n)||$n(n)||Gn(n))&&r.push(...o.getBindingsFromShape(n,"layout"))}return t}/** 20 * @license lucide-react v0.545.0 - ISC 21 * 22 * This source code is licensed under the ISC license. 23 * See the LICENSE file in the root directory of this source tree. 24 */const qC=[["circle",{cx:"9",cy:"9",r:"7",key:"p2h5vp"}],["circle",{cx:"15",cy:"15",r:"7",key:"19ennj"}]],DC=ke("blend",qC);/** 25 * @license lucide-react v0.545.0 - ISC 26 * 27 * This source code is licensed under the ISC license. 28 * See the LICENSE file in the root directory of this source tree. 29 */const OC=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],IC=ke("history",OC);/** 30 * @license lucide-react v0.545.0 - ISC 31 * 32 * This source code is licensed under the ISC license. 33 * See the LICENSE file in the root directory of this source tree. 34 */const MC=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],yx=ke("trending-up",MC);/** 35 * @license lucide-react v0.545.0 - ISC 36 * 37 * This source code is licensed under the ISC license. 38 * See the LICENSE file in the root directory of this source tree. 39 */const NC=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],BC=ke("trophy",NC),Y1=[{key:"like_count_multiplier",label:"Like",default:3,min:0},{key:"reply_count_multiplier",label:"Reply",default:5,min:0},{key:"repost_count_multiplier",label:"Repost",default:3,min:0},{key:"decay_penalty",label:"Decay",hint:"How much recent activity matters. Low decay strongly favours recent posts; high decay considers older posts more equally.",default:1,min:0,step:.01},{key:"time_window",label:"Window (h)",hint:"How many hours back this layer looks.",default:2,min:.1,step:.1},{key:"reader_like_count_multiplier",label:"Reader like",hint:"When readers like a post, it is boosted in this layer.",default:3,min:0},{key:"reader_reply_count_multiplier",label:"Reader reply",hint:"When readers reply to a post, it is boosted in this layer.",default:5,min:0},{key:"reader_repost_count_multiplier",label:"Reader repost",hint:"When readers repost a post, it is boosted in this layer.",default:3,min:0},{key:"request_less_count_multiplier",label:"Request less",hint:"Readers can click 'Request less' on posts in your feed; this weighs that.",default:1},{key:"request_more_count_multiplier",label:"Request more",hint:"Readers can click 'Request more' on posts in your feed; this weighs that.",default:1}],VC=[{key:"gravity",label:"Gravity",hint:"Higher gravity: old posts lose rank faster. Lower: they stay relevant longer.",default:1.8,min:.1,step:.1},{key:"time_offset",label:"Time offset",hint:"Shifts the point from which a post's rank begins to decay, giving it more or less time at the top.",default:2,min:.1,step:.1}],LC=[{key:"wilson_confidence_z",label:"Confidence z",hint:"Z-score for the Wilson lower bound; 1.96 is 95% confidence.",default:1.96,min:.1,step:.01},{key:"time_window",label:"Window (h)",hint:"How many hours back this layer looks.",default:48,min:.1,step:.1},{key:"wilson_interaction_like_multiplier",label:"Like",default:1,min:0,step:.1},{key:"wilson_interaction_reply_multiplier",label:"Reply",default:2,min:0,step:.1},{key:"wilson_interaction_repost_multiplier",label:"Repost",default:1.5,min:0,step:.1},{key:"wilson_interaction_quote_multiplier",label:"Quote",default:1.5,min:0,step:.1},{key:"wilson_request_more_multiplier",label:"Request more",hint:"Weight of 'request more' (a positive signal).",default:2,step:.1},{key:"wilson_request_less_multiplier",label:"Request less",hint:"Weight of 'request less' (a negative signal).",default:-2,step:.1}],zC={new:[],old:[],trending:Y1,blend:Y1,hackernews:VC,wilson:LC},Cu=new Set(Object.values(zC).flatMap(o=>o.map(e=>e.key))),$D={new:Xw,trending:yx,blend:DC,old:IC,hackernews:BC,wilson:yR},FC=["follows","follows2","network","niche","popular","velocity","community","discover","expertise"],$C=[{value:"follows",label:"Prioritize people I follow",hint:"Puts authors you follow first. It only hides the rest when you follow enough of this feed's authors to still fill the page â on most feeds that means reordering, not filtering."},{value:"follows2",label:"Prioritize people my follows follow",hint:"Much wider. Ranks each author by how many of your follows reach them."},{value:"network",label:"Prioritize my network",hint:"Recommended. People you follow first, then who they follow, then everything else."},{value:"niche",label:"Prioritize my niche favorites",hint:"Accounts your network loves that the wider world hasn't found. Discovery-leaning."},{value:"popular",label:"Prioritize what's popular near me",hint:"Your wider network, tilted toward accounts everyone knows."},{value:"velocity",label:"What my network is discovering",hint:"Accounts people around you started following in the last week."},{value:"community",label:"Prioritize my communities",hint:"The social cluster
39s your follows belong to, beyond who you follow directly."},{value:"discover",label:"Discovery mix",hint:"Niche favorites and fresh finds first. Deliberately excludes people you already follow."},{value:"expertise",label:"Prioritize experts in this feed's world",hint:"People this feed's own authors follow most, boosted by your own network. Recency-weighted."}],gx=1,aa=["follows","follows2","niche","popular","velocity","community","domain"],Pu=6,ca=[{value:"follows",label:"People they follow",hint:"First degree. Strongest signal, but sparse on most feeds."},{value:"follows2",label:"People their follows follow",hint:"Second degree, weighted by how many of their follows reach each author."},{value:"niche",label:"Their niche favorites",hint:"Second degree discounted by global fame â nearby accounts the wider world hasn't found."},{value:"popular",label:"Popular near them",hint:"Second degree boosted by global fame â nearby and widely known."},{value:"velocity",label:"What their network is discovering",hint:"Reached through follows made in the last week."},{value:"community",label:"Their communities",hint:"Members of the clusters their follows concentrate in."},{value:"domain",label:"This feed's own authorities",hint:"Who this feed's recent authors collectively follow. The same for every reader â the one facet that isn't personal."}],GD=[{value:"max",label:"Strongest signal wins",hint:"Right when the facets are views of the same relationship â being reachable twice is that relationship counted twice."},{value:"sum",label:"Signals add up",hint:"Right when the facets are different facts about an account, where holding both really is stronger than either."}];function wp(o){if(typeof o!="object"||o===null)return!1;const e=o;return e.v===gx&&Array.isArray(e.blend)}function Tu(o){return typeof o=="string"?FC.includes(o)?o:void 0:ai(o)||xp(o)||wp(o)?o:void 0}function GC(o){const e=new Map;for(const r of o.blend){if(!aa.includes(r.facet)||!Number.isFinite(r.weight)||r.weight<0)continue;const t=Math.min(1,Math.max(0,r.weight)),i=e.get(r.facet);e.set(r.facet,i===void 0?t:Math.max(i,t))}return e.size===0||e.size>Pu?null:{v:gx,blend:[...e].map(([r,t])=>({facet:r,weight:t})),combine:o.combine,policy:o.policy}}function UD(o){if(ai(o))return QC(o);if(xp(o))return XC(o);if(!wp(o))return $C.find(i=>i.value===o)?.hint??"";const e=o.blend.map(i=>ca.find(n=>n.value===i.facet)?.label??i.facet).join(", "),r=o.combine==="sum"?"added together":"strongest wins",t=o.policy==="filter"?"trimmed to matches":"reordered only";return`Custom blend of ${e} â ${r}, ${t}.`}const Pn=2;function bx(o){return o!=="follows"}const vx=["strict","unfiltered"],wx=65534,xx=3,UC=16,HC=3;function xp(o){if(typeof o!="object"||o===null)return!1;const e=o;return e.v===xx&&"filter"in e}function si(o){return"facet"in o}function tp(o){return o?si(o)?[o]:("and"in o?o.and:o.or).flatMap(tp):[]}function kx(o){if(!o||si(o))return 0;const e="and"in o?o.and:o.or;return 1+Math.max(0,...e.map(kx))}function KC(o){return!o||si(o)?!0:"or"in o?!1:o.and.every(si)}function WC(o){if(!vx.includes(o.on_empty))return null;const e=o.filter===null?null:Sx(o.filter);if(o.filter!==null&&e===null||e&&tp(e).length>UC||e&&kx(e)>HC)return null;const t=qu({filters:[],boost:o.boost})?.boost??null;return o.boost&&!t||e===null&&t===null||new Set([...tp(e).map(n=>n.facet),...t?.blend.map(n=>n.facet)??[]]).size>Pu?null:{v:xx,filter:e,on_empty:o.on_empty,boost:t}}function Sx(o){if(si(o)){if(!aa.includes(o.facet))return null;const t={facet:o.facet};if(o.min!==void 0){if(!bx(o.facet)||!Number.isInteger(o.min)||o.min<1||o.min>wx)return null;t.min=o.min}return t}const e="and"in o?o.and:o.or;if(!Array.isArray(e)||e.length===0)return null;const r=[];for(const t of e){const i=Sx(t);if(i===null)return null;r.push(i)}return"and"in o?{and:r}:{or:r}}function Ax(o,e=!0){const r=l=>ca.find(a=>a.value===l)?.label.toLowerCase()??l;if(si(o)){const l=o.min===void 0?"":` reached by at least ${o.min} of the people they follow`;return`${r(o.facet)}${l}`}const t="and"in o?" and ":" or ",n=("and"in o?o.and:o.or).map(l=>
39Ax(l,!1)).filter(Boolean);if(n.length===0)return"";if(n.length===1)return n[0];const s=n.join(t);return e?s:`(${s})`}function XC(o){const e=[];if(o.filter){const r=o.on_empty==="strict"?"nothing is shown":"the feed is shown unfiltered";e.push(`Only posts from ${Ax(o.filter)}; when nothing matches, ${r}.`)}if(o.boost){const r=o.boost.blend.map(t=>ca.find(i=>i.value===t.facet)?.label??t.facet).join(", ");e.push(`Moves up posts from ${r.toLowerCase()}. ${Rx(o.boost.strength)}`)}return e.join(" ")}const HD=[{value:"strict",label:"Show nothing",hint:"The reader sees an empty feed. Honest, and what a private-audience feed means â but most readers share very few authors with any given feed, so expect this often."},{value:"unfiltered",label:"Show the feed unfiltered",hint:"Falls back to the whole feed rather than an empty one. Safer, at the cost of the filter not always applying."}];function ai(o){if(typeof o!="object"||o===null)return!1;const e=o;return e.v===Pn&&Array.isArray(e.filters)}function Rx(o,e=30){if(o<=0)return"At 0% the boost is off: the feed's own order is untouched.";const r=Math.round(o*100);if(o>=.5)return`At ${r}% the audience outweighs the feed's own order: it decides where posts sit on each ${e}-post page, never which posts are on it.`;const t=Math.floor((e-1)*o/(1-o));return`At ${r}% a post from the audience can climb up to about ${t} places on a ${e}-post page. Nothing is added or removed.`}function qu(o){const e=[];for(const i of o.filters){if(!aa.includes(i.facet)||!vx.includes(i.on_empty))continue;const n={facet:i.facet,on_empty:i.on_empty};i.min!==void 0&&bx(i.facet)&&Number.isInteger(i.min)&&i.min>=1&&i.min<=wx&&(n.min=i.min),e.push(n)}let r=null;if(o.boost){const i=new Map;for(const s of o.boost.blend){if(!aa.includes(s.facet)||!Number.isFinite(s.weight)||s.weight<0)continue;const l=Math.min(1,Math.max(0,s.weight)),a=i.get(s.facet);i.set(s.facet,a===void 0?l:Math.max(a,l))}const n=o.boost.strength;i.size>0&&Number.isFinite(n)&&(r={strength:Math.min(1,Math.max(0,n)),combine:o.boost.combine,blend:[...i].map(([s,l])=>({facet:s,weight:l}))})}return e.length===0&&r===null||new Set([...e.map(i=>i.facet),...r?.blend.map(i=>i.facet)??[]]).size>Pu?null:{v:Pn,filters:e,boost:r}}function QC(o){const e=[];for(const r of o.filters){const t=ca.find(s=>s.value===r.facet)?.label??r.facet,i=r.min===void 0?"":` reached by at least ${r.min} of the people they follow`,n=r.on_empty==="strict"?"nothing is shown":"the feed is shown unfiltered";e.push(`Only posts from ${t.toLowerCase()}${i}; when nothing matches, ${n}.`)}if(o.boost){const r=o.boost.blend.map(t=>ca.find(i=>i.value===t.facet)?.label??t.facet).join(", ");e.push(`Moves up posts from ${r.toLowerCase()}. ${Rx(o.boost.strength)}`)}return e.join(" ")}const JC=[{id:"network",label:"Their network",hint:"People they follow first, then who those people follow.",plan:{v:Pn,filters:[],boost:{strength:1,combine:"max",blend:[{facet:"follows",weight:1},{facet:"follows2",weight:.5}]}}},{id:"discover",label:"Discovery",hint:"Niche favourites and fresh finds first. Leaves out people they already follow.",plan:{v:Pn,filters:[],boost:{strength:1,combine:"max",blend:[{facet:"niche",weight:1},{facet:"velocity",weight:.9},{facet:"follows2",weight:.4}]}}},{id:"expertise",label:"This feed's authorities",hint:"Who this feed's own authors follow, lifted by the reader's network.",plan:{v:Pn,filters:[],boost:{strength:1,combine:"sum",blend:[{facet:"domain",weight:1},{facet:"follows",weight:.5},{facet:"follows2",weight:.25}]}}}];function KD(o){if(ai(o)||xp(o))return o;if(wp(o))return qu({filters:[],boost:{strength:1,combine:o.combine,blend:o.blend}});const e=JC.find(r=>r.id===o);return e?e.plan:aa.includes(o)?{v:Pn,filters:[],boost:{strength:1,combine:"max",blend:[{facet:o,weight:1}]}}:null}const la=["new","old","hackernews","trending","wilson","blend"],ri={new:"New",trending:"Trending",blend:"Blend",old:"Old",hackernews:"Best Of",wilson:"Wilson Trending"},WD=["new","trending","blend","old","hackernews","wilson"].map(o=>({value:o,label:ri[o]})),rp=10,En=0;function YC(o,e){if(!Array.isArray(o)||o.length<1||o.length>rp)return;const r=[];for(const t of o){if(typeof t!="object"||t===null)return;const i=t,n=i.share;if(typeof n!="number"||!Number.isFinite(n)||n<0)return;const s=i.sort_order===void 0?e:i.sort_order;
39if(typeof s!="string"||!la.includes(s))return;const l=Tu(i.lens);r.push({..._x(i),share:n,sort_order:s,...l?{lens:l}:{}})}return r}function _x(o){const e={};for(const[r,t]of Object.entries(o))r==="share"||r==="sort_order"||r==="lens"||(e[r]=t);return e}function nu(o){return o==="personalized"||o==="foryou"}function su(o){return Math.round(o*1e6)/1e6}function Du(o){if(o.length<1||o.length>rp)return null;const e=o.reduce((t,i)=>t+(i.share>0?i.share:0),0);if(e<=0)return null;const r=[];for(const t of o){if(!(t.share>=0)||!la.includes(t.sort_order))return null;const i=su(t.share/e);if(o.length>1&&i<En)return null;const n=t.lens&&wp(t.lens)?GC(t.lens):t.lens;r.push({..._x(t),share:i,sort_order:t.sort_order,...n?{lens:n}:{}})}return r}function ZC(o,e,r){const t=o.map(n=>n>0?n:0),i=t.map(()=>!1);for(let n=0;n<=t.length;n++){const s=t.map((u,h)=>h).filter(u=>!i[u]);if(s.length===0)break;const l=t.reduce((u,h,y)=>u+(i[y]?h:0),0),a=e-l,d=s.reduce((u,h)=>u+(t[h]??0),0);let p=!1;for(const u of s){const h=d>0?(t[u]??0)/d:1/s.length,y=a*h;y<r?(t[u]=r,i[u]=!0,p=!0):t[u]=y}if(!p)break}return t}function eP(o,e,r){const t=o.length-1;if(o.length<2||e<0||e>=o.length)return o;const i=1-En*t;if(i<En)return o;const n=Math.min(Math.max(Number.isFinite(r)?r:0,En),i),s=ZC(o.filter((a,d)=>d!==e).map(a=>a.share),1-n,En);let l=0;return o.map((a,d)=>({...a,share:su(d===e?n:s[l++]??En)}))}function tP(){const o="0123456789abcdefghijklmnopqrstuvwxyz",e=new Uint8Array(6);return crypto.getRandomValues(e),Array.from(e,r=>o[r%o.length]).join("")}function XD(o){if(!Array.isArray(o)||o.length===0||!o.every(r=>r&&typeof r=="object"&&typeof r.share=="number"))return null;const e=o;if(e.length>rp)return`A page can have at most ${rp} layers; this one has ${e.length}.`;if(e.some(r=>!(r.share>=0)))return"A layer's share of the page cannot be negative.";if(e.reduce((r,t)=>r+t.share,0)<=0)return"Every layer is at 0%. Give at least one layer a share of the page.";for(let r=0;r<e.length;r++){const t=rP(e,r);if(t!==null)return`Layer ${r+1} is the same as layer ${t+1}: same ordering, same settings, same audience. Change one of them or remove it â the feed would serve without any layers otherwise.`}return null}function rP(o,e){const r=i=>JSON.stringify([i.sort_order,Object.fromEntries(Object.entries(i).filter(([n])=>n!=="share"&&n!=="id"&&n!=="sort_order").sort(([n],[s])=>n.localeCompare(s)))]),t=r(o[e]);for(let i=0;i<e;i++)if(r(o[i])===t)return i;return null}const oP=new Set(["share","sort_order","id","gym","lens","thresholds"]),QD=540,JD=320;function op(o,e){return e?o.getShapePageBounds(e)?.y??e.y:0}function jx(o){const e=o.getShape(Ot);return e&&br(e)?e:void 0}function Oo(o){const e=jx(o);return e?o.getBindingsFromShape(e,"layout").map(r=>o.getShape(r.toId)).filter(r=>!!r&&$n(r)).sort((r,t)=>op(o,r)-op(o,t)):[]}function Ln(o,e){return o.getBindingsFromShape(e,"layout").map(r=>o.getShape(r.toId)).filter(r=>!!r).sort((r,t)=>op(o,r)-op(o,t))}function YD(o,e){if(!e||!o.getShape(e.id))return;const r=o.getBindingsToShape(e,"layout")[0];if(!r)return;const t=o.getShape(r.fromId);return t&&$n(t)?t:void 0}function ZD(o,e){if(!e||!o.getShape(e.id))return;let r=e;for(let t=0;r&&t<32;t++){const i=o.getBindingsToShape(r,"layout")[0];if(!i)return;const n=o.getShape(i.fromId);if(!n)return;if($n(n))return n;if(!Gn(n))return;r=n}}function eO(o,e){const r=o.getBindingsToShape(e,"layout")[0];if(!r)return!1;const t=o.getShape(r.fromId);return!!(t&&br(t))}function tO(o,e){let r=0,t=e;for(let i=0;t&&Gn(t)&&i<32;i++){r++;const n=o.getBindingsToShape(t,"layout")[0];if(!n)break;t=o.getShape(n.fromId)}return r}function Ex(o,e){const r=[];for(const t of Ln(o,e))Sw(t)?r.push(t):Gn(t)&&r.push(...Ex(o,t));return r}function rO(o,e,r){const t=new Set;for(const i of Ex(o,e))i.id!==r&&t.add(i.props.facet);for(const i of Ln(o,e))i.id!==r&&kw(i)&&t.add(i.props.facet);return t}function iP(o,e){const r=Cx(o,e);return r.length===0?null:r.length===1?r[0]:{and:r}}function Cx(o,e){const r=[];for(const t of Ln(o,e))if(Sw(t))r.push({facet:t.props.facet,...t.props.min!==void 0?{min:t.props.min}:{}});else if(Gn(t)){const i=Cx(o,t);i.length>0&&r.push(t.props.type==="and"?{and:i}:{or:i})}return r}function nP(o,e){const r=iP(o,e),t=Ln(o,e).filter(kw).map(n=>({facet:n.props.facet,weight:n.props.weight}));if(!r&&t.length===0)return Tu(e.props.legacyLens)??void 0;const i=t.length?{strength:e.props.boostStrength,combine:e.props.boostCombine,blend:t}:null;return KC(r)?qu({filters:tp(r).map(n=>({facet:n.facet,on_empty:e.props.onEmpty??"unfiltered",...n.min!==void 0?{min:n.min}:{}})),boost:i})??void 0:WC({filter:r,on_empty:e.props.onEmpty??"unfiltered",boost:i})??void 0}function ip(o){const e={};for(const[r,t]of Object.entries(o.props.settings))Cu.has(r)&&typeof t=="number"&&Number.isFinite(t)&&(e[r]=t);return e}function kp(o){return o?!!(o.AND?.length||o.OR?.length):!1}function sP(o,e){const t=Oo(o).filter(i=>!i.props.gym&&i.id!==e.id).reduce((i,n)=>!i||n.props.share>i.props.share?n:i,void 0);return t?{sort_order:t.props.sort_order,settings:ip(t)}:{sort_order:e.props.sort_order,settings:ip(e)}}function Sp(o,e){const r=nP(o,e),t=e.props.gym?sP(o,e):void 0;return{...t?t.settings:ip(e),...!e.props.gym&&kp(e.props.thresholds)?{thresholds:e.props.thresholds}:{},...e.props.layerId?{id:e.props.layerId}:{},...e.props.gym?{gym:!0}:{},share:e.props.share,sort_order:t?t.sort_order:e.props.sort_order,...r?{lens:r}:{}}}function Px(o){return Oo(o).map(e=>Sp(o,e))}function aP(o){const e={};for(const[r,t]of Object.entries(o))oP.has(r)||(e[r]=t);return e}function cP(o){if(o.length!==1)return o.length>1;const e=o[0];return!!(e.id||e.gym||e.lens)}function lP(o,e){const r=e.props.custom_sort_settings,t=Oo(o),i=t.map(l=>Sp(o,l));if(i.length===0)return{custom_sort_settings:r||void 0,order:e.props.order};const n={...r??{}};if(cP(i)){const l=Du(i)??i;n.lenses=l;const a=l.length===1?l[0]:void 0;a?.lens?n.lens=a.lens:delete n.lens}else{delete n.lenses,delete n.lens;const l=ip(t[0]);for(const a of Cu)a in l?n[a]=l[a]:delete n[a];kp(t[0].props.thresholds)?n.thresholds=t[0].props.thresholds:delete n.thresholds}return{custom_sort_settings:Object.keys(n).length===0&&!r?void 0:n,order:i[0].sort_order}}function Tx(o){return o&&la.includes(o)?o:"new"}function qx(o,e){if(e&&nu(e))return[];const r=Tx(e),t=YC(o?.lenses,r);if(t)return t;const i=Tu(o?.lens),n={};for(const[s,l]of Object.entries(o??{}))Cu.has(s)&&typeof l=="number"&&(n[s]=l);return[{...n,...kp(o?.thresholds)?{thresholds:o?.thresholds}:{},share:1,sort_order:r,...i?{lens:i}:{}}]}function zn(o,e,r,t){for(const n of o.getBindingsToShape(r,"layout"))o.deleteBinding(n);o.createBinding({id:$p(),type:"layout",fromId:e,toId:r,props:{index:t,placeholder:!1}});const i=o.getShape(r);o.updateShape({id:r,type:i.type,parentId:e})}function Ou(o,e,r){let t;for(const i of o.getBindingsFromShape(e,"layout")){if(r){const n=o.getShape(i.toId);if(!n||!It(n))continue}(!t||i.props.index>t)&&(t=i.props.index)}return t}function Dx(o){return o.filters.some(e=>
39e.on_empty==="strict")?"strict":"unfiltered"}function Ox(o,e,r,t,i){let n=i;const s=()=>(n=pa(n),n);if(ai(r))for(const l of r.filters){const a=mr();o.createShape({id:a,type:Rw,x:t.x,y:t.y,props:{facet:l.facet,min:l.min}}),zn(o,e,a,s())}else r.filter&&Ix(o,e,r.filter,t,s());for(const l of r.boost?.blend??[]){const a=mr();o.createShape({id:a,type:iS,x:t.x,y:t.y,props:{facet:l.facet,weight:l.weight}}),zn(o,e,a,s())}}function Ix(o,e,r,t,i){if(si(r)){const a=mr();o.createShape({id:a,type:Rw,x:t.x,y:t.y,props:{facet:r.facet,min:r.min}}),zn(o,e,a,i);return}const n=mr();o.createShape({id:n,type:nS,x:t.x,y:t.y,props:{type:"and"in r?"and":"or"}}),zn(o,e,n,i);const s="and"in r?r.and:r.or;let l;for(const a of s)l=pa(l),Ix(o,n,a,t,l)}function Mx(o,e,r){const t=mr(),i=e.lens,n=ai(i)||xp(i)?i:void 0,s=aP(e),l=e.thresholds;return o.createShape({id:t,type:Aw,x:r.x,y:r.y,props:{layerId:typeof e.id=="string"?e.id:void 0,share:e.share,sort_order:e.sort_order,settings:s,thresholds:kp(l)?l:void 0,gym:!!e.gym,boostStrength:n?.boost?.strength??1,boostCombine:n?.boost?.combine??"max",onEmpty:n?ai(n)?Dx(n):n.on_empty:"unfiltered",legacyLens:i&&!n?i:void 0}}),zn(o,r.id,t,pa(Ou(o,r.id,!0))),n&&Ox(o,t,n,{x:r.x,y:r.y}),o.getShape(t)}let Ld=0;function oO(){return Ld>0}function Iu(o,e){Ld++;let r;try{r=e()}finally{Ld--}return Ld===0&&Bx(o),r}function Mu(o,e){Iu(o,()=>{for(const r of qx(e.props.custom_sort_settings,e.props.order))Mx(o,r,e)})}function Nu(o){const r=o.getCurrentPageShapes().filter($n).flatMap(t=>[...Ln(o,t).flatMap(i=>[...Gn(i)?Ln(o,i).map(n=>n.id):[],i.id]),t.id]);r.length&&Iu(o,()=>o.deleteShapes(r))}function Z1(o){return o&&Du(o)}function iO(o,e,r){const t=r?.custom_sort_settings??e.props.custom_sort_settings,i=r?.order??e.props.order,n=qx(t,i),s=Oo(o);if(s.length===0&&n.length===0||s.length>0&&hR(Z1(Px(o)),Z1(n)))return;Nu(o),(t!==e.props.custom_sort_settings||i!==e.props.order)&&o.updateShape({id:e.id,type:e.type,props:{custom_sort_settings:t??void 0,order:Tx(i)}});const l=o.getShape(e.id);l&&Mu(o,l)}function nO(o,{gym:e=!1,sort_order:r}={}){const t=jx(o);if(!t)return;const i=Oo(o);if(e&&i.some(d=>d.props.gym)||i.length>=10)return;const n=new Set(i.map(d=>d.props.sort_order)),s=r??la.find(d=>!n.has(d))??la[0],l=i.length?i.reduce((d,p)=>d+p.props.share,0)/i.length:1,a=Mx(o,{id:tP(),share:l,sort_order:s,...e?{gym:!0}:{}},t);return Bx(o),a}function sO(o,e,r){const t=mr();o.createShape({id:t,type:r,x:e.x,y:e.y});const i=o.getShape(t);if(!i)return;const n=o.getShapeUtil(i);if(n.canPlaceInShape&&!n.canPlaceInShape(e,i)){o.deleteShape(t);return}return zn(o,e.id,t,pa(Ou(o,e.id))),o.getShape(t)}function Nx(o,e,r){const t=e.flatMap((i,n)=>{const s=r[n];return s!==void 0&&s!==i.props.share?[{id:i.id,type:i.type,props:{share:s}}]:[]});t.length&&o.updateShapes(t)}function Bx(o){const e=Oo(o),r=Du(e.map(t=>Sp(o,t)));r&&Nx(o,e,r.map(t=>t.share))}function aO(o,e,r){const t=Oo(o),i=t.findIndex(s=>s.id===e.id);if(i<0)return;const n=eP(t.map(s=>Sp(o,s)),i,r);Nx(o,t,n.map(s=>s.share))}function cO(o,e,r){r&&o.run(()=>{o.updateShape({id:e.id,type:e.type,props:{legacyLens:void 0,boostStrength:r.boost?.strength??e.props.boostStrength,boostCombine:r.boost?.combine??e.props.boostCombine,onEmpty:ai(r)?Dx(r):r.on_empty}}),Ox(o,e.id,r,{x:e.x,y:e.y},Ou(o,e.id))})}/** 40 * @license lucide-react v0.545.0 - ISC 41 * 42 * This source code is licensed under the ISC license. 43 * See the LICENSE file in the root directory of this source tree. 44 */const dP=[["path",{d:"M5 15a6.5 6.5 0 0 1 7 0 6.5 6.5 0 0 0 7 0",key:"yrdkhy"}],["path",{d:"M5 9a6.5 6.5 0 0 1 7 0 6.5 6.5 0 0 0 7 0",key:"gzkvyz"}]],pP=ke("equal-approximately",dP);function uP(o){const e=Q.c(2),{children:r}=o;let t;return e[0]!==r?(t=c.jsx("h2",{className:"text-lg font-semibold mb-2 flex items-center",children:r}),e[0]=r,e[1]=t):t=e[1],t}function lO(o){const e=Q.c(2),{children:r}=o;let t;return e[0]!==r?(t=c.jsx("h2",{className:"font-semibold mb-2",children:r}),e[0]=r,e[1]=t):t=e[1],t}function fP(o){const e=Q.c(2),{children:r}=o;let t;return e[0]!==r?(t=c.jsx("div",{className:"text-sm mb-4",children:r}),e[0]=r,e[1]=t):t=e[1],t}function mP(o,e,r){const t=Q.c(14);let i;t[0]!==o?(i=o.getDefaultProps(),t[0]=o,t[1]=i):i=t[1];let n;t[2]!==e||t[3]!==r||t[4]!==i?(n={...i,...e,...r},t[2]=e,t[3]=r,t[4]=i,t[5]=n):n=t[5];const[s,l]=Y.useState(n);let a;t[6]!==s?(a=(h,y)=>{l({...s,...y})},t[6]=s,t[7]=a):a=t[7];const d=a;let p;t[8]!==r||t[9]!==s?(p={props:{...s,...r}},t[8]=r,t[9]=s,t[10]=p):p=t[10];let u;return t[11]!==p||t[12]!==d?(u={shape:p,updateShape:d,className:"relative!","data-example":!0},t[11]=p,t[12]=d,t[13]=u):u=t[13],u}function Oe(o){const e=Q.c(17),{editor:r,util:t,component:i,extraProps:n,title:s,description:l}=o;let a;e[0]!==t||e[1]!==r?(a=new t(r),e[0]=t,e[1]=r,e[2]=a):a=e[2];const d=mP(a,void 0,n),p=Math.max(400,d.shape.props.minW||d.shape.props.w);let u;e[3]!==p?(u={width:p},e[3]=p,e[4]=u):u=e[4];const h=s||t.docs.title;let y;e[5]!==h?(y=c.jsx(uP,{children:h}),e[5]=h,e[6]=y):y=e[6];const m=l||t.docs.description;let w;e[7]!==m?(w=c.jsx(fP,{children:m}),e[7]=m,e[8]=w):w=e[8];let x;e[9]!==i||e[10]!==d?(x=c.jsx("div",{className:"w-full overflow-auto",children:c.jsx(i,{...d})}),e[9]=i,e[10]=d,e[11]=x):x=e[11];let v;return e[12]!==u||e[13]!==y||e[14]!==w||e[15]!==x?(v=c.jsxs("div",{style:u,children:[y,w,x]}),e[12]=u,e[13]=y,e[14]=w,e[15]=x,e[16]=v):v=e[16],v}const Nt=c.jsxs("div",{children:[c.jsx("div",{children:"The probability that the post matches the model."}),c.jsxs(Un,{className:"my-2",children:[c.jsx(qe,{className:"my-[4px]",children:"0.3 => Somewhat likely"}),c.jsx(qe,{className:"my-[4px]",children:"0.7 => Pretty likely"}),c.jsx(qe,{className:"my-[4px]",children:"0.9 => Very likely"})]})]}),Wr=_w("name",void 0),zs=mr("placeholder");let jn={};function dO(o){return"h"in o.props&&"w"in o.props&&"minW"in o.props}function Ie(o){const e=mu(o,{RemoveMinH:1,insensitive:2,loginInNode:3,starSyntax:4,defaultHeight:5,timeWindows:6});return hu({sequence:[{id:e.RemoveMinH,up(r){delete r.minH}},{id:e.insensitive,up(r){"caseSensitive"in r&&(r.insensitive=!r.caseSensitive,delete r.caseSensitive)}
44,down(r){"insensitive"in r&&(r.caseSensitive=!r.insensitive,delete r.insensitive)}},{id:e.loginInNode,up(r){"type"in r&&r.type==="feed"&&(r.padding.top=84)},down(r){"type"in r&&r.type==="feed"&&(r.padding.top=44)}},{id:e.starSyntax,up(r){if("var"in r){const t=r.var,i=r;switch(t){case"embed.images[0].alt":case"embed.images[1].alt":i.var="embed.images[*].alt";break;case"langs[0]":i.var="langs[*]";break;case"labels.values[0].val":i.var="labels.values[*].val";break}}},down(r){if("var"in r){const t=r.var,i=r;switch(t){case"embed.images[*].alt":i.var="embed.images[0].alt";break;case"langs[*]":i.var="langs[0]";break;case"labels.values[*].val":i.var="labels.values[0].val";break}}}},{id:e.defaultHeight,up(r){"h"in r&&r.h===84&&(r.h=92)},down(r){"h"in r&&r.h===92&&(r.h=88)}},{id:e.timeWindows,up(r){"windows"in r||("startHour"in r&&"endHour"in r?(r.windows=[{start:String(r.startHour),end:String(r.endHour)}],delete r.startHour,delete r.endHour):"start"in r&&"end"in r&&"utcOffsetMinutes"in r&&(r.windows=[{start:String(r.start),end:String(r.end)}],delete r.start,delete r.end))},down(r){if(!Array.isArray(r.windows))return;const t=r.windows[0]??{start:"",end:""};/^\d{1,2}$/.test(t.start)&&/^\d{1,2}$/.test(t.end)?(r.startHour=t.start,r.endHour=t.end):(r.start=t.start,r.end=t.end),delete r.windows}}]})}const hP=_w("is-readonly-editor",!1);class Pe extends sS{isBindable=!0;isBoundToParentId(e,r){const t=this.editor.getBindingsToShape(e,"layout");if(t.length>0){const i=t[0];if(i&&i.fromId===r)return!0;const n=i?this.editor.getShape(i.fromId):void 0;return n?this.isBoundToParentId(n,r):!1}return!1}dropAnchorFor(e,r){if(r)return Fs.Add(this.editor.inputs.currentPagePoint,r);if(this.editor.getSelectedShapeIds().length<=1)return this.editor.inputs.currentPagePoint;const t=this.editor.getShapePageBounds(e);return t?t.center:this.editor.inputs.currentPagePoint}getTargetContainer(e,r){return this.editor.getShapeAtPoint(r,{hitInside:!0,filter:t=>t.id!==e.id&&t.type!==Ju&&t.type!==Yd&&t.type!==dr&&!this.isBoundToParentId(t,e.id)&&this.editor.canBindShapes({fromShape:t,toShape:e,binding:"layout"})})}getExistingBinding(e){const r=this.editor.inputs.currentPagePoint,t=this.getTargetContainer(e,r);return t?this.editor.getBindingsFromShape(t,"layout").find(n=>n.toId===e.id):void 0}canResize(e){return!this.getExistingBinding(e)}getMinWidth(e){const r=this.editor.getBindingsFromShape(e,"layout");let t=0;r.length>0&&(t=r.map(s=>this.editor.getShape(s.toId)).reduce((s,l)=>{if("minW"in l.props&&typeof l.props.minW=="number"){const a=this.editor.getShapeUtil(l).getMinWidth(l);if(a>s)return a}return s},0));const i=e.props.minW||0;return Math.max(i,t)}getPositionInPage(e){const r=this.editor.getBindingsToShape(e,"layout");if(!r.length)return e;const t=r[0]?this.editor.getShape(r[0].fromId):void 0;if(!t)return e;const i=this.getPositionInPage(t);return{x:i.x+e.x,y:i.y+e.y}}getBindingIndexForPosition(e,r,t){const i=It(e),n=this.editor.getBindingsFromShape(r,"layout").filter(y=>{if(!br(r))return!0;const m=this.editor.getShape(y.toId);return m?It(m)===i:!0}).sort((y,m)=>y.props.index>m.props.index?1:-1),s=n.map(y=>this.editor.getShape(y.toId)).map(y=>{let m=y.props.h;const w=this.editor.getBindingsToShape(e,"layout");let{y:x}=this.getPositionInPage(y);return w[0]?.props.dimensions&&y.id===e.id&&(x=x-e.y+w[0].props.dimensions.y,m=w[0].props.dimensions.h),{id:y.id,y:x,h:m}}).sort((y,m)=>y.y-m.y),l=[];for(let y=0;y<s.length;y++){const m=s[y];m&&(l.push(m.y),y===s.length-1&&l.push(m.y+m.h))}let a=1/0,d=0;l.forEach((y,m)=>{const w=Math.abs(y-t.y);w<a&&(a=w,d=m)});const p=n[d-1],u=n[d];let h;return p?.toId===e.id?h=p.props.index:u?.toId===e.id?h=u.props.index:h=aS(p?.props.index,u?.props.index),{index:h,order:d,siblingShapes:s}}static docs;updateProps(e,r){const i=[e,...Id(this.editor,e)].flatMap(l=>this.editor.getBindingsToShape(l,"arrow")),n=r.h||e.props.h,s=n-e.props.h;for(const l of i){const a=Fs.MulV(l.props.normalizedAnchor,new Fs(e.props.w,e.props.h));a.y<n&&(s<0||l.props.normalizedAnchor.y*n<e.props.h)&&this.editor.updateBinding({id:l.id,type:"arrow",fromId:l.fromId,toId:l.toId,props:{isExact:l.props.isExact,isPrecise:l.props.isPrecise,terminal:l.props.terminal,normalizedAnchor:{x:l.props.normalizedAnchor.x,y:a.y/n}}});const p=this.editor.getBindingsFromShape(l.fromId,"arrow").find(h=>h.toId!==e.id);if(!p)continue;const u=this.editor.getShape(p.toId);u&&(this.editor.updateShape({id:u.id,type:u.type,x:u.x,y:u.y+s}),this.translateAllArrowShapes(u,0,s))}this.editor.updateShape({id:e.id,type:this.getType(),props:{...e.props,...r,h:r.h??e.props.h,w:r.w??e.props.w}})}canBind({fromShapeType:e,toShapeType:r,bindingType:t}){return t==="arrow"?!0:(e===Nd||e===Eo||e===Hr||e===Yd||e===Gp)&&r===this.getType()&&t==="layout"}canEdit(){return!1}hideRotateHandle(){return!0}onResize(e,r){r.scaleY=1;const t=cS(e,r),i="padding"in e.props?e.props.padding:{left:0,right:0};return t.props.w=Math.max(t.props.w,this.getMinWidth(e)+i.left+i.right),t}shouldExitTranslate(e){if("isReadOnly"in e.props&&e.props.isReadOnly||hP.get())return!0}onTranslateStart(e){if(this.shouldExitTranslate(e))return;jn={},this.editor.updateBindings(this.editor.getBindingsToShape(e,"layout").map(t=>({...t,props:{...t.props,placeholder:!0,dimensions:{w:e.props.w,h:e.props.h,x:e.x,y:e.y}}})));const r=Id(this.editor,e);this.editor.bringToFront([e,...r])}translateArrowShapes(e,r,t){const i=this.editor.getBindingsToShape(e,"arrow");for(const n of i){if(n.type!=="arrow")continue;const l=this.editor.getBindingsFromShape(n.fromId,"arrow").find(d=>d.toId!==e.id)?.toId;if(!l)continue;const a=this.editor.getShape(l);a&&(jn[a.id]||(jn[a.id]={x:a.x,y:a.y}),this.editor.updateShape({id:a.id,type:a.type,x:(jn[a.id]?.x??0)+r,y:(jn[a.id]?.y??0)+t}))}}translateAllArrowShapes(e,r,t,i=!1){i&&(jn={});const n=[e,...Id(this.editor,e)];for(const s of n)this.translateArrowShapes(s,r,t)}onTranslate(e,r,t){if(this.shouldExitTranslate(r))return;const i=r.x-e.x,n=r.y-e.y;this.translateAllArrowShapes(r,i,n);const s=this.dropAnchorFor(r,t),l=this.getTargetContainer(r,s);if(!l||!this.canPlaceInShape(l,r)){this.editor.deleteShape(zs),Wr.set(void 0);return}else Wr.set(l.id);const{order:a,siblingShapes:d}=this.getBindingIndexForPosition(r,l,s);
44if(l.type===Hr||l.type===Eo&&!It(r))return;let p=this.editor.getShape(zs);if(p||(this.editor.createShape({id:zs,type:Ju,x:0,y:0}),p=this.editor.getShape(zs)),!p)throw new Error("Wasn't able to create target placeholder");let u=0;for(let v=0;v<a;v++){const k=d[v];k&&(u+=(k.h||0)+l.props.padding.gap)}const h=8,y=this.getPositionInPage(l),m=br(l)?ep:0,w=br(l)?-2*ep:0,x=new Fs(l.props.padding.left+m-h/2,l.props.padding.top+u-9);this.editor.updateShape({id:p.id,type:p.type,x:y.x+x.x,y:y.y+x.y,props:{w:l.props.w-l.props.padding.left-l.props.padding.right+w+h}}),this.editor.bringToFront([p.id])}canPlaceInShape(e,r){if(br(e)){const t=this.editor.getBindingsFromShape(e,"layout").filter(i=>i.toId!==r.id).map(i=>this.editor.getShape(i.toId)).filter(i=>!!i);if(It(r)){if(t.filter(It).length>=10)return!1;const i=n=>!!n.props.gym;if(i(r)&&t.some(n=>It(n)&&i(n)))return!1}else if(t.some(i=>!It(i)))return!1}else if((fu(e)||oa(e))&&this.editor.getBindingsFromShape(e,"layout").filter(i=>i.toId!==r.id).length>0)return!1;return!(this.shouldExitTranslate(e)||e.type==="custom-node")}onTranslateEnd(e,r,t){this.editor.run(()=>Iu(this.editor,()=>this.finishTranslate(r,t)))}finishTranslate(e,r){if(this.shouldExitTranslate(e))return;Wr.set(void 0),this.editor.deleteShape(zs);const t=this.dropAnchorFor(e,r),i=this.getTargetContainer(e,t);if(!i){const l=this.editor.getBindingsToShape(e,"layout");for(const a of l)this.cleanUpBindings([a]);return}if(i&&!this.canPlaceInShape(i,e))return;let n=this.getBindingIndexForPosition(e,i,t).index;this.cleanUpBindings(this.editor.getBindingsToShape(e,"layout"));let s=i.id;if(i.type===Hr&&e.type===Gp){const l=mr();this.editor.createShape({id:l,type:Nd,x:e.x,y:e.y,props:{type:"or"}}),this.editor.createBinding({id:$p(),type:"layout",fromId:s,toId:l,props:{index:n,placeholder:!1}}),this.editor.updateShape({id:l,type:Nd,parentId:s}),s=l,n=void 0}e.props.minW&&this.editor.updateShape({id:e.id,type:e.type,props:{w:e.props.minW}}),this.editor.createBinding({id:$p(),type:"layout",fromId:s,toId:e.id,props:{...n?{index:n}:{},placeholder:!1}}),this.editor.updateShape({id:e.id,type:e.type,parentId:s})}cleanUpBindings(e){for(const r of e){this.editor.deleteBinding(r);const t=this.editor.getShape(r.toId);if(t){this.editor.reparentShapes([t],this.editor.getCurrentPageId());const i=Id(this.editor,t);this.editor.bringToFront(i)}}}getBoundToFeed(e){let r=this.editor.getBindingsToShape(e,"layout")[0];for(;r;){if(r.props.placeholder)return!1;const t=this.editor.getShape(r.fromId);if(!t)break;if(t&&(br(t)||oa(t)))return!0;r=this.editor.getBindingsToShape(t,"layout")[0]}return!1}getGeometry(e){return lS(this.editor,e)?new Zd({width:0,height:0,isFilled:!1}):new Zd({width:Math.max(e.props.minW||0,e.props.w),height:e.props.h,isFilled:!0})}indicator(e){return c.jsx("rect",{width:Math.max(e.props.minW||0,e.props.w),height:e.props.h})}}const yP="Allows comparing an attribute of a record to a target value.";function gP(o){return o.type===vr}class pO extends De{static id=vr;static uiToolDef=e=>({id:vr,icon:pP,label:Gs.docs.title,kbd:"a",defaultColor:Gs.docs.defaultColor,onSelect:()=>e.setCurrentTool(vr),docs:()=>c.jsx(Oe,{editor:e,util:Gs,component:Vx})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:vr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Gs extends Pe{static migrations=Ie(vr);static type=vr;static docs={defaultColor:"teal",title:"Attribute Comparison",description:c.jsxs("div",{children:[c.jsx("div",{children:yP}),c.jsxs(Un,{className:"ml-1",children:[c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"text"})," - The text content of the post."]}),c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"reply"})," - A reference to the parent post. if any."]}),c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"embed.external.uri"})," - A url embedded in the post, if any."]}),c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"langs[0]"})," - The primary language the post was authored in."]})]})]})};getType(){return vr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,var:pe,value:jw(kt(pe,F)),operator:te(...Xe),metadata:Ce};getDefaultProps(){return{w:300,minW:440,h:He,var:fp[0],value:"alf",operator:Up[0]?.validOperators[0]||Xe[0],metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(Vx,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function Vx(o){const e=Q.c(43),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=C=>n(t,C),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||Gs.docs.defaultColor;let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:Gs.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=C=>{const O=Up.find(V=>V.value===C)?.validOperators;n(t,{var:C,operator:O?.[0]||t.props.operator})},e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]!==t.props.var||e[9]!==h?(y=c.jsx(Po,{value:t.props.var,onValueChange:h}),e[8]=t.props.var,e[9]=h,e[10]=y):y=e[10];let m;e[11]!==t.props.var?(m=Up.find(C=>C.value===t.props.var)?.validOperators,e[11]=t.props.var,e[12]=m):m=e[12];let w;e[13]!==t||e[14]!==n?(w=C=>C&&n(t,{operator:C}),e[13]=t,e[14]=n,e[15]=w):w=e[15];let x;e[16]!==t.props.operator||e[17]!==m||e[18]!==w?(x=c.jsx(xu,{value:t.props.operator,validOperators:m,onValueChange:w}),e[16]=t.props.operator,e[17]=m,e[18]=w,e[19]=x):x=e[19];const v=t.props.value||"";let k;e[20]!==t||e[21]!==n?(k=C=>n(t,{value:C}),e[20]=t,e[21]=n,e[22]=k):k=e[22];let A;e[23]!==v||e[24]!==k?(A=c.jsx(le,{message:"The value to compare the attribute against.",children:c.jsx($e,{"aria-label":"Test value",value:v,className:"flex-1",placeholder:"null",onValueChange:k,required:!1})}),e[23]=v,e[24]=k,e[25]=A):A=e[25];let S;e[26]!==A||e[27]!==y||e[28]!==x?(S=c.jsxs(Ee,{children:[y,x,A]}),e[26]=A,e[27]=y,e[28]=x,e[29]=S):S=e[29];let E;e[30]!==i||e[31]!==r||e[32]!==s||e[33]!==a||e[34]!==t.props.resultState||e[35]!==S||e[36]!==d||e[37]!==p||e[38]!==u?(E=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,S]}),e[30]=i,e[31]=r,e[32]=s,e[33]=a,e[34]=t.props.resultState,e[35]=S,e[36]=d,e[37]=p,e[38]=u,e[39]=E):E=e[39];let _;return e[40]!==t||e[41]!==E?(_=c.jsx(Se,{value:t,children:E}
44),e[40]=t,e[41]=E,e[42]=_):_=e[42],_}/** 45 * @license lucide-react v0.545.0 - ISC 46 * 47 * This source code is licensed under the ISC license. 48 * See the LICENSE file in the root directory of this source tree. 49 */const bP=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Lx=ke("message-circle-x",bP);function vP(o){return o.type===wr}class uO extends De{static id=wr;static uiToolDef=e=>({id:wr,icon:Lx,label:Us.docs.title,kbd:"c",defaultColor:Us.docs.defaultColor,onSelect:()=>e.setCurrentTool(wr),docs:()=>c.jsx(Oe,{editor:e,component:zx,util:Us})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:wr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Us extends Pe{static migrations=Ie(wr);static type=wr;static docs={defaultColor:"green",title:"Content Moderation",description:"Allows you to only accept/reject content matches your filter level for a given prediction. English Only"};getType(){return wr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,moderationCategory:te(...Ew),operator:te(...Xe),value:kt(F,pe),metadata:Ce};getDefaultProps(){return{w:360,minW:400,h:He,moderationCategory:"OK",operator:">=",value:.9,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(zx,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function zx(o){const e=Q.c(44),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=V=>n(t,V),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||Us.docs.defaultColor;let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:Us.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=V=>n(t,{moderationCategory:V}),e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]===Symbol.for("react.memo_cache_sentinel")?(y=c.jsx("div",{className:"text-xs text-slate-dim",children:"The KoalaAI/Text-Moderation moderation category."}),e[8]=y):y=e[8];const m=dS[t.props.moderationCategory];let w;e[9]!==m?(w=c.jsxs("div",{children:[y,c.jsx("div",{className:"text-xs text-slate-dim",children:m})]}),e[9]=m,e[10]=w):w=e[10];let x;e[11]!==t.props.moderationCategory||e[12]!==h||e[13]!==w?(x=c.jsx(ge,{"aria-label":"Moderation Category",options:Ew,value:t.props.moderationCategory,className:"w-[160px] shrink-0",onValueChange:h,tooltip:w}),e[11]=t.props.moderationCategory,e[12]=h,e[13]=w,e[14]=x):x=e[14];let v;e[15]!==t||e[16]!==n?(v=V=>n(t,{operator:V}),e[15]=t,e[16]=n,e[17]=v):v=e[17];let k;e[18]!==t.props.operator||e[19]!==v?(k=c.jsx(it,{value:t.props.operator,onValueChange:v}),e[18]=t.props.operator,e[19]=v,e[20]=k):k=e[20];const A=t.props.value;let S;e[21]!==t||e[22]!==n?(S=V=>n(t,{value:V}),e[21]=t,e[22]=n,e[23]=S):S=e[23];let E;e[24]!==A||e[25]!==S?(E=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:A,className:"flex-1",placeholder:"Threshold",onValueChange:S})}),e[24]=A,e[25]=S,e[26]=E):E=e[26];let _;e[27]!==k||e[28]!==E||e[29]!==x?(_=c.jsxs(Ee,{children:[x,k,E]}),e[27]=k,e[28]=E,e[29]=x,e[30]=_):_=e[30];let C;e[31]!==i||e[32]!==r||e[33]!==s||e[34]!==a||e[35]!==t.props.resultState||e[36]!==_||e[37]!==d||e[38]!==p||e[39]!==u?(C=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,_]}),e[31]=i,e[32]=r,e[33]=s,e[34]=a,e[35]=t.props.resultState,e[36]=_,e[37]=d,e[38]=p,e[39]=u,e[40]=C):C=e[40];let O;return e[41]!==t||e[42]!==C?(O=c.jsx(Se,{value:t,children:C}),e[41]=t,e[42]=C,e[43]=O):O=e[43],O}/** 50 * @license lucide-react v0.545.0 - ISC 51 * 52 * This source code is licensed under the ISC license. 53 * See the LICENSE file in the root directory of this source tree. 54 */const wP=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}
54],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]],Fx=ke("arrow-down-a-z",wP);function xP(){const o=Q.c(2),[e,r]=Y.useState(!1);let t,i;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{r(navigator.userAgent.includes("Mac"))},i=[],o[0]=t,o[1]=i):(t=o[0],i=o[1]),Y.useLayoutEffect(t,i),e}function Ap(o){const e=Q.c(13);let r,t,i;e[0]!==o?({className:t,children:r,...i}=o,e[0]=o,e[1]=r,e[2]=t,e[3]=i):(r=e[1],t=e[2],i=e[3]);const n=xP();let s;e[4]!==t?(s=he("bg-slatea-4 dark:bg-slatedarka-4 text-slatea-normal pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-slate-5 dark:[[data-slot=tooltip-content]_&]:bg-slatedark-4","[[data-slot=tooltip-content]_&]:text-slate-normal",t),e[4]=t,e[5]=s):s=e[5];let l;e[6]!==r||e[7]!==n?(l=typeof r=="string"?n?r.replace("Meta","â"):r.replace("Ctrl","Meta"):r,e[6]=r,e[7]=n,e[8]=l):l=e[8];let a;return e[9]!==i||e[10]!==s||e[11]!==l?(a=c.jsx("kbd",{"data-slot":"kbd",className:s,...i,children:l}),e[9]=i,e[10]=s,e[11]=l,e[12]=a):a=e[12],a}function Rp(o){const e=Q.c(8);let r,t;e[0]!==o?({className:r,...t}=o,e[0]=o,e[1]=r,e[2]=t):(r=e[1],t=e[2]);let i;e[3]!==r?(i=he("inline-flex items-center gap-1",r),e[3]=r,e[4]=i):i=e[4];let n;return e[5]!==t||e[6]!==i?(n=c.jsx("kbd",{"data-slot":"kbd-group",className:i,...t}),e[5]=t,e[6]=i,e[7]=n):n=e[7],n}const ew=600,zd=156,$x=44;function kP(){const o=mu(Hr,{RemoveFeedProps:1});return hu({sequence:[{id:o.RemoveFeedProps,up(e){delete e.order,delete e.custom_sort_settings}}]})}class fO extends Pe{static migrations=kP();static type=Hr;getType(){return Hr}static props={h:F,w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),metadata:Ce,customNodeParameters:Xr(pS).optional(),customNodeParameterGroups:Xr(Bn({name:pe,id:pe,description:pe.optional()})).optional(),padding:Bn({top:F,right:F,bottom:F,left:F,gap:F}),title:pe.optional(),description:pe.optional(),showCustomNodeParameters:oe.optional()};getDefaultProps(){return{w:ew,minW:ew,h:zd,padding:{top:$x+40,bottom:16,right:16,left:16,gap:14},title:"Feed",showCustomNodeParameters:!0,metadata:void 0}}canBind({fromShapeType:e,toShapeType:r,bindingType:t}){return t==="arrow"?!0:e===Hr&&yu.includes(r)&&t==="layout"}canResize(){return!0}component(e){return c.jsx(DP,{shape:e,updateShape:this.updateProps.bind(this)})}getGeometry(e){return new Zd({width:Math.max(e.props.minW||0,e.props.w),height:Math.max(zd,e.props.h),isFilled:!0})}indicator(e){return c.jsx("rect",{width:Math.max(e.props.minW||0,e.props.w),height:Math.max(zd,e.props.h)})}}function SP(o){const e=Q.c(38),{parameter:r,shape:t,updateShape:i}=o,n=Y.useRef(null);let s;e[0]!==t.props.customNodeParameters?(s=t.props.customNodeParameters||[],e[0]=t.props.customNodeParameters,e[1]=s):s=e[1];const l=s;let a;if(e[2]!==r.name||e[3]!==l){let _;e[5]!==r.name?(_=C=>C.name===r.name,e[5]=r.name,e[6]=_):_=e[6],a=l.findIndex(_),e[2]=r.name,e[3]=l,e[4]=a}else a=e[4];const d=a,[p,u]=Y.useState(!1);let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h={onFocusWithinChange:u},e[7]=h):h=e[7];const{focusWithinProps:y}=mp(h);let m;e[8]!==d||e[9]!==l||e[10]!==t||e[11]!==i?(m=()=>{if(fa.flushSync(()=>{i(t,{customNodeParameters:l.map((C,O)=>O===d?{...C,exampleValue:[...C.exampleValue,""]}:C)})}),!n.current)return;n.current.querySelectorAll("input").values().toArray().at(-1)?.focus()},e[8]=d,e[9]=l,e[10]=t,e[11]=i,e[12]=m):m=e[12];const w=m;let x;e[13]!==w?(x=_=>{_.key==="Enter"&&_.metaKey&&(_.preventDefault(),_.stopPropagation(),w())},e[13]=w,e[14]=x):x=e[14];let v;if(e[15]!==r.exampleValue||e[16]!==d||e[17]!==l||e[18]!==t||e[19]!==i){let _;e[21]!==d||e[22]!==l||e[23]!==t||e[24]!==i?(_=(C,O)=>c.jsxs("div",{className:"relative group",children:[c.jsx($e,{className:"flex-1","data-list-input":!0,value:C,onValueChange:V=>{i(t,{customNodeParameters:l.map((I,z)=>z===d?{...I,exampleValue:I.exampleValue.map((N,R)=>R===O?V:N)}:I)})}}),c.jsx(Ne,{className:"pointer-events-auto absolute right-1 top-1 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity",size:"smIcon",variant:"ghost",onClick:()=>{i(t,{customNodeParameters:l.map((V,I)=>I===d?{...V,exampleValue:V.exampleValue.filter((z,N)=>N!==O)}:V)})},children:c.jsx(Qr,{})})]},`param-value-${t.id}-${O}`),e[21]=d,e[22]=l,e[23]=t,e[24]=i,e[25]=_):_=e[25],v=r.exampleValue.map(_),e[15]=r.exampleValue,e[16]=d,e[17]=l,e[18]=t,e[19]=i,e[20]=v}else v=e[20];let k;e[26]!==y||e[27]!==x||e[28]!==v?(k=c.jsx(hp,{...y,onKeyDownCapture:x,children:v}),e[26]=y,e[27]=x,e[28]=v,e[29]=k):k=e[29];let A;e[30]!==p?(A=p&&c.jsx(Rp,{className:"hidden md:flex absolute top-1/2 right-2 -translate-y-1/2",children:c.jsx(Ap,{children:"Meta + â"})}),e[30]=p,e[31]=A):A=e[31];let S;e[32]!==w||e[33]!==A?(S=c.jsxs(Ne,{size:"sm",variant:"ghost",onPress:w,children:["Add Another",A]}),e[32]=w,e[33]=A,e[34]=S):S=e[34];let E;return e[35]!==k||e[36]!==S?(E=c.jsxs("div",{className:"flex flex-col gap-2",ref:n,children:[k,S]}),e[35]=k,e[36]=S,e[37]=E):E=e[37],E}function AP(o){const e=Q.c(51),{parameter:r,shape:t,updateShape:i,parameterIndex:n}=o;let s;e[0]!==t.props.customNodeParameters?(s=t.props.customNodeParameters||[],e[0]=t.props.customNodeParameters,e[1]=s):s=e[1];const l=s,a=Y.useRef(null),d=`param-example-${n}`;let p;e[2]!==d?(p=c.jsx(wt,{htmlFor:d,className:"p-1",children:"Custom Labels"}),e[2]=d,e[3]=p):p=e[3];const u=!!r.labels;let h;e[4]!==n||e[5]!==l||e[6]!==t||e[7]!==i?(h=V=>{i(t,{customNodeParameters:l.map((I,z)=>z===n?{...I,labels:V?I.options.map(RP):void 0}:I)})},e[4]=n,e[5]=l,e[6]=t,e[7]=i,e[8]=h):h=e[8];let y;e[9]!==u||e[10]!==h?(y=c.jsx("div",{className:"flex flex-col gap-2",children:c.jsx(sa,{checked:u,onCheckedChange:h})}),e[9]=u,e[10]=h,e[11]=y):y=e[11];let m;e[12]!==p||e[13]!==y?(m=c.jsxs("div",{className:"flex flex-col gap-1",children:[p,y]}),e[12]=p,e[13]=y,e[14]=m):m=e[14];const w=`param-example-${n}`;let x;e[15]!==w?(x=c.jsx(wt,{htmlFor:w,className:"p-1",children:"Options"}),e[15]=w,e[16]=x):x=e[16];let v;e[17]!==r.labels?(v=r.labels&&c.jsxs("div",{className:"flex items-center gap-1 text-xs text-slate-dim",children:[c.jsx("div",{className:"flex-1 px-1",children:"Label"}),c.jsx("div",{className:"flex-1 px-1",children:"Value"})]}),e[17]=r.labels,e[18]=v):v=e[18];let k;if(e[19]!==r.labels||e[20]!==r.options||e[21]!==n||e[22]!==l||e[23]!==t||e[24]!==i){let V;e[26]!==r.labels||e[27]!==n||e[28]!==l||e[29]!==t||e[30]!==i?(V=(I,z)=>c.jsxs("div",{className:"relative group flex items-center gap-1",children:[typeof r.labels?.[z]<"u"&&c.jsx($e,{className:"flex-1","data-list-input"
54:!0,value:r.labels?.[z],onValueChange:N=>{i(t,{customNodeParameters:l.map((R,D)=>D===n?{...R,labels:R.labels?.map((q,j)=>j===z?N:q)}:R)})}}),c.jsx($e,{className:"flex-1","data-list-input":!0,value:I,onValueChange:N=>{i(t,{customNodeParameters:l.map((R,D)=>D===n?{...R,options:R.options.map((q,j)=>j===z?N:q)}:R)})}}),c.jsx(Ne,{className:"pointer-events-auto absolute right-1 top-1 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity",size:"smIcon",variant:"ghost",onClick:()=>{i(t,{customNodeParameters:l.map((N,R)=>R===n?{...N,options:N.options.filter((D,q)=>q!==z)}:N)})},children:c.jsx(Qr,{})})]},`param-value-${t.id}-${z}`),e[26]=r.labels,e[27]=n,e[28]=l,e[29]=t,e[30]=i,e[31]=V):V=e[31],k=r.options.map(V),e[19]=r.labels,e[20]=r.options,e[21]=n,e[22]=l,e[23]=t,e[24]=i,e[25]=k}else k=e[25];let A;e[32]!==k?(A=c.jsx("div",{className:"flex flex-col gap-2",children:k}),e[32]=k,e[33]=A):A=e[33];let S;e[34]!==v||e[35]!==A?(S=c.jsxs("div",{className:"flex flex-col gap-1",children:[v,A]}),e[34]=v,e[35]=A,e[36]=S):S=e[36];let E;e[37]!==n||e[38]!==l||e[39]!==t||e[40]!==i?(E=c.jsx(Ne,{size:"sm",variant:"ghost",onPress:()=>{if(fa.flushSync(()=>{i(t,{customNodeParameters:l.map((I,z)=>{if(z===n){const N={...I};return N.options=[...N.options,""],N.labels&&(N.labels=[...N.labels,""]),N}return I})})}),!a.current)return;a.current.querySelectorAll("[data-list-input]").values().toArray().at(-1)?.focus()},children:"Add Option"}),e[37]=n,e[38]=l,e[39]=t,e[40]=i,e[41]=E):E=e[41];let _;e[42]!==S||e[43]!==E?(_=c.jsxs("div",{className:"flex flex-col gap-2",ref:a,children:[S,E]}),e[42]=S,e[43]=E,e[44]=_):_=e[44];let C;e[45]!==_||e[46]!==x?(C=c.jsxs("div",{className:"flex flex-col gap-1",children:[x,_]}),e[45]=_,e[46]=x,e[47]=C):C=e[47];let O;return e[48]!==C||e[49]!==m?(O=c.jsxs(c.Fragment,{children:[m,C]}),e[48]=C,e[49]=m,e[50]=O):O=e[50],O}function RP(){return""}function _P(o){const e=Q.c(11),{shape:r,updateShape:t}=o,i=r.props.customNodeParameters||[];if(St()){const d=vR(i);return c.jsx("div",{className:"flex flex-col gap-4 p-3 pt-4",...ni,children:Object.entries(d).map(p=>{const[u,h]=p,y=r.props.customNodeParameterGroups?.find(m=>m.id===u);return c.jsxs("div",{className:"flex flex-col gap-2",children:[y?.name&&c.jsx("h3",{className:"text-xl font-bold",children:y.name}),y?.description&&c.jsx("div",{className:"text-sm text-slate-dim",children:y.description}),h.length>0&&c.jsx("div",{className:"flex flex-col gap-2",children:h.map((m,w)=>c.jsxs(Y.Fragment,{children:[c.jsx("div",{className:"flex flex-col gap-2",children:c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("div",{className:"flex gap-2",children:c.jsxs("div",{className:"text-lg font-medium flex-1 flex items-center gap-3",children:[c.jsx("span",{className:"flex-1",children:m.displayName||`$${m.name}`}),c.jsx(Wt,{children:m.type||"input"})]})}),m.description&&c.jsx("div",{className:"flex flex-col gap-1 text-slate-dim",children:m.description}),m.type==="select"&&c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("div",{className:"py-1 text-sm",children:"Options:"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:m.options.map((x,v)=>c.jsx(Wt,{children:m.labels?m.labels[v]:x},`param-option-${r.id}-${v}`))})]}),m.exampleValue&&c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("div",{className:"py-1 text-sm",children:"Default Value:"}),m.type==="input"||m.type==="regex"||!m.type?c.jsx(Wt,{children:m.exampleValue}):m.type==="select"?c.jsx(Wt,{children:m.labels?m.labels[w]:m.exampleValue}):m.type==="toggle"?c.jsx(bR,{checked:m.exampleValue}):m.type==="number"?c.jsx(Wt,{children:m.exampleValue}):m.type==="list"?c.jsx("div",{className:"flex flex-wrap gap-2",children:m.exampleValue.map((x,v)=>c.jsx(Wt,{children:x},`param-value-${r.id}-${v}`))}):null]})]})}),w!==h.length-1&&c.jsx(Mt,{className:"my-2"})]},`param-${r.id}-${w}`))})]},u)})})}let s;e[0]!==i||e[1]!==r||e[2]!==t?(s=i.length>0&&c.jsx("div",{className:"flex flex-col gap-2",children:i.map((d,p)=>c.jsxs(Y.Fragment,{children:[c.jsx("div",{className:"flex flex-col gap-2",children:c.jsxs("div",{className:"flex flex-col gap-3",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("div",{className:"flex flex-col gap-1 flex-1",children:[c.jsx(wt,{htmlFor:`param-name-${p}`,className:"p-1",children:"Name"}),c.jsx($e,{id:`param-name-${p}`,className:"flex-1",value:d.name,required:!0,onInput:EP,onValueChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,name:u}:h)})}})]}),c.jsxs("div",{className:"flex flex-col gap-1 flex-1",children:[c.jsx(wt,{htmlFor:`param-display-name-${p}`,className:"p-1",children:"Display Name"}),c.jsx($e,{id:`param-display-name-${p}`,className:"flex-1",required:!1,value:d.displayName||"",onValueChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,displayName:u}:h)})}})]}),r.props.customNodeParameterGroups&&r.props.customNodeParameterGroups.length>0&&c.jsxs("div",{className:"flex flex-col gap-1 flex-1",children:[c.jsx(wt,{htmlFor:`param-group-${p}`,className:"p-1",children:"Group"}),c.jsx(ge,{id:`param-group-${p}`,className:"flex-1",required:!1,options:[{value:"none",label:"None"},...r.props.customNodeParameterGroups.map(jP)],value:d.group||"none","aria-label":"Group",onValueChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,group:u}:h)})}})]}),c.jsxs("div",{className:"flex flex-col gap-1 w-[120px]",children:[c.jsx(wt,{htmlFor:`param-example-${p}`,className:"p-1",children:"Type"}),c.jsx(ge,{"aria-label":"Type",className:"flex-1",value:d.type||"input",options:["input","regex","list","toggle","number","select"],onValueChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?u==="input"?{description:h.description,name:h.name,type:"input",exampleValue:Array.isArray(h.exampleValue)?h.exampleValue[0]:`${h.exampleValue}`}:u==="regex"?{description:h.description,name:h.name,type:"regex",exampleValue:Array.isArray(h.exampleValue)?h.exampleValue[0]:`${h.exampleValue}`}:u==="toggle"?{description:h.description,name:h.name,type:"toggle",exampleValue:!1}:u==="number"?{description:h.description,name:h.name,type:"number",exampleValue:0}:u==="select"?{description:h.description,name:h.name,type:"select",options:[""],exampleValue:""}:{...h,type:"list",exampleValue:typeof h.exampleValue=="string"?[h.exampleValue]:[]}:h)})}})]}),c.jsx("div",{className:"self-end flex items-center gap-0.5",children:c.jsxs(yp,{children:[c.jsx(gp,{asChild:!0,children:c.jsxs(Ne,{variant:"canvas",size:"icon",children:[c.jsx("span",{className:"sr-only",children:"Settings"}),c.jsx(Tw,{})]})}),c.jsxs(bp,{align:"end",children:[d.type==="list"&&c.jsxs(c.Fragment,{children:[c.jsxs(Ge,{onSelect:()=>{const u=[...d.exampleValue].sort();JSON.stringify(u)===JSON.stringify(d.exampleValue)&&u.reverse(),t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,exampleValue:u}:h)})},children:[c.jsx(Fx,{}),"Sort Alphabetically"]}),c.jsx(Kr,{})]}),c.jsxs(Ge,{disabled:p===0,onClick:()=>{const u=[...i],h=u[p],y=u[p-1];!y||!h||(u[p]=y,u[p-1]=h,t(r,{customNodeParameters:u}))},children:[c.jsx(fS,{}),"Move Up"]}),c.jsxs(Ge,{disabled:p===i.length-1,onSelect:()=>{const u=[...i],h=u[p],y=u[p+1];!y||!h||(u[p]=y,u[p+1]=h,t(r,{customNodeParameters:u}))},children:[c.jsx(mS,{}),"Move Down"]}),c.jsx(Kr,{}),c.jsxs(Ge,{onSelect:()=>{t(r,{customNodeParameters:i.filter((u,h)=>h!==p)})},children:[c.jsx(Pw,{}),"Remove"]})]})]})})]}),c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx(wt,{htmlFor:`param-description-${p}`,className:"p-1",children:"Description"}),c.jsx(ci,{className:"flex-1",value:d.description,required:!1,onValueChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,description:u}:h)})}})]}),d.type==="select"&&c.jsx(AP,{parameterIndex:p,parameter:d,shape:r,updateShape:t}),d.type==="number"&&c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx(wt,{htmlFor:`param-example-${p}`,className:"p-1",children:"Is Percentage?"}),c.jsx("div",{className:"flex flex-col gap-2",children:c.jsx(sa,{checked:d.isPercentage??!1,onCheckedChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,isPercentage:u}:h)})}})})]}),c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx(wt,{htmlFor:`param-example-${p}`,className:"p-1",children:"Default Value"}),d.type==="input"||!d.type?c.jsx($e,{className:"flex-1",value:d.exampleValue,required:!1,onValueChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,exampleValue:u}:h)})}}):d.type==="regex"?c.jsx(Qw,{isReadOnly:!1,value:d.exampleValue,onChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,exampleValue:u}:h)})}}):d.type==="toggle"?c.jsx("div",{className:"p-2",children:c.jsx(sa,{checked:d.exampleValue,onCheckedChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,exampleValue:u}:h)})}})}):d.type==="number"?d.isPercentage?c.jsx(Ye,{isCustomNodeParameter:!0,value:d.exampleValue,onValueChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,exampleValue:u}:h)})}}):c.jsx(ku,{isCustomNodeParameter:!0,value:d.exampleValue,onValueChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,exampleValue:u}:h)})}}):d.type==="list"?c.jsx(SP,{parameter:d,shape:r,updateShape:t}):d.type==="select"?c.jsx(ge,{"aria-label":"Select parameter default value",options:d.options.map((u,h)=>({label:d.labels?.[h]??u,value:u===""?"empty":u})),value:d.exampleValue,onValueChange:u=>{t(r,{customNodeParameters:i.map((h,y)=>y===p?{...h,exampleValue:u}:h)})}}):null]})]})}),c.jsx(Mt,{className:"my-4"})]},`param-${r.id}-${p}`))}),e[0]=i,e[1]=r,e[2]=t,e[3]=s):s=e[3];let l;e[4]!==i||e[5]!==r||e[6]!==t?(l=c.jsx(Ne,{variant:"ghost",size:"sm",onClick:()=>{t(r,{customNodeParameters:[...i,{name:"",description:"",exampleValue:""}]})},children:"Add Parameter"}),e[4]=i,e[5]=r,e[6]=t,e[7]=l):l=e[7];let a;return e[8]!==s||e[9]!==l?(a=c.jsxs("div",{className:"flex flex-col gap-4 p-3 pt-4",...ni,children:[s,l]}),e[8]=s,e[9]=l,e[10]=a):a=e[10],a}function jP(o){return{value:o.id,label:o.name||"Unnamed"}}function EP(o){o.currentTarget.value.match(/^\$/)?(o.currentTarget.setCustomValidity("Custom node parameters cannot start with a $. You can use $ to reference a parameter in your node's logic."),o.currentTarget.reportValidity()):o.currentTarget.value.match(/^[a-zA-Z0-9_]+$/)?(o.currentTarget.setCustomValidity(""),o.currentTarget.reportValidity()):(o.currentTarget.setCustomValidity("Custom node parameters can only contain letters, numbers, and underscores."),o.currentTarget.reportValidity())}function CP(o){const e=Q.c(4),{shape:r,updateShape:t}=o;let i,n;return e[0]!==r||e[1]!==t?(i=()=>{t(r,{padding:{...r.props.padding,top:100}})},n=[r,t],e[0]=r,e[1]=t,e[2]=i,e[3]=n):(i=e[2],n=e[3]),Y.useEffect(i,n),null}function PP(o){const e=Q.c(7),{shape:r,updateShape:t}=o;if(St()&&(!r.props.customNodeParameters||r.props.customNodeParameters.length===0)){let l;return e[0]!==r||e[1]!==t?(l=c.jsx(CP,{shape:r,updateShape:t}),e[0]=r,e[1]=t,e[2]=l):l=e[2],l}let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=c.jsx(na,{description:c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("p",{children:"Parameters allow users of your node to provide values to customize the functionality of your node."}),c.jsx("p",{children:"To use a parameter use $parameterName in your node's logic."})]}),children:"Parameters"}),e[3]=n):n=e[3];let s;return e[4]!==r||e[5]!==t?(s=c.jsxs(we,{asDiv:!0,variant:"amber",className:"px-3.5 pt-4 flex flex-col gap-2 group pointer-events-auto sort-area-block",dynamicHeight:!0,children:[n,c.jsx(_P,{shape:r,updateShape:t})]}),e[4]=r,e[5]=t,e[6]=s):s=e[6],s}function TP(o){const e=Q.c(10),{shape:r,updateShape:t}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(na,{description:c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("p",{children:"Parameters allow users of your node to provide values to customize the functionality of your node."}),c.jsx("p",{children:"To use a parameter use $parameterName in your node's logic."})]}),children:"Parameter Groups"}),e[0]=i):i=e[0];let n;e[1]!==r||e[2]!==t?(n=r.props.customNodeParameterGroups?.map((a,d)=>c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"flex flex-col gap-1 flex-1",children:[c.jsx(wt,{htmlFor:`group-name-${a.id}`,children:"Name"}),c.jsx($e,{id:`group-name-${a.id}`,value:a.name,onValueChange:p=>{t(r,{customNodeParameterGroups:r.props.customNodeParameterGroups?.map(u=>u.id===a.id?{...u,name:p}:u)})}})]}),c.jsx(le,{message:"Delete Group",className:"self-end",children:c.jsxs(Ne,{variant:"canvas",size:"icon",onClick:()=>{t(r,{customNodeParameters:r.props.customNodeParameters?.map(p=>p.group===a.id?{...p,group:void 0}:p),customNodeParameterGroups:r.props.customNodeParameterGroups?.filter(p=>p.id!==a.id)})},children:[c.jsx("span",{className:"sr-only",children:"Delete Group"}),c.jsx(Pw,{className:"w-4 h-4"})]})})]}),c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx(wt,{htmlFor:`group-description-${a.id}`,children:"Description"}),c.jsx(ci,{id:`group-description-${a.id}`,value:a.description,onValueChange:p=>{t(r,{customNodeParameterGroups:r.props.customNodeParameterGroups?.map(u=>u.id===a.id?{...u,description:p}:u)})}})]}),r.props.customNodeParameterGroups&&d!==r.props.customNodeParameterGroups.length-1&&
54c.jsx(Mt,{className:"my-4"})]},a.id)),e[1]=r,e[2]=t,e[3]=n):n=e[3];let s;e[4]!==r||e[5]!==t?(s=c.jsx(Ne,{variant:"ghost",size:"sm",onClick:()=>{t(r,{customNodeParameterGroups:[...r.props.customNodeParameterGroups||[],{name:"",id:uS()}]})},children:"Add Group"}),e[4]=r,e[5]=t,e[6]=s):s=e[6];let l;return e[7]!==n||e[8]!==s?(l=c.jsxs(we,{asDiv:!0,variant:"amber",className:"px-3.5 pt-4 flex flex-col gap-2 group pointer-events-auto sort-area-block",dynamicHeight:!0,children:[i,c.jsxs("div",{className:"flex flex-col gap-4 p-3 pt-4",...ni,children:[n,s]})]}),e[7]=n,e[8]=s,e[9]=l):l=e[9],l}function qP(o){const e=Q.c(5),{updateShape:r,shape:t,children:i}=o,n=Y.useRef(null);let s;e[0]!==t||e[1]!==r?(s={ref:n,onUpdate:a=>{const{contentRect:d}=a,p=$x+d.height-8,u=p-t.props.padding.top;r(t,{h:t.props.h+u,padding:{...t.props.padding,top:p}})}},e[0]=t,e[1]=r,e[2]=s):s=e[2],Cw(s);let l;return e[3]!==i?(l=c.jsx("div",{ref:n,className:"flex flex-col",children:i}),e[3]=i,e[4]=l):l=e[4],l}function DP(o){const e=Q.c(26),{shape:r,updateShape:t}=o,i=St(),n=ua();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=[Wr],e[0]=s):s=e[0];const l=ia("logic-atom",OP,s),a=Math.max(r.props.minW||0,r.props.w),d=Math.max(zd,r.props.h),p=r.id===l&&"rounded-lg shadow-[0_0_0_4px_#0588F0]";let u;e[1]!==p?(u=he("flex flex-col gap-2",p),e[1]=p,e[2]=u):u=e[2];let h;e[3]!==r||e[4]!==t?(h=A=>{const{h:S}=A;r.props.showCustomNodeParameters||t(r,{h:S,padding:{...r.props.padding,top:44}})},e[3]=r,e[4]=t,e[5]=h):h=e[5];let y;e[6]!==r.props.description?(y=r.props.description||c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("div",{children:"The root custom node definition."}),c.jsx("div",{className:"text-xs text-slate-dim",children:"The custom node can have 1 child node. To build more complex custom nodes, use the logic node."})]}),e[6]=r.props.description,e[7]=y):y=e[7];const m=r.props.title||"Custom Node";let w;e[8]!==y||e[9]!==m?(w=c.jsx(na,{description:y,children:m}),e[8]=y,e[9]=m,e[10]=w):w=e[10];let x;e[11]!==n||e[12]!==i||e[13]!==r||e[14]!==t?(x=r.props.showCustomNodeParameters?c.jsxs(qP,{shape:r,updateShape:t,children:[c.jsx(PP,{shape:r,updateShape:t}),!i&&c.jsx(TP,{shape:r,updateShape:t}),c.jsx(Ne,{alwaysEnabled:!0,className:"m-3",variant:"canvas",onClick:()=>{const A=kq(n);if(!A)return;n.deleteShape(Yu);const{id:S}=Lu({editor:n,id:Yu,isReadOnly:!0,filter:Fn(A.manifest.filter,r.props.customNodeParameters||[])}),E=n.getShape(S);if(!E)return;const _=n.getShape(Ot);_&&n.updateShape({...E,x:_.x+_.props.w+32,y:_.y+_.props.padding.top+_.props.padding.gap-15,props:{...E.props,w:_.props.w}})},children:"Preview"})]}):null,e[11]=n,e[12]=i,e[13]=r,e[14]=t,e[15]=x):x=e[15];let v;e[16]!==x||e[17]!==a||e[18]!==d||e[19]!==u||e[20]!==h||e[21]!==w?(v=c.jsxs(we,{width:a,height:d,className:u,onUpdateDimensions:h,children:[w,x]}),e[16]=x,e[17]=a,e[18]=d,e[19]=u,e[20]=h,e[21]=w,e[22]=v):v=e[22];let k;return e[23]!==r||e[24]!==v?(k=c.jsx(Se,{value:r,children:v}),e[23]=r,e[24]=v,e[25]=k):k=e[25],k}function OP(){return Wr.get()}function IP(o){return o.getCurrentPageShapes().find(e=>e.type===Hr)}/** 55 * @license lucide-react v0.545.0 - ISC 56 * 57 * This source code is licensed under the ISC license. 58 * See the LICENSE file in the root directory of this source tree. 59 */const MP=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],NP=ke("link",MP);function BP(o){return o.type===xr}class mO extends De{static id=xr;static uiToolDef=e=>({id:xr,icon:NP,label:Fd.docs.title,kbd:"w",defaultColor:Fd.docs.defaultColor,onSelect:()=>e.setCurrentTool(xr),docs:()=>c.jsx(Oe,{editor:e,component:Gx,util:Fd})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:xr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Fd extends Pe{static migrations=Ie(xr);static type=xr;getType(){return xr}static docs={defaultColor:"teal",title:"Embed",description:"Select/Reject based on what type of embed is in the post."};static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,operator:te(...ef),embed_name:te(...Zu),metadata:Ce};getDefaultProps(){return{w:300,minW:300,h:He,operator:ef[0],embed_name:Zu[0],metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(Gx,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function Gx(o){const e=Q.c(33),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=t.props.operator==="=="?"green":"red";let a;e[0]!==t||e[1]!==n?(a=S=>n(t,S),e[0]=t,e[1]=n,e[2]=a):a=e[2];const d=a,p=t.props.metadata?.pattern,u=t.props.metadata?.color||l;let h;e[3]!==t.props?(h=c.jsx(je,{props:t.props,docs:Fd.docs}),e[3]=t.props,e[4]=h):h=e[4];let y;e[5]!==t||e[6]!==n?(y=S=>n(t,{operator:S}),e[5]=t,e[6]=n,e[7]=y):y=e[7];let m;e[8]!==t.props.operator||e[9]!==y?(m=c.jsx(ge,{"aria-label":"Comparison Operator",className:"w-[120px]",value:t.props.operator,options:hS,onValueChange:y}),e[8]=t.props.operator,e[9]=y,e[10]=m):m=e[10];let w;e[11]!==t||e[12]!==n?(w=S=>n(t,{embed_name:S}),e[11]=t,e[12]=n,e[13]=w):w=e[13];let x;e[14]!==t.props.embed_name||e[15]!==w?(x=c.jsx(ge,{"aria-label":"Embed Type",tooltip:"Type of embed to select or reject upon",className:"flex-1",value:t.props.embed_name,options:yS,onValueChange:w}),e[14]=t.props.embed_name,e[15]=w,e[16]=x):x=e[16];let v;e[17]!==m||e[18]!==x?(v=c.jsxs(Ee,{children:[m,x]}),e[17]=m,e[18]=x,e[19]=v):v=e[19];let k;e[20]!==i||e[21]!==r||e[22]!==s||e[23]!==d||e[24]!==t.props.resultState||e[25]!==
59p||e[26]!==u||e[27]!==h||e[28]!==v?(k=c.jsxs(we,{resultState:t.props.resultState,pattern:p,isBound:r,className:i,variant:u,isSelected:s,onUpdateDimensions:d,dynamicHeight:!0,children:[h,v]}),e[20]=i,e[21]=r,e[22]=s,e[23]=d,e[24]=t.props.resultState,e[25]=p,e[26]=u,e[27]=h,e[28]=v,e[29]=k):k=e[29];let A;return e[30]!==t||e[31]!==k?(A=c.jsx(Se,{value:t,children:k}),e[30]=t,e[31]=k,e[32]=A):A=e[32],A}/** 60 * @license lucide-react v0.545.0 - ISC 61 * 62 * This source code is licensed under the ISC license. 63 * See the LICENSE file in the root directory of this source tree. 64 */const VP=[["path",{d:"M19.414 14.414C21 12.828 22 11.5 22 9.5a5.5 5.5 0 0 0-9.591-3.676.6.6 0 0 1-.818.001A5.5 5.5 0 0 0 2 9.5c0 2.3 1.5 4 3 5.5l5.535 5.362a2 2 0 0 0 2.879.052 2.12 2.12 0 0 0-.004-3 2.124 2.124 0 1 0 3-3 2.124 2.124 0 0 0 3.004 0 2 2 0 0 0 0-2.828l-1.881-1.882a2.41 2.41 0 0 0-3.409 0l-1.71 1.71a2 2 0 0 1-2.828 0 2 2 0 0 1 0-2.828l2.823-2.762",key:"17lmqv"}]],LP=ke("heart-handshake",VP);function zP(o){return o.type===kr}class hO extends De{static id=kr;static uiToolDef=e=>({id:kr,icon:LP,label:Hs.docs.title,defaultColor:Hs.docs.defaultColor,onSelect:()=>e.setCurrentTool(kr),docs:()=>c.jsx(Oe,{editor:e,component:Ux,util:Hs})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:kr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Hs extends Pe{static migrations=Ie(kr);static type=kr;static docs={defaultColor:"purple",title:"Emotion Analysis",description:"Use AI to analyze the emotional content of posts. This detects a wide range of emotions from joy and love to anger and sadness."};getType(){return kr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,emotionAnalysisCategory:te(...qw),operator:te(...Xe),value:kt(F,pe),metadata:Ce};getDefaultProps(){return{w:360,minW:400,h:He,emotionAnalysisCategory:"Joy",operator:">=",value:.5,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(Ux,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function Ux(o){const e=Q.c(40),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=_=>n(t,_),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||"pink";let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:Hs.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=_=>n(t,{emotionAnalysisCategory:_}),e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]!==t.props.emotionAnalysisCategory||e[9]!==h?(y=c.jsx(ge,{"aria-label":"Emotion Analysis Category",options:qw,value:t.props.emotionAnalysisCategory,className:"w-[160px] shrink-0",onValueChange:h,tooltip:Hs.docs.description}),e[8]=t.props.emotionAnalysisCategory,e[9]=h,e[10]=y):y=e[10];let m;e[11]!==t||e[12]!==n?(m=_=>n(t,{operator:_}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;e[14]!==t.props.operator||e[15]!==m?(w=c.jsx(it,{value:t.props.operator,onValueChange:m}),e[14]=t.props.operator,e[15]=m,e[16]=w):w=e[16];const x=t.props.value;let v;e[17]!==t||e[18]!==n?(v=_=>n(t,{value:_}),e[17]=t,e[18]=n,e[19]=v):v=e[19];let k;e[20]!==v||e[21]!==x?(k=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:x,className:"flex-1",placeholder:"Threshold",onValueChange:v})}),e[20]=v,e[21]=x,e[22]=k):k=e[22];let A;e[23]!==k||e[24]!==y||e[25]!==w?(A=c.jsxs(Ee,{children:[y,w,k]}),e[23]=k,e[24]=y,e[25]=w,e[26]=A):A=e[26];let S;e[27]!==i||e[28]!==r||e[29]!==s||e[30]!==a||e[31]!==t.props.resultState||e[32]!==A||e[33]!==d||e[34]!==p||e[35]!==u?(S=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,A]}),e[27]=i,e[28]=r,e[29]=s,e[30]=a,e[31]=t.props.resultState,e[32]=A,e[33]=d,e[34]=p,e[35]=u,e[36]=S):S=e[36];let E;return e[37]!==t||e[38]!==S?(E=c.jsx(Se,{value:t,children:S}),e[37]=t,e[38]=S,e[39]=E):E=e[39],E}/** 65 * @license lucide-react v0.545.0 - ISC 66 * 67 * This source code is licensed under the ISC license. 68 * See the LICENSE file in the root directory of this source tree. 69 */const FP=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Hx=ke("users",FP),$P=[{value:"aa",label:"Afar"},{value:"ab",label:"Abkhazian"},{value:"ae",label:"Avestan"},{value:"af",label:"Afrikaans"},{value:"ak",label:"Akan"},{value:"am",label:"Amharic"},{value:"an",label:"Aragonese"},{value:"ar",label:"Arabic"},{value:"as",label:"Assamese"},{value:"av",label:"Avaric"},{value:"ay",label:"Aymara"},{value:"az",label:"Azerbaijani"},{value:"ba",label:"Bashkir"},{value:"be",label:"Belarusian"},{value:"bg",label:"Bulgarian"},{value:"bh",label:"Bihari languages"},{value:"bi",label:"Bislama"},{value:"bm",label:"Bambara"},{value:"bn",label:"Bengali"},{value:"bo",label:"Tibetan"},{value:"br",label:"Breton"},{value:"bs",label:"Bosnian"},{value:"ca",label:"Catalan; Valencian"},{value:"ce",label:"Chechen"},{value:"ch",label:"Chamorro"},{value:"co",label:"Corsican"},{value:"cr",label:"Cree"},{value:"cs",label:"Czech"},{value:"cu",label:"Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic"},{value:"cv",label:"Chuvash"},{value:"cy",label:"Welsh"},{value:"da",label:"Danish"},{value:"de",label:"German"},{value:"dv",label:"Divehi; Dhivehi; Maldivian"},{value:"dz",label:"Dzongkha"},{value:"ee",label:"Ewe"},{value:"el",label:"Greek, Modern (1453â)"},{value:"en",label:"English"},{value:"eo",label:"Esperanto"},{value:"es",label:"Spanish; Castilian"},{value:"et",label:"Estonian"},{value:"eu",label:"Basque"},{value:"fa",label:"Persian"},{value:"ff",label:"Fulah"},{value:"fi",label:"Finnish"},{value:"fj",label:"Fijian"},{value:"fo",label:"Faroese"},{value:"fr",label:"French"},{value:"fy",label:"Western Frisian"},{value:"ga",label:"Irish"},{value:"gd",label:"Gaelic; Scottish Gaelic"},{value:"gl",label:"Galician"},{value:"gn",label:"Guarani"},{value:"gu",label:"Gujarati"},{value:"gv",label:"Manx"},{value:"ha",label:"Hausa"},{value:"he",label:"Hebrew"},{value:"hi",label:"Hindi"},{value:"ho",label:"Hiri Motu"},{value:"hr",label:"Croatian"},{value:"ht",label:"Haitian; Haitian Creole"},{value:"hu",label:"Hungarian"},{value:"hy",label:"Armenian"},{value:"hz",label:"Herero"},{value:"ia",label:"Interlingua (International Auxiliary Language Association)"},{value:"id",label:"Indonesian"},{value:"ie",label:"Interlingue; Occidental"},{value:"ig",label:"Igbo"},{value:"ii",label:"Sichuan Yi; Nuosu"},{value:"ik",label:"Inupiaq"},{value:"io",label:"Ido"},{value:"is",label:"Icelandic"},{value:"it",label:"Italian"},{value:"iu",label:"Inuktitut"},{value:"ja",label:"Japanese"},{value:"jv",label:"Javanese"},{value:"ka",label:"Georgian"},{value:"kg",label:"Kongo"},{value:"ki",label:"Kikuyu; Gikuyu"},{value:"kj",label:"Kuanyama; Kwanyama"},{value:"kk",label:"Kazakh"},{value:"kl",label:"Kalaallisut; Greenlandic"},{value:"km",label:"Central Khmer"},{value:"kn",label:"Kannada"},{value:"ko",label:"Korean"},{value:"kr",label:"Kanuri"},{value:"ks",label:"Kashmiri"},{value:"ku",label:"Kurdish"},{value:"kv",label:"Komi"},{value:"kw",label:"Cornish"},{value:"ky",label:"Kirghiz; Kyrgyz"},{value:"la",label:"Latin"},{value:"lb",label:"Luxembourgish; Letzeburgesch"},{value:"lg",label:"Ganda"},{value:"li",label:"Limburgan; Limburger; Limburgish"},{value:"ln",label:"Lingala"},{value:"lo",label:"Lao"},{value:"lt",label:"Lithuanian"},{value:"lu",label:"Luba-Katanga"},{value:"lv",label:"Latvian"},{value:"mg",label:"Malagasy"},{value:"mh",label:"Marshallese"},{value:"mi",label:"Maori"},{value:"mk",label:"Macedonian"},{value:"ml",label:"Malayalam"},{value:"mn",label:"Mongolian"},{value:"mr",label:"Marathi"},{value:"ms",label:"Malay"},{value:"mt",label:"Maltese"},{value:"my",label:"Burmese"},{value:"na",label:"Nauru"},{value:"nb",label:"BokmÃ¥l, Norwegian; Norwegian BokmÃ¥l"},{value:"nd",label:"Ndebele, North; North Ndebele"},{value:"ne",label:"Nepali"},{value:"ng",label:"Ndonga"},{value:"nl",label:"Dutch; Flemish"},{value:"nn",label:"Norwegian Nynorsk; Nynorsk, Norwegian"},{value:"no",label:"Norwegian"},{value:"nr",label:"Ndebele, South; South Ndebele"},{value:"nv",label:"Navajo; Navaho"},{value:"ny",label:"Chichewa;
69 Chewa; Nyanja"},{value:"oc",label:"Occitan (post 1500)"},{value:"oj",label:"Ojibwa"},{value:"om",label:"Oromo"},{value:"or",label:"Oriya"},{value:"os",label:"Ossetian; Ossetic"},{value:"pa",label:"Panjabi; Punjabi"},{value:"pi",label:"Pali"},{value:"pl",label:"Polish"},{value:"ps",label:"Pushto; Pashto"},{value:"pt",label:"Portuguese"},{value:"qu",label:"Quechua"},{value:"rm",label:"Romansh"},{value:"rn",label:"Rundi"},{value:"ro",label:"Romanian; Moldavian; Moldovan"},{value:"ru",label:"Russian"},{value:"rw",label:"Kinyarwanda"},{value:"sa",label:"Sanskrit"},{value:"sc",label:"Sardinian"},{value:"sd",label:"Sindhi"},{value:"se",label:"Northern Sami"},{value:"sg",label:"Sango"},{value:"si",label:"Sinhala; Sinhalese"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"sm",label:"Samoan"},{value:"sn",label:"Shona"},{value:"so",label:"Somali"},{value:"sq",label:"Albanian"},{value:"sr",label:"Serbian"},{value:"ss",label:"Swati"},{value:"st",label:"Sotho, Southern"},{value:"su",label:"Sundanese"},{value:"sv",label:"Swedish"},{value:"sw",label:"Swahili"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"tg",label:"Tajik"},{value:"th",label:"Thai"},{value:"ti",label:"Tigrinya"},{value:"tk",label:"Turkmen"},{value:"tl",label:"Tagalog"},{value:"tn",label:"Tswana"},{value:"to",label:"Tonga (Tonga Islands)"},{value:"tr",label:"Turkish"},{value:"ts",label:"Tsonga"},{value:"tt",label:"Tatar"},{value:"tw",label:"Twi"},{value:"ty",label:"Tahitian"},{value:"ug",label:"Uighur; Uyghur"},{value:"uk",label:"Ukrainian"},{value:"ur",label:"Urdu"},{value:"uz",label:"Uzbek"},{value:"ve",label:"Venda"},{value:"vi",label:"Vietnamese"},{value:"vo",label:"Volapük"},{value:"wa",label:"Walloon"},{value:"wo",label:"Wolof"},{value:"xh",label:"Xhosa"},{value:"yi",label:"Yiddish"},{value:"yo",label:"Yoruba"},{value:"za",label:"Zhuang; Chuang"},{value:"zh",label:"Chinese"},{value:"zu",label:"Zulu"}];function Kx(o){const e=Q.c(12),{did:r}=o;let t;e[0]!==r?(t=gu(r),e[0]=r,e[1]=t):t=e[1];const{data:i}=qo(t),n=i?.avatar,s=i?.avatar||"";let l;e[2]!==i?(l=i?c.jsx(Dw,{}):c.jsx(Qr,{}),e[2]=i,e[3]=l):l=e[3];const a=i?"default":"error";let d;e[4]!==n||e[5]!==s||e[6]!==l||e[7]!==a?(d=c.jsx(Co,{src:n,alt:s,fallback:l,variant:a}),e[4]=n,e[5]=s,e[6]=l,e[7]=a,e[8]=d):d=e[8];const p=d;let u;return e[9]!==p||e[10]!==i?(u=i?c.jsx(le,{side:"left",message:c.jsxs("div",{children:[c.jsx("div",{children:i.display_name||i.handle}),c.jsxs("div",{className:"text-xs text-slate-dim",children:["@",i.handle]}),c.jsx("div",{className:"text-[10px] text-slate-dim",children:i.did})]}),children:p}):c.jsx(le,{side:"left",message:"User not found",children:p}),e[9]=p,e[10]=i,e[11]=u):u=e[11],u}const GP=48;function UP(o){return o.type===pr}class yO extends De{static id=pr;static uiToolDef=e=>({id:pr,icon:Hx,label:$d.docs.title,kbd:"f",defaultColor:$d.docs.defaultColor,onSelect:()=>e.setCurrentTool(pr),docs:()=>c.jsx(Oe,{editor:e,component:Wx,util:$d})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:pr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}const HP="Include or exclude post based on whether they contain a specific entity.";class $d extends Pe{static migrations=Ie(pr);static type=pr;static docs={defaultColor:"green",title:"Entity List",description:c.jsxs("div",{children:[c.jsx("div",{children:HP}),c.jsxs(Un,{className:"ml-1",children:[c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"langs"})," - Filter by language."]}),c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"urls"})," - Filter for urls."]}),c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"domains"})," - Filter for url domains."]}),c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"mentions"})," - Filter for mentions of user. You can also supply a list/stater pack. When anyone in the list is mentioned the post is included."]}),c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"hashtags"})," - Filter posts with a #hashtag"]})]})]})};getType(){return pr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,type:te(...tf),entities:Xr(pe),operator:te(...xt),metadata:Ce};getDefaultProps(){return{w:350,minW:350,h:184,entities:[""],operator:xt[0],type:tf[0],metadata:void 0}}onBeforeCreate(e){const{entities:r}=e.props;r.length>1&&(e.props.h+=(r.length-1)*GP)}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(Wx,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function KP(o){const e=Q.c(17),{value:r,type:t,onChange:i,onDelete:n,variant:s}=o,l=s===void 0?"canvas":s,a=St();let d;e:switch(t){case"hashtags":{d="hashtag";break e}case"mentions":{d="username.bsky.social";break e}case"urls":{d="https://example.com/blah";break e}case"domains":d="example.com"}const p=l==="canvas"?$e:Jw,u=l==="canvas"?Ne:Yw;let h;e[0]!==t||e[1]!==r?(h=t==="mentions"&&c.jsx(Kx,{did:r}),e[0]=t,e[1]=r,e[2]=h):h=e[2];const y=`${t} entity`;let m;e[3]!==p||e[4]!==i||e[5]!==d||e[6]!==y||e[7]!==r?(m=c.jsx(p,{"aria-label":y,value:r,placeholder:d,className:"flex-1",onValueChange:i}),e[3]=p,e[4]=i,e[5]=d,e[6]=y,e[7]=r,e[8]=m):m=e[8];let w;e[9]!==u||e[10]!==a||e[11]!==n?(w=n&&!a&&c.jsx(u,{size:"smIcon",variant:"ghost",className:"pointer-events-auto absolute right-1 top-1 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity",onPress:n,children:c.jsx(Qr,{})}),e[9]=u,e[10]=a,e[11]=n,e[12]=w):w=e[12];let x;return e[13]!==h||e[14]!==m||e[15]!==w?(x=c.jsxs("div",{className:"relative group flex gap-2 items-center",children:[h,m,w]}),e[13]=h,e[14]=m,e[15]=w,e[16]=x):x=e[16],x}function WP(o){const e=Q.c(6),{value:r,type:t}=o;switch(t){case"hashtags":{const i=r.startsWith("#")?r:`#${r}`;let n;return e[0]!==i?(n=c.jsx(Wt,{children:i}),e[0]=i,e[1]=n):n=e[1],n}case"mentions":{let i;return e[2]!==r?(i=c.jsxs(Wt,{children:["@",r]}),e[2]=r,e[3]=i):i=e[3],i}case"urls":case"domains":case"langs":case"labels":{let i;return e[4]!==r?(i=c.jsx(Wt,{children:r}),e[4]=r,e[5]=i):i=e[5],i}}}function XP(o){const e=Q.c(10),{type:r,value:t,onChange:i,onDelete:n}=o,s=St();let l;e[0]!==i||e[1]!==r||e[2]!==t?(l=r==="langs"?c.jsx(ge,{"aria-label":"Language",value:t,placeholder:"Language",options:$P,className:"flex-1",onValueChange:i}):c.jsx(ge,{"aria-label":"Self Label",value:t,placeholder:"Self Label",options:bS,className:"flex-1",onValueChange:i}),e[0]=i,e[1]=r,e[2]=t,e[3]=l):l=e[3];let a;e[4]!==s||e[5]!==n?(a=n&&!s&&c.jsx(Ne,{size:"icon",variant:"ghost",className:"pointer-events-auto shrink-0 hidden group-hover:flex",onPress:n,children:c.jsx(Qr,{})}),e[4]=s,e[5]=n,e[6]=a):a=e[6];let d;return e[7]!==l||e[8]!==a?(d=c.jsxs("div",{className:"relative group flex gap-2 items-center pointer-events-auto",children:[l,a]}),e[7]=l,e[8]=a,e[9]=d):d=e[9],d}function Wx(o){const e=Q.c(50),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=t.props.operator==="in"?"green":"red";let a;e[0]!==t||e[1]!==n?(a=j=>n(t,j),e[0]=t,e[1]=n,e[2]=a):a=e[2];const d=a,p=St()||t.props.isReadOnly,u=Y.useRef(null),[h,y]=Y.useState(!1);let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m={onFocusWithinChange:y},e[3]=m):m=e[3];const{focusWithinProps:w}=mp(m);let x;e[4]!==t||e[5]!==n?(x=()=>
69{if(fa.flushSync(()=>{n(t,{entities:[...t.props.entities,""]})}),!u.current)return;const j=u.current.querySelectorAll("input");j&&j.values().toArray().at(-1)?.focus()},e[4]=t,e[5]=n,e[6]=x):x=e[6];const v=x,k=t.props.metadata?.pattern,A=t.props.metadata?.color||l;let S;e[7]!==v?(S=j=>{j.key==="Enter"&&j.metaKey&&(j.preventDefault(),j.stopPropagation(),v())},e[7]=v,e[8]=S):S=e[8];let E;e[9]!==t.props?(E=c.jsx(je,{props:t.props,docs:$d.docs}),e[9]=t.props,e[10]=E):E=e[10];let _;e[11]!==t||e[12]!==n?(_=j=>n(t,{operator:j}),e[11]=t,e[12]=n,e[13]=_):_=e[13];let C;e[14]!==t.props.operator||e[15]!==_?(C=c.jsx(ge,{"aria-label":"Inclusion Operator",className:"w-28",value:t.props.operator,onValueChange:_,options:Hn}),e[14]=t.props.operator,e[15]=_,e[16]=C):C=e[16];let O;e[17]!==t||e[18]!==n?(O=j=>n(t,{type:j,entities:[""]}),e[17]=t,e[18]=n,e[19]=O):O=e[19];let V;e[20]!==t.props.type||e[21]!==O?(V=c.jsx(ge,{"aria-label":"Entity Type",className:"flex-1",value:t.props.type,onValueChange:O,options:gS}),e[20]=t.props.type,e[21]=O,e[22]=V):V=e[22];let I;e[23]!==V||e[24]!==C?(I=c.jsxs("div",{className:"flex gap-2",children:[C,V]}),e[23]=V,e[24]=C,e[25]=I):I=e[25];let z;e[26]===Symbol.for("react.memo_cache_sentinel")?(z=c.jsx(Mt,{}),e[26]=z):z=e[26];let N;e[27]!==h||e[28]!==p||e[29]!==t||e[30]!==n?(N=p?c.jsx("div",{className:"flex flex-wrap gap-2",children:t.props.entities.map((j,L)=>c.jsx(WP,{type:t.props.type,value:j},`${t.id}-${j}-${L}`))}):c.jsxs(c.Fragment,{children:[c.jsx(hp,{columnCount:t.props.type==="mentions"?1:void 0,children:t.props.entities.map((j,L)=>{const U=ee=>{const ae=[...t.props.entities];ae[L]=ee,t.props.type==="mentions"&&(ae[L]=ee.replace(/^@/,"").trim()),n(t,{entities:ae})},W=()=>{const ee=[...t.props.entities];ee.splice(L,1),n(t,{entities:ee})};return t.props.type==="langs"||t.props.type==="labels"?c.jsx(XP,{type:t.props.type,value:j,onChange:U,onDelete:L===0?void 0:W},`${t.id}-entity-member-${L}`):c.jsx(KP,{type:t.props.type,value:j,onChange:U,onDelete:L===0?void 0:W},`${t.id}-entity-member-${L}`)})}),c.jsxs(Ne,{size:"sm",variant:"ghost",onPress:()=>n(t,{entities:[...t.props.entities,""]}),children:["Add Another",h&&c.jsx(Rp,{className:"hidden md:flex absolute top-1/2 right-2 -translate-y-1/2",children:c.jsx(Ap,{children:"Meta + â"})})]})]}),e[27]=h,e[28]=p,e[29]=t,e[30]=n,e[31]=N):N=e[31];let R;e[32]!==I||e[33]!==N?(R=c.jsx(Ee,{children:c.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-w-0",children:[I,z,N]})}),e[32]=I,e[33]=N,e[34]=R):R=e[34];let D;e[35]!==i||e[36]!==w||e[37]!==r||e[38]!==s||e[39]!==d||e[40]!==t.props.resultState||e[41]!==R||e[42]!==k||e[43]!==A||e[44]!==S||e[45]!==E?(D=c.jsxs(we,{ref:u,...w,resultState:t.props.resultState,pattern:k,isBound:r,className:i,variant:A,isSelected:s,onUpdateDimensions:d,dynamicHeight:!0,onKeyDownCapture:S,children:[E,R]}),e[35]=i,e[36]=w,e[37]=r,e[38]=s,e[39]=d,e[40]=t.props.resultState,e[41]=R,e[42]=k,e[43]=A,e[44]=S,e[45]=E,e[46]=D):D=e[46];let q;return e[47]!==t||e[48]!==D?(q=c.jsx(Se,{value:t,children:D}),e[47]=t,e[48]=D,e[49]=q):q=e[49],q}/** 70 * @license lucide-react v0.545.0 - ISC 71 * 72 * This source code is licensed under the ISC license. 73 * See the LICENSE file in the root directory of this source tree. 74 */const QP=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],JP=ke("layers",QP),tw=600,Gd=156,YP=44,ZP=48,rw=54,ow=14,e2=16;function t2(){const o=mu(Eo,{RemoveMinH:1,insensitive:2,loginInNode:3,starSyntax:4,defaultHeight:5,removeCustomNode:6});return hu({sequence:[{id:o.RemoveMinH,up(){}},{id:o.insensitive,up(){}},{id:o.loginInNode,up(){}},{id:o.starSyntax,up(){}},{id:o.defaultHeight,up(){}},{id:o.removeCustomNode,up(e){delete e.showCustomNodeParameters,delete e.customNodeParameters}}]})}class gO extends Pe{static migrations=t2();static type=Eo;getType(){return Eo}static props={h:F,w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),order:te("new","blend","trending","old","hackernews","wilson","personalized"),metadata:Ce,custom_sort_settings:Bn({decay_penalty:F.optional(),like_count_multiplier:F.optional(),reply_count_multiplier:F.optional(),repost_count_multiplier:F.optional(),reader_like_count_multiplier:F.optional(),reader_reply_count_multiplier:F.optional(),reader_repost_count_multiplier:F.optional(),request_less_count_multiplier:F.optional(),request_more_count_multiplier:F.optional(),time_window:F.optional(),thresholds:vS.optional(),gravity:F.optional(),time_offset:F.optional(),wilson_confidence_z:F.optional(),wilson_interaction_like_multiplier:F.optional(),wilson_interaction_reply_multiplier:F.optional(),wilson_interaction_repost_multiplier:F.optional(),wilson_interaction_quote_multiplier:F.optional(),wilson_request_more_multiplier:F.optional(),wilson_request_less_multiplier:F.optional(),foryou_similarity_threshold:F.optional(),foryou_similar_users_limit:F.optional(),foryou_recent_posts_limit:F.optional(),foryou_half_life_hours:F.optional(),foryou_smoothing_factor:F.optional(),foryou_popularity_penalty:F.optional(),foryou_divisor_power:F.optional(),foryou_time_shift_hours:F.optional(),foryou_ignore_order:oe.optional(),lens:kt(pe,rf).optional(),lenses:Xr(rf).optional(),max_days:F.optional()}).allowUnknownProperties().nullable().optional(),padding:Bn({top:F,right:F,bottom:F,left:F,gap:F}),title:pe.optional(),description:pe.optional(),hideSortSettings:oe.optional()};getDefaultProps(){return{w:tw,minW:tw,h:Gd,order:"new",padding:{top:YP+40,bottom:16,right:16,left:16,gap:14},title:"Feed",hideSortSettings:!1,metadata:void 0}}canBind({fromShapeType:e,toShapeType:r,bindingType:t}
74){return t==="arrow"?!0:e===Eo&&(yu.includes(r)||r===Aw)&&t==="layout"}canResize(){return!0}component(e){return c.jsx(o2,{shape:e,updateShape:this.updateProps.bind(this)})}getGeometry(e){return new Zd({width:Math.max(e.props.minW||0,e.props.w),height:Math.max(Gd,e.props.h),isFilled:!0})}indicator(e){return c.jsx("rect",{width:Math.max(e.props.minW||0,e.props.w),height:Math.max(Gd,e.props.h)})}}function r2(o){const e=Q.c(16),{shape:r,updateShape:t}=o,i=Y.use(wR);let n;e[0]!==i?(n=i.includes("new_orders"),e[0]=i,e[1]=n):n=e[1];const s=n,l=ua();let a,d;e[2]!==l?(a=()=>Px(l),d=[l],e[2]=l,e[3]=a,e[4]=d):(a=e[3],d=e[4]);const p=ia("feed-layers",a,d);let u;e[5]!==r.props.order?(u=nu(r.props.order),e[5]=r.props.order,e[6]=u):u=e[6];const h=u;let y;e[7]!==l||e[8]!==s||e[9]!==p||e[10]!==h||e[11]!==r||e[12]!==t?(y=h||p.length===0?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(ge,{"aria-label":"Sorting",name:"sticky_type",tooltip:"Sorting",value:r.props.order,options:[{value:"new",label:ri.new},{value:"trending",label:ri.trending},{value:"blend",label:ri.blend},{value:"old",label:ri.old},{value:"hackernews",label:ri.hackernews},{value:"personalized",label:"Personalized"},...s?[{value:"wilson",label:ri.wilson}]:[]],className:"flex-1",placeholder:"Sorting",onValueChange:w=>{const x=w;l.run(()=>{if(t(r,{order:x}),Nu(l),x&&!nu(x)){const v=l.getShape(r.id);v&&Mu(l,v)}})}}),h&&c.jsx("span",{className:"text-muted-foreground text-xs",children:"Personalized feeds are served by a different system and cannot be layered."})]}):null,e[7]=l,e[8]=s,e[9]=p,e[10]=h,e[11]=r,e[12]=t,e[13]=y):y=e[13];let m;return e[14]!==y?(m=c.jsx("div",{className:"page-summary flex flex-col gap-2 px-2.5",children:y}),e[14]=y,e[15]=m):m=e[15],m}function o2(o){const e=Q.c(39),{shape:r,updateShape:t}=o,i=ua();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=[Wr],e[0]=n):n=e[0];const s=ia("logic-atom",n2,n);let l,a;e[1]!==i||e[2]!==r.props.padding.gap?(l=()=>{const N=Oo(i);return N.length===0?0:N.reduce(i2,0)+(N.length-1)*r.props.padding.gap},a=[i,r.props.padding.gap],e[1]=i,e[2]=r.props.padding.gap,e[3]=l,e[4]=a):(l=e[3],a=e[4]);const d=ia("feed-page-stack",l,a),p=Y.useRef(null),[u,h]=Y.useState(0);let y;e[5]!==i||e[6]!==r.id||e[7]!==t?(y=N=>{h(N);const R=rw+N+ow,D=i.getShape(r.id);!D||D.props.padding.top===R||i.run(()=>t(D,{padding:{...D.props.padding,top:R}}),{history:"ignore"})},e[5]=i,e[6]=r.id,e[7]=t,e[8]=y):y=e[8];const m=y;let w;e[9]!==m?(w={ref:p,onUpdate:N=>{const R=N.borderBoxSize[0];R?.blockSize&&m(R.blockSize)}},e[9]=m,e[10]=w):w=e[10],Cw(w);let x;e[11]!==m||e[12]!==u?(x=()=>{const N=p.current;if(!N)return;const R=N.offsetHeight;R>0&&R!==u&&m(R)},e[11]=m,e[12]=u,e[13]=x):x=e[13],Y.useLayoutEffect(x);const v=Math.max(r.props.minW||0,r.props.w),k=Math.max(Gd,r.props.h),A=r.id===s&&"rounded-lg shadow-[0_0_0_4px_#0588F0]";let S;e[14]!==A?(S=he("flex flex-col gap-2",A),e[14]=A,e[15]=S):S=e[15];let E;e[16]!==r||e[17]!==t?(E=N=>{const{h:R}=N;r.props.hideSortSettings&&t(r,{h:R,padding:{...r.props.padding,top:44}})},e[16]=r,e[17]=t,e[18]=E):E=e[18];let _;e[19]!==r.props.description?(_=r.props.description||c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("p",{children:"This block is your feed. It has two parts, and they save together when you press Save."}),c.jsxs("p",{children:[c.jsx("strong",{children:"Page"})," (top, the layers icon) decides how each page a reader sees is put together: which orderings, and how much of the page each one gets."]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Rules"})," (below, the filter icon) decide which posts are allowed into the feed at all. A post has to pass the rules before any layer can show it."]})]}),e[19]=r.props.description,e[20]=_):_=e[20];const C=r.props.title||"Feed";let O;e[21]!==_||e[22]!==C?(O=c.jsx(na,{description:_,children:C}),e[21]=_,e[22]=C,e[23]=O):O=e[23];let V;e[24]!==u||e[25]!==d||e[26]!==r||e[27]!==t?(V=r.props.hideSortSettings?null:c.jsx(we,{asDiv:!0,variant:"bronze",className:"mx-3.5 mt-3.5 px-1 pt-1 flex flex-col gap-1 group pointer-events-auto sort-area-block",height:u>0?rw-ZP+u+(d>0?ow+d+e2:0):void 0,children:c.jsxs("div",{ref:p,className:"flex flex-col gap-1",children:[c.jsx(na,{description:c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("p",{children:"Every page a reader sees is built from the layers in this box. Each layer picks an ordering (newest first, trending, and so on) and takes a share of the page;
74 posts from all the layers are mixed in proportion, and when two layers pick the same post the one higher up gets it."}),c.jsx("p",{children:"Add layers from the Page palette (the layers icon at the left), drag them to reorder, and use a layerâs Only show / Move up buttons to give it an audience based on each readerâs own follows."})]}),children:c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx(JP,{className:"h-3.5 w-3.5"}),"Page"]})}),c.jsx(r2,{shape:r,updateShape:t})]})}),e[24]=u,e[25]=d,e[26]=r,e[27]=t,e[28]=V):V=e[28];let I;e[29]!==S||e[30]!==E||e[31]!==O||e[32]!==V||e[33]!==v||e[34]!==k?(I=c.jsxs(we,{width:v,height:k,className:S,onUpdateDimensions:E,children:[O,V]}),e[29]=S,e[30]=E,e[31]=O,e[32]=V,e[33]=v,e[34]=k,e[35]=I):I=e[35];let z;return e[36]!==r||e[37]!==I?(z=c.jsx(Se,{value:r,children:I}),e[36]=r,e[37]=I,e[38]=z):z=e[38],z}function i2(o,e){return o+e.props.h}function n2(){return Wr.get()}function s2(o){return o.getCurrentPageShapes().find(e=>e.type===Eo)}function a2(o){return o.type===Sr}class bO extends De{static id=Sr;static uiToolDef=e=>({id:Sr,icon:yx,label:Ks.docs.title,defaultColor:Ks.docs.defaultColor,onSelect:()=>e.setCurrentTool(Sr),docs:()=>c.jsx(Oe,{editor:e,component:Xx,util:Ks})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Sr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Ks extends Pe{static migrations=Ie(Sr);static type=Sr;static docs={defaultColor:"green",title:"Financial Sentiment Analysis",description:"Use AI to analyze the financial sentiment of the content. This determines if the post has a positive, negative, or neutral tone regarding financial topics."};getType(){return Sr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,financialSentimentAnalysisCategory:te(...Ow),operator:te(...Xe),value:kt(F,pe),metadata:Ce};getDefaultProps(){return{w:360,minW:400,h:He,financialSentimentAnalysisCategory:"Positive",operator:">=",value:.5,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(Xx,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function Xx(o){const e=Q.c(40),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=_=>n(t,_),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||"pink";let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:Ks.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=_=>n(t,{financialSentimentAnalysisCategory:_}),e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]!==t.props.financialSentimentAnalysisCategory||e[9]!==h?(y=c.jsx(ge,{"aria-label":"Financial Sentiment Analysis Category",options:Ow,value:t.props.financialSentimentAnalysisCategory,className:"w-[160px] shrink-0",onValueChange:h,tooltip:Ks.docs.description}),e[8]=t.props.financialSentimentAnalysisCategory,e[9]=h,e[10]=y):y=e[10];let m;e[11]!==t||e[12]!==n?(m=_=>n(t,{operator:_}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;e[14]!==t.props.operator||e[15]!==m?(w=c.jsx(it,{value:t.props.operator,onValueChange:m}),e[14]=t.props.operator,e[15]=m,e[16]=w):w=e[16];const x=t.props.value;let v;e[17]!==t||e[18]!==n?(v=_=>n(t,{value:_}),e[17]=t,e[18]=n,e[19]=v):v=e[19];let k;e[20]!==v||e[21]!==x?(k=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:x,className:"flex-1",placeholder:"Threshold",onValueChange:v})}),e[20]=v,e[21]=x,e[22]=k):k=e[22];let A;e[23]!==k||e[24]!==y||e[25]!==w?(A=c.jsxs(Ee,{children:[y,w,k]}),e[23]=k,e[24]=y,e[25]=w,e[26]=A):A=e[26];let S;e[27]!==i||e[28]!==r||e[29]!==s||e[30]!==a||e[31]!==t.props.resultState||e[32]!==A||e[33]!==d||e[34]!==p||e[35]!==u?(S=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,A]}),e[27]=i,e[28]=r,e[29]=s,e[30]=a,e[31]=t.props.resultState,e[32]=A,e[33]=d,e[34]=p,e[35]=u,e[36]=S):S=e[36];let E;return e[37]!==t||e[38]!==S?(E=c.jsx(Se,{value:t,children:S}),e[37]=t,e[38]=S,e[39]=E):E=e[39],E}/** 75 * @license lucide-react v0.545.0 - ISC 76 * 77 * This source code is licensed under the ISC license. 78 * See the LICENSE file in the root directory of this source tree. 79 */const c2=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],l2=ke("image-plus",c2);function d2(o){return o.type===Ar}class vO extends De{static id=Ar;static uiToolDef=e=>({id:Ar,icon:l2,label:oi.docs.title,defaultColor:oi.docs.defaultColor,onSelect:()=>e.setCurrentTool(Ar),docs:()=>c.jsx(Oe,{editor:e,component:Qx,util:oi})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Ar,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class oi extends Pe{static migrations=Ie(Ar);static type=Ar;static docs={defaultColor:"pink",title:"Image Categorization",description:"Use AI to analyze if images match any arbitrary category or concept. Enter any label and the model will assess how well the image matches that concept."};getType(){return Ar}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),h:F,isReadOnly:oe.optional(),tag:pe,operator:te(...Xe),value:kt(F,pe),metadata:Ce};getDefaultProps(){return{w:360,minW:400,h:He,tag:"",operator:">=",value:.5,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(Qx,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function Qx(o){const e=Q.c(85),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=O=>n(t,O),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=St();if(!Cn.includes(t.props.tag)){const O=t.props.resultState,V=t.props.metadata?.pattern;let I;e[3]!==i?(I=he(i,"animate-pulse"),e[3]=i,e[4]=I):I=e[4];const z=t.props.metadata?.color||oi.docs.defaultColor;let N;e[5]!==t.props?(N=c.jsx(je,{props:t.props,docs:oi.docs,isDeprecated:!0}),e[5]=t.props,e[6]=N):N=e[6];let R;e[7]!==t||e[8]!==n?(R=K=>n(t,{tag:K}),e[7]=t,e[8]=n,e[9]=R):R=e[9];let D;e[10]!==t.props.tag||e[11]!==R?(D=c.jsx(le,{message:"Enter any category or concept to analyze in images",children:c.jsx($e,{"aria-label":"Category",value:t.props.tag,type:"text",className:"w-[160px] shrink-0",placeholder:"Enter category...",onValueChange:R})}),e[10]=t.props.tag,e[11]=R,e[12]=D):D=e[12];let q;e[13]!==t||e[14]!==n?(q=K=>n(t,{operator:K}),e[13]=t,e[14]=n,e[15]=q):q=e[15];let j;e[16]!==t.props.operator||e[17]!==q?(j=c.jsx(it,{value:t.props.operator,onValueChange:q}),e[16]=t.props.operator,e[17]=q,e[18]=j):j=e[18];const L=t.props.value;let U;e[19]!==t||e[20]!==n?(U=K=>n(t,{value:K}),e[19]=t,e[20]=n,e[21]=U):U=e[21];let W;e[22]!==L||e[23]!==U?(W=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:L,className:"flex-1",placeholder:"Threshold",onValueChange:U})}),e[22]=L,e[23]=U,e[24]=W):W=e[24];let ee;e[25]!==j||e[26]!==W||e[27]!==D?(ee=c.jsxs("div",{className:"flex gap-2",children:[D,j,W]}),e[25]=j,e[26]=W,e[27]=D,e[28]=ee):ee=e[28];let ae;e[29]!==d||e[30]!==t||e[31]!==n?(ae=!d&&c.jsxs(c.Fragment,{children:[c.jsx(Mt,{}),c.jsxs("div",{className:"flex flex-col gap-2 py-2",children:[c.jsx(wt,{children:"Please choose a standard category"}),c.jsx(ge,{"aria-label":"Standard Category",options:Cn,placeholder:"Choose a standard category",onValueChange:K=>n(t,{tag:K})})]})]}),e[29]=d,e[30]=t,e[31]=n,e[32]=ae):ae=e[32];let de;e[33]!==ee||e[34]!==ae?(de=c.jsx(Ee,{children:c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[ee,ae]})}),e[33]=ee,e[34]=ae,e[35]=de):de=e[35];let ce;e[36]!==r||e[37]!==s||e[38]!==a||e[39]!==t.props.resultState||e[40]!==de||e[41]!==V||e[42]!==I||e[43]!==z||e[44]!==N?(ce=c.jsxs(we,{resultState:O,pattern:V,isBound:r,className:I,variant:z,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[N,de]}),e[36]=r,e[37]=s,e[38]=a,e[39]=t.props.resultState,e[40]=de,e[41]=V,e[42]=I,e[43]=z,e[44]=N,e[45]=ce):ce=e[45];let fe;return e[46]!==t||e[47]!==ce?(fe=c.jsx(Se,{value:t,children:ce}),e[46]=t,e[47]=ce,e[48]=fe):fe=e[48],fe}const u=t.props.metadata?.pattern,h=t.props.metadata?.color||oi.docs.defaultColor;let y;e[49]!==t.props?(y=c.jsx(je,{props:t.props,docs:oi.docs}),e[49]=t.props,e[50]=y):y=e[50];let m;e[51]!==t||e[52]!==n?(m=O=>n(t,{tag:O}),e[51]=t,e[52]=n,e[53]=m):m=e[53];let w;e[54]!==t.props.tag||e[55]!==m?(w=c.jsx(le,{message:"Enter any category or concept to analyze in images",children:c.jsx(ge,{"aria-label":"Category",options:Cn,placeholder:"Choose a standard category",className:"w-[160px] shrink-0",value:t.props.tag,onValueChange:m})}),e[54]=t.props.tag,e[55]=m,e[56]=w):w=e[56];let x;e[57]!==t||e[58]!==n?(x=O=>n(t,{operator:O}),e[57]=t,e[58]=n,e[59]=x):x=e[59];let v;e[60]!==t.props.operator||e[61]!==x?(v=c.jsx(it,{value:t.props.operator,onValueChange:x}),e[60]=t.props.operator,e[61]=x,e[62]=v):v=e[62];const k=t.props.value;let A;e[63]!==t||e[64]!==n?(A=O=>n(t,{value:O}),e[63]=t,e[64]=n,e[65]=A):A=e[65];let S;e[66]!==A||e[67]!==k?(S=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:k,className:"flex-1",placeholder:"Threshold",onValueChange:A})}),e[66]=A,e[67]=k,e[68]=S):S=e[68];let E;e[69]!==S||e[70]!==w||e[71]!==v?(E=c.jsxs(Ee,{children:[w,v,S]}),e[69]=S,e[70]=w,e[71]=v,e[72]=E):E=e[72];let _;e[73]!==r||e[74]!==s||e[75]!==a||e[76]!==t.props.resultState||e[77]!==E||e[78]!==u||e[79]!==h||e[80]!==y?(_=c.jsxs(we,{resultState:t.props.resultState,pattern:u,isBound:r,variant:h,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[y,E]}),e[73]=r,e[74]=s,e[75]=a,e[76]=t.props.resultState,e[77]=E,e[78]=u,e[79]=h,e[80]=y,e[81]=_):_=e[81];let C;return e[82]!==t||e[83]!==_?(C=c.jsx(Se,{value:t,children:_}),e[82]=t,e[83]=_,e[84]=C):C=e[84],C}/** 80 * @license lucide-react v0.545.0 - ISC 81 * 82 * This source code is licensed under the ISC license. 83 * See the LICENSE file in the root directory of this source tree. 84 */const p2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],u2=ke("image",p2);function f2(o){return o.type===Rr}class wO extends De{static id=Rr;static uiToolDef=e=>({id:Rr,icon:u2,label:Tn.docs.title,defaultColor:Tn.docs.defaultColor,onSelect:()=>e.setCurrentTool(Rr),docs:()=>c.jsx(Oe,{editor:e,component:Jx,util:Tn})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Rr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Tn extends Pe{static migrations=Ie(Rr);static type=Rr;static docs={defaultColor:"pink",title:"Image Moderation",description:"Use AI to analyze images for NSFW content. This helps filter posts based on image safety ratings."};getType(){return Rr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,imageModerationCategory:te(...Iw),operator:te(...Xe),value:kt(F,pe),metadata:Ce};getDefaultProps(){return{w:360,minW:400,h:He,imageModerationCategory:"SFW",operator:">=",value:.5,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(Jx,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function Jx(o){const e=Q.c(40),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=_=>n(t,_),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||Tn.docs.defaultColor;let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:Tn.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=_=>n(t,{imageModerationCategory:_}),e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]!==t.props.imageModerationCategory||e[9]!==h?(y=c.jsx(ge,{"aria-label":"Image Moderation Category",options:Iw,value:t.props.imageModerationCategory,className:"w-[160px] shrink-0",onValueChange:h,tooltip:Tn.docs.description}
84),e[8]=t.props.imageModerationCategory,e[9]=h,e[10]=y):y=e[10];let m;e[11]!==t||e[12]!==n?(m=_=>n(t,{operator:_}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;e[14]!==t.props.operator||e[15]!==m?(w=c.jsx(it,{value:t.props.operator,onValueChange:m}),e[14]=t.props.operator,e[15]=m,e[16]=w):w=e[16];const x=t.props.value;let v;e[17]!==t||e[18]!==n?(v=_=>n(t,{value:_}),e[17]=t,e[18]=n,e[19]=v):v=e[19];let k;e[20]!==v||e[21]!==x?(k=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:x,className:"flex-1",placeholder:"Threshold",onValueChange:v})}),e[20]=v,e[21]=x,e[22]=k):k=e[22];let A;e[23]!==k||e[24]!==y||e[25]!==w?(A=c.jsxs(Ee,{children:[y,w,k]}),e[23]=k,e[24]=y,e[25]=w,e[26]=A):A=e[26];let S;e[27]!==i||e[28]!==r||e[29]!==s||e[30]!==a||e[31]!==t.props.resultState||e[32]!==A||e[33]!==d||e[34]!==p||e[35]!==u?(S=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,A]}),e[27]=i,e[28]=r,e[29]=s,e[30]=a,e[31]=t.props.resultState,e[32]=A,e[33]=d,e[34]=p,e[35]=u,e[36]=S):S=e[36];let E;return e[37]!==t||e[38]!==S?(E=c.jsx(Se,{value:t,children:S}),e[37]=t,e[38]=S,e[39]=E):E=e[39],E}function m2(o){return o.type===_r}class xO extends De{static id=_r;static uiToolDef=e=>({id:_r,icon:Lx,label:qn.docs.title,defaultColor:qn.docs.defaultColor,onSelect:()=>e.setCurrentTool(_r),docs:()=>c.jsx(Oe,{editor:e,component:Yx,util:qn})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:_r,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class qn extends Pe{static migrations=Ie(_r);static type=_r;static docs={defaultColor:"green",title:"Language Analysis",description:"Use AI to analyze the language of the content. This is for when the post itself doesn't have a language tag."};getType(){return _r}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,languageAnalysisCategory:te(...Mw),operator:te(...Xe),value:kt(F,pe),metadata:Ce};getDefaultProps(){return{w:360,minW:400,h:He,languageAnalysisCategory:"English",operator:">=",value:.9,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(Yx,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function Yx(o){const e=Q.c(40),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=_=>n(t,_),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||qn.docs.defaultColor;let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:qn.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=_=>n(t,{languageAnalysisCategory:_}),e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]!==t.props.languageAnalysisCategory||e[9]!==h?(y=c.jsx(ge,{"aria-label":"Language Analysis Category",options:Mw,value:t.props.languageAnalysisCategory,className:"w-[160px] shrink-0",onValueChange:h,tooltip:qn.docs.description}),e[8]=t.props.languageAnalysisCategory,e[9]=h,e[10]=y):y=e[10];let m;e[11]!==t||e[12]!==n?(m=_=>n(t,{operator:_}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;e[14]!==t.props.operator||e[15]!==m?(w=c.jsx(it,{value:t.props.operator,onValueChange:m}),e[14]=t.props.operator,e[15]=m,e[16]=w):w=e[16];const x=t.props.value;let v;e[17]!==t||e[18]!==n?(v=_=>n(t,{value:_}),e[17]=t,e[18]=n,e[19]=v):v=e[19];let k;e[20]!==v||e[21]!==x?(k=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:x,className:"flex-1",placeholder:"Threshold",onValueChange:v})}),e[20]=v,e[21]=x,e[22]=k):k=e[22];let A;e[23]!==k||e[24]!==y||e[25]!==w?(A=c.jsxs(Ee,{children:[y,w,k]}),e[23]=k,e[24]=y,e[25]=w,e[26]=A):A=e[26];let S;e[27]!==i||e[28]!==r||e[29]!==s||e[30]!==a||e[31]!==t.props.resultState||e[32]!==A||e[33]!==d||e[34]!==p||e[35]!==u?(S=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,A]}),e[27]=i,e[28]=r,e[29]=s,e[30]=a,e[31]=t.props.resultState,e[32]=A,e[33]=d,e[34]=p,e[35]=u,e[36]=S):S=e[36];let E;return e[37]!==t||e[38]!==S?(E=c.jsx(Se,{value:t,children:S}),e[37]=t,e[38]=S,e[39]=E):E=e[39],E}/** 85 * @license lucide-react v0.545.0 - ISC 86 * 87 * This source code is licensed under the ISC license. 88 * See the LICENSE file in the root directory of this source tree. 89 */const h2=[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M16 12H3",key:"1a2rj7"}],["path",{d:"M11 19H3",key:"zflm78"}],["path",{d:"m15 18 2 2 4-4",key:"1szwhi"}]],y2=ke("list-check",h2);function Bu(o){const e=Q.c(20),{users:r,maxVisible:t,total:i}=o,n=t===void 0?10:t,[s,l]=Y.useState(!1);if(!r?.length)return null;let a,d,p;e[0]!==n||e[1]!==s||e[2]!==r?(p=s?r.slice(0,150):r.slice(0,n),a="flex flex-wrap gap-2",d=p.map(g2),e[0]=n,e[1]=s,e[2]=r,e[3]=a,e[4]=d,e[5]=p):(a=e[3],d=e[4],p=e[5]);let u;e[6]!==s||e[7]!==r.length?(u=r.length>
8910&&c.jsx(le,{message:s?"Show less":"Show more",children:c.jsx(Jr,{size:"icon","aria-label":s?"Show less":"Show more",variant:"ghost",className:"rounded-full border border-slatea-normal bg-slatea-ui",...ni,onClick:w=>{w.stopPropagation(),l(!s)},children:s?c.jsx(wS,{}):c.jsx(eu,{})})}),e[6]=s,e[7]=r.length,e[8]=u):u=e[8];let h;e[9]!==a||e[10]!==d||e[11]!==u?(h=c.jsxs("div",{className:a,children:[d,u]}),e[9]=a,e[10]=d,e[11]=u,e[12]=h):h=e[12];let y;e[13]!==s||e[14]!==i||e[15]!==p.length?(y=i>p.length&&s&&c.jsx("div",{className:"flex gap-2 items-center",children:c.jsxs("span",{className:"text-xs text-slate-dim py-3 px-2",children:["And ",i-p.length," more..."]})}),e[13]=s,e[14]=i,e[15]=p.length,e[16]=y):y=e[16];let m;return e[17]!==h||e[18]!==y?(m=c.jsxs("div",{children:[h,y]}),e[17]=h,e[18]=y,e[19]=m):m=e[19],m}function g2(o){return c.jsx("div",{className:"flex gap-2 items-center",children:c.jsx(le,{message:c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("span",{className:"font-semibold text-sm",children:o.display_name||o.handle}),c.jsxs("span",{className:"text-xs text-slate-dim",children:["@",o.handle]})]}),children:c.jsx(Co,{src:o.avatar,alt:o.handle})})},o.did)}function b2(o){const e=Q.c(11),{listUrl:r,hasSeparator:t,onCanonicalUrl:i}=o,n=t===void 0?!0:t;let s;e[0]!==r?(s=xS(r),e[0]=r,e[1]=s):s=e[1];const{data:l,isPending:a}=qo(s),d=l?.asset_metadata?.list?.uri;let p,u;e[2]!==d||e[3]!==r||e[4]!==i?(p=()=>
89{if(!i||!d)return;const y=kS(r,d);y!==r&&i(y)},u=[r,d,i],e[2]=d,e[3]=r,e[4]=i,e[5]=p,e[6]=u):(p=e[5],u=e[6]),Y.useEffect(p,u);let h;return e[7]!==n||e[8]!==a||e[9]!==l?(h=c.jsx(c.Fragment,{children:l&&l.asset_metadata?c.jsxs(c.Fragment,{children:[n&&c.jsx(Mt,{}),l.asset_metadata.list?.uri&&c.jsx(Nw,{avatar:l.asset_metadata.list.avatar,name:l.asset_metadata.list.name,creator:l.asset_metadata.list.creator,children:c.jsx(le,{message:"Total members",children:c.jsx("span",{className:"text-slatea-12 dark:text-slatedarka-12 bg-slatea-2 dark:bg-slatedarka-2 rounded-md px-2 py-1 text-xs border border-slatea-5 dark:border-slatedarka-5",children:l.asset_metadata.items?.length})})}),c.jsx(Mt,{}),l.asset_metadata.items&&c.jsx(Bu,{maxVisible:12,users:l.asset_metadata.items.map(v2),total:l.asset_value.length})]}):a?c.jsx("div",{className:"flex justify-center items-center p-2 h-8",children:c.jsx(Zr,{delay:1e3})}):c.jsx("div",{className:"text-sm text-slate-11 dark:text-slatedark-11 p-2",children:"This list is not yet in our system. Please verify the list URL and wait a few minutes for it to be indexed."})}),e[7]=n,e[8]=a,e[9]=l,e[10]=h):h=e[10],h}function v2(o){return o.subject}function Zx(o){const e=Q.c(13),{selectUrl:r,type:t}=o,[i,n]=Y.useState(""),[s,l]=Y.useState(!1),a=xR(i,500);let d;e[0]!==a||e[1]!==t?(d=SS({term:a,type:t}),e[0]=a,e[1]=t,e[2]=d):d=e[2];const{data:p,isPending:u}=qo(d);let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=c.jsx(le,{message:"Search for a starter pack",children:c.jsx(Vw,{asChild:!0,children:c.jsxs(Ne,{size:"icon",variant:"canvas",children:[c.jsx("span",{className:"sr-only",children:"Search lists"}),c.jsx(AS,{})]})})}),e[3]=h):h=e[3];let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=c.jsx(_R,{placeholder:"Search starter packs",onValueChange:n}),e[4]=y):y=e[4];let m;
89e[5]!==a||e[6]!==u||e[7]!==p||e[8]!==r?(m=c.jsx(Bw,{className:"p-0",...ni,children:c.jsxs(kR,{children:[y,c.jsx(SR,{children:a?u?c.jsx("div",{className:"h-10 w-full flex items-center justify-center text-slate-dim",children:c.jsx(Zr,{})}):c.jsx(AR,{children:p?.map(x=>{const v="record"in x?x.record:x;return c.jsxs(RR,{value:`${v.list||v.uri}-${x.term}`,onSelect:()=>{r(Kn(x.uri||v.uri)),l(!1)},children:[c.jsx(Co,{src:x.list?.avatar||x.creator.avatar,alt:x.list?.name||x.creator.handle}),c.jsxs("div",{className:"flex flex-col gap-1 flex-1",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("div",{className:"",children:v.name}),c.jsx("div",{className:"text-xs px-1 py-0.5 bg-slate-3 dark:bg-slatedark-4",children:x.list?.list_item_count||v.list_item_count})]}),v.description&&c.jsx("div",{className:"text-slate-dim text-xs",children:v.description})]})]},`${v.list}`)})}):c.jsx("div",{className:"px-3 py-2 text-slate-dim",children:"Enter a search term"})})]})}),e[5]=a,e[6]=u,e[7]=p,e[8]=r,e[9]=m):m=e[9];let w;return e[10]!==s||e[11]!==m?(w=c.jsxs(Lw,{open:s,onOpenChange:l,children:[h,m]}),e[10]=s,e[11]=m,e[12]=w):w=e[12],w}function w2(o){return o.type===jr}class kO extends De{static id=jr;static uiToolDef=e=>({id:jr,icon:y2,label:Ud.docs.title,kbd:"l",defaultColor:Ud.docs.defaultColor,onSelect:()=>e.setCurrentTool(jr),docs:()=>c.jsx(Oe,{editor:e,component:ek,util:Ud})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:jr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Ud extends Pe{static migrations=Ie(jr);static type=jr;static docs={defaultColor:"green",title:"Member of List",description:"Include or exclude the users in a list from the feed."};getType(){return jr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,listUrl:pe,operator:te(...xt),metadata:Ce};getDefaultProps(){return{w:500,minW:600,h:He,listUrl:"https://bsky.app/profile/profiledelta.com/lists/3limj7ouwje2a",operator:xt[0],metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(ek,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function ek(o){const e=Q.c(34),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=Y.use(bu),a=St()||t.props.isReadOnly,d=t.props.operator==="in"?"green":"red";let p;e[0]!==t||e[1]!==n?(p=_=>n(t,_),e[0]=t,e[1]=n,e[2]=p):p=e[2];const u=p,h=t.props.metadata?.pattern,y=t.props.metadata?.color||d;let m;e[3]!==t.props?(m=c.jsx(je,{props:t.props,docs:Ud.docs}),e[3]=t.props,e[4]=m):m=e[4];let w;e[5]!==l||e[6]!==a||e[7]!==t||e[8]!==n?(w=!a&&c.jsxs("div",{className:"flex gap-2",children:[c.jsx(ge,{"aria-label":"Inclusion Operator",className:"w-28",value:t.props.operator,onValueChange:_=>n(t,{operator:_}),options:Hn}),c.jsx(le,{message:"The URL of the list",children:c.jsx($e,{"aria-label":"List URL",value:t.props.listUrl,className:"flex-1",placeholder:"List Member URL",onValueChange:_=>n(t,{listUrl:_}),onInput:_=>{_.currentTarget.value.match(/^https:\S+\/lists\/\S+$/)||_.currentTarget.value.match(/^at:\S+\/app\.bsky\.graph\.list\/\S+$/)?_.currentTarget.setCustomValidity(""):l||(_.currentTarget.setCustomValidity("Please enter a valid list URL."),_.currentTarget.reportValidity())}})}),c.jsx(Zx,{type:"list",selectUrl:_=>{n(t,{listUrl:_})}})]}),e[5]=l,e[6]=a,e[7]=t,e[8]=n,e[9]=w):w=e[9];const x=!a;let v;e[10]!==a||e[11]!==t||e[12]!==n?(v=a?void 0:_=>n(t,{listUrl:_}),e[10]=a,e[11]=t,e[12]=n,e[13]=v):v=e[13];let k;e[14]!==t.props.listUrl||e[15]!==x||e[16]!==v?(k=c.jsx(b2,{listUrl:t.props.listUrl,hasSeparator:x,onCanonicalUrl:v}),e[14]=t.props.listUrl,e[15]=x,e[16]=v,e[17]=k):k=e[17];let A;e[18]!==w||e[19]!==k?(A=c.jsx(Ee,{children:c.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-w-0",children:[w,k]})}),e[18]=w,e[19]=k,e[20]=A):A=e[20];let S;e[21]!==i||e[22]!==r||e[23]!==s||e[24]!==u||e[25]!==t.props.resultState||e[26]!==h||e[27]!==y||e[28]!==m||e[29]!==A?(S=c.jsxs(we,{resultState:t.props.resultState,pattern:h,isBound:r,className:i,variant:y,isSelected:s,onUpdateDimensions:u,dynamicHeight:!0,children:[m,A]}),e[21]=i,e[22]=r,e[23]=s,e[24]=u,e[25]=t.props.resultState,e[26]=h,e[27]=y,e[28]=m,e[29]=A,e[30]=S):S=e[30];let E;return e[31]!==t||e[32]!==S?(E=c.jsx(Se,{value:t,children:S}),e[31]=t,e[32]=S,e[33]=E):E=e[33],E}/** 90 * @license lucide-react v0.545.0 - ISC 91 * 92 * This source code is licensed under the ISC license. 93 * See the LICENSE file in the root directory of this source tree. 94 */const x2=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],k2=ke("wand-sparkles",x2);function S2(o){return o.type===Er}class SO extends De{static id=Er;static uiToolDef=e=>
94({id:Er,icon:k2,label:Hd.docs.title,defaultColor:Hd.docs.defaultColor,onSelect:()=>e.setCurrentTool(Er),docs:()=>c.jsx(Oe,{editor:e,component:tk,util:Hd})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Er,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Hd extends Pe{static migrations=Ie(Er);static type=Er;static docs={defaultColor:"green",title:"Magic Audience",description:"Include or exclude the users in a Magic Audience from the feed."};getType(){return Er}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,magicAudienceId:F,operator:te(...xt),metadata:Ce};getDefaultProps(){return{w:300,minW:300,h:He,magicAudienceId:42,operator:xt[0],metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(tk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function tk(o){const e=Q.c(33),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=t.props.operator==="in"?"green":"red";let a;e[0]!==t||e[1]!==n?(a=S=>n(t,S),e[0]=t,e[1]=n,e[2]=a):a=e[2];const d=a,p=t.props.metadata?.pattern,u=t.props.metadata?.color||l;let h;e[3]!==t.props?(h=c.jsx(je,{props:t.props,docs:Hd.docs}),e[3]=t.props,e[4]=h):h=e[4];let y;e[5]!==t||e[6]!==n?(y=S=>n(t,{magicAudienceId:S}),e[5]=t,e[6]=n,e[7]=y):y=e[7];let m;e[8]!==t.props.magicAudienceId||e[9]!==y?(m=c.jsx(le,{message:"The Magic Audience ID",children:c.jsx(ku,{"aria-label":"Magic Audience ID",value:t.props.magicAudienceId,className:"flex-1",placeholder:"Magic Audience ID",min:0,onValueChange:y})}),e[8]=t.props.magicAudienceId,e[9]=y,e[10]=m):m=e[10];let w;e[11]!==t||e[12]!==n?(w=S=>n(t,{operator:S}),e[11]=t,e[12]=n,e[13]=w):w=e[13];let x;e[14]!==t.props.operator||e[15]!==w?(x=c.jsx(ge,{"aria-label":"Inclusion Operator",className:"w-24",value:t.props.operator,onValueChange:w,options:Hn}),e[14]=t.props.operator,e[15]=w,e[16]=x):x=e[16];let v;e[17]!==m||e[18]!==x?(v=c.jsxs(Ee,{children:[m,x]}),e[17]=m,e[18]=x,e[19]=v):v=e[19];let k;e[20]!==i||e[21]!==r||e[22]!==s||e[23]!==d||e[24]!==t.props.resultState||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==v?(k=c.jsxs(we,{resultState:t.props.resultState,pattern:p,isBound:r,className:i,variant:u,isSelected:s,onUpdateDimensions:d,dynamicHeight:!0,children:[h,v]}),e[20]=i,e[21]=r,e[22]=s,e[23]=d,e[24]=t.props.resultState,e[25]=p,e[26]=u,e[27]=h,e[28]=v,e[29]=k):k=e[29];let A;return e[30]!==t||e[31]!==k?(A=c.jsx(Se,{value:t,children:k}),e[30]=t,e[31]=k,e[32]=A):A=e[32],A}function A2(o){return o.type===Cr}class AO extends De{static id=Cr;static uiToolDef=e=>({id:Cr,icon:jR,label:Ws.docs.title,defaultColor:Ws.docs.defaultColor,onSelect:()=>e.setCurrentTool(Cr),docs:()=>c.jsx(Oe,{editor:e,component:rk,util:Ws})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Cr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Ws extends Pe{static migrations=Ie(Cr);static type=Cr;getType(){return Cr}static docs={defaultColor:"pink",title:"Model Probability",description:c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("div",{children:"Run the post's text against a pretrained model."}),c.jsx("div",{children:"The model should return a probability between 0 and 1 for the post's likelyhood of being a match."})]})};static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,modelName:pe,operator:te(...Xe),threshold:F,metadata:Ce};getDefaultProps(){return{w:300,minW:300,h:134,modelName:"all-MiniLM-L6-v2",operator:">=",threshold:.75,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(rk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function rk(o){const e=Q.c(42),{isSelected:r,isBound:t,shape:i,className:n,updateShape:s}=o;let l;e[0]!==i||e[1]!==s?(l=_=>s(i,_),e[0]=i,e[1]=s,e[2]=l):l=e[2];const a=l,d=i.props.metadata?.pattern,p=i.props.metadata?.color||Ws.docs.defaultColor;let u;e[3]!==i.props?(u=c.jsx(je,{props:i.props,docs:Ws.docs}),e[3]=i.props,e[4]=u):u=e[4];let h;e[5]!==i||e[6]!==s?(h=_=>s(i,{modelName:_}),e[5]=i,e[6]=s,e[7]=h):h=e[7];let y;e[8]!==i.props.modelName||e[9]!==h?(y=c.jsx(le,{message:"The name of the transformer model used for embeddings.",children:c.jsx($e,{"aria-label":"Model Name",value:i.props.modelName,placeholder:"Model Name",onValueChange:h})}),e[8]=i.props.modelName,e[9]=h,e[10]=y):y=e[10];let m;e[11]!==i||e[12]!==s?(m=_=>s(i,{operator:_}),e[11]=i,e[12]=s,e[13]=m):m=e[13];let w;e[14]!==i.props.operator||e[15]!==m?(w=c.jsx(ge,{"aria-label":"Comparison Operator",className:"w-20",tooltip:"
94Comparison operator",value:i.props.operator,options:Xe,onValueChange:m}),e[14]=i.props.operator,e[15]=m,e[16]=w):w=e[16];let x;e[17]!==i||e[18]!==s?(x=_=>s(i,{threshold:_}),e[17]=i,e[18]=s,e[19]=x):x=e[19];let v;e[20]!==i.props.threshold||e[21]!==x?(v=c.jsx(le,{message:"The similarity threshold.",children:c.jsx(Ye,{"aria-label":"Threshold",value:i.props.threshold,placeholder:"Threshold",className:"flex-1",onValueChange:x})}),e[20]=i.props.threshold,e[21]=x,e[22]=v):v=e[22];let k;e[23]!==v||e[24]!==w?(k=c.jsxs("div",{className:"flex gap-2",children:[w,v]}),e[23]=v,e[24]=w,e[25]=k):k=e[25];let A;e[26]!==k||e[27]!==y?(A=c.jsx(Ee,{children:c.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-w-0",children:[y,k]})}),e[26]=k,e[27]=y,e[28]=A):A=e[28];let S;e[29]!==n||e[30]!==t||e[31]!==r||e[32]!==a||e[33]!==i.props.resultState||e[34]!==A||e[35]!==d||e[36]!==p||e[37]!==u?(S=c.jsxs(we,{resultState:i.props.resultState,pattern:d,isBound:t,className:n,variant:p,isSelected:r,onUpdateDimensions:a,dynamicHeight:!0,children:[u,A]}),e[29]=n,e[30]=t,e[31]=r,e[32]=a,e[33]=i.props.resultState,e[34]=A,e[35]=d,e[36]=p,e[37]=u,e[38]=S):S=e[38];let E;return e[39]!==i||e[40]!==S?(E=c.jsx(Se,{value:i,children:S}),e[39]=i,e[40]=S,e[41]=E):E=e[41],E}/** 95 * @license lucide-react v0.545.0 - ISC 96 * 97 * This source code is licensed under the ISC license. 98 * See the LICENSE file in the root directory of this source tree. 99 */const R2=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],_2=ke("list-todo",R2),j2=/[\\.+*?()|[\]{}^$#&~-]/g;function iw(o){return o.replace(j2,"\\$&")}const nw=o=>o===void 0||/\s/.test(o);function ok(o){const e=[];for(let r=0;r<o.length;r++)o[r]==="*"&&(r>0&&o[r-1]==="."||(nw(o[r-1])||nw(o[r+1]))&&e.push(r));return e}const E2=/\\[bBdDsSwWAZzn]|\(\?|\[\^|\[[^\]]*-[^\]]*\]|\.[*+]|\{\d+,?\d*\}/;function ik(o){return E2.test(o)}function C2(o,e){if(e)return[];const r=[];return o.forEach((t,i)=>{typeof t!="string"||t===""||(ok(t).length>0?r.push({index:i,term:t,kind:"glob"}):ik(t)&&r.push({index:i,term:t,kind:"regex"}))}),r}function nk(o){return o.map(e=>{if(typeof e!="string")return e;const r=ok(e);if(r.length===0)return ik(e)?e:iw(e);const t=new Set(r);let i="";for(let n=0;n<e.length;n++)i+=t.has(n)?".*":iw(e[n]);return i})}function P2(o){const e=o.replace(/^\(\?-?[imsxU]+\)/,"");for(const r of[o,e]){try{return new RegExp(r),!0}catch{}try{return new RegExp(r,"u"),!0}catch{}}return!1}function T2(o){return nk(o).filter(e=>!P2(e))}const q2=48;function D2(o){return o.type===ur&&["any","none"].includes(o.props.type)}class RO extends De{static id=ur;static uiToolDef=e=>({id:ur,icon:_2,label:Xs.docs.title,defaultColor:Xs.docs.defaultColor,kbd:"t",onSelect:()=>e.setCurrentTool(ur),docs:()=>c.jsx(Oe,{editor:e,component:sk,util:Xs})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:ur,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Xs extends Pe{static migrations=Ie(ur);static type=ur;static docs={defaultColor:"green",title:"Word List",description:"Match/exclude a post based on a list of words. If any of the words match, the filter is active."};getType(){return ur}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,var:pe,regex:Xr(pe),type:te("any","none"),insensitive:oe.optional(),regex_match:oe.optional(),metadata:Ce};getDefaultProps(){return{w:350,minW:350,h:184,var:fp[0],regex:["alf"],type:"any",insensitive:!0,regex_match:!1,metadata:void 0}}onBeforeCreate(e){const{regex:r}=e.props;r.length>1&&(e.props.h+=(r.length-1)*q2)}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(sk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function O2(o){const e=Q.c(21),{shape:r,updateShape:t}=o;let i,n,s,l;if(e[0]!==r.props.regex||e[1]!==r.props.regex_match){l=Symbol.for("react.early_return_sentinel");e:{if(i=C2(r.props.regex,r.props.regex_match),i.length===0){l=null;break e}let x;e[6]!==r.props.regex?(x=T2(r.props.regex),e[6]=r.props.regex,e[7]=x):x=e[7],n=x,s=i.slice(0,3).map(I2).join(", ")}e[0]=r.props.regex,e[1]=r.props.regex_match,e[2]=i,e[3]=n,e[4]=s,e[5]=l}else i=e[2],n=e[3],s=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;const a=s,d=i.length-Math.min(i.length,3),p=d>0?` and ${d} more`:"",u=i.length===1?" is":" are",h=i.length===1?"it":"they";let y;e[8]!==a||e[9]!==p||e[10]!==u||e[11]!==h?(y=c.jsxs("span",{children:[a,p,u," matched as text, punctuation and all, so ",h," can never match a post."]}),e[8]=a,e[9]=p,e[10]=u,e[11]=h,e[12]=y):y=e[12];let m;e[13]!==n[0]||e[14]!==n.length||e[15]!==r||e[16]!==t?(m=n.length>0?c.jsxs("span",{children:["Fix ",`â${n[0]}â`," before switching this node to Regex Match â it is not a pattern any engine can read."]}):c.jsx(Ne,{size:"sm",variant:"outline",className:"self-start",onPress:()=>t(r,{regex:nk(r.props.regex),regex_match:!0}),children:"Use Regex Match"}),e[13]=n[0],e[14]=n.length,e[15]=r,e[16]=t,e[17]=m):m=e[17];let w;return e[18]!==y||e[19]!==m?(w=c.jsxs("div",{className:"flex flex-col gap-1 text-xs text-amber-11 dark:text-amberdark-11",children:[y,m]}),e[18]=y,e[19]=m,e[20]=w):w=e[20],w}function I2(o){return`â${o.term}â`}function sk(o){const e=Q.c(82),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=St()||t.props.isReadOnly,a=t.props.type==="match"||t.props.type==="any"?"green":"red";let d;e[0]!==t||e[1]!==n?(d=ue=>n(t,ue),e[0]=t,e[1]=n,e[2]=d):d=e[2];const p=d,u=Y.useRef(null),[h,y]=Y.useState(!1);let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m={onFocusWithinChange:y},e[3]=m):m=e[3];const{focusWithinProps:w}=mp(m);let x;e[4]!==t||e[5]!==n?(x=()=>
99{if(fa.flushSync(()=>{n(t,{regex:[...t.props.regex,""]})}),!u.current)return;u.current.querySelectorAll("input").values().toArray().at(-1)?.focus()},e[4]=t,e[5]=n,e[6]=x):x=e[6];const v=x,k=t.props.metadata?.pattern,A=t.props.metadata?.color||a;let S;e[7]!==v?(S=ue=>{ue.key==="Enter"&&ue.metaKey&&(ue.preventDefault(),ue.stopPropagation(),v())},e[7]=v,e[8]=S):S=e[8];const E=`${t.props.insensitive?"":"Case Sensitive "}${t.props.regex_match?"Regex List":Xs.docs.title}`;let _;e[9]!==E?(_={...Xs.docs,title:E},e[9]=E,e[10]=_):_=e[10];let C;e[11]!==t.props||e[12]!==_?(C=c.jsx(je,{props:t.props,docs:_}),e[11]=t.props,e[12]=_,e[13]=C):C=e[13];let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O=c.jsx(le,{message:"Settings",children:c.jsx(gp,{asChild:!0,className:"pointer-events-auto",...ni,children:c.jsxs(Zp,{variant:"outline",pressed:!1,children:[c.jsx("span",{className:"sr-only",children:"Settings"}),c.jsx(Tw,{})]})})}),e[14]=O):O=e[14];let V;e[15]!==t||e[16]!==n?(V=()=>{const ue=[...t.props.regex].sort();JSON.stringify(ue)===JSON.stringify(t.props.regex)&&ue.reverse(),n(t,{regex:ue})},e[15]=t,e[16]=n,e[17]=V):V=e[17];let I;e[18]===Symbol.for("react.memo_cache_sentinel")?(I=c.jsx(Fx,{}),e[18]=I):I=e[18];let z;e[19]!==V?(z=c.jsxs(Ge,{onSelect:V,children:[I,"Sort Alphabetically"]}),e[19]=V,e[20]=z):z=e[20];let N,R;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=c.jsx(Kr,{}),R=c.jsx(gR,{children:"Settings"}),e[21]=N,e[22]=R):(N=e[21],R=e[22]);const D=!t.props.insensitive;let q;e[23]!==t||e[24]!==n?(q=ue=>n(t,{insensitive:!ue}),e[23]=t,e[24]=n,e[25]=q):q=e[25];let j;e[26]!==D||e[27]!==q?(j=c.jsx(uf,{checked:D,onCheckedChange:q,children:"Case Sensitive"}),e[26]=D,e[27]=q,e[28]=j):j=e[28];let L;e[29]!==t||e[30]!==n?(L=ue=>n(t,{regex_match:ue}),e[29]=t,e[30]=n,e[31]=L):L=e[31];let U;e[32]!==t.props.regex_match||e[33]!==L?(U=c.jsx(uf,{checked:t.props.regex_match,onCheckedChange:L,children:"Regex Match"}),e[32]=t.props.regex_match,e[33]=L,e[34]=U):U=e[34];let W;e[35]!==z||e[36]!==j||e[37]!==U?(W=c.jsxs(yp,{children:[O,c.jsxs(bp,{align:"start",...ni,children:[z,N,R,j,U]})]}),e[35]=z,e[36]=j,e[37]=U,e[38]=W):W=e[38];let ee;e[39]!==t||e[40]!==n?(ee=ue=>n(t,{var:ue}),e[39]=t,e[40]=n,e[41]=ee):ee=e[41];let ae;e[42]!==t.props.var||e[43]!==ee?(ae=c.jsx(Po,{validOperators:vu,className:"flex-1",value:t.props.var,onValueChange:ee}),e[42]=t.props.var,e[43]=ee,e[44]=ae):ae=e[44];let de;e[45]!==W||e[46]!==ae?(de=c.jsxs("div",{className:"flex gap-2 flex-1",children:[W,ae]}),e[45]=W,e[46]=ae,e[47]=de):de=e[47];let ce;e[48]===Symbol.for("react.memo_cache_sentinel")?(ce=[{value:"any",label:"contains"},{value:"none",label:"missing"}],e[48]=ce):ce=e[48];let fe;e[49]!==t||e[50]!==n?(fe=ue=>n(t,{type:ue}),e[49]=t,e[50]=n,e[51]=fe):fe=e[51];let K;e[52]!==t.props.type||e[53]!==fe?(K=c.jsx("div",{className:"flex-1",children:c.jsx(ge,{"aria-label":"Regex Match Type",value:t.props.type,options:ce,placeholder:"Type",className:"w-full",onValueChange:fe})}),e[52]=t.props.type,e[53]=fe,e[54]=K):K=e[54];let Me;e[55]!==de||e[56]!==K?(Me=c.jsxs("div",{className:"flex gap-2",children:[de,K]}),e[55]=de,e[56]=K,e[57]=Me):Me=e[57];let Ve;e[58]===Symbol.for("react.memo_cache_sentinel")?(Ve=c.jsx(Mt,{}),e[58]=Ve):Ve=e[58];let me;e[59]!==h||e[60]!==l||e[61]!==t||e[62]!==n?(me=l?c.jsx("div",{className:"flex flex-wrap gap-2",children:t.props.regex.map((ue,xe)=>c.jsx(Wt,{children:ue},`${t.id}-${ue}-${xe}`))}):c.jsxs(c.Fragment,{children:[t.props.regex_match?c.jsx("div",{className:"flex flex-col gap-2",children:t.props.regex.map((ue,xe)=>c.jsxs("div",{className:"relative group",children:[c.jsx(ci,{minRows:1,"aria-label":"Word to match",className:"min-h-[32px] text-wrap break-all pr-10",value:ue,placeholder:"Word to match",onValueChange:be=>{const Le=[...t.props.regex];Le[xe]=be,n(t,{regex:Le})}}),t.props.regex.length>1&&!l&&c.jsx(Ne,{size:"smIcon",variant:"ghost",className:"pointer-events-auto absolute right-1 top-[3px] opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity",onPress:()=>{const be=[...t.props.regex];be.splice(xe,1),n(t,{regex:be})},children:c.jsx(Qr,{})})]},`${t.id}-list-member-${xe}`))}):c.jsx(hp,{children:t.props.regex.map((ue,xe)=>c.jsxs("div",{className:"relative group",children:[c.jsx($e,{"aria-label":"Word to match",value:ue,placeholder:"Word to match",onValueChange:be=>{const Le=[...t.props.regex];Le[xe]=be,n(t,{regex:Le})},onBlur:()=>{const be=[...t.props.regex];n(t,{regex:Array.from(new Set(be))})}}),t.props.regex.length>1&&!l&&c.jsx(Ne,{size:"smIcon",variant:"ghost",className:"pointer-events-auto absolute right-1 top-1 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity",onPress:()=>{const be=[...t.props.regex];be.splice(xe,1),n(t,{regex:be})},children:c.jsx(Qr,{})})]},`${t.id}-list-member-${xe}`))}),c.jsxs(Ne,{size:"sm",variant:"ghost",onPress:()=>n(t,{regex:[...t.props.regex,""]}),children:["Add Another",h&&c.jsx(Rp,{className:"hidden md:flex absolute top-1/2 right-2 -translate-y-1/2",children:c.jsx(Ap,{children:"Meta + â"})})]}),c.jsx(O2,{shape:t,updateShape:n})]}),e[59]=h,e[60]=l,e[61]=t,e[62]=n,e[63]=me):me=e[63];let Ae;e[64]!==Me||e[65]!==me?(Ae=c.jsx(Ee,{children:c.jsxs("div",{className:"flex-1 flex flex-col gap-2",children:[Me,Ve,me]})}),e[64]=Me,e[65]=me,e[66]=Ae):Ae=e[66];let Re;e[67]!==i||e[68]!==w||e[69]!==r||e[70]!==s||e[71]!==p||e[72]!==t.props.resultState||e[73]!==Ae||e[74]!==k||e[75]!==A||e[76]!==S||e[77]!==C?(Re=c.jsxs(we,{ref:u,...w,resultState:t.props.resultState,pattern:k,isBound:r,className:i,variant:A,isSelected:s,onUpdateDimensions:p,dynamicHeight:!0,onKeyDownCapture:S,children:[C,Ae]}),e[67]=i,e[68]=w,e[69]=r,e[70]=s,e[71]=p,e[72]=t.props.resultState,e[73]=Ae,e[74]=k,e[75]=A,e[76]=S,e[77]=C,e[78]=Re):Re=e[78];let Te;return e[79]!==t||e[80]!==Re?(Te=c.jsx(Se,{value:t,children:Re}),e[79]=t,e[80]=Re,e[81]=Te):Te=e[81],Te}const ak=2e3;function M2(o){return o.type===Pr}class _O extends De{static id=Pr;static uiToolDef=e=>({id:Pr,icon:Xw,label:Qs.docs.title,defaultColor:Qs.docs.defaultColor,rateLimited:!0,onSelect:()=>e.setCurrentTool(Pr),docs:()=>c.jsx(Oe,{editor:e,component:ck,util:Qs})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Pr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Qs extends Pe{static migrations=Ie(Pr);static type=Pr;static docs={defaultColor:"blue",title:"Natural Language",description:c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("div",{children:"Scores a post against a criterion you write in plain language, and compares that score against your threshold."}),c.jsxs("div",{children:[c.jsx("span",{className:"font-medium",children:"Rate limited."})," Each post is scored on a GPU, so every feed gets"," ",c.jsxs("span",{className:"font-medium",children:[ak.toLocaleStr
99ing()," scored posts an hour"]}),". You are charged only for posts this node actually judges, so putting cheaper conditions above it â a language, keyword or author filter â is what keeps a feed inside the budget. Repeats of a post you have already judged are free."]}),c.jsx("div",{children:"When the budget runs out the node stops judging until the hour turns over. âAdmit posts when over budgetâ decides what it answers in the meantime: off, it matches nothing and your feed goes quiet; on, it stops filtering and lets everything through. Your feedâs Rate limits page shows the hours it ran out, for the last 30 days."}),c.jsxs("div",{children:[c.jsx("span",{className:"font-medium",children:"How you word it changes the score."})," ","Write a statement about the post, and say what to leave out in the same sentence rather than adding a second condition for it â âis about the NBA and does not mention trade rumoursâ separates posts far more sharply than an âis about the NBAâ condition and a âmentions trade rumoursâ one side by side, and costs one scoring pass instead of two."]}),c.jsxs("div",{children:["Exclusions work best as â",c.jsx("span",{className:"font-medium",children:"and does not â¦"}),"â. âbut not about â¦â also works. âother than â¦â does not â it pushes every score toward zero, so nothing clears the threshold. Naming something the posts never mention is harmless; it will not quietly suppress them."]}),c.jsx("div",{children:"Keep it to one idea and its exclusions. Long criteria stacking four or five unrelated clauses score worse than short ones, not better."})]})};getType(){return Pr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,prompt:pe,operator:te(...Xe),threshold:F,overQuota:oe.optional(),metadata:Ce};getDefaultProps(){return{w:300,minW:400,h:205,prompt:"",threshold:.75,operator:">=",overQuota:!1,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(ck,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function ck(o){const e=Q.c(51),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=N=>n(t,N),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.resultState,p=t.props.metadata?.pattern,u=t.props.metadata?.color||Qs.docs.defaultColor;let h;e[3]!==t.props?(h=c.jsx(je,{props:t.props,docs:Qs.docs}),e[3]=t.props,e[4]=h):h=e[4];let y;e[5]!==t||e[6]!==n?(y=N=>n(t,{prompt:N}),e[5]=t,e[6]=n,e[7]=y):y=e[7];let m;e[8]!==t.props.prompt||e[9]!==y?(m=c.jsx(ci,{value:t.props.prompt,placeholder:"e.g. is a job posting and does not mention internships",maxLength:1e3,onValueChange:y}),e[8]=t.props.prompt,e[9]=y,e[10]=m):m=e[10];let w;e[11]!==t||e[12]!==n?(w=N=>n(t,{operator:N}),e[11]=t,e[12]=n,e[13]=w):w=e[13];let x;e[14]!==t.props.operator||e[15]!==w?(x=c.jsx(it,{value:t.props.operator,onValueChange:w}),e[14]=t.props.operator,e[15]=w,e[16]=x):x=e[16];let v;e[17]!==t||e[18]!==n?(v=N=>n(t,{threshold:N}),e[17]=t,e[18]=n,e[19]=v):v=e[19];let k;e[20]!==t.props.threshold||e[21]!==v?(k=c.jsx(le,{variant:"markdown",message:"The confidence threshold. Scores pile up near 0% and near 100% rather than spreading evenly, so most thresholds between them behave alike â 50% and 80% usually select the same posts. If moving it has no effect, move it a long way rather than a little, and check the wording of the criterion above.",children:c.jsx(Ye,{"aria-label":"Threshold",value:t.props.threshold,placeholder:"Threshold",className:"flex-1",onValueChange:v})}),e[20]=t.props.threshold,e[21]=v,e[22]=k):k=e[22];let A;e[23]!==k||e[24]!==x?(A=c.jsxs("div",{className:"flex gap-2",children:[x,k]}),e[23]=k,e[24]=x,e[25]=A):A=e[25];let S;e[26]===Symbol.for("react.memo_cache_sentinel")?(S=ak.toLocaleString(),e[26]=S):S=e[26];let E;e[27]===Symbol.for("react.memo_cache_sentinel")?(E=c.jsx(le,{message:`Scoring runs on a GPU, so each feed can have ${S} posts scored an hour. Off: once the budget is gone this condition matches nothing and the feed goes quiet. On: it stops filtering and lets everything through.`,children:c.jsx("span",{className:"text-xs text-muted-foreground",children:"Admit posts when over budget"})}),e[27]=E):E=e[27];const _=t.props.overQuota??!1;let C;e[28]!==t||e[29]!==n?(C=N=>n(t,{overQuota:N}),e[28]=t,e[29]=n,e[30]=C):C=e[30];let O;
99e[31]!==_||e[32]!==C?(O=c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[E,c.jsx(sa,{checked:_,onCheckedChange:C})]}),e[31]=_,e[32]=C,e[33]=O):O=e[33];let V;e[34]!==A||e[35]!==O||e[36]!==m?(V=c.jsx(Ee,{children:c.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-w-0",children:[m,A,O]})}),e[34]=A,e[35]=O,e[36]=m,e[37]=V):V=e[37];let I;e[38]!==i||e[39]!==r||e[40]!==s||e[41]!==a||e[42]!==t.props.resultState||e[43]!==V||e[44]!==p||e[45]!==u||e[46]!==h?(I=c.jsxs(we,{resultState:d,pattern:p,isBound:r,className:i,variant:u,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[h,V]}),e[38]=i,e[39]=r,e[40]=s,e[41]=a,e[42]=t.props.resultState,e[43]=V,e[44]=p,e[45]=u,e[46]=h,e[47]=I):I=e[47];let z;return e[48]!==t||e[49]!==I?(z=c.jsx(Se,{value:t,children:I}),e[48]=t,e[49]=I,e[50]=z):z=e[50],z}/** 100 * @license lucide-react v0.545.0 - ISC 101 * 102 * This source code is licensed under the ISC license. 103 * See the LICENSE file in the root directory of this source tree. 104 */const N2=[["line",{x1:"5",x2:"19",y1:"9",y2:"9",key:"1nwqeh"}],["line",{x1:"5",x2:"19",y1:"15",y2:"15",key:"g8yjpy"}]],B2=ke("equal",N2);function V2(o){return o.type===dr}class jO extends De{static id=dr;static uiToolDef=e=>({id:dr,icon:B2,label:"Param Compare",defaultColor:sw.docs.defaultColor,onSelect:()=>e.setCurrentTool(dr),docs:()=>c.jsx(Oe,{editor:e,component:lk,util:sw})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:dr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class sw extends Pe{static migrations=Ie(dr);static type=dr;static docs={defaultColor:"blue",title:"Param Compare",description:"Use this node to compare a parameter to a value."};getType(){return dr}static props={w:F,minW:F,resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,metadata:Ce,compare:pe,var:pe,operator:te(...Xe)};getDefaultProps(){return{w:320,minW:320,h:101,compare:"",var:"",operator:"=="}}canBind({toShapeType:e,bindingType:r}){return r==="arrow"?!0:yu.includes(e)&&r==="layout"}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(lk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function lk(o){const e=Q.c(51),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=t.props.compare==="off"||t.props.compare==="false"?"red":"green";let a;e[0]!==t||e[1]!==n?(a=D=>n(t,D),e[0]=t,e[1]=n,e[2]=a):a=e[2];const d=a;let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=[Wr],e[3]=p):p=e[3];const u=ia("param-compare-atom",z2,p),h=t.props.resultState,y=t.props.metadata?.pattern,m=u&&t.id===u&&"rounded-lg shadow-[0_0_0_4px_#0588F0]";let w;e[4]!==i||e[5]!==m?(w=he(i,m),e[4]=i,e[5]=m,e[6]=w):w=e[6];const x=Math.max(t.props.minW||0,t.props.w),v=t.props.metadata?.color||l;let k;e[7]!==l?(k={title:"Param Compare",description:"Use this node with a toggle parameter. This node checks if the toggle is true or false.",variant:l},e[7]=l,e[8]=k):k=e[8];let A;e[9]!==t.props||e[10]!==k?(A=c.jsx(je,{props:t.props,docs:k}),e[9]=t.props,e[10]=k,e[11]=A):A=e[11];let S;e[12]!==t||e[13]!==n?(S=D=>n(t,{var:D}),e[12]=t,e[13]=n,e[14]=S):S=e[14];let E;e[15]!==t.props.var||e[16]!==S?(E=c.jsx($e,{"aria-label":"Custom Node Parameter",value:t.props.var,placeholder:"Parameter",className:"flex-1",onValueChange:S,onInput:L2}),e[15]=t.props.var,e[16]=S,e[17]=E):E=e[17];let _;e[18]!==t||e[19]!==n?(_=D=>n(t,{operator:D}),e[18]=t,e[19]=n,e[20]=_):_=e[20];let C;e[21]!==t.props.operator||e[22]!==_?(C=c.jsx(xu,{value:t.props.operator,onValueChange:_}),e[21]=t.props.operator,e[22]=_,e[23]=C):C=e[23];let O,V;e[24]!==t||e[25]!==n?(O=D=>n(t,{compare:D}),V=()=>{t.props.compare.toLowerCase()==="true"&&t.props.compare!=="true"?n(t,{compare:"true"}):t.props.compare.toLowerCase()==="false"&&t.props.compare!=="false"&&n(t,{compare:"false"})},e[24]=t,e[25]=n,e[26]=O,e[27]=V):(O=e[26],V=e[27]);let I;e[28]!==t.props.compare||e[29]!==O||e[30]!==V?(I=c.jsx($e,{"aria-label":"Comparison Value",value:t.props.compare,placeholder:"Value",className:"flex-1",onValueChange:O,onBlur:V}),e[28]=t.props.compare,e[29]=O,e[30]=V,e[31]=I):I=e[31];let z;e[32]!==E||e[33]!==C||e[34]!==I?(z=c.jsxs(Ee,{className:"p-4 flex gap-2",children:[E,C,I]}),e[32]=E,e[33]=C,e[34]=I,e[35]=z):z=e[35];let N;e[36]!==r||e[37]!==s||e[38]!==d||e[39]!==t.props.h||e[40]!==t.props.resultState||e[41]!==A||e[42]!==z||e[43]!==y||e[44]!==w||e[45]!==x||e[46]!==v?(N=c.jsxs(we,{isBound:r,resultState:h,pattern:y,className:w,width:x,height:t.props.h,variant:v,isSelected:s,onUpdateDimensions:d,children:[A,z]}),e[36]=r,e[37]=s,e[38]=d,e[39]=t.props.h,e[40]=t.props.resultState,e[41]=A,e[42]=z,e[43]=y,e[44]=w,e[45]=x,e[46]=v,e[47]=N):N=e[47];let R;return e[48]!==t||e[49]!==N?(R=c.jsx(Se,{value:t,children:N}),e[48]=t,e[49]=N,e[50]=R):R=e[50],R}function L2(o){o.currentTarget.value.match(/^\$/)?(o.currentTarget.setCustomValidity(""),o.currentTarget.reportValidity()):(o.currentTarget.setCustomValidity("You must use a custom node parameter. Use $ to reference a one."),o.currentTarget.reportValidity())}function z2(){return Wr.get()}/** 105 * @license lucide-react v0.545.0 - ISC 106 * 107 * This source code is licensed under the ISC license. 108 * See the LICENSE file in the root directory of this source tree. 109 */const F2=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],$2=ke("message-square",F2);function G2(o){return o.type===Tr}class EO extends De{static id=Tr;static uiToolDef=e=>({id:Tr,icon:$2,label:Kd.docs.title,kbd:"p",defaultColor:Kd.docs.defaultColor,onSelect:()=>e.setCurrentTool(Tr),docs:()=>c.jsx(Oe,{editor:e,component:dk,util:Kd})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Tr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Kd extends Pe{static migrations=Ie(Tr);static type=Tr;getType(){return Tr}static docs={defaultColor:"blue",title:"Post Type",description:"Select/Reject based on what type of post it is."};static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,operator:te(...xt),post_type:te(...Hp),metadata:Ce};getDefaultProps(){return{w:300,minW:300,h:He,operator:xt[0],post_type:Hp[0],metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(dk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function dk(o){const e=Q.c(35),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=t.props.operator==="in"?"green":"red";let a;e[0]!==t||e[1]!==n?(a=_=>n(t,_),e[0]=t,e[1]=n,e[2]=a):a=e[2];const d=a,p=t.props.metadata?.pattern,u=t.props.metadata?.color||l;let h;e[3]!==t.props?(h=c.jsx(je,{props:t.props,docs:Kd.docs}),e[3]=t.props,e[4]=h):h=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y={label:"is",value:"in"},e[5]=y):y=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=[y,{label:"is not",value:"not_in"}],e[6]=m):m=e[6];let w;e[7]!==t||e[8]!==n?(w=_=>n(t,{operator:_}),e[7]=t,e[8]=n,e[9]=w):w=e[9];let x;e[10]!==t.props.operator||e[11]!==w?(x=c.jsx(ge,{"aria-label":"Comparison Operator",className:"w-[120px]",value:t.props.operator,options:m,onValueChange:w}),e[10]=t.props.operator,e[11]=w,e[12]=x):x=e[12];let v;e[13]!==t||e[14]!==n?(v=_=>n(t,{post_type:_}),e[13]=t,e[14]=n,e[15]=v):v=e[15];let k;e[16]!==t.props.post_type||e[17]!==v?(k=c.jsx(ge,{"aria-label":"Post Type",tooltip:"Type of post to select or reject upon",className:"flex-1",value:t.props.post_type,options:Hp,onValueChange:v}),e[16]=t.props.post_type,e[17]=v,e[18]=k):k=e[18];let A;e[19]!==k||e[20]!==x?(A=c.jsxs(Ee,{children:[x,k]}),e[19]=k,e[20]=x,e[21]=A):A=e[21];let S;e[22]!==i||e[23]!==r||e[24]!==s||e[25]!==d||e[26]!==t.props.resultState||e[27]!==A||e[28]!==p||e[29]!==u||e[30]!==h?(S=c.jsxs(we,{resultState:t.props.resultState,pattern:p,isBound:r,className:i,variant:u,isSelected:s,onUpdateDimensions:d,dynamicHeight:!0,children:[h,A]}),e[22]=i,e[23]=r,e[24]=s,e[25]=d,e[26]=t.props.resultState,e[27]=A,e[28]=p,e[29]=u,e[30]=h,e[31]=S):S=e[31];let E;return e[32]!==t||e[33]!==S?(E=c.jsx(Se,{value:t,children:S}),e[32]=t,e[33]=S,e[34]=E):E=e[34],E}/** 110 * @license lucide-react v0.545.0 - ISC 111 * 112 * This source code is licensed under the ISC license. 113 * See the LICENSE file in the root directory of this source tree. 114 */const U2=[["circle",{cx:"12",cy:"6",r:"1",key:"1bh7o1"}],["line",{x1:"5",x2:"19",y1:"12",y2:"12",key:"13b5wn"}],["circle",{cx:"12",cy:"18",r:"1",key:"lqb9t5"}]],H2=ke("divide",U2),K2="Compares one numeric attribute divided by another against a value.";function W2(o){return o.type===qr}class CO extends De{static id=qr;static uiToolDef=e=>({id:qr,icon:H2,label:Js.docs.title,defaultColor:Js.docs.defaultColor,onSelect:()=>e.setCurrentTool(qr),docs:()=>c.jsx(Oe,{editor:e,util:Js,component:pk})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:qr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Js extends Pe{static migrations=Ie(qr);static type=qr;static docs={defaultColor:"teal",title:"Ratio Comparison",description:c.jsxs("div",{children:[c.jsx("div",{children:K2}),c.jsxs(Un,{className:"ml-1",children:[c.jsx(qe,{className:"my-1",children:"Use it for things a single threshold cannot express â âat least twice as many followers as accounts followedâ, rather than âat least 500 followersâ."}),c.jsx(qe,{className:"my-1",children:"Only numeric attributes can be divided, so the lists here are shorter than in Attribute Comparison."}),c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"Nothing matches when the bottom value is zero."})," ","An account that follows nobody has a follow count of 0, and there is no meaningful ratio to compare â so it is excluded rather than treated as infinite."]}),c.jsx(qe,{className:"my-1",children:"There is no âis exactlyâ â a ratio is a decimal, and asking for an exact match would almost always return nothing."})]})]})};getType(){return qr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,numerator:pe,denominator:pe,value:jw(kt(pe,F)),operator:te(...Kp),metadata:Ce};getDefaultProps(){return{w:300,minW:440,h:He,numerator:La.find(e=>e.value.endsWith("followers_count"))?.value??La[0].value,denominator:La.find(e=>e.value.endsWith("follows_count"))?.value??La[0].value,value:2,operator:Kp[0],metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(pk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function pk(o){const e=Q.c(49),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=I=>n(t,I),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||Js.docs.defaultColor;let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:Js.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=I=>n(t,{numerator:I}),e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]!==t.props.numerator||e[9]!==h?(y=c.jsx(le,{message:"The attribute on top of the division.",children:c.jsx(Po,{value:t.props.numerator,validOperators:of,onValueChange:h})}),e[8]=t.props.numerator,e[9]=h,e[10]=y):y=e[10];let m;e[11]===Symbol.for("react.memo_cache_sentinel")?(m=c.jsx("span",{className:"text-slate-dim px-1",children:"÷"}),e[11]=m):m=e[11];let w;e[12]!==t||e[13]!==n?(w=I=>n(t,{denominator:I}),e[12]=t,e[13]=n,e[14]=w):w=e[14];let x;e[15]!==t.props.denominator||e[16]!==w?(x=c.jsx(le,{message:"The attribute underneath. Nothing matches when this is zero.",children:c.jsx(Po,{value:t.props.denominator,validOperators:of,onValueChange:w})}),e[15]=t.props.denominator,e[16]=w,e[17]=x):x=e[17];let v;e[18]===Symbol.for("react.memo_cache_sentinel")?(v=[...Kp],e[18]=v):v=e[18];let k;e[19]!==t||e[20]!==n?(k=I=>I&&n(t,{operator:I}),e[19]=t,e[20]=n,e[21]=k):k=e[21];let A;e[22]!==t.props.operator||e[23]!==k?(A=c.jsx(xu,{value:t.props.operator,validOperators:v,onValueChange:k}),e[22]=t.props.operator,e[23]=k,e[24]=A):A=e[24];const S=t.props.value??"";let E;e[25]!==t||e[26]!==n?(E=I=>n(t,{value:I}),e[25]=t,e[26]=n,e[27]=E):E=e[27];let _;e[28]!==S||e[29]!==E?(_=c.jsx(le,{message:"The value to compare the ratio against.",children:c.jsx($e,{"aria-label":"Ratio value",value:S,className:"flex-1",placeholder:"2",onValueChange:E,required:!1})}),e[28]=S,e[29]=E,e[30]=_):_=e[30];let C;e[31]!==A||e[32]!==_||e[33]!==y||e[34]!==x?(C=c.jsxs(Ee,{children:[y,m,x,A,_]}),e[31]=A,e[32]=_,e[33]=y,e[34]=x,e[35]=C):C=e[35];let O;e[36]!==i||e[37]!==r||e[38]!==s||e[39]!==a||e[40]!==t.props.resultState||e[41]!==C||e[42]!==d||e[43]!==p||e[44]!==u?(O=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,C]}),e[36]=i,e[37]=r,e[38]=s,e[39]=a,e[40]=t.props.resultState,e[41]=C,e[42]=d,e[43]=p,e[44]=u,e[45]=O):O=e[45];let V;return e[46]!==t||e[47]!==O?(V=c.jsx(Se,{value:t,children:O}),e[46]=t,e[47]=O,e[48]=V):V=e[48],V}/** 115 * @license lucide-react v0.545.0 - ISC 116 * 117 * This source code is licensed under the ISC license. 118 * See the LICENSE file in the root directory of this source tree. 119 */const X2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}
119],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],Q2=ke("smile",X2);function J2(o){return o.type===Dr}class PO extends De{static id=Dr;static uiToolDef=e=>({id:Dr,icon:Q2,label:Dn.docs.title,defaultColor:Dn.docs.defaultColor,onSelect:()=>e.setCurrentTool(Dr),docs:()=>c.jsx(Oe,{editor:e,component:uk,util:Dn})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Dr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Dn extends Pe{static migrations=Ie(Dr);static type=Dr;static docs={defaultColor:"green",title:"Sentiment Analysis",description:"Use AI to analyze the sentiment of the content. This determines if the post has a positive, negative, or neutral tone."};getType(){return Dr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,sentimentAnalysisCategory:te(...zw),operator:te(...Xe),value:kt(F,pe),metadata:Ce};getDefaultProps(){return{w:360,minW:400,h:He,sentimentAnalysisCategory:"Positive",operator:">=",value:.5,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(uk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function uk(o){const e=Q.c(40),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=_=>n(t,_),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||Dn.docs.defaultColor;let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:Dn.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=_=>n(t,{sentimentAnalysisCategory:_}),e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]!==t.props.sentimentAnalysisCategory||e[9]!==h?(y=c.jsx(ge,{"aria-label":"Sentiment Analysis Category",options:zw,value:t.props.sentimentAnalysisCategory,className:"w-[160px] shrink-0",onValueChange:h,tooltip:Dn.docs.description}),e[8]=t.props.sentimentAnalysisCategory,e[9]=h,e[10]=y):y=e[10];let m;e[11]!==t||e[12]!==n?(m=_=>n(t,{operator:_}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;e[14]!==t.props.operator||e[15]!==m?(w=c.jsx(it,{value:t.props.operator,onValueChange:m}),e[14]=t.props.operator,e[15]=m,e[16]=w):w=e[16];const x=t.props.value;let v;e[17]!==t||e[18]!==n?(v=_=>n(t,{value:_}),e[17]=t,e[18]=n,e[19]=v):v=e[19];let k;e[20]!==v||e[21]!==x?(k=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:x,className:"flex-1",placeholder:"Threshold",onValueChange:v})}),e[20]=v,e[21]=x,e[22]=k):k=e[22];let A;e[23]!==k||e[24]!==y||e[25]!==w?(A=c.jsxs(Ee,{children:[y,w,k]}),e[23]=k,e[24]=y,e[25]=w,e[26]=A):A=e[26];let S;e[27]!==i||e[28]!==r||e[29]!==s||e[30]!==a||e[31]!==t.props.resultState||e[32]!==A||e[33]!==d||e[34]!==p||e[35]!==u?(S=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,A]}),e[27]=i,e[28]=r,e[29]=s,e[30]=a,e[31]=t.props.resultState,e[32]=A,e[33]=d,e[34]=p,e[35]=u,e[36]=S):S=e[36];let E;return e[37]!==t||e[38]!==S?(E=c.jsx(Se,{value:t,children:S}),e[37]=t,e[38]=S,e[39]=E):E=e[39],E}/** 120 * @license lucide-react v0.545.0 - ISC 121 * 122 * This source code is licensed under the ISC license. 123 * See the LICENSE file in the root directory of this source tree. 124 */const Y2=[["path",{d:"M10 9v7",key:"ylp826"}],["path",{d:"M14 6v10",key:"1jy4vg"}],["circle",{cx:"17.5",cy:"12.5",r:"3.5",key:"1a9481"}],["circle",{cx:"6.5",cy:"12.5",r:"3.5",key:"2jlv1r"}]],Z2=ke("case-lower",Y2);/** 125 * @license lucide-react v0.545.0 - ISC 126 * 127 * This source code is licensed under the ISC license. 128 * See the LICENSE file in the root directory of this source tree. 129 */const eT=[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]],tT=ke("case-sensitive",eT);/** 130 * @license lucide-react v0.545.0 - ISC 131 * 132 * This source code is licensed under the ISC license. 133 * See the LICENSE file in the root directory of this source tree. 134 */const rT=[["path",{d:"M17 3v10",key:"15fgeh"}],["path",{d:"m12.67 5.5 8.66 5",key:"1gpheq"}],["path",{d:"m12.67 10.5 8.66-5",key:"1dkfa6"}],["path",{d:"M9 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2z",key:"swwfx4"}]],oT=ke("regex",rT);function iT(o){return o.type===fr&&["match","exclude"].includes(o.props.type)}class TO extends De{static id=fr;static uiToolDef=e=>({id:fr,icon:oT,label:Wd.docs.title,kbd:"r",defaultColor:Wd.docs.defaultColor,onSelect:()=>e.setCurrentTool(fr),docs:()=>c.jsx(Oe,{editor:e,component:fk,util:Wd})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:fr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Wd extends Pe{static migrations=Ie(fr);static type=fr;static docs={defaultColor:"green",title:"Regex",description:"Match or exclude a regular expression pattern in an attribute's value."};getType(){return fr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,var:pe,regex:pe,type:te("match","exclude"),insensitive:oe.optional(),metadata:Ce};getDefaultProps(){return{w:380,minW:380,h:He,var:fp[0],regex:"\\balf\\b",type:RS[0],insensitive:!0,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(fk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function fk(o){const e=Q.c(51),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=t.props.type==="match"||t.props.type==="any"?"green":"red";let a;e[0]!==t||e[1]!==n?(a=z=>n(t,z),e[0]=t,e[1]=n,e[2]=a):a=e[2];const d=a,p=t.props.metadata?.pattern,u=t.props.metadata?.color||l,h=t.props.insensitive?"Regex":"Case Sensitive Regex";let y;e[3]!==h?(y={...Wd.docs,title:h},e[3]=h,e[4]=y):y=e[4];let m;e[5]!==t.props||e[6]!==y?(m=c.jsx(je,{props:t.props,docs:y}),e[5]=t.props,e[6]=y,e[7]=m):m=e[7];let w;e[8]!==t||e[9]!==n?(w=t.props.insensitive?c.jsx(le,{message:"No case sensitivity",children:c.jsx("div",{children:c.jsxs(Zp,{variant:"outline",pressed:!1,onPressedCh
134ange:()=>n(t,{insensitive:!1}),children:[c.jsx("span",{className:"sr-only",children:"Make case insensitive"}),c.jsx(Z2,{})]})})}):c.jsx(le,{message:"Case sensitive",children:c.jsx("div",{children:c.jsxs(Zp,{variant:"outline",pressed:!1,onPressedChange:()=>n(t,{insensitive:!0}),children:[c.jsx("span",{className:"sr-only",children:"Make case Sensitive"}),c.jsx(tT,{})]})})}),e[8]=t,e[9]=n,e[10]=w):w=e[10];let x;e[11]!==t||e[12]!==n?(x=z=>n(t,{var:z}),e[11]=t,e[12]=n,e[13]=x):x=e[13];let v;e[14]!==t.props.var||e[15]!==x?(v=c.jsx(Po,{validOperators:vu,value:t.props.var,onValueChange:x,className:"flex-1"}),e[14]=t.props.var,e[15]=x,e[16]=v):v=e[16];let k;e[17]===Symbol.for("react.memo_cache_sentinel")?(k=[{value:"match",label:"contains"},{value:"exclude",label:"missing"}],e[17]=k):k=e[17];let A;e[18]!==t||e[19]!==n?(A=z=>n(t,{type:z}),e[18]=t,e[19]=n,e[20]=A):A=e[20];let S;e[21]!==t.props.type||e[22]!==A?(S=c.jsx(ge,{"aria-label":"Regex Match Type",value:t.props.type,options:k,className:"w-28 shrink-0 flex-1",placeholder:"Type",onValueChange:A}),e[21]=t.props.type,e[22]=A,e[23]=S):S=e[23];let E;e[24]!==S||e[25]!==w||e[26]!==v?(E=c.jsxs("div",{className:"flex gap-2",children:[w,v,S]}),e[24]=S,e[25]=w,e[26]=v,e[27]=E):E=e[27];let _;e[28]!==t||e[29]!==n?(_=z=>n(t,{regex:z}),e[28]=t,e[29]=n,e[30]=_):_=e[30];let C;e[31]!==t.props.isReadOnly||e[32]!==t.props.regex||e[33]!==_?(C=c.jsx(Qw,{value:t.props.regex,onChange:_,isReadOnly:t.props.isReadOnly}),e[31]=t.props.isReadOnly,e[32]=t.props.regex,e[33]=_,e[34]=C):C=e[34];let O;e[35]!==E||e[36]!==C?(O=c.jsx(Ee,{children:c.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-w-0",children:[E,C]})}),e[35]=E,e[36]=C,e[37]=O):O=e[37];let V;e[38]!==i||e[39]!==r||e[40]!==s||e[41]!==d||e[42]!==t.props.resultState||e[43]!==O||e[44]!==p||e[45]!==u||e[46]!==m?(V=c.jsxs(we,{resultState:t.props.resultState,pattern:p,isBound:r,className:i,variant:u,isSelected:s,onUpdateDimensions:d,dynamicHeight:!0,children:[m,O]}),e[38]=i,e[39]=r,e[40]=s,e[41]=d,e[42]=t.props.resultState,e[43]=O,e[44]=p,e[45]=u,e[46]=m,e[47]=V):V=e[47];let I;return e[48]!==t||e[49]!==V?(I=c.jsx(Se,{value:t,children:V}),e[48]=t,e[49]=V,e[50]=I):I=e[50],I}/** 135 * @license lucide-react v0.545.0 - ISC 136 * 137 * This source code is licensed under the ISC license. 138 * See the LICENSE file in the root directory of this source tree. 139 */const nT=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],sT=ke("network",nT);function aT(o){const e=Q.c(6),{username:r,direction:t}=o;let i;e[0]!==t||e[1]!==r?(i=_S(r,t),e[0]=t,e[1]=r,e[2]=i):i=e[2];const{data:n,isPending:s}=qo(i);let l;return e[3]!==s||e[4]!==n?(l=c.jsx(c.Fragment,{children:n&&n.asset_metadata?c.jsxs(c.Fragment,{children:[c.jsx(Mt,{}),c.jsx(Bu,{users:n.asset_metadata,total:n.asset_value.length})]}):s?c.jsx("div",{className:"flex justify-center items-center p-2 h-8",children:c.jsx(Zr,{delay:1e3})}):c.jsx("div",{className:"text-sm text-slate-11 dark:text-slatedark-11 p-2",children:"This user is not yet in our system. Please verify the username and wait a few minutes for it to be indexed."})}),e[3]=s,e[4]=n,e[5]=l):l=e[5],l}function cT(o){return o.type===Or}class qO extends De{static id=Or;static uiToolDef=e=>({id:Or,icon:sT,label:Xd.docs.title,defaultColor:Xd.docs.defaultColor,onSelect:()=>e.setCurrentTool(Or),docs:()=>c.jsx(Oe,{editor:e,component:mk,util:Xd})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Or,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Xd extends Pe{static migrations=Ie(Or);static type=Or;static docs={defaultColor:"green",title:"Social Graph",description:"Included posts from a users follower/following lists."};getType(){return Or}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,username:pe,operator:te(...xt),direction:te(...Wp),metadata:Ce};getDefaultProps(){return{w:500,minW:500,h:He,username:"jay.bsky.team",operator:xt[0],direction:Wp[0],metadata:null}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(mk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function mk(o){const e=Q.c(48),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=t.props.operator==="in"?"green":"red";let a;e[0]!==t||e[1]!==n?(a=V=>n(t,V),e[0]=t,e[1]=n,e[2]=a):a=e[2];const d=a,p=t.props.metadata?.pattern,u=t.props.metadata?.color||l;let h;e[3]!==t.props?(h=c.jsx(je,{props:t.props,docs:Xd.docs}),e[3]=t.props,e[4]=h):h=e[4];let y;e[5]!==t||e[6]!==n?(y=V=>n(t,{operator:V}),e[5]=t,e[6]=n,e[7]=y):y=e[7];let m;e[8]!==t.props.operator||e[9]!==y?(m=c.jsx(ge,{className:"w-28",value:t.props.operator,onValueChange:y,options:Hn,"aria-label":"Inclusion Operator"}),e[8]=t.props.operator,e[9]=y,e[10]=m):m=e[10];let w,x;e[11]!==t||e[12]!==n?(w=V=>n(t,{username:V}),x=()=>{n(t,{username:t.props.username.trim().replace(/^@/g,"")})},e[11]=t,e[12]=n,e[13]=w,e[14]=x):(w=e[13],x=e[14]);let v;e[15]!==t.props.username||e[16]!==w||e[17]!==x?(v=c.jsx(le,{message:"The username to pull followers/follows from.",children:c.jsx($e,{"aria-label":"Username",value:t.props.username,placeholder:"Username",className:"flex-1",onValueChange:w,onBlur:x})}),e[15]=t.props.username,e[16]=w,e[17]=x,e[18]=v):v=e[18];let k;e[19]!==t||e[20]!==n?(k=V=>n(t,{direction:V}),e[19]=t,e[20]=n,e[21]=k):k=e[21];let A;e[22]!==t.props.direction||e[23]!==k?(A=c.jsx(ge,{"aria-label":"Relationship Type",className:"w-[108px]",value:t.props.direction,onValueChange:k,options:Wp}),e[22]=t.props.direction,e[23]=k,e[24]=A):A=e[24];let S;e[25]!==A||e[26]!==m||e[27]!==v?(S=c.jsxs("div",{className:"flex gap-2",children:[m,v,A]}),e[25]=A,e[26]=m,e[27]=v,e[28]=S):S=e[28];let E;e[29]!==t.props.direction||e[30]!==t.props.username?(E=c.jsx(aT,{username:t.props.username,direction:t.props.direction}),e[29]=t.props.direction,e[30]=t.props.username,e[31]=E):E=e[31];let _;e[32]!==S||e[33]!==E?(_=c.jsx(Ee,{children:c.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-w-0",children:[S,E]})}
139),e[32]=S,e[33]=E,e[34]=_):_=e[34];let C;e[35]!==i||e[36]!==r||e[37]!==s||e[38]!==d||e[39]!==t.props.resultState||e[40]!==_||e[41]!==p||e[42]!==u||e[43]!==h?(C=c.jsxs(we,{resultState:t.props.resultState,pattern:p,isBound:r,className:i,variant:u,isSelected:s,onUpdateDimensions:d,dynamicHeight:!0,children:[h,_]}),e[35]=i,e[36]=r,e[37]=s,e[38]=d,e[39]=t.props.resultState,e[40]=_,e[41]=p,e[42]=u,e[43]=h,e[44]=C):C=e[44];let O;return e[45]!==t||e[46]!==C?(O=c.jsx(Se,{value:t,children:C}),e[45]=t,e[46]=C,e[47]=O):O=e[47],O}function lT(o,e){const r=o.getBindingsToShape(e,"layout").find(n=>!n.props.placeholder);if(!r)return 0;const t=o.getShape(r.fromId);if(!t||!pp(t)||t.props.type!=="and")return 0;const i=o.getBindingsFromShape(t,"layout").filter(n=>!n.props.placeholder);return Math.max(0,i.length-1)}const dT=48;function pT(o){return o.type===Ir}class DO extends De{static id=Ir;static uiToolDef=e=>({id:Ir,icon:Hx,label:Qd.docs.title,kbd:"q",defaultColor:Qd.docs.defaultColor,onSelect:()=>e.setCurrentTool(Ir),docs:()=>c.jsx(Oe,{editor:e,component:hk,util:Qd})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Ir,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Qd extends Pe{static migrations=Ie(Ir);static type=Ir;static docs={defaultColor:"green",title:"Users",description:"Include or exclude a set of users from the feed."};getType(){return Ir}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,dids:Xr(pe),operator:te(...xt),metadata:Ce};getDefaultProps(){return{w:350,minW:350,h:184,dids:[""],operator:xt[0],metadata:void 0}}onBeforeCreate(e){const{dids:r}=e.props;r.length>1&&(e.props.h+=(r.length-1)*dT)}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(hk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function uT(o){const e=Q.c(19),{did:r,onChange:t,onDelete:i,variant:n}=o,s=n===void 0?"canvas":n,l=Y.use(bu),a=Y.useRef(null);let d;e[0]!==r?(d=gu(r),e[0]=r,e[1]=d):d=e[1];const{data:p}=qo(d);let u,h;e[2]!==l||e[3]!==p?(u=()=>{!a.current||!(a.current instanceof HTMLInputElement)||(p?a.current?.setCustomValidity(""):l||a.current.setCustomValidity("Please enter a valid user DID or handle."))},h=[p,l],e[2]=l,e[3]=p,e[4]=u,e[5]=h):(u=e[4],h=e[5]),Y.useEffect(u,h);const y=s==="canvas"?$e:Jw,m=s==="canvas"?Ne:Yw;let w;e[6]!==r?(w=c.jsx(Kx,{did:r}),e[6]=r,e[7]=w):w=e[7];let x;e[8]!==y||e[9]!==r||e[10]!==t?(x=c.jsx(y,{"aria-label":"User DID or handle",placeholder:"User DID or handle",ref:a,value:r,className:"flex-1",onValueChange:t}),e[8]=y,e[9]=r,e[10]=t,e[11]=x):x=e[11];let v;e[12]!==m||e[13]!==i?(v=i&&c.jsx(m,{size:"smIcon",variant:"ghost",className:"pointer-events-auto absolute right-1 top-1 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity",onPress:i,children:c.jsx(Qr,{})}),e[12]=m,e[13]=i,e[14]=v):v=e[14];let k;return e[15]!==w||e[16]!==x||e[17]!==v?(k=c.jsxs("div",{className:"relative group flex gap-2 items-center",children:[w,x,v]}),e[15]=w,e[16]=x,e[17]=v,e[18]=k):k=e[18],k}function fT(o){const e=Q.c(9),{did:r}=o;let t;e[0]!==r?(t=gu(r),e[0]=r,e[1]=t):t=e[1];const{data:i}=qo(t),n=i?.avatar,s=i?.avatar||"";let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(Dw,{}),e[2]=l):l=e[2];let a;e[3]!==n||e[4]!==s?(a=c.jsx(Co,{src:n,alt:s,fallback:l}),e[3]=n,e[4]=s,e[5]=a):a=e[5];const d=a;let p;return e[6]!==d||e[7]!==i?(p=c.jsx("div",{className:"relative group flex gap-2 items-center",children:i?c.jsx(le,{side:"left",message:c.jsxs("div",{children:[c.jsx("div",{children:i.display_name||i.handle}),c.jsxs("div",{className:"text-xs text-slate-dim",children:["@",i.handle]})]}),children:d}):d}),e[6]=d,e[7]=i,e[8]=p):p=e[8],p}function mT(o){const e=Q.c(4),{shape:r,isBound:t}=o,i=ua();if(!t||r.props.operator!=="in"||lT(i,r)===0)return null;let n;e[0]!==r.props.dids?(n=r.props.dids.filter(hT),e[0]=r.props.dids,e[1]=n):n=e[1];const s=n.length;if(s===0)return null;const l=s===1?"this account":`these ${s} accounts`;let a;return e[2]!==l?(a=c.jsxs("span",{className:"text-xs text-amber-11 dark:text-amberdark-11",children:["Only posts by ",l," ","can match â everything else in the feed
139is filtered out. Switch to Exclude to leave the rest of the feed alone."]}),e[2]=l,e[3]=a):a=e[3],a}function hT(o){return o.trim()!==""}function hk(o){const e=Q.c(47),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=St()||t.props.isReadOnly,a=t.props.operator==="in"?"green":"red",d=Y.useRef(null),[p,u]=Y.useState(!1);let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={onFocusWithinChange:u},e[0]=h):h=e[0];const{focusWithinProps:y}=mp(h);let m;e[1]!==t||e[2]!==n?(m=D=>n(t,D),e[1]=t,e[2]=n,e[3]=m):m=e[3];const w=m;let x;e[4]!==t||e[5]!==n?(x=()=>{fa.flushSync(()=>{n(t,{dids:[...t.props.dids,""]})});const D=d.current?.querySelectorAll("input");D&&D.values().toArray().at(-1)?.focus()},e[4]=t,e[5]=n,e[6]=x):x=e[6];const v=x,k=t.props.metadata?.pattern,A=t.props.metadata?.color||a;let S;e[7]!==v?(S=D=>{D.key==="Enter"&&D.metaKey&&(D.preventDefault(),D.stopPropagation(),v())},e[7]=v,e[8]=S):S=e[8];let E;e[9]!==t.props?(E=c.jsx(je,{props:t.props,docs:Qd.docs}),e[9]=t.props,e[10]=E):E=e[10];let _;e[11]!==t||e[12]!==n?(_=D=>n(t,{operator:D}),e[11]=t,e[12]=n,e[13]=_):_=e[13];let C;e[14]!==t.props.operator||e[15]!==_?(C=c.jsx(ge,{"aria-label":"Inclusion Operator",value:t.props.operator,onValueChange:_,options:Hn}),e[14]=t.props.operator,e[15]=_,e[16]=C):C=e[16];let O;e[17]!==r||e[18]!==l||e[19]!==t?(O=!l&&c.jsx(mT,{shape:t,isBound:r}),e[17]=r,e[18]=l,e[19]=t,e[20]=O):O=e[20];let V;e[21]===Symbol.for("react.memo_cache_sentinel")?(V=c.jsx(Mt,{}),e[21]=V):V=e[21];let I;e[22]!==p||e[23]!==l||e[24]!==v||e[25]!==t||e[26]!==n?(I=l?c.jsx("div",{className:"flex flex-wrap gap-2",children:t.props.dids.map(yT)}):c.jsxs(c.Fragment,{children:[c.jsx(hp,{children:t.props.dids.map((D,q)=>c.jsx(uT,{did:D,onChange:j=>{const L=[...t.props.dids];L[q]=j.replace(/^@/,"").trim(),n(t,{dids:L})},onDelete:q===0?void 0:()=>{const j=[...t.props.dids];j.splice(q,1),n(t,{dids:j})}},`${t.id}-list-member-${q}`))}),c.jsxs(Ne,{size:"sm",variant:"ghost",onPress:v,className:"relative",children:["Add Another",p&&c.jsx(Rp,{className:"hidden md:flex absolute top-1/2 right-2 -translate-y-1/2",children:c.jsx(Ap,{children:"Meta + â"})})]})]}),e[22]=p,e[23]=l,e[24]=v,e[25]=t,e[26]=n,e[27]=I):I=e[27];let z;e[28]!==O||e[29]!==I||e[30]!==C?(z=c.jsx(Ee,{children:c.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-w-0",children:[C,O,V,I]})}),e[28]=O,e[29]=I,e[30]=C,e[31]=z):z=e[31];let N;e[32]!==i||e[33]!==y||e[34]!==r||e[35]!==s||e[36]!==w||e[37]!==t.props.resultState||e[38]!==z||e[39]!==k||e[40]!==A||e[41]!==S||e[42]!==E?(N=c.jsxs(we,{ref:d,...y,resultState:t.props.resultState,pattern:k,isBound:r,className:i,variant:A,isSelected:s,onUpdateDimensions:w,dynamicHeight:!0,onKeyDownCapture:S,children:[E,z]}),e[32]=i,e[33]=y,e[34]=r,e[35]=s,e[36]=w,e[37]=t.props.resultState,e[38]=z,e[39]=k,e[40]=A,e[41]=S,e[42]=E,e[43]=N):N=e[43];let R;return e[44]!==t||e[45]!==N?(R=c.jsx(Se,{value:t,children:N}),e[44]=t,e[45]=N,e[46]=R):R=e[46],R}function yT(o){return c.jsx(fT,{did:o},o)}/** 140 * @license lucide-react v0.545.0 - ISC 141 * 142 * This source code is licensed under the ISC license. 143 * See the LICENSE file in the root directory of this source tree. 144 */const gT=[["path",{d:"M11 17h3v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a3.16 3.16 0 0 0 2-2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-1a5 5 0 0 0-2-4V3a4 4 0 0 0-3.2 1.6l-.3.4H11a6 6 0 0 0-6 6v1a5 5 0 0 0 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z",key:"1piglc"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M2 8v1a2 2 0 0 0 2 2h1",key:"1env43"}]],bT=ke("piggy-bank",gT);function vT(o){return o.type===Mr}class OO extends De{static id=Mr;static uiToolDef=e=>({id:Mr,icon:bT,label:On.docs.title,defaultColor:On.docs.defaultColor,onSelect:()=>e.setCurrentTool(Mr),docs:()=>c.jsx(Oe,{editor:e,component:yk,util:On})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Mr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class On extends Pe{static migrations=Ie(Mr);static type=Mr;static docs={defaultColor:"pink",title:"Spam Analysis",description:"Use AI to analyze if this post is spammy."};getType(){return Mr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,spamAnalysisCategory:te(...Fw),operator:te(...Xe),value:kt(F,pe),metadata:Ce};getDefaultProps(){return{w:440,minW:440,h:He,spamAnalysisCategory:"Marketing Spam",operator:">=",value:.5,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(yk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function yk(o){const e=Q.c(40),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=_=>n(t,_),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||On.docs.defaultColor;let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:On.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=_=>n(t,{spamAnalysisCategory:_}),e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]!==t.props.spamAnalysisCategory||e[9]!==h?(y=c.jsx(ge,{"aria-label":"Spam Analysis Category",options:Fw,value:t.props.spamAnalysisCategory,className:"shrink-0",onValueChange:h,tooltip:On.docs.description}
144),e[8]=t.props.spamAnalysisCategory,e[9]=h,e[10]=y):y=e[10];let m;e[11]!==t||e[12]!==n?(m=_=>n(t,{operator:_}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;e[14]!==t.props.operator||e[15]!==m?(w=c.jsx(it,{value:t.props.operator,onValueChange:m}),e[14]=t.props.operator,e[15]=m,e[16]=w):w=e[16];const x=t.props.value;let v;e[17]!==t||e[18]!==n?(v=_=>n(t,{value:_}),e[17]=t,e[18]=n,e[19]=v):v=e[19];let k;e[20]!==v||e[21]!==x?(k=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:x,className:"flex-1",placeholder:"Threshold",onValueChange:v})}),e[20]=v,e[21]=x,e[22]=k):k=e[22];let A;e[23]!==k||e[24]!==y||e[25]!==w?(A=c.jsxs(Ee,{children:[y,w,k]}),e[23]=k,e[24]=y,e[25]=w,e[26]=A):A=e[26];let S;e[27]!==i||e[28]!==r||e[29]!==s||e[30]!==a||e[31]!==t.props.resultState||e[32]!==A||e[33]!==d||e[34]!==p||e[35]!==u?(S=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,A]}),e[27]=i,e[28]=r,e[29]=s,e[30]=a,e[31]=t.props.resultState,e[32]=A,e[33]=d,e[34]=p,e[35]=u,e[36]=S):S=e[36];let E;return e[37]!==t||e[38]!==S?(E=c.jsx(Se,{value:t,children:S}),e[37]=t,e[38]=S,e[39]=E):E=e[39],E}/** 145 * @license lucide-react v0.545.0 - ISC 146 * 147 * This source code is licensed under the ISC license. 148 * See the LICENSE file in the root directory of this source tree. 149 */const wT=[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]],xT=ke("package-check",wT);function kT(o){const e=Q.c(6),{starterPackUrl:r,hasSeparator:t}=o,i=t===void 0?!0:t;let n;e[0]!==r?(n=jS(r),e[0]=r,e[1]=n):n=e[1];const{data:s,isPending:l}=qo(n);let a;return e[2]!==i||e[3]!==l||e[4]!==s?(a=c.jsx(c.Fragment,{children:s&&s.asset_metadata?.starter_pack?c.jsxs(c.Fragment,{children:[i&&c.jsx(Mt,{}),c.jsx(Nw,{avatar:s.asset_metadata.starter_pack.list.avatar,name:s.asset_metadata.starter_pack.list.name,creator:s.asset_metadata.starter_pack.creator,children:c.jsx(le,{message:"Total members",children:c.jsx("span",{className:"text-slatea-12 dark:text-slatedarka-12 bg-slatea-2 dark:bg-slatedarka-2 rounded-md px-2 py-1 text-xs border border-slatea-5 dark:border-slatedarka-5",children:s.asset_value.length})})}),c.jsx(Mt,{}),c.jsx(Bu,{users:s.asset_metadata.starter_pack.list_items_sample.map(ST),total:s.asset_value.length})]}):l?c.jsx("div",{className:"flex justify-center items-center p-2 h-8",children:c.jsx(Zr,{delay:1e3})}):c.jsx("div",{className:"text-sm text-slate-11 dark:text-slatedark-11 p-2",children:"This starter pack is not yet in our system. Please verify the starter pack URL and wait a few minutes for it to be indexed."})}),e[2]=i,e[3]=l,e[4]=s,e[5]=a):a=e[5],a}function ST(o){return o.subject}function AT(o){return o.type===Nr}class IO extends De{static id=Nr;static uiToolDef=e=>({id:Nr,icon:xT,label:Ys.docs.title,defaultColor:Ys.docs.defaultColor,onSelect:()=>e.setCurrentTool(Nr),docs:()=>c.jsx(Oe,{editor:e,component:gk,util:Ys})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Nr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Ys extends Pe{static migrations=Ie(Nr);static type=Nr;static docs={defaultColor:"green",title:"Starter Pack",description:"Include or exclude the users in a starter pack from the feed."};getType(){return Nr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,starterPackUrl:pe,operator:te(...xt),metadata:Ce};getDefaultProps(){return{w:500,minW:500,h:He,starterPackUrl:"https://bsky.app/starter-pack/propublica.org/3l6iflmcj322n",operator:xt[0],metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(gk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function gk(o){const e=Q.c(32),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=Y.use(bu),a=St()||t.props.isReadOnly,d=t.props.operator==="in"?"green":"red";let p;e[0]!==t||e[1]!==n?(p=C=>n(t,C),e[0]=t,e[1]=n,e[2]=p):p=e[2];const u=p,h=t.props.metadata?.pattern,y=t.props.metadata?.color||d,m=a&&(t.props.operator==="in"?"In ":"Not in ");let w;e[3]!==m?(w={...Ys.docs,title:c.jsxs(c.Fragment,{children:[m,Ys.docs.title]})},e[3]=m,e[4]=w):w=e[4];let x;e[5]!==t.props||e[6]!==w?(x=c.jsx(je,{props:t.props,docs:w}),e[5]=t.props,e[6]=w,e[7]=x):x=e[7];let v;e[8]!==l||e[9]!==a||e[10]!==t||e[11]!==n?(v=!a&&c.jsxs("div",{className:"flex gap-2",children:[c.jsx(ge,{"aria-label":"Inclusion Operator",className:"w-28",value:t.props.operator,onValueChange:C=>n(t,{operator:C}),options:Hn}),c.jsx(le,{message:"The starter pack URL",children:c.jsx($e,{"aria-label":"Starter Pack URL",className:"flex-1",value:t.props.starterPackUrl,placeholder:"Starter Pack URL",onValueChange:C=>n(t,{starterPackUrl:C}),onInput:C=>{C.currentTarget.value.match(/https:\S+\/starter-pack\/\S+\/\S+$/)?C.currentTarget.setCustomValidity(""):l||(C.currentTarget.setCustomValidity("Please enter a valid starter pack URL."),C.currentTarget.reportValidity())}})}
149),c.jsx(Zx,{type:"starter-pack",selectUrl:C=>{n(t,{starterPackUrl:C})}})]}),e[8]=l,e[9]=a,e[10]=t,e[11]=n,e[12]=v):v=e[12];const k=!a;let A;e[13]!==t.props.starterPackUrl||e[14]!==k?(A=c.jsx(kT,{starterPackUrl:t.props.starterPackUrl,hasSeparator:k}),e[13]=t.props.starterPackUrl,e[14]=k,e[15]=A):A=e[15];let S;e[16]!==v||e[17]!==A?(S=c.jsx(Ee,{children:c.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-w-0",children:[v,A]})}),e[16]=v,e[17]=A,e[18]=S):S=e[18];let E;e[19]!==i||e[20]!==r||e[21]!==s||e[22]!==u||e[23]!==t.props.resultState||e[24]!==S||e[25]!==h||e[26]!==y||e[27]!==x?(E=c.jsxs(we,{resultState:t.props.resultState,pattern:h,isBound:r,className:i,variant:y,isSelected:s,onUpdateDimensions:u,dynamicHeight:!0,children:[x,S]}),e[19]=i,e[20]=r,e[21]=s,e[22]=u,e[23]=t.props.resultState,e[24]=S,e[25]=h,e[26]=y,e[27]=x,e[28]=E):E=e[28];let _;return e[29]!==t||e[30]!==E?(_=c.jsx(Se,{value:t,children:E}),e[29]=t,e[30]=E,e[31]=_):_=e[31],_}/** 150 * @license lucide-react v0.545.0 - ISC 151 * 152 * This source code is licensed under the ISC license. 153 * See the LICENSE file in the root directory of this source tree. 154 */const RT=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],_T=ke("tags",RT);function jT(o){return o.type===Br}class MO extends De{static id=Br;static uiToolDef=e=>({id:Br,icon:_T,label:ii.docs.title,defaultColor:ii.docs.defaultColor,onSelect:()=>e.setCurrentTool(Br),docs:()=>c.jsx(Oe,{editor:e,component:bk,util:ii})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Br,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class ii extends Pe{static migrations=Ie(Br);static type=Br;static docs={defaultColor:"pink",title:"Text Categorization",description:"Use AI to analyze if text matches any arbitrary category or concept. Enter any label and the model will assess how well the content matches that concept."};getType(){return Br}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,tag:pe,operator:te(...Xe),value:kt(F,pe),metadata:Ce};getDefaultProps(){return{w:360,minW:400,h:He,tag:"",operator:">=",value:.5,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(bk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function bk(o){const e=Q.c(85),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=O=>n(t,O),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=St();if(t.props.tag&&!Cn.includes(t.props.tag)){const O=t.props.resultState,V=t.props.metadata?.pattern;let I;e[3]!==i?(I=he(i,"animate-pulse"),e[3]=i,e[4]=I):I=e[4];const z=t.props.metadata?.color||ii.docs.defaultColor;let N;e[5]!==t.props?(N=c.jsx(je,{props:t.props,docs:ii.docs,isDeprecated:!0}),e[5]=t.props,e[6]=N):N=e[6];let R;e[7]!==t||e[8]!==n?(R=K=>n(t,{tag:K}),e[7]=t,e[8]=n,e[9]=R):R=e[9];let D;e[10]!==t.props.tag||e[11]!==R?(D=c.jsx(le,{message:"Enter any category or concept to analyze",children:c.jsx($e,{"aria-label":"Category",value:t.props.tag,type:"text",className:"w-[200px] shrink-0",placeholder:"Enter category...",onValueChange:R})}),e[10]=t.props.tag,e[11]=R,e[12]=D):D=e[12];let q;e[13]!==t||e[14]!==n?(q=K=>n(t,{operator:K}),e[13]=t,e[14]=n,e[15]=q):q=e[15];let j;e[16]!==t.props.operator||e[17]!==q?(j=c.jsx(it,{value:t.props.operator,onValueChange:q}),e[16]=t.props.operator,e[17]=q,e[18]=j):j=e[18];const L=t.props.value;let U;e[19]!==t||e[20]!==n?(U=K=>n(t,{value:K}),e[19]=t,e[20]=n,e[21]=U):U=e[21];let W;e[22]!==L||e[23]!==U?(W=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:L,className:"flex-1",placeholder:"Threshold",onValueChange:U})}),e[22]=L,e[23]=U,e[24]=W):W=e[24];let ee;e[25]!==j||e[26]!==W||e[27]!==D?(ee=c.jsxs("div",{className:"flex gap-2",children:[D,j,W]}),e[25]=j,e[26]=W,e[27]=D,e[28]=ee):ee=e[28];let ae;e[29]!==d||e[30]!==t||e[31]!==n?(ae=!d&&c.jsxs(c.Fragment,{children:[c.jsx(Mt,{}),c.jsxs("div",{className:"flex flex-col gap-2 py-2",children:[c.jsx(wt,{children:"Please choose a standard category"}),c.jsx(ge,{"aria-label":"Standard Category",options:Cn,placeholder:"Choose a standard category",onValueChange:K=>n(t,{tag:K})})]})]}),e[29]=d,e[30]=t,e[31]=n,e[32]=ae):ae=e[32];let de;e[33]!==ee||e[34]!==ae?(de=c.jsx(Ee,{children:c.jsxs("div",{className:"flex flex-col gap-2 flex-1",children:[ee,ae]})}),e[33]=ee,e[34]=ae,e[35]=de):de=e[35];let ce;e[36]!==r||e[37]!==s||e[38]!==a||e[39]!==t.props.resultState||e[40]!==de||e[41]!==V||e[42]!==I||e[43]!==z||e[44]!==N?(ce=c.jsxs(we,{resultState:O,pattern:V,isBound:r,className:I,variant:z,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[N,de]}),e[36]=r,e[37]=s,e[38]=a,e[39]=t.props.resultState,e[40]=de,e[41]=V,e[42]=I,e[43]=z,e[44]=N,e[45]=ce):ce=e[45];let fe;return e[46]!==t||e[47]!==ce?(fe=c.jsx(Se,{value:t,children:ce}),e[46]=t,e[47]=ce,e[48]=fe):fe=e[48],fe}const u=t.props.metadata?.pattern,h=t.props.metadata?.color||ii.docs.defaultColor;let y;e[49]!==t.props?(y=c.jsx(je,{props:t.props,docs:ii.docs}),e[49]=t.props,e[50]=y):y=e[50];let m;e[51]!==t||e[52]!==n?(m=O=>n(t,{tag:O}),e[51]=t,e[52]=n,e[53]=m):m=e[53];let w;e[54]!==t.props.tag||e[55]!==m?(w=c.jsx(le,{message:"Enter any category or concept to analyze",children:c.jsx(ge,{"aria-label":"Standard Category",options:Cn,placeholder:"Choose a standard category",value:t.props.tag,className:"w-[200px] shrink-0",onValueChange:m})}),e[54]=t.props.tag,e[55]=m,e[56]=w):w=e[56];let x;e[57]!==t||e[58]!==n?(x=O=>n(t,{operator:O}),e[57]=t,e[58]=n,e[59]=x):x=e[59];let v;e[60]!==t.props.operator||e[61]!==x?(v=c.jsx(it,{value:t.props.operator,onValueChange:x}),e[60]=t.props.operator,e[61]=x,e[62]=v):v=e[62];const k=t.props.value;let A;e[63]!==t||e[64]!==n?(A=O=>n(t,{value:O}),e[63]=t,e[64]=n,e[65]=A):A=e[65];let S;e[66]!==A||e[67]!==k?(S=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:k,className:"flex-1",placeholder:"Threshold",onValueChange:A})}),e[66]=A,e[67]=k,e[68]=S):S=e[68];let E;e[69]!==S||e[70]!==w||e[71]!==v?(E=c.jsxs(Ee,{children:[w,v,S]}),e[69]=S,e[70]=w,e[71]=v,e[72]=E):E=e[72];let _;e[73]!==r||e[74]!==s||e[75]!==a||e[76]!==t.props.resultState||e[77]!==E||e[78]!==u||e[79]!==h||e[80]!==y?(_=c.jsxs(we,{resultState:t.props.resultState,pattern:u,isBound:r,variant:h,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[y,E]}),e[73]=r,e[74]=s,e[75]=a,e[76]=t.props.resultState,e[77]=E,e[78]=u,e[79]=h,e[80]=y,e[81]=_):_=e[81];let C;return e[82]!==t||e[83]!==_?(C=c.jsx(Se,{value:t,children:_}),e[82]=t,e[83]=_,e[84]=C):C=e[84],C}/** 155 * @license lucide-react v0.545.0 - ISC 156 * 157 * This source code is licensed under the ISC license. 158 * See the LICENSE file in the root directory of this source tree. 159 */const ET=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],CT=ke("message-circle-question-mark",ET),vk=2e4,PT=[{value:"noul",label:"Yes / no"},{value:"choice",label:"Pick one of my options"},{value:"score",label:"Rate on my scale"}];function TT(o){return o.type===Vr}class NO extends De{static id=Vr;static uiToolDef=e=>({id:Vr,icon:CT,label:Zs.docs.title,defaultColor:Zs.docs.defaultColor,rateLimited:!0,onSelect:()=>e.setCurrentTool(Vr),docs:()=>c.jsx(Oe,{editor:e,component:wk,util:Zs})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Vr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Zs extends Pe{static migrations=Ie(Vr);static type=Vr;static docs={defaultColor:"purple",title:"Ask a Question",description:c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx("div",{children:"Asks a question about each post and compares the answer against your threshold. Three kinds of question, and the kind decides what the number means."}),c.jsxs("div",{children:[c.jsx("span",{className:"font-medium",children:"Yes / no"})," gives the chance the answer is yes, 0â100%. This is the same shape as the Natural Language node, on a cheaper engine."]}),c.jsxs("div",{children:[c.jsx("span",{className:"font-medium",children:"Pick one of my options"})," is the one nothing else here can do: you define the categories, and the node reads the chance the post belongs to the ",c.jsx("em",{children:"one you choose"})," â not whichever one wins. So âat least 70% likely to be about the NBAâ still matches a post the model thinks is more likely about college basketball."]}),c.jsxs("div",{children:[c.jsx("span",{className:"font-medium",children:"Rate on my scale"})," takes ordered levels and answers with a position on them. The threshold is a"," ",c.jsx("span",{className:"font-medium",children:"level number, not a percentage"}),": with three levels you compare against 0, 1 or 2, and the answer can land between them. Do not read a level as a measurement â the model is good at ordering, not at arithmetic."]}),c.jsxs("div",{children:[c.jsx("span",{className:"font-medium",children:"Rate limited."})," Every feed gets"," ",c.jsxs("span",{className:"font-medium",children:[vk.toLocaleStr
159ing()," questions an hour"]}),", and you are charged only for posts this node actually judges â so putting cheaper conditions above it is what keeps a feed inside the budget. Repeats of a post already judged are free. When the budget runs out, âAdmit posts when over budgetâ decides what the node answers until the hour turns over."]}),c.jsxs("div",{children:[c.jsx("span",{className:"font-medium",children:"Write it literally."})," The model answers the question you wrote, not the one you meant. If you look at a wrong answer and find yourself explaining what you really meant, that explanation belongs in the question. Keep numbers, dates and counting out of it â use a Compare node for those."]})]})};getType(){return Vr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,kind:te(...ES),instructions:pe,options:Xr(Bn({name:pe,description:pe})),select:pe,levels:Xr(pe),operator:te(...Xe),threshold:F,overQuota:oe.optional(),metadata:Ce};getDefaultProps(){return{w:340,minW:400,h:235,kind:"noul",instructions:"",options:[{name:"",description:""},{name:"",description:""}],select:"",levels:["",""],threshold:.75,operator:">=",overQuota:!1,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(wk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function wk(o){const e=Q.c(97),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=me=>n(t,me),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,{kind:d,options:p,levels:u,select:h}=t.props;let y,m,w,x,v,k,A,S,E,_,C,O,V,I,z,N,R;if(e[3]!==i||e[4]!==r||e[5]!==s||e[6]!==d||e[7]!==a||e[8]!==p||e[9]!==h||e[10]!==t||e[11]!==n){const me=p.filter(DT),Ae=d==="choice"&&h.trim()!==""&&!me.some(xe=>xe.name.trim()===h);w=Se,E=t,m=we,I=t.props.resultState,z=t.props.metadata?.pattern,N=r,R=i,x=t.props.metadata?.color||Zs.docs.defaultColor,v=s,k=a,A=!0,e[29]!==t.props?(S=c.jsx(je,{props:t.props,docs:Zs.docs}),e[29]=t.props,e[30]=S):S=e[30],y=Ee,_="flex flex-col gap-2 flex-1 min-w-0";let Re;e[31]!==t||e[32]!==n?(Re=xe=>n(t,{kind:xe}),e[31]=t,e[32]=n,e[33]=Re):Re=e[33],e[34]!==d||e[35]!==Re?(C=c.jsx(ge,{"aria-label":"Question kind",value:d,options:PT,onValueChange:Re}),e[34]=d,e[35]=Re,e[36]=C):C=e[36];const Te=d==="noul"?"e.g. is this a job posting for a permanent role":d==="choice"?"e.g. which sport is this post about":"e.g. how technical is this post";let ue;e[37]!==t||e[38]!==n?(ue=xe=>n(t,{instructions:xe}),e[37]=t,e[38]=n,e[39]=ue):ue=e[39],e[40]!==t.props.instructions||e[41]!==Te||e[42]!==ue?(O=c.jsx(ci,{value:t.props.instructions,placeholder:Te,maxLength:1e3,onValueChange:ue}),e[40]=t.props.instructions,e[41]=Te,e[42]=ue,e[43]=O):O=e[43],V=d==="choice"&&c.jsxs("div",{className:"flex flex-col gap-1",children:[p.map((xe,be)=>c.jsxs("div",{className:"flex gap-1 items-center",children:[c.jsx($e,{"aria-label":`Option ${be+1} name`,value:xe.name,placeholder:"option",className:"w-28 shrink-0",onValueChange:Le=>{const ze={options:p.map((We,nt)=>nt===be?{...We,name:Le}:We)};h===xe.name&&(ze.select=Le),n(t,ze)}}),c.jsx($e,{"aria-label":`Option ${be+1} description`,value:xe.description,placeholder:"what it means (optional)",className:"flex-1",onValueChange:Le=>n(t,{options:p.map((Ue,ze)=>ze===be?{...Ue,description:Le}:Ue)})}),c.jsx(Ne,{"aria-label":`Remove option ${be+1}`,disabled:p.length<=2,className:"px-1",onClick:()=>n(t,{options:p.filter((Le,Ue)=>Ue!==be)}),children:c.jsx(Xp,{})})]},be)),c.jsxs(Ne,{className:"self-start px-2 text-xs",onClick:()=>n(t,{options:[...p,{name:"",description:""}]}),children:[c.jsx(eu,{})," Add option"]}),c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsx(le,{message:"Which option's likelihood this condition reads. Not necessarily the one the model thinks is most likely â that is what lets you ask 'at least 70% about the NBA' on a post that scores higher for something else.",children:c.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Chance it is"})}),c.jsx(ge,{"aria-label":"Selected option",value:h,options:me.map(qT),onValueChange:xe=>n(t,{select:xe})})]}),Ae&&c.jsxs("div",{className:"text-xs text-destructive",children:["â",h,"â is not one of the options, so this condition can never match."]})]}),e[3]=i,e[4]=r,e[5]=s,e[6]=d,e[7]=a,e[8]=p,e[9]=h,e[10]=t,e[11]=n,e[12]=y,e[13]=m,e[14]=w,e[15]=x,e[16]=v,e[17]=k,e[18]=A,e[19]=S,e[20]=E,e[21]=_,e[22]=C,e[23]=O,e[24]=V,e[25]=I,e[26]=z,e[27]=N,e[28]=R}else y=e[12],m=e[13],w=e[14],x=e[15],v=e[16],k=e[17],A=e[18],S=e[19],E=e[20],_=e[21],C=e[22],O=e[23],V=e[24],I=e[25],z=e[26],N=e[27],R=e[28];let D;e[44]!==d||e[45]!==u||e[46]!==t||e[47]!==n?(D=d==="score"&&c.jsxs("div",{className:"flex flex-col gap-1",children:[u.map((me,Ae)=>c.jsxs("div",{className:"flex gap-1 items-center",children:[c.jsx("span",{className:"text-xs text-muted-foreground w-4 shrink-0 text-right",children:Ae}),c.jsx($e,{"aria-label":`Level ${Ae}`,value:me,placeholder:Ae===0?"lowest level":"next level up",className:"flex-1",onValueChange:Re=>n(t,{levels:u.map((Te,ue)=>ue===Ae?Re:Te)})}),c.jsx(Ne,{"aria-label":`Remove level ${Ae}`,disabled:u.length<=2,className:"px-1",onClick:()=>n(t,{levels:u.filter((Re,Te)=>Te!==Ae)}),children:c.jsx(Xp,{})})]},Ae)),c.jsxs(Ne,{className:"self-start px-2 text-xs",onClick:()=>n(t,{levels:[...u,""]}),children:[c.jsx(eu,{})," Add level"]})]}),e[44]=d,e[45]=u,e[46]=t,e[47]=n,e[48]=D):D=e[48];let q;e[49]!==t||e[50]!==n?(q=me=>n(t,{operator:me}),e[49]=t,e[50]=n,e[51]=q):q=e[51];let j;e[52]!==t.props.operator||e[53]!==q?(j=c.jsx(it,{value:t.props.operator,onValueChange:q}),e[52]=t.props.operator,e[53]=q,e[54]=j):j=e[54];let L;e[55]!==d||e[56]!==t||e[57]!==n?(L=d==="score"?c.jsx(le,{variant:"markdown",message:"A **level number**, not a percentage. With three levels, compare against 0, 1 or 2. The answer can land between levels â a 1.6 means the post sits between your second and third level, nearer the third.",children:c.jsx(ku,{"aria-label":"Level",value:t.props.threshold,placeholder:"Level",className:"flex-1",onValueChange:me=>n(t,{threshold:me??0})})}):c.jsx(le,{variant:"markdown",message:"The likelihood threshold. If moving it has no effect, move it a long way rather than a little, and check the wording of the question above.",children:c.jsx(Ye,{"aria-label":"Threshold",value:t.props.threshold,placeholder:"Threshold",className:"flex-1",onValueChange:me=>n(t,{threshold:me})})}),e[55]=d,e[56]=t,e[57]=n,e[58]=L):L=e[58];let U;e[59]!==j||e[60]!==L?(U=c.jsxs("div",{className:"flex gap-2",children:[j,L]}),e[59]=j,e[60]=L,e[61]=U):U=e[61];let W;e[62]===Symbol.for("react.memo_cache_sentinel")?(W=vk.toLocaleStr
159ing(),e[62]=W):W=e[62];let ee;e[63]===Symbol.for("react.memo_cache_sentinel")?(ee=c.jsx(le,{message:`Each feed can ask ${W} questions an hour. Off: once the budget is gone this condition matches nothing and the feed goes quiet. On: it stops filtering and lets everything through.`,children:c.jsx("span",{className:"text-xs text-muted-foreground",children:"Admit posts when over budget"})}),e[63]=ee):ee=e[63];const ae=t.props.overQuota??!1;let de;e[64]!==t||e[65]!==n?(de=me=>n(t,{overQuota:me}),e[64]=t,e[65]=n,e[66]=de):de=e[66];let ce;e[67]!==ae||e[68]!==de?(ce=c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[ee,c.jsx(sa,{checked:ae,onCheckedChange:de})]}),e[67]=ae,e[68]=de,e[69]=ce):ce=e[69];let fe;e[70]!==D||e[71]!==_||e[72]!==U||e[73]!==ce||e[74]!==C||e[75]!==O||e[76]!==V?(fe=c.jsxs("div",{className:_,children:[C,O,V,D,U,ce]}),e[70]=D,e[71]=_,e[72]=U,e[73]=ce,e[74]=C,e[75]=O,e[76]=V,e[77]=fe):fe=e[77];let K;e[78]!==y||e[79]!==fe?(K=c.jsx(y,{children:fe}),e[78]=y,e[79]=fe,e[80]=K):K=e[80];let Me;e[81]!==m||e[82]!==x||e[83]!==v||e[84]!==k||e[85]!==A||e[86]!==S||e[87]!==K||e[88]!==I||e[89]!==z||e[90]!==N||e[91]!==R?(Me=c.jsxs(m,{resultState:I,pattern:z,isBound:N,className:R,variant:x,isSelected:v,onUpdateDimensions:k,dynamicHeight:A,children:[S,K]}),e[81]=m,e[82]=x,e[83]=v,e[84]=k,e[85]=A,e[86]=S,e[87]=K,e[88]=I,e[89]=z,e[90]=N,e[91]=R,e[92]=Me):Me=e[92];let Ve;return e[93]!==w||e[94]!==E||e[95]!==Me?(Ve=c.jsx(w,{value:E,children:Me}),e[93]=w,e[94]=E,e[95]=Me,e[96]=Ve):Ve=e[96],Ve}function qT(o){return{value:o.name.trim(),label:o.name.trim()}}function DT(o){return o.name.trim()!==""}/** 160 * @license lucide-react v0.545.0 - ISC 161 * 162 * This source code is licensed under the ISC license. 163 * See the LICENSE file in the root directory of this source tree. 164 */const OT=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M10 12H3",key:"1ulcyk"}],["path",{d:"M10 19H3",key:"108z41"}],["circle",{cx:"17",cy:"15",r:"3",key:"1upz2a"}],["path",{d:"m21 19-1.9-1.9",key:"dwi7p8"}]],IT=ke("text-search",OT);function MT(o){return o.type===Lr}class BO extends De{static id=Lr;static uiToolDef=e=>({id:Lr,icon:IT,label:ea.docs.title,defaultColor:ea.docs.defaultColor,onSelect:()=>e.setCurrentTool(Lr),docs:()=>c.jsx(Oe,{editor:e,component:xk,util:ea})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Lr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class ea extends Pe{static migrations=Ie(Lr);static type=Lr;static docs={defaultColor:"pink",title:"Text Similarity",description:c.jsx("div",{className:"flex flex-col gap-2",children:c.jsx("div",{children:"Evaluates the similarity between the text in an attribute and a test string."})})};getType(){return Lr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,var:pe,anchorText:pe,modelName:pe,threshold:F,operator:te(...Xe),metadata:Ce};getDefaultProps(){return{w:300,minW:400,h:173,var:fp[0],anchorText:"",modelName:"all-mpnet-base-v2",threshold:.75,operator:">=",metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(xk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function xk(o){const e=Q.c(49),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=O=>n(t,O),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||ea.docs.defaultColor;let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:ea.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=O=>n(t,{anchorText:O}),e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]!==t.props.anchorText||e[9]!==h?(y=c.jsx(ci,{value:t.props.anchorText,placeholder:"Text to compare to (250 tokens max)",maxLength:1e3,onValueChange:h}),e[8]=t.props.anchorText,e[9]=h,e[10]=y):y=e[10];let m;e[11]!==t||e[12]!==n?(m=O=>n(t,{var:O}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;e[14]!==t.props.var||e[15]!==m?(w=c.jsx(Po,{value:t.props.var,validOperators:vu,onValueChange:m}),e[14]=t.props.var,e[15]=m,e[16]=w):w=e[16];let x;e[17]!==t||e[18]!==n?(x=O=>n(t,{operator:O}),e[17]=t,e[18]=n,e[19]=x):x=e[19];let v;e[20]!==t.props.operator||e[21]!==x?(v=c.jsx(it,{value:t.props.operator,onValueChange:x}),e[20]=t.props.operator,e[21]=x,e[22]=v):v=e[22];let k;e[23]!==t||e[24]!==n?(k=O=>n(t,{threshold:O}),e[23]=t,e[24]=n,e[25]=k):k=e[25];let A;e[26]!==t.props.threshold||e[27]!==k?(A=c.jsx(le,{message:"The similarity threshold.",children:c.jsx(Ye,{"aria-label":"Threshold",value:t.props.threshold,placeholder:"Threshold",className:"flex-1",onValueChange:k})}),e[26]=t.props.threshold,e[27]=k,e[28]=A):A=e[28];let S;e[29]!==v||e[30]!==A||e[31]!==w?(S=c.jsxs("div",{className:"flex gap-2",children:[w,v,A]}),e[29]=v,e[30]=A,e[31]=w,e[32]=S):S=e[32];let E;e[33]!==S||e[34]!==y?(E=c.jsx(Ee,{children:c.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-w-0",children:[y,S]})}),e[33]=S,e[34]=y,e[35]=E):E=e[35];let _;e[36]!==i||e[37]!==r||e[38]!==s||e[39]!==a||e[40]!==t.props.resultState||e[41]!==E||e[42]!==d||e[43]!==p||e[44]!==u?(_=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,E]}),e[36]=i,e[37]=r,e[38]=s,e[39]=a,e[40]=t.props.resultState,e[41]=E,e[42]=d,e[43]=p,e[44]=u,e[45]=_):_=e[45];let C;return e[46]!==t||e[47]!==_?(C=c.jsx(Se,{value:t,children:_}),e[46]=t,e[47]=_,e[48]=C):C=e[48],C}/** 165 * @license lucide-react v0.545.0 - ISC 166 * 167 * This source code is licensed under the ISC license. 168 * See the LICENSE file in the root directory of this source tree. 169 */const NT=[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M17 14h-6",key:"bkmgh3"}],["path",{d:"M13 18H7",key:"bb0bb7"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 18h.01",key:"1bdyru"}]],BT=ke("calendar-range",NT);/** 170 * @license lucide-react v0.545.0 - ISC 171 * 172 * This source code is licensed under the ISC license. 173 * See the LICENSE file in the root directory of this source tree. 174 */const VT=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],LT=ke("clock",VT),zT=/^(\d{4}-\d{2}-\d{2})(?:T(\d{2}:\d{2})(?::(\d{2}))?(Z|[+-]\d{2}:\d{2})?)?$/;function FT(o){const e=zT.exec(o.trim());if(!e)return{date:"",time:"",zone:""};const[,r,t,i,n]=e,s=t?i&&i!=="00"?`${t}:${i}`:t:"";return{date:r??"",time:s,zone:n??""}}function $T(o){const[e="0",r="0",t="0"]=o.split(":");return[e,r,t].map(i=>i.padStart(2,"0")).join(":")}function aw({date:o,time:e,zone:r}){return o?!e&&!r?o:`${o}T${$T(e||"00:00")}${r}`:""}function GT(o){const e=o<0?"-":"+",r=Math.abs(o);return`${e}${String(Math.floor(r/60)).padStart(2,"0")}
174:${String(r%60).padStart(2,"0")}`}function UT(){const o=Intl;if(typeof o.supportedValuesOf=="function")try{const e=o.supportedValuesOf("timeZone");if(e.length>0)return e}catch{}return[kk()]}function kk(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}function np(o){return Date.UTC(o.y,o.mo-1,o.d,o.h,o.mi,o.s)}const cw=new Map;function HT(o){let e=cw.get(o);return e||(e=new Intl.DateTimeFormat("en-US",{timeZone:o,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}),cw.set(o,e)),e}function KT(o,e){const r={};for(const t of HT(e).formatToParts(new Date(o)))t.type!=="literal"&&(r[t.type]=Number(t.value));return{y:r.year??1970,mo:r.month??1,d:r.day??1,h:(r.hour??0)%24,mi:r.minute??0,s:r.second??0}}function zp(o,e){return Math.round((np(KT(o,e))-o)/6e4)}function WT(o,e){const r=np(e),t=zp(r,o),i=zp(r-t*6e4,o);return i===t?t:zp(r-i*6e4,o)}const XT=/^(\d{4})-(\d{2})-(\d{2})/,QT=/^(\d{1,2})(?::(\d{2}))?(?::(\d{2}))?\s*(am|pm|a\.m\.|p\.m\.)?$/i;function Sk(o,e,r){const t=Date.UTC(o,e-1,r),i=new Date(t);return i.getUTCFullYear()===o&&i.getUTCMonth()===e-1&&i.getUTCDate()===r}function JT(o){const e=QT.exec(o.trim());if(!e)return;let r=Number(e[1]);const t=Number(e[2]??"0"),i=Number(e[3]??"0"),n=e[4]?.toLowerCase().replace(/\./g,"");if(n){if(r<1||r>12)return;n==="am"?r=r===12?0:r:r=r===12?12:r+12}else if(r>23)return;if(!(!n&&e[2]===void 0)&&!(t>59||i>59))return{h:r,mi:t,s:i}}function Fp(o){let e=o.trim();const r={},t=XT.exec(e);if(t){const i=Number(t[1]),n=Number(t[2]),s=Number(t[3]);if(!Sk(i,n,s))return;r.date={y:i,mo:n,d:s},e=e.slice(t[0].length).replace(/^(?:T|\s+)/i,"")}if(e){const i=JT(e);if(!i)return;r.time=i}if(!(!r.date&&!r.time))return r}const YT=/\t|\s+-\s+|\s*[âââ]\s*|\s*,\s*|\s+to\s+/i;function lw(o){const e=new Date(Date.UTC(o.y,o.mo-1,o.d+1));return{y:e.getUTCFullYear(),mo:e.getUTCMonth()+1,d:e.getUTCDate()}}function jo(o){return String(o).padStart(2,"0")}function ZT(o){return`${o.y}-${jo(o.mo)}-${jo(o.d)}`}function Md(o,e,r){const t=ZT(o);if(r.kind==="node")return e?`${t}T${jo(o.h)}:${jo(o.mi)}:${jo(o.s)}`:t;const i=WT(r.zone,o);return`${t}T${jo(o.h)}:${jo(o.mi)}:${jo(o.s)}${GT(i)}`}function eq(o,e){const r=o.split(YT).filter(p=>p.trim()!=="");if(r.length===1){const p=Fp(r[0]);return!p?.date||p.time?void 0:{start:Md({...p.date,h:0,mi:0,s:0},!1,e),end:Md({...lw(p.date),h:0,mi:0,s:0},!1,e)}}if(r.length!==2)return;const t=Fp(r[0]),i=Fp(r[1]);if(!t?.date||!i)return;const n={...t.date,...t.time??{h:0,mi:0,s:0}};let s=i.date??t.date;const l=i.time??{h:0,mi:0,s:0};let a={...s,...l};!i.date&&np(a)<=np(n)&&(s=lw(t.date),a={...s,...l});const d=!!(t.time||i.time);return{start:Md(n,d,e),end:Md(a,d,e)}}function tq(o,e){const r=[],t=[];return o.split(/\r?\n/).forEach((i,n)=>{const s=i.trim();if(!s)return;const l=eq(s,e);l?r.push(l):t.push(n+1)}),{windows:t.length?[]:r,errors:t}}function dw(o){const e=o.trim();if(!/^\d{1,2}$/.test(e))return;const r=Number(e);return r<=23?r:void 0}function rq(o){if(o.length===0)return[{index:-1,message:"This node has no windows."}];const e=[];return o.forEach((r,t)=>{const i=`Window ${t+1}`,n=dw(r.start),s=dw(r.end);n===void 0&&s===void 0?e.push({index:t,message:`${i} has no hours.`}):n===void 0?e.push({index:t,message:`${i} has no start hour.`}):s===void 0?e.push({index:t,message:`${i} has no end hour.`}):n===s&&e.push({index:t,message:`${i} starts and ends at the same hour, so it holds no time.`})}),e}const oq=/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(Z|z|[+-]\d{2}:?\d{2})?)?$/;function iq(o){if(o==="Z"||o==="z")return 0;const e=o.startsWith("-")?-1:1,r=o.slice(1).replace(":","");return e*(Number(r.slice(0,2))*60+Number(r.slice(2,4)))}function pw(o,e){const r=o.trim();if(/^\d{9,}(?:\.\d+)?$/.test(r))return Number(r)*1e3-e*6e4;const t=oq.exec(r);if(!t)return;const[,i,n,s,l,a,d,p]=t,u=Number(i),h=Number(n),y=Number(s);if(!Sk(u,h,y))return;const m=Number(l??"0"),w=Number(a??"0"),x=Number(d??"0");if(m>23||w>59||x>59)return;const v=Date.UTC(u,h-1,y,m,w,x),k=p?iq(p):e;return v-k*6e4}function nq(o,e){if(o.length===0)return[{index:-1,message:"This
174node has no ranges."}];const r=[];return o.forEach((t,i)=>{const n=`Range ${i+1}`,s=t.start.trim(),l=t.end.trim();if(!s&&!l){r.push({index:i,message:`${n} is empty. Fill it in or remove it.`});return}if(!s){r.push({index:i,message:`${n} has no start date.`});return}if(!l){r.push({index:i,message:`${n} has no end date.`});return}const a=pw(s,e),d=pw(l,e);if(a===void 0){r.push({index:i,message:`${n}: â${s}â is not a date.`});return}if(d===void 0){r.push({index:i,message:`${n}: â${l}â is not a date.`});return}a===d?r.push({index:i,message:`${n} ends the moment it starts, so it holds no time. The end is not included: to cover all of the 15th, end on the 16th.`}):a>d&&r.push({index:i,message:`${n} ends before it starts.`})}),r}function sq(o){return nf.find(e=>e.value===o)?.value??nf[0].value}const Ak=sq("arrived_at"),Rk={start:"18",end:"21"},_k={start:"",end:""},uw=o=>Jp.find(e=>e.value===o)?.label??o,jk=Xr(Bn({start:pe,end:pe}));function sp(o,e,r){return o.map((t,i)=>i===e?{...t,...r}:t)}function Ek(o,e){return o.filter((r,t)=>t!==e)}function aq(o){return o==="Z"||o==="+00:00"?"UTC":`UTC${o}`}function Ck(o){const e=Q.c(4),{label:r,onPress:t}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(Qr,{}),e[0]=i):i=e[0];let n;return e[1]!==r||e[2]!==t?(n=c.jsx(Ne,{size:"smIcon",variant:"ghost","aria-label":r,className:"pointer-events-auto opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity",onPress:t,children:i}),e[1]=r,e[2]=t,e[3]=n):n=e[3],n}function Pk(o){const e=Q.c(1),{count:r}=o;if(r<2)return null;let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx("span",{className:"text-slate-dim text-xs px-1",children:"matches any of these windows"}),e[0]=t):t=e[0],t}function Vu(o){const e=o.slice(0,3).map(t=>t.message),r=o.length-e.length;return r>0?`${e.join(" ")} And ${r} more.`:e.join(" ")}function ap(o){const e=Q.c(4),{problems:r}=o;if(r.length===0)return null;let t;e[0]!==r?(t=Vu(r),e[0]=r,e[1]=t):t=e[1];let i;return e[2]!==t?(i=c.jsxs("span",{className:"text-xs text-red-11",role:"alert",children:["This node matches no posts until fixed: ",t]}),e[2]=t,e[3]=i):i=e[3],i}function Tk(o){const e=Q.c(4),{message:r}=o,t=Y.useRef(null);let i,n;e[0]!==r?(i=()=>{t.current?.setCustomValidity(r)},n=[r],e[0]=r,e[1]=i,e[2]=n):(i=e[1],n=e[2]),Y.useEffect(i,n);let s;return e[3]===Symbol.for("react.memo_cache_sentinel")?(s=c.jsx("input",{ref:t,className:"sr-only",tabIndex:-1,"aria-hidden":"true",value:"",onChange:cq}),e[3]=s):s=e[3],s}function cq(){}function lq(o){return o.type===zr}function dq(o){return o.type===Fr}class VO extends De{static id=zr;static uiToolDef=e=>({id:zr,icon:LT,label:ta.docs.title,defaultColor:ta.docs.defaultColor,onSelect:()=>e.setCurrentTool(zr),docs:()=>c.jsx(Oe,{editor:e,util:ta,component:qk})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:zr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class ta extends Pe{static migrations=Ie(zr);static type=zr;static docs={defaultColor:"indigo",title:"Time of Day",description:c.jsxs("div",{children:[c.jsx("div",{children:"Matches posts made between two hours of the day."}),c.jsxs(Un,{className:"ml-1",children:[c.jsxs(qe,{className:"my-1",children:["Use it for âposts made in the eveningâ, any day â something"," ",c.jsx("span",{className:"font-black",children:"after"})," and"," ",c.jsx("span",{className:"font-black",children:"before"})," cannot express, because they compare whole moments in time rather than the time of day."]}),c.jsxs(qe,{className:"my-1",children:["The ",c.jsx("span",{className:"font-black",children:"end hour is not included"}),", so 6pm to 9pm is the three hours 6, 7 and 8. Two windows that meet never both claim the same hour."]}),c.jsxs(qe,{className:"my-1",children:["A window may ",c.jsx("span",{className:"font-black",children:"cross midnight"})," â 10pm to 2am is the four hours you would expect."]}),c.jsxs(qe,{className:"my-1",children:["A node may hold ",c.jsx("span",{className:"font-black",children:"many windows"})," ","and matches a post that falls in ",c.jsx("span",{className:"font-black",children:"any"})," ","of them â âmornings and eveningsâ is one node, not two."]}),c.jsx(qe,{className:"my-1",children:"The timezone is your audienceâs, not the posterâs. It is a fixed offset, so it does not shift for daylight saving."}),c.jsx(qe,{className:"my-1",children:"A post whose timestamp cannot be read is excluded rather than let through."}),c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"Which date you pick matters."})," ",c.jsx("span",{className:"font-black",children:"Post Created Date"})," is what the posting app claims; ",c.jsx("span",{className:"font-black",children:"Post Arrival Date"}
174)," ","is when the post actually reached the network, and is the timestamp the Bluesky app shows you. They usually agree within a second or two, but bridged accounts â anything ending"," ",c.jsx("span",{className:"font-black",children:".brid.gy"})," â are routinely hours apart, which is what makes a feed look like it let the wrong posts in."]})]})]})};getType(){return zr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,var:pe,windows:jk,utcOffsetMinutes:pe,metadata:Ce};getDefaultProps(){return{w:300,minW:620,h:He,var:Ak,windows:[Rk],utcOffsetMinutes:"0",metadata:void 0}}component(e){const r=this.editor.getSelectedShapeIds();return c.jsx(qk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:r.includes(e.id)})}}function qk(o){const e=Q.c(48),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=St()||t.props.isReadOnly;let a;e[0]!==t||e[1]!==n?(a=z=>n(t,z),e[0]=t,e[1]=n,e[2]=a):a=e[2];const d=a,{windows:p}=t.props;let u;e[3]!==p?(u=rq(p),e[3]=p,e[4]=u):u=e[4];const h=u,y=t.props.metadata?.pattern,m=t.props.metadata?.color||ta.docs.defaultColor;let w;e[5]!==t.props?(w=c.jsx(je,{props:t.props,docs:ta.docs}),e[5]=t.props,e[6]=w):w=e[6];let x;e[7]!==t||e[8]!==n?(x=z=>n(t,{var:z}),e[7]=t,e[8]=n,e[9]=x):x=e[9];let v;e[10]!==t.props.var||e[11]!==x?(v=c.jsx(le,{message:"Which timestamp on the post to read.",children:c.jsx(Po,{value:t.props.var,validOperators:$w,onValueChange:x})}),e[10]=t.props.var,e[11]=x,e[12]=v):v=e[12];let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=c.jsx("span",{className:"text-slate-dim px-1",children:"in"}),e[13]=k):k=e[13];let A;e[14]!==t||e[15]!==n?(A=z=>n(t,{utcOffsetMinutes:z}),e[14]=t,e[15]=n,e[16]=A):A=e[16];let S;e[17]!==t.props.utcOffsetMinutes||e[18]!==A?(S=c.jsx(le,{message:"Your audience's timezone, as a fixed offset. It does not shift for daylight saving.",children:c.jsx(ge,{"aria-label":"Timezone",value:t.props.utcOffsetMinutes,options:Qp,onValueChange:A})}),e[17]=t.props.utcOffsetMinutes,e[18]=A,e[19]=S):S=e[19];let E;e[20]!==p.length?(E=c.jsx(Pk,{count:p.length}),e[20]=p.length,e[21]=E):E=e[21];let _;e[22]!==S||e[23]!==E||e[24]!==v?(_=c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[v,k,S,E]}),e[22]=S,e[23]=E,e[24]=v,e[25]=_):_=e[25];let C;e[26]!==l||e[27]!==h||e[28]!==t||e[29]!==n||e[30]!==p?(C=l?c.jsxs("div",{className:"flex flex-col gap-1",children:[p.map((z,N)=>c.jsxs(Wt,{children:["between ",uw(z.start)," and ",uw(z.end)]},`${t.id}-window-${N}`)),c.jsx(ap,{problems:h})]}):c.jsxs(c.Fragment,{children:[p.map((z,N)=>c.jsxs("div",{className:"group flex items-center gap-2",children:[c.jsx("span",{className:"text-slate-dim px-1",children:"between"}),c.jsx(le,{message:"The first hour included.",children:c.jsx(ge,{"aria-label":`Start hour ${N+1}`,value:z.start,options:Jp,onValueChange:R=>n(t,{windows:sp(p,N,{start:R})})})}),c.jsx("span",{className:"text-slate-dim px-1",children:"and"}),c.jsx(le,{message:"The first hour NOT included â 6pm to 9pm is three hours.",children:c.jsx(ge,{"aria-label":`End hour ${N+1}`,value:z.end,options:Jp,onValueChange:R=>n(t,{windows:sp(p,N,{end:R})})})}),p.length>1&&c.jsx(Ck,{label:`Remove window ${N+1}`,onPress:()=>n(t,{windows:Ek(p,N)})})]},`${t.id}-window-${N}`)),c.jsx(Ne,{size:"sm",variant:"ghost",className:"self-start",onPress:()=>n(t,{windows:[...p,Rk]}),children:"Add another window"}),c.jsx(ap,{problems:h}),c.jsx(Tk,{message:Vu(h)})]}),e[26]=l,e[27]=h,e[28]=t,e[29]=n,e[30]=p,e[31]=C):C=e[31];let O;e[32]!==_||e[33]!==C?(O=c.jsx(Ee,{children:c.jsxs("div",{className:"flex-1 flex flex-col gap-2",children:[_,C]})}),e[32]=_,e[33]=C,e[34]=O):O=e[34];let V;e[35]!==i||e[36]!==r||e[37]!==s||e[38]!==d||e[39]!==t.props.resultState||e[40]!==O||e[41]!==y||e[42]!==m||e[43]!==w?(V=c.jsxs(we,{resultState:t.props.resultState,pattern:y,isBound:r,className:i,variant:m,isSelected:s,onUpdateDimensions:d,dynamicHeight:!0,children:[w,O]}),e[35]=i,e[36]=r,e[37]=s,e[38]=d,e[39]=t.props.resultState,e[40]=O,e[41]=y,e[42]=m,e[43]=w,e[44]=V):V=e[44];let I;return e[45]!==t||e[46]!==V?(I=c.jsx(Se,{value:t,children:V}),e[45]=t,e[46]=V,e[47]=I):I=e[47],I}class LO extends De{static id=Fr;static uiToolDef=e=>({id:Fr,icon:BT,label:ra.docs.title,defaultColor:ra.docs.defaultColor,onSelect:()=>e.setCurrentTool(Fr),docs:()=>c.jsx(Oe,{editor:e,util:ra,component:Dk})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Fr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class ra extends Pe{static migrations=Ie(Fr);static type=Fr;static docs={defaultColor:"indigo",title:"Date Range",description:c.jsxs("div",{children:[c.jsx("div",{children:"Matches posts made within a range of dates."}),c.jsxs(Un,{className:"ml-1",children:[c.jsxs(qe,{className:"my-1",children:["Put it inside a logic block to date-limit"," ",c.jsx("span",{className:"font-black",children:"part"})," of a feed rather than the whole thing."]}),c.jsxs(qe,{className:"my-1",children:["The ",c.jsx("span",{className:"font-black",children:"end date is not included"}),", so two ranges that meet never both claim the same day. To cover all of the 2nd, end on the 3rd."]}),c.jsx(qe,{className:"my-1",children:"The timezone decides where a day begins â âthe 2ndâ in UTC starts on the evening of the 1st in the Americas."}),c.jsxs(qe,{className:"my-1",children:["A node may hold ",c.jsx("span",{className:"font-black",children:"many ranges"})," and matches a post that falls in ",c.jsx("span",{className:"font-black",children:"any"})," ","of them â a whole season of games is one node."]}),c.jsxs(qe,{className:"my-1",children:["A bound may include a ",c.jsx("span",{className:"font-black",children:"time of day"}),". Leave the time empty for midnight, so a range of whole days needs only dates."]}),c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"Paste a schedule"})," accepts one window per line â â2026-10-22 7:00pm to 10:30pmâ, or a date alone for the whole day. When a named timezone is chosen, each time is stored with its own offset, so a season that crosses a daylight-saving change stays right game by game; the nodeâs timezone then applies only to dates and times entered without one."]}),c.jsx(qe,{className:"my-1",children:"A post whose timestamp cannot be read is excluded rather than let through."}),c.jsxs(qe,{className:"my-1",children:[c.jsx("span",{className:"font-black",children:"Which date you pick matters."})," ",c.jsx("span",{className:"font-black",children:"Post Created Date"})," is what the posting app claims; ",c.jsx("span",{className:"font-black",children:"Post Arrival Date"}
174)," ","is when the post actually reached the network, and is the timestamp the Bluesky app shows you. They usually agree within a second or two, but bridged accounts â anything ending"," ",c.jsx("span",{className:"font-black",children:".brid.gy"})," â are routinely hours apart, which is what makes a feed look like it let the wrong posts in."]})]})]})};getType(){return Fr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,var:pe,windows:jk,utcOffsetMinutes:pe,metadata:Ce};getDefaultProps(){return{w:300,minW:720,h:He,var:Ak,windows:[_k],utcOffsetMinutes:"0",metadata:void 0}}component(e){const r=this.editor.getSelectedShapeIds();return c.jsx(Dk,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:r.includes(e.id)})}}function fw(o){const e=Q.c(28),{bound:r,index:t,side:i,onChange:n}=o;let s;e[0]!==r?(s=FT(r),e[0]=r,e[1]=s):s=e[1];const l=s,a=i==="start"?"Start":"End",d=i==="start"?"from":"until";let p;e[2]!==d?(p=c.jsx("span",{className:"text-slate-dim px-1",children:d}),e[2]=d,e[3]=p):p=e[3];const u=i==="start"?"The first day included.":"The first day NOT included. To cover all of the 2nd, end on the 3rd.",h=`${a} date ${t+1}`;let y;e[4]!==n||e[5]!==l?(y=E=>n(aw({...l,date:E})),e[4]=n,e[5]=l,e[6]=y):y=e[6];let m;e[7]!==l.date||e[8]!==h||e[9]!==y?(m=c.jsx($e,{"aria-label":h,type:"date",className:"w-[9.5rem] shrink-0",value:l.date,onValueChange:y}),e[7]=l.date,e[8]=h,e[9]=y,e[10]=m):m=e[10];let w;e[11]!==u||e[12]!==m?(w=c.jsx(le,{message:u,children:m}),e[11]=u,e[12]=m,e[13]=w):w=e[13];const x=`${a} time ${t+1}`;let v;e[14]!==n||e[15]!==l?(v=E=>n(aw({...l,time:E})),e[14]=n,e[15]=l,e[16]=v):v=e[16];let k;e[17]!==l.time||e[18]!==v||e[19]!==x?(k=c.jsx(le,{message:"Optional. Empty means midnight.",children:c.jsx($e,{"aria-label":x,type:"time",className:"w-[7.5rem] shrink-0",value:l.time,onValueChange:v,required:!1})}),e[17]=l.time,e[18]=v,e[19]=x,e[20]=k):k=e[20];let A;e[21]!==l.zone?(A=l.zone&&c.jsx(le,{message:"This bound carries its own offset, so the node's timezone does not move it.",children:c.jsx("span",{className:"text-slate-dim text-xs",children:aq(l.zone)})}),e[21]=l.zone,e[22]=A):A=e[22];let S;return e[23]!==k||e[24]!==A||e[25]!==p||e[26]!==w?(S=c.jsxs("span",{className:"inline-flex items-center gap-2",children:[p,w,k,A]}),e[23]=k,e[24]=A,e[25]=p,e[26]=w,e[27]=S):S=e[27],S}function pq(o){const e=Q.c(26),{nodeOffsetLabel:r,onAdd:t}=o,[i,n]=Y.useState(""),[s,l]=Y.useState(fq),a=`This node's timezone (${r})`;let d;e[0]!==a?(d=[{value:"node",label:a},...UT().map(uq)],e[0]=a,e[1]=d):d=e[1];const p=d;let u;e[2]!==i||e[3]!==s?(u=tq(i,s==="node"?{kind:"node"}:{kind:"iana",zone:s}),e[2]=i,e[3]=s,e[4]=u):u=e[4];const h=u,y=h.windows.length;let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=c.jsx("span",{className:"text-slate-dim px-1",children:"Times are in"}),e[5]=m):m=e[5];let w;e[6]!==p||e[7]!==s?(w=c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[m,c.jsx(le,{message:"A named zone stores each time with the offset it has on that date, so a schedule across a daylight-saving change stays right. The node's timezone stores plain times that the node's offset applies to.",children:c.jsx(ge,{"aria-label":"Schedule timezone",value:s,options:p,onValueChange:l})})]}),e[6]=p,e[7]=s,e[8]=w):w=e[8];let x;e[9]!==i?(x=c.jsx(ci,{"aria-label":"Schedule, one window per line",minRows:4,className:"min-h-[96px] font-mono text-xs",placeholder:`One window per line, for example: 1752026-10-22 7:00pm to 10:30pm 1762026-10-24 19:00 - 01:30 1772026-10-26`,value:i,onValueChange:n,required:!1}),e[9]=i,e[10]=x):x=e[10];let v;e[11]!==h.errors?(v=h.errors.length>0&&c.jsxs("span",{className:"text-xs text-red-11",children:["Could not read line",h.errors.length>1?"s":""," ",h.errors.join(", "),". Nothing was added."]}),e[11]=h.errors,e[12]=v):v=e[12];const k=y===0;let A;e[13]!==t||e[14]!==h.windows?(A=()=>{t(h.windows),n("")},e[13]=t,e[14]=h.windows,e[15]=A):A=e[15];const S=y===1?"window":"windows";let E;e[16]!==y||e[17]!==S||e[18]!==k||e[19]!==A?(E=c.jsxs(Ne,{size:"sm",variant:"outline",className:"self-start",disabled:k,onPress:A,children:["Add ",y," ",S]}),e[16]=y,e[17]=S,e[18]=k,e[19]=A,e[20]=E):E=e[20];let _;return e[21]!==E||e[22]!==w||e[23]!==x||e[24]!==v?(_=c.jsxs("div",{className:"flex flex-col gap-2 p-2 rounded-md border border-slate-normal bg-slate-subtle/50",children:[w,x,v,E]}),e[21]=E,e[22]=w,e[23]=x,e[24]=v,e[25]=_):_=e[25],_}function uq(o){return{value:o,label:o}}function fq(){return kk()}function Dk(o){const e=Q.c(53),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o,l=St()||t.props.isReadOnly,[a,d]=Y.useState(!1);let p;e[0]!==t||e[1]!==n?(p=j=>n(t,j),e[0]=t,e[1]=n,e[2]=p):p=e[2];const u=p,{windows:h}=t.props,y=Number(t.props.utcOffsetMinutes);let m;e[3]!==y||e[4]!==h?(m=nq(h,y),e[3]=y,e[4]=h,e[5]=m):m=e[5];const w=m;let x;e[6]!==t.props.utcOffsetMinutes?(x=Qp.find(j=>j.value===t.props.utcOffsetMinutes)?.label??`UTC${t.props.utcOffsetMinutes}`,e[6]=t.props.utcOffsetMinutes,e[7]=x):x=e[7];
177const v=x,k=t.props.metadata?.pattern,A=t.props.metadata?.color||ra.docs.defaultColor;let S;e[8]!==t.props?(S=c.jsx(je,{props:t.props,docs:ra.docs}),e[8]=t.props,e[9]=S):S=e[9];let E;e[10]!==t||e[11]!==n?(E=j=>n(t,{var:j}),e[10]=t,e[11]=n,e[12]=E):E=e[12];let _;e[13]!==t.props.var||e[14]!==E?(_=c.jsx(le,{message:"Which timestamp on the post to read.",children:c.jsx(Po,{value:t.props.var,validOperators:$w,onValueChange:E})}),e[13]=t.props.var,e[14]=E,e[15]=_):_=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=c.jsx("span",{className:"text-slate-dim px-1",children:"in"}),e[16]=C):C=e[16];let O;e[17]!==t||e[18]!==n?(O=j=>n(t,{utcOffsetMinutes:j}),e[17]=t,e[18]=n,e[19]=O):O=e[19];let V;e[20]!==t.props.utcOffsetMinutes||e[21]!==O?(V=c.jsx(le,{message:"Which timezone dates and times without their own offset are counted in. A fixed offset; it does not shift for daylight saving.",children:c.jsx(ge,{"aria-label":"Timezone",value:t.props.utcOffsetMinutes,options:Qp,onValueChange:O})}),e[20]=t.props.utcOffsetMinutes,e[21]=O,e[22]=V):V=e[22];let I;e[23]!==h.length?(I=c.jsx(Pk,{count:h.length}),e[23]=h.length,e[24]=I):I=e[24];let z;e[25]!==V||e[26]!==I||e[27]!==_?(z=c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[_,C,V,I]}),e[25]=V,e[26]=I,e[27]=_,e[28]=z):z=e[28];let N;e[29]!==l||e[30]!==v||e[31]!==a||e[32]!==w||e[33]!==t||e[34]!==n||e[35]!==h?(N=l?c.jsxs("div",{className:"flex flex-col gap-1",children:[h.map((j,L)=>c.jsxs(Wt,{children:[j.start||"â¦"," â ",j.end||"â¦"]},`${t.id}-window-${L}`)),c.jsx(ap,{problems:w})]}):c.jsxs(c.Fragment,{children:[h.map((j,L)=>c.jsxs("div",{className:"group flex items-center gap-2 flex-wrap",children:[c.jsx(fw,{bound:j.start,index:L,side:"start",onChange:U=>n(t,{windows:sp(h,L,{start:U})})}),c.jsx(fw,{bound:j.end,index:L,side:"end",onChange:U=>n(t,{windows:sp(h,L,{end:U})})}),h.length>1&&c.jsx(Ck,{label:`Remove range ${L+1}`,onPress:()=>n(t,{windows:Ek(h,L)})})]},`${t.id}-window-${L}`)),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Ne,{size:"sm",variant:"ghost",onPress:()=>n(t,{windows:[...h,_k]}),children:"Add another range"}),c.jsx(Ne,{size:"sm",variant:"ghost","aria-expanded":a,onPress:()=>d(hq),children:a?"Close schedule":"Paste a schedule"})]}),a&&c.jsx(pq,{nodeOffsetLabel:v,onAdd:j=>n(t,{windows:[...h.filter(mq),...j]})}),c.jsx(ap,{problems:w}),c.jsx(Tk,{message:Vu(w)})]}),e[29]=l,e[30]=v,e[31]=a,e[32]=w,e[33]=t,e[34]=n,e[35]=h,e[36]=N):N=e[36];let R;e[37]!==z||e[38]!==N?(R=c.jsx(Ee,{children:c.jsxs("div",{className:"flex-1 flex flex-col gap-2",children:[z,N]})}),e[37]=z,e[38]=N,e[39]=R):R=e[39];let D;e[40]!==i||e[41]!==r||e[42]!==s||e[43]!==u||e[44]!==t.props.resultState||e[45]!==R||e[46]!==k||e[47]!==A||e[48]!==S?(D=c.jsxs(we,{resultState:t.props.resultState,pattern:k,isBound:r,className:i,variant:A,isSelected:s,onUpdateDimensions:u,dynamicHeight:!0,children:[S,R]}),e[40]=i,e[41]=r,e[42]=s,e[43]=u,e[44]=t.props.resultState,e[45]=R,e[46]=k,e[47]=A,e[48]=S,e[49]=D):D=e[49];let q;return e[50]!==t||e[51]!==D?(q=c.jsx(Se,{value:t,children:D}),e[50]=t,e[51]=D,e[52]=q):q=e[52],q}function mq(o){return o.start||o.end}function hq(o){return!o}/** 178 * @license lucide-react v0.545.0 - ISC 179 * 180 * This source code is licensed under the ISC license. 181 * See the LICENSE file in the root directory of this source tree. 182 */const yq=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],gq=ke("hash",yq);function bq(o){return o.type===$r}class zO extends De{static id=$r;static uiToolDef=e=>({id:$r,icon:gq,label:In.docs.title,defaultColor:In.docs.defaultColor,onSelect:()=>e.setCurrentTool($r),docs:()=>c.jsx(Oe,{editor:e,component:Ok,util:In})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:$r,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class In extends Pe{static migrations=Ie($r);static type=$r;static docs={defaultColor:"blue",title:"Topic Analysis",description:"Use AI to analyze the main topic of the content. This detects various categories from arts and culture to technology and sports."};getType(){return $r}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,topicAnalysisCategory:te(...Gw),operator:te(...Xe),value:kt(F,pe),metadata:Ce};getDefaultProps(){return{w:440,minW:440,h:He,topicAnalysisCategory:"Science & Technology",operator:">=",value:.5,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(Ok,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function Ok(o){const e=Q.c(40),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=_=>n(t,_),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||In.docs.defaultColor;let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:In.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=_=>n(t,{topicAnalysisCategory:_}),e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]!==t.props.topicAnalysisCategory||e[9]!==h?(y=c.jsx(ge,{"aria-label":"Topic Analysis Category",options:Gw,value:t.props.topicAnalysisCategory,className:"shrink-0",onValueChange:h,tooltip:In.docs.description}
182),e[8]=t.props.topicAnalysisCategory,e[9]=h,e[10]=y):y=e[10];let m;e[11]!==t||e[12]!==n?(m=_=>n(t,{operator:_}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;e[14]!==t.props.operator||e[15]!==m?(w=c.jsx(it,{value:t.props.operator,onValueChange:m}),e[14]=t.props.operator,e[15]=m,e[16]=w):w=e[16];const x=t.props.value;let v;e[17]!==t||e[18]!==n?(v=_=>n(t,{value:_}),e[17]=t,e[18]=n,e[19]=v):v=e[19];let k;e[20]!==v||e[21]!==x?(k=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:x,className:"flex-1",placeholder:"Threshold",onValueChange:v})}),e[20]=v,e[21]=x,e[22]=k):k=e[22];let A;e[23]!==k||e[24]!==y||e[25]!==w?(A=c.jsxs(Ee,{children:[y,w,k]}),e[23]=k,e[24]=y,e[25]=w,e[26]=A):A=e[26];let S;e[27]!==i||e[28]!==r||e[29]!==s||e[30]!==a||e[31]!==t.props.resultState||e[32]!==A||e[33]!==d||e[34]!==p||e[35]!==u?(S=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,A]}),e[27]=i,e[28]=r,e[29]=s,e[30]=a,e[31]=t.props.resultState,e[32]=A,e[33]=d,e[34]=p,e[35]=u,e[36]=S):S=e[36];let E;return e[37]!==t||e[38]!==S?(E=c.jsx(Se,{value:t,children:S}),e[37]=t,e[38]=S,e[39]=E):E=e[39],E}/** 183 * @license lucide-react v0.545.0 - ISC 184 * 185 * This source code is licensed under the ISC license. 186 * See the LICENSE file in the root directory of this source tree. 187 */const vq=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],wq=ke("shield-alert",vq);function xq(o){return o.type===Gr}class FO extends De{static id=Gr;static uiToolDef=e=>({id:Gr,icon:wq,label:Mn.docs.title,defaultColor:Mn.docs.defaultColor,onSelect:()=>e.setCurrentTool(Gr),docs:()=>c.jsx(Oe,{editor:e,component:Ik,util:Mn})});onEnter(){this.editor.setCursor({type:"none",rotation:0})}onPointerDown(){const{currentPagePoint:e}=this.editor.inputs;this.editor.createShape({type:Gr,x:e.x,y:e.y}),this.editor.setCurrentTool("select")}}class Mn extends Pe{static migrations=Ie(Gr);static type=Gr;static docs={defaultColor:"red",title:"Toxicity Analysis",description:"Use AI to analyze the toxicity level of the content. This detects different types of toxic content including severe toxicity, obscenity, threats, insults, and identity-based attacks."};getType(){return Gr}static props={w:F,minW:F,isCollapsed:oe.optional(),resultState:te("success","failure","idle").optional(),isReadOnly:oe.optional(),h:F,toxicityAnalysisCategory:te(...Uw),operator:te(...Xe),value:kt(F,pe),metadata:Ce};getDefaultProps(){return{w:360,minW:400,h:He,toxicityAnalysisCategory:"Toxic",operator:"<=",value:.5,metadata:void 0}}component(e){const t=this.editor.getSelectedShapeIds().includes(e.id);return c.jsx(Ik,{shape:e,updateShape:this.updateProps.bind(this),isBound:this.getBoundToFeed(e),isSelected:t})}}function Ik(o){const e=Q.c(40),{isBound:r,shape:t,className:i,updateShape:n,isSelected:s}=o;let l;e[0]!==t||e[1]!==n?(l=_=>n(t,_),e[0]=t,e[1]=n,e[2]=l):l=e[2];const a=l,d=t.props.metadata?.pattern,p=t.props.metadata?.color||Mn.docs.defaultColor;let u;e[3]!==t.props?(u=c.jsx(je,{props:t.props,docs:Mn.docs}),e[3]=t.props,e[4]=u):u=e[4];let h;e[5]!==t||e[6]!==n?(h=_=>n(t,{toxicityAnalysisCategory:_}),e[5]=t,e[6]=n,e[7]=h):h=e[7];let y;e[8]!==t.props.toxicityAnalysisCategory||e[9]!==h?(y=c.jsx(ge,{"aria-label":"Toxicity Analysis Category",options:Uw,value:t.props.toxicityAnalysisCategory,className:"w-[160px] shrink-0",onValueChange:h,tooltip:Mn.docs.description}),e[8]=t.props.toxicityAnalysisCategory,e[9]=h,e[10]=y):y=e[10];let m;e[11]!==t||e[12]!==n?(m=_=>n(t,{operator:_}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;e[14]!==t.props.operator||e[15]!==m?(w=c.jsx(it,{value:t.props.operator,onValueChange:m}),e[14]=t.props.operator,e[15]=m,e[16]=w):w=e[16];const x=t.props.value;let v;e[17]!==t||e[18]!==n?(v=_=>n(t,{value:_}),e[17]=t,e[18]=n,e[19]=v):v=e[19];let k;e[20]!==v||e[21]!==x?(k=c.jsx(le,{message:Nt,children:c.jsx(Ye,{"aria-label":"Threshold",value:x,className:"flex-1",placeholder:"Threshold",onValueChange:v})}),e[20]=v,e[21]=x,e[22]=k):k=e[22];let A;e[23]!==k||e[24]!==y||e[25]!==w?(A=c.jsxs(Ee,{children:[y,w,k]}),e[23]=k,e[24]=y,e[25]=w,e[26]=A):A=e[26];let S;
187e[27]!==i||e[28]!==r||e[29]!==s||e[30]!==a||e[31]!==t.props.resultState||e[32]!==A||e[33]!==d||e[34]!==p||e[35]!==u?(S=c.jsxs(we,{resultState:t.props.resultState,pattern:d,isBound:r,className:i,variant:p,isSelected:s,onUpdateDimensions:a,dynamicHeight:!0,children:[u,A]}),e[27]=i,e[28]=r,e[29]=s,e[30]=a,e[31]=t.props.resultState,e[32]=A,e[33]=d,e[34]=p,e[35]=u,e[36]=S):S=e[36];let E;return e[37]!==t||e[38]!==S?(E=c.jsx(Se,{value:t,children:S}),e[37]=t,e[38]=S,e[39]=E):E=e[39],E}function au(o){return(e,r)=>{const t=o.getPointInShapeSpace(e,{x:0,y:0}).y;return o.getPointInShapeSpace(r,{x:0,y:0}).y-t}}function cp(o,e){if(V2(e))return dA(e.props);if(iT(e))return af(e.props);if(D2(e))return af(e.props);if(gP(e))return pA(e.props);if(lq(e))return uA(e.props);if(dq(e))return fA(e.props);if(W2(e))return mA(e.props);if(TT(e))return hA(e.props);if(BP(e))return yA(e.props);if(MT(e))return gA(e.props);if(cT(e))return bA(e.props);if(AT(e))return vA(e.props);if(w2(e))return wA(e.props);if(pT(e))return xA(e.props);if(S2(e))return kA(e.props);if(vP(e))return SA(e.props);if(A2(e))return AA(e.props);if(UP(e))return RA(e.props);if(m2(e))return _A(e.props);if(J2(e))return jA(e.props);if(a2(e))return EA(e.props);if(xq(e))return CA(e.props);if(zP(e))return PA(e.props);if(vT(e))return TA(e.props);if(bq(e))return qA(e.props);if(jT(e))return DA(e.props);if(f2(e))return OA(e.props);if(d2(e))return IA(e.props);if(G2(e))return MA(e.props);if(fu(e)){const t=o.getBindingsInvolvingShape(e).filter(i=>i.fromId===e.id).map(i=>o.getShape(i.toId)).filter(i=>!!i).sort(au(o)).map(i=>cp(o,i));return{each:[e.props.var,t[0]||{and:[]}],metadata:e.props.metadata}}if(up(e))return{...Fn(e.props.filter,e.props.filter.metadata?.customNodeParameters||[]),metadata:{...e.props.node,isCustomNode:!0,customNodeAutoUpdate:e.props.metadata?.customNodeAutoUpdate,color:e.props.metadata?.color||e.props.filter.metadata?.color,component_name:e.props.node.title,customNodeParameters:e.props.filter.metadata?.customNodeParameters,customNodeParameterGroups:e.props.filter.metadata?.customNodeParameterGroups}};if(pp(e)){const t=o.getBindingsFromShape(e,"layout").filter(n=>n.fromId===e.id).map(n=>o.getShape(n.toId)).filter(n=>!!n).sort(au(o)).map(n=>cp(o,n)),i=e.props.type==="and"?{and:t,metadata:{...e.props.metadata}}:{or:t,metadata:{...e.props.metadata}};return i.metadata&&!i.metadata.isCustomNode&&(delete i.metadata.customNodeAutoUpdate,delete i.metadata.customNodeParameterGroups,delete i.metadata.customNodeParameters),i}if(M2(e))return NA(e.props);throw console.log("Unimplemented",e),new Error(`The feed builder cannot serialize a "${e.type}" node.`)}function kq(o){const e=s2(o)||IP(o);if(!e)return;const r=oa(e)?{order:"new",custom_sort_settings:void 0}:lP(o,e),t=o.getBindingsFromShape(e,"layout").find(s=>{const l=o.getShape(s.toId);return l&&!It(l)});if(!t)return{manifest:{filter:{}},...r};const i=o.getShape(t.toId);if(!i)return{manifest:{filter:{}},...r};const n=cp(o,i);return oa(e)?(n.metadata={...n.metadata,customNodeParameters:e.props.customNodeParameters,customNodeParameterGroups:e.props.customNodeParameterGroups},{manifest:{filter:n},order:"new",custom_sort_settings:void 0}):{...r,manifest:{filter:n}}}function mw(o){return typeof o=="number"&&Number.isFinite(o)?o:0}function Jd(o){if(!o||typeof o!="object")return o;const e=o.metadata;if(!e?.isCustomNode)return"and"in o?{...o,and:o.and.map(Jd)}:"or"in o?{...o,or:o.or.map(Jd)}:"each"in o?{...o,each:[o.each[0],Jd(o.each[1])]}:o;const r=e.component_id;if(typeof r!="number"||r<=0)return o;const t={};for(const i of e.customNodeParameters||[])i?.name&&i.value!==void 0&&i.value!==null&&(t[i.name]=i.value);return{$component:{component_id:r,version:e.version_id,values:t,track_latest:!!e.customNodeAutoUpdate,dependency_intent:e.dependency_intent,display:{title:e.title,description:e.description,color:e.color,component_name:e.component_name??e.title},customNodeParameterGroups:e.customNodeParameterGroups}}}function $O(o){return{...o,filter:Jd(o.filter)}}function hw(o){return o.replace(/[\\"\u0000-\u001F\u2028\u2029]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case` 188`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}})}function yw(o,e){if(CS(o)){const r=o.each[0].replace(/^\$/,""),t=e.find(s=>
188s.name===r);if(!t)throw new Error(`Parameter ${r} not found`);const n=(t.value??t.exampleValue).map(s=>Fn(o.each[1],[...e,{name:`${r}_ITEM`,exampleValue:s,value:s,type:"input",description:""}]))??[];if(n.length)return n.map(s=>cu(s,e))}return cu(o,e)}function cu(o,e){return"and"in o?{and:o.and.map(r=>yw(r,e)).flat(),metadata:o.metadata}:"or"in o?{or:o.or.map(r=>yw(r,e)).flat(),metadata:o.metadata}:o}function Fn(o,e){let r=JSON.stringify(cu(o,e),null,2);const t=[...e].sort((i,n)=>n.name.localeCompare(i.name));for(const i of t){const n=new RegExp(`\\$${i.name}`,"g");if(i.type==="input"||i.type==="regex"||i.type==="select"||i.type==="number"&&typeof i.value=="string"||!i.type)r=r.replace(n,hw(i.value??i.exampleValue));else if(i.type==="toggle"){const s=new RegExp(`"\\$${i.name}"`,"g");r=r.replace(s,`${i.value??i.exampleValue}`)}else if(i.type==="list"){const s=new RegExp(`"(.*\\$${i.name}.*)"`,"g");for(const l of r.matchAll(s)){const a=(i.value??i.exampleValue).map(hw).map(d=>l[1]?.replace(n,d)||d).map(d=>`"${d}"`).join(",");r=r.replace(l[0],a)}}else if(i.type==="number"){const s=new RegExp(`"\\$${i.name}"`,"g");r=r.replace(s,`${i.value??i.exampleValue}`);const l=new RegExp(`(".*)\\$${i.name}(.*")`,"g");r=r.replace(l,`$1${i.value??i.exampleValue}$2`)}}return JSON.parse(r)}function GO(o,e){const r=[e.props.filter.metadata?.customNodeParameters||[]];let t=e.parentId;for(;t;){const i=o.getShape(t);i&&(up(i)?r.push(i.props.filter.metadata?.customNodeParameters||[]):oa(i)&&r.push(i.props.customNodeParameters||[])),t=i?.parentId}return r}function UO(o,e){return e.reduce((r,t)=>t.length?Fn(r,t):r,o)}function Sq(o){if(!o)return o;const e={};for(const r of BA)r in o&&(e[r]=o[r]);return e}function Aq(o){return{isCustomNode:!1,customNodeAutoUpdate:o.customNodeAutoUpdate,color:o.color,pattern:o.pattern,component_name:o.component_name,title:o.component_name&&o.title!==o.component_name?o.title:void 0}}function Rq(o){const e=Object.keys(o||{}).filter(r=>r!=="metadata");return e.length?`The feed builder has no rule for ${e.map(r=>`"${r}"`).join(", ")}.`:"The feed builder was handed a rule with nothing in it."}function Lu(o){const{editor:e,toId:r,filter:t,index:i,prevIndex:n,isReadOnly:s,id:l}=o,a=l||mr(),d=r?e.getShape(r):void 0;let p=!0;const u=Sq(t.metadata),h=d&&"padding"in d.props?d.props.padding:{top:0,left:0},y=(d?d.x:0)+h.left*2,m=(d?d.y:0)+h.top-20;if(t.metadata?.isCustomNode)p=!1,e.createShape({type:Yd,x:y,y:m,id:a,props:{isReadOnly:s,filter:{...t,metadata:{...t.metadata,isCustomNode:!1}},metadata:Aq(t.metadata),node:{title:t.metadata.title,description:t.metadata.description,component_id:mw(t.metadata.component_id),version_id:mw(t.metadata.version_id),dependency_intent:t.metadata.dependency_intent}}});else if("and"in t||"or"in t){const x="and"in t;e.createShape({type:Nd,x:y,y:m,id:a,props:{isReadOnly:s,type:x?"and":"or",metadata:u}})}else if("each"in t)e.createShape({type:Gp,x:y,y:m,id:a,props:{isReadOnly:s,metadata:u,var:t.each[0]}});else if(PS(t))e.createShape({type:fr,x:y,y:m,id:a,props:{isReadOnly:s,type:"match",var:t.regex_matches[0],regex:t.regex_matches[1],insensitive:t.regex_matches[2]??!1,metadata:u}});else if(TS(t))e.createShape({type:ur,x:y,y:m,id:a,props:{isReadOnly:s,type:"any",var:t.regex_any[0],regex:t.regex_any[1],insensitive:t.regex_any[2]??!1,regex_match:t.regex_any[3]??!1,metadata:u}});else if(qS(t))e.createShape({type:ur,x:y,y:m,id:a,props:{isReadOnly:s,type:"none",var:t.regex_none[0],regex:t.regex_none[1],insensitive:t.regex_none[2]??!1,regex_match:t.regex_none[3]??!1,metadata:u}});else if(DS(t))e.createShape({type:fr,x:y,y:m,id:a,props:{isReadOnly:s,type:"exclude",var:t.regex_negation_matches[0],regex:t.regex_negation_matches[1],insensitive:t.regex_negation_matches[2]??!1,metadata:u}});else if(OS(t))e.createShape({type:Lr,x:y,y:m,id:a,props:{isReadOnly:s,var:t.text_similarity[0],anchorText:t.text_similarity[1].anchor_text,modelName:t.text_similarity[1].model_name,operator:t.text_similarity[2],threshold:t.text_similarity[3],metadata:u}});else if(IS(t))e.createShape({type:vr,x:y,y:m,id:a,props:{isReadOnly:s,var:t.attribute_compare[0],operator:t.attribute_compare[1],value:t.attribute_compare[2],metadata:u}});else if(MS(t))e.createShape({type:zr,x:y,y:m,id:a,props:{isReadOnly:s,var:t.hour_of_day_between[0],windows:sf(t.hour_of_day_between[1],t.hour_of_day_between[2]),utcOffsetMinutes:String(t.hour_of_day_between[3]??0),metadata:u}});else if(NS(t))e.createShape({type:Fr,x:y,y:m,id:a,props:{isReadOnly:s,var:t.date_between[0],windows:sf(t.date_between[1],t.date_between[2]),utcOffsetMinutes:String(t.date_between[3]??0),metadata:u}});else if(BS(t))e.createShape({type:qr,x:y,y:m,id:a,props:{isReadOnly:s,numerator:t.ratio_compare[0],denominator:t.ratio_compare[1],operator:t.ratio_compare[2],value:t.ratio_compare[3],metadata:u}});else if(VS(t))e.createShape({type:Vr,x:y,y:m,id:a,props:{isReadOnly:s,...LS(t),metadata:u}});else if(zS(t))e.createShape({type:xr,x:y,y:m,id:a,props:{isReadOnly:s,operator:t.embed_type[0],embed_name:t.embed_type[1],metadata:u}});else if(FS(t))e.createShape({type:Or,x:y,y:m,id:a,props:{isReadOnly:s,username:t.social_graph[0],operator:t.
188social_graph[1],direction:t.social_graph[2],metadata:u}});else if($S(t))e.createShape({type:Nr,x:y,y:m,id:a,props:{isReadOnly:s,starterPackUrl:t.starter_pack_member[0],operator:t.starter_pack_member[1],metadata:u}});else if(GS(t))e.createShape({type:jr,x:y,y:m,id:a,props:{isReadOnly:s,listUrl:t.list_member[0],operator:t.list_member[1],metadata:u}});else if(US(t))e.createShape({type:Ir,x:y,y:m,id:a,props:{isReadOnly:s,dids:t.social_list[0],operator:t.social_list[1],metadata:u}});else if(HS(t))e.createShape({type:Er,x:y,y:m,id:a,props:{isReadOnly:s,magicAudienceId:parseInt(t.magic_audience[0]),operator:t.magic_audience[1],metadata:u}});else if(KS(t))e.createShape({type:Cr,x:y,y:m,id:a,props:{isReadOnly:s,modelName:t.model_probability[0],operator:t.model_probability[1],threshold:t.model_probability[2],metadata:u}});else if(WS(t))e.createShape({type:wr,x:y,y:m,id:a,props:{isReadOnly:s,moderationCategory:t.content_moderation[0],operator:t.content_moderation[1],value:t.content_moderation[2],metadata:u}});else if(XS(t))"entity_matches"in t?e.createShape({type:pr,x:y,y:m,id:a,props:{isReadOnly:s,operator:"in",type:t.entity_matches[0],entities:t.entity_matches[1],metadata:u}}):e.createShape({type:pr,x:y,y:m,id:a,props:{isReadOnly:s,operator:"not_in",type:t.entity_excludes[0],entities:t.entity_excludes[1],metadata:u}});else if(QS(t))e.createShape({type:_r,x:y,y:m,id:a,props:{isReadOnly:s,languageAnalysisCategory:t.language_analysis[0],operator:t.language_analysis[1],value:t.language_analysis[2],metadata:u}});else if(JS(t))e.createShape({type:Dr,x:y,y:m,id:a,props:{isReadOnly:s,sentimentAnalysisCategory:t.sentiment_analysis[0],operator:t.sentiment_analysis[1],value:t.sentiment_analysis[2],metadata:u}});else if(YS(t))e.createShape({type:Sr,x:y,y:m,id:a,props:{isReadOnly:s,financialSentimentAnalysisCategory:t.financial_sentiment_analysis[0],operator:t.financial_sentiment_analysis[1],value:t.financial_sentiment_analysis[2],metadata:u}});else if(ZS(t))e.createShape({type:Gr,x:y,y:m,id:a,props:{isReadOnly:s,toxicityAnalysisCategory:t.toxicity_analysis[0],operator:t.toxicity_analysis[1],value:t.toxicity_analysis[2],metadata:u}});else if(eA(t))e.createShape({type:kr,x:y,y:m,id:a,props:{isReadOnly:s,emotionAnalysisCategory:t.emotion_sentiment_analysis[0],operator:t.emotion_sentiment_analysis[1],value:t.emotion_sentiment_analysis[2],metadata:u}});else if(tA(t))e.createShape({type:Mr,x:y,y:m,id:a,props:{isReadOnly:s,topicAnalysisCategory:t.marketing_check[0],operator:t.marketing_check[1],value:t.marketing_check[2],metadata:u}});else if(rA(t))e.createShape({type:$r,x:y,y:m,id:a,props:{isReadOnly:s,topicAnalysisCategory:t.topic_analysis[0],operator:t.topic_analysis[1],value:t.topic_analysis[2],metadata:u}});else if(oA(t))e.createShape({type:Br,x:300,y:300,id:a,props:{isReadOnly:s,tag:t.text_arbitrary[0],operator:t.text_arbitrary[1],value:t.text_arbitrary[2],metadata:u}});else if(iA(t))e.createShape({type:Rr,x:300,y:300,id:a,props:{isReadOnly:s,imageModerationCategory:t.image_nsfw[0],operator:t.image_nsfw[1],value:t.image_nsfw[2],metadata:u}});else if(nA(t))e.createShape({type:Ar,x:300,y:300,id:a,props:{isReadOnly:s,tag:t.image_arbitrary[0],operator:t.image_arbitrary[1],value:t.image_arbitrary[2],metadata:u}});else if(sA(t))e.createShape({type:Tr,x:y,y:m,id:a,props:{isReadOnly:s,operator:t.post_type[0],post_type:t.post_type[1][0],metadata:u}});else if(aA(t))e.createShape({type:dr,x:y,y:m,id:a,props:{isReadOnly:s,var:`${t.param_compare[0]}`,operator:t.param_compare[1],compare:`${t.param_compare[2]}`,metadata:u}});else if(cA(t)){const[x,v,k,A]=lA(t);e.createShape({type:Pr,x:y,y:m,id:a,props:{isReadOnly:s,prompt:x,operator:v,threshold:k,overQuota:A,metadata:u}})}else throw console.log("Unimplemented",t),new Error(Rq(t));const w=i||pa(n);if(r){e.createBinding({fromId:r,toId:a,type:"layout",props:{index:w,placeholder:!1}});const x=e.getShape(a);e.updateShape({id:a,type:x.type,parentId:r})}if(p&&("and"in t||"or"in t||"each"in t)){const x="and"in t?t.and:"or"in t?t.or:[t.each[1]];let v;for(const k of x)v=Lu({editor:e,toId:a,filter:k,prevIndex:v,isReadOnly:s}).index}return{index:w,id:a}}function gw(...o){return o.find(e=>e&&e.length>0)}function _q(o,e,r){if(r?.variant==="custom-node"){const t=o.getShape(Ot),i=e?.manifest?.filter?.metadata;o.createShape({type:Hr,x:0,y:0,id:Ot,props:{...t?.props,customNodeParameterGroups:gw(i?.customNodeParameterGroups,r?.customNodeParameterGroups,t?.props.customNodeParameterGroups),customNodeParameters:gw(i?.customNodeParameters,t?.props.customNodeParameters,r?.customNodeParameters)??[],title:t?.props.title||r?.title,de
188scription:t?.props.description||r?.description}})}else{const t=o.getShape(Ot);o.createShape({type:Eo,x:0,y:0,id:Ot,props:{...t?.props,order:t?.props.order||e?.order||"new",title:t?.props.title||r?.title,description:t?.props.description||r?.description,custom_sort_settings:t?.props.custom_sort_settings||r?.custom_sort_settings||e?.custom_sort_settings}});const i=o.getShape(Ot);i&&Mu(o,i)}return e?.manifest?.filter&&Object.keys(e.manifest.filter).length&&Lu({editor:o,toId:Ot,filter:e.manifest.filter}),Ot}function HO(o,e,r){const t=o.getSnapshot();let i;if(o.run(()=>{try{Nu(o),o.deleteShape(Ot);const n=o.getShape(Ot);n&&e&&br(n)&&o.updateShape({id:n.id,type:n.type,props:{order:e.order||n.props.order,custom_sort_settings:e.custom_sort_settings??void 0}}),_q(o,e,r)}catch(n){o.loadSnapshot(t),i=n}}),i)throw i;return Ot}function jq(o){return o?o.undecided?.includes(0)?"undecided":o.result[0]?"success":"failure":"idle"}let Eq=0;function bw(o){const e=jq(o);return e==="undecided"?"idle":e}function lu(o,e){const r=o.getShapeUtil(e).constructor.props;return r!==void 0&&"resultState"in r}function du(o){if(!(!o||typeof o!="object"))return Object.keys(o).find(e=>e!=="metadata"&&!e.startsWith("_"))}function Cq(o,e){if(pp(e))return e.props.type;if(fu(e))return"each";if(up(e))return du(e.props.filter);try{return du(cp(o,e))}catch{return}}function pu(o,e){return o===void 0||e===void 0||o===e}function Pq(o,e){return o.length===e.length&&o.every((r,t)=>pu(r,e[t]))}function Tq(o,e){const r=e.length+1,t=new Array((o.length+1)*r).fill(0),i=(a,d)=>t[a*r+d]??0;for(let a=o.length-1;a>=0;a--)for(let d=e.length-1;d>=0;d--)t[a*r+d]=pu(o[a],e[d])?i(a+1,d+1)+1:Math.max(i(a+1,d),i(a,d+1));const n=new Array(o.length).fill(void 0);let s=0,l=0;for(;s<o.length&&l<e.length;)pu(o[s],e[l])?(n[s]=l,s++,l++):i(s+1,l)>=i(s,l+1)?s++:l++;return n}function qq(o,e){const r=d=>{const p=new Map;for(const u of d)u!==void 0&&p.set(u,(p.get(u)??0)+1);return p},t=r(o),i=r(e),n=new Array(o.length).fill(void 0),s=new Set;o.forEach((d,p)=>{if(d===void 0||t.get(d)!==1||i.get(d)!==1)return;const u=e.indexOf(d);u!==-1&&(n[p]=u,s.add(u))});const l=o.map((d,p)=>p).filter(d=>n[d]===void 0),a=e.map((d,p)=>p).filter(d=>!s.has(d));return Tq(l.map(d=>o[d]),a.map(d=>e[d])).forEach((d,p)=>{if(d===void 0)return;const u=l[p],h=a[d];u===void 0||h===void 0||(n[u]=h)}),n}function Mk(o,e,r,t,i){if(lu(o,r)&&o.updateShape({...r,props:{...r.props,resultState:bw(t)}}),r.type===Yd){const[y]=o.getBindingsFromShape(r,"layout");if(y){const m=o.getShape(y.toId);m&&lu(o,m)&&(r=m,o.updateShape({...r,props:{...r.props,resultState:bw(t)}}))}}if(t?.scores.length&&typeof t.scores[0]=="number"){const y=(e.props.w-r.props.w)/2;o.createShape({type:"text",id:mr(`debug-annotation-${Eq++}`),x:e.props.w-y+20,y:(r.props.h-20)/2,parentId:r.id,meta:{isAnnotation:!0},props:{richText:VA(`${t.scores[0]}`),font:"mono"}})}const n=o.getBindingsFromShape(r,"layout");if(!n.length)return;const s=new Map(n.map(y=>[y.toId,y.props.index])),l=au(o),a=n.map(y=>o.getShape(y.toId)).filter(y=>!!y).sort((y,m)=>{const w=l(y,m);if(w!==0)return w;const x=s.get(y.id),v=s.get(m.id);return x===void 0||v===void 0?0:x<v?-1:x>v?1:0}),d=t?.sub_audit??[],p=a.map(y=>Cq(o,y)),u=d.map(y=>du(y?.condition)),h=t&&d.length>0&&!Pq(p,u)?qq(p,u):void 0;for(let y=0;y<a.length;y++){const m=a[y];if(!m)continue;const w=h?h[y]:y;h&&w===void 0&&i.count++,Mk(o,e,m,w===void 0?void 0:d[w],i)}}function Dq(o,e,r){const t=o.getBindingsFromShape(e,"layout").find(s=>{const l=o.getShape(s.toId);return l&&!It(l)});if(!t)return 0;const i=o.getShape(t.toId);if(!i)return 0;const n={count:0};return Mk(o,e,i,r.audit,n),n.count}function Nk(o,e){lu(o,e)&&o.updateShape({...e,props:{...e.props,resultState:"idle"}});const r=o.getBindingsFromShape(e,"layout");if(r.length)for(let t=0;t<r.length;t++){const i=r[t];if(!i)continue;const n=o.getShape(i.toId);n&&Nk(o,n)}}function Oq(o){const e=o.getCurrentPageId();Array.from(o.getPageShapeIds(e)).map(i=>o.getShape(i)).filter(i=>i?.parentId.startsWith("page:")).forEach(i=>{Nk(o,i)}),Array.from(o.getPageShapeIds(e)).map(i=>o.getShape(i)).filter(i=>
188i?.meta?.isAnnotation).forEach(i=>{o.deleteShape(i?.id)})}function vw(o,e,r){Oq(o);const t=o.getShape(Ot);t&&e&&requestAnimationFrame(()=>{const i=Dq(o,t,e);i>0&&r?.(i)})}function Bk(o,e){const r={...o,result:[o.result[e]],scores:[o.scores[e]],undecided:o.undecided?.includes(e)?[0]:void 0};if(o.sub_audit&&(o.sub_audit=[...o.sub_audit]),r.sub_audit)for(let t=0;t<r.sub_audit.length;t++){const i=r.sub_audit[t];i&&(r.sub_audit[t]=Bk(i,e))}return r}function Iq(o,e){const r={...o,results:[o.results[e]]};return r.audit=Bk(r.audit,e),r}const Mq=LA({id:"canvasEditor",initial:"idle",types:{context:{},events:{}},context:{visiblePanel:void 0,debugError:!1,debugMessage:"",debugResults:{},debugPostUrl:void 0,generateMessage:"",generatedFeed:[],debugHiddenStatuses:{},debugPresenceStatuses:{},pendingAuditResults:[]},entry:rt({visiblePanel:({event:o})=>{if("input"in o)return o.input.visiblePanel},debugResults:({event:o})=>"input"in o?o.input.debugResults||{}:{}}),on:{SET_DEBUG_RESULT_URL:{actions:"setDebugResultUrl"},SET_VISIBLE_PANEL:{actions:"setVisiblePanel"},SET_DEBUG_MESSAGE:{actions:"setDebugMessage"},SET_DEBUG_ERROR:{actions:"setDebugError"},SET_DEBUG_RESULTS:{actions:"setDebugResults"},SET_GENERATE_MESSAGE:{actions:"setGenerateMessage"},SET_DEBUG_HIDDEN_STATUSES:{actions:"setDebugHiddenStatuses"},SET_DEBUG_PRESENCE_STATUSES:{actions:"setDebugPresenceStatuses"},ADD_TO_FEED:{actions:"addToFeed"},REMOVE_AUDIT_ITEM:{actions:["removeAuditItem","onRemoveAuditItem"]}},type:"parallel",states:{idle:{type:"parallel",states:{debugPost:{initial:"idle",states:{idle:{on:{START_AUDIT:{target:"running",guard:"isFormValid"}}},running:{entry:["setPostPanelVisible","resetDebugError","setPendingAuditResults","onDebugPost"],invoke:{id:"audit",input:({event:o})=>{if(o.type!=="START_AUDIT")throw new Error("Invalid event type");return{urls:o.urls,manifest:o.manifest,editor:o.editor,algo_id:o.algo_id}},src:cf(({input:o,sendBack:e})=>{const r=o;vw(r.editor,void 0),e({type:"SET_DEBUG_MESSAGE",message:"Starting audit..."});const t={};for(const l of r.urls)t[l]=void 0;e({type:"SET_DEBUG_RESULTS",results:t});const i=new WebSocket("wss://api.graze.social/app/api/v1/workbench/live-audit");i.onopen=()=>{i.send(JSON.stringify({algo_id:r.algo_id,urls:r.urls,manifest:r.manifest.filter.metadata?.customNodeParameters?{...r.manifest,filter:Fn(r.manifest.filter,r.manifest.filter.metadata?.customNodeParameters)}:r.manifest}))};let n=!1;const s=l=>{n||(n=!0,l&&(e({type:"SET_DEBUG_MESSAGE",message:l}),e({type:"SET_DEBUG_ERROR"})),e({type:"COMPLETE_AUDIT"}))};return i.onmessage=l=>{try{const a=JSON.parse(l.data);if(a.hidden_statuses&&a.hidden_statuses.length>0&&e({type:"SET_DEBUG_HIDDEN_STATUSES",hiddenStatuses:a.hidden_statuses}),a.presence_statuses&&a.presence_statuses.length>0&&e({type:"SET_DEBUG_PRESENCE_STATUSES",presenceStatuses:a.presence_statuses}),"status"in a)a.status!=="Task completed."&&e({type:"SET_DEBUG_MESSAGE",message:a.status});else if("error"in a)e({type:"SET_DEBUG_MESSAGE",message:a.error}),e({type:"SET_DEBUG_ERROR"}),i.close(),s();else if(a.audit_log.results.length===0)e({type:"SET_DEBUG_MESSAGE",message:"No results."}),i.close(),s();else if(a.audit_log){e({type:"SET_DEBUG_MESSAGE",message:""});const d={};let p,u;for(let h=0;h<r.urls.length;h++)u=r.urls[h],u&&(d[u]=Iq(a.audit_log,h),p=d[u]);i.close(),vw(r.editor,p,h=>{e({type:"SET_DEBUG_MESSAGE",message:`${h} node${h===1?"":"s"} on this canvas could not be matched to the result and ${h===1?"was":"were"} left uncoloured -- the canvas has drifted from the saved rules. The JSON view shows the full result.`})}),e({type:"SET_DEBUG_RESULTS",results:d,debugPostUrl:u}),s()}}catch(a){console.error(a)}},i.onerror=()=>{s("Lost connection to the debugger. Please try again.")},i.onclose=()=>{s("The debugger closed before returning a result.")},()=>{n=!0,i.close()}})},exit:["clearPendingAuditResults"],on:{COMPLETE_AUDIT:{target:"idle"},START_AUDIT:{target:"running",reenter:!0}}}}},generateFeed:{initial:"idle",states:{idle:{on:{GENERATE_FEED:[{target:"running",guard:"isFormValid"},{target:"invalid"}]}},invalid:{entry:"reportValidity",on:{GENERATE_FEED:{target:"running",guard:"isFormValid"}}},running:{invoke:{id:"feed",input:({event:o})=>{if(o.type!=="GENERATE_FEED"&&o.type!=="REGENERATE_FEED")throw new Error("Invalid event type");return{feedVersion:o.feedVersion}},src:cf(({input:o,sendBack:e})=>{const r=o,t=new WebSocket("wss://api.graze.social/app/api/v1/workbench/live-query");return t.onopen=()=>{t.send(JSON.stringify(r.feedVersion.manifest.filter.metadata?.customNodeParameters?{...r.feedVersion,manifest:{...r.feedVersion.manifest,filter:Fn(r.feedVersion.manifest.filter,r.feedVersion.manifest.filter.metadata?.customNodeParameters)}}:r.feedVersion))},t.onmessage=i=>{try{const n=JSON.parse(i.data);"status"in n?e({type:"SET_GENERATE_MESSAGE",message:n.status}):(e({type:"SET_GENERATE_MESSAGE",message:`Scanned ${n.record_count} posts...`}),e({type:"ADD_TO_FEED",feed:n.posts}))}catch(n){console.error(n)}},t.onclose=()=>{e({type:"COMPLETE_GENERATE"})},()=>{t.close()}})},on:{COMPLETE_GENERATE:{target:"idle"}
188,REGENERATE_FEED:[{target:"running",reenter:!0,guard:"isFormValid",actions:["clearGeneratedFeed"]},{target:"invalid"}]}}}}}}}},{guards:{isFormValid:()=>{const o=document.querySelector("form");return o?o.checkValidity():!0}},actions:{setDebugResultUrl:rt({debugPostUrl:({event:o})=>{if(o.type!=="SET_DEBUG_RESULT_URL")throw new Error("Invalid event type");return o.url}}),removeAuditItem:rt({debugResults:({context:o,event:e})=>{if(e.type!=="REMOVE_AUDIT_ITEM")throw new Error("Invalid event type");const r={...o.debugResults};return delete r[e.url],r||{}}}),setPendingAuditResults:rt({pendingAuditResults:({event:o})=>{if(o.type!=="START_AUDIT")throw new Error("Invalid event type");return o.urls}}),clearPendingAuditResults:rt({pendingAuditResults:[]}),setDebugHiddenStatuses:rt({debugHiddenStatuses:({event:o,context:e})=>{if(o.type!=="SET_DEBUG_HIDDEN_STATUSES")throw new Error("Invalid event type");const r={...e.debugHiddenStatuses};for(const t of o.hiddenStatuses)r[t.uri]=t.hidden;return r}}),setDebugPresenceStatuses:rt({debugPresenceStatuses:({event:o,context:e})=>{if(o.type!=="SET_DEBUG_PRESENCE_STATUSES")throw new Error("Invalid event type");const r={...e.debugPresenceStatuses};for(const t of o.presenceStatuses)r[t.uri]=t.present;return r}}),resetDebugError:rt({debugError:!1}),setDebugError:rt({debugError:!0}),reportValidity:()=>{const o=document.querySelector("form");if(!o)return!1;o.reportValidity()},clearGeneratedFeed:rt({generatedFeed:[]}),setVisiblePanel:rt({visiblePanel:({event:o})=>{if(o.type!=="SET_VISIBLE_PANEL")throw new Error("Invalid event type");return o.panel}}),setDebugMessage:rt({debugMessage:({event:o})=>{if(o.type!=="SET_DEBUG_MESSAGE")throw new Error("Invalid event type");return o.message}}),setDebugResults:rt({debugPostUrl:({event:o})=>{if(o.type!=="SET_DEBUG_RESULTS")throw new Error("Invalid event type");return o.debugPostUrl},debugResults:({context:o,event:e})=>{if(e.type!=="SET_DEBUG_RESULTS")throw new Error("Invalid event type");return{...o.debugResults,...e.results}}}),setGenerateMessage:rt({generateMessage:({event:o})=>{if(o.type!=="SET_GENERATE_MESSAGE")throw new Error("Invalid event type");return o.message}}),addToFeed:rt({generatedFeed:({context:o,event:e})=>{if(e.type!=="ADD_TO_FEED")throw new Error("Invalid event type");return[...o.generatedFeed,...e.feed]}}),setPostPanelVisible:rt({visiblePanel:"post"})}}),$s=zA(Mq);function Nq(o){const e=Q.c(3),{post:r}=o,{toast:t}=ma();let i;return e[0]!==r.author.did||e[1]!==t?(i=c.jsx(Ge,{onSelect:()=>{navigator.clipboard.writeText(r.author.did).then(()=>t({title:"Copied to clipboard"})).catch(console.error)},children:"Copy User DID"}),e[0]=r.author.did,e[1]=t,e[2]=i):i=e[2],i}function Bq(o){const e=Q.c(3),{post:r}=o,{toast:t}=ma();let i;return e[0]!==r.uri||e[1]!==t?(i=c.jsx(Ge,{onSelect:()=>{navigator.clipboard.writeText(Kn(r.uri)).then(()=>t({title:"Copied to clipboard"})).catch(console.error)},children:"Copy Link to Post"}),e[0]=r.uri,e[1]=t,e[2]=i):i=e[2],i}function Vq(o){const e=Q.c(2),{post:r}=o;let t;return e[0]!==r.uri?(t=c.jsx(Ge,{onSelect:()=>{window.open(`https://pdsls.dev/${FA(r.uri)}`,"_blank")},children:"Open in pdsls.dev"}),e[0]=r.uri,e[1]=t):t=e[1],t}function Vk(o,e,r){const t=Q.c(6);let i;t[0]!==o?(i=$A(o),t[0]=o,t[1]=i):i=t[1];const{data:n}=qo(i);let s;return t[2]!==n||t[3]!==e||t[4]!==r?(s=n?.find(l=>l.sticky_post_id===e&&(r===void 0||l.sticky_type===r)),t[2]=n,t[3]=e,t[4]=r,t[5]=s):s=t[5],s}function KO(o){const e=Q.c(14),{feedId:r,stickyPostId:t,stickyType:i}=o,n=Vk(r,t,i);if(!n){let h;return e[0]===Symbol.for("react.memo_cache_sentinel")?(h=c.jsx(le,{message:"Added on this feed only.",children:c.jsx("span",{className:"text-xs text-slate-dim",children:"This feed"})}),e[0]=h):h=e[0],h}if(n.opted_out){const h=`Turned off on this feed. â${n.sticky_set_name}â won't switch it back on.`;let y;e[1]===Symbol.for("react.memo_cache_sentinel")?(y=c.jsx(ff,{variant:"secondary",children:"Off here"}),e[1]=y):y=e[1];let m;return e[2]!==h?(m=c.jsx(le,{message:h,children:y}),e[2]=h,e[3]=m):m=e[3],m}
188const s=`Managed by the sticky set â${n.sticky_set_name}â. Edit it there to change it everywhere.`,l=`${n.sticky_set_id}`;let a;e[4]!==l?(a={setId:l},e[4]=l,e[5]=a):a=e[5];let d;e[6]!==n.sticky_set_name?(d=c.jsx(ff,{variant:"outline",className:"max-w-full hover:underline",children:c.jsx("span",{className:"truncate",children:n.sticky_set_name})}),e[6]=n.sticky_set_name,e[7]=d):d=e[7];let p;e[8]!==a||e[9]!==d?(p=c.jsx(Hw,{to:"/app/sticky-sets/$setId/view",params:a,onClick:Lq,children:d}),e[8]=a,e[9]=d,e[10]=p):p=e[10];let u;return e[11]!==s||e[12]!==p?(u=c.jsx(le,{message:s,children:p}),e[11]=s,e[12]=p,e[13]=u):u=e[13],u}function Lq(o){return o.stopPropagation()}function zq(o){const e=Q.c(42),{feedId:r,stickyPostId:t,stickyType:i}=o,{toast:n}=ma(),s=Vk(r,t,i);let l;e[0]!==s?(l=z=>GA(s.association_id,z),e[0]=s,e[1]=l):l=e[1];let a;e[2]!==s?.sticky_set_name||e[3]!==n?(a=(z,N)=>n({title:N?"Turned off on this feed":"Turned back on",description:N?`â${s?.sticky_set_name}â will leave it off here.`:"It follows the set again."}),e[2]=s?.sticky_set_name,e[3]=n,e[4]=a):a=e[4];let d;e[5]!==n?(d=z=>n({title:"Couldn't change that",description:z.message,variant:"destructive"}),e[5]=n,e[6]=d):d=e[6];let p;e[7]!==l||e[8]!==a||e[9]!==d?(p={mutationFn:l,onSuccess:a,onError:d},e[7]=l,e[8]=a,e[9]=d,e[10]=p):p=e[10];const u=Ur(p);let h;e[11]!==s?(h=()=>UA(s.association_id),e[11]=s,e[12]=h):h=e[12];let y,m;e[13]!==n?(y=()=>n({title:"Copy taken",description:"This feed now owns this post and can edit it. The set will add its own copy back."}),m=z=>n({title:"Couldn't detach that",description:z.message,variant:"destructive"}),e[13]=n,e[14]=y,e[15]=m):(y=e[14],m=e[15]);let w;e[16]!==h||e[17]!==y||e[18]!==m?(w={mutationFn:h,onSuccess:y,onError:m},e[16]=h,e[17]=y,e[18]=m,e[19]=w):w=e[19];const x=Ur(w);if(!s)return null;let v;e[20]===Symbol.for("react.memo_cache_sentinel")?(v=c.jsx(Kr,{}),e[20]=v):v=e[20];let k;e[21]!==s.opted_out||e[22]!==u?(k=()=>u.mutate(!s.opted_out),e[21]=s.opted_out,e[22]=u,e[23]=k):k=e[23];const A=s.opted_out?"Turn back on here":"Turn off on this feed";let S;e[24]!==u.isPending||e[25]!==k||e[26]!==A?(S=c.jsx(Ge,{disabled:u.isPending,onSelect:k,children:A}),e[24]=u.isPending,e[25]=k,e[26]=A,e[27]=S):S=e[27];let E;e[28]!==x?(E=()=>x.mutate(),e[28]=x,e[29]=E):E=e[29];let _;e[30]!==x.isPending||e[31]!==E?(_=c.jsx(Ge,{disabled:x.isPending,onSelect:E,children:"Take a copy this feed owns"}),e[30]=x.isPending,e[31]=E,e[32]=_):_=e[32];const C=`${s.sticky_set_id}`;let O;e[33]!==C?(O={setId:C},e[33]=C,e[34]=O):O=e[34];let V;e[35]!==s.sticky_set_name||e[36]!==O?(V=c.jsx(Ge,{asChild:!0,children:c.jsxs(Hw,{to:"/app/sticky-sets/$setId/view",params:O,children:["Edit â",s.sticky_set_name,"â"]})}),e[35]=s.sticky_set_name,e[36]=O,e[37]=V):V=e[37];let I;return e[38]!==S||e[39]!==_||e[40]!==V?(I=c.jsxs(c.Fragment,{children:[v,S,_,V]}),e[38]=S,e[39]=_,e[40]=V,e[41]=I):I=e[41],I}function Fq(o){const e=Q.c(67),{feedId:r,stickyPostId:t,assocId:i,stickyType:n,isActive:s,postUri:l}=o,{toast:a}=ma();let d;e[0]!==i||e[1]!==r||e[2]!==t||e[3]!==n?(d=()=>HA({algo_id:r,sticky_post_id:t,assoc_id:i,sticky_type:n}),e[0]=i,e[1]=r,e[2]=t,e[3]=n,e[4]=d):d=e[4];let p,u;e[5]!==a?(p=()=>a({title:"Sticky post deleted",description:"Your sticky post has been deleted."}),u=ce=>a({title:"Error deleting sticky post",description:ce.message,variant:"destructive"}),e[5]=a,e[6]=p,e[7]=u):(p=e[6],u=e[7]);let h;e[8]!==d||e[9]!==p||e[10]!==u?(h={mutationFn:d,onSuccess:p,onError:u},e[8]=d,e[9]=p,e[10]=u,e[11]=h):h=e[11];const y=Ur(h);let m;e[12]!==i||e[13]!==r||e[14]!==t||e[15]!==n?(m=async ce=>{if(!n)throw new Error("Sticky type is required");return lf({algo_id:r,sticky_post_id:t,assoc_id:i,is_active:ce.active,sticky_type:n})},e[12]=i,e[13]=r,e[14]=t,e[15]=n,e[16]=m):m=e[16];let w;e[17]!==a?(w=ce=>a({title:"Error updating sticky post",description:ce.message,variant:"destructive"}),e[17]=a,e[18]=w):w=e[18];let x;e[19]!==m||e[20]!==w?(x={mutationFn:m,onError:w},e[19]=m,e[20]=w,e[21]=x):x=e[21];const v=Ur(x),[k,A]=Y.useState(!1);let S;e[22]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{A(!1)},e[22]=S):S=e[22];let E;e[23]!==i||e[24]!==r||e[25]!==t||e[26]!==n?(E=async ce=>lf({algo_id:r,sticky_post_id:t,assoc_id:i,sticky_type:n,order:ce.order}),e[23]=i,e[24]=r,e[25]=t,e[26]=n,e[27]=E):E=e[27];let _;e[28]!==a?(_=ce=>a({title:"Error updating sticky post",description:ce.message,variant:"destructive"}),e[28]=a,e[29]=_):_=e[29];let C;e[30]!==_||e[31]!==E?(C={onSuccess:S,mutationFn:E,onError:_},e[30]=_,e[31]=E,e[32]=C):C=e[32];const O=Ur(C);let V;e[33]!==v||e[34]!==s||e[35]!==n?(V=n&&(s?c.jsx(Ge,{onSelect:()=>v.mutate({active:!1}),children:"Deactivate Sticky Post"}):c.jsx(Ge,{onSelect:()=>v.mutate({active:!0}),children:"Activate Sticky Post"})),e[33]=v,e[34]=s,e[35]=n,e[36]=V):V=e[36];let I;e[37]===Symbol.for("react.memo_cache_sentinel")?(I=c.jsx(CR,{asChild:!0,children:c.jsx(Ge,{onSelect:$q,children:"Edit Order"})}),e[37]=I):I=e[37];let z;e[38]!==O?(z=ce=>{ce.preventDefault(),ce.stopPropagation();const fe=new FormData(ce.target),K=Number(fe.get("order"));O.mutate({order:K})},e[38]=O,e[39]=z):z=e[39];let N;e[40]===Symbol.for("react.memo_cache_sentinel")?(N=c.jsxs(PR,{children:[c.jsx(TR,{children:"Edit Order"}),c.jsx(qR,{children:"Change the order of the sticky post."})]}),e[40]=N):N=e[40];let R;e[41]===Symbol.for("react.memo_cache_sentinel")?(R=c.jsxs("div",{className:"flex flex-col gap-3",children:[c.jsx(wt,{htmlFor:"post-order",children:"Order"}),c.jsx(KA,{id:"post-order",name:"order"})]}),e[41]=R):R=e[41];let D;e[42]!==O.isPending?(D=c.jsx(ER,{children:c.jsx(Jr,{type:"submit",isLoading:O.isPending,children:"Save"})}),e[42]=O.isPending,e[43]=D):D=e[43];let q;e[44]!==z||e[45]!==D?(q=c.jsx(DR,{children:c.jsxs("form",{className:"flex flex-col gap-4",onSubmit:z,children:[N,R,D]})}),e[44]=z,e[45]=D,e[46]=q):q=e[46];let j;e[47]!==k||e[48]!==q?(j=c.jsxs(OR,{open:k,onOpenChange:A,children:[I,q]}),e[47]=k,e[48]=q,e[49]=j):j=e[49];let L;e[50]!==l?(L=Kn(l),e[50]=l,e[51]=L):L=e[51];let U;e[52]!==L?(U=c.jsx(Ge,{asChild:!0,children:c.jsx("a",{className:"flex items-center gap-1",href:L,target:"_blank",rel:"noreferrer",children:"View on Bluesky"})}),e[52]=L,e[53]=U):U=e[53];let W;e[54]===Symbol.for("react.memo_cache_sentinel")?(W=c.jsx(Kr,{}),e[54]=W):W=e[54];let ee;e[55]!==y?(ee=c.jsx(Ge,{onSelect:()=>y.mutate(),children:"Delete Sticky Post"}),e[55]=y,e[56]=ee):ee=e[56];let ae;e[57]!==r||e[58]!==t||e[59]!==n?(ae=c.jsx(zq,{feedId:r,stickyPostId:t,stickyType:n}),e[57]=r,e[58]=t,e[59]=n,e[60]=ae):ae=e[60];let de;return e[61]!==V||e[62]!==j||e[63]!==U||e[64]!==ee||e[65]!==ae?(de=c.jsxs(c.Fragment,{children:[V,j,U,W,ee,ae]}),e[61]=V,e[62]=j,e[63]=U,e[64]=ee,e[65]=ae,e[66]=de):de=e[66],de}function $q(o){return o.preventDefault()}function Gq(o){return o.$type.includes("app.bsky.embed.images")}function Uq(o){return o.$type.includes("app.bsky.embed.gallery")}function Hq(o,e){return e.items.map(r=>({alt:r.alt,image:r.image,thumb:r.thumbnail??(r.image?Lk(o,r.image):"")}))}function Kq(o){return o.$type.includes("app.bsky.embed.video")}function Wq(o){return o.$type.includes("app.bsky.embed.external")}function Xq(o){return o.$type.includes("app.bsky.embed.recordWithMedia")}function Qq(o){return o.$type.includes("com.atproto.repo.record")&&o.record.$type==="com.atproto.repo.strongRef"}function Jq(o){return o.$type.includes("app.bsky.embed.record")&&o.record.$type==="com.atproto.repo.strongRef"}function Yq(o){return o.$type.includes("app.bsky.embed.record")&&o.record.$type==="app.bsky.feed.defs#generatorView"}function Lk(o,e){return typeof e=="string"?e:`https://cdn.bsky.app/img/feed_thumbnail/plain/${o}/${e.ref.$link||e.ref.link}@${e.mimeType.replace("image/","")}`}function zu(o){const e=Q.c(10),{alt:r,className:t}=o;let i;e[0]!==t?(i=he("text-[8px] bg-slate-4 dark:bg-slatedark-4 p-1 rounded-md text-slate-dim m-1",t),e[0]=t,e[1]=i):i=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=c.jsx("span",{className:"sr-only",children:": show alt text"}),e[2]=n):n=e[2];let s;e[3]!==i?(s=c.jsx(Vw,{asChild:!0,children:c.jsxs("button",{type:"button",className:i,children:["ALT",n]})}),e[3]=i,e[4]=s):s=e[4];let l;e[5]!==r?(l=c.jsx(Bw,{className:"text-xs",side:"top",children:r}),e[5]=r,e[6]=l):l=e[6];let a;
188return e[7]!==s||e[8]!==l?(a=c.jsxs(Lw,{children:[s,l]}),e[7]=s,e[8]=l,e[9]=a):a=e[9],a}function zk(o){const e=Q.c(10),{variant:r,feedVariant:t,actions:i}=o,[n,s]=Y.useState(!1);if(!Y.use(oD))return null;let a;e[0]!==i||e[1]!==t||e[2]!==n?(a=!n&&c.jsxs("div",{className:he("absolute z-100 inset-0 overflow-hidden bg-slatea-10 dark:bg-slatedarka-10 backdrop-blur-lg flex justify-center items-center",t!=="video"&&"rounded-lg","flex gap-1"),onClick:Zq,children:[c.jsx(Jr,{variant:"action",size:"sm",onClick:()=>{s(!0)},children:"Show"}),i]}),e[0]=i,e[1]=t,e[2]=n,e[3]=a):a=e[3];let d;e[4]!==r||e[5]!==n?(d=n&&c.jsx("div",{className:he("absolute rounded-lg inset-0 overflow-hidden flex justify-center opacity-0 hover:opacity-100 transition-opacity",r==="video"&&"items-start pt-4",r==="image"&&"items-center"),children:c.jsx(Jr,{variant:"action",size:"sm",onClick:u=>{u.stopPropagation(),s(!1)},children:"Hide"})}),e[4]=r,e[5]=n,e[6]=d):d=e[6];let p;return e[7]!==a||e[8]!==d?(p=c.jsxs(c.Fragment,{children:[a,d]}),e[7]=a,e[8]=d,e[9]=p):p=e[9],p}function Zq(o){return o.stopPropagation()}function ww(o){const e=Q.c(30),{images:r,isSensitive:t}=o,[i,n]=Y.useState(0),[s,l]=Y.useState(!1),a=Y.use(_p),d=r[i],p=a?"":"gap-2",u=r.length>1?"flex overflow-auto":void 0,h=r.length>1&&!a&&"gap-2";let y;e[0]!==p||e[1]!==u||e[2]!==h?(y=he(p,u,h),e[0]=p,e[1]=u,e[2]=h,e[3]=y):y=e[3];let m;if(e[4]!==a||e[5]!==r||e[6]!==t){let C;e[8]!==a||e[9]!==r.length||e[10]!==t?(C=(O,V)=>c.jsxs("button",{type:"button",className:he("relative overflow-hidden bg-slate-subtle flex items-center justify-center w-fit",r.length===1&&a&&"w-full"),onClick:()=>{n(V),l(!0)},children:[c.jsx("img",{src:O.thumb,alt:O.alt,className:he("flex-[0.5]",!a&&"max-h-[300px]")}),O.alt&&c.jsx(zu,{alt:O.alt,className:"absolute bottom-0 right-0"}),t&&c.jsx(zk,{variant:"image",feedVariant:"post"})]},O.thumb),e[8]=a,e[9]=r.length,e[10]=t,e[11]=C):C=e[11],m=r.map(C),e[4]=a,e[5]=r,e[6]=t,e[7]=m}else m=e[7];let w;e[12]!==y||e[13]!==m?(w=c.jsx("div",{className:y,children:m}),e[12]=y,e[13]=m,e[14]=w):w=e[14];let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=()=>l(!1),e[15]=x):x=e[15];let v;e[16]!==d?(v=d&&c.jsxs("div",{className:"flex flex-col gap-2 items-center justify-center px-4 flex-1 min-h-0",children:[c.jsx("div",{className:"object-contain flex-1 min-h-0 flex items-center justify-center",children:c.jsx("img",{src:d.thumb,alt:d.alt,className:"h-auto w-full object-contain",onClick:tD})}),d.alt&&c.jsxs("div",{className:"text-slate-3 text-sm italic",children:[d.alt," "]})]}),e[16]=d,e[17]=v):v=e[17];let k;e[18]!==r?(k=r.length>1&&c.jsx("div",{className:"flex gap-2 h-[80px] justify-center items-center",onClick:eD,children:r.map((C,O)=>c.jsx("button",{type:"button",className:"h-full rounded-lg overflow-hidden bg-slate-subtle flex items-center justify-center border border-slatedark-1 w-fit",onClick:()=>{n(O)},children:c.jsx("img",{src:C.thumb,alt:C.alt,className:"w-full h-full object-contain"})},C.thumb))}),e[18]=r,e[19]=k):k=e[19];let A;e[20]!==v||e[21]!==k?(A=c.jsxs("div",{className:"flex flex-col gap-4 h-full py-4",children:[v,k]}),e[20]=v,e[21]=k,e[22]=A):A=e[22];let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S=c.jsx(QA,{asChild:!0,children:c.jsxs("button",{className:"absolute top-4 right-4 h-8 w-8 hover:bg-slatedark-5 rounded text-slatedark-12 flex items-center justify-center",type:"button",children:[c.jsx("span",{className:"sr-only",children:"Close"}),c.jsx(Xp,{})]})}),e[23]=S):S=e[23];let E;e[24]!==A?(E=c.jsx(JA,{children:c.jsxs(YA,{className:"fixed inset-0 z-10000 bg-slatea-12",onClick:x,children:[A,S]})}),e[24]=A,e[25]=E):E=e[25];let _;return e[26]!==s||e[27]!==E||e[28]!==w?(_=c.jsxs(ZA,{open:s,onOpenChange:l,children:[w,E]}),e[26]=s,e[27]=E,e[28]=w,e[29]=_):_=e[29],_}function eD(o){return o.stopPropagation()}function tD(o){return o.stopPropagation()}const Fk=o=>{const e=Q.c(40),{playlist:r,alt:t,thumbnail:i,style:n,className:s,aspectRatio:l,onPlayingChange:a,isSensitive:d,variant:p,actions:u}=o,h=p===void 0?"video":p,y=Y.use(jp),m=Y.useRef(null),[w,x]=Y.useState(!1);let v;e[0]!==a?(v=U=>{x(U),a?.(U)},e[0]=a,e[1]=v):v=e[1];const k=tu(v);let A,S;e[2]!==w||e[3]!==k?(A=()=>{if(w){const U=document.querySelector("#preview-feed");if(!U)return;const W=function(){m.current&&(m.current.pause(),k(!1))};return U.addEventListener("scroll",W),()=>{U.removeEventListener("scroll",W)}}},S=[w,k],e[2]=w,e[3]=k,e[4]=A,e[5]=S):(A=e[4],S=e[5]),Y.useEffect(A,S);let E,_;e[6]!==r?(E=()=>{const U=new mR({capLevelToPlayerSize:!0,xhrSetup(W,ee){const ae=new URL(ee);ae.searchParams.delete("session_id"),W.open("get",ae.toString())}});return U.loadSource(r.replace("https://video.bsky.app/watch/","https://video.cdn.bsky.app/hls/")),m.current&&U.attachMedia(m.current),()=>{U.destroy()}},_=[r],e[6]=r,e[7]=E,e[8]=_):(E=e[7],_=e[8]),Y.useEffect(E,_);let C;e[9]!==w||e[10]!==k?(C=()=>{w?(m.current?.pause(),k(!1)):m.current?.play().then(()=>k(!0)).catch(console.error)},e[9]=w,e[10]=k,e[11]=C):C=e[11];const O=C;let V;e[12]!==s?(V=he("h-full w-full",s),e[12]=s,e[13]=V):V=e[13];let I,z;e[14]!==y||e[15]!==k?(z=()=>{y&&(m.current?.play().catch(console.error),k(!0))},I=()=>{y&&(m.current?.pause(),k(!1))},e[14]=y,e[15]=k,e[16]=I,e[17]=z):(I=e[16],z=e[17]);const N=l?.height,R=l?.width;let D;e[18]!==t||e[19]!==N||e[20]!==R||e[21]!==i?(D=c.jsx("video",{className:"h-full w-full object-contain relative z-1",ref:m,"aria-description":t,poster:i,height:N,width:R}),e[18]=t,e[19]=N,e[20]=R,e[21]=i,e[22]=D):D=e[22];let q;
188e[23]!==u||e[24]!==d||e[25]!==h?(q=d&&c.jsx(zk,{variant:"video",feedVariant:h,actions:u}),e[23]=u,e[24]=d,e[25]=h,e[26]=q):q=e[26];let j;e[27]!==w||e[28]!==y||e[29]!==O?(j=!y&&c.jsx("button",{type:"button",className:he("z-10","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-slatea-10 hover:bg-slate-12 text-slatedark-12 p-6 rounded-full",w?"opacity-0 group-hover:opacity-100":"opacity-100"),onClick:O,children:w?c.jsx(WA,{className:"h-8 w-8"}):c.jsx(XA,{className:"h-8 w-8"})}),e[27]=w,e[28]=y,e[29]=O,e[30]=j):j=e[30];let L;return e[31]!==n||e[32]!==I||e[33]!==D||e[34]!==q||e[35]!==j||e[36]!==V||e[37]!==z||e[38]!==O?(L=c.jsxs("div",{className:V,style:n,onClick:O,onMouseEnter:z,onMouseLeave:I,children:[D,q,j]}),e[31]=n,e[32]=I,e[33]=D,e[34]=q,e[35]=j,e[36]=V,e[37]=z,e[38]=O,e[39]=L):L=e[39],L};function uu(o){const e=Q.c(62),{did:r,embed:t,isSensitive:i}=o;if(Gq(t)){let n;return e[0]!==t.images||e[1]!==i?(n=c.jsx(ww,{images:t.images,isSensitive:i}),e[0]=t.images,e[1]=i,e[2]=n):n=e[2],n}if(Uq(t)){let n;e[3]!==r||e[4]!==t?(n=Hq(r,t),e[3]=r,e[4]=t,e[5]=n):n=e[5];let s;return e[6]!==i||e[7]!==n?(s=c.jsx(ww,{images:n,isSensitive:i}),e[6]=i,e[7]=n,e[8]=s):s=e[8],s}if(Kq(t)){let n;e[9]!==t||e[10]!==i?(n=c.jsx(Fk,{...t,isSensitive:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let s;e[12]!==t.alt?(s=t.alt&&c.jsx(zu,{alt:t.alt,className:"absolute bottom-0 right-0 m-1"}),e[12]=t.alt,e[13]=s):s=e[13];let l;return e[14]!==n||e[15]!==s?(l=c.jsxs("div",{className:"aspect-video h-[200px] bg-slate-3 dark:bg-slatedark-3 border border-slate-7 dark:border-slatedark-7 rounded-lg overflow-hidden relative",children:[n,s]}),e[14]=n,e[15]=s,e[16]=l):l=e[16],l}if(Wq(t)){const n=t.external.thumb&&t.external.description.startsWith("ALT:");if(t.external.thumb&&n){let y;e[17]!==r||e[18]!==t.external.thumb||e[19]!==t.external.uri?(y=t.external.uri||Lk(r,t.external.thumb),e[17]=r,e[18]=t.external.thumb,e[19]=t.external.uri,e[20]=y):y=e[20];let m;return e[21]!==t.external.title||e[22]!==y?(m=c.jsx("img",{src:y,className:"w-full h-full object-contain bg-slate-3 dark:bg-slatedark-3 max-h-[400px]",alt:t.external.title}),e[21]=t.external.title,e[22]=y,e[23]=m):m=e[23],m}let s;e[24]!==t.external.thumb?(s=t.external.thumb&&c.jsx("div",{className:"h-auto w-1/4 shrink-0 border-r border-slate-7 dark:border-slatedark-7",children:c.jsx("img",{alt:"",src:t.external.thumb,className:"w-full h-full object-cover"})}),e[24]=t.external.thumb,e[25]=s):s=e[25];const l=t.external.title||t.external.uri;let a;e[26]!==l?(a=c.jsx("div",{className:"font-semibold text-sm",children:l}),e[26]=l,e[27]=a):a=e[27];let d;e[28]!==t.external.description?(d=c.jsx("div",{className:"text-xs",dangerouslySetInnerHTML:{__html:t.external.description}}),e[28]=t.external.description,e[29]=d):d=e[29];let p;e[30]!==a||e[31]!==d?(p=c.jsxs("div",{className:"flex flex-col gap-1 px-3 py-2",children:[a,d]}),e[30]=a,e[31]=d,e[32]=p):p=e[32];let u;e[33]===Symbol.for("react.memo_cache_sentinel")?(u=c.jsx("div",{className:he("pointer-events-none absolute inset-0 flex items-center justify-center","bg-slatea-2 dark:bg-slatedarka-2","opacity-0 group-hover:opacity-100 transition-opacity")}),e[33]=u):u=e[33];let h;return e[34]!==t.external.uri||e[35]!==s||e[36]!==p?(h=c.jsxs("a",{rel:"noreferrer",target:"_blank",href:t.external.uri,className:"relative border border-slate-normal rounded-lg overflow-hidden flex text-sm group",children:[s,p,u]}),e[34]=t.external.uri,e[35]=s,e[36]=p,e[37]=h):h=e[37],h}if(Xq(t)){let n;return e[38]!==r||e[39]!==t.media||e[40]!==i?(n=c.jsx(uu,{did:r,embed:t.media,isSensitive:i}),e[38]=r,e[39]=t.media,e[40]=i,e[41]=n):n=e[41],n}if(Qq(t))return null;if(Yq(t)){let n;e[42]!==t.record.uri?(n=Kn(t.record.uri),e[42]=t.record.uri,e[43]=n):n=e[43];let s;e[44]!==t.record.avatar||e[45]!==t.record.displayName?(s=c.jsx(Co,{className:"rounded-sm",src:t.record.avatar,alt:t.record.displayName}),e[44]=t.record.avatar,e[45]=t.record.displayName,e[46]=s):s=e[46];let l;e[47]!==t.record.displayName?(l=c.jsx("div",{className:"font-semibold",children:t.record.displayName}),e[47]=t.record.displayName,e[48]=l):l=e[48];let a;e[49]!==t.record.creator.handle?(a=c.jsxs("div",{className:"text-xs text-slate-dim-overridable",children:["@",t.record.creator.handle]}),e[49]=t.record.creator.handle,e[50]=a):a=e[50];let d;e[51]!==l||e[52]!==a?(d=c.jsxs("div",{className:"flex flex-col gap-1",children:[l,a]}),e[51]=l,e[52]=a,e[53]=d):d=e[53];let p;e[54]!==s||e[55]!==d?(p=c.jsxs("div",{className:"flex gap-2 items-center",children:[s,d]}),e[54]=s,e[55]=d,e[56]=p):p=e[56];let u;return e[57]!==n||e[58]!==p?(u=c.jsx("a",{href:n,target:"_blank",rel:"noreferrer",className:"bg-slate-ghost border rounded-md border-slate-normal p-1",children:p}),e[57]=n,e[58]=p,e[59]=u):u=e[59],u}if(Jq(t)){let n;return e[60]!==t.record?(n=c.jsx("div",{className:"border-10 border-red-10",children:c.jsx(lp,{record:t.record})}),e[60]=t.record,e[61]=n):n=e[61],n}return null}function lp(o){const e=Q.c(7),{record:r,className:t}=o;let i;if(e[0]!==r.record){const l=new jC.RichText(r.record);i=[];for(const a of l.segments())a.isLink()?i.push(c.jsx(df,{href:a.link?.uri,target:"_blank",rel:"noreferrer",children:a.text},a.link?.uri)):a.isMention()?i.push(c.jsx(df,{href:`https://bsky.app/profile/${a.mention?.did}`,target:"_blank",rel:"noreferrer",children:a.text},a.mention?.did)):i.push(a.text);e[0]=r.record,e[1]=i}else i=e[1];let n;e[2]!==t?(n=he("break-words text-sm whitespace-pre-wrap",t),e[2]=t,e[3]=n):n=e[3];let s;return e[4]!==n||e[5]!==i?(s=c.jsx("div",{className:n,children:i}),e[4]=n,e[5]=i,e[6]=s):s=e[6],s}function $k(o){const e=Q.c(56),{record:r,feedId:t}=o,n=Y.use(Ep)[r.uri]??r.hidden,s=Y.use(Gk),l=Y.use(Uk),{toast:a}=ma();let d,p;e[0]!==a?(d=()=>a({title:"Hidden post"}),p=L=>a({title:"Failed to hide post",description:za(L)}),e[0]=a,e[1]=d,e[2]=p):(d=e[1],p=e[2]);let u;e[3]!==l||e[4]!==t||e[5]!==r.uri?(u=async()=>{t&&(l(r.uri),await iR({at_uri:r.uri,algo_id:t}))},e[3]=l,e[4]=t,e[5]=r.uri,e[6]=u):u=e[6];let h;e[7]!==d||e[8]!==p||e[9]!==u?(h={onSuccess:d,onError:p,mutationFn:u},e[7]=d,e[8]=p,e[9]=u,e[10]=h):h=e[10];const y=Ur(h);let m,w;e[11]!==a?(m=()=>a({title:"Revealed post"}),w=L=>a({title:"Failed to reveal post",description:za(L)}
188),e[11]=a,e[12]=m,e[13]=w):(m=e[12],w=e[13]);let x;e[14]!==t||e[15]!==r.uri||e[16]!==s?(x=async()=>{t&&(s(r.uri),await nR({at_uri:r.uri,algo_id:t}))},e[14]=t,e[15]=r.uri,e[16]=s,e[17]=x):x=e[17];let v;e[18]!==m||e[19]!==w||e[20]!==x?(v={onSuccess:m,onError:w,mutationFn:x},e[18]=m,e[19]=w,e[20]=x,e[21]=v):v=e[21];const k=Ur(v);let A,S;e[22]!==a?(S=()=>a({title:"Hide post across all feeds"}),A=L=>a({title:"Failed to hide post across all feeds",description:za(L)}),e[22]=a,e[23]=A,e[24]=S):(A=e[23],S=e[24]);let E;e[25]!==r.uri?(E=()=>sR({at_uri:r.uri}),e[25]=r.uri,e[26]=E):E=e[26];let _;e[27]!==A||e[28]!==E||e[29]!==S?(_={onSuccess:S,onError:A,mutationFn:E},e[27]=A,e[28]=E,e[29]=S,e[30]=_):_=e[30];const C=Ur(_);let O;e[31]!==a?(O=()=>{a({title:"Added to feed"})},e[31]=a,e[32]=O):O=e[32];let V;e[33]!==t||e[34]!==r.uri?(V=L=>{if(!t)throw new Error("Feed ID is required");return aR({algo_id:t,post_urls:[r.uri],current_time:L})},e[33]=t,e[34]=r.uri,e[35]=V):V=e[35];let I;e[36]!==a?(I=L=>a({title:"Failed to add to feed",description:za(L)}),e[36]=a,e[37]=I):I=e[37];let z;e[38]!==O||e[39]!==V||e[40]!==I?(z={retry:2,onSuccess:O,mutationFn:V,onError:I},e[38]=O,e[39]=V,e[40]=I,e[41]=z):z=e[41];const N=Ur(z);let R;e[42]!==r.uri?(R=Kn(r.uri),e[42]=r.uri,e[43]=R):R=e[43];let D;e[44]!==R?(D=c.jsx(Ge,{asChild:!0,children:c.jsx("a",{className:"flex items-center gap-1",href:R,target:"_blank",rel:"noreferrer",children:"View on Bluesky"})}),e[44]=R,e[45]=D):D=e[45];let q;e[46]!==t||e[47]!==C||e[48]!==y||e[49]!==n||e[50]!==N||e[51]!==k?(q=t&&c.jsxs(c.Fragment,{children:[c.jsx(Kr,{}),c.jsx(Ge,{onSelect:()=>C.mutate(),children:"Remove from all feeds"}),n?c.jsx(Ge,{onSelect:()=>k.mutate(),children:"Unhide post"}):c.jsx(Ge,{onSelect:()=>y.mutate(),children:"Remove from feed"}),c.jsx(Kr,{}),c.jsx(Ge,{onSelect:()=>N.mutate(!1),children:"Add to feed"}),c.jsx(Ge,{onSelect:()=>N.mutate(!0),children:"Add to top of feed"}),c.jsx(Kr,{})]}),e[46]=t,e[47]=C,e[48]=y,e[49]=n,e[50]=N,e[51]=k,e[52]=q):q=e[52];let j;return e[53]!==D||e[54]!==q?(j=c.jsxs(c.Fragment,{children:[D,q]}),e[53]=D,e[54]=q,e[55]=j):j=e[55],j}function rD(o){const e=Q.c(5),{message:r,children:t}=o;let i;e[0]!==t?(i=c.jsx("div",{className:"text-xs px-2 py-1 rounded-md bg-slatea-action text-slate-normal",children:t}),e[0]=t,e[1]=i):i=e[1];let n;return e[2]!==r||e[3]!==i?(n=c.jsx(le,{message:r,children:i}),e[2]=r,e[3]=i,e[4]=n):n=e[4],n}const oD=Y.createContext(!1),_p=Y.createContext(!1);function Fu(o){const e=Q.c(149),{record:r,className:t,actions:i,isPresent:n,isDimmed:s,details:l,hideEngagement:a}=o,d=a===void 0?!1:a,p=Y.use(_p),h=Y.use(Ep)[r.uri]??r.hidden,y=(h||s)&&"opacity-50";let m;e[0]!==h?(m=h&&c.jsxs(rD,{message:"Hidden on feed",children:["Hidden ",c.jsx("span",{className:"sr-only",children:"on feed"})]}),e[0]=h,e[1]=m):m=e[1];let w;e[2]!==h||e[3]!==n?(w=n&&!h&&c.jsx(le,{message:"Present on feed",children:c.jsxs("div",{className:"text-xs p-1 rounded-md bg-slatea-ghost text-slate-normal",children:[c.jsx(eR,{})," ",c.jsx("span",{className:"sr-only",children:"Present on feed"})]})}),e[2]=h,e[3]=n,e[4]=w):w=e[4];let x;e[5]!==m||e[6]!==w?(x=c.jsxs(c.Fragment,{children:[m,w]}),e[5]=m,e[6]=w,e[7]=x):x=e[7];const v=x;if(p){let Ve;e[8]!==t?(Ve=he("flex flex-col","bg-slate-app",t),e[8]=t,e[9]=Ve):Ve=e[9];let me;e[10]!==y||e[11]!==r.record.reply?(me=r.record.reply&&c.jsx("div",{className:he(y,"text-xs text-reply-header-text bg-reply-header-bg text-center py-2 px-4 rounded-t"),children:c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(J1,{className:"h-3.5 w-3.5"}),"Reply"]})}),e[10]=y,e[11]=r.record.reply,e[12]=me):me=e[12];let Ae;e[13]!==r.author.did||e[14]!==r.embed||e[15]!==r.labels?(Ae=r.embed&&c.jsx(uu,{did:r.author.did,embed:r.embed,isSensitive:r.labels.some(nD)}),e[13]=r.author.did,e[14]=r.embed,e[15]=r.labels,e[16]=Ae):Ae=e[16];let Re;e[17]!==y?(Re=he(y,"flex gap-3 items-center px-4 text-slate-dim-overridable text-xs"),e[17]=y,e[18]=Re):Re=e[18];let Te;e[19]===Symbol.for("react.memo_cache_sentinel")?(Te=c.jsx(Yp,{className:"h-3.5 w-3.5"}),e[19]=Te):Te=e[19];let ue;e[20]!==r.replyCount?(ue=c.jsxs("div",{className:"flex gap-1 items-center",children:[Te,c.jsx("div",{children:r.replyCount})]}),e[20]=r.replyCount,e[21]=ue):ue=e[21];let xe;e[22]===Symbol.for("react.memo_cache_sentinel")?(xe=c.jsx(iu,{className:"h-3.5 w-3.5"}),e[22]=xe):xe=e[22];let be;e[23]!==r.repostCount?(be=c.jsxs("div",{className:"flex gap-1 items-center",children:[xe,c.jsx("div",{children:r.repostCount})]}),e[23]=r.repostCount,e[24]=be):be=e[24];let Le;e[25]===Symbol.for("react.memo_cache_sentinel")?(Le=c.jsx(ou,{className:"h-3.5 w-3.5"}),e[25]=Le):Le=e[25];let Ue;e[26]!==r.likeCount?(Ue=c.jsxs("div",{className:"flex gap-1 items-center",children:[Le,c.jsx("div",{children:r.likeCount})]}),e[26]=r.likeCount,e[27]=Ue):Ue=e[27];let ze;e[28]!==ue||e[29]!==be||e[30]!==Ue||e[31]!==Re?(ze=c.jsxs("div",{className:Re,children:[ue,be,Ue]}),e[28]=ue,e[29]=be,e[30]=Ue,e[31]=Re,e[32]=ze):ze=e[32];let We;e[33]!==y?(We=he(y,"flex gap-3 items-center flex-1 min-w-0"),e[33]=y,e[34]=We):We=e[34];const nt=r.author.displayName||r.author.handle;let Ke;e[35]!==r.author.avatar||e[36]!==nt?(Ke=c.jsx(Co,{src:r.author.avatar,alt:nt}),e[35]=r.author.avatar,e[36]=nt,e[37]=Ke):Ke=e[37];const At=r.author.displayName||r.author.handle;let tt;e[38]!==At?(tt=c.jsx("div",{className:"text-sm text-slate-normal font-medium truncate",children:At}),e[38]=At,e[39]=tt):tt=e[39];let X;e[40]!==r.author.handle?(X=c.jsxs("div",{className:"text-xs text-slate-dim-overridable truncate",children:["@",r.author.handle]}),e[40]=r.author.handle,e[41]=X):X=e[41];let pt;e[42]!==tt||e[43]!==X?(pt=c.jsxs("div",{className:"flex-1 min-w-0",children:[tt,X]}),e[42]=tt,e[43]=X,e[44]=pt):pt=e[44];let ut;
188e[45]!==We||e[46]!==Ke||e[47]!==pt?(ut=c.jsxs("div",{className:We,children:[Ke,pt]}),e[45]=We,e[46]=Ke,e[47]=pt,e[48]=ut):ut=e[48];const J=!i&&"px-2";let Bt;e[49]!==y||e[50]!==J?(Bt=he(y,"text-xs text-slate-dim-overridable",J),e[49]=y,e[50]=J,e[51]=Bt):Bt=e[51];let Vt;e[52]!==r.record.createdAt?(Vt=r.record.createdAt&&ru(new Date(r.record.createdAt)),e[52]=r.record.createdAt,e[53]=Vt):Vt=e[53];let ft;e[54]!==Bt||e[55]!==Vt?(ft=c.jsx("div",{className:"flex gap-2 items-center",children:c.jsx("div",{className:Bt,children:Vt})}),e[54]=Bt,e[55]=Vt,e[56]=ft):ft=e[56];let Lt;e[57]!==ut||e[58]!==ft?(Lt=c.jsxs("div",{className:"pl-4 pr-2 flex gap-3 items-center justify-between",children:[ut,ft]}),e[57]=ut,e[58]=ft,e[59]=Lt):Lt=e[59];let zt;e[60]!==y?(zt=he(y,"px-4 flex flex-col gap-3"),e[60]=y,e[61]=zt):zt=e[61];let mt;e[62]!==r?(mt=c.jsx("div",{className:"p-1",children:c.jsx(lp,{record:r})}),e[62]=r,e[63]=mt):mt=e[63];let Rt;e[64]!==zt||e[65]!==mt?(Rt=c.jsx("div",{className:zt,children:mt}),e[64]=zt,e[65]=mt,e[66]=Rt):Rt=e[66];let _t;e[67]!==ze||e[68]!==Lt||e[69]!==Rt||e[70]!==Ae?(_t=c.jsxs("div",{className:"flex flex-col pb-4 gap-3",children:[Ae,ze,Lt,Rt]}),e[67]=ze,e[68]=Lt,e[69]=Rt,e[70]=Ae,e[71]=_t):_t=e[71];let st;e[72]!==_t||e[73]!==Ve||e[74]!==me?(st=c.jsxs("div",{className:Ve,children:[me,_t]}),e[72]=_t,e[73]=Ve,e[74]=me,e[75]=st):st=e[75];let jt;e[76]!==v||e[77]!==l?(jt=c.jsxs("div",{className:"absolute bottom-3 right-4 flex gap-2 items-center",children:[v,l]}),e[76]=v,e[77]=l,e[78]=jt):jt=e[78];let Xt;return e[79]!==st||e[80]!==jt?(Xt=c.jsxs("div",{className:"relative",children:[st,jt]}),e[79]=st,e[80]=jt,e[81]=Xt):Xt=e[81],Xt}let k;e[82]!==t?(k=he("flex flex-col","border border-slate-7 dark:border-slatedark-7","rounded-lg overflow-hidden shadow-md","bg-slate-app",t),e[82]=t,e[83]=k):k=e[83];let A;e[84]!==y||e[85]!==r.record.reply?(A=r.record.reply&&c.jsx("div",{className:he(y,"text-xs text-reply-header-text bg-reply-header-bg text-center py-2 px-4 rounded-t"),children:c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(J1,{className:"h-3.5 w-3.5"}),"Reply"]})}),e[84]=y,e[85]=r.record.reply,e[86]=A):A=e[86];let S;e[87]!==y?(S=he(y,"flex gap-3 items-center flex-1 min-w-0"),e[87]=y,e[88]=S):S=e[88];const E=r.author.displayName||r.author.handle;let _;e[89]!==r.author.avatar||e[90]!==E?(_=c.jsx(Co,{src:r.author.avatar,alt:E}),e[89]=r.author.avatar,e[90]=E,e[91]=_):_=e[91];const C=r.author.displayName||r.author.handle;let O;e[92]!==C?(O=c.jsx("div",{className:"text-sm text-slate-normal font-medium truncate",children:C}),e[92]=C,e[93]=O):O=e[93];let V;e[94]!==r.author.handle?(V=c.jsxs("div",{className:"text-xs text-slate-dim-overridable truncate",children:["@",r.author.handle]}),e[94]=r.author.handle,e[95]=V):V=e[95];let I;e[96]!==O||e[97]!==V?(I=c.jsxs("div",{className:"flex-1 min-w-0",children:[O,V]}),e[96]=O,e[97]=V,e[98]=I):I=e[98];let z;e[99]!==I||e[100]!==S||e[101]!==_?(z=c.jsxs("div",{className:S,children:[_,I]}),e[99]=I,e[100]=S,e[101]=_,e[102]=z):z=e[102];const N=!i&&"px-2";let R;e[103]!==y||e[104]!==N?(R=he(y,"text-xs text-slate-dim-overridable",N),e[103]=y,e[104]=N,e[105]=R):R=e[105];let D;e[106]!==r.record.createdAt?(D=r.record.createdAt&&ru(new Date(r.record.createdAt)),e[106]=r.record.createdAt,e[107]=D):D=e[107];let q;e[108]!==R||e[109]!==D?(q=c.jsx("div",{className:R,children:D}),e[108]=R,e[109]=D,e[110]=q):q=e[110];let j;e[111]!==i||e[112]!==q?(j=c.jsxs("div",{className:"flex gap-2 items-center",children:[q,i]}),e[111]=i,e[112]=q,e[113]=j):j=e[113];let L;e[114]!==z||e[115]!==j?(L=c.jsxs("div",{className:"pl-4 pr-2 flex gap-3 items-start justify-between",children:[z,j]}),e[114]=z,e[115]=j,e[116]=L):L=e[116];let U;e[117]!==y?(U=he(y,"px-4 flex flex-col gap-3"),e[117]=y,e[118]=U):U=e[118];let W;e[119]!==r?(W=c.jsx("div",{className:"p-1",children:c.jsx(lp,{record:r})}),e[119]=r,e[120]=W):W=e[120];let ee;e[121]!==r.author.did||e[122]!==r.embed||e[123]!==r.labels?(ee=r.embed&&c.jsx(uu,{did:r.author.did,embed:r.embed,isSensitive:r.labels.some(iD)}),e[121]=r.author.did,e[122]=r.embed,e[123]=r.labels,e[124]=ee):ee=e[124];let ae;e[125]!==U||e[126]!==W||e[127]!==ee?(ae=c.jsxs("div",{className:U,children:[W,ee]}),e[125]=U,e[126]=W,e[127]=ee,e[128]=ae):ae=e[128];let de;e[129]!==y||e[130]!==d||e[131]!==r.likeCount||e[132]!==r.replyCount||e[133]!==r.repostCount?(de=!d&&c.jsxs("div",{className:he(y,"flex gap-3 items-center px-4 text-slate-dim-overridable text-xs"),children:[c.jsxs("div",{className:"flex gap-1 items-center",children:[c.jsx(Yp,{className:"h-3.5 w-3.5"}),c.jsx("div",{children:r.replyCount})]}),c.jsxs("div",{className:"flex gap-1 items-center",children:[c.jsx(iu,{className:"h-3.5 w-3.5"}),c.jsx("div",{children:r.repostCount})]}),c.jsxs("div",{className:"flex gap-1 items-center",children:[c.jsx(ou,{className:"h-3.5 w-3.5"}),c.jsx("div",{children:r.likeCount})]})]}),e[129]=y,e[130]=d,e[131]=r.likeCount,e[132]=r.replyCount,e[133]=r.repostCount,e[134]=de):de=e[134];let ce;e[135]!==L||e[136]!==ae||e[137]!==de?(ce=c.jsxs("div",{className:"flex flex-col py-4 gap-3",children:[L,ae,de]}),e[135]=L,e[136]=ae,e[137]=de,e[138]=ce):ce=e[138];let fe;e[139]!==ce||e[140]!==k||e[141]!==A?(fe=c.jsxs("div",{className:k,children:[A,ce]}),e[139]=ce,e[140]=k,e[141]=A,e[142]=fe):fe=e[142];let K;e[143]!==v||e[144]!==l?(K=c.jsxs("div",{className:"absolute bottom-3 right-4 flex gap-2 items-center",children:[v,l]}
188),e[143]=v,e[144]=l,e[145]=K):K=e[145];let Me;return e[146]!==fe||e[147]!==K?(Me=c.jsxs("div",{className:"relative",children:[fe,K]}),e[146]=fe,e[147]=K,e[148]=Me):Me=e[148],Me}function iD(o){return["porn","sexual","graphic-media","nudity"].includes(o.val)}function nD(o){return["porn","sexual","graphic-media","nudity"].includes(o.val)}const jp=Y.createContext(!1);function $u(o){const e=Q.c(29),{record:r,className:t,actions:i,feedId:n,showPostActions:s}=o,l=Y.use(jp),p=(Y.use(Ep)[r.uri]??r.hidden)&&"opacity-35",[u,h]=Y.useState(!1);let y;e[0]!==r.labels?(y=r.labels.some(sD),e[0]=r.labels,e[1]=y):y=e[1];const m=y;if(!r.embed?.$type.includes("app.bsky.embed.video"))return null;const w=r.embed;let x;e[2]!==t?(x=he("grid bg-slatedark-2 group relative",t),e[2]=t,e[3]=x):x=e[3];const v=r.cid,k=l?void 0:400;let A;e[4]!==k?(A={gridRow:"1",gridColumn:"1",minHeight:k,margin:"auto"},e[4]=k,e[5]=A):A=e[5];let S;e[6]!==p?(S=he(p),e[6]=p,e[7]=S):S=e[7];let E;e[8]!==n||e[9]!==r||e[10]!==s?(E=s&&c.jsxs(yp,{children:[c.jsx(gp,{asChild:!0,children:c.jsxs(Jr,{variant:"action",size:"smIcon",children:[c.jsx("span",{className:"sr-only",children:"More actions"}),c.jsx(Ww,{})]})}),c.jsx(bp,{children:c.jsx($k,{record:r,feedId:n})})]}),e[8]=n,e[9]=r,e[10]=s,e[11]=E):E=e[11];let _;e[12]!==m||e[13]!==A||e[14]!==S||e[15]!==E||e[16]!==w?(_=c.jsx(Fk,{...w,style:A,className:S,onPlayingChange:h,isSensitive:m,variant:"video",actions:E}),e[12]=m,e[13]=A,e[14]=S,e[15]=E,e[16]=w,e[17]=_):_=e[17];let C;e[18]!==i||e[19]!==p||e[20]!==u||e[21]!==l||e[22]!==r?(C=!u&&c.jsxs("div",{className:he("relative z-2 flex flex-col gap-3 py-4 bg-linear-to-t from-slatea-12 via-slatea-10 via-60% h-fit self-end text-slatedark-12",!l&&"pt-14","pointer-events-none"),style:{gridRow:"1",gridColumn:"1"},children:[c.jsxs("div",{className:"pl-4 pr-2 flex gap-3 items-start justify-between",children:[c.jsxs("div",{className:he(p,"flex gap-3 items-center"),children:[c.jsx(Co,{src:r.author.avatar,alt:r.author.displayName||r.author.handle}),c.jsxs("div",{children:[c.jsx("div",{className:"text-sm",children:r.author.displayName||r.author.handle}),c.jsxs("div",{className:"text-xs text-slatedark-11",children:["@",r.author.handle]})]})]}),c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsx("div",{className:he(p,"text-xs text-slatedark-11"),children:r.record.createdAt&&ru(new Date(r.record.createdAt))}),i]})]}),c.jsx("div",{className:he(p,"px-4 inline-flex gap-3"),children:c.jsx(lp,{record:r,className:"line-clamp-3"})}),c.jsxs("div",{className:he(p,"flex gap-3 items-center px-4 text-slatedark-11 text-sm"),children:[c.jsxs("div",{className:"flex gap-1 items-center",children:[c.jsx(Yp,{className:"h-3.5 w-3.5"}),c.jsx("div",{children:r.replyCount})]}),c.jsxs("div",{className:"flex gap-1 items-center",children:[c.jsx(iu,{className:"h-3.5 w-3.5"}),c.jsx("div",{children:r.repostCount})]}),c.jsxs("div",{className:"flex gap-1 items-center",children:[c.jsx(ou,{className:"h-3.5 w-3.5"}),c.jsx("div",{children:r.likeCount})]}),r.record?.embed?.alt&&c.jsx(zu,{alt:r.record.embed.alt})]})]}),e[18]=i,e[19]=p,e[20]=u,e[21]=l,e[22]=r,e[23]=C):C=e[23];let O;return e[24]!==r.cid||e[25]!==x||e[26]!==_||e[27]!==C?(O=c.jsxs("div",{className:x,children:[_,C]},v),e[24]=r.cid,e[25]=x,e[26]=_,e[27]=C,e[28]=O):O=e[28],O}function sD(o){return["porn","sexual","graphic-media","nudity"].includes(o.val)}const Ep=Y.createContext({}),Gk=Y.createContext(()=>{throw new Error("RemoveHiddenFeedItemContext not provided")}),Uk=Y.createContext(()=>{throw new Error("AddHiddenFeedItemContext not provided")});function Gu(o){const e=Q.c(7),{isFetchingNextPage:r,fetchNextPage:t}=o,i=Y.useRef(null),n=Y.useRef(r);let s,l;e[0]!==r?(s=()=>{n.current=r},l=[r],e[0]=r,e[1]=s,e[2]=l):(s=e[1],l=e[2]),Y.useEffect(s,l);let a,d;e[3]!==t?(a=()=>{if(!i.current||!t)return;const u=new IntersectionObserver(h=>{const[y]=h;y?.isIntersecting&&!n.current&&t().catch(console.error)});return u.observe(i.current),()=>{u.disconnect()}},d=[t],e[3]=t,e[4]=a,e[5]=d):(a=e[4],d=e[5]),Y.useEffect(a,d);let p;return e[6]===Symbol.for("react.memo_cache_sentinel")?(p=c.jsx("div",{className:"flex items-center justify-center flex-1 p-4",ref:i,children:c.jsx(Zr,{})}),e[6]=p):p=e[6],p}function Uu(o){const e=Q.c(8),{children:r}=o;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={},e[0]=t):t=e[0];const[i,n]=Y.useState(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=h=>{n(y=>({...y,[h]:!0}))},e[1]=s):s=e[1];const l=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=h=>{n(y=>({...y,[h]:!1}))},e[2]=a):a=e[2];const d=a;let p;e[3]!==r?(p=c.jsx(Gk,{value:d,children:c.jsx(Uk,{value:l,children:r})}),e[3]=r,e[4]=p):p=e[4];let u;return e[5]!==i||e[6]!==p?(u=c.jsx(Ep,{value:i,children:p}),e[5]=i,e[6]=p,e[7]=u):u=e[7],u}function Hk({feedId:o,posts:e,hasNextPage:r,isFetchingNextPage:t,fetchNextPage:i,warning:n,isLoading:s,error:l,onDebugPost:a,isVideo:d,virtualization:p="scroll",showPostActions:u=!0,frameless:h,className:y}){"use no memo";const m=Y.useRef(null),w=Y.useRef(null),x=wu(w);Y.useEffect(()=>{!window.frameElement||!x||window.parent.postMessage(["setHeight",{height:x.height,id:window.frameElement.id}],"*")},[x]);const v=p==="window"?rR({count:r?e.length+1:e.length,estimateSize:()=>250,overscan:5}):oR({count:r?e.length+1:e.length,getScrollElement:()=>m.current,estimateSize:()=>250,overscan:5}),k=v.getVirtualItems(),A=Y.use(_p),S=c.jsx("div",{className:"w-full relative",style:{height:v.getTotalSize()},children:c.jsx("div",{className:he("w-full absolute top-0 left-0 flex flex-col",!h&&"bg-slate-3 dark:bg-slatedark-3",!d&&!A&&"gap-4 p-4"),style:{transform:`translateY(${k[0]?.start??0}px)`},children:k.map(E=>{const _=E.index>e.length-1,C=e[E.index],O=d?$u:Fu;return c.jsx("div",{"data-index":E.index,ref:v.measureElement,children:_?r?c.jsx(Gu,{isFetchingNextPage:t,fetchNextPage:i}):c.jsx("div",{className:"flex items-center justify-center flex-1 p-4",children:c.jsx("span",{className:"text-sm text-slate-dim-overridable",children:"End of feed"})}):C&&c.jsx(O,{record:C,feedId:o,showPostActions:u,className:d?"border-b border-slatedark-7":"",actions:u&&c.jsxs(yp,{children:[c.jsx(gp,{asChild:!0,children:c.jsxs(Jr,{variant:"ghost",size:"smIcon",className:he(d&&"text-slatedark-12 bg-slatedarka-5 hover:bg-slatedarka-6 !aria-[expanded=true]:bg-slatedarka-6 pointer-events-auto"),children:[c.jsx("span",{className:"sr-only",children:"More actions"}),c.jsx(Ww,{})]})}),c.jsxs(bp,{align:"end",children:[c.jsx(Nq,{post:C}),c.jsx(Bq,{post:C}),c.jsx(Kr,{}
188),a&&c.jsx(Ge,{onSelect:()=>a(C),children:"Debug post"}),c.jsx(Vq,{post:C}),C.sticky_id&&o?c.jsx(Fq,{isActive:!0,feedId:o,stickyPostId:C.sticky_id,postUri:C.uri}):c.jsx($k,{record:C,feedId:o})]})]})})},E.key)})})});return c.jsx(Uu,{children:c.jsx("div",{ref:w,className:he("flex flex-col overflow-auto relative w-full h-full",y),children:l?c.jsx("div",{className:"flex-1 flex items-center justify-center",children:c.jsxs("div",{className:"flex items-center gap-2 p-4 text-red-10 dark:text-reddark-10",children:[c.jsx(pf,{className:"h-5 w-5"}),c.jsx("div",{className:"text-sm",children:l.message})]})}):s?c.jsx("div",{className:"h-full w-full p-10 flex items-center justify-center",children:c.jsx(Zr,{})}):c.jsxs(c.Fragment,{children:[n&&c.jsxs("div",{className:"flex items-center gap-3 bg-amber-4 dark:bg-amberdark-4 text-amber-dark dark:text-amberdark-dark text-xs p-4",children:[c.jsx(pf,{className:"shrink-0 h-5 w-5"}),c.jsx("span",{className:"text-xs md:text-sm flex-1",children:n})]}),p==="scroll"?c.jsx("div",{ref:m,className:"overflow-auto contain-strict",id:"preview-feed",style:{height:x?.height??"100%",width:x?.width??"100%"},children:S}):c.jsx("div",{id:"preview-feed",children:S})]})})})}function WO({posts:o,hasNextPage:e,isFetchingNextPage:r,fetchNextPage:t,isLoading:i,isVideo:n,mode:s="click",frameless:l}){"use no memo";const a=Y.use(_p),d=Y.useRef(null),p=wu(d);Y.useEffect(()=>{!window.frameElement||!p||window.parent.postMessage(["setHeight",{height:p.height,id:window.frameElement.id}],"*")},[p]);const u=Y.useRef(null),h=Y.useRef(null);Y.useLayoutEffect(()=>{function m(){h.current?.layout?.()}const w=u.current;if(w)return lR(async()=>{const{default:x}=await import("./masonry-9cbH6B-8.js").then(v=>v.m);return{default:x}},__vite__mapDeps([0,1])).then(({default:x})=>{h.current=new x(w,{itemSelector:".grid-item",columnWidth:".grid-size",gutter:a?4:8}),w.addEventListener("load",m,{capture:!0})}).catch(console.error),()=>{w.removeEventListener("load",m,{capture:!0})}},[a,o.length]),Y.useLayoutEffect(()=>{if(!u.current||!h.current)return;const m=[],w=h.current.getItemElements?.();for(const x of o){const v=document.getElementById(x.cid.toString());v&&!w?.includes(v)&&m.push(v)}h.current.addItems?.(m)},[o.length,o]);const y=c.jsxs("div",{className:he("w-full relative",!l&&"bg-slate-3 dark:bg-slatedark-3"),children:[c.jsxs("div",{ref:u,children:[c.jsx("div",{className:"grid-size w-full sm:w-[calc((100%-8px)*(1/2))] md:w-[calc((100%-16px)*(1/3))]"}),o.map((m,w)=>{const x=w>o.length-1,v=n?$u:Fu;return c.jsx("div",{id:m.cid?.toString(),className:he("grid-item w-full sm:w-[calc((100%-8px)*(1/2))] md:w-[calc((100%-16px)*(1/3))]",a?"mt-1":"mt-2"),children:x?e?c.jsx(Gu,{isFetchingNextPage:r,fetchNextPage:t}):c.jsx("div",{className:"flex items-center justify-center flex-1 p-4",children:c.jsx("span",{className:"text-sm text-slate-dim-overridable",children:"End of feed"})}):m&&c.jsx(v,{record:m})},m.cid)})]}),e&&t&&(s==="infinite"?c.jsx(Zw,{fetchNextPage:t,isLoading:i}):c.jsx("div",{className:"flex items-center justify-center p-8",children:c.jsx(Jr,{onPress:()=>{t().catch(console.error)},isLoading:r,children:"Load more"})}))]});return c.jsx(jp,{value:!0,children:c.jsx(Uu,{children:c.jsx("div",{ref:d,className:"flex flex-col overflow-auto relative w-full h-full",children:i?c.jsx("div",{className:"h-full w-full p-10 flex items-center justify-center",children:c.jsx(Zr,{})}):c.jsx("div",{id:"preview-feed",children:y})})})})}function XO({posts:o,hasNextPage:e,isFetchingNextPage:r,fetchNextPage:t,isLoading:i,isVideo:n,mode:s="scroll",frameless:l}){"use no memo";const a=Y.useRef(null),d=wu(a),p=Y.useRef(null);Y.useEffect(()=>{!window.frameElement||!d||window.parent.postMessage(["setHeight",{height:d.height,id:window.frameElement.id}],"*")},[d]),Y.useEffect(()=>{if(s==="auto"){const h=setInterval(()=>{p.current?.scrollTo({left:p.current?.scrollLeft+300,behavior:"smooth"})},7500);return()=>clearInterval(h)}},[s]);const u=c.jsxs("div",{ref:p,className:he("w-full relative","flex items-center gap-2 px-8",!l&&"bg-slate-3 dark:bg-slatedark-3"),style:{scrollSnapType:"x mandatory",overflowX:"auto",display:"flex",WebkitOverflowScrolling:"touch",scrollBehavior:"smooth"},children:[o.map((h,y)=>{const m=y>o.length-1,w=n?$u:Fu;return c.jsx("div",{style:{flex:"0 0 min(32%, 420px)",scrollSnapAlign:"center"},children:m?e?c.jsx(Gu,{isFetchingNextPage:r,fetchNextPage:t}):c.jsx("div",{className:"flex items-center justify-center flex-1 p-4",children:c.jsx("span",{className:"text-sm text-slate-dim-overridable",children:"End of feed"})}):h&&c.jsx(w,{record:h})},h.id)}),e&&t&&c.jsx(Zw,{fetchNextPage:t,isLoading:i})]});return c.jsx(jp,{value:!0,children:c.jsx(Uu,{children:c.jsx("div",{ref:a,className:"flex flex-col overflow-auto relative w-full h-full",children:i?c.jsx("div",{className:"h-full w-full p-10 flex items-center justify-center",children:c.jsx(Zr,{})}):c.jsx("div",{id:"preview-feed",children:u})})})})}function aD({feedId:o,onDebugPost:e,virtualization:r="scroll",showPostActions:t=!0}){"use no memo";const{data:i,error:n,isLoading:s,isFetchingNextPage:l,hasNextPage:a,fetchNextPage:d,refetch:p}=pR(cR(o)),u=dR(tR(o)),[h]=Y.useState(()=>Date.now()),y=h-new Date(u.data?.updated_at).getTime()<36e5,m=Y.useMemo(()=>i?i.pages.flatMap(x=>x.posts):[],[i]),w=Y.useRef(p);return Y.useEffect(()=>{w.current=p},[p]),Y.useEffect(()=>{if(m.length>0)return;const x=setInterval(()=>{w.current().catch(console.error)},6e4);return()=>clearInterval(x)},[m.length]),c.jsx(Hk,{feedId:o,onDebugPost:e,posts:m,hasNextPage:a,isFetchingNextPage:l,fetchNextPage:d,warning:y&&"This feed was updated in the last hour. The feed will contain posts from before your algorithm was updated. This will resolve as new posts are added to the feed.",isLoading:s,error:n,isVideo:Kw(u.data.draft_algorithm_manifest),virtualization:r,showPostActions:t})}function cD(o){const e=Q.c(36),{feedVersion:r,feedId:t,onDebugPost:i,autoStart:n}=o,s=n===void 0?!0:n,l=$s.useActorRef(),a=$s.useSelector(pD),d=$s.useSelector(dD),p=$s.useSelector(lD);let u;e[0]!==l||e[1]!==r?(u=()=>{l.send({type:"REGENERATE_FEED",feedVersion:r})},e[0]=l,e[1]=r,e[2]=u):u=e[2];const h=tu(u);let y;e[3]!==l||e[4]!==r?(y=()=>{l.send({type:"GENERATE_FEED",feedVersion:r})},e[3]=l,e[4]=r,e[5]=y):y=e[5];const m=tu(y);let w,x;e[6]!==l||e[7]!==s||e[8]!==r?(w=()=>{!r||!s||l.send({type:"GENERATE_FEED",feedVersion:r})},x=[l,r,s],e[6]=l,e[7]=s,e[8]=r,e[9]=w,e[10]=x):(w=e[9],x=e[10]),Y.useEffect(w,x);let v;e[11]!==h?(v=c.jsx(Jr,{size:"xs",variant:"ghost",onPress:h,children:"Regenerate"}),e[11]=h,e[12]=v):v=e[12];const k=v;if(!p.length){if(!s&&!d){let z;e[13]===Symbol.for("react.memo_cache_sentinel")?(z=c.jsx("div",{className:"text-slate-dim text-sm",children:"Start creating a preview for the edits to your feed."}),e[13]=z):z=e[13];let N;return e[14]!==m?(N=c.jsxs("div",{className:"flex flex-col items-center gap-4 h-full justify-center",children:[z,c.jsx(Jr,{size:"xs",onPress:m,children:"Generate!"})]}),e[14]=m,e[15]=N):N=e[15],N}if(!d){let z;return e[16]===Symbol.for("react.memo_cache_sentinel")?(z=c.jsx("div",{className:"flex flex-col items-center gap-4 h-full justify-center",children:c.jsx("div",{className:"text-slate-dim text-sm",children:"You need to fill out all fields to generate a feed."})}),e[16]=z):z=e[16],z}let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=c.jsx(Zr,{}),e[17]=C):C=e[17];const O=a||"Starting...";let V;e[18]!==O?(V=c.jsx("div",{className:"text-slate-dim text-sm",children:O}),e[18]=O,e[19]=V):V=e[19];let I;return e[20]!==k||e[21]!==V?(I=c.jsxs("div",{className:"flex flex-col items-center gap-4 h-full justify-center",children:[C,V,k]}),e[20]=k,e[21]=V,e[22]=I):I=e[22],I}let A;e[23]!==r?(A=Kw(r),e[23]=r,e[24]=A):A=e[24];let S;e[25]!==a?(S=c.jsx("div",{className:"flex-1",children:a}),e[25]=a,e[26]=S):S=e[26];let E;e[27]!==k||e[28]!==S?(E=c.jsxs("div",{className:"flex gap-4 items-center",children:[S,k]}),e[27]=k,e[28]=S,e[29]=E):E=e[29];let _;return e[30]!==t||e[31]!==i||e[32]!==p||e[33]!==A||e[34]!==E?(_=c.jsx(Hk,{feedId:t,posts:p,hasNextPage:!0,isLoading:!1,isFetchingNextPage:!0,error:null,isVideo:A,warning:E,onDebugPost:i}),e[30]=t,e[31]=i,e[32]=p,e[33]=A,e[34]=E,e[35]=_):_=e[35],_}function lD(o){return o.context.generatedFeed}function dD(o){return o.matches("idle.generateFeed.running")}function pD(o){return o.context.generateMessage}function uD(o){const e=Q.c(9),{feedVersion:r,feedId:t}=o,i=ua(),n=$s.useActorRef();let s;e[0]!==n||e[1]!==i||e[2]!==t||e[3]!==r.manifest?(s=a=>{n.send({type:"START_AUDIT",urls:[Kn(a.uri)],manifest:r.manifest,editor:i,algo_i
188d:t})},e[0]=n,e[1]=i,e[2]=t,e[3]=r.manifest,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==r||e[7]!==s?(l=c.jsx(cD,{feedVersion:r,feedId:t,onDebugPost:s}),e[5]=t,e[6]=r,e[7]=s,e[8]=l):l=e[8],l}function QO(o){const e=Q.c(6),{feedId:r,workbench:t,feedVersion:i,onDebugPost:n}=o;if(t){let l;return e[0]!==r||e[1]!==i?(l=c.jsx(uD,{feedId:r,feedVersion:i}),e[0]=r,e[1]=i,e[2]=l):l=e[2],l}let s;return e[3]!==r||e[4]!==n?(s=c.jsx(aD,{feedId:r,onDebugPost:n}),e[3]=r,e[4]=n,e[5]=s):s=e[5],s}export{Ln as $,Gs as A,oT as B,XO as C,ra as D,$d as E,Ks as F,KP as G,ta as H,_p as I,kT as J,aT as K,Ud as L,WO as M,b2 as N,Qs as O,Hk as P,$s as Q,Js as R,Qd as S,ii as T,uT as U,aD as V,cD as W,Pe as X,Ie as Y,aa as Z,JD as _,jq as a,IO as a$,rO as a0,Pu as a1,YD as a2,ca as a3,mP as a4,uP as a5,fP as a6,ZD as a7,Ex as a8,UC as a9,UD as aA,cO as aB,KD as aC,Oo as aD,Sp as aE,rP as aF,eO as aG,Uu as aH,Nq as aI,Bq as aJ,Vq as aK,$k as aL,rD as aM,Mq as aN,_O as aO,NO as aP,RO as aQ,yO as aR,mO as aS,EO as aT,TO as aU,pO as aV,CO as aW,VO as aX,LO as aY,kO as aZ,qO as a_,bx as aa,wx as ab,tO as ac,HC as ad,Wr as ae,Lu as af,UO as ag,GO as ah,vw as ai,Oe as aj,Rp as ak,Ap as al,Fx as am,zC as an,WD as ao,$D as ap,nO as aq,la as ar,QD as as,Tu as at,ri as au,aO as av,sO as aw,HD as ax,Rx as ay,GD as az,Ws as b,DO as b0,uO as b1,wO as b2,MO as b3,vO as b4,OO as b5,zO as b6,xO as b7,PO as b8,FO as b9,lO as bA,$O as bB,XD as bC,IP as bD,oD as bE,ru as bF,lp as bG,iu as bH,ou as bI,KO as bJ,Fq as bK,hO as ba,bO as bb,BO as bc,SO as bd,AO as be,jO as bf,uD as bg,y2 as bh,QO as bi,JP as bj,s2 as bk,iO as bl,_q as bm,Oq as bn,Id as bo,dO as bp,zD as bq,It as br,kq as bs,HO as bt,hP as bu,FD as bv,gO as bw,fO as bx,oO as by,Bx as bz,Hd as c,Ys as d,Xd as e,Kd as f,Fd as g,sw as h,Xs as i,Wd as j,oi as k,Tn as l,In as m,On as n,Hs as o,Mn as p,Dn as q,qn as r,Us as s,ea as t,Zs as u,Fu as v,Fn as w,gq as x,u2 as y,J1 as z}; 189//# sourceMappingURL=PreviewFeed-CAJ1O6zX.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.